vendor: 5,792 bytes, lines 1-9
1var KL=Object.defineProperty;var f_=r=>{throw TypeError(r)};var XL=(r,e,t)=>e in r?KL(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Y=(r,e,t)=>XL(r,typeof e!="symbol"?e+"":e,t),Q1=(r,e,t)=>e.has(r)||f_("Cannot "+t);var u=(r,e,t)=>(Q1(r,e,"read from private field"),t?t.call(r):e.get(r)),C=(r,e,t)=>e.has(r)?f_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),k=(r,e,t,s)=>(Q1(r,e,"write to private field"),s?s.call(r,t):e.set(r,t),t),P=(r,e,t)=>(Q1(r,e,"access private method"),t);var ss=(r,e,t,s)=>({set _(i){k(r,e,i,t)},get _(){return u(r,e,s)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 t(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=t(i);fetch(i.href,a)}})();function B3(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Z1={exports:{}},Wm={},e2={exports:{}},qe={};/** 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 m_;function YL(){if(m_)return qe;m_=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=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"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function x(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,j={};function N(U,Z,ee){this.props=U,this.context=Z,this.refs=j,this.updater=ee||y}N.prototype.isReactComponent={},N.prototype.setState=function(U,Z){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,Z,"setState")},N.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function S(){}S.prototype=N.prototype;function A(U,Z,ee){this.props=U,this.context=Z,this.refs=j,this.updater=ee||y}var E=A.prototype=new S;E.constructor=A,v(E,N.prototype),E.isPureReactComponent=!0;var M=Array.isArray,R=Object.prototype.hasOwnProperty,I={current:null},F={key:!0,ref:!0,__self:!0,__source:!0};function D(U,Z,ee){var W,G={},ne=null,ue=null;if(Z!=null)for(W in Z.ref!==void 0&&(ue=Z.ref),Z.key!==void 0&&(ne=""+Z.key),Z)R.call(Z,W)&&!F.hasOwnProperty(W)&&(G[W]=Z[W]);var Se=arguments.length-2;if(Se===1)G.children=ee;else if(1<Se){for(var Ye=Array(Se),ds=0;ds<Se;ds++)Ye[ds]=arguments[ds+2];G.children=Ye}if(U&&U.defaultProps)for(W in Se=U.defaultProps,Se)G[W]===void 0&&(G[W]=Se[W]);return{$$typeof:r,type:U,key:ne,ref:ue,props:G,_owner:I.current}}function O(U,Z){return{$$typeof:r,type:U.type,key:Z,ref:U.ref,props:U.props,_owner:U._owner}}function $(U){return typeof U=="object"&&U!==null&&U.$$typeof===r}function z(U){var Z={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(ee){return Z[ee]})}var re=/\/+/g;function he(U,Z){return typeof U=="object"&&U!==null&&U.key!=null?z(""+U.key):Z.toString(36)}function de(U,Z,ee,W,G){var ne=typeof U;(ne==="undefined"||ne==="boolean")&&(U=null);var ue=!1;if(U===null)ue=!0;else switch(ne){case"string":case"number":ue=!0;break;case"object":switch(U.$$typeof){case r:case e:ue=!0}}if(ue)return ue=U,G=G(ue),U=W===""?"."+he(ue,0):W,M(G)?(ee="",U!=null&&(ee=U.replace(re,"$&/")+"/"),de(G,Z,ee,"",function(ds){return ds})):G!=null&&($(G)&&(G=O(G,ee+(!G.key||ue&&ue.key===G.key?"":(""+G.key).replace(re,"$&/")+"/")+U)),Z.push(G)),1;if(ue=0,W=W===""?".":W+":",M(U))for(var Se=0;Se<U.length;Se++){ne=U[Se];var Ye=W+he(ne,Se);ue+=de(ne,Z,ee,Ye,G)}else if(Ye=x(U),typeof Ye=="function")for(U=Ye.call(U),Se=0;!(ne=U.next()).done;)ne=ne.value,Ye=W+he(ne,Se++),ue+=de(ne,Z,ee,Ye,G);else if(ne==="object")throw Z=String(U),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return ue}function fe(U,Z,ee){if(U==null)return U;var W=[],G=0;return de(U,W,"","",function(ne){return Z.call(ee,ne,G++)}),W}function oe(U){if(U._status===-1){var Z=U._result;Z=Z(),Z.then(function(ee){(U._status===0||U._status===-1)&&(U._status=1,U._result=ee)},function(ee){(U._status===0||U._status===-1)&&(U._status=2,U._result=ee)}),U._status===-1&&(U._status=0,U._result=Z)}if(U._status===1)return U._result.default;throw U._result}var le={current:null},se={transition:null},K={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:se,ReactCurrentOwner:I};function Q(){throw Error("act(...) is not supported in production builds of React.")}return qe.Children={map:fe,forEach:function(U,Z,ee){fe(U,function(){Z.apply(this,arguments)},ee)},count:function(U){var Z=0;return fe(U,function(){Z++}),Z},toArray:function(U){return fe(U,function(Z){return Z})||[]}
vendor: 5,224 bytes, lines 9-25
9,only:function(U){if(!$(U))throw Error("React.Children.only expected to receive a single React element child.");return U}},qe.Component=N,qe.Fragment=t,qe.Profiler=i,qe.PureComponent=A,qe.StrictMode=s,qe.Suspense=h,qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,qe.act=Q,qe.cloneElement=function(U,Z,ee){if(U==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+U+".");var W=v({},U.props),G=U.key,ne=U.ref,ue=U._owner;if(Z!=null){if(Z.ref!==void 0&&(ne=Z.ref,ue=I.current),Z.key!==void 0&&(G=""+Z.key),U.type&&U.type.defaultProps)var Se=U.type.defaultProps;for(Ye in Z)R.call(Z,Ye)&&!F.hasOwnProperty(Ye)&&(W[Ye]=Z[Ye]===void 0&&Se!==void 0?Se[Ye]:Z[Ye])}var Ye=arguments.length-2;if(Ye===1)W.children=ee;else if(1<Ye){Se=Array(Ye);for(var ds=0;ds<Ye;ds++)Se[ds]=arguments[ds+2];W.children=Se}return{$$typeof:r,type:U.type,key:G,ref:ne,props:W,_owner:ue}},qe.createContext=function(U){return U={$$typeof:o,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},U.Provider={$$typeof:a,_context:U},U.Consumer=U},qe.createElement=D,qe.createFactory=function(U){var Z=D.bind(null,U);return Z.type=U,Z},qe.createRef=function(){return{current:null}},qe.forwardRef=function(U){return{$$typeof:c,render:U}},qe.isValidElement=$,qe.lazy=function(U){return{$$typeof:m,_payload:{_status:-1,_result:U},_init:oe}},qe.memo=function(U,Z){return{$$typeof:f,type:U,compare:Z===void 0?null:Z}},qe.startTransition=function(U){var Z=se.transition;se.transition={};try{U()}finally{se.transition=Z}},qe.unstable_act=Q,qe.useCallback=function(U,Z){return le.current.useCallback(U,Z)},qe.useContext=function(U){return le.current.useContext(U)},qe.useDebugValue=function(){},qe.useDeferredValue=function(U){return le.current.useDeferredValue(U)},qe.useEffect=function(U,Z){return le.current.useEffect(U,Z)},qe.useId=function(){return le.current.useId()},qe.useImperativeHandle=function(U,Z,ee){return le.current.useImperativeHandle(U,Z,ee)},qe.useInsertionEffect=function(U,Z){return le.current.useInsertionEffect(U,Z)},qe.useLayoutEffect=function(U,Z){return le.current.useLayoutEffect(U,Z)},qe.useMemo=function(U,Z){return le.current.useMemo(U,Z)},qe.useReducer=function(U,Z,ee){return le.current.useReducer(U,Z,ee)},qe.useRef=function(U){return le.current.useRef(U)},qe.useState=function(U){return le.current.useState(U)},qe.useSyncExternalStore=function(U,Z,ee){return le.current.useSyncExternalStore(U,Z,ee)},qe.useTransition=function(){return le.current.useTransition()},qe.version="18.3.1",qe}var p_;function ck(){return p_||(p_=1,e2.exports=YL()),e2.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 g_;function JL(){if(g_)return Wm;g_=1;var r=ck(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(c,h,f){var m,g={},x=null,y=null;f!==void 0&&(x=""+f),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(y=h.ref);for(m in h)s.call(h,m)&&!a.hasOwnProperty(m)&&(g[m]=h[m]);if(c&&c.defaultProps)for(m in h=c.defaultProps,h)g[m]===void 0&&(g[m]=h[m]);return{$$typeof:e,type:c,key:x,ref:y,props:g,_owner:i.current}}return Wm.Fragment=t,Wm.jsx=o,Wm.jsxs=o,Wm}var x_;function QL(){return x_||(x_=1,Z1.exports=JL()),Z1.exports}var n=QL(),T=ck();const Co=B3(T);var ly={},t2={exports:{}},En={},s2={exports:{}},n2={};/** 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 y_;function ZL(){return y_||(y_=1,(function(r){function e(se,K){var Q=se.length;se.push(K);e:for(;0<Q;){var U=Q-1>>>1,Z=se[U];if(0<i(Z,K))se[U]=K,se[Q]=Z,Q=U;else break e}}function t(se){return se.length===0?null:se[0]}function s(se){if(se.length===0)return null;var K=se[0],Q=se.pop();if(Q!==K){se[0]=Q;e:for(var U=0,Z=se.length,ee=Z>>>1;U<ee;){var W=2*(U+1)-1,G=se[W],ne=W+1,ue=se[ne];if(0>i(G,Q))ne<Z&&0>i(ue,G)?(se[U]=ue,se[ne]=Q,U=ne):(se[U]=G,se[W]=Q,U=W);else if(ne<Z&&0>i(ue,Q))se[U]=ue,se[ne]=Q,U=ne;else break e}}return K}function i(se,K){var Q=se.sortIndex-K.sortIndex;return Q!==0?Q:se.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;r.unstable_now=function(){return a.now()}}else{var o=Date,c=o.now();r.unstable_now=function(){return o.now()-c}}var h=[],f=[],m=1,g=null,x=3,y=!1,v=!1,j=!1,N=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(se){for(var K=t(f);K!==null;){if(K.callback===null)s(f);else if(K.startTime<=se)s(f),K.sortIndex=K.expirationTime,e(h,K);else break;K=t(f)}}
vendor: 51,421 bytes, lines 25-38
25function M(se){if(j=!1,E(se),!v)if(t(h)!==null)v=!0,oe(R);else{var K=t(f);K!==null&&le(M,K.startTime-se)}}function R(se,K){v=!1,j&&(j=!1,S(D),D=-1),y=!0;var Q=x;try{for(E(K),g=t(h);g!==null&&(!(g.expirationTime>K)||se&&!z());){var U=g.callback;if(typeof U=="function"){g.callback=null,x=g.priorityLevel;var Z=U(g.expirationTime<=K);K=r.unstable_now(),typeof Z=="function"?g.callback=Z:g===t(h)&&s(h),E(K)}else s(h);g=t(h)}if(g!==null)var ee=!0;else{var W=t(f);W!==null&&le(M,W.startTime-K),ee=!1}return ee}finally{g=null,x=Q,y=!1}}var I=!1,F=null,D=-1,O=5,$=-1;function z(){return!(r.unstable_now()-$<O)}function re(){if(F!==null){var se=r.unstable_now();$=se;var K=!0;try{K=F(!0,se)}finally{K?he():(I=!1,F=null)}}else I=!1}var he;if(typeof A=="function")he=function(){A(re)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,fe=de.port2;de.port1.onmessage=re,he=function(){fe.postMessage(null)}}else he=function(){N(re,0)};function oe(se){F=se,I||(I=!0,he())}function le(se,K){D=N(function(){se(r.unstable_now())},K)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(se){se.callback=null},r.unstable_continueExecution=function(){v||y||(v=!0,oe(R))},r.unstable_forceFrameRate=function(se){0>se||125<se?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<se?Math.floor(1e3/se):5},r.unstable_getCurrentPriorityLevel=function(){return x},r.unstable_getFirstCallbackNode=function(){return t(h)},r.unstable_next=function(se){switch(x){case 1:case 2:case 3:var K=3;break;default:K=x}var Q=x;x=K;try{return se()}finally{x=Q}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(se,K){switch(se){case 1:case 2:case 3:case 4:case 5:break;default:se=3}var Q=x;x=se;try{return K()}finally{x=Q}},r.unstable_scheduleCallback=function(se,K,Q){var U=r.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?U+Q:U):Q=U,se){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=Q+Z,se={id:m++,callback:K,priorityLevel:se,startTime:Q,expirationTime:Z,sortIndex:-1},Q>U?(se.sortIndex=Q,e(f,se),t(h)===null&&se===t(f)&&(j?(S(D),D=-1):j=!0,le(M,Q-U))):(se.sortIndex=Z,e(h,se),v||y||(v=!0,oe(R))),se},r.unstable_shouldYield=z,r.unstable_wrapCallback=function(se){var K=x;return function(){var Q=x;x=K;try{return se.apply(this,arguments)}finally{x=Q}}}})(n2)),n2}var b_;function eD(){return b_||(b_=1,s2.exports=ZL()),s2.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 v_;function tD(){if(v_)return En;v_=1;var r=ck(),e=eD();function t(l){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+l,p=1;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+l+"; visit "+d+" 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(l,d){o(l,d),o(l+"Capture",d)}function o(l,d){for(i[l]=d,l=0;l<d.length;l++)s.add(d[l])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,f=/^[: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]*$/,m={},g={};function x(l){return h.call(g,l)?!0:h.call(m,l)?!1:f.test(l)?g[l]=!0:(m[l]=!0,!1)}function y(l,d,p,b){if(p!==null&&p.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return b?!1:p!==null?!p.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function v(l,d,p,b){if(d===null||typeof d>"u"||y(l,d,p,b))return!0;if(b)return!1;if(p!==null)switch(p.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function j(l,d,p,b,w,_,L){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=b,this.attributeNamespace=w,this.mustUseProperty=p,this.propertyName=l,this.type=d,this.sanitizeURL=_,this.removeEmptyString=L}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){N[l]=new j(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var d=l[0];N[d]=new j(d,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){N[l]=new j(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){N[l]=new j(l,2,!1,l,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l){N[l]=new j(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){N[l]=new j(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){N[l]=new j(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){N[l]=new j(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){N[l]=new j(l,5,!1,l.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function A(l){return l[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l){var d=l.replace(S,A);N[d]=new j(d,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var d=l.replace(S,A);N[d]=new j(d,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var d=l.replace(S,A);N[d]=new j(d,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){N[l]=new j(l,1,!1,l.toLowerCase(),null,!1,!1)}),N.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){N[l]=new j(l,1,!1,l.toLowerCase(),null,!0,!0)});function E(l,d,p,b){var w=N.hasOwnProperty(d)?N[d]:null;(w!==null?w.type!==0:b||!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(v(d,p,w,b)&&(p=null),b||w===null?x(d)&&(p===null?l.removeAttribute(d):l.setAttribute(d,""+p)):w.mustUseProperty?l[w.propertyName]=p===null?w.type===3?!1:"":p:(d=w.attributeName,b=w.attributeNamespace,p===null?l.removeAttribute(d):(w=w.type,p=w===3||w===4&&p===!0?"":""+p,b?l.setAttributeNS(b,d,p):l.setAttribute(d,p))))}var M=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Symbol.for("react.element"),I=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),z=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),se=Symbol.iterator;function K(l){return l===null||typeof l!="object"?null:(l=se&&l[se]||l["@@iterator"],typeof l=="function"?l:null)}var Q=Object.assign,U;function Z(l){if(U===void 0)try{throw Error()}catch(p){var d=p.stack.trim().match(/\n( *(at )?)/);U=d&&d[1]||""}return` 34`+U+l}var ee=!1;function W(l,d){if(!l||ee)return"";ee=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(te){var b=te}Reflect.construct(l,[],d)}else{try{d.call()}catch(te){b=te}l.call(d.prototype)}else{try{throw Error()}catch(te){b=te}l()}}catch(te){if(te&&b&&typeof te.stack=="string"){for(var w=te.stack.split(` 35`),_=b.stack.split(` 36`),L=w.length-1,B=_.length-1;1<=L&&0<=B&&w[L]!==_[B];)B--;for(;1<=L&&0<=B;L--,B--)if(w[L]!==_[B]){if(L!==1||B!==1)do if(L--,B--,0>B||w[L]!==_[B]){var H=` 37`+w[L].replace(" at new "," at ");return l.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",l.displayName)),H}while(1<=L&&0<=B);break}}}finally{ee=!1,Error.prepareStackTrace=p}return(l=l?l.displayName||l.name:"")?Z(l):""}function G(l){switch(l.tag){case 5:return Z(l.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return l=W(l.type,!1),l;case 11:return l=W(l.type.render,!1),l;case 1:return l=W(l.type,!0),l;default:return""}}function ne(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case F:return"Fragment";case I:return"Portal";case O:return"Profiler";case D:return"StrictMode";case he:return"Suspense";case de:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case z:return(l.displayName||"Context")+".Consumer";case $:return(l._context.displayName||"Context")+".Provider";case re:var d=l.render;return l=l.displayName,l||(l=d.displayName||d.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case fe:return d=l.displayName||null,d!==null?d:ne(l.type)||"Memo";case oe:d=l._payload,l=l._init;try{return ne(l(d))}catch{}}return null}function ue(l){var d=l.type;switch(l.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=d.render,l=l.displayName||l.name||"",d.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(d);case 8:return d===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 d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function Se(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function Ye(l){var d=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function ds(l){var d=Ye(l)?"checked":"value",p=Object.getOwnPropertyDescriptor(l.constructor.prototype,d),b=""+l[d];if(!l.hasOwnProperty(d)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var w=p.get,_=p.set;return Object.defineProperty(l,d,{configurable:!0,get:function(){return w.call(this)},set:function(L){b=""+L,_.call(this,L)}}),Object.defineProperty(l,d,{enumerable:p.enumerable}),{getValue:function(){return b},setValue:function(L){b=""+L},stopTracking:function(){l._valueTracker=null,delete l[d]}}}}function jr(l){l._valueTracker||(l._valueTracker=ds(l))}function Ii(l){if(!l)return!1;var d=l._valueTracker;if(!d)return!0;var p=d.getValue(),b="";return l&&(b=Ye(l)?l.checked?"true":"false":l.value),l=b,l!==p?(d.setValue(l),!0):!1}function uc(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function im(l,d){var p=d.checked;return Q({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??l._wrapperState.initialChecked})}function v5(l,d){var p=d.defaultValue==null?"":d.defaultValue,b=d.checked!=null?d.checked:d.defaultChecked;p=Se(d.value!=null?d.value:p),l._wrapperState={initialChecked:b,initialValue:p,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function w5(l,d){d=d.checked,d!=null&&E(l,"checked",d,!1)}function aw(l,d){w5(l,d);var p=Se(d.value),b=d.type;if(p!=null)b==="number"?(p===0&&l.value===""||l.value!=p)&&(l.value=""+p):l.value!==""+p&&(l.value=""+p);else if(b==="submit"||b==="reset"){l.removeAttribute("value");return}d.hasOwnProperty("value")?ow(l,d.type,p):d.hasOwnProperty("defaultValue")&&ow(l,d.type,Se(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(l.defaultChecked=!!d.defaultChecked)}function j5(l,d,p){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var b=d.type;if(!(b!=="submit"&&b!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+l._wrapperState.initialValue,p||d===l.value||(l.value=d),l.defaultValue=d}p=l.name,p!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,p!==""&&(l.name=p)}function ow(l,d,p){(d!=="number"||uc(l.ownerDocument)!==l)&&(p==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+p&&(l.defaultValue=""+p))}var am=Array.isArray;function xu(l,d,p,b){if(l=l.options,d){d={};for(var w=0;w<p.length;w++)d["$"+p[w]]=!0;for(p=0;p<l.length;p++)w=d.hasOwnProperty("$"+l[p].value),l[p].selected!==w&&(l[p].selected=w),w&&b&&(l[p].defaultSelected=!0)}else{for(p=""+Se(p),d=null,w=0;w<l.length;w++){if(l[w].value===p){l[w].selected=!0,b&&(l[w].defaultSelected=!0);return}d!==null||l[w].disabled||(d=l[w])}d!==null&&(d.selected=!0)}}function lw(l,d){if(d.dangerouslySetInnerHTML!=null)throw Error(t(91));return Q({},d,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function N5(l,d){var p=d.value;if(p==null){if(p=d.children,d=d.defaultValue,p!=null){if(d!=null)throw Error(t(92));if(am(p)){if(1<p.length)throw Error(t(93));p=p[0]}d=p}d==null&&(d=""),p=d}l._wrapperState={initialValue:Se(p)}}function k5(l,d){var p=Se(d.value),b=Se(d.defaultValue);p!=null&&(p=""+p,p!==l.value&&(l.value=p),d.defaultValue==null&&l.defaultValue!==p&&(l.defaultValue=p)),b!=null&&(l.defaultValue=""+b)}function S5(l){var d=l.textContent;d===l._wrapperState.initialValue&&d!==""&&d!==null&&(l.value=d)}function A5(l){switch(l){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function cw(l,d){return l==null||l==="http://www.w3.org/1999/xhtml"?A5(d):l==="http://www.w3.org/2000/svg"&&d==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var ex,_5=(function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(d,p,b,w){MSApp.execUnsafeLocalFunction(function(){return l(d,p,b,w)})}:l})(function(l,d){if(l.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in l)l.innerHTML=d;else{for(ex=ex||document.createElement("div"),ex.innerHTML="<svg>"+d.valueOf().toString()+"</svg>",d=ex.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;d.firstChild;)l.appendChild(d.firstChild)}});function om(l,d){if(d){var p=l.firstChild;if(p&&p===l.lastChild&&p.nodeType===3){p.nodeValue=d;return}}l.textContent=d}var lm={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},QM=["Webkit","ms","Moz","O"];Object.keys(lm).forEach(function(l){QM.forEach(function(d){d=d+l.charAt(0).toUpperCase()+l.substring(1),lm[d]=lm[l]})});function E5(l,d,p){return d==null||typeof d=="boolean"||d===""?"":p||typeof d!="number"||d===0||lm.hasOwnProperty(l)&&lm[l]?(""+d).trim():d+"px"}function C5(l,d){l=l.style;for(var p in d)if(d.hasOwnProperty(p)){var b=p.indexOf("--")===0,w=E5(p,d[p],b);p==="float"&&(p="cssFloat"),b?l.setProperty(p,w):l[p]=w}}var ZM=Q({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 dw(l,d){if(d){if(ZM[l]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(t(137,l));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(t(60));if(typeof d.dangerouslySetInnerHTML!="object"||!("__html"in d.dangerouslySetInnerHTML))throw Error(t(61))}if(d.style!=null&&typeof d.style!="object")throw Error(t(62))}}function uw(l,d){if(l.indexOf("-")===-1)return typeof d.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hw=null;function fw(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var mw=null,yu=null,bu=null;function T5(l){if(l=Tm(l)){if(typeof mw!="function")throw Error(t(280));var d=l.stateNode;d&&(d=Nx(d),mw(l.stateNode,l.type,d))}}function P5(l){yu?bu?bu.push(l):bu=[l]:yu=l}function R5(){if(yu){var l=yu,d=bu;if(bu=yu=null,T5(l),d)for(l=0;l<d.length;l++)T5(d[l])}}function M5(l,d){return l(d)}function I5(){}var pw=!1;function L5(l,d,p){if(pw)return l(d,p);pw=!0;try{return M5(l,d,p)}finally{pw=!1,(yu!==null||bu!==null)&&(I5(),R5())}}function cm(l,d){var p=l.stateNode;if(p===null)return null;var b=Nx(p);if(b===null)return null;p=b[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(b=!b.disabled)||(l=l.type,b=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!b;break e;default:l=!1}if(l)return null;if(p&&typeof p!="function")throw Error(t(231,d,typeof p));return p}var gw=!1;if(c)try{var dm={};Object.defineProperty(dm,"passive",{get:function(){gw=!0}}),window.addEventListener("test",dm,dm),window.removeEventListener("test",dm,dm)}catch{gw=!1}function eI(l,d,p,b,w,_,L,B,H){var te=Array.prototype.slice.call(arguments,3);try{d.apply(p,te)}catch(ae){this.onError(ae)}}var um=!1,tx=null,sx=!1,xw=null,tI={onError:function(l){um=!0,tx=l}};function sI(l,d,p,b,w,_,L,B,H){um=!1,tx=null,eI.apply(tI,arguments)}function nI(l,d,p,b,w,_,L,B,H){if(sI.apply(this,arguments),um){if(um){var te=tx;um=!1,tx=null}else throw Error(t(198));sx||(sx=!0,xw=te)}}function hc(l){var d=l,p=l;if(l.alternate)for(;d.return;)d=d.return;else{l=d;do d=l,(d.flags&4098)!==0&&(p=d.return),l=d.return;while(l)}return d.tag===3?p:null}function D5(l){if(l.tag===13){var d=l.memoizedState;if(d===null&&(l=l.alternate,l!==null&&(d=l.memoizedState)),d!==null)return d.dehydrated}return null}function O5(l){if(hc(l)!==l)throw Error(t(188))}function rI(l){var d=l.alternate;if(!d){if(d=hc(l),d===null)throw Error(t(188));return d!==l?null:l}for(var p=l,b=d;;){var w=p.return;if(w===null)break;var _=w.alternate;if(_===null){if(b=w.return,b!==null){p=b;continue}break}if(w.child===_.child){for(_=w.child;_;){if(_===p)return O5(w),l;if(_===b)return O5(w),d;_=_.sibling}throw Error(t(188))}if(p.return!==b.return)p=w,b=_;else{for(var L=!1,B=w.child;B;){if(B===p){L=!0,p=w,b=_;break}if(B===b){L=!0,b=w,p=_;break}B=B.sibling}if(!L){for(B=_.child;B;){if(B===p){L=!0,p=_,b=w;break}if(B===b){L=!0,b=_,p=w;break}B=B.sibling}if(!L)throw Error(t(189))}}if(p.alternate!==b)throw Error(t(190))}if(p.tag!==3)throw Error(t(188));return p.stateNode.current===p?l:d}function F5(l){return l=rI(l),l!==null?B5(l):null}function B5(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var d=B5(l);if(d!==null)return d;l=l.sibling}return null}var $5=e.unstable_scheduleCallback,U5=e.unstable_cancelCallback,iI=e.unstable_shouldYield,aI=e.unstable_requestPaint,Xt=e.unstable_now,oI=e.unstable_getCurrentPriorityLevel,yw=e.unstable_ImmediatePriority,H5=e.unstable_UserBlockingPriority,nx=e.unstable_NormalPriority,lI=e.unstable_LowPriority,z5=e.unstable_IdlePriority,rx=null,Li=null;function cI(l){if(Li&&typeof Li.onCommitFiberRoot=="function")try{Li.onCommitFiberRoot(rx,l,void 0,(l.current.flags&128)===128)}catch{}}var Zr=Math.clz32?Math.clz32:hI,dI=Math.log,uI=Math.LN2;function hI(l){return l>>>=0,l===0?32:31-(dI(l)/uI|0)|0}var ix=64,ax=4194304;function hm(l){switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function ox(l,d){var p=l.pendingLanes;if(p===0)return 0;var b=0,w=l.suspendedLanes,_=l.pingedLanes,L=p&268435455;if(L!==0){var B=L&~w;B!==0?b=hm(B):(_&=L,_!==0&&(b=hm(_)))}else L=p&~w,L!==0?b=hm(L):_!==0&&(b=hm(_));if(b===0)return 0;if(d!==0&&d!==b&&(d&w)===0&&(w=b&-b,_=d&-d,w>=_||w===16&&(_&4194240)!==0))return d;if((b&4)!==0&&(b|=p&16),d=l.entangledLanes,d!==0)for(l=l.entanglements,d&=b;0<d;)p=31-Zr(d),w=1<<p,b|=l[p],d&=~w;return b}function fI(l,d){switch(l){case 1:case 2:case 4:return d+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 d+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 mI(l,d){for(var p=l.suspendedLanes,b=l.pingedLanes,w=l.expirationTimes,_=l.pendingLanes;0<_;){var L=31-Zr(_),B=1<<L,H=w[L];H===-1?((B&p)===0||(B&b)!==0)&&(w[L]=fI(B,d)):H<=d&&(l.expiredLanes|=B),_&=~B}}function bw(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function V5(){var l=ix;return ix<<=1,(ix&4194240)===0&&(ix=64),l}function vw(l){for(var d=[],p=0;31>p;p++)d.push(l);return d}function fm(l,d,p){l.pendingLanes|=d,d!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,d=31-Zr(d),l[d]=p}function pI(l,d){var p=l.pendingLanes&~d;l.pendingLanes=d,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=d,l.mutableReadLanes&=d,l.entangledLanes&=d,d=l.entanglements;var b=l.eventTimes;for(l=l.expirationTimes;0<p;){var w=31-Zr(p),_=1<<w;d[w]=0,b[w]=-1,l[w]=-1,p&=~_}}function ww(l,d){var p=l.entangledLanes|=d;for(l=l.entanglements;p;){var b=31-Zr(p),w=1<<b;w&d|l[b]&d&&(l[b]|=d),p&=~w}}var ot=0;function W5(l){return l&=-l,1<l?4<l?(l&268435455)!==0?16:536870912:4:1}var G5,jw,q5,K5,X5,Nw=!1,lx=[],Lo=null,Do=null,Oo=null,mm=new Map,pm=new Map,Fo=[],gI="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 Y5(l,d){switch(l){case"focusin":case"focusout":Lo=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":Oo=null;break;case"pointerover":case"pointerout":mm.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":pm.delete(d.pointerId)}}function gm(l,d,p,b,w,_){return l===null||l.nativeEvent!==_?(l={blockedOn:d,domEventName:p,eventSystemFlags:b,nativeEvent:_,targetContainers:[w]},d!==null&&(d=Tm(d),d!==null&&jw(d)),l):(l.eventSystemFlags|=b,d=l.targetContainers,w!==null&&d.indexOf(w)===-1&&d.push(w),l)}function xI(l,d,p,b,w){switch(d){case"focusin":return Lo=gm(Lo,l,d,p,b,w),!0;case"dragenter":return Do=gm(Do,l,d,p,b,w),!0;case"mouseover":return Oo=gm(Oo,l,d,p,b,w),!0;case"pointerover":var _=w.pointerId;return mm.set(_,gm(mm.get(_)||null,l,d,p,b,w)),!0;case"gotpointercapture":return _=w.pointerId,pm.set(_,gm(pm.get(_)||null,l,d,p,b,w)),!0}return!1}function J5(l){var d=fc(l.target);if(d!==null){var p=hc(d);if(p!==null){if(d=p.tag,d===13){if(d=D5(p),d!==null){l.blockedOn=d,X5(l.priority,function(){q5(p)});return}}else if(d===3&&p.stateNode.current.memoizedState.isDehydrated){l.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}l.blockedOn=null}function cx(l){if(l.blockedOn!==null)return!1;for(var d=l.targetContainers;0<d.length;){var p=Sw(l.domEventName,l.eventSystemFlags,d[0],l.nativeEvent);if(p===null){p=l.nativeEvent;var b=new p.constructor(p.type,p);hw=b,p.target.dispatchEvent(b),hw=null}else return d=Tm(p),d!==null&&jw(d),l.blockedOn=p,!1;d.shift()}return!0}function Q5(l,d,p){cx(l)&&p.delete(d)}function yI(){Nw=!1,Lo!==null&&cx(Lo)&&(Lo=null),Do!==null&&cx(Do)&&(Do=null),Oo!==null&&cx(Oo)&&(Oo=null),mm.forEach(Q5),pm.forEach(Q5)}function xm(l,d){l.blockedOn===d&&(l.blockedOn=null,Nw||(Nw=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,yI)))}function ym(l){function d(w){return xm(w,l)}if(0<lx.length){xm(lx[0],l);for(var p=1;p<lx.length;p++){var b=lx[p];b.blockedOn===l&&(b.blockedOn=null)}}for(Lo!==null&&xm(Lo,l),Do!==null&&xm(Do,l),Oo!==null&&xm(Oo,l),mm.forEach(d),pm.forEach(d),p=0;p<Fo.length;p++)b=Fo[p],b.blockedOn===l&&(b.blockedOn=null);for(;0<Fo.length&&(p=Fo[0],p.blockedOn===null);)J5(p),p.blockedOn===null&&Fo.shift()}var vu=M.ReactCurrentBatchConfig,dx=!0;function bI(l,d,p,b){var w=ot,_=vu.transition;vu.transition=null;try{ot=1,kw(l,d,p,b)}finally{ot=w,vu.transition=_}}function vI(l,d,p,b){var w=ot,_=vu.transition;vu.transition=null;try{ot=4,kw(l,d,p,b)}finally{ot=w,vu.transition=_}}function kw(l,d,p,b){if(dx){var w=Sw(l,d,p,b);if(w===null)Hw(l,d,b,ux,p),Y5(l,b);else if(xI(w,l,d,p,b))b.stopPropagation();else if(Y5(l,b),d&4&&-1<gI.indexOf(l)){for(;w!==null;){var _=Tm(w);if(_!==null&&G5(_),_=Sw(l,d,p,b),_===null&&Hw(l,d,b,ux,p),_===w)break;w=_}w!==null&&b.stopPropagation()}else Hw(l,d,b,null,p)}}var ux=null;function Sw(l,d,p,b){if(ux=null,l=fw(b),l=fc(l),l!==null)if(d=hc(l),d===null)l=null;else if(p=d.tag,p===13){if(l=D5(d),l!==null)return l;l=null}else if(p===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;l=null}else d!==l&&(l=null);return ux=l,null}function Z5(l){switch(l){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(oI()){case yw:return 1;case H5:return 4;case nx:case lI:return 16;case z5:return 536870912;default:return 16}default:return 16}}var Bo=null,Aw=null,hx=null;function eS(){if(hx)return hx;var l,d=Aw,p=d.length,b,w="value"in Bo?Bo.value:Bo.textContent,_=w.length;for(l=0;l<p&&d[l]===w[l];l++);var L=p-l;for(b=1;b<=L&&d[p-b]===w[_-b];b++);return hx=w.slice(l,1<b?1-b:void 0)}function fx(l){var d=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&d===13&&(l=13)):l=d,l===10&&(l=13),32<=l||l===13?l:0}function mx(){return!0}function tS(){return!1}function Un(l){function d(p,b,w,_,L){this._reactName=p,this._targetInst=w,this.type=b,this.nativeEvent=_,this.target=L,this.currentTarget=null;for(var B in l)l.hasOwnProperty(B)&&(p=l[B],this[B]=p?p(_):_[B]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?mx:tS,this.isPropagationStopped=tS,this}return Q(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=mx)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=mx)},persist:function(){},isPersistent:mx}),d}var wu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_w=Un(wu),bm=Q({},wu,{view:0,detail:0}),wI=Un(bm),Ew,Cw,vm,px=Q({},bm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pw,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==vm&&(vm&&l.type==="mousemove"?(Ew=l.screenX-vm.screenX,Cw=l.screenY-vm.screenY):Cw=Ew=0,vm=l),Ew)},movementY:function(l){return"movementY"in l?l.movementY:Cw}}),sS=Un(px),jI=Q({},px,{dataTransfer:0}),NI=Un(jI),kI=Q({},bm,{relatedTarget:0}),Tw=Un(kI),SI=Q({},wu,{animationName:0,elapsedTime:0,pseudoElement:0}),AI=Un(SI),_I=Q({},wu,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),EI=Un(_I),CI=Q({},wu,{data:0}),nS=Un(CI),TI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PI={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"},RI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MI(l){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(l):(l=RI[l])?!!d[l]:!1}function Pw(){return MI}var II=Q({},bm,{key:function(l){if(l.key){var d=TI[l.key]||l.key;if(d!=="Unidentified")return d}return l.type==="keypress"?(l=fx(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?PI[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pw,charCode:function(l){return l.type==="keypress"?fx(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?fx(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),LI=Un(II),DI=Q({},px,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rS=Un(DI),OI=Q({},bm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pw}),FI=Un(OI),BI=Q({},wu,{propertyName:0,elapsedTime:0,pseudoElement:0}),$I=Un(BI),UI=Q({},px,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),HI=Un(UI),zI=[9,13,27,32],Rw=c&&"CompositionEvent"in window,wm=null;c&&"documentMode"in document&&(wm=document.documentMode);var VI=c&&"TextEvent"in window&&!wm,iS=c&&(!Rw||wm&&8<wm&&11>=wm),aS=" ",oS=!1;function lS(l,d){switch(l){case"keyup":return zI.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cS(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var ju=!1;function WI(l,d){switch(l){case"compositionend":return cS(d);case"keypress":return d.which!==32?null:(oS=!0,aS);case"textInput":return l=d.data,l===aS&&oS?null:l;default:return null}}function GI(l,d){if(ju)return l==="compositionend"||!Rw&&lS(l,d)?(l=eS(),hx=Aw=Bo=null,ju=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return iS&&d.locale!=="ko"?null:d.data;default:return null}}var qI={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 dS(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d==="input"?!!qI[l.type]:d==="textarea"}function uS(l,d,p,b){P5(b),d=vx(d,"onChange"),0<d.length&&(p=new _w("onChange","change",null,p,b),l.push({event:p,listeners:d}))}var jm=null,Nm=null;function KI(l){CS(l,0)}function gx(l){var d=_u(l);if(Ii(d))return l}function XI(l,d){if(l==="change")return d}var hS=!1;if(c){var Mw;if(c){var Iw="oninput"in document;if(!Iw){var fS=document.createElement("div");fS.setAttribute("oninput","return;"),Iw=typeof fS.oninput=="function"}Mw=Iw}else Mw=!1;hS=Mw&&(!document.documentMode||9<document.documentMode)}function mS(){jm&&(jm.detachEvent("onpropertychange",pS),Nm=jm=null)}function pS(l){if(l.propertyName==="value"&&gx(Nm)){var d=[];uS(d,Nm,l,fw(l)),L5(KI,d)}}function YI(l,d,p){l==="focusin"?(mS(),jm=d,Nm=p,jm.attachEvent("onpropertychange",pS)):l==="focusout"&&mS()}function JI(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return gx(Nm)}function QI(l,d){if(l==="click")return gx(d)}function ZI(l,d){if(l==="input"||l==="change")return gx(d)}function eL(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var ei=typeof Object.is=="function"?Object.is:eL;function km(l,d){if(ei(l,d))return!0;if(typeof l!="object"||l===null||typeof d!="object"||d===null)return!1;var p=Object.keys(l),b=Object.keys(d);if(p.length!==b.length)return!1;for(b=0;b<p.length;b++){var w=p[b];if(!h.call(d,w)||!ei(l[w],d[w]))return!1}return!0}function gS(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function xS(l,d){var p=gS(l);l=0;for(var b;p;){if(p.nodeType===3){if(b=l+p.textContent.length,l<=d&&b>=d)return{node:p,offset:d-l};l=b}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=gS(p)}}function yS(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?yS(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function bS(){for(var l=window,d=uc();d instanceof l.HTMLIFrameElement;){try{var p=typeof d.contentWindow.location.href=="string"}catch{p=!1}if(p)l=d.contentWindow;else break;d=uc(l.document)}return d}function Lw(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}function tL(l){var d=bS(),p=l.focusedElem,b=l.selectionRange;if(d!==p&&p&&p.ownerDocument&&yS(p.ownerDocument.documentElement,p)){if(b!==null&&Lw(p)){if(d=b.start,l=b.end,l===void 0&&(l=d),"selectionStart"in p)p.selectionStart=d,p.selectionEnd=Math.min(l,p.value.length);else if(l=(d=p.ownerDocument||document)&&d.defaultView||window,l.getSelection){l=l.getSelection();var w=p.textContent.length,_=Math.min(b.start,w);b=b.end===void 0?_:Math.min(b.end,w),!l.extend&&_>b&&(w=b,b=_,_=w),w=xS(p,_);var L=xS(p,b);w&&L&&(l.rangeCount!==1||l.anchorNode!==w.node||l.anchorOffset!==w.offset||l.focusNode!==L.node||l.focusOffset!==L.offset)&&(d=d.createRange(),d.setStart(w.node,w.offset),l.removeAllRanges(),_>b?(l.addRange(d),l.extend(L.node,L.offset)):(d.setEnd(L.node,L.offset),l.addRange(d)))}}for(d=[],l=p;l=l.parentNode;)l.nodeType===1&&d.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<d.length;p++)l=d[p],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}var sL=c&&"documentMode"in document&&11>=document.documentMode,Nu=null,Dw=null,Sm=null,Ow=!1;function vS(l,d,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Ow||Nu==null||Nu!==uc(b)||(b=Nu,"selectionStart"in b&&Lw(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),Sm&&km(Sm,b)||(Sm=b,b=vx(Dw,"onSelect"),0<b.length&&(d=new _w("onSelect","select",null,d,p),l.push({event:d,listeners:b}),d.target=Nu)))}function xx(l,d){var p={};return p[l.toLowerCase()]=d.toLowerCase(),p["Webkit"+l]="webkit"+d,p["Moz"+l]="moz"+d,p}var ku={animationend:xx("Animation","AnimationEnd"),animationiteration:xx("Animation","AnimationIteration"),animationstart:xx("Animation","AnimationStart"),transitionend:xx("Transition","TransitionEnd")},Fw={},wS={};c&&(wS=document.createElement("div").style,"AnimationEvent"in window||(delete ku.animationend.animation,delete ku.animationiteration.animation,delete ku.animationstart.animation),"TransitionEvent"in window||delete ku.transitionend.transition);function yx(l){if(Fw[l])return Fw[l];if(!ku[l])return l;var d=ku[l],p;for(p in d)if(d.hasOwnProperty(p)&&p in wS)return Fw[l]=d[p];return l}var jS=yx("animationend"),NS=yx("animationiteration"),kS=yx("animationstart"),SS=yx("transitionend"),AS=new Map,_S="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 $o(l,d){AS.set(l,d),a(d,[l])}for(var Bw=0;Bw<_S.length;Bw++){var $w=_S[Bw],nL=$w.toLowerCase(),rL=$w[0].toUpperCase()+$w.slice(1);$o(nL,"on"+rL)}$o(jS,"onAnimationEnd"),$o(NS,"onAnimationIteration"),$o(kS,"onAnimationStart"),$o("dblclick","onDoubleClick"),$o("focusin","onFocus"),$o("focusout","onBlur"),$o(SS,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Am="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(" "),iL=new Set("cancel close invalid load scroll toggle".split(" ").concat(Am));function ES(l,d,p){var b=l.type||"unknown-event";l.currentTarget=p,nI(b,d,void 0,l),l.currentTarget=null}function CS(l,d){d=(d&4)!==0;for(var p=0;p<l.length;p++){var b=l[p],w=b.event;b=b.listeners;e:{var _=void 0;if(d)for(var L=b.length-1;0<=L;L--){var B=b[L],H=B.instance,te=B.currentTarget;if(B=B.listener,H!==_&&w.isPropagationStopped())break e;ES(w,B,te),_=H}else for(L=0;L<b.length;L++){if(B=b[L],H=B.instance,te=B.currentTarget,B=B.listener,H!==_&&w.isPropagationStopped())break e;ES(w,B,te),_=H}}}if(sx)throw l=xw,sx=!1,xw=null,l}function jt(l,d){var p=d[Kw];p===void 0&&(p=d[Kw]=new Set);var b=l+"__bubble";p.has(b)||(TS(d,l,2,!1),p.add(b))}function Uw(l,d,p){var b=0;d&&(b|=4),TS(p,l,b,d)}var bx="_reactListening"+Math.random().toString(36).slice(2);function _m(l){if(!l[bx]){l[bx]=!0,s.forEach(function(p){p!=="selectionchange"&&(iL.has(p)||Uw(p,!1,l),Uw(p,!0,l))});var d=l.nodeType===9?l:l.ownerDocument;d===null||d[bx]||(d[bx]=!0,Uw("selectionchange",!1,d))}}function TS(l,d,p,b){switch(Z5(d)){case 1:var w=bI;break;case 4:w=vI;break;default:w=kw}p=w.bind(null,d,p,l),w=void 0,!gw||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(w=!0),b?w!==void 0?l.addEventListener(d,p,{capture:!0,passive:w}):l.addEventListener(d,p,!0):w!==void 0?l.addEventListener(d,p,{passive:w}):l.addEventListener(d,p,!1)}function Hw(l,d,p,b,w){var _=b;if((d&1)===0&&(d&2)===0&&b!==null)e:for(;;){if(b===null)return;var L=b.tag;if(L===3||L===4){var B=b.stateNode.containerInfo;if(B===w||B.nodeType===8&&B.parentNode===w)break;if(L===4)for(L=b.return;L!==null;){var H=L.tag;if((H===3||H===4)&&(H=L.stateNode.containerInfo,H===w||H.nodeType===8&&H.parentNode===w))return;L=L.return}for(;B!==null;){if(L=fc(B),L===null)return;if(H=L.tag,H===5||H===6){b=_=L;continue e}B=B.parentNode}}b=b.return}L5(function(){var te=_,ae=fw(p),ce=[];e:{var ie=AS.get(l);if(ie!==void 0){var ye=_w,je=l;switch(l){case"keypress":if(fx(p)===0)break e;case"keydown":case"keyup":ye=LI;break;case"focusin":je="focus",ye=Tw;break;case"focusout":je="blur",ye=Tw;break;case"beforeblur":case"afterblur":ye=Tw;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=sS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=NI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=FI;break;case jS:case NS:case kS:ye=AI;break;case SS:ye=$I;break;case"scroll":ye=wI;break;case"wheel":ye=HI;break;case"copy":case"cut":case"paste":ye=EI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=rS}var _e=(d&4)!==0,Yt=!_e&&l==="scroll",X=_e?ie!==null?ie+"Capture":null:ie;_e=[];for(var V=te,J;V!==null;){J=V;var pe=J.stateNode;if(J.tag===5&&pe!==null&&(J=pe,X!==null&&(pe=cm(V,X),pe!=null&&_e.push(Em(V,pe,J)))),Yt)break;V=V.return}0<_e.length&&(ie=new ye(ie,je,null,p,ae),ce.push({event:ie,listeners:_e}))}}if((d&7)===0){e:{if(ie=l==="mouseover"||l==="pointerover",ye=l==="mouseout"||l==="pointerout",ie&&p!==hw&&(je=p.relatedTarget||p.fromElement)&&(fc(je)||je[ja]))break e;if((ye||ie)&&(ie=ae.window===ae?ae:(ie=ae.ownerDocument)?ie.defaultView||ie.parentWindow:window,ye?(je=p.relatedTarget||p.toElement,ye=te,je=je?fc(je):null,je!==null&&(Yt=hc(je),je!==Yt||je.tag!==5&&je.tag!==6)&&(je=null)):(ye=null,je=te),ye!==je)){if(_e=sS,pe="onMouseLeave",X="onMouseEnter",V="mouse",(l==="pointerout"||l==="pointerover")&&(_e=rS,pe="onPointerLeave",X="onPointerEnter",V="pointer"),Yt=ye==null?ie:_u(ye),J=je==null?ie:_u(je),ie=new _e(pe,V+"leave",ye,p,ae),ie.target=Yt,ie.relatedTarget=J,pe=null,fc(ae)===te&&(_e=new _e(X,V+"enter",je,p,ae),_e.target=J,_e.relatedTarget=Yt,pe=_e),Yt=pe,ye&&je)t:{for(_e=ye,X=je,V=0,J=_e;J;J=Su(J))V++;for(J=0,pe=X;pe;pe=Su(pe))J++;for(;0<V-J;)_e=Su(_e),V--;for(;0<J-V;)X=Su(X),J--;for(;V--;){if(_e===X||X!==null&&_e===X.alternate)break t;_e=Su(_e),X=Su(X)}_e=null}else _e=null;ye!==null&&PS(ce,ie,ye,_e,!1),je!==null&&Yt!==null&&PS(ce,Yt,je,_e,!0)}}e:{if(ie=te?_u(te):window,ye=ie.nodeName&&ie.nodeName.toLowerCase(),ye==="select"||ye==="input"&&ie.type==="file")var Ee=XI;else if(dS(ie))if(hS)Ee=ZI;else{Ee=JI;var Pe=YI}else(ye=ie.nodeName)&&ye.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(Ee=QI);if(Ee&&(Ee=Ee(l,te))){uS(ce,Ee,p,ae);break e}Pe&&Pe(l,ie,te),l==="focusout"&&(Pe=ie._wrapperState)&&Pe.controlled&&ie.type==="number"&&ow(ie,"number",ie.value)}switch(Pe=te?_u(te):window,l){case"focusin":(dS(Pe)||Pe.contentEditable==="true")&&(Nu=Pe,Dw=te,Sm=null);break;case"focusout":Sm=Dw=Nu=null;break;case"mousedown":Ow=!0;break;case"contextmenu":case"mouseup":case"dragend":Ow=!1,vS(ce,p,ae);break;case"selectionchange":if(sL)break;case"keydown":case"keyup":vS(ce,p,ae)}var Re;if(Rw)e:{switch(l){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else ju?lS(l,p)&&(Fe="onCompositionEnd"):l==="keydown"&&p.keyCode===229&&(Fe="onCompositionStart");Fe&&(iS&&p.locale!=="ko"&&(ju||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&ju&&(Re=eS()):(Bo=ae,Aw="value"in Bo?Bo.value:Bo.textContent,ju=!0)),Pe=vx(te,Fe),0<Pe.length&&(Fe=new nS(Fe,l,null,p,ae),ce.push({event:Fe,listeners:Pe}),Re?Fe.data=Re:(Re=cS(p),Re!==null&&(Fe.data=Re)))),(Re=VI?WI(l,p):GI(l,p))&&(te=vx(te,"onBeforeInput"),0<te.length&&(ae=new nS("onBeforeInput","beforeinput",null,p,ae),ce.push({event:ae,listeners:te}),ae.data=Re))}CS(ce,d)})}function Em(l,d,p){return{instance:l,listener:d,currentTarget:p}}function vx(l,d){for(var p=d+"Capture",b=[];l!==null;){var w=l,_=w.stateNode;w.tag===5&&_!==null&&(w=_,_=cm(l,p),_!=null&&b.unshift(Em(l,_,w)),_=cm(l,d),_!=null&&b.push(Em(l,_,w))),l=l.return}return b}function Su(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function PS(l,d,p,b,w){for(var _=d._reactName,L=[];p!==null&&p!==b;){var B=p,H=B.alternate,te=B.stateNode;if(H!==null&&H===b)break;B.tag===5&&te!==null&&(B=te,w?(H=cm(p,_),H!=null&&L.unshift(Em(p,H,B))):w||(H=cm(p,_),H!=null&&L.push(Em(p,H,B)))),p=p.return}L.length!==0&&l.push({event:d,listeners:L})}var aL=/\r\n?/g,oL=/\u0000|\uFFFD/g;function RS(l){return(typeof l=="string"?l:""+l).replace(aL,` 38`).replace(oL,"")}function wx(l,d,p){if(d=RS(d),RS(l)!==d&&p)throw Error(t(425))}function jx(){}var zw=null,Vw=null;function Ww(l,d){return l==="textarea"||l==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var Gw=typeof setTimeout=="function"?setTimeout:void 0,lL=typeof clearTimeout=="function"?clearTimeout:void 0,MS=typeof Promise=="function"?Promise:void 0,cL=typeof queueMicrotask=="function"?queueMicrotask:typeof MS<"u"?function(l){return MS.resolve(null).then(l).catch(dL)}:Gw;function dL(l){setTimeout(function(){throw l})}function qw(l,d){var p=d,b=0;do{var w=p.nextSibling;if(l.removeChild(p),w&&w.nodeType===8)if(p=w.data,p==="/$"){if(b===0){l.removeChild(w),ym(d);return}b--}else p!=="$"&&p!=="$?"&&p!=="$!"||b++;p=w}while(p);ym(d)}function Uo(l){for(;l!=null;l=l.nextSibling){var d=l.nodeType;if(d===1||d===3)break;if(d===8){if(d=l.data,d==="$"||d==="$!"||d==="$?")break;if(d==="/$")return null}}return l}function IS(l){l=l.previousSibling;for(var d=0;l;){if(l.nodeType===8){var p=l.data;if(p==="$"||p==="$!"||p==="$?"){if(d===0)return l;d--}else p==="/$"&&d++}l=l.previousSibling}return null}var Au=Math.random().toString(36).slice(2),Di="__reactFiber$"+Au,Cm="__reactProps$"+Au,ja="__reactContainer$"+Au,Kw="__reactEvents$"+Au,uL="__reactListeners$"+Au,hL="__reactHandles$"+Au;function fc(l){var d=l[Di];if(d)return d;for(var p=l.parentNode;p;){if(d=p[ja]||p[Di]){if(p=d.alternate,d.child!==null||p!==null&&p.child!==null)for(l=IS(l);l!==null;){if(p=l[Di])return p;l=IS(l)}return d}l=p,p=l.parentNode}return null}function Tm(l){return l=l[Di]||l[ja],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function _u(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(t(33))}function Nx(l){return l[Cm]||null}var Xw=[],Eu=-1;function Ho(l){return{current:l}}function Nt(l){0>Eu||(l.current=Xw[Eu],Xw[Eu]=null,Eu--)}function yt(l,d){Eu++,Xw[Eu]=l.current,l.current=d}var zo={},qs=Ho(zo),Nn=Ho(!1),mc=zo;function Cu(l,d){var p=l.type.contextTypes;if(!p)return zo;var b=l.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===d)return b.__reactInternalMemoizedMaskedChildContext;var w={},_;for(_ in p)w[_]=d[_];return b&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=d,l.__reactInternalMemoizedMaskedChildContext=w),w}function kn(l){return l=l.childContextTypes,l!=null}function kx(){Nt(Nn),Nt(qs)}function LS(l,d,p){if(qs.current!==zo)throw Error(t(168));yt(qs,d),yt(Nn,p)}function DS(l,d,p){var b=l.stateNode;if(d=d.childContextTypes,typeof b.getChildContext!="function")return p;b=b.getChildContext();for(var w in b)if(!(w in d))throw Error(t(108,ue(l)||"Unknown",w));return Q({},p,b)}function Sx(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||zo,mc=qs.current,yt(qs,l),yt(Nn,Nn.current),!0}function OS(l,d,p){var b=l.stateNode;if(!b)throw Error(t(169));p?(l=DS(l,d,mc),b.__reactInternalMemoizedMergedChildContext=l,Nt(Nn),Nt(qs),yt(qs,l)):Nt(Nn),yt(Nn,p)}var Na=null,Ax=!1,Yw=!1;function FS(l){Na===null?Na=[l]:Na.push(l)}function fL(l){Ax=!0,FS(l)}function Vo(){if(!Yw&&Na!==null){Yw=!0;var l=0,d=ot;try{var p=Na;for(ot=1;l<p.length;l++){var b=p[l];do b=b(!0);while(b!==null)}Na=null,Ax=!1}catch(w){throw Na!==null&&(Na=Na.slice(l+1)),$5(yw,Vo),w}finally{ot=d,Yw=!1}}return null}var Tu=[],Pu=0,_x=null,Ex=0,Nr=[],kr=0,pc=null,ka=1,Sa="";function gc(l,d){Tu[Pu++]=Ex,Tu[Pu++]=_x,_x=l,Ex=d}function BS(l,d,p){Nr[kr++]=ka,Nr[kr++]=Sa,Nr[kr++]=pc,pc=l;var b=ka;l=Sa;var w=32-Zr(b)-1;b&=~(1<<w),p+=1;var _=32-Zr(d)+w;if(30<_){var L=w-w%5;_=(b&(1<<L)-1).toString(32),b>>=L,w-=L,ka=1<<32-Zr(d)+w|p<<w|b,Sa=_+l}else ka=1<<_|p<<w|b,Sa=l}function Jw(l){l.return!==null&&(gc(l,1),BS(l,1,0))}function Qw(l){for(;l===_x;)_x=Tu[--Pu],Tu[Pu]=null,Ex=Tu[--Pu],Tu[Pu]=null;for(;l===pc;)pc=Nr[--kr],Nr[kr]=null,Sa=Nr[--kr],Nr[kr]=null,ka=Nr[--kr],Nr[kr]=null}
vendor: 4,589 bytes, line 38
38var Hn=null,zn=null,Et=!1,ti=null;function $S(l,d){var p=Er(5,null,null,0);p.elementType="DELETED",p.stateNode=d,p.return=l,d=l.deletions,d===null?(l.deletions=[p],l.flags|=16):d.push(p)}function US(l,d){switch(l.tag){case 5:var p=l.type;return d=d.nodeType!==1||p.toLowerCase()!==d.nodeName.toLowerCase()?null:d,d!==null?(l.stateNode=d,Hn=l,zn=Uo(d.firstChild),!0):!1;case 6:return d=l.pendingProps===""||d.nodeType!==3?null:d,d!==null?(l.stateNode=d,Hn=l,zn=null,!0):!1;case 13:return d=d.nodeType!==8?null:d,d!==null?(p=pc!==null?{id:ka,overflow:Sa}:null,l.memoizedState={dehydrated:d,treeContext:p,retryLane:1073741824},p=Er(18,null,null,0),p.stateNode=d,p.return=l,l.child=p,Hn=l,zn=null,!0):!1;default:return!1}}function Zw(l){return(l.mode&1)!==0&&(l.flags&128)===0}function e1(l){if(Et){var d=zn;if(d){var p=d;if(!US(l,d)){if(Zw(l))throw Error(t(418));d=Uo(p.nextSibling);var b=Hn;d&&US(l,d)?$S(b,p):(l.flags=l.flags&-4097|2,Et=!1,Hn=l)}}else{if(Zw(l))throw Error(t(418));l.flags=l.flags&-4097|2,Et=!1,Hn=l}}}function HS(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;Hn=l}function Cx(l){if(l!==Hn)return!1;if(!Et)return HS(l),Et=!0,!1;var d;if((d=l.tag!==3)&&!(d=l.tag!==5)&&(d=l.type,d=d!=="head"&&d!=="body"&&!Ww(l.type,l.memoizedProps)),d&&(d=zn)){if(Zw(l))throw zS(),Error(t(418));for(;d;)$S(l,d),d=Uo(d.nextSibling)}if(HS(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(t(317));e:{for(l=l.nextSibling,d=0;l;){if(l.nodeType===8){var p=l.data;if(p==="/$"){if(d===0){zn=Uo(l.nextSibling);break e}d--}else p!=="$"&&p!=="$!"&&p!=="$?"||d++}l=l.nextSibling}zn=null}}else zn=Hn?Uo(l.stateNode.nextSibling):null;return!0}function zS(){for(var l=zn;l;)l=Uo(l.nextSibling)}function Ru(){zn=Hn=null,Et=!1}function t1(l){ti===null?ti=[l]:ti.push(l)}var mL=M.ReactCurrentBatchConfig;function Pm(l,d,p){if(l=p.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(p._owner){if(p=p._owner,p){if(p.tag!==1)throw Error(t(309));var b=p.stateNode}if(!b)throw Error(t(147,l));var w=b,_=""+l;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===_?d.ref:(d=function(L){var B=w.refs;L===null?delete B[_]:B[_]=L},d._stringRef=_,d)}if(typeof l!="string")throw Error(t(284));if(!p._owner)throw Error(t(290,l))}return l}function Tx(l,d){throw l=Object.prototype.toString.call(d),Error(t(31,l==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":l))}function VS(l){var d=l._init;return d(l._payload)}function WS(l){function d(X,V){if(l){var J=X.deletions;J===null?(X.deletions=[V],X.flags|=16):J.push(V)}}function p(X,V){if(!l)return null;for(;V!==null;)d(X,V),V=V.sibling;return null}function b(X,V){for(X=new Map;V!==null;)V.key!==null?X.set(V.key,V):X.set(V.index,V),V=V.sibling;return X}function w(X,V){return X=Qo(X,V),X.index=0,X.sibling=null,X}function _(X,V,J){return X.index=J,l?(J=X.alternate,J!==null?(J=J.index,J<V?(X.flags|=2,V):J):(X.flags|=2,V)):(X.flags|=1048576,V)}function L(X){return l&&X.alternate===null&&(X.flags|=2),X}function B(X,V,J,pe){return V===null||V.tag!==6?(V=G1(J,X.mode,pe),V.return=X,V):(V=w(V,J),V.return=X,V)}function H(X,V,J,pe){var Ee=J.type;return Ee===F?ae(X,V,J.props.children,pe,J.key):V!==null&&(V.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===oe&&VS(Ee)===V.type)?(pe=w(V,J.props),pe.ref=Pm(X,V,J),pe.return=X,pe):(pe=ey(J.type,J.key,J.props,null,X.mode,pe),pe.ref=Pm(X,V,J),pe.return=X,pe)}function te(X,V,J,pe){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=q1(J,X.mode,pe),V.return=X,V):(V=w(V,J.children||[]),V.return=X,V)}function ae(X,V,J,pe,Ee){return V===null||V.tag!==7?(V=kc(J,X.mode,pe,Ee),V.return=X,V):(V=w(V,J),V.return=X,V)}function ce(X,V,J){if(typeof V=="string"&&V!==""||typeof V=="number")return V=G1(""+V,X.mode,J),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case R:return J=ey(V.type,V.key,V.props,null,X.mode,J),J.ref=Pm(X,null,V),J.return=X,J;case I:return V=q1(V,X.mode,J),V.return=X,V;case oe:var pe=V._init;return ce(X,pe(V._payload),J)}if(am(V)||K(V))return V=kc(V,X.mode,J,null),V.return=X,V;Tx(X,V)}return null}function ie(X,V,J,pe){var Ee=V!==null?V.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Ee!==null?null:B(X,V,""+J,pe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case R:return J.key===Ee?H(X,V,J,pe):null;case I:return J.key===Ee?te(X,V,J,pe):null;case oe:return Ee=J._init,ie(X,V,Ee(J._payload),pe)}if(am(J)||K(J))return Ee!==null?null:ae(X,V,J,pe,null);Tx(X,J)}return null}
vendor: 11,029 bytes, line 38
38function ye(X,V,J,pe,Ee){if(typeof pe=="string"&&pe!==""||typeof pe=="number")return X=X.get(J)||null,B(V,X,""+pe,Ee);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case R:return X=X.get(pe.key===null?J:pe.key)||null,H(V,X,pe,Ee);case I:return X=X.get(pe.key===null?J:pe.key)||null,te(V,X,pe,Ee);case oe:var Pe=pe._init;return ye(X,V,J,Pe(pe._payload),Ee)}if(am(pe)||K(pe))return X=X.get(J)||null,ae(V,X,pe,Ee,null);Tx(V,pe)}return null}function je(X,V,J,pe){for(var Ee=null,Pe=null,Re=V,Fe=V=0,vs=null;Re!==null&&Fe<J.length;Fe++){Re.index>Fe?(vs=Re,Re=null):vs=Re.sibling;var st=ie(X,Re,J[Fe],pe);if(st===null){Re===null&&(Re=vs);break}l&&Re&&st.alternate===null&&d(X,Re),V=_(st,V,Fe),Pe===null?Ee=st:Pe.sibling=st,Pe=st,Re=vs}if(Fe===J.length)return p(X,Re),Et&&gc(X,Fe),Ee;if(Re===null){for(;Fe<J.length;Fe++)Re=ce(X,J[Fe],pe),Re!==null&&(V=_(Re,V,Fe),Pe===null?Ee=Re:Pe.sibling=Re,Pe=Re);return Et&&gc(X,Fe),Ee}for(Re=b(X,Re);Fe<J.length;Fe++)vs=ye(Re,X,Fe,J[Fe],pe),vs!==null&&(l&&vs.alternate!==null&&Re.delete(vs.key===null?Fe:vs.key),V=_(vs,V,Fe),Pe===null?Ee=vs:Pe.sibling=vs,Pe=vs);return l&&Re.forEach(function(Zo){return d(X,Zo)}),Et&&gc(X,Fe),Ee}function _e(X,V,J,pe){var Ee=K(J);if(typeof Ee!="function")throw Error(t(150));if(J=Ee.call(J),J==null)throw Error(t(151));for(var Pe=Ee=null,Re=V,Fe=V=0,vs=null,st=J.next();Re!==null&&!st.done;Fe++,st=J.next()){Re.index>Fe?(vs=Re,Re=null):vs=Re.sibling;var Zo=ie(X,Re,st.value,pe);if(Zo===null){Re===null&&(Re=vs);break}l&&Re&&Zo.alternate===null&&d(X,Re),V=_(Zo,V,Fe),Pe===null?Ee=Zo:Pe.sibling=Zo,Pe=Zo,Re=vs}if(st.done)return p(X,Re),Et&&gc(X,Fe),Ee;if(Re===null){for(;!st.done;Fe++,st=J.next())st=ce(X,st.value,pe),st!==null&&(V=_(st,V,Fe),Pe===null?Ee=st:Pe.sibling=st,Pe=st);return Et&&gc(X,Fe),Ee}for(Re=b(X,Re);!st.done;Fe++,st=J.next())st=ye(Re,X,Fe,st.value,pe),st!==null&&(l&&st.alternate!==null&&Re.delete(st.key===null?Fe:st.key),V=_(st,V,Fe),Pe===null?Ee=st:Pe.sibling=st,Pe=st);return l&&Re.forEach(function(qL){return d(X,qL)}),Et&&gc(X,Fe),Ee}function Yt(X,V,J,pe){if(typeof J=="object"&&J!==null&&J.type===F&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case R:e:{for(var Ee=J.key,Pe=V;Pe!==null;){if(Pe.key===Ee){if(Ee=J.type,Ee===F){if(Pe.tag===7){p(X,Pe.sibling),V=w(Pe,J.props.children),V.return=X,X=V;break e}}else if(Pe.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===oe&&VS(Ee)===Pe.type){p(X,Pe.sibling),V=w(Pe,J.props),V.ref=Pm(X,Pe,J),V.return=X,X=V;break e}p(X,Pe);break}else d(X,Pe);Pe=Pe.sibling}J.type===F?(V=kc(J.props.children,X.mode,pe,J.key),V.return=X,X=V):(pe=ey(J.type,J.key,J.props,null,X.mode,pe),pe.ref=Pm(X,V,J),pe.return=X,X=pe)}return L(X);case I:e:{for(Pe=J.key;V!==null;){if(V.key===Pe)if(V.tag===4&&V.stateNode.containerInfo===J.containerInfo&&V.stateNode.implementation===J.implementation){p(X,V.sibling),V=w(V,J.children||[]),V.return=X,X=V;break e}else{p(X,V);break}else d(X,V);V=V.sibling}V=q1(J,X.mode,pe),V.return=X,X=V}return L(X);case oe:return Pe=J._init,Yt(X,V,Pe(J._payload),pe)}if(am(J))return je(X,V,J,pe);if(K(J))return _e(X,V,J,pe);Tx(X,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,V!==null&&V.tag===6?(p(X,V.sibling),V=w(V,J),V.return=X,X=V):(p(X,V),V=G1(J,X.mode,pe),V.return=X,X=V),L(X)):p(X,V)}return Yt}var Mu=WS(!0),GS=WS(!1),Px=Ho(null),Rx=null,Iu=null,s1=null;function n1(){s1=Iu=Rx=null}function r1(l){var d=Px.current;Nt(Px),l._currentValue=d}function i1(l,d,p){for(;l!==null;){var b=l.alternate;if((l.childLanes&d)!==d?(l.childLanes|=d,b!==null&&(b.childLanes|=d)):b!==null&&(b.childLanes&d)!==d&&(b.childLanes|=d),l===p)break;l=l.return}}function Lu(l,d){Rx=l,s1=Iu=null,l=l.dependencies,l!==null&&l.firstContext!==null&&((l.lanes&d)!==0&&(Sn=!0),l.firstContext=null)}function Sr(l){var d=l._currentValue;if(s1!==l)if(l={context:l,memoizedValue:d,next:null},Iu===null){if(Rx===null)throw Error(t(308));Iu=l,Rx.dependencies={lanes:0,firstContext:l}}else Iu=Iu.next=l;return d}var xc=null;function a1(l){xc===null?xc=[l]:xc.push(l)}function qS(l,d,p,b){var w=d.interleaved;return w===null?(p.next=p,a1(d)):(p.next=w.next,w.next=p),d.interleaved=p,Aa(l,b)}function Aa(l,d){l.lanes|=d;var p=l.alternate;for(p!==null&&(p.lanes|=d),p=l,l=l.return;l!==null;)l.childLanes|=d,p=l.alternate,p!==null&&(p.childLanes|=d),p=l,l=l.return;return p.tag===3?p.stateNode:null}var Wo=!1;function o1(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function KS(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function _a(l,d){return{eventTime:l,lane:d,tag:0,payload:null,callback:null,next:null}}function Go(l,d,p){var b=l.updateQueue;if(b===null)return null;if(b=b.shared,(Qe&2)!==0){var w=b.pending;return w===null?d.next=d:(d.next=w.next,w.next=d),b.pending=d,Aa(l,p)}return w=b.interleaved,w===null?(d.next=d,a1(b)):(d.next=w.next,w.next=d),b.interleaved=d,Aa(l,p)}function Mx(l,d,p){if(d=d.updateQueue,d!==null&&(d=d.shared,(p&4194240)!==0)){var b=d.lanes;b&=l.pendingLanes,p|=b,d.lanes=p,ww(l,p)}}function XS(l,d){var p=l.updateQueue,b=l.alternate;if(b!==null&&(b=b.updateQueue,p===b)){var w=null,_=null;if(p=p.firstBaseUpdate,p!==null){do{var L={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};_===null?w=_=L:_=_.next=L,p=p.next}while(p!==null);_===null?w=_=d:_=_.next=d}else w=_=d;p={baseState:b.baseState,firstBaseUpdate:w,lastBaseUpdate:_,shared:b.shared,effects:b.effects},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=d:l.next=d,p.lastBaseUpdate=d}function Ix(l,d,p,b){var w=l.updateQueue;Wo=!1;var _=w.firstBaseUpdate,L=w.lastBaseUpdate,B=w.shared.pending;if(B!==null){w.shared.pending=null;var H=B,te=H.next;H.next=null,L===null?_=te:L.next=te,L=H;var ae=l.alternate;ae!==null&&(ae=ae.updateQueue,B=ae.lastBaseUpdate,B!==L&&(B===null?ae.firstBaseUpdate=te:B.next=te,ae.lastBaseUpdate=H))}if(_!==null){var ce=w.baseState;L=0,ae=te=H=null,B=_;do{var ie=B.lane,ye=B.eventTime;if((b&ie)===ie){ae!==null&&(ae=ae.next={eventTime:ye,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var je=l,_e=B;switch(ie=d,ye=p,_e.tag){case 1:if(je=_e.payload,typeof je=="function"){ce=je.call(ye,ce,ie);break e}ce=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=_e.payload,ie=typeof je=="function"?je.call(ye,ce,ie):je,ie==null)break e;ce=Q({},ce,ie);break e;case 2:Wo=!0}}B.callback!==null&&B.lane!==0&&(l.flags|=64,ie=w.effects,ie===null?w.effects=[B]:ie.push(B))}else ye={eventTime:ye,lane:ie,tag:B.tag,payload:B.payload,callback:B.callback,next:null},ae===null?(te=ae=ye,H=ce):ae=ae.next=ye,L|=ie;if(B=B.next,B===null){if(B=w.shared.pending,B===null)break;ie=B,B=ie.next,ie.next=null,w.lastBaseUpdate=ie,w.shared.pending=null}}while(!0);if(ae===null&&(H=ce),w.baseState=H,w.firstBaseUpdate=te,w.lastBaseUpdate=ae,d=w.shared.interleaved,d!==null){w=d;do L|=w.lane,w=w.next;while(w!==d)}else _===null&&(w.shared.lanes=0);vc|=L,l.lanes=L,l.memoizedState=ce}}function YS(l,d,p){if(l=d.effects,d.effects=null,l!==null)for(d=0;d<l.length;d++){var b=l[d],w=b.callback;if(w!==null){if(b.callback=null,b=p,typeof w!="function")throw Error(t(191,w));w.call(b)}}}var Rm={},Oi=Ho(Rm),Mm=Ho(Rm),Im=Ho(Rm);function yc(l){if(l===Rm)throw Error(t(174));return l}function l1(l,d){switch(yt(Im,d),yt(Mm,l),yt(Oi,Rm),l=d.nodeType,l){case 9:case 11:d=(d=d.documentElement)?d.namespaceURI:cw(null,"");break;default:l=l===8?d.parentNode:d,d=l.namespaceURI||null,l=l.tagName,d=cw(d,l)}Nt(Oi),yt(Oi,d)}function Du(){Nt(Oi),Nt(Mm),Nt(Im)}function JS(l){yc(Im.current);var d=yc(Oi.current),p=cw(d,l.type);d!==p&&(yt(Mm,l),yt(Oi,p))}function c1(l){Mm.current===l&&(Nt(Oi),Nt(Mm))}var Mt=Ho(0);function Lx(l){for(var d=l;d!==null;){if(d.tag===13){var p=d.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||p.data==="$!"))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var d1=[];function u1(){for(var l=0;l<d1.length;l++)d1[l]._workInProgressVersionPrimary=null;d1.length=0}var Dx=M.ReactCurrentDispatcher,h1=M.ReactCurrentBatchConfig,bc=0,It=null,us=null,ys=null,Ox=!1,Lm=!1,Dm=0,pL=0;function Ks(){throw Error(t(321))}function f1(l,d){if(d===null)return!1;for(var p=0;p<d.length&&p<l.length;p++)if(!ei(l[p],d[p]))return!1;return!0}function m1(l,d,p,b,w,_){if(bc=_,It=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,Dx.current=l===null||l.memoizedState===null?bL:vL,l=p(b,w),Lm){_=0;do{if(Lm=!1,Dm=0,25<=_)throw Error(t(301));_+=1,ys=us=null,d.updateQueue=null,Dx.current=wL,l=p(b,w)}while(Lm)}if(Dx.current=$x,d=us!==null&&us.next!==null,bc=0,ys=us=It=null,Ox=!1,d)throw Error(t(300));return l}function p1(){var l=Dm!==0;return Dm=0,l}function Fi(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ys===null?It.memoizedState=ys=l:ys=ys.next=l,ys}function Ar(){if(us===null){var l=It.alternate;l=l!==null?l.memoizedState:null}else l=us.next;var d=ys===null?It.memoizedState:ys.next;if(d!==null)ys=d,us=l;else{if(l===null)throw Error(t(310));us=l,l={memoizedState:us.memoizedState,baseState:us.baseState,baseQueue:us.baseQueue,queue:us.queue,next:null},ys===null?It.memoizedState=ys=l:ys=ys.next=l}return ys}function Om(l,d){return typeof d=="function"?d(l):d}function g1(l){var d=Ar(),p=d.queue;if(p===null)throw Error(t(311));p.lastRenderedReducer=l;var b=us,w=b.baseQueue,_=p.pending;if(_!==null){if(w!==null){var L=w.next;w.next=_.next,_.next=L}b.baseQueue=w=_,p.pending=null}if(w!==null){_=w.next,b=b.baseState;var B=L=null,H=null,te=_;do{var ae=te.lane;if((bc&ae)===ae)H!==null&&(H=H.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),b=te.hasEagerState?te.eagerState:l(b,te.action);else{var ce={lane:ae,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};H===null?(B=H=ce,L=b):H=H.next=ce,It.lanes|=ae,vc|=ae}te=te.next}while(te!==null&&te!==_);H===null?L=b:H.next=B,ei(b,d.memoizedState)||(Sn=!0),d.memoizedState=b,d.baseState=L,d.baseQueue=H,p.lastRenderedState=b}if(l=p.interleaved,l!==null){w=l;do _=w.lane,It.lanes|=_,vc|=_,w=w.next;while(w!==l)}else w===null&&(p.lanes=0);return[d.memoizedState,p.dispatch]}function x1(l){var d=Ar(),p=d.queue;if(p===null)throw Error(t(311));p.lastRenderedReducer=l;var b=p.dispatch,w=p.pending,_=d.memoizedState;if(w!==null){p.pending=null;var L=w=w.next;do _=l(_,L.action),L=L.next;while(L!==w);ei(_,d.memoizedState)||(Sn=!0),d.memoizedState=_,d.baseQueue===null&&(d.baseState=_),p.lastRenderedState=_}return[_,b]}function QS(){}function ZS(l,d){var p=It,b=Ar(),w=d(),_=!ei(b.memoizedState,w);
vendor: 4,461 bytes, line 38
38if(_&&(b.memoizedState=w,Sn=!0),b=b.queue,y1(sA.bind(null,p,b,l),[l]),b.getSnapshot!==d||_||ys!==null&&ys.memoizedState.tag&1){if(p.flags|=2048,Fm(9,tA.bind(null,p,b,w,d),void 0,null),bs===null)throw Error(t(349));(bc&30)!==0||eA(p,d,w)}return w}function eA(l,d,p){l.flags|=16384,l={getSnapshot:d,value:p},d=It.updateQueue,d===null?(d={lastEffect:null,stores:null},It.updateQueue=d,d.stores=[l]):(p=d.stores,p===null?d.stores=[l]:p.push(l))}function tA(l,d,p,b){d.value=p,d.getSnapshot=b,nA(d)&&rA(l)}function sA(l,d,p){return p(function(){nA(d)&&rA(l)})}function nA(l){var d=l.getSnapshot;l=l.value;try{var p=d();return!ei(l,p)}catch{return!0}}function rA(l){var d=Aa(l,1);d!==null&&ii(d,l,1,-1)}function iA(l){var d=Fi();return typeof l=="function"&&(l=l()),d.memoizedState=d.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Om,lastRenderedState:l},d.queue=l,l=l.dispatch=yL.bind(null,It,l),[d.memoizedState,l]}function Fm(l,d,p,b){return l={tag:l,create:d,destroy:p,deps:b,next:null},d=It.updateQueue,d===null?(d={lastEffect:null,stores:null},It.updateQueue=d,d.lastEffect=l.next=l):(p=d.lastEffect,p===null?d.lastEffect=l.next=l:(b=p.next,p.next=l,l.next=b,d.lastEffect=l)),l}function aA(){return Ar().memoizedState}function Fx(l,d,p,b){var w=Fi();It.flags|=l,w.memoizedState=Fm(1|d,p,void 0,b===void 0?null:b)}function Bx(l,d,p,b){var w=Ar();b=b===void 0?null:b;var _=void 0;if(us!==null){var L=us.memoizedState;if(_=L.destroy,b!==null&&f1(b,L.deps)){w.memoizedState=Fm(d,p,_,b);return}}It.flags|=l,w.memoizedState=Fm(1|d,p,_,b)}function oA(l,d){return Fx(8390656,8,l,d)}function y1(l,d){return Bx(2048,8,l,d)}function lA(l,d){return Bx(4,2,l,d)}function cA(l,d){return Bx(4,4,l,d)}function dA(l,d){if(typeof d=="function")return l=l(),d(l),function(){d(null)};if(d!=null)return l=l(),d.current=l,function(){d.current=null}}function uA(l,d,p){return p=p!=null?p.concat([l]):null,Bx(4,4,dA.bind(null,d,l),p)}function b1(){}function hA(l,d){var p=Ar();d=d===void 0?null:d;var b=p.memoizedState;return b!==null&&d!==null&&f1(d,b[1])?b[0]:(p.memoizedState=[l,d],l)}function fA(l,d){var p=Ar();d=d===void 0?null:d;var b=p.memoizedState;return b!==null&&d!==null&&f1(d,b[1])?b[0]:(l=l(),p.memoizedState=[l,d],l)}function mA(l,d,p){return(bc&21)===0?(l.baseState&&(l.baseState=!1,Sn=!0),l.memoizedState=p):(ei(p,d)||(p=V5(),It.lanes|=p,vc|=p,l.baseState=!0),d)}function gL(l,d){var p=ot;ot=p!==0&&4>p?p:4,l(!0);var b=h1.transition;h1.transition={};try{l(!1),d()}finally{ot=p,h1.transition=b}}function pA(){return Ar().memoizedState}function xL(l,d,p){var b=Yo(l);if(p={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null},gA(l))xA(d,p);else if(p=qS(l,d,p,b),p!==null){var w=ln();ii(p,l,b,w),yA(p,d,b)}}function yL(l,d,p){var b=Yo(l),w={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null};if(gA(l))xA(d,w);else{var _=l.alternate;if(l.lanes===0&&(_===null||_.lanes===0)&&(_=d.lastRenderedReducer,_!==null))try{var L=d.lastRenderedState,B=_(L,p);if(w.hasEagerState=!0,w.eagerState=B,ei(B,L)){var H=d.interleaved;H===null?(w.next=w,a1(d)):(w.next=H.next,H.next=w),d.interleaved=w;return}}catch{}finally{}p=qS(l,d,w,b),p!==null&&(w=ln(),ii(p,l,b,w),yA(p,d,b))}}function gA(l){var d=l.alternate;return l===It||d!==null&&d===It}function xA(l,d){Lm=Ox=!0;var p=l.pending;p===null?d.next=d:(d.next=p.next,p.next=d),l.pending=d}function yA(l,d,p){if((p&4194240)!==0){var b=d.lanes;b&=l.pendingLanes,p|=b,d.lanes=p,ww(l,p)}}var $x={readContext:Sr,useCallback:Ks,useContext:Ks,useEffect:Ks,useImperativeHandle:Ks,useInsertionEffect:Ks,useLayoutEffect:Ks,useMemo:Ks,useReducer:Ks,useRef:Ks,useState:Ks,useDebugValue:Ks,useDeferredValue:Ks,useTransition:Ks,useMutableSource:Ks,useSyncExternalStore:Ks,useId:Ks,unstable_isNewReconciler:!1},bL={readContext:Sr,useCallback:function(l,d){return Fi().memoizedState=[l,d===void 0?null:d],l},useContext:Sr,useEffect:oA,useImperativeHandle:function(l,d,p){return p=p!=null?p.concat([l]):null,Fx(4194308,4,dA.bind(null,d,l),p)},useLayoutEffect:function(l,d){return Fx(4194308,4,l,d)},useInsertionEffect:function(l,d){return Fx(4,2,l,d)},useMemo:function(l,d){var p=Fi();return d=d===void 0?null:d,l=l(),p.memoizedState=[l,d],l},useReducer:function(l,d,p){var b=Fi();return d=p!==void 0?p(d):d,b.memoizedState=b.baseState=d,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:d},b.queue=l,l=l.dispatch=xL.bind(null,It,l),[b.memoizedState,l]}
vendor: 4,547 bytes, lines 38-40
38,useRef:function(l){var d=Fi();return l={current:l},d.memoizedState=l},useState:iA,useDebugValue:b1,useDeferredValue:function(l){return Fi().memoizedState=l},useTransition:function(){var l=iA(!1),d=l[0];return l=gL.bind(null,l[1]),Fi().memoizedState=l,[d,l]},useMutableSource:function(){},useSyncExternalStore:function(l,d,p){var b=It,w=Fi();if(Et){if(p===void 0)throw Error(t(407));p=p()}else{if(p=d(),bs===null)throw Error(t(349));(bc&30)!==0||eA(b,d,p)}w.memoizedState=p;var _={value:p,getSnapshot:d};return w.queue=_,oA(sA.bind(null,b,_,l),[l]),b.flags|=2048,Fm(9,tA.bind(null,b,_,p,d),void 0,null),p},useId:function(){var l=Fi(),d=bs.identifierPrefix;if(Et){var p=Sa,b=ka;p=(b&~(1<<32-Zr(b)-1)).toString(32)+p,d=":"+d+"R"+p,p=Dm++,0<p&&(d+="H"+p.toString(32)),d+=":"}else p=pL++,d=":"+d+"r"+p.toString(32)+":";return l.memoizedState=d},unstable_isNewReconciler:!1},vL={readContext:Sr,useCallback:hA,useContext:Sr,useEffect:y1,useImperativeHandle:uA,useInsertionEffect:lA,useLayoutEffect:cA,useMemo:fA,useReducer:g1,useRef:aA,useState:function(){return g1(Om)},useDebugValue:b1,useDeferredValue:function(l){var d=Ar();return mA(d,us.memoizedState,l)},useTransition:function(){var l=g1(Om)[0],d=Ar().memoizedState;return[l,d]},useMutableSource:QS,useSyncExternalStore:ZS,useId:pA,unstable_isNewReconciler:!1},wL={readContext:Sr,useCallback:hA,useContext:Sr,useEffect:y1,useImperativeHandle:uA,useInsertionEffect:lA,useLayoutEffect:cA,useMemo:fA,useReducer:x1,useRef:aA,useState:function(){return x1(Om)},useDebugValue:b1,useDeferredValue:function(l){var d=Ar();return us===null?d.memoizedState=l:mA(d,us.memoizedState,l)},useTransition:function(){var l=x1(Om)[0],d=Ar().memoizedState;return[l,d]},useMutableSource:QS,useSyncExternalStore:ZS,useId:pA,unstable_isNewReconciler:!1};function si(l,d){if(l&&l.defaultProps){d=Q({},d),l=l.defaultProps;for(var p in l)d[p]===void 0&&(d[p]=l[p]);return d}return d}function v1(l,d,p,b){d=l.memoizedState,p=p(b,d),p=p==null?d:Q({},d,p),l.memoizedState=p,l.lanes===0&&(l.updateQueue.baseState=p)}var Ux={isMounted:function(l){return(l=l._reactInternals)?hc(l)===l:!1},enqueueSetState:function(l,d,p){l=l._reactInternals;var b=ln(),w=Yo(l),_=_a(b,w);_.payload=d,p!=null&&(_.callback=p),d=Go(l,_,w),d!==null&&(ii(d,l,w,b),Mx(d,l,w))},enqueueReplaceState:function(l,d,p){l=l._reactInternals;var b=ln(),w=Yo(l),_=_a(b,w);_.tag=1,_.payload=d,p!=null&&(_.callback=p),d=Go(l,_,w),d!==null&&(ii(d,l,w,b),Mx(d,l,w))},enqueueForceUpdate:function(l,d){l=l._reactInternals;var p=ln(),b=Yo(l),w=_a(p,b);w.tag=2,d!=null&&(w.callback=d),d=Go(l,w,b),d!==null&&(ii(d,l,b,p),Mx(d,l,b))}};function bA(l,d,p,b,w,_,L){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(b,_,L):d.prototype&&d.prototype.isPureReactComponent?!km(p,b)||!km(w,_):!0}function vA(l,d,p){var b=!1,w=zo,_=d.contextType;return typeof _=="object"&&_!==null?_=Sr(_):(w=kn(d)?mc:qs.current,b=d.contextTypes,_=(b=b!=null)?Cu(l,w):zo),d=new d(p,_),l.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ux,l.stateNode=d,d._reactInternals=l,b&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=w,l.__reactInternalMemoizedMaskedChildContext=_),d}function wA(l,d,p,b){l=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(p,b),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(p,b),d.state!==l&&Ux.enqueueReplaceState(d,d.state,null)}function w1(l,d,p,b){var w=l.stateNode;w.props=p,w.state=l.memoizedState,w.refs={},o1(l);var _=d.contextType;typeof _=="object"&&_!==null?w.context=Sr(_):(_=kn(d)?mc:qs.current,w.context=Cu(l,_)),w.state=l.memoizedState,_=d.getDerivedStateFromProps,typeof _=="function"&&(v1(l,d,_,p),w.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(d=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),d!==w.state&&Ux.enqueueReplaceState(w,w.state,null),Ix(l,p,w,b),w.state=l.memoizedState),typeof w.componentDidMount=="function"&&(l.flags|=4194308)}function Ou(l,d){try{var p="",b=d;do p+=G(b),b=b.return;while(b);var w=p}catch(_){w=` 39Error generating stack: `+_.message+` 40`+_.stack}return{value:l,source:d,stack:w,digest:null}}function j1(l,d,p){return{value:l,source:null,stack:p??null,digest:d??null}}function N1(l,d){try{console.error(d.value)}
vendor: 41,682 bytes, line 40
40catch(p){setTimeout(function(){throw p})}}var jL=typeof WeakMap=="function"?WeakMap:Map;function jA(l,d,p){p=_a(-1,p),p.tag=3,p.payload={element:null};var b=d.value;return p.callback=function(){Kx||(Kx=!0,F1=b),N1(l,d)},p}function NA(l,d,p){p=_a(-1,p),p.tag=3;var b=l.type.getDerivedStateFromError;if(typeof b=="function"){var w=d.value;p.payload=function(){return b(w)},p.callback=function(){N1(l,d)}}var _=l.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(p.callback=function(){N1(l,d),typeof b!="function"&&(Ko===null?Ko=new Set([this]):Ko.add(this));var L=d.stack;this.componentDidCatch(d.value,{componentStack:L!==null?L:""})}),p}function kA(l,d,p){var b=l.pingCache;if(b===null){b=l.pingCache=new jL;var w=new Set;b.set(d,w)}else w=b.get(d),w===void 0&&(w=new Set,b.set(d,w));w.has(p)||(w.add(p),l=DL.bind(null,l,d,p),d.then(l,l))}function SA(l){do{var d;if((d=l.tag===13)&&(d=l.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return l;l=l.return}while(l!==null);return null}function AA(l,d,p,b,w){return(l.mode&1)===0?(l===d?l.flags|=65536:(l.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(d=_a(-1,1),d.tag=2,Go(p,d,1))),p.lanes|=1),l):(l.flags|=65536,l.lanes=w,l)}var NL=M.ReactCurrentOwner,Sn=!1;function on(l,d,p,b){d.child=l===null?GS(d,null,p,b):Mu(d,l.child,p,b)}function _A(l,d,p,b,w){p=p.render;var _=d.ref;return Lu(d,w),b=m1(l,d,p,b,_,w),p=p1(),l!==null&&!Sn?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~w,Ea(l,d,w)):(Et&&p&&Jw(d),d.flags|=1,on(l,d,b,w),d.child)}function EA(l,d,p,b,w){if(l===null){var _=p.type;return typeof _=="function"&&!W1(_)&&_.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(d.tag=15,d.type=_,CA(l,d,_,b,w)):(l=ey(p.type,null,b,d,d.mode,w),l.ref=d.ref,l.return=d,d.child=l)}if(_=l.child,(l.lanes&w)===0){var L=_.memoizedProps;if(p=p.compare,p=p!==null?p:km,p(L,b)&&l.ref===d.ref)return Ea(l,d,w)}return d.flags|=1,l=Qo(_,b),l.ref=d.ref,l.return=d,d.child=l}function CA(l,d,p,b,w){if(l!==null){var _=l.memoizedProps;if(km(_,b)&&l.ref===d.ref)if(Sn=!1,d.pendingProps=b=_,(l.lanes&w)!==0)(l.flags&131072)!==0&&(Sn=!0);else return d.lanes=l.lanes,Ea(l,d,w)}return k1(l,d,p,b,w)}function TA(l,d,p){var b=d.pendingProps,w=b.children,_=l!==null?l.memoizedState:null;if(b.mode==="hidden")if((d.mode&1)===0)d.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Bu,Vn),Vn|=p;else{if((p&1073741824)===0)return l=_!==null?_.baseLanes|p:p,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:l,cachePool:null,transitions:null},d.updateQueue=null,yt(Bu,Vn),Vn|=l,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=_!==null?_.baseLanes:p,yt(Bu,Vn),Vn|=b}else _!==null?(b=_.baseLanes|p,d.memoizedState=null):b=p,yt(Bu,Vn),Vn|=b;return on(l,d,w,p),d.child}function PA(l,d){var p=d.ref;(l===null&&p!==null||l!==null&&l.ref!==p)&&(d.flags|=512,d.flags|=2097152)}function k1(l,d,p,b,w){var _=kn(p)?mc:qs.current;return _=Cu(d,_),Lu(d,w),p=m1(l,d,p,b,_,w),b=p1(),l!==null&&!Sn?(d.updateQueue=l.updateQueue,d.flags&=-2053,l.lanes&=~w,Ea(l,d,w)):(Et&&b&&Jw(d),d.flags|=1,on(l,d,p,w),d.child)}function RA(l,d,p,b,w){if(kn(p)){var _=!0;Sx(d)}else _=!1;if(Lu(d,w),d.stateNode===null)zx(l,d),vA(d,p,b),w1(d,p,b,w),b=!0;else if(l===null){var L=d.stateNode,B=d.memoizedProps;L.props=B;var H=L.context,te=p.contextType;typeof te=="object"&&te!==null?te=Sr(te):(te=kn(p)?mc:qs.current,te=Cu(d,te));var ae=p.getDerivedStateFromProps,ce=typeof ae=="function"||typeof L.getSnapshotBeforeUpdate=="function";ce||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(B!==b||H!==te)&&wA(d,L,b,te),Wo=!1;var ie=d.memoizedState;L.state=ie,Ix(d,b,L,w),H=d.memoizedState,B!==b||ie!==H||Nn.current||Wo?(typeof ae=="function"&&(v1(d,p,ae,b),H=d.memoizedState),(B=Wo||bA(d,p,B,b,ie,H,te))?(ce||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount=="function"&&(d.flags|=4194308)):(typeof L.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=b,d.memoizedState=H),L.props=b,L.state=H,L.context=te,b=B):(typeof L.componentDidMount=="function"&&(d.flags|=4194308),b=!1)}else{L=d.stateNode,KS(l,d),B=d.memoizedProps,te=d.type===d.elementType?B:si(d.type,B),L.props=te,ce=d.pendingProps,ie=L.context,H=p.contextType,typeof H=="object"&&H!==null?H=Sr(H):(H=kn(p)?mc:qs.current,H=Cu(d,H));var ye=p.getDerivedStateFromProps;(ae=typeof ye=="function"||typeof L.getSnapshotBeforeUpdate=="function")||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(B!==ce||ie!==H)&&wA(d,L,b,H),Wo=!1,ie=d.memoizedState,L.state=ie,Ix(d,b,L,w);var je=d.memoizedState;B!==ce||ie!==je||Nn.current||Wo?(typeof ye=="function"&&(v1(d,p,ye,b),je=d.memoizedState),(te=Wo||bA(d,p,te,b,ie,je,H)||!1)?(ae||typeof L.UNSAFE_componentWillUpdate!="function"&&typeof L.componentWillUpdate!="function"||(typeof L.componentWillUpdate=="function"&&L.componentWillUpdate(b,je,H),typeof L.UNSAFE_componentWillUpdate=="function"&&L.UNSAFE_componentWillUpdate(b,je,H)),typeof L.componentDidUpdate=="function"&&(d.flags|=4),typeof L.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof L.componentDidUpdate!="function"||B===l.memoizedProps&&ie===l.memoizedState||(d.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||B===l.memoizedProps&&ie===l.memoizedState||(d.flags|=1024),d.memoizedProps=b,d.memoizedState=je),L.props=b,L.state=je,L.context=H,b=te):(typeof L.componentDidUpdate!="function"||B===l.memoizedProps&&ie===l.memoizedState||(d.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||B===l.memoizedProps&&ie===l.memoizedState||(d.flags|=1024),b=!1)}return S1(l,d,p,b,_,w)}function S1(l,d,p,b,w,_){PA(l,d);var L=(d.flags&128)!==0;if(!b&&!L)return w&&OS(d,p,!1),Ea(l,d,_);b=d.stateNode,NL.current=d;var B=L&&typeof p.getDerivedStateFromError!="function"?null:b.render();return d.flags|=1,l!==null&&L?(d.child=Mu(d,l.child,null,_),d.child=Mu(d,null,B,_)):on(l,d,B,_),d.memoizedState=b.state,w&&OS(d,p,!0),d.child}function MA(l){var d=l.stateNode;d.pendingContext?LS(l,d.pendingContext,d.pendingContext!==d.context):d.context&&LS(l,d.context,!1),l1(l,d.containerInfo)}function IA(l,d,p,b,w){return Ru(),t1(w),d.flags|=256,on(l,d,p,b),d.child}var A1={dehydrated:null,treeContext:null,retryLane:0};function _1(l){return{baseLanes:l,cachePool:null,transitions:null}}function LA(l,d,p){var b=d.pendingProps,w=Mt.current,_=!1,L=(d.flags&128)!==0,B;if((B=L)||(B=l!==null&&l.memoizedState===null?!1:(w&2)!==0),B?(_=!0,d.flags&=-129):(l===null||l.memoizedState!==null)&&(w|=1),yt(Mt,w&1),l===null)return e1(d),l=d.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?((d.mode&1)===0?d.lanes=1:l.data==="$!"?d.lanes=8:d.lanes=1073741824,null):(L=b.children,l=b.fallback,_?(b=d.mode,_=d.child,L={mode:"hidden",children:L},(b&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=L):_=ty(L,b,0,null),l=kc(l,b,p,null),_.return=d,l.return=d,_.sibling=l,d.child=_,d.child.memoizedState=_1(p),d.memoizedState=A1,l):E1(d,L));if(w=l.memoizedState,w!==null&&(B=w.dehydrated,B!==null))return kL(l,d,L,b,B,w,p);if(_){_=b.fallback,L=d.mode,w=l.child,B=w.sibling;var H={mode:"hidden",children:b.children};return(L&1)===0&&d.child!==w?(b=d.child,b.childLanes=0,b.pendingProps=H,d.deletions=null):(b=Qo(w,H),b.subtreeFlags=w.subtreeFlags&14680064),B!==null?_=Qo(B,_):(_=kc(_,L,p,null),_.flags|=2),_.return=d,b.return=d,b.sibling=_,d.child=b,b=_,_=d.child,L=l.child.memoizedState,L=L===null?_1(p):{baseLanes:L.baseLanes|p,cachePool:null,transitions:L.transitions},_.memoizedState=L,_.childLanes=l.childLanes&~p,d.memoizedState=A1,b}return _=l.child,l=_.sibling,b=Qo(_,{mode:"visible",children:b.children}),(d.mode&1)===0&&(b.lanes=p),b.return=d,b.sibling=null,l!==null&&(p=d.deletions,p===null?(d.deletions=[l],d.flags|=16):p.push(l)),d.child=b,d.memoizedState=null,b}function E1(l,d){return d=ty({mode:"visible",children:d},l.mode,0,null),d.return=l,l.child=d}function Hx(l,d,p,b){return b!==null&&t1(b),Mu(d,l.child,null,p),l=E1(d,d.pendingProps.children),l.flags|=2,d.memoizedState=null,l}function kL(l,d,p,b,w,_,L){if(p)return d.flags&256?(d.flags&=-257,b=j1(Error(t(422))),Hx(l,d,L,b)):d.memoizedState!==null?(d.child=l.child,d.flags|=128,null):(_=b.fallback,w=d.mode,b=ty({mode:"visible",children:b.children},w,0,null),_=kc(_,w,L,null),_.flags|=2,b.return=d,_.return=d,b.sibling=_,d.child=b,(d.mode&1)!==0&&Mu(d,l.child,null,L),d.child.memoizedState=_1(L),d.memoizedState=A1,_);if((d.mode&1)===0)return Hx(l,d,L,null);if(w.data==="$!"){if(b=w.nextSibling&&w.nextSibling.dataset,b)var B=b.dgst;return b=B,_=Error(t(419)),b=j1(_,b,void 0),Hx(l,d,L,b)}if(B=(L&l.childLanes)!==0,Sn||B){if(b=bs,b!==null){switch(L&-L){case 4:w=2;break;case 16:w=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:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(b.suspendedLanes|L))!==0?0:w,w!==0&&w!==_.retryLane&&(_.retryLane=w,Aa(l,w),ii(b,l,w,-1))}return V1(),b=j1(Error(t(421))),Hx(l,d,L,b)}return w.data==="$?"?(d.flags|=128,d.child=l.child,d=OL.bind(null,l),w._reactRetry=d,null):(l=_.treeContext,zn=Uo(w.nextSibling),Hn=d,Et=!0,ti=null,l!==null&&(Nr[kr++]=ka,Nr[kr++]=Sa,Nr[kr++]=pc,ka=l.id,Sa=l.overflow,pc=d),d=E1(d,b.children),d.flags|=4096,d)}function DA(l,d,p){l.lanes|=d;var b=l.alternate;b!==null&&(b.lanes|=d),i1(l.return,d,p)}function C1(l,d,p,b,w){var _=l.memoizedState;_===null?l.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:b,tail:p,tailMode:w}:(_.isBackwards=d,_.rendering=null,_.renderingStartTime=0,_.last=b,_.tail=p,_.tailMode=w)}function OA(l,d,p){var b=d.pendingProps,w=b.revealOrder,_=b.tail;if(on(l,d,b.children,p),b=Mt.current,(b&2)!==0)b=b&1|2,d.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=d.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&DA(l,p,d);else if(l.tag===19)DA(l,p,d);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===d)break e;for(;l.sibling===null;){if(l.return===null||l.return===d)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}b&=1}if(yt(Mt,b),(d.mode&1)===0)d.memoizedState=null;else switch(w){case"forwards":for(p=d.child,w=null;p!==null;)l=p.alternate,l!==null&&Lx(l)===null&&(w=p),p=p.sibling;p=w,p===null?(w=d.child,d.child=null):(w=p.sibling,p.sibling=null),C1(d,!1,w,p,_);break;case"backwards":for(p=null,w=d.child,d.child=null;w!==null;){if(l=w.alternate,l!==null&&Lx(l)===null){d.child=w;break}l=w.sibling,w.sibling=p,p=w,w=l}C1(d,!0,p,null,_);break;case"together":C1(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function zx(l,d){(d.mode&1)===0&&l!==null&&(l.alternate=null,d.alternate=null,d.flags|=2)}function Ea(l,d,p){if(l!==null&&(d.dependencies=l.dependencies),vc|=d.lanes,(p&d.childLanes)===0)return null;if(l!==null&&d.child!==l.child)throw Error(t(153));if(d.child!==null){for(l=d.child,p=Qo(l,l.pendingProps),d.child=p,p.return=d;l.sibling!==null;)l=l.sibling,p=p.sibling=Qo(l,l.pendingProps),p.return=d;p.sibling=null}return d.child}function SL(l,d,p){switch(d.tag){case 3:MA(d),Ru();break;case 5:JS(d);break;case 1:kn(d.type)&&Sx(d);break;case 4:l1(d,d.stateNode.containerInfo);break;case 10:var b=d.type._context,w=d.memoizedProps.value;yt(Px,b._currentValue),b._currentValue=w;break;case 13:if(b=d.memoizedState,b!==null)return b.dehydrated!==null?(yt(Mt,Mt.current&1),d.flags|=128,null):(p&d.child.childLanes)!==0?LA(l,d,p):(yt(Mt,Mt.current&1),l=Ea(l,d,p),l!==null?l.sibling:null);yt(Mt,Mt.current&1);break;case 19:if(b=(p&d.childLanes)!==0,(l.flags&128)!==0){if(b)return OA(l,d,p);d.flags|=128}if(w=d.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),yt(Mt,Mt.current),b)break;return null;case 22:case 23:return d.lanes=0,TA(l,d,p)}return Ea(l,d,p)}var FA,T1,BA,$A;FA=function(l,d){for(var p=d.child;p!==null;){if(p.tag===5||p.tag===6)l.appendChild(p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===d)break;for(;p.sibling===null;){if(p.return===null||p.return===d)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},T1=function(){},BA=function(l,d,p,b){var w=l.memoizedProps;if(w!==b){l=d.stateNode,yc(Oi.current);var _=null;switch(p){case"input":w=im(l,w),b=im(l,b),_=[];break;case"select":w=Q({},w,{value:void 0}),b=Q({},b,{value:void 0}),_=[];break;case"textarea":w=lw(l,w),b=lw(l,b),_=[];break;default:typeof w.onClick!="function"&&typeof b.onClick=="function"&&(l.onclick=jx)}dw(p,b);var L;p=null;for(te in w)if(!b.hasOwnProperty(te)&&w.hasOwnProperty(te)&&w[te]!=null)if(te==="style"){var B=w[te];for(L in B)B.hasOwnProperty(L)&&(p||(p={}),p[L]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(i.hasOwnProperty(te)?_||(_=[]):(_=_||[]).push(te,null));for(te in b){var H=b[te];if(B=w!=null?w[te]:void 0,b.hasOwnProperty(te)&&H!==B&&(H!=null||B!=null))if(te==="style")if(B){for(L in B)!B.hasOwnProperty(L)||H&&H.hasOwnProperty(L)||(p||(p={}),p[L]="");for(L in H)H.hasOwnProperty(L)&&B[L]!==H[L]&&(p||(p={}),p[L]=H[L])}else p||(_||(_=[]),_.push(te,p)),p=H;else te==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,B=B?B.__html:void 0,H!=null&&B!==H&&(_=_||[]).push(te,H)):te==="children"?typeof H!="string"&&typeof H!="number"||(_=_||[]).push(te,""+H):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(H!=null&&te==="onScroll"&&jt("scroll",l),_||B===H||(_=[])):(_=_||[]).push(te,H))}p&&(_=_||[]).push("style",p);var te=_;(d.updateQueue=te)&&(d.flags|=4)}},$A=function(l,d,p,b){p!==b&&(d.flags|=4)};function Bm(l,d){if(!Et)switch(l.tailMode){case"hidden":d=l.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l.tail=null:p.sibling=null;break;case"collapsed":p=l.tail;for(var b=null;p!==null;)p.alternate!==null&&(b=p),p=p.sibling;b===null?d||l.tail===null?l.tail=null:l.tail.sibling=null:b.sibling=null}}function Xs(l){var d=l.alternate!==null&&l.alternate.child===l.child,p=0,b=0;if(d)for(var w=l.child;w!==null;)p|=w.lanes|w.childLanes,b|=w.subtreeFlags&14680064,b|=w.flags&14680064,w.return=l,w=w.sibling;else for(w=l.child;w!==null;)p|=w.lanes|w.childLanes,b|=w.subtreeFlags,b|=w.flags,w.return=l,w=w.sibling;return l.subtreeFlags|=b,l.childLanes=p,d}function AL(l,d,p){var b=d.pendingProps;switch(Qw(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xs(d),null;case 1:return kn(d.type)&&kx(),Xs(d),null;case 3:return b=d.stateNode,Du(),Nt(Nn),Nt(qs),u1(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(l===null||l.child===null)&&(Cx(d)?d.flags|=4:l===null||l.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,ti!==null&&(U1(ti),ti=null))),T1(l,d),Xs(d),null;case 5:c1(d);var w=yc(Im.current);if(p=d.type,l!==null&&d.stateNode!=null)BA(l,d,p,b,w),l.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!b){if(d.stateNode===null)throw Error(t(166));return Xs(d),null}if(l=yc(Oi.current),Cx(d)){b=d.stateNode,p=d.type;var _=d.memoizedProps;switch(b[Di]=d,b[Cm]=_,l=(d.mode&1)!==0,p){case"dialog":jt("cancel",b),jt("close",b);break;case"iframe":case"object":case"embed":jt("load",b);break;case"video":case"audio":for(w=0;w<Am.length;w++)jt(Am[w],b);break;case"source":jt("error",b);break;case"img":case"image":case"link":jt("error",b),jt("load",b);break;case"details":jt("toggle",b);break;case"input":v5(b,_),jt("invalid",b);break;case"select":b._wrapperState={wasMultiple:!!_.multiple},jt("invalid",b);break;case"textarea":N5(b,_),jt("invalid",b)}dw(p,_),w=null;for(var L in _)if(_.hasOwnProperty(L)){var B=_[L];L==="children"?typeof B=="string"?b.textContent!==B&&(_.suppressHydrationWarning!==!0&&wx(b.textContent,B,l),w=["children",B]):typeof B=="number"&&b.textContent!==""+B&&(_.suppressHydrationWarning!==!0&&wx(b.textContent,B,l),w=["children",""+B]):i.hasOwnProperty(L)&&B!=null&&L==="onScroll"&&jt("scroll",b)}switch(p){case"input":jr(b),j5(b,_,!0);break;case"textarea":jr(b),S5(b);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(b.onclick=jx)}b=w,d.updateQueue=b,b!==null&&(d.flags|=4)}else{L=w.nodeType===9?w:w.ownerDocument,l==="http://www.w3.org/1999/xhtml"&&(l=A5(p)),l==="http://www.w3.org/1999/xhtml"?p==="script"?(l=L.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild)):typeof b.is=="string"?l=L.createElement(p,{is:b.is}):(l=L.createElement(p),p==="select"&&(L=l,b.multiple?L.multiple=!0:b.size&&(L.size=b.size))):l=L.createElementNS(l,p),l[Di]=d,l[Cm]=b,FA(l,d,!1,!1),d.stateNode=l;e:{switch(L=uw(p,b),p){case"dialog":jt("cancel",l),jt("close",l),w=b;break;case"iframe":case"object":case"embed":jt("load",l),w=b;break;case"video":case"audio":for(w=0;w<Am.length;w++)jt(Am[w],l);w=b;break;case"source":jt("error",l),w=b;break;case"img":case"image":case"link":jt("error",l),jt("load",l),w=b;break;case"details":jt("toggle",l),w=b;break;case"input":v5(l,b),w=im(l,b),jt("invalid",l);break;case"option":w=b;break;case"select":l._wrapperState={wasMultiple:!!b.multiple},w=Q({},b,{value:void 0}),jt("invalid",l);break;case"textarea":N5(l,b),w=lw(l,b),jt("invalid",l);break;default:w=b}dw(p,w),B=w;for(_ in B)if(B.hasOwnProperty(_)){var H=B[_];_==="style"?C5(l,H):_==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&_5(l,H)):_==="children"?typeof H=="string"?(p!=="textarea"||H!=="")&&om(l,H):typeof H=="number"&&om(l,""+H):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(i.hasOwnProperty(_)?H!=null&&_==="onScroll"&&jt("scroll",l):H!=null&&E(l,_,H,L))}switch(p){case"input":jr(l),j5(l,b,!1);break;case"textarea":jr(l),S5(l);break;case"option":b.value!=null&&l.setAttribute("value",""+Se(b.value));break;case"select":l.multiple=!!b.multiple,_=b.value,_!=null?xu(l,!!b.multiple,_,!1):b.defaultValue!=null&&xu(l,!!b.multiple,b.defaultValue,!0);break;default:typeof w.onClick=="function"&&(l.onclick=jx)}switch(p){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break e;case"img":b=!0;break e;default:b=!1}}b&&(d.flags|=4)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return Xs(d),null;case 6:if(l&&d.stateNode!=null)$A(l,d,l.memoizedProps,b);else{if(typeof b!="string"&&d.stateNode===null)throw Error(t(166));if(p=yc(Im.current),yc(Oi.current),Cx(d)){if(b=d.stateNode,p=d.memoizedProps,b[Di]=d,(_=b.nodeValue!==p)&&(l=Hn,l!==null))switch(l.tag){case 3:wx(b.nodeValue,p,(l.mode&1)!==0);break;case 5:l.memoizedProps.suppressHydrationWarning!==!0&&wx(b.nodeValue,p,(l.mode&1)!==0)}_&&(d.flags|=4)}else b=(p.nodeType===9?p:p.ownerDocument).createTextNode(b),b[Di]=d,d.stateNode=b}return Xs(d),null;case 13:if(Nt(Mt),b=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(Et&&zn!==null&&(d.mode&1)!==0&&(d.flags&128)===0)zS(),Ru(),d.flags|=98560,_=!1;else if(_=Cx(d),b!==null&&b.dehydrated!==null){if(l===null){if(!_)throw Error(t(318));if(_=d.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(t(317));_[Di]=d}else Ru(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Xs(d),_=!1}else ti!==null&&(U1(ti),ti=null),_=!0;if(!_)return d.flags&65536?d:null}return(d.flags&128)!==0?(d.lanes=p,d):(b=b!==null,b!==(l!==null&&l.memoizedState!==null)&&b&&(d.child.flags|=8192,(d.mode&1)!==0&&(l===null||(Mt.current&1)!==0?hs===0&&(hs=3):V1())),d.updateQueue!==null&&(d.flags|=4),Xs(d),null);case 4:return Du(),T1(l,d),l===null&&_m(d.stateNode.containerInfo),Xs(d),null;case 10:return r1(d.type._context),Xs(d),null;case 17:return kn(d.type)&&kx(),Xs(d),null;case 19:if(Nt(Mt),_=d.memoizedState,_===null)return Xs(d),null;if(b=(d.flags&128)!==0,L=_.rendering,L===null)if(b)Bm(_,!1);else{if(hs!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(L=Lx(l),L!==null){for(d.flags|=128,Bm(_,!1),b=L.updateQueue,b!==null&&(d.updateQueue=b,d.flags|=4),d.subtreeFlags=0,b=p,p=d.child;p!==null;)_=p,l=b,_.flags&=14680066,L=_.alternate,L===null?(_.childLanes=0,_.lanes=l,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=L.childLanes,_.lanes=L.lanes,_.child=L.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=L.memoizedProps,_.memoizedState=L.memoizedState,_.updateQueue=L.updateQueue,_.type=L.type,l=L.dependencies,_.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),p=p.sibling;return yt(Mt,Mt.current&1|2),d.child}l=l.sibling}_.tail!==null&&Xt()>$u&&(d.flags|=128,b=!0,Bm(_,!1),d.lanes=4194304)}else{if(!b)if(l=Lx(L),l!==null){if(d.flags|=128,b=!0,p=l.updateQueue,p!==null&&(d.updateQueue=p,d.flags|=4),Bm(_,!0),_.tail===null&&_.tailMode==="hidden"&&!L.alternate&&!Et)return Xs(d),null}else 2*Xt()-_.renderingStartTime>$u&&p!==1073741824&&(d.flags|=128,b=!0,Bm(_,!1),d.lanes=4194304);_.isBackwards?(L.sibling=d.child,d.child=L):(p=_.last,p!==null?p.sibling=L:d.child=L,_.last=L)}return _.tail!==null?(d=_.tail,_.rendering=d,_.tail=d.sibling,_.renderingStartTime=Xt(),d.sibling=null,p=Mt.current,yt(Mt,b?p&1|2:p&1),d):(Xs(d),null);case 22:case 23:return z1(),b=d.memoizedState!==null,l!==null&&l.memoizedState!==null!==b&&(d.flags|=8192),b&&(d.mode&1)!==0?(Vn&1073741824)!==0&&(Xs(d),d.subtreeFlags&6&&(d.flags|=8192)):Xs(d),null;case 24:return null;case 25:return null}throw Error(t(156,d.tag))}function _L(l,d){switch(Qw(d),d.tag){case 1:return kn(d.type)&&kx(),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return Du(),Nt(Nn),Nt(qs),u1(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 5:return c1(d),null;case 13:if(Nt(Mt),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(t(340));Ru()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return Nt(Mt),null;case 4:return Du(),null;case 10:return r1(d.type._context),null;case 22:case 23:return z1(),null;case 24:return null;default:return null}}var Vx=!1,Ys=!1,EL=typeof WeakSet=="function"?WeakSet:Set,we=null;function Fu(l,d){var p=l.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(b){$t(l,d,b)}else p.current=null}function P1(l,d,p){try{p()}catch(b){$t(l,d,b)}}var UA=!1;function CL(l,d){if(zw=dx,l=bS(),Lw(l)){if("selectionStart"in l)var p={start:l.selectionStart,end:l.selectionEnd};else e:{p=(p=l.ownerDocument)&&p.defaultView||window;var b=p.getSelection&&p.getSelection();if(b&&b.rangeCount!==0){p=b.anchorNode;var w=b.anchorOffset,_=b.focusNode;b=b.focusOffset;try{p.nodeType,_.nodeType}catch{p=null;break e}var L=0,B=-1,H=-1,te=0,ae=0,ce=l,ie=null;t:for(;;){for(var ye;ce!==p||w!==0&&ce.nodeType!==3||(B=L+w),ce!==_||b!==0&&ce.nodeType!==3||(H=L+b),ce.nodeType===3&&(L+=ce.nodeValue.length),(ye=ce.firstChild)!==null;)ie=ce,ce=ye;for(;;){if(ce===l)break t;if(ie===p&&++te===w&&(B=L),ie===_&&++ae===b&&(H=L),(ye=ce.nextSibling)!==null)break;ce=ie,ie=ce.parentNode}ce=ye}p=B===-1||H===-1?null:{start:B,end:H}}else p=null}p=p||{start:0,end:0}}else p=null;for(Vw={focusedElem:l,selectionRange:p},dx=!1,we=d;we!==null;)if(d=we,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,we=l;else for(;we!==null;){d=we;try{var je=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(je!==null){var _e=je.memoizedProps,Yt=je.memoizedState,X=d.stateNode,V=X.getSnapshotBeforeUpdate(d.elementType===d.type?_e:si(d.type,_e),Yt);X.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var J=d.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(pe){$t(d,d.return,pe)}if(l=d.sibling,l!==null){l.return=d.return,we=l;break}we=d.return}return je=UA,UA=!1,je}function $m(l,d,p){var b=d.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var w=b=b.next;do{if((w.tag&l)===l){var _=w.destroy;w.destroy=void 0,_!==void 0&&P1(d,p,_)}w=w.next}while(w!==b)}}function Wx(l,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var p=d=d.next;do{if((p.tag&l)===l){var b=p.create;p.destroy=b()}p=p.next}while(p!==d)}}function R1(l){var d=l.ref;if(d!==null){var p=l.stateNode;switch(l.tag){case 5:l=p;break;default:l=p}typeof d=="function"?d(l):d.current=l}}function HA(l){var d=l.alternate;d!==null&&(l.alternate=null,HA(d)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(d=l.stateNode,d!==null&&(delete d[Di],delete d[Cm],delete d[Kw],delete d[uL],delete d[hL])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function zA(l){return l.tag===5||l.tag===3||l.tag===4}function VA(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||zA(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function M1(l,d,p){var b=l.tag;if(b===5||b===6)l=l.stateNode,d?p.nodeType===8?p.parentNode.insertBefore(l,d):p.insertBefore(l,d):(p.nodeType===8?(d=p.parentNode,d.insertBefore(l,p)):(d=p,d.appendChild(l)),p=p._reactRootContainer,p!=null||d.onclick!==null||(d.onclick=jx));else if(b!==4&&(l=l.child,l!==null))for(M1(l,d,p),l=l.sibling;l!==null;)M1(l,d,p),l=l.sibling}function I1(l,d,p){var b=l.tag;if(b===5||b===6)l=l.stateNode,d?p.insertBefore(l,d):p.appendChild(l);else if(b!==4&&(l=l.child,l!==null))for(I1(l,d,p),l=l.sibling;l!==null;)I1(l,d,p),l=l.sibling}var Ps=null,ni=!1;function qo(l,d,p){for(p=p.child;p!==null;)WA(l,d,p),p=p.sibling}function WA(l,d,p){if(Li&&typeof Li.onCommitFiberUnmount=="function")try{Li.onCommitFiberUnmount(rx,p)}catch{}switch(p.tag){case 5:Ys||Fu(p,d);case 6:var b=Ps,w=ni;Ps=null,qo(l,d,p),Ps=b,ni=w,Ps!==null&&(ni?(l=Ps,p=p.stateNode,l.nodeType===8?l.parentNode.removeChild(p):l.removeChild(p)):Ps.removeChild(p.stateNode));break;case 18:Ps!==null&&(ni?(l=Ps,p=p.stateNode,l.nodeType===8?qw(l.parentNode,p):l.nodeType===1&&qw(l,p),ym(l)):qw(Ps,p.stateNode));break;case 4:b=Ps,w=ni,Ps=p.stateNode.containerInfo,ni=!0,qo(l,d,p),Ps=b,ni=w;break;case 0:case 11:case 14:case 15:if(!Ys&&(b=p.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){w=b=b.next;do{var _=w,L=_.destroy;_=_.tag,L!==void 0&&((_&2)!==0||(_&4)!==0)&&P1(p,d,L),w=w.next}while(w!==b)}qo(l,d,p);break;case 1:if(!Ys&&(Fu(p,d),b=p.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=p.memoizedProps,b.state=p.memoizedState,b.componentWillUnmount()}catch(B){$t(p,d,B)}qo(l,d,p);break;case 21:qo(l,d,p);break;case 22:p.mode&1?(Ys=(b=Ys)||p.memoizedState!==null,qo(l,d,p),Ys=b):qo(l,d,p);break;default:qo(l,d,p)}}function GA(l){var d=l.updateQueue;if(d!==null){l.updateQueue=null;var p=l.stateNode;p===null&&(p=l.stateNode=new EL),d.forEach(function(b){var w=FL.bind(null,l,b);p.has(b)||(p.add(b),b.then(w,w))})}}function ri(l,d){var p=d.deletions;if(p!==null)for(var b=0;b<p.length;b++){var w=p[b];try{var _=l,L=d,B=L;e:for(;B!==null;){switch(B.tag){case 5:Ps=B.stateNode,ni=!1;break e;case 3:Ps=B.stateNode.containerInfo,ni=!0;break e;case 4:Ps=B.stateNode.containerInfo,ni=!0;break e}B=B.return}if(Ps===null)throw Error(t(160));WA(_,L,w),Ps=null,ni=!1;var H=w.alternate;H!==null&&(H.return=null),w.return=null}catch(te){$t(w,d,te)}}if(d.subtreeFlags&12854)for(d=d.child;d!==null;)qA(d,l),d=d.sibling}function qA(l,d){var p=l.alternate,b=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(ri(d,l),Bi(l),b&4){try{$m(3,l,l.return),Wx(3,l)}catch(_e){$t(l,l.return,_e)}try{$m(5,l,l.return)}catch(_e){$t(l,l.return,_e)}}break;case 1:ri(d,l),Bi(l),b&512&&p!==null&&Fu(p,p.return);break;case 5:if(ri(d,l),Bi(l),b&512&&p!==null&&Fu(p,p.return),l.flags&32){var w=l.stateNode;try{om(w,"")}catch(_e){$t(l,l.return,_e)}}if(b&4&&(w=l.stateNode,w!=null)){var _=l.memoizedProps,L=p!==null?p.memoizedProps:_,B=l.type,H=l.updateQueue;if(l.updateQueue=null,H!==null)try{B==="input"&&_.type==="radio"&&_.name!=null&&w5(w,_),uw(B,L);var te=uw(B,_);for(L=0;L<H.length;L+=2){var ae=H[L],ce=H[L+1];ae==="style"?C5(w,ce):ae==="dangerouslySetInnerHTML"?_5(w,ce):ae==="children"?om(w,ce):E(w,ae,ce,te)}switch(B){case"input":aw(w,_);break;case"textarea":k5(w,_);break;case"select":var ie=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!_.multiple;var ye=_.value;ye!=null?xu(w,!!_.multiple,ye,!1):ie!==!!_.multiple&&(_.defaultValue!=null?xu(w,!!_.multiple,_.defaultValue,!0):xu(w,!!_.multiple,_.multiple?[]:"",!1))}w[Cm]=_}catch(_e){$t(l,l.return,_e)}}break;case 6:if(ri(d,l),Bi(l),b&4){if(l.stateNode===null)throw Error(t(162));w=l.stateNode,_=l.memoizedProps;try{w.nodeValue=_}catch(_e){$t(l,l.return,_e)}}break;case 3:if(ri(d,l),Bi(l),b&4&&p!==null&&p.memoizedState.isDehydrated)try{ym(d.containerInfo)}catch(_e){$t(l,l.return,_e)}break;case 4:ri(d,l),Bi(l);break;case 13:ri(d,l),Bi(l),w=l.child,w.flags&8192&&(_=w.memoizedState!==null,w.stateNode.isHidden=_,!_||w.alternate!==null&&w.alternate.memoizedState!==null||(O1=Xt())),b&4&&GA(l);break;case 22:if(ae=p!==null&&p.memoizedState!==null,l.mode&1?(Ys=(te=Ys)||ae,ri(d,l),Ys=te):ri(d,l),Bi(l),b&8192){if(te=l.memoizedState!==null,(l.stateNode.isHidden=te)&&!ae&&(l.mode&1)!==0)for(we=l,ae=l.child;ae!==null;){for(ce=we=ae;we!==null;){switch(ie=we,ye=ie.child,ie.tag){case 0:case 11:case 14:case 15:$m(4,ie,ie.return);break;case 1:Fu(ie,ie.return);var je=ie.stateNode;if(typeof je.componentWillUnmount=="function"){b=ie,p=ie.return;try{d=b,je.props=d.memoizedProps,je.state=d.memoizedState,je.componentWillUnmount()}catch(_e){$t(b,p,_e)}}break;case 5:Fu(ie,ie.return);break;case 22:if(ie.memoizedState!==null){YA(ce);continue}}ye!==null?(ye.return=ie,we=ye):YA(ce)}ae=ae.sibling}e:for(ae=null,ce=l;;){if(ce.tag===5){if(ae===null){ae=ce;try{w=ce.stateNode,te?(_=w.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(B=ce.stateNode,H=ce.memoizedProps.style,L=H!=null&&H.hasOwnProperty("display")?H.display:null,B.style.display=E5("display",L))}catch(_e){$t(l,l.return,_e)}}}else if(ce.tag===6){if(ae===null)try{ce.stateNode.nodeValue=te?"":ce.memoizedProps}catch(_e){$t(l,l.return,_e)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===l)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===l)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===l)break e;ae===ce&&(ae=null),ce=ce.return}ae===ce&&(ae=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:ri(d,l),Bi(l),b&4&&GA(l);break;case 21:break;default:ri(d,l),Bi(l)}}function Bi(l){var d=l.flags;if(d&2){try{e:{for(var p=l.return;p!==null;){if(zA(p)){var b=p;break e}p=p.return}throw Error(t(160))}switch(b.tag){case 5:var w=b.stateNode;b.flags&32&&(om(w,""),b.flags&=-33);var _=VA(l);I1(l,_,w);break;case 3:case 4:var L=b.stateNode.containerInfo,B=VA(l);M1(l,B,L);break;default:throw Error(t(161))}}catch(H){$t(l,l.return,H)}l.flags&=-3}d&4096&&(l.flags&=-4097)}function TL(l,d,p){we=l,KA(l)}function KA(l,d,p){for(var b=(l.mode&1)!==0;we!==null;){var w=we,_=w.child;if(w.tag===22&&b){var L=w.memoizedState!==null||Vx;if(!L){var B=w.alternate,H=B!==null&&B.memoizedState!==null||Ys;B=Vx;var te=Ys;if(Vx=L,(Ys=H)&&!te)for(we=w;we!==null;)L=we,H=L.child,L.tag===22&&L.memoizedState!==null?JA(w):H!==null?(H.return=L,we=H):JA(w);for(;_!==null;)we=_,KA(_),_=_.sibling;we=w,Vx=B,Ys=te}XA(l)}else(w.subtreeFlags&8772)!==0&&_!==null?(_.return=w,we=_):XA(l)}}function XA(l){for(;we!==null;){var d=we;if((d.flags&8772)!==0){var p=d.alternate;try{if((d.flags&8772)!==0)switch(d.tag){case 0:case 11:case 15:Ys||Wx(5,d);break;case 1:var b=d.stateNode;if(d.flags&4&&!Ys)if(p===null)b.componentDidMount();else{var w=d.elementType===d.type?p.memoizedProps:si(d.type,p.memoizedProps);b.componentDidUpdate(w,p.memoizedState,b.__reactInternalSnapshotBeforeUpdate)}var _=d.updateQueue;_!==null&&YS(d,_,b);break;case 3:var L=d.updateQueue;if(L!==null){if(p=null,d.child!==null)switch(d.child.tag){case 5:p=d.child.stateNode;break;case 1:p=d.child.stateNode}YS(d,L,p)}break;case 5:var B=d.stateNode;if(p===null&&d.flags&4){p=B;var H=d.memoizedProps;switch(d.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&p.focus();break;case"img":H.src&&(p.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(d.memoizedState===null){var te=d.alternate;if(te!==null){var ae=te.memoizedState;if(ae!==null){var ce=ae.dehydrated;ce!==null&&ym(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Ys||d.flags&512&&R1(d)}catch(ie){$t(d,d.return,ie)}}if(d===l){we=null;break}if(p=d.sibling,p!==null){p.return=d.return,we=p;break}we=d.return}}function YA(l){for(;we!==null;){var d=we;if(d===l){we=null;break}var p=d.sibling;if(p!==null){p.return=d.return,we=p;break}we=d.return}}function JA(l){for(;we!==null;){var d=we;try{switch(d.tag){case 0:case 11:case 15:var p=d.return;try{Wx(4,d)}catch(H){$t(d,p,H)}break;case 1:var b=d.stateNode;if(typeof b.componentDidMount=="function"){var w=d.return;try{b.componentDidMount()}catch(H){$t(d,w,H)}}var _=d.return;try{R1(d)}catch(H){$t(d,_,H)}break;case 5:var L=d.return;try{R1(d)}catch(H){$t(d,L,H)}}}catch(H){$t(d,d.return,H)}if(d===l){we=null;break}var B=d.sibling;if(B!==null){B.return=d.return,we=B;break}we=d.return}}var PL=Math.ceil,Gx=M.ReactCurrentDispatcher,L1=M.ReactCurrentOwner,_r=M.ReactCurrentBatchConfig,Qe=0,bs=null,ts=null,Rs=0,Vn=0,Bu=Ho(0),hs=0,Um=null,vc=0,qx=0,D1=0,Hm=null,An=null,O1=0,$u=1/0,Ca=null,Kx=!1,F1=null,Ko=null,Xx=!1,Xo=null,Yx=0,zm=0,B1=null,Jx=-1,Qx=0;function ln(){return(Qe&6)!==0?Xt():Jx!==-1?Jx:Jx=Xt()}function Yo(l){return(l.mode&1)===0?1:(Qe&2)!==0&&Rs!==0?Rs&-Rs:mL.transition!==null?(Qx===0&&(Qx=V5()),Qx):(l=ot,l!==0||(l=window.event,l=l===void 0?16:Z5(l.type)),l)}function ii(l,d,p,b){if(50<zm)throw zm=0,B1=null,Error(t(185));fm(l,p,b),((Qe&2)===0||l!==bs)&&(l===bs&&((Qe&2)===0&&(qx|=p),hs===4&&Jo(l,Rs)),_n(l,b),p===1&&Qe===0&&(d.mode&1)===0&&($u=Xt()+500,Ax&&Vo()))}function _n(l,d){var p=l.callbackNode;mI(l,d);var b=ox(l,l===bs?Rs:0);if(b===0)p!==null&&U5(p),l.callbackNode=null,l.callbackPriority=0;else if(d=b&-b,l.callbackPriority!==d){if(p!=null&&U5(p),d===1)l.tag===0?fL(ZA.bind(null,l)):FS(ZA.bind(null,l)),cL(function(){(Qe&6)===0&&Vo()}),p=null;else{switch(W5(b)){case 1:p=yw;break;case 4:p=H5;break;case 16:p=nx;break;case 536870912:p=z5;break;default:p=nx}p=o_(p,QA.bind(null,l))}l.callbackPriority=d,l.callbackNode=p}}function QA(l,d){if(Jx=-1,Qx=0,(Qe&6)!==0)throw Error(t(327));var p=l.callbackNode;if(Uu()&&l.callbackNode!==p)return null;var b=ox(l,l===bs?Rs:0);if(b===0)return null;if((b&30)!==0||(b&l.expiredLanes)!==0||d)d=Zx(l,b);else{d=b;var w=Qe;Qe|=2;var _=t_();(bs!==l||Rs!==d)&&(Ca=null,$u=Xt()+500,jc(l,d));do try{IL();break}catch(B){e_(l,B)}while(!0);n1(),Gx.current=_,Qe=w,ts!==null?d=0:(bs=null,Rs=0,d=hs)}if(d!==0){if(d===2&&(w=bw(l),w!==0&&(b=w,d=$1(l,w))),d===1)throw p=Um,jc(l,0),Jo(l,b),_n(l,Xt()),p;if(d===6)Jo(l,b);else{if(w=l.current.alternate,(b&30)===0&&!RL(w)&&(d=Zx(l,b),d===2&&(_=bw(l),_!==0&&(b=_,d=$1(l,_))),d===1))throw p=Um,jc(l,0),Jo(l,b),_n(l,Xt()),p;switch(l.finishedWork=w,l.finishedLanes=b,d){case 0:case 1:throw Error(t(345));case 2:Nc(l,An,Ca);break;case 3:if(Jo(l,b),(b&130023424)===b&&(d=O1+500-Xt(),10<d)){if(ox(l,0)!==0)break;if(w=l.suspendedLanes,(w&b)!==b){ln(),l.pingedLanes|=l.suspendedLanes&w;break}l.timeoutHandle=Gw(Nc.bind(null,l,An,Ca),d);break}Nc(l,An,Ca);break;case 4:if(Jo(l,b),(b&4194240)===b)break;for(d=l.eventTimes,w=-1;0<b;){var L=31-Zr(b);_=1<<L,L=d[L],L>w&&(w=L),b&=~_}if(b=w,b=Xt()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*PL(b/1960))-b,10<b){l.timeoutHandle=Gw(Nc.bind(null,l,An,Ca),b);break}Nc(l,An,Ca);break;case 5:Nc(l,An,Ca);break;default:throw Error(t(329))}}}return _n(l,Xt()),l.callbackNode===p?QA.bind(null,l):null}function $1(l,d){var p=Hm;return l.current.memoizedState.isDehydrated&&(jc(l,d).flags|=256),l=Zx(l,d),l!==2&&(d=An,An=p,d!==null&&U1(d)),l}function U1(l){An===null?An=l:An.push.apply(An,l)}function RL(l){for(var d=l;;){if(d.flags&16384){var p=d.updateQueue;if(p!==null&&(p=p.stores,p!==null))for(var b=0;b<p.length;b++){var w=p[b],_=w.getSnapshot;w=w.value;try{if(!ei(_(),w))return!1}catch{return!1}}}if(p=d.child,d.subtreeFlags&16384&&p!==null)p.return=d,d=p;else{if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function Jo(l,d){for(d&=~D1,d&=~qx,l.suspendedLanes|=d,l.pingedLanes&=~d,l=l.expirationTimes;0<d;){var p=31-Zr(d),b=1<<p;l[p]=-1,d&=~b}}function ZA(l){if((Qe&6)!==0)throw Error(t(327));Uu();var d=ox(l,0);if((d&1)===0)return _n(l,Xt()),null;var p=Zx(l,d);if(l.tag!==0&&p===2){var b=bw(l);b!==0&&(d=b,p=$1(l,b))}if(p===1)throw p=Um,jc(l,0),Jo(l,d),_n(l,Xt()),p;if(p===6)throw Error(t(345));return l.finishedWork=l.current.alternate,l.finishedLanes=d,Nc(l,An,Ca),_n(l,Xt()),null}function H1(l,d){var p=Qe;Qe|=1;try{return l(d)}finally{Qe=p,Qe===0&&($u=Xt()+500,Ax&&Vo())}}function wc(l){Xo!==null&&Xo.tag===0&&(Qe&6)===0&&Uu();var d=Qe;Qe|=1;var p=_r.transition,b=ot;try{if(_r.transition=null,ot=1,l)return l()}finally{ot=b,_r.transition=p,Qe=d,(Qe&6)===0&&Vo()}}function z1(){Vn=Bu.current,Nt(Bu)}function jc(l,d){l.finishedWork=null,l.finishedLanes=0;var p=l.timeoutHandle;if(p!==-1&&(l.timeoutHandle=-1,lL(p)),ts!==null)for(p=ts.return;p!==null;){var b=p;switch(Qw(b),b.tag){case 1:b=b.type.childContextTypes,b!=null&&kx();break;case 3:Du(),Nt(Nn),Nt(qs),u1();break;case 5:c1(b);break;case 4:Du();break;case 13:Nt(Mt);break;case 19:Nt(Mt);break;case 10:r1(b.type._context);break;case 22:case 23:z1()}p=p.return}if(bs=l,ts=l=Qo(l.current,null),Rs=Vn=d,hs=0,Um=null,D1=qx=vc=0,An=Hm=null,xc!==null){for(d=0;d<xc.length;d++)if(p=xc[d],b=p.interleaved,b!==null){p.interleaved=null;var w=b.next,_=p.pending;if(_!==null){var L=_.next;_.next=w,b.next=L}p.pending=b}xc=null}return l}function e_(l,d){do{var p=ts;try{if(n1(),Dx.current=$x,Ox){for(var b=It.memoizedState;b!==null;){var w=b.queue;w!==null&&(w.pending=null),b=b.next}Ox=!1}if(bc=0,ys=us=It=null,Lm=!1,Dm=0,L1.current=null,p===null||p.return===null){hs=1,Um=d,ts=null;break}e:{var _=l,L=p.return,B=p,H=d;if(d=Rs,B.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var te=H,ae=B,ce=ae.tag;if((ae.mode&1)===0&&(ce===0||ce===11||ce===15)){var ie=ae.alternate;ie?(ae.updateQueue=ie.updateQueue,ae.memoizedState=ie.memoizedState,ae.lanes=ie.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var ye=SA(L);if(ye!==null){ye.flags&=-257,AA(ye,L,B,_,d),ye.mode&1&&kA(_,te,d),d=ye,H=te;var je=d.updateQueue;if(je===null){var _e=new Set;_e.add(H),d.updateQueue=_e}else je.add(H);break e}else{if((d&1)===0){kA(_,te,d),V1();break e}H=Error(t(426))}}else if(Et&&B.mode&1){var Yt=SA(L);if(Yt!==null){(Yt.flags&65536)===0&&(Yt.flags|=256),AA(Yt,L,B,_,d),t1(Ou(H,B));break e}}_=H=Ou(H,B),hs!==4&&(hs=2),Hm===null?Hm=[_]:Hm.push(_),_=L;do{switch(_.tag){case 3:_.flags|=65536,d&=-d,_.lanes|=d;var X=jA(_,H,d);XS(_,X);break e;case 1:B=H;var V=_.type,J=_.stateNode;if((_.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Ko===null||!Ko.has(J)))){_.flags|=65536,d&=-d,_.lanes|=d;var pe=NA(_,B,d);XS(_,pe);break e}}_=_.return}while(_!==null)}n_(p)}catch(Ee){d=Ee,ts===p&&p!==null&&(ts=p=p.return);continue}break}while(!0)}function t_(){var l=Gx.current;return Gx.current=$x,l===null?$x:l}function V1(){(hs===0||hs===3||hs===2)&&(hs=4),bs===null||(vc&268435455)===0&&(qx&268435455)===0||Jo(bs,Rs)}function Zx(l,d){var p=Qe;Qe|=2;var b=t_();(bs!==l||Rs!==d)&&(Ca=null,jc(l,d));do try{ML();break}catch(w){e_(l,w)}while(!0);if(n1(),Qe=p,Gx.current=b,ts!==null)throw Error(t(261));return bs=null,Rs=0,hs}function ML(){for(;ts!==null;)s_(ts)}function IL(){for(;ts!==null&&!iI();)s_(ts)}function s_(l){var d=a_(l.alternate,l,Vn);l.memoizedProps=l.pendingProps,d===null?n_(l):ts=d,L1.current=null}function n_(l){var d=l;do{var p=d.alternate;if(l=d.return,(d.flags&32768)===0){if(p=AL(p,d,Vn),p!==null){ts=p;return}}else{if(p=_L(p,d),p!==null){p.flags&=32767,ts=p;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{hs=6,ts=null;return}}if(d=d.sibling,d!==null){ts=d;return}ts=d=l}while(d!==null);hs===0&&(hs=5)}function Nc(l,d,p){var b=ot,w=_r.transition;try{_r.transition=null,ot=1,LL(l,d,p,b)}finally{_r.transition=w,ot=b}return null}function LL(l,d,p,b){do Uu();while(Xo!==null);if((Qe&6)!==0)throw Error(t(327));p=l.finishedWork;var w=l.finishedLanes;if(p===null)return null;if(l.finishedWork=null,l.finishedLanes=0,p===l.current)throw Error(t(177));l.callbackNode=null,l.callbackPriority=0;var _=p.lanes|p.childLanes;if(pI(l,_),l===bs&&(ts=bs=null,Rs=0),(p.subtreeFlags&2064)===0&&(p.flags&2064)===0||Xx||(Xx=!0,o_(nx,function(){return Uu(),null})),_=(p.flags&15990)!==0,(p.subtreeFlags&15990)!==0||_){_=_r.transition,_r.transition=null;var L=ot;ot=1;var B=Qe;Qe|=4,L1.current=null,CL(l,p),qA(p,l),tL(Vw),dx=!!zw,Vw=zw=null,l.current=p,TL(p),aI(),Qe=B,ot=L,_r.transition=_}else l.current=p;if(Xx&&(Xx=!1,Xo=l,Yx=w),_=l.pendingLanes,_===0&&(Ko=null),cI(p.stateNode),_n(l,Xt()),d!==null)for(b=l.onRecoverableError,p=0;p<d.length;p++)w=d[p],b(w.value,{componentStack:w.stack,digest:w.digest});if(Kx)throw Kx=!1,l=F1,F1=null,l;return(Yx&1)!==0&&l.tag!==0&&Uu(),_=l.pendingLanes,(_&1)!==0?l===B1?zm++:(zm=0,B1=l):zm=0,Vo(),null}
vendor: 4,497 bytes, line 40
40function Uu(){if(Xo!==null){var l=W5(Yx),d=_r.transition,p=ot;try{if(_r.transition=null,ot=16>l?16:l,Xo===null)var b=!1;else{if(l=Xo,Xo=null,Yx=0,(Qe&6)!==0)throw Error(t(331));var w=Qe;for(Qe|=4,we=l.current;we!==null;){var _=we,L=_.child;if((we.flags&16)!==0){var B=_.deletions;if(B!==null){for(var H=0;H<B.length;H++){var te=B[H];for(we=te;we!==null;){var ae=we;switch(ae.tag){case 0:case 11:case 15:$m(8,ae,_)}var ce=ae.child;if(ce!==null)ce.return=ae,we=ce;else for(;we!==null;){ae=we;var ie=ae.sibling,ye=ae.return;if(HA(ae),ae===te){we=null;break}if(ie!==null){ie.return=ye,we=ie;break}we=ye}}}var je=_.alternate;if(je!==null){var _e=je.child;if(_e!==null){je.child=null;do{var Yt=_e.sibling;_e.sibling=null,_e=Yt}while(_e!==null)}}we=_}}if((_.subtreeFlags&2064)!==0&&L!==null)L.return=_,we=L;else e:for(;we!==null;){if(_=we,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:$m(9,_,_.return)}var X=_.sibling;if(X!==null){X.return=_.return,we=X;break e}we=_.return}}var V=l.current;for(we=V;we!==null;){L=we;var J=L.child;if((L.subtreeFlags&2064)!==0&&J!==null)J.return=L,we=J;else e:for(L=V;we!==null;){if(B=we,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:Wx(9,B)}}catch(Ee){$t(B,B.return,Ee)}if(B===L){we=null;break e}var pe=B.sibling;if(pe!==null){pe.return=B.return,we=pe;break e}we=B.return}}if(Qe=w,Vo(),Li&&typeof Li.onPostCommitFiberRoot=="function")try{Li.onPostCommitFiberRoot(rx,l)}catch{}b=!0}return b}finally{ot=p,_r.transition=d}}return!1}function r_(l,d,p){d=Ou(p,d),d=jA(l,d,1),l=Go(l,d,1),d=ln(),l!==null&&(fm(l,1,d),_n(l,d))}function $t(l,d,p){if(l.tag===3)r_(l,l,p);else for(;d!==null;){if(d.tag===3){r_(d,l,p);break}else if(d.tag===1){var b=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(Ko===null||!Ko.has(b))){l=Ou(p,l),l=NA(d,l,1),d=Go(d,l,1),l=ln(),d!==null&&(fm(d,1,l),_n(d,l));break}}d=d.return}}function DL(l,d,p){var b=l.pingCache;b!==null&&b.delete(d),d=ln(),l.pingedLanes|=l.suspendedLanes&p,bs===l&&(Rs&p)===p&&(hs===4||hs===3&&(Rs&130023424)===Rs&&500>Xt()-O1?jc(l,0):D1|=p),_n(l,d)}function i_(l,d){d===0&&((l.mode&1)===0?d=1:(d=ax,ax<<=1,(ax&130023424)===0&&(ax=4194304)));var p=ln();l=Aa(l,d),l!==null&&(fm(l,d,p),_n(l,p))}function OL(l){var d=l.memoizedState,p=0;d!==null&&(p=d.retryLane),i_(l,p)}function FL(l,d){var p=0;switch(l.tag){case 13:var b=l.stateNode,w=l.memoizedState;w!==null&&(p=w.retryLane);break;case 19:b=l.stateNode;break;default:throw Error(t(314))}b!==null&&b.delete(d),i_(l,p)}var a_;a_=function(l,d,p){if(l!==null)if(l.memoizedProps!==d.pendingProps||Nn.current)Sn=!0;else{if((l.lanes&p)===0&&(d.flags&128)===0)return Sn=!1,SL(l,d,p);Sn=(l.flags&131072)!==0}else Sn=!1,Et&&(d.flags&1048576)!==0&&BS(d,Ex,d.index);switch(d.lanes=0,d.tag){case 2:var b=d.type;zx(l,d),l=d.pendingProps;var w=Cu(d,qs.current);Lu(d,p),w=m1(null,d,b,l,w,p);var _=p1();return d.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,kn(b)?(_=!0,Sx(d)):_=!1,d.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,o1(d),w.updater=Ux,d.stateNode=w,w._reactInternals=d,w1(d,b,l,p),d=S1(null,d,b,!0,_,p)):(d.tag=0,Et&&_&&Jw(d),on(null,d,w,p),d=d.child),d;case 16:b=d.elementType;e:{switch(zx(l,d),l=d.pendingProps,w=b._init,b=w(b._payload),d.type=b,w=d.tag=$L(b),l=si(b,l),w){case 0:d=k1(null,d,b,l,p);break e;case 1:d=RA(null,d,b,l,p);break e;case 11:d=_A(null,d,b,l,p);break e;case 14:d=EA(null,d,b,si(b.type,l),p);break e}throw Error(t(306,b,""))}return d;case 0:return b=d.type,w=d.pendingProps,w=d.elementType===b?w:si(b,w),k1(l,d,b,w,p);case 1:return b=d.type,w=d.pendingProps,w=d.elementType===b?w:si(b,w),RA(l,d,b,w,p);case 3:e:{if(MA(d),l===null)throw Error(t(387));b=d.pendingProps,_=d.memoizedState,w=_.element,KS(l,d),Ix(d,b,null,p);var L=d.memoizedState;if(b=L.element,_.isDehydrated)if(_={element:b,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},d.updateQueue.baseState=_,d.memoizedState=_,d.flags&256){w=Ou(Error(t(423)),d),d=IA(l,d,b,p,w);break e}else if(b!==w){w=Ou(Error(t(424)),d),d=IA(l,d,b,p,w);break e}else for(zn=Uo(d.stateNode.containerInfo.firstChild),Hn=d,Et=!0,ti=null,p=GS(d,null,b,p),d.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Ru(),b===w){d=Ea(l,d,p);break e}on(l,d,b,p)}d=d.child}return d;case 5:return JS(d),l===null&&e1(d),b=d.type,w=d.pendingProps,_=l!==null?l.memoizedProps:null,
vendor: 11,735 bytes, line 40
40L=w.children,Ww(b,w)?L=null:_!==null&&Ww(b,_)&&(d.flags|=32),PA(l,d),on(l,d,L,p),d.child;case 6:return l===null&&e1(d),null;case 13:return LA(l,d,p);case 4:return l1(d,d.stateNode.containerInfo),b=d.pendingProps,l===null?d.child=Mu(d,null,b,p):on(l,d,b,p),d.child;case 11:return b=d.type,w=d.pendingProps,w=d.elementType===b?w:si(b,w),_A(l,d,b,w,p);case 7:return on(l,d,d.pendingProps,p),d.child;case 8:return on(l,d,d.pendingProps.children,p),d.child;case 12:return on(l,d,d.pendingProps.children,p),d.child;case 10:e:{if(b=d.type._context,w=d.pendingProps,_=d.memoizedProps,L=w.value,yt(Px,b._currentValue),b._currentValue=L,_!==null)if(ei(_.value,L)){if(_.children===w.children&&!Nn.current){d=Ea(l,d,p);break e}}else for(_=d.child,_!==null&&(_.return=d);_!==null;){var B=_.dependencies;if(B!==null){L=_.child;for(var H=B.firstContext;H!==null;){if(H.context===b){if(_.tag===1){H=_a(-1,p&-p),H.tag=2;var te=_.updateQueue;if(te!==null){te=te.shared;var ae=te.pending;ae===null?H.next=H:(H.next=ae.next,ae.next=H),te.pending=H}}_.lanes|=p,H=_.alternate,H!==null&&(H.lanes|=p),i1(_.return,p,d),B.lanes|=p;break}H=H.next}}else if(_.tag===10)L=_.type===d.type?null:_.child;else if(_.tag===18){if(L=_.return,L===null)throw Error(t(341));L.lanes|=p,B=L.alternate,B!==null&&(B.lanes|=p),i1(L,p,d),L=_.sibling}else L=_.child;if(L!==null)L.return=_;else for(L=_;L!==null;){if(L===d){L=null;break}if(_=L.sibling,_!==null){_.return=L.return,L=_;break}L=L.return}_=L}on(l,d,w.children,p),d=d.child}return d;case 9:return w=d.type,b=d.pendingProps.children,Lu(d,p),w=Sr(w),b=b(w),d.flags|=1,on(l,d,b,p),d.child;case 14:return b=d.type,w=si(b,d.pendingProps),w=si(b.type,w),EA(l,d,b,w,p);case 15:return CA(l,d,d.type,d.pendingProps,p);case 17:return b=d.type,w=d.pendingProps,w=d.elementType===b?w:si(b,w),zx(l,d),d.tag=1,kn(b)?(l=!0,Sx(d)):l=!1,Lu(d,p),vA(d,b,w),w1(d,b,w,p),S1(null,d,b,!0,l,p);case 19:return OA(l,d,p);case 22:return TA(l,d,p)}throw Error(t(156,d.tag))};function o_(l,d){return $5(l,d)}function BL(l,d,p,b){this.tag=l,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Er(l,d,p,b){return new BL(l,d,p,b)}function W1(l){return l=l.prototype,!(!l||!l.isReactComponent)}function $L(l){if(typeof l=="function")return W1(l)?1:0;if(l!=null){if(l=l.$$typeof,l===re)return 11;if(l===fe)return 14}return 2}function Qo(l,d){var p=l.alternate;return p===null?(p=Er(l.tag,d,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=d,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&14680064,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,d=l.dependencies,p.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p}function ey(l,d,p,b,w,_){var L=2;if(b=l,typeof l=="function")W1(l)&&(L=1);else if(typeof l=="string")L=5;else e:switch(l){case F:return kc(p.children,w,_,d);case D:L=8,w|=8;break;case O:return l=Er(12,p,d,w|2),l.elementType=O,l.lanes=_,l;case he:return l=Er(13,p,d,w),l.elementType=he,l.lanes=_,l;case de:return l=Er(19,p,d,w),l.elementType=de,l.lanes=_,l;case le:return ty(p,w,_,d);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case $:L=10;break e;case z:L=9;break e;case re:L=11;break e;case fe:L=14;break e;case oe:L=16,b=null;break e}throw Error(t(130,l==null?l:typeof l,""))}return d=Er(L,p,d,w),d.elementType=l,d.type=b,d.lanes=_,d}function kc(l,d,p,b){return l=Er(7,l,b,d),l.lanes=p,l}function ty(l,d,p,b){return l=Er(22,l,b,d),l.elementType=le,l.lanes=p,l.stateNode={isHidden:!1},l}function G1(l,d,p){return l=Er(6,l,null,d),l.lanes=p,l}function q1(l,d,p){return d=Er(4,l.children!==null?l.children:[],l.key,d),d.lanes=p,d.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},d}function UL(l,d,p,b,w){this.tag=d,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vw(0),this.expirationTimes=vw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vw(0),this.identifierPrefix=b,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function K1(l,d,p,b,w,_,L,B,H){return l=new UL(l,d,p,B,H),d===1?(d=1,_===!0&&(d|=8)):d=0,_=Er(3,null,null,d),l.current=_,_.stateNode=l,_.memoizedState={element:b,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},o1(_),l}function HL(l,d,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:b==null?null:""+b,children:l,containerInfo:d,implementation:p}}function l_(l){if(!l)return zo;l=l._reactInternals;e:{if(hc(l)!==l||l.tag!==1)throw Error(t(170));var d=l;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(kn(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(t(171))}if(l.tag===1){var p=l.type;if(kn(p))return DS(l,p,d)}return d}function c_(l,d,p,b,w,_,L,B,H){return l=K1(p,b,!0,l,w,_,L,B,H),l.context=l_(null),p=l.current,b=ln(),w=Yo(p),_=_a(b,w),_.callback=d??null,Go(p,_,w),l.current.lanes=w,fm(l,w,b),_n(l,b),l}function sy(l,d,p,b){var w=d.current,_=ln(),L=Yo(w);return p=l_(p),d.context===null?d.context=p:d.pendingContext=p,d=_a(_,L),d.payload={element:l},b=b===void 0?null:b,b!==null&&(d.callback=b),l=Go(w,d,L),l!==null&&(ii(l,w,L,_),Mx(l,w,L)),L}function ny(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function d_(l,d){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var p=l.retryLane;l.retryLane=p!==0&&p<d?p:d}}function X1(l,d){d_(l,d),(l=l.alternate)&&d_(l,d)}function zL(){return null}var u_=typeof reportError=="function"?reportError:function(l){console.error(l)};function Y1(l){this._internalRoot=l}ry.prototype.render=Y1.prototype.render=function(l){var d=this._internalRoot;if(d===null)throw Error(t(409));sy(l,d,null,null)},ry.prototype.unmount=Y1.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var d=l.containerInfo;wc(function(){sy(null,l,null,null)}),d[ja]=null}};function ry(l){this._internalRoot=l}ry.prototype.unstable_scheduleHydration=function(l){if(l){var d=K5();l={blockedOn:null,target:l,priority:d};for(var p=0;p<Fo.length&&d!==0&&d<Fo[p].priority;p++);Fo.splice(p,0,l),p===0&&J5(l)}};function J1(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function iy(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function h_(){}function VL(l,d,p,b,w){if(w){if(typeof b=="function"){var _=b;b=function(){var te=ny(L);_.call(te)}}var L=c_(d,b,l,0,null,!1,!1,"",h_);return l._reactRootContainer=L,l[ja]=L.current,_m(l.nodeType===8?l.parentNode:l),wc(),L}for(;w=l.lastChild;)l.removeChild(w);if(typeof b=="function"){var B=b;b=function(){var te=ny(H);B.call(te)}}var H=K1(l,0,!1,null,null,!1,!1,"",h_);return l._reactRootContainer=H,l[ja]=H.current,_m(l.nodeType===8?l.parentNode:l),wc(function(){sy(d,H,p,b)}),H}function ay(l,d,p,b,w){var _=p._reactRootContainer;if(_){var L=_;if(typeof w=="function"){var B=w;w=function(){var H=ny(L);B.call(H)}}sy(d,L,l,w)}else L=VL(p,d,l,w,b);return ny(L)}G5=function(l){switch(l.tag){case 3:var d=l.stateNode;if(d.current.memoizedState.isDehydrated){var p=hm(d.pendingLanes);p!==0&&(ww(d,p|1),_n(d,Xt()),(Qe&6)===0&&($u=Xt()+500,Vo()))}break;case 13:wc(function(){var b=Aa(l,1);if(b!==null){var w=ln();ii(b,l,1,w)}}),X1(l,1)}},jw=function(l){if(l.tag===13){var d=Aa(l,134217728);if(d!==null){var p=ln();ii(d,l,134217728,p)}X1(l,134217728)}},q5=function(l){if(l.tag===13){var d=Yo(l),p=Aa(l,d);if(p!==null){var b=ln();ii(p,l,d,b)}X1(l,d)}},K5=function(){return ot},X5=function(l,d){var p=ot;try{return ot=l,d()}finally{ot=p}},mw=function(l,d,p){switch(d){case"input":if(aw(l,p),d=p.name,p.type==="radio"&&d!=null){for(p=l;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll("input[name="+JSON.stringify(""+d)+'][type="radio"]'),d=0;d<p.length;d++){var b=p[d];if(b!==l&&b.form===l.form){var w=Nx(b);if(!w)throw Error(t(90));Ii(b),aw(b,w)}}}break;case"textarea":k5(l,p);break;case"select":d=p.value,d!=null&&xu(l,!!p.multiple,d,!1)}},M5=H1,I5=wc;var WL={usingClientEntryPoint:!1,Events:[Tm,_u,Nx,P5,R5,H1]},Vm={findFiberByHostInstance:fc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},GL={bundleType:Vm.bundleType,version:Vm.version,rendererPackageName:Vm.rendererPackageName,rendererConfig:Vm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=F5(l),l===null?null:l.stateNode},findFiberByHostInstance:Vm.findFiberByHostInstance||zL,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 oy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oy.isDisabled&&oy.supportsFiber)try{rx=oy.inject(GL),Li=oy}catch{}}return En.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WL,En.createPortal=function(l,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!J1(d))throw Error(t(200));return HL(l,d,null,p)},En.createRoot=function(l,d){if(!J1(l))throw Error(t(299));var p=!1,b="",w=u_;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(b=d.identifierPrefix),d.onRecoverableError!==void 0&&(w=d.onRecoverableError)),d=K1(l,1,!1,null,null,p,!1,b,w),l[ja]=d.current,_m(l.nodeType===8?l.parentNode:l),new Y1(d)},En.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var d=l._reactInternals;if(d===void 0)throw typeof l.render=="function"?Error(t(188)):(l=Object.keys(l).join(","),Error(t(268,l)));return l=F5(d),l=l===null?null:l.stateNode,l},En.flushSync=function(l){return wc(l)},En.hydrate=function(l,d,p){if(!iy(d))throw Error(t(200));return ay(null,l,d,!0,p)},En.hydrateRoot=function(l,d,p){if(!J1(l))throw Error(t(405));var b=p!=null&&p.hydratedSources||null,w=!1,_="",L=u_;if(p!=null&&(p.unstable_strictMode===!0&&(w=!0),p.identifierPrefix!==void 0&&(_=p.identifierPrefix),p.onRecoverableError!==void 0&&(L=p.onRecoverableError)),d=c_(d,null,l,1,p??null,w,!1,_,L),l[ja]=d.current,_m(l),b)for(l=0;l<b.length;l++)p=b[l],w=p._getVersion,w=w(p._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[p,w]:d.mutableSourceEagerHydrationData.push(p,w);return new ry(d)},En.render=function(l,d,p){if(!iy(d))throw Error(t(200));return ay(null,l,d,!1,p)},En.unmountComponentAtNode=function(l){if(!iy(l))throw Error(t(40));return l._reactRootContainer?(wc(function(){ay(null,null,l,!1,function(){l._reactRootContainer=null,l[ja]=null})}),!0):!1},En.unstable_batchedUpdates=H1,En.unstable_renderSubtreeIntoContainer=function(l,d,p,b){if(!iy(p))throw Error(t(200));if(l==null||l._reactInternals===void 0)throw Error(t(38));return ay(l,d,p,!1,b)}
40,En.version="18.3.1-next-f1338f8080-20240426",En}var w_;function $3(){if(w_)return t2.exports;w_=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),t2.exports=tD(),t2.exports}var j_;function sD(){if(j_)return ly;j_=1;var r=$3();return ly.createRoot=r.createRoot,ly.hydrateRoot=r.hydrateRoot,ly}var nD=sD();/** 41 * react-router v7.14.2 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */var N_="popstate";function k_(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function rD(r={}){function e(s,i){var f;let a=(f=i.state)==null?void 0:f.masked,{pathname:o,search:c,hash:h}=a||s.location;return U2("",{pathname:o,search:c,hash:h},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function t(s,i){return typeof i=="string"?i:Fp(i)}return aD(e,t,null,r)}function Rt(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function Xr(r,e){if(!r){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function iD(){return Math.random().toString(36).substring(2,10)}function S_(r,e){return{usr:r.state,key:r.key,idx:e,masked:r.unstable_mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function U2(r,e,t=null,s,i){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof e=="string"?Yf(e):e,state:t,key:e&&e.key||s||iD(),unstable_mask:i}}function Fp({pathname:r="/",search:e="",hash:t=""}){return e&&e!=="?"&&(r+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(r+=t.charAt(0)==="#"?t:"#"+t),r}function Yf(r){let e={};if(r){let t=r.indexOf("#");t>=0&&(e.hash=r.substring(t),r=r.substring(0,t));let s=r.indexOf("?");s>=0&&(e.search=r.substring(s),r=r.substring(0,s)),r&&(e.pathname=r)}return e}function aD(r,e,t,s={}){let{window:i=document.defaultView,v5Compat:a=!1}=s,o=i.history,c="POP",h=null,f=m();f==null&&(f=0,o.replaceState({...o.state,idx:f},""));function m(){return(o.state||{idx:null}).idx}function g(){c="POP";let N=m(),S=N==null?null:N-f;f=N,h&&h({action:c,location:j.location,delta:S})}function x(N,S){c="PUSH";let A=k_(N)?N:U2(j.location,N,S);f=m()+1;let E=S_(A,f),M=j.createHref(A.unstable_mask||A);try{o.pushState(E,"",M)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(M)}a&&h&&h({action:c,location:j.location,delta:1})}function y(N,S){c="REPLACE";let A=k_(N)?N:U2(j.location,N,S);f=m();let E=S_(A,f),M=j.createHref(A.unstable_mask||A);o.replaceState(E,"",M),a&&h&&h({action:c,location:j.location,delta:0})}function v(N){return oD(N)}let j={get action(){return c},get location(){return r(i,o)},listen(N){if(h)throw new Error("A history only accepts one active listener");return i.addEventListener(N_,g),h=N,()=>{i.removeEventListener(N_,g),h=null}},createHref(N){return e(i,N)},createURL:v,encodeLocation(N){let S=v(N);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:x,replace:y,go(N){return o.go(N)}};return j}function oD(r,e=!1){let t="http://localhost";
49typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),Rt(t,"No window.location.(origin|href) available to create URL");let s=typeof r=="string"?r:Fp(r);return s=s.replace(/ $/,"%20"),!e&&s.startsWith("//")&&(s=t+s),new URL(s,t)}function U3(r,e,t="/"){return lD(r,e,t,!1)}function lD(r,e,t,s){let i=typeof e=="string"?Yf(e):e,a=To(i.pathname||"/",t);if(a==null)return null;let o=H3(r);cD(o);let c=null;for(let h=0;c==null&&h<o.length;++h){let f=vD(a);c=yD(o[h],f,s)}return c}function H3(r,e=[],t=[],s="",i=!1){let a=(o,c,h=i,f)=>{let m={relativePath:f===void 0?o.path||"":f,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(s)&&h)return;Rt(m.relativePath.startsWith(s),`Absolute route path "${m.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(s.length)}let g=Ti([s,m.relativePath]),x=t.concat(m);o.children&&o.children.length>0&&(Rt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),H3(o.children,e,x,g,h)),!(o.path==null&&!o.index)&&e.push({path:g,score:gD(g,o.index),routesMeta:x})};return r.forEach((o,c)=>{var h;if(o.path===""||!((h=o.path)!=null&&h.includes("?")))a(o,c);else for(let f of z3(o.path))a(o,c,!0,f)}),e}function z3(r){let e=r.split("/");if(e.length===0)return[];let[t,...s]=e,i=t.endsWith("?"),a=t.replace(/\?$/,"");if(s.length===0)return i?[a,""]:[a];let o=z3(s.join("/")),c=[];return c.push(...o.map(h=>h===""?a:[a,h].join("/"))),i&&c.push(...o),c.map(h=>r.startsWith("/")&&h===""?"/":h)}function cD(r){r.sort((e,t)=>e.score!==t.score?t.score-e.score:xD(e.routesMeta.map(s=>s.childrenIndex),t.routesMeta.map(s=>s.childrenIndex)))}var dD=/^:[\w-]+$/,uD=3,hD=2,fD=1,mD=10,pD=-2,A_=r=>r==="*";function gD(r,e){let t=r.split("/"),s=t.length;return t.some(A_)&&(s+=pD),e&&(s+=hD),t.filter(i=>!A_(i)).reduce((i,a)=>i+(dD.test(a)?uD:a===""?fD:mD),s)}function xD(r,e){return r.length===e.length&&r.slice(0,-1).every((s,i)=>s===e[i])?r[r.length-1]-e[e.length-1]:0}function yD(r,e,t=!1){let{routesMeta:s}=r,i={},a="/",o=[];for(let c=0;c<s.length;++c){let h=s[c],f=c===s.length-1,m=a==="/"?e:e.slice(a.length)||"/",g=Cb({path:h.relativePath,caseSensitive:h.caseSensitive,end:f},m),x=h.route;if(!g&&f&&t&&!s[s.length-1].route.index&&(g=Cb({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},m)),!g)return null;
49Object.assign(i,g.params),o.push({params:i,pathname:Ti([a,g.pathname]),pathnameBase:kD(Ti([a,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(a=Ti([a,g.pathnameBase]))}return o}function Cb(r,e){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[t,s]=bD(r.path,r.caseSensitive,r.end),i=e.match(t);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:s.reduce((f,{paramName:m,isOptional:g},x)=>{if(m==="*"){let v=c[x]||"";o=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const y=c[x];return g&&!y?f[m]=void 0:f[m]=(y||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:o,pattern:r}}function bD(r,e=!1,t=!0){Xr(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let s=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,h,f,m)=>{if(s.push({paramName:c,isOptional:h!=null}),h){let g=m.charAt(f+o.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(s.push({paramName:"*"}),i+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":r!==""&&r!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),s]}function vD(r){try{return r.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Xr(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),r}}function To(r,e){if(e==="/")return r;if(!r.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,s=r.charAt(t);return s&&s!=="/"?null:r.slice(t)||"/"}var wD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function jD(r,e="/"){let{pathname:t,search:s="",hash:i=""}=typeof r=="string"?Yf(r):r,a;return t?(t=V3(t),t.startsWith("/")?a=__(t.substring(1),"/"):a=__(t,e)):a=e,{pathname:a,search:SD(s),hash:AD(i)}}function __(r,e){let t=Tb(e).split("/");return r.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function r2(r,e,t,s){return`Cannot include a '${r}' character in a manually specified \`to.${e}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ND(r){return r.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function dk(r){let e=ND(r);return e.map((t,s)=>s===e.length-1?t.pathname:t.pathnameBase)}function Tv(r,e,t,s=!1){let i;typeof r=="string"?i=Yf(r):(i={...r},Rt(!i.pathname||!i.pathname.includes("?"),r2("?","pathname","search",i)),Rt(!i.pathname||!i.pathname.includes("#"),r2("#","pathname","hash",i)),Rt(!i.search||!i.search.includes("#"),r2("#","search","hash",i)));let a=r===""||i.pathname==="",o=a?"/":i.pathname,c;if(o==null)c=t;else{let g=e.length-1;if(!s&&o.startsWith("..")){let x=o.split("/");for(;x[0]==="..";)x.shift(),g-=1;i.pathname=x.join("/")}c=g>=0?e[g]:"/"}let h=jD(i,c),f=o&&o!=="/"&&o.endsWith("/"),m=(a||o===".")&&t.endsWith("/");return!h.pathname.endsWith("/")&&(f||m)&&(h.pathname+="/"),h}var V3=r=>r.replace(/\/\/+/g,"/"),Ti=r=>V3(r.join("/")),Tb=r=>r.replace(/\/+$/,""),kD=r=>Tb(r).replace(/^\/*/,"/"),SD=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,AD=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,_D=class{constructor(r,e,t,s=!1){this.status=r,this.statusText=e||"",this.internal=s,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function ED(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function CD(r){let e=r.map(t=>t.route.path).filter(Boolean);return Ti(e)||"/"}var W3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function G3(r,e){let t=r;if(typeof t!="string"||!wD.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let s=t,i=!1;if(W3)try{let a=new URL(window.location.href),o=t.startsWith("//")?new URL(a.protocol+t):new URL(t),c=To(o.pathname,e);
49o.origin===a.origin&&c!=null?t=c+o.search+o.hash:i=!0}catch{Xr(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:i,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var q3=["POST","PUT","PATCH","DELETE"];new Set(q3);var TD=["GET",...q3];new Set(TD);var Jf=T.createContext(null);Jf.displayName="DataRouter";var Pv=T.createContext(null);Pv.displayName="DataRouterState";var K3=T.createContext(!1);function PD(){return T.useContext(K3)}var X3=T.createContext({isTransitioning:!1});X3.displayName="ViewTransition";var RD=T.createContext(new Map);RD.displayName="Fetchers";var MD=T.createContext(null);MD.displayName="Await";var wr=T.createContext(null);wr.displayName="Navigation";var U0=T.createContext(null);U0.displayName="Location";var Qr=T.createContext({outlet:null,matches:[],isDataRoute:!1});Qr.displayName="Route";var uk=T.createContext(null);uk.displayName="RouteError";var Y3="REACT_ROUTER_ERROR",ID="REDIRECT",LD="ROUTE_ERROR_RESPONSE";function DD(r){if(r.startsWith(`${Y3}:${ID}:{`))try{let e=JSON.parse(r.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function OD(r){if(r.startsWith(`${Y3}:${LD}:{`))try{let e=JSON.parse(r.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new _D(e.status,e.statusText,e.data)}catch{}}function FD(r,{relative:e}={}){Rt(Qf(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:s}=T.useContext(wr),{hash:i,pathname:a,search:o}=H0(r,{relative:e}),c=a;return t!=="/"&&(c=a==="/"?t:Ti([t,a])),s.createHref({pathname:c,search:o,hash:i})}function Qf(){return T.useContext(U0)!=null}function Kt(){return Rt(Qf(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(U0).location}var J3="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Q3(r){T.useContext(wr).static||T.useLayoutEffect(r)}function Zf(){let{isDataRoute:r}=T.useContext(Qr);return r?ZD():BD()}function BD(){Rt(Qf(),"useNavigate() may be used only in the context of a <Router> component.");let r=T.useContext(Jf),{basename:e,navigator:t}=T.useContext(wr),{matches:s}=T.useContext(Qr),{pathname:i}=Kt(),a=JSON.stringify(dk(s)),o=T.useRef(!1);return Q3(()=>{o.current=!0}),T.useCallback((h,f={})=>{if(Xr(o.current,J3),!o.current)return;if(typeof h=="number"){t.go(h);return}let m=Tv(h,JSON.parse(a),i,f.relative==="path");r==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:Ti([e,m.pathname])),(f.replace?t.replace:t.push)(m,f.state,f)},[e,t,a,i,r])}var $D=T.createContext(null);function UD(r){let e=T.useContext(Qr).outlet;return T.useMemo(()=>e&&T.createElement($D.Provider,{value:r},e),[e,r])}function Z3(){let{matches:r}=T.useContext(Qr),e=r[r.length-1];return(e==null?void 0:e.params)??{}}function H0(r,{relative:e}={}){let{matches:t}=T.useContext(Qr),{pathname:s}=Kt(),i=JSON.stringify(dk(t));return T.useMemo(()=>Tv(r,JSON.parse(i),s,e==="path"),[r,i,s,e])}function HD(r,e){return eT(r,e)}function eT(r,e,t){var N;Rt(Qf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=T.useContext(wr),{matches:i}=T.useContext(Qr),a=i[i.length-1],o=a?a.params:{},c=a?a.pathname:"/",h=a?a.pathnameBase:"/",f=a&&a.route;{let S=f&&f.path||"";sT(c,!f||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 50 51Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let m=Kt(),g;if(e){let S=typeof e=="string"?Yf(e):e;Rt(h==="/"||((N=S.pathname)==null?void 0:N.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${S.pathname}" was given in the \`location\` prop.`),g=S}else g=m;let x=g.pathname||"/",y=x;if(h!=="/"){let S=h.replace(/^\//,"").split("/");y="/"+x.replace(/^\//,"").split("/").slice(S.length).join("/")}let v=U3(r,{pathname:y});Xr(f||v!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Xr(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let j=qD(v&&v.map(S=>Object.assign({},S,{params:Object.assign({},o,S.params),pathname:Ti([h,s.encodeLocation?s.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:Ti([h,s.encodeLocation?s.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,t);return e&&j?T.createElement(U0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},j):j}function zD(){let r=QD(),e=ED(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),t=r instanceof Error?r.stack:null,s="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:s},a={padding:"2px 4px",backgroundColor:s},o=null;return console.error("Error handled by React Router default ErrorBoundary:",r),o=T.createElement(T.Fragment,null,T.createElement("p",null,"ð¿ Hey developer ð"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:a},"ErrorBoundary")," or"," ",T.createElement("code",{style:a},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application
51Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},e),t?T.createElement("pre",{style:i},t):null,o)}var VD=T.createElement(zD,null),tT=class extends T.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,e){return e.location!==r.location||e.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:e.error,location:e.location,revalidation:r.revalidation||e.revalidation}}componentDidCatch(r,e){this.props.onError?this.props.onError(r,e):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const t=OD(r.digest);t&&(r=t)}let e=r!==void 0?T.createElement(Qr.Provider,{value:this.props.routeContext},T.createElement(uk.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?T.createElement(WD,{error:r},e):e}};tT.contextType=K3;var i2=new WeakMap;function WD({children:r,error:e}){let{basename:t}=T.useContext(wr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let s=DD(e.digest);if(s){let i=i2.get(e);if(i)throw i;let a=G3(s.location,t);if(W3&&!i2.get(e))if(a.isExternal||s.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:s.replace}));throw i2.set(e,o),o}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return r}function GD({routeContext:r,match:e,children:t}){let s=T.useContext(Jf);return s&&s.static&&s.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=e.route.id),T.createElement(Qr.Provider,{value:r},t)}function qD(r,e=[],t){let s=t==null?void 0:t.state;if(r==null){if(!s)return null;if(s.errors)r=s.matches;else if(e.length===0&&!s.initialized&&s.matches.length>0)r=s.matches;else return null}let i=r,a=s==null?void 0:s.errors;if(a!=null){let m=i.findIndex(g=>g.route.id&&(a==null?void 0:a[g.route.id])!==void 0);Rt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,m+1))}let o=!1,c=-1;if(t&&s){o=s.renderFallback;for(let m=0;m<i.length;m++){let g=i[m];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(c=m),g.route.id){let{loaderData:x,errors:y}=s,v=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!y||y[g.route.id]===void 0);if(g.route.lazy||v){t.isStatic&&(o=!0),c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}}let h=t==null?void 0:t.onError,f=s&&h?(m,g)=>{var x,y;h(m,{location:s.location,params:((y=(x=s.matches)==null?void 0:x[0])==null?void 0:y.params)??{},unstable_pattern:CD(s.matches),errorInfo:g})}:void 0;return i.reduceRight((m,g,x)=>{let y,v=!1,j=null,N=null;s&&(y=a&&g.route.id?a[g.route.id]:void 0,j=g.route.errorElement||VD,o&&(c<0&&x===0?(sT("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,N=null):c===x&&(v=!0,N=g.route.hydrateFallbackElement||null)));let S=e.concat(i.slice(0,x+1)),A=()=>{let E;return y?E=j:v?E=N:g.route.Component?E=T.createElement(g.route.Component,null):g.route.element?E=g.route.element:E=m,T.createElement(GD,{match:g,routeContext:{outlet:m,matches:S,isDataRoute:s!=null},children:E})};return s&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?T.createElement(tT,{location:s.location,revalidation:s.revalidation,component:j,error:y,children:A(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:f}):A()},null)}function hk(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function KD(r){let e=T.useContext(Jf);return Rt(e,hk(r)),e}function XD(r){let e=T.useContext(Pv);return Rt(e,hk(r)),e}function YD(r){let e=T.useContext(Qr);return Rt(e,hk(r)),e}function fk(r){let e=YD(r),t=e.matches[e.matches.length-1];return Rt(t.route.id,`${r} can only be used on routes that contain a unique "id"`),t.route.id}function JD(){return fk("useRouteId")}function QD(){var s;let r=T.useContext(uk),e=XD("useRouteError"),t=fk("useRouteError");return r!==void 0?r:(s=e.errors)==null?void 0:s[t]}function ZD(){let{router:r}=KD("useNavigate"),e=fk("useNavigate"),t=T.useRef(!1);return Q3(()=>{t.current=!0}),T.useCallback(async(i,a={})=>{Xr(t.current,J3),t.current&&(typeof i=="number"?await r.navigate(i):await r.navigate(i,{fromRouteId:e,...a}))},[r,e])}var E_={};function sT(r,e,t){!e&&!E_[r]&&(E_[r]=!0,Xr(!1,t))}T.memo(e6);function e6({routes:r,future:e,state:t,isStatic:s,onError:i}){return eT(r,void 0,{state:t,isStatic:s,onError:i})}function H2({to:r,replace:e,state:t,relative:s}){Rt(Qf(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=T.useContext(wr);Xr(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=T.useContext(Qr),{pathname:o}=Kt(),c=Zf(),h=Tv(r,dk(a),o,s==="path"),f=JSON.stringify(h);return T.useEffect(()=>{c(JSON.parse(f),{replace:e,state:t,relative:s})},[c,f,s,e,t]),null}function t6(r){return UD(r.context)}function Te(r){Rt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function s6({basename:r="/",children:e=null,location:t,navigationType:s="POP",navigator:i,static:a=!1,unstable_useTransitions:o}){Rt(!Qf(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=r.replace(/^\/*/,"/"),h=T.useMemo(()=>({basename:c,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[c,i,a,o]);typeof t=="string"&&(t=Yf(t));let{pathname:f="/",search:m="",hash:g="",state:x=null,key:y="default",unstable_mask:v}=t,j=T.useMemo(()=>{let N=To(f,c);return N==null?null:{location:{pathname:N,search:m,hash:g,state:x,key:y,unstable_mask:v},navigationType:s}},[c,f,m,g,x,y,s,v]);
51return Xr(j!=null,`<Router basename="${c}"> is not able to match the URL "${f}${m}${g}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:T.createElement(wr.Provider,{value:h},T.createElement(U0.Provider,{children:e,value:j}))}function n6({children:r,location:e}){return HD(z2(r),e)}function z2(r,e=[]){let t=[];return T.Children.forEach(r,(s,i)=>{if(!T.isValidElement(s))return;let a=[...e,i];if(s.type===T.Fragment){t.push.apply(t,z2(s.props.children,a));return}Rt(s.type===Te,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Rt(!s.props.index||!s.props.children,"An index route cannot have child routes.");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,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||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=z2(s.props.children,a)),t.push(o)}),t}var Ly="get",Dy="application/x-www-form-urlencoded";function Rv(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function r6(r){return Rv(r)&&r.tagName.toLowerCase()==="button"}function i6(r){return Rv(r)&&r.tagName.toLowerCase()==="form"}function a6(r){return Rv(r)&&r.tagName.toLowerCase()==="input"}function o6(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function l6(r,e){return r.button===0&&(!e||e==="_self")&&!o6(r)}function V2(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((e,t)=>{let s=r[t];return e.concat(Array.isArray(s)?s.map(i=>[t,i]):[[t,s]])},[]))}function c6(r,e){let t=V2(r);return e&&e.forEach((s,i)=>{t.has(i)||e.getAll(i).forEach(a=>{t.append(i,a)})}),t}var cy=null;function d6(){if(cy===null)try{new FormData(document.createElement("form"),0),cy=!1}catch{cy=!0}return cy}var u6=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function a2(r){return r!=null&&!u6.has(r)?(Xr(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Dy}"`),null):r}function h6(r,e){let t,s,i,a,o;if(i6(r)){let c=r.getAttribute("action");s=c?To(c,e):null,t=r.getAttribute("method")||Ly,i=a2(r.getAttribute("enctype"))||Dy,a=new FormData(r)}else if(r6(r)||a6(r)&&(r.type==="submit"||r.type==="image")){let c=r.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=r.getAttribute("formaction")||c.getAttribute("action");if(s=h?To(h,e):null,t=r.getAttribute("formmethod")||c.getAttribute("method")||Ly,i=a2(r.getAttribute("formenctype"))||a2(c.getAttribute("enctype"))||Dy,a=new FormData(c,r),!d6()){let{name:f,type:m,value:g}=r;if(m==="image"){let x=f?`${f}.`:"";a.append(`${x}x`,"0"),a.append(`${x}y`,"0")}else f&&a.append(f,g)}}else{if(Rv(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=Ly,s=null,i=Dy,o=r}return a&&i==="text/plain"&&(o=a,a=void 0),{action:s,method:t.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function mk(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function nT(r,e,t,s){let i=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return t?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${s}`:i.pathname=`${i.pathname}.${s}`:i.pathname==="/"?i.pathname=`_root.${s}`:e&&To(i.pathname,e)==="/"?i.pathname=`${Tb(e)}/_root.${s}`:i.pathname=`${Tb(i.pathname)}.${s}`,i}async function f6(r,e){if(r.id in e)return e[r.id];try{let t=await import(r.module);return e[r.id]=t,t}catch(t){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.
51isSpaMode,window.location.reload(),new Promise(()=>{})}}function m6(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function p6(r,e,t){let s=await Promise.all(r.map(async i=>{let a=e.routes[i.route.id];if(a){let o=await f6(a,t);return o.links?o.links():[]}return[]}));return b6(s.flat(1).filter(m6).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function C_(r,e,t,s,i,a){let o=(h,f)=>t[f]?h.route.id!==t[f].route.id:!0,c=(h,f)=>{var m;return t[f].pathname!==h.pathname||((m=t[f].route.path)==null?void 0:m.endsWith("*"))&&t[f].params["*"]!==h.params["*"]};return a==="assets"?e.filter((h,f)=>o(h,f)||c(h,f)):a==="data"?e.filter((h,f)=>{var g;let m=s.routes[h.route.id];if(!m||!m.hasLoader)return!1;if(o(h,f)||c(h,f))return!0;if(h.route.shouldRevalidate){let x=h.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((g=t[0])==null?void 0:g.params)||{},nextUrl:new URL(r,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function g6(r,e,{includeHydrateFallback:t}={}){return x6(r.map(s=>{let i=e.routes[s.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),t&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function x6(r){return[...new Set(r)]}function y6(r){let e={},t=Object.keys(r).sort();for(let s of t)e[s]=r[s];return e}function b6(r,e){let t=new Set;return new Set(e),r.reduce((s,i)=>{let a=JSON.stringify(y6(i));return t.has(a)||(t.add(a),s.push({key:a,link:i})),s},[])}function pk(){let r=T.useContext(Jf);return mk(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function v6(){let r=T.useContext(Pv);return mk(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var gk=T.createContext(void 0);gk.displayName="FrameworkContext";function xk(){let r=T.useContext(gk);return mk(r,"You must render this element inside a <HydratedRouter> element"),r}function w6(r,e){let t=T.useContext(gk),[s,i]=T.useState(!1),[a,o]=T.useState(!1),{onFocus:c,onBlur:h,onMouseEnter:f,onMouseLeave:m,onTouchStart:g}=e,x=T.useRef(null);T.useEffect(()=>{if(r==="render"&&o(!0),r==="viewport"){let j=S=>{S.forEach(A=>{o(A.isIntersecting)})},N=new IntersectionObserver(j,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[r]),T.useEffect(()=>{if(s){let j=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(j)}}},[s]);let y=()=>{i(!0)},v=()=>{i(!1),o(!1)};return t?r!=="intent"?[a,x,{}]:[a,x,{onFocus:Gm(c,y),onBlur:Gm(h,v),onMouseEnter:Gm(f,y),onMouseLeave:Gm(m,v),onTouchStart:Gm(g,y)}]:[!1,x,{}]}function Gm(r,e){return t=>{r&&r(t),t.defaultPrevented||e(t)}}function j6({page:r,...e}){let t=PD(),{router:s}=pk(),i=T.useMemo(()=>U3(s.routes,r,s.basename),[s.routes,r,s.basename]);return i?t?T.createElement(k6,{page:r,matches:i,...e}):T.createElement(S6,{page:r,matches:i,...e}):null}function N6(r){let{manifest:e,routeModules:t}=xk(),[s,i]=T.useState([]);return T.useEffect(()=>{let a=!1;return p6(r,e,t).then(o=>{a||i(o)}),()=>{a=!0}},[r,e,t]),s}function k6({page:r,matches:e,...t}){let s=Kt(),{future:i}=xk(),{basename:a}=pk(),o=T.useMemo(()=>{if(r===s.pathname+s.search+s.hash)return[];let c=nT(r,a,i.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,f=[];for(let m of e)typeof m.route.shouldRevalidate=="function"?h=!0:f.push(m.route.id);return h&&f.length>0&&c.searchParams.set("_routes",f.join(",")),[c.pathname+c.search]},[a,i.unstable_trailingSlashAwareDataRequests,r,s,e]);return T.createElement(T.Fragment,null,o.map(c=>T.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...t})))}function S6({page:r,matches:e,...t}){let s=Kt(),{future:i,manifest:a,routeModules:o}=xk(),{basename:c}=pk(),{loaderData:h,matches:f}=v6(),m=T.useMemo(()=>C_(r,e,f,a,s,"data"),[r,e,f,a,s]),g=T.useMemo(()=>C_(r,e,f,a,s,"assets"),[r,e,f,a,s]),x=T.useMemo(()=>
51{if(r===s.pathname+s.search+s.hash)return[];let j=new Set,N=!1;if(e.forEach(A=>{var M;let E=a.routes[A.route.id];!E||!E.hasLoader||(!m.some(R=>R.route.id===A.route.id)&&A.route.id in h&&((M=o[A.route.id])!=null&&M.shouldRevalidate)||E.hasClientLoader?N=!0:j.add(A.route.id))}),j.size===0)return[];let S=nT(r,c,i.unstable_trailingSlashAwareDataRequests,"data");return N&&j.size>0&&S.searchParams.set("_routes",e.filter(A=>j.has(A.route.id)).map(A=>A.route.id).join(",")),[S.pathname+S.search]},[c,i.unstable_trailingSlashAwareDataRequests,h,s,a,m,e,r,o]),y=T.useMemo(()=>g6(g,a),[g,a]),v=N6(g);return T.createElement(T.Fragment,null,x.map(j=>T.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...t})),y.map(j=>T.createElement("link",{key:j,rel:"modulepreload",href:j,...t})),v.map(({key:j,link:N})=>T.createElement("link",{key:j,nonce:t.nonce,...N,crossOrigin:N.crossOrigin??t.crossOrigin})))}function A6(...r){return e=>{r.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var _6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_6&&(window.__reactRouterVersion="7.14.2")}catch{}function E6({basename:r,children:e,unstable_useTransitions:t,window:s}){let i=T.useRef();i.current==null&&(i.current=rD({window:s,v5Compat:!0}));let a=i.current,[o,c]=T.useState({action:a.action,location:a.location}),h=T.useCallback(f=>{t===!1?c(f):T.startTransition(()=>c(f))},[t]);return T.useLayoutEffect(()=>a.listen(h),[a,h]),T.createElement(s6,{basename:r,children:e,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:t})}var rT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,q=T.forwardRef(function({onClick:e,discover:t="render",prefetch:s="none",relative:i,reloadDocument:a,replace:o,unstable_mask:c,state:h,target:f,to:m,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y,...v},j){let{basename:N,navigator:S,unstable_useTransitions:A}=T.useContext(wr),E=typeof m=="string"&&rT.test(m),M=G3(m,N);m=M.to;let R=FD(m,{relative:i}),I=Kt(),F=null;if(c){let fe=Tv(c,[],I.unstable_mask?I.unstable_mask.pathname:"/",!0);N!=="/"&&(fe.pathname=fe.pathname==="/"?N:Ti([N,fe.pathname])),F=S.createHref(fe)}let[D,O,$]=w6(s,v),z=R6(m,{replace:o,unstable_mask:c,state:h,target:f,preventScrollReset:g,relative:i,viewTransition:x,unstable_defaultShouldRevalidate:y,unstable_useTransitions:A});function re(fe){e&&e(fe),fe.defaultPrevented||z(fe)}let he=!(M.isExternal||a),de=T.createElement("a",{...v,...$,href:(he?F:void 0)||M.absoluteURL||R,onClick:he?re:e,ref:A6(j,O),target:f,"data-discover":!E&&t==="render"?"true":void 0});return D&&!E?T.createElement(T.Fragment,null,de,T.createElement(j6,{page:R})):de});q.displayName="Link";var C6=T.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:s="",end:i=!1,style:a,to:o,viewTransition:c,children:h,...f},m){let g=H0(o,{relative:f.relative}),x=Kt(),y=T.useContext(Pv),{navigator:v,basename:j}=T.useContext(wr),N=y!=null&&F6(g)&&c===!0,S=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,A=x.pathname,E=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;t||(A=A.toLowerCase(),E=E?E.toLowerCase():null,S=S.toLowerCase()),E&&j&&(E=To(E,j)||E);const M=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let R=A===S||!i&&A.startsWith(S)&&A.charAt(M)==="/",I=E!=null&&(E===S||!i&&E.startsWith(S)&&E.charAt(S.length)==="/"),F={isActive:R,isPending:I,isTransitioning:N},D=R?e:void 0,O;typeof s=="function"?O=s(F):O=[s,R?"active":null,I?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(F):a;return T.createElement(q,{...f,"aria-current":D,className:O,ref:m,style:$,to:o,viewTransition:c},typeof h=="function"?h(F):h)});C6.displayName="NavLink";var T6=T.forwardRef(({discover:r="render",fetcherKey:e,navigate:t,reloadDocument:s,replace:i,state:a,method:o=Ly,action:c,onSubmit:h,relative:f,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:x,...y},v)=>{let{unstable_useTransitions:j}=T.useContext(wr),N=D6(),S=O6(c,{relative:f}),A=o.toLowerCase()==="get"?"get":"post",E=typeof c=="string"&&rT.test(c),M=R=>{if(h&&h(R),R.defaultPrevented)return;R.preventDefault();let I=R.nativeEvent.submitter,F=(I==null?void 0:I.getAttribute("formmethod"))||o,D=()=>N(I||R.currentTarget,{fetcherKey:e,method:F,navigate:t,replace:i,state:a,relative:f,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:x});j&&t!==!1?T.startTransition(()=>D()):D()};return T.createElement("form",{ref:v,method:A,action:S,onSubmit:s?h:M,...y,"data-discover":!E&&r==="render"?"true":void 0})});T6.displayName="Form";function P6(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iT(r){let e=T.useContext(Jf);return Rt(e,P6(r)),e}function R6(r,{target:e,replace:t,unstable_mask:s,state:i,preventScrollReset:a,relative:o,viewTransition:c,unstable_defaultShouldRevalidate:h,unstable_useTransitions:f}={}){let m=Zf(),g=Kt(),x=H0(r,{relative:o});return T.useCallback(y=>{if(l6(y,e)){y.preventDefault();let v=t!==void 0?t:Fp(g)===Fp(x),j=()=>m(r,{replace:v,unstable_mask:s,state:i,preventScrollReset:a,relative:o,viewTransition:c,unstable_defaultShouldRevalidate:h});f?T.startTransition(()=>j()):j()}},[g,m,x,t,s,i,e,r,a,o,c,h,f])}function M6(r){Xr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=T.useRef(V2(r)),t=T.useRef(!1),s=Kt(),i=T.useMemo(()=>c6(s.search,t.current?null:e.current),[s.search]),a=Zf(),o=T.useCallback((c,h)=>{const f=V2(typeof c=="function"?c(new URLSearchParams(i)):c);t.current=!0,a("?"+f,h)},[a,i]);return[i,o]}var I6=0,L6=()=>`__${String(++I6)}__`;function D6(){let{router:r}=iT("useSubmit"),{basename:e}=T.useContext(wr),t=JD(),s=r.fetch,i=r.navigate;return T.useCallback(async(a,o={})=>{let{action:c,method:h,encType:f,formData:m,body:g}=h6(a,e);if(o.navigate===!1){let x=o.fetcherKey||L6();await s(x,t,o.action||c,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:m,body:g,formMethod:o.method||h,formEncType:o.encType||f,flushSync:o.flushSync})}else await i(o.action||c,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:m,body:g,formMethod:o.method||h,formEncType:o.encType||f,replace:o.replace,state:o.state,fromRouteId:t,flushSync:o.flushSync,viewTransition:o.viewTransition})},[s,i,e,t])}function O6(r,{relative:e}={}){let{basename:t}=T.useContext(wr),s=T.useContext(Qr);Rt(s,"useFormAction must be used inside a RouteContext");let[i]=s.matches.slice(-1),a={...H0(r||".",{relative:e})},o=Kt();if(r==null){a.search=o.search;let c=new URLSearchParams(a.search),h=c.getAll("index");if(h.some(m=>m==="")){c.delete("index"),h.filter(g=>g).forEach(g=>c.append("index",g));let m=c.toString();a.search=m?`?${m}`:""}}return(!r||r===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(
51a.pathname=a.pathname==="/"?t:Ti([t,a.pathname])),Fp(a)}function F6(r,{relative:e}={}){let t=T.useContext(X3);Rt(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=iT("useViewTransitionState"),i=H0(r,{relative:e});if(!t.isTransitioning)return!1;let a=To(t.currentLocation.pathname,s)||t.currentLocation.pathname,o=To(t.nextLocation.pathname,s)||t.nextLocation.pathname;return Cb(i.pathname,o)!=null||Cb(i.pathname,a)!=null}var B6=$3();const W2="https://meta-heroes.co.jp",$6=`${W2}/assets/MH_OGP.png`,De=({title:r,description:e="æ ªå¼ä¼ç¤¾MetaHeroesã¯ãã¡ã¿ãã¼ã¹ã»AIã»XRã§ç¤¾ä¼èª²é¡ã解決ããã¤ã³ãã¯ãã»ãã¸ãã¹ãå±éãã¦ãã¾ããæè²ãé²ç½ãå°æ¹åµçã®3æ¬æ±ã軸ã«ãæ¥æ¬ã®æªæ¥ãã¯ã¯ã¯ã¯ãããHEROãåµåºãã¾ãã",keywords:t="MetaHeroes, ã¡ã¿ãã¼ã¹, AI, XR, 社ä¼èª²é¡è§£æ±º, å°æ¹åµç, é²ç½, æè², Hero Egg, UEFN, Society 5.0",image:s,url:i,type:a="website",schema:o})=>{const c=Kt(),h=i||`${W2}${c.pathname}`,f=s||$6,m=f.startsWith("http")?f:`${W2}${f.startsWith("/")?"":"/"}${f}`;return T.useEffect(()=>{document.title=r,Wn("description",e),Wn("keywords",t),Wn("og:title",r,"property"),Wn("og:description",e,"property"),Wn("og:url",h,"property"),Wn("og:type",a,"property"),Wn("og:image",m,"property"),Wn("og:site_name","æ ªå¼ä¼ç¤¾MetaHeroes","property"),Wn("og:locale","ja_JP","property"),Wn("twitter:card","summary_large_image"),Wn("twitter:title",r),Wn("twitter:description",e),Wn("twitter:image",m);let g=document.querySelector('link[rel="canonical"]');g||(g=document.createElement("link"),g.setAttribute("rel","canonical"),document.head.appendChild(g)),g.setAttribute("href",h);const x=c.pathname.startsWith("/agency")||c.pathname==="/agency-login";let y=document.querySelector('meta[name="robots"]');x?(y||(y=document.createElement("meta"),y.setAttribute("name","robots"),document.head.appendChild(y)),y.setAttribute("content","noindex, nofollow")):y&&y.setAttribute("content","index, follow");const v="json-ld-schema";let j=document.getElementById(v);o?(j||(j=document.createElement("script"),j.id=v,j.type="application/ld+json",document.head.appendChild(j)),j.text=JSON.stringify(o)):j&&j.remove()},[r,e,t,s,h,a,o,c.pathname]),null},Wn=(r,e,t="name")=>{let s=document.querySelector(`meta[${t}="${r}"]`);s||(s=document.createElement("meta"),s.setAttribute(t,r),document.head.appendChild(s)),s.setAttribute("content",e)},U6=()=>{const{pathname:r,hash:e}=Kt();return T.useEffect(()=>{e||window.scrollTo(0,0)},[r,e]),null};var o2={},l2,T_;function H6(){if(T_)return l2;T_=1;function r(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return l2=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var s=this._timeouts.shift();if(s===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),s=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},s),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var s=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){s._operationTimeoutCb()},s._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},r.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,s=0,i=0;i<this._errors.length;i++){var a=this._errors[i],o=a.message,c=(e[o]||0)+1;e[o]=c,c>=s&&(t=a,s=c)}return t},l2}var P_;function z6(){return P_||(P_=1,(function(r){var e=H6();r.operation=function(t){var s=r.timeouts(t);return new e(s,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},r.timeouts=function(t){if(t instanceof Array)return[].concat(t);var s={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in t)s[i]=t[i];if(s.minTimeout>s.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],o=0;o<s.retries;o++)a.push(this.createTimeout(o,s));return t&&t.forever&&!a.length&&a.push(this.createTimeout(o,s)),a.sort(function(c,h){return c-h}),a},r.createTimeout=function(t,s){var i=s.randomize?Math.random()+1:1,a=Math.round(i*Math.max(s.minTimeout,1)*Math.pow(s.factor,t));return a=Math.min(a,s.maxTimeout),a},r.wrap=function(t,s,i){if(s instanceof Array&&(i=s,s=null),!i){i=[];for(var a in t)typeof t[a]=="function"&&i.push(a)}for(var o=0;o<i.length;o++){var c=i[o],h=t[c];t[c]=(function(m){var g=r.operation(s),x=Array.prototype.slice.call(arguments,1
51),y=x.pop();x.push(function(v){g.retry(v)||(v&&(arguments[0]=g.mainError()),y.apply(this,arguments))}),g.attempt(function(){m.apply(t,x)})}).bind(t,h),t[c].options=s}}})(o2)),o2}var c2,R_;function V6(){return R_||(R_=1,c2=z6()),c2}var d2,M_;function W6(){if(M_)return d2;M_=1;var r=V6();function e(t,s){function i(a,o){var c=s||{},h;"randomize"in c||(c.randomize=!0),h=r.operation(c);function f(x){o(x||new Error("Aborted"))}function m(x,y){if(x.bail){f(x);return}h.retry(x)?c.onRetry&&c.onRetry(x,y):o(h.mainError())}function g(x){var y;try{y=t(f,x)}catch(v){m(v,x);return}Promise.resolve(y).then(a).catch(function(j){m(j,x)})}h.attempt(g)}return new Promise(i)}return d2=e,d2}var G6=W6();const q6=B3(G6);function G2(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=r[t];return s}function K6(r){if(Array.isArray(r))return r}function X6(r){if(Array.isArray(r))return G2(r)}function I_(r,e,t,s,i,a,o){try{var c=r[a](o),h=c.value}catch(f){t(f);return}c.done?e(h):Promise.resolve(h).then(s,i)}function Gn(r){return function(){var e=this,t=arguments;return new Promise(function(s,i){var a=r.apply(e,t);function o(h){I_(a,s,i,o,c,"next",h)}function c(h){I_(a,s,i,o,c,"throw",h)}o(void 0)})}}function Y6(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function J6(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Q6(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var s=[],i=!0,a=!1,o,c;try{for(t=t.call(r);!(i=(o=t.next()).done)&&(s.push(o.value),!(e&&s.length===e));i=!0);}catch(h){a=!0,c=h}finally{try{!i&&t.return!=null&&t.return()}finally{if(a)throw c}}return s}}function Z6(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function eO(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pa(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},s=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(t).filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),s.forEach(function(i){Y6(r,i,t[i])})}return r}function tO(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);t.push.apply(t,s)}return t}function Ra(r,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):tO(Object(e)).forEac
51h(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}),r}function sO(r,e){return K6(r)||Q6(r,e)||aT(r,e)||Z6()}function L_(r){return X6(r)||J6(r)||aT(r)||eO()}function aT(r,e){if(r){if(typeof r=="string")return G2(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return G2(r,e)}}function qn(r,e){var t,s,i,a,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(f){return function(m){return h([f,m])}}function h(f){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,s&&(i=f[0]&2?s.return:f[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,f[1])).done)return i;switch(s=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,s=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){o.label=f[1];break}if(f[0]===6&&o.label<i[1]){o.label=i[1],i=f;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(f);break}i[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(r,o)}catch(m){f=[6,m],s=0}finally{t=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}var nO=function(r){return(function(){var e=Gn(function(t,s){var i;return qn(this,function(a){return i=new Headers(s==null?void 0:s.headers),[2,(i.has("X-MICROCMS-API-KEY")||i.set("X-MICROCMS-API-KEY",r),fetch(t,Ra(Pa({},s),{headers:i})))]})});return function(t,s){return e.apply(this,arguments)}})()},rO="microcms.io",iO="v1",aO=function(r){return r!==null&&typeof r=="object"},D_=function(r){return typeof r=="string"},oO=function(r){if(!aO(r))throw new Error("queries is not object");return new URLSearchParams(Object.entries(r).reduce(function(e,t){var s=sO(t,2),i=s[0],a=s[1];return a!==void 0&&(e[i]=String(a)),e},{})).toString()},oT=function(r){var e=r.serviceDomain,t=r.apiKey,s=r.retry;if(!e||!t)throw new Error("parameter is required (check serviceDomain and apiKey)");if(!D_(e)||!D_(t))throw new Error("parameter is not string");var i="https://".concat(e,".").concat(rO,"/api/").concat(iO),a=(function(){var o=Gn(function(c){var h,f,m,g,x,y,v,j,N;return qn(this,function(S){switch(S.label){case 0:return h=c.endpoint,f=c.contentId,m=c.queries,g=m===void 0?{}:m,x=c.requestInit,y=nO(t),v=oO(g),j="".concat(i,"/").concat(h).concat(f?"/".concat(f):"").concat(v?"?".concat(v):""),N=(function(){var A=Gn(function(E){var M,R;return qn(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,3]),[4,E.json()];case 1:return M=I.sent(),R=M.message,[2,R??null];case 2:return I.sent(),[2,null];case 3:return[2]}})});return function(E){return A.apply(this,arguments)}})(),[4,q6((function(){var A=Gn(function(E){var M,R,I,F,D,O,$;return qn(this,function(z){switch(z.label){case 0:return z.trys.push([0,6,,7]),[4,y(j,Ra(Pa({},x),{method:(R=x==null?void 0:x.method)!==null&&R!==void 0?R:"GET"}))];case 1:return M=z.sent(),M.status!==429&&M.status>=400&&M.status<500?[4,N(M)]:[3,3];case 2:return I=z.sent(),[2,E(new Error("fetch API response status: ".concat(M.status).concat(I?"\n message is `".concat(I,"`"):"")))];case 3:return M.ok?[3,5]:[4,N(M)];case 4:return F=z.sent(),[2,Promise.reject(new Error("fetch API response status: ".concat(M.status).concat(F?"\n message is `".concat(F,"`"):"")))];case 5:return[2,(x==null?void 0:x.method)==="DELETE"?void 0:M.json()];case 6:if(D=z.sent(),D.data)throw D.data;if(!((O=D.response)===null||O===void 0)&&O.data)throw D.response.data;return[2,Promise.reject(new Error(`Network Error. 52 Details: `.concat(($=D.message)!==null&&$!==void 0?$:"")))];case 7:return[2]}})});return function(E){return A.apply(this,arguments)}})(),{retries:s?2:0,onRetry:function(A,E){console.log(A),console.log("Waiting for retry (".concat(E,"/",2,")"))},minTimeout:5e3})];case 1:return[2,S.sent()]}})});return function(c){return o.apply(this,arguments)}})();return{get:(function(){var o=Gn(function(c){var h,f,m,g,x,y;return qn(this,function(v){switch(v.label){case 0:return h=c.endpoint,f=c.contentId,m=c.queries,g=m===void 0?{}:m,x=c.customRequestInit,h?[4,a({endpoint:h,contentId:f,queries:g,requestInit:x})]:[3,2];case 1:return y=v.sent(),[3,3];case 2:y=Promise.reject(new Error("endpoint is required")),v.label=3;case 3:return[2,y]}})});return function(c){return o.apply(this,arguments)}})(),getList:(function(){var o=Gn(function(c){var h,f,m,g,x;return qn(this,function(y){switch(y.label){case 0:return h=c.endpoint,f=c.queries,m=f===void 0?{}:f,g=c.customRequestInit,h?[4,a({endpoint:h,queries:m,requestInit:g})]:[3,2];case 1:return x=y.sent(),[3,3];case 2:x=Promise.reject(new Error("endpoint is required")),y.label=3;case 3:return[2,x]}})});return function(c){return o.apply(this,arguments)}})(),getListDetail:(function(){var o=Gn(function(c){var h,f,m,g,x,y;return qn(this,function(v){switch(v.label){case 0:return h=c.endpoint,f=c.contentId,m=c.queries,g=m===void 0?{}:m,x=c.customRequestInit,h?[4,a({endpoint:h,contentId:f,queries:g,requestInit:x})]:[3,2];case 1:return y=v.sent(),[3,3];case 2:y=Promise.reject(new Error("endpoint is required")),v.label=3;case 3:return[2,y]}})});return function(c){return o.apply(this,arguments)}})(),getObject:(function(){var o=Gn(function(c){var h,f,m,g,x;return qn(this,function(y){switch(y.label){case 0:return h=c.endpoint,f=c.queries,m=f===void 0?{}:f,g=c.customRequestInit,h?[4,a({endpoint:h,queries:m,requestInit:g})]:[3,2];case 1:return x=y.sent(),[3,3];case 2:x=Promise.reject(new Error("endpoint is required")),y.label=3;case 3:return[2,x]}})});return function(c){return o.apply(this,arguments)}})(),getAllContentIds:(function(){var o=Gn(function(c){var h,f,m,g,x,y,v,j,N,S,A,E,M,R,I,F,D;return qn(this,function(O){switch(O.label){case 0:return h=c.endpoint,f=c.alternateField,m=c.draftKey,g=c.filters,x=c.orders,y=c.customRequestInit,v={draftKey:m,filters:g,orders:x,limit:100,fields:f??"id",depth:0},[4,a({endpoint:h,queries:Ra(Pa({},v),{limit:0}),requestInit:y}
52)];case 1:j=O.sent(),N=j.totalCount,S=[],A=0,E=function($){return new Promise(function(z){return setTimeout(z,$)})},M=function($){return $.every(function(z){return typeof z=="string"})},O.label=2;case 2:return S.length<N?[4,a({endpoint:h,queries:Ra(Pa({},v),{offset:A}),requestInit:y})]:[3,7];case 3:if(R=O.sent(),I=R.contents,F=I.map(function($){return $[f??"id"]}),!M(F))throw new Error("The value of the field specified by `alternateField` is not a string.");return S=L_(S).concat(L_(F)),A+=100,D=S.length<N,D?[4,E(1e3)]:[3,5];case 4:D=O.sent(),O.label=5;case 5:O.label=6;case 6:return[3,2];case 7:return[2,S]}})});return function(c){return o.apply(this,arguments)}})(),getAllContents:(function(){var o=Gn(function(c){var h,f,m,g,x,y,v,j,N,S,A,E;return qn(this,function(M){switch(M.label){case 0:return h=c.endpoint,f=c.queries,m=f===void 0?{}:f,g=c.customRequestInit,[4,a({endpoint:h,queries:Ra(Pa({},m),{limit:0}),requestInit:g})];case 1:x=M.sent(),y=x.totalCount,v=[],j=0,N=function(R){return new Promise(function(I){return setTimeout(I,R)})},M.label=2;case 2:return v.length<y?[4,a({endpoint:h,queries:Ra(Pa({},m),{limit:100,offset:j}),requestInit:g})]:[3,7];case 3:return S=M.sent(),A=S.contents,v=v.concat(A),j+=100,E=v.length<y,E?[4,N(1e3)]:[3,5];case 4:E=M.sent(),M.label=5;case 5:M.label=6;case 6:return[3,2];case 7:return[2,v]}})});return function(c){return o.apply(this,arguments)}})(),create:(function(){var o=Gn(function(c){var h,f,m,g,x,y,v,j,N,S;return qn(this,function(A){return h=c.endpoint,f=c.contentId,m=c.content,g=c.isDraft,x=g===void 0?!1:g,y=c.isClosed,v=y===void 0?!1:y,j=c.customRequestInit,h?v&&x?[2,Promise.reject(new Error("isClosed and isDraft cannot be true at the same time"))]:(N={},x?N.status="draft":v&&(N.status="closed"),S=Ra(Pa({},j),{method:f?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}),[2,a({endpoint:h,contentId:f,queries:N,requestInit:S})]):[2,Promise.reject(new Error("endpoint is required"))]})});return function(c){return o.apply(this,arguments)}})(),update:(function(){var o=Gn(function(c){var h,f,m,g,x,y,v,j;return qn(this,function(N){return h=c.endpoint,f=c.contentId,m=c.content,g=c.isDraft,x=g===void 0?!1:g,y=c.customRequestInit,h?(v=x?{status:"draft"}:{},j=Ra(Pa({},y),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)}),[2,a({endpoint:h,contentId:f,queries:v,requestInit:j})]):[2,Promise.reject(new Error("endpoint is required"))]})});return function(c){return o.apply(this,arguments)}})(),delete:(function(){var o=Gn(function(c){var h,f,m,g;return qn(this,function(x){switch(x.label){case 0:return h=c.endpoint,f=c.contentId,m=c.customRequestInit,h?f?(g=Ra(Pa({},m),{method:"DELETE",headers:{},body:void 0}),[4,a({endpoint:h,contentId:f,requestInit:g})]):[2,Promise.reject(new Error("contentId is required"))]:[2,Promise.reject(new Error("endpoint is required"))];case 1:return x.sent(),[2]}})});return function(c){return o.apply(this,arguments)}})()}};const lO="g07uki3u26",cO="apdNtrwXnGxRIg7IgDTmfRsgn6YYfg8J2RFt",Mv=oT({serviceDomain:lO.trim(),apiKey:cO.trim()}),yk=oT({serviceDomain:"tsrozu3k55",apiKey:"3cEPye52LNlCwgRRAydNRajAvav3lR9EOCmU"}),em=async(r=10,e,t=0)=>{const s={limit:r,offset:t,orders:"-publishedAt"};return e!=null&&e.categoryId&&(s.filters=`category[equals]${e.categoryId}`),e!=null&&e.keyword&&(s.q=e.keyword),await yk.get({endpoint:"blogs",queries:s})},lT=async()=>{try{return(await yk.get({endpoint:"categories"})).contents}catch(r){return console.error("Failed to fetch member categories:",r),[]}},dO=async r=>await yk.get({endpoint:"blogs",contentId:r}),uO=[{id:"ããã¯ã¢ãã",name:"ããã¯ã¢ãã"},{id:"ãã¬ã¹ãªãªã¼ã¹",name:"ãã¬ã¹ãªãªã¼ã¹"},{id:"ã¤ã³ãã©ã¡ã¼ã·ã§ã³",name:"ã¤ã³ãã©ã¡ã¼ã·ã§ã³"},{id:"ãã¬ãã¸",name:"ãã¬ãã¸"},{id:"XRã½ãªã¥ã¼ã·ã§ã³",name:"XRã½ãªã¥ã¼ã·ã§ã³"},{id:"holoshare",name:"holoshare"},{id:"HERO AIVO",name:"HERO AIVO"},{id:"AI人æè²æç ä¿®",name:"AI人æè²æç ä¿®"},{id:"é²ç½ã¡ã¿ãã¼ã¹",name:"é²ç½ã¡ã¿ãã¼ã¹"},{id:"é²ç½ä¸å / ãã©ãé²ç½ä¸å",name:"é²ç½ä¸å / ãã©ãé²ç½ä¸å"},{id:"ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã",name:"ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã"},{id:"Hero Egg",name:"Hero Egg"},{id:"GLOBAL HERO SUMMIT",name:"GLOBAL HERO SUMMIT"},{id:"EGG JAM",name:"EGG JAM"},{id:"AI MONDAY",name:"AI MONDAY"},{id:"ã²ã¼ã à ã¤ãã³ã",name:"ã²ã¼ã à ã¤ãã³ã"},{id:"Meta Heroes Guild",name:"Meta Heroes Guild"},{id:"PRtimes",name:"PRtimes"},{id:"ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£ å®ç¸¾",name:"ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£ å®ç¸¾"},{id:"ã¡ã¿ãã¼ã¹éçºå®ç¸¾",name:"ã¡ã¿ãã¼ã¹éçºå®ç¸¾"},{id:"Hero Egg å®ç¸¾",name:"Hero Egg å®ç¸¾"},{id:"AI / éçº å®ç¸¾",name:"AI / éçº å®ç¸¾"},{id:"ã¤ãã³ãå®ç¸¾",name:"ã¤ãã³ãå®ç¸¾"},{id:"äºæ¥é å [ é²ç½ ]",name:"äºæ¥é å [ é²ç½ ]"},{id:"äºæ¥é å [ æè² ]",name:"äºæ¥é å [ æè² ]"},{id:"äºæ¥é å [ å°æ¹åµç ]",name:"äºæ¥é å [ å°æ¹åµç ]"},{id:"ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£",name:"ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£"},{id:"ãã¼ã¹åºå±",name:"ãã¼ã¹åºå±"}],hO=async()=>uO,fO=async()=>{try{return(await Mv.get({endpoint:"documents",queries:{limit:100,orders:"publishedAt",filters:"publishedAt[exists]"}})).contents}catch(r){return console.error("Failed to fetch documents from microCMS:",r),[]}},mO=async()=>await Mv.get({endpoint:"news",queries:{filters:"category_new[contains]ããã¯ã¢ãã",limit:5,orders:"-publishedAt"}}),Xe=async(r=10,e,t,s=0)=>{const i={limit:r,offset:s,orders:"-publishedAt"},a=["publishedAt[exists]"];if(t!=null&&t.categoryId)if(Array.isArray(t.categoryId)){const o=t.categoryId.map(c=>`category_new[contains]${c}`).join("[or]");a.push(`(${o})`)}else a.push(`category_new[contains]${t.categoryId}`);return t!=null&&t.excludeCategoryId&&a.push(`category_new[not_contains]${t.excludeCategoryId}`),t!=null&&t.year&&a.push(`publishedAt[begins_with]${t.year}`),a.length>0&&(i.filters=a.join("[and]")),t!=null&&t.keyword&&(i.q=t.keyword),i.filters&&console.log(`[microCMS Fetch] Endpoint: news, Filters: ${i.filters}`),await Mv.get({endpoint:"news",queries:i})},pO=async r=>await Mv.get({endpoint:"news",contentId:r}),u2="/assets/top/business_bg.png",O_=()=>{var N,S,A,E;const{blogId:r}=Z3(),e=Zf(),t=Kt(),s=t.pathname.startsWith("/member-blog"),[i,a]=T.useState(null),[o,c]=T.useState([]),[h,f]=T.useState(!0),[m,g]=T.useState(null);T.useEffect(()=>{(async()=>
52{if(r)try{f(!0);let R,I;s?[R,I]=await Promise.all([dO(r),em(6)]):[R,I]=await Promise.all([pO(r),Xe(6)]),a(R),c(I.contents.filter(F=>F.id!==r).slice(0,3))}catch(R){console.error("ããã°è¨äºã®åå¾ã«å¤±æãã¾ãã:",R),g("ããã°è¨äºã®åå¾ã«å¤±æãã¾ãã")}finally{f(!1)}})()},[r,s]);const x=M=>{const R=new Date(M);return`${R.getFullYear()}.${R.getMonth()+1}.${R.getDate()}`},y=M=>M.replace(/<[^>]*>?/gm,"").replace(/\s+/g," ").trim();if(h)return n.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-4 border-gray-100 border-t-blue-600"})});if(m||!i)return n.jsx("div",{className:"min-h-screen bg-white flex flex-col items-center justify-center px-4 pt-20",children:n.jsxs("div",{className:"text-center",children:[n.jsx("h1",{className:"text-2xl font-black text-gray-900 mb-4",children:"è¨äºãè¦ã¤ããã¾ããã§ãã"}),n.jsx("button",{onClick:()=>e("/news"),className:"px-8 py-3 bg-gray-900 text-white font-bold rounded-full hover:bg-gray-800 transition-colors",children:"ãã¥ã¼ã¹ä¸è¦§ã«æ»ã"})]})});const v=[...i.category_new||[],...s&&i.category?[i.category.name]:[],"MetaHeroes","ã¡ã¿ãã¼ã¹","AI","XR"].join(", "),j=i.content?y(i.content).slice(0,160)+"...":`${i.title}ã«é¢ããæ ªå¼ä¼ç¤¾MetaHeroesã®ææ°æ å ±ããå±ããã¾ãã`;return n.jsxs("div",{className:"min-h-screen bg-white",children:[n.jsx(De,{title:`${i.title} | æ ªå¼ä¼ç¤¾MetaHeroes`,description:j,keywords:v,image:(N=i.eyecatch)==null?void 0:N.url,type:"article",schema:{"@context":"https://schema.org","@type":"BlogPosting",headline:i.title,description:j,image:((S=i.eyecatch)==null?void 0:S.url)||u2,datePublished:i.publishedAt||i.createdAt,dateModified:i.updatedAt||i.publishedAt||i.createdAt,author:{"@type":"Organization",name:"æ ªå¼ä¼ç¤¾MetaHeroes",url:"https://meta-heroes.co.jp/"},publisher:{"@type":"Organization",name:"æ ªå¼ä¼ç¤¾MetaHeroes",logo:{"@type":"ImageObject",url:"https://meta-heroes.co.jp/assets/logo.png"}},mainEntityOfPage:{"@type":"WebPage","@id":`https://meta-heroes.co.jp${t.pathname}`}}}),n.jsxs("main",{className:"container mx-auto px-4 sm:px-8 pt-40 pb-20 max-w-4xl",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("div",{className:"flex items-center justify-center gap-4 mb-6",children:n.jsx("time",{className:"text-xs font-bold text-gray-400 tracking-widest font-mono",children:x(i.publishedAt||i.createdAt)})}),n.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-black text-gray-900 leading-relaxed tracking-tight",children:i.title})]}),n.jsx("div",{className:"relative aspect-video w-full overflow-hidden mb-16 bg-gray-100 shadow-sm",children:n.jsx("img",{src:((A=i.eyecatch)==null?void 0:A.url)||u2,alt:i.title,className:"w-full h-full object-cover"})}),i.content&&n.jsx("article",{className:` 53 prose prose-lg max-w-none 54 prose-headings:font-black prose-headings:text-gray-900 prose-headings:tracking-tight 55 prose-h1:text-3xl prose-h1:mt-16 prose-h1:mb-8 56 prose-h2:text-2xl prose-h2:mt-12 prose-h2:mb-6 prose-h2:pb-2 prose-h2:border-b prose-h2:border-gray-200 57 prose-p:text-gray-700 prose-p:leading-loose prose-p:mb-8 58 prose-a:text-blue-600 prose-a:font-bold prose-a:no-underline hover:prose-a:underline 59 prose-strong:text-gray-900 prose-strong:font-black 60 prose-blockquote:border-l-4 prose-blockquote:border-blue-600 prose-blockquote:bg-gray-50 prose-blockquote:py-4 prose-blockquote:px-6 prose-blockquote:not-italic 61 prose-img:rounded-sm prose-img:shadow-md 62 prose-li:text-gray-700 63 `,dangerouslySetInnerHTML:{__html:i.content}}),(i.category_new||s&&i.category)&&n.jsx("div",{className:"mt-16 pt-8 border-t border-gray-100",children:n.jsxs("div",{className:"flex flex-wrap gap-2 justify-center",children:[(E=i.category_new)==null?void 0:E.map(M=>n.jsx("span",{className:"px-4 py-1.5 bg-gray-100 text-gray-600 text-[10px] font-black tracking-widest uppercase rounded-full border border-gray-200",children:M},M)),s&&i.category&&n.jsx("span",{className:"px-4 py-1.5 bg-blue-50 text-blue-600 text-[10px] font-black tracking-widest uppercase rounded-full border border-blue-100",children:i.category.name})]})}),(()=>{const M=i.category_new||[],R=[];return(M.some(I=>/HERO AIVO|LLMO/i.test(I))||/LLMO|AIæ¤ç´¢|SEO/.test(i.title))&&R.push({label:"HERO AIVO",description:"AIæ¤ç´¢æé©åï¼LLMOï¼ã§ãAIããæ£ããå¼ç¨ã»æ¨å¥¨ãããWebãµã¤ãã¸",path:"/services/hero-aivo"}),(M.some(I=>/AI人æ|ç ä¿®/i.test(I))||/AIç ä¿®|ãªã¹ããªã³ã°|DXç ä¿®/.test(i.title))&&R.push({label:"AI人æè²æç ä¿®",description:"15,000å以ä¸ã®å®ç¸¾ãèªãå®è·µçAIç ä¿®ããã°ã©ã ",path:"/services/ai-training"}),(M.some(I=>/é²ç½/i.test(I))||/é²ç½/.test(i.title))&&R.push({label:"é²ç½ã¡ã¿ãã¼ã¹",description:"ä»®æ³ç©ºéã§ã®æ²¡å ¥åé²ç½æè²ã»è¨ç·´ã·ãã¥ã¬ã¼ã·ã§ã³",path:"/services/bousai-metaverse"}),(M.some(I=>/XR|holoshare/i.test(I))||/XR|VR|AR|MR|ã¡ã¿ãã¼ã¹/.test(i.title))&&R.push({label:"XRã½ãªã¥ã¼ã·ã§ã³",description:"VR/AR/MRæè¡ãé§ä½¿ããæ²¡å ¥å課é¡è§£æ±ºã½ãªã¥ã¼ã·ã§ã³",path:"/services/xr"}),(M.some(I=>/Hero Egg/i.test(I))||/Hero Egg/.test(i.title))&&R.push({label:"Hero Egg",description:"åã©ããã大人ã¾ã§å¦ã¹ãDXæè²æ½è¨",path:"/services/hero-egg"}),R.length===0&&(R.push({label:"ãåãåãã",description:"AIã»ã¡ã¿ãã¼ã¹ã»XRã«é¢ãããç¸è«ã¯ãæ°è»½ã«ã©ãã",path:"/contact"}),R.push({label:"ãå½¹ç«ã¡è³æ",description:"MetaHeroesã®ãµã¼ãã¹è³æããã¦ã³ãã¼ã",path:"/document-request"})),n.jsxs("div",{className:"mt-16 pt-8 border-t border-gray-100",children:[n.jsx("p",{className:"text-[10px] font-black text-gray-400 tracking-[0.3em] uppercase text-center mb-6",children:"RELATED SERVICES"}),n.jsx("div",{className:`grid gap-4 ${R.length===1?"grid-cols-1 max-w-lg mx-auto":"grid-cols-1 sm:grid-cols-2"}`,children:R.slice(0,2).map(I=>n.jsxs(q,{to:I.path,className:"group flex items-center gap-4 p-5 border border-gray-100 rounded-xl hover:border-blue-200 hover:bg-blue-50/30 transition-all",children:[n.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-blue-600 to-cyan-500 flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-black text-gray-900 group-hover:text-blue-600 transition-colors",children:I.label}),n.jsx("p",{className:"text-xs text-gray-400 mt-0.5 line-clamp-1",children:I.description})]})]},I.path))})]})})(),n.jsx("div",{className:"mt-12 text-center",children:n.jsxs(q,{to:"/gallery",className:"inline-flex items-center gap-3 px-10 py-4 bg-gradient-to-r from-blue-600 to-cyan-500 text-white font-black rounded-full shadow-lg hover:shadow-xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("span",{className:"tracking-widest",children:"GALLERY"}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})})]})}),n.jsx("div",{className:"mt-20 pt-10 border-t border-gray-100 text-center",children:n.jsxs(q,{to:s?"/members/blog":"/news",className:"inline-flex items-center gap-2 px-8 py-3 bg-white border border-gray-200 text-gray-900 font-bold rounded-full hover:bg-gray-50 hover:border-gray-300 transition-all",children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-4 h-4",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),"ä¸è¦§ã«æ»ã"]})})]}),o.length>0&&n.jsx("section",{className:"bg-gray-50 py-24 border-t border-gray-100",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("span",{className:"text-xs font-bold tracking-[0.3em] text-blue-600 block mb-2 uppercase",children:"RELATED"}),n.jsx("h2",{className:"text-3xl font-black text-gray-900",children:"é¢é£è¨äº"})]}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:o.map(M=>{var R;return n.jsxs(q,{to:s?`/member-blog/${M.id}`:`/news/${M.id}`,className:"group block bg-white rounded-xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300",children:[n.jsx("div",{className:"relative aspect-video overflow-hidden bg-gray-200",children:n.jsx("img",{src:((R=M.eyecatch)==null?void 0:R.url)||u2,alt:"",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"})}),n.jsxs("div",{className:"p-6",children:[n.jsx("time",{className:"text-[10px] font-bold text-gray-400 tracking-widest font-mono block mb-3",children:x(M.publishedAt)}),n.jsx("h3",{className:"text-gray-900 text-base font-bold leading-snug line-clamp-2 group-hover:text-blue-600 transition-colors",children:M.title})]})]},M.id)})})]})})]})},bk=T.createContext({});function rc(r){const e=T.useRef(null);return e.current===null&&(e.current=r()),e.current}const gO=typeof window<"u",Iv=gO?T.useLayoutEffect:T.useEffect,Lv=T.createContext(null);function vk(r,e){r.indexOf(e)===-1&&r.push(e)}function Pb(r,e){const t=r.indexOf(e);t>-1&&r.splice(t,1)}const Ri=(r,e,t)=>t>e?e:t<r?r:t;let Bp=()=>{};const ic={},cT=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r);function dT(r){return typeof r=="object"&&r!==null}const uT=r=>/^0[^.\s]+$/u.test(r);function hT(r){let e;return()=>(e===void 0&&(e=r()),e)}const Bn=r=>r,xO=(r,e)=>t=>e(r(t)),z0=(...r)=>r.reduce(xO),Gf=(r,e,t)=>{const s=e-r;return s===0?1:(t-r)/s};class wk{constructor(){this.subscriptions=[]}add(e){return vk(this.subscriptions,e),()=>Pb(this.subscriptions,e)}notify(e,t,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,t,s);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(e,t,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const br=r=>r*1e3,qr=r=>r/1e3;function jk(r,e){return e?r*(1e3/e):0}const fT=(r,e,t)=>(((1-3*t+3*e)*r+(3*t-6*e))*r+3*e)*r,yO=1e-7,bO=12;function vO(r,e,t,s,i){let a,o,c=0;do o=e+(t-e)/2,a=fT(o,s,i)-r,a>0?t=o:e=o;while(Math.abs(a)>yO&&++c<bO);return o}function V0(r,e,t,s){if(r===e&&t===s)return Bn;const i=a=>vO(a,0,1,r,t);return a=>a===0||a===1?a:fT(i(a),e,s)}const mT=r=>e=>e<=.5?r(2*e)/2:(2-r(2*(1-e)))/2,pT=r=>e=>1-r(1-e),gT=V0(.33,1.53,.69,.99),Nk=pT(gT),xT=mT(Nk),yT=r=>r>=1?1:(r*=2)<1?.5*Nk(r):.5*(2-Math.pow(2,-10*(r-1))),kk=r=>1-Math.sin(Math.acos(r)),bT=pT(kk),vT=mT(kk),wO=V0(.42,0,1,1),jO=V0(0,0,.58,1),wT=V0(.42,0,.58,1),NO=r=>Array.isArray(r)&&typeof r[0]!="number",jT=r=>Array.isArray(r)&&typeof r[0]=="number",kO={linear:Bn,easeIn:wO,easeInOut:wT,easeOut:jO,circIn:kk,circInOut:vT,circOut:bT,backIn:Nk,backInOut:xT,backOut:gT,anticipate:yT},SO=r=>typeof r=="string",F_=r=>{if(jT(r)){Bp(r.length===4);const[e,t,s,i]=r;return V0(e,t,s,i)}else if(SO(r))return kO[r];return r},dy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function AO(r,e){let t=new Set,s=new Set,i=!1,a=!1;const o=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function h(m){o.has(m)&&(f.schedule(m),r()),m(c)}const f={schedule:(m,g=!1,x=!1)=>
vendor: 27,608 bytes, line 63
63{const v=x&&i?t:s;return g&&o.add(m),v.add(m),m},cancel:m=>{s.delete(m),o.delete(m)},process:m=>{if(c=m,i){a=!0;return}i=!0;const g=t;t=s,s=g,t.forEach(h),t.clear(),i=!1,a&&(a=!1,f.process(m))}};return f}const _O=40;function NT(r,e){let t=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>t=!0,o=dy.reduce((E,M)=>(E[M]=AO(a),E),{}),{setup:c,read:h,resolveKeyframes:f,preUpdate:m,update:g,preRender:x,render:y,postRender:v}=o,j=()=>{const E=ic.useManualTiming,M=E?i.timestamp:performance.now();t=!1,E||(i.delta=s?1e3/60:Math.max(Math.min(M-i.timestamp,_O),1)),i.timestamp=M,i.isProcessing=!0,c.process(i),h.process(i),f.process(i),m.process(i),g.process(i),x.process(i),y.process(i),v.process(i),i.isProcessing=!1,t&&e&&(s=!1,r(j))},N=()=>{t=!0,s=!0,i.isProcessing||r(j)};return{schedule:dy.reduce((E,M)=>{const R=o[M];return E[M]=(I,F=!1,D=!1)=>(t||N(),R.schedule(I,F,D)),E},{}),cancel:E=>{for(let M=0;M<dy.length;M++)o[dy[M]].cancel(E)},state:i,steps:o}}const{schedule:et,cancel:Yr,state:Ts,steps:h2}=NT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Bn,!0);let Oy;function EO(){Oy=void 0}const yn={now:()=>(Oy===void 0&&yn.set(Ts.isProcessing||ic.useManualTiming?Ts.timestamp:performance.now()),Oy),set:r=>{Oy=r,queueMicrotask(EO)}},kT=r=>e=>typeof e=="string"&&e.startsWith(r),ST=kT("--"),CO=kT("var(--"),Sk=r=>CO(r)?TO.test(r.split("/*")[0].trim()):!1,TO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function B_(r){return typeof r!="string"?!1:r.split("/*")[0].includes("var(--")}const tm={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},$p={...tm,transform:r=>Ri(0,1,r)},uy={...tm,default:1},Sp=r=>Math.round(r*1e5)/1e5,Ak=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PO(r){return r==null}const RO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_k=(r,e)=>t=>!!(typeof t=="string"&&RO.test(t)&&t.startsWith(r)||e&&!PO(t)&&Object.prototype.hasOwnProperty.call(t,e)),AT=(r,e,t)=>s=>{if(typeof s!="string")return s;const[i,a,o,c]=s.match(Ak);return{[r]:parseFloat(i),[e]:parseFloat(a),[t]:parseFloat(o),alpha:c!==void 0?parseFloat(c):1}},MO=r=>Ri(0,255,r),f2={...tm,transform:r=>Math.round(MO(r))},Oc={test:_k("rgb","red"),parse:AT("red","green","blue"),transform:({red:r,green:e,blue:t,alpha:s=1})=>"rgba("+f2.transform(r)+", "+f2.transform(e)+", "+f2.transform(t)+", "+Sp($p.transform(s))+")"};function IO(r){let e="",t="",s="",i="";return r.length>5?(e=r.substring(1,3),t=r.substring(3,5),s=r.substring(5,7),i=r.substring(7,9)):(e=r.substring(1,2),t=r.substring(2,3),s=r.substring(3,4),i=r.substring(4,5),e+=e,t+=t,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const q2={test:_k("#"),parse:IO,transform:Oc.transform},W0=r=>({test:e=>typeof e=="string"&&e.endsWith(r)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${r}`}),sl=W0("deg"),xa=W0("%"),Ne=W0("px"),LO=W0("vh"),DO=W0("vw"),$_={...xa,parse:r=>xa.parse(r)/100,transform:r=>xa.transform(r*100)},dh={test:_k("hsl","hue"),parse:AT("hue","saturation","lightness"),transform:({hue:r,saturation:e,lightness:t,alpha:s=1})=>"hsla("+Math.round(r)+", "+xa.transform(Sp(e))+", "+xa.transform(Sp(t))+", "+Sp($p.transform(s))+")"},os={test:r=>Oc.test(r)||q2.test(r)||dh.test(r),parse:r=>Oc.test(r)?Oc.parse(r):dh.test(r)?dh.parse(r):q2.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Oc.transform(r):dh.transform(r),getAnimatableNone:r=>{const e=os.parse(r);return e.alpha=0,os.transform(e)}},OO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FO(r){var e,t;return isNaN(r)&&typeof r=="string"&&(((e=r.match(Ak))==null?void 0:e.length)||0)+(((t=r.match(OO))==null?void 0:t.length)||0)>0}const _T="number",ET="color",BO="var",$O="var(",U_="${}",UO=/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 qf(r){const e=r.toString(),t=[],s={color:[],number:[],var:[]},i=[];let a=0;const c=e.replace(UO,h=>(os.test(h)?(s.color.push(a),i.push(ET),t.push(os.parse(h))):h.startsWith($O)?(s.var.push(a),i.push(BO),t.push(h)):(s.number.push(a),i.push(_T),t.push(parseFloat(h))),++a,U_)).split(U_);return{values:t,split:c,indexes:s,types:i}}function HO(r){return qf(r).values}function CT({split:r,types:e}){const t=r.length;return s=>{let i="";for(let a=0;a<t;a++)if(i+=r[a],s[a]!==void 0){const o=e[a];o===_T?i+=Sp(s[a]):o===ET?i+=os.transform(s[a]):i+=s[a]}return i}}function zO(r){return CT(qf(r))}const VO=r=>typeof r=="number"?0:os.test(r)?os.getAnimatableNone(r):r,WO=(r,e)=>typeof r=="number"?e!=null&&e.trim().endsWith("/")?r:0:VO(r);function GO(r){const e=qf(r);return CT(e)(e.values.map((s,i)=>WO(s,e.split[i])))}const Pi={test:FO,parse:HO,createTransformer:zO,getAnimatableNone:GO};function m2(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*(2/3-t)*6:r}function qO({hue:r,saturation:e,lightness:t,alpha:s}){r/=360,e/=100,t/=100;let i=0,a=0,o=0;if(!e)i=a=o=t;else{const c=t<.5?t*(1+e):t+e-t*e,h=2*t-c;i=m2(h,c,r+1/3),a=m2(h,c,r),o=m2(h,c,r-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:s}}function Rb(r,e){return t=>t>0?e:r}const _t=(r,e,t)=>r+(e-r)*t,p2=(r,e,t)=>{const s=r*r,i=t*(e*e-s)+s;return i<0?0:Math.sqrt(i)},KO=[q2,Oc,dh],XO=r=>KO.find(e=>e.test(r));function H_(r){const e=XO(r);if(!e)return!1;let t=e.parse(r);return e===dh&&(t=qO(t)),t}const z_=(r,e)=>{const t=H_(r),s=H_(e);if(!t||!s)return Rb(r,e);const i={...t};return a=>(i.red=p2(t.red,s.red,a),i.green=p2(t.green,s.green,a),i.blue=p2(t.blue,s.blue,a),i.alpha=_t(t.alpha,s.alpha,a),Oc.transform(i))},K2=new Set(["none","hidden"]);function YO(r,e){return K2.has(r)?t=>t<=0?r:e:t=>t>=1?e:r}function JO(r,e){return t=>_t(r,e,t)}function Ek(r){return typeof r=="number"?JO:typeof r=="string"?Sk(r)?Rb:os.test(r)?z_:eF:Array.isArray(r)?TT:typeof r=="object"?os.test(r)?z_:QO:Rb}function TT(r,e){const t=[...r],s=t.length,i=r.map((a,o)=>Ek(a)(a,e[o]));return a=>{for(let o=0;o<s;o++)t[o]=i[o](a);return t}}function QO(r,e){const t={...r,...e},s={};for(const i in t)r[i]!==void 0&&e[i]!==void 0&&(s[i]=Ek(r[i])(r[i],e[i]));return i=>{for(const a in s)t[a]=s[a](i);return t}}function ZO(r,e){const t=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const a=e.types[i],o=r.indexes[a][s[a]],c=r.values[o]??0;t[i]=c,s[a]++}return t}const eF=(r,e)=>{const t=Pi.createTransformer(e),s=qf(r),i=qf(e);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?K2.has(r)&&!i.values.length||K2.has(e)&&!s.values.length?YO(r,e):z0(TT(ZO(s,i),i.values),t):Rb(r,e)};function PT(r,e,t){return typeof r=="number"&&typeof e=="number"&&typeof t=="number"?_t(r,e,t):Ek(r)(r,e)}const tF=r=>{const e=({timestamp:t})=>r(t);return{start:(t=!0)=>et.update(e,t),stop:()=>Yr(e),now:()=>Ts.isProcessing?Ts.timestamp:yn.now()}},RT=(r,e,t=10)=>{let s="";const i=Math.max(Math.round(e/t),2);for(let a=0;a<i;a++)s+=Math.round(r(a/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Mb=2e4;function Ck(r){let e=0;const t=50;let s=r.next(e);for(;!s.done&&e<Mb;)e+=t,s=r.next(e);return e>=Mb?1/0:e}function sF(r,e=100,t){const s=t({...r,keyframes:[0,e]}),i=Math.min(Ck(s),Mb);return{type:"keyframes",ease:a=>s.next(i*a).value/e,duration:qr(i)}}const qt={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};function X2(r,e){return r*Math.sqrt(1-e*e)}const nF=12;function rF(r,e,t){let s=t;for(let i=1;i<nF;i++)s=s-r(s)/e(s);return s}const g2=.001;function iF({duration:r=qt.duration,bounce:e=qt.bounce,velocity:t=qt.velocity,mass:s=qt.mass}){let i,a,o=1-e;o=Ri(qt.minDamping,qt.maxDamping,o),r=Ri(qt.minDuration,qt.maxDuration,qr(r)),o<1?(i=f=>{const m=f*o,g=m*r,x=m-t,y=X2(f,o),v=Math.exp(-g);return g2-x/y*v},a=f=>{const g=f*o*r,x=g*t+t,y=Math.pow(o,2)*Math.pow(f,2)*r,v=Math.exp(-g),j=X2(Math.pow(f,2),o);return(-i(f)+g2>0?-1:1)*((x-y)*v)/j}):(i=f=>{const m=Math.exp(-f*r),g=(f-t)*r+1;return-g2+m*g},a=f=>{const m=Math.exp(-f*r),g=(t-f)*(r*r);return m*g});const c=5/r,h=rF(i,a,c);if(r=br(r),isNaN(h))return{stiffness:qt.stiffness,damping:qt.damping,duration:r};{const f=Math.pow(h,2)*s;return{stiffness:f,damping:o*2*Math.sqrt(s*f),duration:r}}}const aF=["duration","bounce"],oF=["stiffness","damping","mass"];function V_(r,e){return e.some(t=>r[t]!==void 0)}function lF(r){let e={velocity:qt.velocity,stiffness:qt.stiffness,damping:qt.damping,mass:qt.mass,isResolvedFromDuration:!1,...r};if(!V_(r,oF)&&V_(r,aF))if(e.velocity=0,r.visualDuration){const t=r.visualDuration,s=2*Math.PI/(t*1.2),i=s*s,a=2*Ri(.05,1,1-(r.bounce||0))*Math.sqrt(i);e={...e,mass:qt.mass,stiffness:i,damping:a}}else{const t=iF({...r,velocity:0});e={...e,...t,mass:qt.mass},e.isResolvedFromDuration=!0}return e}function Ib(r=qt.visualDuration,e=qt.bounce){const t=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:e}:r;let{restSpeed:s,restDelta:i}=t;const a=t.keyframes[0],o=t.keyframes[t.keyframes.length-1],c={done:!1,value:a},{stiffness:h,damping:f,mass:m,duration:g,velocity:x,isResolvedFromDuration:y}=lF({...t,velocity:-qr(t.velocity||0)}),v=x||0,j=f/(2*Math.sqrt(h*m)),N=o-a,S=qr(Math.sqrt(h/m)),A=Math.abs(N)<5;s||(s=A?qt.restSpeed.granular:qt.restSpeed.default),i||(i=A?qt.restDelta.granular:qt.restDelta.default);let E,M,R,I,F,D;if(j<1)R=X2(S,j),I=(v+j*S*N)/R,E=$=>{const z=Math.exp(-j*S*$);return o-z*(I*Math.sin(R*$)+N*Math.cos(R*$))},F=j*S*I+N*R,D=j*S*N-I*R,M=$=>Math.exp(-j*S*$)*(F*Math.sin(R*$)+D*Math.cos(R*$));else if(j===1){E=z=>o-Math.exp(-S*z)*(N+(v+S*N)*z);const $=v+S*N;M=z=>Math.exp(-S*z)*(S*$*z-v)}else{const $=S*Math.sqrt(j*j-1);E=de=>{const fe=Math.exp(-j*S*de),oe=Math.min($*de,300);return o-fe*((v+j*S*N)*Math.sinh(oe)+$*N*Math.cosh(oe))/$};const z=(v+j*S*N)/$,re=j*S*z-N*$,he=j*S*N-z*$;M=de=>{const fe=Math.exp(-j*S*de),oe=Math.min($*de,300);return fe*(re*Math.sinh(oe)+he*Math.cosh(oe))}}const O={calculatedDuration:y&&g||null,velocity:$=>br(M($)),next:$=>{if(!y&&j<1){const re=Math.exp(-j*S*$),he=Math.sin(R*$),de=Math.cos(R*$),fe=o-re*(I*he+N*de),oe=br(re*(F*he+D*de));return c.done=Math.abs(oe)<=s&&Math.abs(o-fe)<=i,c.value=c.done?o:fe,c}const z=E($);if(y)c.done=$>=g;else{const re=br(M($));c.done=Math.abs(re)<=s&&Math.abs(o-z)<=i}return c.value=c.done?o:z,c},toString:()=>{const $=Math.min(Ck(O),Mb),z=RT(re=>O.next($*re).value,$,30);return $+"ms "+z},toTransition:()=>{}};return O}Ib.applyToOptions=r=>{const e=sF(r,100,Ib);return r.ease=e.ease,r.duration=br(e.duration),r.type="keyframes",r};const cF=5;function MT(r,e,t){const s=Math.max(e-cF,0);return jk(t-r(s),e-s)}function Y2({keyframes:r,velocity:e=0,power:t=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:c,max:h,restDelta:f=.5,restSpeed:m}){const g=r[0],x={done:!1,value:g},y=D=>c!==void 0&&D<c||h!==void 0&&D>h,v=D=>c===void 0?h:h===void 0||Math.abs(c-D)<Math.abs(h-D)?c:h;let j=t*e;const N=g+j,S=o===void 0?N:o(N);S!==N&&(j=S-g);const A=D=>-j*Math.exp(-D/s),E=D=>S+A(D),M=D=>{const O=A(D),$=E(D);x.done=Math.abs(O)<=f,x.value=x.done?S:$};let R,I;const F=D=>{y(x.value)&&(R=D,I=Ib({keyframes:[x.value,v(x.value)],velocity:MT(E,D,x.value),damping:i,stiffness:a,restDelta:f,restSpeed:m}))};return F(0),{calculatedDuration:null,next:D=>{let O=!1;return!I&&R===void 0&&(O=!0,M(D),F(D)),R!==void 0&&D>=R?I.next(D-R):(!O&&M(D),x)}}}function dF(r,e,t){const s=[],i=t||ic.mix||PT,a=r.length-1;for(let o=0;o<a;o++){let c=i(r[o],r[o+1]);if(e){const h=Array.isArray(e)?e[o]||Bn:e;c=z0(h,c)}s.push(c)}return s}function Tk(r,e,{clamp:t=!0,ease:s,mixer:i}={}){const a=r.length;if(Bp(a===e.length),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];const o=r[0]===r[1];r[0]>r[a-1]&&(r=[...r].reverse(),e=[...e].reverse());const c=dF(e,s,i),h=c.length,f=m=>{if(o&&m<r[0])return e[0];let g=0;if(h>1)for(;g<r.length-2&&!(m<r[g+1]);g++);const x=Gf(r[g],r[g+1],m);return c[g](x)};return t?m=>f(Ri(r[0],r[a-1],m)):f}function uF(r,e){const t=r[r.length-1];for(let s=1;s<=e;s++){const i=Gf(0,e,s);r.push(_t(t,1,i))}}function IT(r){const e=[0];return uF(e,r.length-1),e}function hF(r,e){return r.map(t=>t*e)}function fF(r,e){return r.map(()=>e||wT).splice(0,r.length-1)}function Ap({duration:r=300,keyframes:e,times:t,ease:s="easeInOut"}){const i=NO(s)?s.map(F_):F_(s),a={done:!1,value:e[0]},o=hF(t&&t.length===e.length?t:IT(e),r),c=Tk(o,e,{ease:Array.isArray(i)?i:fF(e,i)});return{calculatedDuration:r,next:h=>(a.value=c(h),a.done=h>=r,a)}}const mF=r=>r!==null;function Dv(r,{repeat:e,repeatType:t="loop"},s,i=1){const a=r.filter(mF),c=i<0||e&&t!=="loop"&&e%2===1?0:a.length-1;return!c||s===void 0?a[c]:s}const pF={decay:Y2,inertia:Y2,tween:Ap,keyframes:Ap,spring:Ib};function LT(r){typeof r.type=="string"&&(r.type=pF[r.type])}class Pk{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const gF=r=>r/100;class Lb extends Pk{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,i;const{motionValue:t}=this.options;t&&t.updatedAt!==yn.now()&&this.tick(yn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;LT(e);const{type:t=Ap,repeat:s=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=e;let{keyframes:c}=e;const h=t||Ap;h!==Ap&&typeof c[0]!="number"&&(this.mixKeyframes=z0(gF,PT(c[0],c[1])),c=[0,100]);const f=h({...e,keyframes:c});a==="mirror"&&(this.mirroredGenerator=h({...e,keyframes:[...c].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Ck(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=f}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:s,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:c,calculatedDuration:h}=this;if(this.startTime===null)return s.next(0);const{delay:f=0,keyframes:m,repeat:g,repeatType:x,repeatDelay:y,type:v,onUpdate:j,finalKeyframe:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const S=this.currentTime-f*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?S<0:S>i;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,M=s;if(g){const D=Math.min(this.currentTime,i)/c;let O=Math.floor(D),$=D%1;!$&&D>=1&&($=1),$===1&&O--,O=Math.min(O,g+1),!!(O%2)&&(x==="reverse"?($=1-$,y&&($-=y/c)):x==="mirror"&&(M=o)),E=Ri(0,1,$)*c}let R;A?(this.delayState.value=m[0],R=this.delayState):R=M.next(E),a&&!A&&(R.value=a(R.value));let{done:I}=R;!A&&h!==null&&(I=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return F&&v!==Y2&&(R.value=Dv(m,this.options,N,this.speed)),j&&j(R.value),F&&this.finish(),R}then(e,t){return this.finished.then(e,t)}get duration(){return qr(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+qr(e)}get time(){return qr(this.currentTime)}set time(e){e=br(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const t=this.generator.next(e).value;return MT(s=>this.generator.next(s).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(yn.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=qr(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:e=tF,startTime:t}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=t??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function xF(r){for(let e=1;e<r.length;e++)r[e]??(r[e]=r[e-1])}const Fc=r=>r*180/Math.PI,J2=r=>{const e=Fc(Math.atan2(r[1],r[0]));return Q2(e)},yF={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:J2,rotateZ:J2,skewX:r=>Fc(Math.atan(r[1])),skewY:r=>Fc(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},Q2=r=>(r=r%360,r<0&&(r+=360),r),W_=J2,G_=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),q_=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),bF={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:G_,scaleY:q_,scale:r=>(G_(r)+q_(r))/2,rotateX:r=>Q2(Fc(Math.atan2(r[6],r[5]))),rotateY:r=>Q2(Fc(Math.atan2(-r[2],r[0]))),rotateZ:W_,rotate:W_,skewX:r=>Fc(Math.atan(r[4])),skewY:r=>Fc(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function Z2(r){return r.includes("scale")?1:0}function ej(r,e){if(!r||r==="none")return Z2(e);const t=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(t)s=bF,i=t;else{const c=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=yF,i=c}if(!i)return Z2(e);const a=s[e],o=i[1].split(",").map(wF);return typeof a=="function"?a(o):o[a]}const vF=(r,e)=>{const{transform:t="none"}=getComputedStyle(r);return ej(t,e)};function wF(r){return parseFloat(r.trim())}const sm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],nm=new Set(sm),K_=r=>r===tm||r===Ne,jF=new Set(["x","y","z"]),NF=sm.filter(r=>!jF.has(r));function kF(r){const e=[];return NF.forEach(t=>{const s=r.getValue(t);s!==void 0&&(e.push([t,s.get()]),s.set(t.startsWith("scale")?1:0))}),e}const sc={width:({x:r},{paddingLeft:e="0",paddingRight:t="0",boxSizing:s})=>{const i=r.max-r.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(t)},height:({y:r},{paddingTop:e="0",paddingBottom:t="0",boxSizing:s})=>{const i=r.max-r.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(t)},top:(r,{top:e})=>parseFloat(e),left:(r,{left:e})=>parseFloat(e),bottom:({y:r},{top:e})=>parseFloat(e)+(r.max-r.min),right:({x:r},{left:e})=>parseFloat(e)+(r.max-r.min),x:(r,{transform:e})=>ej(e,"x"),y:(r,{transform:e})=>ej(e,"y")};sc.translateX=sc.x;sc.translateY=sc.y;const cu=new Set;let tj=!1,sj=!1,nj=!1;function DT(){if(sj){const r=Array.from(cu).filter(s=>s.needsMeasurement),e=new Set(r.map(s=>s.element)),t=new Map;e.forEach(s=>{const i=kF(s);i.length&&(t.set(s,i),s.render())}),r.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=t.get(s);i&&i.forEach(([a,o])=>{var c;(c=s.getValue(a))==null||c.set(o)})}),r.forEach(s=>s.measureEndState()),r.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}sj=!1,tj=!1,cu.forEach(r=>r.complete(nj)),cu.clear()}function OT(){cu.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(sj=!0)})}function SF(){nj=!0,OT(),DT(),nj=!1}class Rk{constructor(e,t,s,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=s,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(cu.add(this),tj||(tj=!0,et.read(OT),et.resolveKeyframes(DT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:s,motionValue:i}=this;if(e[0]===null){const a=i==null?void 0:i.get(),o=e[e.length-1];if(a!==void 0)e[0]=a;else if(s&&t){const c=s.readValue(t,o);c!=null&&(e[0]=c)}e[0]===void 0&&(e[0]=o),i&&a===void 0&&i.set(e[0])}xF(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),cu.delete(this)}cancel(){this.state==="scheduled"&&(cu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const AF=r=>r.startsWith("--");function FT(r,e,t){AF(e)?r.style.setProperty(e,t):r.style[e]=t}const _F={};function Mk(r,e){const t=hT(r);return()=>_F[e]??t()}const Ik=Mk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),BT=Mk(()=>window.ViewTimeline!==void 0,"viewTimeline"),$T=Mk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Zm=([r,e,t,s])=>`cubic-bezier(${r}, ${e}, ${t}, ${s})`,X_={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zm([0,.65,.55,1]),circOut:Zm([.55,0,1,.45]),backIn:Zm([.31,.01,.66,-.59]),backOut:Zm([.33,1.53,.69,.99])};function UT(r,e){if(r)return typeof r=="function"?$T()?RT(r,e):"ease-out":jT(r)?Zm(r):Array.isArray(r)?r.map(t=>UT(t,e)||X_.easeOut):X_[r]}function EF(r,e,t,{delay:s=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:c="easeOut",times:h}={},f=void 0){const m={[e]:t};h&&(m.offset=h);const g=UT(c,i);Array.isArray(g)&&(m.easing=g);const x={delay:s,duration:i,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return f&&(x.pseudoElement=f),r.animate(m,x)}function HT(r){return typeof r=="function"&&"applyToOptions"in r}function CF({type:r,...e}){return HT(r)&&$T()?r.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class zT extends Pk{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:s,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:c,onComplete:h}=e;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=e,Bp(typeof e.type!="string");const f=CF(e);this.animation=EF(t,s,i,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const m=Dv(i,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),FT(t,s,m),this.animation.cancel()}h==null||h(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,s,i;const e=(t=this.options)==null?void 0:t.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var t,s;const e=((s=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:s.call(t).duration)||0;return qr(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+qr(e)}get time(){return qr(Number(this.animation.currentTime)||0)}set time(e){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=br(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:s,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Ik()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),s&&(this.animation.rangeEnd=s),Bn):i(this)}}const VT={anticipate:yT,backInOut:xT,circInOut:vT};function TF(r){return r in VT}function PF(r){typeof r.ease=="string"&&TF(r.ease)&&(r.ease=VT[r.ease])}const x2=10;class RF extends zT{constructor(e){PF(e),LT(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:s,onComplete:i,element:a,...o}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const c=new Lb({...o,autoplay:!1}),h=Math.max(x2,yn.now()-this.startTime),f=Ri(0,x2,h-x2),m=c.sample(h).value,{name:g}=this.options;a&&g&&FT(a,g,m),t.setWithVelocity(c.sample(Math.max(0,h-f)).value,m,f),c.stop()}}const Y_=(r,e)=>e==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(Pi.test(r)||r==="0")&&!r.startsWith("url("));function MF(r){const e=r[0];if(r.length===1)return!0;for(let t=0;t<r.length;t++)if(r[t]!==e)return!0}function IF(r,e,t,s){const i=r[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const a=r[r.length-1],o=Y_(i,e),c=Y_(a,e);return!o||!c?!1:MF(r)||(t==="spring"||HT(t))&&s}function rj(r){r.duration=0,r.type="keyframes"}const WT=new Set(["opacity","clipPath","filter","transform"]),LF=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function DF(r){for(let e=0;e<r.length;e++)if(typeof r[e]=="string"&&LF.test(r[e]))return!0;return!1}const OF=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),FF=hT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function BF(r){var g;const{motionValue:e,name:t,repeatDelay:s,repeatType:i,damping:a,type:o,keyframes:c}=r;if(!(((g=e==null?void 0:e.owner)==null?void 0:g.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:m}=e.owner.getProps();return FF()&&t&&(WT.has(t)||OF.has(t)&&DF(c))&&(t!=="transform"||!m)&&!f&&!s&&i!=="mirror"&&a!==0&&o!=="inertia"}const $F=40;class UF extends Pk{constructor({autoplay:e=!0,delay:t=0,type:s="
63keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:c,name:h,motionValue:f,element:m,...g}){var v;super(),this.stop=()=>{var j,N;this._animation&&(this._animation.stop(),(j=this.stopTimeline)==null||j.call(this)),(N=this.keyframeResolver)==null||N.cancel()},this.createdAt=yn.now();const x={autoplay:e,delay:t,type:s,repeat:i,repeatDelay:a,repeatType:o,name:h,motionValue:f,element:m,...g},y=(m==null?void 0:m.KeyframeResolver)||Rk;this.keyframeResolver=new y(c,(j,N,S)=>this.onKeyframesResolved(j,N,x,!S),h,f,m),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,t,s,i){var S,A;this.keyframeResolver=void 0;const{name:a,type:o,velocity:c,delay:h,isHandoff:f,onUpdate:m}=s;this.resolvedAt=yn.now();let g=!0;IF(e,a,o,c)||(g=!1,(ic.instantAnimations||!h)&&(m==null||m(Dv(e,s,t))),e[0]=e[e.length-1],rj(s),s.repeat=0);const y={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>$F?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...s,keyframes:e},v=g&&!f&&BF(y),j=(A=(S=y.motionValue)==null?void 0:S.owner)==null?void 0:A.current;let N;if(v)try{N=new RF({...y,element:j})}catch{N=new Lb(y)}else N=new Lb(y);N.finished.then(()=>{this.notifyFinished()}).catch(Bn),this.pendingTimeline&&(this.stopTimeline=N.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=N}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),SF()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function GT(r,e,t,s=0,i=1){const a=Array.from(r).sort((f,m)=>f.sortNodePosition(m)).indexOf(e),o=r.size,c=(o-1)*s;return typeof t=="function"?t(a,o):i===1?a*s:c-a*s}const HF=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zF(r){const e=HF.exec(r);if(!e)return[,];const[,t,s,i]=e;return[`--${t??s}`,i]}function qT(r,e,t=1){const[s,i]=zF(r);if(!s)return;const a=window.getComputedStyle(e).getPropertyValue(s);if(a){const o=a.trim();return cT(o)?parseFloat(o):o}return Sk(i)?qT(i,e,t+1):i}const VF={type:"spring",stiffness:500,damping:25,restSpeed:10},WF=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),GF={type:"keyframes",duration:.8},qF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KF=(r,{keyframes:e})=>e.length>2?GF:nm.has(r)?r.startsWith("scale")?WF(e[1]):VF:qF;function KT(r,e){if(r!=null&&r.inherit&&e){const{inherit:t,...s}=r;return{...e,...s}}return r}function Lk(r,e){const t=(r==null?void 0:r[e])??(r==null?void 0:r.default)??r;return t!==r?KT(t,r):t}const XF=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function YF(r){for(const e in r)if(!XF.has(e))return!0;return!1}const Dk=(r,e,t,s={},i,a)=>o=>{const c=Lk(s,r)||{},h=c.delay||s.delay||0;let{elapsed:f=0}=s;f=f-br(h);const m={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...c,delay:-f,onUpdate:x=>{e.set(x),c.onUpdate&&c.onUpdate(x)},onComplete:()=>{o(),c.onComplete&&c.onComplete()},name:r,motionValue:e,element:a?void 0:i};YF(c)||Object.assign(m,KF(r,m)),m.duration&&(m.duration=br(m.duration)),m.repeatDelay&&(m.repeatDelay=br(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(rj(m),m.delay===0&&(g=!0)),(ic.instantAnimations||ic.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(g=!0,rj(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,g&&!a&&e.get()!==void 0){const x=Dv(m.keyframes,c);if(x!==void 0){et.update(()=>{m.onUpdate(x),m.onComplete()});return}}return c.isSync?new Lb(m):new UF(m)};function J_(r){const e=[{},{}];
vendor: 50,954 bytes, line 63
63return r==null||r.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function Ok(r,e,t,s){if(typeof e=="function"){const[i,a]=J_(s);e=e(t!==void 0?t:r.custom,i,a)}if(typeof e=="string"&&(e=r.variants&&r.variants[e]),typeof e=="function"){const[i,a]=J_(s);e=e(t!==void 0?t:r.custom,i,a)}return e}function du(r,e,t){const s=r.getProps();return Ok(s,e,t!==void 0?t:s.custom,r)}const XT=new Set(["width","height","top","left","right","bottom",...sm]),Q_=30,JF=r=>!isNaN(parseFloat(r)),_p={current:void 0};class QF{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var a;const i=yn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=yn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=JF(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new wk);const s=this.events[e].add(t);return e==="change"?()=>{s(),et.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,s){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return _p.current&&_p.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=yn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Q_)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Q_);return jk(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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(){var e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _i(r,e){return new QF(r,e)}const ij=r=>Array.isArray(r);function ZF(r,e,t){r.hasValue(e)?r.getValue(e).set(t):r.addValue(e,_i(t))}function e8(r){return ij(r)?r[r.length-1]||0:r}function t8(r,e){const t=du(r,e);let{transitionEnd:s={},transition:i={},...a}=t||{};a={...a,...s};for(const o in a){const c=e8(a[o]);ZF(r,o,c)}}const Gs=r=>!!(r&&r.getVelocity);function s8(r){return!!(Gs(r)&&r.add)}function aj(r,e){const t=r.getValue("willChange");if(s8(t))return t.add(e);if(!t&&ic.WillChange){const s=new ic.WillChange("auto");r.addValue("willChange",s),s.add(e)}}function Fk(r){return r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const n8="framerAppearId",YT="data-"+Fk(n8);function JT(r){return r.props[YT]}function r8({protectedKeys:r,needsAnimating:e},t){const s=r.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,s}function QT(r,e,{delay:t=0,transitionOverride:s,type:i}={}){let{transition:a,transitionEnd:o,...c}=e;const h=r.getDefaultTransition();a=a?KT(a,h):h;const f=a==null?void 0:a.reduceMotion;s&&(a=s);const m=[],g=i&&r.animationState&&r.animationState.getState()[i];for(const x in c){const y=r.getValue(x,r.latestValues[x]??null),v=c[x];if(v===void 0||g&&r8(g,x))continue;const j={delay:t,...Lk(a||{},x)},N=y.get();if(N!==void 0&&!y.isAnimating()&&!Array.isArray(v)&&v===N&&!j.velocity){et.update(()=>y.set(v));continue}let S=!1;if(window.MotionHandoffAnimation){const M=JT(r);if(M){const R=window.MotionHandoffAnimation(M,x,et);R!==null&&(j.startTime=R,S=!0)}}aj(r,x);const A=f??r.shouldReduceMotion;y.start(Dk(x,y,v,A&&XT.has(x)?{type:!1}:j,r,S));const E=y.animation;E&&m.push(E)}if(o){const x=()=>et.update(()=>{o&&t8(r,o)});m.length?Promise.all(m).then(x):x()}return m}function oj(r,e,t={}){var h;const s=du(r,e,t.type==="exit"?(h=r.presenceContext)==null?void 0:h.custom:void 0);let{transition:i=r.getDefaultTransition()||{}}=s||{};t.transitionOverride&&(i=t.transitionOverride);const a=s?()=>Promise.all(QT(r,s,t)):()=>Promise.resolve(),o=r.variantChildren&&r.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:g,staggerDirection:x}=i;return i8(r,e,f,m,g,x,t)}:()=>Promise.resolve(),{when:c}=i;if(c){const[f,m]=c==="beforeChildren"?[a,o]:[o,a];return f().then(()=>m())}else return Promise.all([a(),o(t.delay)])}function i8(r,e,t=0,s=0,i=0,a=1,o){const c=[];for(const h of r.variantChildren)h.notify("AnimationStart",e),c.push(oj(h,e,{...o,delay:t+(typeof s=="function"?0:s)+GT(r.variantChildren,h,s,i,a)}).then(()=>h.notify("AnimationComplete",e)));return Promise.all(c)}function a8(r,e,t={}){r.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(a=>oj(r,a,t));s=Promise.all(i)}else if(typeof e=="string")s=oj(r,e,t);else{const i=typeof e=="function"?du(r,e,t.custom):e;s=Promise.all(QT(r,i,t))}return s.then(()=>{r.notify("AnimationComplete",e)})}const o8={test:r=>r==="auto",parse:r=>r},ZT=r=>e=>e.test(r),e4=[tm,Ne,xa,sl,DO,LO,o8],Z_=r=>e4.find(ZT(r));function l8(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||uT(r):!0}const c8=new Set(["brightness","contrast","saturate","opacity"]);function d8(r){const[e,t]=r.slice(0,-1).split("(");if(e==="drop-shadow")return r;const[s]=t.match(Ak)||[];if(!s)return r;const i=t.replace(s,"");let a=c8.has(e)?1:0;return s!==t&&(a*=100),e+"("+a+i+")"}const u8=/\b([a-z-]*)\(.*?\)/gu,lj={...Pi,getAnimatableNone:r=>{const e=r.match(u8);return e?e.map(d8).join(" "):r}},cj={...Pi,getAnimatableNone:r=>{const e=Pi.parse(r);return Pi.createTransformer(r)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},eE={...tm,transform:Math.round},h8={rotate:sl,rotateX:sl,rotateY:sl,rotateZ:sl,scale:uy,scaleX:uy,scaleY:uy,scaleZ:uy,skew:sl,skewX:sl,skewY:sl,distance:Ne,translateX:Ne,translateY:Ne,translateZ:Ne,x:Ne,y:Ne,z:Ne,perspective:Ne,transformPerspective:Ne,opacity:$p,originX:$_,originY:$_,originZ:Ne},Bk={borderWidth:Ne,borderTopWidth:Ne,borderRightWidth:Ne,borderBottomWidth:Ne,borderLeftWidth:Ne,borderRadius:Ne,borderTopLeftRadius:Ne,borderTopRightRadius:Ne,borderBottomRightRadius:Ne,borderBottomLeftRadius:Ne,width:Ne,maxWidth:Ne,height:Ne,maxHeight:Ne,top:Ne,right:Ne,bottom:Ne,left:Ne,inset:Ne,insetBlock:Ne,insetBlockStart:Ne,insetBlockEnd:Ne,insetInline:Ne,insetInlineStart:Ne,insetInlineEnd:Ne,padding:Ne,paddingTop:Ne,paddingRight:Ne,paddingBottom:Ne,paddingLeft:Ne,paddingBlock:Ne,paddingBlockStart:Ne,paddingBlockEnd:Ne,paddingInline:Ne,paddingInlineStart:Ne,paddingInlineEnd:Ne,margin:Ne,marginTop:Ne,marginRight:Ne,marginBottom:Ne,marginLeft:Ne,marginBlock:Ne,marginBlockStart:Ne,marginBlockEnd:Ne,marginInline:Ne,marginInlineStart:Ne,marginInlineEnd:Ne,fontSize:Ne,backgroundPositionX:Ne,backgroundPositionY:Ne,...h8,zIndex:eE,fillOpacity:$p,strokeOpacity:$p,numOctaves:eE},f8={...Bk,color:os,backgroundColor:os,outlineColor:os,fill:os,stroke:os,borderColor:os,borderTopColor:os,borderRightColor:os,borderBottomColor:os,borderLeftColor:os,filter:lj,WebkitFilter:lj,mask:cj,WebkitMask:cj},t4=r=>f8[r],m8=new Set([lj,cj]);function s4(r,e){let t=t4(r);return m8.has(t)||(t=Pi),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const p8=new Set(["auto","none","0"]);function g8(r,e,t){let s=0,i;for(;s<r.length&&!i;){const a=r[s];typeof a=="string"&&!p8.has(a)&&qf(a).values.length&&(i=r[s]),s++}if(i&&t)for(const a of e)r[a]=s4(t,i)}class x8 extends Rk{constructor(e,t,s,i,a){super(e,t,s,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:s}=this;if(!t||!t.current)return;super.readKeyframes();for(let m=0;m<e.length;m++){let g=e[m];if(typeof g=="string"&&(g=g.trim(),Sk(g))){const x=qT(g,t.current);x!==void 0&&(e[m]=x),m===e.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!XT.has(s)||e.length!==2)return;const[i,a]=e,o=Z_(i),c=Z_(a),h=B_(i),f=B_(a);if(h!==f&&sc[s]){this.needsMeasurement=!0;return}if(o!==c)if(K_(o)&&K_(c))for(let m=0;m<e.length;m++){const g=e[m];typeof g=="string"&&(e[m]=parseFloat(g))}else sc[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||l8(e[i]))&&s.push(i);s.length&&g8(e,s,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=sc[s](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var c;const{element:e,name:t,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);const a=s.length-1,o=s[a];s[a]=sc[t](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEach(([h,f])=>{e.getValue(h).set(f)}),this.resolveNoneKeyframes()}}function n4(r,e,t){if(r==null)return[];if(r instanceof EventTarget)return[r];if(typeof r=="string"){const i=document.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r).filter(s=>s!=null)}const r4=(r,e)=>e&&typeof r=="number"?e.transform(r):r;function Ep(r){return dT(r)&&"offsetHeight"in r&&!("ownerSVGElement"in r)}const{schedule:$k}=NT(queueMicrotask,!1),li={x:!1,y:!1};function i4(){return li.x||li.y}function y8(r){return r==="x"||r==="y"?li[r]?null:(li[r]=!0,()=>{li[r]=!1}):li.x||li.y?null:(li.x=li.y=!0,()=>{li.x=li.y=!1})}function a4(r,e){const t=n4(r),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[t,i,()=>s.abort()]}function b8(r){return!(r.pointerType==="touch"||i4())}function v8(r,e,t={}){const[s,i,a]=a4(r,t);return s.forEach(o=>{let c=!1,h=!1,f;const m=()=>{o.removeEventListener("pointerleave",v)},g=N=>{f&&(f(N),f=void 0),m()},x=N=>{c=!1,window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),h&&(h=!1,g(N))},y=()=>{c=!0,window.addEventListener("pointerup",x,i),window.addEventListener("pointercancel",x,i)},v=N=>{if(N.pointerType!=="touch"){if(c){h=!0;return}g(N)}},j=N=>{if(!b8(N))return;h=!1;const S=e(o,N);typeof S=="function"&&(f=S,o.addEventListener("pointerleave",v,i))};o.addEventListener("pointerenter",j,i),o.addEventListener("pointerdown",y,i)}),a}const o4=(r,e)=>e?r===e?!0:o4(r,e.parentElement):!1,Uk=r=>r.pointerType==="mouse"?typeof r.button!="number"||r.button<=0:r.isPrimary!==!1,w8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function j8(r){return w8.has(r.tagName)||r.isContentEditable===!0}const N8=new Set(["INPUT","SELECT","TEXTAREA"]);function k8(r){return N8.has(r.tagName)||r.isContentEditable===!0}const Fy=new WeakSet;function tE(r){return e=>{e.key==="Enter"&&r(e)}}function y2(r,e){r.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const S8=(r,e)=>{const t=r.currentTarget;if(!t)return;const s=tE(()=>{if(Fy.has(t))return;y2(t,"down");const i=tE(()=>{y2(t,"up")}),a=()=>y2(t,"cancel");t.addEventListener("keyup",i,e),t.addEventListener("blur",a,e)});t.addEventListener("keydown",s,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",s),e)};function sE(r){return Uk(r)&&!i4()}const nE=new WeakSet;function A8(r,e,t={}){const[s,i,a]=a4(r,t),o=c=>{const h=c.currentTarget;if(!sE(c)||nE.has(c))return;Fy.add(h),t.stopPropagation&&nE.add(c);const f=e(h,c),m=(y,v)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",x),Fy.has(h)&&Fy.delete(h),sE(y)&&typeof f=="function"&&f(y,{success:v})},g=y=>{m(y,h===window||h===document||t.useGlobalTarget||o4(h,y.target))},x=y=>{m(y,!1)};window.addEventListener("pointerup",g,i),window.addEventListener("pointercancel",x,i)};return s.forEach(c=>{(t.useGlobalTarget?window:c).addEventListener("pointerdown",o,i),Ep(c)&&(c.addEventListener("focus",f=>S8(f,i)),!j8(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),a}function Hk(r){return dT(r)&&"ownerSVGElement"in r}const By=new WeakMap;let nl;const l4=(r,e,t)=>(s,i)=>i&&i[0]?i[0][r+"Size"]:Hk(s)&&"getBBox"in s?s.getBBox()[e]:s[t],_8=l4("inline","width","offsetWidth"),E8=l4("block","height","offsetHeight");function C8({target:r,borderBoxSize:e}){var t;(t=By.get(r))==null||t.forEach(s=>{s(r,{get width(){return _8(r,e)},get height(){return E8(r,e)}})})}function T8(r){r.forEach(C8)}function P8(){typeof ResizeObserver>"u"||(nl=new ResizeObserver(T8))}function R8(r,e){nl||P8();const t=n4(r);return t.forEach(s=>{let i=By.get(s);i||(i=new Set,By.set(s,i)),i.add(e),nl==null||nl.observe(s)}),()=>{t.forEach(s=>{const i=By.get(s);i==null||i.delete(e),i!=null&&i.size||nl==null||nl.unobserve(s)})}}const $y=new Set;let uh;function M8(){uh=()=>{const r={get width(){return window.innerWidth},get height(){return window.innerHeight}};$y.forEach(e=>e(r))},window.addEventListener("resize",uh)}function I8(r){return $y.add(r),uh||M8(),()=>{$y.delete(r),!$y.size&&typeof uh=="function"&&(window.removeEventListener("resize",uh),uh=void 0)}}function dj(r,e){return typeof r=="function"?I8(r):R8(r,e)}function c4(r,e){let t;const s=()=>{const{currentTime:i}=e,o=(i===null?0:i.value)/100;t!==o&&r(o),t=o};return et.preUpdate(s,!0),()=>Yr(s)}function L8(r){return Hk(r)&&r.tagName==="svg"}function D8(...r){const e=!Array.isArray(r[0]),t=e?0:-1,s=r[0+t],i=r[1+t],a=r[2+t],o=r[3+t],c=Tk(i,a,o);return e?c(s):c}const O8=[...e4,os,Pi],F8=r=>O8.find(ZT(r)),rE=()=>({translate:0,scale:1,origin:0,originPoint:0}),hh=()=>({x:rE(),y:rE()}),iE=()=>({min:0,max:0}),gs=()=>({x:iE(),y:iE()}),B8=new WeakMap;function Ov(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function Up(r){return typeof r=="string"||Array.isArray(r)}const zk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vk=["initial",...zk];function Fv(r){return Ov(r.animate)||Vk.some(e=>Up(r[e]))}function d4(r){return!!(Fv(r)||r.variants)}function $8(r,e,t){for(const s in e){const i=e[s],a=t[s];if(Gs(i))r.addValue(s,i);else if(Gs(a))r.addValue(s,_i(i,{owner:r}));else if(a!==i)if(r.hasValue(s)){const o=r.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=r.getStaticValue(s);r.addValue(s,_i(o!==void 0?o:i,{owner:r}))}}for(const s in t)e[s]===void 0&&r.removeValue(s);return e}const uj={current:null},u4={current:!1},U8=typeof window<"u";function H8(){if(u4.current=!0,!!U8)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),e=()=>uj.current=r.matches;r.addEventListener("change",e),e()}else uj.current=!1}const aE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Db={};function h4(r){Db=r}function z8(){return Db}class V8{scrapeMotionValuesFromProps(e,t,s){return{}}constructor({parent:e,props:t,presenceContext:s,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:o,visualState:c},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Rk,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 y=yn.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,et.render(this.render,!1,!0))};const{latestValues:f,renderState:m}=c;this.latestValues=f,this.baseTarget={...f},this.initialValues=t.initial?{...f}:{},this.renderState=m,this.parent=e,this.props=t,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=h,this.blockInitialAnimation=!!o,this.isControllingVariants=Fv(t),this.isVariantNode=d4(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:g,...x}=this.scrapeMotionValuesFromProps(t,{},this);for(const y in x){const v=x[y];f[y]!==void 0&&Gs(v)&&v.set(f[y])}}mount(e){var t,s;if(this.hasBeenMounted)for(const i in this.initialValues)(t=this.values.get(i))==null||t.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,B8.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(u4.current||H8(),this.shouldReduceMotion=uj.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),Yr(this.notifyUpdate),Yr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&WT.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:c,times:h,ease:f,duration:m}=t.accelerate,g=new zT({element:this.current,name:e,keyframes:c,times:h,ease:f,duration:br(m)}),x=o(g);this.valueSubscriptions.set(e,()=>{x(),g.cancel()});return}const s=nm.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&et.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Db){const t=Db[e];if(!t)continue;const{isEnabled:s,Feature:i}=t;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const a=this.features[e];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):gs()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let s=0;s<aE.length;s++){const i=aE[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=e[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=$8(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const s=this.values.get(e);t!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&t!==void 0&&(s=_i(t===null?void 0:t,{owner:this}),this.addValue(e,s)),s}readValue(e,t){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(cT(s)||uT(s))?s=parseFloat(s):!F8(s)&&Pi.test(t)&&(s=s4(e,t)),this.setBaseTarget(e,Gs(s)?s.get():s)),Gs(s)?s.get():s}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var a;const{initial:t}=this.props;let s;if(typeof t=="string"||typeof t=="object"){const o=Ok(this.props,t,(a=this.presenceContext)==null?void 0:a.custom);o&&(s=o[e])}if(t&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Gs(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new wk),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){$k.render(this.render)}}class f4 extends V8{constructor(){super(...arguments),this.KeyframeResolver=x8}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const s=e.style;return s?s[t]:void 0}removeValueFromRenderState(e,{vars:t,style:s}){delete t[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Gs(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class cc{constructor(e){this.isMounted=!1,this.node=e}update(){}}function m4({top:r,left:e,right:t,bottom:s}){return{x:{min:e,max:t},y:{min:r,max:s}}}function W8({x:r,y:e}){return{top:e.min,right:r.max,bottom:e.max,left:r.min}}function G8(r,e){if(!e)return r;const t=e({x:r.left,y:r.top}),s=e({x:r.right,y:r.bottom});return{top:t.y,left:t.x,bottom:s.y,right:s.x}}function b2(r){return r===void 0||r===1}function hj({scale:r,scaleX:e,scaleY:t}){return!b2(r)||!b2(e)||!b2(t)}function Cc(r){return hj(r)||p4(r)||r.z||r.rotate||r.rotateX||r.rotateY||r.skewX||r.skewY}function p4(r){return oE(r.x)||oE(r.y)}function oE(r){return r&&r!=="0%"}function Ob(r,e,t){const s=r-t,i=e*s;return t+i}function lE(r,e,t,s,i){return i!==void 0&&(r=Ob(r,i,s)),Ob(r,t,s)+e}function fj(r,e=0,t=1,s,i){r.min=lE(r.min,e,t,s,i),r.max=lE(r.max,e,t,s,i)}function g4(r,{x:e,y:t}){fj(r.x,e.translate,e.scale,e.originPoint),fj(r.y,t.translate,t.scale,t.originPoint)}const cE=.999999999999,dE=1.0000000000001;function q8(r,e,t,s=!1){var c;const i=t.length;if(!i)return;e.x=e.y=1;let a,o;for(let h=0;h<i;h++){a=t[h],o=a.projectionDelta;const{visualElement:f}=a.options;f&&f.props.style&&f.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ma(r.x,-a.scroll.offset.x),ma(r.y,-a.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,g4(r,o)),s&&Cc(a.latestValues)&&Uy(r,a.latestValues,(c=a.layout)==null?void 0:c.layoutBox))}e.x<dE&&e.x>cE&&(e.x=1),e.y<dE&&e.y>cE&&(e.y=1)}function ma(r,e){r.min+=e,r.max+=e}function uE(r,e,t,s,i=.5){const a=_t(r.min,r.max,i);fj(r,e,t,a,s)}function hE(r,e){return typeof r=="string"?parseFloat(r)/100*(e.max-e.min):r}function Uy(r,e,t){const s=t??r;uE(r.x,hE(e.x,s.x),e.scaleX,e.scale,e.originX),uE(r.y,hE(e.y,s.y),e.scaleY,e.scale,e.originY)}function x4(r,e){return m4(G8(r.getBoundingClientRect(),e))}function K8(r,e,t){const s=x4(r,t),{scroll:i}=e;return i&&(ma(s.x,i.offset.x),ma(s.y,i.offset.y)),s}const X8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Y8=sm.length;function J8(r,e,t){let s="",i=!0;for(let a=0;a<Y8;a++){const o=sm[a],c=r[o];if(c===void 0)continue;let h=!0;if(typeof c=="number")h=c===(o.startsWith("scale")?1:0);else{const f=parseFloat(c);h=o.startsWith("scale")?f===1:f===0}if(!h||t){const f=r4(c,Bk[o]);if(!h){i=!1;const m=X8[o]||o;s+=`${m}(${f}) `}t&&(e[o]=f)}}return s=s.trim(),t?s=t(e,i?"":s):i&&(s="none"),s}function Wk(r,e,t){const{style:s,vars:i,transformOrigin:a}=r;let o=!1,c=!1;for(const h in e){const f=e[h];if(nm.has(h)){o=!0;continue}else if(ST(h)){i[h]=f;continue}else{const m=r4(f,Bk[h]);h.startsWith("origin")?(c=!0,a[h]=m):s[h]=m}}if(e.transform||(o||t?s.transform=J8(e,r.transform,t):s.transform&&(s.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:m=0}=a;s.transformOrigin=`${h} ${f} ${m}`}}function y4(r,{style:e,vars:t},s,i){const a=r.style;let o;for(o in e)a[o]=e[o];i==null||i.applyProjectionStyles(a,s);for(o in t)a.setProperty(o,t[o])}function fE(r,e){return e.max===e.min?0:r/(e.max-e.min)*100}const qm={correct:(r,e)=>{if(!e.target)return r;if(typeof r=="string")if(Ne.test(r))r=parseFloat(r);else return r;const t=fE(r,e.target.x),s=fE(r,e.target.y);return`${t}% ${s}%`}},Q8={correct:(r,{treeScale:e,projectionDelta:t})=>{const s=r,i=Pi.parse(r);if(i.length>5)return s;const a=Pi.createTransformer(r),o=typeof i[0]!="number"?1:0,c=t.x.scale*e.x,h=t.y.scale*e.y;i[0+o]/=c,i[1+o]/=h;const f=_t(c,h,.5);return typeof i[2+o]=="number"&&(i[2+o]/=f),typeof i[3+o]=="number"&&(i[3+o]/=f),a(i)}},mj={borderRadius:{...qm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qm,borderTopRightRadius:qm,borderBottomLeftRadius:qm,borderBottomRightRadius:qm,boxShadow:Q8};function b4(r,{layout:e,layoutId:t}){return nm.has(r)||r.startsWith("origin")||(e||t!==void 0)&&(!!mj[r]||r==="opacity")}function Gk(r,e,t){var o;const s=r.style,i=e==null?void 0:e.style,a={};if(!s)return a;for(const c in s)(Gs(s[c])||i&&Gs(i[c])||b4(c,r)||((o=t==null?void 0:t.getValue(c))==null?void 0:o.liveStyle)!==void 0)&&(a[c]=s[c]);return a}function Z8(r){return window.getComputedStyle(r)}class eB extends f4{constructor(){super(...arguments),this.type="html",this.renderInstance=y4}readValueFromInstance(e,t){var s;if(nm.has(t))return(s=this.projection)!=null&&s.isProjecting?Z2(t):vF(e,t);{const i=Z8(e),a=(ST(t)?i.getPropertyValue(t):i[t])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(e,{transformPagePoint:t}){return x4(e,t)}build(e,t,s){Wk(e,t,s.transformTemplate)}scrapeMotionValuesFromProps(e,t,s){return Gk(e,t,s)}}const tB={offset:"stroke-dashoffset",array:"stroke-dasharray"},sB={offset:"strokeDashoffset",array:"strokeDasharray"};function nB(r,e,t=1,s=0,i=!0){r.pathLength=1;const a=i?tB:sB;r[a.offset]=`${-s}`,r[a.array]=`${e} ${t}`}const rB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function v4(r,{attrX:e,attrY:t,attrScale:s,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...c},h,f,m){if(Wk(r,c,f),h){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:g,style:x}=r;g.transform&&(x.transform=g.transform,delete g.transform),(x.transform||g.transformOrigin)&&(x.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),x.transform&&(x.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete g.transformBox);for(const y of rB)g[y]!==void 0&&(x[y]=g[y],delete g[y]);e!==void 0&&(g.x=e),t!==void 0&&(g.y=t),s!==void 0&&(g.scale=s),i!==void 0&&nB(g,i,a,o,!1)}const w4=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"]),j4=r=>typeof r=="string"&&r.toLowerCase()==="svg";function iB(r,e,t,s){y4(r,e,void 0,s);for(const i in e.attrs)r.setAttribute(w4.has(i)?i:Fk(i),e.attrs[i])}function N4(r,e,t){const s=Gk(r,e,t);for(const i in r)if(Gs(r[i])||Gs(e[i])){const a=sm.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[a]=r[i]}return s}class aB extends f4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gs}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(nm.has(t)){const s=t4(t);return s&&s.default||0}return t=w4.has(t)?t:Fk(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,s){return N4(e,t,s)}build(e,t,s){v4(e,t,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,t,s,i){iB(e,t,s,i)}mount(e){this.isSVGTag=j4(e.tagName),super.mount(e)}}const oB=Vk.length;function k4(r){if(!r)return;if(!r.isControllingVariants){const t=r.parent?k4(r.parent)||{}:{};return r.props.initial!==void 0&&(t.initial=r.props.initial),t}const e={};for(let t=0;t<oB;t++){const s=Vk[t],i=r.props[s];(Up(i)||i===!1)&&(e[s]=i)}return e}function S4(r,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==r.length)return!1;for(let s=0;s<t;s++)if(e[s]!==r[s])return!1;return!0}const lB=[...zk].reverse(),cB=zk.length;function dB(r){return e=>Promise.all(e.map(({animation:t,options:s})=>a8(r,t,s)))}function uB(r){let e=dB(r),t=mE(),s=!0,i=!1;const a=f=>(m,g)=>{var y;const x=du(r,g,f==="exit"?(y=r.presenceContext)==null?void 0:y.custom:void 0);if(x){const{transition:v,transitionEnd:j,...N}=x;m={...m,...N,...j}}return m};function o(f){e=f(r)}function c(f){const{props:m}=r,g=k4(r.parent)||{},x=[],y=new Set;let v={},j=1/0;for(let S=0;S<cB;S++){const A=lB[S],E=t[A],M=m[A]!==void 0?m[A]:g[A],R=Up(M),I=A===f?E.isActive:null;I===!1&&(j=S);let F=M===g[A]&&M!==m[A]&&R;if(F&&(s||i)&&r.manuallyAnimateOnMount&&(F=!1),E.protectedKeys={...v},!E.isActive&&I===null||!M&&!E.prevProp||Ov(M)||typeof M=="boolean")continue;if(A==="exit"&&E.isActive&&I!==!0){E.prevResolvedValues&&(v={...v,...E.prevResolvedValues});continue}const D=hB(E.prevProp,M);let O=D||A===f&&E.isActive&&!F&&R||S>j&&R,$=!1;const z=Array.isArray(M)?M:[M];let re=z.reduce(a(A),{});I===!1&&(re={});const{prevResolvedValues:he={}}=E,de={...he,...re},fe=se=>{O=!0,y.has(se)&&($=!0,y.delete(se)),E.needsAnimating[se]=!0;const K=r.getValue(se);K&&(K.liveStyle=!1)};for(const se in de){const K=re[se],Q=he[se];if(v.hasOwnProperty(se))continue;let U=!1;ij(K)&&ij(Q)?U=!S4(K,Q):U=K!==Q,U?K!=null?fe(se):y.add(se):K!==void 0&&y.has(se)?fe(se):E.protectedKeys[se]=!0}E.prevProp=M,E.prevResolvedValues=re,E.isActive&&(v={...v,...re}),(s||i)&&r.blockInitialAnimation&&(O=!1);const oe=F&&D;O&&(!oe||$)&&x.push(...z.map(se=>{const K={type:A};if(typeof se=="string"&&(s||i)&&!oe&&r.manuallyAnimateOnMount&&r.parent){const{parent:Q}=r,U=du(Q,se);if(Q.enteringChildren&&U){const{delayChildren:Z}=U.transition||{};K.delay=GT(Q.enteringChildren,r,Z)}}return{animation:se,options:K}}))}if(y.size){const S={};if(typeof m.initial!="boolean"){const A=du(r,Array.isArray(m.initial)?m.initial[0]:m.initial);A&&A.transition&&(S.transition=A.transition)}y.forEach(A=>{const E=r.getBaseTarget(A),M=r.getValue(A);M&&(M.liveStyle=!0),S[A]=E??null}),x.push({animation:S})}let N=!!x.length;return s&&(m.initial===!1||m.initial===m.animate)&&!r.manuallyAnimateOnMount&&(N=!1),s=!1,i=!1,N?e(x):Promise.resolve()}function h(f,m){var x;if(t[f].isActive===m)return Promise.resolve();(x=r.variantChildren)==null||x.forEach(y=>{var v;return(v=y.animationState)==null?void 0:v.setActive(f,m)}),t[f].isActive=m;const g=c(f);for(const y in t)t[y].protectedKeys={};return g}return{animateChanges:c,setActive:h,setAnimateFunction:o,getState:()=>t,reset:()=>{t=mE(),i=!0}}}function hB(r,e){return typeof e=="string"?e!==r:Array.isArray(e)?!S4(e,r):!1}function Sc(r=!1){return{isActive:r,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mE(){return{animate:Sc(!0),whileInView:Sc(),whileHover:Sc(),whileTap:Sc(),whileDrag:Sc(),whileFocus:Sc(),exit:Sc()}}function pj(r,e){r.min=e.min,r.max=e.max}function ai(r,e){pj(r.x,e.x),pj(r.y,e.y)}function pE(r,e){r.translate=e.translate,r.scale=e.scale,r.originPoint=e.originPoint,r.origin=e.origin}const A4=1e-4,fB=1-A4,mB=1+A4,_4=.01,pB=0-_4,gB=0+_4;function bn(r){return r.max-r.min}function xB(r,e,t){return Math.abs(r-e)<=t}function gE(r,e,t,s=.5){r.origin=s,r.originPoint=_t(e.min,e.max,r.origin),r.scale=bn(t)/bn(e),r.translate=_t(t.min,t.max,r.origin)-r.originPoint,(r.scale>=fB&&r.scale<=mB||isNaN(r.scale))&&(r.scale=1),(r.translate>=pB&&r.translate<=gB||isNaN(r.translate))&&(r.translate=0)}function Cp(r,e,t,s){gE(r.x,e.x,t.x,s?s.originX:void 0),gE(r.y,e.y,t.y,s?s.originY:void 0)}function xE(r,e,t,s=0){const i=s?_t(t.min,t.max,s):t.min;r.min=i+e.min,r.max=r.min+bn(e)}function yB(r,e,t,s){xE(r.x,e.x,t.x,s==null?void 0:s.x),xE(r.y,e.y,t.y,s==null?void 0:s.y)}function yE(r,e,t,s=0){const i=s?_t(t.min,t.max,s):t.min;r.min=e.min-i,r.max=r.min+bn(e)}function Fb(r,e,t,s){yE(r.x,e.x,t.x,s==null?void 0:s.x),yE(r.y,e.y,t.y,s==null?void 0:s.y)}function bE(r,e,t,s,i){return r-=e,r=Ob(r,1/t,s),i!==void 0&&(r=Ob(r,1/i,s)),r}function bB(r,e=0,t=1,s=.5,i,a=r,o=r){if(xa.test(e)&&(e=parseFloat(e),e=_t(o.min,o.max,e/100)-o.min),typeof e!="number")return;let c=_t(a.min,a.max,s);r===a&&(c-=e),r.min=bE(r.min,e,t,c,i),r.max=bE(r.max,e,t,c,i)}function vE(r,e,[t,s,i],a,o){bB(r,e[t],e[s],e[i],e.scale,a,o)}const vB=["x","scaleX","originX"],wB=["y","scaleY","originY"];function wE(r,e,t,s){vE(r.x,e,vB,t?t.x:void 0,s?s.x:void 0),vE(r.y,e,wB,t?t.y:void 0,s?s.y:void 0)}function jE(r){return r.translate===0&&r.scale===1}function E4(r){return jE(r.x)&&jE(r.y)}function NE(r,e){return r.min===e.min&&r.max===e.max}function jB(r,e){return NE(r.x,e.x)&&NE(r.y,e.y)}function kE(r,e){return Math.round(r.min)===Math.round(e.min)&&Math.round(r.max)===Math.round(e.max)}function C4(r,e){return kE(r.x,e.x)&&kE(r.y,e.y)}function SE(r){return bn(r.x)/bn(r.y)}function AE(r,e){return r.translate===e.translate&&r.scale===e.scale&&r.originPoint===e.originPoint}function Vi(r){return[r("x"),r("y")]}function NB(r,e,t){let s="";const i=r.x.translate/e.x,a=r.y.translate/e.y,o=(t==null?void 0:t.z)||0;if((i||a||o)&&(s=`translate3d(${i}px, ${a}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:f,rotate:m,rotateX:g,rotateY:x,skewX:y,skewY:v}=t;f&&(s=`perspective(${f}px) ${s}`),m&&(s+=`rotate(${m}deg) `),g&&(s+=`rotateX(${g}deg) `),x&&(s+=`rotateY(${x}deg) `),y&&(s+=`skewX(${y}deg) `),v&&(s+=`skewY(${v}deg) `)}const c=r.x.scale*e.x,h=r.y.scale*e.y;return(c!==1||h!==1)&&(s+=`scale(${c}, ${h})`),s||"none"}const T4=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],kB=T4.length,_E=r=>typeof r=="string"?parseFloat(r):r,EE=r=>typeof r=="number"||Ne.test(r);function SB(r,e,t,s,i,a){i?(r.opacity=_t(0,t.opacity??1,AB(s)),r.opacityExit=_t(e.opacity??1,0,_B(s))):a&&(r.opacity=_t(e.opacity??1,t.opacity??1,s));for(let o=0;o<kB;o++){const c=T4[o];let h=CE(e,c),f=CE(t,c);if(h===void 0&&f===void 0)continue;h||(h=0),f||(f=0),h===0||f===0||EE(h)===EE(f)?(r[c]=Math.max(_t(_E(h),_E(f),s),0),(xa.test(f)||xa.test(h))&&(r[c]+="%")):r[c]=f}(e.rotate||t.rotate)&&(r.rotate=_t(e.rotate||0,t.rotate||0,s))}function CE(r,e){return r[e]!==void 0?r[e]:r.borderRadius}const AB=P4(0,.5,bT),_B=P4(.5,.95,Bn);function P4(r,e,t){return s=>s<r?0:s>e?1:t(Gf(r,e,s))}function EB(r,e,t){const s=Gs(r)?r:_i(r);return s.start(Dk("",s,e,t)),s.animation}function Hp(r,e,t,s={passive:!0}){return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t)}const CB=(r,e)=>r.depth-e.depth;class TB{constructor(){this.children=[],this.isDirty=!1}add(e){vk(this.children,e),this.isDirty=!0}remove(e){Pb(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(CB),this.isDirty=!1,this.children.forEach(e)}}function PB(r,e){const t=yn.now(),s=({timestamp:i})=>{const a=i-t;a>=e&&(Yr(s),r(a-e))};return et.setup(s,!0),()=>Yr(s)}function Hy(r){return Gs(r)?r.get():r}class RB{constructor(){this.members=[]}add(e){vk(this.members,e);for(let t=this.members.length-1;t>=0;t--){const s=this.members[t];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(Pb(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Pb(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){var t;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((t=i.instance)==null?void 0:t.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,t){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:a}=s.options,{layoutDependency:o}=e.options;(a===void 0||a!==o)&&(e.resumeFrom=s,t&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,s,i,a,o;(s=(t=e.options).onExitComplete)==null||s.call(t),(o=(i=e.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||o.call(a)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const zy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},v2=["","X","Y","Z"],MB=1e3;let IB=0;function w2(r,e,t,s){const{latestValues:i}=e;i[r]&&(t[r]=i[r],e.setStaticValue(r,0),s&&(s[r]=0))}function R4(r){if(r.hasCheckedOptimisedAppear=!0,r.root===r)return;const{visualElement:e}=r.options;if(!e)return;const t=JT(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:i,layoutId:a}=r.options;window.MotionCancelOptimisedAnimation(t,"transform",et,!(i||a))}const{parent:s}=r;s&&!s.hasCheckedOptimisedAppear&&R4(s)}function M4({attachResizeListener:r,defaultParent:e,measureScroll:t,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},c=e==null?void 0:e()){this.id=IB++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(OB),this.nodes.forEach(zB),this.nodes.forEach(VB),this.nodes.forEach(FB)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new TB)}addEventListener(o,c){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new wk),this.eventHandlers.get(o).add(c)}notifyListeners(o,...c){const h=this.eventHandlers.get(o);h&&h.notify(...c)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Hk(o)&&!L8(o),this.instance=o;const{layoutId:c,layout:h,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||c)&&(this.isLayoutDirty=!0),r){let m,g=0;const x=()=>this.root.updateBlockedByResize=!1;et.read(()=>{g=window.innerWidth}),r(o,()=>{const y=window.innerWidth;y!==g&&(g=y,this.root.updateBlockedByResize=!0,m&&m(),m=PB(x,250),zy.hasAnimatedSinceResize&&(zy.hasAnimatedSinceResize=!1,this.nodes.forEach(RE)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:x,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||XB,{onLayoutAnimationStart:j,onLayoutAnimationComplete:N}=f.getProps(),S=!this.targetLayout||!C4(this.targetLayout,y),A=!g&&x;if(this.options.layoutRoot||this.resumeFrom||A||g&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...Lk(v,"layout"),onPlay:j,onComplete:N};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(m,A)}else g||RE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,this.eventHandlers.clear(),Yr(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(WB),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&&R4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,(typeof g.latestValues.x=="string"||typeof g.latestValues.y=="string")&&(g.isLayoutDirty=!0),g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:c,layout:h}=this.options;if(c===void 0&&!h)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach($B),this.nodes.forEach(TE);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(PE);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(UB),this.nodes.forEach(HB),this.nodes.forEach(LB),this.nodes.forEach(DB)):this.nodes.forEach(PE),this.clearAllSnapshots();const c=yn.now();Ts.delta=Ri(0,1e3/60,c-Ts.timestamp),Ts.timestamp=c,Ts.isProcessing=!0,h2.update.process(Ts),h2.preRender.process(Ts),h2.render.process(Ts),Ts.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$k.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BB),this.sharedNodes.forEach(GB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,et.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){et.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!bn(this.snapshot.measuredBox.x)&&!bn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=gs()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(c=!1),c&&this.instance){const h=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:h,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!E4(this.projectionDelta),h=this.getTransformTemplate(),f=h?h(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;o&&this.instance&&(c||Cc(this.latestValues)||m)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const c=this.measurePageBox();let h=this.removeElementScroll(c);return o&&(h=this.removeTransform(h)),YB(h),{animationId:this.root.animationId,measuredBox:c,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:o}=this.options;if(!o)return gs();const c=o.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(JB))){const{scroll:m}=this.root;m&&(ma(c.x,m.offset.x),ma(c.y,m.offset.y))}return c}removeElementScroll(o){var h;const c=gs();if(ai(c,o),(h=this.scroll)!=null&&h.wasRoot)return c;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:g,options:x}=m;m!==this.root&&g&&x.layoutScroll&&(g.wasRoot&&ai(c,o),ma(c.x,g.offset.x),ma(c.y,g.offset.y))}return c}applyTransform(o,c=!1,h){var m,g;const f=h||gs();ai(f,o);for(let x=0;x<this.path.length;x++){const y=this.path[x];!c&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(ma(f.x,-y.scroll.offset.x),ma(f.y,-y.scroll.offset.y)),Cc(y.latestValues)&&Uy(f,y.latestValues,(m=y.layout)==null?void 0:m.layoutBox)}return Cc(this.latestValues)&&Uy(f,this.latestValues,(g=this.layout)==null?void 0:g.layoutBox),f}removeTransform(o){var h;const c=gs();ai(c,o);for(let f=0;f<this.path.length;f++){const m=this.path[f];if(!Cc(m.latestValues))continue;let g;m.instance&&(hj(m.latestValues)&&m.updateSnapshot(),g=gs(),ai(g,m.measurePageBox())),wE(c,m.latestValues,(h=m.snapshot)==null?void 0:h.layoutBox,g)}return Cc(this.latestValues)&&wE(c,this.latestValues),c}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ts.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var y;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==c;if(!(o||h&&this.isSharedProjectionDirty||this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:g}=this.options;if(!this.layout||!(m||g))return;this.resolvedRelativeTargetAt=Ts.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=gs(),this.targetWithTransforms=gs()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),yB(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ai(this.target,this.layout.layoutBox),g4(this.target,this.targetDelta)):ai(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||hj(this.parent.latestValues)||p4(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,c,h){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gs(),this.relativeTargetOrigin=gs(),Fb(this.relativeTargetOrigin,c,h,this.options.layoutAnchor||void 0),ai(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const o=this.getLead(),c=!!this.resumingFrom||this!==o;let h=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&
vendor: 5,333 bytes, line 63
63(h=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Ts.timestamp&&(h=!1),h)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;ai(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,x=this.treeScale.y;q8(this.layoutCorrected,this.treeScale,this.path,c),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=gs());const{target:y}=o;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(pE(this.prevProjectionDelta.x,this.projectionDelta.x),pE(this.prevProjectionDelta.y,this.projectionDelta.y)),Cp(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==x||!AE(this.projectionDelta.x,this.prevProjectionDelta.x)||!AE(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),o){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hh(),this.projectionDelta=hh(),this.projectionDeltaWithTransform=hh()}setAnimationOrigin(o,c=!1){const h=this.snapshot,f=h?h.latestValues:{},m={...this.latestValues},g=hh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const x=gs(),y=h?h.source:void 0,v=this.layout?this.layout.source:void 0,j=y!==v,N=this.getStack(),S=!N||N.members.length<=1,A=!!(j&&!S&&this.options.crossfade===!0&&!this.path.some(KB));this.animationProgress=0;let E;this.mixTargetDelta=M=>{const R=M/1e3;ME(g.x,o.x,R),ME(g.y,o.y,R),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fb(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),qB(this.relativeTarget,this.relativeTargetOrigin,x,R),E&&jB(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=gs()),ai(E,this.relativeTarget)),j&&(this.animationValues=m,SB(m,f,this.latestValues,R,A,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var c,h,f;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(f=(h=this.resumingFrom)==null?void 0:h.currentAnimation)==null||f.stop(),this.pendingAnimation&&(Yr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=et.update(()=>{zy.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_i(0)),this.motionValue.jump(0,!1),this.currentAnimation=EB(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),o.onUpdate&&o.onUpdate(m)},onStop:()=>{},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(MB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:c,target:h,layout:f,latestValues:m}=o;if(!(!c||!h||!f)){if(this!==o&&this.layout&&f&&I4(this.options.animationType,this.layout.layoutBox,f.layoutBox)){h=this.target||gs();const g=bn(this.layout.layoutBox.x);h.x.min=o.target.x.min,h.x.max=h.x.min+g;const x=bn(this.layout.layoutBox.y);h.y.min=o.target.y.min,h.y.max=h.y.min+x}ai(c,h),Uy(c,m),Cp(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(o,c){this.sharedNodes.has(o)||this.sharedNodes.set(o,new RB),this.sharedNodes.get(o).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var c;const{layoutId:o}=this.options;return o?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:o}=this.options;return o?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:c,preserveFollowOpacity:h}={}){const f=this.getStack();f&&f.promote(this,h),o&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 2,646 bytes, line 63
63resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let c=!1;const{latestValues:h}=o;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(c=!0),!c)return;const f={};h.z&&w2("z",o,f,this.animationValues);for(let m=0;m<v2.length;m++)w2(`rotate${v2[m]}`,o,f,this.animationValues),w2(`skew${v2[m]}`,o,f,this.animationValues);o.render();for(const m in f)o.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);o.scheduleRender()}applyProjectionStyles(o,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Hy(c==null?void 0:c.pointerEvents)||"",o.transform=h?h(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Hy(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!Cc(this.latestValues)&&(o.transform=h?h({},""):"none",this.hasProjected=!1);return}o.visibility="";const m=f.animationValues||f.latestValues;this.applyTransformsToTarget();let g=NB(this.projectionDeltaWithTransform,this.treeScale,m);h&&(g=h(m,g)),o.transform=g;const{x,y}=this.projectionDelta;o.transformOrigin=`${x.origin*100}% ${y.origin*100}% 0`,f.animationValues?o.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:o.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const v in mj){if(m[v]===void 0)continue;const{correct:j,applyTo:N,isCSSVariable:S}=mj[v],A=g==="none"?m[v]:j(m[v],f);if(N){const E=N.length;for(let M=0;M<E;M++)o[N[M]]=A}else S?this.options.visualElement.renderState.vars[v]=A:o[v]=A}this.options.layoutId&&(o.pointerEvents=f===this?Hy(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var c;return(c=o.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(TE),this.root.sharedNodes.clear()}}}function LB(r){r.updateLayout()}function DB(r){var t;const e=((t=r.resumeFrom)==null?void 0:t.snapshot)||r.snapshot;if(r.isLead()&&r.layout&&e&&r.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=r.layout,{animationType:a}=r.options,o=e.source!==r.layout.source;if(a==="size")Vi(g=>{const x=o?e.measuredBox[g]:e.layoutBox[g],y=bn(x);x.min=s[g].min,x.max=x.min+y});else if(a==="x"||a==="y"){const g=a==="x"?"y":"x";pj(o?e.measuredBox[g]:e.layoutBox[g],s[g])}
63else I4(a,e.layoutBox,s)&&Vi(g=>{const x=o?e.measuredBox[g]:e.layoutBox[g],y=bn(s[g]);x.max=x.min+y,r.relativeTarget&&!r.currentAnimation&&(r.isProjectionDirty=!0,r.relativeTarget[g].max=r.relativeTarget[g].min+y)});const c=hh();Cp(c,s,e.layoutBox);const h=hh();o?Cp(h,r.applyTransform(i,!0),e.measuredBox):Cp(h,s,e.layoutBox);const f=!E4(c);let m=!1;if(!r.resumeFrom){const g=r.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:x,layout:y}=g;if(x&&y){const v=r.options.layoutAnchor||void 0,j=gs();Fb(j,e.layoutBox,x.layoutBox,v);const N=gs();Fb(N,s,y.layoutBox,v),C4(j,N)||(m=!0),g.options.layoutRoot&&(r.relativeTarget=N,r.relativeTargetOrigin=j,r.relativeParent=g)}}}r.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:h,layoutDelta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:m})}else if(r.isLead()){const{onExitComplete:s}=r.options;s&&s()}r.options.transition=void 0}function OB(r){r.parent&&(r.isProjecting()||(r.isProjectionDirty=r.parent.isProjectionDirty),r.isSharedProjectionDirty||(r.isSharedProjectionDirty=!!(r.isProjectionDirty||r.parent.isProjectionDirty||r.parent.isSharedProjectionDirty)),r.isTransformDirty||(r.isTransformDirty=r.parent.isTransformDirty))}function FB(r){r.isProjectionDirty=r.isSharedProjectionDirty=r.isTransformDirty=!1}function BB(r){r.clearSnapshot()}function TE(r){r.clearMeasurements()}function $B(r){r.isLayoutDirty=!0,r.updateLayout()}function PE(r){r.isLayoutDirty=!1}function UB(r){r.isAnimationBlocked&&r.layout&&!r.isLayoutDirty&&(r.snapshot=r.layout,r.isLayoutDirty=!0)}function HB(r){const{visualElement:e}=r.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),r.resetTransform()}function RE(r){r.finishAnimation(),r.targetDelta=r.relativeTarget=r.target=void 0,r.isProjectionDirty=!0}function zB(r){r.resolveTargetDelta()}function VB(r){r.calcProjection()}function WB(r){r.resetSkewAndRotation()}function GB(r){r.removeLeadSnapshot()}function ME(r,e,t){r.translate=_t(e.translate,0,t),r.scale=_t(e.scale,1,t),r.origin=e.origin,r.originPoint=e.originPoint}function IE(r,e,t,s){r.min=_t(e.min,t.min,s),r.max=_t(e.max,t.max,s)}function qB(r,e,t,s){IE(r.x,e.x,t.x,s),IE(r.y,e.y,t.y,s)}function KB(r){return r.animationValues&&r.animationValues.opacityExit!==void 0}const XB={duration:.45,ease:[.4,0,.1,1]},LE=r=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(r),DE=LE("applewebkit/")&&!LE("chrome/")?Math.round:Bn;function OE(r){r.min=DE(r.min),r.max=DE(r.max)}function YB(r){OE(r.x),OE(r.y)}function I4(r,e,t){return r==="position"||r==="preserve-aspect"&&!xB(SE(e),SE(t),.2)}function JB(r){var e;return r!==r.root&&((e=r.scroll)==null?void 0:e.wasRoot)}const QB=M4({attachResizeListener:(r,e)=>Hp(r,"resize",e),measureScroll:()=>{var r,e;return{x:document.documentElement.scrollLeft||((r=document.body)==null?void 0:r.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),j2={current:void 0},L4=M4({measureScroll:r=>({x:r.scrollLeft,y:r.scrollTop}),defaultParent:()=>{if(!j2.current){const r=new QB({});r.mount(window),r.setOptions({layoutScroll:!0}),j2.current=r}return j2.current},resetTransform:(r,e)=>{r.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:r=>window.getComputedStyle(r).position==="fixed"}),Bv=T.createContext({transformPagePoint:r=>r,isStatic:!1,reducedMotion:"never"});function FE(r,e){if(typeof r=="function")return r(e);r!=null&&(r.current=e)}function ZB(...r){return e=>{let t=!1;const s=r.map(i=>{const a=FE(i,e);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():FE(r[i],null)}}}}function e$(...r){return T.useCallback(ZB(...r),r)}class t$ extends T.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Ep(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=t.offsetParent,i=Ep(s)&&s.offsetWidth||0,a=Ep(s)&&s.offsetHeight||0,o=getComputedStyle(t),c=this.props.sizeRef.current;c.height=parseFloat(o.height),c.width=parseFloat(o.width),c.top=t.offsetTop,c.left=t.offsetLeft,c.right=i-c.width-c.left,c.bottom=a-c.height-c.top}return null}componentDidUpdate(){}render(){return this.props.children}}function s$({children:r,isPresent:e,anchorX:t,anchorY:s,root:i,pop:a}){var x;const o=T.useId(),c=T.useRef(null),h=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=T.useContext(Bv),m=((x=r.props)==null?void 0:x.ref)??(r==null?void 0:r.ref),g=e$(c,m);return T.useInsertionEffect(()=>{const{width:y,height:v,top:j,left:N,right:S,bottom:A}=h.current;if(e||a===!1||!c.current||!y||!v)return;
vendor: 4,749 bytes, lines 63-71
63const E=t==="left"?`left: ${N}`:`right: ${S}`,M=s==="bottom"?`bottom: ${A}`:`top: ${j}`;c.current.dataset.motionPopId=o;const R=document.createElement("style");f&&(R.nonce=f);const I=i??document.head;return I.appendChild(R),R.sheet&&R.sheet.insertRule(` 64 [data-motion-pop-id="${o}"] { 65 position: absolute !important; 66 width: ${y}px !important; 67 height: ${v}px !important; 68 ${E}px !important; 69 ${M}px !important; 70 } 71 `),()=>{var F;(F=c.current)==null||F.removeAttribute("data-motion-pop-id"),I.contains(R)&&I.removeChild(R)}},[e]),n.jsx(t$,{isPresent:e,childRef:c,sizeRef:h,pop:a,children:a===!1?r:T.cloneElement(r,{ref:g})})}const n$=({children:r,initial:e,isPresent:t,onExitComplete:s,custom:i,presenceAffectsLayout:a,mode:o,anchorX:c,anchorY:h,root:f})=>{const m=rc(r$),g=T.useId();let x=!0,y=T.useMemo(()=>(x=!1,{id:g,initial:e,isPresent:t,custom:i,onExitComplete:v=>{m.set(v,!0);for(const j of m.values())if(!j)return;s&&s()},register:v=>(m.set(v,!1),()=>m.delete(v))}),[t,m,s]);return a&&x&&(y={...y}),T.useMemo(()=>{m.forEach((v,j)=>m.set(j,!1))},[t]),T.useEffect(()=>{!t&&!m.size&&s&&s()},[t]),r=n.jsx(s$,{pop:o==="popLayout",isPresent:t,anchorX:c,anchorY:h,root:f,children:r}),n.jsx(Lv.Provider,{value:y,children:r})};function r$(){return new Map}function D4(r=!0){const e=T.useContext(Lv);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:s,register:i}=e,a=T.useId();T.useEffect(()=>{if(r)return i(a)},[r]);const o=T.useCallback(()=>r&&s&&s(a),[a,s,r]);return!t&&s?[!1,o]:[!0]}const hy=r=>r.key||"";function BE(r){const e=[];return T.Children.forEach(r,t=>{T.isValidElement(t)&&e.push(t)}),e}const an=({children:r,custom:e,initial:t=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:c="left",anchorY:h="top",root:f})=>{const[m,g]=D4(o),x=T.useMemo(()=>BE(r),[r]),y=o&&!m?[]:x.map(hy),v=T.useRef(!0),j=T.useRef(x),N=rc(()=>new Map),S=T.useRef(new Set),[A,E]=T.useState(x),[M,R]=T.useState(x);Iv(()=>{v.current=!1,j.current=x;for(let D=0;D<M.length;D++){const O=hy(M[D]);y.includes(O)?(N.delete(O),S.current.delete(O)):N.get(O)!==!0&&N.set(O,!1)}},[M,y.length,y.join("-")]);const I=[];if(x!==A){let D=[...x];for(let O=0;O<M.length;O++){const $=M[O],z=hy($);y.includes(z)||(D.splice(O,0,$),I.push($))}return a==="wait"&&I.length&&(D=I),R(BE(D)),E(x),null}const{forceRender:F}=T.useContext(bk);return n.jsx(n.Fragment,{children:M.map(D=>{const O=hy(D),$=o&&!m?!1:x===M||y.includes(O),z=()=>{if(S.current.has(O))return;if(N.has(O))S.current.add(O),N.set(O,!0);else return;let re=!0;N.forEach(he=>{he||(re=!1)}),re&&(F==null||F(),R(j.current),o&&(g==null||g()),s&&s())};return n.jsx(n$,{isPresent:$,initial:!v.current||t?void 0:!1,custom:e,presenceAffectsLayout:i,mode:a,root:f,onExitComplete:$?void 0:z,anchorX:c,anchorY:h,children:D},O)})})},O4=T.createContext({strict:!1}),$E={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"]};let UE=!1;function i$(){if(UE)return;const r={};for(const e in $E)r[e]={isEnabled:t=>$E[e].some(s=>!!t[s])};h4(r),UE=!0}function F4(){return i$(),z8()}function a$(r){const e=F4();for(const t in r)e[t]={...e[t],...r[t]};h4(e)}const o$=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","propagate","ignoreStrict","viewport"]);function Bb(r){return r.startsWith("while")||r.startsWith("drag")&&r!=="draggable"||r.startsWith("layout")||r.startsWith("onTap")||r.startsWith("onPan")||r.startsWith("onLayout")||o$.has(r)}let B4=r=>!Bb(r);function l$(r){typeof r=="function"&&(B4=e=>e.startsWith("on")?!Bb(e):r(e))}try{l$(require("@emotion/is-prop-valid").default)}catch{}function c$(r,e,t){const s={};for(const i in r)i==="values"&&typeof r.values=="object"||Gs(r[i])||(B4(i)||t===!0&&Bb(i)||!e&&!Bb(i)||r.draggable&&i.startsWith("onDrag"))&&(s[i]=r[i]);return s}const $v=T.createContext({});function d$(r,e){if(Fv(r)){const{initial:t,animate:s}=r;return{initial:t===!1||Up(t)?t:void 0,animate:Up(s)?s:void 0}}return r.inherit!==!1?e:{}}function u$(r){const{initial:e,animate:t}
vendor: 4,606 bytes, line 71
71=d$(r,T.useContext($v));return T.useMemo(()=>({initial:e,animate:t}),[HE(e),HE(t)])}function HE(r){return Array.isArray(r)?r.join(" "):r}const qk=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $4(r,e,t){for(const s in e)!Gs(e[s])&&!b4(s,t)&&(r[s]=e[s])}function h$({transformTemplate:r},e){return T.useMemo(()=>{const t=qk();return Wk(t,e,r),Object.assign({},t.vars,t.style)},[e])}function f$(r,e){const t=r.style||{},s={};return $4(s,t,r),Object.assign(s,h$(r,e)),s}function m$(r,e){const t={},s=f$(r,e);return r.drag&&r.dragListener!==!1&&(t.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=r.drag===!0?"none":`pan-${r.drag==="x"?"y":"x"}`),r.tabIndex===void 0&&(r.onTap||r.onTapStart||r.whileTap)&&(t.tabIndex=0),t.style=s,t}const U4=()=>({...qk(),attrs:{}});function p$(r,e,t,s){const i=T.useMemo(()=>{const a=U4();return v4(a,e,j4(s),r.transformTemplate,r.style),{...a.attrs,style:{...a.style}}},[e]);if(r.style){const a={};$4(a,r.style,r),i.style={...a,...i.style}}return i}const g$=["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 Kk(r){return typeof r!="string"||r.includes("-")?!1:!!(g$.indexOf(r)>-1||/[A-Z]/u.test(r))}function x$(r,e,t,{latestValues:s},i,a=!1,o){const h=(o??Kk(r)?p$:m$)(e,s,i,r),f=c$(e,typeof r=="string",a),m=r!==T.Fragment?{...f,...h,ref:t}:{},{children:g}=e,x=T.useMemo(()=>Gs(g)?g.get():g,[g]);return T.createElement(r,{...m,children:x})}function y$({scrapeMotionValuesFromProps:r,createRenderState:e},t,s,i){return{latestValues:b$(t,s,i,r),renderState:e()}}function b$(r,e,t,s){const i={},a=s(r,{});for(const x in a)i[x]=Hy(a[x]);let{initial:o,animate:c}=r;const h=Fv(r),f=d4(r);e&&f&&!h&&r.inherit!==!1&&(o===void 0&&(o=e.initial),c===void 0&&(c=e.animate));let m=t?t.initial===!1:!1;m=m||o===!1;const g=m?c:o;if(g&&typeof g!="boolean"&&!Ov(g)){const x=Array.isArray(g)?g:[g];for(let y=0;y<x.length;y++){const v=Ok(r,x[y]);if(v){const{transitionEnd:j,transition:N,...S}=v;for(const A in S){let E=S[A];if(Array.isArray(E)){const M=m?E.length-1:0;E=E[M]}E!==null&&(i[A]=E)}for(const A in j)i[A]=j[A]}}}return i}const H4=r=>(e,t)=>{const s=T.useContext($v),i=T.useContext(Lv),a=()=>y$(r,e,s,i);return t?a():rc(a)},v$=H4({scrapeMotionValuesFromProps:Gk,createRenderState:qk}),w$=H4({scrapeMotionValuesFromProps:N4,createRenderState:U4}),j$=Symbol.for("motionComponentSymbol");function N$(r,e,t){const s=T.useRef(t);T.useInsertionEffect(()=>{s.current=t});const i=T.useRef(null);return T.useCallback(a=>{var c;a&&((c=r.onMount)==null||c.call(r,a));const o=s.current;if(typeof o=="function")if(a){const h=o(a);typeof h=="function"&&(i.current=h)}else i.current?(i.current(),i.current=null):o(a);else o&&(o.current=a);e&&(a?e.mount(a):e.unmount())},[e])}const z4=T.createContext({});function Yu(r){return r&&typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"current")}function k$(r,e,t,s,i,a){var E,M;const{visualElement:o}=T.useContext($v),c=T.useContext(O4),h=T.useContext(Lv),f=T.useContext(Bv),m=f.reducedMotion,g=f.skipAnimations,x=T.useRef(null),y=T.useRef(!1);s=s||c.renderer,!x.current&&s&&(x.current=s(r,{visualState:e,parent:o,props:t,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,skipAnimations:g,isSVG:a}),y.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));const v=x.current,j=T.useContext(z4);v&&!v.projection&&i&&(v.type==="html"||v.type==="svg")&&S$(x.current,t,i,j);const N=T.useRef(!1);T.useInsertionEffect(()=>{v&&N.current&&v.update(t,h)});const S=t[YT],A=T.useRef(!!S&&typeof window<"u"&&!((E=window.MotionHandoffIsComplete)!=null&&E.call(window,S))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,S)));return Iv(()=>{y.current=!0,v&&(N.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),A.current&&v.animationState&&v.animationState.animateChanges())}),T.useEffect(()=>{v&&(!A.current&&v.animationState&&v.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{var R;(R=window.MotionHandoffMarkAsComplete)==null||R.call(window,S)}),A.current=!1),v.enteringChildren=void 0)}),v}function S$(r,e,t,s){const{layoutId:i,layout:a,drag:o,dragConstraints:c,layoutScroll:h,layoutRoot:f,layoutAnchor:m,layoutCrossfade:g}=e;r.projection=new t(r.latestValues,e["data-framer-portal-id"]?void 0:V4(r.parent)),r.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||c&&Yu(c),visualElement:r,animationType:typeof a=="str
71ing"?a:"both",initialPromotionConfig:s,crossfade:g,layoutScroll:h,layoutRoot:f,layoutAnchor:m})}function V4(r){if(r)return r.options.allowProjection!==!1?r.projection:V4(r.parent)}function N2(r,{forwardMotionProps:e=!1,type:t}={},s,i){s&&a$(s);const a=t?t==="svg":Kk(r),o=a?w$:v$;function c(f,m){let g;const x={...T.useContext(Bv),...f,layoutId:A$(f)},{isStatic:y}=x,v=u$(f),j=o(f,y);if(!y&&typeof window<"u"){_$();const N=E$(x);g=N.MeasureLayout,v.visualElement=k$(r,j,x,i,N.ProjectionNode,a)}return n.jsxs($v.Provider,{value:v,children:[g&&v.visualElement?n.jsx(g,{visualElement:v.visualElement,...x}):null,x$(r,f,N$(j,v.visualElement,m),j,y,e,a)]})}c.displayName=`motion.${typeof r=="string"?r:`create(${r.displayName??r.name??""})`}`;const h=T.forwardRef(c);return h[j$]=r,h}function A$({layoutId:r}){const e=T.useContext(bk).id;return e&&r!==void 0?e+"-"+r:r}function _$(r,e){T.useContext(O4).strict}function E$(r){const e=F4(),{drag:t,layout:s}=e;if(!t&&!s)return{};const i={...t,...s};return{MeasureLayout:t!=null&&t.isEnabled(r)||s!=null&&s.isEnabled(r)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function C$(r,e){if(typeof Proxy>"u")return N2;const t=new Map,s=(a,o)=>N2(a,o,r,e),i=(a,o)=>s(a,o);return new Proxy(i,{get:(a,o)=>o==="create"?s:(t.has(o)||t.set(o,N2(o,void 0,r,e)),t.get(o))})}const T$=(r,e)=>e.isSVG??Kk(r)?new aB(e):new eB(e,{allowProjection:r!==T.Fragment});class P$ extends cc{constructor(e){super(e),e.animationState||(e.animationState=uB(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ov(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let R$=0;class M$ extends cc{constructor(){super(...arguments),this.id=R$++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:c}=this.node.getProps();if(typeof o=="string"){const h=du(this.node,o,c);if(h){const{transition:f,transitionEnd:m,...g}=h;for(const x in g)(a=this.node.getValue(x))==null||a.jump(g[x])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const I$={animation:{Feature:P$},exit:{Feature:M$}};function G0(r){return{point:{x:r.pageX,y:r.pageY}}}const L$=r=>e=>Uk(e)&&r(e,G0(e));function Tp(r,e,t,s){return Hp(r,e,L$(t),s)}const W4=({current:r})=>r?r.ownerDocument.defaultView:null,zE=(r,e)=>Math.abs(r-e);function D$(r,e){const t=zE(r.x,e.x),s=zE(r.y,e.y);return Math.sqrt(t**2+s**2)}const VE=new Set(["auto","scroll"]);class G4{constructor(e,t,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=y=>{this.handleScroll(y.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=fy(this.lastRawMoveEventInfo,this.transformPagePoint));const y=k2(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,j=D$(y.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!j)return;const{point:N}=y,{timestamp:S}=Ts;this.history.push({...N,timestamp:S});const{onStart:A,onMove:E}=this.handlers;v||(A&&A(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,y)},this.handlePointerMove=(y,v)=>{this.lastMoveEvent=y,this.lastRawMoveEventInfo=v,this.lastMoveEventInfo=fy(v,this.transformPagePoint),et.update(this.updatePoint,!0)},this.handlePointerUp=(y,v)=>{this.end();const{onEnd:j,onSessionEnd:N,resumeAnimation:S}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=k2(y.type==="pointercancel"?this.lastMoveEventInfo:fy(v,this.transformPagePoint),this.history);this.startEvent&&j&&j(y,A),N&&N(y,A)},!Uk(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const h=G0(e),f=fy(h,this.transformPagePoint),{point:m}=f,{timestamp:g}=Ts;this.history=[{...m,timestamp:g}];const{onSessionStart:x}=t;x&&x(e,k2(f,this.history)),this.removeListeners=z0(Tp(this.contextWindow,"pointermove",this.handlePointerMove),Tp(this.contextWindow,"pointerup",this.handlePointerUp),Tp(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(e){let t=e.parentElement;for(;t;){const s=getComputedStyle(t);(VE.has(s.overflowX)||VE.has(s.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:i.x-t.x,y:i.y-t.y};a.x===0&&a.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,i),et.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Yr(this.updatePoint)}}function fy(r,e){return e?{point:e(r.point)}:r}function WE(r,e){return{x:r.x-e.x,y:r.y-e.y}}function k2({point:r},e){return{point:r,delta:WE(r,q4(e)),offset:WE(r,O$(e)),velocity:F$(e,.1)}}function O$(r){return r[0]}function q4(r){return r[r.length-1]}function F$(r,e){if(r.length<2)return{x:0,y:0};let t=r.length-1,s=null;const i=q4(r);for(;t>=0&&(s=r[t],!(i.timestamp-s.timestamp>br(e)));)t--;if(!s)return{x:0,y:0};s===r[0]&&r.length>2&&i.timestamp-s.timestamp>br(e)*2&&(s=r[1]);const a=qr(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}function B$(r,{min:e,max:t},s){return e!==void 0&&r<e?r=s?_t(e,r,s.min):Math.max(r,e):t!==void 0&&r>t&&(r=s?_t(t,r,s.max):Math.min(r,t)),r}function GE(r,e,t){return{min:e!==void 0?r.min+e:void 0,max:t!==void 0?r.max+t-(r.max-r.min):void 0}}function $$(r,{top:e,left:t,bottom:s,right:i}){return{x:GE(r.x,t,i),y:GE(r.y,e,s)}}function qE(r,e){let t=e.min-r.min,s=e.max-r.max;return e.max-e.min<r.max-r.min&&([t,s]=[s,t]),{min:t,max:s}}function U$(r,e){return{x:qE(r.x,e.x),y:qE(r.y,e.y)}}function H$(r,e){let t=.5;const s=bn(r),i=bn(e);return i>s?t=Gf(e.min,e.max-s,r.min):s>i&&(t=Gf(r.min,r.max-i,e.min)),Ri(0,1,t)}function z$(r,e){const t={};return e.min!==void 0&&(t.min=e.min-r.min),e.max!==void 0&&(t.max=e.max-r.min),t}const gj=.35;function V$(r=gj){return r===!1?r=0:r===!0&&(r=gj),{x:KE(r,"left","right"),y:KE(r,"top","bottom")}}function KE(r,e,t){return{min:XE(r,e),max:XE(r,t)}}function XE(r,e){return typeof r=="number"?r:r[e]||0}const W$=new WeakMap;class G${constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=gs(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=g=>{t&&this.snapToCursor(G0(g).point),this.stopAnimation()},o=(g,x)=>{const{drag:y,dragPropagation:v,onDragStart:j}=this.getProps();if(y&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=y8(y),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vi(S=>{let A=this.getAxisMotionValue(S).get()||0;if(xa.test(A)){const{projection:E}=this.visualElement;if(E&&E.layout){const M=E.layout.layoutBox[S];M&&(A=bn(M)*(parseFloat(A)/100))}}this.originPoint[S]=A}),j&&et.update(()=>j(g,x),!1,!0),aj(this.visualElement,"transform");const{animationState:N}=this.visualElement;N&&N.setActive("whileDrag",!0)},c=(g,x)=>{this.latestPointerEvent=g,this.latestPanInfo=x;const{dragPropagation:y,dragDirectionLock:v,onDirectionLock:j,onDrag:N}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:S}=x;if(v&&this.currentDirection===null){this.currentDirection=K$(S),this.currentDirection!==null&&j&&j(this.currentDirection);return}this.updateAxis("x",x.point,S),this.updateAxis("y",x.point,S),this.visualElement.render(),N&&et.update(()=>N(g,x),!1,!0)},h=(g,x)=>{this.latestPointerEvent=g,this.latestPanInfo=x,this.stop(g,x),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();
vendor: 10,140 bytes, line 71
71this.panSession=new G4(e,{onSessionStart:a,onStart:o,onMove:c,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:s,contextWindow:W4(this.visualElement),element:this.visualElement.current})}stop(e,t){const s=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:c}=this.getProps();c&&et.postRender(()=>c(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,s){const{drag:i}=this.getProps();if(!s||!my(e,i,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=B$(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:e,dragElastic:t}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;e&&Yu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=$$(s.layoutBox,e):this.constraints=!1,this.elastic=V$(t),i!==this.constraints&&!Yu(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&Vi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=z$(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Yu(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=K8(s,i.root,this.visualElement.getTransformPagePoint());let o=U$(i.layout.layoutBox,a);if(t){const c=t(W8(o));this.hasMutatedConstraints=!!c,c&&(o=m4(c))}return o}startAnimation(e){const{drag:t,dragMomentum:s,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:c}=this.getProps(),h=this.constraints||{},f=Vi(m=>{if(!my(m,t,this.currentDirection))return;let g=h&&h[m]||{};(o===!0||o===m)&&(g={min:0,max:0});const x=i?200:1e6,y=i?40:1e7,v={type:"inertia",velocity:s?e[m]:0,bounceStiffness:x,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...a,...g};return this.startAxisValueAnimation(m,v)});return Promise.all(f).then(c)}startAxisValueAnimation(e,t){const s=this.getAxisMotionValue(e);return aj(this.visualElement,e),s.start(Dk(e,s,0,t,this.visualElement,!1))}stopAnimation(){Vi(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[t];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Vi(t=>{const{drag:s}=this.getProps();if(!my(t,s,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(t);if(i&&i.layout){const{min:o,max:c}=i.layout.layoutBox[t],h=a.get()||0;a.set(e[t]-_t(o,c,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:s}=this.visualElement;if(!Yu(t)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Vi(o=>{const c=this.getAxisMotionValue(o);if(c&&this.constraints!==!1){const h=c.get();i[o]=H$({min:h,max:h},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.constraints=!1,this.resolveConstraints(),Vi(o=>{if(!my(o,e,null))return;const c=this.getAxisMotionValue(o),{min:h,max:f}=this.constraints[o];c.set(_t(h,f,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;W$.set(this.visualElement,this);const e=this.visualElement.current,t=Tp(e,"pointerdown",f=>{const{drag:m,dragListener:g=!0}=this.getProps(),x=f.target,y=x!==e&&k8(x);m&&g&&!y&&this.start(f)});let s;const i=()=>{const{dragConstraints:f}=this.getProps();Yu(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),s||(s=q$(e,f.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),et.read(i);const c=Hp(window,"resize",()=>this.scalePositionWithinConstraints()),h=a.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(Vi(g=>{const x=this.getAxisMotionValue(g);x&&(this.originPoint[g]+=f[g].translate,x.set(x.get()+f[g].translate))}),this.visualElement.render())}));return()=>{c(),t(),o(),h&&h(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=gj,dragMomentum:c=!0}=e;return{...e,drag:t,dragDirectionLock:s,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:c}}}function YE(r){let e=!0;return()=>{if(e){e=!1;return}r()}}function q$(r,e,t){const s=dj(r,YE(t)),i=dj(e,YE(t));return()=>{s(),i()}}function my(r,e,t){return(e===!0||e===r)&&(t===null||t===r)}function K$(r,e=10){let t=null;return Math.abs(r.y)>e?t="y":Math.abs(r.x)>e&&(t="x"),t}class X$ extends cc{constructor(e){super(e),this.removeGroupControls=Bn,this.removeListeners=Bn,this.controls=new G$(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bn}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const S2=r=>(e,t)=>{r&&et.update(()=>r(e,t),!1,!0)};class Y$ extends cc{constructor(){super(...arguments),this.removePointerDownListener=Bn}onPointerDown(e){this.session=new G4(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:W4(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:S2(e),onStart:S2(t),onMove:S2(s),onEnd:(a,o)=>{delete this.session,i&&et.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Tp(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let A2=!1;class J$ extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:s,layoutId:i}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),s&&s.register&&i&&s.register(a),A2&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zy.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:s,drag:i,isPresent:a}=this.props,{projection:o}=s;return o&&(o.isPresent=a,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),A2=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||et.postRender(()=>{const c=o.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=t,s.root.didUpdate(),$k.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:s}=this.props,{projection:i}=e;A2=!0,i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function K4(r){const[e,t]=D4(),s=T.useContext(bk);return n.jsx(J$,{...r,layoutGroup:s,switchLayoutGroup:T.useContext(z4),isPresent:e,safeToRemove:t})}const Q$={pan:{Feature:Y$},drag:{Feature:X$,ProjectionNode:L4,MeasureLayout:K4}};function JE(r,e,t){const{props:s}=r;r.animationState&&s.whileHover&&r.animationState.setActive("whileHover",t==="Start");const i="onHover"+t,a=s[i];a&&et.postRender(()=>a(e,G0(e)))}class Z$ extends cc{mount(){const{current:e}=this.node;e&&(this.unmount=v8(e,(t,s)=>(JE(this.node,s,"Start"),i=>JE(this.node,i,"End"))))}unmount(){}}class eU extends cc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=z0(Hp(this.node.current,"focus",()=>this.onFocus()),Hp(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function QE(r,e,t){const{props:s}=r;if(r.current instanceof HTMLButtonElement&&r.current.disabled)return;r.animationState&&s.whileTap&&r.animationState.setActive("whileTap",t==="Start");const i="onTap"+(t==="End"?"":t),a=s[i];a&&et.postRender(()=>a(e,G0(e)))}class tU extends cc{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:s}=this.node.props;this.unmount=A8(e,(i,a)=>(QE(this.node,a,"Start"),(o,{success:c})=>QE(this.node,o,c?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const xj=new WeakMap,_2=new WeakMap,sU=r=>{const e=xj.get(r.target);e&&e(r)},nU=r=>{r.forEach(sU)};function rU({root:r,...e}){const t=r||document;_2.has(t)||_2.set(t,{});const s=_2.get(t),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(nU,{root:r,...e})),s[i]}function iU(r,e,t){const s=rU(e);return xj.set(r,t),s.observe(r),()=>{xj.delete(r),s.unobserve(r)}}
71const aU={some:0,all:1};class oU extends cc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var h;(h=this.stopObserver)==null||h.call(this);const{viewport:e={}}=this.node.getProps(),{root:t,margin:s,amount:i="some",once:a}=e,o={root:t?t.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:aU[i]},c=f=>{const{isIntersecting:m}=f;if(this.isInView===m||(this.isInView=m,a&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:g,onViewportLeave:x}=this.node.getProps(),y=m?g:x;y&&y(f)};this.stopObserver=iU(this.node.current,o,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(lU(e,t))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function lU({viewport:r={}},{viewport:e={}}={}){return t=>r[t]!==e[t]}const cU={inView:{Feature:oU},tap:{Feature:tU},focus:{Feature:eU},hover:{Feature:Z$}},dU={layout:{ProjectionNode:L4,MeasureLayout:K4}},uU={...I$,...cU,...Q$,...dU},Ce=C$(uU,T$);function $b(r){return typeof window>"u"?!1:r?BT():Ik()}const hU=50,ZE=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),fU=()=>({time:0,x:ZE(),y:ZE()}),mU={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function eC(r,e,t,s){const i=t[e],{length:a,position:o}=mU[e],c=i.current,h=t.time;i.current=Math.abs(r[`scroll${o}`]),i.scrollLength=r[`scroll${a}`]-r[`client${a}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Gf(0,i.scrollLength,i.current);const f=s-h;i.velocity=f>hU?0:jk(i.current-c,f)}function pU(r,e,t){eC(r,"x",e,t),eC(r,"y",e,t),e.time=t}function gU(r,e){const t={x:0,y:0};let s=r;for(;s&&s!==e;)if(Ep(s))t.x+=s.offsetLeft,t.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const a=s.getBoundingClientRect();t.x+=i.left-a.left,t.y+=i.top-a.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:a}=s.getBBox();t.x+=i,t.y+=a;let o=null,c=s.parentNode;for(;!o;)c.tagName==="svg"&&(o=c),c=s.parentNode;s=o}else break;return t}const yj={start:0,center:.5,end:1};function tC(r,e,t=0){let s=0;if(r in yj&&(r=yj[r]),typeof r=="string"){const i=parseFloat(r);r.endsWith("px")?s=i:r.endsWith("%")?r=i/100:r.endsWith("vw")?s=i/100*document.documentElement.clientWidth:r.endsWith("vh")?s=i/100*document.documentElement.clientHeight:r=i}return typeof r=="number"&&(s=e*r),t+s}const xU=[0,0];function yU(r,e,t,s){let i=Array.isArray(r)?r:xU,a=0,o=0;return typeof r=="number"?i=[r,r]:typeof r=="string"&&(r=r.trim(),r.includes(" ")?i=r.split(" "):i=[r,yj[r]?r:"0"]),a=tC(i[0],t,s),o=tC(i[1],e),a-o}const ep={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},bU={x:0,y:0};function vU(r){return"getBBox"in r&&r.tagName!=="svg"?r.getBBox():{width:r.clientWidth,height:r.clientHeight}}function wU(r,e,t){const{offset:s=ep.All}=t,{target:i=r,axis:a="y"}=t,o=a==="y"?"height":"width",c=i!==r?gU(i,r):bU,h=i===r?{width:r.scrollWidth,height:r.scrollHeight}:vU(i),f={width:r.clientWidth,height:r.clientHeight};e[a].offset.length=0;let m=!e[a].interpolate;const g=s.length;for(let x=0;x<g;x++){const y=yU(s[x],f[o],h[o],c[a]);!m&&y!==e[a].interpolatorOffsets[x]&&(m=!0),e[a].offset[x]=y}m&&(e[a].interpolate=Tk(e[a].offset,IT(s),{clamp:!1}),e[a].interpolatorOffsets=[...e[a].offset]),e[a].progress=Ri(0,1,e[a].interpolate(e[a].current))}function jU(r,e=r,t){if(t.x.targetOffset=0,t.y.targetOffset=0,e!==r){let s=e;for(;s&&s!==r;)t.x.targetOffset+=s.offsetLeft,t.y.targetOffset+=s.offsetTop,s=s.offsetParent}t.x.targetLength=e===r?e.scrollWidth:e.clientWidth,t.y.targetLength=e===r?e.scrollHeight:e.clientHeight,t.x.containerLength=r.clientWidth,t.y.containerLength=r.clientHeight}function NU(r,e,t,s={}){return{measure:i=>{jU(r,s.target,t),pU(r,t,i),(s.offset||s.target)&&wU(r,t,s)},notify:()=>e(t)}}
71const Hu=new WeakMap,sC=new WeakMap,E2=new WeakMap,nC=new WeakMap,py=new WeakMap,rC=r=>r===document.scrollingElement?window:r;function X4(r,{container:e=document.scrollingElement,trackContentSize:t=!1,...s}={}){if(!e)return Bn;let i=E2.get(e);i||(i=new Set,E2.set(e,i));const a=fU(),o=NU(e,r,a,s);if(i.add(o),!Hu.has(e)){const h=()=>{for(const x of i)x.measure(Ts.timestamp);et.preUpdate(f)},f=()=>{for(const x of i)x.notify()},m=()=>et.read(h);Hu.set(e,m);const g=rC(e);window.addEventListener("resize",m),e!==document.documentElement&&sC.set(e,dj(e,m)),g.addEventListener("scroll",m),m()}if(t&&!py.has(e)){const h=Hu.get(e),f={width:e.scrollWidth,height:e.scrollHeight};nC.set(e,f);const m=()=>{const x=e.scrollWidth,y=e.scrollHeight;(f.width!==x||f.height!==y)&&(h(),f.width=x,f.height=y)},g=et.read(m,!0);py.set(e,g)}const c=Hu.get(e);return et.read(c,!1,!0),()=>{var g;Yr(c);const h=E2.get(e);if(!h||(h.delete(o),h.size))return;const f=Hu.get(e);Hu.delete(e),f&&(rC(e).removeEventListener("scroll",f),(g=sC.get(e))==null||g(),window.removeEventListener("resize",f));const m=py.get(e);m&&(Yr(m),py.delete(e)),nC.delete(e)}}const kU=[[ep.Enter,"entry"],[ep.Exit,"exit"],[ep.Any,"cover"],[ep.All,"contain"]],iC={start:0,end:1};function SU(r){const e=r.trim().split(/\s+/);if(e.length!==2)return;const t=iC[e[0]],s=iC[e[1]];if(!(t===void 0||s===void 0))return[t,s]}function AU(r){if(r.length!==2)return;const e=[];for(const t of r)if(Array.isArray(t))e.push(t);else if(typeof t=="string"){const s=SU(t);if(!s)return;e.push(s)}else return;return e}function _U(r,e){const t=AU(r);if(!t)return!1;for(let s=0;s<2;s++){const i=t[s],a=e[s];if(i[0]!==a[0]||i[1]!==a[1])return!1}return!0}function Xk(r){if(!r)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,t]of kU)if(_U(r,e))return{rangeStart:`${t} 0%`,rangeEnd:`${t} 100%`}}const aC=new Map;function oC(r){const e={value:0},t=X4(s=>{e.value=s[r.axis].progress*100},r);return{currentTime:e,cancel:t}}function Y4({source:r,container:e,...t}){const{axis:s}=t;r&&(e=r);let i=aC.get(e);i||(i=new Map,aC.set(e,i));const a=t.target??"self";let o=i.get(a);o||(o={},i.set(a,o));const c=s+(t.offset??[]).join(",");return o[c]||(t.target&&$b(t.target)?Xk(t.offset)?o[c]=new ViewTimeline({subject:t.target,axis:s}):o[c]=oC({container:e,...t}):$b()?o[c]=new ScrollTimeline({source:e,axis:s}):o[c]=oC({container:e,...t})),o[c]}function EU(r,e){const t=Y4(e),s=e.target?Xk(e.offset):void 0,i=e.target?$b(e.target)&&!!s:$b();return r.attachTimeline({timeline:i?t:void 0,...s&&i&&{rangeStart:s.rangeStart,rangeEnd:s.rangeEnd},observe:a=>(a.pause(),c4(o=>{a.time=a.iterationDuration*o},t))})}function CU(r){return r.length===2}function TU(r,e){return CU(r)?X4(t=>{r(t[e.axis].progress,t)},e):c4(r,Y4(e))}function J4(r,{axis:e="y",container:t=document.scrollingElement,...s}={}){if(!t)return Bn;const i={axis:e,container:t,...s};return typeof r=="function"?TU(r,i):EU(r,i)}const PU=()=>({scrollX:_i(0),scrollY:_i(0),scrollXProgress:_i(0),scrollYProgress:_i(0)}),gy=r=>r?!r.current:!1;function lC(r,e,t,s){return{factory:i=>J4(i,{...e,axis:r,container:(t==null?void 0:t.current)||void 0,target:(s==null?void 0:s.current)||void 0}),times:[0,1],keyframes:[0,1],ease:i=>i,duration:1}}function RU(r,e){return typeof window>"u"?!1:r?BT()&&!!Xk(e):Ik()}function MU({container:r,target:e,...t}={}){const s=rc(PU);RU(e,t.offset)&&(s.scrollXProgress.accelerate=lC("x",t,r,e),s.scrollYProgress.accelerate=lC("y",t,r,e));const i=T.useRef(null),a=T.useRef(!1),o=T.useCallback(()=>(i.current=J4((c,{x:h,y:f})=>{s.scrollX.set(h.current),s.scrollXProgress.set(h.progress),s.scrollY.set(f.current),s.scrollYProgress.set(f.progress)},{...t,container:(r==null?void 0:r.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var c;(c=i.current)==null||c.call(i)}),[r,e,JSON.stringify(t.offset)]);return Iv(()=>{if(a.current=!1,gy(r)||gy(e)){a.current=!0;return}else return o()},[o]),T.useEffect(()=>{if(a.current)return Bp(!gy(r)),Bp(!gy(e)),o()},[o]),s}function IU(r){const e=rc(()=>_i(r)),{isStatic:t}=T.useContext(Bv);if(t){const[,s]=T.useState(r);T.useEffect(()=>e.on("change",s),[])}return e}function Q4(r,e){const t=IU(e()),s=()=>t.set(e());return s(),Iv(()=>{const i=()=>et.preRender(s,!1,!0),a=r.map(o=>
71o.on("change",i));return()=>{a.forEach(o=>o()),Yr(s)}}),t}function LU(r){_p.current=[],r();const e=Q4(_p.current,r);return _p.current=void 0,e}function Z4(r,e,t,s){if(typeof r=="function")return LU(r);if(t!==void 0&&!Array.isArray(t)&&typeof e!="function")return DU(r,e,t,s);const o=typeof e=="function"?e:D8(e,t,s),c=Array.isArray(r)?cC(r,o):cC([r],([f])=>o(f)),h=Array.isArray(r)?void 0:r.accelerate;return h&&!h.isTransformed&&typeof e!="function"&&Array.isArray(t)&&(s==null?void 0:s.clamp)!==!1&&(c.accelerate={...h,times:e,keyframes:t,isTransformed:!0}),c}function cC(r,e){const t=rc(()=>[]);return Q4(r,()=>{t.length=0;const s=r.length;for(let i=0;i<s;i++)t[i]=r[i].get();return e(t)})}function DU(r,e,t,s){const i=rc(()=>Object.keys(t)),a=rc(()=>({}));for(const o of i)a[o]=Z4(r,e,t[o],s);return a}const OU=({stat:r})=>n.jsxs("div",{className:"flex flex-col items-center justify-center px-3 py-3 md:px-8 md:py-5 border border-gray-100 rounded-2xl md:rounded-3xl bg-white min-w-[calc(50%-8px)] md:min-w-[200px] shadow-lg",children:[n.jsxs("div",{className:"flex items-baseline gap-0.5 md:gap-1",children:[n.jsx("span",{className:"text-3xl md:text-6xl lg:text-7xl font-bold text-blue-500 whitespace-nowrap",children:r.value}),r.suffix&&n.jsx("span",{className:"text-sm md:text-2xl font-medium text-gray-800 whitespace-nowrap",children:r.suffix})]}),n.jsx("span",{className:"text-[10px] md:text-base text-gray-500 mt-1 md:mt-3 whitespace-nowrap",children:r.label})]}),FU=({member:r})=>{const{name:e,role:t,catchphrase:s,heroImage:i,stats:a}=r;return n.jsxs("section",{className:"relative min-h-screen overflow-hidden z-10",children:[n.jsx("div",{className:"absolute inset-0 bg-cover bg-[position:80%_center] lg:bg-center bg-no-repeat rounded-b-[50px]",style:{backgroundImage:`url(${i})`}}),n.jsx("div",{className:"absolute inset-0 lg:hidden bg-gradient-to-r from-white/60 via-white/20 to-transparent pointer-events-none"}),n.jsxs("div",{className:"relative z-10 container mx-auto px-4 md:px-8 lg:px-16 flex flex-col justify-center min-h-screen pt-24",children:[n.jsxs("div",{className:"w-full lg:w-[70%] mb-8 md:mb-8 text-left",children:[n.jsx("h1",{className:"font-bold text-gray-900 leading-[1.1] whitespace-pre-line",style:{fontSize:"clamp(2.2rem, 8vw, 4.5rem)"},children:s.main}),n.jsx("p",{className:"font-bold text-primary-blue italic mt-1",style:{fontSize:"clamp(2.2rem, 9vw, 5.5rem)"},children:s.emphasis})]}),n.jsxs("div",{className:"lg:hidden flex flex-col items-end mb-10 origin-right pr-2",children:[n.jsx("div",{className:"relative mb-2",children:n.jsx("div",{className:"py-2.5 px-12",style:{background:"linear-gradient(90deg, #2563EB 0%, #06B6D4 100%)",clipPath:"polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%)",minWidth:"260px"},children:n.jsx("p",{className:"text-white text-base font-bold italic tracking-wide text-center",children:t})})}),n.jsx("div",{className:"relative",style:{marginRight:"10px"},children:n.jsx("div",{className:"py-2.5 px-12",style:{background:"linear-gradient(90deg, #2563EB 0%, #06B6D4 100%)",clipPath:"polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%)",minWidth:"200px"},children:n.jsx("h2",{className:"text-white text-2xl font-bold tracking-wider text-center",children:e})})})]}),n.jsx("div",{className:"w-full flex flex-wrap md:flex-nowrap gap-2 md:gap-8 justify-center",children:a.map((o,c)=>n.jsx(OU,{stat:o},c))}),n.jsxs("div",{className:"hidden lg:block absolute top-[38%] right-[12%]",children:[n.jsx("div",{className:"relative mb-2",children:n.jsx("div",{className:"py-3 px-16",style:{background:"linear-gradient(90deg, #2563EB 0%, #06B6D4 100%)",clipPath:"polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%)",minWidth:"320px"},children:n.jsx("p",{className:"text-white text-lg font-bold italic tracking-wide text-center",children:t})})}),n.jsx("div",{className:"relative",style:{marginLeft:"50px"},children:n.jsx("div",{className:"py-3 px-16",style:{background:"linear-gradient(90deg, #2563EB 0%, #06B6D4 100%)",clipPath:"polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%)",minWidth:"240px"},children:n.jsx("h2",{className:"text-white text-2xl font-bold tracking-wider text-center",children:e})})})]})]})]})},BU=({philosophy:r})=>{const{backgroundImage:e,paragraphs:t}=r;return n.jsxs("section",{className:"relative overflow-hidden -mt-12",children:[n.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:`url(${e})`}}),n.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center px-6 md:px-8 pt-24 pb-32 md:pt-32 md:pb-40",children:[n.jsx("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-white mb-12 md:mb-16 tracking-widest",children:"Philosophy"}),n.jsx("div",{className:"max-w-2xl space-y-8 md:space-y-10 text-center",children:t.map((s,i)=>n.jsx("p",{className:"text-white text-xs md:text-sm lg:text-base font-bold leading-relaxed md:leading-loose whitespace-pre-line tracking-wide",children:s},i))})]})]})},$U=({skills:r,caseStudy:e})=>n.jsx("section",{className:"relative bg-white rounded-t-[50px] -mt-12 z-20",children:n.jsxs("div",{className:"container mx-auto px-6 md:px-8 lg:px-24 py-16 md:py-24 max-w-4xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx("span",{className:"w-4 h-4 bg-cyan-500 rounded-full"}),n.jsx("span",{className:"text-cyan-500 font-bold",children:"ã¹ãã«ã»ãã"})]}),n.jsx("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-gray-900 mb-12 md:mb-20",children:"ç§ã®å¼·ã¿ã»å°éé å"}),n.jsx("div",{className:"space-y-16 md:space-y-24",children:r.map((t,s)=>n.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-start gap-2 md:gap-6 md:justify-center text-center md:text-left",children:[n.jsx("span",{className:"text-gray-100 leading-none italic font-light scale-75 md:scale-100",style:{fontSize:"clamp(4rem, 15vw, 8rem)"},children:String(s+1).padStart(2,"0")}),n.jsxs("div",{className:"md:pt-6",children:[n.jsx("h3",{className:"text-xl lg:text-2xl font-bold text-blue-500 mb-3 md:mb-4",children:t.title}),n.jsx("p",{className:"text-gray-600 leading-relaxed max-w-xl text-sm md:text-base",children:t.description})]})]},s))}),n.jsxs("div",{className:"mt-20 md:mt-32",children:[n.jsx("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-gray-900 mb-8 md:mb-12 italic",children:"ã±ã¼ã¹ã¹ã¿ãã£"}),n.jsx("div",{className:"bg-gray-50 rounded-2xl md:rounded-3xl p-6 md:p-8 shadow-lg",children:n.jsxs("div",{className:"flex flex-col lg:flex-row gap-8 md:gap-10",children:[n.jsx("div",{className:"lg:w-1/2 overflow-hidden rounded-xl md:rounded-2xl bg-gray-200",children:n.jsx("img",{src:e.image||"/assets/top/business_bg.png",alt:"ã±ã¼ã¹ã¹ã¿ãã£",className:"w-full h-48 md:h-full md:min-h-[300px] object-cover"})}),n.jsxs("div",{className:"lg:w-1/2 space-y-6 md:space-y-8 py-2 md:py-4",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"text-rose-400 text-xs md:text-sm font-semibold mb-1 md:mb-2",children:"課é¡"}),n.jsx("p",{className:"text-gray-900 text-sm md:text-base leading-relaxed",children:e.challenge})]}),n.jsxs("div",{children:[n.jsx("h4",{className:"text-cyan-500 text-xs md:text-sm font-semibold mb-1 md:mb-2",children:"ã¢ããã¼ã"}),n.jsx("p",{className:"text-gray-900 text-sm md:text-base leading-relaxed",children:e.approach})]}),n.jsxs("div",{children:[n.jsx("h4",{className:"text-cyan-500 text-xs md:text-sm font-semibold mb-1 md:mb-2",children:"çµæ"}),n.jsx("p",{className:"text-gray-900 text-sm md:text-base leading-relaxed",children:e.result})]})]})]})})]})]})}),UU=({career:r})=>{const[e,t]=T.useState(1),s=()=>{t(a=>a>0?a-1:a)},i=()=>{t(a=>a<r.length-1?a+1:a)};return n.jsx("section",{className:"bg-gray-100 py-16 md:py-24",children:n.jsxs("div",{className:"container mx-auto px-4 md:px-8 lg:px-24 max-w-6xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx("span",{className:"w-4 h-4 bg-cyan-500 rounded-full"}),n.jsx("span",{className:"text-cyan-500 font-bold",children:"ãã£ãªã¢"})]}),n.jsx("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-gray-900 mb-12 md:mb-16",children:"ããã¾ã§ã®æ©ã¿"}),n.jsxs("div",{className:"relative overflow-visible",children:[n.jsx("button",{onClick:s,className:"absolute left-[-10px] md:left-0 top-1/2 -translate-y-1/2 z-20 text-cyan-500 hover:text-cyan-600 transition-colors disabled:opacity-0","aria-label":"åã¸",disabled:e===0,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-8 h-8 md:w-10 md:h-10",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("div",{className:"overflow-hidden mx-8 md:mx-12",children:n.jsx("div",{className:"flex items-center gap-4 md:gap-8 transition-transform duration-500 ease-out py-10",style:{transform:`translateX(calc(50% - (var(--card-width) / 2) - (${e} * (var(--card-width) + var(--card-gap)))))`,"--card-width":window.innerWidth<768?"min(80vw, 300px)":"450px","--card-gap":window.innerWidth<768?"16px":"32px"},children:r.map((a,o)=>n.jsxs("div",{className:`flex-shrink-0 transition-all duration-300 ${o===e?"scale-100 opacity-100 z-10":"scale-90 md:scale-75 opacity-40"}`,style:{width:"var(--card-width)"},children:[n.jsx("span",{className:"text-cyan-500 font-bold text-3xl md:text-5xl block relative z-10 ml-4",children:a.label}),n.jsxs("div",{className:"bg-white rounded-2xl md:rounded-3xl p-6 md:p-10 shadow-lg min-h-[300px] md:min-
71h-[400px] -mt-4 md:-mt-6",children:[n.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 mb-4 md:mb-6",children:a.title}),n.jsx("div",{className:"space-y-3 md:space-y-4",children:a.description.map((c,h)=>n.jsx("p",{className:"text-gray-600 text-sm md:text-lg leading-relaxed",children:c},h))})]})]},o))})}),n.jsx("button",{onClick:i,className:"absolute right-[-10px] md:right-0 top-1/2 -translate-y-1/2 z-20 text-cyan-500 hover:text-cyan-600 transition-colors disabled:opacity-0","aria-label":"次ã¸",disabled:e===r.length-1,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-8 h-8 md:w-10 md:h-10",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]})]})})},HU=({qa:r})=>n.jsx("section",{className:"bg-white py-24",children:n.jsxs("div",{className:"container mx-auto px-8 lg:px-24 max-w-5xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx("span",{className:"w-4 h-4 bg-cyan-500 rounded-full"}),n.jsx("span",{className:"text-cyan-500 font-bold",children:"Q&A"})]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-gray-900 mb-20",children:"社å¡ã¤ã³ã¿ãã¥ã¼"}),n.jsx("div",{className:"space-y-24",children:r.map((e,t)=>{const s=t%2===0,i=`Q.${t+1}`;return n.jsxs("div",{className:`flex flex-col lg:flex-row gap-10 items-center ${s?"":"lg:flex-row-reverse"}`,children:[n.jsx("div",{className:"lg:w-1/2",children:n.jsx("img",{src:e.image,alt:e.question,className:"w-full h-auto rounded-2xl object-cover"})}),n.jsxs("div",{className:"lg:w-1/2",children:[n.jsxs("div",{className:"flex items-baseline gap-4 mb-4",children:[n.jsx("span",{className:"text-blue-500 text-4xl font-bold",children:i}),n.jsx("h3",{className:"text-blue-500 text-xl lg:text-2xl font-bold leading-tight",children:e.question})]}),n.jsx("p",{className:"text-gray-600 leading-relaxed whitespace-pre-line",children:e.answer})]})]},t)})})]})}),zU=({schedule:r})=>n.jsx("section",{className:"bg-white py-24",children:n.jsxs("div",{className:"container mx-auto px-8 lg:px-24 max-w-4xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx("span",{className:"w-4 h-4 bg-cyan-500 rounded-full"}),n.jsx("span",{className:"text-cyan-500 font-bold",children:"åãæ¹"})]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-gray-900 mb-16",children:"1æ¥ã®ã¹ã±ã¸ã¥ã¼ã«"}),n.jsx("div",{className:"relative",children:r.map((e,t)=>n.jsxs("div",{className:"flex gap-8 mb-8 last:mb-0",children:[n.jsx("div",{className:"w-16 text-right text-gray-500 font-medium pt-1 flex-shrink-0",children:e.time}),n.jsxs("div",{className:"relative flex flex-col items-center",children:[n.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-cyan-400 bg-white z-10 flex-shrink-0"}),t<r.length-1&&n.jsx("div",{className:"w-0.5 bg-cyan-200 flex-grow absolute top-5 bottom-0 left-1/2 -translate-x-1/2",style:{height:"calc(100% + 2rem)"}})]}),n.jsxs("div",{className:"flex-grow pb-4",children:[n.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-2",children:e.title}),e.description&&n.jsx("p",{className:"text-gray-600 bg-gray-100 rounded-lg px-4 py-3 leading-relaxed",children:e.description})]})]},t))})]})}),VU=({memberId:r,memberName:e})=>{const[t,s]=T.useState([]),[i,a]=T.useState(!0),[o,c]=T.useState(null);T.useEffect(()=>{(async()=>{try{a(!0);const g=(await lT()).find(x=>x.name===e);if(g){const x=await em(6,{categoryId:g.id});s(x.contents)}else s([])}catch(m){console.error("ããã°è¨äºã®åå¾ã«å¤±æãã¾ãã:",m),c("ããã°è¨äºã®åå¾ã«å¤±æãã¾ãã")}finally{a(!1)}})()},[r,e]);const h=f=>new Date(f).toLocaleDateString("ja-JP",{year:"numeric",month:"long",day:"numeric"});return n.jsx("section",{className:"bg-gray-50 py-24",children:n.jsxs("div",{className:"container mx-auto px-8 lg:px-24 max-w-6xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx("span",{className:"w-4 h-4 bg-cyan-500 rounded-full"}),n.jsx("span",{className:"text-cyan-500 font-bold",children:"ããã°"})]}),n.jsxs("h2",{className:"text-3xl lg:text-4xl font-bold text-gray-900 mb-12",children:[e,"ã®ããã°è¨äº"]}),i&&n.jsx("div",{className:"flex justify-center items-center py-12",children:n.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-cyan-500"})}),o&&n.jsx("div",{className:"text-center py-12 text-gray-500",children:o}),!i&&!o&&t.length===0&&n.jsx("div",{className:"text-center py-12 text-gray-500",children:"ã¾ã ããã°è¨äºãããã¾ãã"}),!i&&!o&&t.length>0&&n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t.map(f=>n.jsxs(q,{to:`/member-blog/${f.id}`,className:"bg-white rounded-2xl shadow-lg overflow-hidden hover:shadow-xl transition-shadow block",children:[f.eyecatch?n.jsx("img",{src:f.eyecatch.url,alt:f.title,className:"w-full h-48 object-cover"}):n.jsx("div",{className:"w-full h-48 bg-gradient-to-br from-cyan-400 to-blue-500 flex items-center justify-center",children:n.jsx("span",{className:"text-white text-4xl font-bold",children:"B"})}),n.jsxs("div",{className:"p-6",children:[n.jsx("time",{className:"text-sm text-gray-400",children:h(f.publishedAt||f.createdAt)}),n.jsx("h3",{className:"text-lg font-bold text-gray-900 mt-2 line-clamp-2",children:f.title})]})]},f.id))})]})})},WU=({currentMemberId:r,allMembers:e})=>{const[t,s]=T.useState(0),i=e.filter(m=>m.id!==r),o=typeof window<"u"&&window.innerWidth<768?2:5,c=Math.max(0,i.length-o),h=()=>{s(m=>Math.max(0,m-1))},f=()=>{s(m=>Math.min(c,m+1))};return i.length===0?null:n.jsx("section",{className:"bg-gray-800 py-12 md:py-16",children:n.jsxs("div",{className:"container mx-auto px-4 md:px-8",children:[n.jsx("h2",{className:"text-xl md:text-2xl lg:text-3xl font-bold text-white text-center mb-10 md:mb-12",children:"ãã®ä»ã®ã¡ã³ãã¼ãè¦ã"}),n.jsxs("div",{className:"relative flex items-center justify-center",children:[n.jsx("button",{onClick:h,className:"absolute left-[-10px] md:left-4 z-10 text-white hover:text-gray-300 transition-colors disabled:opacity-0",disabled:t===0,"aria-label":"åã¸",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-8 h-8 md:w-10 md:h-10",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("div",{className:"flex gap-3 md:gap-4 overflow-hidden mx-8 md:mx-16",children:i.slice(t,t+o).map(m=>n.jsx(q,{to:`/member/${m.id}`,className:"flex-shrink-0 w-[calc(50vw-40px)] h-[calc(50vw-40px)] md:w-48 md:h-48 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>window.scrollTo(0,0),children:n.jsx("img",{src:m.icon,alt:m.name,className:"w-full h-full object-cover rounded-xl md:rounded-2xl"})},m.id))}),n.jsx("button",{onClick:f,className:"absolute right-[-10px] md:right-4 z-10 text-white hover:text-gray-300 transition-colors disabled:opacity-0",disabled:t>=c,"aria-label":"次ã¸",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-8 h-8 md:w-10 md:h-10",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),n.jsx("div",{className:"flex justify-center flex-wrap gap-2 mt-8",children:i.map((m,g)=>n.jsx("button",{onClick:()=>s(Math.min(g,c)),className:`w-2 h-2 md:w-3 md:h-3 rounded-full transition-colors ${g>=t&&g<t+o?"bg-cyan-500":"bg-gray-500"}`,"aria-label":`ã¹ã©ã¤ã ${g+1}`},g))})]})})},GU={id:"keito",category:"ãã¸ãã¹ãããã¥ã¼ã¹",name:"å¤§ä¸ æ ¶äºº",nameEn:"Keito Ogami",role:"ãã©ã³ãã£ã³ã°ããã¼ã¸ã£ã¼",icon:"/assets/keito/top_color.png",catchphrase:{main:`ã¯ãªã¨ã¤ãã£ãã§ 72æºè¶³ãè¶ ãã`,emphasis:"æåä½é¨ã"},heroImage:"/assets/keito/first_view.png",stats:[{value:"8",suffix:"å¹´",label:"3DCG/2Dãã¶ã¤ã³æ´"},{value:"30",suffix:"+",label:"æ å½ããã¸ã§ã¯ãæ°"},{value:"10",suffix:"å+",label:"ç»å£åæ°"},{value:"2",suffix:"å",label:"3DCGã¢ã¯ã¼ãåè³"}],philosophy:{backgroundImage:"/assets/keito/philosophy.png",paragraphs:[`ã¯ãªã¨ã¤ãã£ãã§å«ãªææ ããã¸ãã£ãã«å¤ãã 73å°é£ãéææã«å¤ããã`,`ç®ã«è¦ããªã課é¡ãè¦ã¤ãåºãã 74æ°ããã¢ã¤ãã¢ã§æåãçã¿åºããã¨ãã¢ããã¼ã§ãã`,`ãã¶ã¤ã³ãéãã¦ãã¸ãã£ããªä¸ã®ä¸ã«å½±é¿ãä¸ãã 75ããè¯ãæªæ¥ãç¯ããã¨ã«è²¢ç®ãããã¨ãç®æãã¾ãã 76ã©ããªå°é£ã§ãããã®å¯è½æ§ãæå¤§éã«å¼ãåºãã 77価å¤ãããã®ã«ãã¦ããã¾ãã`]}
77,skills:[{title:"0â1ã®ä»çµã¿ãä½å¶ã¥ãã",description:"æ°è¦äºæ¥ç«ã¡ä¸ãçµé¨ãæ´»ããããã¼ã ã®æ¥åå¹çåã¨çç£æ§åä¸ãç®æãããã¼ã éå¶ã"},{title:"ãªã¼ã«ã©ã¦ã³ããã¶ã¤ãã¼",description:"3DCGã ãã§ãªãããã´ãã¶ã¤ã³ãã¹ã©ã¤ããã¶ã¤ã³ãWebãã¶ã¤ã³ãªã©ã®2Dãã¶ã¤ã³ã®ãã¶ã¤ã³æ¥åå
¨è¬ãããªãã¾ãã"},{title:"èªãâè¦ããã¤ãã",description:"æåæ
å ±ãã¤ã³ãã©ã°ã©ãã£ãã¯ã§æ£ç¢ºã«ãåããããã夿ã»ç¿»è¨³ãããã¨ã§ãã¡ã³ãã¼å
¨å¡ã®ãã¬ã¼ã³ããµãã¼ãã"}],caseStudy:{image:"/assets/keito/casestudy.png",challenge:"è³æã®ãã¶ã¤ã³ãèªèª¿ãä¸çµ±ä¸ã§ããã©ã³ãã®ä¿¡é ¼æ§ã¨è¨´æ±åãä½ä¸ã",approach:"ãã©ã³ãè¦å®ã«åºã¥ããã³ãã¬ã¼ãå·æ°ã¨ãæå³ãä¼ãããããæ§æã¸ã",result:"åæ³¨ç1.2åãå·¥æ°3岿¸ã"},career:[{label:"Now",title:"ãã©ã³ãããã¼ã¸ã£ã¼",description:["伿¥ã»ãµã¼ãã¹ã®ãã©ã³ãã£ã³ã°ã®è²¬ä»»è
ã¨ãã¦çä»»ã","顧客ã¨ç§ãã¡ã®ä¼æ¥ã»ãµã¼ãã¹ã¨ã®å
±éè¨èªãä½ãã顧客ããæããããµã¼ãã¹å±éã"]},{label:"Past",title:"éçºé¨é· / ãã£ã¬ã¯ã¿ã¼",description:["éçºãã¼ã ã®æ°è¦äºæ¥ç«ã¡ä¸ãã","ããã¸ã§ã¯ããéãã¦ããã¦ã¼ã¶ã¼ã«ã©ããªä½é¨ããã©ã®ããã«ä¼ãããï¼ãã¨ãããã¨ã®éè¦æ§ãçæã","äºæ¥éå¶ã¨ããã¸ã§ã¯ãéæã両ç«ãããã¸ãã¹è¦ç¹ã¨ã¯ãªã¨ã¤ãã£ãè¦ç¹ã§ã®ãã£ã¬ã¯ã·ã§ã³ã¹ãã«ã身ã«çããã"]},{label:"Origin",title:"3DCGã¸ã§ãã©ãªã¹ã",description:["3DCGãããã¯ã·ã§ã³ã§ã²ã¼ã ã»éææ©ãªã©ã®3DCGæ åå¶ä½. ","3DCGã³ã³ãã³ãå¶ä½ã®ãã¼ã éå¶ã¨å¶ä½åºç¤ãå¦ã³ãAAAã¿ã¤ãã«ããã¸ã§ã¯ããçµé¨ã"]}],qa:[{question:"Meta Heroesã«å
¥ç¤¾ã決ããçç±ã¯ï¼",answer:"ããã¾ã§ã®3DCGãã¶ã¤ãã¼æä»£ã§ã¯ã仿§æ¸éãã«å¶ä½ããæ¥ã
ã«ããã£ã¨æ¬è³ªããé¢ãããããã¨ãã©ããããæãã¦ãã¾ãããããã§ãäºæ¥ãèªãåãããå½ç¤¾ã¸å
¥ç¤¾. ä¼ç»ããç´åã¾ã§ã䏿°éè²«ã§æ
ãä¸ã§ããã¸ãã¹è¦ç¹ãå¨å²ãå·»ãè¾¼ãåãé¤ããã¾ãã. ã¯ãªã¨ã¤ãã£ãã®ç¥è¦ãæ´»ããã¤ã¤ãè£éãæã£ã¦ã¼ãããäºæ¥ãåµãä¸ããä»ã®ç°å¢ã¯ãæ¯æ¥ãåºæ¿çã§ãã¾ãã«ç§ãæ±ãã¦ããææ¦ã®å ´ã«ãªã£ã¦ãã¾ãã",image:"/assets/keito/q1.png"},{question:"å
¥ç¤¾ãã¦è¯ãã£ããã¨ã¯ï¼",answer:"å
¥ç¤¾ãã¦ä½ããå¬ããã®ã¯ãã¤ãã³ããåè«ãªã©ã®å ´ãéãã¦ãã客æ§ããç´æ¥ããã ãããããããé¢ç½ããã¨ããåå¿ãèãããã¨ã§ã. èªåãææããææç©ããã®å ´ã§ä½é¨ãã¦ããã ããæ¥½ããã§ããå§¿ãçã®ææ³ã«è§¦ãããã¨ãã§ãã¾ã. ãæ¬å½ã«ä½ã£ã¦ããã£ããã¨å¿ãã宿ã§ããç¬éã«ãä¸çªã
77®ãããããæãããã¨ãã§ããããã«ä¾¡å¤ãããã®ãå±ãããã¨ãããæ¬¡ã®ææ¦ã¸åãã大ããªåååã¨ãªã£ã¦ãã¾ãã",image:"/assets/keito/q2.png"},{question:"ä¸çªèªåèªèº«ãæé·ãæãããã¨ã¯ï¼",answer:"ä¸çªã®æé·ã¯ãä»äºã®å ¨ä½åãæããæ¬¡ã®ä¸æããå èªã¿ããã¦åãåãã¤ãããã¨ã§ã. 以åã¯ç®ã®åã®ä½æ¥ã«å¿ æ»ã§ããããä»ã¯ããã®å¾ã«ä½ãå¿ è¦ã«ãªããããç¸æã¯ã©ãåããããå¸¸ã«æ³åã§ããããã«ãªãã¾ãã. ã´ã¼ã«ããéç®ãã¦å åããã¦æºåãããã¨ã§ãææ»ããé²ããã¹ã ã¼ãºãªé²è¡ããªã¼ãã§ãã¦ãã¾ã. æç¤ºãå¾ ã¤ã®ã§ã¯ãªããèªãç¶æ³ãã³ã³ããã¼ã«ããã䏻使§ããã確ããªèªä¿¡ã«ãªã£ã¦ãã¾ãã",image:"/assets/keito/q3.png"},{question:"ãã©ã¤ãã¼ãã®éããæ¹ã¯ï¼",answer:`ã»ã¸ã ã§ãã¬ã¼ãã³ã° 78ãã¹ã¯ã¯ã¼ã¯ãªã®ã§ãéåä¸è¶³è§£æ¶ã®ããã«ãæéãããã¨ãã¯ã¸ã ã«ãã£ã¦ãã¾ã. 1ã¶æã§5kgã®ãã¤ã¨ããã«ãæåãã¾ããï¼ 79 80ã»ãã³ã¹âå± é å±å·¡ã 81大妿代ã®å人ã¨é±æ«éã¾ã£ã¦ããã³ã¹ããã¦ãã¾ã. ãã®å¾ãä¸ç·ã«å± é å±å·¡ãããããªãã¬ãã·ã¥ãã¦ãã¾ã. ãã¾ã«ãäºæ¥é ãã«ãªã£ã¡ããã¾ãã...ï¼ç¬ï¼`,image:"/assets/keito/q4.png"}],schedule:[{time:"9:00",title:"æ å ±ãã£ããã¢ãã"},{time:"9:30",title:"åºç¤¾ã»ã¿ã¹ã¯ãã§ãã¯",description:"æ¨æ¥ã®é社å¾ã®é£çµ¡äºé ã®ç¢ºèªãããã¿ã¹ã¯ãããã°ãåªå é ä½ã決ããè¨ç»ãç«ã¦ã"},{time:"10:00",title:"ä¼è°",description:"売ä¸ãKPI鲿ã確èªããæ¬¡ã®ã¢ã¯ã·ã§ã³ãã©ã³ããªã¹ãã¢ãã"},{time:"11:00",title:"ãã©ã³ãæ¦ç¥ç«æ¡",description:"åãããã¯ãã®ãã¬ã³ãã»å¸å ´èª¿æ»ãå ã«ãAIã¨å£æã¡ããªãããè³æã使"},{time:"12:00",title:"ã©ã³ã",description:"é£äºãããªãããæ¬¡ã®ã¹ã±ã¸ã¥ã¼ã«ã¨ã¿ã¹ã¯ã確èªããæ å ±æ´ç"},{time:"13:00",title:"ã¯ãªã¨ã¤ãã£ãã³ã³ãã³ãå¶ä½",description:"ãã´ä½æãã¹ã©ã¤ã使ããã©ã·ãªã©ã®ã°ã©ãã£ãã¯å¶ä½ãã¬ã¤ãã©ã¤ã³ã®ä½æ"},{time:"17:30",title:"å¹ææ¸¬å®ã»åæ",description:"Webã®æµå ¥ç¶æ³ã確èªããç¾ç¶åæã¨æ¹åçã®çå®"},{time:"18:00",title:"ç¿æ¥æºå",description:"æ®ãã¿ã¹ã¯ã®ç¢ºèªã¨ææ¥ã®ã¹ã±ã¸ã¥ã¼ã«ã®ç¢ºèªãã使¥ã®ä¸å°ãæ´ãã"},{time:"18:30",title:"é社"},{time:"19:00",title:"ã¸ã "},{time:"21:00",title:"æ©å¾¡é£¯âå ¥æµ´"},{time:"22:00",title:"ãé ã¨å ±ã«ã¯ãªã¨ã¤ãã£ãã®åå¼·"},{time:"24:00",title:"å°±å¯"}]},qU={id:"yuya",category:"ãã¸ãã¹ãããã¥ã¼ã¹",name:"åé è£ä¹",nameEn:"Yuya Kitano",role:"ããããã¹ãã¤ã«ãã©ã³ãã¼",icon:"/assets/yuya/top_color.png",catchphrase:{main:"ãå¿ãåãç¬éããåµã",emphasis:"ãã£ãããæ¬¡ã ã¨"},heroImage:"/assets/yuya/first.png",stats:[{value:"常è",suffix:"ã",label:"å¤ããæè²è¨è¨"},{value:"æé©",suffix:"ãª",label:"ãã¯ããã¸ã¼ææ¡"},{value:"ç¡é",suffix:"ã®",label:"ãããããåµé "},{value:"100",suffix:"%",label:"ã¹ãã¤ã«è¿½æ±"}],philosophy:{backgroundImage:"/assets/yuya/philosophy.png",paragraphs:["ãå¿ãåãç¬éããåµããã¨ã信念ã¨ãã¦ãã¾ãã","åã©ããã¡ãæªç¥ã«è§¦ãã¦è¡¨æ ãè¼ãããç¬éãå¢ããããããã®æ§åãè¦ã¦å¿åããããå¨ãã®å¤§äººãå¢ããããã®ç¤¾ä¼ãããè¯ããã¦ããããã","ãã®ä¼ç¤¾ã§ããã¯ããã¸ã¼ã®åãç¨ãã¦æè²ã®å¸¸èãå¤ããããã£ããããæ¬¡ã ã¨çã¿åºãã¦ãããã¨ãç§ã®ããã·ã§ã³ã§ãã"]},skills:[{title:"æè²è¨è¨ã»æå°",description:"åã©ãã®èå³ãå¼ãåºããå¦ã³ã¸ç¹ããæè²ããã°ã©ã ã®æ§ç¯ãæè²ã¨ãã¯ããã¸ã¼ã®èåã追æ±ãã¾ãã"},{title:"課é¡è§£æ±ºè¨è¨",description:"ãã¸ãã¹ä¸ã®èª²é¡ãçºè¦ãã解決ã¾ã§ã®ããã»ã¹ãè¨è¨ãå¤è§çãªè¦ç¹ããæé©ãªã¢ããã¼ããå°ãåºãã¾ãã"},{title:"ãã¯ããã¸ã¼ã»CG",description:"ã³ã³ãã¥ã¼ã¿ã¼ã°ã©ãã£ãã¯ã¹å¨ãã徿ã¨ãã¤ã¤ãå¸¸ã«ææ°æ å ±ããã£ããã¢ããããæé©ãªææ¡ãè¡ãã¾ãã"}],caseStudy:{image:"/assets/yuya/casestudy.png",challenge:"æè²ç¾å ´ã«ããããã¯ããã¸ã¼æ´»ç¨ã®é ãã¨ãåã©ããã¡ã®èå³é¢å¿ã®æ¸éã",approach:"ããããããã軸ã«ããæ°ããæè²ããã°ã©ã ã®éçºã¨ããã¯ããã¸ã¼ã«ããä½é¨ã®æ¡å¼µã",result:"åã©ããã¡ã®èªçºçãªå¦ã³ã®å¢å ã¨ãæè²ã«ãããæ°ãã価å¤è¦³ã®åµåºã"},career:[{label:"Now",title:"ã³ã¼ãã¬ã¼ããã£ã¬ã¯ã¿ã¼",description:["çµç¹ã®ç«ã¡ä¸ãã«æºãããããã¸ã¡ã³ããçµå¶è¦ç¹ã§ã®å¯¾äººã¹ãã«ã磨ãã¦ãã¾ãã","ããã£ããããçã¿åºãããã·ã§ã³ãéè¡ããæè²ã®å¸¸èãå¤ããææ¦ãç¶ãã¦ãã¾ãã"]},{label:"Past",title:"çºä¿¡ã¨å¯¾è©±ã®ç é½",description:["夿§ãªæ¹ã ã¨æ¥ããä¸ã§ãèªåã®èããè¨èªåãã¦ä¼ããéè¦æ§ãå¦ç¿ã","è¦æã ã£ã人åã§ã®çºä¿¡ãå æããç¾å¨ã¯ç©æ¥µçã«ç»å£ãææ¡ãè¡ã£ã¦ãã¾ãã"]},{label:"Origin",title:"æè²Ããã¯ããã¸ã¼ã¸ã®æ³ã",description:["æè²ã®å¸¸èãå¤ãããã¨ããå¼·ãæããåç¹ã","åã©ããã¡ãæªç¥ã«è§¦ããå¿ãåãç¬éãåµãããã«ãã®éãæ©ã¿å§ãã¾ããã"]}],qa:[{question:"Meta Heroesã«å ¥ç¤¾ã決ããçç±ã¯ï¼",answer:"ãæè²ã®å¸¸èãå¤ããããã¨ããå¼·ãæãããå ¥ç¤¾ã®æ±ºãæã¨ãªãã¾ãããæ¢åã®æ çµã¿ã«ã¨ããããããã¯ããã¸ã¼ã®åã使ã£ã¦æ°ããããã£ããããæ¬¡ã ã¨çã¿åºããç°å¢ã«é åãæãã¾ããã",image:"/assets/yuya/q1.png"},{question:"å ¥ç¤¾ãã¦è¯ãã£ããã¨ã¯ï¼",answer:"å®¶æã大åã«ãã社風ãé åã§ãã代表ããç§çæ´»ã¾ã§æ·±ãæ°é£ã温ããããããããä¸å±¤å®¶æã大äºã«ãããã¨æãã¾ããã¾ããä¸åã§ã®ç»å£ãè¹ä¸ã§ã®è±è¦BBQãªã©ãæ®éã§ã¯å³ãããªãè²´éãªä½é¨ããå¤æãªæ¹ã ã¨ã®åºä¼ããæ¥å¸¸çã«ããã¾ãã",image:"/assets/yuya/q2.png"},{question:"èªèº«ãæé·ãæãããã¨ã¯ï¼",answer:"以åã¯äººåã§ã®çºä¿¡ãè¦æã§ããããèªåã®èããè¨èªåãã¦ä¼ããéè¦æ§ãå¦ã³ãç¾å¨ã¯ç©æ¥µçã«ç»å£ãææ¡ã«æããããã«ãªãã¾ãããã¾ããçµç¹ã®ç«ã¡ä¸ããéãã¦çµå¶è¦ç¹ãé¤ããã¦ãã¾ãã",image:"/assets/yuya/q3.png"},{question:"大åã«ãã¦ãããã¨ã¯ï¼",answer:"ãå®¶æã¸ã®æè¬ãã¨ãå¿ãåãç¬éãã§ããåºæ¿çãªç°å¢ã§ä»äºã«æã¡è¾¼ããã®ã¯å®¶æã®æ¯ãããã£ã¦ããããã®æè¬ãå¿ãããåã©ããã¡ã®æªç¥ã¸ã®ææ¦ãæ¯ãããã£ãããåµãç¶ãã¦ããããã§ãã",image:"/assets/yuya/q4.png"}],schedule:[{time:"9:00",title:"ã¿ã¹ã¯æ´çã»æ å ±åé"},{time:"10:00",title:"ã³ã¼ãã¬ã¼ãæ¥åã»çµç¹éå¶"},{time:"12:00",title:"ã©ã³ããªãã¬ãã·ã¥"},{time:"13:00",title:"æè²ããã°ã©ã è¨è¨ã»è³æä½æ"},{time:"15:00",title:"ãã¼ãã£ã³ã°ã»ç»å£æºå"},{time:"18:00",title:"æ¯ãè¿ãã»ç¿æ¥æºå"},{time:"19:00",title:"å®¶æã¨ã®æé"}]},KU={id:"kenji",category:"ã³ã¼ãã¬ã¼ã",name:"è¿è¤ æ²æ²»",nameEn:"Kenji K
81ondo",role:"ã³ã¼ãã¬ã¼ãã¨ã³ã¸ãã¢",icon:"/assets/kenji/top_color.png",catchphrase:{main:`çµç¹ã®é¼åãæ´ãã 82âã·ã¹ãã ã³ã³ãã¯ã¿ã¼â`,emphasis:"ææ¦ã®ä¸æ©ã"},heroImage:"/assets/kenji/first.png",stats:[{value:"20",suffix:"å¹´",label:"éçºçµé¨å¹´æ°"},{value:"100",suffix:"å",label:"å¨ã®ç»å£åè¡åæ°"},{value:"6",suffix:"æ¬",label:"ã¤ã³ãã¬ã¹è¨äºå·ç"},{value:"4",suffix:"ã¤",label:"æå±ã³ãã¥ããã£æ°"}],philosophy:{backgroundImage:"/assets/kenji/philosophy.png",paragraphs:["ç§ã大åã«ãã¦ããã®ã¯ãä¸ä»£ãè¶ ãã¦å¦ã³åããç°å¢ãã¤ãããææ¦ã®ä¸æ©ã徿¼ããããã¨ã§ãã","ä¸å¦çã§èµ·æ¥ããå¨ã¨æ²ãããAIæä»£ã®æè²ãåµããã¨ããæ³ããåååã«ããã®ä¼ç¤¾ã§ãå®¶åºãã社ä¼ã¸å¦ã³ã®å¤é©ãåºããåã©ãã大人ãèªåã®å¯è½æ§ãä¿¡ãã¦ææ¦ã§ããæªæ¥ãå®ç¾ãããã¨èãã¦ãã¾ãã"]},skills:[{title:"ã·ã¹ãã è¨è¨å",description:"è¤éãªæ¥åãæµãã¨ãã¦åæ§ç¯ãã使ããããä»çµã¿ã«æé©åãã¾ããå£ããªãä»çµã¿ã使ã人ã«è¿·ãããªãè¨è¨ãéè¦ãã¦ãã¾ãã"},{title:"èªååã»å¹çåã¹ãã«",description:"GASãAPI飿ºã§ä½æ¥ãèªååããæéã¨ã³ã¹ããå¤§å¹ ã«åæ¸ãã¾ãã"},{title:"ãã¼ã¿çµ±åã»éç¨ã¹ãã«",description:"忣ãããã¼ã¿ãçµ±åããæææ±ºå®ã«å½¹ç«ã¤å½¢ã¸ãæè¡ã¯äººã®åãæ¹ãç°å¢ãããããããããã«ããã¨ãã信念ãæã£ã¦ãã¾ãã"}],caseStudy:{image:"/assets/kenji/casestudy.png",challenge:"çµç¹ã®æ¡å¤§ã«ä¼´ãæ¥åããã¼ã®è¤éåã¨ãå±äººåã«ããå¹çä½ä¸ã",approach:"å ¨ä½æé©ãè¦æ®ããã·ã¹ãã è¨è¨ã¨ãèªååãã¼ã«ã®å°å ¥ã«ããæ¥åããã»ã¹ã®åæ§ç¯ã",result:"æ¥åæéã®ç縮ã¨ãã¹ã®åæ¸ãæ¬æ¥æ³¨åãã¹ãã³ã¢æ¥åã¸ã®éä¸ãå®ç¾ã"},career:[{label:"Now",title:"ã·ã¹ãã ã³ã³ãã¯ã¿ã¼",description:["çµç¹ã®é¼åãæ´ããå½¹å²ã¨ãã¦ã社å ã®ã·ã¹ãã ç°å¢ãæ´åã","å®¶åºãã社ä¼ã¸å¦ã³ã®å¤é©ãåºãã誰ããææ¦ã§ããæªæ¥ã®å®ç¾ãç®æãã¦ãã¾ãã"]},{label:"Past",title:"ä»çµã¿ã¥ããã®ç é½",description:["ãå£ããªãä»çµã¿ãã使ã人ã«è¿·ãããªãè¨è¨ãã®éè¦æ§ãå¦ã³ãå®è·µã","ã¦ã¼ã¶ã¼è¦ç¹ã«ç«ã£ãã·ã¹ãã éçºã§ãå¤ãã®æ¥åæ¹åãå®ç¾ãã¦ãã¾ããã"]},{label:"Origin",title:"ç¾å ´èª²é¡ã¨ã®å¯¾å³",description:["è£½é æ¥ã®ç¾å ´ã§ãå¨åº«ç®¡çãå·¥ç¨ç®¡çãªã©ã®ã·ã¹ãã éçºã«å¾äºã","ãæè¡ã¯ã人ã®åãæ¹ãç°å¢ãããããããããã«ãããã¨ãã価å¤è¦³ã確ç«ããç¾å¨ã®ä»äºã®åç¹ã¨ãªãã¾ããã"]}],qa:[{question:"Meta Heroesã«å ¥ç¤¾ã決ããçç±ã¯ï¼",answer:"ææ¦ããäººãæ¯ãããã¼ãã¼ãçã¿åºãã¦ããã¨ããMetaHeroesã®ãã¸ã§ã³ã«å¼·ãæ¹ããããã¨ãå ¥ç¤¾ã®å¤§ããªçç±ã§ããä¸å¦çã§èµ·æ¥ããå¨ã¨å ±ã«æ©ãã§ããçµé¨ããã誰ããå¯è½æ§ãä¿¡ãã¦ææ¦ã§ãã社ä¼ãä½ãããã¨ããæ³ãã¨éãªãã¾ããã",image:"/assets/kenji/q1.png"},{question:"å ¥ç¤¾ãã¦è¯ãã£ããã¨ã¯ï¼",answer:"夿§ãªããã¯ã°ã©ã¦ã³ããæã¤ã¡ã³ãã¼ã¨ååã§ããç¹ã§ããããããã®å°éæ§ãæ´»ãããªãããäºãã«åºæ¿ãåããç°å¢ããããèªåèªèº«ã®æè¡åãè¦åº§ãé«ããçµ¶å¥½ã®æ©ä¼ã¨ãªã£ã¦ãã¾ãã",image:"/assets/kenji/q2.png"},{question:"大åã«ãã¦ãããã¨ã¯ï¼",answer:"ãæè¡ã¯äººã®ããã«ãããã¨ãã信念ã§ããã©ããªã«é«åº¦ãªæè¡ãã使ã人ã幸ãã«ãªããªããã°æå³ãããã¾ãããã ãããããç¾å ´ã®å£°ã«è³ãå¾ããæ¬å½ã«å¿ è¦ã¨ãããä»çµã¿ãä½ããã¨ã«ãã ãã£ã¦ãã¾ãã",image:"/assets/kenji/q3.png"},{question:"ãã©ã¤ãã¼ãã®éããæ¹ã¯ï¼",answer:"å¨ã¨ã®æéã大åã«ãã¦ãã¾ããæ¯æ©ã®ãã¼ãã£ã³ã°ããç»å£ã¸ã®åè¡ãªã©ãå½¼å¥³ã®ææ¦ãä¸çªè¿ãã§å¿æ´ã§ãããã¨ãåã³ã§ããã¾ãããã¯ããã¸ã¼ç³»ã³ãã¥ããã£ã§ã®æ´»åãéãã¦ãèªèº«ã®ã¢ãããã¼ããæ¬ ããã¾ãããï¼Xï¼@kondo2024ï¼",image:"/assets/kenji/q4.png"}],schedule:[{time:"06:00",title:"èµ·åº"},{time:"06:30",title:"å ¥æµ´"},{time:"07:00",title:"æé£"},{time:"08:00",title:"ç¶æ³åéã»èªå·±åçºç"},{time:"10:00",title:"åºç¤¾ï¼å¨å® ï¼"},{time:"11:00",title:"ãã¼ãã£ã³ã°"},{time:"12:00",title:"æ¼é£"},{time:"13:00",title:"åè«ã»ä½æ¥æé"},{time:"18:00",title:"ç¿æ¥ã®æºå"},{time:"19:00",title:"é社"},{time:"19:30",title:"å¤é£¯"},{time:"20:00",title:"å¨ã¨ãã¼ãã£ã³ã°"},{time:"22:00",title:"å°±å¯"}]},zp=[GU,qU,KU],XU=()=>{const{memberId:r}=Z3(),e=zp.find(f=>f.id===r),t=T.useRef(null),[s,i]=T.useState(0);T.useEffect(()=>{window.scrollTo(0,0)},[r]),T.useEffect(()=>{if(t.current){const f=()=>{t.current&&i(t.current.offsetHeight)};f(),window.addEventListener("resize",f);const m=setTimeout(f,100);return()=>{window.removeEventListener("resize",f),clearTimeout(m)}}},[e]);const{scrollY:a}=MU(),o=400,c=o+(s||1)*.5,h=Z4(a,[o,c],[-s,0]);return e?n.jsxs("main",{className:"relative",children:[n.jsx(De,{title:`${e.name} | ã¡ã³ãã¼ç´¹ä» | æ ªå¼ä¼ç¤¾MetaHeroes`,description:`${e.name}ã®ãããã£ã¼ã«ãçµæ´ãå²å¦ã«ã¤ãã¦ãæ ªå¼ä¼ç¤¾MetaHeroesã®ãããã§ãã·ã§ãã«ã¡ã³ãã¼ããç´¹ä»ãã¾ãã`,schema:{"@context":"https://schema.org","@type":"Person",name:e.name,jobTitle:e.role,worksFor:{"@type":"Organization",name:"æ ªå¼ä¼ç¤¾MetaHeroes"},image:e.heroImage}}),n.jsx("div",{className:"relative z-20",children:n.jsx(FU,{member:e})}),n.jsx("div",{ref:t,className:"relative z-0",children:n.jsx(BU,{philosophy:e.philosophy})}),n.jsxs(Ce.div,{className:"relative z-30",style:{y:h},children:[n.jsx($U,{skills:e.skills,caseStudy:e.caseStudy}),n.jsx(UU,{career:e.career}),n.jsx(HU,{qa:e.qa}),n.jsx(zU,{schedule:e.schedule}),n.jsx(VU,{memberId:e.id,memberName:e.name}),n.jsx(WU,{currentMemberId:e.id,allMembers:zp})]})]}):n.jsx(H2,{to:"/",replace:!0})},Ge=({titleEn:r,titleJa:e,subText:t,backgroundImage:s,isFullHeight:i=!1})=>n.jsxs("section",{className:`relative flex items-center justify-center overflow-hidden ${i?"h-[80vh] min-h-[500px] md:min-
82h-[600px]":"pt-32 pb-16 md:pt-48 md:pb-24"} ${s?"":"bg-white"}`,children:[s&&n.jsxs("div",{className:"absolute inset-0",children:[n.jsx("img",{src:s,alt:r,className:"w-full h-full object-cover"}),n.jsx("div",{className:"absolute inset-0 bg-black/40"})]}),n.jsx("div",{className:"container mx-auto px-4 relative z-10 text-center",children:n.jsxs(Ce.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},className:"flex flex-col items-center",children:[n.jsx("span",{className:`text-xs font-black tracking-[0.4em] uppercase mb-4 ${s?"text-white/80":"text-gray-400"}`,children:r}),n.jsxs("div",{className:"flex flex-col items-center gap-4 md:gap-6",children:[n.jsx("h1",{className:`text-3xl md:text-5xl font-black tracking-tight leading-tight ${s?"text-white drop-shadow-2xl":"text-gray-900"}`,children:e}),n.jsx("div",{className:`w-16 h-0.5 bg-gradient-to-r from-blue-600 to-cyan-400 ${s?"shadow-lg shadow-cyan-500/50":""}`}),t&&n.jsx("p",{className:`text-lg font-bold tracking-[0.1em] mt-2 ${s?"text-white opacity-90":"text-gray-500"}`,children:t})]}),i&&n.jsx(Ce.div,{animate:{y:[0,10,0]},transition:{duration:2,repeat:1/0},className:"mt-12",children:n.jsx("div",{className:`w-[1px] h-16 mx-auto ${s?"bg-gradient-to-b from-cyan-400 to-transparent":"bg-gradient-to-b from-blue-600 to-transparent"}`})})]})})]}),YU=()=>{const[r,e]=T.useState([]),t=T.useRef(null);T.useEffect(()=>{em(12).then(a=>e(a.contents)).catch(a=>console.error("Failed to fetch member blogs:",a))},[]);const s=a=>{if(!t.current)return;const{scrollLeft:o,clientWidth:c}=t.current,h=a==="left"?o-c:o+c;t.current.scrollTo({left:h,behavior:"smooth"})},i=a=>{const o=new Date(a);return`${o.getFullYear()}.${String(o.getMonth()+1).padStart(2,"0")}.${String(o.getDate()).padStart(2,"0")}`};return n.jsxs("main",{className:"min-h-screen bg-white pb-24",children:[n.jsx(Ge,{titleEn:"MEMBER INTRODUCTION",titleJa:"ã¡ã³ãã¼ç´¹ä»"}),n.jsxs("section",{className:"container mx-auto px-4 sm:px-8 mb-24 md:mb-32",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold tracking-[0.4em] block mb-1 uppercase text-gray-400",children:"MEMBERS"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"ã¡ã³ãã¼ä¸è¦§"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]}),n.jsxs("div",{className:"relative",children:[n.jsx("div",{ref:t,className:"flex gap-4 md:gap-10 overflow-x-auto scrollbar-hide snap-x snap-mandatory pb-6 -mx-4 px-4 sm:mx-0 sm:px-0",children:zp.map((a,o)=>n.jsx(Ce.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o*.03},className:"flex-shrink-0 w-[160px] md:w-[calc((100%-7.5rem)/4)] snap-start",children:n.jsxs(q,{to:`/member/${a.id}`,className:"group/card block",children:[n.jsx("div",{className:"aspect-square rounded-2xl md:rounded-[2rem] overflow-hidden bg-white shadow-lg mb-4 md:mb-6 transition-all duration-500 group-hover/card:-translate-y-2 group-hover/card:shadow-2xl",children:n.jsx("img",{src:a.icon,alt:a.name,className:"w-full h-full object-cover grayscale transition-all duration-700 group-hover/card:grayscale-0 group-hover/card:scale-105"})}),n.jsxs("div",{className:"px-2",children:[n.jsx("h3",{className:"text-base md:text-xl font-bold text-gray-900 mb-0.5 md:mb-1 leading-tight",children:a.name}),n.jsx("p",{className:"text-[9px] md:text-xs font-bold text-cyan-600 tracking-wider mb-1.5 md:mb-2",children:a.nameEn}),n.jsx("p",{className:"text-[9px] md:text-xs text-gray-400 font-bold tracking-[0.2em] uppercase border-t border-gray-100 pt-1.5 md:pt-2 inline-block pr-4",children:a.role})]})]})},a.id))}),n.jsx("button",{onClick:()=>s("left"),"aria-label":"åã¸",className:"absolute left-0 top-[35%] -translate-y-1/2 -translate-x-2 md:-translate-x-1/2 w-10 h-10 md:w-12 md:h-12 bg-white rounded-full shadow-xl flex items-center justify-center text-gray-400 hover:text-blue-600 transition-all z-10",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-5 h-5 md:w-6 md:h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("button",{onClick:()=>s("right"),"aria-label":"次ã¸",className:"absolute right-0 top-[35%]
82-translate-y-1/2 translate-x-2 md:translate-x-1/2 w-10 h-10 md:w-12 md:h-12 bg-white rounded-full shadow-xl flex items-center justify-center text-gray-400 hover:text-blue-600 transition-all z-10",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-5 h-5 md:w-6 md:h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]})]}),n.jsxs("section",{className:"container mx-auto px-4 sm:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold tracking-[0.4em] block mb-1 uppercase text-gray-400",children:"MEMBER BLOG"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"ã¡ã³ãã¼ããã°ä¸è¦§"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]}),r.length===0?n.jsx("div",{className:"text-center py-16",children:n.jsx("p",{className:"text-gray-300 text-sm font-bold tracking-widest",children:"è¨äºãèªã¿è¾¼ã¿ä¸..."})}):n.jsx("div",{className:"max-w-6xl mx-auto grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8",children:r.map((a,o)=>n.jsx(Ce.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:o*.05},children:n.jsxs(q,{to:`/member-blog/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-xl overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:a.eyecatch?n.jsx("img",{src:a.eyecatch.url,alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}):n.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blue-400 to-cyan-500 flex items-center justify-center",children:n.jsx("span",{className:"text-white text-2xl font-black",children:"MH"})})}),n.jsxs("div",{className:"px-1",children:[n.jsx("time",{className:"text-[10px] font-black text-gray-300 tracking-[0.2em] font-mono block mb-2",children:i(a.publishedAt)}),n.jsx("h3",{className:"text-sm md:text-base font-black text-gray-800 leading-snug group-hover:text-blue-600 transition-colors line-clamp-2",children:a.title})]})]})},a.id))}),n.jsx("div",{className:"mt-12 text-center",children:n.jsx(q,{to:"/members/blog",className:"text-[10px] font-bold text-gray-400 hover:text-blue-600 transition-colors tracking-[0.2em] border-b border-gray-100 hover:border-blue-600 pb-1 uppercase",children:"View All"})})]})]})},JU=()=>n.jsxs("main",{className:"min-h-screen bg-white pb-24",children:[n.jsx(Ge,{titleEn:"MEMBER LIST",titleJa:"ã¡ã³ãã¼ä¸è¦§"}),n.jsx("div",{className:"container mx-auto px-4 sm:px-8",children:n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-x-8 gap-y-16 sm:gap-x-12 sm:gap-y-20 max-w-5xl mx-auto",children:zp.map((r,e)=>n.jsx(Ce.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:e*.03},children:n.jsxs(q,{to:`/member/${r.id}`,className:"group block text-left",children:[n.jsx("div",{className:"relative aspect-square mb-6",children:n.jsx("div",{className:"w-full h-full rounded-[2rem] bg-gray-50 transition-all duration-500 ease-out group-hover:-translate-y-2 group-hover:shadow-[0_0_40px_rgba(6,182,212,0.3)]",children:n.jsx("div",{className:"w-full h-full rounded-[2rem] overflow-hidden",children:n.jsx("img",{src:r.icon,alt:r.name,className:"w-full h-full object-cover grayscale transition-all duration-700 ease-in-out group-hover:grayscale-0 group-hover:scale-105"})})})}),n.jsxs("div",{className:"space-y-1 px-2 transition-transform duration-500 group-hover:-translate-y-1",children:[n.jsx("h2",{className:"text-lg sm:text-2xl font-bold text-gray-900 tracking-tight leading-tight",children:r.name}),n.jsx("p",{className:"text-sm sm:text-base text-cyan-600 font-medium tracking-wider mb-2 font-sans",children:r.nameEn}),n.jsx("p",{className:"text-[10px] sm:text-xs text-gray-400 font-bold tracking-[0.2em] uppercase pt-1 border-t border-gray-100 group-hover:border-gray-200 transition-colors inline-block pr-4",children:r.role})]})]})},r.id))})})]});/** 83 * @license lucide-react v0.562.0 - ISC 84 * 85 * This source code is licensed under the ISC license. 86 * See the LICENSE file in the root directory of this source tree. 87 */const QU=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ZU=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase()),dC=r=>{const e=ZU(r);return e.charAt(0).toUpperCase()+e.slice(1)},eP=(...r)=>r.filter((e,t,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===t).join(" ").trim(),eH=r=>{for(const e in r)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/** 88 * @license lucide-react v0.562.0 - ISC 89 * 90 * This source code is licensed under the ISC license. 91 * See the LICENSE file in the root directory of this source tree. 92 */var tH={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"};/** 93 * @license lucide-react v0.562.0 - ISC 94 * 95 * This source code is licensed under the ISC license. 96 * See the LICENSE file in the root directory of this source tree. 97 */const sH=T.forwardRef(({color:r="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:s,className:i="",children:a,iconNode:o,...c},h)=>T.createElement("svg",{ref:h,...tH,width:e,height:e,stroke:r,strokeWidth:s?Number(t)*24/Number(e):t,className:eP("lucide",i),...!a&&!eH(c)&&{"aria-hidden":"true"},...c},[...o.map(([f,m])=>T.createElement(f,m)),...Array.isArray(a)?a:[a]]));/** 98 * @license lucide-react v0.562.0 - ISC 99 * 100 * This source code is licensed under the ISC license. 101 * See the LICENSE file in the root directory of this source tree. 102 */const Le=(r,e)=>{const t=T.forwardRef(({className:s,...i},a)=>T.createElement(sH,{ref:a,iconNode:e,className:eP(`lucide-${QU(dC(r))}`,`lucide-${r}`,s),...i}));return t.displayName=dC(r),t};/** 103 * @license lucide-react v0.562.0 - ISC 104 * 105 * This source code is licensed under the ISC license. 106 * See the LICENSE file in the root directory of this source tree. 107 */const nH=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],rH=Le("arrow-left",nH);/** 108 * @license lucide-react v0.562.0 - ISC 109 * 110 * This source code is licensed under the ISC license. 111 * See the LICENSE file in the root directory of this source tree. 112 */const iH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],aH=Le("arrow-right",iH);/** 113 * @license lucide-react v0.562.0 - ISC 114 * 115 * This source code is licensed under the ISC license. 116 * See the LICENSE file in the root directory of this source tree. 117 */const oH=[["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"}]],Ub=Le("calendar",oH);/** 118 * @license lucide-react v0.562.0 - ISC 119 * 120 * This source code is licensed under the ISC license. 121 * See the LICENSE file in the root directory of this source tree. 122 */const lH=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Kf=Le("check",lH);/** 123 * @license lucide-react v0.562.0 - ISC 124 * 125 * This source code is licensed under the ISC license. 126 * See the LICENSE file in the root directory of this source tree. 127 */const cH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Vs=Le("chevron-down",cH);/** 128 * @license lucide-react v0.562.0 - ISC 129 * 130 * This source code is licensed under the ISC license. 131 * See the LICENSE file in the root directory of this source tree. 132 */const dH=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],q0=Le("chevron-left",dH);/** 133 * @license lucide-react v0.562.0 - ISC 134 * 135 * This source code is licensed under the ISC license. 136 * See the LICENSE file in the root directory of this source tree. 137 */const uH=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ya=Le("chevron-right",uH);/** 138 * @license lucide-react v0.562.0 - ISC 139 * 140 * This source code is licensed under the ISC license. 141 * See the LICENSE file in the root directory of this source tree. 142 */const hH=[["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"}]],fH=Le("circle-alert",hH);/** 143 * @license lucide-react v0.562.0 - ISC 144 * 145 * This source code is licensed under the ISC license. 146 * See the LICENSE file in the root directory of this source tree. 147 */const mH=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],tP=Le("circle-check-big",mH);/** 148 * @license lucide-react v0.562.0 - ISC 149 * 150 * This source code is licensed under the ISC license. 151 * See the LICENSE file in the root directory of this source tree. 152 */const pH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Yk=Le("circle-check",pH);/** 153 * @license lucide-react v0.562.0 - ISC 154 * 155 * This source code is licensed under the ISC license. 156 * See the LICENSE file in the root directory of this source tree. 157 */const gH=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],xH=Le("clock",gH);/** 158 * @license lucide-react v0.562.0 - ISC 159 * 160 * This source code is licensed under the ISC license. 161 * See the LICENSE file in the root directory of this source tree. 162 */const yH=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],bH=Le("cloud-upload",yH);/** 163 * @license lucide-react v0.562.0 - ISC 164 * 165 * This source code is licensed under the ISC license. 166 * See the LICENSE file in the root directory of this source tree. 167 */const vH=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],uC=Le("download",vH);/** 168 * @license lucide-react v0.562.0 - ISC 169 * 170 * This source code is licensed under the ISC license. 171 * See the LICENSE file in the root directory of this source tree. 172 */const wH=[["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"}]],sP=Le("external-link",wH);/** 173 * @license lucide-react v0.562.0 - ISC 174 * 175 * This source code is licensed under the ISC license. 176 * See the LICENSE file in the root directory of this source tree. 177 */const jH=[["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"}]],NH=Le("eye",jH);/** 178 * @license lucide-react v0.562.0 - ISC 179 * 180 * This source code is licensed under the ISC license. 181 * See the LICENSE file in the root directory of this source tree. 182 */const kH=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],SH=Le("facebook",kH);/** 183 * @license lucide-react v0.562.0 - ISC 184 * 185 * This source code is licensed under the ISC license. 186 * See the LICENSE file in the root directory of this source tree. 187 */const AH=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],nP=Le("file-text",AH);/** 188 * @license lucide-react v0.562.0 - ISC 189 * 190 * This source code is licensed under the ISC license. 191 * See the LICENSE file in the root directory of this source tree. 192 */const _H=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}
192]],EH=Le("folder",_H);/** 193 * @license lucide-react v0.562.0 - ISC 194 * 195 * This source code is licensed under the ISC license. 196 * See the LICENSE file in the root directory of this source tree. 197 */const CH=[["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"}]],TH=Le("globe",CH);/** 198 * @license lucide-react v0.562.0 - ISC 199 * 200 * This source code is licensed under the ISC license. 201 * See the LICENSE file in the root directory of this source tree. 202 */const PH=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Jk=Le("house",PH);/** 203 * @license lucide-react v0.562.0 - ISC 204 * 205 * This source code is licensed under the ISC license. 206 * See the LICENSE file in the root directory of this source tree. 207 */const RH=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],MH=Le("instagram",RH);/** 208 * @license lucide-react v0.562.0 - ISC 209 * 210 * This source code is licensed under the ISC license. 211 * See the LICENSE file in the root directory of this source tree. 212 */const IH=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],LH=Le("key-round",IH);/** 213 * @license lucide-react v0.562.0 - ISC 214 * 215 * This source code is licensed under the ISC license. 216 * See the LICENSE file in the root directory of this source tree. 217 */const DH=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],rP=Le("layout-dashboard",DH);/** 218 * @license lucide-react v0.562.0 - ISC 219 * 220 * This source code is licensed under the ISC license. 221 * See the LICENSE file in the root directory of this source tree. 222 */const OH=[["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"}]],FH=Le("layout-grid",OH);/** 223 * @license lucide-react v0.562.0 - ISC 224 * 225 * This source code is licensed under the ISC license. 226 * See the LICENSE file in the root directory of this source tree. 227 */const BH=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],$H=Le("layout-list",BH);/** 228 * @license lucide-react v0.562.0 - ISC 229 * 230 * This source code is licensed under the ISC license. 231 * See the LICENSE file in the root directory of this source tree. 232 */const UH=[["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"}]],HH=Le("link-2",UH);/** 233 * @license lucide-react v0.562.0 - ISC 234 * 235 * This source code is licensed under the ISC license. 236 * See the LICENSE file in the root directory of this source tree. 237 */const zH=[["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"}]],hC=Le("link",zH);/** 238 * @license lucide-react v0.562.0 - ISC 239 * 240 * This source code is licensed under the ISC license. 241 * See the LICENSE file in the root directory of this source tree. 242 */const VH=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],WH=Le("list",VH);/** 243 * @license lucide-react v0.562.0 - ISC 244 * 245 * This source code is licensed under the ISC license. 246 * See the LICENSE file in the root directory of this source tree. 247 */const GH=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$n=Le("loader-circle",GH);/** 248 * @license lucide-react v0.562.0 - ISC 249 * 250 * This source code is licensed under the ISC license. 251 * See the LICENSE file in the root directory of this source tree. 252 */const qH=[["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"}]],KH=Le("lock",qH);/** 253 * @license lucide-react v0.562.0 - ISC 254 * 255 * This source code is licensed under the ISC license. 256 * See the LICENSE file in the root directory of this source tree. 257 */const XH=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],YH=Le("log-out",XH);/** 258 * @license lucide-react v0.562.0 - ISC 259 * 260 * This source code is licensed under the ISC license. 261 * See the LICENSE file in the root directory of this source tree. 262 */const JH=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Uv=Le("mail",JH);/** 263 * @license lucide-react v0.562.0 - ISC 264 * 265 * This source code is licensed under the ISC license. 266 * See the LICENSE file in the root directory of this source tree. 267 */const QH=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],fC=Le("menu",QH);/** 268 * @license lucide-react v0.562.0 - ISC 269 * 270 * This source code is licensed under the ISC license. 271 * See the LICENSE file in the root directory of this source tree. 272 */const ZH=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],nc=Le("pen-line",ZH);/** 273 * @license lucide-react v0.562.0 - ISC 274 * 275 * This source code is licensed under the ISC license. 276 * See the LICENSE file in the root directory of this source tree. 277 */const e7=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],t7=Le("play",e7);/** 278 * @license lucide-react v0.562.0 - ISC 279 * 280 * This source code is licensed under the ISC license. 281 * See the LICENSE file in the root directory of this source tree. 282 */const s7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],K0=Le("plus",s7);/** 283 * @license lucide-react v0.562.0 - ISC 284 * 285 * This source code is licensed under the ISC license. 286 * See the LICENSE file in the root directory of this source tree. 287 */const n7=[["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"}]],r7=Le("refresh-cw",n7);/** 288 * @license lucide-react v0.562.0 - ISC 289 * 290 * This source code is licensed under the ISC license. 291 * See the LICENSE file in the root directory of this source tree. 292 */const i7=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],mu=Le("search",i7);/** 293 * @license lucide-react v0.562.0 - ISC 294 * 295 * This source code is licensed under the ISC license. 296 * See the LICENSE file in the root directory of this source tree. 297 */const a7=[["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"}]],Qk=Le("send",a7);/** 298 * @license lucide-react v0.562.0 - ISC 299 * 300 * This source code is licensed under the ISC license. 301 * See the LICENSE file in the root directory of this source tree. 302 */const o7=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],iP=Le("settings",o7);/** 303 * @license lucide-react v0.562.0 - ISC 304 * 305 * This source code is licensed under the ISC license. 306 * See the LICENSE file in the root directory of this source tree. 307 */const l7=[["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"}]],c7=Le("share-2",l7);/** 308 * @license lucide-react v0.562.0 - ISC 309 * 310 * This source code is licensed under the ISC license. 311 * See the LICENSE file in the root directory of this source tree. 312 */const d7=[["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
312y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],u7=Le("shield-check",d7);/** 313 * @license lucide-react v0.562.0 - ISC 314 * 315 * This source code is licensed under the ISC license. 316 * See the LICENSE file in the root directory of this source tree. 317 */const h7=[["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"}]],aP=Le("tag",h7);/** 318 * @license lucide-react v0.562.0 - ISC 319 * 320 * This source code is licensed under the ISC license. 321 * See the LICENSE file in the root directory of this source tree. 322 */const f7=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],m7=Le("text-align-start",f7);/** 323 * @license lucide-react v0.562.0 - ISC 324 * 325 * This source code is licensed under the ISC license. 326 * See the LICENSE file in the root directory of this source tree. 327 */const p7=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],So=Le("trash-2",p7);/** 328 * @license lucide-react v0.562.0 - ISC 329 * 330 * This source code is licensed under the ISC license. 331 * See the LICENSE file in the root directory of this source tree. 332 */const g7=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],x7=Le("twitter",g7);/** 333 * @license lucide-react v0.562.0 - ISC 334 * 335 * This source code is licensed under the ISC license. 336 * See the LICENSE file in the root directory of this source tree. 337 */const y7=[["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"}]],b7=Le("user",y7);/** 338 * @license lucide-react v0.562.0 - ISC 339 * 340 * This source code is licensed under the ISC license. 341 * See the LICENSE file in the root directory of this source tree. 342 */const v7=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],oP=Le("users",v7);/** 343 * @license lucide-react v0.562.0 - ISC 344 * 345 * This source code is licensed under the ISC license. 346 * See the LICENSE file in the root directory of this source tree. 347 */const w7=[["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"}]],bj=Le("video",w7);/** 348 * @license lucide-react v0.562.0 - ISC 349 * 350 * This source code is licensed under the ISC license. 351 * See the LICENSE file in the root directory of this source tree. 352 */const j7=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yr=Le("x",j7);/** 353 * @license lucide-react v0.562.0 - ISC 354 * 355 * This source code is licensed under the ISC license. 356 * See the LICENSE file in the root directory of this source tree. 357 */const N7=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],k7=Le("youtube",N7),xy=new Set(["XRã½ãªã¥ã¼ã·ã§ã³","holoshare","HERO AIVO","AI人æè²æç ä¿®","é²ç½ã¡ã¿ãã¼ã¹","é²ç½ä¸å / ãã©ãé²ç½ä¸å","ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã","Hero Egg","GLOBAL HERO SUMMIT","EGG JAM","AI MONDAY","ã²ã¼ã à ã¤ãã³ã","Meta Heroes Guild"]),S7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState(0),[i,a]=T.useState(1),[o,c]=T.useState([]),[h,f]=T.useState(""),[m,g]=T.useState(""),[x,y]=T.useState(""),[v,j]=T.useState(!1),[N,S]=T.useState([]),A=typeof window<"u"&&window.innerWidth>=1024?9:6;T.useEffect(()=>{(async()=>{try{const O=await Xe(6,void 0,{categoryId:"ãã¬ãã¸"},0);S(O.contents||[])}catch(O){console.error("Failed to fetch knowledge articles",O)}})()},[]),T.useEffect(()=>{(async()=>{try{const $=(await hO()).filter(z=>!z.name.includes("å®ç¸¾"));c($)}catch(O){console.warn("Failed to load categories:",O)}})()},[]),T.useEffect(()=>{const D=async()=>{j(!0);try{const $=(i-1)*A,z=await Xe(A,void 0,{year:m,keyword:x,categoryId:h,excludeCategoryId:"ãã¬ãã¸"},$);e(z.contents||[]),s(z.totalCount||0)}catch($){console.error("Failed to fetch blogs",$),e([]),s(0)}finally{j(!1)}},O=setTimeout(()=>{D()},500);return()=>clearTimeout(O)},[h,m,x,i,A]),T.useEffect(()=>{a(1)},[h,m,x]);const E=Math.ceil(t/A),M=()=>{const D=[];if(E<=5)for(let $=1;$<=E;$++)D.push($);else{D.push(1),i>3&&D.push("...");const $=Math.max(2,i-1),z=Math.min(E-1,i+1);for(let re=$;re<=z;re++)D.includes(re)||D.push(re);i<E-2&&D.push("..."),D.includes(E)||D.push(E)}return D},R=D=>{const O=new Date(D);return`${O.getFullYear()}.${O.getMonth()+1}.${O.getDate()}`},I=new Date().getFullYear(),F=Array.from({length:5},(D,O)=>(I-O+1).toString());return n.jsxs("div",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"NEWS",titleJa:"ãã¥ã¼ã¹"}),n.jsxs("div",{className:"container mx-auto px-4 sm:px-8 pb-32",children:[n.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-end gap-8 mb-16 border-b border-gray-100 pb-12 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 w-full lg:w-auto",children:[n.jsxs("div",{className:"relative min-w-[200px]",children:[n.jsxs("select",{value:xy.has(h)?h:"",onCh
357ange:D=>f(D.target.value),className:"w-full appearance-none px-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all cursor-pointer pr-12",children:[n.jsx("option",{value:"",children:"SERVICE: ALL"}),o.filter(D=>xy.has(D.id)).map(D=>n.jsx("option",{value:D.id,children:D.name.toUpperCase()},D.id))]}),n.jsx(Vs,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-300 pointer-events-none"})]}),n.jsxs("div",{className:"relative min-w-[200px]",children:[n.jsxs("select",{value:xy.has(h)?"":h,onChange:D=>f(D.target.value),className:"w-full appearance-none px-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all cursor-pointer pr-12",children:[n.jsx("option",{value:"",children:"CATEGORY: ALL"}),o.filter(D=>!xy.has(D.id)).map(D=>n.jsx("option",{value:D.id,children:D.name.toUpperCase()},D.id))]}),n.jsx(Vs,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-300 pointer-events-none"})]}),n.jsxs("div",{className:"relative min-w-[160px]",children:[n.jsxs("select",{value:m,onChange:D=>g(D.target.value),className:"w-full appearance-none px-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all cursor-pointer pr-12",children:[n.jsx("option",{value:"",children:"YEAR"}),F.map(D=>n.jsx("option",{value:D,children:D},D))]}),n.jsx(Vs,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-300 pointer-events-none"})]})]}),n.jsxs("div",{className:"relative flex-grow lg:w-72 w-full",children:[n.jsx("input",{type:"text",placeholder:"SEARCH",value:x,onChange:D=>y(D.target.value),className:"w-full pl-12 pr-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all placeholder:text-gray-300"}),n.jsx(mu,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-300 w-4 h-4"})]})]}),n.jsx("div",{className:"max-w-7xl mx-auto px-4",children:v?n.jsx("div",{className:"flex justify-center items-center py-32",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-100 border-t-blue-600"})}):r.length===0?n.jsx("div",{className:"text-center py-32",children:n.jsx("p",{className:"text-gray-300 font-black text-sm tracking-[0.2em] uppercase",children:"No articles found."})}):n.jsxs(n.Fragment,{children:[n.jsx(Ce.div,{initial:{opacity:0}
357,animate:{opacity:1},transition:{duration:.5},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-16",children:r.map(D=>{var O;return n.jsxs(q,{to:`/news/${D.id}`,className:"group flex flex-col h-full",children:[n.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl bg-gray-100 mb-6 shadow-sm border border-gray-50",children:n.jsx("img",{src:((O=D.eyecatch)==null?void 0:O.url)||"/assets/top/business_bg.png",alt:D.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"})}),n.jsxs("div",{className:"flex flex-col flex-grow",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:"w-6 h-6 rounded-full border border-blue-200 flex items-center justify-center flex-shrink-0 transition-colors group-hover:bg-blue-600 group-hover:border-blue-600",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 text-blue-500 group-hover:text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsx("time",{className:"text-[10px] font-black text-gray-400 tracking-[0.2em] font-mono",children:R(D.publishedAt)})]}),n.jsx("h3",{className:"text-base font-black text-gray-800 group-hover:text-blue-600 transition-colors line-clamp-2 tracking-tight leading-snug",children:D.title})]})]},D.id)})}),E>1&&n.jsxs("div",{className:"mt-20 flex justify-center items-center gap-4",children:[n.jsx("button",{onClick:()=>a(D=>Math.max(1,D-1)),disabled:i===1,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 rotate-90 group-hover:text-blue-600"})}),n.jsx("div",{className:"flex items-center gap-2",children:M().map((D,O)=>n.jsx(Co.Fragment,{children:D==="..."?n.jsx("span",{className:"w-8 text-center text-gray-300 font-bold",children:"..."}):n.jsx("button",{onClick:()=>a(Number(D)),className:`w-12 h-12 rounded-full text-xs font-black transition-all ${i===D?"bg-blue-600 text-white shadow-lg shadow-blue-100":"text-gray-400 hover:bg-gray-50"}`,children:D})},O))}),n.jsx("button",{onClick:()=>a(D=>Math.min(E,D+1)),disabled:i===E,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 -rotate-90 group-hover:text-blue-600"})})]})]})}),N.length>0&&n.jsxs("section",{className:"max-w-7xl mx-auto px-4 mt-32 pt-20 border-t border-gray-100",children:[n.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between gap-4 mb-12",children:[n.jsxs("div",{children:[n.jsx("span",{className:"block text-[10px] font-black tracking-[0.3em] text-blue-500 uppercase mb-2",children:"Knowledge"}),n.jsx("h2",{className:"text-3xl md:text-4xl font-black text-gray-900 tracking-tight",children:"ãã¬ãã¸"}),n.jsx("p",{className:"mt-3 text-sm font-bold text-gray-500",children:"AIã»ã¡ã¿ãã¼ã¹ã»XRã«é¢ããç¥è¦ããå±ããã¾ã"})]}),n.jsxs(q,{to:"/knowledge",className:"inline-flex items-center gap-2 text-xs font-black text-gray-400 hover:text-blue-600 transition-colors tracking-[0.2em] uppercase border-b border-gray-200 hover:border-blue-600 pb-1 self-start md:self-end",children:["View All",n.jsx(Vs,{className:"w-4 h-4 -rotate-90"})]})]}),n.jsx(Ce.div,{initial:{opacity:0}
357,animate:{opacity:1},transition:{duration:.5},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-16",children:N.map(D=>{var O;return n.jsxs(q,{to:`/news/${D.id}`,className:"group flex flex-col h-full",children:[n.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl bg-gray-100 mb-6 shadow-sm border border-gray-50",children:n.jsx("img",{src:((O=D.eyecatch)==null?void 0:O.url)||"/assets/top/business_bg.png",alt:D.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"})}),n.jsxs("div",{className:"flex flex-col flex-grow",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:"w-6 h-6 rounded-full border border-blue-200 flex items-center justify-center flex-shrink-0 transition-colors group-hover:bg-blue-600 group-hover:border-blue-600",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 text-blue-500 group-hover:text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsx("time",{className:"text-[10px] font-black text-gray-400 tracking-[0.2em] font-mono",children:R(D.publishedAt)})]}),n.jsx("h3",{className:"text-base font-black text-gray-800 group-hover:text-blue-600 transition-colors line-clamp-2 tracking-tight leading-snug",children:D.title})]})]},D.id)})})]})]})]})},A7="/assets/top/business_bg.png",vj=[{key:"xr-solution",label:"XRã½ãªã¥ã¼ã·ã§ã³",categoryIds:["XRã½ãªã¥ã¼ã·ã§ã³","ã¡ã¿ãã¼ã¹éçºå®ç¸¾"]},{key:"holoshare",label:"holoshare",categoryIds:["holoshare","ã¡ã¿ãã¼ã¹éçºå®ç¸¾"]},{key:"hero-aivo",label:"HERO AIVO",categoryIds:["HERO AIVO","AI / éçº å®ç¸¾"]},{key:"ai-training",label:"AI人æè²æç ä¿®",categoryIds:["AI人æè²æç ä¿®","AI / éçº å®ç¸¾"]},{key:"disaster-metaverse",label:"é²ç½ã¡ã¿ãã¼ã¹",categoryIds:["é²ç½ã¡ã¿ãã¼ã¹","ã¡ã¿ãã¼ã¹éçºå®ç¸¾"]},{key:"disaster-expo",label:"é²ç½ä¸å / ãã©ãé²ç½ä¸å",categoryIds:["é²ç½ä¸å / ãã©ãé²ç½ä¸å","ã¤ãã³ãå®ç¸¾"]},{key:"game-camp",label:"ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã",categoryIds:["ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã","Hero Egg å®ç¸¾"]},{key:"hero-egg",label:"Hero Egg",categoryIds:["Hero Egg","Hero Egg å®ç¸¾"]},{key:"ghs",label:"GLOBAL HERO SUMMIT",categoryIds:["GLOBAL HERO SUMMIT","ã¤ãã³ãå®ç¸¾"]},{key:"egg-jam",label:"EGG JAM",categoryIds:["EGG JAM","ã¤ãã³ãå®ç¸¾"]},{key:"ai-monday",label:"AI MONDAY",categoryIds:["AI MONDAY","ã¤ãã³ãå®ç¸¾"]},{key:"game-event",label:"ã²ã¼ã à ã¤ãã³ã",categoryIds:["ã²ã¼ã à ã¤ãã³ã","ã¤ãã³ãå®ç¸¾"]},{key:"mh-guild",label:"Meta Heroes Guild",categoryIds:["Meta Heroes Guild","ã¤ãã³ãå®ç¸¾"]},{key:"speaking",label:"ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£",categoryIds:["ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£","ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£ å®ç¸¾"]}],lP=Array.from(new Set(vj.flatMap(r=>r.categoryIds))),yy=r=>{var e;return!!((e=r.category_new)!=null&&e.some(t=>t.includes("å®ç¸¾")))},C2=r=>{var e;return!!((e=r.category_new)!=null&&e.some(t=>lP.includes(t)&&!t.includes("å®ç¸¾")))},_7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState(0),[i,a]=T.useState(1),[o,c]=T.useState("all"),[h,f]=T.useState(""),[m,g]=T.useState(""),[x,y]=T.useState(""),[v,j]=T.useState(!1),N=typeof window<"u"&&window.innerWidth>=1024?30:10;T.useEffect(()=>{const O=setTimeout(async()=>{j(!0);try{const $=(i-1)*N,z=vj.find(fe=>fe.key===h),re=z?z.categoryIds:lP,he=await Xe(N,void 0,{categoryId:re,year:m,keyword:x},$),de=(he.contents||[]).filter(fe=>o==="works"?yy(fe):o==="cases"?C2(fe)&&!yy(fe):yy(fe)||C2(fe));e(de),s(he.totalCount||0)}catch($){console.error("Failed to fetch works/cases:",$),e([]),s(0)}finally{j(!1)}},500);return()=>clearTimeout(O)},[o,h,m,x,i,N]),T.useEffect(()=>{a(1)},[o,h,m,x]);const S=Math.ceil(t/N),A=()=>{const D=[];if(S<=5)for(let $=1;$<=S;$++)D.push($);else{D.push(1),i>3&&D.push("...");const $=Math.max(2,i-1),z=Math.min(S-1,i+1);for(let re=$;re<=z;re++)D.includes(re)||D.push(re);i<S-2&&D.push("..."),D.includes(S)||D.push(S)}return D},E=D=>{const O=new Date(D);return`${O.getFullYear()}.${O.getMonth()+1}.${O.getDate()}`},M=D=>yy(D)?"å®ç¸¾":C2(D)?"å°å ¥äºä¾":"",R=new Date().getFullYear(),I=Array.from({length:5},(D,O)=>(R-O+1).toString()),F=[{id:"all",label:"ãã¹ã¦"},{id:"cases",label:"å°å ¥äºä¾"},{id:"works",label:"å®ç¸¾"}];return n.jsxs("main",{className:"min-h-screen bg-white relative z-10 pt-20",children:[n.jsx(Ge,{titleEn:"WORKS & CASES",titleJa:"äºä¾ã»å®ç¸¾"}),n.jsxs("div",{className:"container mx-auto px-4 sm:px-8 pb-32",children:[n.jsx("div",{className:"max-w-7xl mx-auto mb-8",children:n.jsx("div",{className:"inline-flex bg-gray-50 rounded-full p-1",children:F.map(D=>n.jsx("button",{onClick:()=>c(D.id),className:`px-6 md:px-8 py-2.5 rounded-full text-[11px] md:text-xs font-black tracking-widest transition-all duration-300 ${o===D.id?"bg-blue-600 text-white shadow-md":"text-gray-400 hover:text-gray-600"}`,children:D.label},D.id))})}),n.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-end gap-8 mb-16 border-b border-gray-100 pb-12 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 w-full lg:w-auto",children:[n.jsxs("div",{className:"relative min-w-[260px]",children:[n.jsxs("select",{value:h,onChange:D=>f(D.target.value),className:"w-full appearance-none px-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all cursor-pointer pr-12",children:[n.jsx("option",{value:"",children:"SERVICE: ALL"}),vj.map(D=>n.jsx("option",{value:D.key,children:D.label.toUpperCase()},D.key))]}),n.jsx(Vs,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-300 pointer-events-none"})]}),n.jsxs("div",{className:"relative min-w-[160px]",children:[n.jsxs("select",{value:m,onChange:D=>g(D.target.value),className:"w-full appearance-none px-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all cursor-pointer pr-12",children:[n.jsx("option",{value:"",children:"YEAR"}),I.map(D=>n.jsx("option",{value:D,children:D},D))]}),n.jsx(Vs,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-300 pointer-events-none"})]})]}),n.jsxs("div",{className:"relative flex-grow lg:w-72 w-full",children:[n.jsx("input",{type:"text",placeholder:"SEARCH",value:x,onChange:D=>y(D.target.value),className:"w-full pl-12 pr-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all placeholder:text-gray-300"}),n.jsx(mu,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-300 w-4 h-4"})]})]}),n.jsx("div",{className:"max-w-7xl mx-auto",children:v?n.jsx("div",{className:"flex justify-center items-center py-32",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-100 border-t-blue-600"})}):r.length===0?n.jsx("div",{className:"text-center py-32",children:n.jsx("p",{className:"text-gray-400 font-black text-sm tracking-[0.2em] uppercase",children:"No items found."})}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-10 gap-y-16",children:r.map(D=>{var $;const O=M(D);return n.jsxs(q,{to:`/news/${D.id}`,className:"group block",children:[n.jsxs("div",{className:"relative aspect-video overflow-hidden mb-6 bg-gray-100 rounded-sm",children:[n.jsx("img",{src:(($=D.eyecatch)==null?void 0:$.url)||A7,alt:"",className:"w-full h-full object-cover transition-all duration-700 group-hover:scale-105"}),O&&n.jsx("span",{className:`absolute top-3 left-3 px-3 py-1 text-[10px] font-black tracking-widest rounded-full backdrop-blur-md ${O==="å®ç¸¾"?"bg-blue-600/90 text-white":"bg-white/90 text-blue-600"}`,children:O})]}),n.jsxs("div",{className:"space-y-4 px-1",children:[n.jsx("time",{className:"text-[10px] font-black text-gray-300 tracking-[0.2em] font-mono block",children:E(D.publishedAt)}),n.jsx("h3",{className:"text-gray-900 text-base font-black leading-relaxed line-clamp-2 group-hover:text-blue-600 transition-colors tracking-tight",children:D.title})]})]},D.id)})}),S>1&&n.jsxs("div",{className:"mt-20 flex justify-center items-center gap-4",children:[n.jsx("button",{onClick:()=>a(D=>Math.max(1,D-1)),disabled:i===1,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 rotate-90 group-hover:text-blue-600"})}),n.jsx("div",{className:"flex items-center gap-2",children:A().map((D,O)=>n.jsx(Co.Fragment,{children:D==="..."?n.jsx("span",{className:"w-8 text-center text-gray-300 font-bold",children:"..."}):n.jsx("button",{onClick:()=>a(Number(D)),className:`w-12 h-12 rounded-full text-xs font-black transition-all ${i===D?"bg-blue-600 text-white shadow-lg shadow-blue-100":"text-gray-400 hover:bg-gray-50"}`,children:D})},O))}),n.jsx("button",{onClick:()=>a(D=>Math.min(S,D+1)),disabled:i===S,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 -rotate-90 group-hover:text-blue-600"})})]})]})})]})]})},E7=[{id:"metaverse",titleJa:"ã¡ã¿ãã¼ã¹",titleEn:"Metaverse",image:"/assets/business-content/metaverce/metaverse_hero.png",logo:"/assets/top/meta_heroes_creative_logo.png",link:"/business",align:"left"},{id:"ai",titleJa:"AI",titleEn:"Artificial Intelligence",image:"/assets/business-content/ai/ai_hero.png",logo:"/assets/top/AIH.png",link:"/business",align:"right"},{id:"event",titleJa:"ã¤ãã³ã",titleEn:"Event",image:"/assets/business-content/event/event_hero.png",logo:"/assets/top/ths_logo.png",link:"/business",align:"left"},{id:"vacant",titleJa:"æ½è¨éå¶äºæ¥",titleEn:"Facility management",image:"/assets/business-content/vacant-facility/vacant_hero.png",logo:"/assets/top/hero_egg_yoko.png",link:"/business",align:"right"}],C7=()=>n.jsx("section",{className:"relative pt-12 md:pt-24 pb-32 md:pb-64 overflow-hidden bg-white",children:n.jsxs("div",{className:"container mx-auto px-4 relative z-10 max-w-6xl",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold tracking-[0.4em] block mb-1 uppercase text-gray-400",children:"BUSINESS"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"äºæ¥å 容"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]}),n.jsx("div",{className:"flex flex-col gap-12 md:gap-16",children:E7.map(r=>n.jsx("div",{className:"relative",children:n.jsxs("div",{className:`flex flex-col md:flex-row items-center ${r.align==="right"?"md:flex-row-reverse":""}`,children:[n.jsxs("div",{className:"w-full md:w-1/2 flex flex-col z-10 relative py-8 will-change-transform",children:[n.jsxs(Ce.div,{initial:{opacity:0,x:r.align==="left"?-20:20},whileInView:{opacity:1,x:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5},className:`flex flex-col mb-4 ${r.align==="left"?"md:items-end md:pr-10 text-center md:text-right":"md:items-start md:pl-10 text-center md:text-left"}`,children:[n.jsx("h3",{className:"text-xl md:text-2xl font-bold text-gray-900 mb-1",children:r.titleJa}),n.jsx("span",{className:"text-xs md:text-sm font-medium text-gray-500 tracking-wide",children:r.titleEn})]}),n.jsx("div",{className:"h-20 md:h-28"}),n.jsx(Ce.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.3},className:`absolute bottom-12 md:bottom-16 z-30 px-4 w-full flex ${r.align==="left"?"md:justify-end md:pr-10":"md:justify-start md:pl-10"} justify-center`,children:n.jsx("img",{src:r.logo,alt:`${r.titleJa} logo`,loading:"lazy",className:"h-12 md:h-16 w-auto object-contain max-w-[240px] md:max-w-[280px]"})}),n.jsx(Ce.div,{initial:{opacity:0,scaleX:0},whileInView:{opacity:1,scaleX:1},viewport:{once:!0,margin:"-10%"},transition:{duration:.8,delay:.1},className:`absolute bottom-8 h-[8px] bg-gradient-to-r from-blue-600 to-cyan-500 shadow-lg flex items-center z-20 358 w-[100vw] left-[calc(50%-50vw)] origin-center 359 md:w-[100vw] will-change-transform 360 ${r.align==="left"?"md:left-auto md:right-0 md:origin-right md:rounded-l-full":"md:right-auto md:left-0 md:origin-left md:rounded-r-full"} 361 `})]}),n.jsx("div",{className:"w-full md:w-1/2 px-4 md:px-0 z-20 will-change-transform",children:n.jsx(Ce.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:.2},children:n.jsxs(q,{to:r.link,className:"block group relative rounded-2xl overflow-hidden shadow-2xl border border-white aspect-[16/9]",children:[n.jsx("img",{src:r.image,alt:r.titleJa,loading:"lazy",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),n.jsx("div",{className:"absolute inset-0 bg-black/20 group-hover:bg-black/0 transition-colors duration-500"})]})})})]})},r.id))})]})}),mC=[{id:"digital",subLabel:"AIã»XRã½ãªã¥ã¼ã·ã§ã³",title:"DX Solution",tags:["人æéçºæ¯æ´","VRã»ARéçº","ãã¼ã±ãã£ã³ã°æ¯æ´","ã·ã¹ãã éçº","ã²ã¼ã éçº"],bgImage:"/assets/top/service_bg_xrai.png",link:"/services#digital",gradient:"from-blue-600/80 to-cyan-500/40"},{id:"education",subLabel:"æè²Ããã¯ããã¸ã¼",title:"Edtech",tags:["DXã¹ã¯ã¼ã«","STEAMæè²","æ½è¨ã»ã¹ãã¼ã¹æä¾"],bgImage:"/assets/top/service_bg_techedu.png",link:"/services#education",gradient:"from-emerald-600/80 to-teal-500/40"},{id:"community",subLabel:"ã¤ãã³ãã»ã³ãã¥ããã£ã»å ±åµ",title:"Innovation",tags:["ã
361³ãã¥ããã£å½¢æã»éå¶","ãªã¼ãã³ã¤ããã¼ã·ã§ã³","ã¤ãã³ãä¼ç»ã»å¶ä½ã»éå¶"],bgImage:"/assets/top/service_bg_community.png",link:"/services#community",gradient:"from-purple-600/80 to-pink-500/40"}],T7=()=>n.jsxs("section",{className:"py-12 bg-white",children:[n.jsx("div",{className:"container mx-auto px-4 mb-12",children:n.jsxs("div",{className:"text-center",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold tracking-[0.4em] block mb-1 uppercase text-gray-400",children:"SOLUTION"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"ã½ãªã¥ã¼ã·ã§ã³"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]})}),n.jsx("div",{className:"flex flex-col",children:mC.map((r,e)=>n.jsxs(q,{to:r.link,className:`group relative w-full overflow-hidden flex items-center ${e===mC.length-1?"h-[300px] md:h-[450px]":"h-[250px] md:h-[350px]"}`,children:[n.jsxs("div",{className:"absolute inset-0 z-0",children:[n.jsx("img",{src:r.bgImage,alt:r.title,className:"w-full h-full object-cover transition-transform duration-1000 group-hover:scale-110"}),n.jsx("div",{className:"absolute inset-0 bg-black/40 transition-opacity duration-500 group-hover:opacity-0"})]}),n.jsx("div",{className:`absolute inset-0 z-10 bg-gradient-to-r ${r.gradient} translate-x-[-100%] group-hover:translate-x-0 transition-transform duration-700 ease-out`}),n.jsxs("div",{className:"container mx-auto px-4 md:px-12 relative z-20 flex justify-between items-center",children:[n.jsxs("div",{className:"text-white space-y-2 md:space-y-4",children:[n.jsx("span",{className:"text-xs md:text-sm font-bold tracking-wider block opacity-90",children:r.subLabel}),n.jsx("h3",{className:"text-2xl md:text-5xl font-black italic tracking-tight",children:r.title}),n.jsx("div",{className:"flex flex-wrap gap-2 md:gap-3 pt-2",children:r.tags.map(t=>n.jsx("span",{className:"px-4 py-1.5 bg-white/10 backdrop-blur-md border border-white/30 rounded-full text-xs md:text-sm font-bold",children:t},t))})]}),n.jsx("div",{className:"hidden md:flex w-16 h-16 rounded-full border-2 border-white/30 items-center justify-center text-white group-hover:bg-white group-hover:text-blue-600 transition-all duration-300 transform group-hover:scale-110",children:n.jsx(ya,{size:32,strokeWidth:3})})]})]},r.id))})]}),pC=[{id:"5VnxVYHR4A4",title:"Loading...",thumbnail:"https://img.youtube.com/vi/5VnxVYHR4A4/maxresdefault.jpg"},{id:"7qmtXERUG5o",title:"Loading...",thumbnail:"https://img.youtube.com/vi/7qmtXERUG5o/maxresdefault.jpg"},{id:"7thymifNrbE",title:"Loading...",thumbnail:"https://img.youtube.com/vi/7thymifNrbE/maxresdefault.jpg"},{id:"HwBMWaO27I8",title:"Loading...",thumbnail:"https://img.youtube.com/vi/HwBMWaO27I8/maxresdefault.jpg"},{id:"k2NCdmsgN74",title:"Loading...",thumbnail:"https://img.youtube.com/vi/k2NCdmsgN74/maxresdefault.jpg"},{id:"M4SG299zjBE",title:"Loading...",thumbnail:"https://img.youtube.com/vi/M4SG299zjBE/maxresdefault.jpg"},{id:"Qe6t5_rPVBc",title:"Loading...",thumbnail:"https://img.youtube.com/vi/Qe6t5_rPVBc/maxresdefault.jpg"},{id:"TizqV76FOsg",title:"Loading...",thumbnail:"https://img.youtube.com/vi/TizqV76FOsg/maxresdefault.jpg"}],P7=()=>{const[r,e]=T.useState(pC),[t,s]=T.useState(0),[i,a]=T.useState(null);T.useEffect(()=>{(async()=>{const f=await Promise.all(pC.map(async m=>{try{const x=await(await fetch(`https://noembed.com/embed?url=https://www.youtube.com/watch?v=${m.id}`)).json();return{...m,title:x.title||m.title}}catch(g){return console.error(`Failed to fetch title for video ${m.id}`,g),m}}));e(f)})()},[]);const o=()=>{t<r.length-1&&(s(h=>h+1),a(null))},c=()=>{t>0&&(s(h=>h-1),a(null))};return n.jsx("section",{className:"relative z-20 -mt-24 bg-transparent pb-0",children:n.jsx("div",{className:"bg-white rounded-t-[60px] md:rounded-t-[100px] pt-8 md:pt-16 pb-12 md:pb-20 relative overflow-hidden shadow-[-10px_-10px_30px_rgba(0,0,0,0.1)]",children:n.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("span",{className:"text-[10px] font-bold tracking-[0.4em] text-gray-400 block mb-1 uppercase font-sans",children:"MOVIE"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"åç»"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]}),n.jsxs("div",{className:"relative max-w-[1200px] mx-auto h-[320px] md:h-[500px] flex items-center justify-center mb-6 md:mb-10",children:[n.jsx("button",{onClick:c,disabled:t===0,className:`absolute left-[5%] md:left-[10%] lg:left-[15%] z-50 w-12 h-12 md:w-16 md:h-16 bg-white rounded-full shadow-[0_4px_15px_rgba(0,0,0,0.1)] flex items-center justify-center text-[#5DBCF5] transition-all duration-300 362 ${t===0?"opacity-0 pointer-events-none":"hover:scale-110 opacity-100"} 363 `,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:4,stroke:"currentColor",className:"w-5 h-5 md:w-7 md:h-7",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("button",{onClick:o,disabled:t===r.length-1,className:`absolute right-[5%] md:right-[10%] lg:right-[15%] z-50 w-12 h-12 md:w-16 md:h-16 bg-white rounded-full shadow-[0_4px_15px_rgba(0,0,0,0.1)] flex items-center justify-center text-[#5DBCF5] transition-all duration-300 364 ${t===r.length-1?"opacity-0 pointer-events-none":"hover:scale-110 opacity-100"} 365 `,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:4,stroke:"currentColor",className:"w-5 h-5 md:w-7 md:h-7",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsxs("div",{className:"w-full h-full flex items-center justify-center relative perspective-1000",children:[n.jsx(an,{initial:!1,mode:"popLayout",children:[-1,0,1].map(h=>{const f=t+h,m=r[f];if(!m)return null;const g=h===0;return n.jsx(Ce.div,{drag:"x",dragConstraints:{left:0,right:0},dragElastic:.2,onDragEnd:(x,{offset:y,velocity:v})=>{const j=y.x;j<-50||v.x<-500?o():(j>50||v.x>500)&&c()},initial:{scale:.9,x:h*110+"%",opacity:g?1:.6,zIndex:g?20:10},animate:{scale:g?1:.8,x:h*(window.innerWidth<768?95:75)+"%",opacity:g?1:.4,zIndex:g?20:10},transition:{duration:.6,ease:[.16,1,.3,1]},className:"absolute w-[85%] md:w-[70%] max-w-[700px] cursor-grab active:cursor-grabbing",children:n.jsxs("div",{className:` 366 bg-white rounded-[24px] overflow-hidden transition-all duration-300 367 border-[3px] shadow-xl 368 border-[#5DBCF5] 369 `,children:[n.jsx("div",{className:"relative aspect-video bg-black group",children:i===m.id?n.jsx("iframe",{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${m.id}?autoplay=1&rel=0`,title:m.title,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"absolute inset-0 w-full h-full"}):n.jsxs("div",{className:"absolute inset-0 cursor-pointer",onClick:()=>g&&a(m.id),children:[n.jsx("img",{src:m.thumbnail,alt:m.title,className:"w-full h-full object-cover opacity-90 group-hover:opacity-100 transition-opacity"}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsx("div",{className:"w-16 h-16 md:w-20 md:h-20 bg-black/50 rounded-full flex items-center justify-center backdrop-blur-[2px] border border-white/20 group-hover:scale-110 transition-transform duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
369currentColor",className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1",children:n.jsx("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z",clipRule:"evenodd"})})})})]})}),n.jsx("div",{className:"py-3 md:py-6 px-4 text-center bg-white min-h-[3.5rem] md:min-h-[5rem] flex items-center justify-center",children:n.jsx("h3",{className:"text-sm md:text-xl font-bold text-gray-800 tracking-wide line-clamp-2",children:m.title})})]})},m.id)})}),n.jsxs("div",{className:"absolute top-[30%] md:top-[2%] left-[-35%] md:left-[-38%] w-[100%] md:w-[100%] pointer-events-none z-30",children:[n.jsx("div",{className:"absolute bottom-12 left-12 right-12 h-12 bg-black/20 blur-[50px] rounded-[100%]"}),n.jsx("img",{src:"/assets/top/egg_chara_test.gif",alt:"",className:"w-full h-auto relative drop-shadow-2xl rotate-[-5deg]"})]})]})]}),n.jsx("div",{className:"text-center relative z-40",children:n.jsx("a",{href:"https://youtube.com/playlist?list=PL6tegUkHuPE3k536xqJEzWdS2M8uUXvNt",target:"_blank",rel:"noopener noreferrer",className:"inline-block px-14 py-4 rounded-full bg-gradient-to-r from-[#4A90E2] to-[#5DBCF5] text-white font-bold text-base tracking-widest shadow-lg hover:shadow-xl hover:scale-105 transition-all duration-300",children:"ãã£ã¨è¦ã"})})]})})})},R7=[{id:"1",eyecatch:{url:"/assets/top/business_bg.png"},title:"eã¹ãã¼ã ã²ã¼ã ã¯ãªã¨ã¤ã¿ã¼ ã¢ã«ããã¼ 2025å¬"},{id:"2",eyecatch:{url:"/assets/top/business_bg.png"},title:"Meta Heroes Guild 10,000åçªç ´"},{id:"3",eyecatch:{url:"/assets/top/business_bg.png"},title:"XRã½ãªã¥ã¼ã·ã§ã³ å±ç¤ºä¼åºå±"},{id:"4",eyecatch:{url:"/assets/top/business_bg.png"},title:"è¬¹è³æ°å¹´ 2026"},{id:"5",eyecatch:{url:"/assets/top/business_bg.png"},title:"EGG JAM é嬿±ºå®"}],gC="/assets/top/business_bg.png",M7=()=>{const[r,e]=T.useState(R7),[t,s]=T.useState([]),[i,a]=T.useState(0),[o,c]=T.useState("all");T.useEffect(()=>{(async()=>{try{const[y,v,j]=await Promise.all([mO(),Xe(20,void 0,{excludeCategoryId:"announcement"}),em(20)]);y.contents.length>0&&(e(y.contents),a(0));const N=[...v.contents.map(S=>({...S,isMemberBlog:!1})),...j.contents.map(S=>({...S,isMemberBlog:!0}))].sort((S,A)=>new Date(A.publishedAt).getTime()-new Date(S.publishedAt).getTime());s(N)}catch(y){console.error("Failed to fetch data:",y)}})()},[]);const h=t.filter(x=>{var y,v,j;return o==="all"?!0:o==="news_release"?!x.isMemberBlog&&((y=x.category_new)==null?void 0:y.some(N=>N==="PRtimes"||N==="press"||N==="ãã¥ã¼ã¹ãªãªã¼ã¹")):o==="information"?!x.isMemberBlog&&((v=x.category_new)==null?void 0:v.some(N=>N==="info"||N==="information"||N==="ã¤ã³ãã©ã¡ã¼ã·ã§ã³"||N==="ãç¥ãã")):o==="knowledge"?!x.isMemberBlog&&((j=x.category_new)==null?void 0:j.some(N=>N==="ãã¬ãã¸")):o==="blog"?x.isMemberBlog:!0});T.useEffect(()=>{const x=setInterval(()=>{a(y=>(y+1)%r.length)},5e3);return()=>clearInterval(x)},[r.length]);const f=()=>a(x=>(x+1)%r.length),m=()=>a(x=>(x-1+r.length)%r.length),g=x=>{const y=new Date(x);return`${y.getFullYear()}.${String(y.getMonth()+1).padStart(2,"0")}.${String(y.getDate()).padStart(2,"0")}`};return n.jsxs("main",{className:"min-h-screen bg-white",children:[n.jsx("section",{className:"relative pt-24 md:pt-48 pb-0 overflow-hidden bg-gradient-to-r from-blue-600 to-cyan-500",children:n.jsxs("div",{className:"container mx-auto px-4 relative",children:[n.jsx("div",{className:"relative flex items-center justify-center h-[200px] md:h-[480px] mb-12 md:mb-28 overflow-visible",children:n.jsx(an,{mode:"popLayout",initial:!1,children:r.map((x,y)=>{var N;let v=y-i;v<-2&&(v+=r.length),v>2&&(v-=r.length);const j=Math.abs(v)<=1;return n.jsx(Ce.div,{initial:!1,animate:{x:`${v*105}%`,scale:1,opacity:j?1:0,zIndex:j?10-Math.abs(v):0},transition:{duration:.7,ease:[.23,1,.32,1]},className:"absolute w-[80%] md:w-[70%] aspect-video rounded-xl overflow-hidden shadow-[0_30px_60px_rgba(0,0,0,0.3)] bg-white border-[1px] border-white/20",children:n.jsx(q,{to:`/news/${x.id}`,className:"block w-full h-full",children:n.jsx("img",{src:((N=x.eyecatch)==null?void 0:N.url)||gC,alt:x.title,className:"w-full h-full object-cover transition-transform duration-700 hover:scale-105"})})},x.id)})})}),n.jsxs("div",{className:"flex items-center justify-center gap-6 md:gap-10 mb-8",children:[n.jsx("button",{onClick:m,className:"w-10 h-10 md:w-12 md:h-12 bg-white/90 backdrop-blur rounded-full flex items-center justify-center shadow-2xl hover:bg-white transition-all group active:scale-90 flex-shrink-0",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-6 h-6 text-blue-600",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("div",{className:"flex justify-center gap-3 md:gap-5",children:r.map((x,y)=>{var v;return n.jsxs("div",{className:"relative flex flex-col items-center",children:[n.jsx("button",{onClick:()=>a(y),className:`relative w-16 md:w-28 aspect-video rounded-none overflow-hidden transition-all duration-300 ${i===y?"scale-110 shadow-xl opacity-100":"opacity-40 hover:opacity-70"}`,children:n.jsx("img",{src:((v=x.eyecatch)==null?void 0:v.url)||gC,alt:"",className:"w-full h-full object-cover"})}),i===y&&n.jsx(Ce.div,{layoutId:"activeIndicator",className:"absolute -bottom-4 w-[80%] h-1 bg-blue-600",initial:{opacity:0}
369,animate:{opacity:1},transition:{duration:.3}})]},x.id)})}),n.jsx("button",{onClick:f,className:"w-10 h-10 md:w-12 md:h-12 bg-white/90 backdrop-blur rounded-full flex items-center justify-center shadow-2xl hover:bg-white transition-all group active:scale-90 flex-shrink-0",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-6 h-6 text-blue-600",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),n.jsx(Ce.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"text-white drop-shadow-2xl pb-2",children:n.jsx("div",{className:"text-3xl md:text-7xl font-black italic tracking-tighter leading-none",children:"2044å¹´"})})]})}),n.jsx("section",{className:"pt-2 pb-2 bg-white",children:n.jsx("div",{className:"container mx-auto px-4 text-left",children:n.jsx(Ce.div,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"inline-flex flex-col items-start",children:n.jsx("div",{className:"text-xl md:text-5xl font-black tracking-tight leading-none bg-gradient-to-r from-[#2563eb] to-[#06b6d4] bg-clip-text text-transparent",children:"HERO100ã¤ãã"})})})}),n.jsxs("section",{className:"bg-white overflow-hidden relative min-h-[600px] md:min-h-[700px] flex flex-col justify-center py-16 md:py-24",children:[n.jsxs("div",{className:"absolute right-0 top-0 bottom-0 w-full lg:w-[40%] overflow-hidden z-0 hidden lg:block",children:[n.jsx("div",{className:"absolute inset-0 w-[200%] h-full",children:n.jsx("video",{src:"/assets/top/1-1_toppage_video.mp4",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"w-full h-full object-cover"})}),n.jsx("div",{className:"absolute inset-y-0 left-0 w-32 bg-gradient-to-r from-white to-transparent z-10 hidden lg:block"}),n.jsx("div",{className:"absolute inset-0 bg-white/40 lg:hidden"})]}),n.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("span",{className:"text-[10px] font-bold tracking-[0.4em] text-gray-400 block mb-1 uppercase",children:"OUR MISSION"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"MetaHeroesã®ä½¿å½"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]}),n.jsxs("div",{className:"flex flex-col lg:flex-row items-center",children:[n.jsxs("div",{className:"w-full lg:w-[60%] space-y-8 lg:pr-16",children:[n.jsx("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-black italic tracking-wide text-gray-900 leading-tight",children:"Society 5.0 à SDGs à HERO"}),n.jsxs("div",{className:"space-y-6 text-sm md:text-base font-medium text-gray-600 leading-loose",children:[n.jsx("p",{children:"ãã¯ããã¸ã¼ã«ãã£ã¦æãããæªæ¥ã®ç¤¾ä¼ãSociety 5.0ãã¨ãä¸çãç®æãã¹ãç®æ¨ãSDGsããå®ç¾ããããã«ã¯ãè¡ååã®ããå人ãã¤ã¾ãããã¼ãã¼ããå¿
è¦ã§ãã"}),n.jsx("p",{children:"ãã®ããã«ããå¦ã¶äººããææ¦ãã人ããå¤é©ãã人ããæ¬¡ã
ã¨çã¿åºãä»çµã¿ãä½ããæªæ¥ãå®ç¾ãã人æã§æºããããä¸çãç®æãã¾ãã"})]}),n.jsx("div",{className:"pt-2",children:n.jsxs(q,{to:"/about/mission",className:"inline-flex items-center gap-3 px-10 py-3 bg-gradient-to-r from-blue-600 to-cyan-500 text-white text-xs font-black rounded-full hover:shadow-lg hover:scale-105 transition-all group",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})})]}),n.jsx("div",{className:"w-full lg:w-[40%] flex items-center justify-center p-8 mt-12 lg:mt-0",children:n.jsx("img",{src:"/assets/top/society_sdgs.png",alt:"Society 5.0 x SDGs",className:"max-w-full max-h-[300px] md:max-h-[400px] object-contain drop-shadow-[0_10px_30px_rgba(0,0,0,0.3)]"})})]})]})]}),n.jsxs("section",{className:"bg-white overflow-hidden relative min-h-[600px] md:min-
369h-[700px] flex flex-col justify-center py-16 md:py-24",children:[n.jsxs("div",{className:"absolute left-0 top-0 bottom-0 w-full lg:w-[40%] overflow-hidden z-0 hidden lg:block",children:[n.jsx("div",{className:"absolute inset-0 w-[200%] h-full",children:n.jsx("video",{src:"/assets/top/2025_mh_achievements_02.mp4",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"w-full h-full object-cover"})}),n.jsx("div",{className:"absolute inset-y-0 right-0 w-32 bg-gradient-to-l from-white to-transparent z-10 hidden lg:block"}),n.jsx("div",{className:"absolute inset-0 bg-white/40 lg:hidden"})]}),n.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("span",{className:"text-[10px] font-bold tracking-[0.4em] text-gray-400 block mb-1 uppercase",children:"ABOUT US"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"MetaHeroesã«ã¤ãã¦"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]}),n.jsxs("div",{className:"flex flex-col lg:flex-row items-center",children:[n.jsx("div",{className:"w-full lg:w-[40%] flex items-center justify-center p-8 mb-12 lg:mb-0 order-2 lg:order-1",children:n.jsx("img",{src:"/assets/top/about_meta_heroes_02.png",alt:"About MetaHeroes",className:"max-w-full max-h-[350px] md:max-h-[450px] object-contain drop-shadow-[0_10px_30px_rgba(0,0,0,0.3)]"})}),n.jsxs("div",{className:"w-full lg:w-[60%] space-y-8 lg:pl-16 order-1 lg:order-2",children:[n.jsx("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-black italic tracking-wide text-gray-900 leading-tight",children:"ãã¸ã¿ã«Ããªã¢ã«ã§æ°ãã社ä¼ä¾¡å¤ãçã¿åºã"}),n.jsxs("div",{className:"space-y-6 text-sm md:text-base font-medium text-gray-600 leading-loose",children:[n.jsx("p",{children:"ç§ãã¡Meta Heroesã¯ãã¦ã§ã«ãã¼ã¤ã³ã°ç¤¾ä¼ãç®æãã¦ãæè²ã»é²ç½ã»å°æ¹åµçãªã©ã®æ§ã ãªåéã§æ±ãã社ä¼èª²é¡ãããã¯ããã¸ã¼éçºã¨ãªã¢ã«ã®å ´ã§ã®ã¤ãã³ããéããã社ä¼èª²é¡ã解決ããã½ã¼ã·ã£ã«ã¤ããã¼ã¿ã¼ã§ãã"}),n.jsx("p",{children:"社ä¼ã«åå¨ããã課é¡ããããã¯ããã¸ã¼ã¨ã¨ã³ã¿ã¼ãã¤ã³ã¡ã³ãã®åã§ã叿ãã«å¤ãããã¸ã¿ã«ã¨ãªã¢ã«ã®å¢çããªããã誰ãããã¼ãã¼ã«ãªããèå°ãä½ãå½¹å²ãæããã¾ãã"})]}),n.jsx("div",{className:"pt-2",children:n.jsxs(q,{to:"/about/company",className:"inline-flex items-center gap-3 px-10 py-3 bg-gradient-to-r from-blue-600 to-cyan-500 text-white text-xs font-black rounded-full hover:shadow-lg hover:scale-105 transition-all group",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})})]})]})]})]}),n.jsx(C7,{}),n.jsx(T7,{}),n.jsx(P7,{}),n.jsx("section",{className:"py-12 bg-white",children:n.jsxs("div",{className:"container mx-auto px-4",children:[n.jsxs("div",{className:"text-center mb-8",children:[n.jsx("span",{className:"text-[10px] font-bold tracking-[0.4em] text-gray-400 block mb-1 uppercase",children:"NEWS"}),n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-8 h-0.5 bg-blue-600"})]})]}),n.jsx("div",{className:"flex overflow-x-auto pb-4 mb-6 md:justify-center gap-x-6 md:gap-x-8 gap-y-2 border-b border-gray-100 max-w-3xl mx-auto px-4 scrollbar-hide -mx-4 md:mx-auto pl-4 md:pl-4",children:[{id:"all",label:"ãã¹ã¦"},{id:"news_release",label:"ãã¥ã¼ã¹ãªãªã¼ã¹"},{id:"information",label:"ã¤ã³ãã©ã¡ã¼ã·ã§ã³"},{id:"knowledge",label:"ãã¬ãã¸"},{id:"blog",label:"ããã°"}].map(x=>n.jsxs("button",{onClick:()=>c(x.id),className:`pb-3 text-xs font-bold tracking-wider relative transition-colors whitespace-nowrap flex-shrink-0 ${o===x.id?"text-blue-600":"text-gray-400 hover:text-gray-600"}`,children:[x.label,o===x.id&&n.jsx(Ce.div,{layoutId:"activeTab",className:"absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600",transition:{type:"spring",bounce:.2,duration:.6}})]},x.id))}),n.jsx("div",{className:"max-w-5xl mx-auto px-2 md:px-0",children:h.length>0?n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:h.slice(0,3).map((x,y)=>{var v;return n.jsx(Ce.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:y*.08},children:n.jsxs(q,{to:x.isMemberBlog?`/member-blog/${x.id}`:`/news/${x.id}`,className:"group block bg-white rounded-xl overflow-hidden border border-gray-100 hover:border-gray-200 hover:shadow-lg transition-all duration-300",children:[n.jsx("div",{className:"w-full aspect-video overflow-hidden bg-gray-100",children:(v=x.eyecatch)!=null&&v.url?n.jsx("img",{src:x.eyecatch.url,alt:"",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}):n.jsx("div",{className:"w-full h-full bg-gradient-to-br from-gray-100 to-gray-200 flex items-center justify-center",children:n.jsx("span",{className:"text-gray-300 text-2xl font-bold",children:"N"})})}),n.jsxs("div",{className:"p-5",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx("time",{className:"text-[10px] md:text-[11px] font-bold text-gray-400 font-mono",children:g(x.publishedAt)}),x.isMemberBlog&&n.jsx("span",{className:"px-1.5 py-0.5 bg-blue-50 text-blue-600 text-[8px] font-black tracking-widest uppercase rounded border border-blue-100",children:"BLOG"})]}),n.jsx("h3",{className:"text-sm md:text-[15px] font-bold text-gray-700 group-hover:text-blue-600 transition-colors line-clamp-2 leading-relaxed",children:x.title})]})]})},x.id)})}):n.jsx("div",{className:"text-center py-10 text-gray-300 text-sm font-bold tracking-widest",children:"該å½ããè¨äºãããã¾ãã"})}),n.jsx("div",{className:"mt-10 text-center",children:n.jsx(q,{to:o==="blog"?"/members/blog":o==="knowledge"?"/knowledge":"/news",className:"text-[10px] font-bold text-gray-400 hover:text-blue-600 transition-colors tracking-[0.2em] border-b border-gray-100 hover:border-blue-600 pb-1",children:"VIEW ALL"})})]})}),n.jsx("section",{className:"py-12 md:py-24 bg-gray-50",children:n.jsx("div",{className:"container mx-auto px-4",children:n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 md:gap-6 max-w-6xl mx-auto",children:[{label:"伿¥æ å ±",iconPath:"/assets/top/company_icon.png",image:"/assets/recruit/about_meta_heroes.png",path:"/about"},{label:"ãµã¼ãã¹",iconPath:"/assets/top/service_icon.png",image:"/assets/recruit/services.png",path:"/services"},{label:"æ¡ç¨",iconPath:"/assets/top/recruit_icon.png",image:"/assets/recruit/recruit_hero.jpg",path:"/recruit"},{label:"ããã°",iconPath:"/assets/top/blog_icon.png",image:"/assets/top/business_bg.png",path:"/members/blog"}].map((x,y)=>n.jsxs(q,{to:x.path,className:"relative group aspect-square md:aspect-[3/4] rounded-2xl md:rounded-[2rem] overflow-hidden shadow-xl",children:[n.jsx("img",{src:x.image,className:"absolute inset-0 w-full h-full object-cover group-hover:scale-110 transition-transform duration-1000",alt:""}),n.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent group-hover:from-black/60 transition-colors"}),n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-white gap-2 md:gap-5",children:[n.jsx(Ce.div,{whileHover:{scale:1.1,rotate:5},className:"w-12 h-12 md:w-20 md:h-20 bg-white/10 backdrop-blur-md border border-white/20 rounded-full flex items-center justify-center shadow-2xl",children:n.jsx("div",{className:"w-8 h-8 md:w-16 md:h-16 bg-white rounded-full flex items-center justify-center p-2 md:p-3",children:n.jsx("img",{src:x.iconPath,alt:x.label,className:"w-full h-full object-contain"})})}),n.jsx("span",{className:"text-xs md:text-base font-black tracking-[0.2em] md:tracking-[0.3em]",children:x.label})]})]},y))})})})]})},I7=[{label:"ä¼ç¤¾æ¦è¦",path:"/about/profile",row:1},{label:"äºæ¥å 容",path:"/business",row:1},{label:`Meta Heroes 370ã®ä½¿å½`,path:"/about/mission",row:2},{label:`Meta Heroes 371ã«ã¤ãã¦`,path:"/about/company",row:2},{label:"äºæ¥æã»æ½è¨",path:"/about/offices",row:2},{label:"è¡åè¦ç¯",path:"/about/conduct",row:3},{label:"ã¡ã³ãã¼ç´¹ä»",path:"/members",row:3},{label:"ã°ã«ã¼ãä¼ç¤¾",path:"/about/group",row:3}],L7=()=>n.jsx("section",{className:"bg-white py-16",children:n.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-6 gap-4 md:gap-6",children:I7.map((r,e)=>{const s=r.row===1?"col-span-2 md:col-span-3":"col-span-1 md:col-span-2",i=r.path.includes("#"),a=n.jsxs("div",{className:"flex items-center justify-between w-full px-4 md:px-8 py-6 md:py-8",children:[n.jsx("span",{className:"text-sm md:text-lg font-bold text-gray-800 whitespace-pre-line leading-tight",children:r.label}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-gray-400 group-hover:text-blue-600 transition-colors shrink-0",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]}),o=`group relative bg-white rounded-xl shadow-[0_10px_30px_rgba(0,0,0,0.08)] hover:shadow-[0_20px_40px_rgba(0,0,0,0.12)] transition-all duration-300 flex items-center justify-center border border-gray-50 ${s}`;return i?n.jsx("a",{href:r.path,className:o,children:a},e):n.jsx(q,{to:r.path,className:o,children:a},e)})})})}),D7=()=>n.jsx("section",{className:"py-16 md:py-24 bg-[#F8F9FA]",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[n.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between mb-8 gap-4",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"META HEROES BY THE NUMBERS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800 mb
371-3",children:"æ°åã§è¦ãMeta Heroes"}),n.jsx("div",{className:"w-16 h-1 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})]})]}),n.jsx("span",{className:"text-[10px] md:text-xs text-gray-400 font-bold tracking-widest",children:"2026å¹´1ææç¹ å®ç¸¾"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-3 md:gap-4",children:[[{label:`ã¡ã¿ãã¼ã¹ 372ãã¬ã¤æ°`,value:"27",suffix:"ä¸å",icon:"/assets/about/stats_metaverse_icon.png"},{label:`ã¤ãã³ã 373æ¥å ´è æ°`,value:"13",suffix:"ä¸å",icon:"/assets/about/stats_event_icon.png"},{label:`AI/DX人æè²æ 374ç ä¿®åè¬è æ°`,value:"1.5",suffix:"ä¸å",icon:"/assets/about/stats_ai_icon.png"}].map((r,e)=>n.jsxs("div",{className:"bg-white rounded-xl p-4 md:p-6 shadow-[0_4px_20px_rgba(0,0,0,0.03)] border border-gray-100 relative overflow-hidden group hover:shadow-[0_10px_30px_rgba(0,0,0,0.06)] transition-all duration-300 flex flex-col justify-between h-full min-h-[140px] md:min-h-[160px]",children:[n.jsxs("div",{className:"relative z-10",children:[n.jsx("p",{className:"text-xs md:text-sm font-bold text-gray-500 mb-1 leading-tight whitespace-pre-line",children:r.label}),n.jsxs("div",{className:"flex items-baseline gap-0.5 md:gap-1 mt-1",children:[n.jsx("span",{className:"text-4xl md:text-6xl font-black text-gray-800 tracking-tighter",children:r.value}),n.jsx("span",{className:"text-sm md:text-base font-bold text-gray-400",children:r.suffix})]})]}),n.jsx("div",{className:"absolute right-[-10px] bottom-[-10px] w-20 h-20 md:w-24 md:h-24 opacity-10 group-hover:opacity-20 group-hover:scale-110 transition-all duration-500 rotate-[-10deg]",children:n.jsx("img",{src:r.icon,alt:"",className:"w-full h-full object-contain"})}),n.jsx("div",{className:"absolute bottom-0 left-0 w-full h-1 bg-gradient-to-r from-blue-600/0 via-blue-600/20 to-blue-600/0 opacity-0 group-hover:opacity-100 transition-opacity"})]},`p-${e}`)),[{label:"è¨ç«å¹´",value:"2021",suffix:"å¹´",icon:"/assets/about/stats_year_icon.png"},{label:"徿¥å¡æ°",value:"47",suffix:"å",icon:"/assets/about/stats_employees_icon.png"},{label:"å¹³åå¹´é½¢",value:"29.1",suffix:"æ³",icon:"/assets/about/stats_age_icon.png"}].map((r,e)=>n.jsxs("div",{className:"bg-white rounded-xl p-4 md:p-6 shadow-[0_4px_20px_rgba(0,0,0,0.03)] border border-gray-100 relative overflow-hidden group hover:shadow-[0_10px_30px_rgba(0,0,0,0.06)] transition-all duration-300 flex flex-col justify-between h-full min-h-[140px] md:min-h-[160px]",children:[n.jsxs("div",{className:"relative z-10",children:[n.jsx("p",{className:"text-xs md:text-sm font-bold text-gray-500 mb-1 leading-tight whitespace-pre-line",children:r.label}),n.jsxs("div",{className:"flex items-baseline gap-0.5 md:gap-1 mt-1",children:[n.jsx("span",{className:"text-4xl md:text-6xl font-black text-gray-800 tracking-tighter",children:r.value}),n.jsx("span",{className:"text-sm md:text-base font-bold text-gray-400",children:r.suffix})]})]}),n.jsx("div",{className:"absolute right-[-10px] bottom-[-10px] w-20 h-20 md:w-24 md:h-24 opacity-10 group-hover:opacity-20 group-hover:scale-110 transition-all duration-500 rotate-[-10deg]",children:n.jsx("img",{src:r.icon,alt:"",className:"w-full h-full object-contain"})}),n.jsx("div",{className:"absolute bottom-0 left-0 w-full h-1 bg-gradient-to-r from-blue-600/0 via-blue-600/20 to-blue-600/0 opacity-0 group-hover:opacity-100 transition-opacity"})]},`s-${e}`))]})]})}),O7=()=>n.jsxs("main",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"Company information",titleJa:"伿¥æ å ±"}),n.jsxs("section",{className:"relative w-full overflow-hidden bg-white",children:[n.jsx("div",{className:"w-full h-auto min-h-[280px] md:min-h-0 relative",children:n.jsx("img",{src:"/assets/about/ceo_hero.png",alt:"CEO æ¾ç³ åä¿",className:"w-full h-full object-cover object-top md:h-auto absolute inset-0 md:relative"})}),n.jsx("div",{className:"absolute inset-0 flex items-center",children:n.jsx("div",{className:"container mx-auto px-6 md:px-24",children:n.jsxs("div",{className:"max-w-md relative z-10",children:[n.jsx("p",{className:"text-[10px] md:text-sm font-bold text-gray-500 mb-1 md:mb-2",children:"代表åç· å½¹ç¤¾é·CEO"}),n.jsx("h2",{className:"text-xl md:text-5xl font-black text-gray-800 mb
374-2 md:mb-8 tracking-tighter",children:"æ¾ç³ åä¿"}),n.jsxs("div",{className:"space-y-0 md:space-y-1 mb-4 md:mb-10",children:[n.jsx("p",{className:"text-[13px] md:text-xl font-bold text-gray-800 leading-tight",children:"Society 5.0/SDGsãç®æã"}),n.jsx("p",{className:"text-[13px] md:text-xl font-bold text-gray-800 leading-tight",children:"æ ªå¼ä¼ç¤¾Meta Heroesã®ææ¦"})]}),n.jsxs(q,{to:"/ceo-message",className:"inline-flex items-center gap-2 md:gap-3 px-5 md:px-8 py-2 md:py-3 bg-[#333] text-white text-[9px] md:text-sm font-bold rounded-full hover:bg-black transition-all group",children:["CEOããã®ã¡ãã»ã¼ã¸",n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,className:"w-3 h-3 md:w-4 md:h-4 group-hover:translate-x-1 transition-transform",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"arrowGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"#2563eb"}),n.jsx("stop",{offset:"100%",stopColor:"#06b6d4"})]})}),n.jsx("path",{stroke:"url(#arrowGradient)",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})]})]})]})})})]}),n.jsx(L7,{}),n.jsx(D7,{})]}),F7=()=>n.jsxs("main",{className:"min-h-screen bg-white pb-32",children:[n.jsx(Ge,{titleEn:"ABOUT US",titleJa:"Meta Heroesã«ã¤ãã¦"}),n.jsxs("div",{className:"container mx-auto px-4 max-w-4xl space-y-40",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-16",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-3",children:"CREATING NEW SOCIAL VALUE THROUGH DIGITAL AND REAL-WORLD COLLABORATION"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãã¸ã¿ã«Ããªã¢ã«ã§æ°ãã社ä¼ä¾¡å¤ãçã¿åºã"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"space-y-10",children:[n.jsxs("div",{className:"space-y-6",children:[n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"ç§ãã¡Meta Heroesã¯ãã¦ã§ã«ãã¼ã¤ã³ã°ç¤¾ä¼ãç®æãã¦ãæè²ã»é²ç½ã»å°æ¹åµçãªã©ã®æ§ã
ãªåéã§æ±ãã社ä¼èª²é¡ãããã¯ããã¸ã¼éçºã¨ãªã¢ã«ã®å ´ã§ã®ã¤ãã³ããéããã社ä¼èª²é¡ã解決ããã½ã¼ã·ã£ã«ã¤ããã¼ã¿ã¼ã§ãã"}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"ç§ãã¡ã¯ãã¡ã¿ãã¼ã¹ãä½ã£ã¦ããã ãã§ããAIãæãã¦ããã ãã§ãããã¾ããããããã¯å
¨ã¦ææ®µã«éããªãã®ã§ããç§ãã¡ã®æ¬è³ªã¯ã社ä¼ã«åå¨ããã課é¡ããããã¯ããã¸ã¼ã¨ã¨ã³ã¿ã¼ãã¤ã³ã¡ã³ãã®åã§ã叿ãã«å¤ããæ¥ãã¹ãSociety 5.0ã®ç¤¾ä¼ã«ããã¦ããã¸ã¿ã«ã¨ãªã¢ã«ã®å¢çããªããã誰ãããã¼ãã¼ã«ãªããèå°ãä½ãå½¹å²ãæããã¾ãã"})]}),n.jsx("div",{className:"py-12 flex justify-center",children:n.jsx("img",{src:"/assets/about-company/about_meta_heroes.png",alt:"",className:"w-full max-w-3xl h-auto"})})]})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-16",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-3",children:"A SYSTEM THAT TURNS INDIFFERENCE INTO INTEREST, FROM THE BEGINNING TO THE END"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãã£ããããã´ã¼ã«ã¾ã§ç¡é¢å¿ãé¢å¿ã¸å¤ããä»çµã¿"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"space-y-10",children:[n.jsxs("div",{className:"space-y-6",children:[n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"社ä¼èª²é¡ã¨èãã¨ãã©ããã¦ããé£ãããããèªåã«ã¯é¢ä¿ãªããã¨æã£ã¦ãã¾ããã¡ã§ããã ããããç§ãã¡ã¯ãã¡ã¿ãã¼ã¹ãAIã¨ãã£ãæå
ç«¯ã®æè¡ãå
¥ãå£ã«ãã¦ãã¾ãã¯ãé¢ç½ããï¼ãã¨ãããåä½é¨ããä½ãã¾ãã"}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"ããã«ãèå³ãæã£ã人ãã¢ã¤ãã¢ãã«ã¿ãã«ã§ãããç°å¢ãã¨ãã¦ãDXæè²æ½è¨ãHero Eggããéè¨ãããã§ã¯ãã¢ã¯ã¼ããã³ã³ãã¹ãã¨ãã£ãç®æãã¹ããç®æ¨ããéå¬ãã¦ãã¾ããããã£ããããä¸ããè²ã¦ãè©ä¾¡ããããã®ãµã¤ã¯ã«ããããããããä¸ã®ä¸ãå¤ããããã¼ãã¼ããããããçã¾ããã®ã§ãã"})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 py-12 items-center",children:[n.jsx("img",{src:"/assets/about-company/experience_env_goal.png",alt:"",className:"w-full h-auto"}),n.jsx("img",{src:"/assets/about-company/ecosystem.png",alt:"",className:"w-full h-auto"})]})]})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-24",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-3",children:"STRENGTHS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-3xl md:text-4xl font-black text-gray-800",children:"ç§ãã¡ã®å¼·ã¿"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]}),n.jsx("h3",{className:"text-xl md:text-2xl font-black text-gray-800 mt-12",children:"çºæ³¨è
ã¨å注è
ãè¶
ããäºæ¥ããå
±åµããããã¼ããã¼"})]}),n.jsxs("div",{className:"space-y-48",children:[n.jsx("div",{className:"relative",children:n.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-16 relative z-10",children:[n.jsxs("div",{className:"w-full md:w-1/2 space-y-8",children:[n.jsxs("div",{className:"relative",children:[n.jsx("span",{className:"absolute -top-32 -left-16 text-[12rem] font-black text-gray-100 leading-none -z-10 select-none",children:"01"}),n.jsx("h4",{className:"text-2xl font-black text-gray-800 leading-tight relative z-10",children:"æ ãè¶
ããäºæ¥å±é"})]}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"ã解決çã¯ã²ã¨ã¤ãã¨ã¯éãã¾ãããç§ãã¡ã¯å¹
åºãäºæ¥ãå±éãã¦ãããããããã²ã¨ã¤ã®æ©ã¿ã«å¯¾ãã¦ãæ§ã
ãªè¦ç¹ããã¢ããã¼ããããã¨ãã§ãã¾ããããããã®äºæ¥ã飿ºãåãç¬èªã®ä»çµã
374¿ã§ãæ½å¨çãªå¯è½æ§ãå¼ãåºããæå¾
ãè¶
ããææããå±ããã¾ãã"})]}),n.jsx("div",{className:"w-full md:w-1/2 flex justify-center",children:n.jsx("img",{src:"/assets/about-company/strength01.png",alt:"",className:"w-full max-w-md h-auto"})})]})}),n.jsx("div",{className:"relative",children:n.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-16 relative z-10",children:[n.jsxs("div",{className:"w-full md:w-1/2 space-y-8",children:[n.jsxs("div",{className:"relative",children:[n.jsx("span",{className:"absolute -top-32 -left-16 text-[12rem] font-black text-gray-100 leading-none -z-10 select-none",children:"02"}),n.jsx("h4",{className:"text-2xl font-black text-gray-800 leading-tight relative z-10",children:"çªå£ã²ã¨ã¤ã§æ¦ç¥ããå®è¡ã¾ã§"})]}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"è¤æ°ã®æ¥è
ã«ä¾é ¼ãããã¨ã§çãããç
©éãªã³ãã¥ãã±ã¼ã·ã§ã³ãèªèã®ãºã¬ã¯ãããã¸ã§ã¯ãã®è³ªã¨ã¹ãã¼ããä½ä¸ããã¾ããç§ãã¡ã¯ãä¼ç»ã»éçºã»éç¨ã¾ã§ãèªç¤¾å
ã§å®çµã§ããã¯ã³ã¹ãããä½å¶ãæ§ç¯ãå
¨å·¥ç¨ã«ããã¦è²¬ä»»ã®æå¨ãæç¢ºã«ãããã¬ã®ãªãä¸è²«ããå質ã§ã貴社ã®ãã¸ãã¹ãæçè·é¢ã§ã´ã¼ã«ã¸å°ãã¾ãã"})]}),n.jsx("div",{className:"w-full md:w-1/2 flex justify-center",children:n.jsx("img",{src:"/assets/about-company/strength02.png",alt:"",className:"w-full max-w-md h-auto"})})]})}),n.jsx("div",{className:"relative",children:n.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-16 relative z-10",children:[n.jsxs("div",{className:"w-full md:w-1/2 space-y-8",children:[n.jsxs("div",{className:"relative",children:[n.jsx("span",{className:"absolute -top-32 -left-16 text-[12rem] font-black text-gray-100 leading-none -z-10 select-none",children:"03"}),n.jsx("h4",{className:"text-2xl font-black text-gray-800 leading-tight relative z-10",children:"å¤ç¨®å¤æ§ãªæ¥çã«ãããè±å¯ãªå®ç¸¾"})]}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"ç§ãã¡ã®å¼·ã¿ã¯ãåãªãå®ç¸¾æ°ã§ã¯ããã¾ãããæ±ºã¾ã£ãæ¥çã ãã§ãªããæ°é伿¥ãå½ãèªæ²»ä½ãªã©ãããããæ¥çã§ã®åå¼å®ç¸¾ãããã¾ãããã¼ãºã«åããã¦ãæè»ã«ç¶æ³ã«é©å¿ããé²ãæ¹ãã§ãã¾ãã®ã§ãã©ã®ãããªè¦æã§ããæ°è»½ã«ãç¸è«ãã ããã"})]}),n.jsx("div",{className:"w-full md:w-1/2 flex justify-center",children:n.jsx("img",{src:"/assets/about-company/strength03.png",alt:"",className:"w-full max-w-md h-auto"})})]})})]})]})]})]}),B7={xr:"ã¡ã¿ãã¼ã¹éçºå®ç¸¾",ai:"AI / éçº å®ç¸¾",event:"ã¤ãã³ãå®ç¸¾",facility:"Hero Egg å®ç¸¾"},$7=[{id:"xr",label:"XRäºæ¥",image:"/assets/business-content/metaverce/metaverse_hero.png"},{id:"ai",label:"AIäºæ¥",image:"/assets/business-content/ai/ai_hero.png"},{id:"event",label:"ã¤ãã³ãäºæ¥",image:"/assets/business-content/event/event_hero.png"},{id:"facility",label:"æ½è¨æ´»ç¨äºæ¥",image:"/assets/business-content/vacant-facility/vacant_hero.png"}],U7={xr:{titleJa:"XRäºæ¥",titleEn:"EXTENDED REALITY",heroImage:"/assets/business-content/metaverce/metaverse_hero.png",concept:"社ä¼èª²é¡ãã¨ã³ã¿ã¡ã«ç¿»è¨³ãã",description:"社ä¼èª²é¡ããã¡ã¿ãã¼ã¹ã ãããã解決ã§ãããµã¼ãã¹ã¨ãã¦å±éãéãåé¡ããã¨ã³ã¿ã¼ãã¤ã³ã¡ã³ããã¸ã¨ç¿»è¨³ããåå ã®ãã¼ãã«ãä¸ãã¾ãã",issues:[{label:"社ä¼èª²é¡ã¸ã®ç¡é¢å¿",icon:"/assets/business-content/metaverce/indifference.png",points:["æ
å ±ä¸è¶³","ä»äººäº","ãã£ããããªã"]},{label:"é£è§£ãªè§£æ±ºããã»ã¹",icon:"/assets/business-content/metaverce/difficult_process.png",points:["åé¡ã®è¤éã","è§£æ±ºã®æ¹æ³ãå¨ç¥ããã¦ããªã"]},{label:"è¥å¹´å±¤ã®å·»ãè¾¼ã¿",icon:"/assets/business-content/metaverce/youth_involvement.png",points:["åå æ¹æ³ãåãããªã","å°åã»ç¤¾ä¼ã¨ã®ã¤ãªããã®å¸èå"]}
374],solutions:[{title:"ã²ã¼ã æ§ã®ããå¦ç¿",text:"ã¦ã¼ã¶ã¼ãç©æ¥µçã«åå ããããã«ãã²ã¼ã ã®è¦ç´ ãåãå
¥ããä½é¨ãä¸å¿ã¨ãããã¶ã¤ã³ãæä¾ãã¾ãã",image:"/assets/business-content/metaverce/game_learning.png"},{title:"没å
¥ä½é¨",text:"ç©ççãªå¶ç´ãè¶
ãã¦ãå®å
¨ã«å®è·µçãªã·ãã¥ã¬ã¼ã·ã§ã³ãä½åº¦ã§ãä½é¨ã§ãã¾ãã",image:"/assets/business-content/metaverce/immersion.png"},{title:"ã¯ã³ã¹ãããä½å¶",text:"ä¼ç»ããéç¨ã¾ã§ã䏿°é貫ã§å¯¾å¿ãããããéçºã³ã¹ãã®åæ¸ãä¸è²«ãããã©ã³ãä½é¨ãæä¾ãã¾ãã",image:"/assets/business-content/metaverce/onestop.png"}]},ai:{titleJa:"AIäºæ¥",titleEn:"ARTIFICIAL INTELLIGENCE",heroImage:"/assets/business-content/ai/ai_hero.png",concept:"AIæè¡ã§ãã¸ãã¹ã¨æè²ãå éããã",description:"ææ°ã®AIæè¡ãå®ç¤¾ä¼ã«å®è£
ããã¸ãã¹ããã»ã¹ã®å¹çåãããæ¬¡ä¸ä»£ã®AI人æè²æã¾ã§ãæªæ¥ãè¦æ®ããã½ãªã¥ã¼ã·ã§ã³ãæä¾ãã¾ãã",issues:[{label:"AI人æä¸è¶³",icon:"/assets/business-content/ai/ai_shortage_icon.png",points:["å°éç¥èã®æ¬ å¦","æè²ä½å¶ã®æªæ´å"]},{label:"æéã¨ã³ã¹ã",icon:"/assets/business-content/ai/time_cost_icon.png",points:["å°å
¥ããã»ã¹ã®é·æå","é«ãåææè³"]},{label:"伿¥ã®DXæ¨é²å",icon:"/assets/business-content/ai/dx_power_icon.png",points:["æ¢åã·ã¹ãã ã¨ã®ä¹é¢","å¤é©ã¸ã®æµææ"]}],solutions:[{title:"AI人æè²æ",text:"å®åã«ç´çµããã«ãªãã¥ã©ã ãéãã¦ã峿¦åã¨ãªãAI人æãçæéã§è²æãã¾ãã",image:"/assets/business-content/ai/ai_training.png"},{title:"AIæè¡å°å
¥",text:"æ¥åããã¼ãåæããæé©ãªAIãã¼ã«ãã«ã¹ã¿ã ã¢ãã«ã®å°å
¥ããµãã¼ããã¾ãã",image:"/assets/business-content/ai/ai_implementation.png"},{title:"ç¶ç¶çãªã³ãã¥ããã£",text:"å°å
¥å¾ãææ°æè¡ã®ãã£ããã¢ãããã§ãããããå°éå®¶ã«ãããµãã¼ãã³ãã¥ããã£ãæä¾ãã¾ãã",image:"/assets/business-content/ai/continuous_community.png"}]},event:{titleJa:"ã¤ãã³ãäºæ¥",titleEn:"EVENT & EXPERIENCE",heroImage:"/assets/business-content/event/event_hero.png",concept:"ãªã¢ã«ãªä½é¨ãæªæ¥ãå¤ãã",description:"ãã¸ã¿ã«æè¡ã¨ãªã¢ã«ãªå ´ãèåããããä½é¨åã¤ãã³ãããããã¥ã¼ã¹ãäºæãåºæ¿ããæ¼åºã§ã確ããªæåã¨æ·±ãçè§£ãçã¿åºãã¾ãã",issues:[{label:"ä¸éæ§ã®æ½ç",icon:"/assets/business-content/event/temporary_measure_icon.png",points:["ãªãã¼ã¿ã¼ã®æ¬ å¦","å¹ææ¸¬å®ã®é£ãã"]},{label:"å°æ¹ã®éçå",icon:"/assets/business-content/event/depopulation_icon.png",points:["è¥å¹´å±¤ã®æµåº","é客åã®ä½ä¸"]},{label:"æè²æ ¼å·®",icon:"/assets/business-content/event/education_gap_icon.png",points:["ä½é¨æ©ä¼ã®ä¸è¶³","æ
å ±ã®å°åå·®"]}],solutions:[{title:"DXæè¡ã®ä½é¨ä¼",text:"ææ°ã®ã¡ã¿ãã¼ã¹ãAIãå®éã«ä½é¨ã§ããå ´ãæä¾ãããã¯ããã¸ã¼ã身è¿ã«æãããã¾ãã",image:"/assets/business-content/event/dx_experience.png"},{title:"ãªã¼ãã³ã¤ããã¼ã·ã§ã³",text:"ç°ãªãæ¥çãä¸ä»£ã交ããå ´ãåµåºããæ°ããã¢ã¤ãã¢ãã³ã©ãã¬ã¼ã·ã§ã³ãèªçºãã¾ãã",image:"/assets/business-content/event/open_innovation.png"},{title:"ã¤ãã³ãåºå±",text:"å½å
å¤ã®ä¸»è¦ãªå±ç¤ºä¼ããã§ã¹ãã£ãã«ã¸ã®åºå±ãéãã¦ããã©ã³ãã®èªç¥åº¦ãæå¤§åãã¾ãã",image:"/assets/business-content/event/event_exhibition.png"}]},facility:{titleJa:"æ½è¨æ´»ç¨äºæ¥",titleEn:"FACILITY UTILIZATION",heroImage:"/assets/business-content/vacant-facility/vacant_hero.png",concept:"ç ããè³ç£ãå°åã®å¸æã¸",description:"å
¨å½ã«åºããé伿½è¨ããæå
端ã®DXæè²æ ç¹ãã³ãã¥ããã£ã¹ãã¼ã¹ã¨ãã¦åçãå°åã«æ°ããäººã®æµãã¨éç¨ãåµåºãã¾ãã",issues:[{label:"éä¼è³ç£ã®æ´»ç¨",icon:"/assets/business-content/vacant-facility/idle_assets_icon.png",points:["ç¶æã³ã¹ãã®è² æ
","å°åã®æ²»å®æª
374å"]},{label:"DXæè²ç°å¢ã®ä¸è¶³",icon:"/assets/business-content/vacant-facility/dx_env_shortage_icon.png",points:["å¦ç¿æ ç¹ã®ä¸å¨","æå°è
ã®ä¸è¶³"]},{label:"æ¼ ç¶ã¨ããå¦ã³",icon:"/assets/business-content/vacant-facility/vague_learning_icon.png",points:["ç®çã®ä¸æç¢ºã","å®ç¤¾ä¼ã¨ã®æ¥ç¹ã®ãªã"]}],solutions:[{title:"ç£å®å¦ã¨é£æºããDXæè²",text:"èªæ²»ä½ã大å¦ã¨é£æºããå°åã«æ ¹ãããæç¶å¯è½ãªæè²ããã°ã©ã ãæ§ç¯ãã¾ãã",image:"/assets/business-content/vacant-facility/dx_education_collab.png"},{title:"é伿½çã®åçå",baseText:"使ããã¦ããªãæ½è¨ãåçãçãæ ç¹ã¸ã¨è»¢æãçµæ¸çãªèªç«ããµãã¼ããã¾ãã",image:"/assets/business-content/vacant-facility/monetization.png"},{title:"CSRåã¨ã³ã·ã¹ãã ",text:"伿¥ãå°åãå人ã䏿¹è¯ãã¨ãªãæç¶å¯è½ãªã³ãã¥ããã£ã¢ãã«ãå½¢æãã¾ãã",image:"/assets/business-content/vacant-facility/csr_ecosystem.png"}]}},xC={xr:[{title:"AI MONDAY",category:"ãã¤ããªããã³ãã¥ããã£",description:"AIã»XRã®ææ°ãã¬ã³ããå
±æããå¦ã³åãå°éã³ãã¥ããã£ã§ãã",image:"/assets/services/first-view/ai_monday_thumb.png",path:"/services/ai-monday"},{title:"THE HERO SUMMIT",category:"ã¤ãã³ã",description:"伿¥ãã¯ãªã¨ã¤ã¿ã¼ãéã¾ããæ°ããªä¾¡å¤ãåµé ããã«ã³ãã¡ã¬ã³ã¹ã§ãã",image:"/assets/services/first-view/ghs_first_thumb.png",path:"/services/global-hero-summit"},{title:"Hero Egg",category:"DXæå®¤æ½è¨éç¨",description:"åã©ããã大人ã¾ã§å¦ã¹ãDXæè²æ½è¨ãXRä½é¨ãæä¾ãã¾ãã",image:"/assets/services/first-view/hero_egg_thumb.png",path:"/services/hero-egg"}],ai:[{title:"AI 人æè²æç ä¿®",category:"AI伿¥ç ä¿®",description:"伿¥ã»å£ä½åãã®AIãªãã©ã·ã¼åä¸ããã³å®è·µçãªæ´»ç¨ç ä¿®ãµã¼ãã¹ã§ãã",image:"/assets/services/first-view/ai_training_thumb.png",path:"/services/ai-training"},{title:"AI MONDAY",category:"ãã¤ããªããã³ãã¥ããã£",description:"AIã®ææ°ãã¬ã³ããå
±æããå¦ã³åãå°éã³ãã¥ããã£ã§ãã",image:"/assets/services/first-view/ai_monday_thumb.png",path:"/services/ai-monday"}],event:[{title:"THE HERO SUMMIT",category:"ã¤ãã³ã",description:"伿¥ãã¯ãªã¨ã¤ã¿ã¼ãéã¾ããæ°ããªä¾¡å¤ãåµé ããã«ã³ãã¡ã¬ã³ã¹ã§ãã",image:"/assets/services/first-view/ghs_first_thumb.png",path:"/services/global-hero-summit"},{title:"EGG JAM",category:"ãªã³ã©ã¤ã³ã³ãã¥ããã£",description:"ææ¦ãã人ãå¿æ´ãã交æµãæ·±ãããªã³ã©ã¤ã³ã³ãã¥ããã£ã§ãã",image:"/assets/services/first-view/egg_jam_thumb.png",path:"/services/egg-jam"},{title:"AI MONDAY",category:"ãã¤ããªããã³ãã¥ããã£",description:"AIã®ææ°ãã¬ã³ããå
±æããå¦ã³åãå°éã³ãã¥ããã£ã§ãã",image:"/assets/services/first-view/ai_monday_thumb.png",path:"/services/ai-monday"}],facility:[{title:"Hero Egg",category:"DXæå®¤æ½è¨éç¨",description:"åã©ããã大人ã¾ã§å¦ã¹ãDXæè²æ½è¨ãåã©ããã¡ã¯ç¡æã§ãã¯ããã¸ã¼ãå¦ã¹ã¾ãã",image:"/assets/services/first-view/hero_egg_thumb.png",path:"/services/hero-egg"},{title:"Meta Heroes Guild",category:"ã³ãã¥ããã£ã¹ãã¼ã¹",description:"ç¹å®ã®ãã¼ãã§ã飲é£ãã§ããã³ãã¥ããã£ã¹ãã¼ã¹ã§ãã",image:"/assets/services/first-view/mhg_first_thumb.png",path:"/services/meta-heroes-guild"}]},H7=()=>{const[r,e]=T.useState("xr"),[t,s]=T.useState([]),[i,a]=T.useState(!1),o=U7[r];T.useEffect(()=>{(async()=>{a(!0);try{const f=await Xe(10,void 0,{categoryId:B7[r]});s(f.contents)}catch(f){console.error("Failed to fetch case studies:",f)}finally{a(!1)}})()},[r]);const c=h=>{const f=new Date(h);return`${f.getFullYear()}.${f.getMonth()+1}.${f.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white pb-32",children:[n.jsx(Ge,{titleEn:"BUSINESS OVERVIEW",titleJa:"äºæ¥å
容"}),n.jsx("div",{className:"container mx-auto px-4 max-w-5xl mb-16 md:mb-24",children:n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 md:gap-4",children:$7.map(h=>{const f=r===h.id;return n.jsxs("button",{onClick:()=>e(h.id),className:`group relative h-14 md:h-20 overflow-hidden rounded-lg md:rounded-xl transition-all duration-500 ${f?"ring-2 ring-blue-500 ring-offset-2 shadow-lg shadow-blue-500/20 translate-y-[-2px]":"opacity-70 grayscale hover:opacity-100 hover:grayscale-0 hover:translate-y-[-1px]"}`,children:[n.jsx("img",{src:h.image,alt:h.label,className:"absolute inset-0 w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),n.jsx("div",{className:`absolute inset-0 transition-colors duration-500 ${f?"bg-blue-600/30":"bg-black/50 group-hover:bg-black/30"}`}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-2",children:n.jsx("span",{className:`font-black text-[10px] md:text-xs tracking-widest text-center leading-tight transition-all duration-300 ${f?"text-white":"text-white/90 group-hover:text-white"}`,children:h.label})})]}
374,h.id)})})}),n.jsx(an,{mode:"wait",children:n.jsxs(Ce.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},children:[n.jsxs("div",{className:"text-center mb-16 px-4",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-blue-600 tracking-[0.2em] uppercase block mb-3",children:o.titleEn}),n.jsx("h2",{className:"text-3xl md:text-4xl font-black text-gray-800 mb-12",children:o.titleJa})]}),n.jsx("div",{className:"w-full h-[300px] md:h-[500px] overflow-hidden mb-24",children:n.jsx("img",{src:o.heroImage,alt:"",className:"w-full h-full object-cover"})}),n.jsx("div",{className:"container mx-auto px-4 max-w-4xl mb-32 text-center",children:n.jsxs("div",{className:"space-y-8",children:[n.jsx("h3",{className:"text-xl md:text-2xl font-black text-gray-800 leading-tight",children:o.concept}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider max-w-3xl mx-auto",children:o.description})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-4xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"ISSUE"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"解決ããã課é¡"}),n.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-blue-600 to-cyan-500 mt-6"})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 md:gap-6",children:o.issues.map((h,f)=>n.jsxs("div",{className:`bg-white border border-gray-100 rounded-2xl p-4 md:p-8 shadow-sm flex flex-col items-center text-center space-y-4 md:space-y-6 ${f===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-10 h-10 md:w-16 md:h-16",children:n.jsx("img",{src:h.icon,alt:"",className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-[13px] md:text-base font-black text-gray-800 leading-tight",children:h.label}),n.jsx("ul",{className:"text-[10px] md:text-xs font-bold text-gray-400 space-y-1 md:space-y-2",children:h.points.map((m,g)=>n.jsxs("li",{children:["ã»",m]},g))})]},f))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"SOLUTION"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æä¾ãã解決ç"}),n.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-blue-600 to-cyan-500 mt-6"})]})]}),n.jsx("div",{className:"space-y-12",children:o.solutions.map((h,f)=>n.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-10 bg-gray-50/50 rounded-2xl p-8",children:[n.jsx("div",{className:"w-full md:w-1/2 aspect-video rounded-xl overflow-hidden shadow-md",children:n.jsx("img",{src:h.image,alt:"",className:"w-full h-full object-cover"})}),n.jsxs("div",{className:"w-full md:w-1/2 space-y-4 text-left",children:[n.jsx("h4",{className:"text-xl font-black text-gray-800",children:h.title}),n.jsx("p",{className:"text-sm md:text-base font-medium text-gray-600 leading-relaxed tracking-wider",children:h.text||h.baseText})]})]},f))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-blue-600 to-cyan-500 mt-6"})]})]}),i?n.jsx("div",{className:"flex justify-center py-20",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-100 border-t-blue-600"})}):t.length===0?n.jsx("div",{className:"bg-gray-50 rounded-2xl py-20 text-center",children:n.jsx("p",{className:"text-gray-400 font-bold tracking-widest",children:"å®ç¸¾ãã¾ã ããã¾ãã"})}):n.jsx("div",{className:"flex overflow-x-auto pb-8 md:grid md:grid-cols-4 gap-4 md:gap-6 scrollbar-hide -mx-4 px-4 md:mx-0 md:px-0",children:t.map(h=>{var f;return n.jsxs(q,{to:`/news/${h.id}`,className:"group block flex-shrink-0 w-[200px] md:w-auto",children:[n.jsx("div",{className:"relative aspect-[4/3] overflow-hidden rounded-lg md:rounded-xl mb-3 bg-gray-100 shadow-sm border border-gray-50",children:n.jsx("img",{src:((f=h.eyecatch)==null?void 0:f.url)||"https://via.placeholder.com/800x600?text=No+Image",alt:h.title,className:"w-full h-full object-cover transition-all duration-700 group-hover:scale-110"})}),n.jsxs("div",{className:"space-y-1.5 md:space-y-2 px-0.5",children:[n.jsx("time",{className:"text-[8px] md:text-[10px] font-black text-gray-300 tracking-[0.1em] md:tracking-[0.2em] block",children:c(h.publishedAt)}),n.jsx("h3",{className:"text-gray-800 text-[11px] md:text-sm font-black leading-snug line-clamp-2 group-hover:text-blue-600 transition-colors",children:h.title})]})]}
374,h.id)})}),n.jsx("div",{className:"text-center mt-16",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-3 px-10 py-3 bg-gray-800 text-white text-xs font-black rounded-full hover:bg-black transition-all group shadow-lg",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})})]}),xC[r].length>0&&n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED SERVICES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãµã¼ãã¹"}),n.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-blue-600 to-cyan-500 mt-6"})]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8",children:xC[r].map(h=>n.jsxs(q,{to:h.path,className:"group flex flex-col h-full",children:[n.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl bg-white border border-gray-100 mb-5",children:n.jsx("img",{src:h.image,alt:"",className:"w-full h-full object-contain transition-transform duration-700 group-hover:scale-105"})}),n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("div",{className:"w-6 h-6 rounded-full border border-blue-200 flex items-center justify-center flex-shrink-0 mt-1 transition-colors group-hover:bg-blue-600 group-hover:border-blue-600",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-3 h-3 text-blue-500 group-hover:text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("span",{className:"block text-[10px] text-gray-400 font-bold mb-1 tracking-wider",children:h.category}),n.jsx("h4",{className:"text-base font-black text-gray-800 mb-2 tracking-wider group-hover:text-blue-600 transition-colors",children:h.title}),n.jsx("p",{className:"text-xs text-gray-600 leading-[1.8] font-medium tracking-wide",children:h.description})]})]})]},h.path))}),n.jsx("div",{className:"text-center mt-16",children:n.jsxs(q,{to:"/services",className:"inline-flex items-center gap-3 px-10 py-3 bg-gradient-to-r from-blue-600 to-cyan-500 text-white text-xs font-black rounded-full hover:shadow-lg hover:scale-105 transition-all group",children:["ãã¹ã¦ã®ã½ãªã¥ã¼ã·ã§ã³ãè¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})})]})]})]},r)}),n.jsxs("div",{className:"container mx-auto px-4 max-w-4xl space-y-32 mt-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"THE SYNERGY"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"4äºæ¥ã®ã·ãã¸ã¼"}),n.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-blue-600 to-cyan-500 mt-6"})]})]}),n.jsxs("div",{className:"space-y-12",children:[n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"åäºæ¥ã¯ããããç¬ç«ãã¦åå¨ãã¦ããããã§ã¯ããã¾ãããç¸äºã«é£æºãããã¨ã§ããµã¼ãã¹ã®è³ªãé«ããããæ°ããªä¾¡å¤ãçã¿åºããããã¦ãã¾ãã"}),n.jsx("div",{className:"py-8 flex justify-center",children:n.jsx("img",{src:"/assets/business-content/synergy.png",alt:"Synergy Diagram",className:"w-full max-w-3xl h-auto"})})]})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"FOCUS AREAS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"3ã¤ã®æ³¨ååé"}),n.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-blue-600 to-cyan-500 mt-6"})]})]}),n.jsxs("div",{className:"space-y-12",children:[n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium text-base tracking-wider",children:"ç§ãã¡Meta Heroesã¯ãã¦ã§ã«ãã¼ã¤ã³ã°ç¤¾ä¼ãç®æãã¦ãæè²ã»é²ç½ã»å°æ¹åµçããã¼ãã«ãã社ä¼èª²é¡ãããã¯ããã¸ã¼éçºã¨ãªã¢ã«ã®å ´ã§ã®ã¤ãã³ããæ½è¨éå¶ãéãã¦è§£æ±ºã¸ã¨å°ãã¾ãã"}),n.jsx("div",{className:"py-8 flex justify-center",children:n.jsx("img",{src:"/assets/business-content/focus_areas.png",alt:"Focus Areas",className:"w-full max-w-3xl h-auto"})})]})]})]}),n.jsx("section",{className:"mt-32",children:n.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:n.jsxs("div",{className:"relative overflow-hidden rounded-3xl bg-gradient-to-br from-blue-600 to-cyan-500 px-6 py-16 md:px-16 md:py-20 shadow-2xl shadow-blue-500/20",children:[n.jsxs("div",{className:"absolute inset-0 opacity-10 pointer-events-none",children:[n.jsx("div",{className:"absolute -top-24 -right-24 w-96 h-96 rounded-full bg-white blur-3xl"}),n.jsx("div",{className:"absolute -bottom-24 -left-24 w-96 h-96 rounded-full bg-white blur-3xl"})]}),n.jsxs("div",{className:"relative z-10 text-center mb-10 md:mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-black text-white/80 tracking-[0.4em] uppercase block mb-4",children:"CONTACT"}),n.jsx("h2",{className:"text-2xl md:text-4xl font-black text-white tracking-tight leading-tight mb-4",children:"äºæ¥ã«é¢ãããåãåãã"}),n.jsx("p",{className:"text-sm md:text-base text-white/90 leading-relaxed font-medium tracking-wider",children:"Meta Heroesã®äºæ¥ã«ã¤ãã¦ããã£ã¨è©³ããç¥ãããæ¹ã¯ãæ°è»½ã«ãåãåãããã ããã"})]}),n.jsxs("div",{className:"relative z-10 flex flex-col sm:flex-row items-center justify-center gap-4 max-w-2xl mx-auto",children:[n.jsxs(q,{to:"/contact",className:"group w-full sm:w-auto inline-flex items-center justify-between gap-4 px-8 py-4 bg-white text-blue-600 text-sm font-black rounded-full hover:shadow-2xl hover:scale-105 transition-all min-w-[260px]",children:[n.jsxs("span",{className:"flex flex-col items-start",children:[n.jsx("span",{className:"tracking-wide",children:"ãåãåãã"}),n.jsx("span",{className:"text-[10px] font-bold tracking-[0.2em] uppercase opacity-60",children:"Contact"})]}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-4 h-4 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]}),n.jsxs(q,{to:"/document-request",className:"group w-full sm:w-auto inline-flex items-center justify-between gap-4 px-8 py-4 bg-white/10 backdrop-blur-md border-2 border-white/40 text-white text-sm font-black rounded-full hover:bg-white/20 hover:scale-105 transition-all min-w-[260px]",children:[n.jsxs("span",{className:"flex flex-col items-start",children:[n.jsx("span",{className:"tracking-wide",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("span",{className:"text-[10px] font-bold tracking-[0.2em] uppercase opacity-70",children:"Document"})]}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-4 h-4 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})]})]})})})]})},yC=[{id:"ai-training",solution:"digital",category:"AI伿¥ç ä¿®",title:"AI 人æè²æç ä¿®",description:"伿¥ã»å£ä½åãã®AIãªãã©ã·ã¼åä¸ããã³å®è·µçãªæ´»ç¨ç ä¿®ãµã¼ãã¹ã§ãã",image:"/assets/services/first-view/ai_training_thumb.png",path:"/services/ai-training"},{id:"ai-monday",solution:["digital","community"],category:"ãã¤ããªããã³ãã¥ããã£",title:"AI MONDAY",description:"AIã®ææ°ãã¬ã³ããå
±æããå¦ã³åãå°éã³ãã¥ããã£ã§ãã",image:"/assets/services/first-view/ai_monday_thumb.png",path:"/services/ai-monday"},{id:"ghs",solution:"community",category:"ã¤ãã³ã",title:"THE HERO SUMMIT",description:"伿¥ãã¯ãªã¨ã¤ã¿ã¼ãéã¾ããæ°ããªä¾¡å¤ãåµé ããã«ã³ãã¡ã¬ã³ã¹ã§ãã",image:"/assets/services/first-view/ghs_first_thumb.png",path:"/services/global-hero-summit"},{id:"mh-guild",solution:"community",category:"ã³ãã¥ããã£ã¹ãã¼ã¹",title:"Meta Heroes Guild",de
374scription:"ç¹å®ã®ãã¼ãã§ã飲é£ãã§ããã³ãã¥ããã£ã¹ãã¼ã¹ã§ãã",image:"/assets/services/first-view/mhg_first_thumb.png",path:"/services/meta-heroes-guild"},{id:"hero-egg",solution:"education",category:"DXæå®¤æ½è¨éç¨",title:"Hero Egg",description:"åã©ããã大人ã¾ã§å¦ã¹ãDXæè²æ½è¨ãåã©ããã¡ã¯ç¡æã§ãã¯ããã¸ã¼ãå¦ã¹ã¾ãã",image:"/assets/services/first-view/hero_egg_thumb.png",path:"/services/hero-egg"},{id:"egg-jam",solution:["education","community"],category:"ãªã³ã©ã¤ã³ã³ãã¥ããã£",title:"EGG JAM",description:"ææ¦ãã人ãå¿æ´ãã交æµãæ·±ãããªã³ã©ã¤ã³ã³ãã¥ããã£ã§ãã",image:"/assets/services/first-view/egg_jam_thumb.png",path:"/services/egg-jam"}],z7=[{id:"all",label:"ãã¹ã¦"},{id:"digital",label:"AIã»XRã½ãªã¥ã¼ã·ã§ã³"},{id:"education",label:"æè²Ããã¯ããã¸ã¼"},{id:"community",label:"ã¤ãã³ãã»ã³ãã¥ããã£ã»å
±åµ"}],bC={"#digital":"digital","#education":"education","#social":"education","#community":"community"},V7=()=>{const r=Kt(),[e,t]=T.useState(()=>bC[r.hash]??"all");T.useEffect(()=>{const i=bC[r.hash];i&&t(i)},[r.hash]);const s=e==="all"?yC:yC.filter(i=>Array.isArray(i.solution)?i.solution.includes(e):i.solution===e);return n.jsxs("main",{className:"min-h-screen bg-white pb-32 text-gray-800",children:[n.jsx(Ge,{titleEn:"SERVICE",titleJa:"ãµã¼ãã¹"}),n.jsxs("section",{className:"relative w-full overflow-hidden",children:[n.jsx("div",{className:"w-full h-[200px] md:h-[320px]",children:n.jsx("img",{src:"/assets/services/top/service_top_thumbnail.png",alt:"",className:"w-full h-full object-cover object-center"})}),n.jsx("div",{className:"absolute inset-0 flex items-center",children:n.jsx("div",{className:"container mx-auto px-6 md:px-24",children:n.jsx("div",{className:"max-w-[55%] md:max-w-xl relative z-10",children:n.jsx("p",{className:"text-[11px] md:text-lg font-black text-gray-800 leading-relaxed md:leading-[1.8] tracking-widest md:drop-shadow-md",children:"Meta Heroesã¯ãAI人æè²æç ä¿®ãDXæè²æ½è¨éå¶ãã³ãã¥ããã£äºæ¥ãå§ãã¨ããããã¾ãã¾ãªãµã¼ãã¹ãå±éãã¦ãã¾ãã"})})})})]}),n.jsx("div",{className:"sticky top-16 md:top-20 z-40 bg-white/95 backdrop-blur-xl border-y border-gray-100 py-4 md:py-6 mb-12 md:mb-16",children:n.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:n.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-4 md:gap-6 justify-center",children:[n.jsx("span",{className:"text-[11px] font-black text-gray-400 tracking-[0.2em] w-28 border-r border-gray-100 hidden md:block",children:"ã½ãªã¥ã¼ã·ã§ã³"}),n.jsx("div",{className:"flex overflow-x-auto scrollbar-hide gap-2 -mx-4 px-4 md:mx-0 md:px-0",children:z7.map(i=>n.jsx("button",{onClick:()=>t(i.id),className:`px-4 md:px-8 py-2 rounded-full text-[10px] md:text-[11px] font-black tracking-widest transition-all duration-500 whitespace-nowrap flex-shrink-0 ${e===i.id?"bg-blue-600 text-white shadow-lg scale-105":"bg-gray-100/50 text-gray-400 hover:bg-gray-200/50 hover:text-gray-600"}`,children:i.label},i.id))})]})})}),n.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:s.length>0?n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-16",children:s.map(i=>{const a=n.jsxs(Ce.div,{layout:!0,initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"group flex flex-col h-full",children:[n.jsx("div",{className:"w-full aspect-video rounded-xl overflow-hidden border border-gray-100 bg-white mb-6 relative",children:n.jsx("img",{src:i.image,alt:"",className:"w-full h-full object-contain transition-transform duration-700 group-hover:scale-105"})}),n.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[n.jsx("div",{className:"w-6 h-6 rounded-full border border-blue-200 flex items-center justify-center flex-shrink-0 mt-1 transition-colors group-hover:bg-blue-600 group-hover:border-blue-600 group-hover:text-white",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-3 h-3 text-blue-500 group-hover:text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsxs("div",{children:[n.jsx("span",{className:"block text-[10px] text-gray-400 font-bold mb-1 tracking-wider",children:i.category}),n.jsx("h3",{className:"text-base font-black text-gray-800 tracking-wider group-hover:text-blue-600 transition-colors",children:i.title})]})]}),n.jsx("p",{className:"text-xs text-gray-600 leading-[1.8] font-medium tracking-wide",children:i.description})]},i.id);return i.path?n.jsx(q,{to:i.path,className:"block h-full",children:a},i.id):n.jsx("div",{className:"block h-full",children:a},i.id)})}):n.jsx("div",{className:"py-32 text-center",children:n.jsx("p",{className:"text-gray-400 font-bold tracking-widest",children:"該å½ããã½ãªã¥ã¼ã·ã§ã³ãè¦ã¤ããã¾ããã§ãã"})})})]})}
374,jn=({image:r,title:e,subtitle:t,websiteUrl:s})=>n.jsxs("section",{className:"relative w-full overflow-hidden",children:[n.jsx("div",{className:"w-full h-[240px] md:h-[320px]",children:n.jsx("img",{src:r,alt:e,className:"w-full h-full object-cover object-center"})}),n.jsx("div",{className:"absolute inset-0 flex items-center",children:n.jsx("div",{className:"container mx-auto px-6 md:px-24",children:n.jsxs("div",{className:"max-w-[60%] md:max-w-xl relative z-10",children:[n.jsx("h2",{className:"text-[13px] md:text-2xl font-black text-gray-800 leading-relaxed md:leading-[1.6] tracking-widest md:drop-shadow-md",children:e}),t&&n.jsx("p",{className:"hidden md:block mt-4 text-gray-600 text-sm font-medium tracking-wider",children:t}),s&&n.jsx("div",{className:"mt-4 md:mt-8 flex flex-wrap gap-3",children:n.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-1.5 md:px-8 md:py-2.5 bg-gray-900 text-white text-[9px] md:text-sm font-bold rounded-full hover:bg-gray-700 transition-all shadow-lg",children:["å
¬å¼ãµã¤ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-2.5 h-3 md:w-4 md:h-4",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]})})]})})})]}),W7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"XRã½ãªã¥ã¼ã·ã§ã³"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["XRã½ãªã¥ã¼ã·ã§ã³","ã¡ã¿ãã¼ã¹éçºå®ç¸¾"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"XR & AI SOLUTIONS",titleJa:"XRã½ãªã¥ã¼ã·ã§ã³"}),n.jsx(jn,{image:"/assets/services/xr-solutions/hero-thumbnail.png",title:"VRã»ARãæ´»ç¨ãã課é¡è§£æ±ºã没å
¥ä½é¨ã«ããæ°ããªã½ãªã¥ã¼ã·ã§ã³ãæä¾ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ä¸å¯è½ãå¯è½ã«ããæªæ¥ã®èª²é¡ã解決ãããã¯ããã¸ã¼ã§ã社ä¼ã®ãä¸ã",n.jsx("br",{className:"hidden md:block"}),"ãè§£æ¶ãã¡ã¿ãã¼ã¹ãæ´»ç¨ããå®å
¨ã§å¹ççãæåçãªç¤¾ä¼ãåµé ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"徿¥ã®ç ä¿®ã§ã¯ä¼ããããªããç¾å ´ã®ãªã¢ã«ãå±éºãªç
374¶æ³ãç§ãã¡ã¯VRï¼ä»®æ³ç¾å®ï¼ãMRï¼è¤åç¾å®ï¼ãé§ä½¿ããå ´æãæéã®å¶ç´ãè¶
ãããæ²¡å
¥ä½é¨ããæä¾ãã¾ããé²ç½ã»æè²ã»å°ååµçãªã©ãããªãã®æ´»åã«æé©ãªææ°ã®è§£æ±ºçãå
±ã«åµãä¸ãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"VRãMRæè¡ã使ããç¾å®ã§ã¯é£ããä½é¨ããã¸ã¿ã«ã§åç¾ãã¾ããæè²ãé²ç½ãªã©ã®èª²é¡ã«å¯¾ããææ°æè¡ãç¨ãã广çãªè§£æ±ºçããªã¼ãã¼ã¡ã¤ãã§æä¾ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"没å
¥æããå¦ã³",icon:"/assets/services/xr-solutions/icon-immersion.png",desc:"ä»®æ³ç©ºéã§ã®ä½é¨ãéãã¦ãçæéã§é«ãå¦ç¿å¹æãå¾ããã¾ãã"},{title:"ãèªåãã¨ãã«ãã",icon:"/assets/services/xr-solutions/icon-ownership.png",desc:"ç©èªãä½é¨ãéããå
容ãèªåã®èª²é¡ã¨ãã¦æ·±ã宿ããã¾ãã"},{title:"å ´æãåç¾ããæè¡",icon:"/assets/services/xr-solutions/icon-reproduction.png",desc:"ç¾å®ã®è¡ãæ½è¨ããã¸ã¿ã«ã§åç¾ãã観å
ãæ¥åãå¹çåãã¾ãã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain",onError:c=>c.currentTarget.style.display="none"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"å ´æãæéã®å¶éãªããå®å
¨ã«æ¬æ ¼çãªçä¼¼ä½é¨ããããã¨ã§å¦ç¿å¹æãæå¤§åãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["æéãå ´æã®å¶éãªãã誰ã§ãæ¬æ ¼çãªä½é¨å¦ç¿ãå¯è½","è¨èã§ã¯ä¼ããã«ãããæ¬è³ªçãªä¾¡å¤ããç´æçã«ä¼ãã","社ä¼èª²é¡ã®è§£æ±ºã«ç¹ãããçµç¹ã®ä¿¡é ¼ã大ããé«ãã"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/xr-solutions/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/xr-solutions/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},G7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"holoshare"});e(o.contents);const c=await Xe(4,void 0,{categoryId:"ã¡ã¿ãã¼ã¹éçºå®ç¸¾"});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"XR & AI SOLUTIONS",titleJa:"holoshare"}),n.jsx(jn,{image:"/assets/services/holoshare/hero-thumbnail.png",title:"ãã¤ã§ããã©ãã§ããç®ã®åã«å®ç©å¤§ã®è£½åããæ«é²ç®ããä½é¨åå¶æ¥VRãµã¼ãã¹ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ãä½é¨ããåè«ã®æç´çãå¤ãããVRã§ãããã製åãç®ã®åã«ã",n.jsx("br",{className:"hidden md:block"}),"製åããã£ã¨æè»½ã«ããã£ã¨é
åçã«ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"è¨èãåç»ã§ã¯ä¼ããããªã製åã®ããµã¤ãºæãããå
鍿§é ããã顧客ã®ç®ã®åã¸ãåè«ã®ããããç¡é§ãåãè½ã¨ãã顧客ã®ã欲ãããããã®å ´ã§å¼ãåºããBtoBã»ã¼ã«ã¹ã«ç¹åãããã¼ãã£ã«ã³ãã¥ãã±ã¼ã·ã§ã³ãã©ãããã©ã¼ã ã§ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"ããã¤ã¹ãæã¡éã¹ã°ããã¤ã§ããã©ãã§ããç®ã®åã«å®ç©å¤§ã®è£½åããæ«é²ç®ãããã¨ã§ãè³¼å
¥åã®ä¸å®è§£æ¶ã»è³¼è²·ææ¬²ã®åä¸ããçãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ã©ãã§ããã¢å¯è½",icon:"/assets/services/holoshare/icon-demo.png",desc:"ã©ãã«ãã¦ãåã製åä½é¨ãåºå¼µè²»0ã«ããåè«æ©ä¼ãæå¤§åã"},{title:"ã«ã¹ã¿ãã¤ãºææ¡",icon:"/assets/services/holoshare/icon-customize.png",desc:"è¦æã«ãVR空éã§å³åº§ã«å¯¾å¿ã宿ã¤ã¡ã¼ã¸ããã®å ´ã§ç¢ºèªã"},{title:"æ¢åãã¼ã¿ã®æ´»ç¨",icon:"/assets/services/holoshare/icon-data.png",desc:"æ¢ã«æã£ã¦ãããã¼ã¿ãããã®ã¾ã¾VRåãæ¨ªå±éãå¯è½ã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain",onError:c=>c.currentTarget.style.display="none"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span
374",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"VRã§ããªã¢ã«ãã®æ²¡å
¥æã¨èª¬å¾åãåç¾ããã³ã¹ã忏ã¨å¶æ¥å¹çåä¸ãå®ç¾ãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["å®ç©ãè¦ãããã¨ã§ãæå¾
å¤ãããªãã","è©¦ä½æ©è¼¸éããµã³ãã«å±ç¤ºã®å¶æ¥ã³ã¹ããä¸ããå¶æ¥å¹çãé«ãã","製åã®é
åããä½é¨ãã«å¤ãããã¨ã§èª¬å¾åãä¸ããæç´çãåä¸"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/holoshare/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/holoshare/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},q7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"HERO AIVO"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["AI / éçº å®ç¸¾","HERO AIVO"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"XR & AI SOLUTIONS",titleJa:"HERO AIVO"}),n.jsx(jn,{image:"/assets/services/hero-aivo/hero-thumbnail.png",title:"ããªãã®ä¼ç¤¾ã®æ
å ±ãAIã«æ£ããèªèãã¦ãããããããããã¦ãããWebå¶ä½ãµã¼ãã¹ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["æ¤ç´¢ã®ä¸»å½¹ãã人ããããAIãã¸å¤ããä»ãããªãã®ãµã¤ãã¯æ£ããèªã¿",n.jsx("br",{className:"hidden md:block"}),"åããã¦ãã¾ããï¼"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"ChatGPTãPerplexityãªã©ã®AIæ¤ç´¢ãæ®åããä¸ã徿¥ã®SEOï¼æ¤ç´¢ã¨ã³ã¸ã³æé©åï¼ã ãã§ã¯ä¸ååã§ããAIã«æ£ããæ
å ±ãæ¸¡ããLLMOï¼å¤§è¦æ¨¡è¨èªã¢ãã«æé©åï¼ãã®éè¦æ§ã解説ãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"AI診æãããWebå¶ä½ã«é¢ããä¼ç»ããéç¨ã¾ã§ã¯ã³ã¹ãããã§ãæä¾ããã©ã³ãã£ã³ã°ã¤ã¡ã¼ã¸ãæãªãããä¸è²«ãããã©ã³ãä½é¨ããå±ããã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"AIã«é©ããæ§é ",icon:"/assets/services/hero-aivo/icon-stru
374cture.png",desc:"AIã«å¼ç¨ãã¦ããããããããã«Webãµã¤ãæ§ç¯ãè¡ãã¾ãã"},{title:"誤æ
å ±ã鲿¢",icon:"/assets/services/hero-aivo/icon-prevention.png",desc:"å
¬å¼æ
å ±ãAIã«ç´æ¥ç´ä»ãããAIã®åããé²ãã¾ãã"},{title:"AI診æ",icon:"/assets/services/hero-aivo/icon-diagnostic.png",desc:"ç¾ç¶ã®ãµã¤ãç¶æ³ãAIã«è¦ã¤ãã¦ãããããããã診æãã¾ãã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain",onError:c=>c.currentTarget.style.display="none"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"AIã«å¼ç¨ãã¦ããããããæ
å ±ãèç©ãããã¨ã§ãåºåè²»ããããã«ãé客ãå¢ããã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["AIæ¤ç´¢ã¨ã³ã¸ã³ã§ã®å¼ç¨çåä¸","AIæ¤ç´¢ã¨ã³ã¸ã³çµç±ã®æµå
¥ã»èªç¥åº¦ãç²å¾","æ£ç¢ºãªæ
å ±çºä¿¡ã«ãããã©ã³ã価å¤ã®æ
ä¿"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-aivo/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-aivo/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},K7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"AI人æè²æç ä¿®"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["AI / éçº å®ç¸¾","AI人æè²æç ä¿®"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"XR & AI SOLUTIONS",titleJa:"AI 人æè²æç ä¿®"}),n.jsx(jn,{image:"/assets/services/ai-training/hero-thumbnail.png",title:"å®åã«å³ããã徿¥å¡ã®DXã¹ãã«ã身ã«ã¤ãããã¨ãã§ããç ä¿®ãµã¼ãã¹ã",websiteUrl:"/services/ai-training/reskilling/"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ãAIã使ãããããå
¨ç¤¾å¡ã®å½ããåã«ã",n.jsx("br",{className:"hidden md:block"}),"å®åã«ç´çµããæèæ³ãæ´»ç¨æ³ãç¿å¾ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"åãªããã¼ã«ã®ä½¿ãæ¹ã®ç¿å¾ã§ã¯ãªããèªç¤¾ã®èª²é¡ãAIã§ã©ã解決ãããã¨ãããAIãªãã©ã·ã¼ããåºä¸ããã¾ããç¶ç¶çãã¤ãã¹ãã¼ãæãã£ã¦ãææ°ãã¬ã³ããåãè¾¼ãã å®è·µçãªã«ãªãã¥ã©ã ãæä¾ãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"顧客ã®ãã¼ãºã«åããã¦ãã³ã³ãµã«ãã£ã³ã°ããç ä¿®ã¾ã§ãå®åã«å³ããAI人æã®è²æã«ãªãã¥ã©ã ãè¨è¨ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"æè»ãªã«ãªãã¥ã©ã ",icon:"/assets/services/ai-training/icon-curriculum.png",desc:"äºå/å¶æ¥/ä¼ç»ãªã©ãè·ç¨®å¥ã®å
·ä½çãªç ä¿®ã«ãªãã¥ã©ã ã®è¨è¨ã"},{title:"ãã³ãºãªã³å½¢å¼",icon:"/assets/services/ai-training/icon-handson.png",desc:"座å¦ã§çµãããããã®å ´ã§ãã¼ã«ãåããã¯ã¼ã¯ã·ã§ããæ§æã"},{title:"æé©ãªãã¼ã«é¸å®",icon:"/assets/services/ai-training/icon-tools.png",desc:"顧客ã®ç®çã«åãããæé©ãªçæAIãã¼ã«ã®é¸å®ã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain",onError:c=>c.currentTarget.style.display="none"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"AIãå½ããåã«ä½¿ãããªããæ¥åã®è³ªãåä¸ããããã¨ã§ãçµç¹å
¨ä½ã®ç«¶äºåãé«ãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["å
¨ç¤¾çãªæ¥åå¹çåã«ããæ®æ¥æéã®åæ¸ã¨çç£æ§åä¸","AIã使ãããªãã社å¡ä¸äººã²ã¨ããåµé çã»æ¦ç¥çãªä»äºã«éä¸","å¤é¨ã«é ¼ããèªç¤¾å
ã§AIæ½çãä¼ç»ã»éç¨ã§ããå
製åã®å®ç¾"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)
374]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/ai-training/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/ai-training/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},X7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"é²ç½ã¡ã¿ãã¼ã¹"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["é²ç½ã¡ã¿ãã¼ã¹","äºæ¥é å [ é²ç½ ]"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"SOCIAL & EDUCATION",titleJa:"é²ç½ã¡ã¿ãã¼ã¹"}),n.jsx(jn,{image:"/assets/services/bousai-metaverse/hero-thumbnail.png",title:"ç½å®³æã®é¿é£ãåãããä»®æ³ç©ºéä¸ã§ä½é¨ããªããå¦ã¹ãé²ç½æè²ã»è¨ç·´ãµã¼ãã¹ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ãããããã®
374åããããã¾ãä½é¨ãããæ¥å¸¸ã«æ½ãç½å®³ãªã¹ã¯ãããã¨ã",n.jsx("br",{className:"hidden md:block"}),"ãã¨ãã«åããæ²¡å
¥åé²ç½è¨ç·´ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"徿¥ã®é¿é£è¨ç·´ã§ã¯åç¾ã§ããªãã£ãç«ç½ã®ç
ãæµ¸æ°´ã®ææãããã¼ãã£ã«ç©ºéã§å®å
¨ã«ããã¤ãªã¢ã«ã«ä½é¨ãé«ã没å
¥æã«ããã屿©æèããèªåäºåããããæ¬¡ä¸ä»£ã®é²ç½æè²ãã©ãããã©ã¼ã ã§ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"ããããã®å°åããå½ã®å®æ
ã«åãã¦ã«ã¹ã¿ãã¤ãºå¯è½ã§ãç½å®³ãå®å
¨ã«ã·ãã¥ã¬ã¼ã·ã§ã³ãããã¨ãã§ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ç½å®³ã·ãã¥ã¬ã¼ã·ã§ã³",icon:"/assets/services/bousai-metaverse/icon-simulation.png",desc:"ãªã¢ã«ãªçãæ°´ã®æåã«ãããé¿é£ã®é£ããã使ã"},{title:"ãã«ããã¬ã¤è¨ç·´",icon:"/assets/services/bousai-metaverse/icon-multiplay.png",desc:"è¤æ°äººã§åæãã°ã¤ã³ããååãã¦é¿é£ãã飿ºè¨ç·´ãå¯è½ã"},{title:"å ´æãé¸ã°ãªã宿½",icon:"/assets/services/bousai-metaverse/icon-anywhere.png",desc:"åºãã¹ãã¼ã¹ã¯ä¸è¦ãããã¤ã¹ã²ã¨ã¤ã§ãã©ãã§ãè¨ç·´ä¼å ´ã«ã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"誰ãåãæ®ããªããæ¥½ããå®è·µçãªé²ç½è¨ç·´ãæä¾ãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["徿¥ã®è¨ç·´ã§ã¯å¾ãããªãã£ããé«ãç·å¼µæã¨å®è·µçãªå¤æåã®ç¿å¾","è¨ç·´çµæã®ãã¼ã¿åã«ãããé²ç½æèã®èª²é¡ã客観çã«åæ","åä¾ãã大人ã¾ã§ãã²ã¼ã æè¦ã§èªçºçã«å¦ã¹ãé²ç½æèã®åä¸"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)
374]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/bousai-metaverse/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/bousai-metaverse/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},Y7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"é²ç½ä¸å / ãã©ãé²ç½ä¸å"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["ã¤ãã³ãå®ç¸¾","é²ç½ä¸å / ãã©ãé²ç½ä¸å"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"SOCIAL & EDUCATION",titleJa:"é²ç½ä¸å/ãã©ãé²ç½ä¸å"}),n.jsx(jn,{image:"/assets/services/bousai-expo/hero-thumbnail.png",title:"ã¡ã¿ãã¼ã¹ãAIãªã©ãæ´»ç¨ããæ°ããé²ç½æè²ã®ã¢ã¤ãã¢ãåãçµã¿ãçºè¡¨ã»ä½é¨",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["é²ç½ããèªåãã¨ãã«ããã¯ããã¸ã¼ã§æ¬¡ä¸ä»£ã¨åµããæ°ããä½é¨åã¤ã",n.jsx("br",{className:"hidden md:block"}),"ã³ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"ãé²ç½è¨ç·´ããã³ããªåãã¦ããããè¥ãä¸ä»£ãåå ããªããã¨ãã£ã課é¡ã¯ããã¾ãããï¼ææ°ã®æè¡ãã¢ã¤ãã¢çºè¡¨ä¼ãéããåã©ããã大人ã¾ã§ä¸»å½¹ã¨ãªã£ã¦æ¥½ããå¦ã¶å ´ãæä¾ãå°åå
¨ä½ã®æèãé«ããæªæ¥ãæ
ããªã¼ãã¼ãè²ã¿ã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"å¦çã®ã¢ã¤ãã¢çºè¡¨ãã²ã¼ã ä½é¨ãéããå¤ä¸ä»£ãååãã¦å¦ã¶ã¤ãã³ãã§ããæ¥½ãã¿ãªããç¥èãå¾ããã¨ã§ãå°åå
¨ä½ã®é²ç½æèãåºä¸ããã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"åã©ãã主役ã®çºè¡¨ä¼",icon:"/assets/services/bousai-expo/icon-kids.png",desc:"è¥è
ãèªç±ãªçºæ³ã§é²ç½æ¡ãä¼ããèªãçºä¿¡ããåãè²ã¦ã¾ãã"},{title:"éã³ãå¦ã³ã«å¤ãã",icon:"/assets/services/bousai-expo/icon-play.png",desc:"人æ°ã²ã¼ã 空éã使ããç½å®³æã®è¡åãæ¥½ãã¿ãªããç¿å¾ã"},{title:"ä¸ä»£ãè¶
ããå
±åµã®å ´",icon:"/assets/services/bousai-expo/icon-co-creation.png",desc:"å¦çãå°éå®¶ãå°åãä¸ä½ã¨ãªããå
±ã«é²ç½ã®æªæ¥ãèããå ´ã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"è¥è
ã®åå ãä¿ããèªãè¡åã§ããæ¬¡ä¸ä»£ã®ãªã¼ãã¼ã¨å°åä¸ä¸¸ã®ååä½å¶ãè²ã¿ã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["è¥å¹´å±¤ã®é²ç½æèãé«ããå°åã®æ¬¡ä¸ä»£ãªã¼ãã¼ãè²æ","èªæ²»ä½ã伿¥ã妿 ¡ã飿ºãããæ°ããé²ç½ã¢ãã«ãæ§ç¯","ä¸åçã
374§ã®å®ç¸¾ãæ´»ãããæ³¨ç®åº¦ã®é«ã社ä¼è²¢ç®æ´»åãå¯è½"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/bousai-expo/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/bousai-expo/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},J7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"Hero Egg"});e(o.contents);const c=await Xe(4,void 0,{categoryId:"Hero Egg å®ç¸¾"});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"SOCIAL & EDUCATION",titleJa:"Hero Egg COLLECTION"}),n.jsx(jn,{image:"/assets/services/hero-egg-collection/hero-thumbnail.png",title:"åã©ããã¡ã®ææ¦ãæ¯æ´ããæªæ¥ã®å¦ã³ã¨äº¤æµã®å ´ãçãã³ãã¥ããã£ã¼çºè¡¨ã¤ãã³ãã",websiteUrl:"#"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ãã©ããã¡ã®ãçºæ³ãããã¸ãã¹ã«ãã¢ã¤ãã¢ãå½¢ã«ããã¯ãªã¨ã¤ãã£ã",n.jsx("br",{className:"hidden md:block"}),"å
¬åã¤ãã³ãã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"åä¾ãã¡ã®èªç±ã§å¤§èãªã¢ã¤ãã¢ãã大人ããé¢ç½ãï¼ãã§çµããããã«ãã¸ãã¹ã®ç¨®ã¨ãã¦æ¡æã社ä¼ã«å®è£
ããããã»ã¹ãä½é¨ããããã¨ã§ã次ä¸ä»£ã®èµ·æ¥å®¶ç²¾ç¥ï¼ã¢ã³ãã¬ãã¬ãã¼ã·ããï¼ãè²ã¿ã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"åã©ããã¡ã®ã¢ã¤ãã¢ã大人ã¨å
±ã«ããã¸ãã¹ã«å¤ããå½¢ã«ããç°å¢ãæãã¦ããã¾ããå¹´é½¢ãã¹ãã«ã«é¢ä¿ãªãã誰ããæ¬¡ä¸ä»£ã®ãã¼ãã¼ã«ãªããå¯è½æ§ãçºæãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ã¢ã¤ãã¢ã®æ´ç·´",icon:"/assets/services/hero-egg-collection/icon-refinement.png",desc:"ããã®ã¯ãªã¨ã¤ã¿ã¼ãèµ·æ¥å®¶ããã¢ã¤ãã¢ãå½¢ã«ãããµãã¼ãã"},{title:"ããã大ä¼",icon:"/assets/services/hero-egg-collection/icon-pitch.png",desc:"èªåã®èãã大人ãã¡ã«ææ¡ããè©ä¾¡ãã¦ãããå ´ãæä¾ã"},{title:"社ä¼å®è£
ã¸ã®éç",icon:"/assets/services/hero-egg-collection/icon-implementation.png",desc:"åªããã¢ã¤ãã¢ã¯ããã¼ããã¼ä¼æ¥ã¨å
±ã«åååãæ¤è¨ã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"å¤ä¸ä»£ã¨ã®äº¤æµãéãã¦ãèªç±ãªçºæ³ãå½¢ã«ãããå®è·µçãªãã¸ãã¹æ©ä¼ãå¾ããã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["ãèªåã®èãã社ä¼ãå¤ãããã¨ããå§åçãªæåä½é¨ã¨èªå·±è¯å®æ","æ¢åã®æ ã«ã¨ããããªã
374ã伿¥å´ã«ã¨ã£ã¦ã®ã¤ããã¼ã·ã§ã³ã®ãã³ã","è«ççæèããã¬ã¼ã³åã課é¡è§£æ±ºåãå®è·µãéãã¦èº«ã«ã¤ã"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-egg-collection/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-egg-collection/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"Discordåå "}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},Q7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"ã¤ãã³ãå®ç¸¾"});e(o.contents);const c=await Xe(4,void 0,{categoryId:"ã¤ãã³ãå®ç¸¾"});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"COMMUNITY&CO-CREATION",titleJa:"HERO EXPO"}),n.jsx(jn,{image:"/assets/services/hero-expo/hero-thumbnail.png",title:"å°åã¨ãã¯ããã¸ã¼ãã¤ãªããã¡ã¿ãã¼ã¹ã»XRã»AIãªã©ã®æè¡ãä½é¨ã»çºè¡¨ããã¸ã§ã¯ãã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["æªæ¥ãåµããã¼ãã¼ãã¡ãéçµã",n.jsx("br",{}),"ææ°ãã¯ããã¸ã¼ã¨æ
ç±ã®å±ç¤ºä¼ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"XRãAIãå
±åµã»ã³ãã¥ããã£ãå°æ¹åµçãããããã®æ¥æ¬ãã¢ãããã¼ãããæè¡ãããã¸ã§ã¯ããä¸å ã«ä¼ããã·ã§ã¼ã±ã¼ã¹ãåãªãå±ç¤ºã§ã¯ãªããæ°ããã³ã©ãã¬ã¼ã·ã§ã³ããã®å ´ã§çã¾ããç±çã®å ´ã§ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"èªæ²»ä½ã伿¥ãåã©ããã¡ãä¸ä½ã¨ãªã£ã¦ãã¯ããã¸ã¼ã®ç¤¾ä¼å®è£
ã®å¯è½æ§ãæ¢æ±ã»çºè¡¨ããå ´ãæä¾ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ãªã¼ã«ã¹ã¿ã¼å±ç¤º",icon:"/assets/services/hero-expo/icon-allstar.png",desc:"èªç¤¾ãµã¼ãã¹ã ãã§ãªãããã¼ããã¼ä¼æ¥ãç¶²ç¾
ããç·åEXPO"},{title:"ã©ã¤ããã¢",icon:"/assets/services/hero-expo/icon-demo.png",desc:"VRããããã£ã¯ã¹ãªã©ãå®éã«è§¦ãã¦ä½é¨ã§ãããã¼ã¹ãä¸å¿"},{title:"ãããã³ã°ã¨ãªã¢",icon:"/assets/services/hero-expo/icon-matching.png",desc:"æè³å®¶ãèªæ²»ä½ã伿¥æ
å½è
ãç´æ¥å¯¾è©±ã§ãããããã¯ã¼ãã³ã°"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"å°åã¨ãã¯ããã¸ã¼ã®èåã«ããæªæ¥ç¤¾ä¼ã®åµåºãXRã»ã¡ã¿ãã¼ã¹åéã®çºå±ãç®æãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["ææ°ãã¯ããã¸ã¼ã®ãã¬ã³ãã䏿°éè²«ã§ææ¡ã§ãã","ç°æ¥ç¨®ã¨ã®åºä¼ããããæ°ãããã¸ãã¹ãã£ã³ã¹ãå
±åµã®ãã£ãããåµåº","伿¥ã®ãã¸ã§ã³ãæè¡åããä½é¨ãéãã¦æ·±ãçè§£"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)
374]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-expo/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-expo/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},Z7=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"GLOBAL HERO SUMMIT"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["ã¤ãã³ãå®ç¸¾","GLOBAL HERO SUMMIT"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"COMMUNITY & CO-CREATION",titleJa:"THE HERO SUMMIT"}),n.jsx(jn,{image:"/assets/services/global-hero-summit/hero-thumbnail.png",title:"æç¶å¯è½ãªã¦ã§ã«ãã¼ã¤ã³ã°ç¤¾ä¼ãç®æãããä¸çä¸ã®ææ¦ãæ¨é²ããæªæ¥å
±åµãµãããã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["å½å¢ããæ¥ç¨®ãè¶
ãã¦ã",n.jsx("br",{}),"å
±åµã§ä¸çãå¤ãããµãããã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"社ä¼èª²é¡ã®è§£æ±ºãå¿ããªã¼ãã¼ãã¯ãªã¨ã¤ã¿ã¼ã伿¥ãä¸å ã«ä¼ããå½
374éã«ã³ãã¡ã¬ã³ã¹ãææ°äºä¾ã®å
±æã«ã¨ã©ã¾ãããæ°ãããå
±åµããã¸ã§ã¯ããããã®å ´ã§çºè¶³ããããã¨ãç®çã¨ããè¶
å®è·µåä¼è°ã§ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"åä¾ãã¡ãä¸å¿ã¨ãªãã人é¡ã®ã価å¤ãã証æããæ´å²çãªèå°ãç®æããæ¬¡ä¸ä»£ã®ãªã¼ãã¼ï¼HEROï¼ãAIãå¹³åãæè²ãªã©ã®åéã§æªæ¥ãåµãå
±åµã®å ´ãæä¾ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ä¸çåºæºã®è°è«",icon:"/assets/services/global-hero-summit/icon-discussion.png",desc:"æèè
ãç»å£ããXRãAIããµã¹ããããªãã£ã®æåç·ãè°è«ã"},{title:"å
±åµã»ãã·ã§ã³",icon:"/assets/services/global-hero-summit/icon-session.png",desc:"åå è
ãè°è«ã«å ããã解決çãå
±ã«èããåç§ä¼å½¢å¼ã"},{title:"ããã¸ã§ã¯ãçºæ",icon:"/assets/services/global-hero-summit/icon-project.png",desc:"çã¾ããã¢ã¤ãã¢ã«å¯¾ããè³éãæè¡æ¯æ´ãè¡ãä»çµã¿ãå®åã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"夿§ãªæèè
ãåã©ããã¡ã交æµããæç¶å¯è½ãªç¤¾ä¼ã¸ã®å
·ä½çãªã¢ã¯ã·ã§ã³ãå
±åµãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["ã°ãã¼ãã«ãªææ°ç¥è¦ã¨ãå³åº§ã«æ´»ç¨ã§ãã人çãããã¯ã¼ã¯ã®æ§ç¯","èªç¤¾ã ãã§ã¯è§£æ±ºã§ããªã課é¡ã®ç°æ¥ç¨®é£æºã«ããçªç ´å£ã®çºè¦","社ä¼èª²é¡è§£æ±ºã®ãªã¼ãã¼ã¨ãã¦ã®ãå½éçãªãã¬ã¼ã³ã¹ã®åä¸"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/global-hero-summit/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/global-hero-summit/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},ez=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"EGG JAM"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["Hero Egg å®ç¸¾","EGG JAM"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"COMMUNITY & CO-CREATION",titleJa:"EGG JAM"}),n.jsx(jn,{image:"/assets/services/egg-jam/hero-thumbnail.png",title:"åã©ããã¡ãã¡ã¿ãã¼ã¹ãAIæè¡ãæ´»ç¨ããã社ä¼èª²é¡è§£æ±ºã«æããªã³ã©ã¤ã³ã³ãã¥ããã£",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ææ¦ããå¤ç¬ãã«ãããªãã",n.jsx("br",{}),"å¿ã§ã¤ãªããå
±åµåãªã³ã©ã¤ã³ã³ãã¥ããã£ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"æ°ãããã¨ã«ææ¦ãã人ãä½ããåµãåºããã人ãéã¾ããªã³ã©ã¤ã³ï¼ãªãã©ã¤ã³ã®ã³ãã¥ããã£ãäºãã®ã¢ã¤ãã¢ãå¦å®ãããç§°ãåããé«ãåããå¿ççå®å
¨æ§ã®é«ãå ´ããæä¾ãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"ææ°ãã¯ããã¸ã¼ã«ç¹åãããåãªãæå®¤ã§ã¯ãªããåå è
å
¨å¡ãå
çã»çå¾ã¨ãªããå¦ã³ã¨åµé ãå
±æãããã©ãããªé¢ä¿æ§ãéè¦ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ãã¼ãã¢ãã",icon:"/assets/services/egg-jam/icon-meetup.png",desc:"宿çãªäº¤æµä¼ãéãã¦ã鲿ã®å ±åãã¡ã³ãã¼ã®åéãå¯è½ã"},{title:"ã¡ã³ã¿ãªã³ã°æ¯æ´",icon:"/assets/services/egg-jam/icon-mentoring.png",desc:"ååéã®å°éå®¶ãåå ããæè¡ãçµå¶ã®ç¸è«ã«ã¢ããã¤ã¹ã"},{title:"ãªã½ã¼ã¹ã·ã§ã¢",icon:"/assets/services/egg-jam/icon-resource.png",desc:"ç¥èãå¶ä½ãã¦ãã¦ãã¡ã³ãã¼éã§å
±æããéçºã³ã¹ãã使¸ã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã
374§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"èªæ²»ä½ã伿¥ã¨ã®å°æ¹åµçã»DXããã¸ã§ã¯ããéãã¦æ°ããªåçã¨ãã£ãªã¢ãåµåºãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["å¿ãåãããã仲éã¨åºä¼ããæ«æããã«ææ¦ãç¶ããããç°å¢","å
¬åãéãããããã¸ã§ã¯ãç«ã¡ä¸ãå´ã¨ãã¦ã®æ´»åã®æ©ä¼","ã¯ãã¼ãºããªå ´ãªãã§ã¯ã®ã鮮度ã®é«ãæ
å ±ã¨ãã¦ãã¦ã®å
±æ"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/egg-jam/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/egg-jam/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},tz=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"AI MONDAY"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["AI / éçº å®ç¸¾","AI MONDAY"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"COMMUNITY & CO-CREATION",titleJa:"AI MONDAY"}),n.jsx(jn,{image:"/assets/services/ai-monday/hero-thumbnail.png",title:"ææ°AIæè¡ãæ¯é±æææ¥ã«å®è·µçã«å¦ã³ãæ¥å¸¸ã®æ¦å¨ã«å¤ããããã®ã³ãã¥ããã£ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["æææ¥ããAIããããã¾ãã®æªæ¥ãèããæ¥ã«ãAIã®ææ°æ
å ±ãã¢ããã",n.jsx("br",{className:"hidden md:block"}),"ã¼ãããã³ãã¥ããã£ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"é±ã®å§ã¾ãã®æææ¥ã«ãæéã§AIã®ãã¬ã³ãããã£ããã¢ããã
374å°éå®¶ããåå¿è
ã¾ã§ãéã¾ãããä»é±ã¯ä½ãã§ããããã«ãªã£ããããã¦ã§ããã¼ã»ã»ããã¼ãéãã¦ãã«ã¸ã¥ã¢ã«ã«è°è«ããå¦ã³åãAIç¹ååã®ã³ãã¥ããã£ã§ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"æ¯é±æææ¥ãç
374¡æã§åå ã§ãããçæAIã®å®è·µçãªãã¦ãã¦ãææ°æ
å ±ããç°æ¥ç¨®ã»å¤ä¸ä»£ã®åå è
ã¨å
±ã«å¦ã¶ã³ãã¥ããã£ã¤ãã³ãã§ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ãã¥ã¼ã¹è§£èª¬",icon:"/assets/services/ai-monday/icon-news.png",desc:"åé±ã®AIé¢é£ã®ã¢ãããã¼ãããå°éå®¶ãåããããã解説ã"},{title:"äºä¾ã·ã§ã¢",icon:"/assets/services/ai-monday/icon-share.png",desc:"åå è
ã®AIææç©ããå½¹ç«ã¤ããã³ãããå
¬éãåãæåã"},{title:"ãããã¯ã¼ãã³ã°",icon:"/assets/services/ai-monday/icon-networking.png",desc:"ã¨ã³ã¸ãã¢ã¨ãã¸ãã¹ãµã¤ãã§ãAIãã¸ãã¹ã®ç¨®ãè¦ã¤ãã交æµã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"çæAIãå®è·µçã«å¦ã³ãæ¥å¸¸ã®æ¥åã«å¿ç¨ãããã¨ã§ãAIã¹ãã«ãåä¸ããã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["è¨å¤§ãªAIæ
å ±ã®æ³¢ã«é£²ã¾ãããå¿
è¦ãªæ
å ±ã ããå¹ççã«ç¿å¾","ç°æ¥ç¨®ã®AIæ´»ç¨äºä¾ãç¥ããèªç¤¾ãã¸ãã¹ã¸ã®å¿ç¨ã¢ã¤ãã¢ãæ¹§ã","æ°è»½ã«è³ªåã§ããå ´ããããã¨ã§ãå人ã®AIæ´»ç¨ã¹ãã«ãèªç¶ã¨åä¸"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/ai-monday/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/ai-monday/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},sz=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"ã²ã¼ã à ã¤ãã³ã"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["ã¤ãã³ãå®ç¸¾","ã²ã¼ã à ã¤ãã³ã"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"COMMUNITY & CO-CREATION",titleJa:"ã²ã¼ã à ã¤ãã³ã"}),n.jsx(jn,{image:"/assets/services/game-event/hero-thumbnail.png",title:"éçºããã²ã¼ã ãæ´»ç¨ããããªã³ã©ã¤ã³ã»ãªãã©ã¤ã³ã¤ãã³ããéå¬ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["è¥è
ã夢ä¸ã«ãªããéã³ããã社ä¼ãåããåã¸ã",n.jsx("br",{className:"hidden md:block"}),"ã²ã¼ã ã®æ¥½ããã¨ãªã¢ã«ã®ç±çã®èåã§æ°ããæåãå±ãã¾ãã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"ãè¥è
ã«æ
å ±ãå±ããªãããã¤ãã³ããä¸éæ§ã§çµãããã¨ããæ©ã¿ã¯ããã¾ãããï¼ç§ãã¡ã¯ãä¸çä¸ã§äººæ°ã®ã²ã¼ã 空éãæ´»ç¨ããæããåå ããããªãä½é¨ãè¨è¨ãä¼ç»ããéå¶ã¾ã§ä¸è²«ãã¦ãµãã¼ãããè¨æ¶ã«æ®ããã¡ã³ä½ããå®ç¾ãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"æ°å人ãéã¶äººæ°ã²ã¼ã ãæ´»ç¨ããä¼ç»ããéç¨ã¾ã§ä¸ç¤¾ã§å®çµãã¾ããéã³ã®è¦ç´ ãåãå
¥ããæ¥½ããä½é¨ãéãã¦ãåå è
ã®è¨æ¶ã«æ®ãã¤ãã³ããå®ç¾ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ã¯ã³ã¹ãããä½å¶",icon:"/assets/services/game-event/icon-onestop.png",desc:"ã³ã³ãã³ãã®ä¼ç»ã»å¶ä½ã»éå¶ã¾ã§1社ã§å
¨ã¦å®çµãã¾ãã"},{title:"è¥å¹´å±¤ã¸ã¢ããã¼ã",icon:"/assets/services/game-event/icon-youth.png",desc:"æ°å人ãéã¶äººæ°ã²ã¼ã ãèå°ã«ãå¤ãã®è¥è
ã¸å±ãã¾ãã"},{title:"ã¤ãã³ãã¨é£å",icon:"/assets/services/game-event/icon-link.png",desc:"ã²ã¼ã å
ã®ä½é¨ãã¤ãã³ãã¨ç¹ããç¶ç¶çãªãã¡ã³ãä½ãã¾ãã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"è¥å¹´å±¤ã«èªç¶ã«ã¢ãã¼ã«ã§ããæ¥½ãã¿ãªãã社ä¼ãå°åã®èª²é¡ã解決ã¸ã¨å°ãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["å°æ¥ã®é¡§å®¢ã¨ãªãè¥å¹´å±¤ã¸ãèªç¶ãªå½¢ã§ãã©ã³ãä½é¨ãæä¾","ãè¦ããã ãã§ãªããä½é¨ããããã¨ã§ãæ·±ãæãåºã«","楽ãã¿ãªããã社ä¼ã¸ã®è²¢ç®ãå°åã®é
åãåºãçºä¿¡"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded
374-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/game-event/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/game-event/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},nz=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["äºæ¥é å [ æè² ]","ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"SOCIAL & EDUCATION",titleJa:"ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã"}),n.jsx(jn,{image:"/assets/services/game-making-camp/hero-thumbnail.png",title:"鿥叏ç°å¢ã§ãããã®è¬å¸«ã¨å
±ã«ãã¼ã ã§ã²ã¼ã ãã¤ããã²ã¼ã ã¯ãªã¨ã¤ã¿ã¼ä½é¨ä¼ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["éã¶å´ãããåµãå´ã¸ã",n.jsx("br",{}),"ããã®å¶ä½ããã¼ãä½é¨ããã¯ã¼ã¯ã·ã§ããã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"ã²ã¼ã ã大好ãããã®æ
ç±ããã¯ãªã¨ã¤ãã£ãã®åãã«å¤ãããã£ã³ãã§ããããã®ç¾å ´ã§ä½¿ããããã¼ã«ã使ããèªåã ãã®ã²ã¼ã ãè¨è¨ã»å¶ä½ããããã»ã¹ãéãã¦ãè«ççæèã¨åµé æ§ãé¤ãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"åºå¼µåã®çæéä¸ããã°ã©ã ãéãã¦ã人æè²æãDXæè²ã®åä½é¨ãä¿é²ããã¯ãªã¨ã¤ãã£ããªç¥èãæè¡ãå¦ã¶ãã¨ãã§ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"ããç´ä¼ã®æå°",icon:"/assets/services/game-making-camp/icon-pro.png",desc:"ç¾å½¹ã®ã²ã¼ã ã¯ãªã¨ã¤ã¿ã¼ãã¨ã³ã¸ãã¢ãããµãã¼ãã"},{title:"çæéã§ã®æåä½é¨",icon:"/assets/services/game-making-camp/icon-success.png",desc:"æ°æéã§ãéã¹ãå½¢ãã«ä»ä¸ããéææãè²ãã"},{title:"ãã¼ã ä½å¶",icon:"/assets/services/game-making-camp/icon-team.png",desc:"å½¹å²ããã¼ã å
ã§åæ
ããå調æ§ãè²ãä½å¶ãæ§ç¯ã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"ã²ã¼ã å¶ä½ãéãã¦ãå°éçãªè½åã«å ãã¦ãæ±ç¨æ§ã®é«ããã¸ãã¹ã¹ãã«ãéãããã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["ã宿åãã¨ãããç ä¿®ã®ææãæç¢ºã«è©ä¾¡","ãã¨ã©ã¼ã解決ããæ£è§£ã«ãã©ãçããã¨ãããè«ççæèã®è²æ","å°æ¥ã®è·æ¥é¸æãåºãããå®è·µçãªITãã£ãªã¢ã®æ©æä½é¨"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)
374]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/game-making-camp/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/game-making-camp/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},rz=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"Hero Egg"});e(o.contents);const c=await Xe(4,void 0,{categoryId:["Hero Egg å®ç¸¾","äºæ¥é å [ æè² ]"]});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"TECHNOLOGY & EDUCATION",titleJa:"Hero Egg"}),n.jsx(jn,{image:"/assets/services/hero-egg/hero-thumbnail.png",title:"Society5.0ãSDGsãªã©ã®å½ã®æ¿çã«åºã¥ããåã©ããã大人ã¾ã§å¦ã¹ãDXæè²æ½è¨ã",websiteUrl:"https://heroegg.com"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ãã¹ã¦ã®ãã©ãã«ããã¼ãã¼ãã®åµããæ¬¡ä¸ä»£ã®åã©ããã¡ã®æè½ãè²ã¦",n.jsx("br",{className:"hidden md:block"}),"ãDXæè²ãã©ãããã©ã¼ã ã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"åã©ããã¡ãä¸å¿ã¨ãããAIãã¡ã¿ãã¼ã¹ãªã©ã®ãã¯ããã¸ã¼ãå¦ã¹ããã¤ãã³ãã§çµãããªããåä¾ãã¡ã®ã¯ãªã¨ã¤ãã£ããªææ¦ãæ¥å¸¸çã«æ¯ãã社ä¼ã¨ã¤ãªããããã¨ãã¦æ©è½ãã¾ããDXã®åã§å°åã®æ´»æ§åã¨æ¬¡ä¸ä»£äººæã®è²æãåæã«å®ç¾ãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"å¹´é½¢ãã¹ãã«ã«é¢ä¿ãªãã誰ããæ¬¡ä¸ä»£ã®æè¡ã«è§¦ããæ¥½ãã¿ãªãããåµãåããè²ã¿ãã誰ããæªæ¥ãåµé ããããã¼ãã¼ãã«ãªããå¦ã³ã®å ´ããæä¾ãã¦ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"DXæè²å¾ªç°ã¢ãã«",icon:"/assets/services/hero-egg/icon-cycle.png",desc:"åã©ãã®DXæè²ã«ç¡åã§æä¾ãã社ä¼è²¢ç®ã¢ãã«ã大人åãã®ææã¹ã¯ã¼ã«åçãåã©ãã«éå
ããæç¶å¯è½ãªä»çµã
374¿ã"},{title:"ãã¸ã¿ã«åä½é¨ç°å¢",icon:"/assets/services/hero-egg/icon-experience.png",desc:"10GBã®è¶
é«éåç·ããã¤ã¹ããã¯PCã®ç¡æè²¸åºãå®åãææ°ã®ã¡ã¿ãã¼ã¹ãAIéçºãã¹ãã¬ã¹ãªãå¦ã¹ã¾ãã"},{title:"ç®æ¨ã®å ´ã®æä¾",icon:"/assets/services/hero-egg/icon-goal.png",desc:"å¤§è¦æ¨¡ãªã¢ã¯ã¼ããã³ã³ãã¹ããªã©ã宿éå¬ãå¦ã³ã社ä¼ã«çºè¡¨ããè©ä¾¡ããããã¨ã§èªå·±è¯å®æãé«ãã¾ãã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"åã©ããã大人ã¾ã§ãå¹´é½¢ãã¹ãã«ã«é¢ä¿ãªãææ°ã®AIã»XRã»DXãå¦ã³ãå
±ã«æé·ã§ããç°å¢ãåµåºãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["ç£å®å¦é£æºã«ãããåã©ããã¡ã®èªç±ãªçºæ³ãå°å課é¡è§£æ±ºãæ°ãã¸ãã¹åµåºã¸ç´çµ","ä¸ç»æ ¡ãå¼ããããã®åã©ãã«ãå±
å ´æãã¨ããã¯ããã¸ã¼ã¨ããæ¦å¨ããæä¾ãã社ä¼å¾©å¸°ãæ¯æ´","大人ã®å¦ã³ç´ãï¼ãªã¹ããªã³ã°ï¼ã§ãå°å伿¥ã®DXæ¨é²ã¨ç¤¾ä¼ç責任ï¼CSRï¼ãåæã«éæ"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"SPONSOR PLANS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ã¹ãã³ãµã¼ãã©ã³"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:[n.jsxs("div",{className:"bg-white rounded-2xl shadow-md overflow-hidden",children:[n.jsxs("div",{className:"bg-gradient-to-r from-yellow-400 to-yellow-300 text-center py-8 px-6",children:[n.jsx("p",{className:"text-sm font-bold text-gray-800 tracking-wider mb-1",children:"ååºè 100 社ã¾ã§"}),n.jsx("h4",{className:"text-2xl md:text-3xl font-black text-gray-900 mb-2",children:"HEROãµãã³"}),n.jsx("p",{className:"text-sm font-bold text-gray-700",children:"æ¯æ 39,000 åï¼ç¨å¥ï¼"})]}),n.jsx("div",{className:"p-6 md:p-8 space-y-6",children:[{main:"æä¾ä¼ãæï¼å宿½",sub:"ï¼ä»ã®ä¼æ¥æ§ãæå¾
å¯è½ï¼"},{main:"æ¯é±æææ¥ã«ãªã³ã©ã¤ã³ã§AIã®åå¼·ä¼ã宿½",
374sub:"ï¼æ¯æ4å90åï¼"},{main:"Hero Eggãç¡æè²¸åºå¯è½",sub:"ï¼å ´æã«ãã£ã¦è²¸åºæéã¯ç°ãªãã¾ãï¼"},{main:"伿¥ãã´ã®æ²è¼",sub:"ï¼HP / æ½è¨ï¼"}].map((a,o)=>n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("svg",{className:"w-5 h-5 text-cyan-400 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),n.jsxs("p",{className:"text-sm md:text-base font-bold text-gray-800 leading-relaxed",children:[a.main,a.sub&&n.jsx("span",{className:"font-medium text-gray-500 block text-xs md:text-sm",children:a.sub})]})]},o))})]}),n.jsxs("div",{className:"bg-white rounded-2xl shadow-md overflow-hidden",children:[n.jsxs("div",{className:"bg-gradient-to-r from-amber-400 to-orange-400 text-center py-8 px-6",children:[n.jsx("p",{className:"text-sm font-bold text-white tracking-wider mb-1",children:"1åºèã«ã¤ã1ã¹ãã³ãµã¼ã¾ã§"}),n.jsx("h4",{className:"text-2xl md:text-3xl font-black text-white mb-2",children:"æ½è¨ã¹ãã³ãµã¼"}),n.jsx("p",{className:"text-sm font-bold text-white/90",children:"ãåãåãããã ãã"})]}),n.jsx("div",{className:"p-6 md:p-8 space-y-6",children:[{main:"CSRã¬ãã¼ãã®æåº",sub:"ï¼å¹´1å/Hero Eggã®æ´»åãæ²è¼ï¼"},{main:"HPã»è³æã»ã¹ã¯ãªã¼ã³ã¸ã®ä¼æ¥ãã´æ²è¼",sub:""},{main:"大åã¤ãã³ãã§ã®ä¼æ¥ãã´æ²è¼",sub:""}].map((a,o)=>n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("svg",{className:"w-5 h-5 text-cyan-400 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),n.jsxs("p",{className:"text-sm md:text-base font-bold text-gray-800 leading-relaxed",children:[a.main,a.sub&&n.jsx("span",{className:"font-medium text-gray-500 block text-xs md:text-sm",children:a.sub})]})]},o))})]})]}),n.jsx("div",{className:"text-center mt-12",children:n.jsxs(q,{to:"/contact",className:"inline-flex items-center gap-2 px-10 py-4 bg-gradient-to-r from-cyan-400 to-cyan-500 text-white text-base font-black rounded-full hover:from-cyan-500 hover:to-cyan-600 transition-all shadow-lg hover:shadow-xl hover:-translate-y-0.5",children:["詳細ãåãåããã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]})})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-egg/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/hero-egg/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://heroegg.com",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},iz=()=>{const[r,e]=T.useState([]),[t,s]=T.useState([]);T.useEffect(()=>{(async()=>{try{const o=await Xe(4,void 0,{categoryId:"Meta Heroes Guild"});e(o.contents);const c=await Xe(4,void 0,{categoryId:"ã¡ã¿ãã¼ã¹éçºå®ç¸¾"});s(c.contents)}catch(o){console.error("Failed to fetch data:",o)}})()},[]);const i=a=>{const o=new Date(a);return`${o.getFullYear()}.${o.getMonth()+1}.${o.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"COMMUNITY & CO-CREATION",titleJa:"Meta Heroes Guild"}),n.jsx(jn,{image:"/assets/services/meta-heroes-guild/hero-thumbnail.png",title:"ç ä¿®ãæ°å¹´ä¼ããã¼ãã£ã¼ãªã©ã«å©ç¨ã§ãã貸åã³ãã¥ããã£ã¹ãã¼ã¹ã",websiteUrl:"https://meta-heroes.co.jp"}),n.jsx("section",{className:"bg-gray-50 py-20 md:py-32 mb-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl text-center space-y-10",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsxs("h2",{className:"text-lg md:text-xl lg:text-2xl font-bold leading-relaxed tracking-wider text-gray-900",children:["ææ¦ãã人ãéããçµãæ
374·±ãããå¤å½©ãªäº¤æµãæªæ¥ã®ããã¼ãã¼ããã¡ã®",n.jsx("br",{className:"hidden md:block"}),"æ´»åãçã¿åºãã"]}),n.jsx("div",{className:"w-full h-px bg-gray-200 mt-10"})]}),n.jsx("p",{className:"text-sm md:text-base text-gray-600 leading-[2.2] font-medium max-w-3xl mx-auto text-justify md:text-center tracking-wide",children:"ãã¼ãã£ã¼ãæ°å¹´ä¼ã伿¥ã®ç ä¿®ã¾ã§ã夿§ãªç®çã§æ´»ç¨ã§ããæ¢
ç°ã®ã³ãã¥ããã£ã¹ãã¼ã¹ã§ããHero Eggã®å¦ã³ã®ç²¾ç¥ãå¼ãç¶ãã¤ã¤ãæ¬æ ¼çãªé£²é£ã楽ãã¿ãªããèªãåããå ´ãæä¾ã仲éã¨éããç¹å¥ãªæéããæ°ããææ¦ã¸ã®ã¨ãã«ã®ã¼ãçã¿åºãã¾ãã"})]})}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"KEY FEATURES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãµã¼ãã¹ã®ç¹å¾´"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"貸ãåãã§èªç±ã«ä½¿ãã空éã§ãå
å®ãã飲é£ã¨ã¨ãã«ç ä¿®ãå®´ä¼ãè¡ãã¾ããMeta Heroesã®ç²¾ç¥ã宿ãå ´æã§ãåå è
ã®çµã¨ææ¬²ãæå¤§éã«å¼ãåºãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8",children:[{title:"å¤å½©ãªç¨éã«å¯¾å¿",icon:"/assets/services/meta-heroes-guild/icon-versatile.png",desc:"ãã¼ãã£ã¼ãæ°å¹´ä¼ãç ä¿®ãªã©ãããããã·ã¼ã³ã§æ´»ç¨å¯è½ã§ãã"},{title:"æ¬æ ¼çãªé£²é£ä½é¨",icon:"/assets/services/meta-heroes-guild/icon-dining.png",desc:"æçããé
ãå²ã¿ãªããããªã©ãã¯ã¹ããé°å²æ°ã§äº¤æµã§ãã¾ãã"},{title:"仲éã¨ç¹ããå ´æ",icon:"/assets/services/meta-heroes-guild/icon-community.png",desc:"Meta Heroesã®ãã¸ã§ã³ã«è§¦ããé«ãåã仲éã¨åºä¼ãã¾ãã"}].map((a,o)=>n.jsxs("div",{className:`border border-gray-100 rounded-xl p-4 md:p-8 flex flex-col items-center text-center shadow-sm bg-white h-full ${o===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("div",{className:"w-16 h-16 md:w-24 md:h-24 mb-4 md:mb-8 flex items-center justify-center",children:n.jsx("img",{src:a.icon,alt:a.title,className:"w-full h-full object-contain"})}),n.jsx("h4",{className:"text-sm md:text-lg font-bold text-gray-900 mb-3 md:mb-6",children:a.title}),n.jsx("p",{className:"text-[11px] md:text-sm text-gray-600 leading-relaxed md:leading-[1.8] font-medium text-left w-full tracking-wide",children:a.desc})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"BENEFIT"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æå¾
ã§ãã广"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"ç¾å³ããé£äºã¨èªç±ãªç©ºéã§ãåå è
ãæ¥½ãã¿ãªããèªç¶ã«ç¹ããæé«ã®æéãåµåºãã¾ãã"}),n.jsx("div",{className:"space-y-8",children:["æ¬æ ¼çãªæçã§ãæºè¶³åº¦ã®é«ãã¤ãã³ããéå¬","貸ãåããªãã§ã¯ã®ãèªç±ã§ä¸ä½æã®ãã空é","交æµãéãã¦ãåå è
ä¸äººã²ã¨ãã®ææ¦å¿ãåºæ¿"].map((a,o)=>n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-white border-2 border-cyan-100 flex items-center justify-center text-cyan-500 font-bold text-xl shadow-[0_4px_10px_rgba(34,211,238,0.2)
374]",children:o+1}),n.jsx("p",{className:"text-base md:text-lg font-bold text-gray-800 tracking-wide",children:a})]},o))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"RELATED NEWS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"é¢é£ãã¥ã¼ã¹"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/meta-heroes-guild/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"works",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY & WORKS"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"å°å
¥äºä¾ã»å®ç¸¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:t.length>0?t.map(a=>{var o;return n.jsxs(q,{to:`/news/${a.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((o=a.eyecatch)==null?void 0:o.url)||"/assets/services/meta-heroes-guild/hero-thumbnail.png",alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:a.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:i(a.publishedAt)})]},a.id)}):[1,2,3,4].map(a=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},a))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/works",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"https://meta-heroes.co.jp",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"å
¬å¼ãµã¤ã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})})]}),n.jsxs(q,{to:"/document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},az=()=>n.jsxs("main",{className:"min-h-screen bg-white pb-32",children:[n.jsx(Ge,{titleEn:"MESSAGE FROM THE CEO",titleJa:"代表ã¡ãã»ã¼ã¸"}),n.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[n.jsx("div",{className:"mb-16 shadow-[0_20px_60px_rgba(0,0,0,0.1)] overflow-hidden rounded-sm",children:n.jsx("img",{src:"/assets/ceo-message/ceo_message_hero.png",alt:"代表åç· å½¹ç¤¾é·CEO æ¾ç³ åä¿",className:"w-full h-auto"})}),n.jsxs("div",{className:"mb-20",children:[n.jsxs("h2",{className:"text-2xl md:text-3xl font-black text-gray-800 mb
374-12 leading-tight tracking-tight",children:["100人ã®ãã¼ãã¼ãçã¿åºãã",n.jsx("br",{}),"ããã³ãã¼ã¼ããã¨ãã¦ã®ææ¦ã"]}),n.jsxs("div",{className:"border-t border-gray-100 pt-12",children:[n.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[n.jsx("h3",{className:"text-2xl font-black text-gray-800",children:"æ¾ç³ åä¿"}),n.jsx("p",{className:"text-xs text-gray-400 font-bold tracking-widest uppercase",children:"Kazutoshi Matsuishi"})]}),n.jsx("p",{className:"text-base font-bold text-gray-800 mb-10 tracking-wider",children:"代表åç· å½¹ç¤¾é·CEO"}),n.jsxs("div",{className:"flex gap-4",children:[n.jsx("a",{href:"https://www.facebook.com/kazutoshi.matsuishi/?locale=ja_JP",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-full border border-gray-200 flex items-center justify-center text-gray-400 hover:text-blue-600 hover:border-blue-600 transition-all",children:n.jsx("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:n.jsx("path",{d:"M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z"})})}),n.jsx("a",{href:"https://x.com/kazu_hero100",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-full border border-gray-200 flex items-center justify-center text-gray-400 hover:text-black hover:border-black transition-all",children:n.jsx("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:n.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.045 4.126H5.078z"})})})]})]})]}),n.jsxs("div",{className:"space-y-24",children:[n.jsx("section",{children:n.jsxs("div",{className:"flex flex-col gap-8",children:[n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h4",{className:"text-2xl font-black text-gray-800",children:"19æ³ã®èªãã100人ã®ãã¼ãã¼ãçãããã®ã2,500ã®ææ¦ã"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-4",children:n.jsx("div",{className:"absolute top-0 left-0 w-12 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]}),n.jsxs("div",{className:"text-gray-700 leading-[1.8] space-y-8 text-[15px] font-medium tracking-widest text-justify",children:[n.jsx("p",{children:"ç§ã®åç¹ã¯ãçæ¬ã§æ¯ãããªãã«ã¯ã¼ã¯ãããªãå§¿ãè¦ã¦è²ã£ã幼尿ã«ããã¾ãã19æ³ã®æã«ãã¼ãã«è¨ãããã¸ã§ã³ã¯ãä¸çã§æ´»èºãããã¼ãã¼ã100人è²ã¦ãããã¨ããã®å®ç¾ã«ã¯ãå§åçãªææ¦ã®æ°ãå¿
è¦ã§ãã"}),n.jsx("p",{children:"ãã¨ãæåçãæ°ï¼
ã§ãã2,500ã®äºæ¥ãç«ã¡ä¸ãããã¨ã§ã社ä¼ãåãã䏿¡ãã®æè½ãçã¾ããåå£ãåµãç¶ãã¾ããããã£ã¦ã¿ããããå½¢ã«ããä»çµã¿ããããåæ»ããæ¥æ¬ãçªç ´ããéµã«ãªãã¨ç¢ºä¿¡ãã¦ãã¾ãã"})]})]})}),n.jsx("section",{children:n.jsxs("div",{className:"flex flex-col gap-8",children:[n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h4",{className:"text-2xl font-black text-gray-800",children:"ããã³ãã¼ã¯ã³ãåµããã³ãã¼ã¼ããã¨ãã¦ã®è¦æ"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-4",children:n.jsx("div",{className:"absolute top-0 left-0 w-12 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]}),n.jsxs("div",{className:"text-gray-700 leading-[1.8] space-y-8 text-[15px] font-medium tracking-widest text-justify",children:[n.jsx("p",{children:"ç§ã¯èªåãä¸çªã«ãªããã¨ããã誰ããè¼ãããããã³ãã¼ã¼ããã®åå¨ã§ããããã¨èãã¦ãã¾ããããã50ä¸åã®èªå·±è³éããã¹ã¿ã¼ãããã®ã¯ãç¹å¥ãªæè½ããªãã¦ã工夫次第ã§èª°ã§ãææ¦ã§ããã¨è¨¼æãããã£ãããã§ãã"}),n.jsx("p",{children:"失æãã¦ãã30ç§ã ãè½ã¡è¾¼ããã¨æ±ºãã¦åãåããä½ã§ãã§ãããåºæ¨æãããã§ã¯ãªãã失æããªãããç«ã¡ä¸ãããã®ã³å¤ªãããã主役ã«ãªããããããªèª å®ãªãã¼ã ã§å¤§ããªå¤¢ãç¾å®ã«ãã¦ããã¾ãã"})]})]})}),n.jsx("section",{children:n.jsxs("div",{className:"flex flex-col gap-8",children:[n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h4",{className:"text-2xl font-black text-gray-800",children:"Meta Heroesãæãã誰ããè¼ãã社ä¼ã®å®è£
ã¸"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-4",children:n.jsx("div",{className:"absolute top-0 left-0 w-12 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]}),n.jsxs("div",{className:"text-gray-700 leading-[1.8] space-y-8 text-[15px] font-medium tracking-widest text-ju
374stify",children:[n.jsx("p",{children:"Meta Heroesã®ããã·ã§ã³ã¯ãææ°æè¡ãèªç¤ºãããã¨ã§ã¯ãªãã人ã®ä¾¡å¤ã証æãããã¨ãã«ããã¾ãããã¯ããã¸ã¼ã¯äººéã®ä»£æ¿ã§ã¯ãªããå°æ¹ãæªçµé¨ã¨ãã£ãå£ãè¶ããå人ã®å¯è½æ§ãæ¡å¼µããæé«ã®ãã¼ããã¼ã§ãã"}),n.jsx("p",{children:"ç§ãã¡ã¯ãAIãã¡ã¿ãã¼ã¹ã誰ãã使ããæ¦å¨ã«å¤ãããæ®éã®äººãããããªãã社ä¼ããå®è£
ãã¾ããæ¬¡ä¸ä»£ã®ææ¦ãç§°ããæåãåµããä¸äººã²ã¨ãããã¼ãã¼ã¨ãã¦ç¾½ã°ãããæªæ¥ãåãæãã¦ããã¾ãã"})]})]})})]})]})]}),oz=()=>{const r=[{label:"ä¼ç¤¾å",content:"æ ªå¼ä¼ç¤¾Meta Heroes"},{label:"代表è
",content:"æ¾ç³ åä¿"},{label:"è¨ç«æ¥",content:"2021å¹´12æ3æ¥"},{label:"è³æ¬é",content:"4100ä¸å"},{label:"å¤§éªæ¬ç¤¾",content:n.jsxs("div",{className:"space-y-1",children:[n.jsx("p",{children:"ã530-0027"}),n.jsx("p",{children:"大éªåºå¤§éªå¸ååºå å±±çº1-5"}),n.jsx("p",{children:"ä¸å
±æ¢
ç°ãã«8F"})]})},{label:"æ½è¨éå¶",content:n.jsxs("div",{className:"space-y-8",children:[n.jsxs("div",{className:"space-y-3",children:[n.jsx("span",{className:"inline-block bg-gray-100 px-4 py-1.5 rounded-full text-sm font-bold text-gray-700",children:"DXæå®¤ Hero Egg"}),n.jsxs("div",{className:"space-y-1 pl-1",children:[n.jsx("p",{children:"ã556-0011"}),n.jsx("p",{children:"大éªåºå¤§éªå¸æµªéåºé£æ³¢ä¸2ä¸ç®10-70"}),n.jsx("p",{children:"ãªãã°ãã¼ã¯ã¹1é"})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("span",{className:"inline-block bg-gray-100 px-4 py-1.5 rounded-full text-sm font-bold text-gray-700",children:"ã³ãã¥ããã£ã¹ãã¼ã¹ Meta Heroes Guild"}),n.jsxs("div",{className:"space-y-1 pl-1",children:[n.jsx("p",{children:"ã530-0051"}),n.jsx("p",{children:"大éªåºå¤§éªå¸ååºå¤ªè寺çº8-17"}),n.jsx("p",{children:"æ¢
ç°ãã«B1F"})]})]})]})},{label:"äºæ¥å
容",content:n.jsxs("ul",{className:"space-y-1",children:[n.jsx("li",{children:"ã¡ã¿ãã¼ã¹äºæ¥"}),n.jsx("li",{children:"AIäºæ¥"}),n.jsx("li",{children:"ã¤ãã³ãäºæ¥"}),n.jsx("li",{children:"æ½è¨éå¶äºæ¥"})]})},{label:"ã°ã«ã¼ã伿¥",content:n.jsxs("div",{className:"space-y-2",children:[n.jsxs("a",{href:"https://www.meta-osaka.co.jp/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:text-blue-600 transition-colors",children:["æ ªå¼ä¼ç¤¾Meta Osaka",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3.5 h-3.5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]}),n.jsxs("a",{href:"https://www.metaearth.co.jp/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:text-blue-600 transition-colors",children:["æ ªå¼ä¼ç¤¾MetaEarthHeroes",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3.5 h-3.5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]})]})}];return n.jsxs("main",{className:"min-h-screen bg-white pb-20 md:pb-32",children:[n.jsx(Ge,{titleEn:"COMPANY OVERVIEW",titleJa:"ä¼ç¤¾æ¦è¦"}),n.jsxs("div",{className:"container mx-auto px-6 md:px-4 max-w-4xl",children:[n.jsx("div",{className:"border-t border-gray-100",children:r.map((e,t)=>n.jsxs("div",{className:"flex flex-row py-8 md:py-12 border-b border-gray-100 gap-0",children:[n.jsx("div",{className:"w-1/3",children:n.jsx("h3",{className:"text-sm font-black text-gray-400 md:text-gray-800 tracking-widest uppercase md:normal-case",children:e.label})}),n.jsx("div",{className:"w-2/3",children:n.jsx("div",{className:"text-base md:text-lg font-medium text-gray-700 leading-relaxed",children:e.content})})]},t))}),n.jsxs("div",{className:"mt-16 md:mt-24",children:[n.jsx("h3",{className:"text-sm font-black text-gray-400 tracking-widest mb-6 uppercase",children:"Access Map"}),n.jsx("div",{className:"w-full aspect-video md:aspect-[21/9] rounded-2xl overflow-hidden shadow-lg border border-gray-100 bg-gray-50",children:n.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3280.106828956662!2d135.5019299763756!3d34.70248538313463!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6000e693967d6c69%3A0x6336a337c76378f7!2z44CSNTMwLTAwMjcg5aSn6Ziq5bqc5aSn6Ziq5biC5YyX5Yy65aCC5bGx55S677yR4oiS77yV!5e0!3m2!1sja!2sjp!4v1709620000000!5m2!1sja!2sjp",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"å¤§éªæ¬ç¤¾"})}),n.jsxs("div",{className:"mt-4 flex items-start gap-2 text-sm text-gray-500",children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
374currentColor",className:"w-5 h-5 flex-shrink-0 text-blue-500",children:n.jsx("path",{fillRule:"evenodd",d:"M11.54 22.351l.07.04.028.016a.76.76 0 00.723 0l.028-.015.071-.041a16.975 16.975 0 001.144-.742 19.58 19.58 0 002.683-2.282c1.944-1.99 3.963-4.98 3.963-8.827a8.25 8.25 0 00-16.5 0c0 3.846 2.02 6.837 3.963 8.827a19.58 19.58 0 002.682 2.282 16.975 16.975 0 001.145.742zM12 13.5a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"})}),n.jsx("p",{children:"大éªã¡ããè°·çºç·ãä¸å´çºé§
ããã徿©5å / 大éªã¡ãã御å çç·ãæ¢
ç°é§
ããã徿©8å"})]})]})]})]})},lz=()=>n.jsxs("main",{className:"min-h-screen bg-white pb-32",children:[n.jsx(Ge,{titleEn:"OUR MISSION",titleJa:"Meta Heroesã®ä½¿å½"}),n.jsxs("div",{className:"container mx-auto px-4 max-w-4xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"VISION"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ãã¸ã§ã³"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-4",children:n.jsx("div",{className:"absolute top-0 left-0 w-12 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"space-y-8",children:[n.jsx("h3",{className:"text-xl md:text-2xl font-black text-gray-800 leading-tight",children:"100ã®HEROãåµåºãããªã¼ãã£ã³ã°ã«ã³ããã¼ã«ãªãã"}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium tracking-wider",children:"ãã¯ããã¸ã¼ã«ãã£ã¦æãããæªæ¥ã®ç¤¾ä¼ãSociety 5.0ãã¨ãä¸çãç®æãã¹ãç®æ¨ãSDGsããå®ç¾ããããã«ã¯ãè¡ååã®ããå人ãã¤ã¾ãããã¼ãã¼ããå¿
è¦ã§ãããã®ããã«ããå¦ã¶äººããææ¦ãã人ããå¤é©ãã人ããæ¬¡ã
ã¨çã¿åºãä»çµã¿ãä½ããæªæ¥ãå®ç¾ãã人æã§æºããããä¸çãç®æãã¾ãã"}),n.jsx("div",{className:"py-12 flex justify-center",children:n.jsx("img",{src:"/assets/mission/vision.png",alt:"Vision Diagram",className:"w-full max-w-2xl h-auto"})})]})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"MISSION"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ããã·ã§ã³"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-4",children:n.jsx("div",{className:"absolute top-0 left-0 w-12 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"space-y-8",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("h3",{className:"text-xl md:text-2xl font-black text-gray-800 leading-tight",children:["ãã¸ã¿ã«Ããªã¢ã«ã§ç¤¾ä¼èª²é¡ã解決ãã人ã®ä¾¡å¤ã証æãã",n.jsx("br",{className:"hidden md:block"}),"ï½ AIã¨ç©ºéæè¡ï¼Spatial AIï¼ã§ã誰ãããã¼ãã¼ã«ãªãã社ä¼ã®å®è£
ï½"]}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium tracking-wider",children:"ãã¯ããã¸ã¼ã®é²åãããã®ã¾ã¾äººã®åã³ã«å¤ããããã ããç§ãã¡ã¯ããã¸ã¿ã«ä¸çã¨ç¾å®ä¸çãèåããã誰ããæ´»èºã§ããä»çµã¿ã社ä¼ã«å±ãã¾ãã"})]}),n.jsx("div",{className:"bg-gray-50 rounded-2xl p-8 md:p-12 space-y-8",children:[{title:"What",text:"ç§ãã¡ã¯ããã¸ã¿ã«ã®åã§ç¾å®ä¸çã«ãããæ§ã
ãªèª²é¡ã解決ãã¾ãã"},{title:"Why",text:"ç®æãã®ã¯ããã¯ããã¸ã¼ã®é²åããä¸äººã²ã¨ãã®è¼ããã«ç´çµããæªæ¥ã"},{title:"How",text:"Spacial AIãé§ä½¿ãã¦ã誰ããèªåãããã幸ãã«æ®ããã社ä¼ï¼ã¦ã§ã«ãã¼ã¤ã³ã°ç¤¾ä¼ï¼ãå®è£
ãã¦ããã¾ãã"}].map((r,e)=>n.jsx("div",{className:`${e!==0?"pt-8 border-t border-gray-200":""}`,children:n.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-4 md:gap-12",children:[n.jsx("span",{className:"text-4xl md:text-5xl font-medium text-cyan-500 w-32 shrink-0",children:r.title}),n.jsx("p",{className:"text-gray-700 font-bold leading-relaxed",children:r.text})]})},r.title))}),n.jsx("div",{className:"py-12 flex justify-center",children:n.jsx("img",{src:"/assets/mission/Spacial AI.png",alt:"Mission Diagram",className:"w-full max-w-2xl h-auto"})})]})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"VALUE"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ããªã¥ã¼"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-4",children:n.jsx("div",{className:"absolute top-0 left-0 w-12 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"space-y-12",children:[n.jsxs("div",{className:"space-y-6",children:[n.jsx("h3",{className:"text-xl md:text-2xl font-black text-gray-800 leading-tight",children:"HEROãã¤ããHEROã«"}),n.jsx("p",{className:"text-gray-600 leading-[1.8] font-medium tracking-wider",children:"ä¸äººã²ã¨ããçµå¶è
ã®è¦ç¹ãæã¡ãHEROãçã¿åºãããã®è¡åããã¾ããããã¦ããã¼ã ä¸ä¸¸ã¨ãªã£ã¦ã社ä¼èª²é¡ã解決ããHEROãä½ããæ¯ããããã³èªåãã¡èªèº«ãHEROã«ãªãã¾ãã"})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 md:gap-6",children:[{label:"å
",en:"HOPE",icon:"/assets/mission/value_light.png",text:"社ä¼ã«ã¨ã£ã¦ä¾¡å¤ã®ããæªæ¥ã®ãã¸ã§ã³ãæãã仲éã«å
±æããã"},{label:"ç«",en:"WELL",icon:"/assets/mission/value_fire.png",text:"èªåèªèº«ã®åã§æ°ããä»çµã
374¿ãçã¿åºãåæ°ã¨æ ç±ãæã¤ã"},{label:"æ°´",en:"SOLVE",icon:"/assets/mission/value_water.png",text:"å½¹å²ãç«å ´ãè¶ ãã¦ã課é¡ã«æè»ã«å¯¾å¿ããã"}].map((r,e)=>n.jsxs("div",{className:`border border-gray-100 rounded-2xl p-4 md:p-10 flex flex-col items-center text-center space-y-4 md:space-y-6 ${e===2?"col-span-2 md:col-span-1":"col-span-1"}`,children:[n.jsx("span",{className:"text-[8px] md:text-[10px] font-bold text-gray-400 tracking-widest",children:r.en}),n.jsxs("div",{className:"space-y-2 md:space-y-4",children:[n.jsx("h4",{className:"text-xl md:text-3xl font-black text-gray-800",children:r.label}),n.jsx("div",{className:"w-10 h-10 md:w-16 md:h-16 mx-auto",children:n.jsx("img",{src:r.icon,alt:r.label,className:"w-full h-full object-contain"})})]}),n.jsx("p",{className:"text-[11px] md:text-sm font-medium text-gray-600 leading-relaxed",children:r.text})]},r.label))})]})]})]})]}),cz=[{en:"MAIN OFFICE",title:"æ¬ç¤¾",mapUrl:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3280.123456789!2d135.502!3d34.702!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6000e691ec666667%3A0x6666666666666666!2z44CSNTMwLTAwMjcg5aSn6Ziq5bqc5aSn6Ziq5biC5YyX5Yy65aCC5bGx55S677yR4oiS77yV!5e0!3m2!1sja!2sjp!4v1700000000000!5m2!1sja!2sjp",address:`ã530-0027 375大éªåºå¤§éªå¸ååºå å±±çº1-5 376ä¸å ±æ¢ ç°ãã«8F`,access:["大éªã¡ããè°·çºç·ãä¸å´çºé§ ããã徿©6åã","大éªã¡ãã御å çç·ãæ¢ ç°é§ ããã徿©8åã","大éªã¡ããå ºçç·ãæçºé§ ããã徿©6åã","éªæ¥é»éãå¤§éªæ¢ ç°é§ ããã徿©10åã","JRã大éªé§ ããã徿©11åã"],image:"/assets/offices/head_office.png",actualMapUrl:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3280.1143211111!2d135.50211111111!3d34.70211111111!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6000e691ec666667%3A0x6666666666666666!2z5LiJ5YWx5 Wilfred55Sw44OT44Or!5e0!3m2!1sja!2sjp!4v1704450000000!5m2!1sja!2sjp"},{en:"HERO EGG | DX EDUCATION FACILITY",title:"DXæè²æ½è¨ãHero Eggã",mapUrl:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3281.23456789!2d135.501!3d34.664!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6000e76666666667%3A0x7777777777777777!2z44CSNTU2LTAwMTEg5aSn6Ziq5bqc5aSn6Ziq5biC5rWq6YCf5Yy66Zuj5rOi5Lit77yS5LiB55uu77yR77yQ4oiS77yX77yQ!5e0!3m2!1sja!2sjp!4v1700000000000!5m2!1sja!2sjp",address:`ã556-0011 377大éªåºå¤§éªå¸æµªéåºé£æ³¢ä¸2ä¸ç®10-70 378ãªãã°ãã¼ã¯ã¹1é`,access:["大éªã¡ãã御å çç·ããªãã°é§ ããã徿©7åã","大éªã¡ãã忥åç·ããªãã°é§ ããã徿©10åã","大éªã¡ããåã¤æ©ç·ããªãã°é§ ããã徿©15åã","éªç¥ãªãã°ç·ã大éªé£æ³¢é§ ããã徿©10åã","è¿é飿³¢ç·(å¥è¯ç·)ã大éªé£æ³¢é§ ããã徿©10åã","JRé¢è¥¿æ¬ç·(大åè·¯ç·)ãJR飿³¢é§ ã(OCAT)ååºå£ãã徿©15åã"],image:"/assets/offices/heroegg.png",actualMapUrl:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3281.2741!2d135.5012!3d34.6641!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6000e769cd000001%3A0x6666666666666666!2z44Gq44KT44Gw44OR44O844Kv44K5!5e0!3m2!1sja!2sjp!4v1704450000000!5m2!1sja!2sjp"},{en:"META HEROES GUILD | COMMUNITY SPACE",title:"ã³ãã¥ããã£ã¹ãã¼ã¹ãMeta Heroes Guildã",mapUrl:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3280.123456789!2d135.502!3d34.701!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6000e691ec666667%3A0x8888888888888888!2z44CSNTMwLTAwNTEg5aSn6Ziq5bqc5aSn6Ziq5biC5YyX5Yy65aSq6J6N5a-655S677yY4oiS77yR77yX!5e0!3m2!1sja!2sjp!4v1700000000000!5m2!1sja!2sjp",address:`ã530-0051 379大éªåºå¤§éªå¸ååºå¤ªè寺çº8-17 380ãã©ã¶æ¢ ç°ãã«B1F`,access:["大éªã¡ããè°·çºç·ãä¸å´çºé§ ããã徿©8åã","大éªã¡ãã御å çç·ãæ¢ ç°é§ ããã徿©8åã","大éªã¡ããåã¤æ©ç·ãæçºé§ ããã徿©12åã","éªæ¥é»éãå¤§éªæ¢ ç°é§ ããã徿©8åã","JRã大éªé§ ããã徿©9åã"],image:"/assets/offices/community_space.png",actualMapUrl:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3280.1541!2d135.5022!3d34.7011!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6000e691ec666667%3A0x9999999999999999!2z44OX44Op44K25 Wilfred55Sw44OT44Or!5e0!3m2!1sja!2sjp!4v1704450000000!5m2!1sja!2sjp"}],dz=["https://maps.google.com/maps?q=大éªåºå¤§éªå¸ååºå å±±çº1-5%20ä¸å ±æ¢ ç°ãã«&t=&z=15&ie=UTF8&iwloc=&output=embed","https://maps.google.com/maps?q=大éªåºå¤§éªå¸æµªéåºé£æ³¢ä¸2ä¸ç®10-70%20ãªãã°ãã¼ã¯ã¹&t=&z=15&ie=UTF8&iwloc=&output=embed","https://maps.google.com/maps?q=大éªåºå¤§éªå¸ååºå¤ªè寺çº8-17%20ãã©ã¶æ¢ ç°ãã«&t=&z=15&ie=UTF8&iwloc=&output=embed"],uz=()=>n.jsxs("main",{className:"min-h-screen bg-white pb-32",children:[n.jsx(Ge,{titleEn:"BUSINESS OFFICES AND FACILITIES",titleJa:"äºæ¥æã»æ½è¨"}),n.jsx("div",{className:"container mx-auto px-4 max-w-5xl space-y-32",children:cz.map((r,e)=>n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-3",children:r.en}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800 tracking-tight",children:r.title}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"flex flex-col-reverse md:flex-row gap-4 mb-12 h-auto md:h-[400px]",children:[n.jsx("div",{className:"w-full md:w-[65%] h-[300px] md:h-full rounded-sm overflow-hidden shadow-sm border border-gray-100",children:n.jsx("iframe",{src:dz[e],width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:`${r.title} Map`})}),n.jsx("div",{className:"w-full md:w-[35%] h-[300px] md:h-full rounded-sm overflow-hidden shadow-sm",children:n.jsx("img",{src:r.image,alt:r.title,className:"w-full h-full object-cover"})})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-1 gap-12 max-w-3xl",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-black text-gray-800 border-b border-gray-100 pb-2 inline-block mb-4",children:"æå¨å°"}),n.jsx("p",{className:"text-base font-medium text-gray-600 leading-relaxed whitespace-pre-line",children:r.address})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-black text-gray-800 border-b border-gray-100 pb-2 inline-block mb-4",children:"ã¢ã¯ã»ã¹"}),n.jsx("ul",{className:"space-y-2",children:r.access.map((t,s)=>n.jsx("li",{className:"text-base font-medium text-gray-600 leading-relaxed",children:t},s))})]})]})]},e))})]}),hz=[{id:"01",title:"æ³ä»¤é å®",text:"ç´æã¯å®ããã«ã¼ã«ã»æ³å¾ã«åããåãããããã¨ãã³ã³ãã©ã¤ã¢ã³ã¹éµå®ã"},{id:"06",title:"æ´ç·´ããã社ä¼ããã¼",text:"æéå³å®ï¼å¯¾é¢ã¯10ååéåããªã³ã©ã¤ã³ã¯5ååãã°ã¤ã³ã身ã ããªã¿ãæ´ãããã¨ããµããããæè£ ã"},{id:"02",title:"ãã¼ãã¼ãã¤ã³ãï¼å©ä»ï¼",text:"æ¨æ¶ã¨æè¬ãå¿ãããå°ã£ã¦ããäººã«æãå·®ã伸ã¹ãã"},{id:"07",title:"å¿ççå®å ¨é¢ã¨æè»æ§",text:"ãã¹ã¯ãå ±åâäºå®æ´çâå¦ã³ããå ±æã1on1ã§å®å ¨ç¢ºèªãè¡ãã"},{id:"03",title:"ãã¸ãã£ã対話ï¼å»ºè¨çï¼",text:"課é¡ã¯ãåé¡+å½±é¿+ææ¡ãã§æç¨¿ãåäººæ»æç¦æ¢ã"}
vendor: 4,532 bytes, line 380
380,{id:"08",title:"SDGsã¸ã®æèã¨å®è·µ",text:"åå©ç¨ã»ãªãµã¤ã¯ã«åªå
ãä¸è¦é»æºã¯ãã¾ãã«OFFã"},{id:"04",title:"ç¸äºæ¶å©ã¨å©ãåã",text:"å°ã£ããã¨ã¯çããæã£ã¦ãã人ã«ç¸è«ãããã¨ã"},{id:"09",title:"好å¥å¿ã¨æ¢ç©¶å¿",text:"å¤é¨å¦ç¿ãæ¨å¥¨ãã¾ãã"},{id:"05",title:"è¿
éãªå ±é£ç¸ã¨åµé æ§",text:"éè¦äºé
ã¯å³å ±åã"},{id:"10",title:"éã³å¿",text:"ã¯ãªã¨ã¤ãã£ããäºæ¥ææ¡ã«ãéã³å¿ãã"}],fz=()=>n.jsxs("main",{className:"min-h-screen bg-white pb-32",children:[n.jsx(Ge,{titleEn:"CODE OF CONDUCT",titleJa:"è¡åè¦ç¯"}),n.jsxs("div",{className:"container mx-auto px-4 max-w-4xl space-y-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"10 HERO'S CRED"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"10ã®HEROã¯ã¬ã"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-4 gap-y-4",children:hz.map(r=>n.jsxs("div",{className:"bg-gray-50/50 p-6 flex gap-6 items-start rounded-sm",children:[n.jsx("span",{className:"text-blue-600 font-black italic text-xl leading-none pt-1",children:r.id}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"text-base font-black text-gray-800 tracking-tight",children:r.title}),n.jsx("p",{className:"text-xs font-bold text-gray-500 leading-relaxed",children:r.text})]})]},r.id))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"HR100"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"HR100"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"space-y-8",children:[n.jsx("h3",{className:"text-xl md:text-2xl font-black text-gray-800 leading-tight",children:"HERO100ãåµãããã®Regulationï¼Recordï¼Resilienceã®ä»çµã¿"}),n.jsxs("div",{className:"text-gray-600 leading-relaxed font-medium space-y-4",children:[n.jsx("p",{children:"HEROã«ãªãÃHEROãåµãÃHEROãæ¯ããã³ã³ã»ããã®ãã¨ã100人ã®HEROãè²ã¦ãããã«ããã¼ã å
¨å¡ã§ã¤ãããå®ããé²åããã¦ããè¡åè¦ç¯ã®éåä½ã§ãã"}),n.jsx("p",{children:"ãã©ãã«ãå¦ã³ãèè¤ã®ãã³ã«ãä¸ã¤ãã¤å¢ãã¦ããâçµé¨ããçã¾ããâã«ã¼ã«ã§ãã"})]}),n.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4 pt-12",children:[n.jsxs("div",{className:"w-full md:w-[30%] bg-white border border-gray-100 rounded-xl overflow-hidden shadow-[0_10px_30px_rgba(0,0,0,0.03)] flex flex-col h-48",children:[n.jsx("div",{className:"bg-[#4DB8D7] text-white text-center py-2 text-xs font-bold tracking-widest",children:"åå "}),n.jsxs("div",{className:"p-6 flex flex-col items-center justify-center flex-grow space-y-3",children:[n.jsx("span",{className:"text-[#2563EB] font-black text-xl tracking-wider uppercase",children:"PROBLEM"}),n.jsx("p",{className:"text-[13px] font-bold text-gray-500",children:"ä¸å®ã»å±éºã»æ¸å¿µã»ä¸æ"})]})]}),n.jsx("div",{className:"flex items-center justify-center py-2",children:n.jsx("svg",{width:"24",height:"40",viewBox:"0 0 24 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-gray-200 rotate-90 md:rotate-0",children:n.jsx("path",{d:"M4 4L20 20L4 36",stroke:"currentColor",strokeWidth:"8",strokeLinecap:"round",strokeLinejoin:"round"})})}),n.jsxs("div",{className:"w-full md:w-[30%] bg-white border border-gray-100 rounded-xl overflow-hidden shadow-[0_10px_30px_rgba(0,0,0,0.03)] flex flex-col h-48 border-t-2 border-t-blue-500",children:[n.jsx("div",{className:"bg-[#2563EB] text-white text-center py-2 text-xs font-bold tracking-widest",children:"解決"}),n.jsxs("div",{className:"p-6 flex flex-col items-center justify-center flex-grow
380space-y-3",children:[n.jsx("span",{className:"text-[#2563EB] font-black text-xl tracking-wider uppercase",children:"SOLUTION"}),n.jsx("p",{className:"text-[13px] font-bold text-gray-500",children:"åå ã追æ±ãã解決"})]})]}),n.jsx("div",{className:"flex items-center justify-center py-2",children:n.jsx("svg",{width:"24",height:"40",viewBox:"0 0 24 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-gray-200 rotate-90 md:rotate-0",children:n.jsx("path",{d:"M4 4L20 20L4 36",stroke:"currentColor",strokeWidth:"8",strokeLinecap:"round",strokeLinejoin:"round"})})}),n.jsxs("div",{className:"w-full md:w-[30%] bg-white border border-gray-100 rounded-xl overflow-hidden shadow-[0_10px_30px_rgba(0,0,0,0.03)] flex flex-col h-48",children:[n.jsx("div",{className:"bg-[#4DB8D7] text-white text-center py-2 text-xs font-bold tracking-widest",children:"è¦å"}),n.jsxs("div",{className:"p-6 flex flex-col items-center justify-center flex-grow space-y-3",children:[n.jsx("span",{className:"text-[#2563EB] font-black text-xl tracking-wider uppercase",children:"REGULATION"}),n.jsx("p",{className:"text-[13px] font-bold text-gray-500",children:"ä»çµã¿åããã«ã¼ã«å"})]})]})]})]})]})]})]}),mz=()=>n.jsxs("main",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"PRIVACY POLICY",titleJa:"ãã©ã¤ãã·ã¼ããªã·ã¼"}),n.jsx("section",{className:"py-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[n.jsx("div",{className:"text-center mb-24",children:n.jsx("p",{className:"text-gray-500 font-medium leading-relaxed max-w-2xl mx-auto text-sm",children:"æ ªå¼ä¼ç¤¾MetaHeroesï¼ä»¥ä¸ãå½ç¤¾ãï¼ã¯ãå½ãµã¤ãã«ããã¦æä¾ãããµã¼ãã¹ã«ããããã¦ã¼ã¶ã¼ã®å人æ
å ±ã®åãæ±ãã«ã¤ãã¦ã以ä¸ã®éããã©ã¤ãã·ã¼ããªã·ã¼ãå®ãã¾ãã"})}),n.jsxs("div",{className:"space-y-24",children:[n.jsx(el,{title:"ï¼ï¼ï¼å人æ
å ±ã®åå¾ã«ã¤ãã¦",children:"å½ç¤¾ã¯ãã¦ã¼ã¶ã¼ãå½ãµã¤ããå©ç¨ããéã«ãå¿
è¦ã«å¿ãã¦å人æ
å ±ãåå¾ãã¾ããåå¾ããæ
å ±ã«ã¯ãæ°åã使ãé»è©±çªå·ãã¡ã¼ã«ã¢ãã¬ã¹ãªã©ãå«ã¾ãã¾ãã"}),n.jsxs(el,{title:"ï¼ï¼ï¼å人æ
å ±ã®å©ç¨ç®ç",children:[n.jsx("p",{className:"mb-6",children:"å½ç¤¾ã¯ãåå¾ããå人æ
å ±ã以ä¸ã®ç®çã§å©ç¨ãã¾ãã"}),n.jsx("ul",{className:"space-y-4 list-none pl-0 inline-block text-left",children:["ãæ³¨æã®ç¢ºèªãçºéãã¢ãã¿ã¼ãµã¼ãã¹ã®æä¾","ãåãåããã¸ã®å¯¾å¿","ã¡ã¼ã«ãã¬ã¸ã³ããã£ã³ãã¼ã³æ
å ±ã®é
ä¿¡","ãµã¼ãã¹åä¸ã®ããã®ã¢ã³ã±ã¼ã調æ»","æ³ä»¤ã«åºã¥ã対å¿"].map((r,e)=>n.jsxs("li",{className:"flex items-center gap-4 text-gray-500",children:[n.jsx("div",{className:"w-1 h-1 rounded-full bg-blue-400 shrink-0"}),n.jsx("span",{children:r})]},e))})]}),n.jsx(el,{title:"ï¼ï¼ï¼å人æ
å ±ã®ç®¡ç",children:n.jsxs("div",{className:"space-y-6",children:[n.jsx("p",{children:"å½ç¤¾ã¯ãå人æ
å ±ã®æ£ç¢ºæ§åã³å®å
¨æ§ã確ä¿ãããããé©åãªã»ãã¥ãªãã£å¯¾çãè¬ãã¾ãã"}),n.jsx("p",{children:"å人æ
å ±ã®æ¼æ´©ãç´å¤±ãæ¹ããã䏿£ã¢ã¯ã»ã¹ã鲿¢ããããã«ãå¿
è¦ãã¤é©åãªæªç½®ã宿½ãã¾ãã"})]})}),n.jsxs(el,{title:"ï¼ï¼ï¼å人æ
å ±ã®é©ç¨ç¯å²",children:["æ¬ãã©ã¤ãã·ã¼ããªã·ã¼ã¯ãå½ã¦ã§ããµã¤ãï¼",n.jsx("a",{href:"https://meta-heroes.co.jp",className:"text-blue-500 border-b border-blue-100 hover:border-blue-500 transition-colors",children:"https://meta-heroes.co.jp"}),"ï¼ã«ããã¦ã®ã¿é©ç¨ããã¾ãã"]}),n.jsxs(el,{title:"ï¼ï¼ï¼å人æ
å ±ã®ç¬¬ä¸è
æä¾",children:[n.jsx("p",{className:"mb-6",children:"å½ç¤¾ã¯ã以ä¸ã®å ´åãé¤ããå人æ
å ±ã第ä¸è
ã«æä¾ãããã¨ã¯ããã¾ããã"}),n.jsx("ul",{className:"space-y-4 list-none pl-0 inline-block text-left",children:["ã¦ã¼ã¶ã¼ã®åæãããå ´å","æ³ä»¤ã«åºã¥ãå ´å","人ã®çå½ã身ä½ã財ç£ã®ä¿è·ã«å¿
è¦ãªå ´å"].map((r,e)=>n.jsxs("li",{className:"flex items-center gap-4 text-gray-500",children:[n.jsx("div",{className:"w-1 h-1 rounded-full bg-blue-400 shrink-0"}),n.jsx("span",{children:r})]},e))})]}),n.jsx(el,{title:"ï¼ï¼ï¼ã¯ããã¼ï¼Cookieï¼ã®ä½¿ç¨ã«ã¤ãã¦",children:"å½ãµã¤ãã§ã¯ãã¦ã¼ã¶ã¼ã®å©ä¾¿æ§åä¸ã®ããã«ã¯ããã¼ã使ç¨ãã¦ãã¾ããã¯ããã¼ã®ä½¿ç¨ãæå¦ãããã¨ãå¯è½ã§ããããã®å ´åãå½ãµã¤ãã®ä¸é¨æ©è½ãå©ç¨ã§ããªããªããã¨ãããã¾ãã"}),n.jsx(el,{title:"ï¼ï¼ï¼ãã©ã¤ãã·ã¼ããªã·ã¼ã®å¤æ´",children:"å½ç¤¾ã¯ãæ³ä»¤ã®å¤æ´ããµã¼ãã¹ã®æ¹åã«ä¼´ããæ¬ãã©ã¤ãã·ã¼ããªã·ã¼ã夿´ãããã¨ãããã¾ãã夿´å¾ã®ãã©ã¤ãã·ã¼ããªã·ã¼ã¯ãå½ãµã¤ãã«æ²è¼ãããæç¹ã§å¹åãçãããã®ã¨ãã¾ãã"}),n.jsx(el,{title:"ï¼ï¼ï¼å
責äºé
- ãµã¤ãããªã·ã¼",children:"å½ãµã¤ãã«æ²è¼ããã¦ããæ
å ±ã«ã¯ä¸å
¨ã
380æãã¦ãã¾ãããå½ãµã¤ãã®æ
å ±ãå©ç¨ãããã¨ã«ãã£ã¦çããæå®³ã«å¯¾ãã¦ä¸åã®è²¬ä»»ï¼éæ¥æå®³ã»ç¹å¥æå®³ã»çµæçæå®³åã³ä»éçæå®³ï¼ãè² ããã®ã§ã¯ããã¾ãããæ
å ±ã®å©ç¨ã«é¢ãã¾ãã¦ã¯å
¨ã¦æçµèªå·±è²¬ä»»ã§è¡ã£ã¦é ããããé¡ãç³ãä¸ãã¾ãã"}),n.jsxs("div",{className:"pt-24 mt-24 border-t border-gray-100 flex flex-col items-center gap-4 text-center",children:[n.jsx("p",{className:"text-gray-300 font-medium text-[10px] tracking-[0.4em] uppercase",children:"Issued on December 3, 2021"}),n.jsx("div",{className:"w-8 h-px bg-gray-200"}),n.jsx("p",{className:"text-gray-900 font-bold tracking-widest text-sm",children:"æ ªå¼ä¼ç¤¾MetaHeroes"})]})]})]})})]}),el=({title:r,children:e})=>n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:r}),n.jsx("div",{className:"text-gray-600 leading-loose font-medium text-sm md:text-base max-w-2xl text-justify md:text-center",children:e})]}),pz=[{name:"æ ªå¼ä¼ç¤¾Meta Osaka",logo:"/assets/group/MO_logo_alpha.png",url:"https://www.meta-osaka.co.jp/"},{name:"æ ªå¼ä¼ç¤¾MetaEarthHeroes",logo:"/assets/group/META EARTH HEROES_LogoFont.png",url:"https://www.metaearth.co.jp/"}],gz=()=>n.jsxs("main",{className:"min-h-screen bg-white pb-32",children:[n.jsx(Ge,{titleEn:"GROUP COMPANIES",titleJa:"ã°ã«ã¼ãä¼ç¤¾"}),n.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:pz.map((r,e)=>n.jsxs("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"group bg-white rounded-xl p-4 md:p-6 shadow-[0_10px_25px_rgba(0,0,0,0.02)] border border-gray-50 hover:shadow-[0_15px_35px_rgba(0,0,0,0.05)] transition-all duration-500 flex flex-col items-center text-center",children:[n.jsx("div",{className:"flex-grow flex items-center justify-center mb-4 w-full aspect-[3.5/1]",children:n.jsx("img",{src:r.logo,alt:r.name,className:"max-w-[60%] max-h-full object-contain group-hover:scale-105 transition-transform duration-500"})}),n.jsxs("div",{className:"w-full pt-4 border-t border-gray-50 flex items-center justify-center gap-2",children:[n.jsx("span",{className:"text-[11px] md:text-xs font-bold text-gray-500 group-hover:text-blue-600 transition-colors tracking-tighter",children:r.name}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-3 h-3 text-gray-300 group-hover:text-blue-600 transition-colors",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]})]},e))})})]}),xz=[{id:"yt-plist-1",type:"video",title:"ãä¼ç¤¾ç´¹ä»ãMeta Heroes",category:"Brand",youtubeUrl:"https://www.youtube.com/watch?v=HwBMWaO27I8"},{id:"yt-plist-2",type:"video",title:"ãé²ç½ã¤ãã³ããé²ç½ä¸å 大éªã»é¢è¥¿ä¸å",category:"Event",youtubeUrl:"https://www.youtube.com/watch?v=7thymifNrbE"},{id:"yt-plist-3",type:"video",title:"ãFortniteãMeta Heroes ããã¢ã¼ã·ã§ã³ã ã¼ãã¼",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=TizqV76FOsg"},{id:"yt-plist-4",type:"video",title:"ãæ½è¨ç´¹ä»ãHero Egg CM",category:"Service",youtubeUrl:"https://www.youtube.com/watch?v=Qe6t5_rPVBc"},{id:"yt-plist-5",type:"video",title:"ããµã¼ãã¹ç´¹ä»ãEGG JAM CM",category:"Service",youtubeUrl:"https://www.youtube.com/watch?v=k2NCdmsgN74"},{id:"yt-plist-6",type:"video",title:"ããã£ã©ã¯ã¿ã¼ç´¹ä»ãHero Egg ãªãªã¸ãã«ãã£ã©ã¯ã¿ã¼ ç´¹ä»ãã¬ã¤ã©ã¼",category:"Brand",youtubeUrl:"https://www.youtube.com/watch?v=M4SG299zjBE"},{id:"yt-plist-7",type:"video",title:"ããã©ã³ãã ã¼ãã¼ãMeta Heroesé²ç½ã¡ã¿ãã¼ã¹",category:"Brand",youtubeUrl:"https://www.youtube.com/watch?v=5VnxVYHR4A4"},{id:"yt-plist-8",type:"video",title:"ããªã¼ããã³ã°ã ã¼ãã¼ãé²ç½ä¸å",category:"Event",
380youtubeUrl:"https://www.youtube.com/watch?v=W3zB9PV5NeM"},{id:"yt-plist-9",type:"video",title:"ãæè²ã¤ãã³ããã¿ããã®ãããã°ã ã²ã¼ã ã¯ãªã¨ã¤ã¿ã¼ä½é¨",category:"Education",youtubeUrl:"https://www.youtube.com/watch?v=ytvh4r0n_Qw"},{id:"yt-plist-10",type:"video",title:"ãFortniteãMeta Heroes éçºããã¼ã¢ã¼ã·ã§ã³",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=7qmtXERUG5o"},{id:"yt-2",type:"video",title:"ãFortnite map PVãã¡ã¿ãã¼ã¹ã¨ããå
¬å",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=wQJ0_xIUAys"},{id:"yt-3",type:"video",title:"ãFortnite map PVãç¾å±±ãã¬ãã¸",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=v5IVC9ESJKc"},{id:"yt-5",type:"video",title:"ãFortnite map PVãGOKO PARKOUR",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=dEAwzx_hSm0"},{id:"yt-6",type:"video",title:"ãFortnite map PVãFALAMENT",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=YPlRJPGy7ro"},{id:"yt-8",type:"video",title:"ãFortnite map PVãTHE YOn - Collect Coordinates",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=S8IJB3TQv2c"},{id:"yt-9",type:"video",title:"ãFortnite map PVãå°éã·ãã¥ã¬ã¼ã·ã§ã³",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=bChkWguO_kQ"},{id:"yt-10",type:"video",title:"ãFortnite map PVãéªç¥ã»æ·¡è·¯å¤§éç½ãç¥ãã ï½é²ç½ã¡ã¿ãã¼ã¹ï½",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=_mklyapz8xI"},{id:"yt-11",type:"video",title:"ãFortniteãã¹ãã¼ã¸ã«ï¼",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=Q-H-lOIYyYc"},{id:"yt-12",type:"video",title:"ãFortnite map PVãå°å¹´ã¨ç¬",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=OVLleuQW2Uc"},{id:"yt-13",type:"video",title:"ãFortnite map PVãSO.ON project LaV Music Live in Fortnite",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=FsFAqNp41Hc"},{id:"yt-15",type:"video",title:"ãFortnite map PVãYuki World race & openworld",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=6-St2Ubn0zs"},{id:"yt-18",type:"video",title:"Hero Eggç´¹ä»ã©ã¤ãé
ä¿¡",category:"Live",youtubeUrl:"https://www.youtube.com/watch?v=HojGyNoUmJc"},{id:"yt-19",type:"video",title:"ãäºåPVãYuki Tsunoda official Fortnite map",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=gRX9h4TsDoE"},{id:"yt-20",type:"video",title:"ãFortnite map PVãMoriZakura ããæ¡",category:"Metaverse",youtubeUrl:"https://www.youtube.com/watch?v=QryyaVyBYHo"}],yz=Object.assign({}),bz=()=>{const r=[];return Object.entries(yz).forEach(([e,t])=>{var c;const s=((c=e.split("/").pop())==null?void 0:c.split(".")[0])||"Unknown",[i,...a]=s.includes("_")?s.split("_"):["Other",s],o=a.join("_")||s;r.push({id:e,type:"image",thumbnail:t,title:o.replace(/-/g," "),category:i,description:"ããã¸ã§ã¯ãã®è©³ç´°èª¬æããã¹ãã"})}),r},vz=bz(),vC=[...xz,...vz],wC=r=>{const e=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/,t=r.match(e);return t&&t[2].length===11?t[2]:null},wz=()=>{const[r,e]=T.useState(null),[t,s]=T.useState(null),[i,a]=T.useState("ALL"),[o,c]=T.useState(""),h=T.useMemo(()=>{const g=new Set(vC.map(x=>x.category.toUpperCase()));return["ALL",...Array.from(g)].sort()},[]),f=T.useMemo(()=>vC.filter(g=>{const x=i==="ALL"||g.category.toUpperCase()===i,y=g.title.toLowerCase().includes(o.toLowerCase())||g.category.toLowerCase().includes(o.toLowerCase());return x&&y}),[i,o]),m=g=>{g.type==="video"?s(g.id):e(g)};return n.jsxs("main",{className:"bg-white min-h-screen text-gray-900 pb-32",children:[n.jsx(Ge,{titleEn:"GALLERY",titleJa:"å®ç¸¾ã®ã£ã©ãªã¼"}),n.jsxs("div",{className:"container mx-auto px-4 md:px-8",children:[n.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center gap-6 mb-12 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex flex-wrap justify-center md:justify-start gap-2",children:h.map(g=>n.jsx("button",{onClick:()=>{a(g),s(null)},className:`px-5 py-2 rounded-full text-[10px] font-black tracking-widest transition-all duration-300 ${i===g?"bg-blue-600 text-white shadow-lg shadow-blue-500/30":"bg-gray-100 text-gray-400 hover:bg-gray-200"}`,children:g},g))}),n.jsxs("div",{className:"relative w-full md:w-72",children:[n.jsx("input",{type:"text",placeholder:"å®ç¸¾ãæ¤ç´¢",value:o,onChange:g=>{c(g.target.value),s(null)},className:"w-full pl-12 pr-6 py-3 bg-gray-50 border-none rounded-full text-xs font-bold tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all placeholder:text-gray-300"}),n.jsx(mu,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-300 w-4 h-4"})]})]}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:f.map(g=>{const x=g.youtubeUrl?wC(g.youtubeUrl):null,y=g.thumbnail||(x?`https://img.youtube.com/vi/${x}/maxresdefault.jpg`:""),v=t===g.id;return n.jsxs(Ce.div,{layout:!0,initial:{opacity:0,y:20}
380,animate:{opacity:1,y:0},className:"group",children:[n.jsx("div",{className:"relative aspect-video rounded-xl overflow-hidden shadow-md group-hover:shadow-xl transition-all duration-500 bg-gray-100 border border-gray-100 cursor-pointer",onClick:()=>!v&&m(g),children:v&&g.type==="video"?n.jsx("div",{className:"absolute inset-0 bg-black",children:g.youtubeUrl?n.jsx("iframe",{src:`https://www.youtube.com/embed/${x}?autoplay=1&rel=0`,className:"w-full h-full",allow:"autoplay; encrypted-media; fullscreen",title:g.title}):n.jsx("video",{src:g.videoUrl,controls:!0,autoPlay:!0,className:"w-full h-full object-contain"})}):n.jsxs(n.Fragment,{children:[n.jsx("img",{src:y,alt:g.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"}),g.type==="video"&&n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsx("div",{className:"w-12 h-12 bg-white/20 backdrop-blur-md rounded-full flex items-center justify-center group-hover:scale-110 transition-transform duration-300 border border-white/30",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"white",viewBox:"0 0 24 24",className:"w-6 h-6 ml-1",children:n.jsx("path",{d:"M8 5v14l11-7z"})})})}),n.jsx("div",{className:"absolute top-3 left-3 px-3 py-1 bg-black/50 backdrop-blur-md rounded-sm text-[9px] font-black text-white tracking-widest uppercase",children:g.category})]})}),n.jsx("div",{className:"mt-4 px-1",children:n.jsx("h3",{className:"text-sm font-bold text-gray-800 line-clamp-2 leading-snug group-hover:text-blue-600 transition-colors",children:g.title})})]},g.id)})}),f.length===0&&n.jsx("div",{className:"text-center py-20",children:n.jsx("p",{className:"text-gray-400 font-bold",children:"該å½ããå®ç¸¾ãè¦ã¤ããã¾ããã§ããã"})})]}),n.jsx(an,{children:r&&n.jsx(Ce.div,{initial:{opacity:0}
380,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/95 backdrop-blur-sm",onClick:()=>e(null),children:n.jsxs(Ce.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"relative w-full max-w-5xl aspect-video bg-black rounded-lg shadow-2xl overflow-hidden",onClick:g=>g.stopPropagation(),children:[r.type==="video"?r.youtubeUrl?n.jsx("iframe",{src:`https://www.youtube.com/embed/${wC(r.youtubeUrl)}?autoplay=1&mute=0&controls=1&playsinline=1&rel=0`,className:"w-full h-full",allow:"autoplay; encrypted-media; fullscreen",title:r.title}):r.videoUrl?n.jsx("video",{src:r.videoUrl,controls:!0,autoPlay:!0,className:"w-full h-full object-contain"}):null:n.jsx("img",{src:r.thumbnail,alt:r.title,className:"w-full h-full object-contain"}),n.jsx("button",{className:"absolute top-4 right-4 w-10 h-10 bg-white/10 hover:bg-white/20 rounded-full flex items-center justify-center text-white transition-colors",onClick:()=>e(null),children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-6 h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})})})]})},jz=["business","service","partner","recruit","press","other"],Nz={category:"",company:"",department:"",url:"",name:"",email:"",occupation:"",desiredJob:"",mediaName:"",publishDate:"",content:"",confirm_email_field:""},kz=()=>{const r=Kt(),[e,t]=T.useState("input"),[s,i]=T.useState(!1),[a,o]=T.useState(Nz),[c,h]=T.useState(!1),[f]=T.useState(Date.now());T.useEffect(()=>
380{const N=new URLSearchParams(r.search).get("type");N&&jz.includes(N)&&o(S=>({...S,category:N}))},[r.search]);const m=j=>{const{name:N,value:S}=j.target;o(A=>({...A,[N]:S}))},g=j=>{if(j.preventDefault(),!s)return;(Date.now()-f)/1e3<3&&console.warn("Submission too fast, likely a bot."),t("confirm"),window.scrollTo(0,0)},x=()=>{t("input"),window.scrollTo(0,0)},y=async()=>{h(!0);try{if(!(await fetch("/api/send-mail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,_t:Date.now()})})).ok)throw new Error("éä¿¡ã«å¤±æãã¾ããã");t("complete"),window.scrollTo(0,0)}catch(j){console.error("Submission error:",j),alert("ç³ã訳ããã¾ãããéä¿¡ä¸ã«ã¨ã©ã¼ãçºçãã¾ãããæéãããã¦å度ã試ãããã ãããç´æ¥ã¡ã¼ã«ã«ã¦ãåãåãããã ããã")}finally{h(!1)}},v=()=>n.jsx("div",{className:"bg-gray-50 border-b border-gray-200",children:n.jsx("div",{className:"container mx-auto px-4 max-w-3xl py-12",children:n.jsx("div",{className:"flex items-center justify-center",children:[{id:"input",step:"01",label:"å
¥å"},{id:"confirm",step:"02",label:"確èª"},{id:"complete",step:"03",label:"å®äº"}].map((j,N)=>{const S=e===j.id,A=e==="confirm"&&j.id==="input"||e==="complete";return n.jsxs(Co.Fragment,{children:[n.jsxs("div",{className:"flex flex-col items-center gap-3",children:[n.jsxs("span",{className:`text-[10px] font-black tracking-[0.3em] ${S||A?"text-blue-600":"text-gray-300"}`,children:["STEP ",j.step]}),n.jsx("span",{className:`text-sm font-black tracking-[0.2em] ${S||A?"text-gray-900":"text-gray-300"}`,children:j.label})]}),N<2&&n.jsx("div",{className:`w-16 md:w-24 h-px mx-6 md:mx-10 mt-5 transition-colors duration-500 ${A?"bg-blue-600":"bg-gray-200"}`})]},j.step)})})})});return n.jsxs("main",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"CONTACT",titleJa:"ãåãåãã"}),v(),n.jsx("section",{className:"py-24",children:n.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:n.jsxs(an,{mode:"wait",children:[e==="input"&&n.jsxs(Ce.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},children:[n.jsx("div",{className:"mb-8 text-center",children:n.jsx("p",{className:"text-sm text-gray-500 font-bold",children:"以ä¸ã®ãã©ã¼ã ããå¿
è¦äºé
ããå
¥åã®ä¸ãéä¿¡ãã¦ãã ããã"})}),n.jsxs("div",{className:"mb-12 max-w-2xl mx-auto text-center",children:[n.jsx("span",{className:"text-[10px] font-black tracking-[0.4em] text-gray-400 uppercase block mb-3",children:"Notice"}),n.jsx("p",{className:"text-sm font-bold text-gray-800 tracking-wider mb-3",children:"å¶æ¥ç®çã§ã®ãé£çµ¡ã¯ãé æ
®ãã ããã"}),n.jsxs("p",{className:"text-xs text-gray-500 font-medium leading-[1.9]",children:["æ¬ãã©ã¼ã ã¯äºæ¥ã»ãµã¼ãã¹ã«é¢ãããç¸è«ãæ¡ç¨ã»åæçã®ãåãåããå°ç¨ã§ãã",n.jsx("br",{className:"hidden md:block"}),"å¶æ¥ã»å£²ãè¾¼ã¿ç®çã®ã¡ãã»ã¼ã¸ã«ã¤ãã¾ãã¦ã¯ãååãè¿äºãããããã¾ãã"]})]}),n.jsxs("form",{className:"space-y-0 border-t-2 border-gray-900",onSubmit:g,children:[n.jsx("div",{style:{position:"absolute",left:"-9999px",top:"auto",width:"1px",height:"1px",overflow:"hidden"},children:n.jsx("input",{type:"text",name:"confirm_email_field",value:a.confirm_email_field,onChange:m,tabIndex:-1,autoComplete:"off"})}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãåãåããé
ç®"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsxs("select",{name:"category",value:a.category,onChange:m,className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold appearance-none bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23cbd5e1%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E')] bg-[length:18px] bg-[right_1rem_center] bg-no-repeat",required:!0,children:[n.jsx("option",{value:"",children:"鏿ãã¦ãã ãã"}),n.jsx("option",{value:"business",children:"äºæ¥ã«é¢ãããåãåãã"}),n.jsx("option",{value:"service",children:"ãµã¼ãã¹ã«é¢ãããåãåãã"}),n.jsx("option",{value:"partner",children:"ãã¼ããã¼ã·ããã»åæ¥ã«ã¤ãã¦"}),n.jsx("option",{value:"recruit",children:"æ¡ç¨ã«é¢ãããåãåãã"}
380),n.jsx("option",{value:"press",children:"åæã»ãã¬ã¹ã«é¢ãããåãåãã"}),n.jsx("option",{value:"other",children:"ãã®ä»"})]})})]}),a.category&&n.jsxs(n.Fragment,{children:[(a.category==="business"||a.category==="service"||a.category==="partner")&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"貴社å / çµç¹å"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"company",value:a.company,onChange:m,placeholder:"æ ªå¼ä¼ç¤¾MetaHeroes",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-gray-400 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"ä»»æ"}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"é¨ç½²å / å½¹è·å"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"department",value:a.department,onChange:m,placeholder:"åºå ±é¨ ããã¼ã¸ã£ã¼",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold"})})]})]}),a.category==="recruit"&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ç¾å¨ã®è·æ¥ / æå±"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"occupation",value:a.occupation,onChange:m,placeholder:"ä¾ï¼IT伿¥ å¤å / 大å¦4å¹´",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]})}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãåå"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"name",value:a.name,onChange:m,placeholder:"Meta 太é",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ã¡ã¼ã«ã¢ãã¬ã¹"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"email",name:"email",value:a.email,onChange:m,placeholder:"[email protected]",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-start gap-3 pt-10",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm mt-1",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãåãåããå
容"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("textarea",{name:"content",value:a.content,onChange:m,rows:10,placeholder:"詳細ã«ãè¨å
¥ãã ããã",className:"w-full border border-gray-300 py-3.5 px-4 outline-none font-bold resize-none",required:!0})})]}),n.jsxs("div",{className:"py-20 text-center space-y-10",children:[n.jsxs("p",{className:"text-xs text-gray-500 font-bold leading-relaxed",children:["ãå
¥åããã ããå人æ
å ±ã¯ããåãåããã¸ã®åçããã³æ
å ±æä¾ã®ããã«ã®ã¿å©ç¨ãã",n.jsx("br",{className:"hidden md:block"}),"ãã®ä»ã®ç®çã§å©ç¨ãããã¨ã¯ãããã¾ããããã¡ãã®",n.jsx(q,{to:"/contact/privacy",className:"text-blue-600 hover:underline mx-1",children:"ãå人æ
å ±ã®åæ±ãã«ã¤ãã¦ã"}),"ã«åæã®ä¸ãéä¿¡ãã¦ãã ããã"]}),n.jsxs("label",{className:"flex items-center justify-center gap-3 cursor-pointer group",children:[n.jsxs("div",{className:"relative w-5 h-5",children:[n.jsx("input",{type:"checkbox",className:"sr-only",checked:s,onChange:j=>i(j.target.checked)}),n.jsx("div",{className:`w-full h-full border-2 transition-all rounded-sm flex items-center justify-center ${s?"border-blue-600 bg-blue-50":"border-gray-300 bg-white"}`,children:n.jsx("svg",{className:`w-3.5 h-3.5 text-blue-600 transition-transform ${s?"scale-100":"scale-0"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:4,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})]}),n.jsx("span",{className:"text-sm font-black text-gray-900 group-hover:text-blue-600 transition-colors",children:"å人æ
å ±ã®åãæ±ãã«åæãã"})]}),n.jsx("div",{className:"pt-6",children:n.jsxs("button",{type:"submit",disabled:!s,className:`inline-flex items-center justify-center px-20 py-5 text-sm font-black tracking-[0.3em] transition-all duration-500 min-w-[340px] border-2 ${s?"bg-gray-900 text-white border-gray-900 hover:bg-white hover:text-gray-900":"bg-gray-100 text-gray-300 border-gray-100 cursor-not-allowed"}`,children:["å
容ã確èªãã",n.jsx(ya,{className:"ml-2 w-5 h-5"})]})})]})]})]})]},"input"),e==="confirm"&&n.jsxs(Ce.div,{initial:{opacity:0,x:20}
380,animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:[n.jsx("div",{className:"mb-12 text-center",children:n.jsx("p",{className:"text-sm text-gray-500 font-bold",children:"å
¥åå
容ãã確èªãã ããããããããã°ãéä¿¡ããããã¿ã³ãæ¼ãã¦ãã ããã"})}),n.jsxs("div",{className:"border-t-2 border-gray-900 bg-gray-50/30",children:[n.jsx(Ac,{label:"ãåãåããé
ç®",value:a.category}),a.company&&n.jsx(Ac,{label:"貴社å / çµç¹å",value:a.company}),a.department&&n.jsx(Ac,{label:"é¨ç½²å / å½¹è·å",value:a.department}),a.occupation&&n.jsx(Ac,{label:"ç¾å¨ã®è·æ¥ / æå±",value:a.occupation}),n.jsx(Ac,{label:"ãåå",value:a.name}),n.jsx(Ac,{label:"ã¡ã¼ã«ã¢ãã¬ã¹",value:a.email}),n.jsx(Ac,{label:"ãåãåããå
容",value:a.content})]}),n.jsxs("div",{className:"py-20 flex flex-col items-center gap-6",children:[n.jsxs("button",{onClick:y,disabled:c,className:"inline-flex items-center justify-center px-20 py-5 bg-blue-600 text-white text-sm font-black tracking-[0.3em] hover:bg-blue-700 shadow-xl shadow-blue-600/20 transition-all min-w-[340px]",children:[c?"éä¿¡ä¸...":"ãã®å
容ã§éä¿¡ãã",!c&&n.jsx(Qk,{className:"ml-2 w-4 h-4"})]}),n.jsxs("button",{onClick:x,disabled:c,className:"inline-flex items-center justify-center text-sm font-bold text-gray-400 hover:text-gray-900 transition-colors",children:[n.jsx(q0,{className:"mr-1 w-4 h-4"})," å
¥åç»é¢ã«æ»ã"]})]})]},"confirm"),e==="complete"&&n.jsxs(Ce.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"py-20 text-center space-y-8",children:[n.jsx("div",{className:"w-20 h-20 bg-blue-50 rounded-full flex items-center justify-center mx-auto text-blue-600 mb-8",children:n.jsx(Yk,{size:40})}),n.jsx("h2",{className:"text-3xl font-black text-gray-900 tracking-wider",children:"ãåãåããå®äº"}),n.jsxs("div",{className:"space-y-4 text-gray-600 font-bold leading-relaxed",children:[n.jsxs("p",{children:["ãåãåãããããã¨ããããã¾ããã",n.jsx("br",{}),"éä¿¡å
å®¹ã®æ§ããã¡ã¼ã«ã§ãéããã¾ããã®ã§ã確èªãã ããã"]}),n.jsxs("p",{className:"text-sm text-gray-400",children:["â»ã¡ã¼ã«ãå±ããªãå ´åã¯ãè¿·æã¡ã¼ã«ãã©ã«ããã確èªããã ããã",n.jsx("br",{}),"å度ãåãåããããé¡ããããã¾ãã"]})]}),n.jsx("div",{className:"pt-12",children:n.jsx(q,{to:"/",className:"inline-flex items-center justify-center px-12 py-4 border-2 border-gray-900 text-gray-900 text-sm font-black tracking-widest hover:bg-gray-900 hover:text-white transition-all",children:"ããããã¼ã¸ã¸æ»ã"})})]},"complete")]})})})]})},Ac=({label:r,value:e})=>n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsx("div",{className:"bg-gray-50 px-8 py-6 font-bold text-gray-500 text-sm tracking-wider flex items-center",children:r}),n.jsx("div",{className:"px-8 py-6 bg-white font-black text-gray-900 text-sm leading-relaxed whitespace-pre-wrap",children:e||"---"})]}),Sz=()=>n.jsxs("main",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"CONTACT PRIVACY",titleJa:"ãåãåããã«ãããå人æ
å ±ã®åãæ±ã"}),n.jsx("section",{className:"py-32",children:n.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[n.jsx("div",{className:"text-center mb-24",children:n.jsx("p",{className:"text-gray-500 font-medium leading-relaxed max-w-2xl mx-auto text-sm",children:"ãåãåããã«ããã£ã¦ã¯ã以ä¸ã®äºé
ã«ãåæããã ããä¸ã§ãæ
å ±ãéä¿¡ãã¦ãã ããã"})}),n.jsxs("div",{className:"space-y-24",children:[n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼çµç¹ã®åç§°åã¯æ°å"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"æ ªå¼ä¼ç¤¾ Meta Heroes"})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼å人æ
å ±ä¿è·ç®¡çè
ï¼è¥ããã¯ãã®ä»£ç人ï¼ã®æ°ååã¯è·åãæå±åã³é£çµ¡å
"}),n.jsxs("div",{className:"text-gray-600 font-medium",children:[n.jsx("p",{children:"å人æ
å ±ä¿è·ç®¡çè
ï¼å¨è¤ å"}),n.jsx("p",{children:"é£çµ¡å
ï¼06-7777-3593"})]})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼å人æ
å ±ã®å©ç¨ç®ç"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"ãåãåããããã ããå
容ã«åçãããã"})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼å人æ
å ±ã®ç¬¬ä¸è
æä¾ã«ã¤ãã¦"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"åå¾ããå人æ
å ±ã¯ãæ³ä»¤çã«ããå ´åãé¤ãã¦ç¬¬ä¸è
ã«æä¾ãã¾ããã"})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼å人æ
å ±ã®åæ±ãã®å§è¨ã«ã¤ãã¦"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"åå¾ããå人æ
å ±ã®åæ±ãã®å
¨é¨åã¯ãä¸é¨ãå§è¨ãããã¨ã¯ããã¾ããã"})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼å人æ
å ±ãä¸ããªãã£ãå ´åã«çããçµæ"}
380),n.jsx("div",{className:"text-gray-600 font-medium text-justify md:text-center",children:"å人æ
å ±ãä¸ãããã¨ã¯ä»»æã§ããå人æ
å ±ã«é¢ããæ
å ±ã®ä¸é¨ããæä¾ããã ããªãå ´åã¯ããåãåããå
容ã«åçã§ããªãå¯è½æ§ãããã¾ãã"})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼ä¿æå人ãã¼ã¿ã®é示çããã³åãåããçªå£ã«ã¤ãã¦"}),n.jsxs("div",{className:"text-gray-600 font-medium text-justify md:text-center",children:["ãæ¬äººããã®æ±ãã«ãããå½ç¤¾ãä¿æããä¿æå人ãã¼ã¿ã«é¢ããé示ãå©ç¨ç®çã®éç¥ãå
容ã®è¨æ£ã»è¿½å ã¾ãã¯åé¤ãå©ç¨åæ¢ãæ¶å»ã第ä¸è
æä¾ã®åæ¢ããã³ç¬¬ä¸è
æä¾è¨é²ã®é示ï¼ä»¥ä¸ãé示çã¨ããï¼ã«å¿ãã¾ãã",n.jsx("br",{}),n.jsx("br",{}),"é示çã«å¿ããçªå£ã¯ãä¸è¨ãå½ç¤¾ã®å人æ
å ±ã®åæ±ãã«é¢ããè¦æ
ãç¸è«çã®ååãå
ããåç
§ãã¦ãã ããã"]})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼æ¬äººã容æã«èªèã§ããªãæ¹æ³ã«ããå人æ
å ±ã®åå¾"}),n.jsx("div",{className:"text-gray-600 font-medium text-justify md:text-center",children:"ã¯ããã¼ãã¦ã§ããã¼ã³ã³çãç¨ãããªã©ãã¦ãæ¬äººã容æã«èªèã§ããªãæ¹æ³ã«ããå人æ
å ±ã®åå¾ãè¡ã£ã¦ããã¾ããã"})]}),n.jsxs("section",{className:"flex flex-col items-center text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-400 tracking-widest mb-6",children:"ï¼ï¼ï¼å人æ
å ±ä¿è·æ¹é"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"å½ç¤¾ãã¼ã ãã¼ã¸ã®å人æ
å ±ä¿è·æ¹éãã覧ãã ããã"})]}),n.jsxs("section",{className:"pt-16 border-t border-gray-100 mt-32 text-center",children:[n.jsx("h2",{className:"text-sm font-bold text-gray-900 tracking-[0.2em] mb-12",children:"ï¼ï¼ï¼ï¼å½ç¤¾ã®å人æ
å ±ã®åæ±ãã«é¢ããè¦æ
ãç¸è«çã®ååãå
"}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-12 text-gray-700",children:[n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] font-bold text-gray-300 tracking-[0.3em] uppercase block mb-2",children:"Service Name"}),n.jsx("p",{className:"text-sm font-bold",children:"å人æ
å ±ååãçªå£"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] font-bold text-gray-300 tracking-[0.3em] uppercase block mb-2",children:"Officer"}),n.jsx("p",{className:"text-sm font-bold",children:"ãåãåããçªå£æ
å½ï¼å¨è¤ å"})]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] font-bold text-gray-300 tracking-[0.3em] uppercase block mb-2",children:"Telephone"}),n.jsx("p",{className:"text-sm font-bold",children:"06-7777-3593"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] font-bold text-gray-300 tracking-[0.3em] uppercase block mb-2",children:"Address"}),n.jsxs("p",{className:"text-sm font-bold leading-relaxed",children:["ã530-0027",n.jsx("br",{}),"大éªåºå¤§éªå¸ååºå å±±çº1-5 ä¸å
±æ¢
ç°ãã«8F"]})]})]})]})]}),n.jsxs("div",{className:"pt-24 mt-24 border-t border-gray-100 flex flex-col items-center gap-4 text-center",children:[n.jsx("p",{className:"text-gray-300 font-medium text-[10px] tracking-[0.4em] uppercase",children:"Issued on November 4, 2025"}),n.jsx("div",{className:"w-8 h-px bg-gray-200"}),n.jsx("p",{className:"text-gray-900 font-bold tracking-widest text-sm",children:"æ ªå¼ä¼ç¤¾MetaHeroes"})]})]})]})})]}),mr=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),ko=[1/0,1/0,-1/0,-1/0],Bc=new Float32Array(ko),wj=[.001,0,0,.001,0,0],T2=1.35,fr={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},il={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Vp="pdfjs_internal_editor_",Be={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102}
380,ze={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,INK_COLOR_AND_OPACITY:24,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},Az={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},fs={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},Vy={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},rs={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},Ju={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Hv={ERRORS:0,WARNINGS:1,INFOS:5},$a={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},Km={moveTo:0,lineTo:1,curveTo:2,quadraticCurveTo:3,closePath:4},_z={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let zv=Hv.WARNINGS;function Ez(r){Number.isInteger(r)&&(zv=r)}function Cz(){return zv}function Vv(r){zv>=Hv.INFOS&&console.info(`Info: ${r}`)}function He(r){zv>=Hv.WARNINGS&&console.warn(`Warning: ${r}`)}function it(r){throw new Error(r)}function Ft(r,e){r||it(e)}function Tz(r){switch(r==null?void 0:r.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function cP(r,e=null,t=null){if(!r)return null;if(t&&typeof r=="string"){if(t.addDefaultProtocol&&r.startsWith("www.")){const i=r.match(/\./g);(i==null?void 0:i.length)>=2&&(r=`http://${r}`)}if(t.tryConvertEncoding)try{r=Iz(r)}catch{}}const s=e?URL.parse(r,e):URL.parse(r);return Tz(s)?s:null}function dP(r,e,t=!1){const s=URL.parse(r);return s?(s.hash=e,s.href):t&&cP(r,"http://example.com")?r.split("#",1)[0]+`${e?`#${e}`:""}`:""}function jj(r){return r.substring(r.lastIndexOf("/")+1)}function $e(r,e,t,s=!1){return Object.defineProperty(r,e,{value:t,enumerable:!s,configurable:!0,writable:!1}),t}const pu=(function(){function e(t,s){this.message=t,this.name=s}return e.prototype=new Error,e.constructor=e,e})();class jC extends pu{constructor(e,t){super(e,"PasswordException"),this.code=t}}class P2 extends pu{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class Nj extends pu{constructor(e){super(e,"InvalidPDFException")}}class Hb extends pu{constructor(e,t,s){super(e,"ResponseException"),this.status=t,this.missing=s}}class Pz extends pu{constructor(e){super(e,"FormatError")}}class ac extends pu{constructor(e){super(e,"AbortException")}}function Rz(r){(typeof r!="object"||(r==null?void 0:r.length)===void 0)&&it("Invalid argument for bytesToString");const e=r.length,t=8192;if(e<t)return String.fromCharCode.apply(null,r);const s=[];for(let i=0;i<e;i+=t){const a=Math.min(i+t,e),o=r.subarray(i,a);s.push(String.fromCharCode.apply(null,o))}return s.join("")}function Wv(r){typeof r!="string"&&it("Invalid argument for stringToBytes");const e=r.length,t=new Uint8Array(e);for(let s=0;s<e;++s)t[s]=r.charCodeAt(s)&255;return t}
vendor: 4,169 bytes, line 380
380function Mz(){const r=new Uint8Array(4);return r[0]=1,new Uint32Array(r.buffer,0,1)[0]===1}class ls{static get isLittleEndian(){return $e(this,"isLittleEndian",Mz())}static get isOffscreenCanvasSupported(){return $e(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return $e(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get isFloat16ArraySupported(){return $e(this,"isFloat16ArraySupported",typeof Float16Array<"u")}static get isSanitizerSupported(){return $e(this,"isSanitizerSupported",typeof Sanitizer<"u")}static get platform(){const{platform:e,userAgent:t}=navigator;return $e(this,"platform",{isAndroid:t.includes("Android"),isLinux:e.includes("Linux"),isMac:e.includes("Mac"),isWindows:e.includes("Win"),isFirefox:t.includes("Firefox")})}static get isCSSRoundSupported(){var e,t;return $e(this,"isCSSRoundSupported",(t=(e=globalThis.CSS)==null?void 0:e.supports)==null?void 0:t.call(e,"width: round(1.5px, 1px)"))}static get isAlphaColorInputSupported(){return $e(this,"isAlphaColorInputSupported",(()=>{if(typeof document>"u")return!1;const e=document.createElement("input");return e.type="color",e.setAttribute("alpha",""),e.value="#ff000080",e.value!=="#ff0000"})())}}var Ao,Wy,kj;class me{static get hexNums(){return $e(this,"hexNums",Array.from(Array(256).keys(),e=>e.toString(16).padStart(2,"0")))}static makeHexColor(e,t,s){return`#${this.hexNums[e]}${this.hexNums[t]}${this.hexNums[s]}`}static domMatrixToTransform(e){return[e.a,e.b,e.c,e.d,e.e,e.f]}static scaleMinMax(e,t){let s;e[0]?(e[0]<0&&(s=t[0],t[0]=t[2],t[2]=s),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(s=t[1],t[1]=t[3],t[3]=s),t[1]*=e[3],t[3]*=e[3]):(s=t[0],t[0]=t[1],t[1]=s,s=t[2],t[2]=t[3],t[3]=s,e[1]<0&&(s=t[1],t[1]=t[3],t[3]=s),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(s=t[0],t[0]=t[2],t[2]=s),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static multiplyByDOMMatrix(e,t){return[e[0]*t.a+e[2]*t.b,e[1]*t.a+e[3]*t.b,e[0]*t.c+e[2]*t.d,e[1]*t.c+e[3]*t.d,e[0]*t.e+e[2]*t.f+e[4],e[1]*t.e+e[3]*t.f+e[5]]}static applyTransform(e,t,s=0){const i=e[s],a=e[s+1];e[s]=i*t[0]+a*t[2]+t[4],e[s+1]=i*t[1]+a*t[3]+t[5]}static applyTransformToBezier(e,t,s=0){const i=t[0],a=t[1],o=t[2],c=t[3],h=t[4],f=t[5];for(let m=0;m<6;m+=2){const g=e[s+m],x=e[s+m+1];e[s+m]=g*i+x*o+h,e[s+m+1]=g*a+x*c+f}}static applyInverseTransform(e,t){const s=e[0],i=e[1],a=t[0]*t[3]-t[1]*t[2];e[0]=(s*t[3]-i*t[2]+t[2]*t[5]-t[4]*t[3])/a,e[1]=(-s*t[1]+i*t[0]+t[4]*t[1]-t[5]*t[0])/a}static axialAlignedBoundingBox(e,t,s){const i=t[0],a=t[1],o=t[2],c=t[3],h=t[4],f=t[5],m=e[0],g=e[1],x=e[2],y=e[3];let v=i*m+h,j=v,N=i*x+h,S=N,A=c*g+f,E=A,M=c*y+f,R=M;if(a!==0||o!==0){const I=a*m,F=a*x,D=o*g,O=o*y;v+=D,S+=D,N+=O,j+=O,A+=I,R+=I,M+=F,E+=F}s[0]=Math.min(s[0],v,N,j,S),s[1]=Math.min(s[1],A,M,E,R),s[2]=Math.max(s[2],v,N,j,S),s[3]=Math.max(s[3],A,M,E,R)}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e,t){const s=e[0],i=e[1],a=e[2],o=e[3],c=s**2+i**2,h=s*a+i*o,f=a**2+o**2,m=(c+f)/2,g=Math.sqrt(m**2-(c*f-h**2));t[0]=Math.sqrt(m+g||1),t[1]=Math.sqrt(m-g||1)}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const s=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),i=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(s>i)return null;const a=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),o=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return a>o?null:[s,a,i,o]}static pointBoundingBox(e,t,s){s[0]=Math.min(s[0],e),s[1]=Math.min(s[1],t),s[2]=Math.max(s[2],e),s[3]=Math.max(s[3],t)}static rectBoundingBox(e,t,s,i,a){a[0]=Math.min(a[0],e,s),a[1]=Math.min(a[1],t,i),a[2]=Math.max(a[2],e,s),a[3]=Math.max(a[3],t,i)}static bezierBoundingBox(e,t,s,i,a,o,c,h,f){f[0]=Math.min(f[0],e,c),f[1]=Math.min(f[1],t,h),f[2]=Math.max(f[2],e,c),f[3]=Math.max(f[3],t,h),P(this,Ao,kj).call(this,e,s,a,
380c,t,i,o,h,3*(-e+3*(s-a)+c),6*(e-2*s+a),3*(s-e),f),P(this,Ao,kj).call(this,e,s,a,c,t,i,o,h,3*(-t+3*(i-o)+h),6*(t-2*i+o),3*(i-t),f)}}Ao=new WeakSet,Wy=function(e,t,s,i,a,o,c,h,f,m){if(f<=0||f>=1)return;const g=1-f,x=f*f,y=x*f,v=g*(g*(g*e+3*f*t)+3*x*s)+y*i,j=g*(g*(g*a+3*f*o)+3*x*c)+y*h;m[0]=Math.min(m[0],v),m[1]=Math.min(m[1],j),m[2]=Math.max(m[2],v),m[3]=Math.max(m[3],j)},kj=function(e,t,s,i,a,o,c,h,f,m,g,x){if(Math.abs(f)<1e-12){Math.abs(m)>=1e-12&&P(this,Ao,Wy).call(this,e,t,s,i,a,o,c,h,-g/m,x);return}const y=m**2-4*g*f;if(y<0)return;const v=Math.sqrt(y),j=2*f;P(this,Ao,Wy).call(this,e,t,s,i,a,o,c,h,(-m+v)/j,x),P(this,Ao,Wy).call(this,e,t,s,i,a,o,c,h,(-m-v)/j,x)},C(me,Ao);function Iz(r){return decodeURIComponent(escape(r))}let R2=null,NC=null;function Lz(r){return R2||(R2=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NC=new Map([["ï¬
","ſt"]])),r.replaceAll(R2,(e,t,s)=>t?t.normalize("NFKC"):NC.get(s))}function uP(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const r=new Uint8Array(32);return crypto.getRandomValues(r),Rz(r)}const fh="pdfjs_internal_id_";function Dz(r,e,t){if(!Array.isArray(t)||t.length<2)return!1;const[s,i,...a]=t;if(!r(s)&&!Number.isInteger(s)||!e(i))return!1;const o=a.length;let c=!0;switch(i.name){case"XYZ":if(o<2||o>3)return!1;break;case"Fit":case"FitB":return o===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(o>1)return!1;break;case"FitR":if(o!==4)return!1;c=!1;break;default:return!1}for(const h of a)if(!(typeof h=="number"||c&&h===null))return!1;return!0}const Zk=()=>[],e5=()=>new Map,Sj=()=>Object.create(null);function Pt(r,e,t){return Math.min(Math.max(r,e),t)}class Wp{static textContent(e){const t=[],s={items:t,styles:Object.create(null)};function i(a){var h;if(!a)return;let o=null;const c=a.name;if(c==="#text")o=a.value;else if(Wp.shouldBuildText(c))(h=a==null?void 0:a.attributes)!=null&&h.textContent?o=a.attributes.textContent:a.value&&(o=a.value);else return;if(o!==null&&t.push({str:o}),!!a.children)for(const f of a.children)i(f)}return i(e),s}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}}class hP{static setupStorage(e,t,s,i,a){const o=i.getValue(t,{value:null});switch(s.name){case"textarea":if(o.value!==null&&(e.textContent=o.value),a==="print")break;e.addEventListener("input",c=>{i.setValue(t,{value:c.target.value})});break;case"input":if(s.attributes.type==="radio"||s.attributes.type==="checkbox"){if(o.value===s.attributes.xfaOn?e.setAttribute("checked",!0):o.value===s.attributes.xfaOff&&e.removeAttribute("checked"),a==="print")break;e.addEventListener("change",c=>{i.setValue(t,{value:c.target.checked?c.target.getAttribute("xfaOn"):c.target.getAttribute("xfaOff")})})}else{if(o.value!==null&&e.setAttribute("value",o.value),a==="print")break;e.addEventListener("input",c=>{i.setValue(t,{value:c.target.value})})}break;case"select":if(o.value!==null){e.setAttribute("value",o.value);for(const c of s.children)c.attributes.value===o.value?c.attributes.selected=!0:Object.hasOwn(c.attributes,"selected")&&delete c.attributes.selected}e.addEventListener("input",c=>{const h=c.target.options,f=h.selectedIndex===-1?"":h[h.selectedIndex].value;i.setValue(t,{value:f})});break}}static setAttributes({html:e,element:t,storage:s=null,intent:i,linkService:a}){const{attributes:o}=t,c=e instanceof HTMLAnchorElement;o.type==="radio"&&(o.name=`${o.name}-${i}`);for(const[h,f]of Object.entries(o))if(f!=null)switch(h){case"class":f.length&&e.setAttribute(h,f.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",f);break;case"style":Object.assign(e.style,f);break;case"textContent":e.textContent=f;break;default:(!c||h!=="href"&&h!=="newWindow")&&e.setAttribute(h,f)}c&&a.addLinkAttributes(e,o.href,o.newWindow),s&&o.dataId&&this.setupStorage(e,o.dataId,t,s)}static render(e){var g,x;const t=e.annotationStorage,s=e.linkService,i=e.xfaHtml,a=e.intent||"display",o=document.createElement(i.name);i.attributes&&this.setAttributes({html:o,element:i,intent:a,linkService:s});const c=a!=="richText",h=e.div;if(h.append(o),e.viewport){const y=`matrix(${e.viewport.transform.join(",")})`;h.style.transform=y}c&&h.setAttribute("class","xfaLayer xfaFont");const f=[];if(i.children.length===0){if(i.value){const y=document.createTextNode(i.value);o.append(y),c&&Wp.shouldBuildText(i.name)&&f.push(y)}return{textDivs:f}}const m=[[i,-1,o]];for(;m.length>0;){const[y,v,j]=m.at(-1);
380if(v+1===y.children.length){m.pop();continue}const N=y.children[++m.at(-1)[1]];if(N===null)continue;const{name:S}=N;if(S==="#text"){const E=document.createTextNode(N.value);f.push(E),j.append(E);continue}const A=(g=N==null?void 0:N.attributes)!=null&&g.xmlns?document.createElementNS(N.attributes.xmlns,S):document.createElement(S);if(j.append(A),N.attributes&&this.setAttributes({html:A,element:N,storage:t,intent:a,linkService:s}),((x=N.children)==null?void 0:x.length)>0)m.push([N,-1,A]);else if(N.value){const E=document.createTextNode(N.value);c&&Wp.shouldBuildText(S)&&f.push(E),A.append(E)}}for(const y of h.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))y.setAttribute("readOnly",!0);return{textDivs:f}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const Ma="http://www.w3.org/2000/svg",Ic=class Ic{};Y(Ic,"CSS",96),Y(Ic,"PDF",72),Y(Ic,"PDF_TO_CSS_UNITS",Ic.CSS/Ic.PDF);let oc=Ic;async function t5(r,e="text"){if(Pp(r,document.baseURI)){const t=await fetch(r);if(!t.ok)throw new Error(t.statusText);switch(e){case"blob":return t.blob();case"bytes":return t.bytes();case"json":return t.json()}return t.text()}return new Promise((t,s)=>{const i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType=e==="bytes"?"arraybuffer":e,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(e){case"bytes":t(new
380Uint8Array(i.response));return;case"blob":case"json":t(i.response);return}t(i.responseText);return}s(new Error(i.statusText))}},i.send(null)})}class X0{constructor({viewBox:e,userUnit:t,scale:s,rotation:i,offsetX:a=0,offsetY:o=0,dontFlip:c=!1}){this.viewBox=e,this.userUnit=t,this.scale=s,this.rotation=i,this.offsetX=a,this.offsetY=o,s*=t;const h=(e[2]+e[0])/2,f=(e[3]+e[1])/2;let m,g,x,y;switch(i%=360,i<0&&(i+=360),i){case 180:m=-1,g=0,x=0,y=1;break;case 90:m=0,g=1,x=1,y=0;break;case 270:m=0,g=-1,x=-1,y=0;break;case 0:m=1,g=0,x=0,y=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(x=-x,y=-y);let v,j,N,S;m===0?(v=Math.abs(f-e[1])*s+a,j=Math.abs(h-e[0])*s+o,N=(e[3]-e[1])*s,S=(e[2]-e[0])*s):(v=Math.abs(h-e[0])*s+a,j=Math.abs(f-e[1])*s+o,N=(e[2]-e[0])*s,S=(e[3]-e[1])*s),this.transform=[m*s,g*s,x*s,y*s,v-m*s*h-x*s*f,j-g*s*h-y*s*f],this.width=N,this.height=S}get rawDims(){const e=this.viewBox;return $e(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:a=!1}={}){return new X0({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:e,rotation:t,offsetX:s,offsetY:i,dontFlip:a})}convertToViewportPoint(e,t){const s=[e,t];return me.applyTransform(s,this.transform),s}convertToViewportRectangle(e){const t=[e[0],e[1]];me.applyTransform(t,this.transform);const s=[e[2],e[3]];return me.applyTransform(s,this.transform),[t[0],t[1],s[0],s[1]]}convertToPdfPoint(e,t){const s=[e,t];return me.applyInverseTransform(s,this.transform),s}}class s5 extends pu{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function Gv(r){const e=r.length;let t=0;for(;t<e&&r[t].trim()==="";)t++;return r.substring(t,t+5).toLowerCase()==="data:"}function n5(r){return typeof r=="string"&&/\.pdf$/i.test(r)}function Oz(r){return[r]=r.split(/[#?]/,1),jj(r)}function Fz(r,e="document.pdf"){if(typeof r!="string")return e;if(Gv(r))return He('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const s=(c=>{try{return new URL(c)}catch{try{return new URL(decodeURIComponent(c))}catch{try{return new URL(c,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(c),"https://foo.bar")}catch{return null}}}}})(r);if(!s)return e;const i=c=>{try{let h=decodeURIComponent(c);return h.includes("/")&&(h=jj(h),/^\.pdf$/i.test(h))?c:h}catch{return c}},a=/\.pdf$/i,o=jj(s.pathname);if(a.test(o))return i(o);if(s.searchParams.size>0){const c=f=>[...f].findLast(m=>a.test(m)),h=c(s.searchParams.values())??c(s.searchParams.keys());if(h)return i(h)}if(s.hash){const h=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(s.hash);if(h)return i(h[0])}return e}var ll;class kC{constructor(){C(this,ll,new Map);Y(this,"times",[])}time(e){u(this,ll).has(e)&&He(`Timer is already running for ${e}`),u(this,ll).set(e,Date.now())}timeEnd(e){u(this,ll).has(e)||He(`Timer has not been started for ${e}`),this.times.push({name:e,start:u(this,ll).get(e),end:Date.now()}),u(this,ll).delete(e)}toString(){const e=Math.max(...this.times.map(t=>t.name.length));return this.times.map(t=>`${t.name.padEnd(e)} ${t.end-t.start}ms 381`).join("")}}ll=new WeakMap;function Pp(r,e){const t=e?URL.parse(r,e):URL.parse(r);return/https?:/.test((t==null?void 0:t.protocol)??"")}function Jr(r){r.preventDefault()}function Ot(r){r.preventDefault(),r.stopPropagation()}function Bz(r){console.log("Deprecated API usage: "+r)}var ng;class zb{static toDateObject(e){if(e instanceof Date)return e;if(!e||typeof e!="string")return null;u(this,ng)||k(this,ng,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=u(this,ng).exec(e);if(!t)return null;const s=parseInt(t[1],10);let i=parseInt(t[2],10);i=i>=1&&i<=12?i-1:0;let a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;let o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;let c=parseInt(t[5],10);c=c>=0&&c<=59?c:0;let h=parseInt(t[6],10);h=h>=0&&h<=59?h:0;const f=t[7]||"Z";let m=parseInt(t[8],10);m=m>=0&&m<=23?m:0;let g=parseInt(t[9],10)||0;return g=g>=0&&g<=59?g:0,f==="-"?(o+=m,c+=g):f==="+"&&(o-=m,c-=g),new Date(Date.UTC(s,i,a,o,c,h))}}ng=new WeakMap,C(zb,ng);function $z(r,{scale:e=1,rotation:t=0}){const{width:s,height:i}=r.attributes.style,a=[0,0,parseInt(s,10),parseInt(i,10)];return new X0({viewBox:a,userUnit:1,scale:e,rotation:t})}function r5(r){if(r.startsWith("#")){const t=r.slice(1);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),t.length>=8?parseInt(t.slice(6,8),16)/255:1]}if(r.startsWith("rgb(")){const[t,s,i]=r.slice(4,-1).split(",").map(a=>parseInt(a,10));return[t,s,i,1]}if(r.startsWith("rgba(")){const t=r.slice(5,-1).split(",");return[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),parseFloat(t[3])]}const e=r.match(/^color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+|none))?\)$/);return e?[Math.round(parseFloat(e[1])*255),Math.round(parseFloat(e[2])*255),Math.round(parseFloat(e[3])*255),e[4]!==void 0&&e[4]!=="none"?parseFloat(e[4]):1]:null}function Y0(r){const e=r5(r);return e?e.slice(0,3):(He(`Not a valid color format: "${r}"`),[0,0,0])}function Uz(r){const e=document.createElement("span");e.style.visibility="hidden",e.style.colorScheme="only light",document.body.append(e);for(const t of r.keys()){e.style.color=t;
381const s=window.getComputedStyle(e).color;r.set(t,Y0(s))}e.remove()}function At(r){const{a:e,b:t,c:s,d:i,e:a,f:o}=r.getTransform();return[e,t,s,i,a,o]}function $i(r){const{a:e,b:t,c:s,d:i,e:a,f:o}=r.getTransform().invertSelf();return[e,t,s,i,a,o]}function uu(r,e,t=!1,s=!0){if(e instanceof X0){const{pageWidth:i,pageHeight:a}=e.rawDims,{style:o}=r,c=ls.isCSSRoundSupported,h=`var(--total-scale-factor) * ${i}px`,f=`var(--total-scale-factor) * ${a}px`,m=c?`round(down, ${h}, var(--scale-round-x))`:`calc(${h})`,g=c?`round(down, ${f}, var(--scale-round-y))`:`calc(${f})`;!t||e.rotation%180===0?(o.width=m,o.height=g):(o.width=g,o.height=m)}s&&r.setAttribute("data-main-rotation",e.rotation)}class ba{constructor(){const{pixelRatio:e}=ba;this.sx=e,this.sy=e}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(e,t,s,i,a=-1){let o=1/0,c=1/0,h=1/0;s=ba.capPixels(s,a),s>0&&(o=Math.sqrt(s/(e*t))),i!==-1&&(c=i/e,h=i/t);const f=Math.min(o,c,h);return this.sx>f||this.sy>f?(this.sx=f,this.sy=f,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(e,t){if(t>=0){const s=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+t/100));return e>0?Math.min(e,s):s}return e}}const Aj=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class Hz{static get isDarkMode(){var e;return $e(this,"isDarkMode",!!((e=window==null?void 0:window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches))}}class zz{static get commentForegroundColor(){const e=document.createElement("span");e.classList.add("comment","sidebar");const{style:t}=e;t.width=t.height="0",t.display="none",t.color="var(--comment-fg-color)",document.body.append(e);const{color:s}=window.getComputedStyle(e);return e.remove(),$e(this,"commentForegroundColor",Y0(s))}}function Vz(r,e){e=Pt(e??1,0,1);const t=255*(1-e);return r.map(s=>Math.round(s*e+t))}function SC(r,e){const t=r[0]/255,s=r[1]/255,i=r[2]/255,a=Math.max(t,s,i),o=Math.min(t,s,i),c=(a+o)/2;if(a===o)e[0]=e[1]=0;else{const h=a-o;switch(e[1]=c<.5?h/(a+o):h/(2-a-o),a){case t:e[0]=((s-i)/h+(s<i?6:0))*60;break;case s:e[0]=((i-t)/h+2)*60;break;case i:e[0]=((t-s)/h+4)*60;break}}e[2]=c}function _j(r,e){const t=r[0],s=r[1],i=r[2],a=(1-Math.abs(2*i-1))*s,o=a*(1-Math.abs(t/60%2-1)),c=i-a/2;switch(Math.floor(t/60)){case 0:e[0]=a+c,e[1]=o+c,e[2]=c;break;case 1:e[0]=o+c,e[1]=a+c,e[2]=c;break;case 2:e[0]=c,e[1]=a+c,e[2]=o+c;break;case 3:e[0]=c,e[1]=o+c,e[2]=a+c;break;case 4:e[0]=o+c,e[1]=c,e[2]=a+c;break;case 5:case 6:e[0]=a+c,e[1]=c,e[2]=o+c;break}}function AC(r){return r<=.03928?r/12.92:((r+.055)/1.055)**2.4}function _C(r,e,t){_j(r,t),t.map(AC);const s=.2126*t[0]+.7152*t[1]+.0722*t[2];_j(e,t),t.map(AC);const i=.2126*t[0]+.7152*t[1]+.0722*t[2];return s>i?(s+.05)/(i+.05):(i+.05)/(s+.05)}const EC=new Map;function Wz(r,e){const t=r[0]+r[1]*256+r[2]*65536+e[0]*16777216+e[1]*4294967296+e[2]*1099511627776;let s=EC.get(t);if(s)return s;const i=new Float32Array(9),a=i.subarray(0,3),o=i.subarray(3,6);SC(r,o);const c=i.subarray(6,9);SC(e,c);const h=c[2]<.5,f=h?12:4.5;if(o[2]=h?Math.sqrt(o[2]):1-Math.sqrt(1-o[2]),_C(o,c,a)<f){let m,g;h?(m=o[2],g=1):(m=0,g=o[2]);const x=.005;for(;g-m>x;){const y=o[2]=(m+g)/2;h===_C(o,c,a)<f?m=y:g=y}o[2]=h?g:m}return _j(o,a),s=me.makeHexColor(Math.round(a[0]*255),Math.round(a[1]*255),Math.round(a[2]*255)),EC.set(t,s),s}function fP({html:r,dir:e,className:t},s){const i=document.createDocumentFragment();if(typeof r=="string"){const a=document.createElement("p");a.dir=e||"auto";const o=r.split(/(?:\r\n?|\n)/);for(let c=0,h=o.length;c<h;++c){const f=o[c];a.append(document.createTextNode(f)),c<h-1&&a.append(document.createElement("br"))}i.append(a)}else hP.render({xfaHtml:r,div:i,intent:"richText"});i.firstElementChild.classList.add("richText",t),s.append(i)}function mP(r){const e=new Path2D;if(!r)return e;for(let t=0,s=r.length;t<s;)switch(r[t++]){case Km.moveTo:e.moveTo(r[t++],r[t++]);break;case Km.lineTo:e.lineTo(r[t++],r[t++]);break;case Km.curveTo:e.bezierCurveTo(r[t++],r[t++],r[t++],r[t++],r[t++],r[t++]);break;case Km.quadraticCurveTo:e.quadraticCurveTo(r[t++],r[t++],r[t++],r[t++]);break;case Km.closePath:e.closePath();break;default:He(`Unrecognized drawing path operator: ${r[t-1]}`);break}return e}var cl,dl,Mr,Ir,rg,ul,bh,vh,ig,rv,pP,Ws,gP,xP,Qu,tp;const Fa=class Fa{constructor(e){C(this,Ws);C(this,cl,null);C(this,dl,null);C(this,Mr);C(this,Ir,null);C(this,rg,null);C(this,ul,null);C(this,bh,null);C(this,vh,null);k(this,Mr,e),u(Fa,ig)||k(Fa,ig,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const e=k(this,cl,document.createElement("div"));e.classList.add("editToolbar","hidden"),e.setAttribute("role","toolbar");const t=u(this,Mr)._uiManager._signal;t instanceof AbortSignal&&!t.aborted&&(e.addEventListener("contextmenu",Jr,{signal:t}),e.addEventListener("pointerdown",P(Fa,rv,pP),{signal:t}));const s=k(this,Ir,document.createElement("div"));s.className="buttons",e.append(s);const i=u(this,Mr).toolbarPosition;if(i){const{style:a}=e,o=u(this,Mr)._uiManager.direction==="ltr"?1-i[0]:i[0];a.insetInlineEnd=`${100*o}%`,a.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return e}get div(){return u(this,cl)}hide(){var e;u(this,cl).classList.add("hidden"),(e=u(this,dl))==null||e.hideDropdown()}show(){var e,t;u(this,cl).classList.remove("hidden"),(e=u(this,rg))==null||e.shown(),(t=u(this,ul))==null||t.shown()}
381addDeleteButton(){const{editorType:e,_uiManager:t}=u(this,Mr),s=document.createElement("button");s.classList.add("basic","deleteButton"),s.tabIndex=0,s.setAttribute("data-l10n-id",u(Fa,ig)[e]),P(this,Ws,Qu).call(this,s)&&s.addEventListener("click",i=>{t.delete()},{signal:t._signal}),u(this,Ir).append(s)}async addAltText(e){const t=await e.render();P(this,Ws,Qu).call(this,t),u(this,Ir).append(t,u(this,Ws,tp)),k(this,rg,e)}addComment(e,t=null){if(u(this,ul))return;const s=e.renderForToolbar();if(!s)return;P(this,Ws,Qu).call(this,s);const i=k(this,bh,u(this,Ws,tp));t?(u(this,Ir).insertBefore(s,t),u(this,Ir).insertBefore(i,t)):u(this,Ir).append(s,i),k(this,ul,e),e.toolbar=this}addColorPicker(e){if(u(this,dl))return;k(this,dl,e);const t=e.renderButton();P(this,Ws,Qu).call(this,t),u(this,Ir).append(t,u(this,Ws,tp))}async addEditSignatureButton(e){const t=k(this,vh,await e.renderEditButton(u(this,Mr)));P(this,Ws,Qu).call(this,t),u(this,Ir).append(t,u(this,Ws,tp))}removeButton(e){var t,s;switch(e){case"comment":(t=u(this,ul))==null||t.removeToolbarCommentButton(),k(this,ul,null),(s=u(this,bh))==null||s.remove(),k(this,bh,null);break}}async addButton(e,t){switch(e){case"colorPicker":t&&this.addColorPicker(t);break;case"altText":t&&await this.addAltText(t);break;case"editSignature":t&&await this.addEditSignatureButton(t);break;case"delete":this.addDeleteButton();break;case"comment":t&&this.addComment(t);break}}async addButtonBefore(e,t,s){if(!t&&e==="comment")return;const i=u(this,Ir).querySelector(s);i&&e==="comment"&&this.addComment(t,i)}updateEditSignatureButton(e){u(this,vh)&&(u(this,vh).title=e)}remove(){var e;u(this,cl).remove(),(e=u(this,dl))==null||e.destroy(),k(this,dl,null)}};cl=new WeakMap,dl=new WeakMap,Mr=new WeakMap,Ir=new WeakMap,rg=new WeakMap,ul=new WeakMap,bh=new WeakMap,vh=new WeakMap,ig=new WeakMap,rv=new WeakSet,pP=function(e){e.stopPropagation()},Ws=new WeakSet,gP=function(e){u(this,Mr)._focusEventsAllowed=!1,Ot(e)},xP=function(e){u(this,Mr)._focusEventsAllowed=!0,Ot(e)},Qu=function(e){const t=u(this,Mr)._uiManager._signal;return!(t instanceof AbortSignal)||t.aborted?!1:(e.addEventListener("focusin",P(this,Ws,gP).bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",P(this,Ws,xP).bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",Jr,{signal:t}),!0)},tp=function(){const e=document.createElement("div");return e.className="divider",e},C(Fa,rv),C(Fa,ig,null);let Ej=Fa;var ag,Uc,Ua,Po,yP,bP,Cj;class Gz{constructor(e){C(this,Po);C(this,ag,null);C(this,Uc,null);C(this,Ua);k(this,Ua,e)}show(e,t,s){const[i,a]=P(this,Po,bP).call(this,t,s),{style:o}=u(this,Uc)||k(this,Uc,P(this,Po,yP).call(this));e.append(u(this,Uc)),o.insetInlineEnd=`${100*i}%`,o.top=`calc(${100*a}% + var(--editor-toolbar-vert-offset))`}hide(){u(this,Uc).remove()}}ag=new WeakMap,Uc=new WeakMap,Ua=new WeakMap,Po=new WeakSet,yP=function(){const e=k(this,Uc,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar");const t=u(this,Ua)._signal;t instanceof AbortSignal&&!t.aborted&&e.addEventListener("contextmenu",Jr,{signal:t});const s=k(this,ag,document.createElement("div"));return s.className="buttons",e.append(s),u(this,Ua).hasCommentManager()&&P(this,Po,Cj).call(this,"commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{u(this,Ua).commentSelection("floating_button")}),P(this,Po,Cj).call(this,"highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{u(this,Ua).highlightSelection("floating_button")}),e},bP=function(e,t){let s=0,i=0;for(const a of e){const o=a.y+a.height;if(o<s)continue;const c=a.x+(t?a.width:0);if(o>s){i=c,s=o;continue}t?c>i&&(i=c):c<i&&(i=c)}return[t?1-i:i,s]},Cj=function(e,t,s,i){const a=document.createElement("button");a.classList.add("basic",e),a.tabIndex=0,a.setAttribute("data-l10n-id",t);const o=document.createElement("span");a.append(o),o.className="visuallyHidden",o.setAttribute("data-l10n-id",s);const c=u(this,Ua)._signal;c instanceof AbortSignal&&!c.aborted&&(a.addEventListener("contextmenu",Jr,{signal:c}),a.addEventListener("click",i,{signal:c})),u(this,ag).append(a)};function vP(r,e,t){for(const s of t)e.addEventListener(s,r[s].bind(r))}var Hc,zc,wh,Vc;const ut=class ut{static initializeAndAddPointerId(e){(u(ut,zc)||k(ut,zc,new Set)).add(e)}static setPointer(e,t){u(ut,Hc)||k(ut,Hc,t),u(ut,Vc)??k(ut,Vc,e)}static setTimeStamp(e){k(ut,wh,e)}static isSamePointerId(e){return u(ut,Hc)===e}static isSamePointerIdOrRemove(e){var t;return u(ut,Hc)===e?!0:((t=u(ut,zc))==null||t.delete(e),!1)}static isSamePointerType(e){return u(ut,Vc)===e}static isInitializedAndDifferentPointerType(e){return u(ut,Vc)!==null&&!ut.isSamePointerType(e)}static isSameTimeStamp(e){return u(ut,wh)===e}static isUsingMultiplePointers(){var e;return((e=u(ut,zc))==null?void 0:e.size)>=1}static clearPointerType(){k(ut,Vc,null)}static clearPointerIds(){k(ut,Hc,NaN),k(ut,zc,null)}static clearTimeStamp(){k(ut,wh,NaN)}};Hc=new WeakMap,zc=new WeakMap,wh=new WeakMap,Vc=new WeakMap,C(ut,Hc,NaN),C(ut,zc,null),C(ut,wh,NaN),C(ut,Vc,null);let Zs=ut;var iv;class qz{constructor(){C(this,iv,0)}get id(){return`${Vp}${ss(this,iv)._++}`}}iv=new WeakMap;var jh,og,en,Nh,Gy;const f5=class f5{constructor(){C(this,Nh);C(this,jh,uP());C(this,og,0);C(this,en,null)}static get _isSVGFittingCanvas(){const e='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',s=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i=new Image;i.src=e;const a=i.decode().then(()=>(s.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(s.getImageData(0,0,1,1).data.buffer)[0]===0));return $e(this,"_isSVGFittingCanvas",a)}async getFromFile(e){const{lastModified:t,name:s,size:i,type:a}=e;return P(this,Nh,Gy).call(this,`${t}_${s}_${i}_${a}`,e)}
381async getFromUrl(e){return P(this,Nh,Gy).call(this,e,e)}async getFromBlob(e,t){const s=await t;return P(this,Nh,Gy).call(this,e,s)}async getFromId(e){u(this,en)||k(this,en,new Map);const t=u(this,en).get(e);if(!t)return null;if(t.bitmap)return t.refCounter+=1,t;if(t.file)return this.getFromFile(t.file);if(t.blobPromise){const{blobPromise:s}=t;return delete t.blobPromise,this.getFromBlob(t.id,s)}return this.getFromUrl(t.url)}getFromCanvas(e,t){u(this,en)||k(this,en,new Map);let s=u(this,en).get(e);if(s!=null&&s.bitmap)return s.refCounter+=1,s;const i=new OffscreenCanvas(t.width,t.height);return i.getContext("2d").drawImage(t,0,0),s={bitmap:i.transferToImageBitmap(),id:`image_${u(this,jh)}_${ss(this,og)._++}`,refCounter:1,isSvg:!1},u(this,en).set(e,s),u(this,en).set(s.id,s),s}getSvgUrl(e){const t=u(this,en).get(e);return t!=null&&t.isSvg?t.svgUrl:null}deleteId(e){var i;u(this,en)||k(this,en,new Map);const t=u(this,en).get(e);if(!t||(t.refCounter-=1,t.refCounter!==0))return;const{bitmap:s}=t;if(!t.url&&!t.file){const a=new OffscreenCanvas(s.width,s.height);a.getContext("bitmaprenderer").transferFromImageBitmap(s),t.blobPromise=a.convertToBlob()}(i=s.close)==null||i.call(s),t.bitmap=null}isValidId(e){return e.startsWith(`image_${u(this,jh)}_`)}};jh=new WeakMap,og=new WeakMap,en=new WeakMap,Nh=new WeakSet,Gy=async function(e,t){u(this,en)||k(this,en,new Map);let s=u(this,en).get(e);if(s===null)return null;if(s!=null&&s.bitmap)return s.refCounter+=1,s;try{s||(s={bitmap:null,id:`image_${u(this,jh)}_${ss(this,og)._++}`,refCounter:0,isSvg:!1});let i;if(typeof t=="string"?(s.url=t,i=await t5(t,"blob")):t instanceof File?i=s.file=t:t instanceof Blob&&(i=t),i.type==="image/svg+xml"){const a=f5._isSVGFittingCanvas,o=new FileReader,c=new Image,h=new Promise((f,m)=>{c.onload=()=>{s.bitmap=c,s.isSvg=!0,f()},o.onload=async()=>{const g=s.svgUrl=o.result;c.src=await a?`${g}#svgView(preserveAspectRatio(none))`:g},c.onerror=o.onerror=m});o.readAsDataURL(i),await h}else s.bitmap=await createImageBitmap(i);s.refCounter=1}catch(i){He(i),s=null}return u(this,en).set(e,s),s&&u(this,en).set(s.id,s),s};let Tj=f5;var Jt,hl,lg,Lt;class Kz{constructor(e=128){C(this,Jt,[]);C(this,hl,!1);C(this,lg);C(this,Lt,-1);k(this,lg,e)}add({cmd:e,undo:t,post:s,mustExec:i,type:a=NaN,overwriteIfSameType:o=!1,keepUndo:c=!1}){if(i&&e(),u(this,hl))return;const h={cmd:e,undo:t,post:s,type:a};if(u(this,Lt)===-1){u(this,Jt).length>0&&(u(this,Jt).length=0),k(this,Lt,0),u(this,Jt).push(h);return}if(o&&u(this,Jt)[u(this,Lt)].type===a){c&&(h.undo=u(this,Jt)[u(this,Lt)].undo),u(this,Jt)[u(this,Lt)]=h;return}const f=u(this,Lt)+1;f===u(this,lg)?u(this,Jt).splice(0,1):(k(this,Lt,f),f<u(this,Jt).length&&u(this,Jt).splice(f)),u(this,Jt).push(h)}undo(){if(u(this,Lt)===-1)return;k(this,hl,!0);const{undo:e,post:t}=u(this,Jt)[u(this,Lt)];e(),t==null||t(),k(this,hl,!1),k(this,Lt,u(this,Lt)-1)}redo(){if(u(this,Lt)<u(this,Jt).length-1){k(this,Lt,u(this,Lt)+1),k(this,hl,!0);const{cmd:e,post:t}=u(this,Jt)[u(this,Lt)];e(),t==null||t(),k(this,hl,!1)}}hasSomethingToUndo(){return u(this,Lt)!==-1}hasSomethingToRedo(){return u(this,Lt)<u(this,Jt).length-1}cleanType(e){if(u(this,Lt)!==-1){for(let t=u(this,Lt);t>=0;t--)if(u(this,Jt)[t].type!==e){u(this,Jt).splice(t+1,u(this,Lt)-t),k(this,Lt,t);return}u(this,Jt).length=0,k(this,Lt,-1)}}destroy(){k(this,Jt,null)}}Jt=new WeakMap,hl=new WeakMap,lg=new WeakMap,Lt=new WeakMap;var av,wP;class J0{constructor(e){C(this,av);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=ls.platform;for(const[s,i,a={}]of e)for(const o of s){const c=o.startsWith("mac+");t&&c?(this.callbacks.set(o.slice(4),{callback:i,options:a}),this.allKeys.add(o.split("+").at(-1))):!t&&!c&&(this.callbacks.set(o,{callback:i,options:a}),this.allKeys.add(o.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const s=this.callbacks.get(P(this,av,wP).call(this,t));if(!s)return;const{callback:i,options:{bubbles:a=!1,args:o=[],checker:c=null}}=s;c&&!c(e,t)||(i.bind(e,...o,t)(),a||Ot(t))}}av=new WeakSet,wP=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const ov=class ov{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return Uz(e),$e(this,"_colors",e)}convert(e){const t=Y0(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[s,i]of this._colors)if(i.every((a,o)=>a===t[o]))return ov._colorsMapping.get(s);return t}getHexCode(e){const t=this._colors.get(e);return t?me.makeHexColor(...t):e}};Y(ov,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let Pj=ov;var kh,Yn,Sh,Ht,Dt,Ah,_h,un,Eh,Lr,js,fl,ml,pl,gl,Gi,Dr,Wc,cg,dg,Ch,ug,qi,xl,Th,yl,Ki,lv,Ha,Ph,hg,bl,Gc,Rh,vl,fg,is,lt,za,wl,jl,mg,M
381h,pg,Nl,Xi,Va,gg,xg,Or,ge,qy,Rj,jP,NP,kP,sp,SP,AP,_P,Mj,EP,CP,TP,PP,cn,Ia,RP,MP,Ij,IP,np,Lj;const ph=class ph{constructor(e,t,s,i,a,o,c,h,f,m,g,x,y,v,j,N){C(this,ge);C(this,kh,new AbortController);C(this,Yn,null);C(this,Sh,null);C(this,Ht,new Map);C(this,Dt,new Map);C(this,Ah,null);C(this,_h,null);C(this,un,null);C(this,Eh,null);C(this,Lr,new Kz);C(this,js,null);C(this,fl,null);C(this,ml,null);C(this,pl,0);C(this,gl,new Set);C(this,Gi,null);C(this,Dr,null);C(this,Wc,new Set);Y(this,"_editorUndoBar",null);C(this,cg,!1);C(this,dg,!1);C(this,Ch,!1);C(this,ug,null);C(this,qi,null);C(this,xl,null);C(this,Th,null);C(this,yl,!1);C(this,Ki,null);C(this,lv,new qz);C(this,Ha,!1);C(this,Ph,!1);C(this,hg,!1);C(this,bl,null);C(this,Gc,null);C(this,Rh,null);C(this,vl,null);C(this,fg,null);C(this,is,Be.NONE);C(this,lt,new Set);C(this,za,null);C(this,wl,null);C(this,jl,null);C(this,mg,null);C(this,Mh,null);C(this,pg,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});C(this,Nl,[0,0]);C(this,Xi,null);C(this,Va,null);C(this,gg,null);C(this,xg,null);C(this,Or,null);const S=this._signal=u(this,kh).signal;k(this,Va,e),k(this,gg,t),k(this,xg,s),k(this,_h,i),k(this,js,a),k(this,wl,o),k(this,Mh,h),this._eventBus=c,c._on("editingaction",this.onEditingAction.bind(this),{signal:S}),c._on("pagechanging",this.onPageChanging.bind(this),{signal:S}),c._on("scalechanging",this.onScaleChanging.bind(this),{signal:S}),c._on("rotationchanging",this.onRotationChanging.bind(this),{signal:S}),c._on("setpreference",this.onSetPreference.bind(this),{signal:S}),c._on("switchannotationeditorparams",A=>this.updateParams(A.type,A.value),{signal:S}),window.addEventListener("pointerdown",()=>{k(this,Ph,!0)},{capture:!0,signal:S}),window.addEventListener("pointerup",()=>{k(this,Ph,!1)},{capture:!0,signal:S}),window.addEventListener("beforeunload",P(this,ge,jP).bind(this),{capture:!0,signal:S}),P(this,ge,SP).call(this),P(this,ge,PP).call(this),P(this,ge,Mj).call(this),k(this,un,h.annotationStorage),k(this,ug,h.filterFactory),k(this,jl,f),k(this,Th,m||null),k(this,cg,g),k(this,dg,x),k(this,Ch,y),k(this,fg,v||null),this.viewParameters={realScale:oc.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=j||null,this._supportsPinchToZoom=N!==!1,a==null||a.setSidebarUiManager(this)}static get _keyboardManager(){const e=ph.prototype,t=o=>u(o,Va).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&o.hasSomethingToControl(),s=(o,{target:c})=>{if(c instanceof HTMLInputElement){const{type:h}=c;return h!=="text"&&h!=="number"}return!0},i=this.TRANSLATE_SMALL,a=this.TRANSLATE_BIG;return $e(this,"_keyboardManager",new J0([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:s}],[["ctrl+z","mac+meta+z"],e.undo,{checker:s}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:s}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:s}
381],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(o,{target:c})=>!(c instanceof HTMLButtonElement)&&u(o,Va).contains(c)&&!o.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(o,{target:c})=>!(c instanceof HTMLButtonElement)&&u(o,Va).contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-a,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[a,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-a],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,a],checker:t}]]))}destroy(){var e,t,s,i,a,o,c,h,f;(e=u(this,Or))==null||e.resolve(),k(this,Or,null),(t=u(this,kh))==null||t.abort(),k(this,kh,null),this._signal=null;for(const m of u(this,Dt).values())m.destroy();u(this,Dt).clear(),u(this,Ht).clear(),u(this,Wc).clear(),(s=u(this,vl))==null||s.clear(),k(this,Yn,null),u(this,lt).clear(),u(this,Lr).destroy(),(i=u(this,_h))==null||i.destroy(),(a=u(this,js))==null||a.destroy(),(o=u(this,wl))==null||o.destroy(),(c=u(this,Ki))==null||c.hide(),k(this,Ki,null),(h=u(this,Rh))==null||h.destroy(),k(this,Rh,null),k(this,Sh,null),u(this,qi)&&(clearTimeout(u(this,qi)),k(this,qi,null)),u(this,Xi)&&(clearTimeout(u(this,Xi)),k(this,Xi,null)),(f=this._editorUndoBar)==null||f.destroy(),k(this,Mh,null)}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return u(this,fg)}get useNewAltTextFlow(){return u(this,dg)}get useNewAltTextWhenAddingImage(){return u(this,Ch)}get hcmFilter(){return $e(this,"hcmFilter",u(this,jl)?u(this,ug).addHCMFilter(u(this,jl).foreground,u(this,jl).background):"none")}get direction(){return $e(this,"direction",getComputedStyle(u(this,Va)).direction)}get _highlightColors(){return $e(this,"_highlightColors",u(this,Th)?new Map(u(this,Th).split(",").map(e=>(e=e.split("=").map(t=>t.trim()),e[1]=e[1].toUpperCase(),e))):null)}get highlightColors(){const{_highlightColors:e}=this;if(!e)return $e(this,"highlightColors",null);const t=new Map,s=!!u(this,jl);for(const[i,a]of e){const o=i.endsWith("_HCM");if(s&&o){t.set(i.replace("_HCM",""),a);continue}!s&&!o&&t.set(i,a)}return $e(this,"highlightColors",t)}get highlightColorNames(){return $e(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}getNonHCMColor(e){if(!this._highlightColors)return e;const t=this.highlightColorNames.get(e);return this._highlightColors.get(t)||e}getNonHCMColorName(e){return this.highlightColorNames.get(e)||e}setCurrentDrawingSession(e){e?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),k(this,ml,e)}setMainHighlightColorPicker(e){k(this,Rh,e)}editAltText(e,t=!1){var s;(s=u(this,_h))==null||s.editAltText(this,e,t)}hasCommentManager(){return!!u(this,js)}editComment(e,t,s,i){var a;(a=u(this,js))==null||a.showDialog(this,e,t,s,i)}selectComment(e,t){const s=u(this,Dt).get(e),i=s==null?void 0:s.getEditorByUID(t);i==null||i.toggleComment(!0,!0)}updateComment(e){var t;(t=u(this,js))==null||t.updateComment(e.getData())}updatePopupColor(e){var t;(t=u(this,js))==null||t.updatePopupColor(e)}removeComment(e){var t;(t=u(this,js))==null||t.removeComments([e.uid])}deleteComment(e,t){const s=()=>{e.comment=t},i=()=>{var a;(a=this._editorUndoBar)==null||a.show(s,"comment"),this.toggleComment(null),e.comment=null};this.addCommands({cmd:i,undo:s,mustExec:!0})}toggleComment(e,t,s=void 0){var i;(i=u(this,js))==null||i.toggleCommentPopup(e,t,s)}makeCommentColor(e,t){var s;return e&&((s=u(this,js))==null?void 0:s.makeCommentColor(e,t))||null}getCommentDialogElement(){var e;return((e=u(this,js))==null?void 0:e.dialogElement)||null}async waitForEditorsRendered(e){if(u(this,Dt).has(e-1))return;const{resolve:t,promise:s}=Promise.withResolvers(),i=a=>{a.pageNumber===e&&(this._eventBus._off("editorsrendered",i),t())};this._eventBus.on("editorsrendered",i),await s}getSignature(e){var t;(t=u(this,wl))==null||t.getSignature({uiManager:this,editor:e})}get signatureManager(){return u(this,wl)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){switch(e){case"enableNewAltTextWhenAddingImage":k(this,Ch,t);break}}onPageChanging({pageNumber:e}){k(this,pl,e-1)}deletePage(e){for(const t of this.getEditors(e))t.remove();u(this,Dt).delete(e),u(this,pl)===e&&k(this,pl,0)}focusMainContainer(){u(this,Va).focus()}findParent(e,t){for(const s of u(this,Dt).values()){const{x:i,y:a,width:o,height:c}=s.div.getBoundingClientRect();if(e>=i&&e<=i+o&&t>=a&&t<=a+c)return s}return null}disableUserSelect(e=!1){u(this,gg).classList.toggle("noUserSelect",e)}addShouldRescale(e){u(this,Wc).add(e)}removeShouldRescale(e){u(this,Wc).delete(e)}onScaleChanging({scale:e}){var t;this.commitOrRemove(),this.viewParameters.realScale=e*oc.PDF_TO_CSS_UNITS;for(const s of u(this,Wc))s.onScaleChanging();(t=u(this,ml))==null||t.onScaleChanging()}
381onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e="",t=!1){const s=document.getSelection();if(!s||s.isCollapsed)return;const{anchorNode:i,anchorOffset:a,focusNode:o,focusOffset:c}=s,h=s.toString(),m=P(this,ge,qy).call(this,s).closest(".textLayer"),g=this.getSelectionBoxes(m);if(!g)return;s.empty();const x=P(this,ge,Rj).call(this,m),y=u(this,is)===Be.NONE,v=()=>{const j=x==null?void 0:x.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:g,anchorNode:i,anchorOffset:a,focusNode:o,focusOffset:c,text:h});y&&this.showAllEditors("highlight",!0,!0),t&&(j==null||j.editComment())};if(y){this.switchToMode(Be.HIGHLIGHT,v);return}v()}commentSelection(e=""){this.highlightSelection(e,!0)}getAndRemoveDataFromAnnotationStorage(e){if(!u(this,un))return null;const t=`${Vp}${e}`,s=u(this,un).getRawValue(t);return s&&u(this,un).remove(t),s}addToAnnotationStorage(e){!e.isEmpty()&&u(this,un)&&!u(this,un).has(e.id)&&u(this,un).setValue(e.id,e)}a11yAlert(e,t=null){const s=u(this,xg);s&&(s.setAttribute("data-l10n-id",e),t?s.setAttribute("data-l10n-args",JSON.stringify(t)):s.removeAttribute("data-l10n-args"))}blur(){if(this.isShiftKeyDown=!1,u(this,yl)&&(k(this,yl,!1),P(this,ge,sp).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of u(this,lt))if(t.div.contains(e)){k(this,Gc,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!u(this,Gc))return;const[e,t]=u(this,Gc);k(this,Gc,null),t.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}addEditListeners(){P(this,ge,Mj).call(this),this.setEditingState(!0)}removeEditListeners(){P(this,ge,EP).call(this),this.setEditingState(!1)}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const s of u(this,Dr))if(s.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(const t of e.dataTransfer.items)for(const s of u(this,Dr))if(s.isHandlingMimeForPasting(t.type)){s.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){var s;if(e.preventDefault(),(s=u(this,Yn))==null||s.commitOrRemove(),!this.hasSelection)return;const t=[];for(const i of u(this,lt)){const a=i.serialize(!0);a&&t.push(a)}t.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}async paste(e){e.preventDefault();const{clipboardData:t}=e;for(const a of t.items)for(const o of u(this,Dr))if(o.isHandlingMimeForPasting(a.type)){o.paste(a,this.currentLayer);return}let s=t.getData("application/pdfjs");if(!s)return;try{s=JSON.parse(s)}catch(a){He(`paste: "${a.message}".`);return}if(!Array.isArray(s))return;this.unselectAll();const i=this.currentLayer;try{const a=[];for(const h of s){const f=await i.deserialize(h);if(!f)return;a.push(f)}const o=()=>{for(const h of a)P(this,ge,Ij).call(this,h);P(this,ge,Lj).call(this,a)},c=()=>{for(const h of a)h.remove()};this.addCommands({cmd:o,undo:c,mustExec:!0})}catch(a){He(`paste: "${a.message}".`)}}keydown(e){!this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!0),u(this,is)!==Be.NONE&&!this.isEditorHandlingKeyboard&&ph._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,u(this,yl)&&(k(this,yl,!1),P(this,ge,sp).call(this,"main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}updatePageIndex(e,t){for(const i of this.getEditors(e))i.pageIndex=t;const s=u(this,Ah).get(e);s&&(s.pageIndex=t,u(this,Dt).set(t,s),u(this,Ha)?s.enable():s.disable())}startUpdatePages(){k(this,Ah,new Map(u(this,Dt))),u(this,Dt).clear()}endUpdatePages(){k(this,Ah,null)}clonePage(e,t){for(const s of this.getEditors(e)){const i=s.serialize(s.mode!==Be.HIGHLIGHT);i&&(i.pageIndex=t,i.id=this.getId(),i.isClone=!0,delete i.popupRef,u(this,un).setValue(i.id,i))}}findClonesForPage(e){const t=[],{pageIndex:s}=e;for(const[i,a]of u(this,un))a.pageIndex===s&&a.isClone&&(u(this,un).remove(i),t.push(e.deserialize(a).then(o=>{o&&(o.isClone=!0,e.addOrRebuild(o))})));return Promise.all(t)}setEditingState(e){e?(P(this,ge,AP).call(this),P(this,ge,CP).call(this),P(this,ge,cn).call(this,{isEditing:u(this,is)!==Be.NONE,isEmpty:P(this,ge,np).call(this),hasSomethingToUndo:u(this,Lr).hasSomethingToUndo(),hasSomethingToRedo:u(this,Lr).hasSomethingToRedo(),hasSelectedEditor:!1})):(P(this,ge,_P).call(this),P(this,ge,TP).call(this),P(this,ge,cn).call(this,{isEditing:!1}),this.disableUserSelect(!1))}
381registerEditorTypes(e){if(!u(this,Dr)){k(this,Dr,e);for(const t of u(this,Dr))P(this,ge,Ia).call(this,t.defaultPropertiesToUpdate)}}getId(){return u(this,lv).id}get currentLayer(){return u(this,Dt).get(u(this,pl))}getLayer(e){return u(this,Dt).get(e)}get currentPageIndex(){return u(this,pl)}addLayer(e){u(this,Dt).set(e.pageIndex,e),u(this,Ha)?e.enable():e.disable()}removeLayer(e){u(this,Dt).delete(e.pageIndex)}async updateMode(e,t=null,s=!1,i=!1,a=!1,o=!1){var c,h,f,m,g,x;if(u(this,is)!==e&&!(u(this,Or)&&(await u(this,Or).promise,!u(this,Or)))){if(k(this,Or,Promise.withResolvers()),(c=u(this,ml))==null||c.commitOrRemove(),u(this,is)===Be.POPUP&&((h=u(this,js))==null||h.hideSidebar()),(f=u(this,js))==null||f.destroyPopup(),k(this,is,e),e===Be.NONE){this.setEditingState(!1),P(this,ge,MP).call(this);for(const y of u(this,Ht).values())y.hideStandaloneCommentButton();(m=this._editorUndoBar)==null||m.hide(),this.toggleComment(null),u(this,Or).resolve();return}for(const y of u(this,Ht).values())y.addStandaloneCommentButton();e===Be.SIGNATURE&&await((g=u(this,wl))==null?void 0:g.loadSignatures()),s&&Zs.clearPointerType(),this.setEditingState(!0),await P(this,ge,RP).call(this),this.unselectAll();for(const y of u(this,Dt).values())y.updateMode(e);if(e===Be.POPUP){u(this,Sh)||k(this,Sh,await u(this,Mh).getAnnotationsByType(new Set(u(this,Dr).map(j=>j._editorType))));const y=new Set,v=[];for(const j of u(this,Ht).values()){const{annotationElementId:N,hasComment:S,deleted:A}=j;N&&y.add(N),S&&!A&&v.push(j.getData())}for(const j of u(this,Sh)){const{id:N,popupRef:S,contentsObj:A}=j;S&&(A!=null&&A.str)&&!y.has(N)&&!u(this,gl).has(N)&&v.push(j)}(x=u(this,js))==null||x.showSidebar(v)}if(!t){i&&this.addNewEditorFromKeyboard(),u(this,Or).resolve();return}for(const y of u(this,Ht).values())y.uid===t?(this.setSelected(y),o?y.editComment():a?y.enterInEditMode():y.focus()):y.unselect();u(this,Or).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e.mode!==u(this,is)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...e})}updateParams(e,t){if(u(this,Dr)){switch(e){case ze.CREATE:this.currentLayer.addNewEditor(t);return;case ze.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(u(this,mg)||k(this,mg,new Map)).set(e,t),this.showAllEditors("highlight",t);break}if(this.hasSelection)for(const s of u(this,lt))s.updateParams(e,t);else for(const s of u(this,Dr))s.updateDefaultParams(e,t)}}showAllEditors(e,t,s=!1){var a;for(const o of u(this,Ht).values())o.editorType===e&&o.show(t);(((a=u(this,mg))==null?void 0:a.get(ze.HIGHLIGHT_SHOW_ALL))??!0)!==t&&P(this,ge,Ia).call(this,[[ze.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(u(this,hg)!==e){k(this,hg,e);for(const t of u(this,Dt).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}*getEditors(e){for(const t of u(this,Ht).values())t.pageIndex===e&&(yield t)}getEditor(e){return u(this,Ht).get(e)}addEditor(e){u(this,Ht).set(e.id,e)}removeEditor(e){var t,s;e.div.contains(document.activeElement)&&(u(this,qi)&&clearTimeout(u(this,qi)),k(this,qi,setTimeout(()=>{this.focusMainContainer(),k(this,qi,null)},0))),u(this,Ht).delete(e.id),e.annotationElementId&&((t=u(this,vl))==null||t.delete(e.annotationElementId)),this.unselect(e),(!e.annotationElementId||!u(this,gl).has(e.annotationElementId))&&((s=u(this,un))==null||s.remove(e.id))}addDeletedAnnotationElement(e){u(this,gl).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return u(this,gl).has(e)}removeDeletedAnnotationElement(e){u(this,gl).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){u(this,Yn)!==e&&(k(this,Yn,e),e&&P(this,ge,Ia).call(this,e.propertiesToUpdate))}updateUI(e){u(this,ge,IP)===e&&P(this,ge,Ia).call(this,e.propertiesToUpdate)}updateUIForDefaultProperties(e){P(this,ge,Ia).call(this,e.defaultPropertiesToUpdate)}toggleSelected(e){if(u(this,lt).has(e)){u(this,lt).delete(e),e.unselect(),P(this,ge,cn).call(this,{hasSelectedEditor:this.hasSelection});return}u(this,lt).add(e),e.select(),P(this,ge,Ia).call(this,e.propertiesToUpdate),P(this,ge,cn).call(this,{hasSelectedEditor:!0})}setSelected(e){var t,s;this.updateToolbar({mode:e.mode,editId:e.uid}),(t=u(this,ml))==null||t.commitOrRemove();for(const i of u(this,lt))i!==e&&i.unselect();(s=u(this,js))==null||s.destroyPopup(),u(this,lt).clear(),u(this,lt).add(e),e.select(),P(this,ge,Ia).call(this,e.propertiesToUpdate),P(this,ge,cn).call(this,{hasSelectedEditor:!0})}isSelected(e){return u(this,lt).has(e)}get firstSelectedEditor(){return u(this,lt).values().next().value}unselect(e){e.unselect(),u(this,lt).delete(e),P(this,ge,cn).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return u(this,lt).size!==0}get isEnterHandled(){return u(this,lt).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var e;u(this,Lr).undo(),P(this,ge,cn).call(this,{hasSomethingToUndo:u(this,Lr).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:P(this,ge,np).call(this)}),(e=this._editorUndoBar)==null||e.hide()}redo(){u(this,Lr).redo(),P(this,ge,cn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:u(this,Lr).hasSomethingToRedo(),isEmpty:P(this,ge,np).call(this)})}addCommands(e){u(this,Lr).add(e),P(this,ge,cn).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:P(this,ge,np).call(this)})}cleanUndoStack(e){u(this,Lr).cleanType(e)}delete(){var a;this.commitOrRemove();const e=(a=this.currentLayer)==null?void 0:a.endDrawingSession(!0);if(!this.hasSelection&&!e)return;const t=e?[e]:[...u(this,lt)],s=()=>{var o;(o=this._editorUndoBar)==null||o.show(i,t.length===1?t[0].editorType:t.length);for(const c of t)c.remove()},i=()=>{for(const o of t)P(this,ge,Ij).call(this,o)};this.addCommands({cmd:s,undo:i,mustExec:!0})}commitOrRemove(){var e;(e=u(this,Yn))==null||e.commitOrRemove()}hasSomethingToControl(){return u(this,Yn)||this.hasSelection}selectAll(){for(const e of u(this,lt))e.commit();P(this,ge,Lj).call(this,u(this,Ht).values())}unselectAll(){var e,t;if(!(u(this,Yn)&&(u(this,Yn).commitOrRemove(),u(this,is)!==Be.NONE))&&!((e=u(this,ml))!=null&&e.commitOrRemove())&&((t=u(this,js))==null||t.destroyPopup(),!!this.hasSelection)){for(const s of u(this,lt))s.unselect();u(this,lt).clear(),P(this,ge,cn).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,s=!1){if(s||this.commitOrRemove(),!this.hasSelection)return;u(this,Nl)[0]+=e,u(this,Nl)[1]+=t;const[i,a]=u(this,Nl),o=[...u(this,lt)],c=1e3;u(this,Xi)&&clearTimeout(u(this,Xi)),k(this,Xi,setTimeout(()=>{k(this,Xi,null),u(this,Nl)[0]=u(this,Nl)[1]=0,this.addCommands({cmd:()=>{for(const h of o)u(this,Ht).has(h.id)&&(h.translateInPage(i,a),h.translationDone())},undo:()=>{for(const h of o)u(this,Ht).has(h.id)&&(h.translateInPage(-i,-a),h.translationDone())},mustExec:!1})},c));for(const h of o)h.translateInPage(e,t),h.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),k(this,Gi,new Map);for(const e of u(this,lt))u(this,Gi).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!u(this,Gi))return!1;this.disableUserSelect(!1);const e=u(this,Gi);k(this,Gi,null);let t=!1;for(const[{x:i,y:a,pageIndex:o},c]of e)c.newX=i,c.newY=a,c.newPageIndex=o,t||(t=i!==c.savedX||a!==c.savedY||o!==c.savedPageIndex);if(!t)return!1;const s=(i,a,o,c)=>{if(u(this,Ht).has(i.id)){const h=u(this,Dt).get(c);h?i._setParentAndPosition(h,a,o):(i.pageIndex=c,i.x=a,i.y=o)}};return this.addCommands({cmd:()=>{for(const[i,{newX:a,newY:o,newPageIndex:c}]of e)s(i,a,o,c)},undo:()=>{for(const[i,{savedX:a,savedY:o,savedPageIndex:c}]of e)s(i,a,o,c)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(u(this,Gi))for(const s of u(this,Gi).keys())s.drag(e,t)}rebuild(e){if(e.parent===null){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return((e=this.getActive())==null?void 0:e.shouldGetKeyboardEvents())||u(this,lt).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return u(this,Yn)===e}getActive(){return u(this,Yn)}getMode(){return u(this,is)}isEditingMode(){return u(this,is)!==Be.NONE}get imageManager(){return $e(this,"imageManager",new Tj)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let f=0,m=t.rangeCount;f<m;f++)if(!e.contains(t.getRangeAt(f).commonAncestorContainer))return null;const{x:s,y:i,width:a,height:o}=e.getBoundingClientRect();let c;switch(e.getAttribute("data-main-rotation")){case"90":c=(f,m,g,x)=>({x:(m-i)/o,y:1-(f+g-s)/a,width:x/o,height:g/a});break;case"180":c=(f,m,g,x)=>({x:1-(f+g-s)/a,y:1-(m+x-i)/o,width:g/a,height:x/o});break;case"270":c=(f,m,g,x)=>({x:1-(m+x-i)/o,y:(f-s)/a,width:x/o,height:g/a});break;default:c=(f,m,g,x)=>({x:(f-s)/a,y:(m-i)/o,width:g/a,height:x/o});break}const h=[];for(let f=0,m=t.rangeCount;f<m;f++){const g=t.getRangeAt(f);if(!g.collapsed)for(const{x,y,width:v,height:j}of g.getClientRects())v===0||j===0||h.push(c(x,y,v,j))}return h.length===0?null:h}addChangedExistingAnnotation({annotationElementId:e,id:t}){(u(this,Eh)||k(this,Eh,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){var t;(t=u(this,Eh))==null||t.delete(e)}renderAnnotationElement(e){var i;const t=(i=u(this,Eh))==null?void 0:i.get(e.data.id);if(!t)return;const s=u(this,un).getRawValue(t);s&&(u(this,is)===Be.NONE&&!s.hasBeenModified||s.renderAnnotationElement(e))}setMissingCanvas(e,t,s){var a;const i=(a=u(this,vl))==null?void 0:a.get(e);i&&(i.setCanvas(t,s),u(this,vl).delete(e))}addMissingCanvas(e,t){(u(this,vl)||k(this,vl,new Map)).set(e,t)}};kh=new WeakMap,Yn=new WeakMap,Sh=new WeakMap,Ht=new WeakMap,Dt=new WeakMap,Ah=new WeakMap,_h=new WeakMap,un=new WeakMap,Eh=new WeakMap,Lr=new WeakMap,js=new WeakMap,fl=new WeakMap,ml=new WeakMap,pl=new WeakMap,gl=new WeakMap,Gi=new WeakMap,Dr=new WeakMap,Wc=new WeakMap,cg=new WeakMap,dg=new WeakMap,Ch=new WeakMap,ug=new WeakMap,qi=new WeakMap,xl=new WeakMap,Th=new WeakMap,yl=new WeakMap,Ki=new WeakMap,lv=new WeakMap,Ha=new WeakMap,Ph=new WeakMap,hg=new WeakMap,bl=new WeakMap,Gc=new WeakMap,Rh=new WeakMap,vl=new WeakMap,fg=new WeakMap,is=new WeakMap,lt=new WeakMap,za=new WeakMap,wl=new WeakMap,jl=new WeakMap,mg=new WeakMap,Mh=new WeakMap,pg=new WeakMap,Nl=new WeakMap,Xi=new WeakMap,Va=new WeakMap,gg=new WeakMap,xg=new WeakMap,Or=new WeakMap,ge=new WeakSet,qy=function({anchorNode:e}
381){return e.nodeType===Node.TEXT_NODE?e.parentElement:e},Rj=function(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const s of u(this,Dt).values())if(s.hasTextLayer(e))return s;return null},jP=function(e){var t;this.commitOrRemove(),(t=this.currentLayer)==null||t.endDrawingSession(!1)},NP=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const s=P(this,ge,qy).call(this,e).closest(".textLayer"),i=this.getSelectionBoxes(s);i&&(u(this,Ki)||k(this,Ki,new Gz(this)),u(this,Ki).show(s,i,this.direction==="ltr"))},kP=function(){var a,o,c;const e=document.getSelection();if(!e||e.isCollapsed){u(this,za)&&((a=u(this,Ki))==null||a.hide(),k(this,za,null),P(this,ge,cn).call(this,{hasSelectedText:!1}));return}const{anchorNode:t}=e;if(t===u(this,za))return;const i=P(this,ge,qy).call(this,e).closest(".textLayer");if(!i){u(this,za)&&((o=u(this,Ki))==null||o.hide(),k(this,za,null),P(this,ge,cn).call(this,{hasSelectedText:!1}));return}if((c=u(this,Ki))==null||c.hide(),k(this,za,t),P(this,ge,cn).call(this,{hasSelectedText:!0}),!(u(this,is)!==Be.HIGHLIGHT&&u(this,is)!==Be.NONE)&&(u(this,is)===Be.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),k(this,yl,this.isShiftKeyDown),!this.isShiftKeyDown)){const h=u(this,is)===Be.HIGHLIGHT?P(this,ge,Rj).call(this,i):null;if(h==null||h.toggleDrawing(),u(this,Ph)){const f=new AbortController,m=this.combinedSignal(f),g=x=>{x.type==="pointerup"&&x.button!==0||(f.abort(),h==null||h.toggleDrawing(!0),x.type==="pointerup"&&P(this,ge,sp).call(this,"main_toolbar"))};window.addEventListener("pointerup",g,{signal:m}),window.addEventListener("blur",g,{signal:m})}else h==null||h.toggleDrawing(!0),P(this,ge,sp).call(this,"main_toolbar")}},sp=function(e=""){u(this,is)===Be.HIGHLIGHT?this.highlightSelection(e):u(this,cg)&&P(this,ge,NP).call(this)},SP=function(){document.addEventListener("selectionchange",P(this,ge,kP).bind(this),{signal:this._signal})},AP=function(){if(u(this,xl))return;k(this,xl,new AbortController);const e=this.combinedSignal(u(this,xl));window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})},_P=function(){var e;(e=u(this,xl))==null||e.abort(),k(this,xl,null)},Mj=function(){if(u(this,bl))return;k(this,bl,new AbortController);const e=this.combinedSignal(u(this,bl));window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})},EP=function(){var e;(e=u(this,bl))==null||e.abort(),k(this,bl,null)},CP=function(){if(u(this,fl))return;k(this,fl,new AbortController);const e=this.combinedSignal(u(this,fl));document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})},TP=function(){var e;(e=u(this,fl))==null||e.abort(),k(this,fl,null)},PP=function(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})},cn=function(e){Object.entries(e).some(([s,i])=>u(this,pg)[s]!==i)&&(this._eventBus.dispatch("editingstateschanged",{source:this,details:Object.assign(u(this,pg),e)}),u(this,is)===Be.HIGHLIGHT&&e.hasSelectedEditor===!1&&P(this,ge,Ia).call(this,[[ze.HIGHLIGHT_FREE,!0]]))},Ia=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},RP=async function(){if(!u(this,Ha)){k(this,Ha,!0);const e=[];for(const t of u(this,Dt).values())e.push(t.enable());await Promise.all(e);for(const t of u(this,Ht).values())t.enable()}},MP=function(){if(this.unselectAll(),u(this,Ha)){k(this,Ha,!1);for(const e of u(this,Dt).values())e.disable();for(const e of u(this,Ht).values())e.disable()}},Ij=function(e){const t=u(this,Dt).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},IP=function(){let e=null;for(e of u(this,lt));return e},np=function(){if(u(this,Ht).size===0)return!0;if(u(this,Ht).size===1)for(const e of u(this,Ht).values())return e.isEmpty();return!1},Lj=function(e){for(const t of u(this,lt))t.unselect();u(this,lt).clear();for(const t of e)t.isEmpty()||(u(this,lt).add(t),t.select());P(this,ge,cn).call(this,{hasSelectedEditor:this.hasSelection})},Y(ph,"TRANSLATE_SMALL",1),Y(ph,"TRANSLATE_BIG",10);let hu=ph;var Ns,Yi,hi,Ih,Ji,Jn,Lh,Qi,Mn,Wa,qc,Zi,kl,Ei,rp,Ky;const dn=class dn{constructor(e){C(this,Ei);C(this,Ns,null);C(this,Yi,!1);C(this,hi,null);C(this,Ih,null);C(this,Ji,null);C(this,Jn,null);C(this,Lh,!1);C(this,Qi,null);C(this,Mn,null);C(this,Wa,null);C(this,qc,null);C(this,Zi,!1);k(this,Mn,e),k(this,Zi,e._uiManager.useNewAltTextFlow),u(dn,kl)||k(dn,kl,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(e){dn._l10n??(dn._l10n=e)}async render(){const e=k(this,hi,document.createElement("button"));e.className="altText",e.tabIndex="0";
381const t=k(this,Ih,document.createElement("span"));e.append(t),u(this,Zi)?(e.classList.add("new"),e.setAttribute("data-l10n-id",u(dn,kl).missing),t.setAttribute("data-l10n-id",u(dn,kl)["missing-label"])):(e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const s=u(this,Mn)._uiManager._signal;e.addEventListener("contextmenu",Jr,{signal:s}),e.addEventListener("pointerdown",a=>a.stopPropagation(),{signal:s});const i=a=>{a.preventDefault(),u(this,Mn)._uiManager.editAltText(u(this,Mn)),u(this,Zi)&&u(this,Mn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:u(this,Ei,rp)}})};return e.addEventListener("click",i,{capture:!0,signal:s}),e.addEventListener("keydown",a=>{a.target===e&&a.key==="Enter"&&(k(this,Lh,!0),i(a))},{signal:s}),await P(this,Ei,Ky).call(this),e}finish(){u(this,hi)&&(u(this,hi).focus({focusVisible:u(this,Lh)}),k(this,Lh,!1))}isEmpty(){return u(this,Zi)?u(this,Ns)===null:!u(this,Ns)&&!u(this,Yi)}hasData(){return u(this,Zi)?u(this,Ns)!==null||!!u(this,Wa):this.isEmpty()}get guessedText(){return u(this,Wa)}async setGuessedText(e){u(this,Ns)===null&&(k(this,Wa,e),k(this,qc,await dn._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:e})),P(this,Ei,Ky).call(this))}toggleAltTextBadge(e=!1){var t;if(!u(this,Zi)||u(this,Ns)){(t=u(this,Qi))==null||t.remove(),k(this,Qi,null);return}if(!u(this,Qi)){const s=k(this,Qi,document.createElement("div"));s.className="noAltTextBadge",u(this,Mn).div.append(s)}u(this,Qi).classList.toggle("hidden",!e)}serialize(e){let t=u(this,Ns);return!e&&u(this,Wa)===t&&(t=u(this,qc)),{altText:t,decorative:u(this,Yi),guessedText:u(this,Wa),textWithDisclaimer:u(this,qc)}}get data(){return{altText:u(this,Ns),decorative:u(this,Yi)}}set data({altText:e,decorative:t,guessedText:s,textWithDisclaimer:i,cancel:a=!1}){s&&(k(this,Wa,s),k(this,qc,i)),!(u(this,Ns)===e&&u(this,Yi)===t)&&(a||(k(this,Ns,e),k(this,Yi,t)),P(this,Ei,Ky).call(this))}toggle(e=!1){u(this,hi)&&(!e&&u(this,Jn)&&(clearTimeout(u(this,Jn)),k(this,Jn,null)),u(this,hi).disabled=!e)}shown(){u(this,Mn)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:u(this,Ei,rp)}})}destroy(){var e,t;(e=u(this,hi))==null||e.remove(),k(this,hi,null),k(this,Ih,null),k(this,Ji,null),(t=u(this,Qi))==null||t.remove(),k(this,Qi,null)}};Ns=new WeakMap,Yi=new WeakMap,hi=new WeakMap,Ih=new WeakMap,Ji=new WeakMap,Jn=new WeakMap,Lh=new WeakMap,Qi=new WeakMap,Mn=new WeakMap,Wa=new WeakMap,qc=new WeakMap,Zi=new WeakMap,kl=new WeakMap,Ei=new WeakSet,rp=function(){return u(this,Ns)&&"added"||u(this,Ns)===null&&this.guessedText&&"review"||"missing"},Ky=async function(){var i,a,o;const e=u(this,hi);if(!e)return;if(u(this,Zi)){if(e.classList.toggle("done",!!u(this,Ns)),e.setAttribute("data-l10n-id",u(dn,kl)[u(this,Ei,rp)]),(i=u(this,Ih))==null||i.setAttribute("data-l10n-id",u(dn,kl)[`${u(this,Ei,rp)}-label`]),!u(this,Ns)){(a=u(this,Ji))==null||a.remove();return}}else{if(!u(this,Ns)&&!u(this,Yi)){e.classList.remove("done"),(o=u(this,Ji))==null||o.remove();return}e.classList.add("done"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let t=u(this,Ji);if(!t){k(this,Ji,t=document.createElement("span")),t.className="tooltip",t.setAttribute("role","tooltip"),t.id=`alt-text-tooltip-${u(this,Mn).id}`;const c=100,h=u(this,Mn)._uiManager._signal;h.addEventListener("abort",()=>{clearTimeout(u(this,Jn)),k(this,Jn,null)},{once:!0}),e.addEventListener("mouseenter",()=>{k(this,Jn,setTimeout(()=>{k(this,Jn,null),u(this,Ji).classList.add("show"),u(this,Mn)._reportTelemetry({action:"alt_text_tooltip"})},c))},{signal:h}),e.addEventListener("mouseleave",()=>{var f;u(this,Jn)&&(clearTimeout(u(this,Jn)),k(this,Jn,null)),(f=u(this,Ji))==null||f.classList.remove("show")},{signal:h})}u(this,Yi)?t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(t.removeAttribute("data-l10n-id"),t.textContent=u(this,Ns)),t.parentNode||e.append(t);const s=u(this,Mn).getElementForAltText();s==null||s.setAttribute("aria-describedby",t.id)},C(dn,kl,null),Y(dn,"_l10n",null);let Vb=dn;var Ds,Fr,Kc,vt,yg,Sl,Br,Al,_l,Xc,bg,Dj;class by{constructor(e){C(this,bg);C(this,Ds,null);C(this,Fr,null);C(this,Kc,!1);C(this,vt,null);C(this,yg,null);C(this,Sl,null);C(this,Br,null);C(this,Al,null);C(this,_l,!1);C(this,Xc,null);k(this,vt,e)}
381renderForToolbar(){const e=k(this,Fr,document.createElement("button"));return e.className="comment",P(this,bg,Dj).call(this,e,!1)}renderForStandalone(){const e=k(this,Ds,document.createElement("button"));e.className="annotationCommentButton";const t=u(this,vt).commentButtonPosition;if(t){const{style:s}=e;s.insetInlineEnd=`calc(${100*(u(this,vt)._uiManager.direction==="ltr"?1-t[0]:t[0])}% - var(--comment-button-dim))`,s.top=`calc(${100*t[1]}% - var(--comment-button-dim))`;const i=u(this,vt).commentButtonColor;i&&(s.backgroundColor=i)}return P(this,bg,Dj).call(this,e,!0)}focusButton(){setTimeout(()=>{var e;(e=u(this,Ds)??u(this,Fr))==null||e.focus()},0)}onUpdatedColor(){if(!u(this,Ds))return;const e=u(this,vt).commentButtonColor;e&&(u(this,Ds).style.backgroundColor=e),u(this,vt)._uiManager.updatePopupColor(u(this,vt))}get commentButtonWidth(){var e;return(((e=u(this,Ds))==null?void 0:e.getBoundingClientRect().width)??0)/u(this,vt).parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(u(this,Xc))return u(this,Xc);if(!u(this,Ds))return null;const{x:e,y:t,height:s}=u(this,Ds).getBoundingClientRect(),{x:i,y:a,width:o,height:c}=u(this,vt).parent.boundingClientRect;return[(e-i)/o,(t+s-a)/c]}set commentPopupPositionInLayer(e){k(this,Xc,e)}hasDefaultPopupPosition(){return u(this,Xc)===null}removeStandaloneCommentButton(){var e;(e=u(this,Ds))==null||e.remove(),k(this,Ds,null)}removeToolbarCommentButton(){var e;(e=u(this,Fr))==null||e.remove(),k(this,Fr,null)}setCommentButtonStates({selected:e,hasPopup:t}){u(this,Ds)&&(u(this,Ds).classList.toggle("selected",e),u(this,Ds).ariaExpanded=t)}edit(e){const t=this.commentPopupPositionInLayer;let s,i;if(t)[s,i]=t;else{[s,i]=u(this,vt).commentButtonPosition;const{width:m,height:g,x,y}=u(this,vt);s=x+s*m,i=y+i*g}const a=u(this,vt).parent.boundingClientRect,{x:o,y:c,width:h,height:f}=a;u(this,vt)._uiManager.editComment(u(this,vt),o+s*h,c+i*f,{...e,parentDimensions:a})}finish(){u(this,Fr)&&(u(this,Fr).focus({focusVisible:u(this,Kc)}),k(this,Kc,!1))}isDeleted(){return u(this,_l)||u(this,Br)===""}isEmpty(){return u(this,Br)===null}hasBeenEdited(){return this.isDeleted()||u(this,Br)!==u(this,yg)}serialize(){return this.data}get data(){return{text:u(this,Br),richText:u(this,Sl),date:u(this,Al),deleted:this.isDeleted()}}set data(e){if(e!==u(this,Br)&&k(this,Sl,null),e===null){k(this,Br,""),k(this,_l,!0);return}k(this,Br,e),k(this,Al,new Date),k(this,_l,!1)}restoreData({text:e,richText:t,date:s}){k(this,Br,e),k(this,Sl,t),k(this,Al,s),k(this,_l,!1)}setInitialText(e,t=null){k(this,yg,e),this.data=e,k(this,Al,null),k(this,Sl,t)}shown(){}destroy(){var e,t;(e=u(this,Fr))==null||e.remove(),k(this,Fr,null),(t=u(this,Ds))==null||t.remove(),k(this,Ds,null),k(this,Br,""),k(this,Sl,null),k(this,Al,null),k(this,vt,null),k(this,Kc,!1),k(this,_l,!1)}}Ds=new WeakMap,Fr=new WeakMap,Kc=new WeakMap,vt=new WeakMap,yg=new WeakMap,Sl=new WeakMap,Br=new WeakMap,Al=new WeakMap,_l=new WeakMap,Xc=new WeakMap,bg=new WeakSet,Dj=function(e,t){if(!u(this,vt)._uiManager.hasCommentManager())return null;e.tabIndex="0",e.ariaHasPopup="dialog",t?(e.ariaControls="commentPopup",e.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(e.ariaControlsElements=[u(this,vt)._uiManager.getCommentDialogElement()],e.setAttribute("data-l10n-id","pdfjs-editor-add-comment-button"));const s=u(this,vt)._uiManager._signal;if(!(s instanceof AbortSignal)||s.aborted)return e;e.addEventListener("contextmenu",Jr,{signal:s}),t&&(e.addEventListener("focusin",a=>{u(this,vt)._focusEventsAllowed=!1,Ot(a)},{capture:!0,signal:s}),e.addEventListener("focusout",a=>{u(this,vt)._focusEventsAllowed=!0,Ot(a)},{capture:!0,signal:s})),e.addEventListener("pointerdown",a=>a.stopPropagation(),{signal:s});const i=a=>{a.preventDefault(),e===u(this,Fr)?this.edit():u(this,vt).toggleComment(!0)};return e.addEventListener("click",i,{capture:!0,signal:s}),e.addEventListener("keydown",a=>{a.target===e&&a.key==="Enter"&&(k(this,Kc,!0),i(a))},{signal:s}),e.addEventListener("pointerenter",()=>{u(this,vt).toggleComment(!1,!0)},{signal:s}),e.addEventListener("pointerleave",()=>{u(this,vt).toggleComment(!1,!1)},{signal:s}),e};var Dh,Yc,vg,wg,jg,Ng,kg,Ga,Jc,qa,Qc,Ka,lc,LP,DP,OP;const m5=class m5{constructor({container:e,isPinchingDisabled:t=null,isPinchingStopped:s=null,onPinchStart:i=null,onPinching:a=null,onPinchEnd:o=null,signal:c}){C(this,lc);C(this,Dh);C(this,Yc,!1);C(this,vg,null);C(this,wg);C(this,jg);C(this,Ng);C(this,kg);C(this,Ga,null);C(this,Jc);C(this,qa,null);C(this,Qc);C(this,Ka,null);k(this,Dh,e),k(this,vg,s),k(this,wg,t),k(this,jg,i),k(this,Ng,a),k(this,kg,o),
381k(this,Qc,new AbortController),k(this,Jc,AbortSignal.any([c,u(this,Qc).signal])),e.addEventListener("touchstart",P(this,lc,LP).bind(this),{passive:!1,signal:u(this,Jc)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/ba.pixelRatio}destroy(){var e,t;(e=u(this,Qc))==null||e.abort(),k(this,Qc,null),(t=u(this,Ga))==null||t.abort(),k(this,Ga,null)}};Dh=new WeakMap,Yc=new WeakMap,vg=new WeakMap,wg=new WeakMap,jg=new WeakMap,Ng=new WeakMap,kg=new WeakMap,Ga=new WeakMap,Jc=new WeakMap,qa=new WeakMap,Qc=new WeakMap,Ka=new WeakMap,lc=new WeakSet,LP=function(e){var i,a,o;if((i=u(this,wg))!=null&&i.call(this))return;if(e.touches.length===1){if(u(this,Ga))return;const c=k(this,Ga,new AbortController),h=AbortSignal.any([u(this,Jc),c.signal]),f=u(this,Dh),m={capture:!0,signal:h,passive:!1},g=x=>{var y;x.pointerType==="touch"&&((y=u(this,Ga))==null||y.abort(),k(this,Ga,null))};f.addEventListener("pointerdown",x=>{x.pointerType==="touch"&&(Ot(x),g(x))},m),f.addEventListener("pointerup",g,m),f.addEventListener("pointercancel",g,m);return}if(!u(this,Ka)){k(this,Ka,new AbortController);const c=AbortSignal.any([u(this,Jc),u(this,Ka).signal]),h=u(this,Dh),f={signal:c,capture:!1,passive:!1};h.addEventListener("touchmove",P(this,lc,DP).bind(this),f);const m=P(this,lc,OP).bind(this);h.addEventListener("touchend",m,f),h.addEventListener("touchcancel",m,f),f.capture=!0,h.addEventListener("pointerdown",Ot,f),h.addEventListener("pointermove",Ot,f),h.addEventListener("pointercancel",Ot,f),h.addEventListener("pointerup",Ot,f),(a=u(this,jg))==null||a.call(this)}if(Ot(e),e.touches.length!==2||(o=u(this,vg))!=null&&o.call(this)){k(this,qa,null);return}let[t,s]=e.touches;t.identifier>s.identifier&&([t,s]=[s,t]),k(this,qa,{touch0X:t.screenX,touch0Y:t.screenY,touch1X:s.screenX,touch1Y:s.screenY})},DP=function(e){var M;if(!u(this,qa)||e.touches.length!==2)return;Ot(e);let[t,s]=e.touches;t.identifier>s.identifier&&([t,s]=[s,t]);const{screenX:i,screenY:a}=t,{screenX:o,screenY:c}=s,h=u(this,qa),{touch0X:f,touch0Y:m,touch1X:g,touch1Y:x}=h,y=g-f,v=x-m,j=o-i,N=c-a,S=Math.hypot(j,N)||1,A=Math.hypot(y,v)||1;if(!u(this,Yc)&&Math.abs(A-S)<=m5.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(h.touch0X=i,h.touch0Y=a,h.touch1X=o,h.touch1Y=c,!u(this,Yc)){k(this,Yc,!0);return}const E=[(i+o)/2,(a+c)/2];(M=u(this,Ng))==null||M.call(this,E,A,S)},OP=function(e){var t;e.touches.length>=2||(u(this,Ka)&&(u(this,Ka).abort(),k(this,Ka,null),(t=u(this,kg))==null||t.call(this)),u(this,qa)&&(Ot(e),k(this,qa,null),k(this,Yc,!1)))};let Wb=m5;var Zc,fi,Ct,ct,Xa,Oh,El,Sg,Os,ed,Ya,$r,Cl,Ag,td,Qn,_g,sd,Ja,ea,Fh,Bh,Ur,nd,Eg,cv,Ie,Oj,Cg,Fj,Xy,FP,BP,Bj,Yy,$j,$P,UP,HP,Uj,zP,Hj,VP,WP,GP,zj,ip;
381const Ue=class Ue{constructor(e){C(this,Ie);C(this,Zc,null);C(this,fi,null);C(this,Ct,null);C(this,ct,null);C(this,Xa,null);C(this,Oh,!1);C(this,El,null);C(this,Sg,"");C(this,Os,null);C(this,ed,null);C(this,Ya,null);C(this,$r,null);C(this,Cl,null);C(this,Ag,"");C(this,td,!1);C(this,Qn,null);C(this,_g,!1);C(this,sd,!1);C(this,Ja,!1);C(this,ea,null);C(this,Fh,0);C(this,Bh,0);C(this,Ur,null);C(this,nd,null);Y(this,"isSelected",!1);Y(this,"_isCopy",!1);Y(this,"_editToolbar",null);Y(this,"_initialOptions",Object.create(null));Y(this,"_initialData",null);Y(this,"_isVisible",!0);Y(this,"_uiManager",null);Y(this,"_focusEventsAllowed",!0);C(this,Eg,!1);C(this,cv,Ue._zIndex++);this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null,this.annotationElementId=e.annotationElementId||null,this.creationDate=e.creationDate||new Date,this.modificationDate=e.modificationDate||null,this.canAddComment=!0;const{rotation:t,rawDims:{pageWidth:s,pageHeight:i,pageX:a,pageY:o}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[s,i],this.pageTranslation=[a,o];const[c,h]=this.parentDimensions;this.x=e.x/c,this.y=e.y/h,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const e=Ue.prototype._resizeWithKeyboard,t=hu.TRANSLATE_SMALL,s=hu.TRANSLATE_BIG;return $e(this,"_resizerKeyboardManager",new J0([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-s,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[s,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-s]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,s]}],[["Escape","mac+Escape"],Ue.prototype._stopResizingWithKeyboard]]))}updatePageIndex(e){this.pageIndex=e}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return $e(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new Xz({id:e._uiManager.getId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t){if(Ue._l10n??(Ue._l10n=e),Ue._l10nResizer||(Ue._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),Ue._borderLineWidth!==-1)return;const s=getComputedStyle(document.documentElement);Ue._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){it("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return u(this,Eg)}set _isDraggable(e){var t;k(this,Eg,e),(t=this.div)==null||t.classList.toggle("draggable",e)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(e*2),this.y+=this.width*e/(t*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(e*2),this.y-=this.width*e/(t*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}
381setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=u(this,cv)}setParent(e){var t;e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):(P(this,Ie,ip).call(this),(t=u(this,$r))==null||t.remove(),k(this,$r,null)),this.parent=e}focusin(e){this._focusEventsAllowed&&(u(this,td)?k(this,td,!1):this.parent.setSelected(this))}focusout(e){var s;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const t=e.relatedTarget;t!=null&&t.closest(`#${this.id}`)||(e.preventDefault(),(s=this.parent)!=null&&s.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,s,i){const[a,o]=this.parentDimensions;[s,i]=this.screenToPageTranslation(s,i),this.x=(e+s)/a,this.y=(t+i)/o,this.fixAndSetPosition()}_moveAfterPaste(e,t){if(this.isClone){delete this.isClone;return}const[s,i]=this.parentDimensions;this.setAt(e*s,t*i,this.width*s,this.height*i),this._onTranslated()}translate(e,t){P(this,Ie,Oj).call(this,this.parentDimensions,e,t)}translateInPage(e,t){u(this,Qn)||k(this,Qn,[this.x,this.y,this.width,this.height]),P(this,Ie,Oj).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(e,t){u(this,Qn)||k(this,Qn,[this.x,this.y,this.width,this.height]);const{div:s,parentDimensions:[i,a]}=this;if(this.x+=e/i,this.y+=t/a,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:g,y:x}=this.div.getBoundingClientRect();this.parent.findNewParent(this,g,x)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:o,y:c}=this;const[h,f]=this.getBaseTranslation();o+=h,c+=f;const{style:m}=s;m.left=`${(100*o).toFixed(2)}%`,m.top=`${(100*c).toFixed(2)}%`,this._onTranslating(o,c),s.scrollIntoView({block:"nearest"})}_onTranslating(e,t){}_onTranslated(e,t){}get _hasBeenMoved(){return!!u(this,Qn)&&(u(this,Qn)[0]!==this.x||u(this,Qn)[1]!==this.y)}get _hasBeenResized(){return!!u(this,Qn)&&(u(this,Qn)[2]!==this.width||u(this,Qn)[3]!==this.height)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:s}=Ue,i=s/e,a=s/t;switch(this.rotation){case 90:return[-i,a];case 180:return[i,a];case 270:return[i,-a];default:return[-i,-a]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const{div:{style:t},pageDimensions:[s,i]}=this;let{x:a,y:o,width:c,height:h}=this;if(c*=s,h*=i,a*=s,o*=i,this._mustFixPosition)switch(e){case 0:a=Pt(a,0,s-c),o=Pt(o,0,i-h);break;case 90:a=Pt(a,0,s-h),o=Pt(o,c,i);break;case 180:a=Pt(a,c,s),o=Pt(o,h,i);break;case 270:a=Pt(a,h,s),o=Pt(o,0,i-c);break}this.x=a/=s,this.y=o/=i;const[f,m]=this.getBaseTranslation();a+=f,o+=m,t.left=`${(100*a).toFixed(2)}%`,t.top=`${(100*o).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(e,t){var s;return P(s=Ue,Cg,Fj).call(s,e,t,this.parentRotation)}pageTranslationToScreen(e,t){var s;return P(s=Ue,Cg,Fj).call(s,e,t,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,s]}=this;return[t*e,s*e]}setDims(){const{div:{style:e},width:t,height:s}=this;e.width=`${(100*t).toFixed(2)}%`,e.height=`${(100*s).toFixed(2)}%`}getInitialTranslation(){return[0,0]}_onResized(){}static _round(e){return Math.round(e*1e4)/1e4}_onResizing(){}altTextFinish(){var e;(e=u(this,Ct))==null||e.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||u(this,sd))return this._editToolbar;this._editToolbar=new Ej(this),this.div.append(this._editToolbar.render());const{toolbarButtons:e}=this;if(e)for(const[t,s]of e)await this._editToolbar.addButton(t,s);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){var e;(e=this._editToolbar)==null||e.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}
381removeCommentButtonFromToolbar(){var e;(e=this._editToolbar)==null||e.removeButton("comment")}removeEditToolbar(){var e,t;(e=this._editToolbar)==null||e.remove(),this._editToolbar=null,(t=u(this,Ct))==null||t.destroy()}addContainer(e){var s;const t=(s=this._editToolbar)==null?void 0:s.div;t?t.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return u(this,Ct)||(Vb.initialize(Ue._l10n),k(this,Ct,new Vb(this)),u(this,Zc)&&(u(this,Ct).data=u(this,Zc),k(this,Zc,null))),u(this,Ct)}get altTextData(){var e;return(e=u(this,Ct))==null?void 0:e.data}set altTextData(e){u(this,Ct)&&(u(this,Ct).data=e)}get guessedAltText(){var e;return(e=u(this,Ct))==null?void 0:e.guessedText}async setGuessedAltText(e){var t;await((t=u(this,Ct))==null?void 0:t.setGuessedText(e))}serializeAltText(e){var t;return(t=u(this,Ct))==null?void 0:t.serialize(e)}hasAltText(){return!!u(this,Ct)&&!u(this,Ct).isEmpty()}hasAltTextData(){var e;return((e=u(this,Ct))==null?void 0:e.hasData())??!1}focusCommentButton(){var e;(e=u(this,ct))==null||e.focusButton()}addCommentButton(){return this.canAddComment?u(this,ct)||k(this,ct,new by(this)):null}addStandaloneCommentButton(){if(this._uiManager.hasCommentManager()){if(u(this,Xa)){this._uiManager.isEditingMode()&&u(this,Xa).classList.remove("hidden");return}this.hasComment&&(k(this,Xa,u(this,ct).renderForStandalone()),this.div.append(u(this,Xa)))}}removeStandaloneCommentButton(){u(this,ct).removeStandaloneCommentButton(),k(this,Xa,null)}hideStandaloneCommentButton(){var e;(e=u(this,Xa))==null||e.classList.add("hidden")}get comment(){if(!u(this,ct))return null;const{data:{richText:e,text:t,date:s,deleted:i}}=u(this,ct);return{text:t,richText:e,date:s,deleted:i,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(e){u(this,ct)||k(this,ct,new by(this)),typeof e=="object"&&e!==null?u(this,ct).restoreData(e):u(this,ct).data=e,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:e,popupRef:t,richText:s}){if(!t||(u(this,ct)||k(this,ct,new by(this)),u(this,ct).setInitialText(e,s),!this.annotationElementId))return;const i=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);i&&this.updateFromAnnotationLayer(i)}get hasEditedComment(){var e;return(e=u(this,ct))==null?void 0:e.hasBeenEdited()}get hasDeletedComment(){var e;return(e=u(this,ct))==null?void 0:e.isDeleted()}get hasComment(){return!!u(this,ct)&&!u(this,ct).isEmpty()&&!u(this,ct).isDeleted()}async editComment(e){u(this,ct)||k(this,ct,new by(this)),u(this,ct).edit(e)}
381toggleComment(e,t=void 0){this.hasComment&&this._uiManager.toggleComment(this,e,t)}setSelectedCommentButton(e){u(this,ct).setSelectedButton(e)}addComment(e){if(this.hasEditedComment){const[,,,i]=e.rect,[a]=this.pageDimensions,[o]=this.pageTranslation,c=o+a+1,h=i-100,f=c+180;e.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[c,h,f,i]}}}updateFromAnnotationLayer({popup:{contents:e,deleted:t}}){u(this,ct).data=t?null:e}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){var o;const e=this.div=document.createElement("div");e.setAttribute("data-editor-rotation",(360-this.rotation)%360),e.className=this.name,e.setAttribute("id",this.id),e.tabIndex=u(this,Oh)?-1:0,e.setAttribute("role","application"),this.defaultL10nId&&e.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||e.classList.add("hidden"),this.setInForeground(),P(this,Ie,Hj).call(this);const[t,s]=this.parentDimensions;this.parentRotation%180!==0&&(e.style.maxWidth=`${(100*s/t).toFixed(2)}%`,e.style.maxHeight=`${(100*t/s).toFixed(2)}%`);const[i,a]=this.getInitialTranslation();return this.translate(i,a),vP(this,e,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(u(this,nd)||k(this,nd,new Wb({container:e,isPinchingDisabled:()=>!this.isSelected,onPinchStart:P(this,Ie,$P).bind(this),onPinching:P(this,Ie,UP).bind(this),onPinchEnd:P(this,Ie,HP).bind(this),signal:this._uiManager._signal}))),this.addStandaloneCommentButton(),(o=this._uiManager._editorUndoBar)==null||o.hide(),e}pointerdown(e){const{isMac:t}=ls.platform;if(e.button!==0||e.ctrlKey&&t){e.preventDefault();return}if(k(this,td,!0),this._isDraggable){P(this,Ie,zP).call(this,e);return}P(this,Ie,Uj).call(this,e)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){u(this,ea)&&clearTimeout(u(this,ea)),k(this,ea,setTimeout(()=>{var e;k(this,ea,null),(e=this.parent)==null||e.moveEditorInDOM(this)},0))}_setParentAndPosition(e,t,s){e.changeParent(this),this.x=t,this.y=s,this.fixAndSetPosition(),this._onTranslated()}getRect(e,t,s=this.rotation){const i=this.parentScale,[a,o]=this.pageDimensions,[c,h]=this.pageTranslation,f=e/i,m=t/i,g=this.x*a,x=this.y*o,y=this.width*a,v=this.height*o;switch(s){case 0:return[g+f+c,o-x-m-v+h,g+f+y+c,o-x-m+h];case 90:return[g+m+c,o-x+f+h,g+m+v+c,o-x+f+y+h];case 180:return[g-f-y+c,o-x+m+h,g-f+c,o-x+m+v+h];case 270:return[g-m-v+c,o-x-f-y+h,g-m+c,o-x-f+h];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[s,i,a,o]=e,c=a-s,h=o-i;switch(this.rotation){case 0:return[s,t-o,c,h];case 90:return[s,t-i,h,c];case 180:return[a,t-i,c,h];case 270:return[a,t-o,h,c];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&Ue._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){var e;(e=u(this,ct))==null||e.onUpdatedColor()}getData(){const{comment:{text:e,color:t,date:s,opacity:i,deleted:a,richText:o},uid:c,pageIndex:h,creationDate:f,modificationDate:m}=this;return{id:c,pageIndex:h,rect:this.getPDFRect(),richText:o,contentsObj:{str:e},creationDate:f,modificationDate:s||m,popupRef:!a,color:t,opacity:i}}onceAdded(e){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),k(this,sd,!0),!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),k(this,sd,!1),!0):!1}isInEditMode(){return u(this,sd)}shouldGetKeyboardEvents(){return u(this,Ja)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:e,left:t,bottom:s,right:i}=this.getClientDimensions(),{innerHeight:a,innerWidth:o}=window;return t<o&&i>0&&e<a&&s>0}rebuild(){P(this,Ie,Hj).call(this)}rotate(e){}resize(){}serializeDeleted(){var e;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((e=this._initialData)==null?void 0:e.popupRef)||""}}serialize(e=!1,t=null){var s;return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:((s=this._initialData)==null?void 0:s.popupRef)||""}}
381static async deserialize(e,t,s){const i=new this.prototype.constructor({parent:t,id:s.getId(),uiManager:s,annotationElementId:e.annotationElementId,creationDate:e.creationDate,modificationDate:e.modificationDate});i.rotation=e.rotation,k(i,Zc,e.accessibilityData),i._isCopy=e.isCopy||!1;const[a,o]=i.pageDimensions,[c,h,f,m]=i.getRectInCurrentCoords(e.rect,o);return i.x=c/a,i.y=h/o,i.width=f/a,i.height=m/o,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var e,t,s;if((e=u(this,Cl))==null||e.abort(),k(this,Cl,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.hideCommentPopup(),u(this,ea)&&(clearTimeout(u(this,ea)),k(this,ea,null)),P(this,Ie,ip).call(this),this.removeEditToolbar(),u(this,Ur)){for(const i of u(this,Ur).values())clearTimeout(i);k(this,Ur,null)}this.parent=null,(t=u(this,nd))==null||t.destroy(),k(this,nd,null),(s=u(this,$r))==null||s.remove(),k(this,$r,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(P(this,Ie,FP).call(this),u(this,Os).classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){const{commentButtonPosition:[e,t]}=this,[s,i,a,o]=this.getPDFRect();return[Ue._round(s+(a-s)*e),Ue._round(i+(o-i)*(1-t))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return u(this,ct).commentPopupPositionInLayer}set commentPopupPosition(e){u(this,ct).commentPopupPositionInLayer=e}hasDefaultPopupPosition(){return u(this,ct).hasDefaultPopupPosition()}get commentButtonWidth(){return u(this,ct).commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(e){var t;(t=u(this,ct))==null||t.setCommentButtonStates(e)}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),k(this,Ya,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const t=u(this,Os).children;if(!u(this,fi)){k(this,fi,Array.from(t));const o=P(this,Ie,VP).bind(this),c=P(this,Ie,WP).bind(this),h=this._uiManager._signal;for(const f of u(this,fi)){const m=f.getAttribute("data-resizer-name");f.setAttribute("role","spinbutton"),f.addEventListener("keydown",o,{signal:h}),f.addEventListener("blur",c,{signal:h}),f.addEventListener("focus",P(this,Ie,GP).bind(this,m),{signal:h}),f.setAttribute("data-l10n-id",Ue._l10nResizer[m])}}const s=u(this,fi)[0];let i=0;for(const o of t){if(o===s)break;i++}const a=(360-this.rotation+this.parentRotation)%360/90*(u(this,fi).length/4);if(a!==i){if(a<i)for(let c=0;c<i-a;c++)u(this,Os).append(u(this,Os).firstElementChild);else if(a>i)for(let c=0;c<a-i;c++)u(this,Os).firstElementChild.before(u(this,Os).lastElementChild);let o=0;for(const c of t){const f=u(this,fi)[o++].getAttribute("data-resizer-name");c.setAttribute("data-l10n-id",Ue._l10nResizer[f])}}P(this,Ie,zj).call(this,0),k(this,Ja,!0),u(this,Os).firstElementChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}_resizeWithKeyboard(e,t){u(this,Ja)&&P(this,Ie,$j).call(this,u(this,Ag),{deltaX:e,deltaY:t,fromKeyboard:!0})}_stopResizingWithKeyboard(){P(this,Ie,ip).call(this),this.div.focus()}select(){var e,t,s;if(this.isSelected&&this._editToolbar){this._editToolbar.show();return}if(this.isSelected=!0,this.makeResizable(),(e=this.div)==null||e.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var i,a;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((a=this._editToolbar)==null||a.show())});return}(t=this._editToolbar)==null||t.show(),(s=u(this,Ct))==null||s.toggleAltTextBadge(!1)}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>{var e;return(e=this.div)==null?void 0:e.focus({preventScroll:!0})},0)}unselect(){var e,t,s,i,a;this.isSelected&&(this.isSelected=!1,(e=u(this,Os))==null||e.classList.add("hidden"),(t=this.div)==null||t.classList.remove("selectedEditor"),(s=this.div)!=null&&s.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(a=u(this,Ct))==null||a.toggleAltTextBadge(!0),this.hideCommentPopup())}hideCommentPopup(){this.hasComment&&this._uiManager.toggleComment(null)}updateParams(e,t){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(e){e.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.uid}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return u(this,_g)}set isEditing(e){k(this,_g,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){u(this,Ur)||k(this,Ur,new Map);const{action:s}=e;let i=u(this,Ur).get(s);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(e),u(this,Ur).delete(s),u(this,Ur).size===0&&k(this,Ur,null)},Ue._telemetryTimeout),u(this,Ur).set(s,i);return}e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),k(this,Oh,!1)}disable(){this.div&&(this.div.tabIndex=-1),k(this,Oh,!0)}updateFakeAnnotationElement(e){if(!u(this,$r)&&!this.deleted){k(this,$r,e.addFakeAnnotation(this));return}if(this.deleted){u(this,$r).remove(),k(this,$r,null);return}(this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&u(this,$r).updateEdited({rect:this.getPDFRect(),popup:this.comment})}renderAnnotationElement(e){if(this.deleted)return e.hide(),null;let t=e.container.querySelector(".annotationContent");
vendor: 5,243 bytes, line 381
381if(!t)t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);else if(t.nodeName==="CANVAS"){const s=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),s.before(t)}return t}resetAnnotationElement(e){const{firstElementChild:t}=e.container;(t==null?void 0:t.nodeName)==="DIV"&&t.classList.contains("annotationContent")&&t.remove()}};Zc=new WeakMap,fi=new WeakMap,Ct=new WeakMap,ct=new WeakMap,Xa=new WeakMap,Oh=new WeakMap,El=new WeakMap,Sg=new WeakMap,Os=new WeakMap,ed=new WeakMap,Ya=new WeakMap,$r=new WeakMap,Cl=new WeakMap,Ag=new WeakMap,td=new WeakMap,Qn=new WeakMap,_g=new WeakMap,sd=new WeakMap,Ja=new WeakMap,ea=new WeakMap,Fh=new WeakMap,Bh=new WeakMap,Ur=new WeakMap,nd=new WeakMap,Eg=new WeakMap,cv=new WeakMap,Ie=new WeakSet,Oj=function([e,t],s,i){[s,i]=this.screenToPageTranslation(s,i),this.x+=s/e,this.y+=i/t,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},Cg=new WeakSet,Fj=function(e,t,s){switch(s){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},Xy=function(e){switch(e){case 90:{const[t,s]=this.pageDimensions;return[0,-t/s,s/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,s]=this.pageDimensions;return[0,t/s,-s/t,0]}default:return[1,0,0,1]}},FP=function(){if(u(this,Os))return;k(this,Os,document.createElement("div")),u(this,Os).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const s of e){const i=document.createElement("div");u(this,Os).append(i),i.classList.add("resizer",s),i.setAttribute("data-resizer-name",s),i.addEventListener("pointerdown",P(this,Ie,BP).bind(this,s),{signal:t}),i.addEventListener("contextmenu",Jr,{signal:t}),i.tabIndex=-1}this.div.prepend(u(this,Os))},BP=function(e,t){var m;t.preventDefault();const{isMac:s}=ls.platform;if(t.button!==0||t.ctrlKey&&s)return;(m=u(this,Ct))==null||m.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,k(this,ed,[t.screenX,t.screenY]);const a=new AbortController,o=this._uiManager.combinedSignal(a);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",P(this,Ie,$j).bind(this,e),{passive:!0,capture:!0,signal:o}),window.addEventListener("touchmove",Ot,{passive:!1,signal:o}),window.addEventListener("contextmenu",Jr,{signal:o}),k(this,Ya,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const c=this.parent.div.style.cursor,h=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const f=()=>{var g;a.abort(),this.parent.togglePointerEvents(!0),(g=u(this,Ct))==null||g.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=c,this.div.style.cursor=h,P(this,Ie,Yy).call(this)};window.addEventListener("pointerup",f,{signal:o}),window.addEventListener("blur",f,{signal:o})},Bj=function(e,t,s,i){this.width=s,this.height=i,this.x=e,this.y=t,this.setDims(),this.fixAndSetPosition(),this._onResized()},Yy=function(){if(!u(this,Ya))return;const{savedX:e,savedY:t,savedWidth:s,savedHeight:i}=u(this,Ya);k(this,Ya,null);const a=this.x,o=this.y,c=this.width,h=this.height;a===e&&o===t&&c===s&&h===i||this.addCommands({cmd:P(this,Ie,Bj).bind(this,a,o,c,h),undo:P(this,Ie,Bj).bind(this,e,t,s,i),mustExec:!0})},$j=function(e,t){const[s,i]=this.parentDimensions,a=this.x,o=this.y,c=this.width,h=this.height,f=Ue.MIN_SIZE/s,m=Ue.MIN_SIZE/i,g=P(this,Ie,Xy).call(this,this.rotation),x=(oe,le)=>[g[0]*oe+g[2]*le,g[1]*oe+g[3]*le],y=P(this,Ie,Xy).call(this,360-this.rotation),v=(oe,le)=>[y[0]*oe+y[2]*le,y[1]*oe+y[3]*le];let j,N,S=!1,A=!1;switch(e){case"topLeft":S=!0,j=(oe,le)=>[0,0],N=(oe,le)=>[oe,le];break;case"topMiddle":j=(oe,le)=>[oe/2,0],N=(oe,le)=>[oe/2,le];break;case"topRight":S=!0,j=(oe,le)=>[oe,0],N=(oe,le)=>[0,le];break;case"middleRight":A=!0,j=(oe,le)=>[oe,le/2],N=(oe,le)=>[0,le/2];break;case"bottomRight":S=!0,j=(oe,le)=>[oe,le],N=(oe,le)=>[0,0];break;case"bottomMiddle":j=(oe,le)=>[oe/2,le],N=(oe,le)=>[oe/2,0];break;case"bottomLeft":S=!0,j=(oe,le)=>[0,le],N=(oe,le)=>[oe,0];break;case"middleLeft":A=!0,j=(oe,le)=>[0,le/2],N=(oe,le)=>[oe,le/2];break}const E=j(c,h),M=N(c,h);let R=x(...M);const I=Ue._round(a+R[0]),F=Ue._round(o+R[1]);let D=1,O=1,$,z;if(t.fromKeyboard)({deltaX:$,deltaY:z}=t);else{const{screenX:oe,screenY:le}=t,[se,K]=u(this,ed);[$,z]=this.screenToPageTranslation(oe-se,le-K),u(this,ed)[0]=oe,u(this,ed)[1]=le}if([$,z]=v($/s,z/i),S){const oe=Math.hypot(c,h);D=O=Math.max(Math.min(Math.hypot(M[0]-E[0]-$,M[1]-E[1]-z)/oe,1/c,1/h),f/c,m/h)}else A?D=Pt(Math.abs(M[0]-E[0]-$),f,1)/c:O=Pt(Math.abs(M[1]-E[1]-z),m,1)/h;const re=Ue._round(c*D),he=Ue._round(h*O);R=x(...N(re,he));const de=I-R[0],fe=F-R[1];u(this,Qn)||k(this,Qn,[this.x,this.y,this.width,this.height]),this.width=re,this.height=he,this.x=de,this.y=fe,this.setDims(),this.fixAndSetPosition(),this._onResizing()},$P=function(){var e;k(this,Ya,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(e=u(this,Ct))==null||e.toggle(!1),this.parent.togglePointerEvents(!1)},UP=function(e,t,s){let a=.7*(s/t)+1-.7;
381if(a===1)return;const o=P(this,Ie,Xy).call(this,this.rotation),c=(I,F)=>[o[0]*I+o[2]*F,o[1]*I+o[3]*F],[h,f]=this.parentDimensions,m=this.x,g=this.y,x=this.width,y=this.height,v=Ue.MIN_SIZE/h,j=Ue.MIN_SIZE/f;a=Math.max(Math.min(a,1/x,1/y),v/x,j/y);const N=Ue._round(x*a),S=Ue._round(y*a);if(N===x&&S===y)return;u(this,Qn)||k(this,Qn,[m,g,x,y]);const A=c(x/2,y/2),E=Ue._round(m+A[0]),M=Ue._round(g+A[1]),R=c(N/2,S/2);this.x=E-R[0],this.y=M-R[1],this.width=N,this.height=S,this.setDims(),this.fixAndSetPosition(),this._onResizing()},HP=function(){var e;(e=u(this,Ct))==null||e.toggle(!0),this.parent.togglePointerEvents(!0),P(this,Ie,Yy).call(this)},Uj=function(e){const{isMac:t}=ls.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},zP=function(e){const{isSelected:t}=this;this._uiManager.setUpDragSession();let s=!1;const i=new AbortController,a=this._uiManager.combinedSignal(i),o={capture:!0,passive:!1,signal:a},c=f=>{i.abort(),k(this,El,null),k(this,td,!1),this._uiManager.endDragSession()||P(this,Ie,Uj).call(this,f),s&&this._onStopDragging()};t&&(k(this,Fh,e.clientX),k(this,Bh,e.clientY),k(this,El,e.pointerId),k(this,Sg,e.pointerType),window.addEventListener("pointermove",f=>{s||(s=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());const{clientX:m,clientY:g,pointerId:x}=f;if(x!==u(this,El)){Ot(f);return}const[y,v]=this.screenToPageTranslation(m-u(this,Fh),g-u(this,Bh));k(this,Fh,m),k(this,Bh,g),this._uiManager.dragSelectedEditors(y,v)},o),window.addEventListener("touchmove",Ot,o),window.addEventListener("pointerdown",f=>{f.pointerType===u(this,Sg)&&(u(this,nd)||f.isPrimary)&&c(f),Ot(f)},o));const h=f=>{if(!u(this,El)||u(this,El)===f.pointerId){c(f);return}Ot(f)};window.addEventListener("pointerup",h,{signal:a}),window.addEventListener("blur",h,{signal:a})},Hj=function(){if(u(this,Cl)||!this.div)return;k(this,Cl,new AbortController);const e=this._uiManager.combinedSignal(u(this,Cl));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})},VP=function(e){Ue._resizerKeyboardManager.exec(this,e)},WP=function(e){var t;u(this,Ja)&&((t=e.relatedTarget)==null?void 0:t.parentNode)!==u(this,Os)&&P(this,Ie,ip).call(this)},GP=function(e){k(this,Ag,u(this,Ja)?e:"")},zj=function(e){if(u(this,fi))for(const t of u(this,fi))t.tabIndex=e},ip=function(){k(this,Ja,!1),P(this,Ie,zj).call(this,-1),P(this,Ie,Yy).call(this)},C(Ue,Cg),Y(Ue,"_l10n",null),Y(Ue,"_l10nResizer",null),Y(Ue,"_borderLineWidth",-1),Y(Ue,"_colorManager",new Pj),Y(Ue,"_zIndex",1),Y(Ue,"_telemetryTimeout",1e3);let wt=Ue;class Xz extends wt{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const CC=3285377520,Cr=4294901760,Ui=65535;class Vj{constructor(e){this.h1=e?e&4294967295:CC,this.h2=e?e&4294967295:CC}update(e){let t,s;if(typeof e=="string"){t=new Uint8Array(e.length*2),s=0;for(let j=0,N=e.length;j<N;j++){const S=e.charCodeAt(j);S<=255?t[s++]=S:(t[s++]=S>>>8,t[s++]=S&255)}}else if(ArrayBuffer.isView(e))t=e.slice(),s=t.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=s>>2,a=s-i*4,o=new Uint32Array(t.buffer,0,i);let c=0,h=0,f=this.h1,m=this.h2;const g=3432918353,x=461845907,y=g&Ui,v=x&Ui;for(let j=0;j<i;j++)j&1?(c=o[j],c=c*g&Cr|c*y&Ui,c=c<<15|c>>>17,c=c*x&Cr|c*v&Ui,f^=c,f=f<<13|f>>>19,f=f*5+3864292196):(h=o[j],h=h*g&Cr|h*y&Ui,h=h<<15|h>>>17,h=h*x&Cr|h*v&Ui,m^=h,m=m<<13|m>>>19,m=m*5+3864292196);switch(c=0,a){case 3:c^=t[i*4+2]<<16;case 2:c^=t[i*4+1]<<8;case 1:c^=t[i*4],c=c*g&Cr|c*y&Ui,c=c<<15|c>>>17,c=c*x&Cr|c*v&Ui,i&1?f^=c:m^=c}this.h1=f,this.h2=m}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=e*3981806797&Cr|e*36045&Ui,t=t*4283543511&Cr|((t<<16|e>>>16)*2950163797&Cr)>>>16,e^=t>>>1,e=e*444984403&Cr|e*60499&Ui,t=t*3301882366&Cr|((t<<16|e>>>16)*3120437893&Cr)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const Gp=Object.freeze({map:null,hash:"",transfer:void 0});var rd,id,Qa,Fs,dv,qP;class i5{constructor(){C(this,dv);C(this,rd,!1);C(this,id,null);C(this,Qa,null);C(this,Fs,new Map);Y(this,"onSetModified",null);Y(this,"onResetModified",null);Y(this,"onAnnotationEditor",null)}getValue(e,t){const s=u(this,Fs).get(e);return s===void 0?t:Object.assign(t,s)}getRawValue(e){return u(this,Fs).get(e)}remove(e){var s;const t=u(this,Fs).get(e);t!==void 0&&(t instanceof wt&&u(this,Qa).delete(t.annotationElementId),u(this,Fs).delete(e),u(this,Fs).size===0&&this.resetModified(),!u(this,Fs).values().some(i=>i instanceof wt)&&((s=this.onAnnotationEditor)==null||s.call(this,null)))}setValue(e,t){var a;const s=u(this,Fs).get(e);let i=!1;if(s!==void 0)for(const[o,c]of Object.entries(t))s[o]!==c&&(i=!0,s[o]=c);else i=!0,u(this,Fs).set(e,t);i&&P(this,dv,qP).call(this),t instanceof wt&&((u(this,Qa)||k(this,Qa,new Map)).set(t.annotationElementId,t),(a=this.onAnnotationEditor)==null||a.call(this,t.constructor._type))}has(e){return u(this,Fs).has(e)}get size(){return u(this,Fs).size}resetModified(){var e;u(this,rd)&&(k(this,rd,!1),(e=this.onResetModified)==null||e.call(this))}get print(){return new KP(this)}get serializable(){if(u(this,Fs).size===0)return Gp;const e=new Map,t=new Vj,s=[],i=Object.create(null);let a=!1;for(const[o,c]of u(this,Fs)){const h=c instanceof wt?c.serialize(!1,i):c;c.page&&(c.pageIndex=c.page._pageIndex,delete c.page),h&&(e.set(o,h),t.update(`${o}:${JSON.stringify(h)}`),a||(a=!!h.bitmap))}if(a)for(const o of e.values())o.bitmap&&s.push(o.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:s}:Gp}get editorStats(){let e=null;const t=new Map;let s=0,i=0;for(const a of u(this,Fs).values()){if(!(a instanceof wt)){a.popup&&(a.popup.deleted?i+=1:s+=1);continue}a.isCommentDeleted?i+=1:a.hasEditedComment&&(s+=1);const o=a.telemetryFinalData;if(!o)continue;const{type:c}=o;t.has(c)||t.set(c,Object.getPrototypeOf(a).constructor),e||(e=Object.create(null));const h=e[c]||(e[c]=new Map);for(const[f,m]of Object.entries(o)){if(f==="type")continue;const g=h.getOrInsertComputed(f,e5);g.set(m,(g.get(m)??0)+1)}}if((i>0||s>0)&&(e||(e=Object.create(null)),e.comments={deleted:i,edited:s}),!e)return null;
381for(const[a,o]of t)e[a]=o.computeTelemetryFinalData(e[a]);return e}resetModifiedIds(){k(this,id,null)}updateEditor(e,t){var i;const s=(i=u(this,Qa))==null?void 0:i.get(e);return s?(s.updateFromAnnotationLayer(t),!0):!1}getEditor(e){var t;return((t=u(this,Qa))==null?void 0:t.get(e))||null}get modifiedIds(){if(u(this,id))return u(this,id);const e=[];if(u(this,Qa))for(const s of u(this,Qa).values())s.serialize()&&e.push(s.annotationElementId);let t="";if(e.length){const s=new Vj;s.update(e.join(",")),t=s.hexdigest()}return k(this,id,{ids:new Set(e),hash:t})}[Symbol.iterator](){return u(this,Fs).entries()}}rd=new WeakMap,id=new WeakMap,Qa=new WeakMap,Fs=new WeakMap,dv=new WeakSet,qP=function(){var e;u(this,rd)||(k(this,rd,!0),(e=this.onSetModified)==null||e.call(this))};var Tg;class KP extends i5{constructor(t){super();C(this,Tg,Gp);const{serializable:s}=t;if(s===Gp)return;const{map:i,hash:a,transfer:o}=s,c=structuredClone(i,o?{transfer:o}:null);k(this,Tg,{map:c,hash:a,transfer:[]})}get print(){it("Should not call PrintAnnotationStorage.print")}get serializable(){return u(this,Tg)}get modifiedIds(){return $e(this,"modifiedIds",{ids:new Set,hash:""})}}Tg=new WeakMap;const zu="__forcedDependency",{floor:TC,ceil:PC}=Math;function RC(r,e,t,s,i,a){r[e*4+0]=Math.min(r[e*4+0],t),r[e*4+1]=Math.min(r[e*4+1],s),r[e*4+2]=Math.max(r[e*4+2],i),r[e*4+3]=Math.max(r[e*4+3],a)}const Wj=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];var $h,Tl;class Yz{constructor(e,t){C(this,$h);C(this,Tl);k(this,$h,e),k(this,Tl,t)}get length(){return u(this,$h).length}isEmpty(e){return u(this,$h)[e]===Wj}minX(e){return u(this,Tl)[e*4+0]/256}minY(e){return u(this,Tl)[e*4+1]/256}maxX(e){return(u(this,Tl)[e*4+2]+1)/256}maxY(e){return(u(this,Tl)[e*4+3]+1)/256}}$h=new WeakMap,Tl=new WeakMap;const MC=(r,e)=>r==null?void 0:r.getOrInsertComputed(e,()=>({dependencies:new Set,isRenderingOperation:!1}));var Za,rt,St,ad,od,ld,tn,Pg,Gj;class Jz{constructor(e,t){C(this,Pg);C(this,Za,[[1,0,0,1,0,0]]);C(this,rt,[-1/0,-1/0,1/0,1/0]);C(this,St,new Float64Array(ko));Y(this,"_pendingBBoxIdx",-1);C(this,ad);C(this,od);C(this,ld);C(this,tn);Y(this,"_savesStack",[]);Y(this,"_markedContentStack",[]);k(this,ad,e.width),k(this,od,e.height),P(this,Pg,Gj).call(this,t)}growOperationsCount(e){e>=u(this,tn).length&&P(this,Pg,Gj).call(this,e,u(this,tn))}get clipBox(){return u(this,rt)}save(e){return k(this,rt,{__proto__:u(this,rt)}),this._savesStack.push(e),this}restore(e,t){const s=Object.getPrototypeOf(u(this,rt));if(s===null)return this;k(this,rt,s);const i=this._savesStack.pop();return i!==void 0&&(t==null||t(i,e),u(this,tn)[e]=u(this,tn)[i]),this}recordOpenMarker(e){return this._savesStack.push(e),this}getOpenMarker(){return this._savesStack.length===0?null:this._savesStack.at(-1)}recordCloseMarker(e,t){const s=this._savesStack.pop();return s!==void 0&&(t==null||t(s,e),u(this,tn)[e]=u(this,tn)[s]),this}beginMarkedContent(e){return this._markedContentStack.push(e),this}endMarkedContent(e,t){const s=this._markedContentStack.pop();return s!==void 0&&(t==null||t(s,e),u(this,tn)[e]=u(this,tn)[s]),this}pushBaseTransform(e){return u(this,Za).push(me.multiplyByDOMMatrix(u(this,Za).at(-1),e.getTransform())),this}popBaseTransform(){return u(this,Za).length>1&&u(this,Za).pop(),this}resetBBox(e){return this._pendingBBoxIdx!==e&&(this._pendingBBoxIdx=e,u(this,St).set(ko,0)),this}recordClipBox(e,t,s,i,a,o){const c=me.multiplyByDOMMatrix(u(this,Za).at(-1),t.getTransform()),h=ko.slice();me.axialAlignedBoundingBox([s,a,i,o],c,h);const f=me.intersect(u(this,rt),h);return f?(u(this,rt)[0]=f[0],u(this,rt)[1]=f[1],u(this,rt)[2]=f[2],u(this,rt)[3]=f[3]):(u(this,rt)[0]=u(this,rt)[1]=1/0,u(this,rt)[2]=u(this,rt)[3]=-1/0),this}recordBBox(e,t,s,i,a,o){const c=u(this,rt);if(c[0]===1/0)return this;const h=me.multiplyByDOMMatrix(u(this,Za).at(-1),t.getTransform());if(c[0]===-1/0)return me.axialAlignedBoundingBox([s,a,i,o],h,u(this,St)),this;const f=ko.slice();return me.axialAlignedBoundingBox([s,a,i,o],h,f),u(this,St)[0]=Pt(f[0],c[0],u(this,St)[0]),u(this,St)[1]=Pt(f[1],c[1],u(this,St)[1]),u(this,St)[2]=Pt(f[2],u(this,St)[2],c[2]),u(this,St)[3]=Pt(f[3],u(this,St)[3],c[3]),this}recordFullPageBBox(e){return u(this,St)[0]=Math.max(0,u(this,rt)[0]),u(this,St)[1]=Math.max(0,u(this,rt)[1]),u(this,St)[2]=Math.min(u(this,ad),u(this,rt)[2]),u(this,St)[3]=Math.min(u(this,od),u(this,rt)[3]),this}
381recordOperation(e,t=!1,s){if(this._pendingBBoxIdx!==e)return this;const i=TC(u(this,St)[0]*256/u(this,ad)),a=TC(u(this,St)[1]*256/u(this,od)),o=PC(u(this,St)[2]*256/u(this,ad)),c=PC(u(this,St)[3]*256/u(this,od));if(RC(u(this,ld),e,i,a,o,c),s)for(const h of s)for(const f of h)f!==e&&RC(u(this,ld),f,i,a,o,c);return t||(this._pendingBBoxIdx=-1),this}bboxToClipBoxDropOperation(e){return this._pendingBBoxIdx===e&&(this._pendingBBoxIdx=-1,u(this,rt)[0]=Math.max(u(this,rt)[0],u(this,St)[0]),u(this,rt)[1]=Math.max(u(this,rt)[1],u(this,St)[1]),u(this,rt)[2]=Math.min(u(this,rt)[2],u(this,St)[2]),u(this,rt)[3]=Math.min(u(this,rt)[3],u(this,St)[3])),this}take(){return new Yz(u(this,tn),u(this,ld))}takeDebugMetadata(){throw new Error("Unreachable")}recordSimpleData(e,t){return this}recordIncrementalData(e,t){return this}resetIncrementalData(e,t){return this}recordNamedData(e,t){return this}recordSimpleDataFromNamed(e,t,s){return this}recordFutureForcedDependency(e,t){return this}inheritSimpleDataAsFutureForcedDependencies(e){return this}inheritPendingDependenciesAsFutureForcedDependencies(){return this}recordCharacterBBox(e,t,s,i=1,a=0,o=0,c){return this}getSimpleIndex(e){}recordDependencies(e,t){return this}recordNamedDependency(e,t){return this}recordShowTextOperation(e,t=!1){return this}}Za=new WeakMap,rt=new WeakMap,St=new WeakMap,ad=new WeakMap,od=new WeakMap,ld=new WeakMap,tn=new WeakMap,Pg=new WeakSet,Gj=function(e,t){const s=new ArrayBuffer(e*4);k(this,ld,new Uint8ClampedArray(s)),k(this,tn,new Uint32Array(s)),t&&t.length>0?(u(this,tn).set(t),u(this,tn).fill(Wj,t.length)):u(this,tn).fill(Wj)};var In,Ln,cd,mi,Uh,Pl,Rl,ht;class Qz{constructor(e,t=!1){C(this,In,{__proto__:null});C(this,Ln,{__proto__:null,transform:[],moveText:[],sameLineText:[],[zu]:[]});C(this,cd,new Map);C(this,mi,new Set);C(this,Uh,new Map);C(this,Pl);C(this,Rl);C(this,ht);k(this,ht,e),t&&(k(this,Pl,new Map),k(this,Rl,(s,i)=>{MC(u(this,Pl),i).dependencies.add(s)}))}get clipBox(){return u(this,ht).clipBox}growOperationsCount(e){u(this,ht).growOperationsCount(e)}save(e){return k(this,In,{__proto__:u(this,In)}),k(this,Ln,{__proto__:u(this,Ln),transform:{__proto__:u(this,Ln).transform},moveText:{__proto__:u(this,Ln).moveText},sameLineText:{__proto__:u(this,Ln).sameLineText},[zu]:{__proto__:u(this,Ln)[zu]}}),u(this,ht).save(e),this}restore(e){u(this,ht).restore(e,u(this,Rl));const t=Object.getPrototypeOf(u(this,In));return t===null?this:(k(this,In,t),k(this,Ln,Object.getPrototypeOf(u(this,Ln))),this)}recordOpenMarker(e){return u(this,ht).recordOpenMarker(e,u(this,Rl)),this}getOpenMarker(){return u(this,ht).getOpenMarker()}recordCloseMarker(e){return u(this,ht).recordCloseMarker(e,u(this,Rl)),this}beginMarkedContent(e){return u(this,ht).beginMarkedContent(e),this}endMarkedContent(e){return u(this,ht).endMarkedContent(e,u(this,Rl)),this}pushBaseTransform(e){return u(this,ht).pushBaseTransform(e),this}popBaseTransform(){return u(this,ht).popBaseTransform(),this}recordSimpleData(e,t){return u(this,In)[e]=t,this}recordIncrementalData(e,t){return u(this,Ln)[e].push(t),this}resetIncrementalData(e,t){return u(this,Ln)[e].length=0,this}recordNamedData(e,t){return u(this,cd).set(e,t),this}recordSimpleDataFromNamed(e,t,s){u(this,In)[e]=u(this,cd).get(t)??s}recordFutureForcedDependency(e,t){return this.recordIncrementalData(zu,t),this}inheritSimpleDataAsFutureForcedDependencies(e){for(const t of e)t in u(this,In)&&this.recordFutureForcedDependency(t,u(this,In)[t]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const e of u(this,mi))this.recordFutureForcedDependency(zu,e);return this}resetBBox(e){return u(this,ht).resetBBox(e),this}recordClipBox(e,t,s,i,a,o){return u(this,ht).recordClipBox(e,t,s,i,a,o),this}recordBBox(e,t,s,i,a,o){return u(this,ht).recordBBox(e,t,s,i,a,o),this}recordCharacterBBox(e,t,s,i=1,a=0,o=0,c){const h=s.bbox;let f,m;if(h&&(f=h[2]!==h[0]&&h[3]!==h[1]&&u(this,Uh).get(s),f!==!1&&(m=[0,0,0,0],me.axialAlignedBoundingBox(h,s.fontMatrix,m),(i!==1||a!==0||o!==0)&&me.scaleMinMax([i,0,0,-i,a,o],m),f)))return this.recordBBox(e,t,m[0],m[2],m[1],m[3]);if(!c)return this.recordFullPageBBox(e);const g=c();return h&&m&&f===void 0&&(f=m[0]<=a-g.actualBoundingBoxLeft&&m[2]>=a+g.actualBoundingBoxRight&&m[1]<=o-g.actualBoundingBoxAscent&&m[3]>=o+g.actualBoundingBoxDescent,u(this,Uh).set(s,f),f)?this.recordBBox(e,t,m[0],m[2],m[1],m[3]):this.recordBBox(e,t,a-g.actualBoundingBoxLeft,a+g.actualBoundingBoxRight,o-g.actualBoundingBoxAscent,o+g.actualBoundingBoxDescent)}recordFullPageBBox(e){return u(this,ht).recordFullPageBBox(e),this}getSimpleIndex(e){return u(this,In)[e]}recordDependencies(e,t){const s=u(this,mi),i=u(this,In),a=u(this,Ln);for(const o of t)o in u(this,In)?s.add(i[o]):o in a&&a[o].forEac
381h(s.add,s);return this}recordNamedDependency(e,t){return u(this,cd).has(t)&&u(this,mi).add(u(this,cd).get(t)),this}recordOperation(e,t=!1){if(this.recordDependencies(e,[zu]),u(this,Pl)){const i=MC(u(this,Pl),e),{dependencies:a}=i;u(this,mi).forEach(a.add,a),u(this,ht)._savesStack.forEach(a.add,a),u(this,ht)._markedContentStack.forEach(a.add,a),a.delete(e),i.isRenderingOperation=!0}const s=!t&&e===u(this,ht)._pendingBBoxIdx;return u(this,ht).recordOperation(e,t,[u(this,mi),u(this,ht)._savesStack,u(this,ht)._markedContentStack]),s&&u(this,mi).clear(),this}recordShowTextOperation(e,t=!1){const s=Array.from(u(this,mi));this.recordOperation(e,t),this.recordIncrementalData("sameLineText",e);for(const i of s)this.recordIncrementalData("sameLineText",i);return this}bboxToClipBoxDropOperation(e,t=!1){const s=!t&&e===u(this,ht)._pendingBBoxIdx;return u(this,ht).bboxToClipBoxDropOperation(e),s&&u(this,mi).clear(),this}take(){return u(this,Uh).clear(),u(this,ht).take()}takeDebugMetadata(){return u(this,Pl)}}In=new WeakMap,Ln=new WeakMap,cd=new WeakMap,mi=new WeakMap,Uh=new WeakMap,Pl=new WeakMap,Rl=new WeakMap,ht=new WeakMap;var ft,zt,pi,Hh,zh;const p5=class p5{constructor(e,t,s){C(this,ft);C(this,zt);C(this,pi);C(this,Hh,0);C(this,zh,0);if(e instanceof p5&&u(e,pi)===!!s)return e;k(this,ft,e),k(this,zt,t),k(this,pi,!!s)}get clipBox(){return u(this,ft).clipBox}growOperationsCount(){throw new Error("Unreachable")}save(e){return ss(this,zh)._++,u(this,ft).save(u(this,zt)),this}restore(e){return u(this,zh)>0&&(u(this,ft).restore(u(this,zt)),ss(this,zh)._--),this}recordOpenMarker(e){return ss(this,Hh)._++,this}getOpenMarker(){return u(this,Hh)>0?u(this,zt):u(this,ft).getOpenMarker()}recordCloseMarker(e){return ss(this,Hh)._--,this}beginMarkedContent(e){return this}endMarkedContent(e){return this}pushBaseTransform(e){return u(this,ft).pushBaseTransform(e),this}popBaseTransform(){return u(this,ft).popBaseTransform(),this}recordSimpleData(e,t){return u(this,ft).recordSimpleData(e,u(this,zt)),this}recordIncrementalData(e,t){return u(this,ft).recordIncrementalData(e,u(this,zt)),this}resetIncrementalData(e,t){return u(this,ft).resetIncrementalData(e,u(this,zt)),this}recordNamedData(e,t){return this}recordSimpleDataFromNamed(e,t,s){return u(this,ft).recordSimpleDataFromNamed(e,t,u(this,zt)),this}recordFutureForcedDependency(e,t){return u(this,ft).recordFutureForcedDependency(e,u(this,zt)),this}inheritSimpleDataAsFutureForcedDependencies(e){return u(this,ft).inheritSimpleDataAsFutureForcedDependencies(e),this}inheritPendingDependenciesAsFutureForcedDependencies(){return u(this,ft).inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(e){return u(this,pi)||u(this,ft).resetBBox(u(this,zt)),this}recordClipBox(e,t,s,i,a,o){return u(this,pi)||u(this,ft).recordClipBox(u(this,zt),t,s,i,a,o),this}recordBBox(e,t,s,i,a,o){return u(this,pi)||u(this,ft).recordBBox(u(this,zt),t,s,i,a,o),this}recordCharacterBBox(e,t,s,i,a,o,c){return u(this,pi)||u(this,ft).recordCharacterBBox(u(this,zt),t,s,i,a,o,c),this}recordFullPageBBox(e){return u(this,pi)||u(this,ft).recordFullPageBBox(u(this,zt)),this}getSimpleIndex(e){return u(this,ft).getSimpleIndex(e)}recordDependencies(e,t){return u(this,ft).recordDependencies(u(this,zt),t),this}recordNamedDependency(e,t){return u(this,ft).recordNamedDependency(u(this,zt),t),this}recordOperation(e){return u(this,ft).recordOperation(u(this,zt),!0),this}recordShowTextOperation(e){return u(this,ft).recordShowTextOperation(u(this,zt),!0),this}bboxToClipBoxDropOperation(e){return u(this,pi)||u(this,ft).bboxToClipBoxDropOperation(u(this,zt),!0),this}take(){throw new Error("Unreachable")}takeDebugMetadata(){throw new Error("Unreachable")}};ft=new WeakMap,zt=new WeakMap,pi=new WeakMap,Hh=new WeakMap,zh=new WeakMap;let qp=p5;const Tr={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["f
381ilter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],transform:["transform"],transformAndFill:["transform","fillColor"]};var dd,ud,hd,fd,md,Rg;const Dp=class Dp{constructor(e){C(this,dd);C(this,ud);C(this,hd,4);C(this,fd,0);C(this,md,new(u(Dp,Rg))(u(this,hd)*6));k(this,dd,e.width),k(this,ud,e.height)}record(e,t,s,i){if(u(this,fd)===u(this,hd)){k(this,hd,u(this,hd)*2);const c=new(u(Dp,Rg))(u(this,hd)*6);c.set(u(this,md)),k(this,md,c)}const a=me.domMatrixToTransform(e.getTransform());let o;if(i[0]!==1/0){const c=ko.slice();me.axialAlignedBoundingBox([0,-s,t,0],a,c);const h=me.intersect(i,c);if(!h)return;const[f,m,g,x]=h;if(f!==c[0]||m!==c[1]||g!==c[2]||x!==c[3]){const y=Math.atan2(a[1],a[0]),v=Math.abs(Math.sin(y)),j=Math.abs(Math.cos(y));if(v<1e-6||j<1e-6||Math.abs(v-j)<1e-6)o=[f,m,f,x,g,m];else{const N=g-f,S=x-m,A=v*v,E=j*j,M=j*v,R=E-A,I=(S*E-N*M)/R,F=(S*M-N*A)/R;o=[f+F,m,f,m+I,g,x-I]}}}o||(o=[0,-s,0,0,t,-s],me.applyTransform(o,a,0),me.applyTransform(o,a,2),me.applyTransform(o,a,4)),o[0]/=u(this,dd),o[1]/=u(this,ud),o[2]/=u(this,dd),o[3]/=u(this,ud),o[4]/=u(this,dd),o[5]/=u(this,ud),u(this,md).set(o,u(this,fd)*6),ss(this,fd)._++}take(){return u(this,md).subarray(0,u(this,fd)*6)}};dd=new WeakMap,ud=new WeakMap,hd=new WeakMap,fd=new WeakMap,md=new WeakMap,Rg=new WeakMap,C(Dp,Rg,ls.isFloat16ArraySupported?Float16Array:Float32Array);let qj=Dp;var Vh;class Zz{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){C(this,Vh,new Set);this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),u(this,Vh).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,disableFontFace:t,_inspectFont:s}){if(!(!e||u(this,Vh).has(e.loadedName))){if(Ft(!t,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:a,style:o}=e,c=new FontFace(i,a,o);this.addNativeFontFace(c);try{await c.load(),u(this,Vh).add(i),s==null||s(e)}catch{He(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(c)}return}it("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){const s=e.createNativeFontFace();if(s){this.addNativeFontFace(s);try{await s.loaded}catch(i){throw He(`Failed to load font '${s.family}': '${i}'.`),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(s=>{const i=this._queueLoadingCallback(s);this._prepareFontLoadEvent(e,i)})}}get isFontLoadingAPISupported(){var t;const e=!!((t=this._document)!=null&&t.fonts);return $e(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){return $e(this,"isSyncFontLoadingSupported",mr||ls.platform.isFirefox)}_queueLoadingCallback(e){function t(){for(Ft(!i.done,"completeRequest() cannot be called twice."),i.done=!0;s.length>0&&s[0].done;){const a=s.shift();setTimeout(a.callback,0)}}const{loadingRequests:s}=this,i={done:!1,complete:t,callback:e};return s.push(i),i}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return $e(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,t){function s(R,I){return R.charCodeAt(I)<<24|R.charCodeAt(I+1)<<16|R.charCodeAt(I+2)<<8|R.charCodeAt(I+3)&255}function i(R){return String.fromCharCode(R>>24&255,R>>16&255,R>>8&255,R&255)}function a(R,I,F,D){const O=R.substring(0,I),$=R.substring(I+F);return O+D+$}let o,c;const h=this._document.createElement("canvas");h.width=1,h.height=1;const f=h.getContext("2d");let m=0;function g(R,I){if(++m>30){He("Load test font never loaded."),I();return}if(f.font="30px "+R,f.fillText(".",0,20),f.getImageData(0,0,1,1).data[3]>0){I();return}setTimeout(g.bind(null,R,I))}const x=`lt${Date.now()}${this.loadTestFontId++}`;let y=this._loadTestFont;y=a(y,976,x.length,x);const j=16,N=1482184792;let S=s(y,j);for(o=0,c=x.length-3;o<c;o+=4)S=S-N+s(x,o)|0;o<x.length&&(S=S-N+s(x+"XXX",o)|0),y=a(y,j,4,i(S));const A=`url(data:font/opentype;base64,${btoa(y)});`,E=`@font-face {font-family:"${x}";src:${A}}`;this.insertRule(E);const M=this._document.createElement("div");M.style.visibility="hidden",M.style.width=M.style.height="10px",M.style.position="absolute",M.style.top=M.style.left="0px";for(const R of[e.loadedName,x]){const I=this._document.createElement("span");I.textContent="Hi",I.style.fontFamily=R,M.append(I)}this._document.body.append(M),g(x,()=>{M.remove(),t.complete()})}}Vh=new WeakMap;var mt;class eV{constructor(e,t=null,s,i){Y(this,"compiledGlyphs",Object.create(null));C(this,mt);k(this,mt,e),this._inspectFont=t,s&&(this.charProcOperatorList=s),i&&Object.assign(this,i)}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{const s={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(s.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,s)}return(t=this._inspectFont)==null||t.call(this,this),e}createFontFaceRule(){var s;if(!this.data||this.disableFontFace)return null;const e=`url(data:${this.mimetype};base64,${this.data.toBase64()});`;let t;if(!this.cssFontInfo)t=`@font-face {font-family:"${this.loadedName}";src:${e}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),t=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${e}}`}return(s=this._inspectFont)==null||s.call(this,this,e),t}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];const s=this.loadedName+"_path_"+t;let i;try{i=e.get(s)}catch(o){He(`getPathGenerator - ignoring character: "${o}".`)}const a=mP(i==null?void 0:i.path);return this.fontExtraProperties||e.delete(s),this.compiledGlyphs[t]=a}get black(){return u(this,mt).black}get bold(){return u(this,mt).bold}get disableFontFace(){return u(this,mt).disableFontFace}set disableFontFace(e){$e(this,"disableFontFace",!!e)}get fontExtraProperties(){return u(this,mt).fontExtraProperties}get isInvalidPDFjsFont(){return u(this,mt).isInvalidPDFjsFont}get isType3Font(){return u(this,mt).isType3Font}get italic(){return u(this,mt).italic}get missingFile(){return u(this,mt).missingFile}get remeasure(){return u(this,mt).remeasure}get vertical(){return u(this,mt).vertical}get ascent(){return u(this,mt).ascent}get defaultWidth(){return u(this,mt).defaultWidth}get descent(){return u(this,mt).descent}get bbox(){return u(this,mt).bbox}get fontMatrix(){return u(this,mt).fontMatrix}get fallbackName(){return u(this,mt).fallbackName}get loadedName(){return u(this,mt).loadedName}get mimetype(){return u(this,mt).mimetype}get name(){return u(this,mt).name}get data(){return u(this,mt).data}clearData(){u(this,mt).clearData()}get cssFontInfo(){return u(this,mt).cssFontInfo}get systemFontInfo(){return u(this,mt).systemFontInfo}get defaultVMetrics(){return u(this,mt).defaultVMetrics}}mt=new WeakMap;class XP{}
381Y(XP,"strings",["fontFamily","fontWeight","italicAngle"]);class YP{}Y(YP,"strings",["css","loadedName","baseFontName","src"]);const Qs=class Qs{};Y(Qs,"bools",["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"]),Y(Qs,"numbers",["ascent","defaultWidth","descent"]),Y(Qs,"strings",["fallbackName","loadedName","mimetype","name"]),Y(Qs,"OFFSET_NUMBERS",Math.ceil(Qs.bools.length*2/8)),Y(Qs,"OFFSET_BBOX",Qs.OFFSET_NUMBERS+Qs.numbers.length*8),Y(Qs,"OFFSET_FONT_MATRIX",Qs.OFFSET_BBOX+1+8),Y(Qs,"OFFSET_DEFAULT_VMETRICS",Qs.OFFSET_FONT_MATRIX+1+48),Y(Qs,"OFFSET_STRINGS",Qs.OFFSET_DEFAULT_VMETRICS+1+6);let Kn=Qs;class xn{}Y(xn,"KIND",0),Y(xn,"HAS_BBOX",1),Y(xn,"HAS_BACKGROUND",2),Y(xn,"SHADING_TYPE",3),Y(xn,"N_COORD",4),Y(xn,"N_COLOR",8),Y(xn,"N_STOP",12),Y(xn,"N_FIGURES",16);var Mg,uv,Wh,Gh,Jy;class tV{constructor(e){C(this,Gh);C(this,Mg);C(this,uv,new TextDecoder);C(this,Wh);k(this,Mg,e),k(this,Wh,new DataView(e))}get fontFamily(){return P(this,Gh,Jy).call(this,0)}get fontWeight(){return P(this,Gh,Jy).call(this,1)}get italicAngle(){return P(this,Gh,Jy).call(this,2)}}Mg=new WeakMap,uv=new WeakMap,Wh=new WeakMap,Gh=new WeakSet,Jy=function(e){Ft(e<XP.strings.length,"Invalid string index");let t=0;for(let i=0;i<e;i++)t+=u(this,Wh).getUint32(t)+4;const s=u(this,Wh).getUint32(t);return u(this,uv).decode(new Uint8Array(u(this,Mg),t+4,s))};var pd,qh,ta,gd,ap;class sV{constructor(e){C(this,gd);C(this,pd);C(this,qh,new TextDecoder);C(this,ta);k(this,pd,e),k(this,ta,new DataView(e))}get guessFallback(){return u(this,ta).getUint8(0)!==0}get css(){return P(this,gd,ap).call(this,0)}get loadedName(){return P(this,gd,ap).call(this,1)}get baseFontName(){return P(this,gd,ap).call(this,2)}get src(){return P(this,gd,ap).call(this,3)}get style(){let e=1;e+=4+u(this,ta).getUint32(e);const t=u(this,ta).getUint32(e),s=u(this,qh).decode(new Uint8Array(u(this,pd),e+4,t));e+=4+t;const i=u(this,ta).getUint32(e),a=u(this,qh).decode(new Uint8Array(u(this,pd),e+4,i));return{style:s,weight:a}}}pd=new WeakMap,qh=new WeakMap,ta=new WeakMap,gd=new WeakSet,ap=function(e){Ft(e<YP.strings.length,"Invalid string index");let t=5;for(let i=0;i<e;i++)t+=u(this,ta).getUint32(t)+4;const s=u(this,ta).getUint32(t);return u(this,qh).decode(new Uint8Array(u(this,pd),t+4,s))};var gi,hv,Qt,dt,oi,Qy,Zy,op,Kj;class nV{constructor({buffer:e,extra:t}){C(this,dt);C(this,gi);C(this,hv,new TextDecoder);C(this,Qt);k(this,gi,e),k(this,Qt,new DataView(e)),t&&Object.assign(this,t)}get black(){return P(this,dt,oi).call(this,0)}get bold(){return P(this,dt,oi).call(this,1)}get disableFontFace(){return P(this,dt,oi).call(this,2)}get fontExtraProperties(){return P(this,dt,oi).call(this,3)}get isInvalidPDFjsFont(){return P(this,dt,oi).call(this,4)}get isType3Font(){return P(this,dt,oi).call(this,5)}get italic(){return P(this,dt,oi).call(this,6)}get missingFile(){return P(this,dt,oi).call(this,7)}get remeasure(){return P(this,dt,oi).call(this,8)}get vertical(){return P(this,dt,oi).call(this,9)}get ascent(){return P(this,dt,Qy).call(this,0)}get defaultWidth(){return P(this,dt,Qy).call(this,1)}get descent(){return P(this,dt,Qy).call(this,2)}get bbox(){return P(this,dt,Zy).call(this,Kn.OFFSET_BBOX,4,"getInt16",2)}get fontMatrix(){return P(this,dt,Zy).call(this,Kn.OFFSET_FONT_MATRIX,6,"getFloat64",8)}get defaultVMetrics(){return P(this,dt,Zy).call(this,Kn.OFFSET_DEFAULT_VMETRICS,3,"getInt16",2)}get fallbackName(){return P(this,dt,op).call(this,0)}get loadedName(){return P(this,dt,op).call(this,1)}get mimetype(){return P(this,dt,op).call(this,2)}get name(){return P(this,dt,op).call(this,3)}get data(){const{offset:e,length:t}=P(this,dt,Kj).call(this);return t===0?void 0:new Uint8Array(u(this,gi),e+4,t)}clearData(){const{offset:e,length:t}=P(this,dt,Kj).call(this);t!==0&&(u(this,Qt).setUint32(e,0),k(this,gi,new Uint8Array(u(this,gi),0,e+4).slice().buffer),k(this,Qt,new DataView(u(this,gi))))}get cssFontInfo(){let e=Kn.OFFSET_STRINGS;const t=u(this,Qt).getUint32(e);e+=4+t;const s=u(this,Qt).getUint32(e);e+=4+s;const i=u(this,Qt).getUint32(e);if(i===0)return null;const a=new Uint8Array(i);return a.set(new Uint8Array(u(this,gi),e+4,i)),new tV(a.buffer)}get systemFontInfo(){let e=Kn.OFFSET_STRINGS;const t=u(this,Qt).getUint32(e);e+=4+t;const s=u(this,Qt).getUint32(e);if(s===0)return null;const i=new Uint8Array(s);return i.set(new Uint8Array(u(this,gi),e+4,s)),new sV(i.buffer)}}gi=new WeakMap,hv=new WeakMap,Qt=new WeakMap,dt=new WeakSet,oi=function(e){Ft(e<Kn.bools.length,"Invalid boolean index");const t=Math.floor(e/4),s=e*2%8,i=u(this,Qt).getUint8(t)>>s&3;return i===0?void 0:i===2},Qy=function(e){return Ft(e<Kn.numbers.length,"Invalid number index"),u(this,Qt).getFloat64(Kn.OFFSET_NUMBERS+e*8)},Zy=function(e,t,s,i){const a=u(this,Qt).getUint8(e);if(a===0)return;Ft(a===t,"Invalid array length."),e+=1;const o=new Array(a);for(let c=0;c<a;
381c++)o[c]=u(this,Qt)[s](e,!0),e+=i;return o},op=function(e){Ft(e<Kn.strings.length,"Invalid string index");let t=Kn.OFFSET_STRINGS+4;for(let i=0;i<e;i++)t+=u(this,Qt).getUint32(t)+4;const s=u(this,Qt).getUint32(t);return u(this,hv).decode(new Uint8Array(u(this,gi),t+4,s))},Kj=function(){let e=Kn.OFFSET_STRINGS;const t=u(this,Qt).getUint32(e);e+=4+t;const s=u(this,Qt).getUint32(e);e+=4+s;const i=u(this,Qt).getUint32(e);e+=4+i;const a=u(this,Qt).getUint32(e);return{offset:e,length:a}};class rV{constructor(e){this.buffer=e,this.view=new DataView(e),this.data=new Uint8Array(e)}getIR(){const e=this.view,t=this.data[xn.KIND],s=!!this.data[xn.HAS_BBOX],i=!!this.data[xn.HAS_BACKGROUND],a=e.getUint32(xn.N_COORD,!0),o=e.getUint32(xn.N_COLOR,!0),c=e.getUint32(xn.N_STOP,!0);let h=20;const f=new Float32Array(this.buffer,h,a*2);h+=a*8;const m=new Uint8Array(this.buffer,h,o*4);h+=o*4;const g=[];for(let v=0;v<c;++v){const j=e.getFloat32(h,!0);h+=4;const N=e.getUint32(h,!0);h+=4,g.push([j,`#${N.toString(16).padStart(6,"0")}`])}let x=null;if(s){x=[];for(let v=0;v<4;++v)x.push(e.getFloat32(h,!0)),h+=4}let y=null;if(i&&(y=new Uint8Array(this.buffer,h,3),h+=3),t===1)return["RadialAxial","axial",x,g,Array.from(f.slice(0,2)),Array.from(f.slice(2,4)),null,null];if(t===2)return["RadialAxial","radial",x,g,[f[0],f[1]],[f[3],f[4]],f[2],f[5]];if(t===3){const v=this.data[xn.SHADING_TYPE];let j=null;if(f.length>0){j=ko.slice();for(let N=0,S=f.length;N<S;N+=2)me.pointBoundingBox(f[N],f[N+1],j)}return["Mesh",v,f,m,a,j,x,y]}throw new Error(`Unsupported pattern kind: ${t}`)}}var Kh;class iV{constructor(e){C(this,Kh);k(this,Kh,e)}get path(){return ls.isFloat16ArraySupported?new Float16Array(u(this,Kh)):new Float32Array(u(this,Kh))}}Kh=new WeakMap;function aV(r){if(r instanceof URL)return r;if(typeof r=="string"){if(mr){if(/^[a-z][a-z0-9\-+.]+:/i.test(r))return new URL(r);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(r))}const e=URL.parse(r,window.location);if(e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function oV(r){if(mr&&typeof Buffer<"u"&&r instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength)return r;if(typeof r=="string")return Wv(r);if(r instanceof ArrayBuffer||ArrayBuffer.isView(r)||typeof r=="object"&&!isNaN(r==null?void 0:r.length))return new Uint8Array(r);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function vy(r){if(typeof r!="string")return null;if(r.endsWith("/"))return r;throw new Error(`Invalid factory url: "${r}" must include trailing slash.`)}const Xj=r=>typeof r=="object"&&Number.isInteger(r==null?void 0:r.num)&&r.num>=0&&Number.isInteger(r==null?void 0:r.gen)&&r.gen>=0,lV=r=>typeof r=="object"&&typeof(r==null?void 0:r.name)=="string",cV=Dz.bind(null,Xj,lV);var eo,fv;class dV{constructor(){C(this,eo,new Map);C(this,fv,Promise.resolve())}postMessage(e,t){const s={data:structuredClone(e,t?{transfer:t}:null)};u(this,fv).then(()=>{for(const[i]of u(this,eo))i.call(this,s)})}addEventListener(e,t,s=null){let i=null;if((s==null?void 0:s.signal)instanceof AbortSignal){const{signal:a}=s;if(a.aborted){He("LoopbackPort - cannot use an `aborted` signal.");return}const o=()=>this.removeEventListener(e,t);i=()=>a.removeEventListener("abort",o),a.addEventListener("abort",o)}u(this,eo).set(t,i)}removeEventListener(e,t){const s=u(this,eo).get(t);s==null||s(),u(this,eo).delete(t)}terminate(){for(const[,e]of u(this,eo))e==null||e();u(this,eo).clear()}}eo=new WeakMap,fv=new WeakMap;const wy={DATA:1,ERROR:2},ns={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function IC(){}function Pn(r){if(r instanceof ac||r instanceof Nj||r instanceof jC||r instanceof Hb||r instanceof P2)return r;switch(r instanceof Error||typeof r=="object"&&r!==null||it('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),r.name){case"AbortException":return new ac(r.message);case"InvalidPDFException":return new Nj(r.message);case"PasswordException":return new jC(r.message,r.code);case"ResponseException":return new Hb(r.message,r.status,r.missing);case"UnknownErrorException":return new P2(r.message,r.details)}return new P2(r.message,r.toString())}var Xh,Kr,JP,QP,ZP,eb;class lp{constructor(e,t,s){C(this,Kr);C(this,Xh,new AbortController);this.sourceName=e,this.targetName=t,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),s.addEventListener("message",P(this,Kr,JP).bind(this),{signal:u(this,Xh).signal})}on(e,t){const s=this.actionHandler;if(s[e])throw new Error(`There is already an actionName called "${e}"`);s[e]=t}send(e,t,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},s)}
381sendWithPromise(e,t,s){const i=this.callbackId++,a=Promise.withResolvers();this.callbackCapabilities[i]=a;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},s)}catch(o){a.reject(o)}return a.promise}sendWithStream(e,t,s,i){const a=this.streamId++,o=this.sourceName,c=this.targetName,h=this.comObj;return new ReadableStream({start:f=>{const m=Promise.withResolvers();return this.streamControllers[a]={controller:f,startCall:m,pullCall:null,cancelCall:null,isClosed:!1},h.postMessage({sourceName:o,targetName:c,action:e,streamId:a,data:t,desiredSize:f.desiredSize},i),m.promise},pull:f=>{const m=Promise.withResolvers();return this.streamControllers[a].pullCall=m,h.postMessage({sourceName:o,targetName:c,stream:ns.PULL,streamId:a,desiredSize:f.desiredSize}),m.promise},cancel:f=>{Ft(f instanceof Error,"cancel must have a valid reason");const m=Promise.withResolvers();return this.streamControllers[a].cancelCall=m,this.streamControllers[a].isClosed=!0,h.postMessage({sourceName:o,targetName:c,stream:ns.CANCEL,streamId:a,reason:Pn(f)}),m.promise}},s)}destroy(){var e;(e=u(this,Xh))==null||e.abort(),k(this,Xh,null)}}Xh=new WeakMap,Kr=new WeakSet,JP=function({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){P(this,Kr,ZP).call(this,e);return}if(e.callback){const s=e.callbackId,i=this.callbackCapabilities[s];if(!i)throw new Error(`Cannot resolve callback ${s}`);if(delete this.callbackCapabilities[s],e.callback===wy.DATA)i.resolve(e.data);else if(e.callback===wy.ERROR)i.reject(Pn(e.reason));else throw new Error("Unexpected callback case");return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const s=this.sourceName,i=e.sourceName,a=this.comObj;Promise.try(t,e.data).then(function(o){a.postMessage({sourceName:s,targetName:i,callback:wy.DATA,callbackId:e.callbackId,data:o})},function(o){a.postMessage({sourceName:s,targetName:i,callback:wy.ERROR,callbackId:e.callbackId,reason:Pn(o)})});return}if(e.streamId){P(this,Kr,QP).call(this,e);return}t(e.data)},QP=function(e){const t=e.streamId,s=this.sourceName,i=e.sourceName,a=this.comObj,o=this,c=this.actionHandler[e.action],h={enqueue(f,m=1,g){if(this.isCancelled)return;const x=this.desiredSize;this.desiredSize-=m,x>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),a.postMessage({sourceName:s,targetName:i,stream:ns.ENQUEUE,streamId:t,chunk:f},g)},close(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:s,targetName:i,stream:ns.CLOSE,streamId:t}),delete o.streamSinks[t])},error(f){Ft(f instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,a.postMessage({sourceName:s,targetName:i,stream:ns.ERROR,streamId:t,reason:Pn(f)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};h.sinkCapability.resolve(),h.ready=h.sinkCapability.promise,this.streamSinks[t]=h,Promise.try(c,e.data,h).then(function(){a.postMessage({sourceName:s,targetName:i,stream:ns.START_COMPLETE,streamId:t,success:!0})},function(f){a.postMessage({sourceName:s,targetName:i,stream:ns.START_COMPLETE,streamId:t,reason:Pn(f)})})},ZP=function(e){const t=e.streamId,s=this.sourceName,i=e.sourceName,a=this.comObj,o=this.streamControllers[t],c=this.streamSinks[t];switch(e.stream){case ns.START_COMPLETE:e.success?o.startCall.resolve():o.startCall.reject(Pn(e.reason));break;case ns.PULL_COMPLETE:e.success?o.pullCall.resolve():o.pullCall.reject(Pn(e.reason));break;case ns.PULL:if(!c){a.postMessage({sourceName:s,targetName:i,stream:ns.PULL_COMPLETE,streamId:t,success:!0});break}c.desiredSize<=0&&e.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=e.desiredSize,Promise.try(c.onPull||IC).then(function(){a.postMessage({sourceName:s,targetName:i,stream:ns.PULL_COMPLETE,streamId:t,success:!0})},function(f){a.postMessage({sourceName:s,targetName:i,stream:ns.PULL_COMPLETE,streamId:t,reason:Pn(f)})});break;case ns.ENQUEUE:if(Ft(o,"enqueue should have stream controller"),o.isClosed)break;o.controller.enqueue(e.chunk);break;case ns.CLOSE:if(Ft(o,"close should have stream controller"),o.isClosed)break;o.isClosed=!0,o.controller.close(),P(this,Kr,eb).call(this,o,t);break;case ns.ERROR:Ft(o,"error should have stream controller"),o.controller.error(Pn(e.reason)),P(this,Kr,eb).call(this,o,t);break;case ns.CANCEL_COMPLETE:e.success?o.cancelCall.resolve():o.cancelCall.reject(Pn(e.reason)),P(this,Kr,eb).call(this,o,t);break;case ns.CANCEL:if(!c)break;const h=Pn(e.reason);Promise.try(c.onCancel||IC,h).then(function(){a.postMessage({sourceName:s,targetName:i,stream:ns.CANCEL_COMPLETE,streamId:t,success:!0})},function(f){a.postMessage({sourceName:s,targetName:i,stream:ns.CANCEL_COMPLETE,streamId:t,reason:Pn(f)})}),c.sinkCapability.reject(h),c.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},eb=async function(e,t){var s,i,a;await Promise.allSettled([(s=e.startCall)==null?void 0:s.promise,(i=e.pullCall)==null?void 0:i.promise,(a=e.cancelCall)==null?void 0:a.promise]),delete this.streamControllers[t]};var mv;class eR{constructor({cMapUrl:e=null,standardFontDataUrl:t=null,wasmUrl:s=null}){C(this,mv,Object.freeze({cMapUrl:"CMap",standardFontDataUrl:"font",wasmUrl:"wasm"}));this.cMapUrl=e,this.standardFontDataUrl=t,this.wasmUrl=s}async fetch({kind:e,filename:t}){switch(e){case"cMapUrl":case"standardFontDataUrl":case"wasmUrl":break;default:it(`Not implemented: ${e}`)}const s=this[e];if(!s)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const i=`${s}${t}`;
381return this._fetch(i,e).catch(a=>{throw new Error(`Unable to load ${u(this,mv)[e]} data at: ${i}`)})}async _fetch(e,t){it("Abstract method `_fetch` called.")}}mv=new WeakMap;class LC extends eR{async _fetch(e,t){const s=t==="cMapUrl"&&!e.endsWith(".bcmap")?"text":"bytes",i=await t5(e,s);return i instanceof Uint8Array?i:Wv(i)}}var Ig;class tR{constructor({enableHWA:e=!1}){C(this,Ig,!1);k(this,Ig,e)}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(e,t);return{canvas:s,context:s.getContext("2d",{willReadFrequently:!u(this,Ig)})}}reset({canvas:e},t,s){if(!e)throw new Error("Canvas is not specified");if(t<=0||s<=0)throw new Error("Invalid canvas size");e.width=t,e.height=s}destroy(e){const{canvas:t}=e;if(!t)throw new Error("Canvas is not specified");t.width=t.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){it("Abstract method `_createCanvas` called.")}}Ig=new WeakMap;class uV extends tR{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const s=this._document.createElement("canvas");return s.width=e,s.height=t,s}}class sR{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,s,i,a){return"none"}destroy(e=!1){}}var xd,Yh,to,so,sn,yd,bd,be,Js,cp,Zu,tb,eh,nR,Yj,th,dp,up,Jj,hp;class hV extends sR{constructor({docId:t,ownerDocument:s=globalThis.document}){super();C(this,be);C(this,xd);C(this,Yh);C(this,to);C(this,so);C(this,sn);C(this,yd);C(this,bd,0);k(this,so,t),k(this,sn,s)}addFilter(t){if(!t)return"none";let s=u(this,be,Js).get(t);if(s)return s;const[i,a,o]=P(this,be,tb).call(this,t),c=t.length===1?i:`${i}${a}${o}`;if(s=u(this,be,Js).get(c),s)return u(this,be,Js).set(t,s),s;const h=`g_${u(this,so)}_transfer_map_${ss(this,bd)._++}`,f=P(this,be,eh).call(this,h);u(this,be,Js).set(t,f),u(this,be,Js).set(c,f);const m=P(this,be,th).call(this,h);return P(this,be,up).call(this,i,a,o,m),f}addHCMFilter(t,s){var v;const i=`${t}-${s}`,a="base";let o=u(this,be,cp).get(a);if((o==null?void 0:o.key)===i||(o?((v=o.filter)==null||v.remove(),o.key=i,o.url="none",o.filter=null):(o={key:i,url:"none",filter:null},u(this,be,cp).set(a,o)),!t||!s))return o.url;const c=P(this,be,hp).call(this,t);t=me.makeHexColor(...c);const h=P(this,be,hp).call(this,s);if(s=me.makeHexColor(...h),u(this,be,Zu).style.color="",t==="#000000"&&s==="#ffffff"||t===s)return o.url;const f=new Array(256);for(let j=0;j<=255;j++){const N=j/255;f[j]=N<=.03928?N/12.92:((N+.055)/1.055)**2.4}const m=f.join(","),g=`g_${u(this,so)}_hcm_filter`,x=o.filter=P(this,be,th).call(this,g);P(this,be,up).call(this,m,m,m,x),P(this,be,Yj).call(this,x);const y=(j,N)=>{const S=c[j]/255,A=h[j]/255,E=new Array(N+1);for(let M=0;M<=N;M++)E[M]=S+M/N*(A-S);return E.join(",")};return P(this,be,up).call(this,y(0,5),y(1,5),y(2,5),x),o.url=P(this,be,eh).call(this,g),o.url}addAlphaFilter(t){let s=u(this,be,Js).get(t);if(s)return s;const[i]=P(this,be,tb).call(this,[t]),a=`alpha_${i}`;if(s=u(this,be,Js).get(a),s)return u(this,be,Js).set(t,s),s;const o=`g_${u(this,so)}_alpha_map_${ss(this,bd)._++}`,c=P(this,be,eh).call(this,o);u(this,be,Js).set(t,c),u(this,be,Js).set(a,c);const h=P(this,be,th).call(this,o);return P(this,be,Jj).call(this,i,h),c}addLuminosityFilter(t){let s=u(this,be,Js).get(t||"luminosity");if(s)return s;let i,a;if(t?([i]=P(this,be,tb).call(this,[t]),a=`luminosity_${i}`):a="luminosity",s=u(this,be,Js).get(a),s)return u(this,be,Js).set(t,s),s;const o=`g_${u(this,so)}_luminosity_map_${ss(this,bd)._++}`,c=P(this,be,eh).call(this,o);u(this,be,Js).set(t,c),u(this,be,Js).set(a,c);const h=P(this,be,th).call(this,o);return P(this,be,nR).call(this,h),t&&P(this,be,Jj).call(this,i,h),c}addHighlightHCMFilter(t,s,i,a,o){var A;const c=`${s}-${i}-${a}-${o}`;let h=u(this,be,cp).get(t);if((h==null?void 0:h.key)===c||(h?((A=h.filter)==null||A.remove(),h.key=c,h.url="none",h.filter=null):(h={key:c,url:"none",filter:null},u(this,be,cp).set(t,h)),!s||!i))return h.url;const[f,m]=[s,i].map(P(this,be,hp).bind(this));let g=Math.round(.2126*f[0]+.7152*f[1]+.0722*f[2]),x=Math.round(.2126*m[0]+.7152*m[1]+.0722*m[2]),[y,v]=[a,o].map(P(this,be,hp).bind(this));x<g&&([g,x,y,v]=[x,g,v,y]),u(this,be,Zu).style.color="";const j=(E,M,R)=>{const I=new Array(256),F=(x-g)/R,D=E/255,O=(M-E)/(255*R);let $=0;for(let z=0;z<=R;z++){const re=Math.round(g+z*F),he=D+z*O;for(let de=$;de<=re;de++)I[de]=he;$=re+1}for(let z=$;z<256;z++)I[z]=I[$-1];return I.join(",")},N=`g_${u(this,so)}_hcm_${t}_filter`,S=h.filter=P(this,be,th).call(this,N);return P(this,be,Yj).call(this,S),P(this,be,up).call(this,j(y[0],v[0],5),j(y[1],v[1],5),j(y[2],v[2],5),S),h.url=P(this,be,eh).call(this,N),h.url}destroy(t=!1){var s,i,a,o;t&&((s=u(this,yd))!=null&&s.size)||((i=u(this,to))==null||i.parentNode.parentNode.remove(),k(this,to,null),(a=u(this,Yh))==null||a.clear(),k(this,Yh,null),(o=u(this,yd))==null||o.clear(),k(this,yd,null),k(this,bd,0))}}xd=new WeakMap,Yh=new WeakMap,to=new WeakMap,so=new WeakMap,sn=new WeakMap,yd=new WeakMap,bd=new WeakMap,be=new WeakSet,Js=function(){return u(this,Yh)||k(this,Yh,new Map)},cp=function(){return u(this,yd)||k(this,yd,new Map)},Zu=function(){if(!u(this,to)){const t=u(this,sn).createElement("div"),{style:s}=t;s.visibility="hidden",s.contain="strict",s.width=s.height=0,s.position="absolute",s.top=s.left=0,s.zIndex=-1;const i=u(this,sn).createElementNS(Ma,"svg");i.setAttribute("width",0),i.setAttribute("height",0),k(this,to,u(this,sn).createElementNS(Ma,"defs")),t.append(i),i.append(u(this,to)),u(this,sn).body.append(t)}return u(this,to)},tb=function(t){if(t.length===1){const f=t[0],m=new Array(256);for(let x=0;x<256;x++)m[x]=f[x]/255;const g=m.join(",");return[g,g,g]}const[s,i,a]=t,o=new Array(256),c=new Array(256),h=new Array(256);for(let f=0;f<256;f++)o[f]=s[f]/255,c[f]=i[f]/255,h[f]=a[f]/255;return[o.join(","),c.join(","),h.join(",")]},eh=function(t){if(u(this,xd)===void 0){k(this,xd,"");const s=u(this,sn).URL;s!==u(this,sn).baseURI&&(Gv(s)?He('#createUrl: ignore "data:"-URL for performance reasons.'):k(this,xd,dP(s,"")))}return`url(${u(this,xd)}#${t})`},nR=function(t){const s=u(this,sn).createElementNS(Ma,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(s)},Yj=function(t){const s=u(this,sn).createElementNS(Ma,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(s)},th=function(t){const s=u(this,sn).createElementNS(Ma,"filter");return s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("id",t),u(this,be,Zu).append(s),s},dp=function(t,s,i){const a=u(this,sn).createElementNS(Ma,s);a.setAttribute("type","discrete"),a.setAttribute("tableValues",i),t.append(a)},up=function(t,s,i,a){const o=u(this,sn).createElementNS(Ma,"feComponentTransfer");a.append(o),P(this,be,dp).call(this,o,"feFuncR",t),P(this,be,dp).call(this,o,"feFuncG",s),P(this,be,dp).call(this,o,"feFuncB",i)},Jj=function(t,s){const i=u(this,sn).createElementNS(Ma,"feComponentTransfer");
381s.append(i),P(this,be,dp).call(this,i,"feFuncA",t)},hp=function(t){return u(this,be,Zu).style.color=t,Y0(getComputedStyle(u(this,be,Zu)).getPropertyValue("color"))};mr&&He("Please use the `legacy` build in Node.js environments.");async function fV(r){const t=await process.getBuiltinModule("fs/promises").readFile(r);return new Uint8Array(t)}class mV extends sR{}class pV extends tR{_createCanvas(e,t){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(e,t)}}class gV extends eR{async _fetch(e,t){return fV(e)}}const xV=` 382struct Uniforms { 383 offsetX : f32, 384 offsetY : f32, 385 scaleX : f32, 386 scaleY : f32, 387 paddedWidth : f32, 388 paddedHeight : f32, 389 borderSize : f32, 390 _pad : f32, 391}; 392 393@group(0) @binding(0) var<uniform> u : Uniforms; 394 395struct VertexInput { 396 @location(0) position : vec2<f32>, 397 @location(1) color : vec4<f32>, 398}; 399 400struct VertexOutput { 401 @builtin(position) position : vec4<f32>, 402 @location(0) color : vec3<f32>, 403}; 404 405@vertex 406fn vs_main(in : VertexInput) -> VertexOutput { 407 var out : VertexOutput; 408 let cx = (in.position.x + u.offsetX) * u.scaleX; 409 let cy = (in.position.y + u.offsetY) * u.scaleY; 410 out.position = vec4<f32>( 411 ((cx + u.borderSize) / u.paddedWidth) * 2.0 - 1.0, 412 1.0 - ((cy + u.borderSize) / u.paddedHeight) * 2.0, 413 0.0, 414 1.0 415 ); 416 out.color = in.color.rgb; 417 return out; 418} 419 420@fragment 421fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> { 422 return vec4<f32>(in.color, 1.0); 423} 424`;var pv,no,vd,Jh,gv,rR;class yV{constructor(){C(this,gv);C(this,pv,null);C(this,no,null);C(this,vd,null);C(this,Jh,null)}init(){return u(this,pv)||k(this,pv,P(this,gv,rR).call(this))}get isReady(){return u(this,no)!==null}loadMeshShader(){if(!u(this,no)||u(this,vd))return;const e=u(this,no).createShaderModule({code:xV});k(this,vd,u(this,no).createRenderPipeline({layout:"auto",vertex:{module:e,entryPoint:"vs_main",buffers:[{arrayStride:8,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]},{arrayStride:4,attributes:[{shaderLocation:1,offset:0,format:"unorm8x4"}]}]},fragment:{module:e,entryPoint:"fs_main",targets:[{format:u(this,Jh)}]},primitive:{topology:"triangle-list"}}))}draw(e,t,s,i,a,o,c,h){this.loadMeshShader();const f=u(this,no),{offsetX:m,offsetY:g,scaleX:x,scaleY:y}=i,v=f.createBuffer({size:Math.max(e.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});e.byteLength>0&&f.queue.writeBuffer(v,0,e);const j=f.createBuffer({size:Math.max(t.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});t.byteLength>0&&f.queue.writeBuffer(j,0,t);const N=f.createBuffer({size:32,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST});f.queue.writeBuffer(N,0,new Float32Array([m,g,x,y,o,c,h,0]));const S=f.createBindGroup({layout:u(this,vd).getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:N}}]}),A=new OffscreenCanvas(o,c),E=A.getContext("webgpu");E.configure({device:f,format:u(this,Jh),alphaMode:a?"opaque":"premultiplied"});const M=a?{r:a[0]/255,g:a[1]/255,b:a[2]/255,a:1}:{r:0,g:0,b:0,a:0},R=f.createCommandEncoder(),I=R.beginRenderPass({colorAttachments:[{view:E.getCurrentTexture().createView(),clearValue:M,loadOp:"clear",storeOp:"store"}]});return s>0&&(I.setPipeline(u(this,vd)),I.setBindGroup(0,S),I.setVertexBuffer(0,v),I.setVertexBuffer(1,j),I.draw(s)),I.end(),f.queue.submit([R.finish()]),v.destroy(),j.destroy(),N.destroy(),A.transferToImageBitmap()}}pv=new WeakMap,no=new WeakMap,vd=new WeakMap,Jh=new WeakMap,gv=new WeakSet,rR=async function(){var e;if(!((e=globalThis.navigator)!=null&&e.gpu))return!1;try{const t=await navigator.gpu.requestAdapter();return t?(k(this,Jh,navigator.gpu.getPreferredCanvasFormat()),k(this,no,await t.requestDevice()),!0):!1}catch{return!1}};const qv=new yV;function bV(){return qv.init()}function vV(){return qv.isReady}function wV(){qv.loadMeshShader()}function jV(r,e,t,s,i,a,o,c){return qv.draw(r,e,t,s,i,a,o,c)}const Hs={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function sb(r,e){if(!e)return;const t=e[2]-e[0],s=e[3]-e[1],i=new Path2D;i.rect(e[0],e[1],t,s),r.clip(i)}class a5{isModifyingCurrentTransform(){return!1}getPattern(){it("Abstract method `getPattern` called.")}}class NV extends a5{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}isOriginBased(){return this._p0[0]===0&&this._p0[1]===0&&(!this.isRadial()||this._p1[0]===0&&this._p1[1]===0)}isRadial(){return this._type==="radial"}areConic(){if(!this.isRadial())return!1;const e=Math.hypot(this._p0[0]-this._p1[0],this._p0[1]-this._p1[1]);return e+this._r1>this._r0&&e+this._r0>this._r1}_createGradient(e,t=null){let s,i=this._p0,a=this._p1;
424if(t&&(i=i.slice(),a=a.slice(),me.applyTransform(i,t),me.applyTransform(a,t)),this._type==="axial")s=e.createLinearGradient(i[0],i[1],a[0],a[1]);else if(this._type==="radial"){let o=this._r0,c=this._r1;if(t){const h=new Float32Array(2);me.singularValueDecompose2dScale(t,h),o*=h[0],c*=h[0]}s=e.createRadialGradient(i[0],i[1],o,a[0],a[1],c)}for(const o of this._colorStops)s.addColorStop(o[0],o[1]);return s}_createReversedGradient(e,t=null){let s=this._p1,i=this._p0;t&&(s=s.slice(),i=i.slice(),me.applyTransform(s,t),me.applyTransform(i,t));let a=this._r1,o=this._r0;if(t){const f=new Float32Array(2);me.singularValueDecompose2dScale(t,f),a*=f[0],o*=f[0]}const c=e.createRadialGradient(s[0],s[1],a,i[0],i[1],o),h=this._colorStops.map(([f,m])=>[1-f,m]).reverse();for(const[f,m]of h)c.addColorStop(f,m);return c}getPattern(e,t,s,i){let a;if(i===Hs.STROKE||i===Hs.FILL){if(this.isOriginBased()){let x=me.transform(s,t.baseTransform);this.matrix&&(x=me.transform(x,this.matrix));const y=.001,v=Math.hypot(x[0],x[1]),j=Math.hypot(x[2],x[3]),N=(x[0]*x[2]+x[1]*x[3])/(v*j);
424if(Math.abs(N)<y)if(this.isRadial()){if(Math.abs(v-j)<y)return this._createGradient(e,x)}else return this._createGradient(e,x)}const o=t.current.getClippedPathBoundingBox(i,At(e))||[0,0,0,0],c=Math.ceil(o[2]-o[0])||1,h=Math.ceil(o[3]-o[1])||1,f=t.canvasFactory.create(c,h),m=f.context;m.clearRect(0,0,m.canvas.width,m.canvas.height),m.beginPath(),m.rect(0,0,m.canvas.width,m.canvas.height),m.translate(-o[0],-o[1]),s=me.transform(s,[1,0,0,1,o[0],o[1]]),m.transform(...t.baseTransform),this.matrix&&m.transform(...this.matrix),sb(m,this._bbox),this.areConic()&&(m.fillStyle=this._createReversedGradient(m),m.fill()),m.fillStyle=this._createGradient(m),m.fill(),a=e.createPattern(f.canvas,"no-repeat"),t.canvasFactory.destroy(f);const g=new DOMMatrix(s);a.setTransform(g)}else this.areConic()&&(e.save(),sb(e,this._bbox),e.fillStyle=this._createReversedGradient(e),e.fillRect(-1e10,-1e10,2e10,2e10),e.restore()),sb(e,this._bbox),a=this._createGradient(e);return a}}function kV(r,e,t,s,i,a,o,c){const h=e.coords,f=e.colors,m=r.data,g=r.width*4;let x;h[t*2+1]>h[s*2+1]&&(x=t,t=s,s=x,x=a,a=o,o=x),h[s*2+1]>h[i*2+1]&&(x=s,s=i,i=x,x=o,o=c,c=x),h[t*2+1]>h[s*2+1]&&(x=t,t=s,s=x,x=a,a=o,o=x);const y=(h[t*2]+e.offsetX)*e.scaleX,v=(h[t*2+1]+e.offsetY)*e.scaleY,j=(h[s*2]+e.offsetX)*e.scaleX,N=(h[s*2+1]+e.offsetY)*e.scaleY,S=(h[i*2]+e.offsetX)*e.scaleX,A=(h[i*2+1]+e.offsetY)*e.scaleY;if(v>=A)return;const E=f[a*4],M=f[a*4+1],R=f[a*4+2],I=f[o*4],F=f[o*4+1],D=f[o*4+2],O=f[c*4],$=f[c*4+1],z=f[c*4+2],re=Math.round(v),he=Math.round(A);let de,fe,oe,le,se,K,Q,U;for(let Z=re;Z<=he;Z++){if(Z<N){const ue=Z<v?0:(v-Z)/(v-N);de=y-(y-j)*ue,fe=E-(E-I)*ue,oe=M-(M-F)*ue,le=R-(R-D)*ue}else{let ue;Z>A?ue=1:N===A?ue=0:ue=(N-Z)/(N-A),de=j-(j-S)*ue,fe=I-(I-O)*ue,oe=F-(F-$)*ue,le=D-(D-z)*ue}let ee;Z<v?ee=0:Z>A?ee=1:ee=(v-Z)/(v-A),se=y-(y-S)*ee,K=E-(E-O)*ee,Q=M-(M-$)*ee,U=R-(R-z)*ee;const W=Math.round(Math.min(de,se)),G=Math.round(Math.max(de,se));let ne=g*Z+W*4;for(let ue=W;ue<=G;ue++)ee=(de-ue)/(de-se),ee<0?ee=0:ee>1&&(ee=1),m[ne++]=fe-(fe-K)*ee|0,m[ne++]=oe-(oe-Q)*ee|0,m[ne++]=le-(le-U)*ee|0,m[ne++]=255}}class SV extends a5{constructor(e){super(),this._posData=e[2],this._colData=e[3],this._vertexCount=e[4],this._bounds=e[5],this._bbox=e[6],this._background=e[7],this.matrix=null,wV()}_createMeshCanvas(e,t,s){const c=Math.floor(this._bounds[0]),h=Math.floor(this._bounds[1]),f=Math.ceil(this._bounds[2])-c,m=Math.ceil(this._bounds[3])-h,g=Math.min(Math.ceil(Math.abs(f*e[0]*1.1)),3e3)||1,x=Math.min(Math.ceil(Math.abs(m*e[1]*1.1)),3e3)||1,y=f?f/g:1,v=m?m/x:1,j={coords:this._posData,colors:this._colData,offsetX:-c,offsetY:-h,scaleX:1/y,scaleY:1/v},N=g+4,S=x+4,A=s.create(N,S);if(vV()&&this._vertexCount>48)A.context.drawImage(jV(this._posData,this._colData,this._vertexCount,j,t,N,S,2),0,0);else{const E=A.context.createImageData(g,x);if(t){const M=E.data;for(let R=0,I=M.length;R<I;R+=4)M[R]=t[0],M[R+1]=t[1],M[R+2]=t[2],M[R+3]=255}for(let M=0,R=this._vertexCount;M<R;M+=3)kV(E,j,M,M+1,M+2,M,M+1,M+2);A.context.putImageData(E,2,2)}return{canvas:A.canvas,offsetX:c-2*y,offsetY:h-2*v,scaleX:y,scaleY:v}}isModifyingCurrentTransform(){return!0}getPattern(e,t,s,i){sb(e,this._bbox);const a=new Float32Array(2);if(i===Hs.SHADING)me.singularValueDecompose2dScale(At(e),a);else if(this.matrix){me.singularValueDecompose2dScale(this.matrix,a);const[h,f]=a;me.singularValueDecompose2dScale(t.baseTransform,a),a[0]*=h,a[1]*=f}else me.singularValueDecompose2dScale(t.baseTransform,a);const o=this._createMeshCanvas(a,i===Hs.SHADING?null:this._background,t.canvasFactory);i!==Hs.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(o.offsetX,o.offsetY),e.scale(o.scaleX,o.scaleY);const c=e.createPattern(o.canvas,"no-repeat");return t.canvasFactory.destroy(o),c}}class AV extends a5{getPattern(){return"hotpink"}}function _V(r){switch(r[0]){case"RadialAxial":return new NV(r);case"Mesh":return new SV(r);case"Dummy":return new AV}throw new Error(`Unknown IR type: ${r[0]}`)}const DC={COLORED:1,UNCOLORED:2},xv=class xv{constructor(e,t,s,i){this.color=e[1],this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.needsIsolation=e[9]??!0,this.ctx=t,this.canvasGraphicsFactory=s,this.baseTransform=i,this.patternBaseMatrix=this.matrix?me.transform(i,this.matrix
vendor: 4,604 bytes, line 424
424):i}canSkipPatternCanvas([e,t,s,i]){const[a,o,c,h]=this.bbox,f=Math.abs(this.xstep),m=Math.abs(this.ystep);if(e>f+1e-6||t>m+1e-6)return null;const g=Math.floor((s-c)/f)+1,x=Math.ceil((s+e-a)/f)-1,y=Math.floor((i-h)/m)+1,v=Math.ceil((i+t-o)/m)-1;return x<=g&&v<=y?[g,y]:null}updatePatternDims(e,t){const s=me.inverseTransform(this.patternBaseMatrix),i=[e[0],e[1]],a=[e[2],e[3]];me.applyTransform(i,s),me.applyTransform(a,s),t[0]=Math.abs(a[0]-i[0]),t[1]=Math.abs(a[1]-i[1]),t[2]=Math.min(i[0],a[0]),t[3]=Math.min(i[1],a[1])}_renderTileCanvas(e,t,s,i){var x,y;const[a,o,c,h]=this.bbox,f=e.canvasFactory.create(s.size,i.size),m=f.context,g=this.canvasGraphicsFactory.createCanvasGraphics(m,t);return g.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(g,this.paintType,this.color),m.translate(-s.scale*a,-i.scale*o),g.transform(0,s.scale,0,0,i.scale,0,0),m.save(),(x=g.dependencyTracker)==null||x.save(),this.clipBbox(g,a,o,c,h),g.baseTransform=At(g.ctx),g.executeOperatorList(this.operatorList),g.endDrawing(),(y=g.dependencyTracker)==null||y.restore(),m.restore(),f}_getCombinedScales(){const e=new Float32Array(2);me.singularValueDecompose2dScale(this.matrix,e);const[t,s]=e;return me.singularValueDecompose2dScale(this.baseTransform,e),[t*e[0],s*e[1]]}drawPattern(e,t,s=!1,[i,a],o){const[c,h,f,m]=this.bbox,g=e.dependencyTracker;if(g&&(e.dependencyTracker=new qp(g,o)),e.save(),s?e.ctx.clip(t,"evenodd"):e.ctx.clip(t),e.ctx.setTransform(...this.patternBaseMatrix),e.ctx.translate(i*this.xstep,a*this.ystep),this.needsIsolation||e.ctx.globalAlpha!==1||e.ctx.globalCompositeOperation!=="source-over"||e.inSMaskMode){const x=f-c,y=m-h,[v,j]=this._getCombinedScales(),N=this.getSizeAndScale(x,this.ctx.canvas.width,v),S=this.getSizeAndScale(y,this.ctx.canvas.height,j),A=this._renderTileCanvas(e,o,N,S);e.ctx.drawImage(A.canvas,c,h,x,y),e.canvasFactory.destroy(A)}else this.setFillAndStrokeStyleToContext(e,this.paintType,this.color),this.clipBbox(e,c,h,f,m),e.baseTransformStack.push(e.baseTransform),e.baseTransform=At(e.ctx),e.executeOperatorList(this.operatorList),e.baseTransform=e.baseTransformStack.pop();e.restore(),g&&(e.dependencyTracker=g)}createPatternCanvas(e,t){const[s,i,a,o]=this.bbox,c=a-s,h=o-i;let{xstep:f,ystep:m}=this;f=Math.abs(f),m=Math.abs(m),Vv("TilingType: "+this.tilingType);const[g,x]=this._getCombinedScales();let y=c,v=h,j=!1,N=!1;Math.ceil(f*g)>=Math.ceil(c*g)?y=f:j=!0,Math.ceil(m*x)>=Math.ceil(h*x)?v=m:N=!0;const S=this.getSizeAndScale(y,this.ctx.canvas.width,g),A=this.getSizeAndScale(v,this.ctx.canvas.height,x),E=this._renderTileCanvas(e,t,S,A);if(j||N){const M=E.canvas;j&&(y=f),N&&(v=m);const R=this.getSizeAndScale(y,this.ctx.canvas.width,g),I=this.getSizeAndScale(v,this.ctx.canvas.height,x),F=R.size,D=I.size,O=e.canvasFactory.create(F,D),$=O.context,z=j?Math.floor(c/f):0,re=N?Math.floor(h/m):0;for(let he=0;he<=z;he++)for(let de=0;de<=re;de++)$.drawImage(M,F*he,D*de,F,D,0,0,F,D);return e.canvasFactory.destroy(E),{canvas:O.canvas,canvasEntry:O,scaleX:R.scale,scaleY:I.scale,offsetX:s,offsetY:i}}return{canvas:E.canvas,canvasEntry:E,scaleX:S.scale,scaleY:A.scale,offsetX:s,offsetY:i}}getSizeAndScale(e,t,s){const i=Math.max(xv.MAX_PATTERN_SIZE,t);let a=Math.ceil(e*s);return a>=i?a=i:s=a/e,{scale:s,size:a}}clipBbox(e,t,s,i,a){const o=i-t,c=a-s,h=new Path2D;h.rect(t,s,o,c),me.axialAlignedBoundingBox([t,s,i,a],At(e.ctx),e.current.minMax),e.ctx.clip(h),e.current.updateClipFromPath()}setFillAndStrokeStyleToContext(e,t,s){const i=e.ctx,a=e.current;switch(a.patternFill=a.patternStroke=!1,t){case DC.COLORED:const{fillStyle:o,strokeStyle:c}=this.ctx;i.fillStyle=a.fillColor=o,i.strokeStyle=a.strokeColor=c;break;case DC.UNCOLORED:i.fillStyle=i.strokeStyle=s,a.fillColor=a.strokeColor=s;break;default:throw new Pz(`Unsupported paint type: ${t}`)}}isModifyingCurrentTransform(){return!1}getPattern(e,t,s,i,a){const o=i!==Hs.SHADING?me.transform(s,this.patternBaseMatrix):s,c=this.createPatternCanvas(t,a);let h=new DOMMatrix(o);h=h.translate(c.offsetX,c.offsetY),h=h.scale(1/c.scaleX,1/c.scaleY);const f=e.createPattern(c.canvas,"repeat");return t.canvasFactory.destroy(c.canvasEntry),f.setTransform(h),f}};Y(xv,"MAX_PATTERN_SIZE",3e3);let Rp=xv;function EV({src:r,srcPos:e=0,dest:t,width:s,height:i,nonBlackColor:a=4294967295,inverseDecode:o=!1}){const c=ls.isLittleEndian?4278190080:255,[h,f]=o?[a,c]:[c,a],m=s>>3,g=s&7,x=h^f,y=r.length;t=new Uint32Array(t.buffer);let v=0;for(let j=0;j<i;++j){for(const S=e+m;e<S;++e,v+=8){const A=r[e];t[v]=h^-(A>>7&1)&x,t[v+1]=h^-(A>>6&1)&x,t[v+2]=h^-(A>>5&1)&x,t[v+3]=h^-(A>>4&1)&x,t[v+4]=h^-(A>>3&1)&x,t[v+5]=h^-(A>>
4242&1)&x,t[v+6]=h^-(A>>1&1)&x,t[v+7]=h^-(A&1)&x}if(g===0)continue;const N=e<y?r[e++]:255;for(let S=0;S<g;++S,++v)t[v]=h^-(N>>7-S&1)&x}return{srcPos:e,destPos:v}}const OC=16,FC=100,CV=15,BC=10,Fn=16,M2=new DOMMatrix,pr=new Float32Array(2);function TV(r,e){if(r._removeMirroring)throw new Error("Context is already forwarding operations.");r.__originalSave=r.save,r.__originalRestore=r.restore,r.__originalRotate=r.rotate,r.__originalScale=r.scale,r.__originalTranslate=r.translate,r.__originalTransform=r.transform,r.__originalSetTransform=r.setTransform,r.__originalResetTransform=r.resetTransform,r.__originalClip=r.clip,r.__originalMoveTo=r.moveTo,r.__originalLineTo=r.lineTo,r.__originalBezierCurveTo=r.bezierCurveTo,r.__originalRect=r.rect,r.__originalClosePath=r.closePath,r.__originalBeginPath=r.beginPath,r._removeMirroring=()=>{r.save=r.__originalSave,r.restore=r.__originalRestore,r.rotate=r.__originalRotate,r.scale=r.__originalScale,r.translate=r.__originalTranslate,r.transform=r.__originalTransform,r.setTransform=r.__originalSetTransform,r.resetTransform=r.__originalResetTransform,r.clip=r.__originalClip,r.moveTo=r.__originalMoveTo,r.lineTo=r.__originalLineTo,r.bezierCurveTo=r.__originalBezierCurveTo,r.rect=r.__originalRect,r.closePath=r.__originalClosePath,r.beginPath=r.__originalBeginPath,delete r._removeMirroring},r.save=function(){e.save(),this.__originalSave()},r.restore=function(){e.restore(),this.__originalRestore()},r.translate=function(t,s){e.translate(t,s),this.__originalTranslate(t,s)},r.scale=function(t,s){e.scale(t,s),this.__originalScale(t,s)},r.transform=function(t,s,i,a,o,c){e.transform(t,s,i,a,o,c),this.__originalTransform(t,s,i,a,o,c)},r.setTransform=function(t,s,i,a,o,c){s===void 0?(e.setTransform(t),this.__originalSetTransform(t)):(e.setTransform(t,s,i,a,o,c),this.__originalSetTransform(t,s,i,a,o,c))},r.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},r.rotate=function(t){e.rotate(t),this.__originalRotate(t)},r.clip=function(t){e.clip(t),this.__originalClip(t)},r.moveTo=function(t,s){e.moveTo(t,s),this.__originalMoveTo(t,s)},r.lineTo=function(t,s){e.lineTo(t,s),this.__originalLineTo(t,s)},r.bezierCurveTo=function(t,s,i,a,o,c){e.bezierCurveTo(t,s,i,a,o,c),this.__originalBezierCurveTo(t,s,i,a,o,c)},r.rect=function(t,s,i,a){e.rect(t,s,i,a),this.__originalRect(t,s,i,a)},r.closePath=function(){e.closePath(),this.__originalClosePath()},r.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}function jy(r,e,t,s,i,a,o,c,h,f){const[m,g,x,y,v,j]=At(r);
424if(g===0&&x===0){const A=o*m+v,E=Math.round(A),M=c*y+j,R=Math.round(M),I=(o+h)*m+v,F=Math.abs(Math.round(I)-E)||1,D=(c+f)*y+j,O=Math.abs(Math.round(D)-R)||1;return r.setTransform(Math.sign(m),0,0,Math.sign(y),E,R),r.drawImage(e,t,s,i,a,0,0,F,O),r.setTransform(m,g,x,y,v,j),[F,O]}if(m===0&&y===0){const A=c*x+v,E=Math.round(A),M=o*g+j,R=Math.round(M),I=(c+f)*x+v,F=Math.abs(Math.round(I)-E)||1,D=(o+h)*g+j,O=Math.abs(Math.round(D)-R)||1;return r.setTransform(0,Math.sign(g),Math.sign(x),0,E,R),r.drawImage(e,t,s,i,a,0,0,O,F),r.setTransform(m,g,x,y,v,j),[O,F]}r.drawImage(e,t,s,i,a,o,c,h,f);const N=Math.hypot(m,g),S=Math.hypot(x,y);return[N*h,S*f]}class $C{constructor(e,t){Y(this,"alphaIsShape",!1);Y(this,"fontSize",0);Y(this,"fontSizeScale",1);Y(this,"textMatrix",null);Y(this,"textMatrixScale",1);Y(this,"fontMatrix",wj);Y(this,"leading",0);Y(this,"x",0);Y(this,"y",0);Y(this,"lineX",0);Y(this,"lineY",0);Y(this,"charSpacing",0);Y(this,"wordSpacing",0);Y(this,"textHScale",1);Y(this,"textRenderingMode",fs.FILL);Y(this,"textRise",0);Y(this,"fillColor","#000000");Y(this,"strokeColor","#000000");Y(this,"tilingPatternDims",null);Y(this,"patternFill",!1);Y(this,"patternStroke",!1);Y(this,"fillAlpha",1);Y(this,"strokeAlpha",1);Y(this,"lineWidth",1);Y(this,"activeSMask",null);Y(this,"transferMaps","none");Y(this,"minMax",Bc.slice());this.clipBox=new Float32Array([0,0,e,t])}clone(){var t;const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e.minMax=this.minMax.slice(),e.tilingPatternDims=(t=this.tilingPatternDims)==null?void 0:t.slice(),e}getPathBoundingBox(e=Hs.FILL,t=null){const s=this.minMax.slice();if(e===Hs.STROKE){t||it("Stroke bounding box must include transform."),me.singularValueDecompose2dScale(t,pr);const i=pr[0]*this.lineWidth/2,a=pr[1]*this.lineWidth/2;s[0]-=i,s[1]-=a,s[2]+=i,s[3]+=a}return s}updateClipFromPath(){const e=me.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(e){this.clipBox.set(e,0),this.minMax.set(Bc,0)}getClippedPathBoundingBox(e=Hs.FILL,t=null){return me.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function UC(r,e){if(e instanceof ImageData){r.putImageData(e,0,0);return}const t=e.height,s=e.width,i=t%Fn,a=(t-i)/Fn,o=i===0?a:a+1,c=r.createImageData(s,Fn);let h=0,f;const m=e.data,g=c.data;let x,y,v,j;if(e.kind===Vy.GRAYSCALE_1BPP){const N=m.byteLength,S=new Uint32Array(g.buffer,0,g.byteLength>>2),A=S.length,E=s+7>>3,M=4294967295,R=ls.isLittleEndian?4278190080:255;for(x=0;x<o;x++){for(v=x<a?Fn:i,f=0,y=0;y<v;y++){const I=N-h;let F=0;const D=I>E?s:I*8-7,O=D&-8;let $=0,z=0;for(;F<O;F+=8)z=m[h++],S[f++]=z&128?M:R,S[f++]=z&64?M:R,S[f++]=z&32?M:R,S[f++]=z&16?M:R,S[f++]=z&8?M:R,S[f++]=z&4?M:R,S[f++]=z&2?M:R,S[f++]=z&1?M:R;for(;F<D;F++)$===0&&(z=m[h++],$=128),S[f++]=z&$?M:R,$>>=1}for(;f<A;)S[f++]=0;r.putImageData(c,0,x*Fn)}}else if(e.kind===Vy.RGBA_32BPP){for(y=0,j=s*Fn*4,x=0;x<a;x++)g.set(m.subarray(h,h+j)),h+=j,r.putImageData(c,0,y),y+=Fn;x<o&&(j=s*i*4,g.set(m.subarray(h,h+j)),r.putImageData(c,0,y))}else if(e.kind===Vy.RGB_24BPP)for(v=Fn,j=s*v,x=0;x<o;x++){for(x>=a&&(v=i,j=s*v),f=0,y=j;y--;)g[f++]=m[h++],g[f++]=m[h++],g[f++]=m[h++],g[f++]=255;r.putImageData(c,0,x*Fn)}else throw new Error(`bad image kind: ${e.kind}`)}function HC(r,e){if(e.bitmap){r.drawImage(e.bitmap,0,0);return}const t=e.height,s=e.width,i=t%Fn,a=(t-i)/Fn,o=i===0?a:a+1,c=r.createImageData(s,Fn);let h=0;const f=e.data,m=c.data;for(let g=0;g<o;g++){const x=g<a?Fn:i;({srcPos:h}=EV({src:f,srcPos:h,dest:m,width:s,height:x,nonBlackColor:0})),r.putImageData(c,0,g*Fn)}}function Xm(r,e){const t=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const s of t)r[s]!==void 0&&(e[s]=r[s]);r.setLineDash!==void 0&&(e.setLineDash(r.getLineDash()),e.lineDashOffset=r.lineDashOffset)}function Ny(r){r.strokeStyle=r.fillStyle="#000000",r.fillRule="nonzero",r.globalAlpha=1,r.lineWidth=1,r.lineCap="butt",r.lineJoin="miter",r.miterLimit=10,r.globalCompositeOperation="source-over",r.font="10px sans-serif",r.setLineDash!==void 0&&(r.setLineDash([]),r.lineDashOffset=0);const{filter:e}=r;e!=="none"&&e!==""&&(r.filter="none")}function zC(r,e){if(e)return!0;me.singularValueDecompose2dScale(r,pr);const t=Math.fround(ba.pixelRatio*oc.PDF_TO_CSS_UNITS);return pr[0]<=t&&pr[1]<=t}const PV=["butt","round","square"],RV=["miter","round","bevel"],MV={},VC={};var Mi,Qj,Zj,eN;const g5=class g5{constructor(e,t,s,i,a,{optionalContentConfig:o,markedContentStack:c=null},h,f,m,g){C(this,Mi);
424this.ctx=e,this.current=new $C(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.commonObjs=t,this.objs=s,this.canvasFactory=i,this.filterFactory=a,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.tempSMask=null,this.smaskGroupCanvases=[],this.smaskPreparedEntry=null,this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=c||[],this.optionalContentConfig=o,this.cachedPatterns=new Map,this.annotationCanvasMap=h,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=f,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=m??null,this.imagesTracker=g??null}getObject(e,t,s=null){var i;return typeof t=="string"?((i=this.dependencyTracker)==null||i.recordNamedDependency(e,t),t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t)):s}beginDrawing({transform:e,viewport:t,transparency:s=!1,background:i=null}){const a=this.ctx.canvas.width,o=this.ctx.canvas.height,c=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,a,o),this.ctx.fillStyle=c,s){const h=this.transparentCanvasEntry=this.canvasFactory.create(a,o);this.compositeCtx=this.ctx,{canvas:this.transparentCanvas,context:this.ctx}=h,this.ctx.save(),this.ctx.transform(...At(this.compositeCtx))}this.ctx.save(),Ny(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[3]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=At(this.ctx)}executeOperatorList(e,t,s,i,a){var S;const o=e.argsArray,c=e.fnArray;let h=t||0;const f=o.length;if(f===h)return h;const m=f-h>BC&&typeof s=="function",g=m?Date.now()+CV:0;let x=0;const y=this.commonObjs,v=this.objs;let j,N;for(;;){if(i!==void 0){if(h===i.nextBreakPoint)return i.breakIt(h,s),h;if(i.shouldSkip(h)){if(++h===f)return h;continue}}if(!a||a(h))if(j=c[h],N=o[h]??null,j!==$a.dependency)N===null?this[j](h):this[j](h,...N);else for(const A of N){(S=this.dependencyTracker)==null||S.recordNamedData(A,h);const E=A.startsWith("g_")?y:v;if(!E.has(A))return E.get(A,s),h}if(h++,h===f)return h;if(m&&++x>BC){if(Date.now()>g)return s(),h;x=0}}}endDrawing(){P(this,Mi,Qj).call(this);for(const e of this.smaskGroupCanvases)this.canvasFactory.destroy(e);this.smaskGroupCanvases.length=0,this._clearPreparedSMask(),this.tempSMask=null,this.smaskStack.length=0,this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),P(this,Mi,Zj).call(this)}_scaleImage(e,t){const s=e.width??e.displayWidth,i=e.height??e.displayHeight,a=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),c=[];let h=a,f=o,m=s,g=i;for(;h>2&&m>1||f>2&&g>1;){let S=m,A=g;h>2&&m>1&&(S=Math.ceil(m/2),h/=m/S),f>2&&g>1&&(A=Math.ceil(g/2),f/=g/A),c.push({newWidth:S,newHeight:A}),m=S,g=A}if(c.length===0)return{img:e,paintWidth:s,paintHeight:i,tmpCanvas:null};if(c.length===1){const{newWidth:S,newHeight:A}=c[0],E=this.canvasFactory.create(S,A);return E.context.drawImage(e,0,0,s,i,0,0,S,A),{img:E.canvas,paintWidth:S,paintHeight:A,tmpCanvas:E}}let x=this.canvasFactory.create(1,1),y=this.canvasFactory.create(1,1),v=s,j=i,N=e;for(const{newWidth:S,newHeight:A}of c)this.canvasFactory.reset(y,S,A),y.context.drawImage(N,0,0,v,j,0,0,S,A),[x,y]=[y,x],N=x.canvas,v=S,j=A;return this.canvasFactory.destroy(y),{img:x.canvas,paintWidth:v,paintHeight:j,tmpCanvas:x}}_createMaskCanvas(e,t){var z,re;const s=this.ctx,{width:i,height:a}=t,o=this.current.fillColor,c=this.current.patternFill,h=At(s);let f,m,g,x;if((t.bitmap||t.data)&&t.count>1){const he=t.bitmap||t.data.buffer;m=JSON.stringify(c?h:[h.slice(0,4),o]),f=this._cachedBitmapsMap.getOrInsertComputed(he,e5);const de=f.get(m);if(de&&!c){const fe=Math.round(Math.min(h[0],h[2])+h[4]),oe=Math.round(Math.min(h[1],h[3])+h[5]);return(z=this.dependencyTracker)==null||z.recordDependencies(e,Tr.transformAndFill),{canvas:de,offsetX:fe,offsetY:oe}}g=de}g||(x=this.canvasFactory.create(i,a),HC(x.context,t));let y=me.transform(h,[1/i,0,0,-1/a,0,0]);y=me.transform(y,[1,0,0,1,0,-a]);const v=Bc.slice();me.axialAlignedBoundingBox([0,0,i,a],y,v);const[j,N,S,A]=v,E=Math.round(S-j)||1,M=Math.round(A-N)||1,R=this.canvasFactory.create(E,M),I=R.context,F=j,D=N;I.translate(-F,-D),I.transform(...y);let O=null;if(!g){const he=this._scaleImage(x.canvas,$i(I));g=he.img,O=he.tmpCanvas,g!==x.canvas&&(this.canvasFactory.destroy(x),x=null),f&&c&&(f.set(m,g),O=null,x=null)}I.imageSmoothingEnabled=zC(At(I),t.interpolate),jy(I,g,0,0,g.width,g.height,0,0,i,a),O&&this.canvasFactory.destroy(O),x&&this.canvasFactory.destroy(x),I.globalCompositeOperation="source-in";const $=me.transform($i(I),[1,0,0,1,-F,-D]);return I.fillStyle=c?o.getPattern(s,this,$,Hs.FILL,e):o,I.fillRect(0,0,i,a),f&&!c&&f.set(m,R.canvas),(re=this.dependencyTracker)==null||re.recordDependencies(e,Tr.transformAndFill),{canvas:R.canvas,canvasEntry:f&&!c?null:R,offsetX:Math.round(F),offsetY:Math.round(D)}}setLineWidth(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineWidth",e),t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineCap",e),this.ctx.lineCap=PV[t]}setLineJoin(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineJoin",e),this.ctx.lineJoin=RV[t]}setMiterLimit(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("miterLimit",e),this.ctx.miterLimit=t}setDash(e,t,s){var a;(a=this.dependencyTracker)==null||a.recordSimpleData("dash",e);const i=this.ctx;i.setLineDash!==void 0&&(i.setLineDash(t),i.lineDashOffset=s)}
424setRenderingIntent(e,t){}setFlatness(e,t){}setGState(e,t){var s,i,a,o,c;for(const[h,f]of t)switch(h){case"LW":this.setLineWidth(e,f);break;case"LC":this.setLineCap(e,f);break;case"LJ":this.setLineJoin(e,f);break;case"ML":this.setMiterLimit(e,f);break;case"D":this.setDash(e,f[0],f[1]);break;case"RI":this.setRenderingIntent(e,f);break;case"FL":this.setFlatness(e,f);break;case"Font":this.setFont(e,f[0],f[1]);break;case"CA":(s=this.dependencyTracker)==null||s.recordSimpleData("strokeAlpha",e),this.current.strokeAlpha=f;break;case"ca":(i=this.dependencyTracker)==null||i.recordSimpleData("fillAlpha",e),this.ctx.globalAlpha=this.current.fillAlpha=f;break;case"BM":(a=this.dependencyTracker)==null||a.recordSimpleData("globalCompositeOperation",e),this.ctx.globalCompositeOperation=f;break;case"SMask":(o=this.dependencyTracker)==null||o.recordSimpleData("SMask",e),this.current.activeSMask=f?this.tempSMask:null,this.current.activeSMask&&(this.current.activeSMask.blendMode=this.ctx.globalCompositeOperation),this.tempSMask=null,this.checkSMaskState(e);break;case"TR":(c=this.dependencyTracker)==null||c.recordSimpleData("filter",e),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(f);break}}get inSMaskMode(){return!!this.suspendedCtx}_clearPreparedSMask(){this.smaskPreparedEntry&&(this.canvasFactory.destroy(this.smaskPreparedEntry),this.smaskPreparedEntry=null),this.smaskPreparedFor=null,this.smaskPreparedOffsetX=0,this.smaskPreparedOffsetY=0}_ensurePreparedSMask(e,t,s){e!==this.smaskPreparedFor&&(this._clearPreparedSMask(),this._prepareSMaskCanvas(e,t,s))}checkSMaskState(e){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode(e):!this.current.activeSMask&&t?this.endSMaskMode():this.current.activeSMask&&t&&this._ensurePreparedSMask(this.current.activeSMask,this.ctx.canvas.width,this.ctx.canvas.height)}_prepareSMaskCanvas(e,t,s){const{canvas:i,subtype:a,backdrop:o,transferMap:c}=e,h=a==="Luminosity"||a==="Alpha"&&c;if(!o&&!h){this.smaskPreparedFor=e;return}let f,m,g;if(o&&h){const x=this.canvasFactory.create(t,s),y=x.context;y.drawImage(i,e.offsetX,e.offsetY),y.globalCompositeOperation="destination-atop",y.fillStyle=o,y.fillRect(0,0,t,s),y.globalCompositeOperation="source-over",f=this.canvasFactory.create(t,s);const v=f.context;v.filter=a==="Alpha"?this.filterFactory.addAlphaFilter(c):this.filterFactory.addLuminosityFilter(c),v.drawImage(x.canvas,0,0),v.filter="none",this.canvasFactory.destroy(x),m=g=0}else if(h){f=this.canvasFactory.create(i.width,i.height);const x=f.context;x.filter=a==="Alpha"?this.filterFactory.addAlphaFilter(c):this.filterFactory.addLuminosityFilter(c),x.drawImage(i,0,0),x.filter="none",{offsetX:m,offsetY:g}=e}else{f=this.canvasFactory.create(t,s);const x=f.context;x.drawImage(i,e.offsetX,e.offsetY),x.globalCompositeOperation="destination-atop",x.fillStyle=o,x.fillRect(0,0,t,s),x.globalCompositeOperation="source-over",m=g=0}this.smaskPreparedEntry=f,this.smaskPreparedFor=e,this.smaskPreparedOffsetX=m,this.smaskPreparedOffsetY=g}beginSMaskMode(e){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const{width:t,height:s}=this.ctx.canvas,i=this.canvasFactory.create(t,s);this.smaskScratchCanvas=i,this.suspendedCtx=this.ctx;const a=this.ctx=i.context;a.setTransform(this.suspendedCtx.getTransform()),Xm(this.suspendedCtx,a),TV(a,this.suspendedCtx),this._ensurePreparedSMask(this.current.activeSMask,t,s),this.setGState(e,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Xm(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null,this.canvasFactory.destroy(this.smaskScratchCanvas),this.smaskScratchCanvas=null,this._clearPreparedSMask()}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,s=this.suspendedCtx;this.composeSMask(s,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.ctx.restore(
424)}composeSMask(e,t,s,i){const a=i[0],o=i[1],c=i[2]-a,h=i[3]-o;if(c===0||h===0)return;const f=this.smaskPreparedEntry;if(f){const m=a-this.smaskPreparedOffsetX,g=o-this.smaskPreparedOffsetY;s.save(),s.globalAlpha=1,s.setTransform(1,0,0,1,0,0);const x=new Path2D;x.rect(a,o,c,h),s.clip(x),s.globalCompositeOperation="destination-in",s.drawImage(f.canvas,m,g,c,h,a,o,c,h),s.restore()}else this.genericComposeSMask(t.context,s,c,h,a,o,t.offsetX,t.offsetY);e.save(),e.globalAlpha=1,e.globalCompositeOperation=t.blendMode||"source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(s.canvas,a,o,c,h,a,o,c,h),e.restore()}genericComposeSMask(e,t,s,i,a,o,c,h){const f=e.canvas,m=a-c,g=o-h;t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const x=new Path2D;x.rect(a,o,s,i),t.clip(x),t.globalCompositeOperation="destination-in",t.drawImage(f,m,g,s,i,a,o,s,i),t.restore()}save(e){var s;this.inSMaskMode&&Xm(this.ctx,this.suspendedCtx),this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone(),(s=this.dependencyTracker)==null||s.save(e)}restore(e){var t;if((t=this.dependencyTracker)==null||t.restore(e),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&(Xm(this.suspendedCtx,this.ctx),this.ctx.setTransform(this.suspendedCtx.getTransform())),this.checkSMaskState(e),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(e,t,s,i,a,o,c){var h;(h=this.dependencyTracker)==null||h.recordIncrementalData("transform",e),this.ctx.transform(t,s,i,a,o,c),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,s,i){let[a]=s;if(!i){a||(a=s[0]=new Path2D),t!==$a.stroke&&t!==$a.closeStroke&&(this.current.tilingPatternDims=null),this[t](e,a);return}if(this.dependencyTracker!==null){const c=t===$a.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(e).recordBBox(e,this.ctx,i[0]-c,i[2]+c,i[1]-c,i[3]+c).recordDependencies(e,["transform"])}a instanceof Path2D||(a=s[0]=mP(a)),me.axialAlignedBoundingBox(i,At(this.ctx),this.current.minMax);const o=this.current.tilingPatternDims;if(o&&t!==$a.stroke&&t!==$a.closeStroke&&this.current.fillColor instanceof Rp){const c=me.intersect(this.current.clipBox,this.current.minMax);c?this.current.fillColor.updatePatternDims(c,o):this.current.tilingPatternDims=null}this[t](e,a),this._pathStartIdx=e}closePath(e){this.ctx.closePath()}stroke(e,t,s=!0){var o;const i=this.ctx,a=this.current.strokeColor;if(i.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof a=="object"&&(a!=null&&a.getPattern)){const c=a.isModifyingCurrentTransform()?i.getTransform():null;if(i.save(),i.strokeStyle=a.getPattern(i,this,$i(i),Hs.STROKE,e),c){const h=new Path2D;h.addPath(t,i.getTransform().invertSelf().multiplySelf(c)),t=h}this.rescaleAndStroke(t,!1),i.restore()}else this.rescaleAndStroke(t,!0);(o=this.dependencyTracker)==null||o.recordDependencies(e,Tr.stroke),s&&this.consumePath(e,t,this.current.getClippedPathBoundingBox(Hs.STROKE,At(this.ctx))),i.globalAlpha=this.current.fillAlpha}closeStroke(e,t){this.stroke(e,t)}fill(e,t,s=!0){var f,m,g;const i=this.ctx,a=this.current.fillColor,o=this.current.patternFill;let c=!1;const h=this.current.getClippedPathBoundingBox();if((f=this.dependencyTracker)==null||f.recordDependencies(e,Tr.fill),o){const x=this.current.tilingPatternDims,y=x&&a.canSkipPatternCanvas(x);if(y){a.drawPattern(this,t,this.pendingEOFill,y,e),this.pendingEOFill=!1,s&&this.consumePath(e,t,h),this.current.tilingPatternDims=null;return}const v=a.isModifyingCurrentTransform()?i.getTransform():null;if((m=this.dependencyTracker)==null||m.save(e),i.save(),i.fillStyle=a.getPattern(i,this,$i(i),Hs.FILL,e),v){const j=new Path2D;j.addPath(t,i.getTransform().invertSelf().multiplySelf(v)),t=j}c=!0}this.contentVisible&&h!==null&&(this.pendingEOFill?(i.fill(t,"evenodd"),this.pendingEOFill=!1):i.fill(t)),c&&(i.restore(),(g=this.dependencyTracker)==null||g.restore(e)),s&&this.consumePath(e,t,h)}eoFill(e,t){this.pendingEOFill=!0,this.fill(e,t)}fillStroke(e,t){this.fill(e,t,!1),this.stroke(e,t,!1),this.consumePath(e,t)}eoFillStroke(e,t){this.pendingEOFill=!0,this.fillStroke(e,t)}closeFillStroke(e,t){this.fillStroke(e,t)}closeEOFillStroke(e,t){this.pendingEOFill=!0,this.fillStroke(e,t)}endPath(e,t){this.consumePath(e,t)}rawFillPath(e,t){var s;this.ctx.fill(t),(s=this.dependencyTracker)==null||s.recordDependencies(e,Tr.rawFillPath).recordOperation(e)}clip(e){var t;(t=this.dependencyTracker)==null||t.recordFutureForcedDependency("clipMode",e),this.pendingClip=MV}eoClip(e){var t;(t=this.dependencyTracker)==null||t.recordFutureForcedDependency("clipMode",e),this.pendingClip=VC}beginText(e){var t;this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,
424(t=this.dependencyTracker)==null||t.recordOpenMarker(e).resetIncrementalData("sameLineText").resetIncrementalData("moveText",e)}endText(e){const t=this.pendingTextPaths,s=this.ctx;if(this.dependencyTracker){const{dependencyTracker:i}=this;t!==void 0&&i.recordFutureForcedDependency("textClip",i.getOpenMarker()).recordFutureForcedDependency("textClip",e),i.recordCloseMarker(e)}if(t!==void 0){const i=new Path2D,a=s.getTransform().invertSelf();for(const{transform:o,x:c,y:h,fontSize:f,path:m}of t)m&&i.addPath(m,new DOMMatrix(o).preMultiplySelf(a).translate(c,h).scale(f,-f));s.clip(i)}delete this.pendingTextPaths}setCharSpacing(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("charSpacing",e),this.current.charSpacing=t}setWordSpacing(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("wordSpacing",e),this.current.wordSpacing=t}setHScale(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("hScale",e),this.current.textHScale=t/100}setLeading(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("leading",e),this.current.leading=-t}setFont(e,t,s){var g,x;(g=this.dependencyTracker)==null||g.recordSimpleData("font",e).recordSimpleDataFromNamed("fontObj",t,e);const i=this.commonObjs.get(t),a=this.current;if(!i)throw new Error(`Can't find font for ${t}`);if(a.fontMatrix=i.fontMatrix||wj,(a.fontMatrix[0]===0||a.fontMatrix[3]===0)&&He("Invalid font matrix for font "+t),s<0?(s=-s,a.fontDirection=-1):a.fontDirection=1,this.current.font=i,this.current.fontSize=s,i.isType3Font)return;const o=i.loadedName||"sans-serif",c=((x=i.systemFontInfo)==null?void 0:x.css)||`"${o}", ${i.fallbackName}`;let h="normal";i.black?h="900":i.bold&&(h="bold");const f=i.italic?"italic":"normal";let m=s;s<OC?m=OC:s>FC&&(m=FC),this.current.fontSizeScale=s/m,this.ctx.font=`${f} ${h} ${m}px ${c}`}setTextRenderingMode(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("textRenderingMode",e),this.current.textRenderingMode=t}setTextRise(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("textRise",e),this.current.textRise=t}moveText(e,t,s){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordIncrementalData("moveText",e),this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=s}setLeadingMoveText(e,t,s){this.setLeading(e,-s),this.moveText(e,t,s)}setTextMatrix(e,t){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordSimpleData("textMatrix",e);const{current:s}=this;s.textMatrix=t,s.textMatrixScale=Math.hypot(t[0],t[1]),s.x=s.lineX=0,s.y=s.lineY=0}nextLine(e){var t;this.moveText(e,0,this.current.leading),(t=this.dependencyTracker)==null||t.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??e)}paintChar(e,t,s,i,a,o){var S,A,E,M;const c=this.ctx,h=this.current,f=h.font,m=h.textRenderingMode,g=h.fontSize/h.fontSizeScale,x=m&fs.FILL_STROKE_MASK,y=!!(m&fs.ADD_TO_PATH_FLAG),v=h.patternFill&&!f.missingFile,j=h.patternStroke&&!f.missingFile;let N;if((f.disableFontFace||y||v||j)&&!f.missingFile&&(N=f.getPathGenerator(this.commonObjs,t)),N&&(f.disableFontFace||v||j)){c.save(),c.translate(s,i),c.scale(g,-g),(S=this.dependencyTracker)==null||S.recordCharacterBBox(e,c,f);let R;if(x===fs.FILL||x===fs.FILL_STROKE)if(a){R=c.getTransform(),c.setTransform(...a);const I=P(this,Mi,eN).call(this,N,R,a);c.fill(I)}else c.fill(N);if(x===fs.STROKE||x===fs.FILL_STROKE)if(o){R||(R=c.getTransform()),c.setTransform(...o);const{a:I,b:F,c:D,d:O}=R,$=me.inverseTransform(o),z=me.transform([I,F,D,O,0,0],$);me.singularValueDecompose2dScale(z,pr),c.lineWidth*=Math.max(pr[0],pr[1])/g,c.stroke(P(this,Mi,eN).call(this,N,R,o))}else c.lineWidth/=g,c.stroke(N);c.restore()}else(x===fs.FILL||x===fs.FILL_STROKE)&&(c.fillText(t,s,i),(A=this.dependencyTracker)==null||A.recordCharacterBBox(e,c,f,g,s,i,()=>c.measureText(t))),(x===fs.STROKE||x===fs.FILL_STROKE)&&(this.dependencyTracker&&((E=this.dependencyTracker)==null||E.recordCharacterBBox(e,c,f,g,s,i,()=>c.measureText(t)).recordDependencies(e,Tr.stroke)),c.strokeText(t,s,i));y&&((this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:At(c),x:s,y:i,fontSize:g,path:N}),(M=this.dependencyTracker)==null||M.recordCharacterBBox(e,c,f,g,s,i))}get isFontSubpixelAAEnabled(){const e=this.canvasFactory.create(10,
42410),t=e.context;t.scale(1.5,1),t.fillText("I",0,10);const s=t.getImageData(0,0,10,10).data;this.canvasFactory.destroy(e);let i=!1;for(let a=3;a<s.length;a+=4)if(s[a]>0&&s[a]<255){i=!0;break}return $e(this,"isFontSubpixelAAEnabled",i)}showText(e,t){var z,re,he,de;this.dependencyTracker&&(this.dependencyTracker.recordDependencies(e,Tr.showText).resetBBox(e),this.current.textRenderingMode&fs.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",e).inheritPendingDependenciesAsFutureForcedDependencies());const s=this.current,i=s.font;if(i.isType3Font){this.showType3Text(e,t),(z=this.dependencyTracker)==null||z.recordShowTextOperation(e);return}const a=s.fontSize;if(a===0){(re=this.dependencyTracker)==null||re.recordOperation(e);return}const o=this.ctx,c=s.fontSizeScale,h=s.charSpacing,f=s.wordSpacing,m=s.fontDirection,g=s.textHScale*m,x=t.length,y=i.vertical,v=y?1:-1,j=i.defaultVMetrics,N=a*s.fontMatrix[0],S=s.textRenderingMode===fs.FILL&&!i.disableFontFace&&!s.patternFill;o.save(),s.textMatrix&&o.transform(...s.textMatrix),o.translate(s.x,s.y+s.textRise),m>0?o.scale(g,-1):o.scale(g,1);let A,E;const M=s.textRenderingMode&fs.FILL_STROKE_MASK,R=M===fs.FILL||M===fs.FILL_STROKE,I=M===fs.STROKE||M===fs.FILL_STROKE;let F=s.lineWidth;const D=s.textMatrixScale;if(D===0||F===0?I&&(F=this.getSinglePixelWidth()):F/=D,c!==1&&(o.scale(c,c),F/=c),o.lineWidth=F,R&&s.patternFill){o.save();const fe=s.fillColor.getPattern(o,this,$i(o),Hs.FILL,e);A=At(o),o.restore(),o.fillStyle=fe}if(I&&s.patternStroke){o.save();const fe=s.strokeColor.getPattern(o,this,$i(o),Hs.STROKE,e);E=At(o),o.restore(),o.strokeStyle=fe}if(i.isInvalidPDFjsFont){const fe=[];let oe=0;for(const se of t)fe.push(se.unicode),oe+=se.width;const le=fe.join("");if(o.fillText(le,0,0),this.dependencyTracker!==null){const se=o.measureText(le);this.dependencyTracker.recordBBox(e,this.ctx,-se.actualBoundingBoxLeft,se.actualBoundingBoxRight,-se.actualBoundingBoxAscent,se.actualBoundingBoxDescent).recordShowTextOperation(e)}s.x+=oe*N*g,o.restore(),this.compose();return}let O=0,$;for($=0;$<x;++$){const fe=t[$];if(typeof fe=="number"){O+=v*fe*a/1e3;continue}let oe=!1;const le=(fe.isSpace?f:0)+h,se=fe.fontChar,K=fe.accent;let Q,U,Z=fe.width;if(y){const G=fe.vmetric||j,ne=-(fe.vmetric?G[1]:Z*.5)*N,ue=G[2]*N;Z=G?-G[0]:Z,Q=ne/c,U=(O+ue)/c}else Q=O/c,U=0;let ee;if(i.remeasure&&Z>0){ee=o.measureText(se);const G=ee.width*1e3/a*c;if(Z<G&&this.isFontSubpixelAAEnabled){const ne=Z/G;oe=!0,o.save(),o.scale(ne,1),Q/=ne}else Z!==G&&(Q+=(Z-G)/2e3*a/c)}if(this.contentVisible&&(fe.isInFont||i.missingFile)){if(S&&!K)o.fillText(se,Q,U),(he=this.dependencyTracker)==null||he.recordCharacterBBox(e,o,ee?{bbox:null}:i,a/c,Q,U,()=>ee??o.measureText(se));else if(this.paintChar(e,se,Q,U,A,E),K){const G=Q+a*K.offset.x/c,ne=U-a*K.offset.y/c;this.paintChar(e,K.fontChar,G,ne,A,E)}}const W=y?Z*N-le*m:Z*N+le*m;O+=W,oe&&o.restore()}y?s.y-=O:s.x+=O*g,o.restore(),this.compose(),(de=this.dependencyTracker)==null||de.recordShowTextOperation(e)}showType3Text(e,t){const s=this.ctx,i=this.current,a=i.font,o=i.fontSize,c=i.fontDirection,h=a.vertical?1:-1,f=i.charSpacing,m=i.wordSpacing,g=i.textHScale*c,x=i.fontMatrix||wj,y=t.length,v=i.textRenderingMode===fs.INVISIBLE;let j,N,S,A;if(v||o===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,s.save(),i.textMatrix&&s.transform(...i.textMatrix),s.translate(i.x,i.y+i.textRise),s.scale(g,c);const E=this.dependencyTracker;for(this.dependencyTracker=E?new qp(E,e):null,j=0;j<y;++j){if(N=t[j],typeof N=="number"){A=h*N*o/1e3,this.ctx.translate(A,0),i.x+=A*g;continue}const M=(N.isSpace?m:0)+f,R=a.charProcOperatorList[N.operatorListId];R?this.contentVisible&&(this.save(),s.scale(o,o),s.transform(...x),this.executeOperatorList(R),this.restore()):He(`Type3 character "${N.operatorListId}" is not available.`);const I=[N.width,0];me.applyTransform(I,x),S=I[0]*o+M,s.translate(S,0),i.x+=S*g}s.restore(),E&&(this.dependencyTracker=E)}setCharWidth(e,t,s){}setCharWidthAndBounds(e,t,s,i,a,o,c){var f;const h=new Path2D;h.rect(i,a,o-i,c-a),this.ctx.clip(h),(f=this.dependencyTracker)==null||f.recordBBox(e,this.ctx,i,o,a,c).recordClipBox(e,this.ctx,i,o,a,c),this.endPath(e)}getColorN_Pattern(e,t){let s;if(t[0]==="TilingPattern"){const i=this.baseTransform||At(this.ctx),a={createCanvasGraphics:(o,c)=>new g5(o,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new qp(this.dependencyTracker,c,!0):null)};s=new Rp(t,this.ctx,a,i)}else s=this._getPattern(e,t[1],t[2]);return s}setStrokeColorN(e,...t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("strokeColor",e),this.current.strokeColor=this.getColorN_Pattern(e,t),this.current.patternStroke=!0}setFillColorN(e,...t){var i;(i=this.dependencyTracker)==null||i.recordSimpleData("fillColor",e);const s=this.current.fillColor=this.getColorN_Pattern(e,t);this.current.patternFill=!0,this.current.tilingPatternDims=s instanceof Rp?[0,0,0,0]:null}setStrokeRGBColor(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("strokeColor",e),this.ctx.strokeStyle=this.current.strokeColor=t,this.current.patternStroke=!1}
424setStrokeTransparent(e){var t;(t=this.dependencyTracker)==null||t.recordSimpleData("strokeColor",e),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(e,t){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("fillColor",e),this.ctx.fillStyle=this.current.fillColor=t,this.current.patternFill=!1,this.current.tilingPatternDims=null}setFillTransparent(e){var t;(t=this.dependencyTracker)==null||t.recordSimpleData("fillColor",e),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1,this.current.tilingPatternDims=null}_getPattern(e,t,s=null){let i;return this.cachedPatterns.has(t)?i=this.cachedPatterns.get(t):(i=_V(this.getObject(e,t)),this.cachedPatterns.set(t,i)),s&&(i.matrix=s),i}shadingFill(e,t){var o;if(!this.contentVisible)return;const s=this.ctx;this.save(e);const i=this._getPattern(e,t);s.fillStyle=i.getPattern(s,this,$i(s),Hs.SHADING,e);const a=$i(s);if(a){const{width:c,height:h}=s.canvas,f=Bc.slice();me.axialAlignedBoundingBox([0,0,c,h],a,f);const[m,g,x,y]=f;this.ctx.fillRect(m,g,x-m,y-g)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);(o=this.dependencyTracker)==null||o.resetBBox(e).recordFullPageBBox(e).recordDependencies(e,Tr.transform).recordDependencies(e,Tr.fill).recordOperation(e),this.compose(this.current.getClippedPathBoundingBox()),this.restore(e)}beginInlineImage(){it("Should not call beginInlineImage")}beginImageData(){it("Should not call beginImageData")}paintFormXObjectBegin(e,t,s){var i;if(this.contentVisible&&(this.save(e),this.baseTransformStack.push(this.baseTransform),t&&this.transform(e,...t),this.baseTransform=At(this.ctx),s)){me.axialAlignedBoundingBox(s,this.baseTransform,this.current.minMax);const[a,o,c,h]=s,f=new Path2D;f.rect(a,o,c-a,h-o),this.ctx.clip(f),(i=this.dependencyTracker)==null||i.recordClipBox(e,this.ctx,a,c,o,h),this.endPath(e)}}paintFormXObjectEnd(e){this.contentVisible&&(this.restore(e),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e,t){var v;if(!this.contentVisible)return;this.save(e);const{inSMaskMode:s}=this;s&&(this.endSMaskMode(),this.current.activeSMask=null);const i=this.ctx;
424if(t.isolated||Vv("TODO: Support non-isolated groups."),t.knockout&&He("Knockout groups not supported."),!t.needsIsolation&&i.globalAlpha===1&&i.globalCompositeOperation==="source-over"&&!s){if(t.bbox){let j=new Path2D;const[N,S,A,E]=t.bbox;if(j.rect(N,S,A-N,E-S),t.matrix){const M=new Path2D;M.addPath(j,new DOMMatrix(t.matrix)),j=M}i.clip(j)}this.groupStack.push(null),this.groupLevel++;return}const a=At(i);t.matrix&&i.transform(...t.matrix);const o=[0,0,i.canvas.width,i.canvas.height];let c;t.bbox?(c=Bc.slice(),me.axialAlignedBoundingBox(t.bbox,At(i),c),c=me.intersect(c,o)||[0,0,0,0]):c=o;const h=Math.floor(c[0]),f=Math.floor(c[1]),m=Math.max(Math.ceil(c[2])-h,1),g=Math.max(Math.ceil(c[3])-f,1);this.current.startNewPathAndClipBox([0,0,m,g]);const x=this.canvasFactory.create(m,g);t.smask&&this.smaskGroupCanvases.push(x);const y=x.context;if(y.translate(-h,-f),y.transform(...a),!t.isolated&&!t.smask&&s&&t.needsIsolation&&(y.save(),y.setTransform(1,0,0,1,0,0),y.drawImage(i.canvas,-h,-f),y.restore()),t.bbox){let j=new Path2D;const[N,S,A,E]=t.bbox;if(j.rect(N,S,A-N,E-S),t.matrix){const M=new Path2D;M.addPath(j,new DOMMatrix(t.matrix)),j=M}y.clip(j)}t.smask&&this.smaskStack.push({canvas:x.canvas,context:y,offsetX:h,offsetY:f,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null}),(!t.smask||this.dependencyTracker)&&(i.setTransform(1,0,0,1,0,0),i.translate(h,f),i.save()),Xm(i,y),this.ctx=y,(v=this.dependencyTracker)==null||v.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(i),this.setGState(e,[["BM","source-over"],["ca",1],["CA",1],["TR",null]]),this.groupStack.push(i),this.groupLevel++}endGroup(e,t){var a;if(!this.contentVisible)return;this.groupLevel--;const s=this.ctx,i=this.groupStack.pop();if(i===null){this.restore(e);return}if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,(a=this.dependencyTracker)==null||a.popBaseTransform(),t.smask)this.tempSMask=this.smaskStack.pop(),this.restore(e),this.dependencyTracker&&(this.ctx.restore(),this.inSMaskMode&&this.ctx.setTransform(this.suspendedCtx.getTransform()));else{this.ctx.restore();const o=At(this.ctx);this.restore(e),this.ctx.save(),this.ctx.setTransform(...o);const c=Bc.slice();me.axialAlignedBoundingBox([0,0,s.canvas.width,s.canvas.height],o,c),this.ctx.drawImage(s.canvas,0,0),this.ctx.restore(),this.canvasFactory.destroy({canvas:s.canvas,context:s}),this.compose(c)}}beginAnnotation(e,t,s,i,a,o){if(P(this,Mi,Qj).call(this),Ny(this.ctx),this.ctx.save(),this.save(e),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),s){const c=s[2]-s[0],h=s[3]-s[1];if(o&&this.annotationCanvasMap){i=i.slice(),i[4]-=s[0],i[5]-=s[1],s=s.slice(),s[0]=s[1]=0,s[2]=c,s[3]=h,me.singularValueDecompose2dScale(At(this.ctx),pr);const{viewportScale:f}=this,m=Math.ceil(c*this.outputScaleX*f),g=Math.ceil(h*this.outputScaleY*f);this.annotationCanvas=this.canvasFactory.create(m,g);const{canvas:x,context:y}=this.annotationCanvas;this.annotationCanvasMap.set(t,x),this.annotationCanvas.savedCtx=this.ctx,this.ctx=y,this.ctx.save(),this.ctx.setTransform(pr[0],0,0,-pr[1],0,h*pr[1]),Ny(this.ctx)}else{Ny(this.ctx),this.endPath(e);const f=new Path2D;f.rect(s[0],s[1],c,h),this.ctx.clip(f)}}this.current=new $C(this.ctx.canvas.width,this.ctx.canvas.height),this.baseTransformStack.push(this.baseTransform),this.transform(e,...i),this.transform(e,...a),this.baseTransform=At(this.ctx)}endAnnotation(e){this.annotationCanvas&&(this.ctx.restore(),P(this,Mi,Zj).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.baseTransform=this.baseTransformStack.pop()}paintImageMaskXObject(e,t){var c;if(!this.contentVisible)return;const s=t.count;t=this.getObject(e,t.data,t),t.count=s;const i=this.ctx,a=this._createMaskCanvas(e,t),o=a.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(o,a.offsetX,a.offsetY),(c=this.dependencyTracker)==null||c.resetBBox(e).recordBBox(e,this.ctx,a.offsetX,a.offsetX+o.width,a.offsetY,a.offsetY+o.height).recordOperation(e),i.restore(
424),a.canvasEntry&&this.canvasFactory.destroy(a.canvasEntry),this.compose()}paintImageMaskXObjectRepeat(e,t,s,i=0,a=0,o,c){var g,x,y;if(!this.contentVisible)return;t=this.getObject(e,t.data,t);const h=this.ctx;h.save();const f=At(h);h.transform(s,i,a,o,0,0);const m=this._createMaskCanvas(e,t);h.setTransform(1,0,0,1,m.offsetX-f[4],m.offsetY-f[5]),(g=this.dependencyTracker)==null||g.resetBBox(e);for(let v=0,j=c.length;v<j;v+=2){const N=me.transform(f,[s,i,a,o,c[v],c[v+1]]);h.drawImage(m.canvas,N[4],N[5]),(x=this.dependencyTracker)==null||x.recordBBox(e,this.ctx,N[4],N[4]+m.canvas.width,N[5],N[5]+m.canvas.height)}h.restore(),m.canvasEntry&&this.canvasFactory.destroy(m.canvasEntry),this.compose(),(y=this.dependencyTracker)==null||y.recordOperation(e)}paintImageMaskXObjectGroup(e,t){var o,c,h;if(!this.contentVisible)return;const s=this.ctx,i=this.current.fillColor,a=this.current.patternFill;(o=this.dependencyTracker)==null||o.resetBBox(e).recordDependencies(e,Tr.transformAndFill);for(const f of t){const{data:m,width:g,height:x,transform:y}=f,v=this.canvasFactory.create(g,x),j=v.context;j.save();const N=this.getObject(e,m,f);HC(j,N),j.globalCompositeOperation="source-in",j.fillStyle=a?i.getPattern(j,this,$i(s),Hs.FILL,e):i,j.fillRect(0,0,g,x),j.restore(),s.save(),s.transform(...y),s.scale(1,-1),jy(s,v.canvas,0,0,g,x,0,-1,1,1),this.canvasFactory.destroy(v),(c=this.dependencyTracker)==null||c.recordBBox(e,s,0,g,0,x),s.restore()}this.compose(),(h=this.dependencyTracker)==null||h.recordOperation(e)}paintImageXObject(e,t){if(!this.contentVisible)return;const s=this.getObject(e,t);if(!s){He("Dependent image isn't ready yet");return}this.paintInlineImageXObject(e,s)}paintImageXObjectRepeat(e,t,s,i,a){if(!this.contentVisible)return;const o=this.getObject(e,t);if(!o){He("Dependent image isn't ready yet");return}const c=o.width,h=o.height,f=[];for(let m=0,g=a.length;m<g;m+=2)f.push({transform:[s,0,0,i,a[m],a[m+1]],x:0,y:0,w:c,h});this.paintInlineImageXObjectGroup(e,o,f)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return{img:e.bitmap,canvasEntry:null};const{bitmap:t,width:s,height:i}=e,a=this.canvasFactory.create(s,i),o=a.context;return o.filter=this.current.transferMaps,o.drawImage(t,0,0),o.filter="none",{img:a.canvas,canvasEntry:a}}paintInlineImageXObject(e,t){var m;if(!this.contentVisible)return;const s=t.width,i=t.height,a=this.ctx;this.save(e);const{filter:o}=a;o!=="none"&&o!==""&&(a.filter="none"),a.scale(1/s,-1/i);let c,h=null;if(t.bitmap){const g=this.applyTransferMapsToBitmap(t);c=g.img,h=g.canvasEntry}else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)c=t;else{const g=this.canvasFactory.create(s,i);UC(g.context,t),c=this.applyTransferMapsToCanvas(g.context),h=g}const f=this._scaleImage(c,$i(a));a.imageSmoothingEnabled=zC(At(a),t.interpolate),this.dependencyTracker&&(this.dependencyTracker.resetBBox(e).recordBBox(e,a,0,s,-i,0).recordDependencies(e,Tr.imageXObject).recordOperation(e),(m=this.imagesTracker)==null||m.record(a,s,i,this.dependencyTracker.clipBox)),jy(a,f.img,0,0,f.paintWidth,f.paintHeight,0,-i,s,i),f.tmpCanvas&&this.canvasFactory.destroy(f.tmpCanvas),h&&this.canvasFactory.destroy(h),this.compose(),this.restore(e)}paintInlineImageXObjectGroup(e,t,s){var c,h,f;if(!this.contentVisible)return;const i=this.ctx;let a,o=null;if(t.bitmap)a=t.bitmap;else{const m=t.width,g=t.height,x=this.canvasFactory.create(m,g);UC(x.context,t),a=this.applyTransferMapsToCanvas(x.context),o=x}(c=this.dependencyTracker)==null||c.resetBBox(e);for(const m of s)i.save(),i.transform(...m.transform),i.scale(1,-1),jy(i,a,m.x,m.y,m.w,m.h,0,-1,1,1),(h=this.dependencyTracker)==null||h.recordBBox(e,i,0,1,-1,0),i.restore();o&&this.canvasFactory.destroy(o),(f=this.dependencyTracker)==null||f.recordOperation(e),this.compose()}paintSolidColorImageMask(e){var t;this.contentVisible&&((t=this.dependencyTracker)==null||t.resetBBox(e).recordBBox(e,this.ctx,0,1,0,1).recordDependencies(e,Tr.fill).recordOperation(e),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e,t){}markPointProps(e,t,s){}beginMarkedContent(e,t){var s;(s=this.dependencyTracker)==null||s.beginMarkedContent(e),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t,s){var i;(i=this.dependencyTracker)==null||i.beginMarkedContent(e),t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(s)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(e){var t;(t=this.dependencyTracker)==null||t.endMarkedContent(e),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(e){}endCompat(e){}consumePath(e,t,s){var o,c;const i=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(s);const a=this.ctx;this.pendingClip?(i||(this.pendingClip===VC?a.clip(t,"evenodd"):a.clip(t)),this.pendingClip=null,(o=this.dependencyTracker)==null||o.bboxToClipBoxDropOperation(e).recordFutureForcedDependency("clipPath",e)):(c=this.dependencyTracker)==null||c.recordOperation(e),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=At(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),s=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(s,i)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e}=this.current,{a:t,b:s,c:i,d:a}=this.ctx.getTransform();let o,c;if(s===0&&i===0){const h=Math.abs(t),f=Math.abs(a);if(h===f)if(e===0)o=c=1/h;else{const m=h*e;o=c=m<1?1/m:1}else if(e===0)o=1/h,c=1/f;else{const m=h*e,g=f*e;o=m<1?1/m:1,c=g<1?1/g:1}}else{const h=Math.abs(t*a-s*i),f=Math.hypot(t,s),m=Math.hypot(i,a);if(e===0)o=m/h,c=f/h;else{const g=e*h;o=m>g?m/g:1,c=f>g?f/g:1}}this._cachedScaleForStroking[0]=o,this._cachedScaleForStroking[1]=c}return this._cachedScaleForStroking}rescaleAndStroke(e,t){const{ctx:s,current:{lineWidth:i}}=this,[a,o]=this.getScaleForStroking();if(a===o){s.lineWidth=(i||1)*a,s.stroke(e);return}const c=s.getLineDash();t&&s.save(),s.scale(a,o),M2.a=1/a,M2.d=1/o;const h=new Path2D;
424if(h.addPath(e,M2),c.length>0){const f=Math.max(a,o);s.setLineDash(c.map(m=>m/f)),s.lineDashOffset/=f}s.lineWidth=i||1,s.stroke(h),t&&s.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};Mi=new WeakSet,Qj=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.canvasFactory.destroy(this.transparentCanvasEntry),this.transparentCanvas=null,this.transparentCanvasEntry=null)},Zj=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}},eN=function(e,t,s){const i=new Path2D;return i.addPath(e,new DOMMatrix(s).invertSelf().multiplySelf(t)),i};let xh=g5;for(const r in $a)xh.prototype[r]!==void 0&&(xh.prototype[$a[r]]=xh.prototype[r]);var Lg,Dg;class Kv{constructor(e,t,s){C(this,Lg,null);C(this,Dg,null);Y(this,"_fullReader",null);Y(this,"_rangeReaders",new Set);Y(this,"_source",null);this._source=e,k(this,Lg,t),k(this,Dg,s)}get _progressiveDataLength(){var e;return((e=this._fullReader)==null?void 0:e._loaded)??0}getFullReader(){return Ft(!this._fullReader,"BasePDFStream.getFullReader can only be called once."),this._fullReader=new(u(this,Lg))(this)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const s=new(u(this,Dg))(this,e,t);return this._rangeReaders.add(s),s}cancelAllRequests(e){var t;(t=this._fullReader)==null||t.cancel(e);for(const s of new Set(this._rangeReaders))s.cancel(e)}}Lg=new WeakMap,Dg=new WeakMap;class Xv{constructor(e){Y(this,"onProgress",null);Y(this,"_contentLength",0);Y(this,"_filename",null);Y(this,"_headersCapability",Promise.withResolvers());Y(this,"_isRangeSupported",!1);Y(this,"_isStreamingSupported",!1);Y(this,"_loaded",0);Y(this,"_stream",null);this._stream=e}_callOnProgress(){var e;(e=this.onProgress)==null||e.call(this,{loaded:this._loaded,total:this._contentLength})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){it("Abstract method `read` called")}cancel(e){it("Abstract method `cancel` called")}}class Yv{constructor(e,t,s){Y(this,"_stream",null);this._stream=e}async read(){it("Abstract method `read` called")}cancel(e){it("Abstract method `cancel` called")}}function IV(r){let e=!0,t=s("filename\\*","i").exec(r);if(t){t=t[1];let m=c(t);return m=unescape(m),m=h(m),m=f(m),a(m)}if(t=o(r),t){const m=f(t);return a(m)}if(t=s("filename","i").exec(r),t){t=t[1];let m=c(t);return m=f(m),a(m)}function s(m,g){return new RegExp("(?:^|;)\\s*"+m+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',g)}function i(m,g){if(m){if(!/^[\x00-\xFF]+$/.test(g))return g;try{const x=new TextDecoder(m,{fatal:!0}),y=Wv(g);g=x.decode(y),e=!1}catch{}}return g}function a(m){return e&&/[\x80-\xff]/.test(m)&&(m=i("utf-8",m),e&&(m=i("iso-8859-1",m))),m}function o(m){const g=[];let x;const y=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(x=y.exec(m))!==null;){let[,j,N,S]=x;if(j=parseInt(j,10),j in g){if(j===0)break;continue}g[j]=[N,S]}const v=[];for(let j=0;j<g.length&&j in g;++j){let[N,S]=g[j];S=c(S),N&&(S=unescape(S),j===0&&(S=h(S))),v.push(S)}return v.join("")}function c(m){if(m.startsWith('"')){const g=m.slice(1).split('\\"');for(let x=0;x<g.length;++x){const y=g[x].indexOf('"');y!==-1&&(g[x]=g[x].slice(0,y),g.length=x+1),g[x]=g[x].replaceAll(/\\(.)/g,"$1")}m=g.join('"')}return m}function h(m){const g=m.indexOf("'");if(g===-1)return m;const x=m.slice(0,g),v=m.slice(g+1).replace(/^[^']*'/,"");return i(x,v)}function f(m){return!m.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(m)?m:m.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(g,x,y,v){if(y==="q"||y==="Q")return v=v.replaceAll("_"," "),v=v.replaceAll(/=([0-9a-fA-F]{2})/g,function(j,N){return String.fromCharCode(parseInt(N,16))}),i(x,v);try{v=atob(v)}catch{}return i(x,v)})}return""}function iR(r,e){const t=new Headers;if(!r||!e||typeof e!="object")return t;for(const s in e){const i=e[s];i!==void 0&&t.append(s,i)}return t}function Jv(r){var e;return((e=URL.parse(r))==null?void 0:e.origin)??null}function aR({responseHeaders:r,isHttp:e,rangeChunkSize:t,disableRange:s}){const i={contentLength:0,isRangeSupported:!1},a=parseInt(r.get("Content-Length"),10);return!Number.isInteger(a)||(i.contentLength=a,a<=2*t)||s||!e||r.get("Accept-Ranges")!=="bytes"||(r.get("Content-Encoding")||"identity")==="identity"&&(i.isRangeSupported=!0),i}function oR(r){const e=r.get("Content-Disposition");if(e){let t=IV(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if(n5(t))return t}return null}
424function Qv(r,e){return new Hb(`Unexpected server response (${r}) while retrieving PDF "${e.href}".`,r,r===404||r===0&&e.protocol==="file:")}function lR(r,e){if(r!==e)throw new Error(`Expected range response-origin "${r}" to match "${e}".`)}function cR(r,e,t,s){return fetch(r,{method:"GET",headers:e,signal:s.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"})}function dR(r,e){if(r!==200&&r!==206)throw Qv(r,e)}function Zv(r){if(r instanceof Uint8Array)return r.buffer;if(r instanceof ArrayBuffer)return r;throw new Error(`getArrayBuffer - unexpected data: ${r}`)}class LV extends Kv{constructor(t){super(t,DV,OV);Y(this,"_responseOrigin",null);const{httpHeaders:s,url:i}=t;Ft(/https?:/.test(i.protocol),"PDFFetchStream only supports http(s):// URLs."),this.headers=iR(!0,s)}}class DV extends Xv{constructor(t){super(t);Y(this,"_abortController",new AbortController);Y(this,"_reader",null);const{disableRange:s,disableStream:i,rangeChunkSize:a,url:o,withCredentials:c}=t._source;this._isStreamingSupported=!i;const h=new Headers(t.headers);cR(o,h,c,this._abortController).then(f=>{t._responseOrigin=Jv(f.url),dR(f.status,o),this._reader=f.body.getReader();const m=f.headers,{contentLength:g,isRangeSupported:x}=aR({responseHeaders:m,isHttp:!0,rangeChunkSize:a,disableRange:s});this._contentLength=g,this._isRangeSupported=x,this._filename=oR(m),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new ac("Streaming is disabled.")),this._headersCapability.resolve()}).catch(this._headersCapability.reject)}async read(){await this._headersCapability.promise;const{value:t,done:s}=await this._reader.read();return s?{value:t,done:s}:(this._loaded+=t.byteLength,this._callOnProgress(),{value:Zv(t),done:!1})}cancel(t){var s;(s=this._reader)==null||s.cancel(t),this._abortController.abort()}}class OV extends Yv{constructor(t,s,i){super(t,s,i);Y(this,"_abortController",new AbortController);Y(this,"_readCapability",Promise.withResolvers());Y(this,"_reader",null);const{url:a,withCredentials:o}=t._source,c=new Headers(t.headers);c.append("Range",`bytes=${s}-${i-1}`),cR(a,c,o,this._abortController).then(h=>{const f=Jv(h.url);lR(f,t._responseOrigin),dR(h.status,a),this._reader=h.body.getReader(),this._readCapability.resolve()}).catch(this._readCapability.reject)}async read(){await this._readCapability.promise;const{value:t,done:s}=await this._reader.read();return s?{value:t,done:s}:{value:Zv(t),done:!1}}cancel(t){var s;(s=this._reader)==null||s.cancel(t),this._abortController.abort()}}function WC(r){return r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer}function ew(){for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0}var yv,uR;class FV extends Kv{constructor(t){super(t,BV,$V);C(this,yv);Y(this,"_progressiveDone",!1);Y(this,"_queuedChunks",[]);const{pdfDataRangeTransport:s}=t,{initialData:i,progressiveDone:a}=s;if((i==null?void 0:i.length)>0){const c=WC(i);this._queuedChunks.push(c)}this._progressiveDone=a;const o=c=>{var h;switch(c.type){case"range":case"progressiveRead":P(this,yv,uR).call(this,c.begin,c.chunk);break;case"progressiveDone":(h=this._fullReader)==null||h.progressiveDone(),this._progressiveDone=!0;break}};s.transportReady(o)}getFullReader(){const t=super.getFullReader();return this._queuedChunks=null,t}getRangeReader(t,s){const i=super.getRangeReader(t,s);return i&&(i.onDone=()=>this._rangeReaders.delete(i),this._source.pdfDataRangeTransport.requestDataRange(t,s)),i}cancelAllRequests(t){super.cancelAllRequests(t),this._source.pdfDataRangeTransport.abort()}}yv=new WeakSet,uR=function(t,s){const i=WC(s);if(t===void 0)this._fullReader?this._fullReader._enqueue(i):this._queuedChunks.push(i);else{const a=this._rangeReaders.keys().find(o=>o._begin===t);Ft(a,"#onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."),a._enqueue(i)}};var Og;class BV extends Xv{constructor(t){super(t);C(this,Og,ew.bind(this));Y(this,"_done",!1);Y(this,"_queuedChunks",null);Y(this,"_requests",[]);const{pdfDataRangeTransport:s,disableRange:i,disableStream:a}=t._source,{length:o,contentDispositionFilename:c}=s;this._queuedChunks=t._queuedChunks||[];for(const f of this._queuedChunks)this._loaded+=f.byteLength;this._done=t._progressiveDone,this._contentLength=o,this._isStreamingSupported=!a,this._isRangeSupported=!i,n5(c)&&(this._filename=c),this._headersCapability.resolve();const h=this._loaded;Promise.resolve().then(()=>{h>0&&this._loaded===h&&this._callOnProgress()})}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength,this._callOnProgress())}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,u(this,Og).call(this)}progressiveDone(){this._done||(this._done=!0),this._queuedChunks.length===0&&u(this,Og).call(this)}}Og=new WeakMap;var Fg;class $V extends Yv{constructor(t,s,i){super(t,s,i);C(this,Fg,ew.bind(this));Y(this,"onDone",null);Y(this,"_begin",-1);Y(this,"_done",!1);Y(this,"_queuedChunk",null);Y(this,"_requests",[]);this._begin=s}_enqueue(t){var s;this._done||(this._requests.length===0?this._queuedChunk=t:(this._requests.shift().resolve({value:t,done:!1}),u(this,Fg).call(this)),this._done=!0,(s=this.onDone)==null||s.call(this))}async read(){if(this._queuedChunk){const s=this._queuedChunk;return this._queuedChunk=null,{value:s,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){var s;this._done=!0,u(this,Fg).call(this),(s=this.onDone)==null||s.call(this)}}Fg=new WeakMap;const I2=200,GC=206;function UV(r){return typeof r!="string"?r:Wv(r).buffer}var sa,Xf,hR,fR;
424class HV extends Kv{constructor(t){super(t,zV,VV);C(this,Xf);C(this,sa,new WeakMap);Y(this,"_responseOrigin",null);const{httpHeaders:s,url:i}=t;this.url=i,this.isHttp=/https?:/.test(i.protocol),this.headers=iR(this.isHttp,s)}_request(t){const s=new XMLHttpRequest,i={validateStatus:null,onHeadersReceived:t.onHeadersReceived,onDone:t.onDone,onError:t.onError,onProgress:t.onProgress};u(this,sa).set(s,i),s.open("GET",this.url),s.withCredentials=this._source.withCredentials;for(const[a,o]of this.headers)s.setRequestHeader(a,o);return this.isHttp&&"begin"in t&&"end"in t?(s.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),i.validateStatus=a=>a===GC||a===I2):i.validateStatus=a=>a===I2,s.responseType="arraybuffer",Ft(t.onError,"Expected `onError` callback to be provided."),s.onerror=()=>t.onError(s.status),s.onreadystatechange=P(this,Xf,fR).bind(this,s),s.onprogress=P(this,Xf,hR).bind(this,s),s.send(null),s}_abortRequest(t){u(this,sa).has(t)&&(u(this,sa).delete(t),t.abort())}getRangeReader(t,s){const i=super.getRangeReader(t,s);return i&&(i.onClosed=()=>this._rangeReaders.delete(i)),i}}sa=new WeakMap,Xf=new WeakSet,hR=function(t,s){var a;const i=u(this,sa).get(t);(a=i==null?void 0:i.onProgress)==null||a.call(i,s)},fR=function(t,s){const i=u(this,sa).get(t);if(!i||(t.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),t.readyState!==4)||!u(this,sa).has(t))return;if(u(this,sa).delete(t),t.status===0&&this.isHttp){i.onError(t.status);return}const a=t.status||I2;if(!i.validateStatus(a)){i.onError(t.status);return}const o=UV(t.response);if(a===GC){const c=t.getResponseHeader("Content-Range");/bytes (\d+)-(\d+)\/(\d+)/.test(c)?i.onDone(o):(He('Missing or invalid "Content-Range" header.'),i.onError(0))}else o?i.onDone(o):i.onError(t.status)};var Bg,va,mR,pR,gR,xR;class zV extends Xv{constructor(t){super(t);C(this,va);C(this,Bg,ew.bind(this));Y(this,"_cachedChunks",[]);Y(this,"_done",!1);Y(this,"_requests",[]);Y(this,"_storedError",null);this._fullRequestXhr=t._request({onHeadersReceived:P(this,va,mR).bind(this),onDone:P(this,va,pR).bind(this),onError:P(this,va,gR).bind(this),onProgress:P(this,va,xR).bind(this)})}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t),u(this,Bg).call(this),this._stream._abortRequest(this._fullRequestXhr),this._fullRequestXhr=null}}Bg=new WeakMap,va=new WeakSet,mR=function(){const t=this._stream,{disableRange:s,rangeChunkSize:i}=t._source,a=this._fullRequestXhr;t._responseOrigin=Jv(a.responseURL);const o=a.getAllResponseHeaders(),c=new Headers(o?o.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(m=>{const[g,...x]=m.split(": ");return[g,x.join(": ")]}):[]),{contentLength:h,isRangeSupported:f}=aR({responseHeaders:c,isHttp:t.isHttp,rangeChunkSize:i,disableRange:s});this._contentLength=h,this._isRangeSupported=f,this._filename=oR(c),this._isRangeSupported&&t._abortRequest(a),this._headersCapability.resolve()},pR=function(t){this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._cachedChunks.push(t),this._done=!0,this._cachedChunks.length===0&&u(this,Bg).call(this)},gR=function(t){this._storedError=Qv(t,this._stream.url),this._headersCapability.reject(this._storedError);for(const s of this._requests)s.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0},xR=function(t){var s;(s=this.onProgress)==null||s.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})};var $g,Ro,yR,bR,tN;class VV extends Yv{constructor(t,s,i){super(t,s,i);C(this,Ro);C(this,$g,ew.bind(this));Y(this,"onClosed",null);Y(this,"_done",!1);Y(this,"_queuedChunk",null);Y(this,"_requests",[]);Y(this,"_storedError",null);this._requestXhr=t._request({begin:s,end:i,onHeadersReceived:P(this,Ro,yR).bind(this),onDone:P(this,Ro,bR).bind(this),onError:P(this,Ro,tN).bind(this),onProgress:null})}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const s=this._queuedChunk;return this._queuedChunk=null,{value:s,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){var s;
424this._done=!0,u(this,$g).call(this),this._stream._abortRequest(this._requestXhr),(s=this.onClosed)==null||s.call(this)}}$g=new WeakMap,Ro=new WeakSet,yR=function(){var s;const t=Jv((s=this._requestXhr)==null?void 0:s.responseURL);try{lR(t,this._stream._responseOrigin)}catch(i){this._storedError=i,P(this,Ro,tN).call(this,0)}},bR=function(t){var s;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,u(this,$g).call(this),(s=this.onClosed)==null||s.call(this)},tN=function(t){this._storedError??(this._storedError=Qv(t,this._stream.url));for(const s of this._requests)s.reject(this._storedError);this._requests.length=0,this._queuedChunk=null};function vR(r,e=null){const t=process.getBuiltinModule("fs"),{Readable:s}=process.getBuiltinModule("stream"),i=t.createReadStream(r,e);return s.toWeb(i)}class WV extends Kv{constructor(e){super(e,GV,qV);const{url:t}=e;Ft(t.protocol==="file:","PDFNodeStream only supports file:// URLs.")}}class GV extends Xv{constructor(t){super(t);Y(this,"_reader",null);const{disableRange:s,disableStream:i,rangeChunkSize:a,url:o}=t._source;this._isStreamingSupported=!i,process.getBuiltinModule("fs/promises").lstat(o).then(h=>{const f=vR(o);this._reader=f.getReader();const{size:m}=h;this._contentLength=m,this._isRangeSupported=!s&&m>2*a,!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new ac("Streaming is disabled.")),this._headersCapability.resolve()}).catch(h=>{h.code==="ENOENT"&&(h=Qv(0,o)),this._headersCapability.reject(h)})}async read(){await this._headersCapability.promise;const{value:t,done:s}=await this._reader.read();return s?{value:t,done:s}:(this._loaded+=t.byteLength,this._callOnProgress(),{value:Zv(t),done:!1})}cancel(t){var s;(s=this._reader)==null||s.cancel(t)}}class qV extends Yv{constructor(t,s,i){super(t,s,i);Y(this,"_readCapability",Promise.withResolvers());Y(this,"_reader",null);const{url:a}=t._source;try{const o=vR(a,{start:s,end:i-1});this._reader=o.getReader(),this._readCapability.resolve()}catch(o){this._readCapability.reject(o)}}async read(){await this._readCapability.promise;const{value:t,done:s}=await this._reader.read();return s?{value:t,done:s}:{value:Zv(t),done:!1}}cancel(t){var s;(s=this._reader)==null||s.cancel(t)}}function KV(r){return Pp(r)?LV:mr?WV:HV}var Ug,Hg;class ga{static get workerPort(){return u(this,Ug)}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");k(this,Ug,e)}static get workerSrc(){return u(this,Hg)}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");k(this,Hg,e)}}Ug=new WeakMap,Hg=new WeakMap,C(ga,Ug,null),C(ga,Hg,"");var Qh,zg;class XV{constructor({parsedData:e,rawData:t}){C(this,Qh);C(this,zg);k(this,Qh,e),k(this,zg,t)}getRaw(){return u(this,zg)}get(e){return u(this,Qh).get(e)??null}[Symbol.iterator](){return u(this,Qh).entries()}}Qh=new WeakMap,zg=new WeakMap;const sh=Symbol("INTERNAL");var Vg,Wg,Gg,Zh;class YV{constructor(e,{name:t,intent:s,usage:i,rbGroups:a}){C(this,Vg,!1);C(this,Wg,!1);C(this,Gg,!1);C(this,Zh,!0);k(this,Vg,!!(e&fr.DISPLAY)),k(this,Wg,!!(e&fr.PRINT)),this.name=t,this.intent=s,this.usage=i,this.rbGroups=a}get visible(){if(u(this,Gg))return u(this,Zh);if(!u(this,Zh))return!1;const{print:e,view:t}=this.usage;return u(this,Vg)?(t==null?void 0:t.viewState)!=="OFF":u(this,Wg)?(e==null?void 0:e.printState)!=="OFF":!0}_setVisible(e,t,s=!1){e!==sh&&it("Internal method `_setVisible` called."),k(this,Gg,s),k(this,Zh,t)}}Vg=new WeakMap,Wg=new WeakMap,Gg=new WeakMap,Zh=new WeakMap;var Ml,pt,ef,tf,qg,sN;class JV{constructor(e,t=fr.DISPLAY){C(this,qg);C(this,Ml,null);C(this,pt,new Map);C(this,ef,null);C(this,tf,null);if(this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,k(this,tf,e.order);for(const s of e.groups)u(this,pt).set(s.id,new YV(t,s));if(e.baseState==="OFF")for(const s of u(this,pt).values())s._setVisible(sh,!1);for(const s of e.on)u(this,pt).get(s)._setVisible(sh,!0);for(const s of e.off)u(this,pt).get(s)._setVisible(sh,!1);k(this,ef,this.getHash())}}isVisible(e){if(u(this,pt).size===0)return!0;
424if(!e)return Vv("Optional content group not defined."),!0;if(e.type==="OCG")return u(this,pt).has(e.id)?u(this,pt).get(e.id).visible:(He(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return P(this,qg,sN).call(this,e.expression);if(!e.policy||e.policy==="AnyOn"){for(const t of e.ids){if(!u(this,pt).has(t))return He(`Optional content group not found: ${t}`),!0;if(u(this,pt).get(t).visible)return!0}return!1}else if(e.policy==="AllOn"){for(const t of e.ids){if(!u(this,pt).has(t))return He(`Optional content group not found: ${t}`),!0;if(!u(this,pt).get(t).visible)return!1}return!0}else if(e.policy==="AnyOff"){for(const t of e.ids){if(!u(this,pt).has(t))return He(`Optional content group not found: ${t}`),!0;if(!u(this,pt).get(t).visible)return!0}return!1}else if(e.policy==="AllOff"){for(const t of e.ids){if(!u(this,pt).has(t))return He(`Optional content group not found: ${t}`),!0;if(u(this,pt).get(t).visible)return!1}return!0}return He(`Unknown optional content policy ${e.policy}.`),!0}return He(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0,s=!0){var a;const i=u(this,pt).get(e);if(!i){He(`Optional content group not found: ${e}`);return}if(s&&t&&i.rbGroups.length)for(const o of i.rbGroups)for(const c of o)c!==e&&((a=u(this,pt).get(c))==null||a._setVisible(sh,!1,!0));i._setVisible(sh,!!t,!0),k(this,Ml,null)}setOCGState({state:e,preserveRB:t}){let s;for(const i of e){switch(i){case"ON":case"OFF":case"Toggle":s=i;continue}const a=u(this,pt).get(i);if(a)switch(s){case"ON":this.setVisibility(i,!0,t);break;case"OFF":this.setVisibility(i,!1,t);break;case"Toggle":this.setVisibility(i,!a.visible,t);break}}k(this,Ml,null)}get hasInitialVisibility(){return u(this,ef)===null||this.getHash()===u(this,ef)}getOrder(){return u(this,pt).size?u(this,tf)?u(this,tf).slice():[...u(this,pt).keys()]:null}getGroup(e){return u(this,pt).get(e)||null}getHash(){if(u(this,Ml)!==null)return u(this,Ml);const e=new Vj;for(const[t,s]of u(this,pt))e.update(`${t}:${s.visible}`);return k(this,Ml,e.hexdigest())}[Symbol.iterator](){return u(this,pt).entries()}}Ml=new WeakMap,pt=new WeakMap,ef=new WeakMap,tf=new WeakMap,qg=new WeakSet,sN=function(e){const t=e.length;if(t<2)return!0;const s=e[0];for(let i=1;i<t;i++){const a=e[i];let o;if(Array.isArray(a))o=P(this,qg,sN).call(this,a);else if(u(this,pt).has(a))o=u(this,pt).get(a).visible;else return He(`Optional content group not found: ${a}`),!0;switch(s){case"And":if(!o)return!1;break;case"Or":if(o)return!0;break;case"Not":return!o;default:return!0}}return s==="And"};var Zt,xi,Bs,wd,na,rn,fp,mp,nb;class QV{constructor(){C(this,rn);C(this,Zt,null);C(this,xi,null);C(this,Bs,0);C(this,wd,null);C(this,na,null)}get pagesNumber(){return u(this,Bs)}set pagesNumber(e){u(this,Bs)!==e&&(k(this,Bs,e),k(this,Zt,null),k(this,xi,null))}movePages(e,t,s){P(this,rn,fp).call(this);const i=u(this,Zt),a=P(this,rn,mp).call(this),o=t.length,c=new Uint32Array(o);let h=0;for(let x=0;x<o;x++){const y=t[x]-1;c[x]=i[y],y<s&&h++}const f=u(this,Bs),m=f-o,g=Pt(s-h,0,m);for(let x=0,y=0;x<f;x++)e.has(x+1)||(i[y++]=i[x]);i.copyWithin(g+o,g,m),i.set(c,g),P(this,rn,nb).call(this,a),i.every((x,y)=>x===y+1)&&k(this,Zt,null)}deletePages(e){P(this,rn,fp).call(this);const t=u(this,Zt),s=P(this,rn,mp).call(this);k(this,na,{pageNumberToId:t.slice(),pagesNumber:u(this,Bs),prevPageNumbers:u(this,xi).slice()});const i=u(this,Bs)-e.length;k(this,Bs,i);const a=k(this,Zt,new Uint32Array(i));k(this,xi,new Int32Array(i));let o=0,c=0;for(const h of e){const f=h-1;f!==o&&(a.set(t.subarray(o,f),c),c+=f-o),o=f+1}o<t.length&&a.set(t.subarray(o),c),P(this,rn,nb).call(this,s,new Set(e))}cancelDelete(){u(this,na)&&(k(this,Zt,u(this,na).pageNumberToId),k(this,Bs,u(this,na).pagesNumber),k(this,xi,u(this,na).prevPageNumbers),k(this,na,null))}cleanSavedData(){k(this,na,null)}copyPages(e){P(this,rn,fp).call(this),k(this,wd,{pageNumbers:e,pageIds:e.map(t=>u(this,Zt)[t-1])})}cancelCopy(){k(this,wd,null)}pastePages(e){P(this,rn,fp).call(this);const t=u(this,Zt),s=P(this,rn,mp).call(this),{pageNumbers:i,pageIds:a}=u(this,wd),o=u(this,Bs)+i.length;k(this,Bs,o);const c=k(this,Zt,new Uint32Array(o));k(this,xi,new Int32Array(o)),c.set(t.subarray(0,e),0),c.set(a,e),c.set(t.subarray(e),e+i.length),P(this,rn,nb).call(this,s,null,e,i),k(this,wd,null)}hasBeenAltered(){return u(this,Zt)!==null}getPageMappingForSaving(e=null){e??(e=P(this,rn,mp).call(this));let t=0;for(const i of e.values())t=Math.max(t,i.length);const s=new Array(t);for(let i=0;i<t;i++)s[i]={document:null,pageIndices:[],includePages:[]};for(const[i,a]of e)for(let o=0,c=a.length;o<c;o++)s[o].includePages.push([i-1,a[o]-1]);for(const{includePages:i,pageIndices:a}of s){i.sort((o,c)=>o[0]-c[0]);for(let o=0,c=i.length;o<c;o++)a.push(i[o][1]),i[o]=i[o][0]}return s}extractPages(e){e=Array.from(e).sort((s,i)=>s-i);const t=new Map;for(let s=0,i=e.length;s<i;s++){const a=this.getPageId(e[s]);t.getOrInsertComputed(a,Zk).push(s+1)}return this.getPageMappingForSaving(t)}getPrevPageNumber(e){var t;return((t=u(this,xi))==null?void 0:t[e-1])??0}getPageNumber(e){if(!u(this,Zt))return e;const t=u(this,Zt);for(let s=0,i=u(this,Bs);s<i;s++)if(t[s]===e)return s+1;return 0}getPageId(e){var t;return((t=u(this,Zt))==null?void 0:t[e-1])??e}getMapping(){var e;return(e=u(this,Zt))==null?void 0:e.subarray(0,this.pagesNumber)}}Zt=new WeakMap,xi=new WeakMap,Bs=new WeakMap,wd=new WeakMap,na=new WeakMap,rn=new WeakSet,fp=function(){if(u(this,Zt))return;const e=u(this,Bs),t=k(this,Zt,new Uint32Array(e));for(let s=0;s<e;s++)t[s]=s+1;k(this,xi,new Int32Array(t))},mp=function(){const e=new Map,t=u(this,Zt);for(let s=0,i=u(this,Bs);s<i;s++){const a=t[s],o=e.get(a);o?o.push(s+1):e.set(a,[s+1])}return e},nb=function(e,t=null,s=-1,i=null){const a=u(this,xi),o=u(this,Zt),c=s+((i==null?void 0:i.length)??0),h=new Map;for(let f=0,m=u(this,Bs);f<m;f++){if(f>=s&&f<c){a[f]=-i[f-s];continue}const g=o[f],x=e.get(g);let y=h.get(g)||0;if(t&&x)for(;y<x.length&&t.has(x[y]);)y++;a[f]=x==null?void 0:x[y],h.set(g,y+1)}};const nh=Symbol("INITIAL_DATA"),qC=()=>({...Promise.withResolvers(),data:nh});var Hr;class wR{constructor(){C(this,Hr,new Map)}get(e,t=null){if(t){const i=u(this,Hr).getOrInsertComputed(e,qC);return i.promise.then(()=>t(i.data)),null}const s=u(this,Hr).get(e);if(!s||s.data===nh)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return s.data}has(e){const t=u(this,Hr).get(e);return!!t&&t.data!==nh}delete(e){const t=u(this,Hr).get(e);return!t||t.data===nh?!1:(u(this,Hr).delete(e),!0)}resolve(e,t=null){const s=u(this,Hr).getOrInsertComputed(e,qC);if(s.data!==nh)throw new Error(`Object already resolved ${e}.`);s.data=t,s.resolve()}clear(){var e;
424for(const{data:t}of u(this,Hr).values())(e=t==null?void 0:t.bitmap)==null||e.close();u(this,Hr).clear()}*[Symbol.iterator](){for(const[e,{data:t}]of u(this,Hr))t!==nh&&(yield[e,t])}}Hr=new WeakMap;const ZV=1e5,KC=30;var F3,Il,hn,Kg,Xg,sf,jd,ro,Yg,Jg,Nd,Qg,nf,Ll,rf,Zg,af,kd,e0,t0,of,Sd,s0,lf,cf,Mo,jR,NR,nN,vr,rb,rN,kR,SR;const Ls=class Ls{constructor({textContentSource:e,images:t,container:s,viewport:i}){C(this,Mo);C(this,Il,Promise.withResolvers());C(this,hn,null);C(this,Kg,!1);C(this,Xg,!!((F3=globalThis.FontInspector)!=null&&F3.enabled));C(this,sf,null);C(this,jd,null);C(this,ro,null);C(this,Yg,0);C(this,Jg,0);C(this,Nd,null);C(this,Qg,null);C(this,nf,0);C(this,Ll,0);C(this,rf,Object.create(null));C(this,Zg,[]);C(this,af,null);C(this,kd,[]);C(this,e0,new WeakMap);C(this,t0,null);var f;if(e instanceof ReadableStream)k(this,af,e);else if(typeof e=="object")k(this,af,new ReadableStream({start(m){m.enqueue(e),m.close()}}));else throw new Error('No "textContentSource" parameter specified.');k(this,hn,k(this,Qg,s)),k(this,sf,t),k(this,Ll,i.scale*ba.pixelRatio),k(this,nf,i.rotation),k(this,ro,{div:null,properties:null,ctx:null});const{pageWidth:a,pageHeight:o,pageX:c,pageY:h}=i.rawDims;k(this,t0,[1,0,0,-1,-c,h+o]),k(this,Jg,a),k(this,Yg,o),P(f=Ls,vr,kR).call(f),s.style.setProperty("--min-font-size",u(Ls,lf)),uu(s,i),u(this,Il).promise.finally(()=>{u(Ls,cf).delete(this),k(this,ro,null),k(this,rf,null)}
424).catch(()=>{})}static get fontFamilyMap(){const{isWindows:e,isFirefox:t}=ls.platform;return $e(this,"fontFamilyMap",new Map([["sans-serif",`${e&&t?"Calibri, ":""}sans-serif`],["monospace",`${e&&t?"Lucida Console, ":""}monospace`]]))}render(){u(this,sf)&&u(this,hn).append(u(this,sf).render());const e=()=>{u(this,Nd).read().then(({value:t,done:s})=>{if(s){u(this,Il).resolve();return}u(this,jd)??k(this,jd,t.lang),Object.assign(u(this,rf),t.styles),P(this,Mo,jR).call(this,t.items),e()},u(this,Il).reject)};return k(this,Nd,u(this,af).getReader()),u(Ls,cf).add(this),e(),u(this,Il).promise}update({viewport:e,onBefore:t=null}){var a;const s=e.scale*ba.pixelRatio,i=e.rotation;if(i!==u(this,nf)&&(t==null||t(),k(this,nf,i),uu(u(this,Qg),{rotation:i})),s!==u(this,Ll)){t==null||t(),k(this,Ll,s);const o={div:null,properties:null,ctx:P(a=Ls,vr,rb).call(a,u(this,jd))};for(const c of u(this,kd))o.properties=u(this,e0).get(c),o.div=c,P(this,Mo,nN).call(this,o)}}cancel(){var t;const e=new ac("TextLayer task cancelled.");(t=u(this,Nd))==null||t.cancel(e).catch(()=>{}),k(this,Nd,null),u(this,Il).reject(e)}get textDivs(){return u(this,kd)}get textContentItemsStr(){return u(this,Zg)}static cleanup(){if(!(u(this,cf).size>0)){u(this,of).clear();for(const{canvas:e}of u(this,Sd).values())e.remove();u(this,Sd).clear()}}};Il=new WeakMap,hn=new WeakMap,Kg=new WeakMap,Xg=new WeakMap,sf=new WeakMap,jd=new WeakMap,ro=new WeakMap,Yg=new WeakMap,Jg=new WeakMap,Nd=new WeakMap,Qg=new WeakMap,nf=new WeakMap,Ll=new WeakMap,rf=new WeakMap,Zg=new WeakMap,af=new WeakMap,kd=new WeakMap,e0=new WeakMap,t0=new WeakMap,of=new WeakMap,Sd=new WeakMap,s0=new WeakMap,lf=new WeakMap,cf=new WeakMap,Mo=new WeakSet,jR=function(e){var i,a;if(u(this,Kg))return;(a=u(this,ro)).ctx??(a.ctx=P(i=Ls,vr,rb).call(i,u(this,jd)));const t=u(this,kd),s=u(this,Zg);for(const o of e){if(t.length>ZV){He("Ignoring additional textDivs for performance reasons."),k(this,Kg,!0);return}if(o.str===void 0){if(o.type==="beginMarkedContentProps"||o.type==="beginMarkedContent"){const c=u(this,hn);k(this,hn,document.createElement("span")),u(this,hn).classList.add("markedContent"),o.id&&u(this,hn).setAttribute("id",`${o.id}`),o.tag==="Artifact"&&(u(this,hn).ariaHidden=!0),c.append(u(this,hn))}else o.type==="endMarkedContent"&&k(this,hn,u(this,hn).parentNode);continue}s.push(o.str),P(this,Mo,NR).call(this,o)}},NR=function(e){var v;const t=document.createElement("span"),s={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};u(this,kd).push(t);const i=me.transform(u(this,t0),e.transform);let a=Math.atan2(i[1],i[0]);const o=u(this,rf)[e.fontName];o.vertical&&(a+=Math.PI/2);let c=u(this,Xg)&&o.fontSubstitution||o.fontFamily;c=Ls.fontFamilyMap.get(c)||c;const h=Math.hypot(i[2],i[3]),f=h*P(v=Ls,vr,SR).call(v,c,o,u(this,jd));let m,g;a===0?(m=i[4],g=i[5]-f):(m=i[4]+f*Math.sin(a),g=i[5]-f*Math.cos(a));const x=t.style;x.left=`${(100*m/u(this,Jg)).toFixed(2)}%`,x.top=`${(100*g/u(this,Yg)).toFixed(2)}%`,x.setProperty("--font-height",`${h.toFixed(2)}px`),x.fontFamily=c,s.fontSize=h,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,u(this,Xg)&&(t.dataset.fontName=o.fontSubstitutionLoadedName||e.fontName),a!==0&&(s.angle=a*(180/Math.PI));let y=!1;if(e.str.length>1)y=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){const j=Math.abs(e.transform[0]),N=Math.abs(e.transform[3]);j!==N&&Math.max(j,N)/Math.min(j,N)>1.5&&(y=!0)}if(y&&(s.canvasWidth=o.vertical?e.height:e.width),u(this,e0).set(t,s),u(this,ro).div=t,u(this,ro).properties=s,P(this,Mo,nN).call(this,u(this,ro)),s.hasText&&u(this,hn).append(t),s.hasEOL){const j=document.createElement("br");j.setAttribute("role","presentation"),u(this,hn).append(j)}},nN=function(e){var o;const{div:t,properties:s,ctx:i}=e,{style:a}=t;if(s.canvasWidth!==0&&s.hasText){const{fontFamily:c}=a,{canvasWidth:h,fontSize:f}=s;P(o=Ls,vr,rN).call(o,i,f*u(this,Ll),c);const{width:m}=i.measureText(t.textContent);m>0&&a.setProperty("--scale-x",h*u(this,Ll)/m)}s.angle!==0&&a.setProperty("--rotate",`${s.angle}deg`)},vr=new WeakSet,rb=function(e=null){let t=u(this,Sd).get(e||(e=""));if(!t){const s=document.createElement("canvas");s.className="hiddenCanvasElement",s.lang=e,document.body.append(s),t=s.getContext("2d",{alpha:!1,willReadFrequently:!0}),u(this,Sd).set(e,t),u(this,s0).set(t,{size:0,family:""})}return t},rN=function(e,t,s){const i=u(this,s0).get(e);t===i.size&&s===i.family||(e.font=`${t}px ${s}`,i.size=t,i.family=s)},kR=function(){if(u(this,lf)!==null)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),k(this,lf,e.getBoundingClientRect().height),e.remove()},SR=function(e,t,s){const i=u(this,of).get(e);if(i)return i;const a=P(this,vr,rb).call(this,s);a.canvas.width=a.canvas.height=KC,P(this,vr,rN).call(this,a,KC,e);const o=a.measureText(""),c=o.fontBoundingBoxAscent,h=Math.abs(o.fontBoundingBoxDescent);a.canvas.width=a.canvas.height=0;let f=.8;return c?f=c/(c+h):(ls.platform.isFirefox&&He("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),t.ascent?f=t.ascent:t.descent&&(f=1+t.descent)),u(this,of).set(e,f),f},C(Ls,vr),C(Ls,of,new Map),C(Ls,Sd,new Map),C(Ls,s0,new WeakMap),C(Ls,lf,null),C(Ls,cf,new Set);let Kp=Ls;const e9=100;function AR(r={}){typeof r=="string"||r instanceof URL?r={url:r}:(r instanceof ArrayBuffer||ArrayBuffer.isView(r))&&(r={data:r});const e=new iN,{docId:t}=e,s=r.url?aV(r.url):null,i=r.data?oV(r.data):null,a=r.httpHeaders||null,o=r.withCredentials===!0,c=r.password??null,h=r.range instanceof _R?r.range:null,f=Number.isInteger(r.rangeChunkSize)&&r.rangeChunkSize>0?r.rangeChunkSize:2**16;
424let m=r.worker instanceof Xp?r.worker:null;const g=r.verbosity,x=typeof r.docBaseUrl=="string"&&!Gv(r.docBaseUrl)?r.docBaseUrl:null,y=vy(r.cMapUrl),v=r.cMapPacked!==!1,j=vy(r.iccUrl),N=vy(r.standardFontDataUrl),S=vy(r.wasmUrl),A=r.stopAtErrors!==!0,E=Number.isInteger(r.maxImageSize)&&r.maxImageSize>-1?r.maxImageSize:-1,M=typeof r.isOffscreenCanvasSupported=="boolean"?r.isOffscreenCanvasSupported:!mr,R=typeof r.isImageDecoderSupported=="boolean"?r.isImageDecoderSupported:!mr&&(ls.platform.isFirefox||!globalThis.chrome),I=Number.isInteger(r.canvasMaxAreaInBytes)?r.canvasMaxAreaInBytes:-1,F=typeof r.disableFontFace=="boolean"?r.disableFontFace:mr,D=r.fontExtraProperties===!0,O=r.enableXfa===!0,$=r.ownerDocument||globalThis.document,z=r.disableRange===!0,re=r.disableStream===!0,he=r.disableAutoFetch===!0,de=r.pdfBug===!0,fe=r.CanvasFactory||(mr?pV:uV),oe=r.FilterFactory||(mr?mV:hV),le=r.BinaryDataFactory||(mr?gV:LC),se=r.enableHWA===!0,Q=r.enableWebGPU===!0?bV():Promise.resolve(!1),U=r.useWasm!==!1,Z=r.pagesMapper||new QV,ee=typeof r.useSystemFonts=="boolean"?r.useSystemFonts:!mr&&!F,W=typeof r.useWorkerFetch=="boolean"?r.useWorkerFetch:!!(le===LC&&y&&v&&N&&S&&Pp(y,document.baseURI)&&Pp(N,document.baseURI)&&Pp(S,document.baseURI)),G=null;Ez(g);const ne={canvasFactory:new fe({ownerDocument:$,enableHWA:se}),filterFactory:new oe({docId:t,ownerDocument:$}),binaryDataFactory:W?null:new le({cMapUrl:y,standardFontDataUrl:N,wasmUrl:S})};m||(m=Xp.create({verbosity:g,port:ga.workerPort}),e._worker=m);const ue={docId:t,apiVersion:"5.7.284",data:i,password:c,disableAutoFetch:he,rangeChunkSize:f,docBaseUrl:x,enableXfa:O,evaluatorOptions:{maxImageSize:E,disableFontFace:F,ignoreErrors:A,isOffscreenCanvasSupported:M,isImageDecoderSupported:R,canvasMaxAreaInBytes:I,fontExtraProperties:D,useSystemFonts:ee,useWasm:U,useWorkerFetch:W,cMapUrl:y,cMapPacked:v,iccUrl:j,standardFontDataUrl:N,wasmUrl:S,hasGPU:!1}},Se={ownerDocument:$,pdfBug:de,styleElement:G,enableHWA:se,loadingParams:{disableAutoFetch:he,enableXfa:O}};return Promise.all([m.promise,Q]).then(function([,Ye]){if(e.destroyed)throw new Error("Loading aborted");if(m.destroyed)throw new Error("Worker was destroyed");ue.evaluatorOptions.hasGPU=Ye;const ds=m.messageHandler.sendWithPromise("GetDocRequest",ue,i?[i.buffer]:null);let jr;if(!i)if(h)jr=new FV({pdfDataRangeTransport:h,disableRange:z,disableStream:re});else if(s){const Ii=KV(s);jr=new Ii({url:s,httpHeaders:a,withCredentials:o,rangeChunkSize:f,disableRange:z,disableStream:re})}else throw new Error("getDocument - expected either `data`, `range`, or `url` parameter.");return ds.then(Ii=>{if(e.destroyed)throw new Error("Loading aborted");if(m.destroyed)throw new Error("Worker was destroyed");const uc=new lp(t,Ii,m.port),im=new s9(uc,e,jr,Se,ne,Z);e._transport=im,uc.send("Ready",null)})}).catch(e._capability.reject),e}var bv;const vv=class vv{constructor(){Y(this,"_capability",Promise.withResolvers());Y(this,"_transport",null);Y(this,"_worker",null);Y(this,"docId",`d${ss(vv,bv)._++}`);Y(this,"destroyed",!1);Y(this,"onPassword",null);Y(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var e,t,s,i;this.destroyed=!0;try{(e=this._worker)!=null&&e.port&&(this._worker._pendingDestroy=!0),await((t=this._transport)==null?void 0:t.destroy())}catch(a){throw(s=this._worker)!=null&&s.port&&delete this._worker._pendingDestroy,a}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null}async getData(){return this._transport.getData()}};bv=new WeakMap,C(vv,bv,0);let iN=vv;var df,Ad;class _R{constructor(e,t,s=!1,i=null){C(this,df,Promise.withResolvers());C(this,Ad,null);this.length=e,this.initialData=t,this.progressiveDone=s,this.contentDispositionFilename=i,Object.defineProperty(this,"onDataProgress",{value:()=>{Bz("`PDFDataRangeTransport.prototype.onDataProgress` - method was removed, since loading progress is now reported automatically through the `PDFDataTransportStream` class (and related code).")}})}onDataRange(e,t){u(this,Ad).call(this,{type:"range",begin:e,chunk:t})}onDataProgressiveRead(e){u(this,df).promise.then(()=>{u(this,Ad).call(this,{type:"progressiveRead",chunk:e})})}onDataProgressiveDone(){u(this,df).promise.then(()=>{u(this,Ad).call(this,{type:"progressiveDone"})})}transportReady(e){k(this,Ad,e),u(this,df).resolve()}requestDataRange(e,t){it("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}df=new WeakMap,Ad=new WeakMap;class t9{constructor(e,t){this._pdfInfo=e,this._transport=t}get pagesMapper(){return this._transport.pagesMapper}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return $e(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}
424getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(e,t){return this._transport.getAnnotationsByType(e,t)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}extractPages(e){return this._transport.extractPages(e)}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getRawData(e){return this._transport.getRawData(e)}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var io,_d,Ed,pp;const x5=class x5{constructor(e,t,s,i,a=!1){C(this,Ed);C(this,io,!1);C(this,_d,null);this._pageIndex=e,this._pageInfo=t,this._transport=s,this._stats=a?new kC:null,this._pdfBug=a,this.commonObjs=s.commonObjs,this.objs=new wR,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null,k(this,_d,i),this.imageCoordinates=null}clone(e){const t=new x5(e,this._pageInfo,this._transport,u(this,_d),this._pdfBug);return t.clonedFromIndex=this.clonedFromIndex??this._pageIndex,this._transport.updatePage(t),t}get pageNumber(){return this._pageIndex+1}set pageNumber(e){this._pageIndex=e-1,this._transport.updatePage(this)}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:s=0,offsetY:i=0,dontFlip:a=!1}={}){return new X0({viewBox:this.view,userUnit:this.userUnit,scale:e,rotation:t,offsetX:s,offsetY:i,dontFlip:a})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return $e(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return((e=this._transport._htmlForXfa)==null?void 0:e.children[this._pageIndex])||null}render({canvasContext:e,canvas:t=e.canvas,viewport:s,intent:i="display",annotationMode:a=il.ENABLE,transform:o=null,background:c=null,optionalContentConfigPromise:h=null,annotationCanvasMap:f=null,pageColors:m=null,printAnnotationStorage:g=null,isEditing:x=!1,recordImages:y=!1,recordOperations:v=!1,operationsFilter:j=null}){var he,de,fe;(he=this._stats)==null||he.time("Overall");const N=this._transport.getRenderingIntent(i,a,g,x),{renderingIntent:S,cacheKey:A}=N;k(this,io,!1),h||(h=this._transport.getOptionalContentConfig(S));const E=this._intentStates.getOrInsertComputed(A,Sj);E.streamReaderCancelTimeout&&(clearTimeout(E.streamReaderCancelTimeout),E.streamReaderCancelTimeout=null);const M=!!(S&fr.PRINT);E.displayReadyCapability||(E.displayReadyCapability=Promise.withResolvers(),E.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(de=this._stats)==null||de.time("Page Request"),this._pumpOperatorList(N));const R=!!(this._pdfBug&&((fe=globalThis.StepperManager)!=null&&fe.enabled)),I=!!t&&!this.recordedBBoxes&&(v||R),F=!!t&&!this.imageCoordinates&&y,D=oe=>{var le,se,K,Q;if(E.renderTasks.delete(z),I){const U=(le=z.gfx)==null?void 0:le.dependencyTracker.take();U&&((se=z.stepper)==null||se.setOperatorBBoxes(U,z.gfx.dependencyTracker.takeDebugMetadata()),v&&(this.recordedBBoxes=U))}F&&!oe&&(this.imageCoordinates=(K=z.gfx)==null?void 0:K.imagesTracker.take()),M&&k(this,io,!0),P(this,Ed,pp).call(this),oe?(z.capability.reject(oe),this._abortOperatorList({intentState:E,reason:oe instanceof Error?oe:new Error(oe)})):z.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(Q=globalThis.Stats)!=null&&Q.enabled&&globalThis.Stats.add(this.pageNumber,this._stats)
424)};let O=null,$=null;(I||F)&&($=new Jz(t,E.operatorList.length)),I&&(O=new Qz($,R));const z=new oN({callback:D,params:{canvas:t,canvasContext:e,dependencyTracker:O??$,imagesTracker:F?new qj(t):null,viewport:s,transform:o,background:c},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:f,operatorList:E.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!M,pdfBug:this._pdfBug,pageColors:m,enableHWA:this._transport.enableHWA,operationsFilter:j});(E.renderTasks||(E.renderTasks=new Set)).add(z);const re=z.task;return Promise.all([E.displayReadyCapability.promise,h]).then(([oe,le])=>{var se;if(this.destroyed){D();return}if((se=this._stats)==null||se.time("Rendering"),!(le.renderingIntent&S))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");z.initializeGraphics({transparency:oe,optionalContentConfig:le}),z.operatorListChanged()}).catch(D),re}getOperatorList({intent:e="display",annotationMode:t=il.ENABLE,printAnnotationStorage:s=null,isEditing:i=!1}={}){var f;function a(){c.operatorList.lastChunk&&(c.opListReadCapability.resolve(c.operatorList),c.renderTasks.delete(h))}const o=this._transport.getRenderingIntent(e,t,s,i,!0),c=this._intentStates.getOrInsertComputed(o.cacheKey,Sj);let h;return c.opListReadCapability||(h=Object.create(null),h.operatorListChanged=a,c.opListReadCapability=Promise.withResolvers(),(c.renderTasks||(c.renderTasks=new Set)).add(h),c.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(f=this._stats)==null||f.time("Page Request"),this._pumpOperatorList(o)),c.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageId:u(this,_d).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size(i){return i.items.length}})}async getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(i=>Wp.textContent(i));const t=this.streamTextContent(e),s={items:[],styles:Object.create(null),lang:null};for await(const i of t)s.lang??(s.lang=i.lang),Object.assign(s.styles,i.styles),s.items.push(...i.items);return s}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const s of t.renderTasks)e.push(s.completed),s.cancel();return this.objs.clear(),k(this,io,!1),Promise.all(e)}cleanup(e=!1){k(this,io,!0);const t=P(this,Ed,pp).call(this);return e&&t&&this._stats&&(this._stats=new kC),t}_startRenderPage(e,t){var i,a;const s=this._intentStates.get(t);s&&((i=this._stats)==null||i.timeEnd("Page Request"),(a=s.displayReadyCapability)==null||a.resolve(e))}_renderPageChunk(e,t){for(let s=0,i=e.length;s<i;s++)t.operatorList.fnArray.push(e.fnArray[s]),t.operatorList.argsArray.push(e.argsArray[s]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const s of t.renderTasks)s.operatorListChanged();e.lastChunk&&P(this,Ed,pp).call(this)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:s,modifiedIds:i}){const{map:a,transfer:o}=s,h=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageId:u(this,_d).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:a,modifiedIds:i},void 0,o).getReader(),f=this._intentStates.get(t);f.streamReader=h;const m=()=>{h.read().then(({value:g,done:x})=>{if(x){f.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(g,f),m())},g=>{if(f.streamReader=null,!this._transport.destroyed){if(f.operatorList){f.operatorList.lastChunk=!0;for(const x of f.renderTasks)x.operatorListChanged();P(this,Ed,pp).call(this)}if(f.displayReadyCapability)f.displayReadyCapability.reject(g);else if(f.opListReadCapability)f.opListReadCapability.reject(g);else throw g}})};m()}_abortOperatorList({intentState:e,reason:t,force:s=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!s){if(e.renderTasks.size>0)return;if(t instanceof s5){let i=e9;t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},i);return}}if(e.streamReader.cancel(new ac(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[i,a]of this._intentStates)if(a===e){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}};io=new WeakMap,_d=new WeakMap,Ed=new WeakSet,pp=function(){if(!u(this,io)||this.destroyed)return!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),k(this,io,!1),!0};let aN=x5;var Dl,yi,ao,Cd,wv,Td,Pd,vn,ib,ER,CR,gp,uf,ab;const Ut=class Ut{constructor({name:e=null,port:t=null,verbosity:s=Cz()}={}){C(this,vn);C(this,Dl,Promise.withResolvers());C(this,yi,null);C(this,ao,null);C(this,Cd,null);if(this.name=e,this.destroyed=!1,this.verbosity=s,t){if(u(Ut,Pd).has(t))throw new Error("Cannot use more than one PDFWorker per port.");u(Ut,Pd).set(t,this),P(this,vn,ER).call(this,t)}else P(this,vn,CR).call(this)}get promise(){return u(this,Dl).promise}get port(){return u(this,ao)}get messageHandler(){return u(this,yi)}destroy(){var e,t;this.destroyed=!0,(e=u(this,Cd))==null||e.terminate(),k(this,Cd,null),u(Ut,Pd).delete(u(this,ao)),k(this,ao,null),(t=u(this,yi))==null||t.destroy(),k(this,yi,null)}static create(e){const t=u(this,Pd).get(e==null?void 0:e.port);
424if(t){if(t._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new Ut(e)}static get workerSrc(){if(ga.workerSrc)return ga.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return $e(this,"_setupFakeWorkerGlobal",(async()=>u(this,uf,ab)?u(this,uf,ab):(await import(this.workerSrc)).WorkerMessageHandler)())}};Dl=new WeakMap,yi=new WeakMap,ao=new WeakMap,Cd=new WeakMap,wv=new WeakMap,Td=new WeakMap,Pd=new WeakMap,vn=new WeakSet,ib=function(){u(this,Dl).resolve(),u(this,yi).send("configure",{verbosity:this.verbosity})},ER=function(e){k(this,ao,e),k(this,yi,new lp("main","worker",e)),u(this,yi).on("ready",()=>{}),P(this,vn,ib).call(this)},CR=function(){if(u(Ut,Td)||u(Ut,uf,ab)){P(this,vn,gp).call(this);return}let{workerSrc:e}=Ut;try{Ut._isSameOrigin(window.location,e)||(e=Ut._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),s=new lp("main","worker",t),i=()=>{a.abort(),s.destroy(),t.terminate(),this.destroyed?u(this,Dl).reject(new Error("Worker was destroyed")):P(this,vn,gp).call(this)},a=new AbortController;t.addEventListener("error",()=>{u(this,Cd)||i()},{signal:a.signal}),s.on("test",c=>{if(a.abort(),this.destroyed||!c){i();return}k(this,yi,s),k(this,ao,t),k(this,Cd,t),P(this,vn,ib).call(this)}),s.on("ready",c=>{if(a.abort(),this.destroyed){i();return}try{o()}catch{P(this,vn,gp).call(this)}});const o=()=>{const c=new Uint8Array;s.send("test",c,[c.buffer])};o();return}catch{Vv("The worker has been disabled.")}P(this,vn,gp).call(this)},gp=function(){u(Ut,Td)||(He("Setting up fake worker."),k(Ut,Td,!0)),Ut._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){u(this,Dl).reject(new Error("Worker was destroyed"));return}const t=new dV;k(this,ao,t);const s=`fake${ss(Ut,wv)._++}`,i=new lp(s+"_worker",s,t);e.setup(i,t),k(this,yi,new lp(s,s+"_worker",t)),P(this,vn,ib).call(this)}).catch(e=>{u(this,Dl).reject(new Error(`Setting up fake worker failed: "${e.message}".`))})},uf=new WeakSet,ab=function(){var e;try{return((e=globalThis.pdfjsWorker)==null?void 0:e.WorkerMessageHandler)||null}catch{return null}},C(Ut,uf),C(Ut,wv,0),C(Ut,Td,!1),C(Ut,Pd,new WeakMap),mr&&(k(Ut,Td,!0),ga.workerSrc||(ga.workerSrc="./pdf.worker.mjs")),Ut._isSameOrigin=(e,t)=>{const s=URL.parse(e);if(!(s!=null&&s.origin)||s.origin==="null")return!1;const i=new URL(t,s);return s.origin===i.origin},Ut._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let Xp=Ut;var Zn,Rd,oo,bi,Md,hf,lo,Ci,xp,ob;class s9{constructor(e,t,s,i,a,o){C(this,Ci);Y(this,"downloadInfoCapability",Promise.withResolvers());C(this,Zn,null);C(this,Rd,new Map);C(this,oo,null);C(this,bi,new Map);C(this,Md,new Map);C(this,hf,new Map);C(this,lo,null);this.messageHandler=e,this.loadingTask=t,k(this,oo,s),this.commonObjs=new wR,this.fontLoader=new Zz({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.enableHWA=i.enableHWA,this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=a.canvasFactory,this.filterFactory=a.filterFactory,this.binaryDataFactory=a.binaryDataFactory,this.pagesMapper=o,this.destroyed=!1,this.destroyCapability=null,this.setupMessageHandler()}updatePage(e){const{_pageIndex:t}=e;u(this,bi).set(t,e),u(this,Md).set(t,Promise.resolve(e))}get annotationStorage(){return $e(this,"annotationStorage",new i5)}getRenderingIntent(e,t=il.ENABLE,s=null,i=!1,a=!1){let o=fr.DISPLAY,c=Gp;switch(e){case"any":o=fr.ANY;break;case"display":break;case"print":o=fr.PRINT;break;default:He(`getRenderingIntent - invalid intent: ${e}`)}const h=o&fr.PRINT&&s instanceof KP?s:this.annotationStorage;switch(t){case il.DISABLE:o+=fr.ANNOTATIONS_DISABLE;break;case il.ENABLE:break;case il.ENABLE_FORMS:o+=fr.ANNOTATIONS_FORMS;break;case il.ENABLE_STORAGE:o+=fr.ANNOTATIONS_STORAGE,c=h.serializable;break;default:He(`getRenderingIntent - invalid annotationMode: ${t}`)}i&&(o+=fr.IS_EDITING),a&&(o+=fr.OPLIST);const{ids:f,hash:m}=h.modifiedIds,g=[o,c.hash,m];return{renderingIntent:o,cacheKey:g.join("_"),annotationStorageSerializable:c,modifiedIds:f}}destroy(){var s;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(s=u(this,lo))==null||s.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const i of u(this,bi).values())e.push(i._destroy());u(this,bi).clear(),u(this,Md).clear(),u(this,hf).clear(),Object.hasOwn(this,"annotationStorage")&&this.annotationStorage.resetModified();
424const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{var i,a;this.commonObjs.clear(),this.fontLoader.clear(),u(this,Rd).clear(),this.filterFactory.destroy(),Kp.cleanup(),(i=u(this,oo))==null||i.cancelAllRequests(new ac("Worker was terminated.")),(a=this.messageHandler)==null||a.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(s,i)=>{Ft(u(this,oo),"GetReader - no `BasePDFStream` instance available."),k(this,Zn,u(this,oo).getFullReader()),u(this,Zn).onProgress=a=>P(this,Ci,ob).call(this,a),i.onPull=()=>{u(this,Zn).read().then(function({value:a,done:o}){if(o){i.close();return}Ft(a instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{i.error(a)})},i.onCancel=a=>{u(this,Zn).cancel(a),i.ready.catch(o=>{if(!this.destroyed)throw o})}}),e.on("ReaderHeadersReady",async s=>{await u(this,Zn).headersReady;const{isStreamingSupported:i,isRangeSupported:a,contentLength:o}=u(this,Zn);return i&&a&&(u(this,Zn).onProgress=null),{isStreamingSupported:i,isRangeSupported:a,contentLength:o}}),e.on("GetRangeReader",(s,i)=>{Ft(u(this,oo),"GetRangeReader - no `BasePDFStream` instance available.");const a=u(this,oo).getRangeReader(s.begin,s.end);if(!a){i.close();return}i.onPull=()=>{a.read().then(function({value:o,done:c}){if(c){i.close();return}Ft(o instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(o),1,[o])}).catch(o=>{i.error(o)})},i.onCancel=o=>{a.cancel(o),i.ready.catch(c=>{if(!this.destroyed)throw c})}}),e.on("GetDoc",({pdfInfo:s})=>{this.pagesMapper.pagesNumber=s.numPages,this._numPages=s.numPages,this._htmlForXfa=s.htmlForXfa,delete s.htmlForXfa,t._capability.resolve(new t9(s,this))}),e.on("DocException",s=>{t._capability.reject(Pn(s))}),e.on("PasswordRequest",s=>{k(this,lo,Promise.withResolvers());try{if(!t.onPassword)throw Pn(s);const i=a=>{a instanceof Error?u(this,lo).reject(a):u(this,lo).resolve({password:a})};t.onPassword(i,s.code)}catch(i){u(this,lo).reject(i)}return u(this,lo).promise}),e.on("DataLoaded",s=>{P(this,Ci,ob).call(this,{loaded:s.length,total:s.length}),this.downloadInfoCapability.resolve(s)}),e.on("StartRenderPage",s=>{if(this.destroyed)return;u(this,bi).get(s.pageIndex)._startRenderPage(s.transparency,s.cacheKey)}),e.on("commonobj",([s,i,a])=>{var o;if(this.destroyed||this.commonObjs.has(s))return null;switch(i){case"Font":if("error"in a){const x=a.error;He(`Error during font loading: ${x}`),this.commonObjs.resolve(s,x);break}const c=new nV(a),h=this._params.pdfBug&&((o=globalThis.FontInspector)!=null&&o.enabled)?(x,y)=>globalThis.FontInspector.fontAdded(x,y):null,f=new eV(c,h,a.charProcOperatorList,a.extra);this.fontLoader.bind(f).catch(()=>e.sendWithPromise("FontFallback",{id:s})).finally(()=>{f.fontExtraProperties||f.clearData(),this.commonObjs.resolve(s,f)});break;case"CopyLocalImage":const{imageRef:m}=a;Ft(m,"The imageRef must be defined.");for(const x of u(this,bi).values())for(const[,y]of x.objs){if((y==null?void 0:y.ref)!==m)continue;if(!y.dataLen)return null;const v=structuredClone(y);return this.commonObjs.resolve(s,v),y.dataLen}break;case"FontPath":this.commonObjs.resolve(s,new iV(a));break;case"Image":this.commonObjs.resolve(s,a);break;case"Pattern":const g=new rV(a);this.commonObjs.resolve(s,g.getIR());break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),e.on("obj",([s,i,a,o])=>{var h;if(this.destroyed)return;const c=u(this,bi).get(i);if(!c.objs.has(s)){if(c._intentStates.size===0){(h=o==null?void 0:o.bitmap)==null||h.close();return}switch(a){case"Image":case"Pattern":c.objs.resolve(s,o);break;default:throw new Error(`Got unknown object type ${a}`)}}}),e.on("DocProgress",s=>{this.destroyed||P(this,Ci,ob).call(this,s)}),e.on("FetchBinaryData",async s=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.binaryDataFactory)throw new Error("`BinaryDataFactory` not initialized, see the `useWorkerFetch` parameter.");return this.binaryDataFactory.fetch(s)})}
424getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var s;this.annotationStorage.size<=0&&He("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:((s=u(this,Zn))==null?void 0:s.filename)??null},t).finally(()=>{this.annotationStorage.resetModified()})}extractPages(e){const t={pageInfos:e};let s;if(this.annotationStorage.size>0){const{map:i,transfer:a}=this.annotationStorage.serializable;t.annotationStorage=i,s=a}return this.messageHandler.sendWithPromise("ExtractPages",t,s).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this.pagesMapper.pagesNumber)return Promise.reject(new Error("Invalid page request."));const t=e-1,s=this.pagesMapper.getPageId(e)-1,i=u(this,Md).get(t);if(i)return i;const a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:s}).then(o=>{if(this.destroyed)throw new Error("Transport destroyed");o.refStr&&u(this,hf).set(o.refStr,s);const c=new aN(t,o,this,this.pagesMapper,this._params.pdfBug);return u(this,bi).set(t,c),c});return u(this,Md).set(t,a),a}async getPageIndex(e){if(!Xj(e))throw new Error("Invalid pageIndex request.");const t=await this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}),s=this.pagesMapper.getPageNumber(t+1);if(s===0)throw new Error("GetPageIndex: page has been removed.");return s-1}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:this.pagesMapper.getPageId(e+1)-1,intent:t})}getFieldObjects(){return P(this,Ci,xp).call(this,"GetFieldObjects")}hasJSActions(){return P(this,Ci,xp).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(e,t){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:e,pageIndexesToSkip:t})}getDocJSActions(){return P(this,Ci,xp).call(this,"GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:this.pagesMapper.getPageId(e+1)-1})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:this.pagesMapper.getPageId(e+1)-1})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return P(this,Ci,xp).call(this,"GetOptionalContentConfig").then(t=>new JV(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata";return u(this,Rd).getOrInsertComputed(e,()=>this.messageHandler.sendWithPromise(e,null).then(t=>{var s,i;return{info:t[0],metadata:t[1]?new XV(t[1]):null,contentDispositionFilename:((s=u(this,Zn))==null?void 0:s.filename)??null,contentLength:((i=u(this,Zn))==null?void 0:i.contentLength)??null,hasStructTree:t[2]}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}getRawData(e){return this.messageHandler.sendWithPromise("GetRawData",e)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of u(this,bi).values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),u(this,Rd).clear(),this.filterFactory.destroy(!0),Kp.cleanup()}}cachedPageNumber(e){if(!Xj(e))return null;const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`,s=u(this,hf).get(t);if(s>=0){const i=this.pagesMapper.getPageNumber(s+1);if(i!==0)return i}return null}}Zn=new WeakMap,Rd=new WeakMap,oo=new WeakMap,bi=new WeakMap,Md=new WeakMap,hf=new WeakMap,lo=new WeakMap,Ci=new WeakSet,xp=function(e,t=null){return u(this,Rd).getOrInsertComputed(e,()=>
424this.messageHandler.sendWithPromise(e,t))},ob=function({loaded:e,total:t}){var s,i;(i=(s=this.loadingTask).onProgress)==null||i.call(s,{loaded:e,total:t,percent:t?Pt(Math.round(e/t*100),0,100):NaN})};class n9{constructor(e){Y(this,"_internalRenderTask",null);Y(this,"onContinue",null);Y(this,"onError",null);this._internalRenderTask=e}get promise(){return this._internalRenderTask.capability.promise}cancel(e=0){this._internalRenderTask.cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=this._internalRenderTask.operatorList;if(!e)return!1;const{annotationCanvasMap:t}=this._internalRenderTask;return e.form||e.canvas&&(t==null?void 0:t.size)>0}get imageCoordinates(){return this._internalRenderTask.imageCoordinates||null}}var Ol,Id;const Lc=class Lc{constructor({callback:e,params:t,objs:s,commonObjs:i,annotationCanvasMap:a,operatorList:o,pageIndex:c,canvasFactory:h,filterFactory:f,useRequestAnimationFrame:m=!1,pdfBug:g=!1,pageColors:x=null,enableHWA:y=!1,operationsFilter:v=null}){C(this,Ol,null);this.callback=e,this.params=t,this.objs=s,this.commonObjs=i,this.annotationCanvasMap=a,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=c,this.canvasFactory=h,this.filterFactory=f,this._pdfBug=g,this.pageColors=x,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=m===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new n9(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvas,this._canvasContext=t.canvas?null:t.canvasContext,this._enableHWA=y,this._dependencyTracker=t.dependencyTracker,this._imagesTracker=t.imagesTracker,this._operationsFilter=v}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){var f,m;if(this.cancelled)return;if(this._canvas){if(u(Lc,Id).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");u(Lc,Id).add(this._canvas)}this._pdfBug&&((f=globalThis.StepperManager)!=null&&f.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:s,transform:i,background:a,dependencyTracker:o,imagesTracker:c}=this.params,h=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new xh(h,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors,o,c),this.gfx.beginDrawing({transform:i,viewport:s,transparency:e,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,(m=this.graphicsReadyCallback)==null||m.call(this)}cancel(e=null,t=0){var s,i,a;this.running=!1,this.cancelled=!0,(s=this.gfx)==null||s.endDrawing(),u(this,Ol)&&(window.cancelAnimationFrame(u(this,Ol)),k(this,Ol,null)),u(Lc,Id).delete(this._canvas),e||(e=new s5(`Rendering cancelled, page ${this._pageIndex+1}`,t)),this.callback(e),(a=(i=this.task).onError)==null||a.call(i,e)}operatorListChanged(){var e,t;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(e=this.gfx.dependencyTracker)==null||e.growOperationsCount(this.operatorList.fnArray.length),(t=this.stepper)==null||t.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?k(this,Ol,window.requestAnimationFrame(()=>{k(this,Ol,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),u(Lc,Id).delete(this._canvas),this.callback())))}};Ol=new WeakMap,Id=new WeakMap,C(Lc,Id,new WeakSet);let oN=Lc;const r9="5.7.284",i9="7e5b36c2d";var er,Ld,ff,ps,n0,mf,co,r0,Fl,vi,i0,gt,lN,cN,dN,Tc,TR,rl;const Rn=class Rn{constructor({editor:e=null,uiManager:t=null}){C(this,gt);C(this,er,null);C(this,Ld,null);C(this,ff);C(this,ps,null);C(this,n0,!1);C(this,mf,!1);C(this,co,null);C(this,r0);C(this,Fl,null);C(this,vi,null);var s,i;e?(k(this,mf,!1),k(this,co,e)):k(this,mf,!0),k(this,vi,(e==null?void 0:e._uiManager)||t),k(this,r0,u(this,vi)._eventBus),k(this,ff,((s=e==null?void 0:e.color)==null?void 0:s.toUpperCase())||((i=u(this,vi))==null?void 0:i.highlightColors.values().next().value)||"#FFFF98"),u(Rn,i0)||k(Rn,i0,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return $e(this,"_keyboardManager",new J0([[["Escape","mac+Escape"],Rn.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Rn.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Rn.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Rn.prototype._moveToPrevious],[["Home","mac+Home"],Rn.prototype._moveToBeginning],[["End","mac+End"],Rn.prototype._moveToEnd]]))}renderButton(){const e=k(this,er,document.createElement("button"));
424e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.ariaHasPopup="true",u(this,co)&&(e.ariaControls=`${u(this,co).id}_colorpicker_dropdown`);const t=u(this,vi)._signal;e.addEventListener("click",P(this,gt,Tc).bind(this),{signal:t}),e.addEventListener("keydown",P(this,gt,dN).bind(this),{signal:t});const s=k(this,Ld,document.createElement("span"));return s.className="swatch",s.ariaHidden="true",s.style.backgroundColor=u(this,ff),e.append(s),e}renderMainDropdown(){const e=k(this,ps,P(this,gt,lN).call(this));return e.ariaOrientation="horizontal",e.ariaLabelledBy="highlightColorPickerLabel",e}_colorSelectFromKeyboard(e){if(e.target===u(this,er)){P(this,gt,Tc).call(this,e);return}const t=e.target.getAttribute("data-color");t&&P(this,gt,cN).call(this,t,e)}_moveToNext(e){var t,s;if(!u(this,gt,rl)){P(this,gt,Tc).call(this,e);return}if(e.target===u(this,er)){(t=u(this,ps).firstElementChild)==null||t.focus();return}(s=e.target.nextSibling)==null||s.focus()}_moveToPrevious(e){var t,s;if(e.target===((t=u(this,ps))==null?void 0:t.firstElementChild)||e.target===u(this,er)){u(this,gt,rl)&&this._hideDropdownFromKeyboard();return}u(this,gt,rl)||P(this,gt,Tc).call(this,e),(s=e.target.previousSibling)==null||s.focus()}_moveToBeginning(e){var t;if(!u(this,gt,rl)){P(this,gt,Tc).call(this,e);return}(t=u(this,ps).firstElementChild)==null||t.focus()}_moveToEnd(e){var t;if(!u(this,gt,rl)){P(this,gt,Tc).call(this,e);return}(t=u(this,ps).lastElementChild)==null||t.focus()}hideDropdown(){var e,t;(e=u(this,ps))==null||e.classList.add("hidden"),u(this,er).ariaExpanded="false",(t=u(this,Fl))==null||t.abort(),k(this,Fl,null)}_hideDropdownFromKeyboard(){var e;if(!u(this,mf)){if(!u(this,gt,rl)){(e=u(this,co))==null||e.unselect();return}this.hideDropdown(),u(this,er).focus({preventScroll:!0,focusVisible:u(this,n0)})}}updateColor(e){if(u(this,Ld)&&(u(this,Ld).style.backgroundColor=e),!u(this,ps))return;const t=u(this,vi).highlightColors.values();for(const s of u(this,ps).children)s.ariaSelected=t.next().value===e.toUpperCase()}destroy(){var e,t;(e=u(this,er))==null||e.remove(),k(this,er,null),k(this,Ld,null),(t=u(this,ps))==null||t.remove(),k(this,ps,null)}};er=new WeakMap,Ld=new WeakMap,ff=new WeakMap,ps=new WeakMap,n0=new WeakMap,mf=new WeakMap,co=new WeakMap,r0=new WeakMap,Fl=new WeakMap,vi=new WeakMap,i0=new WeakMap,gt=new WeakSet,lN=function(){const e=document.createElement("div"),t=u(this,vi)._signal;e.addEventListener("contextmenu",Jr,{signal:t}),e.className="dropdown",e.role="listbox",e.ariaMultiSelectable="false",e.ariaOrientation="vertical",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),u(this,co)&&(e.id=`${u(this,co).id}_colorpicker_dropdown`);for(const[s,i]of u(this,vi).highlightColors){const a=document.createElement("button");a.tabIndex="0",a.role="option",a.setAttribute("data-color",i),a.title=s,a.setAttribute("data-l10n-id",u(Rn,i0)[s]);const o=document.createElement("span");a.append(o),o.className="swatch",o.style.backgroundColor=i,a.ariaSelected=i===u(this,ff),a.addEventListener("click",P(this,gt,cN).bind(this,i),{signal:t}),e.append(a)}return e.addEventListener("keydown",P(this,gt,dN).bind(this),{signal:t}),e},cN=function(e,t){t.stopPropagation(),u(this,r0).dispatch("switchannotationeditorparams",{source:this,type:ze.HIGHLIGHT_COLOR,value:e}),this.updateColor(e)},dN=function(e){Rn._keyboardManager.exec(this,e)},Tc=function(e){if(u(this,gt,rl)){this.hideDropdown();return}if(k(this,n0,e.detail===0),u(this,Fl)||(k(this,Fl,new AbortController),window.addEventListener("pointerdown",P(this,gt,TR).bind(this),{signal:u(this,vi).combinedSignal(u(this,Fl))})),u(this,er).ariaExpanded="true",u(this,ps)){u(this,ps).classList.remove("hidden");return}const t=k(this,ps,P(this,gt,lN).call(this));u(this,er).append(t)},TR=function(e){var t;(t=u(this,ps))!=null&&t.contains(e.target)||this.hideDropdown()},rl=function(){return u(this,ps)&&!u(this,ps).classList.contains("hidden")},C(Rn,i0,null);let Gb=Rn;var tr,pf,Dd,uo,a0;const Dc=class Dc{constructor(e){C(this,tr,null);C(this,pf,!1);C(this,Dd,null);C(this,uo,null);k(this,Dd,e),k(this,uo,e._uiManager),u(Dc,a0)||k(Dc,a0,Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"}))}renderButton(){if(u(this,tr))return u(this,tr);const{editorType:e,colorType:t,colorAndOpacityType:s,opacityType:i,color:a,opacity:o}=u(this,Dd),c=k(this,pf,ls.isAlphaColorInputSupported&&i!==void 0),h=k(this,tr,document.createElement("input"));if(h.type="color",c){h.setAttribute("alpha","");const f=me.hexNums[Math.round((o??1)*255)];h.value=(a||"#000000")+f}else h.value=a||"#000000";return h.className="basicColorPicker",h.tabIndex=0,h.setAttribute("data-l10n-id",u(Dc,a0)[e]),h.addEventListener("input",()=>{if(c){const f=r5(h.value);if(!f)return;const[m,g,x,y]=f,v=me.makeHexColor(m,g,x);s!==void 0?u(this,uo).updateParams(s,{color:v,opacity:y}):(u(this,uo).updateParams(t,v),u(this,uo).updateParams(i,y))}else u(this,uo).updateParams(t,h.value)},{signal:u(this,uo)._signal}),h}update(e){if(u(this,tr))if(u(this,pf)){const t=me.hexNums[Math.round(u(this,Dd).opacity*255)];u(this,tr).value=e+t}else u(this,tr).value=e}updateOpacity(e){if(!u(this,tr)||!u(this,pf))return;const t=me.hexNums[Math.round(e*255)];u(this,tr).value=u(this,Dd).color+t}destroy(){var e;(e=u(this,tr))==null||e.remove(),k(this,tr,null)}hideDropdown(){}};tr=new WeakMap,pf=new WeakMap,Dd=new WeakMap,uo=new WeakMap,a0=new WeakMap,C(Dc,a0,null);let qb=Dc;function XC(r){return Math.floor(Pt(r,0,1)*255).toString(16).padStart(2,"0")}function Ym(r){return Pt(r,0,1)*255}class YC{static CMYK_G([e,t,s,i]){return["G",1-Math.min(1,.3*e+.59*s+.11*t+i)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return e=Ym(e),[e,e,e]}static G_HTML([e]){const t=XC(e);return`#${t}${t}${t}`}static RGB_G([e,t,s]){return["G",.3*e+.59*t+.11*s]}static RGB_rgb(e){return e.map(Ym)}static RGB_HTML(e){return`#${e.map(XC).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,s,i]){return["RGB",1-Math.min(1,e+i),1-Math.min(1,s+i),1-Math.min(1,t+i)]}static CMYK_rgb([e,t,s,i]){return[Ym(1-Math.min(1,e+i)),Ym(1-Math.min(1,s+i)),Ym(1-Math.min(1,t+i))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,s]){const i=1-e,a=1-t,o=1-s,c=Math.min(i,a,o);return["CMYK",i,a,o,c]}}class a9{create(e,t,s=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),s||(i.setAttribute("width",`${e}px`),i.setAttribute("height",`${t}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${e} ${t}`),i}createElement(e){if(typeof e!="string")throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){it("Abstract method `_createSVG` called.")}}class Kb extends a9{_createSVG(e){return document.createElementNS(Ma,e)}}const o9=9,fu=new WeakSet,l9=new Date().getTimezoneOffset()*60*1e3;class L2{static create(e){switch(e.data.annotationType){case rs.LINK:return new o5(e);case rs.TEXT:return new d9(e);case rs.WIDGET:switch(e.data.fieldType){case"Tx":return new u9(e);case"Btn":return e.data.radioButton?new MR(e):e.data.checkBox?new f9(e):new m9(e);case"Ch":return new p9(e);case"Sig":return new h9(e)}return new gu(e);case rs.POPUP:return new hN(e);case rs.FREETEXT:return new FR(e);case rs.LINE:return new x9(e);case rs.SQUARE:return new y9(e);case rs.CIRCLE:return new b9(e);case rs.POLYLINE:return new BR(e);case rs.CARET:return new w9(e);case rs.INK:return new l5(e);case rs.POLYGON:return new v9(e);case rs.HIGHLIGHT:return new $R(e);case rs.UNDERLINE:return new j9(e);case rs.SQUIGGLY:return new N9(e);case rs.STRIKEOUT:return new k9(e);case rs.STAMP:return new UR(e);case rs.FILEATTACHMENT:return new S9(e);default:return new Bt(e)}}}var Od,gf,zr,o0,uN;const y5=class y5{constructor(e,{isRenderable:t=!1,ignoreBorder:s=!1,createQuadrilaterals:i=!1}={}){C(this,o0);C(this,Od,null);C(this,gf,!1);C(this,zr,null);this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableComment=e.enableComment,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,this.hasOwnCommentButton=!1,t&&(this.contentElement=this.container=this._createContainer(s)),i&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:e,richText:t}){return!!(e!=null&&e.str||t!=null&&t.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return y5._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){var s;const{data:e}=this,t=(s=this.annotationStorage)==null?void 0:s.getEditor(e.id);return t?t.getData():e}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}
424get commentButtonPosition(){var c;const e=(c=this.annotationStorage)==null?void 0:c.getEditor(this.data.id);if(e)return e.commentButtonPositionInPage;const{quadPoints:t,inkLists:s,rect:i}=this.data;let a=-1/0,o=-1/0;if((t==null?void 0:t.length)>=8){for(let h=0;h<t.length;h+=8)t[h+1]>o?(o=t[h+1],a=t[h+2]):t[h+1]===o&&(a=Math.max(a,t[h+2]));return[a,o]}if((s==null?void 0:s.length)>=1){for(const h of s)for(let f=0,m=h.length;f<m;f+=2)h[f+1]>o?(o=h[f+1],a=h[f]):h[f+1]===o&&(a=Math.max(a,h[f]));if(a!==1/0)return[a,o]}return i?[i[2],i[3]]:null}_normalizePoint(e){const{page:{view:t},viewport:{rawDims:{pageWidth:s,pageHeight:i,pageX:a,pageY:o}}}=this.parent;return e[1]=t[3]-e[1]+t[1],e[0]=100*(e[0]-a)/s,e[1]=100*(e[1]-o)/i,e}get commentText(){var t,s,i;const{data:e}=this;return((s=(t=this.annotationStorage.getRawValue(`${Vp}${e.id}`))==null?void 0:t.popup)==null?void 0:s.contents)||((i=e.contentsObj)==null?void 0:i.str)||""}set commentText(e){const{data:t}=this,s={deleted:!e,contents:e||""};this.annotationStorage.updateEditor(t.id,{popup:s})||this.annotationStorage.setValue(`${Vp}${t.id}`,{id:t.id,annotationType:t.annotationType,page:this.parent.page,popup:s,popupRef:t.popupRef,modificationDate:new Date}),e||this.removePopup()}removePopup(){var e,t;(t=((e=u(this,zr))==null?void 0:e.popup)||this.popup)==null||t.remove(),k(this,zr,this.popup=null)}updateEdited(e){var a;if(!this.container)return;e.rect&&(u(this,Od)||k(this,Od,{rect:this.data.rect.slice(0)}));const{rect:t,popup:s}=e;t&&P(this,o0,uN).call(this,t);let i=((a=u(this,zr))==null?void 0:a.popup)||this.popup;!i&&(s!=null&&s.text)&&(this._createPopup(s),i=u(this,zr).popup),i&&(i.updateEdited(e),s!=null&&s.deleted&&(i.remove(),k(this,zr,null),this.popup=null))}resetEdited(){var e;u(this,Od)&&(P(this,o0,uN).call(this,u(this,Od).rect),(e=u(this,zr))==null||e.popup.resetEdited(),k(this,Od,null))}_createContainer(e){const{data:t,parent:{page:s,viewport:i}}=this,a=document.createElement("section");a.setAttribute("data-annotation-id",t.id),!(this instanceof gu)&&!(this instanceof o5)&&(a.tabIndex=0);const{style:o}=a;if(o.zIndex=this.parent.zIndex,this.parent.zIndex+=2,t.alternativeText&&(a.title=t.alternativeText),t.noRotate&&a.classList.add("norotate"),!t.rect||this instanceof hN){const{rotation:j}=t;return!t.hasOwnCanvas&&j!==0&&this.setRotation(j,a),a}const{width:c,height:h}=this;if(!e&&t.borderStyle.width>0){o.borderWidth=`${t.borderStyle.width}px`;const j=t.borderStyle.horizontalCornerRadius,N=t.borderStyle.verticalCornerRadius;if(j>0||N>0){const A=`calc(${j}px * var(--total-scale-factor)) / calc(${N}px * var(--total-scale-factor))`;o.borderRadius=A}else if(this instanceof MR){const A=`calc(${c}px * var(--total-scale-factor)) / calc(${h}px * var(--total-scale-factor))`;o.borderRadius=A}switch(t.borderStyle.style){case Ju.SOLID:o.borderStyle="solid";break;case Ju.DASHED:o.borderStyle="dashed";break;case Ju.BEVELED:He("Unimplemented border style: beveled");break;case Ju.INSET:He("Unimplemented border style: inset");break;case Ju.UNDERLINE:o.borderBottomStyle="solid";break}const S=t.borderColor||null;S?(k(this,gf,!0),o.borderColor=me.makeHexColor(...S)):o.borderWidth=0}const f=me.normalizeRect([t.rect[0],s.view[3]-t.rect[1]+s.view[1],t.rect[2],s.view[3]-t.rect[3]+s.view[1]]),{pageWidth:m,pageHeight:g,pageX:x,pageY:y}=i.rawDims;o.left=`${100*(f[0]-x)/m}%`,o.top=`${100*(f[1]-y)/g}%`;const{rotation:v}=t;return t.hasOwnCanvas||v===0?(o.width=`${100*c/m}%`,o.height=`${100*h/g}%`):this.setRotation(v,a),a}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:s,pageHeight:i}=this.parent.viewport.rawDims;let{width:a,height:o}=this;e%180!==0&&([a,o]=[o,a]),t.style.width=`${100*a/s}%`,t.style.height=`${100*o/i}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(t,s,i)=>{const a=i.detail[t],o=a[0],c=a.slice(1);i.target.style[s]=YC[`${o}_HTML`](c),this.annotationStorage.setValue(this.data.id,{[s]:YC[`${o}_rgb`](c)})};return $e(this,"_commonActions",{display:t=>{const{display:s}=t.detail,i=s%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:s===1||s===2})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:s}=t.detail;this.container.style.visibility=s?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:s,noView:s})},focus:t=>{setTimeout(()=>
424t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{const s=t.detail.rotation;this.setRotation(s),this.annotationStorage.setValue(this.data.id,{rotation:s})}})}_dispatchEventFromSandbox(e,t){const s=this._commonActions;for(const i of Object.keys(t.detail)){const a=e[i]||s[i];a==null||a(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const s=this._commonActions;for(const[i,a]of Object.entries(t)){const o=s[i];if(o){const c={detail:{[i]:a},target:e};o(c),delete t[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,s,i,a]=this.data.rect.map(j=>Math.fround(j));if(e.length===8){const[j,N,S,A]=e.subarray(2,6);if(i===j&&a===N&&t===S&&s===A)return}const{style:o}=this.container;let c;if(u(this,gf)){const{borderColor:j,borderWidth:N}=o;o.borderWidth=0,c=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${j}" stroke-width="${N}">`],this.container.classList.add("hasBorder")}const h=i-t,f=a-s,{svgFactory:m}=this,g=m.createElement("svg");g.classList.add("quadrilateralsContainer"),g.setAttribute("width",0),g.setAttribute("height",0),g.role="none";const x=m.createElement("defs");g.append(x);const y=m.createElement("clipPath"),v=`clippath_${this.data.id}`;y.setAttribute("id",v),y.setAttribute("clipPathUnits","objectBoundingBox"),x.append(y);for(let j=2,N=e.length;j<N;j+=8){const S=e[j],A=e[j+1],E=e[j+2],M=e[j+3],R=m.createElement("rect"),I=(E-t)/h,F=(a-A)/f,D=(S-E)/h,O=(A-M)/f;R.setAttribute("x",I),R.setAttribute("y",F),R.setAttribute("width",D),R.setAttribute("height",O),y.append(R),c==null||c.push(`<rect vector-effect="non-scaling-stroke" x="${I}" y="${F}" width="${D}" height="${O}"/>`)}u(this,gf)&&(c.push("</g></svg>')"),o.backgroundImage=c.join("")),this.container.append(g),this.container.style.clipPath=`url(#${v})`}_createPopup(e=null){const{data:t}=this;let s,i;e?(s={str:e.text},i=e.date):(s=t.contentsObj,i=t.modificationDate),k(this,zr,new hN({data:{color:t.color,titleObj:t.titleObj,modificationDate:i,contentsObj:s,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]}))}get hasPopupElement(){return!!(u(this,zr)||this.popup||this.data.popupRef)}get extraPopupElement(){return u(this,zr)}render(){it("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const s=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:a,id:o,exportValues:c}of i){if(a===-1||o===t)continue;const h=typeof c=="string"?c:null,f=document.querySelector(`[data-element-id="${o}"]`);if(f&&!fu.has(f)){He(`_getElementsByName - element not allowed: ${o}`);continue}s.push({id:o,exportValue:h,domElement:f})}return s}for(const i of document.getElementsByName(e)){const{exportValue:a}=i,o=i.getAttribute("data-element-id");o!==t&&fu.has(i)&&s.push({id:o,exportValue:a,domElement:i})}return s}show(){var e;this.container&&(this.container.hidden=!1),(e=this.popup)==null||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),(e=this.popup)==null||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{var s;(s=this.linkService.eventBus)==null||s.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};Od=new WeakMap,gf=new WeakMap,zr=new WeakMap,o0=new WeakSet,uN=function(e){const{container:{style:t},data:{rect:s,rotation:i},parent:{viewport:{rawDims:{pageWidth:a,pageHeight:o,pageX:c,pageY:h}}}}=this;s==null||s.splice(0,4,...e),t.left=`${100*(e[0]-c)/a}%`,t.top=`${100*(o-e[3]+h)/o}%`,i===0?(t.width=`${100*(e[2]-e[0])/a}%`,t.height=`${100*(e[3]-e[1])/o}%`):this.setRotation(i)};let Bt=y5;class c9 extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.editor=e.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){const{editor:e}=this;e.hasComment&&this._createPopup(e.comment)}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}
424get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(e){this.editor.comment=e,e||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.parent.removeAnnotation(this.data.id),this.container.remove(),this.container=null,this.removePopup()}}var gr,Pc,PR,RR;class o5 extends Bt{constructor(t,s=null){super(t,{isRenderable:!0,ignoreBorder:!!(s!=null&&s.ignoreBorder),createQuadrilaterals:!0});C(this,gr);this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:s}=this,i=document.createElement("a");i.setAttribute("data-element-id",t.id);let a=!1;return t.url?(s.addLinkAttributes(i,t.url,t.newWindow),a=!0):t.action?(this._bindNamedAction(i,t.action,t.overlaidText),a=!0):t.attachment?(P(this,gr,PR).call(this,i,t.attachment,t.overlaidText,t.attachmentDest),a=!0):t.setOCGState?(P(this,gr,RR).call(this,i,t.setOCGState,t.overlaidText),a=!0):t.dest?(this._bindLink(i,t.dest,t.overlaidText),a=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,t),a=!0),t.resetForm?(this._bindResetFormAction(i,t.resetForm),a=!0):this.isTooltipOnly&&!a&&(this._bindLink(i,""),a=!0)),this.container.classList.add("linkAnnotation"),a&&(this.contentElement=i,this.container.append(i)),this.container}_bindLink(t,s,i=""){t.href=this.linkService.getDestinationHash(s),t.onclick=()=>(s&&this.linkService.goToDestination(s),!1),(s||s==="")&&P(this,gr,Pc).call(this),i&&(t.title=i)}_bindNamedAction(t,s,i=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(s),!1),i&&(t.title=i),P(this,gr,Pc).call(this)}_bindJSAction(t,s){t.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const a of Object.keys(s.actions)){const o=i.get(a);o&&(t[o]=()=>{var c;return(c=this.linkService.eventBus)==null||c.dispatch("dispatcheventinsandbox",{source:this,detail:{id:s.id,name:a}}),!1})}s.overlaidText&&(t.title=s.overlaidText),t.onclick||(t.onclick=()=>!1),P(this,gr,Pc).call(this)}_bindResetFormAction(t,s){const i=t.onclick;if(i||(t.href=this.linkService.getAnchorUrl("")),P(this,gr,Pc).call(this),!this._fieldObjects){He('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(t.onclick=()=>!1);return}t.onclick=()=>{var g;i==null||i();const{fields:a,refs:o,include:c}=s,h=[];if(a.length!==0||o.length!==0){const x=new Set(o);for(const y of a){const v=this._fieldObjects[y]||[];for(const{id:j}of v)x.add(j)}for(const y of Object.values(this._fieldObjects))for(const v of y)x.has(v.id)===c&&h.push(v)}else for(const x of Object.values(this._fieldObjects))h.push(...x);const f=this.annotationStorage,m=[];for(const x of h){const{id:y}=x;switch(m.push(y),x.type){case"text":{const j=x.defaultValue||"";f.setValue(y,{value:j});break}case"checkbox":case"radiobutton":{const j=x.defaultValue===x.exportValues;f.setValue(y,{value:j});break}case"combobox":case"listbox":{const j=x.defaultValue||"";f.setValue(y,{value:j});break}default:continue}const v=document.querySelector(`[data-element-id="${y}"]`);if(v){if(!fu.has(v)){He(`_bindResetFormAction - element not allowed: ${y}`);continue}}else continue;v.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((g=this.linkService.eventBus)==null||g.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:m,name:"ResetForm"}})),!1}}}gr=new WeakSet,Pc=function(){this.container.setAttribute("data-internal-link","")},PR=function(t,s,i="",a=null){t.href=this.linkService.getAnchorUrl(""),s.description?t.title=s.description:i&&(t.title=i),t.onclick=()=>{var o;return(o=this.downloadManager)==null||o.openOrDownloadData(s.content,s.filename,a),!1},P(this,gr,Pc).call(this)},RR=function(t,s,i=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(s),!1),i&&(t.title=i),P(this,gr,Pc).call(this)};class d9 extends Bt{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(e),this.container}}
424class gu extends Bt{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&(((t=e.previousSibling)==null?void 0:t.nodeName)==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return ls.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,s,i,a){s.includes("mouse")?e.addEventListener(s,o=>{var c;(c=this.linkService.eventBus)==null||c.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:a(o),shift:o.shiftKey,modifier:this._getKeyModifier(o)}})}):e.addEventListener(s,o=>{var c;if(s==="blur"){if(!t.focused||!o.relatedTarget)return;t.focused=!1}else if(s==="focus"){if(t.focused)return;t.focused=!0}a&&((c=this.linkService.eventBus)==null||c.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:a(o)}}))})}_setEventListeners(e,t,s,i){var a,o,c;for(const[h,f]of s)(f==="Action"||(a=this.data.actions)!=null&&a[f])&&((f==="Focus"||f==="Blur")&&(t||(t={focused:!1})),this._setEventListener(e,t,h,f,i),f==="Focus"&&!((o=this.data.actions)!=null&&o.Blur)?this._setEventListener(e,t,"blur","Blur",null):f==="Blur"&&!((c=this.data.actions)!=null&&c.Focus)&&this._setEventListener(e,t,"focus","Focus",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?"transparent":me.makeHexColor(...t)}_setTextStyle(e){const t=["left","center","right"],{fontColor:s}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||o9,a=e.style;let o;const c=2,h=f=>Math.round(10*f)/10;if(this.data.multiLine){const f=Math.abs(this.data.rect[3]-this.data.rect[1]-c),m=Math.round(f/(T2*i))||1,g=f/m;o=Math.min(i,h(g/T2))}else{const f=Math.abs(this.data.rect[3]-this.data.rect[1]-c);o=Math.min(i,h(f/T2))}a.fontSize=`calc(${o}px * var(--total-scale-factor))`,a.color=me.makeHexColor(...s),this.data.textAlignment!==null&&(a.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class u9 extends gu{constructor(e){const t=e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue;super(e,{isRenderable:t})}setPropertyOnSiblings(e,t,s,i){const a=this.annotationStorage;
424for(const o of this._getElementsByName(e.name,e.id))o.domElement&&(o.domElement[t]=s),a.setValue(o.id,{[i]:s})}render(){var i,a;const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const o=e.getValue(t,{value:this.data.fieldValue});let c=o.value||"";const h=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;h&&c.length>h&&(c=c.slice(0,h));let f=o.formattedValue||((i=this.data.textContent)==null?void 0:i.join(` 425`))||null;f&&this.data.comb&&(f=f.replaceAll(/\s+/g,""));const m={userValue:c,formattedValue:f,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=f??c,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type=this.data.password?"password":"text",s.setAttribute("value",f??c),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),fu.add(s),this.contentElement=s,s.setAttribute("data-element-id",t),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=0;const{datetimeFormat:g,datetimeType:x,timeStep:y}=this.data,v=!!x&&this.enableScripting;g&&(s.title=g),this._setRequired(s,this.data.required),h&&(s.maxLength=h),s.addEventListener("input",N=>{e.setValue(t,{value:N.target.value}),this.setPropertyOnSiblings(s,"value",N.target.value,"value"),m.formattedValue=null}),s.addEventListener("resetform",N=>{const S=this.data.defaultFieldValue??"";s.value=m.userValue=S,m.formattedValue=null});let j=N=>{const{formattedValue:S}=m;S!=null&&(N.target.value=S),N.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",S=>{var E;if(m.focused)return;const{target:A}=S;if(v&&(A.type=x,y&&(A.step=y)),m.userValue){const M=m.userValue;if(v)if(x==="time"){const R=new Date(M),I=[R.getHours(),R.getMinutes(),R.getSeconds()];A.value=I.map(F=>F.toString().padStart(2,"0")).join(":")}else A.value=new Date(M-l9).toISOString().split(x==="date"?"T":".",1)[0];else A.value=M}m.lastCommittedValue=A.value,m.commitKey=1,(E=this.data.actions)!=null&&E.Focus||(m.focused=!0)}),s.addEventListener("updatefromsandbox",S=>{this.showElementAndHideCanvas(S.target);const A={value(E){m.userValue=E.detail.value??"",v||e.setValue(t,{value:m.userValue.toString()}),E.target.value=m.userValue},formattedValue(E){const{formattedValue:M}=E.detail;m.formattedValue=M,M!=null&&E.target!==document.activeElement&&(E.target.value=M);const R={formattedValue:M};v&&(R.value=M),e.setValue(t,R)},selRange(E){E.target.setSelectionRange(...E.detail.selRange)},charLimit:E=>{var F;const{charLimit:M}=E.detail,{target:R}=E;if(M===0){R.removeAttribute("maxLength");return}R.setAttribute("maxLength",M);let I=m.userValue;!I||I.length<=M||(I=I.slice(0,M),R.value=m.userValue=I,e.setValue(t,{value:I}),(F=this.linkService.eventBus)==null||F.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:I,willCommit:!0,commitKey:1,selStart:R.selectionStart,selEnd:R.selectionEnd}}))}};this._dispatchEventFromSandbox(A,S)}),s.addEventListener("keydown",S=>{var M;m.commitKey=1;let A=-1;if(S.key==="Escape"?A=0:S.key==="Enter"&&!this.data.multiLine?A=2:S.key==="Tab"&&(m.commitKey=3),A===-1)return;const{value:E}=S.target;m.lastCommittedValue!==E&&(m.lastCommittedValue=E,m.userValue=E,(M=this.linkService.eventBus)==null||M.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:E,willCommit:!0,commitKey:A,selStart:S.target.selectionStart,selEnd:S.target.selectionEnd}}))});const N=j;j=null,s.addEventListener("blur",S=>{var M,R;if(!m.focused||!S.relatedTarget)return;(M=this.data.actions)!=null&&M.Blur||(m.focused=!1);const{target:A}=S;let{value:E}=A;if(v){if(E&&x==="time"){const I=E.split(":").map(F=>parseInt(F,10));E=new Date(2e3,0,1,I[0],I[1],I[2]||0).valueOf(),A.step=""}else E.includes("T")||(E=`${E}T00:00`),E=new Date(E).valueOf();A.type="text"}m.userValue=E,m.lastCommittedValue!==E&&((R=this.linkService.eventBus)==null||R.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:E,willCommit:!0,
vendor: 4,564 bytes, line 425
425commitKey:m.commitKey,selStart:S.target.selectionStart,selEnd:S.target.selectionEnd}})),N(S)}),(a=this.data.actions)!=null&&a.Keystroke&&s.addEventListener("beforeinput",S=>{var O;m.lastCommittedValue=null;const{data:A,target:E}=S,{value:M,selectionStart:R,selectionEnd:I}=E;let F=R,D=I;switch(S.inputType){case"deleteWordBackward":{const $=M.substring(0,R).match(/\w*[^\w]*$/);$&&(F-=$[0].length);break}case"deleteWordForward":{const $=M.substring(R).match(/^[^\w]*\w*/);$&&(D+=$[0].length);break}case"deleteContentBackward":R===I&&(F-=1);break;case"deleteContentForward":R===I&&(D+=1);break}S.preventDefault(),(O=this.linkService.eventBus)==null||O.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:M,change:A||"",willCommit:!1,selStart:F,selEnd:D}})}),this._setEventListeners(s,m,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],S=>S.target.value)}if(j&&s.addEventListener("blur",j),this.data.comb){const S=(this.data.rect[2]-this.data.rect[0])/h;s.classList.add("comb"),s.style.letterSpacing=`calc(${S}px * var(--total-scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell",this.data.hasOwnCanvas&&(s.hidden=!0);return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class h9 extends gu{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class f9 extends gu{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,s=t.id;let i=e.getValue(s,{value:t.exportValue===t.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",e.setValue(s,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const a=document.createElement("input");return fu.add(a),a.setAttribute("data-element-id",s),a.disabled=t.readOnly,this._setRequired(a,this.data.required),a.type="checkbox",a.name=t.fieldName,i&&a.setAttribute("checked",!0),a.setAttribute("exportValue",t.exportValue),a.tabIndex=0,a.addEventListener("change",o=>{const{name:c,checked:h}=o.target;for(const f of this._getElementsByName(c,s)){const m=h&&f.exportValue===t.exportValue;f.domElement&&(f.domElement.checked=m),e.setValue(f.id,{value:m})}e.setValue(s,{value:h})}),a.addEventListener("resetform",o=>{const c=t.defaultFieldValue||"Off";o.target.checked=c===t.exportValue}),this.enableScripting&&this.hasJSActions&&(a.addEventListener("updatefromsandbox",o=>{const c={value(h){h.target.checked=h.detail.value!=="Off",e.setValue(s,{value:h.target.checked})}};this._dispatchEventFromSandbox(c,o)}),this._setEventListeners(a,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class MR extends gu{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,s=t.id;let i=e.getValue(s,{value:t.fieldValue===t.buttonValue}).value;if(typeof i=="string"&&(i=i!==t.buttonValue,e.setValue(s,{value:i})),i)for(const o of this._getElementsByName(t.fieldName,s))e.setValue(o.id,{value:!1});const a=document.createElement("input");if(fu.add(a),a.setAttribute("data-element-id",s),a.disabled=t.readOnly,this._setRequired(a,this.data.required),a.type="radio",a.name=t.fieldName,i&&a.setAttribute("checked",!0),a.tabIndex=0,a.addEventListener("change",o=>{const{name:c,checked:h}=o.target;for(const f of this._getElementsByName(c,s))e.setValue(f.id,{value:!1});e.setValue(s,{value:h})}),a.addEventListener("resetform",o=>{const c=t.defaultFieldValue;o.target.checked=c!=null&&c===t.buttonValue}),this.enableScripting&&this.hasJSActions){const o=t.buttonValue;a.addEventListener("updatefromsandbox",c=>{const h={value:f=>{const m=o===f.detail.value;for(const g of this._getElementsByName(f.target.name)){const x=m&&g.id===s;g.domElement&&(g.domElement.checked=x),e.setValue(g.id,{value:x})}}};this._dispatchEventFromSandbox(h,c)}),this._setEventListeners(a,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],c=>c.target.checked)}
vendor: 2,274 bytes, line 425
425return this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class m9 extends o5{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",s=>{this._dispatchEventFromSandbox({},s)})),e}}class p9 extends gu{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,s=e.getValue(t,{value:this.data.fieldValue}),i=document.createElement("select");fu.add(i),i.setAttribute("data-element-id",t),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=0;let a=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",g=>{const x=this.data.defaultFieldValue;for(const y of i.options)y.selected=y.value===x});const o=(g,x)=>{const y=x.replaceAll(" ","Â ");g.textContent=y,y!==x&&g.setAttribute("display-value",x)};for(const g of this.data.options){const x=document.createElement("option");o(x,g.displayValue),x.value=g.exportValue,s.value.includes(g.exportValue)&&(x.setAttribute("selected",!0),a=!1),i.append(x)}let c=null;if(a){const g=document.createElement("option");g.value=" ",g.setAttribute("hidden",!0),g.setAttribute("selected",!0),i.prepend(g),c=()=>{g.remove(),i.removeEventListener("input",c),c=null},i.addEventListener("input",c)}const h=g=>{const x=g?"value":"textContent",{options:y,multiple:v}=i;return v?Array.prototype.filter.call(y,j=>j.selected).map(j=>j[x]):y.selectedIndex===-1?null:y[y.selectedIndex][x]};let f=h(!1);const m=g=>{const x=g.target.options;return Array.prototype.map.call(x,y=>({displayValue:y.getAttribute("display-value")||y.textContent,exportValue:y.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",g=>{const x={value(y){c==null||c();const v=y.detail.value,j=new Set(Array.isArray(v)?v:[v]);for(const N of i.options)N.selected=j.has(N.value);
425e.setValue(t,{value:h(!0)}),f=h(!1)},multipleSelection(y){i.multiple=!0},remove(y){const v=i.options,j=y.detail.remove;v[j].selected=!1,i.remove(j),v.length>0&&Array.prototype.findIndex.call(v,S=>S.selected)===-1&&(v[0].selected=!0),e.setValue(t,{value:h(!0),items:m(y)}),f=h(!1)},clear(y){for(;i.length!==0;)i.remove(0);e.setValue(t,{value:null,items:[]}),f=h(!1)},insert(y){const{index:v,displayValue:j,exportValue:N}=y.detail.insert,S=i.children[v],A=document.createElement("option");o(A,j),A.value=N,S?S.before(A):i.append(A),e.setValue(t,{value:h(!0),items:m(y)}),f=h(!1)},items(y){const{items:v}=y.detail;for(;i.length!==0;)i.remove(0);for(const j of v){const{displayValue:N,exportValue:S}=j,A=document.createElement("option");o(A,N),A.value=S,i.append(A)}i.options.length>0&&(i.options[0].selected=!0),e.setValue(t,{value:h(!0),items:m(y)}),f=h(!1)},indices(y){const v=new Set(y.detail.indices);for(const j of y.target.options)j.selected=v.has(j.index);e.setValue(t,{value:h(!0)}),f=h(!1)},editable(y){y.target.disabled=!y.detail.editable}};this._dispatchEventFromSandbox(x,g)}),i.addEventListener("input",g=>{var v;const x=h(!0),y=h(!1);e.setValue(t,{value:x}),g.preventDefault(),(v=this.linkService.eventBus)==null||v.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:f,change:y,changeEx:x,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],g=>g.target.value)):i.addEventListener("input",function(g){e.setValue(t,{value:h(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}var l0,fN;class hN extends Bt{constructor(t){const{data:s,elements:i,parent:a}=t,o=!!a._commentManager;super(t,{isRenderable:!o&&Bt._hasPopupData(s)});C(this,l0);if(this.elements=i,o&&Bt._hasPopupData(s)){const c=this.popup=P(this,l0,fN).call(this);for(const h of i)h.popup=c}else this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const s=this.popup=P(this,l0,fN).call(this),i=[];for(const a of this.elements)a.popup=s,a.container.ariaHasPopup="dialog",i.push(a.data.id),a.addHighlightArea();return this.container.setAttribute("aria-controls",i.map(a=>`${fh}${a}`).join(",")),this.container}}l0=new WeakSet,fN=function(){return new g9({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,commentManager:this.parent._commentManager})};var sr,Bl,jv,Nv,xf,yf,Vt,ra,$l,Fd,bf,vf,ia,nr,ho,fo,Wt,mo,Ul,c0,po,wf,Bd,Hl,ks,zl,We,lb,mN,pN,gN,cb,xN,IR,LR,DR,OR,db,ub,yN;class g9{constructor({container:e,color:t,elements:s,titleObj:i,modificationDate:a,contentsObj:o,richText:c,parent:h,rect:f,parentRect:m,open:g,commentManager:x=null}){C(this,We);C(this,sr,null);C(this,Bl,P(this,We,DR).bind(this));C(this,jv,P(this,We,yN).bind(this));C(this,Nv,P(this,We,ub).bind(this));C(this,xf,P(this,We,db).bind(this));C(this,yf,null);C(this,Vt,null);C(this,ra,null);C(this,$l,null);C(this,Fd,null);C(this,bf,null);C(this,vf,null);C(this,ia,!1);C(this,nr,null);C(this,ho,null);C(this,fo,null);C(this,Wt,null);C(this,mo,null);C(this,Ul,null);C(this,c0,null);C(this,po,null);C(this,wf,null);C(this,Bd,null);C(this,Hl,!1);C(this,ks,null);C(this,zl,null);k(this,Vt,e),k(this,wf,i),k(this,ra,o),k(this,po,c),k(this,bf,h),k(this,yf,t),k(this,c0,f),k(this,vf,m),k(this,Fd,s),k(this,sr,x),k(this,ks,s[0]),k(this,$l,zb.toDateObject(a)),this.trigger=s.flatMap(y=>y.getElementsToTriggerPopup()),x||(P(this,We,lb).call(this),u(this,Vt).hidden=!0,g&&P(this,We,db).call(this))}renderCommentButton(){if(u(this,Wt)){u(this,Wt).parentNode||u(this,ks).container.after(u(this,Wt));return}if(u(this,mo)||P(this,We,mN).call(this),!u(this,mo))return;const{signal:e}=k(this,ho,new AbortController),t=u(this,ks).hasOwnCommentButton,s=()=>{u(this,sr).toggleCommentPopup(this,!0,void 0,!t)},i=()=>
425{u(this,sr).toggleCommentPopup(this,!1,!0,!t)},a=()=>{u(this,sr).toggleCommentPopup(this,!1,!1)};if(t){k(this,Wt,u(this,ks).container);for(const o of this.trigger)o.ariaHasPopup="dialog",o.ariaControls="commentPopup",o.addEventListener("keydown",u(this,Bl),{signal:e}),o.addEventListener("click",s,{signal:e}),o.addEventListener("pointerenter",i,{signal:e}),o.addEventListener("pointerleave",a,{signal:e}),o.classList.add("popupTriggerArea")}else{const o=k(this,Wt,document.createElement("button"));o.className="annotationCommentButton";const c=u(this,ks).container;o.style.zIndex=parseInt(c.style.zIndex,10)+1,o.tabIndex=0,o.ariaHasPopup="dialog",o.ariaControls="commentPopup",o.setAttribute("data-l10n-id","pdfjs-show-comment-button"),P(this,We,gN).call(this),P(this,We,pN).call(this),o.addEventListener("keydown",u(this,Bl),{signal:e}),o.addEventListener("click",s,{signal:e}),o.addEventListener("pointerenter",i,{signal:e}),o.addEventListener("pointerleave",a,{signal:e}),c.after(o)}}get commentButtonColor(){const{color:e,opacity:t}=u(this,ks).commentData;return e?u(this,bf)._commentManager.makeCommentColor(e,t):null}focusCommentButton(){setTimeout(()=>{var e;(e=u(this,Wt))==null||e.focus()},0)}
425getData(){const{richText:e,color:t,opacity:s,creationDate:i,modificationDate:a}=u(this,ks).commentData;return{contentsObj:{str:this.comment},richText:e,color:t,opacity:s,creationDate:i,modificationDate:a}}get elementBeforePopup(){return u(this,Wt)}get comment(){return u(this,zl)||k(this,zl,u(this,ks).commentText),u(this,zl)}set comment(e){e!==this.comment&&(u(this,ks).commentText=k(this,zl,e))}focus(){var e;(e=u(this,ks).container)==null||e.focus()}get parentBoundingClientRect(){return u(this,ks).layer.getBoundingClientRect()}setCommentButtonStates({selected:e,hasPopup:t}){u(this,Wt)&&(u(this,Wt).classList.toggle("selected",e),u(this,Wt).ariaExpanded=t)}setSelectedCommentButton(e){u(this,Wt).classList.toggle("selected",e)}get commentPopupPosition(){if(u(this,Ul))return u(this,Ul);const{x:e,y:t,height:s}=u(this,Wt).getBoundingClientRect(),{x:i,y:a,width:o,height:c}=u(this,ks).layer.getBoundingClientRect();return[(e-i)/o,(t+s-a)/c]}set commentPopupPosition(e){k(this,Ul,e)}hasDefaultPopupPosition(){return u(this,Ul)===null}get commentButtonPosition(){return u(this,mo)}get commentButtonWidth(){return u(this,Wt).getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(e){const[t,s]=u(this,Ul)||this.commentButtonPosition.map(f=>f/100),i=this.parentBoundingClientRect,{x:a,y:o,width:c,height:h}=i;u(this,sr).showDialog(null,this,a+t*c,o+s*h,{...e,parentDimensions:i})}render(){var s,i;if(u(this,nr))return;const e=k(this,nr,document.createElement("div"));if(e.className="popup",u(this,yf)){const a=e.style.outlineColor=me.makeHexColor(...u(this,yf));e.style.backgroundColor=`color-mix(in srgb, ${a} 30%, white)`}const t=document.createElement("span");if(t.className="header",(s=u(this,wf))!=null&&s.str){const a=document.createElement("span");a.className="title",t.append(a),{dir:a.dir,str:a.textContent}=u(this,wf)}if(e.append(t),u(this,$l)){const a=document.createElement("time");a.className="popupDate",a.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),a.setAttribute("data-l10n-args",JSON.stringify({dateObj:u(this,$l).valueOf()})),a.dateTime=u(this,$l).toISOString(),t.append(a)}fP({html:u(this,We,cb)||u(this,ra).str,dir:(i=u(this,ra))==null?void 0:i.dir,className:"popupContent"},e),u(this,Vt).append(e)}updateEdited({rect:e,popup:t,deleted:s}){var i;if(u(this,sr)){s?(this.remove(),k(this,zl,null)):t&&(t.deleted?this.remove():(P(this,We,gN).call(this),k(this,zl,t.text))),e&&(k(this,mo,null),P(this,We,mN).call(this),P(this,We,pN).call(this));return}if(s||t!=null&&t.deleted){this.remove();return}P(this,We,lb).call(this),u(this,Bd)||k(this,Bd,{contentsObj:u(this,ra),richText:u(this,po)}),e&&k(this,fo,null),t&&t.text&&(k(this,po,P(this,We,LR).call(this,t.text)),k(this,$l,zb.toDateObject(t.date)),k(this,ra,null)),(i=u(this,nr))==null||i.remove(),k(this,nr,null)}resetEdited(){var e;u(this,Bd)&&({contentsObj:ss(this,ra)._,richText:ss(this,po)._}=u(this,Bd),k(this,Bd,null),(e=u(this,nr))==null||e.remove(),k(this,nr,null),k(this,fo,null))}remove(){var e,t,s;if((e=u(this,ho))==null||e.abort(),k(this,ho,null),(t=u(this,nr))==null||t.remove(),k(this,nr,null),k(this,Hl,!1),k(this,ia,!1),(s=u(this,Wt))==null||s.remove(),k(this,Wt,null),this.trigger)for(const i of this.trigger)i.classList.remove("popupTriggerArea")}forceHide(){k(this,Hl,this.isVisible),u(this,Hl)&&(u(this,Vt).hidden=!0)}maybeShow(){u(this,sr)||(P(this,We,lb).call(this),u(this,Hl)&&(u(this,nr)||P(this,We,ub).call(this),k(this,Hl,!1),u(this,Vt).hidden=!1))}get isVisible(){return u(this,sr)?!1:u(this,Vt).hidden===!1}}sr=new WeakMap,Bl=new WeakMap,jv=new WeakMap,Nv=new WeakMap,xf=new WeakMap,yf=new WeakMap,Vt=new WeakMap,ra=new WeakMap,$l=new WeakMap,Fd=new WeakMap,bf=new WeakMap,vf=new WeakMap,ia=new WeakMap,nr=new WeakMap,ho=new WeakMap,fo=new WeakMap,Wt=new WeakMap,mo=new WeakMap,Ul=new WeakMap,c0=new WeakMap,po=new WeakMap,wf=new WeakMap,Bd=new WeakMap,Hl=new WeakMap,ks=new WeakMap,zl=new WeakMap,We=new WeakSet,lb=function(){var t;if(u(this,ho))return;k(this,ho,new AbortController);const{signal:e}=u(this,ho);for(const s of this.trigger)s.addEventListener("click",u(this,xf),{signal:e}),s.addEventListener("pointerenter",u(this,Nv),{signal:e}),s.addEventListener("pointerleave",u(this,jv),{signal:e}),s.classList.add("popupTriggerArea");for(const s of u(this,Fd))(t=s.container)==null||t.addEventListener("keydown",u(this,Bl),{signal:e})},mN=function(){const e=u(this,Fd).find(t=>t.hasCommentButton);e&&k(this,mo,e._normalizePoint(e.commentButtonPosition))},pN=function(){if(u(this,ks).extraPopupElement&&!u(this,ks).editor)return;u(this,Wt)||this.renderCommentButton();const[e,t]=u(this,mo),{style:s}=u(this,Wt);s.left=`calc(${e}%)`,s.top=`calc(${t}% - var(--comment-button-dim))`},gN=function(){u(this,ks).extraPopupElement||(u(this,Wt)||this.renderCommentButton(),u(this,Wt).style.backgroundColor=this.commentButtonColor||"")},cb=function(){const e=u(this,po),t=u(this,ra);return e!=null&&e.str&&(!(t!=null&&t.str)||t.str===e.str)&&u(this,po).html||null},xN=function(){var e,t,s;return((s=(t=(e=u(this,We,cb))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:s.fontSize)||0},IR=function(){var e,t,s;return((s=(t=(e=u(this,We,cb))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:s.color)||null},LR=function(e){const t=[],s={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},i={style:{color:u(this,We,IR),fontSize:u(this,We,xN)?`calc(${u(this,We,xN)}px * var(--total-scale-factor))`:""}};for(const a of e.split(` 426`))t.push({name:"span",value:a,attributes:i});return s},DR=function(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key==="Enter"||e.key==="Escape"&&u(this,ia))&&P(this,We,db).call(this)},OR=function(){if(u(this,fo)!==null)return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:s,pageX:i,pageY:a}}}=u(this,bf);let o=!!u(this,vf),c=o?u(this,vf):u(this,c0);for(const v of u(this,Fd))if(!c||me.intersect(v.data.rect,c)!==null){c=v.data.rect,o=!0;break}const h=me.normalizeRect([c[0],e[3]-c[1]+e[1],c[2],e[3]-c[3]+e[1]]),m=o?c[2]-c[0]+5:0,g=h[0]+m,x=h[1];k(this,fo,[100*(g-i)/t,100*(x-a)/s]);const{style:y}=u(this,Vt);y.left=`${u(this,fo)[0]}%`,y.top=`${u(this,fo)[1]}%`},db=function(){if(u(this,sr)){u(this,sr).toggleCommentPopup(this,!1);return}k(this,ia,!u(this,ia)),u(this,ia)?(P(this,We,ub).call(this),u(this,Vt).addEventListener("click",u(this,xf)),u(this,Vt).addEventListener("keydown",u(this,Bl))):(P(this,We,yN).call(this),u(this,Vt).removeEventListener("click",u(this,xf)),u(this,Vt).removeEventListener("keydown",u(this,Bl)))},ub=function(){u(this,nr)||this.render(),this.isVisible?u(this,ia)&&u(this,Vt).classList.add("focused"):(P(this,We,OR).call(this),u(this,Vt).hidden=!1,u(this,Vt).style.zIndex=parseInt(u(this,Vt).style.zIndex,10)+1e3)},yN=function(){u(this,Vt).classList.remove("focused"),!(u(this,ia)||!this.isVisible)&&(u(this,Vt).hidden=!0,u(this,Vt).style.zIndex=parseInt(u(this,Vt).style.zIndex,10)-1e3)};class FR extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=Be.FREETEXT}
426render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=this.contentElement=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const s=document.createElement("span");s.textContent=t,e.append(s)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}var d0;class x9 extends Bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});C(this,d0,null)}render(){this.container.classList.add("lineAnnotation");const{data:t,width:s,height:i}=this,a=this.svgFactory.create(s,i,!0),o=k(this,d0,this.svgFactory.createElement("svg:line"));return o.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),o.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),o.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),o.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),o.setAttribute("stroke-width",t.borderStyle.width||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),a.append(o),this.container.append(a),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return u(this,d0)}addHighlightArea(){this.container.classList.add("highlightArea")}}d0=new WeakMap;var u0;class y9 extends Bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});C(this,u0,null)}render(){this.container.classList.add("squareAnnotation");const{data:t,width:s,height:i}=this,a=this.svgFactory.create(s,i,!0),o=t.borderStyle.width,c=k(this,u0,this.svgFactory.createElement("svg:rect"));return c.setAttribute("x",o/2),c.setAttribute("y",o/2),c.setAttribute("width",s-o),c.setAttribute("height",i-o),c.setAttribute("stroke-width",o||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),a.append(c),this.container.append(a),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return u(this,u0)}addHighlightArea(){this.container.classList.add("highlightArea")}}u0=new WeakMap;var h0;class b9 extends Bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});C(this,h0,null)}render(){this.container.classList.add("circleAnnotation");const{data:t,width:s,height:i}=this,a=this.svgFactory.create(s,i,!0),o=t.borderStyle.width,c=k(this,h0,this.svgFactory.createElement("svg:ellipse"));return c.setAttribute("cx",s/2),c.setAttribute("cy",i/2),c.setAttribute("rx",s/2-o/2),c.setAttribute("ry",i/2-o/2),c.setAttribute("stroke-width",o||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),a.append(c),this.container.append(a),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return u(this,h0)}addHighlightArea(){this.container.classList.add("highlightArea")}}h0=new WeakMap;var f0;class BR extends Bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});C(this,f0,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:s,borderStyle:i,popupRef:a},width:o,height:c}=this;if(!s)return this.container;const h=this.svgFactory.create(o,c,!0);let f=[];for(let g=0,x=s.length;g<x;g+=2){const y=s[g]-t[0],v=t[3]-s[g+1];f.push(`${y},${v}`)}f=f.join(" ");const m=k(this,f0,this.svgFactory.createElement(this.svgElementName));return m.setAttribute("points",f),m.setAttribute("stroke-width",i.width||1),m.setAttribute("stroke","transparent"),m.setAttribute("fill","transparent"),h.append(m),this.container.append(h),!a&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return u(this,f0)}addHighlightArea(){this.container.classList.add("highlightArea")}}f0=new WeakMap;class v9 extends BR{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class w9 extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}}
426var m0,$d,p0,bN;class l5 extends Bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});C(this,p0);C(this,m0,null);C(this,$d,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?Be.HIGHLIGHT:Be.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,rotation:s,inkLists:i,borderStyle:a,popupRef:o}}=this,{transform:c,width:h,height:f}=P(this,p0,bN).call(this,s,t),m=this.svgFactory.create(h,f,!0),g=k(this,m0,this.svgFactory.createElement("svg:g"));m.append(g),g.setAttribute("stroke-width",a.width||1),g.setAttribute("stroke-linecap","round"),g.setAttribute("stroke-linejoin","round"),g.setAttribute("stroke-miterlimit",10),g.setAttribute("stroke","transparent"),g.setAttribute("fill","transparent"),g.setAttribute("transform",c);for(let x=0,y=i.length;x<y;x++){const v=this.svgFactory.createElement(this.svgElementName);u(this,$d).push(v),v.setAttribute("points",i[x].join(",")),g.append(v)}return!o&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(m),this._editOnDoubleClick(),this.container}updateEdited(t){super.updateEdited(t);const{thickness:s,points:i,rect:a}=t,o=u(this,m0);if(s>=0&&o.setAttribute("stroke-width",s||1),i)for(let c=0,h=u(this,$d).length;c<h;c++)u(this,$d)[c].setAttribute("points",i[c].join(","));if(a){const{transform:c,width:h,height:f}=P(this,p0,bN).call(this,this.data.rotation,a);o.parentElement.setAttribute("viewBox",`0 0 ${h} ${f}`),o.setAttribute("transform",c)}}getElementsToTriggerPopup(){return u(this,$d)}addHighlightArea(){this.container.classList.add("highlightArea")}}m0=new WeakMap,$d=new WeakMap,p0=new WeakSet,bN=function(t,s){switch(t){case 90:return{transform:`rotate(90) translate(${-s[0]},${s[1]}) scale(1,-1)`,width:s[3]-s[1],height:s[2]-s[0]};case 180:return{transform:`rotate(180) translate(${-s[2]},${s[1]}) scale(1,-1)`,width:s[2]-s[0],height:s[3]-s[1]};case 270:return{transform:`rotate(270) translate(${-s[2]},${s[3]}) scale(1,-1)`,width:s[3]-s[1],height:s[2]-s[0]};default:return{transform:`translate(${-s[0]},${s[3]}) scale(1,-1)`,width:s[2]-s[0],height:s[3]-s[1]}}};class $R extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=Be.HIGHLIGHT}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),e){const s=document.createElement("mark");s.classList.add("overlaidText"),s.textContent=e,this.container.append(s)}return this.container}}class j9 extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("underlineAnnotation"),e){const s=document.createElement("u");s.classList.add("overlaidText"),s.textContent=e,this.container.append(s)}return this.container}}class N9 extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("squigglyAnnotation"),e){const s=document.createElement("u");s.classList.add("overlaidText"),s.textContent=e,this.container.append(s)}return this.container}}class k9 extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("strikeoutAnnotation"),e){const s=document.createElement("s");s.classList.add("overlaidText"),s.textContent=e,this.container.append(s)}return this.container}}class UR extends Bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=Be.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}
426var g0,x0,vN;class S9 extends Bt{constructor(t){var i;super(t,{isRenderable:!0});C(this,x0);C(this,g0,null);const{file:s}=this.data;this.filename=s.filename,this.content=s.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...s})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:s}=this;let i;s.hasAppearance||s.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(s.name)?"paperclip":"pushpin"}.svg`,s.fillAlpha&&s.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(s.fillAlpha*100)}%);`)),i.addEventListener("dblclick",P(this,x0,vN).bind(this)),k(this,g0,i);const{isMac:a}=ls.platform;return t.addEventListener("keydown",o=>{o.key==="Enter"&&(a?o.metaKey:o.ctrlKey)&&P(this,x0,vN).call(this)}),!s.popupRef&&this.hasPopupData?(this.hasOwnCommentButton=!0,this._createPopup()):i.classList.add("popupTriggerArea"),t.append(i),t}getElementsToTriggerPopup(){return u(this,g0)}addHighlightArea(){this.container.classList.add("highlightArea")}}g0=new WeakMap,x0=new WeakSet,vN=function(){var t;(t=this.downloadManager)==null||t.openOrDownloadData(this.content,this.filename)};var Ud,Hd,jf,Vl,y0,zd,rr,b0,_o,hb,jN;const b5=class b5{constructor({div:e,accessibilityManager:t,annotationCanvasMap:s,annotationEditorUIManager:i,page:a,viewport:o,structTreeLayer:c,commentManager:h,linkService:f,annotationStorage:m}){C(this,_o);C(this,Ud,null);C(this,Hd,null);C(this,jf,null);C(this,Vl,new Map);C(this,y0,null);C(this,zd,null);C(this,rr,[]);C(this,b0,!1);Y(this,"zIndex",0);this.div=e,k(this,Ud,t),k(this,Hd,s),k(this,y0,c||null),k(this,zd,f||null),k(this,jf,m||new i5),this.page=a,this.viewport=o,this._annotationEditorUIManager=i,this._commentManager=h||null}hasEditableAnnotations(){return u(this,Vl).size>0}async render(e){var c;const{annotations:t}=e,s=this.div;uu(s,this.viewport);const i=new Map,a=[],o={data:null,layer:s,linkService:u(this,zd),downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:e.renderForms!==!1,svgFactory:new Kb,annotationStorage:u(this,jf),enableComment:e.enableComment===!0,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const h of t){if(h.noHTML)continue;const f=h.annotationType===rs.POPUP;if(f){const x=i.get(h.id);if(!x)continue;if(!this._commentManager){a.push(h);continue}o.elements=x}else if(h.rect[2]===h.rect[0]||h.rect[3]===h.rect[1])continue;o.data=h;const m=L2.create(o);if(!m.isRenderable)continue;f||(u(this,rr).push(m),h.popupRef&&i.getOrInsertComputed(h.popupRef,Zk).push(m));const g=m.render();h.hidden&&(g.style.visibility="hidden"),m._isEditable&&(u(this,Vl).set(m.data.id,m),(c=this._annotationEditorUIManager)==null||c.renderAnnotationElement(m))}await P(this,_o,hb).call(this);for(const h of a){const f=o.elements=i.get(h.id);o.data=h;const m=L2.create(o);if(!m.isRenderable)continue;const g=m.render();m.contentElement.id=`${fh}${h.id}`,h.hidden&&(g.style.visibility="hidden"),f.at(-1).container.after(g)}P(this,_o,jN).call(this)}async addLinkAnnotations(e){const t={data:null,layer:this.div,linkService:u(this,zd),svgFactory:new Kb,parent:this};for(const s of e){s.borderStyle||(s.borderStyle=b5._defaultBorderStyle),t.data=s;const i=L2.create(t);i.isRenderable&&(i.render(),i.contentElement.id=`${fh}${s.id}`,u(this,rr).push(i))}await P(this,_o,hb).call(this)}update({viewport:e}){const t=this.div;this.viewport=e,uu(t,{rotation:e.rotation}),P(this,_o,jN).call(this),t.hidden=!1}getEditableAnnotations(){return u(this,Vl).values()}getEditableAnnotation(e){return u(this,Vl).get(e)}addFakeAnnotation(e){const{div:t}=this,{id:s,rotation:i}=e,a=new c9({data:{id:s,rect:e.getPDFRect(),rotation:i},editor:e,layer:t,parent:this,enableComment:!!this._commentManager,linkService:u(this,zd),annotationStorage:u(this,jf)});return a.render(),a.contentElement.id=`${fh}${s}`,a.createOrUpdatePopup(),u(this,rr).push(a),a}removeAnnotation(e){var i;const t=u(this,rr).findIndex(a=>a.data.id===e);if(t<0)return;const[s]=u(this,rr).splice(t,1);(i=u(this,Ud))==null||i.removePointerInTextLayer(s.contentElement)}updateFakeAnnotations(e){if(e.length!==0){for(const t of e)t.updateFakeAnnotationElement(this);P(this,_o,hb).call(this)}}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}static get _defaultBorderStyle(){return $e(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:Ju.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};Ud=new WeakMap,Hd=new WeakMap,jf=new WeakMap,Vl=new WeakMap,y0=new WeakMap,zd=new WeakMap,rr=new WeakMap,b0=new WeakMap,_o=new WeakSet,hb=async function(){var s,i,a;if(u(this,rr).length===0)return;this.div.replaceChildren();const e=[];
426if(!u(this,b0)){k(this,b0,!0);for(const{contentElement:o,data:{id:c}}of u(this,rr)){const h=o.id=`${fh}${c}`;e.push((s=u(this,y0))==null?void 0:s.getAriaAttributes(h).then(f=>{if(f)for(const[m,g]of f)o.setAttribute(m,g)}))}}u(this,rr).sort(({data:{rect:[o,c,h,f]}},{data:{rect:[m,g,x,y]}})=>{if(o===h&&c===f)return 1;if(m===x&&g===y)return-1;const v=f,j=c,N=(c+f)/2,S=y,A=g,E=(g+y)/2;if(N>=S&&E<=j)return-1;if(E>=v&&N<=A)return 1;const M=(o+h)/2,R=(m+x)/2;return M-R});const t=document.createDocumentFragment();for(const o of u(this,rr))t.append(o.container),this._commentManager?(a=((i=o.extraPopupElement)==null?void 0:i.popup)||o.popup)==null||a.renderCommentButton():o.extraPopupElement&&t.append(o.extraPopupElement.render());if(this.div.append(t),await Promise.all(e),u(this,Ud))for(const o of u(this,rr))u(this,Ud).addPointerInTextLayer(o.contentElement,!1)},jN=function(){var t;if(!u(this,Hd))return;const e=this.div;for(const[s,i]of u(this,Hd)){const a=e.querySelector(`[data-annotation-id="${s}"]`);if(!a)continue;i.className="annotationContent";const{firstChild:o}=a;o?o.nodeName==="CANVAS"?o.replaceWith(i):o.classList.contains("annotationContent")?o.after(i):o.before(i):a.append(i);const c=u(this,Vl).get(s);c&&(c._hasNoCanvas?((t=this._annotationEditorUIManager)==null||t.setMissingCanvas(s,a.id,i),c._hasNoCanvas=!1):c.canvas=i)}u(this,Hd).clear()};let wN=b5;const ky=/\r\n?|\n/g;var ir,v0,Vd,ar,cs,HR,zR,VR,fb,Eo,mb,pb,WR,kN,GR;const kt=class kt extends wt{constructor(t){super({...t,name:"freeTextEditor"});C(this,cs);C(this,ir,"");C(this,v0,`${this.id}-editor`);C(this,Vd,null);C(this,ar);Y(this,"_colorPicker",null);this.color=t.color||kt._defaultColor||wt._defaultLineColor,k(this,ar,t.fontSize||kt._defaultFontSize),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert"),this.canAddComment=!1}static get _keyboardManager(){const t=kt.prototype,s=o=>o.isEmpty(),i=hu.TRANSLATE_SMALL,a=hu.TRANSLATE_BIG;return $e(this,"_keyboardManager",new J0([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:s}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-a,0],checker:s}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[i,0],checker:s}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[a,0],checker:s}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:s}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-a],checker:s}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,i],checker:s}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,a],checker:s}]]))}static initialize(t,s){wt.initialize(t,s);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,s){switch(t){case ze.FREETEXT_SIZE:kt._defaultFontSize=s;break;case ze.FREETEXT_COLOR:kt._defaultColor=s;break}}updateParams(t,s){switch(t){case ze.FREETEXT_SIZE:P(this,cs,HR).call(this,s);break;case ze.FREETEXT_COLOR:P(this,cs,zR).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[ze.FREETEXT_SIZE,kt._defaultFontSize],[ze.FREETEXT_COLOR,kt._defaultColor||wt._defaultLineColor]]}get propertiesToUpdate(){return[[ze.FREETEXT_SIZE,u(this,ar)],[ze.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new qb(this)),[["colorPicker",this._colorPicker]]}get colorType(){return ze.FREETEXT_COLOR}onUpdatedColor(){var t;this.editorDiv.style.color=this.color,(t=this._colorPicker)==null||t.update(this.color),super.onUpdatedColor()}_translateEmpty(t,s){this._uiManager.translateSelectedEditors(t,s,!0)}getInitialTranslation(){const t=this.parentScale;return[-kt._internalPadding*t,-(kt._internalPadding+u(this,ar))*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),k(this,Vd,new AbortController);const t=this._uiManager.combinedSignal(u(this,Vd));return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t}),!0}disableEditMode(){var t;return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",u(this,v0)),this._isDraggable=!0,(t=u(this,Vd))==null||t.abort(),k(this,Vd,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(t){var s;this.width||(this.enableEditMode(),t&&this.editorDiv.focus(),(s=this._initialOptions)!=null&&s.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=u(this,ir),s=k(this,ir,P(this,cs,VR).call(this).trimEnd());if(t===s)return;const i=a=>
426{if(k(this,ir,a),!a){this.remove();return}P(this,cs,pb).call(this),this._uiManager.rebuild(this),P(this,cs,fb).call(this)};this.addCommands({cmd:()=>{i(s)},undo:()=>{i(t)},mustExec:!1}),P(this,cs,fb).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){kt._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let t,s;(this._isCopy||this.annotationElementId)&&(t=this.x,s=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",u(this,v0)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${u(this,ar)}px * var(--total-scale-factor))`,i.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[a,o]=this.parentDimensions;if(this.annotationElementId){const{position:c}=this._initialData;let[h,f]=this.getInitialTranslation();[h,f]=this.pageTranslationToScreen(h,f);const[m,g]=this.pageDimensions,[x,y]=this.pageTranslation;let v,j;switch(this.rotation){case 0:v=t+(c[0]-x)/m,j=s+this.height-(c[1]-y)/g;break;case 90:v=t+(c[0]-x)/m,j=s-(c[1]-y)/g,[h,f]=[f,-h];break;case 180:v=t-this.width+(c[0]-x)/m,j=s-(c[1]-y)/g,[h,f]=[-h,-f];break;case 270:v=t+(c[0]-x-this.height*g)/m,j=s+(c[1]-y-this.width*m)/g,[h,f]=[-f,h];break}this.setAt(v*a,j*o,h,f)}else this._moveAfterPaste(t,s);P(this,cs,pb).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){var v,j,N;const s=t.clipboardData||window.clipboardData,{types:i}=s;if(i.length===1&&i[0]==="text/plain")return;t.preventDefault();const a=P(v=kt,Eo,kN).call(v,s.getData("text")||"").replaceAll(ky,` 427`);if(!a)return;const o=window.getSelection();if(!o.rangeCount)return;this.editorDiv.normalize(),o.deleteFromDocument();const c=o.getRangeAt(0);if(!a.includes(` 428`)){c.insertNode(document.createTextNode(a)),this.editorDiv.normalize(),o.collapseToStart();return}const{startContainer:h,startOffset:f}=c,m=[],g=[];if(h.nodeType===Node.TEXT_NODE){const S=h.parentElement;if(g.push(h.nodeValue.slice(f).replaceAll(ky,"")),S!==this.editorDiv){let A=m;for(const E of this.editorDiv.childNodes){if(E===S){A=g;continue}A.push(P(j=kt,Eo,mb).call(j,E))}}m.push(h.nodeValue.slice(0,f).replaceAll(ky,""))}else if(h===this.editorDiv){let S=m,A=0;for(const E of this.editorDiv.childNodes)A++===f&&(S=g),S.push(P(N=kt,Eo,mb).call(N,E))}k(this,ir,`${m.join(` 429`)}${a}${g.join(` 430`)}`),P(this,cs,pb).call(this);const x=new Range;let y=Math.sumPrecise(m.map(S=>S.length));for(const{firstChild:S}of this.editorDiv.childNodes)if(S.nodeType===Node.TEXT_NODE){const A=S.nodeValue.length;if(y<=A){x.setStart(S,y),x.setEnd(S,y);break}y-=A}o.removeAllRanges(),o.addRange(x)}get contentDiv(){return this.editorDiv}getPDFRect(){const t=kt._internalPadding*this.parentScale;return this.getRect(t,t)}static async deserialize(t,s,i){var c;let a=null;if(t instanceof FR){const{data:{defaultAppearanceData:{fontSize:h,fontColor:f},rect:m,rotation:g,id:x,popupRef:y,richText:v,contentsObj:j,creationDate:N,modificationDate:S},textContent:A,textPosition:E,parent:{page:{pageNumber:M}}}=t;if(!A||A.length===0)return null;a=t={annotationType:Be.FREETEXT,color:Array.from(f),fontSize:h,value:A.join(` 431`),position:E,pageIndex:M-1,rect:m.slice(0),rotation:g,annotationElementId:x,id:x,deleted:!1,popupRef:y,comment:(j==null?void 0:j.str)||null,richText:v,creationDate:N,modificationDate:S}}const o=await super.deserialize(t,s,i);return k(o,ar,t.fontSize),o.color=me.makeHexColor(...t.color),k(o,ir,P(c=kt,Eo,kN).call(c,t.value)),o._initialData=a,t.comment&&o.setCommentData(t),o}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const s=wt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),i=Object.assign(super.serialize(t),{color:s,fontSize:u(this,ar),value:P(this,cs,WR).call(this)});return this.addComment(i),t?(i.isCopy=!0,i):this.annotationElementId&&!P(this,cs,GR).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(t){const s=super.renderAnnotationElement(t);if(!s)return null;const{style:i}=s;i.fontSize=`calc(${u(this,ar)}px * var(--total-scale-factor))`,i.color=this.color,s.replaceChildren();for(const a of u(this,ir).split(` 432`)){const o=document.createElement("div");o.append(a?document.createTextNode(a):document.createElement("br")),s.append(o)}return t.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:u(this,ir)}}),s}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}};ir=new WeakMap,v0=new WeakMap,Vd=new WeakMap,ar=new WeakMap,cs=new WeakSet,HR=function(t){const s=a=>{this.editorDiv.style.fontSize=`calc(${a}px * var(--total-scale-factor))`,this.translate(0,-(a-u(this,ar))
432*this.parentScale),k(this,ar,a),P(this,cs,fb).call(this)},i=u(this,ar);this.addCommands({cmd:s.bind(this,t),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ze.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},zR=function(t){const s=a=>{this.color=a,this.onUpdatedColor()},i=this.color;this.addCommands({cmd:s.bind(this,t),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ze.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},VR=function(){var i;const t=[];this.editorDiv.normalize();let s=null;for(const a of this.editorDiv.childNodes)(s==null?void 0:s.nodeType)===Node.TEXT_NODE&&a.nodeName==="BR"||(t.push(P(i=kt,Eo,mb).call(i,a)),s=a);return t.join(` 433`)},fb=function(){const[t,s]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:a,div:o}=this,c=o.style.display,h=o.classList.contains("hidden");o.classList.remove("hidden"),o.style.display="hidden",a.div.append(this.div),i=o.getBoundingClientRect(),o.remove(),o.style.display=c,o.classList.toggle("hidden",h)}this.rotation%180===this.parentRotation%180?(this.width=i.width/t,this.height=i.height/s):(this.width=i.height/t,this.height=i.width/s),this.fixAndSetPosition()},Eo=new WeakSet,mb=function(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(ky,"")},pb=function(){if(this.editorDiv.replaceChildren(),!!u(this,ir))for(const t of u(this,ir).split(` 434`)){const s=document.createElement("div");s.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(s)}},WR=function(){return u(this,ir).replaceAll("Â "," ")},kN=function(t){return t.replaceAll(" ","Â ")},GR=function(t){const{value:s,fontSize:i,color:a,pageIndex:o}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||t.value!==s||t.fontSize!==i||t.color.some((c,h)=>c!==a[h])||t.pageIndex!==o},C(kt,Eo),Y(kt,"_freeTextDefaultContent",""),Y(kt,"_internalPadding",0),Y(kt,"_defaultColor",null),Y(kt,"_defaultFontSize",10),Y(kt,"_type","freetext"),Y(kt,"_editorType",Be.FREETEXT);let NN=kt;class ve{toSVGPath(){it("Abstract method `toSVGPath` must be implemented.")}get box(){it("Abstract getter `box` must be implemented.")}serialize(e,t){it("Abstract method `serialize` must be implemented.")}static _rescale(e,t,s,i,a,o){o||(o=new Float32Array(e.length));for(let c=0,h=e.length;c<h;c+=2)o[c]=t+e[c]*i,o[c+1]=s+e[c+1]*a;return o}static _rescaleAndSwap(e,t,s,i,a,o){o||(o=new Float32Array(e.length));for(let c=0,h=e.length;c<h;c+=2)o[c]=t+e[c+1]*i,o[c+1]=s+e[c]*a;return o}static _translate(e,t,s,i){i||(i=new Float32Array(e.length));for(let a=0,o=e.length;a<o;a+=2)i[a]=t+e[a],i[a+1]=s+e[a+1];return i}static svgRound(e){return Math.round(e*1e4)}static _normalizePoint(e,t,s,i,a){switch(a){case 90:return[1-t/s,e/i];case 180:return[1-e/s,1-t/i];case 270:return[t/s,1-e/i];default:return[e/s,t/i]}}static _normalizePagePoint(e,t,s){switch(s){case 90:return[1-t,e];case 180:return[1-e,1-t];case 270:return[t,1-e];default:return[e,t]}}static createBezierPoints(e,t,s,i,a,o){return[(e+5*s)/6,(t+5*i)/6,(5*s+a)/6,(5*i+o)/6,(s+a)/2,(i+o)/2]}}Y(ve,"PRECISION",1e-4);var or,wi,Nf,kf,aa,Ke,Wd,Gd,w0,j0,Sf,Af,Wl,N0,kv,Sv,xs,yp,qR,KR,XR,YR,JR,QR;const Ba=class Ba{constructor({x:e,y:t},s,i,a,o,c=0){C(this,xs);C(this,or);C(this,wi,[]);C(this,Nf);C(this,kf);C(this,aa,[]);C(this,Ke,new Float32Array(18));C(this,Wd);C(this,Gd);C(this,w0);C(this,j0);C(this,Sf);C(this,Af);C(this,Wl,[]);k(this,or,s),k(this,Af,a*i),k(this,kf,o),u(this,Ke).set([NaN,NaN,NaN,NaN,e,t],6),k(this,Nf,c),k(this,j0,u(Ba,N0)*i),k(this,w0,u(Ba,Sv)*i),k(this,Sf,i),u(this,Wl).push(e,t)}isEmpty(){return isNaN(u(this,Ke)[8])}add({x:e,y:t}){var O;k(this,Wd,e),k(this,Gd,t);const[s,i,a,o]=u(this,or);let[c,h,f,m]=u(this,Ke).subarray(8,12);const g=e-f,x=t-m,y=Math.hypot(g,x);if(y<u(this,w0))return!1;const v=y-u(this,j0),j=v/y,N=j*g,S=j*x;let A=c,E=h;c=f,h=m,f+=N,m+=S,(O=u(this,Wl))==null||O.push(e,t);const M=-S/v,R=N/v,I=M*u(this,Af),F=R*u(this,Af);return u(this,Ke).set(u(this,Ke).subarray(2,8),0),u(this,Ke).set([f+I,m+F],4),u(this,Ke).set(u(this,Ke).subarray(14,18),12),u(this,Ke).set([f-I,m-F],16),isNaN(u(this,Ke)[6])?(u(this,aa).length===0&&(u(this,Ke).set([c+I,h+F],2),u(this,aa).push(NaN,NaN,NaN,NaN,(c+I-s)/a,(h+F-i)/o),u(this,Ke).set([c-I,h-F],14),u(this,wi).push(NaN,NaN,NaN,NaN,(c-I-s)/a,(h-F-i)/o)),u(this,Ke).set([A,E,c,h,f,m],6),!this.isEmpty()):(u(this,Ke).set([A,E,c,h,f,m],6),Math.abs(Math.atan2(E-
434h,A-c)-Math.atan2(S,N))<Math.PI/2?([c,h,f,m]=u(this,Ke).subarray(2,6),u(this,aa).push(NaN,NaN,NaN,NaN,((c+f)/2-s)/a,((h+m)/2-i)/o),[c,h,A,E]=u(this,Ke).subarray(14,18),u(this,wi).push(NaN,NaN,NaN,NaN,((A+c)/2-s)/a,((E+h)/2-i)/o),!0):([A,E,c,h,f,m]=u(this,Ke).subarray(0,6),u(this,aa).push(((A+5*c)/6-s)/a,((E+5*h)/6-i)/o,((5*c+f)/6-s)/a,((5*h+m)/6-i)/o,((c+f)/2-s)/a,((h+m)/2-i)/o),[f,m,c,h,A,E]=u(this,Ke).subarray(12,18),u(this,wi).push(((A+5*c)/6-s)/a,((E+5*h)/6-i)/o,((5*c+f)/6-s)/a,((5*h+m)/6-i)/o,((c+f)/2-s)/a,((h+m)/2-i)/o),!0))}toSVGPath(){if(this.isEmpty())return"";const e=u(this,aa),t=u(this,wi);if(isNaN(u(this,Ke)[6])&&!this.isEmpty())return P(this,xs,qR).call(this);const s=[];s.push(`M${e[4]} ${e[5]}`);for(let i=6;i<e.length;i+=6)isNaN(e[i])?s.push(`L${e[i+4]} ${e[i+5]}`):s.push(`C${e[i]} ${e[i+1]} ${e[i+2]} ${e[i+3]} ${e[i+4]} ${e[i+5]}`);P(this,xs,XR).call(this,s);for(let i=t.length-6;i>=6;i-=6)isNaN(t[i])?s.push(`L${t[i+4]} ${t[i+5]}`):s.push(`C${t[i]} ${t[i+1]} ${t[i+2]} ${t[i+3]} ${t[i+4]} ${t[i+5]}`);return P(this,xs,KR).call(this,s),s.join(" ")}newFreeDrawOutline(e,t,s,i,a,o){return new ZR(e,t,s,i,a,o)}getOutlines(){var g;const e=u(this,aa),t=u(this,wi),s=u(this,Ke),[i,a,o,c]=u(this,or),h=new Float32Array((((g=u(this,Wl))==null?void 0:g.length)??0)+2);for(let x=0,y=h.length-2;x<y;x+=2)h[x]=(u(this,Wl)[x]-i)/o,h[x+1]=(u(this,Wl)[x+1]-a)/c;if(h[h.length-2]=(u(this,Wd)-i)/o,h[h.length-1]=(u(this,Gd)-a)/c,isNaN(s[6])&&!this.isEmpty())return P(this,xs,YR).call(this,h);const f=new Float32Array(u(this,aa).length+24+u(this,wi).length);let m=e.length;for(let x=0;x<m;x+=2){if(isNaN(e[x])){f[x]=f[x+1]=NaN;continue}f[x]=e[x],f[x+1]=e[x+1]}m=P(this,xs,QR).call(this,f,m);for(let x=t.length-6;x>=6;x-=6)for(let y=0;y<6;y+=2){if(isNaN(t[x+y])){f[m]=f[m+1]=NaN,m+=2;continue}f[m]=t[x+y],f[m+1]=t[x+y+1],m+=2}return P(this,xs,JR).call(this,f,m),this.newFreeDrawOutline(f,h,u(this,or),u(this,Sf),u(this,Nf),u(this,kf))}};or=new WeakMap,wi=new WeakMap,Nf=new WeakMap,kf=new WeakMap,aa=new WeakMap,Ke=new WeakMap,Wd=new WeakMap,Gd=new WeakMap,w0=new WeakMap,j0=new WeakMap,Sf=new WeakMap,Af=new WeakMap,Wl=new WeakMap,N0=new WeakMap,kv=new WeakMap,Sv=new WeakMap,xs=new WeakSet,yp=function(){const e=u(this,Ke).subarray(4,6),t=u(this,Ke).subarray(16,18),[s,i,a,o]=u(this,or);return[(u(this,Wd)+(e[0]-t[0])/2-s)/a,(u(this,Gd)+(e[1]-t[1])/2-i)/o,(u(this,Wd)+(t[0]-e[0])/2-s)/a,(u(this,Gd)+(t[1]-e[1])/2-i)/o]},qR=function(){const[e,t,s,i]=u(this,or),[a,o,c,h]=P(this,xs,yp).call(this);return`M${(u(this,Ke)[2]-e)/s} ${(u(this,Ke)[3]-t)/i} L${(u(this,Ke)[4]-e)/s} ${(u(this,Ke)[5]-t)/i} L${a} ${o} L${c} ${h} L${(u(this,Ke)[16]-e)/s} ${(u(this,Ke)[17]-t)/i} L${(u(this,Ke)[14]-e)/s} ${(u(this,Ke)[15]-t)/i} Z`},KR=function(e){const t=u(this,wi);e.push(`L${t[4]} ${t[5]} Z`)},XR=function(e){const[t,s,i,a]=u(this,or),o=u(this,Ke).subarray(4,6),c=u(this,Ke).subarray(16,18),[h,f,m,g]=P(this,xs,yp).call(this);e.push(`L${(o[0]-t)/i} ${(o[1]-s)/a} L${h} ${f} L${m} ${g} L${(c[0]-t)/i} ${(c[1]-s)/a}`)},YR=function(e){const t=u(this,Ke),[s,i,a,o]=u(this,or),[c,h,f,m]=P(this,xs,yp).call(this),g=new Float32Array(36);return g.set([NaN,NaN,NaN,NaN,(t[2]-s)/a,(t[3]-i)/o,NaN,NaN,NaN,NaN,(t[4]-s)/a,(t[5]-i)/o,NaN,NaN,NaN,NaN,c,h,NaN,NaN,NaN,NaN,f,m,NaN,NaN,NaN,NaN,(t[16]-s)/a,(t[17]-i)/o,NaN,NaN,NaN,NaN,(t[14]-s)/a,(t[15]-i)/o],0),this.newFreeDrawOutline(g,e,u(this,or),u(this,Sf),u(this,Nf),u(this,kf))},JR=function(e,t){const s=u(this,wi);return e.set([NaN,NaN,NaN,NaN,s[4],s[5]],t),t+=6},QR=function(e,t){const s=u(this,Ke).subarray(4,6),i=u(this,Ke).subarray(16,18),[a,o,c,h]=u(this,or),[f,m,g,x]=P(this,xs,yp).call(this);return e.set([NaN,NaN,NaN,NaN,(s[0]-a)/c,(s[1]-o)/h,NaN,NaN,NaN,NaN,f,m,NaN,NaN,NaN,NaN,g,x,NaN,NaN,NaN,NaN,(i[0]-a)/c,(i[1]-o)/h],t),t+=24},C(Ba,N0,8),C(Ba,kv,2),C(Ba,Sv,u(Ba,N0)+u(Ba,kv));let Xb=Ba;var _f,qd,go,k0,lr,S0,es,Av,eM;class ZR extends ve{constructor(t,s,i,a,o,c){super();C(this,Av);C(this,_f);C(this,qd,new Float32Array(4));C(this,go);C(this,k0);C(this,lr);C(this,S0);C(this,es);k(this,es,t),k(this,lr,s),k(this,_f,i),k(this,S0,a),k(this,go,o),k(this,k0,c),this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],P(this,Av,eM).call(this,c);const[h,f,m,g]=u(this,qd);for(let x=0,y=t.length;x<y;x+=2)t[x]=(t[x]-h)/m,t[x+1]=(t[x+1]-f)/g;for(let x=0,y=s.length;x<y;x+=2)s[x]=(s[x]-h)/m,s[x+1]=(s[x+1]-f)/g}toSVGPath(){const t=[`M${u(this,es)[4]} ${u(this,es)[5]}`];for(let s=6,i=u(this,es).length;s<i;s+=6){if(isNaN(u(this,es)[s])){t.push(`L${u(this,es)[s+4]} ${u(this,es)[s+5]}`);continue}t.push(`C${u(this,es)[s]} ${u(this,es)[s+1]} ${u(this,es)[s+2]} ${u(this,es)[s+3]} ${u(this,es)[s+4]} ${u(this,es)[s+5]}`)}return t.push("Z"),t.join(" ")}serialize([t,s,i,a],o){const c=i-t,h=a-s;let f,m;switch(o){case 0:f=ve._rescale(u(this,es),t,a,c,-h),m=ve._rescale(u(this,lr),t,a,c,-h);break;case 90:f=ve._rescaleAndSwap(u(this,es),t,s,c,h),m=ve._rescaleAndSwap(u(this,lr),t,s,c,h);break;case 180:f=ve._rescale(u(this,es),i,s,-c,h),m=ve._rescale(u(this,lr),i,s,-c,h);break;case 270:f=ve._rescaleAndSwap(u(this,es),i,a,-c,-h),m=ve._rescaleAndSwap(u(this,lr),i,a,-c,-h);break}return{outline:Array.from(f),points:[Array.from(m)]}}get box(){return u(this,qd)}newOutliner(t,s,i,a,o,c=0){return new Xb(t,s,i,a,o,c)}getNewOutline(t,s){const[i,a,o,c]=u(this,qd),[h,f,m,g]=u(this,_f),x=o*m,y=c*g,v=i*m+h,j=a*g+f,N=this.newOutliner({x:u(this,lr)[0]*x+v,y:u(this,lr)[1]*y+j},u(this,_f),u(this,S0),t,u(this,k0),s??u(this,go));for(let S=2;S<u(this,lr).length;S+=2)N.add({x:u(this,lr)[S]*x+v,y:u(this,lr)[S+1]*y+j});return N.getOutlines()}}_f=new WeakMap,qd=new WeakMap,go=new WeakMap,k0=new WeakMap,lr=new WeakMap,S0=new WeakMap,es=new WeakMap,Av=new WeakSet,eM=function(t){const s=u(this,es);
434let i=s[4],a=s[5];const o=[i,a,i,a];let c=i,h=a,f=i,m=a;const g=t?Math.max:Math.min,x=new Float32Array(4);for(let v=6,j=s.length;v<j;v+=6){const N=s[v+4],S=s[v+5];isNaN(s[v])?(me.pointBoundingBox(N,S,o),h>S?(c=N,h=S):h===S&&(c=g(c,N)),m<S?(f=N,m=S):m===S&&(f=g(f,N))):(x.set(ko,0),me.bezierBoundingBox(i,a,...s.slice(v,v+6),x),me.rectBoundingBox(...x,o),h>x[1]?(c=x[0],h=x[1]):h===x[1]&&(c=g(c,x[0])),m<x[3]?(f=x[2],m=x[3]):m===x[3]&&(f=g(f,x[2]))),i=N,a=S}const y=u(this,qd);y[0]=o[0]-u(this,go),y[1]=o[1]-u(this,go),y[2]=o[2]-o[0]+2*u(this,go),y[3]=o[3]-o[1]+2*u(this,go),this.firstPoint=[c,h],this.lastPoint=[f,m]};var A0,_0,E0,Gl,ji,wn,tM,gb,sM,nM,AN;class SN{constructor(e,t=0,s=0,i=!0){C(this,wn);C(this,A0);C(this,_0);C(this,E0);C(this,Gl,[]);C(this,ji,[]);const a=ko.slice(),o=10**-4;for(const{x:j,y:N,width:S,height:A}of e){const E=Math.floor((j-t)/o)*o,M=Math.ceil((j+S+t)/o)*o,R=Math.floor((N-t)/o)*o,I=Math.ceil((N+A+t)/o)*o,F=[E,R,I,!0],D=[M,R,I,!1];u(this,Gl).push(F,D),me.rectBoundingBox(E,R,M,I,a)}const c=a[2]-a[0]+2*s,h=a[3]-a[1]+2*s,f=a[0]-s,m=a[1]-s;let g=i?-1/0:1/0,x=1/0;const y=u(this,Gl).at(i?-1:-2),v=[y[0],y[2]];for(const j of u(this,Gl)){const[N,S,A,E]=j;!E&&i?S<x?(x=S,g=N):S===x&&(g=Math.max(g,N)):E&&!i&&(S<x?(x=S,g=N):S===x&&(g=Math.min(g,N))),j[0]=(N-f)/c,j[1]=(S-m)/h,j[2]=(A-m)/h}k(this,A0,new Float32Array([f,m,c,h])),k(this,_0,[g,x]),k(this,E0,v)}getOutlines(){u(this,Gl).sort((t,s)=>t[0]-s[0]||t[1]-s[1]||t[2]-s[2]);const e=[];for(const t of u(this,Gl))t[3]?(e.push(...P(this,wn,AN).call(this,t)),P(this,wn,sM).call(this,t)):(P(this,wn,nM).call(this,t),e.push(...P(this,wn,AN).call(this,t)));return P(this,wn,tM).call(this,e)}}A0=new WeakMap,_0=new WeakMap,E0=new WeakMap,Gl=new WeakMap,ji=new WeakMap,wn=new WeakSet,tM=function(e){const t=[],s=new Set;for(const o of e){const[c,h,f]=o;t.push([c,h,o],[c,f,o])}t.sort((o,c)=>o[1]-c[1]||o[0]-c[0]);for(let o=0,c=t.length;o<c;o+=2){const h=t[o][2],f=t[o+1][2];h.push(f),f.push(h),s.add(h),s.add(f)}const i=[];let a;for(;s.size>0;){const o=s.values().next().value;let[c,h,f,m,g]=o;s.delete(o);let x=c,y=h;for(a=[c,f],i.push(a);;){let v;if(s.has(m))v=m;else if(s.has(g))v=g;else break;s.delete(v),[c,h,f,m,g]=v,x!==c&&(a.push(x,y,c,y===h?h:f),x=c),y=y===h?f:h}a.push(x,y)}return new A9(i,u(this,A0),u(this,_0),u(this,E0))},gb=function(e){const t=u(this,ji);let s=0,i=t.length-1;for(;s<=i;){const a=s+i>>1,o=t[a][0];if(o===e)return a;o<e?s=a+1:i=a-1}return i+1},sM=function([,e,t]){const s=P(this,wn,gb).call(this,e);u(this,ji).splice(s,0,[e,t])},nM=function([,e,t]){const s=P(this,wn,gb).call(this,e);for(let i=s;i<u(this,ji).length;i++){const[a,o]=u(this,ji)[i];if(a!==e)break;if(a===e&&o===t){u(this,ji).splice(i,1);return}}for(let i=s-1;i>=0;i--){const[a,o]=u(this,ji)[i];if(a!==e)break;if(a===e&&o===t){u(this,ji).splice(i,1);return}}},AN=function(e){const[t,s,i]=e,a=[[t,s,i]],o=P(this,wn,gb).call(this,i);for(let c=0;c<o;c++){const[h,f]=u(this,ji)[c];for(let m=0,g=a.length;m<g;m++){const[,x,y]=a[m];if(!(f<=x||y<=h)){if(x>=h){if(y>f)a[m][1]=f;else{if(g===1)return[];a.splice(m,1),m--,g--}continue}a[m][2]=h,y>f&&a.push([t,f,y])}}}return a};var C0,Ef;class A9 extends ve{constructor(t,s,i,a){super();C(this,C0);C(this,Ef);k(this,Ef,t),k(this,C0,s),this.firstPoint=i,this.lastPoint=a}toSVGPath(){const t=[];for(const s of u(this,Ef)){let[i,a]=s;t.push(`M${i} ${a}`);for(let o=2;o<s.length;o+=2){const c=s[o],h=s[o+1];c===i?(t.push(`V${h}`),a=h):h===a&&(t.push(`H${c}`),i=c)}t.push("Z")}return t.join(" ")}serialize([t,s,i,a],o){const c=[],h=i-t,f=a-s;for(const m of u(this,Ef)){const g=new Array(m.length);for(let x=0;x<m.length;x+=2)g[x]=t+m[x]*h,g[x+1]=a-m[x+1]*f;c.push(g)}return c}get box(){return u(this,C0)}get classNamesForOutlining(){return["highlightOutline"]}}C0=new WeakMap,Ef=new WeakMap;class _N extends Xb{newFreeDrawOutline(e,t,s,i,a,o){return new _9(e,t,s,i,a,o)}}class _9 extends ZR{newOutliner(e,t,s,i,a,o=0){return new _N(e,t,s,i,a,o)}}var Cf,T0,xo,Kd,P0,Dn,R0,M0,Xd,cr,dr,$s,Tf,Pf,nn,Rf,Vr,I0,Ve,EN,xb,rM,iM,aM,CN,Rc,Gr,rh,oM,yb,bb,lM,cM,dM,uM,hM;const nt=class nt extends wt{constructor(t){super({...t,name:"highlightEditor"});C(this,Ve);C(this,Cf,null);C(this,T0,0);C(this,xo);C(this,Kd,null);C(this,P0,null);C(this,Dn,null);C(this,R0,null);C(this,M0,0);C(this,Xd,null);C(this,cr,null);C(this,dr,null);C(this,$s,!1);C(this,Tf,null);C(this,Pf,null);C(this,nn,null);C(this,Rf,"");C(this,Vr);C(this,I0,"");this.color=t.color||nt._defaultColor,k(this,Vr,t.thickness||nt._defaultThickness),this.opacity=t.opacity||nt._defaultOpacity,k(this,xo,t.boxes||null),k(this,I0,t.methodOfCreation||""),k(this,Rf,t.text||""),this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",t.highlightId>-1?(k(this,$s,!0),P(this,Ve,xb).call(this,t),P(this,Ve,Rc).call(this)):u(this,xo)&&(k(this,Cf,t.anchorNode),k(this,T0,t.anchorOffset),k(this,R0,t.focu
434sNode),k(this,M0,t.focusOffset),P(this,Ve,EN).call(this),P(this,Ve,Rc).call(this),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}static get _keyboardManager(){const t=nt.prototype;return $e(this,"_keyboardManager",new J0([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:u(this,$s)?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:u(this,Vr),methodOfCreation:u(this,I0)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}static initialize(t,s){var i;wt.initialize(t,s),nt._defaultColor||(nt._defaultColor=((i=s.highlightColors)==null?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(t,s){switch(t){case ze.HIGHLIGHT_COLOR:nt._defaultColor=s;break;case ze.HIGHLIGHT_THICKNESS:nt._defaultThickness=s;break}}translateInPage(t,s){}get toolbarPosition(){return u(this,Pf)}get commentButtonPosition(){return u(this,Tf)}updateParams(t,s){switch(t){case ze.HIGHLIGHT_COLOR:P(this,Ve,rM).call(this,s);break;case ze.HIGHLIGHT_THICKNESS:P(this,Ve,iM).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[ze.HIGHLIGHT_COLOR,nt._defaultColor],[ze.HIGHLIGHT_THICKNESS,nt._defaultThickness]]}get propertiesToUpdate(){return[[ze.HIGHLIGHT_COLOR,this.color||nt._defaultColor],[ze.HIGHLIGHT_THICKNESS,u(this,Vr)||nt._defaultThickness],[ze.HIGHLIGHT_FREE,u(this,$s)]]}onUpdatedColor(){var t,s;(t=this.parent)==null||t.drawLayer.updateProperties(u(this,dr),{root:{fill:this.color,"fill-opacity":this.opacity}}),(s=u(this,P0))==null||s.updateColor(this.color),super.onUpdatedColor()}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",k(this,P0,new Gb({editor:this}))]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(P(this,Ve,bb).call(this))}getBaseTranslation(){return[0,0]}getRect(t,s){return super.getRect(t,s,P(this,Ve,bb).call(this))}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),t&&this.div.focus()}remove(){P(this,Ve,CN).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(P(this,Ve,Rc).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){var i;let s=!1;this.parent&&!t?P(this,Ve,CN).call(this):t&&(P(this,Ve,Rc).call(this,t),s=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(t),this.show(this._isVisible),s&&this.select()}rotate(t){var a,o,c;const{drawLayer:s}=this.parent;let i;u(this,$s)?(t=(t-this.rotation+360)%360,i=P(a=nt,Gr,rh).call(a,u(this,cr).box,t)):i=P(o=nt,Gr,rh).call(o,[this.x,this.y,this.width,this.height],t),s.updateProperties(u(this,dr),{bbox:i,root:{"data-main-rotation":t}}),s.updateProperties(u(this,nn),{bbox:P(c=nt,Gr,rh).call(c,u(this,Dn).box,t),root:{"data-main-rotation":t}})}render(){if(this.div)return this.div;const t=super.render();u(this,Rf)&&(t.setAttribute("aria-label",u(this,Rf)),t.setAttribute("role","mark")),u(this,$s)?t.classList.add("free"):this.div.addEventListener("keydown",P(this,Ve,oM).bind(this),{signal:this._uiManager._signal});const s=k(this,Xd,document.createElement("div"));return t.append(s),s.setAttribute("aria-hidden","true"),s.className="internal",s.style.clipPath=u(this,Kd),this.setDims(),vP(this,u(this,Xd),["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){var t;this.isSelected||(t=this.parent)==null||t.drawLayer.updateProperties(u(this,nn),{rootClass:{hovered:!0}})}pointerleave(){var t;this.isSelected||(t=this.parent)==null||t.drawLayer.updateProperties(u(this,nn),{rootClass:{hovered:!1}})}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:P(this,Ve,yb).call(this,!0);break;case 1:case 3:P(this,Ve,yb).call(this,!1);break}}select(){var t;super.select(),u(this,nn)&&((t=this.parent)==null||t.drawLayer.updateProperties(u(this,nn),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var t;super.unselect(),u(this,nn)&&((t=this.parent)==null||t.drawLayer.updateProperties(u(this,nn),{rootClass:{selected:!1}}),u(this,$s)||P(this,Ve,yb).call(this,!1))}get _mustFixPosition(){return!u(this,$s)}show(t=this._isVisible){super.show(t),this.parent&&(this.parent.drawLayer.updateProperties(u(this,dr),{rootClass:{hidden:!t}}),this.parent.drawLayer.updateProperties(u(this,nn),{rootClass:{hidden:!t}}))}static startHighlighting(t,s,{target:i,x:a,y:o}){const{x:c,y:h,width:f,height:m}=i.getBoundingClientRect(),g=new AbortController,x=t.combinedSignal(g),y=v=>{g.abort(),P(this,Gr,uM).call(this,t,v)}
434;window.addEventListener("blur",y,{signal:x}),window.addEventListener("pointerup",y,{signal:x}),window.addEventListener("pointerdown",Ot,{capture:!0,passive:!1,signal:x}),window.addEventListener("contextmenu",Jr,{signal:x}),i.addEventListener("pointermove",P(this,Gr,dM).bind(this,t),{signal:x}),this._freeHighlight=new _N({x:a,y:o},[c,h,f,m],t.scale,this._defaultThickness/2,s,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static async deserialize(t,s,i){var N,S,A,E;let a=null;if(t instanceof $R){const{data:{quadPoints:M,rect:R,rotation:I,id:F,color:D,opacity:O,popupRef:$,richText:z,contentsObj:re,creationDate:he,modificationDate:de},parent:{page:{pageNumber:fe}}}=t;a=t={annotationType:Be.HIGHLIGHT,color:Array.from(D),opacity:O,quadPoints:M,boxes:null,pageIndex:fe-1,rect:R.slice(0),rotation:I,annotationElementId:F,id:F,deleted:!1,popupRef:$,richText:z,comment:(re==null?void 0:re.str)||null,creationDate:he,modificationDate:de}}else if(t instanceof l5){const{data:{inkLists:M,rect:R,rotation:I,id:F,color:D,borderStyle:{rawWidth:O},popupRef:$,richText:z,contentsObj:re,creationDate:he,modificationDate:de},parent:{page:{pageNumber:fe}}}=t;a=t={annotationType:Be.HIGHLIGHT,color:Array.from(D),thickness:O,inkLists:M,boxes:null,pageIndex:fe-1,rect:R.slice(0),rotation:I,annotationElementId:F,id:F,deleted:!1,popupRef:$,richText:z,comment:(re==null?void 0:re.str)||null,creationDate:he,modificationDate:de}}const{color:o,quadPoints:c,inkLists:h,outlines:f,opacity:m}=t,g=await super.deserialize(t,s,i);g.color=me.makeHexColor(...o),g.opacity=m||1,h&&k(g,Vr,t.thickness),g._initialData=a,t.comment&&g.setCommentData(t);const[x,y]=g.pageDimensions,[v,j]=g.pageTranslation;if(c){const M=k(g,xo,[]);for(let R=0;R<c.length;R+=8)M.push({x:(c[R]-v)/x,y:1-(c[R+1]-j)/y,width:(c[R+2]-c[R])/x,height:(c[R+1]-c[R+5])/y});P(N=g,Ve,EN).call(N),P(S=g,Ve,Rc).call(S),g.rotate(g.rotation)}else if(h||f){k(g,$s,!0);const M=(h||f.points)[0],R={x:M[0]-v,y:y-(M[1]-j)},I=new _N(R,[0,0,x,y],1,u(g,Vr)/2,!0,.001);for(let O=0,$=M.length;O<$;O+=2)R.x=M[O]-v,R.y=y-(M[O+1]-j),I.add(R);const{id:F,clipPathId:D}=s.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:g.color,"fill-opacity":g._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:I.toSVGPath()}},!0,!0);P(A=g,Ve,xb).call(A,{highlightOutlines:I.getOutlines(),highlightId:F,clipPathId:D}),P(E=g,Ve,Rc).call(E),g.rotate(g.parentRotation)}return g}serialize(t=!1){if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();const s=wt._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),i=super.serialize(t);return Object.assign(i,{color:s,opacity:this.opacity,thickness:u(this,Vr),quadPoints:P(this,Ve,lM).call(this),outlines:P(this,Ve,cM).call(this,i.rect)}),this.addComment(i),this.annotationElementId&&!P(this,Ve,hM).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}};Cf=new WeakMap,T0=new WeakMap,xo=new WeakMap,Kd=new WeakMap,P0=new WeakMap,Dn=new WeakMap,R0=new WeakMap,M0=new WeakMap,Xd=new WeakMap,cr=new WeakMap,dr=new WeakMap,$s=new WeakMap,Tf=new WeakMap,Pf=new WeakMap,nn=new WeakMap,Rf=new WeakMap,Vr=new WeakMap,I0=new WeakMap,Ve=new WeakSet,EN=function(){const t=new SN(u(this,xo),.001);k(this,cr,t.getOutlines()),[this.x,this.y,this.width,this.height]=u(this,cr).box;const s=new SN(u(this,xo),.0025,.001,this._uiManager.direction==="ltr");k(this,Dn,s.getOutlines());const{firstPoint:i}=u(this,cr);k(this,Tf,[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height]);const{lastPoint:a}=u(this,Dn);k(this,Pf,[(a[0]-this.x)/this.width,(a[1]-this.y)/this.height])},xb=function({highlightOutlines:t,highlightId:s,clipPathId:i}){var x,y;if(k(this,cr,t),k(this,Dn,t.getNewOutline(u(this,Vr)/2+1.5,.0025)),s>=0)k(this,dr,s),k(this,Kd,i),this.parent.drawLayer.finalizeDraw(s,{bbox:t.box,path:{d:t.toSVGPath()}}),k(this,nn,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:u(this,Dn).box,path:{d:u(this,Dn).toSVGPath()}},!0));else if(this.parent){const v=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(u(this,dr),{bbox:P(x=nt,Gr,rh).call(x,u(this,cr).box,(v-this.rotation+360)%360),path:{d:t.toSVGPath()}}),this.parent.drawLayer.updateProperties(u(this,nn),{bbox:P(y=nt,Gr,rh).call(y,u(this,Dn).box,v),path:{d:u(this,Dn).toSVGPath()}})}const[o,c,h,f]=t.box;switch(this.rotation){case 0:this.x=o,this.y=c,this.width=h,this.height=f;break;case 90:{const[v,j]=this.parentDimensions;this.x=c,this.y=1-o,this.width=h*j/v,this.height=f*v/j;break}case 180:this.x=1-o,this.y=1-c,this.width=h,this.height=f;break;case 270:{const[v,j]=this.parentDimensions;this.x=1-c,this.y=o,this.width=h*j/v,this.height=f*v/j;break}}const{firstPoint:m}=t;k(this,Tf,[(m[0]-o)/h,(m[1]-c)/f]);const{lastPoint:g}=u(this,Dn);k(this,Pf,[(g[0]-o)/h,(g[1]-c)/f])},rM=function(t){const s=(o,c)=>{this.color=o,this.opacity=c,this.onUpdatedColor()},i=this.color,a=this.opacity;this.addCommands({cmd:s.bind(this,t,nt._defaultOpacity),undo:s.bind(this,i,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ze.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(t)},!0)},iM=function(t){const s=u(this,Vr),i=a=>{k(this,Vr,a),P(this,Ve,aM).call(this,a)};this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,s),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ze.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)},aM=function(t){u(this,$s)&&(P(this,Ve,xb).call(this,{highlightOutlines:u(this,cr).getNewOutline(t/2)}),this.fixAndSetPosition(),this.setDims())},CN=function(){u(this,dr)===null||!this.parent||(this.parent.drawLayer.remove(u(this,dr)),k(this,dr,null),this.parent.drawLayer.remove(u(this,nn)),k(this,nn,null))},Rc=function(t=this.parent){u(this,dr)===null&&({id:ss(this,dr)._,clipPathId:ss(this,Kd)._}=t.drawLayer.draw({bbox:u(this,cr).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:u(this,$s)},path:{d:u(this,cr).toSVGPath()}},!1,!0),k(this,nn,t.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:u(this,$s)},bbox:u(this,Dn).box,path:{d:u(this,Dn).toSVGPath()}}
434,u(this,$s))),u(this,Xd)&&(u(this,Xd).style.clipPath=u(this,Kd)))},Gr=new WeakSet,rh=function([t,s,i,a],o){switch(o){case 90:return[1-s-a,t,a,i];case 180:return[1-t-i,1-s-a,i,a];case 270:return[s,1-t-i,a,i]}return[t,s,i,a]},oM=function(t){nt._keyboardManager.exec(this,t)},yb=function(t){if(!u(this,Cf))return;const s=window.getSelection();t?s.setPosition(u(this,Cf),u(this,T0)):s.setPosition(u(this,R0),u(this,M0))},bb=function(){return u(this,$s)?this.rotation:0},lM=function(){if(u(this,$s))return null;const[t,s]=this.pageDimensions,[i,a]=this.pageTranslation,o=u(this,xo),c=new Float32Array(o.length*8);let h=0;for(const{x:f,y:m,width:g,height:x}of o){const y=f*t+i,v=(1-m)*s+a;c[h]=c[h+4]=y,c[h+1]=c[h+3]=v,c[h+2]=c[h+6]=y+g*t,c[h+5]=c[h+7]=v-x*s,h+=8}return c},cM=function(t){return u(this,cr).serialize(t,P(this,Ve,bb).call(this))},dM=function(t,s){this._freeHighlight.add(s)&&t.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},uM=function(t,s){this._freeHighlight.isEmpty()?t.drawLayer.remove(this._freeHighlightId):t.createAndAddNewEditor(s,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},hM=function(t){const{color:s}=this._initialData;return this.hasEditedComment||t.color.some((i,a)=>i!==s[a])},C(nt,Gr),Y(nt,"_defaultColor",null),Y(nt,"_defaultOpacity",1),Y(nt,"_defaultThickness",12),Y(nt,"_type","highlight"),Y(nt,"_editorType",Be.HIGHLIGHT),Y(nt,"_freeHighlightId",-1),Y(nt,"_freeHighlight",null),Y(nt,"_freeHighlightClipId","");let Yb=nt;var Yd;class fM{constructor(){C(this,Yd,Object.create(null))}updateProperty(e,t){this[e]=t,this.updateSVGProperty(e,t)}updateProperties(e){if(e)for(const[t,s]of Object.entries(e))t.startsWith("_")||this.updateProperty(t,s)}updateSVGProperty(e,t){u(this,Yd)[e]=t}toSVGProperties(){const e=u(this,Yd);return k(this,Yd,Object.create(null)),{root:e}}reset(){k(this,Yd,Object.create(null))}updateAll(e=this){this.updateProperties(e)}clone(){it("Not implemented")}}Yd=new WeakMap;var fn,Mf,Ss,Jd,Qd,Ze,TN,PN,RN,bp,mM,vb,vp,ih;const Je=class Je extends wt{constructor(t){super(t);C(this,Ze);C(this,fn,null);C(this,Mf);Y(this,"_colorPicker",null);Y(this,"_drawId",null);k(this,Mf,t.mustBeCommitted||!1),this._addOutlines(t)}onUpdatedColor(){var t;(t=this._colorPicker)==null||t.update(this.color),super.onUpdatedColor()}onUpdatedOpacity(){var t,s;(s=(t=this._colorPicker)==null?void 0:t.updateOpacity)==null||s.call(t,this.opacity)}_addOutlines(t){t.drawOutlines&&(P(this,Ze,TN).call(this,t),P(this,Ze,bp).call(this))}static _mergeSVGProperties(t,s){const i=new Set(Object.keys(t));for(const[a,o]of Object.entries(s))i.has(a)?Object.assign(t[a],o):t[a]=o;return t}static getDefaultDrawingOptions(t){it("Not implemented")}static get typesMap(){it("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(t,s){const i=this.typesMap.get(t);i&&this._defaultDrawingOptions.updateProperty(i,s),this._currentParent&&(u(Je,Ss).updateProperty(i,s),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(t,s){const i=this.constructor.typesMap.get(t);i&&this._updateProperty(t,i,s)}static get defaultPropertiesToUpdate(){const t=[],s=this._defaultDrawingOptions;for(const[i,a]of this.typesMap)t.push([i,s[a]]);return t}get propertiesToUpdate(){const t=[],{_drawingOptions:s}=this;for(const[i,a]of this.constructor.typesMap)t.push([i,s[a]]);return t}_updateProperty(t,s,i){const a=this._drawingOptions,o=a[s],c=h=>{var m;a.updateProperty(s,h);const f=u(this,fn).updateProperty(s,h);f&&P(this,Ze,vp).call(this,f),(m=this.parent)==null||m.drawLayer.updateProperties(this._drawId,a.toSVGProperties()),t===this.colorType?this.onUpdatedColor():t===this.opacityType&&this.onUpdatedOpacity()};this.addCommands({cmd:c.bind(this,i),undo:c.bind(this,o),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:t,overwriteIfSameType:!0,keepUndo:!0})}_updateColorAndOpacity(t,s){const i=this.constructor.typesMap.get(this.colorType),a=this.constructor.typesMap.get(this.opacityType),o=this._drawingOptions,c=o[i],h=o[a],f=(m,g)=>{var x;o.updateProperty(i,m),o.updateProperty(a,g),u(this,fn).updateProperty(i,m),u(this,fn).updateProperty(a,g),
434(x=this.parent)==null||x.drawLayer.updateProperties(this._drawId,o.toSVGProperties()),this.onUpdatedColor(),this.onUpdatedOpacity()};this.addCommands({cmd:f.bind(this,t,s),undo:f.bind(this,c,h),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:ze.INK_COLOR_AND_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,Je._mergeSVGProperties(u(this,fn).getPathResizingSVGProperties(P(this,Ze,vb).call(this)),{bbox:P(this,Ze,ih).call(this)}))}_onResized(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,Je._mergeSVGProperties(u(this,fn).getPathResizedSVGProperties(P(this,Ze,vb).call(this)),{bbox:P(this,Ze,ih).call(this)}))}_onTranslating(t,s){var i;(i=this.parent)==null||i.drawLayer.updateProperties(this._drawId,{bbox:P(this,Ze,ih).call(this)})}_onTranslated(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,Je._mergeSVGProperties(u(this,fn).getPathTranslatedSVGProperties(P(this,Ze,vb).call(this),this.parentDimensions),{bbox:P(this,Ze,ih).call(this)}))}_onStartDragging(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,u(this,Mf)&&(k(this,Mf,!1),this.commit(),this.parent.setSelected(this),t&&this.isOnScreen&&this.div.focus())}remove(){P(this,Ze,RN).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(P(this,Ze,bp).call(this),P(this,Ze,vp).call(this,u(this,fn).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){var i;let s=!1;this.parent&&!t?(this._uiManager.removeShouldRescale(this),P(this,Ze,RN).call(this)):t&&(this._uiManager.addShouldRescale(this),P(this,Ze,bp).call(this,t),s=!this.parent&&((i=this.div)==null?void 0:i.classList.contains("selectedEditor"))),super.setParent(t),s&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,Je._mergeSVGProperties({bbox:P(this,Ze,ih).call(this)},u(this,fn).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&P(this,Ze,vp).call(this,u(this,fn).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let t,s;this._isCopy&&(t=this.x,s=this.y);const i=super.render();i.classList.add("draw");const a=document.createElement("div");return i.append(a),a.setAttribute("aria-hidden","true"),a.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(t,s),i}static createDrawerInstance(t,s,i,a,o){it("Not implemented")}static startDrawing(t,s,i,a){var N;const{target:o,offsetX:c,offsetY:h,pointerId:f,pointerType:m}=a;if(Zs.isInitializedAndDifferentPointerType(m))return;const{viewport:{rotation:g}}=t,{width:x,height:y}=o.getBoundingClientRect(),v=k(Je,Jd,new AbortController),j=t.combinedSignal(v);if(Zs.setPointer(m,f),window.addEventListener("pointerup",S=>{Zs.isSamePointerIdOrRemove(S.pointerId)&&this._endDraw(S)},{signal:j}),window.addEventListener("pointercancel",S=>{Zs.isSamePointerIdOrRemove(S.pointerId)&&this._currentParent.endDrawingSession()},{signal:j}),window.addEventListener("pointerdown",S=>{Zs.isSamePointerType(S.pointerType)&&(Zs.initializeAndAddPointerId(S.pointerId),u(Je,Ss).isCancellable()&&(u(Je,Ss).removeLastElement(),u(Je,Ss).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:j}),window.addEventListener("contextmenu",Jr,{signal:j}),o.addEventListener("pointermove",this._drawMove.bind(this),{signal:j}),o.addEventListener("touchmove",S=>{Zs.isSameTimeStamp(S.timeStamp)&&Ot(S)},{signal:j}),t.toggleDrawing(),(N=s._editorUndoBar)==null||N.hide(),u(Je,Ss)){t.drawLayer.updateProperties(this._currentDrawId,u(Je,Ss).startNew(c,h,x,y,g));return}s.updateUIForDefaultProperties(this),k(Je,Ss,this.createDrawerInstance(c,h,x,y,g)),k(Je,Qd,this.getDefaultDrawingOptions()),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(u(Je,Qd).toSVGProperties(),u(Je,Ss).defaultSVGProperties),!0,!1)}static _drawMove(t){if(Zs.isSameTimeStamp(t.timeStamp),!u(Je,Ss))return;const{offsetX:s,offsetY:i,pointerId:a}=t;if(Zs.isSamePointerId(a)){if(Zs.isUsingMultiplePointers()){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,u(Je,Ss).add(s,i)),Zs.setTimeStamp(t.timeStamp),Ot(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,k(Je,Ss,null),k(Je,Qd,null),Zs.clearTimeStamp()),u(Je,Jd)&&(u(Je,Jd).abort(),k(Je,Jd,null),Zs.clearPointerIds())}static _endDraw(t){const s=this._currentParent;if(s){if(s.toggleDrawing(!0),this._cleanup(!1),(t==null?void 0:t.target)===s.div&&s.drawLayer.updateProperties(this._currentDrawId,u(Je,Ss).end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const i=u(Je,Ss),a=this._currentDrawId,o=i.getLastElement();s.addCommands({cmd:()=>{s.drawLayer.updateProperties(a,i.setLastElement(o))},undo:()=>{s.drawLayer.updateProperties(a,i.removeLastElement())},mustExec:!1,type:ze.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(t){const s=this._currentParent;if(!s)return null;if(s.toggleDrawing(!0),s.cleanUndoStack(ze.DRAW_STEP),!u(Je,Ss).isEmpty()){const{pageDimensions:[i,a],scale:o}=s,c=s.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:u(Je,Ss).getOutlines(i*o,a*o,o,this._INNER_MARGIN),drawingOptions:u(Je,Qd),mustBeCommitted:!t});return this._cleanup(!0),c}return s.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(t){}static deserializeDraw(t,s,i,a,o,c){it("Not implemented")}static async deserialize(t,s,i){var g,x;const{rawDims:{pageWidth:a,pageHeight:o,pageX:c,pageY:h}}=s.viewport,f=this.deserializeDraw(c,h,a,o,this._INNER_MARGIN,t),m=await super.deserialize(t,s,i);return m.createDrawingOptions(t),P(g=m,Ze,TN).call(g,{drawOutlines:f}),P(x=m,Ze,bp).call(x),m.onScaleChanging(),m.rotate(),m}serializeDraw(t){const[s,i]=this.pageTranslation,[a,o]=this.pageDimensions;return u(this,fn).serialize([s,i,a,o],t)}renderAnnotationElement(t){return t.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}};fn=new WeakMap,Mf=new WeakMap,Ss=new WeakMap,Jd=new WeakMap,Qd=new WeakMap,Ze
434=new WeakSet,TN=function({drawOutlines:t,drawId:s,drawingOptions:i}){k(this,fn,t),this._drawingOptions||(this._drawingOptions=i),this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),s>=0?(this._drawId=s,this.parent.drawLayer.finalizeDraw(s,t.defaultProperties)):this._drawId=P(this,Ze,PN).call(this,t,this.parent),P(this,Ze,vp).call(this,t.box)},PN=function(t,s){const{id:i}=s.drawLayer.draw(Je._mergeSVGProperties(this._drawingOptions.toSVGProperties(),t.defaultSVGProperties),!1,!1);return i},RN=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},bp=function(t=this.parent){if(!(this._drawId!==null&&this.parent===t)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,t.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=P(this,Ze,PN).call(this,u(this,fn),t)}},mM=function([t,s,i,a]){const{parentDimensions:[o,c],rotation:h}=this;switch(h){case 90:return[s,1-t,i*(c/o),a*(o/c)];case 180:return[1-t,1-s,i,a];case 270:return[1-s,t,i*(c/o),a*(o/c)];default:return[t,s,i,a]}},vb=function(){const{x:t,y:s,width:i,height:a,parentDimensions:[o,c],rotation:h}=this;switch(h){case 90:return[1-s,t,i*(o/c),a*(c/o)];case 180:return[1-t,1-s,i,a];case 270:return[s,1-t,i*(o/c),a*(c/o)];default:return[t,s,i,a]}},vp=function(t){[this.x,this.y,this.width,this.height]=P(this,Ze,mM).call(this,t),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()},ih=function(){const{x:t,y:s,width:i,height:a,rotation:o,parentRotation:c,parentDimensions:[h,f]}=this;switch((o*4+c)/90){case 1:return[1-s-a,t,a,i];case 2:return[1-t-i,1-s-a,i,a];case 3:return[s,1-t-i,a,i];case 4:return[t,s-i*(h/f),a*(f/h),i*(h/f)];case 5:return[1-s,t,i*(h/f),a*(f/h)];case 6:return[1-t-a*(f/h),1-s,a*(f/h),i*(h/f)];case 7:return[s-i*(h/f),1-t-a*(f/h),i*(h/f),a*(f/h)];case 8:return[t-i,s-a,i,a];case 9:return[1-s,t-i,a,i];case 10:return[1-t,1-s,i,a];case 11:return[s-a,1-t,a,i];case 12:return[t-a*(f/h),s,a*(f/h),i*(h/f)];case 13:return[1-s-i*(h/f),t-a*(f/h),i*(h/f),a*(f/h)];case 14:return[1-t,1-s-i*(h/f),a*(f/h),i*(h/f)];case 15:return[s,1-t,i*(h/f),a*(f/h)];default:return[t,s,i,a]}},Y(Je,"_currentDrawId",-1),Y(Je,"_currentParent",null),C(Je,Ss,null),C(Je,Jd,null),C(Je,Qd,null),Y(Je,"_INNER_MARGIN",3);let Jb=Je;var oa,As,_s,Zd,If,mn,Us,Wr,eu,tu,su,Lf,wb;class E9{constructor(e,t,s,i,a,o){C(this,Lf);C(this,oa,new Float64Array(6));C(this,As);C(this,_s);C(this,Zd);C(this,If);C(this,mn);C(this,Us,"");C(this,Wr,0);C(this,eu,new Q0);C(this,tu);C(this,su);k(this,tu,s),k(this,su,i),k(this,Zd,a),k(this,If,o),[e,t]=P(this,Lf,wb).call(this,e,t);const c=k(this,As,[NaN,NaN,NaN,NaN,e,t]);k(this,mn,[e,t]),k(this,_s,[{line:c,points:u(this,mn)}]),u(this,oa).set(c,0)}updateProperty(e,t){e==="stroke-width"&&k(this,If,t)}isEmpty(){return!u(this,_s)||u(this,_s).length===0}isCancellable(){return u(this,mn).length<=10}add(e,t){[e,t]=P(this,Lf,wb).call(this,e,t);const[s,i,a,o]=u(this,oa).subarray(2,6),c=e-a,h=t-o;return Math.hypot(u(this,tu)*c,u(this,su)*h)<=2?null:(u(this,mn).push(e,t),isNaN(s)?(u(this,oa).set([a,o,e,t],2),u(this,As).push(NaN,NaN,NaN,NaN,e,t),{path:{d:this.toSVGPath()}}):(isNaN(u(this,oa)[0])&&u(this,As).splice(6,6),u(this,oa).set([s,i,a,o,e,t],0),u(this,As).push(...ve.createBezierPoints(s,i,a,o,e,t)),{path:{d:this.toSVGPath()}}))}end(e,t){const s=this.add(e,t);return s||(u(this,mn).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(e,t,s,i,a){k(this,tu,s),k(this,su,i),k(this,Zd,a),[e,t]=P(this,Lf,wb).call(this,e,t);const o=k(this,As,[NaN,NaN,NaN,NaN,e,t]);k(this,mn,[e,t]);const c=u(this,_s).at(-1);return c&&(c.line=new Float32Array(c.line),c.points=new Float32Array(c.points)),u(this,_s).push({line:o,points:u(this,mn)}),u(this,oa).set(o,0),k(this,Wr,0),this.toSVGPath(),null}getLastElement(){return u(this,_s).at(-1)}setLastElement(e){return u(this,_s)?(u(this,_s).push(e),k(this,As,e.line),k(this,mn,e.points),k(this,Wr,0),{path:{d:this.toSVGPath()}}):u(this,eu).setLastElement(e)}removeLastElement(){if(!u(this,_s))return u(this,eu).removeLastElement();u(this,_s).pop(),k(this,Us,"");for(let e=0,t=u(this,_s).length;e<t;e++){const{line:s,points:i}=u(this,_s)[e];k(this,As,s),k(this,mn,i),k(this,Wr,0),this.toSVGPath()}return{path:{d:u(this,Us)}}}toSVGPath(){const e=ve.svgRound(u(this,As)[4]),t=ve.svgRound(u(this,As)[5]);if(u(this,mn).length===2)return k(this,Us,`${u(this,Us)} M ${e} ${t} Z`),u(this,Us);if(u(this,mn).length<=6){const i=u(this,Us).lastIndexOf("M");k(this,Us,`${u(this,Us).slice(0,i)} M ${e} ${t}`),k(this,Wr,6)}
434if(u(this,mn).length===4){const i=ve.svgRound(u(this,As)[10]),a=ve.svgRound(u(this,As)[11]);return k(this,Us,`${u(this,Us)} L ${i} ${a}`),k(this,Wr,12),u(this,Us)}const s=[];u(this,Wr)===0&&(s.push(`M ${e} ${t}`),k(this,Wr,6));for(let i=u(this,Wr),a=u(this,As).length;i<a;i+=6){const[o,c,h,f,m,g]=u(this,As).slice(i,i+6).map(ve.svgRound);s.push(`C${o} ${c} ${h} ${f} ${m} ${g}`)}return k(this,Us,u(this,Us)+s.join(" ")),k(this,Wr,u(this,As).length),u(this,Us)}getOutlines(e,t,s,i){const a=u(this,_s).at(-1);return a.line=new Float32Array(a.line),a.points=new Float32Array(a.points),u(this,eu).build(u(this,_s),e,t,s,u(this,Zd),u(this,If),i),k(this,oa,null),k(this,As,null),k(this,_s,null),k(this,Us,null),u(this,eu)}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}oa=new WeakMap,As=new WeakMap,_s=new WeakMap,Zd=new WeakMap,If=new WeakMap,mn=new WeakMap,Us=new WeakMap,Wr=new WeakMap,eu=new WeakMap,tu=new WeakMap,su=new WeakMap,Lf=new WeakSet,wb=function(e,t){return ve._normalizePoint(e,t,u(this,tu),u(this,su),u(this,Zd))};var pn,L0,D0,ur,la,ca,Df,Of,nu,zs,La,pM,gM,xM;class Q0 extends ve{constructor(){super(...arguments);C(this,zs);C(this,pn);C(this,L0,0);C(this,D0);C(this,ur);C(this,la);C(this,ca);C(this,Df);C(this,Of);C(this,nu)}build(t,s,i,a,o,c,h){k(this,la,s),k(this,ca,i),k(this,Df,a),k(this,Of,o),k(this,nu,c),k(this,D0,h??0),k(this,ur,t),P(this,zs,gM).call(this)}get thickness(){return u(this,nu)}setLastElement(t){return u(this,ur).push(t),{path:{d:this.toSVGPath()}}}removeLastElement(){return u(this,ur).pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const t=[];for(const{line:s}of u(this,ur)){if(t.push(`M${ve.svgRound(s[4])} ${ve.svgRound(s[5])}`),s.length===6){t.push("Z");continue}if(s.length===12&&isNaN(s[6])){t.push(`L${ve.svgRound(s[10])} ${ve.svgRound(s[11])}`);continue}for(let i=6,a=s.length;i<a;i+=6){const[o,c,h,f,m,g]=s.subarray(i,i+6).map(ve.svgRound);t.push(`C${o} ${c} ${h} ${f} ${m} ${g}`)}}return t.join("")}serialize([t,s,i,a],o){const c=[],h=[],[f,m,g,x]=P(this,zs,pM).call(this);let y,v,j,N,S,A,E,M,R;switch(u(this,Of)){case 0:R=ve._rescale,y=t,v=s+a,j=i,N=-a,S=t+f*i,A=s+(1-m-x)*a,E=t+(f+g)*i,M=s+(1-m)*a;break;case 90:R=ve._rescaleAndSwap,y=t,v=s,j=i,N=a,S=t+m*i,A=s+f*a,E=t+(m+x)*i,M=s+(f+g)*a;break;case 180:R=ve._rescale,y=t+i,v=s,j=-i,N=a,S=t+(1-f-g)*i,A=s+m*a,E=t+(1-f)*i,M=s+(m+x)*a;break;case 270:R=ve._rescaleAndSwap,y=t+i,v=s+a,j=-i,N=-a,S=t+(1-m-x)*i,A=s+(1-f-g)*a,E=t+(1-m)*i,M=s+(1-f)*a;break}for(const{line:I,points:F}of u(this,ur))c.push(R(I,y,v,j,N,o?new Array(I.length):null)),h.push(R(F,y,v,j,N,o?new Array(F.length):null));return{lines:c,points:h,rect:[S,A,E,M]}}static deserialize(t,s,i,a,o,{paths:{lines:c,points:h},rotation:f,thickness:m}){const g=[];let x,y,v,j,N;switch(f){case 0:N=ve._rescale,x=-t/i,y=s/a+1,v=1/i,j=-1/a;break;case 90:N=ve._rescaleAndSwap,x=-s/a,y=-t/i,v=1/a,j=1/i;break;case 180:N=ve._rescale,x=t/i+1,y=-s/a,v=-1/i,j=1/a;break;case 270:N=ve._rescaleAndSwap,x=s/a+1,y=t/i+1,v=-1/a,j=-1/i;break}if(!c){c=[];for(const A of h){const E=A.length;if(E===2){c.push(new Float32Array([NaN,NaN,NaN,NaN,A[0],A[1]]));continue}if(E===4){c.push(new Float32Array([NaN,NaN,NaN,NaN,A[0],A[1],NaN,NaN,NaN,NaN,A[2],A[3]]));continue}const M=new Float32Array(3*(E-2));c.push(M);let[R,I,F,D]=A.subarray(0,4);M.set([NaN,NaN,NaN,NaN,R,I],0);for(let O=4;O<E;O+=2){const $=A[O],z=A[O+1];M.set(ve.createBezierPoints(R,I,F,D,$,z),(O-2)*3),[R,I,F,D]=[F,D,$,z]}}}for(let A=0,E=c.length;A<E;A++)g.push({line:N(c[A].map(M=>M??NaN),x,y,v,j),points:N(h[A].map(M=>M??NaN),x,y,v,j)});const S=new this.prototype.constructor;return S.build(g,i,a,1,f,m,o),S}get box(){return u(this,pn)}updateProperty(t,s){return t==="stroke-width"?P(this,zs,xM).call(this,s):null}updateParentDimensions([t,s],i){const[a,o]=P(this,zs,La).call(this);k(this,la,t),k(this,ca,s),k(this,Df,i);const[c,h]=P(this,zs,La).call(this),f=c-a,m=h-o,g=u(this,pn);return g[0]-=f,g[1]-=m,g[2]+=2*f,g[3]+=2*m,g}updateRotation(t){return k(this,L0,t),{path:{transform:this.rotationTransform}}}get viewBox(){return u(this,pn).map(ve.svgRound).join(" ")}get defaultProperties(){const[t,s]=u(this,pn);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ve.svgRound(t)} ${ve.svgRound(s)}`}}}get rotationTransform(){const[,,t,s]=u(this,pn);let i=0,a=0,o=0,c=0,h=0,f=0;switch(u(this,L0)){case 90:a=s/t,o=-t/s,h=t;break;case 180:i=-1,c=-1,h=t,f=s;break;case 270:a=-s/t,o=t/s,f=s;break;default:return""}return`matrix(${i} ${a} ${o} ${c} ${ve.svgRound(h)} ${ve.svgRound(f)})`}getPathResizingSVGProperties([t,s,i,a]){const[o,c]=P(this,zs,La).call(this),[h,f,m,g]=u(this,pn);
434if(Math.abs(m-o)<=ve.PRECISION||Math.abs(g-c)<=ve.PRECISION){const N=t+i/2-(h+m/2),S=s+a/2-(f+g/2);return{path:{"transform-origin":`${ve.svgRound(t)} ${ve.svgRound(s)}`,transform:`${this.rotationTransform} translate(${N} ${S})`}}}const x=(i-2*o)/(m-2*o),y=(a-2*c)/(g-2*c),v=m/i,j=g/a;return{path:{"transform-origin":`${ve.svgRound(h)} ${ve.svgRound(f)}`,transform:`${this.rotationTransform} scale(${v} ${j}) translate(${ve.svgRound(o)} ${ve.svgRound(c)}) scale(${x} ${y}) translate(${ve.svgRound(-o)} ${ve.svgRound(-c)})`}}}getPathResizedSVGProperties([t,s,i,a]){const[o,c]=P(this,zs,La).call(this),h=u(this,pn),[f,m,g,x]=h;if(h[0]=t,h[1]=s,h[2]=i,h[3]=a,Math.abs(g-o)<=ve.PRECISION||Math.abs(x-c)<=ve.PRECISION){const S=t+i/2-(f+g/2),A=s+a/2-(m+x/2);for(const{line:E,points:M}of u(this,ur))ve._translate(E,S,A,E),ve._translate(M,S,A,M);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ve.svgRound(t)} ${ve.svgRound(s)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const y=(i-2*o)/(g-2*o),v=(a-2*c)/(x-2*c),j=-y*(f+o)+t+o,N=-v*(m+c)+s+c;if(y!==1||v!==1||j!==0||N!==0)for(const{line:S,points:A}of u(this,ur))ve._rescale(S,j,N,y,v,S),ve._rescale(A,j,N,y,v,A);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ve.svgRound(t)} ${ve.svgRound(s)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([t,s],i){const[a,o]=i,c=u(this,pn),h=t-c[0],f=s-c[1];if(u(this,la)===a&&u(this,ca)===o)for(const{line:m,points:g}of u(this,ur))ve._translate(m,h,f,m),ve._translate(g,h,f,g);else{const m=u(this,la)/a,g=u(this,ca)/o;k(this,la,a),k(this,ca,o);for(const{line:x,points:y}of u(this,ur))ve._rescale(x,h,f,m,g,x),ve._rescale(y,h,f,m,g,y);c[2]*=m,c[3]*=g}return c[0]=t,c[1]=s,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${ve.svgRound(t)} ${ve.svgRound(s)}`}}}get defaultSVGProperties(){const t=u(this,pn);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${ve.svgRound(t[0])} ${ve.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}pn=new WeakMap,L0=new WeakMap,D0=new WeakMap,ur=new WeakMap,la=new WeakMap,ca=new WeakMap,Df=new WeakMap,Of=new WeakMap,nu=new WeakMap,zs=new WeakSet,La=function(t=u(this,nu)){const s=u(this,D0)+t/2*u(this,Df);return u(this,Of)%180===0?[s/u(this,la),s/u(this,ca)]:[s/u(this,ca),s/u(this,la)]},pM=function(){const[t,s,i,a]=u(this,pn),[o,c]=P(this,zs,La).call(this,0);return[t+o,s+c,i-2*o,a-2*c]},gM=function(){const t=k(this,pn,Bc.slice());for(const{line:a}of u(this,ur)){if(a.length<=12){for(let h=4,f=a.length;h<f;h+=6)me.pointBoundingBox(a[h],a[h+1],t);continue}let o=a[4],c=a[5];for(let h=6,f=a.length;h<f;h+=6){const[m,g,x,y,v,j]=a.subarray(h,h+6);me.bezierBoundingBox(o,c,m,g,x,y,v,j,t),o=v,c=j}}const[s,i]=P(this,zs,La).call(this);t[0]=Pt(t[0]-s,0,1),t[1]=Pt(t[1]-i,0,1),t[2]=Pt(t[2]+s,0,1),t[3]=Pt(t[3]+i,0,1),t[2]-=t[0],t[3]-=t[1]},xM=function(t){const[s,i]=P(this,zs,La).call(this);k(this,nu,t);const[a,o]=P(this,zs,La).call(this),[c,h]=[a-s,o-i],f=u(this,pn);return f[0]-=c,f[1]-=h,f[2]+=2*c,f[3]+=2*h,f};class tw extends fM{constructor(e){super(),this._viewParameters=e,super.updateProperties({fill:"none",stroke:wt._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(e,t){e==="stroke-width"&&(t??(t=this["stroke-width"]),t*=this._viewParameters.realScale),super.updateSVGProperty(e,t)}clone(){const e=new tw(this._viewParameters);return e.updateAll(this),e}}var _v,yM;const gh=class gh extends Jb{constructor(t){super({...t,name:"inkEditor"});C(this,_v);this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,s){wt.initialize(t,s),this._defaultDrawingOptions=new tw(s.viewParameters)}static getDefaultDrawingOptions(t){const s=this._defaultDrawingOptions.clone();return s.updateProperties(t),s}static get supportMultipleDrawings(){return!0}static get typesMap(){return $e(this,"typesMap",new Map([[ze.INK_THICKNESS,"stroke-width"],[ze.INK_COLOR,"stroke"],[ze.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(t,s,i,a,o){return new E9(t,s,i,a,o,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(t,s,i,a,o,c){return Q0.deserialize(t,s,i,a,o,c)}static async deserialize(t,s,i){let a=null;if(t instanceof l5){const{data:{inkLists:c,rect:h,rotation:f,id:m,color:g,opacity:x,borderStyle:{rawWidth:y},popupRef:v,richText:j,contentsObj:N,creationDate:S,modificationDate:A},parent:{page:{pageNumber:E}}}=t;
434a=t={annotationType:Be.INK,color:Array.from(g),thickness:y,opacity:x,paths:{points:c},boxes:null,pageIndex:E-1,rect:h.slice(0),rotation:f,annotationElementId:m,id:m,deleted:!1,popupRef:v,richText:j,comment:(N==null?void 0:N.str)||null,creationDate:S,modificationDate:A}}const o=await super.deserialize(t,s,i);return o._initialData=a,t.comment&&o.setCommentData(t),o}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new qb(this)),[["colorPicker",this._colorPicker]]}get colorType(){return ze.INK_COLOR}get colorAndOpacityType(){return ze.INK_COLOR_AND_OPACITY}get opacityType(){return ze.INK_OPACITY}updateParams(t,s){if(t===ze.INK_COLOR_AND_OPACITY){this._updateColorAndOpacity(s.color,s.opacity);return}super.updateParams(t,s)}static updateDefaultParams(t,s){if(t===ze.INK_COLOR_AND_OPACITY){super.updateDefaultParams(ze.INK_COLOR,s.color),super.updateDefaultParams(ze.INK_OPACITY,s.opacity);return}super.updateDefaultParams(t,s)}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:t,_drawingOptions:s,parent:i}=this;s.updateSVGProperty("stroke-width"),i.drawLayer.updateProperties(t,s.toSVGProperties())}static onScaleChangingWhenDrawing(){const t=this._currentParent;t&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),t.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:t,thickness:s,opacity:i}){this._drawingOptions=gh.getDefaultDrawingOptions({stroke:me.makeHexColor(...t),"stroke-width":s,"stroke-opacity":i})}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:s,points:i}=this.serializeDraw(t),{_drawingOptions:{stroke:a,"stroke-opacity":o,"stroke-width":c}}=this,h=Object.assign(super.serialize(t),{color:wt._colorManager.convert(a),opacity:o,thickness:c,paths:{lines:s,points:i}});return this.addComment(h),t?(h.isCopy=!0,h):this.annotationElementId&&!P(this,_v,yM).call(this,h)?null:(h.id=this.annotationElementId,h)}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;const{points:s,rect:i}=this.serializeDraw(!1);return t.updateEdited({rect:i,thickness:this._drawingOptions["stroke-width"],points:s,popup:this.comment}),null}};_v=new WeakSet,yM=function(t){const{color:s,thickness:i,opacity:a,pageIndex:o}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||t.color.some((c,h)=>c!==s[h])||t.thickness!==i||t.opacity!==a||t.pageIndex!==o},Y(gh,"_type","ink"),Y(gh,"_editorType",Be.INK),Y(gh,"_defaultDrawingOptions",null);let MN=gh;class IN extends Q0{toSVGPath(){let e=super.toSVGPath();return e.endsWith("Z")||(e+="Z"),e}}const Sy=8,Jm=3;var ru,at,LN,Ni,bM,vM,DN,jb,wM,jM,NM,ON,FN,kM;class No{static extractContoursFromText(e,{fontFamily:t,fontStyle:s,fontWeight:i},a,o,c,h){let f=new OffscreenCanvas(1,1),m=f.getContext("2d",{alpha:!1});const g=200,x=m.font=`${s} ${i} ${g}px ${t}`,{actualBoundingBoxLeft:y,actualBoundingBoxRight:v,actualBoundingBoxAscent:j,actualBoundingBoxDescent:N,fontBoundingBoxAscent:S,fontBoundingBoxDescent:A,width:E}=m.measureText(e),M=1.5,R=Math.ceil(Math.max(Math.abs(y)+Math.abs(v)||0,E)*M),I=Math.ceil(Math.max(Math.abs(j)+Math.abs(N)||g,Math.abs(S)+Math.abs(A)||g)*M);f=new OffscreenCanvas(R,I),m=f.getContext("2d",{alpha:!0,willReadFrequently:!0}),m.font=x,m.filter="grayscale(1)",m.fillStyle="white",m.fillRect(0,0,R,I),m.fillStyle="black",m.fillText(e,R*(M-1)/2,I*(3-M)/2);const F=P(this,at,ON).call(this,m.getImageData(0,0,R,I).data),D=P(this,at,NM).call(this,F),O=P(this,at,FN).call(this,D),$=P(this,at,DN).call(this,F,R,I,O);return this.processDrawnLines({lines:{curves:$,width:R,height:I},pageWidth:a,pageHeight:o,rotation:c,innerMargin:h,mustSmooth:!0,areContours:!0})}static process(e,t,s,i,a){const[o,c,h]=P(this,at,kM).call(this,e),[f,m]=P(this,at,jM).call(this,o,c,h,Math.hypot(c,h)*u(this,ru).sigmaSFactor,u(this,ru).sigmaR,u(this,ru).kernelSize),g=P(this,at,FN).call(this,m),x=P(this,at,DN).call(this,f,c,h,g);return this.processDrawnLines({lines:{curves:x,width:c,height:h},pageWidth:t,pageHeight:s,rotation:i,innerMargin:a,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:e,pageWidth:t,pageHeight:s,rotation:i,innerMargin:a,mustSmooth:o,areContours:c}){i%180!==0&&([t,s]=[s,t]);const{curves:h,width:f,height:m}=e,g=e.thickness??0,x=[],y=Math.min(t/f,s/m),v=y/t,j=y/s,N=[];for(const{points:A}of h){const E=o?P(this,at,wM).call(this,A):A;if(!E)continue;N.push(E);const M=E.length,R=new Float32Array(M),I=new Float32Array(3*(M===2?2:M-2));if(x.push({line:I,points:R}),M===2){R[0]=E[0]*v,R[1]=E[1]*j,I.set([NaN,NaN,NaN,NaN,R[0],R[1]],0);continue}let[F,D,O,$]=E;F*=v,D*=j,O*=v,$*=j,R.set([F,D,O,$],0),I.set([NaN,NaN,NaN,NaN,F,D],0);for(let z=4;z<M;z+=2){const re=R[z]=E[z]*v,he=R[z+1]=E[z+1]*j;I.set(ve.createBezierPoints(F,D,O,$,re,he),(z-2)*3),[F,D,O,$]=[O,$,re,he]}}if(x.length===0)return null;const S=c?new IN:new Q0;return S.build(x,t,s,1,i,c?0:g,a),{outline:S,newCurves:N,areContours:c,thickness:g,width:f,height:m}}
434static async compressSignature({outlines:e,areContours:t,thickness:s,width:i,height:a}){let o=1/0,c=-1/0,h=0;for(const A of e){h+=A.length;for(let E=2,M=A.length;E<M;E++){const R=A[E]-A[E-2];o=Math.min(o,R),c=Math.max(c,R)}}let f;o>=-128&&c<=127?f=Int8Array:o>=-32768&&c<=32767?f=Int16Array:f=Int32Array;const m=e.length,g=Sy+Jm*m,x=new Uint32Array(g);let y=0;x[y++]=g*Uint32Array.BYTES_PER_ELEMENT+(h-2*m)*f.BYTES_PER_ELEMENT,x[y++]=0,x[y++]=i,x[y++]=a,x[y++]=t?0:1,x[y++]=Math.max(0,Math.floor(s??0)),x[y++]=m,x[y++]=f.BYTES_PER_ELEMENT;for(const A of e)x[y++]=A.length-2,x[y++]=A[0],x[y++]=A[1];const v=new CompressionStream("deflate-raw"),j=v.writable.getWriter();await j.ready,j.write(x);const N=f.prototype.constructor;for(const A of e){const E=new N(A.length-2);for(let M=2,R=A.length;M<R;M++)E[M-2]=A[M]-A[M-2];j.write(E)}return j.close(),(await new Response(v.readable).bytes()).toBase64()}static async decompressSignature(e){try{const t=Uint8Array.fromBase64(e),{readable:s,writable:i}=new DecompressionStream("deflate-raw"),a=i.getWriter();await a.ready,a.write(t).then(async()=>{await a.ready,await a.close()}).catch(()=>{});let o=null,c=0;for await(const E of s)o||(o=new Uint8Array(new Uint32Array(E.buffer,0,4)[0])),o.set(E,c),c+=E.length;const h=new Uint32Array(o.buffer,0,o.length>>2),f=h[1];if(f!==0)throw new Error(`Invalid version: ${f}`);const m=h[2],g=h[3],x=h[4]===0,y=h[5],v=h[6],j=h[7],N=[],S=(Sy+Jm*v)*Uint32Array.BYTES_PER_ELEMENT;let A;switch(j){case Int8Array.BYTES_PER_ELEMENT:A=new Int8Array(o.buffer,S);break;case Int16Array.BYTES_PER_ELEMENT:A=new Int16Array(o.buffer,S);break;case Int32Array.BYTES_PER_ELEMENT:A=new Int32Array(o.buffer,S);break}c=0;for(let E=0;E<v;E++){const M=h[Jm*E+Sy],R=new Float32Array(M+2);N.push(R);for(let I=0;I<Jm-1;I++)R[I]=h[Jm*E+Sy+I+1];for(let I=0;I<M;I++)R[I+2]=R[I]+A[c++]}return{areContours:x,thickness:y,outlines:N,width:m,height:g}}catch(t){return He(`decompressSignature: ${t}`),null}}}ru=new WeakMap,at=new WeakSet,LN=function(e,t,s,i){return s-=e,i-=t,s===0?i>0?0:4:s===1?i+6:2-i},Ni=new WeakMap,bM=function(e,t,s,i,a,o,c){const h=P(this,at,LN).call(this,s,i,a,o);for(let f=0;f<8;f++){const m=(-f+h-c+16)%8,g=u(this,Ni)[2*m],x=u(this,Ni)[2*m+1];if(e[(s+g)*t+(i+x)]!==0)return m}return-1},vM=function(e,t,s,i,a,o,c){const h=P(this,at,LN).call(this,s,i,a,o);for(let f=0;f<8;f++){const m=(f+h+c+16)%8,g=u(this,Ni)[2*m],x=u(this,Ni)[2*m+1];if(e[(s+g)*t+(i+x)]!==0)return m}return-1},DN=function(e,t,s,i){const a=e.length,o=new Int32Array(a);for(let m=0;m<a;m++)o[m]=e[m]<=i?1:0;for(let m=1;m<s-1;m++)o[m*t]=o[m*t+t-1]=0;for(let m=0;m<t;m++)o[m]=o[t*s-1-m]=0;let c=1,h;const f=[];for(let m=1;m<s-1;m++){h=1;for(let g=1;g<t-1;g++){const x=m*t+g,y=o[x];if(y===0)continue;let v=m,j=g;if(y===1&&o[x-1]===0)c+=1,j-=1;else if(y>=1&&o[x+1]===0)c+=1,j+=1,y>1&&(h=y);else{y!==1&&(h=Math.abs(y));continue}const N=[g,m],S=j===g+1,A={isHole:S,points:N,id:c,parent:0};f.push(A);let E;for(const z of f)if(z.id===h){E=z;break}E?E.isHole?A.parent=S?E.parent:h:A.parent=S?h:E.parent:A.parent=S?h:0;const M=P(this,at,bM).call(this,o,t,m,g,v,j,0);if(M===-1){o[x]=-c,o[x]!==1&&(h=Math.abs(o[x]));continue}let R=u(this,Ni)[2*M],I=u(this,Ni)[2*M+1];const F=m+R,D=g+I;v=F,j=D;let O=m,$=g;for(;;){const z=P(this,at,vM).call(this,o,t,O,$,v,j,1);R=u(this,Ni)[2*z],I=u(this,Ni)[2*z+1];const re=O+R,he=$+I;N.push(he,re);const de=O*t+$;if(o[de+1]===0?o[de]=-c:o[de]===1&&(o[de]=c),re===m&&he===g&&O===F&&$===D){o[x]!==1&&(h=Math.abs(o[x]));break}else v=O,j=$,O=re,$=he}}}return f},jb=function(e,t,s,i){if(s-t<=4){for(let F=t;F<s-2;F+=2)i.push(e[F],e[F+1]);return}const a=e[t],o=e[t+1],c=e[s-4]-a,h=e[s-3]-o,f=Math.hypot(c,h),m=c/f,g=h/f,x=m*o-g*a,y=h/c,v=1/f,j=Math.atan(y),N=Math.cos(j),S=Math.sin(j),A=v*(Math.abs(N)+Math.abs(S)),E=v*(1-A+A**2),M=Math.max(Math.atan(Math.abs(S+N)*E),Math.atan(Math.abs(S-N)*E));let R=0,I=t;for(let F=t+2;F<s-2;F+=2){const D=Math.abs(x-m*e[F+1]+g*e[F]);D>R&&(I=F,R=D)}R>(f*M)**2?(P(this,at,jb).call(this,e,t,I+2,i),P(this,at,jb).call(this,e,I,s,i)):i.push(a,o)},wM=function(e){const t=[],s=e.length;
434return P(this,at,jb).call(this,e,0,s,t),t.push(e[s-2],e[s-1]),t.length<=4?null:t},jM=function(e,t,s,i,a,o){const c=new Float32Array(o**2),h=-2*i**2,f=o>>1;for(let j=0;j<o;j++){const N=(j-f)**2;for(let S=0;S<o;S++)c[j*o+S]=Math.exp((N+(S-f)**2)/h)}const m=new Float32Array(256),g=-2*a**2;for(let j=0;j<256;j++)m[j]=Math.exp(j**2/g);const x=e.length,y=new Uint8Array(x),v=new Uint32Array(256);for(let j=0;j<s;j++)for(let N=0;N<t;N++){const S=j*t+N,A=e[S];let E=0,M=0;for(let I=0;I<o;I++){const F=j+I-f;if(!(F<0||F>=s))for(let D=0;D<o;D++){const O=N+D-f;if(O<0||O>=t)continue;const $=e[F*t+O],z=c[I*o+D]*m[Math.abs($-A)];E+=$*z,M+=z}}const R=y[S]=Math.round(E/M);v[R]++}return[y,v]},NM=function(e){const t=new Uint32Array(256);for(const s of e)t[s]++;return t},ON=function(e){const t=e.length,s=new Uint8ClampedArray(t>>2);let i=-1/0,a=1/0;for(let c=0,h=s.length;c<h;c++){const f=s[c]=e[c<<2];i=Math.max(i,f),a=Math.min(a,f)}const o=255/(i-a);for(let c=0,h=s.length;c<h;c++)s[c]=(s[c]-a)*o;return s},FN=function(e){let t,s=-1/0,i=-1/0;const a=e.findIndex(h=>h!==0);let o=a,c=a;for(t=a;t<256;t++){const h=e[t];h>s&&(t-o>i&&(i=t-o,c=t-1),s=h,o=t)}for(t=c-1;t>=0&&!(e[t]>e[t+1]);t--);return t},kM=function(e){const t=e,{width:s,height:i}=e,{maxDim:a}=u(this,ru);let o=s,c=i;if(s>a||i>a){let x=s,y=i,v=Math.log2(Math.max(s,i)/a);const j=Math.floor(v);v=v===j?j-1:j;for(let S=0;S<v;S++){o=Math.ceil(x/2),c=Math.ceil(y/2);const A=new OffscreenCanvas(o,c);A.getContext("2d").drawImage(e,0,0,x,y,0,0,o,c),x=o,y=c,e!==t&&e.close(),e=A.transferToImageBitmap()}const N=Math.min(a/o,a/c);o=Math.round(o*N),c=Math.round(c*N)}const f=new OffscreenCanvas(o,c).getContext("2d",{willReadFrequently:!0});f.fillStyle="white",f.fillRect(0,0,o,c),f.filter="grayscale(1)",f.drawImage(e,0,0,e.width,e.height,0,0,o,c);const m=f.getImageData(0,0,o,c).data;return[P(this,at,ON).call(this,m),o,c]},C(No,at),C(No,ru,{maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16}),C(No,Ni,new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]));class c5 extends fM{constructor(){super(),super.updateProperties({fill:wt._defaultLineColor,"stroke-width":0})}clone(){const e=new c5;return e.updateAll(this),e}}
434class d5 extends tw{constructor(e){super(e),super.updateProperties({stroke:wt._defaultLineColor,"stroke-width":1})}clone(){const e=new d5(this._viewParameters);return e.updateAll(this),e}}var ql,da,Kl,iu;const Xn=class Xn extends Jb{constructor(t){super({...t,mustBeCommitted:!0,name:"signatureEditor"});C(this,ql,!1);C(this,da,null);C(this,Kl,null);C(this,iu,null);this._willKeepAspectRatio=!0,k(this,Kl,t.signatureData||null),k(this,da,null),this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(t,s){wt.initialize(t,s),this._defaultDrawingOptions=new c5,this._defaultDrawnSignatureOptions=new d5(s.viewParameters)}static getDefaultDrawingOptions(t){const s=this._defaultDrawingOptions.clone();return s.updateProperties(t),s}static get supportMultipleDrawings(){return!1}static get typesMap(){return $e(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!u(this,da)}}static computeTelemetryFinalData(t){const s=t.get("hasDescription");return{hasAltText:s.get(!0)??0,hasNoAltText:s.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let t,s;const{_isCopy:i}=this;if(i&&(this._isCopy=!1,t=this.x,s=this.y),super.render(),this._drawId===null)if(u(this,Kl)){const{lines:a,mustSmooth:o,areContours:c,description:h,uuid:f,heightInPage:m}=u(this,Kl),{rawDims:{pageWidth:g,pageHeight:x},rotation:y}=this.parent.viewport,v=No.processDrawnLines({lines:a,pageWidth:g,pageHeight:x,rotation:y,innerMargin:Xn._INNER_MARGIN,mustSmooth:o,areContours:c});this.addSignature(v,m,h,f)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:u(this,da)||""}));return i&&(this._isCopy=!0,this._moveAfterPaste(t,s)),this.div}setUuid(t){k(this,iu,t),this.addEditToolbar()}getUuid(){return u(this,iu)}get description(){return u(this,da)}set description(t){k(this,da,t),this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:t})),super.addEditToolbar().then(s=>{s==null||s.updateEditSignatureButton(t)}))}getSignaturePreview(){const{newCurves:t,areContours:s,thickness:i,width:a,height:o}=u(this,Kl),c=Math.max(a,o),h=No.processDrawnLines({lines:{curves:t.map(f=>({points:f})),thickness:i,width:a,height:o},pageWidth:c,pageHeight:c,rotation:0,innerMargin:0,mustSmooth:!1,areContours:s});return{areContours:s,outline:h.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(t,s,i,a){const{x:o,y:c}=this,{outline:h}=k(this,Kl,t);k(this,ql,h instanceof IN),this.description=i;let f;u(this,ql)?f=Xn.getDefaultDrawingOptions():(f=Xn._defaultDrawnSignatureOptions.clone(),f.updateProperties({"stroke-width":h.thickness})),this._addOutlines({drawOutlines:h,drawingOptions:f});const[,m]=this.pageDimensions;let g=s/m;g=g>=1?.5:g,this.width*=g/this.height,this.width>=1&&(g*=.9/this.width,this.width=.9),this.height=g,this.setDims(),this.x=o,this.y=c,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(a),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!a,hasDescription:!!i}}),this.div.hidden=!1}getFromImage(t){const{rawDims:{pageWidth:s,pageHeight:i},rotation:a}=this.parent.viewport;return No.process(t,s,i,a,Xn._INNER_MARGIN)}getFromText(t,s){const{rawDims:{pageWidth:i,pageHeight:a},rotation:o}=this.parent.viewport;return No.extractContoursFromText(t,s,i,a,o,Xn._INNER_MARGIN)}getDrawnSignature(t){const{rawDims:{pageWidth:s,pageHeight:i},rotation:a}=this.parent.viewport;return No.processDrawnLines({lines:t,pageWidth:s,pageHeight:i,rotation:a,innerMargin:Xn._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:t,thickness:s}){t?this._drawingOptions=Xn.getDefaultDrawingOptions():(this._drawingOptions=Xn._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":s}))}serialize(t=!1){if(this.isEmpty())return null;const{lines:s,points:i}=this.serializeDraw(t),{_drawingOptions:{"stroke-width":a}}=this,o=Object.assign(super.serialize(t),{isSignature:!0,areContours:u(this,ql),color:[0,0,0],thickness:u(this,ql)?0:a});return this.addComment(o),t?(o.paths={lines:s,points:i},o.uuid=u(this,iu),o.isCopy=!0):o.lines=s,u(this,da)&&(o.accessibilityData={type:"Figure",alt:u(this,da)}),o}static deserializeDraw(t,s,i,a,o,c){return c.areContours?IN.deserialize(t,s,i,a,o,c):Q0.deserialize(t,s,i,a,o,c)}static async deserialize(t,s,i){var o;const a=await super.deserialize(t,s,i);return k(a,ql,t.areContours),a.description=((o=t.accessibilityData)==null?void 0:o.alt)||"",k(a,iu,t.uuid),a}};ql=new WeakMap,da=new WeakMap,Kl=new WeakMap,iu=new WeakMap,Y(Xn,"_type","signature"),Y(Xn,"_editorType",Be.SIGNATURE),Y(Xn,"_defaultDrawingOptions",null);let BN=Xn;
434var Tt,Es,Xl,yo,Yl,Ff,bo,au,ua,hr,Bf,tt,wp,jp,Nb,kb,Sb,UN,Ab,SM;class $N extends wt{constructor(t){super({...t,name:"stampEditor"});C(this,tt);C(this,Tt,null);C(this,Es,null);C(this,Xl,null);C(this,yo,null);C(this,Yl,null);C(this,Ff,"");C(this,bo,null);C(this,au,!1);C(this,ua,null);C(this,hr,!1);C(this,Bf,!1);k(this,yo,t.bitmapUrl),k(this,Yl,t.bitmapFile),this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(t,s){wt.initialize(t,s)}static isHandlingMimeForPasting(t){return Aj.includes(t)}static paste(t,s){s.pasteEditor({mode:Be.STAMP},{bitmapFile:t.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var t;return{type:"stamp",hasAltText:!!((t=this.altTextData)!=null&&t.altText)}}static computeTelemetryFinalData(t){const s=t.get("hasAltText");return{hasAltText:s.get(!0)??0,hasNoAltText:s.get(!1)??0}}async mlGuessAltText(t=null,s=!0){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!await i.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:a,width:o,height:c}=t||this.copyCanvas(null,null,!0).imageData,h=await i.guess({name:"altText",request:{data:a,width:o,height:c,channels:a.length/(o*c)}});if(!h)throw new Error("No response from the AI service.");if(h.error)throw new Error("Error from the AI service.");if(h.cancel)return null;if(!h.output)throw new Error("No valid response from the AI service.");const f=h.output;return await this.setGuessedAltText(f),s&&!this.hasAltTextData()&&(this.altTextData={alt:f,decorative:!1}),f}remove(){var t;u(this,Es)&&(k(this,Tt,null),this._uiManager.imageManager.deleteId(u(this,Es)),(t=u(this,bo))==null||t.remove(),k(this,bo,null),u(this,ua)&&(clearTimeout(u(this,ua)),k(this,ua,null))),super.remove()}rebuild(){if(!this.parent){u(this,Es)&&P(this,tt,Nb).call(this);return}super.rebuild(),this.div!==null&&(u(this,Es)&&u(this,bo)===null&&P(this,tt,Nb).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(t){this._isDraggable=!0,t&&this.div.focus()}isEmpty(){return!(u(this,Xl)||u(this,Tt)||u(this,yo)||u(this,Yl)||u(this,Es)||u(this,au))}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let t,s;return this._isCopy&&(t=this.x,s=this.y),super.render(),this.div.hidden=!0,this.createAltText(),u(this,au)||(u(this,Tt)?P(this,tt,kb).call(this):P(this,tt,Nb).call(this)),this._isCopy&&this._moveAfterPaste(t,s),this._uiManager.addShouldRescale(this),this.div}setCanvas(t,s){const{id:i,bitmap:a}=this._uiManager.imageManager.getFromCanvas(t,s);s.remove(),i&&this._uiManager.imageManager.isValidId(i)&&(k(this,Es,i),a&&k(this,Tt,a),k(this,au,!1),P(this,tt,kb).call(this))}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;u(this,ua)!==null&&clearTimeout(u(this,ua)),k(this,ua,setTimeout(()=>{k(this,ua,null),P(this,tt,UN).call(this)},200))}copyCanvas(t,s,i=!1){t||(t=224);const{width:a,height:o}=u(this,Tt),c=new ba;let h=u(this,Tt),f=a,m=o,g=null;if(s){if(a>s||o>s){const F=Math.min(s/a,s/o);f=Math.floor(a*F),m=Math.floor(o*F)}g=document.createElement("canvas");const y=g.width=Math.ceil(f*c.sx),v=g.height=Math.ceil(m*c.sy);u(this,hr)||(h=P(this,tt,Sb).call(this,y,v));const j=g.getContext("2d");j.filter=this._uiManager.hcmFilter;let N="white",S="#cfcfd8";this._uiManager.hcmFilter!=="none"?S="black":Hz.isDarkMode&&(N="#8f8f9d",S="#42414d");const A=15,E=A*c.sx,M=A*c.sy,R=new OffscreenCanvas(E*2,M*2),I=R.getContext("2d");I.fillStyle=N,I.fillRect(0,0,E*2,M*2),I.fillStyle=S,I.fillRect(0,0,E,M),I.fillRect(E,M,E,M),j.fillStyle=j.createPattern(R,"repeat"),j.fillRect(0,0,y,v),j.drawImage(h,0,0,h.width,h.height,0,0,y,v)}let x=null;if(i){let y,v;if(c.symmetric&&h.width<t&&h.height<t)y=h.width,v=h.height;else if(h=u(this,Tt),a>t||o>t){const S=Math.min(t/a,t/o);y=Math.floor(a*S),v=Math.floor(o*S),u(this,hr)||(h=P(this,tt,Sb).call(this,y,v))}const N=new OffscreenCanvas(y,v).getContext("2d",{willReadFrequently:!0});N.drawImage(h,0,0,h.width,h.height,0,0,y,v),x={width:y,height:v,data:N.getImageData(0,0,y,v).data}}return{canvas:g,width:f,height:m,imageData:x}}static async deserialize(t,s,i){var N;let a=null,o=!1;if(t instanceof UR){const{data:{rect:S,rotation:A,id:E,structParent:M,popupRef:R,richText:I,contentsObj:F,creationDate:D,modificationDate:O},container:$,parent:{page:{pageNumber:z}},canvas:re}=t;let he,de;re?(delete t.canvas,{id:he,bitmap:de}=i.imageManager.getFromCanvas($.id,re),re.remove()):(o=!0,t._hasNoCanvas=!0);const fe=((N=await s._structTree.getAriaAttributes(`${fh}${E}`))==null?void 0:N.get("aria-label"))||"";a=t={annotationType:Be.STAMP,bitmapId:he,bitmap:de,pageIndex:z-1,rect:S.slice(0),rotation:A,annotationElementId:E,id:E,deleted:!1,accessibilityData:{decorative:!1,altText:fe},isSvg:!1,structParent:M,popupRef:R,richText:I,comment:(F==null?void 0:F.str)||null,creationDate:D,modificationDate:O}}const c=await super.deserialize(t,s,i),{rect:h,bitmap:f,bitmapUrl:m,bitmapId:g,isSvg
434:x,accessibilityData:y}=t;o?(i.addMissingCanvas(t.id,c),k(c,au,!0)):g&&i.imageManager.isValidId(g)?(k(c,Es,g),f&&k(c,Tt,f)):k(c,yo,m),k(c,hr,x);const[v,j]=c.pageDimensions;return c.width=(h[2]-h[0])/v,c.height=(h[3]-h[1])/j,y&&(c.altTextData=y),c._initialData=a,t.comment&&c.setCommentData(t),k(c,Bf,!!a),c}serialize(t=!1,s=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i=Object.assign(super.serialize(t),{bitmapId:u(this,Es),isSvg:u(this,hr)});if(this.addComment(i),t)return i.bitmapUrl=P(this,tt,Ab).call(this,!0),i.accessibilityData=this.serializeAltText(!0),i.isCopy=!0,i;const{decorative:a,altText:o}=this.serializeAltText(!1);if(!a&&o&&(i.accessibilityData={type:"Figure",alt:o}),this.annotationElementId){const h=P(this,tt,SM).call(this,i);return h.isSame?null:(h.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=this._initialData.structParent??-1,i.id=this.annotationElementId,delete i.bitmapId,i)}if(s===null)return i;s.stamps||(s.stamps=new Map);const c=u(this,hr)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(!s.stamps.has(u(this,Es)))s.stamps.set(u(this,Es),{area:c,serialized:i}),i.bitmap=P(this,tt,Ab).call(this,!1);else if(u(this,hr)){const h=s.stamps.get(u(this,Es));c>h.area&&(h.area=c,h.serialized.bitmap.close(),h.serialized.bitmap=P(this,tt,Ab).call(this,!1))}return i}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}}Tt=new WeakMap,Es=new WeakMap,Xl=new WeakMap,yo=new WeakMap,Yl=new WeakMap,Ff=new WeakMap,bo=new WeakMap,au=new WeakMap,ua=new WeakMap,hr=new WeakMap,Bf=new WeakMap,tt=new WeakSet,wp=function(t,s=!1){if(!t){this.remove();return}k(this,Tt,t.bitmap),s||(k(this,Es,t.id),k(this,hr,t.isSvg)),t.file&&k(this,Ff,t.file.name),P(this,tt,kb).call(this)},jp=function(){if(k(this,Xl,null),this._uiManager.enableWaiting(!1),!!u(this,bo)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&u(this,Tt)){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&u(this,Tt)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},Nb=function(){if(u(this,Es)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(u(this,Es)).then(i=>P(this,tt,wp).call(this,i,!0)).finally(()=>P(this,tt,jp).call(this));return}if(u(this,yo)){const i=u(this,yo);k(this,yo,null),this._uiManager.enableWaiting(!0),k(this,Xl,this._uiManager.imageManager.getFromUrl(i).then(a=>P(this,tt,wp).call(this,a)).finally(()=>P(this,tt,jp).call(this)));return}if(u(this,Yl)){const i=u(this,Yl);k(this,Yl,null),this._uiManager.enableWaiting(!0),k(this,Xl,this._uiManager.imageManager.getFromFile(i).then(a=>P(this,tt,wp).call(this,a)).finally(()=>P(this,tt,jp).call(this)));return}const t=document.createElement("input");t.type="file",t.accept=Aj.join(",");const s=this._uiManager._signal;k(this,Xl,new Promise(i=>{t.addEventListener("change",async()=>{if(!t.files||t.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const a=await this._uiManager.imageManager.getFromFile(t.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),P(this,tt,wp).call(this,a)}i()},{signal:s}),t.addEventListener("cancel",()=>{this.remove(),i()},{signal:s})}).finally(()=>P(this,tt,jp).call(this))),t.click()},kb=function(){var f;const{div:t}=this;let{width:s,height:i}=u(this,Tt);const[a,o]=this.pageDimensions,c=.75;if(this.width)s=this.width*a,i=this.height*o;else if(s>c*a||i>c*o){const m=Math.min(c*a/s,c*o/i);s*=m,i*=m}this._uiManager.enableWaiting(!1);const h=k(this,bo,document.createElement("canvas"));h.setAttribute("role","img"),this.addContainer(h),this.width=s/a,this.height=i/o,this.setDims(),(f=this._initialOptions)!=null&&f.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(t.hidden=!1),P(this,tt,UN).call(this),u(this,Bf)||(this.parent.addUndoableEditor(this),k(this,Bf,!0)),this._reportTelemetry({action:"inserted_image"}),u(this,Ff)&&this.div.setAttribute("aria-description",u(this,Ff)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")},Sb=function(t,s){const{width:i,height:a}=u(this,Tt);let o=i,c=a,h=u(this,Tt);for(;o>2*t||c>2*s;){const f=o,m=c;o>2*t&&(o=Math.ceil(o/2)),c>2*s&&(c=Math.ceil(c/2));const g=new OffscreenCanvas(o,c);g.getContext("2d").drawImage(h,0,0,f,m,0,0,o,c),h=g.transferToImageBitmap()}return h},UN=function(){const[t,s]=this.parentDimensions,{width:i,height:a}=this,o=new ba,c=Math.ceil(i*t*o.sx),h=Math.ceil(a*s*o.sy),f=u(this,bo);if(!f||f.width===c&&f.height===h)return;f.width=c,f.height=h;const m=u(this,hr)?u(this,Tt):P(this,tt,Sb).call(this,c,h),g=f.getContext("2d");g.filter=this._uiManager.hcmFilter,g.drawImage(m,0,0,m.width,m.height,0,0,c,h)},Ab=function(t){if(t){if(u(this,hr)){const a=this._uiManager.imageManager.getSvgUrl(u(this,Es));if(a)return a}const s=document.createElement("canvas");return{width:s.width,height:s.height}=u(this,Tt),s.getContext("2d").drawImage(u(this,Tt),0,0),s.toDataURL()}if(u(this,hr)){const[s,i]=this.pageDimensions,a=Math.round(this.width*s*oc.PDF_TO_CSS_UNITS),o=Math.round(this.height*i*oc.PDF_TO_CSS_UNITS),c=new OffscreenCanvas(a,o);return c.getContext("2d").drawImage(u(this,Tt),0,0,u(this,Tt).width,u(this,Tt).height,0,0,a,o),c.transferToImageBitmap()}return structuredClone(u(this,Tt))},SM=function(t){var c;const{pageIndex:s,accessibilityData:{altText:i}}=this._initialData,a=t.pageIndex===s,o=(((c=t.accessibilityData)==null?void 0:c.alt)||"")===i;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&a&&o,isSameAltText:o}},Y($N,"_type","stamp"),Y($N,"_editorType",Be.STAMP);var ou,$f,Jl,Ql,vo,On,Zl,Uf,Hf,ki,wo,Cs,jo,ec,zf,Ae,tc,xt,zN,AM,zi,VN,WN,_b;const di=class di{constructor({uiManager:e,pageIndex:t,div:s,structTreeLayer:i,accessibilityManager:a,annotationLayer:o,drawLayer:c,textLayer:h,viewport:f,l10n:m}){C(this,xt);C(this,ou);C(this,$f,!1);C(this,Jl,null);C(this,Ql,null);C(this,vo,null);C(this,On,new Map);C(this,Zl,!1);C(this,Uf,!1);C(this,Hf,!1);C(this,ki,null);C(this,wo,null);C(this,Cs,null);C(this,jo,null);C(this,ec,null);C(this,zf,-1);C(this,Ae);const g=[...u(di,tc).values()];if(!di._initialized){di._initialized=!0;for(const x of g)x.initialize(m,e)}
434e.registerEditorTypes(g),k(this,Ae,e),this.pageIndex=t,this.div=s,k(this,ou,a),k(this,Jl,o),this.viewport=f,k(this,Cs,h),this.drawLayer=c,this._structTree=i,u(this,Ae).addLayer(this)}get isEmpty(){return u(this,On).size===0}get isInvisible(){return this.isEmpty&&u(this,Ae).getMode()===Be.NONE}updateToolbar(e){u(this,Ae).updateToolbar(e)}updateMode(e=u(this,Ae).getMode()){switch(P(this,xt,_b).call(this),e){case Be.NONE:this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case Be.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case Be.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:t}=this.div;if(t.toggle("nonEditing",!1),e===Be.POPUP)t.toggle("commentEditing",!0);else{t.toggle("commentEditing",!1);for(const s of u(di,tc).values())t.toggle(`${s._type}Editing`,e===s._editorType)}this.div.hidden=!1}hasTextLayer(e){var t;return e===((t=u(this,Cs))==null?void 0:t.div)}setEditingState(e){u(this,Ae).setEditingState(e)}addCommands(e){u(this,Ae).addCommands(e)}cleanUndoStack(e){u(this,Ae).cleanUndoStack(e)}toggleDrawing(e=!1){this.div.classList.toggle("drawing",!e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){var t;(t=u(this,Jl))==null||t.togglePointerEvents(e)}async enable(){var s;k(this,Hf,!0),this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),(s=u(this,ec))==null||s.abort(),k(this,ec,null);const e=new Set;for(const i of u(this,xt,zN))i.enableEditing(),i.show(!0),i.annotationElementId&&(u(this,Ae).removeChangedExistingAnnotation(i),e.add(i.annotationElementId));const t=u(this,Jl);if(t)for(const i of t.getEditableAnnotations()){if(i.hide(),u(this,Ae).isDeletedAnnotationElement(i.data.id)||e.has(i.data.id))continue;const a=await this.deserialize(i);a&&(this.addOrRebuild(a),a.enableEditing())}k(this,Hf,!1),u(this,Ae)._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){var i;if(k(this,Uf,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),u(this,Cs)&&!u(this,ec)){k(this,ec,new AbortController);const a=u(this,Ae).combinedSignal(u(this,ec));u(this,Cs).div.addEventListener("pointerdown",o=>{const{clientX:h,clientY:f,timeStamp:m}=o,g=u(this,zf);if(m-g>500){k(this,zf,m);return}k(this,zf,-1);const{classList:x}=this.div;x.toggle("getElements",!0);const y=document.elementsFromPoint(h,f);if(x.toggle("getElements",!1),!this.div.contains(y[0]))return;let v;const j=new RegExp(`^${Vp}[0-9]+$`);for(const S of y)if(j.test(S.id)){v=S.id;break}if(!v)return;const N=u(this,On).get(v);(N==null?void 0:N.annotationElementId)===null&&(Ot(o),N.dblclick(o))},{signal:a,capture:!0})}const e=u(this,Jl),t=[];if(e){const a=new Map,o=new Map;for(const c of u(this,xt,zN)){if(c.disableEditing(),!c.annotationElementId){t.push(c);continue}if(c.serialize()!==null){a.set(c.annotationElementId,c);continue}else o.set(c.annotationElementId,c);(i=this.getEditableAnnotation(c.annotationElementId))==null||i.show(),c.remove()}for(const c of e.getEditableAnnotations()){const{id:h}=c.data;if(u(this,Ae).isDeletedAnnotationElement(h)){c.updateEdited({deleted:!0});continue}let f=o.get(h);if(f){f.resetAnnotationElement(c),f.show(!1),c.show();continue}f=a.get(h),f&&(u(this,Ae).addChangedExistingAnnotation(f),f.renderAnnotationElement(c)&&f.show(!1)),c.show()}}P(this,xt,_b).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:s}=this.div;for(const a of u(di,tc).values())s.remove(`${a._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),e==null||e.updateFakeAnnotations(t),k(this,Uf,!1)}getEditableAnnotation(e){var t;return((t=u(this,Jl))==null?void 0:t.getEditableAnnotation(e))||null}setActiveEditor(e){u(this,Ae).getActive()!==e&&u(this,Ae).setActiveEditor(e)}enableTextSelection(){var e;if(this.div.tabIndex=-1,(e=u(this,Cs))!=null&&e.div&&!u(this,jo)){k(this,jo,new AbortController);const t=u(this,Ae).combinedSignal(u(this,jo));u(this,Cs).div.addEventListener("pointerdown",P(this,xt,AM).bind(this),{signal:t}),u(this,Cs).div.classList.add("highlighting")}}disableTextSelection(){var e;this.div.tabIndex=0,(e=u(this,Cs))!=null&&e.div&&u(this,jo)&&(u(this,jo).abort(),k(this,jo,null),u(this,Cs).div.classList.remove("highlighting"))}enableClick(){if(u(this,Ql))return;k(this,Ql,new AbortController);const e=u(this,Ae).combinedSignal(u(this,Ql));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:e});const t=this.pointerup.bind(this);this.div.addEventListener("pointerup",t,{signal:e}),this.div.addEventListener("pointercancel",t,{signal:e})}disableClick(){var e;(e=u(this,Ql))==null||e.abort(),k(this,Ql,null)}attach(e){u(this,On).set(e.id,e);const{annotationElementId:t}=e;t&&u(this,Ae).isDeletedAnnotationElement(t)&&u(this,Ae).removeDeletedAnnotationElement(e)}detach(e){var t;u(this,On).delete(e.id),(t=u(this,ou))==null||t.removePointerInTextLayer(e.contentDiv),!u(this,Uf)&&e.annotationElementId&&u(this,Ae).addDeletedAnnotationElement(e)}remove(e){this.detach(e),u(this,Ae).removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1}changeParent(e){var t;e.parent!==this&&(e.parent&&e.annotationElementId&&(u(this,Ae).addDeletedAnnotationElement(e),wt.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),(t=e.parent)==null||t.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}
434add(e){if(!(e.parent===this&&e.isAttachedToDOM)){if(this.changeParent(e),u(this,Ae).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(!u(this,Hf)),u(this,Ae).addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){var s;if(!e.isAttachedToDOM)return;const{activeElement:t}=document;e.div.contains(t)&&!u(this,vo)&&(e._focusEventsAllowed=!1,k(this,vo,setTimeout(()=>{k(this,vo,null),e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:u(this,Ae)._signal}),t.focus())},0))),e._structTreeParentId=(s=u(this,ou))==null?void 0:s.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||(e.parent=this),e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){const t=()=>e._uiManager.rebuild(e),s=()=>{e.remove()};this.addCommands({cmd:t,undo:s,mustExec:!1})}getEditorByUID(e){for(const t of u(this,On).values())if(t.uid===e)return t;return null}combinedSignal(e){return u(this,Ae).combinedSignal(e)}canCreateNewEmptyEditor(){var e;return(e=u(this,xt,zi))==null?void 0:e.canCreateNewEmptyEditor()}async pasteEditor(e,t){this.updateToolbar(e),await u(this,Ae).updateMode(e.mode);const{offsetX:s,offsetY:i}=P(this,xt,WN).call(this),a=u(this,Ae).getId(),o=P(this,xt,VN).call(this,{parent:this,id:a,x:s,y:i,uiManager:u(this,Ae),isCentered:!0,...t});o&&this.add(o)}async deserialize(e){var t;return await((t=u(di,tc).get(e.annotationType??e.annotationEditorType))==null?void 0:t.deserialize(e,this,u(this,Ae)))||null}createAndAddNewEditor(e,t,s={}){const i=u(this,Ae).getId(),a=P(this,xt,VN).call(this,{parent:this,id:i,x:e.offsetX,y:e.offsetY,uiManager:u(this,Ae),isCentered:t,...s});return a&&this.add(a),a}get boundingClientRect(){return this.div.getBoundingClientRect()}addNewEditor(e={}){this.createAndAddNewEditor(P(this,xt,WN).call(this),!0,e)}setSelected(e){u(this,Ae).setSelected(e)}toggleSelected(e){u(this,Ae).toggleSelected(e)}unselect(e){u(this,Ae).unselect(e)}pointerup(e){var i;const{isMac:t}=ls.platform;if(e.button!==0||e.ctrlKey&&t||e.target!==this.div||!u(this,Zl)||(k(this,Zl,!1),(i=u(this,xt,zi))!=null&&i.isDrawer&&u(this,xt,zi).supportMultipleDrawings))return;if(!u(this,$f)){k(this,$f,!0);return}const s=u(this,Ae).getMode();if(s===Be.STAMP||s===Be.POPUP||s===Be.SIGNATURE){u(this,Ae).unselectAll();return}this.createAndAddNewEditor(e,!1)}pointerdown(e){var i;if(u(this,Ae).getMode()===Be.HIGHLIGHT&&this.enableTextSelection(),u(this,Zl)){k(this,Zl,!1);return}const{isMac:t}=ls.platform;if(e.button!==0||e.ctrlKey&&t||e.target!==this.div)return;if(k(this,Zl,!0),(i=u(this,xt,zi))!=null&&i.isDrawer){this.startDrawingSession(e);return}const s=u(this,Ae).getActive();k(this,$f,!s||s.isEmpty())}startDrawingSession(e){if(this.div.focus({preventScroll:!0}),u(this,ki)){u(this,xt,zi).startDrawing(this,u(this,Ae),!1,e);return}u(this,Ae).setCurrentDrawingSession(this),k(this,ki,new AbortController);const t=u(this,Ae).combinedSignal(u(this,ki));this.div.addEventListener("blur",({relatedTarget:s})=>{s&&!this.div.contains(s)&&(k(this,wo,null),this.commitOrRemove())},{signal:t}),u(this,xt,zi).startDrawing(this,u(this,Ae),!1,e)}pause(e){if(e){const{activeElement:t}=document;this.div.contains(t)&&k(this,wo,t);return}u(this,wo)&&setTimeout(()=>{var t;(t=u(this,wo))==null||t.focus(),k(this,wo,null)},0)}endDrawingSession(e=!1){return u(this,ki)?(u(this,Ae).setCurrentDrawingSession(null),u(this,ki).abort(),k(this,ki,null),k(this,wo,null),u(this,xt,zi).endDrawing(e)):null}findNewParent(e,t,s){const i=u(this,Ae).findParent(t,s);return i===null||i===this?!1:(i.changeParent(e),!0)}commitOrRemove(){return u(this,ki)?(this.endDrawingSession(),!0):!1}onScaleChanging(){u(this,ki)&&u(this,xt,zi).onScaleChangingWhenDrawing(this)}destroy(){var e,t;this.commitOrRemove(),((e=u(this,Ae).getActive())==null?void 0:e.parent)===this&&(u(this,Ae).commitOrRemove(),u(this,Ae).setActiveEditor(null)),u(this,vo)&&(clearTimeout(u(this,vo)),k(this,vo,null));for(const s of u(this,On).values())(t=u(this,ou))==null||t.removePointerInTextLayer(s.contentDiv),s.setParent(null),s.isAttachedToDOM=!1,s.div.remove();this.div=null,u(this,On).clear(),u(this,Ae).removeLayer(this)}async render({viewport:e}){this.viewport=e,uu(this.div,e);for(const t of u(this,Ae).getEditors(this.pageIndex))this.add(t),t.rebuild();await u(this,Ae).findClonesForPage(this),this.div.hidden=this.isEmpty,this.updateMode()}update({viewport:e}){u(this,Ae).commitOrRemove(),P(this,xt,_b).call(this);const t=this.viewport.rotation,s=e.rotation;if(this.viewport=e,uu(this.div,{rotation:s}),t!==s)for(const i of u(this,On).values())i.rotate(s)}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return u(this,Ae).viewParameters.realScale}};ou=new WeakMap,$f=new WeakMap,Jl=new WeakMap,Ql=new WeakMap,vo=new WeakMap,On=new WeakMap,Zl=new WeakMap,Uf=new WeakMap,Hf=new WeakMap,ki=new WeakMap,wo=new WeakMap,Cs=new WeakMap,jo=new WeakMap,ec=new WeakMap,zf=new WeakMap,Ae=new WeakMap,tc=new WeakMap,xt=new WeakSet,zN=function(){return u(this,On).size!==0?u(this,On).values():u(this,Ae).getEditors(this.pageIndex)},AM=function(e){u(this,Ae).unselectAll();const{target:t}=e;if(t===u(this,Cs).div||(t.getAttribute("role")==="img"||t.classList.contains("endOfContent")||t.classList.contains("textLayerImagePlaceholder"))&&u(this,Cs).div.contains(t)){const{isMac:s}=ls.platform;if(e.button!==0||e.ctrlKey&&s)return;u(this,Ae).showAllEditors("highlight",!0,!0),u(this,Cs).div.classList.add("free"),this.toggleDrawing(),Yb.startHighlighting(this,u(this,Ae).direction==="ltr",{target:u(this,Cs).div,x:e.x,y:e.y}),u(this,Cs).div.addEventListener("pointerup",()=>{u(this,Cs).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:u(this,Ae)._signal}),e.preventDefault()}},zi=function(){return u(di,tc).get(u(this,Ae).getMode())},VN=function(e){const t=u(this,xt,zi);return t?new t.prototype.constructor(e):null},WN=function(){const{x:e,y:t,width:s,height:i}=this.boundingClientRect,a=Math.max(0,e),o=Math.max(0,t),c=Math.min(window.innerWidth,e+s),h=Math.min(window.innerHeight,t+i),f=(a+c)/2-e,m=(o+h)/2-t,[g,x]=this.viewport.rotation%180===0?[f,m]:[m,f];return{offsetX:g,offsetY:x}},_b=function(){for(const e of u(this,On).values())e.isEmpty()&&e.remove()},Y(di,"_initialized",!1),C(di,tc,new Map([NN,MN,$N,Yb,BN].map(e=>[e._editorType,e])));let HN=di;var Si,gn,lu,O0,Ev,_M,wa,qN,EM,KN;const ms=class ms{constructor(){C(this,wa);C(this,Si,null);C(this,gn,new Map);C(this,lu,new Map)}setParent(e){if(!u(this,Si)){k(this,Si,e);return}if(u(this,Si)!==e){if(u(this,gn).size>0)for(const t of u(this,gn).values())t.remove(),e.append(t);k(this,Si,e)}}static get _svgFactory(){return $e(this,"_svgFactory",new Kb)}draw(e,t=!1,s=!1){const i=ss(ms,O0)._++,a=P(this,wa,qN).call(this),o=ms._svgFactory.createElement("defs");a.append(o);const c=ms._svgFactory.createElement("path");o.append(c);const h=`path_${i}`;c.setAttribute("id",h),c.setAttribute("vector-effect","non-scaling-stroke"),t&&u(this,lu).set(i,c);const f=s?P(this,wa,EM).call(this,o,h):null,m=ms._svgFactory.createElement("use");return a.append(m),m.setAttribute("href",`#${h}`),this.updateProperties(a,e),u(this,gn).set(i,a),{id:i,clipPathId:`url(#${f})`}}drawOutline(e,t){const s=ss(ms,O0)._++,i=P(this,wa,qN).call(this),a=ms._svgFactory.createElement("defs");i.append(a);const o=ms._svgFactory.createElement("path");a.append(o);const c=`path_${s}`;o.setAttribute("id",c),o.setAttribute("vector-effect","non-scaling-stroke");let h;if(t){const g=ms._svgFactory.createElement("mask");a.append(g),h=`mask_${s}`,g.setAttribute("id",h),g.setAttribute("maskUnits","objectBoundingBox");const x=ms._svgFactory.createElement("rect");g.append(x),x.setAttribute("width","1"),x.setAttribute("height","1"),x.setAttribute("fill","white");const y=ms._svgFactory.createElement("use");g.append(y),y.setAttribute("href",`#${c}`),y.setAttribute("stroke","none"),y.setAttribute("fill","black"),y.setAttribute("fill-rule","nonzero"),y.classList.add("mask")}const f=ms._svgFactory.createElement("use");i.append(f),f.setAttribute("href",`#${c}`),h&&f.setAttribute("mask",`url(#${h})`);const m=f.cloneNode();return i.append(m),f.classList.add("mainOutline"),m.classList.add("secondaryOutline"),this.updateProperties(i,e),u(this,gn).set(s,i),s}finalizeDraw(e,t){u(this,lu).delete(e),this.updateProperties(e,t)}updateProperties(e,t){var h;if(!t)return;const{root:s,bbox:i,rootClass:a,path:o}=t,c=typeof e=="number"?u(this,gn).get(e):e;if(c){if(s&&P(this,wa,KN).call(this,c,s),i&&P(h=ms,Ev,_M).call(h,c,i),a){const{classList:f}=c;for(const[m,g]of Object.entries(a))f.toggle(m,g)}if(o){const m=c.firstElementChild.firstElementChild;P(this,wa,KN).call(this,m,o)}}}updateParent(e,t){if(t===this)return;const s=u(this,gn).get(e);s&&(u(t,Si).append(s),u(this,gn).delete(e),u(t,gn).set(e,s))}remove(e){u(this,lu).delete(e),u(this,Si)!==null&&(u(this,gn).get(e).remove(),u(this,gn).delete(e))}destroy(){k(this,Si,null);for(const e of u(this,gn).values())e.remove();u(this,gn).clear(),u(this,lu).clear()}};Si=new WeakMap,gn=new WeakMap,lu=new WeakMap,O0=new WeakMap,Ev=new WeakSet,_M=function(e,[t,s,i,a]){const{style:o}=e;o.top=`${100*s}%`,o.left=`${100*t}%`,o.width=`${100*i}%`,o.height=`${100*a}%`},wa=new WeakSet,qN=function(){const e=ms._svgFactory.create(1,1,!0);return u(this,Si).append(e),e.setAttribute("aria-hidden",!0),e},EM=function(e,t){const s=ms._svgFactory.createElement("clipPath");e.append(s);const i=`clip_${t}`;s.setAttribute("id",i),s.setAttribute("clipPathUnits","objectBoundingBox");const a=ms._svgFactory.createElement("use");return s.append(a),a.setAttribute("href",`#${t}`),a.classList.add("clip"),i},KN=function(e,t){for(const[s,i]of Object.entries(t))i===null?e.removeAttribute(s):e.setAttribute(s,i)}
434,C(ms,Ev),C(ms,O0,0);let GN=ms;function Ay(r){return`${(r*100).toFixed(2)}%`}var Vf,F0,B0,Wf,ha,fa,$0,Cv,CM;const Op=class Op{constructor(e,t,s,i){C(this,Cv);C(this,Vf,[]);C(this,F0,new Map);C(this,B0,null);C(this,Wf,0);C(this,ha,0);C(this,fa,0);k(this,Wf,e),k(this,Vf,t),k(this,ha,s.rawDims.pageWidth),k(this,fa,s.rawDims.pageHeight),k(this,B0,i)}render(){const e=document.createElement("div");e.className="textLayerImages";for(let t=0;t<u(this,Vf).length;t+=6){const s=P(this,Cv,CM).call(this,u(this,Vf).subarray(t,t+6));s&&e.append(s)}return e.addEventListener("contextmenu",t=>{var S;if(!(t.target instanceof HTMLCanvasElement))return;const s=t.target,i=u(this,F0).get(s);if(!i)return;const a=(S=u(Op,$0))==null?void 0:S.deref();if(a===s)return;a&&(a.width=0,a.height=0),k(Op,$0,new WeakRef(s));const{inverseTransform:o,x1:c,y1:h,width:f,height:m}=i,g=u(this,B0).call(this),x=Math.ceil(c*g.width),y=Math.ceil(h*g.height),v=Math.floor((c+f/u(this,ha))*g.width),j=Math.floor((h+m/u(this,fa))*g.height);s.width=v-x,s.height=j-y;const N=s.getContext("2d");N.setTransform(...o),N.translate(-x,-y),N.drawImage(g,0,0)}),e}};Vf=new WeakMap,F0=new WeakMap,B0=new WeakMap,Wf=new WeakMap,ha=new WeakMap,fa=new WeakMap,$0=new WeakMap,Cv=new WeakSet,CM=function([e,t,s,i,a,o]){const c=Math.hypot((a-e)*u(this,ha),(o-t)*u(this,fa)),h=Math.hypot((s-e)*u(this,ha),(i-t)*u(this,fa));if(c<u(this,Wf)||h<u(this,Wf))return null;const f=[(a-e)*u(this,ha)/c,(o-t)*u(this,fa)/c,(s-e)*u(this,ha)/h,(i-t)*u(this,fa)/h,0,0],m=me.inverseTransform(f),g=document.createElement("canvas");return g.className="textLayerImagePlaceholder",g.width=0,g.height=0,Object.assign(g.style,{opacity:0,position:"absolute",left:Ay(e),top:Ay(t),width:Ay(c/u(this,ha)),height:Ay(h/u(this,fa)),transformOrigin:"0% 0%",transform:`matrix(${f.join(",")})`}),u(this,F0).set(g,{inverseTransform:m,width:c,height:h,x1:e,y1:t}),g},C(Op,$0,null);let XN=Op;globalThis._pdfjsTestingUtils={HighlightOutliner:SN};globalThis.pdfjsLib={AbortException:ac,AnnotationEditorLayer:HN,AnnotationEditorParamsType:ze,AnnotationEditorType:Be,AnnotationEditorUIManager:hu,AnnotationLayer:wN,AnnotationMode:il,AnnotationType:rs,applyOpacity:Vz,build:i9,ColorPicker:Gb,createValidAbsoluteUrl:cP,CSSConstants:zz,DOMSVGFactory:Kb,DrawLayer:GN,FeatureTest:ls,fetchData:t5,findContrastColor:Wz,getDocument:AR,getFilenameFromUrl:Oz,getPdfFilenameFromUrl:Fz,getRGB:Y0,getRGBA:r5,getUuid:uP,getXfaPageViewport:$z,GlobalWorkerOptions:ga,ImageKind:Vy,InvalidPDFException:Nj,isDataScheme:Gv,isPdfFile:n5,isValidExplicitDest:cV,makeArr:Zk,makeMap:e5,makeObj:Sj,MathClamp:Pt,noContextMenu:Jr,normalizeUnicode:Lz,OPS:$a,OutputScale:ba,PasswordResponses:_z,PDFDataRangeTransport:_R,PDFDateString:zb,PDFWorker:Xp,PermissionFlag:Az,PixelsPerInch:oc,RenderingCancelledException:s5,renderRichText:fP,ResponseException:Hb,setLayerDimensions:uu,shadow:$e,SignatureExtractor:No,stopEvent:Ot,SupportedImageMimeTypes:Aj,TextLayer:Kp,TextLayerImages:XN,TouchManager:Wb,updateUrlHash:dP,Util:me,VerbosityLevel:Hv,version:r9,XfaLayer:hP};const C9="/assets/pdf.worker-B1D2UnXD.mjs";ga.workerSrc=C9;const T9=({url:r,title:e,className:t})=>{const s=T.useRef(null),[i,a]=T.useState(!0),[o,c]=T.useState(!1);return T.useEffect(()=>{let h=!0,f=null,m=null;return(async()=>{try{a(!0),c(!1);const x=await fetch(r);if(!x.ok)throw new Error(`HTTP error! status: ${x.status}`);const y=await x.arrayBuffer();if(!h||(m=await AR({data:y}).promise,!h))return;const j=await m.getPage(1);if(!h||!s.current)return;const N=s.current,S=N.getContext("2d",{alpha:!1});if(!S)return;const A=window.devicePixelRatio||1,E=600,M=600*9/16,R=j.getViewport({scale:1}),I=E/R.width,F=M/R.height,D=Math.min(I,F),O=j.getViewport({scale:D*1.5});N.height=O.height*A,N.width=O.width*A,N.style.width="100%",N.style.height="auto",S.scale(A,A),S.fillStyle="#ffffff",S.fillRect(0,0,N.width,N.height),f=j.render({canvasContext:S,viewport:O}),await f.promise,h&&a(!1)}catch(x){h&&x.name!=="RenderingCancelledException"&&(console.error("PDF preview error:",e,x),c(!0),a(!1))}})(),()=>{h=!1,f&&f.cancel(),m&&m.destroy()}},[r,e]),n.jsxs("div",{className:`relative aspect-video bg-white flex items-center justify-center overflow-hidden border-b border-gray-100 ${t}`,children:[i&&n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-white z-10",children:[n.jsx("div",{className:"w-8 h-8 border-3 border-blue-600 border-t-transparent roun
434ded-full animate-spin"}),n.jsxs("span",{className:"text-[10px] font-black text-blue-600 uppercase tracking-widest text-center animate-pulse",children:["Generating",n.jsx("br",{}),"Preview..."]})]}),o?n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center p-6 text-center bg-gray-50",children:[n.jsx("div",{className:"w-10 h-10 bg-gray-100 rounded-full flex items-center justify-center mb-2 text-gray-300",children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"}),n.jsx("polyline",{points:"14 2 14 8 20 8"}),n.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),n.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),n.jsx("polyline",{points:"10 9 9 9 8 9"})]})}),n.jsxs("span",{className:"text-[9px] font-bold text-gray-400 uppercase leading-tight text-center",children:["Preview",n.jsx("br",{}),"Unavailable"]})]}):n.jsx("canvas",{ref:s,className:`w-full h-full object-contain transition-opacity duration-700 ${i?"opacity-0":"opacity-100"}`})]})},JC=[{id:"ai-training",category:"AIäºæ¥",title:"AI人æè²æç ä¿® ãã¯ã¤ããã¼ãã¼",description:"å®åã«ç´çµããAIãªã¹ããªã³ã°ç ä¿®ã®ã«ãªãã¥ã©ã ã¨å°å ¥ã¡ãªãããã¾ã¨ããææ°è³æã§ãã",pdfUrl:"/assets/documents/ãã¯ã¤ããã¼ãã¼_AI人æè²æç ä¿®ããã°ã©ã (1).pdf",fileName:"ãã¯ã¤ããã¼ãã¼_AI人æè²æç ä¿®ããã°ã©ã (1).pdf"},{id:"hero-egg",category:"HERO EGG",title:"Hero Egg ãã¯ã¤ããã¼ãã¼",description:"Hero Eggãµã¼ãã¹ã®æ¦è¦ã»å°å ¥ã¡ãªãããã¾ã¨ãããã¯ã¤ããã¼ãã¼ã§ãã",pdfUrl:"/assets/documents/hero_egg_whitepaper.pdf",fileName:"hero_egg_whitepaper.pdf"},{id:"metaverse",category:"ã¡ã¿ãã¼ã¹ã»XR",title:"ã¡ã¿ãã¼ã¹äºæ¥ ãã¯ã¤ããã¼ãã¼",description:"ã¡ã¿ãã¼ã¹ã»XRäºæ¥ã®æ¦è¦ã»æ´»ç¨äºä¾ãã¾ã¨ãããã¯ã¤ããã¼ãã¼ã§ãã",pdfUrl:"/assets/documents/metaverse_whitepaper.pdf",fileName:"metaverse_whitepaper.pdf"}],P9=(r,e)=>{try{const t=decodeURIComponent(e.split("/").pop()||"");if(t.toLowerCase().endsWith(".pdf"))return t}catch{}return`${r}.pdf`},R9=()=>{const[r,e]=T.useState("select"),[t,s]=T.useState([]),[i,a]=T.useState(!1),[o,c]=T.useState([]),[h,f]=T.useState(!0);T.useEffect(()=>{let y=!0;return(async()=>{try{const j=(await fO()).filter(N=>{var S;return(S=N.pdf)==null?void 0:S.url}).map(N=>{var S;return{id:N.id,category:((S=N.category)==null?void 0:S[0])||"ãã®ä»",title:N.title,description:N.description||"",pdfUrl:N.pdf.url,fileName:P9(N.title,N.pdf.url)}});y&&c(j.length>0?j:JC)}catch{y&&c(JC)}finally{y&&f(!1)}})(),()=>{y=!1}},[]);const m=o.reduce((y,v)=>(y.includes(v.category)||y.push(v.category),y),[]);T.useEffect(()=>{if(r!=="input")return;a(!0);let y=!1;const v=N=>{var S,A;if(((S=N.data)==null?void 0:S.type)==="hsFormCallback"&&((A=N.data)==null?void 0:A.eventName)==="onFormSubmitted"){if(y)return;y=!0,console.log("HubSpot Form Submitted:",N.data);{const E=N.data.data||{};let M="",R="",I="",F="";if(E.submissionValues)M=E.submissionValues.email,R=E.submissionValues.firstname,I=E.submissionValues.lastname,F=E.submissionValues.company;else if(Array.isArray(E)){const z=re=>{var he;return(he=E.find(de=>de.name===re))==null?void 0:he.value};M=z("email"),R=z("firstname"),I=z("lastname"),F=z("company")}else M=E.email,R=E.firstname,I=E.lastname,F=E.company;const D=`${I||""} ${R||""}`.trim()||"ã客æ§";console.log("Extracted Data:",{email:M,fullName:D,company:F});const O=o.filter(z=>t.includes(z.id)),$=O.map(z=>({name:z.fileName,url:z.pdfUrl}));M&&$.length>0?fetch("/api/send-mail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"document_request",name:D,email:M,company:F,documentFiles:$,content:`HubSpotè³æè«æ±ï¼ãµã¤ã飿ºï¼ 435è³æ: ${O.map(z=>z.title).join(", ")}`})}).then(z=>{z.ok?console.log("Email API triggered successfully"):console.error("Email API returned error",z.status)}).catch(z=>console.error("Email trigger failed:",z)):console.warn("Missing email or no files selected",{email:M,files:$.length}),e("thanks"),window.scrollTo(0,0)}}};window.addEventListener("message",v);const j=()=>{const N=window.hbspt,S=document.getElementById("hubspot-form-container");if(N&&S){S.innerHTML="";try{N.forms.create({region:"na2",portalId:"243129625",formId:"5e03bb7b-49a7-43cb-8644-9fa906c55a3a",target:"#hubspot-form-container",inlineMessage:"éä¿¡å®äº",onFormReady:()=>{a(!1)}})}catch(A){console.error("HubSpot Error:",A),a(!1)}}else setTimeout(j,100)};return j(),()=>{window.removeEventListener("message",v)}
435},[r,t,o]);const g=y=>{s(v=>v.includes(y)?v.filter(j=>j!==y):[...v,y])},x=()=>n.jsx("div",{className:"bg-gray-50 border-b border-gray-200",children:n.jsx("div",{className:"container mx-auto px-4 max-w-3xl py-8 md:py-12",children:n.jsx("div",{className:"flex items-center justify-center",children:[{id:"select",step:"01",label:"è³æé¸æ"},{id:"input",step:"02",label:"ãå®¢æ§æ
å ±å
¥å"},{id:"thanks",step:"03",label:"éä¿¡å®äº"}].map((y,v)=>{const N=["select","input","thanks"].indexOf(r),S=r===y.id,A=v<N;return n.jsxs(Co.Fragment,{children:[n.jsxs("div",{className:"flex flex-col items-center gap-2 md:gap-3",children:[n.jsxs("span",{className:`text-[8px] md:text-[10px] font-black tracking-[0.2em] md:tracking-[0.3em] ${S||A?"text-blue-600":"text-gray-300"}`,children:["STEP ",y.step]}),n.jsx("span",{className:`text-[10px] md:text-sm font-black tracking-[0.1em] md:tracking-[0.2em] ${S||A?"text-gray-900":"text-gray-300"}`,children:y.label})]}),v<2&&n.jsx("div",{className:`w-12 md:w-24 h-px mx-4 md:mx-8 mt-4 md:mt-5 transition-colors duration-500 ${A?"bg-blue-600":"bg-gray-200"}`})]},y.step)})})})});return n.jsxs("main",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"DOCUMENT",titleJa:"ãå½¹ç«ã¡è³æ"}),x(),n.jsx("section",{className:"py-12 md:py-24",children:n.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:n.jsxs(an,{mode:"wait",children:[r==="select"&&n.jsxs(Ce.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},children:[n.jsxs("div",{className:"mb-12 text-center",children:[n.jsx("h3",{className:"text-xl md:text-2xl font-black text-gray-900 mb-4",children:"è«æ±ããè³æã鏿ãã¦ãã ãã"}),n.jsx("p",{className:"text-sm text-gray-500 font-bold",children:"PDFã®1ãã¼ã¸ç®ããã¬ãã¥ã¼è¡¨ç¤ºããã¾ããã¯ãªãã¯ã§é¸æã§ãã¾ãã"})]}),h&&n.jsxs("div",{className:"flex flex-col items-center justify-center py-24 gap-4",children:[n.jsx($n,{className:"animate-spin text-blue-600",size:40}),n.jsx("p",{className:"text-sm font-bold text-gray-400",children:"è³æãèªã¿è¾¼ãã§ãã¾ã..."})]}),!h&&m.map(y=>{const v=o.filter(j=>j.category===y);return v.length===0?null:n.jsxs("div",{className:"mb-16 last:mb-0",children:[n.jsx("div",{className:"flex items-center gap-4 mb-8",children:n.jsx("h4",{className:"text-lg font-black text-gray-900 border-l-4 border-blue-600 pl-4 uppercase tracking-widest",children:y})}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:v.map(j=>{const N=t.includes(j.id);return n.jsxs("div",{onClick:()=>g(j.id),className:`group cursor-pointer relative bg-white rounded-2xl border-2 transition-all duration-300 overflow-hidden shadow-sm hover:shadow-xl ${N?"border-blue-600 ring-4 ring-blue-50":"border-gray-100 hover:border-blue-200"}`,children:[N&&n.jsx("div",{className:"absolute top-3 right-3 z-20 w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center text-white shadow-lg",children:n.jsx(Kf,{size:20,strokeWidth:4})}),n.jsx(T9,{url:j.pdfUrl,title:j.title,className:N?"scale-105":"group-hover:scale-105 transition-transform duration-700"}),n.jsxs("div",{className:"p-5 bg-white relative z-10",children:[n.jsx("h5",{className:"text-sm font-black text-gray-900 mb-2 leading-tight min-h-[2.5rem] line-clamp-2",children:j.title}),n.jsx("p",{className:"text-[10px] font-bold text-gray-400 line-clamp-2 leading-relaxed",children:j.description})]})]},j.id)})})]},y)}),n.jsxs("div",{className:"mt-20 pt-12 border-t border-gray-100 flex flex-col items-center gap-6",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-sm font-bold text-gray-500",children:"鏿ä¸:"}),n.jsxs("span",{className:"text-lg font-black text-blue-600",children:[t.length," ä»¶"]})]}),n.jsxs("button",{onClick:()=>{t.length>0?(e("input"),window.scrollTo(0,0)):alert("è³æã1ã¤ä»¥ä¸é¸æãã¦ãã ããã")},disabled:t.length===0,className:`inline-flex items-center justify-center px-20 py-5 text-sm font-black tracking-[0.3em] transition-all duration-500 min-w-[340px] rounded-full shadow-xl ${t.length>0?"bg-gray-900 text-white hover:bg-blue-600":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:["å
¥åç»é¢ã¸é²ã",n.jsx(ya,{className:"ml-2 w-5 h-5"})]})]})]},"select"),r==="input"&&n.jsxs(Ce.div,{initial:{opacity:0,x:20}
435,animate:{opacity:1,x:0},exit:{opacity:0,x:20},children:[n.jsxs("div",{className:"mb-12 text-center",children:[n.jsxs("button",{onClick:()=>e("select"),className:"inline-flex items-center text-xs font-bold text-gray-400 hover:text-blue-600 mb-6 transition-colors",children:[n.jsx(q0,{size:14})," è³æé¸æã«æ»ã"]}),n.jsx("h3",{className:"text-xl md:text-2xl font-black text-gray-900 mb-4",children:"ãå®¢æ§æ å ±ããå ¥åãã ãã"}),n.jsx("p",{className:"text-sm text-gray-500 font-bold",children:"以ä¸ã®ãã©ã¼ã ã«å ¥åå¾ãéä¿¡ãã¦ãã ããã"})]}),n.jsxs("div",{className:"bg-gray-50 p-6 md:p-12 rounded-3xl border border-gray-100 shadow-inner min-h-[400px] relative flex flex-col items-center justify-center",children:[i&&n.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-4",children:[n.jsx($n,{className:"animate-spin text-blue-600",size:40}),n.jsx("p",{className:"text-sm font-bold text-gray-400",children:"ãã©ã¼ã ãèªã¿è¾¼ãã§ãã¾ã..."})]}),n.jsx("div",{id:"hubspot-form-container",className:`w-full ${i?"hidden":"block"}`})]}),n.jsx("div",{className:"mt-12 text-center",children:n.jsxs("p",{className:"text-xs text-gray-400 font-bold leading-relaxed max-w-2xl mx-auto",children:["â»éä¿¡å¾ããå ¥åããã ããã¡ã¼ã«ã¢ãã¬ã¹å®ã«è³æãã¦ã³ãã¼ãã®ãæ¡å ãèªåéä¿¡ããã¾ãã",n.jsx("br",{}),"ã¡ã¼ã«ãå±ããªãå ´åã¯ã大å¤ãææ°ã§ããè¿·æã¡ã¼ã«ãã©ã«ããã確èªããã ããããåãåãããã ããã"]})})]},"input"),r==="thanks"&&n.jsx(Ce.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},children:n.jsxs("div",{className:"text-center py-12 md:py-20",children:[n.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 bg-green-50 rounded-full mb-8",children:n.jsx(tP,{className:"text-green-500",size:48,strokeWidth:2})}),n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-900 mb-4",children:"éä¿¡ãå®äºãã¾ãã"}),n.jsx("p",{className:"text-sm md:text-base text-gray-500 font-bold leading-relaxed max-w-xl mx-auto mb-8",children:"ãå½¹ç«ã¡è³æã®ãè«æ±ãããã¨ããããã¾ãã"}),n.jsxs("div",{className:"bg-blue-50 border border-blue-100 rounded-2xl p-6 md:p-8 max-w-lg mx-auto mb-12",children:[n.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[n.jsx(Uv,{className:"text-blue-600",size:20}),n.jsx("span",{className:"text-sm font-black text-blue-900",children:"ã¡ã¼ã«ãã確èªãã ãã"})]}),n.jsxs("p",{className:"text-xs md:text-sm text-blue-700 font-bold leading-relaxed",children:["ãå ¥åããã ããã¡ã¼ã«ã¢ãã¬ã¹å®ã«ã",n.jsx("br",{className:"hidden md:inline"}),"è³æãæ·»ä»ããã¡ã¼ã«ããéããã¦ããã¾ãã",n.jsx("br",{}),"å±ããªãå ´åã¯è¿·æã¡ã¼ã«ãã©ã«ããã確èªãã ããã"]})]}),n.jsxs(q,{to:"/",className:"inline-flex items-center justify-center gap-2 px-12 py-4 bg-gray-900 text-white text-sm font-black tracking-[0.2em] rounded-full hover:bg-blue-600 transition-all duration-500 shadow-xl",children:[n.jsx(Jk,{size:16}),"ããããã¼ã¸ã¸æ»ã"]})]})},"thanks")]})})})]})},M9=[{id:"xr",title:"XRäºæ¥",description:`XRæè¡ã®ãã«ã©ã§ã伿¥ãèªæ²»ä½ãæ±ãã¦ããæè²ã»é²ç½ã»è¦³å ã»ç ä¿®ã»ç¾å ´æ¯æ´ãªã©ã®èª²é¡ã«å¯ãæ·»ããä½é¨åã½ãªã¥ã¼ã·ã§ã³ã®ææ¡å¶æ¥ããä»»ããã¾ãã 436 437â XRã½ãªã¥ã¼ã·ã§ã³ã®ææ¡ 438伿¥ãèªæ²»ä½ãæè²æ©é¢ãæ½è¨éå¶ä¼ç¤¾ãªã©ã«å¯¾ãã¦ãã¡ã¿ãã¼ã¹ã»VRã»ARã»ã¹ãã¼ãã°ã©ã¹ãæ´»ç¨ãã課é¡è§£æ±ºåã®ææ¡ãè¡ãã¾ããã»ããã¼ãã¤ãã³ãåå ãç´¹ä»ãªã©ããåè«ã¢ããåå¾ãã課é¡ããã¢ãªã³ã°ãã¯ã©ã¤ã¢ã³ãã«å¿ããXRç ä¿®ãé²ç½ä½é¨ã観å ã³ã³ãã³ããå±ç¤ºä¼æ´»ç¨ãç¾å ´æ¯æ´ã½ãªã¥ã¼ã·ã§ã³ãªã©ãææ¡ãã¾ãã`,positions:["å¶æ¥"],details:[{label:"å¿åè³æ ¼",value:`妿´ä¸åï¼æ¥ç¨®æªçµé¨OKï¼ç¬¬äºæ°åæè¿ 439â æ³äººåãã®å¶æ¥çµé¨ã¾ãã¯é¡§å®¢æè¡çµé¨ããæã¡ã®æ¹ 440â XRã»ã¡ã¿ãã¼ã¹ã»ã¹ãã¼ãã°ã©ã¹ã»æè²ã»é²ç½é åã«èå³ãããæ¹`},{label:"給ä¸",value:`æçµ¦27ä¸åã50ä¸åï¼æ¥ç¸¾è³ä¸å¹´2å 441æ³å®å¹´åï¼300ä¸åã600ä¸å`},{label:"å¤åå°",value:`大éªåºå¤§éªå¸æµªéåºé£æ³¢ä¸2-10-70 442ãªãã°ãã¼ã¯ã¹1F eã¹ã¿ã¸ã¢ã ãªãã°æ¬åº 443åæµ·é»éããªãã°é§ ãä¸å¤®å£ã»åå£ç´çµ`},{label:"å¤åæé",value:`10:00ã19:00ï¼å®å8æéï¼ 444æ®æ¥æ20æéç¨åº¦`},{label:"伿¥ã»ä¼æ",value:`å¹´é伿¥120æ¥ï¼å®å ¨é±ä¼2æ¥å¶ï¼åæ¥ç¥ï¼ 445å¹´æ«å¹´å§ã»GWã»å¤å£ä¼æã»æçµ¦ä¼æã»ç£åç£å¾ä¼æã»è²å 伿`},{label:"å¾ é",value:`社ä¼ä¿éºå®åï¼äº¤éè²»å ¨é¡æ¯çµ¦ï¼æè£ åºæ¬èªç±ã»ãã¤ã«OK 446æçµ¦å¹´1åï¼è³ä¸å¹´2å`}],contactRecruit:!0},{id:"ai",title:"AIäºæ¥",description:`AIæè¡ã®ãã«ã©ã§ã伿¥ãèªæ²»ä½ãæ±ãã¦ãã課é¡ã«å¯ãæ·»ãã解決ã¸ã¨å°ãææ¡æ¥åããä»»ããã¾ãã 447 448â AIç ä¿®ã»AIã·ã¹ãã ã®ææ¡ 449人æè²æãç ä¿®ãæ¥åãµãã¼ããªã©ã«èª²é¡ãæã¤ã¯ã©ã¤ã¢ã³ãã¸ãAIãã¼ã«ãæ´»ç¨ããDXã½ãªã¥ã¼ã·ã§ã³ãæä¾ãã¾ããã»ããã¼ãã¤ãã³ãåå ãç´¹ä»ãªã©ããåè«ã¢ããåå¾ãã課é¡ããã¢ãªã³ã°ãã¯ã©ã¤ã¢ã³ãã«å¿ããæé©ãªAIç ä¿®ã®å°å ¥ãAIã·ã¹ãã ã®éçºãªã©ãææ¡ãã¾ãã`,positions:["å¶æ¥"],details:[{label:"å¿åè³æ ¼",value:`妿´ä¸åï¼æ¥ç¨®æªçµé¨OKï¼ç¬¬äºæ°åæè¿ 450â æ³äººåãã®å¶æ¥çµé¨ã¾ãã¯é¡§å®¢æè¡çµé¨ããæã¡ã®æ¹ 451â AIãã¡ã¿ãã¼ã¹ãªã©ã®ææ°æè¡ã«èå³ãããæ¹`},{label:"給ä¸",value:`æçµ¦27ä¸åã50ä¸åï¼æ¥ç¸¾è³ä¸å¹´2å 452æ³å®å¹´åï¼300ä¸åã600ä¸å`},{label:"å¤åå°",value:`大éªåºå¤§éªå¸æµªéåºé£æ³¢ä¸2-10-70 453ãªãã°ãã¼ã¯ã¹1F eã¹ã¿ã¸ã¢ã ãªãã°æ¬åº 454åæµ·é»éããªãã°é§ ãä¸å¤®å£ã»åå£ç´çµ`},{label:"å¤åæé",value:`10:00ã19:00ï¼å®å8æéï¼ 455æ®æ¥æ20æéç¨åº¦`},{label:"伿¥ã»ä¼æ",value:`å¹´é伿¥120æ¥ï¼å®å ¨é±ä¼2æ¥å¶ï¼åæ¥ç¥ï¼ 456å¹´æ«å¹´å§ã»GWã»å¤å£ä¼æã»æçµ¦ä¼æã»ç£åç£å¾ä¼æã»è²å 伿`},{label:"å¾ é",value:`社ä¼ä¿éºå®åï¼äº¤éè²»å ¨é¡æ¯çµ¦ï¼æè£ åºæ¬èªç±ã»ãã¤ã«OK 457æçµ¦å¹´1åï¼è³ä¸å¹´2å`}],contactRecruit:!0},{id:"facility",title:"æ½è¨æ´»ç¨äºæ¥",description:"Hero Eggãã¯ããã¨ããæ½è¨ã®éå¶ãã¤ãã³ãä¼ç»ãæè²ã³ã³ãã³ãã®ä¼ç»å¶æ¥ã«é¢ãããã¸ã·ã§ã³ã§ããå°åã«æ ¹ãããDXæè²æ ç¹ãå ±ã«è²ã¦ã¦ããã¾ãã",contactRecruit:!0,positionDetail
457s:[{name:"â åºé·",description:"HERO 100äººãæ¯ããHEROã¸ï¼ããªãã®å°åã®æ½è¨ããåºé·ã¨ãã¦çãä¸ãã¾ãããï¼",details:[{label:"æ¥åå 容",value:`ãéå¶ç®¡çã 458ã»åºèã®æ¥ã ã®ééã»è¨å管ç 459ã»ææ¬¡KPIã®ç®¡çã¨æ¬é¨ã¸ã®å ±å 460ã»æ½è¨ã®ç®±è²¸ãï¼ã¹ãã¼ã¹è²¸åºï¼ã®èª¿æ´ã»å¯¾å¿ 461ã»ã¤ãã³ãã®ãµãã¼ãã»å¯¾å¿ 462 463ãå°åé¢ä¿æ§ç¯ã 464ã»å°åã®ä¼æ¥ï¼èªæ²»ä½ï¼å¦æ ¡ããã®åãåããã®çªå£ï¼å¶æ¥é¨ã¨é£åï¼ 465ã»ä¿è·è ã»åã©ããã¡ã¨ã®ä¿¡é ¼é¢ä¿ã®ç¶æ 466 467ãæ å ±çºä¿¡ã 468ã»SNSéç¨ï¼Instagramã»Xã»å ¬å¼LINEçï¼ã®ç®¡çã»ã¤ãã³ãåç¥ï¼æ¬é¨åºå ±ã¨é£æºï¼`},{label:"å¤åå°",value:`ã»å¤§éªãªãã°åº 469ã»åæµ·éæå¹åº 470ã»å¤§éªåæ±åºåº 471â¶ï¸å1åãã¤ä»£è¡¨åéï¼`},{label:"給ä¸",value:`æ£ç¤¾å¡ï¼æçµ¦25ä¸åã 472æ¥åå§è¨ï¼è¦ç¸è«`}]},{name:"â¡ ã³ãã¥ããã£ã¼éå¶è ",description:"åã©ãã»å¤§äººã®ã³ãã¥ããã£ãè²ã¦ãHero Eggã§ã大人ã®HEROã»æ¬¡ä¸ä»£ã®HEROããã¤ãã親æ¹",details:[{label:"æ¥åå 容",value:`ãEGG JAMï¼åã©ãã³ãã¥ããã£ï¼ã 473â»åºæ¬ã¯åã©ããã¡ã主ä½ã¨ãªãã¾ãã®ã§ããµãã¼ãã»ç®¡çã®å½¹å² 474ã»EGG JAMã³ãã¥ããã£ã¼ã®éå¶ã»ç®¡çãµãã¼ã 475ã»EGG JAMã¡ã³ãã¼ã¨ã®ç¶ç¶çãªé¢ä¿ãã©ãã¼ã»ã³ãã¥ããã£è²æ 476 477ãHEROãµãã³ï¼å¤§äººã³ãã¥ããã£ï¼ã 478ã»HEROãµãã³ã®éå¶ã»ç®¡ç 479ã»æã«1åã®æä¾ä¼ã®ä¼ç» 480 481ãã¤ãã³ãå ¨è¬ã 482ã»ã¤ãã³ãä¼ç»ã»å½æ¥æ å½ï¼åºå¼µï¼ã³ã©ãï¼èªç¤¾ä¸»å¬ï¼ 483ã»Hero Eggã§è¡ãããã¤ãã³ãã ãã§ãªããæ¯å¹´éå¬ããã大ããªã¤ãã³ããTHE HERO SUMMITãã®å é¨ã«ãé¢ããã¾ã`},{label:"給ä¸",value:`æ£ç¤¾å¡ï¼æçµ¦25ä¸åã 484æ¥åå§è¨ï¼è¦ç¸è«`}]},{name:"⢠ã¹ã¯ã¼ã«ãHERO SCHOOLï¼ããã¹ã¯ï¼ãéå¶æ å½",description:"æåã¹ã¯ã¼ã«ã®æºåã»éå¶ã»ç®¡çãæ ãå½¹å²",details:[{label:"æ¥åå 容",value:`ãã¹ã¯ã¼ã«æºåã»éå¶ã 485ã»ã¹ã¯ã¼ã«ã®éå¶ç®¡ç 486ã»å½æ¥ã®æå®¤ã»ããã£ã³ã° 487ã»å½æ¥ã®é²è¡è£å© 488ã»åãåããï¼åå¥ãµãã¼ãå¯¾å¿ 489ã»æ¬é¨ã¸ã®æ´»åå ±å 490 491ãå¤é¨ãã¼ããã¼é£æºã 492ã»å ±åµãã¼ããã¼ãæä¾ããã¹ã¯ã¼ã«ã³ã³ãã³ãã®èª¿æ´ã»é£çµ¡çªå£`},{label:"給ä¸",value:`æ£ç¤¾å¡ï¼æçµ¦20ä¸åã 493æ¥åå§è¨ï¼è¦ç¸è«`}]}]},{id:"marketing",title:"ãã¼ã±ãã£ã³ã°",description:"Meta Heroesã®å ¨äºæ¥ã横æããWebãµã¤ãã»SNSã»åºåã»ã³ã³ãã³ããã¼ã±ãã£ã³ã°çã®æ¦ç¥ç«æ¡ããå®è¡ã¾ã§ãæ ããã¸ã·ã§ã³ã§ãã",positions:["ãã¸ã¿ã«ãã¼ã±ã¿ã¼"]},{id:"corporate",title:"ã³ã¼ãã¬ã¼ã",description:`Meta Heroesã®åäºæ¥ãæ¯ããããã¯ãªãã£ã¹æ å½ã¨ãã¦ãç·åäºåããä»»ããã¾ããAIã»XRã»æè²ã»ã¤ãã³ããªã©è¤æ°ã®äºæ¥ãåæ»ã«é²ãããã社å å¤ã®èª¿æ´ãæ¸é¡ç®¡çãäºåãµãã¼ããæ ããã¸ã·ã§ã³ã§ãã 494 495â ç·åäºåã»ããã¯ãªãã£ã¹æ¥å 496æ¸é¡ä½æããã¼ã¿å ¥åãè«æ±æ¸ã»å¥ç´æ¸ã¾ããã®ç®¡çãåå管çãã¹ã±ã¸ã¥ã¼ã«èª¿æ´ã社å å¤ã®é£çµ¡å¯¾å¿ãªã©ãã³ã¼ãã¬ã¼ãé¨éã®äºåæ¥åãå¹ åºãæ å½ãã¾ããå¶æ¥ããã¼ã±ãã£ã³ã°ãã¤ãã³ãéå¶ãæè²äºæ¥ãªã©ã®åé¨ç½²ã¨é£æºããªãããä¼ç¤¾å ¨ä½ã®éå¶ããµãã¼ããã¦ããã ãã¾ãã`,positions:["ç·åäºå"],details:[{label:"å¿åè³æ ¼",value:`妿´ä¸åï¼æ¥ç¨®æªçµé¨OKï¼ç¬¬äºæ°åæè¿ 497â åºæ¬çãªPCæä½ãã§ããæ¹ 498â äºåãå¶æ¥äºåãç·åãçµçè£å©ãã«ã¹ã¿ãã¼ãµãã¼ããªã©ã®çµé¨ããæã¡ã®æ¹æè¿ 499â 社å å¤ã¨ã®ããåããä¸å¯§ã«é²ããããæ¹`},{label:"給ä¸",value:"æçµ¦20ä¸åãï¼è³ä¸ãªãï¼"},{label:"å¤åå°",value:`大éªåºå¤§éªå¸æµªéåºé£æ³¢ä¸2-10-70 500ãªãã°ãã¼ã¯ã¹1F eã¹ã¿ã¸ã¢ã ãªãã°æ¬åº 501åæµ·é»éããªãã°é§ ãä¸å¤®å£ã»åå£ç´çµ`},{label:"å¤åæé",value:`10:00ã19:00ï¼å®å8æéï¼ 502æ®æ¥æ20æéç¨åº¦`},{label:"伿¥ã»ä¼æ",value:`å¹´é伿¥120æ¥ï¼å®å ¨é±ä¼2æ¥å¶ï¼åæ¥ç¥ï¼ 503å¹´æ«å¹´å§ã»GWã»å¤å£ä¼æã»æçµ¦ä¼æã»ç£åç£å¾ä¼æã»è²å 伿`},{label:"å¾ é",value:`社ä¼ä¿éºå®åï¼äº¤éè²»å ¨é¡æ¯çµ¦ï¼æè£ åºæ¬èªç±ã»ãã¤ã«OK 504æçµ¦å¹´1å`}],contactRecruit:!0}],I9=[{step:1,title:"æ¸é¡é¸è",description:["ç°¡åãªçµæ´ã®ç¢ºèª"]},{step:2,title:"é¢è«ï¼è¤æ°åï¼",description:["ä¼ç¤¾ç´¹ä»ã¨å¿åè æ§ã¨ã®Meta Heroesã«ã«ãã£ã¼ããã³ã¹ãã«ã®æ¦ãåãã","質çå¿
504ç"]},{step:3,title:"課é¡",description:["ãã¼ã ãã¨ã«å®ãã課é¡ãå¿åè
æ§ã«ä¾é ¼","課é¡ã®çºè¡¨ã¨è³ªçå¿ç"]},{step:4,title:"æçµé¢è«",description:["æçµã¯CEOã®æ¾ç³ãåºå¸"]}],L9=()=>{const[r,e]=T.useState("xr"),[t,s]=T.useState([]),i=T.useRef(null),a=T.useRef(null);T.useEffect(()=>{(async()=>{try{const g=await em(8);s(g.contents)}catch(g){console.error("Failed to fetch member blogs:",g)}})()},[]);const o=m=>{e(r===m?null:m)},c=m=>{const g=new Date(m);return`${g.getFullYear()}.${String(g.getMonth()+1).padStart(2,"0")}.${String(g.getDate()).padStart(2,"0")}`},h=m=>{if(i.current){const{scrollLeft:g,clientWidth:x}=i.current,y=m==="left"?g-x:g+x;i.current.scrollTo({left:y,behavior:"smooth"})}},f=m=>{if(a.current){const{scrollLeft:g,clientWidth:x}=a.current,y=m==="left"?g-x:g+x;a.current.scrollTo({left:y,behavior:"smooth"})}};return n.jsxs("main",{className:"min-h-screen bg-white pb-0",children:[n.jsx(Ge,{titleEn:"RECRUIT",titleJa:"æ¡ç¨æ
å ±"}),n.jsx("div",{className:"w-full",children:n.jsx("video",{src:"/assets/recruit/brand_movie.mp4",className:"w-full h-auto",autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("section",{id:"message",className:"relative w-full py-24 md:py-40 flex items-center overflow-hidden bg-white",children:[n.jsx("div",{className:"absolute inset-0 z-0",children:n.jsx("img",{src:"/assets/recruit/message.png",alt:"Message",className:"w-full h-full object-cover"})}),n.jsx("div",{className:"relative z-10 container mx-auto px-6 md:px-12 max-w-7xl",children:n.jsxs("div",{className:"max-w-2xl",children:[n.jsx("h2",{className:"text-2xl md:text-3xl font-black text-primary-blue mb-6 tracking-wider",children:"100人ã®HEROãããããã"}),n.jsxs("div",{className:"space-y-8",children:[n.jsx("h3",{className:"text-xl md:text-2xl font-black text-black tracking-widest leading-tight",children:"ãã®å¿ã§ãæªæ¥ãåµããã"}),n.jsxs("div",{className:"text-[15px] md:text-base font-bold text-black leading-[2] tracking-[0.1em] space-y-1",children:[n.jsx("p",{children:"æ§æ ¼ããè½åããã©ãã©ã§ããããããããããããã"}),n.jsx("p",{children:"顧客ãæåããã人ã"}),n.jsx("p",{children:"ãã¼ã ã®ãã³ããæã人ã"}),n.jsx("p",{children:"æ°ããæè¡ã§ç¤¾ä¼ãå¤ãã人ã"}),n.jsx("p",{children:"ãããããèªåã®å¾æåéã§ã誰ã«ãè² ããªãHEROã«ã"}),n.jsx("p",{children:"100人ãããããã®å ´æã§è¼ãæãæªæ¥ã¯ãã£ã¨é¢ç½ããªãã"}),n.jsx("p",{className:"pt-4",children:"ããããã®å¿ã§ãããªãã¯ã©ããªæªæ¥ãåµãã¾ããã"})]})]})]})})]}),n.jsx("section",{className:"py-20 md:py-32 bg-white",children:n.jsx("div",{className:"container mx-auto px-6 max-w-7xl",children:n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-6",children:[n.jsxs("div",{className:"flex flex-col rounded-[2rem] overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.08)] border border-gray-100 h-full",children:[n.jsxs("div",{className:"relative h-48 md:h-56 overflow-hidden",children:[n.jsx("img",{src:"/assets/recruit/company_intro.png",alt:"Corporate",className:"w-full h-full object-cover"}),n.jsxs("div",{className:"absolute inset-0 bg-black/40 flex flex-col items-center justify-center text-white",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold tracking-[0.2em] mb-1 opacity-80 uppercase",children:"Corporate"}),n.jsx("h3",{className:"text-xl md:text-2xl font-black tracking-widest",children:"ä¼ç¤¾ãç¥ã"})]})]}),n.jsx("div",{className:"bg-white p-8 flex-grow",children:n.jsx("ul",{className:"space-y-0 divide-y divide-gray-100",children:[{label:"代表ã¡ãã»ã¼ã¸",to:"/ceo-message"},{label:"Meta Heroesã®ä½¿å½",to:"/about/mission"},{label:"Meta Heroesã«ã¤ãã¦",to:"/about/company"},{label:"æ°åã§è¦ãMeta Heroes",to:"/about/company"}].map(m=>n.jsx("li",{children:n.jsxs(q,{to:m.to,className:"flex items-center justify-between py-5 group hover:bg-gray-50 transition-colors px-2",children:[n.jsx("span",{className:"text-sm font-bold text-gray-700 tracking-wider",children:m.label}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-500 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})},m.label))})})]}),n.jsxs("div",{className:"flex flex-col rounded-[2rem] overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.08)] border border-gray-100 h-full",children:[n.jsxs("div",{className:"relative h-48 md:h-56 overflow-hidden",children:[n.jsx("img",{src:"/assets/recruit/business_intro.png",alt:"Business",className:"w-full h-full object-cover"}),n.jsxs("div",{className:"absolute inset-0 bg-black/40 flex flex-col items-center justify-center text-white",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold tracking-[0.2em] mb-1 opacity-80 uppercase",children:"Business"}),n.jsx("h3",{className:"text-xl md:text-2xl font-black tracking-widest",children:"äºæ¥ãç¥ã"})]})]}),n.jsx("div",{className:"bg-white p-8 flex-grow",children:n.jsx("ul",{className:"space-y-0 divide-y divide-gray-100",children:[{label:"XRäºæ¥",to:"/business#xr"},{label:"AIäºæ¥",to:"/business#ai"},{label:"ã¤ãã³ãäºæ¥",to:"/business#event"},{label:"æ½è¨æ´»ç¨äºæ¥",to:"/business#facility"}].map(m=>n.jsx("li",{children:n.jsxs(q,{to:m.to,className:"flex items-center justify-between py-5 group hover:bg-gray-50 transition-colors px-2",children:[n.jsx("span",{className:"text-sm font-bold text-gray-700 tracking-wider",children:m.label}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-500 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})},m.label))})})]}),n.jsxs("div",{className:"flex flex-col rounded-[2rem] overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.08)] border border-gray-100 h-full",children:[n.jsxs("div",{className:"relative h-48 md:h-56 overflow-hidden",children:[n.jsx("img",{src:"/assets/recruit/work_intro.png",alt:"Work",className:"w-full h-full object-cover"}),n.jsxs("div",{className:"absolute inset-0 bg-black/40 flex flex-col items-center justify-center text-white",children:[n.jsx("span",{className:"text-[10px] md:text-xs font-bold tracking-[0.2em] mb-1 opacity-80 uppercase",children:"Work"}),n.jsx("h3",{className:"text-xl md:text-2xl font-black tracking-widest",children:"ä»äºãç¥ã"})]})]}),n.jsx("div",{className:"bg-white p-8 flex-grow",children:n.jsx("ul",{className:"space-y-0 divide-y divide-gray-100",children:[{label:"ãµã¼ãã¹",to:"/services"},{label:"äºæ¥æã»æ½è¨",to:"/about/offices"},{label:"è¡åè¦ç¯",to:"/about/conduct"}].map(m=>n.jsx("li",{children:n.jsxs(q,{to:m.to,className:"flex items-center justify-between py-5 group hover:bg-gray-50 transition-colors px-2",children:[n.jsx("span",{className:"text-sm font-bold text-gray-700 tracking-wider",children:m.label}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-500 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})},m.label))})})]})]})})}),n.jsx("section",{id:"recruitment-type",className:"py-20 md:py-32 bg-gray-50 w-full",children:n.jsxs("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl",children:[n.jsxs("div",{className:"mb-16",children:[n.jsx("span",{className:"text-xs font-bold text-gray-400 tracking-wider block mb-2",children:"RECRUITMENT TYPE"}),n.jsx("h2",{className:"text-3xl font-black text-gray-900 pb-2 inline-block border-b-[3px] border-blue-400",children:"åéè·ç¨®"}),n.jsxs("div",{className:"mt-8 space-y-2",children:[n.jsx("p",{className:"text-sm font-bold text-gray-600",children:"ç¾å¨åéãã¦ããè·ç¨®ä¸è¦§"}),n.jsx("p",{className:"text-xs text-gray-500",children:"â»æ±äººãã¼ã¸ãåå¨ããªãæ±äººã¯ç¾å¨ãæ±äººãè¡ã£ã¦ããã¾ããã"})]})]}),n.jsx("div",{className:"border-t border-gray-300",children:M9.map(m=>{const g=r===m.id;return n.jsxs("div",{className:"border-b border-gray-300",children:[n.jsxs("button",{onClick:()=>o(m.id),className:"w-full py-6 flex items-center justify-between group transition-colors hover:bg-gray-100/50",children:[n.jsx("span",{className:"text-lg font-black text-gray-800 tracking-wide",children:m.title}),n.jsx("span",{className:"text-2xl font-light text-gray-400 transition-all duration-300",children:g?"ï¼":"ï¼"})]}),n.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-500 ease-in-out ${g?"max-h-[5000px] opacity-100 mb-8":"max-h-0 opacity-0"}`,children:n.jsxs("div",{className:"pt-2 pb-4 px-2 md:px-4",children:[m.description&&n.jsx("p",{className:"text-sm font-medium text-gray-600 leading-relaxed whitespace-pre-line mb-8",children:m.description}),m.positions&&n.jsx("div",{className:"flex flex-col gap-3 mb-8",children:m.positions.map(x=>n.jsx("div",{className:"inline-flex",children:n.jsx("span",{className:"px-8 py-3 border border-gray-400 text-sm font-bold text-gray-800 rounded bg-white min-w-[240px] text-center",children:x})},x))}
504),m.positionDetails&&n.jsx("div",{className:"space-y-10 mb-8",children:m.positionDetails.map(x=>n.jsxs("div",{children:[n.jsx("div",{className:"flex flex-col gap-3 mb-6",children:n.jsx("div",{className:"inline-flex",children:n.jsx("span",{className:"px-8 py-3 border border-gray-400 text-sm font-bold text-gray-800 rounded bg-white min-w-[240px] text-center",children:x.name})})}),x.description&&n.jsx("p",{className:"text-sm font-medium text-gray-600 leading-relaxed whitespace-pre-line mb-6",children:x.description}),n.jsx("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:x.details.map((y,v)=>n.jsxs("div",{className:`flex flex-col sm:flex-row ${v>0?"border-t border-gray-200":""}`,children:[n.jsx("div",{className:"sm:w-32 flex-shrink-0 bg-gray-50 px-4 py-3 sm:py-4",children:n.jsx("span",{className:"text-xs font-black text-gray-500 tracking-wider",children:y.label})}),n.jsx("div",{className:"px-4 py-3 sm:py-4 flex-grow",children:n.jsx("p",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:y.value})})]},y.label))})]},x.name))}),m.details&&n.jsx("div",{className:"mb-8 border border-gray-200 rounded-lg overflow-hidden",children:m.details.map((x,y)=>n.jsxs("div",{className:`flex flex-col sm:flex-row ${y>0?"border-t border-gray-200":""}`,children:[n.jsx("div",{className:"sm:w-32 flex-shrink-0 bg-gray-50 px-4 py-3 sm:py-4",children:n.jsx("span",{className:"text-xs font-black text-gray-500 tracking-wider",children:x.label})}),n.jsx("div",{className:"px-4 py-3 sm:py-4 flex-grow",children:n.jsx("p",{className:"text-sm text-gray-700 leading-relaxed whitespace-pre-line",children:x.value})})]},x.label))}),m.link&&(m.link.startsWith("http")?n.jsxs("a",{href:m.link,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 group",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-50 flex items-center justify-center group-hover:bg-blue-100 transition-colors",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-blue-500",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})}),n.jsx("span",{className:"text-sm font-bold text-gray-700 group-hover:text-blue-600 transition-colors",children:"æ±äººè©³ç´°ãè¦ãï¼dodaï¼"})]}):n.jsxs(q,{to:"/members",className:"inline-flex items-center gap-2 group",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-50 flex items-center justify-center group-hover:bg-blue-100 transition-colors",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-blue-500",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsx("span",{className:"text-sm font-bold text-gray-700 group-hover:text-blue-600 transition-colors",children:"ãã¼ã ã¡ã³ãã¼ç´¹ä»"})]})),m.contactRecruit&&n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[n.jsxs(q,{to:`/recruit/entry?job=${m.id}`,className:"inline-flex items-center justify-center gap-3 px-6 py-3 bg-gradient-to-r from-[#2563eb] to-[#06b6d4] text-white rounded-full shadow-md hover:shadow-lg transition-all group",children:[n.jsx("span",{className:"text-sm font-bold tracking-wider",children:"ã¨ã³ããªã¼"}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]}),n.jsxs(q,{to:"/contact?type=recruit",className:"inline-flex items-center justify-center gap-3 px-6 py-3 bg-white border border-gray-400 text-gray-800 rounded-full shadow-sm hover:border-blue-500 hover:text-blue-600 transition-all group",children:[n.jsx("span",{className:"text-sm font-bold tracking-wider",children:"ã«ã¸ã¥ã¢ã«é¢è«ã叿ãã"}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 group-hover:translate-x-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})]})]})})]},m.id)})})]})}),n.jsx("section",{id:"culture",className:"py-12 md:py-32 bg-white w-full overflow-hidden",children:n.jsxs("div",{className:"w-full",children:[n.jsxs("div",{className:"text-center mb-8 md:mb-16",children:[n.jsx("h2",{className:"text-2xl md:text-6xl font-black text-blue-600 mb-1 md:mb-2 tracking-tight",children:"Culture"}),n.jsx("p",{className:"text-[10px] md:text-sm font-bold text-gray-600 tracking-widest",children:"ã«ã«ãã£ã¼ãç¥ã"})]}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-2 gap-2 md:gap-0",children:[n.jsx("div",{className:"w-full flex justify-start",children:n.jsx("div",{className:"w-full md:w-[85%] rounded-r-2xl md:rounded-r-[40px] overflow-hidden shadow-xl md:shadow-2xl",children:n.jsxs(q,{to:"/about/company",className:"group relative block w-full",children:[n.jsx("div",{className:"aspect-[21/9] w-full bg-gray-50",children:n.jsx("img",{src:"/assets/recruit/HR100.png",alt:"HR100",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"})}),n.jsx("div",{className:"absolute bottom-3 right-4 md:bottom-8 md:right-12 bg-white px-4 py-2 md:px-8 md:py-3.5 rounded-full shadow-md z-10 text-center",children:n.jsx("span",{className:"text-[10px] md:text-sm font-black text-gray-800 tracking-wider",children:"HR100"})})]})})}),n.jsx("div",{className:"w-full flex justify-end mt-0 md:mt-0",children:n.jsx("div",{className:"w-full md:w-[85%] rounded-l-2xl md:rounded-l-[40px] overflow-hidden shadow-xl md:shadow-2xl",children:n.jsxs(q,{to:"/about/conduct",className:"group relative block w-full",children:[n.jsx("div",{className:"aspect-[21/9] w-full bg-gray-50",children:n.jsx("img",{src:"/assets/recruit/credo.png",alt:"10ã®HEROã¯ã¬ã",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"})}),n.jsx("div",{className:"absolute bottom-3 left-4 md:bottom-8 md:left-12 bg-white px-4 py-2 md:px-8 md:py-3.5 rounded-full shadow-md z-10 text-center",children:n.jsx("span",{className:"text-[10px] md:text-sm font-black text-gray-800 tracking-wider",children:"10ã®HEROã¯ã¬ã"})})]})})})]})]})}),n.jsx("section",{id:"people",className:"py-20 md:py-32 bg-gray-50 w-full overflow-hidden",children:n.jsxs("div",{className:"container mx-auto px-6 md:px-12 max-w-7xl",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("h2",{className:"text-4xl md:text-6xl font-black text-blue-600 mb-2 tracking-tight",children:"People"}),n.jsx("p",{className:"text-sm font-bold text-gray-600 tracking-widest uppercase",children:"ã¡ã³ãã¼ãç¥ã"})]}),n.jsxs("div",{className:"relative mb-32 group",children:[n.jsx("div",{ref:i,className:"flex gap-4 md:gap-10 overflow-x-auto scrollbar-hide snap-x snap-mandatory",children:zp.map(m=>n.jsxs(q,{to:`/member/${m.id}`,className:"group/card block flex-shrink-0 w-[160px] md:w-[calc(25%-30px)] snap-start",children:[n.jsx("div",{className:"aspect-square rounded-2xl md:rounded-[2rem] overflow-hidden bg-white shadow-lg mb-4 md:mb-6 transition-all duration-500 group-hover/card:-translate-y-2 group-hover/card:shadow-2xl",children:n.jsx("img",{src:m.icon,alt:m.name,className:"w-full h-full object-cover grayscale transition-all duration-700 group-hover/card:grayscale-0 group-hover/card:scale-110"})}),n.jsxs("div",{className:"px-2",children:[n.jsx("h3",{className:"text-base md:text-xl font-bold text-gray-900 mb-0.5 md:mb-1",children:m.name}),n.jsx("p",{className:"text-[9px] md:text-xs font-bold text-blue-500 tracking-wider up
504percase mb-1.5 md:mb-2",children:m.nameEn}),n.jsx("p",{className:"text-[9px] md:text-xs text-gray-400 font-bold border-t border-gray-100 pt-1.5 md:pt-2 inline-block pr-4",children:m.role})]})]},m.id))}),n.jsx("button",{onClick:()=>h("left"),className:"absolute left-0 md:left-0 top-1/2 -translate-y-1/2 -translate-x-2 md:-translate-x-1/2 w-10 h-10 md:w-12 md:h-12 bg-white rounded-full shadow-xl flex items-center justify-center text-gray-400 hover:text-blue-600 transition-all z-10",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-5 h-5 md:w-6 md:h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("button",{onClick:()=>h("right"),className:"absolute right-0 md:right-0 top-1/2 -translate-y-1/2 translate-x-2 md:translate-x-1/2 w-10 h-10 md:w-12 md:h-12 bg-white rounded-full shadow-xl flex items-center justify-center text-gray-400 hover:text-blue-600 transition-all z-10",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-5 h-5 md:w-6 md:h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),n.jsxs("div",{id:"blog",className:"mt-32",children:[n.jsx("div",{className:"flex justify-center mb-16",children:n.jsx("span",{className:"bg-[#2563eb] text-white text-lg font-bold px-24 py-2.5 rounded-full shadow-lg tracking-widest",children:"ã¡ã³ãã¼ããã°"})}),n.jsxs("div",{className:"relative",children:[n.jsx("div",{ref:a,className:"flex gap-4 md:gap-6 overflow-x-auto scrollbar-hide snap-x snap-mandatory px-4 md:px-0",children:t.map(m=>n.jsxs(q,{to:`/member-blog/${m.id}`,className:"group/blog block flex-shrink-0 w-[80%] sm:w-[calc(50%-12px)] lg:w-[calc(25%-18px)] snap-start bg-white rounded-xl overflow-hidden shadow-md hover:shadow-xl transition-all duration-300",children:[n.jsx("div",{className:"aspect-[16/10] overflow-hidden",children:m.eyecatch?n.jsx("img",{src:m.eyecatch.url,alt:m.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover/blog:scale-110"}):n.jsx("div",{className:"w-full h-full bg-gradient-to-br from-blue-400 to-cyan-500 flex items-center justify-center",children:n.jsx("span",{className:"text-white text-2xl font-black",children:"MH"})})}),n.jsxs("div",{className:"p-4 flex flex-col h-[140px]",children:[n.jsx("h3",{className:"text-[13px] font-bold text-gray-800 line-clamp-3 leading-relaxed flex-grow",children:m.title}),n.jsx("div",{className:"mt-auto pt-3 border-t border-gray-100",children:n.jsx("time",{className:"text-[11px] font-bold text-blue-500 font-mono tracking-wider",children:c(m.publishedAt)})})]})]},m.id))}),n.jsx("button",{onClick:()=>f("left"),className:"absolute left-[-10px] md:left-[-20px] lg:left-[-40px] top-1/2 -translate-y-1/2 text-gray-300 hover:text-blue-500 transition-colors",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:4,stroke:"currentColor",className:"w-6 h-6 md:w-8 md:h-8",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("button",{onClick:()=>f("right"),className:"absolute right-[-10px] md:right-[-20px] lg:right-[-40px] top-1/2 -translate-y-1/2 text-gray-300 hover:text-blue-500 transition-colors",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:4,stroke:"currentColor",className:"w-6 h-6 md:w-8 md:h-8",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),n.jsx("div",{className:"mt-12 text-center",children:n.jsx(q,{to:"/members/blog",className:"text-[11px] font-bold text-gray-400 hover:text-blue-600 transition-colors tracking-widest border-b border-gray-200 hover:border-blue-600 pb-1 uppercase",children:"View All"})})]})]})}),n.jsx("section",{id:"selection-process",className:"py-20 md:py-32 bg-white w-full",children:n.jsxs("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-xs font-bold text-gray-400 tracking-wider block mb-2 uppercase",children:"Selection Process"}),n.jsx("h2",{className:"text-3xl font-black text-gray-900 pb-2 inline-block border-b-[3px] border-blue-400",children:"é¸èããã»ã¹"}),n.jsx("p",{className:"mt-8 text-sm font-bold text-gray-600",children:"é¢è«ããã³èª²é¡ãéãã¦ãã«ã«ãã£ã¼ã¨ã¹ãã«ã®ç¸æ§ããäºã確èªããã¦ããã ãã¾ãã"})]}
504),n.jsxs("div",{className:"relative mt-20 ml-4 md:ml-12",children:[n.jsx("div",{className:"absolute left-6 top-0 bottom-0 w-0.5 border-l-2 border-dashed border-cyan-300 -z-10"}),n.jsx("div",{className:"space-y-12",children:I9.map(m=>n.jsxs("div",{className:"flex items-start gap-6 md:gap-12 relative",children:[n.jsxs("div",{className:"flex-shrink-0 w-12 h-12 rounded-full bg-gradient-to-br from-cyan-400 to-blue-500 shadow-lg flex flex-col items-center justify-center text-white",children:[n.jsx("span",{className:"text-[10px] font-black leading-none mb-0.5 uppercase",children:"Step"}),n.jsx("span",{className:"text-xl font-black leading-none",children:m.step})]}),n.jsx("div",{className:"flex-shrink-0 mt-1",children:n.jsx("div",{className:"bg-white px-8 py-3 rounded-full shadow-md border border-gray-50 min-w-[160px] md:min-w-[200px] text-center",children:n.jsx("span",{className:"text-sm md:text-base font-black text-gray-800",children:m.title})})}),n.jsx("div",{className:"mt-4 flex-grow",children:n.jsx("ul",{className:"space-y-2",children:m.description.map((g,x)=>n.jsxs("li",{className:"text-sm font-bold text-gray-600 flex items-start",children:[n.jsx("span",{className:"mr-1",children:"ã»"}),n.jsx("span",{children:g})]},x))})})]},m.step))})]})]})}),n.jsx("section",{className:"py-24 md:py-32 bg-[#e5e7eb] w-full",children:n.jsx("div",{className:"container mx-auto px-6 md:px-12 max-w-6xl",children:n.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-16 md:gap-20",children:[n.jsx("div",{className:"grid grid-cols-2 gap-x-12 gap-y-8 w-full md:w-auto",children:[{label:"ã¡ãã»ã¼ã¸",href:"#message"},{label:"ä¼ç¤¾ãç¥ã",href:"#corporate"},{label:"äºæ¥å
容",href:"#business"},{label:"ä»äºãç¥ã",href:"#work"},{label:"åéè·ç¨®",href:"#recruitment-type"},{label:"ã«ã«ãã£ã¼ãç¥ã",href:"#culture"},{label:"ã¡ã³ãã¼ãç¥ã",href:"#people"},{label:"é¸èããã»ã¹",href:"#selection-process"}].map(m=>n.jsxs("a",{href:m.href,className:"flex items-center gap-3 group",children:[n.jsx("span",{className:"w-[1.5px] h-4 bg-gray-300 group-hover:bg-blue-500 transition-colors"}),n.jsx("span",{className:"text-sm md:text-base font-bold text-gray-700 group-hover:text-blue-600 transition-colors tracking-widest",children:m.label})]},m.label))}),n.jsxs("div",{className:"flex flex-col gap-6 w-full max-w-md",children:[n.jsxs(q,{to:"/faq",className:"flex items-center justify-between bg-[#333333] hover:bg-[#222222] text-white px-10 py-5 rounded-full shadow-lg transition-all group",children:[n.jsx("span",{className:"text-base md:text-lg font-bold tracking-widest",children:"æ¡ç¨ã«é¢ããFAQ"}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-5 h-5 text-cyan-400 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]}),n.jsxs("a",{href:"https://jp.indeed.com/cmp/%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BEmeta-Heroes",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between bg-gradient-to-r from-[#2563eb] to-[#06b6d4] text-white p-1 rounded-full shadow-lg hover:shadow-xl transition-all group overflow-hidden",children:[n.jsx("span",{className:"text-base md:text-lg font-bold tracking-[0.2em] pl-12 pr-4 py-4 flex-grow text-center",children:"ã¨ã³ããªã¼"}),n.jsx("div",{className:"bg-[#333333] w-14 h-14 rounded-full flex items-center justify-center shrink-0",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-6 h-6 text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})})})]})]})]})})})]})},D9={desiredJob:"",employmentType:"",name:"",furigana:"",email:"",ph
504one:"",birthYear:"",birthMonth:"",birthDay:"",address:"",skills:"",motivation:"",portfolio:"",referralSource:"",confirm_email_field:""},O9=["XRäºæ¥ï¼å¶æ¥ï¼","AIäºæ¥ï¼å¶æ¥ï¼","æ½è¨æ´»ç¨äºæ¥","ãã¼ã±ãã£ã³ã°ï¼ãã¸ã¿ã«ãã¼ã±ã¿ã¼ï¼","ã³ã¼ãã¬ã¼ãï¼ç·åäºåï¼","ãã®ä»"],QC={xr:"XRäºæ¥ï¼å¶æ¥ï¼",ai:"AIäºæ¥ï¼å¶æ¥ï¼",facility:"æ½è¨æ´»ç¨äºæ¥",marketing:"ãã¼ã±ãã£ã³ã°ï¼ãã¸ã¿ã«ãã¼ã±ã¿ã¼ï¼",corporate:"ã³ã¼ãã¬ã¼ãï¼ç·åäºåï¼"},F9=["æ£ç¤¾å¡","å¥ç´ç¤¾å¡","æ¥åå§è¨","ã¢ã«ãã¤ãã»ãã¼ã","ã¤ã³ã¿ã¼ã³"],B9=["å½ç¤¾Webãµã¤ã","æ±äººãµã¤ãï¼Indeedçï¼","SNSï¼X / Instagramçï¼","ç¥äººã»ç¤¾å¡ããã®ç´¹ä»","ã¤ãã³ãã»ã»ããã¼","æ¤ç´¢ã¨ã³ã¸ã³","ãã®ä»"],$9=2*1024*1024,U9=Array.from({length:56},(r,e)=>String(2010-e)),H9=Array.from({length:12},(r,e)=>String(e+1)),z9=Array.from({length:31},(r,e)=>String(e+1)),ZC=r=>new Promise((e,t)=>{const s=new FileReader;s.onload=()=>{const i=s.result,a=i.includes(",")?i.split(",")[1]:i;e(a)},s.onerror=t,s.readAsDataURL(r)}),Pr=n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),e3=n.jsx("span",{className:"bg-gray-400 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"ä»»æ"}),Vu="appearance-none bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23cbd5e1%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E')] bg-[length:18px] bg-[right_1rem_center] bg-no-repeat",V9=()=>{const r=Kt(),[e,t]=T.useState("input"),[s,i]=T.useState(!1),[a,o]=T.useState(D9),[c,h]=T.useState(null),[f,m]=T.useState(null),[g,x]=T.useState(!1),[y]=T.useState(Date.now()),v=T.useRef(null),j=T.useRef(null);T.useEffect(()=>
504{const O=new URLSearchParams(r.search).get("job");O&&QC[O]&&o($=>({...$,desiredJob:QC[O]}))},[r.search]);const N=D=>{const{name:O,value:$}=D.target;o(z=>({...z,[O]:$}))},S=(D,O)=>{if(!D){O(null);return}if(D.size>$9){alert("ãã¡ã¤ã«ãµã¤ãºã¯2MB以å
ã«ãã¦ãã ããã");return}O(D)},A=D=>{if(D.preventDefault(),!s)return;(Date.now()-y)/1e3<3&&console.warn("Submission too fast, likely a bot."),t("confirm"),window.scrollTo(0,0)},E=()=>{t("input"),window.scrollTo(0,0)},M=a.birthYear&&a.birthMonth&&a.birthDay?`${a.birthYear}å¹´${a.birthMonth}æ${a.birthDay}æ¥`:"",R=async()=>{x(!0);try{const D=[];if(c&&D.push({filename:`å±¥æ´æ¸_${c.name}`,content:await ZC(c)}),f&&D.push({filename:`è·åçµæ´æ¸_${f.name}`,content:await ZC(f)}),!(await fetch("/api/send-mail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"recruit_entry",desiredJob:a.desiredJob,employmentType:a.employmentType,name:a.name,furigana:a.furigana,email:a.email,phone:a.phone,birthdate:M,address:a.address,skills:a.skills,motivation:a.motivation,portfolio:a.portfolio,referralSource:a.referralSource,files:D,confirm_email_field:a.confirm_email_field,_t:Date.now()})})).ok)throw new Error("éä¿¡ã«å¤±æãã¾ããã");t("complete"),window.scrollTo(0,0)}catch(D){console.error("Submission error:",D),alert("ç³ã訳ããã¾ãããéä¿¡ä¸ã«ã¨ã©ã¼ãçºçãã¾ããããã¡ã¤ã«ãµã¤ãºã大ããå ´åã¯2MB以å
ã«èª¿æ´ããã ãããæéãããã¦å度ã試ããã ããã")}finally{x(!1)}},I=()=>n.jsx("div",{className:"bg-gray-50 border-b border-gray-200",children:n.jsx("div",{className:"container mx-auto px-4 max-w-3xl py-12",children:n.jsx("div",{className:"flex items-center justify-center",children:[{id:"input",step:"01",label:"å
¥å"},{id:"confirm",step:"02",label:"確èª"},{id:"complete",step:"03",label:"å®äº"}].map((D,O)=>{const $=e===D.id,z=e==="confirm"&&D.id==="input"||e==="complete";return n.jsxs(Co.Fragment,{children:[n.jsxs("div",{className:"flex flex-col items-center gap-3",children:[n.jsxs("span",{className:`text-[10px] font-black tracking-[0.3em] ${$||z?"text-blue-600":"text-gray-300"}`,children:["STEP ",D.step]}),n.jsx("span",{className:`text-sm font-black tracking-[0.2em] ${$||z?"text-gray-900":"text-gray-300"}`,children:D.label})]}),O<2&&n.jsx("div",{className:`w-16 md:w-24 h-px mx-6 md:mx-10 mt-5 transition-colors duration-500 ${z?"bg-blue-600":"bg-gray-200"}`})]},D.step)})})})}),F=(D,O,$,z)=>n.jsxs("div",{children:[n.jsx("input",{ref:$,type:"file",accept:".pdf,.doc,.docx,image/*",className:"hidden",onChange:re=>{var he;return S(((he=re.target.files)==null?void 0:he[0])||null,O)}}),D?n.jsxs("div",{className:"flex items-center justify-between gap-3 w-full max-w-md border border-gray-300 rounded-lg px-4 py-3 bg-blue-50/40",children:[n.jsx("span",{className:"text-sm font-bold text-gray-800 truncate",children:D.name}),n.jsx("button",{type:"button",onClick:()=>{O(null),$.current&&($.current.value="")},className:"flex-shrink-0 text-gray-400 hover:text-red-500 transition-colors","aria-label":"ãã¡ã¤ã«ãåé¤",children:n.jsx(yr,{size:18})})]}):n.jsxs("button",{type:"button",onClick:()=>{var re;return(re=$.current)==null?void 0:re.click()},onDragOver:re=>re.preventDefault(),onDrop:re=>{var he;re.preventDefault(),S(((he=re.dataTransfer.files)==null?void 0:he[0])||null,O)},className:"flex flex-col items-center justify-center gap-2 w-full max-w-md border border-dashed border-gray-300 rounded-lg px-4 py-6 bg-white hover:border-blue-400 hover:bg-blue-50/20 transition-colors text-center",children:[n.jsx(bH,{className:"w-7 h-7 text-blue-400"}),n.jsxs("span",{className:"text-sm font-bold text-blue-600",children:["ãã¡ã¤ã«ã鏿 ",n.jsx("span",{className:"text-gray-400 font-medium",children:"ã¾ã㯠ãã©ãã°ï¼ãããã"})]}),n.jsx("span",{className:"text-[11px] text-gray-400 font-medium",children:z})]})]});return n.jsxs("main",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"RECRUIT ENTRY",titleJa:"æ¡ç¨ã¨ã³ããªã¼"}),I(),n.jsx("section",{className:"py-24",children:n.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:n.jsxs(an,{mode:"wait",children:[e==="input"&&n.jsxs(Ce.div,{initial:{opacity:0,x:-20}
504,animate:{opacity:1,x:0},exit:{opacity:0,x:20},children:[n.jsxs("div",{className:"mb-8 text-center space-y-1",children:[n.jsx("p",{className:"text-sm text-gray-600 font-bold",children:"Meta Heroesã®æªæ¥ãå
±ã«åµã仲éãåéãã¦ãã¾ãã"}),n.jsx("p",{className:"text-sm text-gray-500 font-bold",children:"以ä¸ã®ãã©ã¼ã ã«å¿
è¦äºé
ããå
¥åã®ä¸ãã¨ã³ããªã¼ãã¦ãã ããã"})]}),n.jsxs("div",{className:"mb-12 max-w-2xl mx-auto border border-blue-100 bg-blue-50/40 rounded-lg py-6 px-6 text-center",children:[n.jsx("span",{className:"text-[10px] font-black tracking-[0.4em] text-blue-400 uppercase block mb-3",children:"Notice"}),n.jsxs("p",{className:"text-xs text-blue-700 font-bold leading-[1.9]",children:["å¿
é é
ç®ã¯å¿
ããå
¥åãã ããã",n.jsx("br",{}),"ãå
¥åããã ããæ
å ±ã¯ãæ¡ç¨é¸èã®ç®çã§ã®ã¿ä½¿ç¨ãããã¾ãã"]})]}),n.jsxs("form",{className:"space-y-0 border-t-2 border-gray-900",onSubmit:A,children:[n.jsx("div",{style:{position:"absolute",left:"-9999px",top:"auto",width:"1px",height:"1px",overflow:"hidden"},children:n.jsx("input",{type:"text",name:"confirm_email_field",value:a.confirm_email_field,onChange:N,tabIndex:-1,autoComplete:"off"})}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"å¿åè·ç¨®"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsxs("select",{name:"desiredJob",value:a.desiredJob,onChange:N,className:`w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold ${Vu}`,required:!0,children:[n.jsx("option",{value:"",children:"鏿ãã¦ãã ãã"}),O9.map(D=>n.jsx("option",{value:D,children:D},D))]})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"叿éç¨å½¢æ
"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsxs("select",{name:"employmentType",value:a.employmentType,onChange:N,className:`w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold ${Vu}`,required:!0,children:[n.jsx("option",{value:"",children:"鏿ãã¦ãã ãã"}),F9.map(D=>n.jsx("option",{value:D,children:D},D))]})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãåå"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"name",value:a.name,onChange:N,placeholder:"ä¾ï¼å±±ç° 太é",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãµãããª"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"furigana",value:a.furigana,onChange:N,placeholder:"ä¾ï¼ãã¾ã ããã",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ã¡ã¼ã«ã¢ãã¬ã¹"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"email",name:"email",value:a.email,onChange:N,placeholder:"ä¾ï¼[email protected]",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"é»è©±çªå·"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"tel",name:"phone",value:a.p
504hone,onChange:N,placeholder:"ä¾ï¼090-1234-5678ï¼ãã¤ãã³ããï¼",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"çå¹´ææ¥"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsxs("div",{className:"flex flex-wrap gap-3",children:[n.jsxs("select",{name:"birthYear",value:a.birthYear,onChange:N,className:`border border-gray-300 py-3.5 px-4 outline-none font-bold ${Vu} pr-10`,required:!0,children:[n.jsx("option",{value:"",children:"å¹´ã鏿"}),U9.map(D=>n.jsxs("option",{value:D,children:[D,"å¹´"]},D))]}),n.jsxs("select",{name:"birthMonth",value:a.birthMonth,onChange:N,className:`border border-gray-300 py-3.5 px-4 outline-none font-bold ${Vu} pr-10`,required:!0,children:[n.jsx("option",{value:"",children:"æã鏿"}),H9.map(D=>n.jsxs("option",{value:D,children:[D,"æ"]},D))]}),n.jsxs("select",{name:"birthDay",value:a.birthDay,onChange:N,className:`border border-gray-300 py-3.5 px-4 outline-none font-bold ${Vu} pr-10`,required:!0,children:[n.jsx("option",{value:"",children:"æ¥ã鏿"}),z9.map(D=>n.jsxs("option",{value:D,children:[D,"æ¥"]},D))]})]})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"使"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"address",value:a.address,onChange:N,placeholder:"ä¾ï¼æ±äº¬é½æ¸¯åºââã»1-1-1",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-start gap-3 pt-10",children:[n.jsx("span",{className:"mt-1",children:Pr}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ä¿æã¹ãã«ã»çµé¨"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("textarea",{name:"skills",value:a.skills,onChange:N,rows:6,placeholder:"ä¿æã§ããè¨èªããã¼ã«ãæºãã£ãããã¸ã§ã¯ããªã©ããè¨å
¥ãã ããã",className:"w-full border border-gray-300 py-3.5 px-4 outline-none font-bold resize-none",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-start gap-3 pt-10",children:[n.jsx("span",{className:"mt-1",children:Pr}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"å¿æåæ©ã»èªå·±PR"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("textarea",{name:"motivation",value:a.motivation,onChange:N,rows:6,placeholder:"å½ç¤¾ãå¿æããçç±ããããªãã®å¼·ã¿ã»å®ç¸¾ããè¨å
¥ãã ããã",className:"w-full border border-gray-300 py-3.5 px-4 outline-none font-bold resize-none",required:!0})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[e3,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãã¼ããã©ãªãªURL / SNS"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"url",name:"portfolio",value:a.portfolio,onChange:N,placeholder:"ä¾ï¼https://portfolio.example.com",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold"})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"å±¥æ´æ¸"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:F(c,h,v,"PDF / Word / ç»åï¼2MB以å
ï¼")})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[e3,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"è·åçµæ´æ¸"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:F(f,m,j,"PDF / Wordï¼2MB以å
ï¼")})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[Pr,n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"Meta Heroesãç¥ã£ããã£ãã"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsxs("select",{name:"referralSource",value:a.referralSource,onCh
504ange:N,className:`w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold ${Vu}`,required:!0,children:[n.jsx("option",{value:"",children:"鏿ãã¦ãã ãã"}),B9.map(D=>n.jsx("option",{value:D,children:D},D))]})})]}),n.jsxs("div",{className:"py-20 text-center space-y-10",children:[n.jsxs("p",{className:"text-xs text-gray-500 font-bold leading-relaxed",children:["ãå
¥åããã ããå人æ
å ±ã¯ãæ¡ç¨é¸èã®ç®çã§ã®ã¿å©ç¨ãã",n.jsx("br",{className:"hidden md:block"}),"ãã®ä»ã®ç®çã§å©ç¨ãããã¨ã¯ãããã¾ããããã¡ãã®",n.jsx(q,{to:"/contact/privacy",className:"text-blue-600 hover:underline mx-1",children:"ãå人æ
å ±ã®åæ±ãã«ã¤ãã¦ã"}),"ã«åæã®ä¸ãéä¿¡ãã¦ãã ããã"]}),n.jsxs("label",{className:"flex items-center justify-center gap-3 cursor-pointer group",children:[n.jsxs("div",{className:"relative w-5 h-5",children:[n.jsx("input",{type:"checkbox",className:"sr-only",checked:s,onChange:D=>i(D.target.checked)}),n.jsx("div",{className:`w-full h-full border-2 transition-all rounded-sm flex items-center justify-center ${s?"border-blue-600 bg-blue-50":"border-gray-300 bg-white"}`,children:n.jsx("svg",{className:`w-3.5 h-3.5 text-blue-600 transition-transform ${s?"scale-100":"scale-0"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:4,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})]}),n.jsx("span",{className:"text-sm font-black text-gray-900 group-hover:text-blue-600 transition-colors",children:"å人æ
å ±ã®åãæ±ãã«åæãã"})]}),n.jsx("div",{className:"pt-6",children:n.jsxs("button",{type:"submit",disabled:!s,className:`inline-flex items-center justify-center px-20 py-5 text-sm font-black tracking-[0.3em] transition-all duration-500 min-w-[340px] border-2 ${s?"bg-gray-900 text-white border-gray-900 hover:bg-white hover:text-gray-900":"bg-gray-100 text-gray-300 border-gray-100 cursor-not-allowed"}`,children:["å
容ã確èªãã",n.jsx(ya,{className:"ml-2 w-5 h-5"})]})})]})]})]},"input"),e==="confirm"&&n.jsxs(Ce.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:[n.jsx("div",{className:"mb-12 text-center",children:n.jsx("p",{className:"text-sm text-gray-500 font-bold",children:"å
¥åå
容ãã確èªãã ããããããããã°ãéä¿¡ããããã¿ã³ãæ¼ãã¦ãã ããã"})}),n.jsxs("div",{className:"border-t-2 border-gray-900 bg-gray-50/30",children:[n.jsx(Cn,{label:"å¿åè·ç¨®",value:a.desiredJob}),n.jsx(Cn,{label:"叿éç¨å½¢æ
",value:a.employmentType}),n.jsx(Cn,{label:"ãåå",value:a.name}),n.jsx(Cn,{label:"ãµãããª",value:a.furigana}),n.jsx(Cn,{label:"ã¡ã¼ã«ã¢ãã¬ã¹",value:a.email}),n.jsx(Cn,{label:"é»è©±çªå·",value:a.phone}),n.jsx(Cn,{label:"çå¹´ææ¥",value:M}),n.jsx(Cn,{label:"使",value:a.address}),n.jsx(Cn,{label:"ä¿æã¹ãã«ã»çµé¨",value:a.skills}),n.jsx(Cn,{label:"å¿æåæ©ã»èªå·±PR",value:a.motivation}),a.portfolio&&n.jsx(Cn,{label:"ãã¼ããã©ãªãªURL / SNS",value:a.portfolio}),n.jsx(Cn,{label:"å±¥æ´æ¸",value:c?c.name:"æªæ·»ä»"}),n.jsx(Cn,{label:"è·åçµæ´æ¸",value:f?f.name:"æªæ·»ä»"}),n.jsx(Cn,{label:"Meta Heroesãç¥ã£ããã£ãã",value:a.referralSource})]}),n.jsxs("div",{className:"py-20 flex flex-col items-center gap-6",children:[n.jsxs("button",{onClick:R,disabled:g,className:"inline-flex items-center justify-center px-20 py-5 bg-blue-600 text-white text-sm font-black tracking-[0.3em] hover:bg-blue-700 shadow-xl shadow-blue-600/20 transition-all min-w-[340px] disabled:opacity-60",children:[g?"éä¿¡ä¸...":"ãã®å
容ã§ã¨ã³ããªã¼ãã",!g&&n.jsx(Qk,{className:"ml-2 w-4 h-4"})]}),n.jsxs("button",{onClick:E,disabled:g,className:"inline-flex items-center justify-center text-sm font-bold text-gray-400 hover:text-gray-900 transition-colors",children:[n.jsx(q0,{className:"mr-1 w-4 h-4"})," å
¥åç»é¢ã«æ»ã"]})]})]},"confirm"),e==="complete"&&n.jsxs(Ce.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"py-20 text-center space-y-8",children:[n.jsx("div",{className:"w-20 h-20 bg-blue-50 rounded-full flex items-center justify-center mx-auto text-blue-600 mb-8",children:n.jsx(Yk,{size:40})}),n.jsx("h2",{className:"text-3xl font-black text-gray-900 tracking-wider",children:"ã¨ã³ããªã¼å®äº"}),n.jsxs("div",{className:"space-y-4 text-gray-600 font-bold leading-relaxed",children:[n.jsxs("p",{children:["ãã®åº¦ã¯ã¨ã³ããªã¼ããã ããèª ã«ãããã¨ããããã¾ãã",n.jsx("br",{}),"ãå
¥åå
å®¹ã®æ§ããã¡ã¼ã«ã§ãéããã¾ããã
504®ã§ã確èªãã ããã"]}),n.jsxs("p",{className:"text-sm text-gray-400",children:["â»ã¡ã¼ã«ãå±ããªãå ´åã¯ãè¿·æã¡ã¼ã«ãã©ã«ããã確èªããã ããã",n.jsx("br",{}),"å度ã¨ã³ããªã¼ããé¡ããããã¾ãã"]})]}),n.jsx("div",{className:"pt-12",children:n.jsx(q,{to:"/recruit",className:"inline-flex items-center justify-center px-12 py-4 border-2 border-gray-900 text-gray-900 text-sm font-black tracking-widest hover:bg-gray-900 hover:text-white transition-all",children:"æ¡ç¨æ
å ±ã¸æ»ã"})})]},"complete")]})})})]})},Cn=({label:r,value:e})=>n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsx("div",{className:"bg-gray-50 px-8 py-6 font-bold text-gray-500 text-sm tracking-wider flex items-center",children:r}),n.jsx("div",{className:"px-8 py-6 bg-white font-black text-gray-900 text-sm leading-relaxed whitespace-pre-wrap",children:e||"---"})]}),t3=[{category:"å¿åã»é¸èã«ã¤ãã¦",items:[{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"}]},{category:"å
¥ç¤¾å¾ã«ã¤ãã¦",items:[{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"},{question:"ããã¹ãããã¹ãããã¹ãããã¹ãï¼",answer:"åçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåçåç"}]}],W9=()=>{const[r,e]=T.useState("0-0");Co.useEffect(()=>{alert("FAQãã¼ã¸ã¯ç¾å¨æºåä¸ã§ãã"),window.location.href="/recruit"},[]),Co.useEffect(()=>{const i=t3.flatMap(h=>h.items).filter(h=>!h.question.includes("ããã¹ã"));if(i.length===0)return;const a={"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(h=>
504({"@type":"Question",name:h.question,acceptedAnswer:{"@type":"Answer",text:h.answer}}))},o="json-ld-faq";let c=document.getElementById(o);return c||(c=document.createElement("script"),c.id=o,c.type="application/ld+json",document.head.appendChild(c)),c.text=JSON.stringify(a),()=>{const h=document.getElementById(o);h&&h.remove()}},[]);const t=(s,i)=>{const a=`${s}-${i}`;e(r===a?null:a)};return n.jsxs("main",{className:"min-h-screen bg-white pb-20",children:[n.jsx(Ge,{titleEn:"FAQ",titleJa:"æ¡ç¨ã«é¢ããFAQ"}),n.jsx("section",{className:"py-12 md:py-20",children:n.jsx("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl",children:t3.map((s,i)=>n.jsxs("div",{className:"mb-20 last:mb-0",children:[n.jsx("h2",{className:"text-xl md:text-2xl font-bold text-gray-900 mb-8",children:s.category}),n.jsx("div",{className:"border-t border-gray-200",children:s.items.map((a,o)=>{const c=r===`${i}-${o}`;return n.jsxs("div",{className:"border-b border-gray-200",children:[n.jsxs("button",{onClick:()=>t(i,o),className:"w-full py-6 md:py-8 flex items-center justify-between text-left group",children:[n.jsxs("div",{className:"flex gap-3 md:gap-4 items-start",children:[n.jsx("span",{className:"text-lg md:text-xl font-bold text-[#2563eb] mt-0.5",children:"Q."}),n.jsx("span",{className:"text-base md:text-lg font-bold text-gray-800 leading-relaxed",children:a.question})]}),n.jsx("div",{className:"shrink-0 ml-4 text-gray-400",children:c?n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})}):n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})})]}),n.jsx("div",{className:`overflow-hidden transition-all duration-500 ease-in-out ${c?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"}`,children:n.jsx("div",{className:"px-10 md:px-14 pb-10 pt-0",children:n.jsx("p",{className:"text-sm md:text-base font-medium text-gray-600 leading-loose",children:a.answer})})})]},o)})})]},s.category))})})]})},G9=()=>{const[r,e]=T.useState([]),[t,s]=T.useState(0),[i,a]=T.useState(1),[o,c]=T.useState([]),[h,f]=T.useState(""),[m,g]=T.useState(""),[x,y]=T.useState(!1),v=typeof window<"u"&&window.innerWidth>=1024?30:10;T.useEffect(()=>{(async()=>{const E=await lT();c(E)})()},[]),T.useEffect(()=>{const A=async()=>{y(!0);try{const M=(i-1)*v,R=await em(v,{keyword:m,categoryId:h},M);e(R.contents||[]),s(R.totalCount||0)}catch(M){console.error("Failed to fetch member blogs",M),e([]),s(0)}finally{y(!1)}},E=setTimeout(()=>{A()},500);return()=>clearTimeout(E)},[h,m,i,v]),T.useEffect(()=>{a(1)},[h,m]);const j=Math.ceil(t/v),N=()=>{const A=[];if(j<=5)for(let M=1;M<=j;M++)A.push(M);else{A.push(1),i>3&&A.push("...");const M=Math.max(2,i-1),R=Math.min(j-1,i+1);for(let I=M;I<=R;I++)A.includes(I)||A.push(I);i<j-2&&A.push("..."),A.includes(j)||A.push(j)}return A},S=A=>{const E=new Date(A);return`${E.getFullYear()}.${E.getMonth()+1}.${E.getDate()}`};return n.jsxs("div",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"MEMBER BLOG",titleJa:"ã¡ã³ãã¼ããã°"}),n.jsxs("div",{className:"container mx-auto px-4 sm:px-8 pb-32",children:[n.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-end gap-8 mb-16 border-b border-gray-100 pb-12 max-w-7xl mx-auto",children:[n.jsx("div",{className:"flex flex-col sm:flex-row gap-4 w-full lg:w-auto",children:n.jsxs("div",{className:"relative min-w-[240px]",children:[n.jsxs("select",{value:h,onChange:A=>f(A.target.value),className:"w-full appearance-none px-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all cursor-pointer pr-12",children:[n.jsx("option",{value:"",children:"MEMBER: ALL"}),o.map(A=>n.jsx("option",{value:A.id,children:A.name.toUpperCase()},A.id))]}),n.jsx(Vs,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-300 pointer-events-none"})]})}),n.jsxs("div",{className:"relative flex-grow lg:w-72 w-full",children:[n.jsx("input",{type:"text",placeholder:"SEARCH BLOGS",value:m,onChange:A=>g(A.target.value),className:"w-full pl-12 pr-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all placeholder:text-gray-300"}),n.jsx(mu,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-300 w-4 h-4"})]})]}),n.jsx("div",{className:"max-w-7xl mx-auto px-4",children:x?n.jsx("div",{className:"flex justify-center items-center py-32",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-100 border-t-blue-600"})}):r.length===0?n.jsx("div",{className:"text-center py-32",children:n.jsx("p",{className:"text-gray-300 font-black text-sm tracking-[0.2em] uppercase",children:"No articles found."})}):n.jsxs(n.Fragment,{children:[n.jsx(Ce.div,{initial:{opacity:0}
504,animate:{opacity:1},transition:{duration:.5},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-16",children:r.map(A=>{var E;return n.jsxs(q,{to:`/member-blog/${A.id}`,className:"group flex flex-col h-full",children:[n.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl bg-gray-100 mb-6 shadow-sm border border-gray-50",children:n.jsx("img",{src:((E=A.eyecatch)==null?void 0:E.url)||"/assets/top/business_bg.png",alt:A.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"})}),n.jsxs("div",{className:"flex flex-col flex-grow",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:"w-6 h-6 rounded-full border border-blue-200 flex items-center justify-center flex-shrink-0 transition-colors group-hover:bg-blue-600 group-hover:border-blue-600",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 text-blue-500 group-hover:text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsx("time",{className:"text-[10px] font-black text-gray-400 tracking-[0.2em] font-mono",children:S(A.publishedAt)})]}),n.jsx("h3",{className:"text-base font-black text-gray-800 group-hover:text-blue-600 transition-colors line-clamp-2 tracking-tight leading-snug",children:A.title})]})]},A.id)})}),j>1&&n.jsxs("div",{className:"mt-20 flex justify-center items-center gap-4",children:[n.jsx("button",{onClick:()=>a(A=>Math.max(1,A-1)),disabled:i===1,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 rotate-90 group-hover:text-blue-600"})}),n.jsx("div",{className:"flex items-center gap-2",children:N().map((A,E)=>n.jsx(Co.Fragment,{children:A==="..."?n.jsx("span",{className:"w-8 text-center text-gray-300 font-bold",children:"..."}):n.jsx("button",{onClick:()=>a(Number(A)),className:`w-12 h-12 rounded-full text-xs font-black transition-all ${i===A?"bg-blue-600 text-white shadow-lg shadow-blue-100":"text-gray-400 hover:bg-gray-50"}`,children:A})},E))}),n.jsx("button",{onClick:()=>a(A=>Math.min(j,A+1)),disabled:i===j,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 -rotate-90 group-hover:text-blue-600"})})]})]})})]})]})},q9=[{name:"è¬æ¼",image:"/assets/services/speaking/lecture.jpg"},{name:"ããã«ãã£ã¹ã«ãã·ã§ã³",image:"/assets/services/speaking/panel-discussion.jpg"},{name:"ã»ããã¼/åå¼·ä¼",image:"/assets/services/speaking/seminar.jpg"},{name:"ã¯ã¼ã¯ã·ã§ãã",image:"/assets/services/speaking/workshop.jpg"},{name:"ãã©ã¼ã©ã /ã·ã³ãã¸ã¦ã ",image:"/assets/services/speaking/forum.jpg"},{name:"ãªã³ã©ã¤ã³/ãªãã©ã¤ã³/ãã¤ããªãã",image:"/assets/services/speaking/online-hybrid.jpg"}],K9=[{tag:"Online",name:"ã¦ã§ããã¼ã»ç ä¿®",price:"200,000",duration:"60åãªã³ã©ã¤ã³",description:"ãç¥èã®ã¤ã³ããããã«ç¹åãZoomçã使ç¨ãããªã³ã©ã¤ã³è¬æ¼ãAIãªã¹ããªã³ã°ãã¡ã¿ãã¼ã¹æ¦è«ãªã©ã社å
ç ä¿®ãåºåã¸ã®é
ä¿¡ã¤ãã³ãã«æé©ã§ãã",note:"â»ã¢ã¼ã«ã¤ãé
ä¿¡å©ç¨æ¨©ãå«ã¿ã¾ãã"},{tag:"Standard",name:"è¬æ¼ã»ã»ããã¼",price:"350,000",duration:"60ã90åç¾å°ç»å£",description:"ãç±éã¨ãã¸ã§ã³ããå
±æãã«ã³ãã¡ã¬ã³ã¹ã®è¬æ¼ããå
¨ç¤¾ã¤ãã³ããªã©ã«ãä¼å ´ã®ç©ºæ°ãæ´ã¿ãåå è
ã®ã¢ããã¼ã·ã§ã³ãé«ãããã¬ã¼ã³ãã¼ã·ã§ã³ãè¡ãã¾ãã",note:"â»äº¤éè²»ã»å®¿æ³è²»ã¯å¥éã¨ãªãã¾ãã"},{tag:"Practical",name:"ã¯ã¼ã¯ã·ã§ããã»å®è·µ",price:"600,000",duration:"忥(3~4h)ç¾å°éå¬",description:"ãä½é¨ããéããæ·±ãçè§£ãè¬æ¼ã«å ããå
504®éã«çæAIã触ããHero Eggã§ã¯ã¼ã«ããä½ããªã©ã®å®æå°ãå«ã¿ã¾ãã",note:"â»è¬å¸«1åï¼ãµãã¼ãã¹ã¿ãã1åä½å¶ã®ç®å®ã§ãã"},{tag:"Premium",name:"ã¤ãã³ãå ±åµ",price:"1,000,000",duration:"1æ¥ãæéå¿ç¸è«",description:"ãã¤ãã³ããã®ãã®ãããããã¥ã¼ã¹ãç»å£ã ãã§ãªããä½é¨ãã¼ã¹ã®è¨ç½®ãåä¾åãã¢ã¤ãã¢ã½ã³éå¶ãªã©ãã¤ãã³ãã®ç®çã³ã³ãã³ãã¨ãã¦å ¨é¢çã«ååãã¾ãã",note:"â»æ©ææé è²»ã»éå¶è²»ãå«ã¿ã¾ãã"}],X9=["/assets/services/speaking/speaker/speaker-1.png","/assets/services/speaking/speaker/speaker-2.png","/assets/services/speaking/speaker/speaker-3.png","/assets/services/speaking/speaker/speaker-4.png","/assets/services/speaking/speaker/speaker-8.png","/assets/services/speaking/speaker/speaker-9.png","/assets/services/speaking/speaker/speaker-10.png"],s3="ãbe HEROESãè¬æ¼ã»ç»å£ããã±ã¼ã¸.pdf",Y9=["è¬æ¼","ããã«ãã£ã¹ã«ãã·ã§ã³","ã»ããã¼/åå¼·ä¼","ã¯ã¼ã¯ã·ã§ãã","ãã©ã¼ã©ã /ã·ã³ãã¸ã¦ã ","ãªã³ã©ã¤ã³/ãªãã©ã¤ã³/ãã¤ããªãã"],D2=[{value:"online",label:"ãOnlineãã¦ã§ããã¼ã»ç ä¿®ï¼200,000åãï¼"},{value:"standard",label:"ãStandardãè¬æ¼ã»ã»ããã¼ï¼350,000åãï¼"},{value:"practical",label:"ãPracticalãã¯ã¼ã¯ã·ã§ããã»å®è·µï¼600,000åãï¼"},{value:"premium",label:"ãPremiumãã¤ãã³ãå ±åµï¼1,000,000åãï¼"},{value:"undecided",label:"æªå®ã»ç¸è«ããã"}],J9={plan:"",style:"",company:"",name:"",email:"",phone:"",eventDate:"",content:"",confirm_email_field:""},Q9=()=>{var R;const[r,e]=T.useState([]),[t,s]=T.useState("form"),[i,a]=T.useState(!1),[o,c]=T.useState("input"),[h,f]=T.useState(J9),[m,g]=T.useState(!1),[x,y]=T.useState(!1),[v]=T.useState(Date.now()),j=T.useRef(null),N=I=>{var D;const F=I==="left"?-360:360;(D=j.current)==null||D.scrollBy({left:F,behavior:"smooth"})},S=I=>{const{name:F,value:D}=I.target;f(O=>({...O,[F]:D}))},A=I=>{var F;I.preventDefault(),m&&(c("confirm"),(F=document.getElementById("speaking-form"))==null||F.scrollIntoView({behavior:"smooth"}))},E=async()=>{var O,$;y(!0),(Date.now()-v)/1e3<3&&console.warn("Submission too fast, likely a bot.");const D=[`ã叿ãã©ã³ã: ${((O=D2.find(z=>z.value===h.plan))==null?void 0:O.label)||h.plan}`,`ã叿形å¼ã: ${h.style||"æªé¸æ"}`,`ãé»è©±çªå·ã: ${h.phone||"---"}`,`ã叿æ¥ç¨ã: ${h.eventDate||"æªå®"}`,"","ããä¾é ¼å 容ã:",h.content].join(` 505`);try{if(!(await fetch("/api/send-mail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({category:"speaking",company:h.company,name:h.name,email:h.email,content:D,confirm_email_field:h.confirm_email_field,_t:Date.now()})})).ok)throw new Error("éä¿¡ã«å¤±æãã¾ããã");c("complete"),($=document.getElementById("speaking-form"))==null||$.scrollIntoView({behavior:"smooth"})}catch(z){console.error("Submission error:",z),alert("ç³ã訳ããã¾ãããéä¿¡ä¸ã«ã¨ã©ã¼ãçºçãã¾ãããæéãããã¦å度ã試ããã ããã")}finally{y(!1)}};T.useEffect(()=>{(async()=>{try{const F=await Xe(4,void 0,{categoryId:"ã»ããã¼ã»ã¦ã§ããã¼ã»è¬æ¼ã»ç»å£ å®ç¸¾"});e(F.contents)}catch(F){console.error("Failed to fetch news:",F)}})()},[]),T.useEffect(()=>{if(t!=="form")return;const I=document.getElementById("speaking-hubspot-form");if(!I)return;a(!0);const F=O=>{var $;if(O.data.type==="hsFormCallback"&&O.data.eventName==="onFormSubmitted"&&O.data.id==="5e03bb7b-49a7-43cb-8644-9fa906c55a3a"){const z=O.data.data;let re="",he="",de="",fe="";if(z.submissionValues)re=z.submissionValues.email,he=z.submissionValues.firstname,de=z.submissionValues.lastname,fe=z.submissionValues.company;else if(Array.isArray(z)){const le=se=>{var K;return(K=z.find(Q=>Q.name===se))==null?void 0:K.value};re=le("email"),he=le("firstname"),de=le("lastname"),fe=le("company")}else re=z.email,he=z.firstname,de=z.lastname,fe=z.company;const oe=`${de||""} ${he||""}`.trim()||"ã客æ§";re&&fetch("/api/send-mail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"document_request",name:oe,email:re,company:fe,documentFiles:[s3],content:`è¬æ¼ã»ç»å£ããã±ã¼ã¸è³æè«æ±ï¼ãµã¤ã飿ºï¼ 506è³æ: ${s3}`})}).then(le=>{le.ok?console.log("Email API triggered successfully"):console.error("Email API returned error",le.status)}).catch(le=>console.error("Email trigger failed:",le)),s("thanks"),window.scrollTo({top:(($=document.getElementById("document-request"))==null?void 0:$.offsetTop)||0,behavior:"smooth"})}};window.addEventListener("message",F);const D=()=>{const O=window.hbspt;if(O&&I){I.innerHTML="";try{O.forms.create({region:"na2",portalId:"243129625",formId:"5e03bb7b-49a7-43cb-8644-9fa906c55a3a",target:"#speaking-hubspot-form",inlineMessage:"éä¿¡å®äº",onFormReady:()=>a(!1),onFormSubmitted:()=>{var $;s("thanks"),window.scrollTo({top:(($=document.getElementById("document-request"))==null?void 0:$.offsetTop)||0,behavior:"smooth"})}})}catch($){console.error("HubSpot Error:",$),a(!1)}}else setTimeout(D,100)};return D(),()=>{window.removeEventListener("message",F)}},[t]);const M=I=>{const F=new Date(I);return`${F.getFullYear()}.${F.getMonth()+1}.${F.getDate()}`};return n.jsxs("main",{className:"min-h-screen bg-white font-sans text-gray-800",children:[n.jsx(Ge,{titleEn:"SPEAKING",titleJa:"è¬æ¼ã»ç»å£"}),n.jsx("div",{className:"container mx-auto px-4 max-w-5xl space-y-32 mt-20 md:mt-32",children:n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"SPEAKING STYLES"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ç»å£å½¢å¼"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-12 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"ãè¦æã«åããã¦æè»ã«å¯¾å¿å¯è½ãªã6ã¤ã®ç»å£ã¹ã¿ã¤ã«ããç¨æãã¦ãã¾ãã"}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-6",children:q9.map((I,F)=>n.jsxs("div",{className:"group",children:[n.jsx("div",{className:"aspect-[4/3] rounded-xl overflow-hidden shadow-sm border border-gray-100",children:n.jsx("img",{src:I.image,alt:I.name,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("p",{className:"mt-3 text-xs md:text-sm font-bold text-gray-700 text-center tracking-wide",children:I.name})]},F))})]})}),n.jsxs("section",{className:"mt-20 md:mt-32",children:[n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl mb-8 md:mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"SPEAKER"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ç»å£è "}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs("div",{className:"relative w-full",children:[n.jsx("div",{ref:j,className:"overflow-x-auto scrollbar-hide snap-x",children:n.jsx("div",{className:"flex w-max",children:X9.map((I,F)=>n.jsx("div",{className:"flex-shrink-0 px-1 md:px-1.5 snap-start",children:n.jsx("img",{src:I,alt:`ç»å£åç ${F+1}`,className:"h-[140px] sm:h-[180px] md:h-[220px] lg:h-[260px] aspect-[4/3] object-cover rounded-md md:rounded-lg"})},F))})}),n.jsx("button",{onClick:()=>N("left"),"aria-label":"åã¸",className:"absolute left-2 md:left-6 top-1/2 -translate-y-1/2 w-10 h-10 md:w-12 md:h-12 bg-white rounded-full shadow-xl flex items-center justify-center text-gray-400 hover:text-blue-600 transition-all z-10",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-5 h-5 md:w-6 md:h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),n.jsx("button",{onClick:()=>N("right"),"aria-label":"次ã¸",className:"absolute right-2 md:right-6 top-1/2 -translate-y-1/2 w-10 h-10 md:w-12 md:h-12 bg-white rounded-full shadow-xl flex items-center justify-center text-gray-400 hover:text-blue-600 transition-all z-10",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-5 h-5 md:w-6 md:h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]})]}),n.jsxs("div",{className:"container mx-auto px-4 max-w-5xl space-y-32 mt-32",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"PRICING"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"æéãã©ã³ï¼åèï¼"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 md:gap-5",children:K9.map((I,F)=>n.jsxs("div",{className:"bg-white border border-gray-100 rounded-xl p-5 md:p-6 flex flex-col shadow-sm hover:shadow-md transition-shadow",children:[n.jsxs("div",{className:"text-center mb-4",children:[n.jsxs("span",{className:"text-[10px] font-black text-blue-600 tracking-[0.15em] uppercase",children:["ã",I.tag,"ã"]}),n.jsx("h4",{className:"text-base md:text-lg font-black text-gray-900 mt-1",children:I.name})]}),n.jsx("div",{className:"w-full h-px bg-gray-100 mb-4"}),n.jsx("div",{className:"text-center mb-1",children:n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-wider",children:"æéï¼ç¨å¥ï¼"})}),n.jsxs("div",{className:"text-center mb-4",children:[n.jsx("span",{className:"text-2xl md:text-3xl font-black text-gray-900",children:I.price}),n.jsx("span",{className:"text-sm font-bold text-gray-900",children:"åã"})]}),n.jsxs("div",{className:"text-center mb-4",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-wider block mb-1",children:"æé / å½¢å¼"}),n.jsx("span",{className:"text-sm font-bold text-gray-800",children:I.duration})]}),n.jsx("div",{className:"w-full h-px bg-gray-100 mb-4"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-wider block mb-2",children:"å 容ã»ç¹å¾´"}),n.jsx("p",{className:"text-[11px] md:text-xs text-gray-600 leading-[1.9] font-medium tracking-wide",children:I.description})]}),n.jsx("p",{className:"text-[10px] text-gray-400 font-medium mt
506-3 leading-relaxed",children:I.note})]},F))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"CASE STUDY"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"ç»å£äºä¾"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-12",children:r.length>0?r.map(I=>{var F;return n.jsxs(q,{to:`/news/${I.id}`,className:"group block",children:[n.jsx("div",{className:"aspect-video rounded-lg overflow-hidden bg-gray-100 mb-4 border border-gray-50 shadow-sm",children:n.jsx("img",{src:((F=I.eyecatch)==null?void 0:F.url)||"/assets/services/speaking/lecture.jpg",alt:I.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),n.jsx("h4",{className:"text-xs md:text-sm font-bold text-gray-800 leading-snug mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors",children:I.title}),n.jsx("p",{className:"text-[10px] text-gray-300 font-bold tracking-widest",children:M(I.publishedAt)})]},I.id)}):[1,2,3,4].map(I=>n.jsxs("div",{className:"group block animate-pulse",children:[n.jsx("div",{className:"aspect-video rounded-lg bg-gray-100 mb-4"}),n.jsx("div",{className:"h-4 bg-gray-100 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/4"})]},I))}),n.jsx("div",{className:"text-center",children:n.jsxs(q,{to:"/news",className:"inline-flex items-center gap-2 px-10 py-3 bg-gray-800 text-white text-xs font-bold rounded-full hover:bg-black transition-colors shadow-md",children:["ãã£ã¨è¦ã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-3 h-3",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})})]}),n.jsxs("section",{id:"speaking-form",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"REQUEST"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"è¬æ¼ä¾é ¼ãã©ã¼ã "}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsxs(an,{mode:"wait",children:[o==="input"&&n.jsxs(Ce.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},children:[n.jsx("p",{className:"mb-8 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"以ä¸ã®ãã©ã¼ã ã«å¿
è¦äºé
ããå
¥åãã ãããå
容ã確èªã®ä¸ãæ
å½è
ãããé£çµ¡ãããã¾ãã"}),n.jsxs("form",{className:"border-t-2 border-gray-900",onSubmit:A,children:[n.jsx("div",{style:{position:"absolute",left:"-9999px",top:"auto",width:"1px",height:"1px",overflow:"hidden"},children:n.jsx("input",{type:"text",name:"confirm_email_field",value:h.confirm_email_field,onChange:S,tabIndex:-1,autoComplete:"off"})}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"叿ãã©ã³"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsxs("select",{name:"plan",value:h.plan,onChange:S,required:!0,className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold appearance-none bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23cbd5e1%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E')] bg-[length:18px] bg-[right_1rem_center] bg-no-repeat",children:[n.jsx("option",{value:"",children:"鏿ãã¦ãã ãã"}),D2.map(I=>n.jsx("option",{value:I.value,children:I.label},I.value))]})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-gray-400 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"ä»»æ"}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"叿ã®ç»å£å½¢å¼"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsxs("select",{name:"style",value:h.style,onChange:S,className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold appearance-none bg-[url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23cbd5e1%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E')] bg-[length:18px] bg-[right_1rem_center] bg-no-repeat",children:[n.jsx("option",{value:"",children:"鏿ãã¦ãã ãã"}),Y9.map(I=>n.jsx("option",{value:I,children:I},I))]})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"貴社å / çµç¹å"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"company",value:h.company,onChange:S,placeholder:"æ ªå¼ä¼ç¤¾MetaHeroes",required:!0,className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold"})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãåå"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"name",value:h.name,onChange:S,placeholder:"Meta 太é",required:!0,className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold"})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ã¡ã¼ã«ã¢ãã¬ã¹"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"email",name:"email",value:h.email,onChange:S,placeholder:"[email protected]",required:!0,className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold"})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-gray-400 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"ä»»æ"}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"é»è©±çªå·"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"tel",name:"phone",value:h.phone,onChange:S,placeholder:"03-1234-5678",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold"})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-center gap-3",children:[n.jsx("span",{className:"bg-gray-400 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm",children:"ä»»æ"}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"叿æ¥ç¨"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("input",{type:"text",name:"eventDate",value:h.eventDate,onChange:S,placeholder:"2026å¹´5æé / æªå®",className:"w-full max-w-md border border-gray-300 py-3.5 px-4 outline-none font-bold"})})]}),n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsxs("label",{className:"bg-gray-50 px-8 py-8 flex items-start gap-3 pt-10",children:[n.jsx("span",{className:"bg-red-600 text-white text-[9px] font-black px-1.5 py-0.5 rounded-sm mt-1",children:"å¿
é "}),n.jsx("span",{className:"font-bold text-gray-900 text-sm",children:"ãä¾é ¼å
容"})]}),n.jsx("div",{className:"px-8 py-8 bg-white",children:n.jsx("textarea",{name:"content",value:h.content,onChange:S,rows:8,placeholder:"ã¤ãã³ãã®æ¦è¦ãåå è
ã®å±æ§ãã叿ã®ãã¼ããªã©ããè¨å
¥ãã ããã",required:!0,className:"w-full border border-gray-300 py-3.5 px-4 outline-none font-bold resize-none"})})]}),n.jsxs("div",{className:"py-20 text-center space-y-10",children:[n.jsxs("p",{className:"text-xs text-gray-500 font-bold leading-relaxed",children:["ãå
¥åããã ããå人æ
å ±ã¯ãè¬æ¼ä¾é ¼ã¸ã®å¯¾å¿ã
506ãã³æ
å ±æä¾ã®ããã«ã®ã¿å©ç¨ãããã¾ãã",n.jsx("br",{className:"hidden md:block"}),n.jsx(q,{to:"/contact/privacy",className:"text-blue-600 hover:underline mx-1",children:"ãå人æ
å ±ã®åæ±ãã«ã¤ãã¦ã"}),"ã«åæã®ä¸ãéä¿¡ãã¦ãã ããã"]}),n.jsxs("label",{className:"flex items-center justify-center gap-3 cursor-pointer group",children:[n.jsxs("div",{className:"relative w-5 h-5",children:[n.jsx("input",{type:"checkbox",className:"sr-only",checked:m,onChange:I=>g(I.target.checked)}),n.jsx("div",{className:`w-full h-full border-2 transition-all rounded-sm flex items-center justify-center ${m?"border-blue-600 bg-blue-50":"border-gray-300 bg-white"}`,children:n.jsx("svg",{className:`w-3.5 h-3.5 text-blue-600 transition-transform ${m?"scale-100":"scale-0"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:4,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})]}),n.jsx("span",{className:"text-sm font-black text-gray-900 group-hover:text-blue-600 transition-colors",children:"å人æ
å ±ã®åãæ±ãã«åæãã"})]}),n.jsx("div",{className:"pt-6",children:n.jsxs("button",{type:"submit",disabled:!m,className:`inline-flex items-center justify-center px-20 py-5 text-sm font-black tracking-[0.3em] transition-all duration-500 min-w-[340px] border-2 ${m?"bg-gray-900 text-white border-gray-900 hover:bg-white hover:text-gray-900":"bg-gray-100 text-gray-300 border-gray-100 cursor-not-allowed"}`,children:["å
容ã確èªãã",n.jsx(ya,{className:"ml-2 w-5 h-5"})]})})]})]})]},"input"),o==="confirm"&&n.jsxs(Ce.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:[n.jsx("div",{className:"mb-8 text-center",children:n.jsx("p",{className:"text-sm text-gray-500 font-bold",children:"å
¥åå
容ãã確èªãã ããããããããã°ãéä¿¡ããããã¿ã³ãæ¼ãã¦ãã ããã"})}),n.jsxs("div",{className:"border-t-2 border-gray-900 bg-gray-50/30",children:[n.jsx(tl,{label:"叿ãã©ã³",value:((R=D2.find(I=>I.value===h.plan))==null?void 0:R.label)||""}),n.jsx(tl,{label:"叿ã®ç»å£å½¢å¼",value:h.style}),n.jsx(tl,{label:"貴社å / çµç¹å",value:h.company}),n.jsx(tl,{label:"ãåå",value:h.name}),n.jsx(tl,{label:"ã¡ã¼ã«ã¢ãã¬ã¹",value:h.email}),n.jsx(tl,{label:"é»è©±çªå·",value:h.phone}),n.jsx(tl,{label:"叿æ¥ç¨",value:h.eventDate}),n.jsx(tl,{label:"ãä¾é ¼å
容",value:h.content})]}),n.jsxs("div",{className:"py-20 flex flex-col items-center gap-6",children:[n.jsxs("button",{onClick:E,disabled:x,className:"inline-flex items-center justify-center px-20 py-5 bg-blue-600 text-white text-sm font-black tracking-[0.3em] hover:bg-blue-700 shadow-xl shadow-blue-600/20 transition-all min-w-[340px]",children:[x?"éä¿¡ä¸...":"ãã®å
容ã§éä¿¡ãã",!x&&n.jsx(Qk,{className:"ml-2 w-4 h-4"})]}),n.jsxs("button",{onClick:()=>{var I;c("input"),(I=document.getElementById("speaking-form"))==null||I.scrollIntoView({behavior:"smooth"})},disabled:x,className:"inline-flex items-center justify-center text-sm font-bold text-gray-400 hover:text-gray-900 transition-colors",children:[n.jsx(q0,{className:"mr-1 w-4 h-4"})," å
¥åç»é¢ã«æ»ã"]})]})]},"confirm"),o==="complete"&&n.jsxs(Ce.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"py-20 text-center space-y-8",children:[n.jsx("div",{className:"w-20 h-20 bg-blue-50 rounded-full flex items-center justify-center mx-auto text-blue-600 mb-8",children:n.jsx(Yk,{size:40})}),n.jsx("h4",{className:"text-3xl font-black text-gray-900 tracking-wider",children:"éä¿¡å®äº"}),n.jsxs("div",{className:"space-y-4 text-gray-600 font-bold leading-relaxed",children:[n.jsxs("p",{children:["è¬æ¼ä¾é ¼ã®ãåãåãããããã¨ããããã¾ããã",n.jsx("br",{}),"å
容ã確èªã®ä¸ãæ
å½è
ããæãè¿ããé£çµ¡ãããã¾ãã"]}),n.jsx("p",{className:"text-sm text-gray-400",children:"â»éä¿¡å
å®¹ã®æ§ããã¡ã¼ã«ã§ãéããã¾ããã®ã§ã確èªãã ããã"})]})]},"complete")]})]}),n.jsxs("section",{id:"document-request",children:[n.jsxs("div",{className:"mb-12",children:[n.jsx("span",{className:"text-[10px] font-bold text-gray-400 tracking-[0.2em] uppercase block mb-2",children:"DOCUMENT REQUEST"}),n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-800",children:"è³æè«æ±"}),n.jsx("div",{className:"w-full h-px bg-gray-100 relative mt-6",children:n.jsx("div",{className:"absolute top-0 left-0 w-16 h-1 -translate-y-1/2 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-full"})})]})]}),n.jsx("p",{className:"mb-8 text-gray-600 leading-relaxed font-medium text-sm md:text-base tracking-wide",children:"è¬æ¼ã»ç»å£ããã±ã¼ã¸ã®è©³ç´°è³æããéããã¾ãã以ä¸ã®ãã©ã¼ã ã«ãå
¥åãã ããã"}),n.jsxs(an,{mode:"wait",children:[t==="form"&&n.jsxs(Ce.div,{initial:{opacity:0,y:20}
506,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},children:[n.jsxs("div",{className:"bg-gray-50 p-6 md:p-12 rounded-2xl border border-gray-100 min-h-[400px] relative flex flex-col items-center justify-center",children:[i&&n.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-4",children:[n.jsx($n,{className:"animate-spin text-blue-600",size:40}),n.jsx("p",{className:"text-sm font-bold text-gray-400",children:"ãã©ã¼ã ãèªã¿è¾¼ãã§ãã¾ã..."})]}),n.jsx("div",{id:"speaking-hubspot-form",className:`w-full ${i?"hidden":"block"}`})]}),n.jsx("div",{className:"mt-8 text-center",children:n.jsxs("p",{className:"text-xs text-gray-400 font-bold leading-relaxed max-w-2xl mx-auto",children:["â»éä¿¡å¾ããå
¥åããã ããã¡ã¼ã«ã¢ãã¬ã¹å®ã«è³æããéããã¾ãã",n.jsx("br",{}),"ã¡ã¼ã«ãå±ããªãå ´åã¯ãè¿·æã¡ã¼ã«ãã©ã«ããã確èªããã ããããåãåãããã ããã"]})})]},"form"),t==="thanks"&&n.jsx(Ce.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},children:n.jsxs("div",{className:"text-center py-12 md:py-20",children:[n.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 bg-green-50 rounded-full mb-8",children:n.jsx(tP,{className:"text-green-500",size:48,strokeWidth:2})}),n.jsx("h3",{className:"text-2xl md:text-3xl font-black text-gray-900 mb-4",children:"éä¿¡ãå®äºãã¾ãã"}),n.jsx("p",{className:"text-sm md:text-base text-gray-500 font-bold leading-relaxed max-w-xl mx-auto mb-8",children:"è¬æ¼ã»ç»å£ããã±ã¼ã¸è³æã®ãè«æ±ãããã¨ããããã¾ãã"}),n.jsxs("div",{className:"bg-blue-50 border border-blue-100 rounded-2xl p-6 md:p-8 max-w-lg mx-auto mb-12",children:[n.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[n.jsx(Uv,{className:"text-blue-600",size:20}),n.jsx("span",{className:"text-sm font-black text-blue-900",children:"ã¡ã¼ã«ãã確èªãã ãã"})]}),n.jsxs("p",{className:"text-xs md:text-sm text-blue-700 font-bold leading-relaxed",children:["ãå
¥åããã ããã¡ã¼ã«ã¢ãã¬ã¹å®ã«ã",n.jsx("br",{className:"hidden md:inline"}),"è³æãæ·»ä»ããã¡ã¼ã«ããéããã¦ããã¾ãã",n.jsx("br",{}),"å±ããªãå ´åã¯è¿·æã¡ã¼ã«ãã©ã«ããã確èªãã ããã"]})]}),n.jsxs(q,{to:"/",className:"inline-flex items-center justify-center gap-2 px-12 py-4 bg-gray-900 text-white text-sm font-black tracking-[0.2em] rounded-full hover:bg-blue-600 transition-all duration-500 shadow-xl",children:[n.jsx(Jk,{size:16}),"ããããã¼ã¸ã¸æ»ã"]})]})},"thanks")]})]})]}),n.jsx("section",{className:"bg-gray-50 mt-32",children:n.jsx("div",{className:"container mx-auto px-4 py-24",children:n.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-6",children:[n.jsxs("a",{href:"#speaking-form",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#333333] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-gray-700 to-gray-900 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"è¬æ¼ãä¾é ¼ãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-white/20 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-4 h-4 text-cyan-400",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})})]}),n.jsxs("a",{href:"#document-request",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#3b82f6] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-blue-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-blue-700 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"è³æè«æ±"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/contact",className:"group relative flex items-center justify-between w-full md:w-[320px] px-8 py-5 bg-[#0ea5e9] text-white rounded-full overflow-hidden shadow-lg hover:shadow-2xl hover:shadow-cyan-500/30 hover:-translate-y-1 transition-all duration-300",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-400 to-cyan-600 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),n.jsx("span",{className:"relative z-10 text-lg font-black tracking-wider",children:"ãåãåãã"}),n.jsx("div",{className:"relative z-10 w-10 h-10 rounded-full bg-white/20 flex items-center justify-center group-hover:bg-white/30 group-hover:scale-110 transition-all duration-300",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]})]})})})]})},tl=({label:r,value:e})=>n.jsxs("div",{className:"grid md:grid-cols-[280px,1fr] border-b border-gray-200",children:[n.jsx("div",{className:"bg-gray-50 px-8 py-6 font-bold text-gray-500 text-sm tracking-wider flex items-center",children:r}),n.jsx("div",{className:"px-8 py-6 bg-white font-black text-gray-900 text-sm leading-relaxed whitespace-pre-wrap",children:e||"---"})]}),Z9=()=>{const[r,e]=T.useState([]),[t,s]=T.useState(0),[i,a]=T.useState(1),[o,c]=T.useState(""),[h,f]=T.useState(""),[m,g]=T.useState(!1),x=typeof window<"u"&&window.innerWidth>=1024?30:10;T.useEffect(()=>{const A=async()=>{g(!0);try{const M=(i-1)*x,R=await Xe(x,void 0,{year:o,keyword:h,categoryId:"ãã¬ãã¸"},M);e(R.contents||[]),s(R.totalCount||0)}catch(M){console.error("Failed to fetch knowledge articles",M),e([]),s(0)}finally{g(!1)}},E=setTimeout(()=>{A()},500);return()=>clearTimeout(E)},[o,h,i,x]),T.useEffect(()=>{a(1)},[o,h]);const y=Math.ceil(t/x),v=()=>{const A=[];
506if(y<=5)for(let M=1;M<=y;M++)A.push(M);else{A.push(1),i>3&&A.push("...");const M=Math.max(2,i-1),R=Math.min(y-1,i+1);for(let I=M;I<=R;I++)A.includes(I)||A.push(I);i<y-2&&A.push("..."),A.includes(y)||A.push(y)}return A},j=A=>{const E=new Date(A);return`${E.getFullYear()}.${E.getMonth()+1}.${E.getDate()}`},N=new Date().getFullYear(),S=Array.from({length:5},(A,E)=>(N-E+1).toString());return n.jsxs("div",{className:"min-h-screen bg-white",children:[n.jsx(Ge,{titleEn:"KNOWLEDGE",titleJa:"ãã¬ãã¸"}),n.jsxs("div",{className:"container mx-auto px-4 sm:px-8 pb-32",children:[n.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-end gap-8 mb-16 border-b border-gray-100 pb-12 max-w-7xl mx-auto",children:[n.jsx("div",{className:"flex flex-col sm:flex-row gap-4 w-full lg:w-auto",children:n.jsxs("div",{className:"relative min-w-[160px]",children:[n.jsxs("select",{value:o,onChange:A=>c(A.target.value),className:"w-full appearance-none px-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all cursor-pointer pr-12",children:[n.jsx("option",{value:"",children:"YEAR"}),S.map(A=>n.jsx("option",{value:A,children:A},A))]}),n.jsx(Vs,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-300 pointer-events-none"})]})}),n.jsxs("div",{className:"relative flex-grow lg:w-72 w-full",children:[n.jsx("input",{type:"text",placeholder:"SEARCH",value:h,onChange:A=>f(A.target.value),className:"w-full pl-12 pr-6 py-3 bg-gray-50 border-none rounded-sm text-xs font-black tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-100 transition-all placeholder:text-gray-300"}),n.jsx(mu,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-300 w-4 h-4"})]})]}),n.jsx("div",{className:"max-w-7xl mx-auto px-4",children:m?n.jsx("div",{className:"flex justify-center items-center py-32",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-100 border-t-blue-600"})}):r.length===0?n.jsx("div",{className:"text-center py-32",children:n.jsx("p",{className:"text-gray-300 font-black text-sm tracking-[0.2em] uppercase",children:"No articles found."})}):n.jsxs(n.Fragment,{children:[n.jsx(Ce.div,{initial:{opacity:0}
506,animate:{opacity:1},transition:{duration:.5},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-16",children:r.map(A=>{var E;return n.jsxs(q,{to:`/news/${A.id}`,className:"group flex flex-col h-full",children:[n.jsx("div",{className:"relative aspect-video overflow-hidden rounded-xl bg-gray-100 mb-6 shadow-sm border border-gray-50",children:n.jsx("img",{src:((E=A.eyecatch)==null?void 0:E.url)||"/assets/top/business_bg.png",alt:A.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"})}),n.jsxs("div",{className:"flex flex-col flex-grow",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:"w-6 h-6 rounded-full border border-blue-200 flex items-center justify-center flex-shrink-0 transition-colors group-hover:bg-blue-600 group-hover:border-blue-600",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"w-3 h-3 text-blue-500 group-hover:text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),n.jsx("time",{className:"text-[10px] font-black text-gray-400 tracking-[0.2em] font-mono",children:j(A.publishedAt)})]}),n.jsx("h3",{className:"text-base font-black text-gray-800 group-hover:text-blue-600 transition-colors line-clamp-2 tracking-tight leading-snug",children:A.title})]})]},A.id)})}),y>1&&n.jsxs("div",{className:"mt-20 flex justify-center items-center gap-4",children:[n.jsx("button",{onClick:()=>a(A=>Math.max(1,A-1)),disabled:i===1,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 rotate-90 group-hover:text-blue-600"})}),n.jsx("div",{className:"flex items-center gap-2",children:v().map((A,E)=>n.jsx(Co.Fragment,{children:A==="..."?n.jsx("span",{className:"w-8 text-center text-gray-300 font-bold",children:"..."}):n.jsx("button",{onClick:()=>a(Number(A)),className:`w-12 h-12 rounded-full text-xs font-black transition-all ${i===A?"bg-blue-600 text-white shadow-lg shadow-blue-100":"text-gray-400 hover:bg-gray-50"}`,children:A})},E))}),n.jsx("button",{onClick:()=>a(A=>Math.min(y,A+1)),disabled:i===y,className:"w-12 h-12 rounded-full border border-gray-100 flex items-center justify-center transition-all hover:bg-gray-50 disabled:opacity-30 disabled:cursor-not-allowed group",children:n.jsx(Vs,{className:"w-5 h-5 text-gray-400 -rotate-90 group-hover:text-blue-600"})})]})]})})]})]})};function sw(r,e){var t={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&e.indexOf(s)<0&&(t[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(r);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(r,s[i])&&(t[s[i]]=r[s[i]]);return t}function eW(r,e,t,s){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function c(m){try{f(s.next(m))}catch(g){o(g)}}function h(m){try{f(s.throw(m))}catch(g){o(g)}}function f(m){m.done?a(m.value):i(m.value).then(c,h)}f((s=s.apply(r,e||[])).next())})}const tW=r=>r?(...e)=>r(...e):(...e)=>fetch(...e);class u5 extends Error{constructor(e,t="FunctionsError",s){super(e),this.name=t,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class sW extends u5{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class n3 extends u5{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class r3 extends u5{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var YN;(function(r){r.Any="any",r.ApNortheast1="ap-northeast-1",r.ApNortheast2="ap-northeast-2",r.ApSouth1="ap-south-1",r.ApSoutheast1="ap-southeast-1",r.ApSoutheast2="ap-southeast-2",r.CaCentral1="ca-central-1",r.EuCentral1="eu-central-1",r.EuWest1="eu-west-1",r.EuWest2="eu-west-2",r.EuWest3="eu-west-3",r.SaEast1="sa-east-1",r.UsEast1="us-east-1",r.UsWest1="us-west-1",r.UsWest2="us-west-2"})(YN||(YN={}));
506class nW{constructor(e,{headers:t={},customFetch:s,region:i=YN.Any}={}){this.url=e,this.headers=t,this.region=i,this.fetch=tW(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return eW(this,arguments,void 0,function*(t,s={}){var i;let a,o;try{const{headers:c,method:h,body:f,signal:m,timeout:g}=s;let x={},{region:y}=s;y||(y=this.region);const v=new URL(`${this.url}/${t}`);y&&y!=="any"&&(x["x-region"]=y,v.searchParams.set("forceFunctionRegion",y));let j;f&&(c&&!Object.prototype.hasOwnProperty.call(c,"Content-Type")||!c)?typeof Blob<"u"&&f instanceof Blob||f instanceof ArrayBuffer?(x["Content-Type"]="application/octet-stream",j=f):typeof f=="string"?(x["Content-Type"]="text/plain",j=f):typeof FormData<"u"&&f instanceof FormData?j=f:(x["Content-Type"]="application/json",j=JSON.stringify(f)):f&&typeof f!="string"&&!(typeof Blob<"u"&&f instanceof Blob)&&!(f instanceof ArrayBuffer)&&!(typeof FormData<"u"&&f instanceof FormData)?j=JSON.stringify(f):j=f;let N=m;g&&(o=new AbortController,a=setTimeout(()=>o.abort(),g),m?(N=o.signal,m.addEventListener("abort",()=>o.abort())):N=o.signal);const S=yield this.fetch(v.toString(),{method:h||"POST",headers:Object.assign(Object.assign(Object.assign({},x),this.headers),c),body:j,signal:N}).catch(R=>{throw new sW(R)}),A=S.headers.get("x-relay-error");if(A&&A==="true")throw new n3(S);if(!S.ok)throw new r3(S);let E=((i=S.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),M;return E==="application/json"?M=yield S.json():E==="application/octet-stream"||E==="application/pdf"?M=yield S.blob():E==="text/event-stream"?M=S:E==="multipart/form-data"?M=yield S.formData():M=yield S.text(),{data:M,error:null,response:S}}catch(c){return{data:null,error:c,response:c instanceof r3||c instanceof n3?c.context:void 0}}finally{a&&clearTimeout(a)}})}}const TM=3,i3=r=>Math.min(1e3*2**r,3e4),rW=[520,503],PM=["GET","HEAD","OPTIONS"];var iW=class extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.co
506de=r.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function a3(r,e){return new Promise(t=>{if(e!=null&&e.aborted){t();return}const s=setTimeout(()=>{e==null||e.removeEventListener("abort",i),t()},r);function i(){clearTimeout(s),t()}e==null||e.addEventListener("abort",i)})}function aW(r,e,t,s){return!(!s||t>=TM||!PM.includes(r)||!rW.includes(e))}var oW=class{constructor(r){var e,t,s,i,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=r.method,this.url=r.url,this.headers=new Headers(r.headers),this.schema=r.schema,this.body=r.body,this.shouldThrowOnError=(e=r.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=r.signal,this.isMaybeSingle=(t=r.isMaybeSingle)!==null&&t!==void 0?t:!1,this.shouldStripNulls=(s=r.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(i=r.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(a=r.retry)!==null&&a!==void 0?a:!0,r.fetch?this.fetch=r.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(r,e){return this.headers=new Headers(this.headers),this.headers.set(r,e),this}retry(r){return this.retryEnabled=r,this}then(r,e){var t=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const s=this.fetch;let a=(async()=>{let o=0;for(;;){const f=new Headers(t.headers);o>0&&f.set("X-Retry-Count",String(o));let m;try{m=await s(t.url.toString(),{method:t.method,headers:f,body:JSON.stringify(t.body,(g,x)=>typeof x=="bigint"?x.toString():x),signal:t.signal})}catch(g){if((g==null?void 0:g.name)==="AbortError"||(g==null?void 0:g.code)==="ABORT_ERR"||!PM.includes(t.method))throw g;if(t.retryEnabled&&o<TM){const x=i3(o);o++,await a3(x,t.signal);continue}throw g}if(aW(t.method,m.status,o,t.retryEnabled)){var c,h;const g=(c=(h=m.headers)===null||h===void 0?void 0:h.get("Retry-After"))!==null&&c!==void 0?c:null,x=g!==null?Math.max(0,parseInt(g,10)||0)*1e3:i3(o);await m.text(),o++,await a3(x,t.signal);continue}return await t.processResponse(m)}})();return this.shouldThrowOnError||(a=a.catch(o=>{var c;let h="",f="",m="";const g=o==null?void 0:o.cause;if(g){var x,y,v,j;const A=(x=g==null?void 0:g.message)!==null&&x!==void 0?x:"",E=(y=g==null?void 0:g.code)!==null&&y!==void 0?y:"";h=`${(v=o==null?void 0:o.name)!==null&&v!==void 0?v:"FetchError"}: ${o==null?void 0:o.message}`,h+=` 507 508Caused by: ${(j=g==null?void 0:g.name)!==null&&j!==void 0?j:"Error"}: ${A}`,E&&(h+=` (${E})`),g!=null&&g.stack&&(h+=` 509${g.stack}`)}else{var N;h=(N=o==null?void 0:o.stack)!==null&&N!==void 0?N:""}const S=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(m="",f="Request was aborted (timeout or manual cancellation)",S>this.urlLengthLimit&&(f+=`. Note: Your request URL is ${S} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((g==null?void 0:g.name)==="HeadersOverflowError"||(g==null?void 0:g.code)==="UND_ERR_HEADERS_OVERFLOW")&&(m="",f="HTTP headers exceeded server limits (typically 16KB)",S>this.urlLengthLimit&&(f+=`. Your request URL is ${S} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(c=o==null?void 0:o.name)!==null&&c!==void 0?c:"FetchError"}: ${o==null?void 0:o.message}`,details:h,hint:f,code:m},data:null,count:null,status:0,statusText:""}}
509)),a.then(r,e)}async processResponse(r){var e=this;let t=null,s=null,i=null,a=r.status,o=r.statusText;if(r.ok){var c,h;if(e.method!=="HEAD"){var f;const x=await r.text();x===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((f=e.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?s=x:s=JSON.parse(x))}const m=(c=e.headers.get("Prefer"))===null||c===void 0?void 0:c.match(/count=(exact|planned|estimated)/),g=(h=r.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");m&&g&&g.length>1&&(i=parseInt(g[1])),e.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(t={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,i=null,a=406,o="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{const m=await r.text();try{t=JSON.parse(m),Array.isArray(t)&&r.status===404&&(s=[],t=null,a=200,o="OK")}catch{r.status===404&&m===""?(a=204,o="No Content"):t={message:m}}if(t&&e.shouldThrowOnError)throw new iW(t)}return{success:t===null,error:t,data:s,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},lW=class extends oW{select(r){let e=!1;const t=(r??"*").split("").map(s=>/\s/.test(s)&&!e?"":(s==='"'&&(e=!e),s)).join("");return this.url.searchParams.set("select",t),this.headers.append("Prefer","return=representation"),this}order(r,{ascending:e=!0,nullsFirst:t,foreignTable:s,referencedTable:i=s}={}){const a=i?`${i}.order`:"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:""}${r}.${e?"asc":"desc"}${t===void 0?"":t?".nullsfirst":".nullslast"}`),this}limit(r,{foreignTable:e,referencedTable:t=e}={}){const s=typeof t>"u"?"limit":`${t}.limit`;return this.url.searchParams.set(s,`${r}`),this}range(r,e,{foreignTable:t,referencedTable:s=t}={}){const i=typeof s>"u"?"offset":`${s}.offset`,a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${r}`),this.url.searchParams.set(a,`${e-r+1}`),this}abortSignal(r){return this.signal=r,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:r=!1,verbose:e=!1,settings:t=!1,buffers:s=!1,wal:i=!1,format:a="text"}={}){var o;const c=[r?"analyze":null,e?"verbose":null,t?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),h=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${h}"; options=${c};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(r){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${r}`),this}};const o3=new RegExp("[,()]");var ah=class extends lW{eq(r,e){return this.url.searchParams.append(r,`eq.${e}`),this}neq(r,e){return this.url.searchParams.append(r,`neq.${e}`),this}gt(r,e){return this.url.searchParams.append(r,`gt.${e}`),this}gte(r,e){return this.url.searchParams.append(r,`gte.${e}`),this}lt(r,e){return this.url.searchParams.append(r,`lt.${e}`),this}lte(r,e){return this.url.searchParams.append(r,`lte.${e}`),this}like(r,e){return this.url.searchParams.append(r,`like.${e}`),this}likeAllOf(r,e){return this.url.searchParams.append(r,`like(all).{${e.join(",")}}`),this}likeAnyOf(r,e){return this.url.searchParams.append(r,`like(any).{${e.join(",")}}`),this}ilike(r,e){return this.url.searchParams.append(r,`ilike.${e}`),this}ilikeAllOf(r,e){return this.url.searchParams.append(r,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(r,e){return this.url.searchParams.append(r,`ilike(any).{${e.join(",")}}`),this}regexMatch(r,e){return this.url.searchParams.append(r,`match.${e}`),this}regexIMatch(r,e){return this.url.searchParams.append(r,`imatch.${e}`),this}is(r,e){return this.url.searchParams.append(r,`is.${e}`),this}isDistinct(r,e){return this.url.searchParams.append(r,`isdistinct.${e}`),this}in(r,e){const t=Array.from(new Set(e)).map(s=>typeof s=="string"&&o3.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(r,`in.(${t})`),this}notIn(r,e){const t=Array.from(new Set(e)).map(s=>typeof s=="string"&&o3.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(r,`not.in.(${t})`),this}contains(r,e){return typeof e=="string"?this.url.searchParams.append(r,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(r,`cs.{${e.join(",")}}`):this.url.searchParams.append(r,`cs.${JSON.stringify(e)}`),this}containedBy(r,e){return typeof e=="string"?this.url.searchParams.append(r,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(r,`cd.{${e.join(",")}}`):this.url.searchParams.append(r,`cd.${JSON.stringify(e)}`),this}rangeGt(r,e){return this.url.searchParams.append(r,`sr.${e}`),this}rangeGte(r,e){return this.url.searchParams.append(r,`nxl.${e}`),this}rangeLt(r,e){return this.url.searchParams.append(r,`sl.${e}`),this}rangeLte(r,e){return this.url.searchParams.append(r,`nxr.${e}`),this}rangeAdjacent(r,e){return this.url.searchParams.append(r,`adj.${e}`),this}overlaps(r,e){return typeof e=="string"?this.url.searchParams.append(r,`ov.${e}`):this.url.searchParams.append(r,`ov.{${e.join(",")}}`),this}textSearch(r,e,{config:t,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const a=t===void 0?"":`(${t})`;return this.url.searchParams.append(r,`${i}fts${a}.${e}`),this}match(r){return Object.entries(r).filter(([e,t])=>
509t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(r,e,t){return this.url.searchParams.append(r,`not.${e}.${t}`),this}or(r,{foreignTable:e,referencedTable:t=e}={}){const s=t?`${t}.or`:"or";return this.url.searchParams.append(s,`(${r})`),this}filter(r,e,t){return this.url.searchParams.append(r,`${e}.${t}`),this}},cW=class{constructor(r,{headers:e={},schema:t,fetch:s,urlLengthLimit:i=8e3,retry:a}){this.url=r,this.headers=new Headers(e),this.schema=t,this.fetch=s,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(r,e){const{head:t=!1,count:s}=e??{},i=t?"HEAD":"GET";let a=!1;const o=(r??"*").split("").map(f=>/\s/.test(f)&&!a?"":(f==='"'&&(a=!a),f)).join(""),{url:c,headers:h}=this.cloneRequestState();return c.searchParams.set("select",o),s&&h.append("Prefer",`count=${s}`),new ah({method:i,url:c,headers:h,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(r,{count:e,defaultToNull:t=!0}={}){var s;const i="POST",{url:a,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),t||o.append("Prefer","missing=default"),Array.isArray(r)){const c=r.reduce((h,f)=>h.concat(Object.keys(f)),[]);if(c.length>0){const h=[...new Set(c)].map(f=>`"${f}"`);a.searchParams.set("columns",h.join(","))}}return new ah({method:i,url:a,headers:o,schema:this.schema,body:r,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(r,{onConflict:e,ignoreDuplicates:t=!1,count:s,defaultToNull:i=!0}={}){var a;const o="POST",{url:c,headers:h}=this.cloneRequestState();if(h.append("Prefer",`resolution=${t?"ignore":"merge"}-duplicates`),e!==void 0&&c.searchParams.set("on_conflict",e),s&&h.append("Prefer",`count=${s}`),i||h.append("Prefer","missing=default"),Array.isArray(r)){const f=r.reduce((m,g)=>m.concat(Object.keys(g)),[]);if(f.length>0){const m=[...new Set(f)].map(g=>`"${g}"`);c.searchParams.set("columns",m.join(","))}}return new ah({method:o,url:c,headers:h,schema:this.schema,body:r,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(r,{count:e}={}){var t;const s="PATCH",{url:i,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new ah({method:s,url:i,headers:a,schema:this.schema,body:r,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:r}={}){var e;const t="DELETE",{url:s,headers:i}=this.cloneRequestState();return r&&i.append("Prefer",`count=${r}`),new ah({method:t,url:s,headers:i,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Yp(r){"@babel/helpers - typeof";return Yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yp(r)}function dW(r,e){if(Yp(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var s=t.call(r,e);if(Yp(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function uW(r){var e=dW(r,"string");return Yp(e)=="symbol"?e:e+""}function hW(r,e,t){return(e=uW(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function l3(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,s)}return t}function _y(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?l3(Object(t),!0).forEach(function(s){hW(r,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):l3(Object(t)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(t,s))})}return r}var fW=class RM{constructor(e,{headers:t={},schema:s,fetch:i,timeout:a,urlLengthLimit:o=8e3,retry:c}={}){this.url=e,this.headers=new Headers(t),this.schemaName=s,this.urlLengthLimit=o;const h=i??globalThis.fetch;a!==void 0&&a>0?this.fetch=(f,m)=>{const g=new AbortController,x=setTimeout(()=>g.abort(),a),y=m==null?void 0:m.signal;if(y){if(y.aborted)return clearTimeout(x),h(f,m);const v=()=>{clearTimeout(x),g.abort()};return y.addEventListener("abort",v,{once:!0}),h(f,_y(_y({},m),{},{signal:g.signal})).finally(()=>{clearTimeout(x),y.removeEventListener("abort",v)})}return h(f,_y(_y({},m),{},{signal:g.signal})).finally(()=>clearTimeout(x))}:this.fetch=h,this.retry=c}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new cW(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new RM(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,t={},{head:s=!1,get:i=!1,count:a}={}){var o;let c;const h=new URL(`${this.url}/rpc/${e}`);let f;const m=y=>y!==null&&typeof y=="object"&&(!Array.isArray(y)||y.some(m)),g=s&&Object.values(t).some(m);g?(c="POST",f=t):s||i?(c=s?"HEAD":"GET",Object.entries(t).filter(([y,v])=>v!==void 0).map(([y,v])=>[y,Array.isArray(v)?`{${v.join(",")}}`:`${v}
509`]).forEach(([y,v])=>{h.searchParams.append(y,v)})):(c="POST",f=t);const x=new Headers(this.headers);return g?x.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&x.set("Prefer",`count=${a}`),new ah({method:c,url:h,headers:x,schema:this.schemaName,body:f,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class mW{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const t=globalThis.process;
509if(t){const s=t.versions;if(s&&s.node){const i=s.node,a=parseInt(i.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 510import ws from "ws" 511new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let t=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(t+=` 512 513Suggested solution: ${e.workaround}`),new Error(t)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const pW="2.105.1",gW=`realtime-js/${pW}`,xW="1.0.0",MM="2.0.0",yW=MM,bW=1e4,vW=100,al={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},IM={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},JN={connecting:"connecting",closing:"closing",closed:"closed"};class wW{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return t(this._binaryEncodeUserBroadcastPush(e));let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(e){var t;return this._isArrayBuffer((t=e.payload)===null||t===void 0?void 0:t.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var t,s;const i=(s=(t=e.payload)===null||t===void 0?void 0:t.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(e){var t,s;const i=(s=(t=e.payload)===null||t===void 0?void 0:t.payload)!==null&&s!==void 0?s:{},o=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,t,s){var i,a;const o=e.topic,c=(i=e.ref)!==null&&i!==void 0?i:"",h=(a=e.join_ref)!==null&&a!==void 0?a:"",f=e.payload.event,m=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},g=Object.keys(m).length===0?"":JSON.stringify(m);if(h.length>255)throw new Error(`joinRef length ${h.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`ref length ${c.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`userEvent length ${f.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`metadata length ${g.length} exceeds maximum of 255`);const x=this.USER_BROADCAST_PUSH_META_LENGTH+h.length+c.length+o.length+f.length+g.length,y=new ArrayBuffer(this.HEADER_LENGTH+x);let v=new DataView(y),j=0;v.setUint8(j++,this.KINDS.userBroadcastPush),v.setUint8(j++,h.length),v.setUint8(j++,c.length),v.setUint8(j++,o.length),v.setUint8(j++,f.length),v.setUint8(j++,g.length),v.setUint8(j++,t),Array.from(h,S=>v.setUint8(j++,S.charCodeAt(0))),Array.from(c,S=>v.setUint8(j++,S.charCodeAt(0))),Array.from(o,S=>v.setUint8(j++,S.charCodeAt(0))),Array.from(f,S=>v.setUint8(j++,S.charCodeAt(0))),Array.from(g,S=>v.setUint8(j++,S.charCodeAt(0)));var N=new Uint8Array(y.byteLength+s.byteLength);return N.set(new Uint8Array(y),0),N.set(new Uint8Array(s),y.byteLength),N.buffer}decode(e,t){if(this._isArrayBuffer(e)){let s=this._binaryDecode(e);return t(s)}if(typeof e=="string"){const s=JSON.parse(e),[i,a,o,c,h]=s;return t({join_ref:i,ref:a,topic:o,event:c,payload:h})}return t({})}_binaryDecode(e){const t=new DataView(e),s=t.getUint8(0),i=new TextDecoder;switch(s){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,i)}}
vendor: 10,624 bytes, line 513
513_decodeUserBroadcast(e,t,s){const i=t.getUint8(1),a=t.getUint8(2),o=t.getUint8(3),c=t.getUint8(4);let h=this.HEADER_LENGTH+4;const f=s.decode(e.slice(h,h+i));h=h+i;const m=s.decode(e.slice(h,h+a));h=h+a;const g=s.decode(e.slice(h,h+o));h=h+o;const x=e.slice(h,e.byteLength),y=c===this.JSON_ENCODING?JSON.parse(s.decode(x)):x,v={type:this.BROADCAST_EVENT,event:m,payload:y};return o>0&&(v.meta=JSON.parse(g)),{join_ref:null,ref:null,topic:f,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(e){var t;return e instanceof ArrayBuffer||((t=e==null?void 0:e.constructor)===null||t===void 0?void 0:t.name)==="ArrayBuffer"}_pick(e,t){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([s])=>t.includes(s)))}}var bt;(function(r){r.abstime="abstime",r.bool="bool",r.date="date",r.daterange="daterange",r.float4="float4",r.float8="float8",r.int2="int2",r.int4="int4",r.int4range="int4range",r.int8="int8",r.int8range="int8range",r.json="json",r.jsonb="jsonb",r.money="money",r.numeric="numeric",r.oid="oid",r.reltime="reltime",r.text="text",r.time="time",r.timestamp="timestamp",r.timestamptz="timestamptz",r.timetz="timetz",r.tsrange="tsrange",r.tstzrange="tstzrange"})(bt||(bt={}));const c3=(r,e,t={})=>{var s;const i=(s=t.skipTypes)!==null&&s!==void 0?s:[];return e?Object.keys(e).reduce((a,o)=>(a[o]=jW(o,r,e,i),a),{}):{}},jW=(r,e,t,s)=>{const i=e.find(c=>c.name===r),a=i==null?void 0:i.type,o=t[r];return a&&!s.includes(a)?LM(a,o):QN(o)},LM=(r,e)=>{if(r.charAt(0)==="_"){const t=r.slice(1,r.length);return AW(e,t)}switch(r){case bt.bool:return NW(e);case bt.float4:case bt.float8:case bt.int2:case bt.int4:case bt.int8:case bt.numeric:case bt.oid:return kW(e);case bt.json:case bt.jsonb:return SW(e);case bt.timestamp:return _W(e);case bt.abstime:case bt.date:case bt.daterange:case bt.int4range:case bt.int8range:case bt.money:case bt.reltime:case bt.text:case bt.time:case bt.timestamptz:case bt.timetz:case bt.tsrange:case bt.tstzrange:return QN(e);default:return QN(e)}},QN=r=>r,NW=r=>{switch(r){case"t":return!0;case"f":return!1;default:return r}},kW=r=>{if(typeof r=="string"){const e=parseFloat(r);if(!Number.isNaN(e))return e}return r},SW=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch{return r}return r},AW=(r,e)=>{if(typeof r!="string")return r;const t=r.length-1,s=r[t];if(r[0]==="{"&&s==="}"){let a;const o=r.slice(1,t);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(c=>LM(e,c))}return r},_W=r=>typeof r=="string"?r.replace(" ","T"):r,DM=r=>{const e=new URL(r);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Mp=r=>typeof r=="function"?r:function(){return r},EW=typeof self<"u"?self:null,oh=typeof window<"u"?window:null,Wi=EW||oh||globalThis,CW="2.0.0",TW=1e4,PW=1e3,pa={connecting:0,open:1,closing:2,closed:3},Tn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Da={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ZN={longpoll:"longpoll",websocket:"websocket"},RW={complete:4},ek="base64url.bearer.phx.",Ey=class{constructor(r,e,t,s){this.channel=r,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(r){this.timeout=r,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(r,e){return this.hasReceived(r)&&e(this.receivedResp.response),this.recHooks.push({status:r,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:r,response:e,_ref:t}){this.recHooks.filter(s=>s.status===r).forEach(s=>s.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,r=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=r,this.matchReceive(r)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(r){return this.receivedResp&&this.receivedResp.status===r}trigger(r,e){this.channel.trigger(this.refEvent,{status:r,response:e})}},OM=class{constructor(r,e){this.callback=r,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},MW=class{constructor(r,e,t){this.state=Tn.closed,this.topic=r,this.params=Mp(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ey(this,Da.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new OM(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Tn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=Tn.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Tn.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=Tn.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Ey(this,Da.leave,Mp({}),this.timeout).send(),this.state=Tn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Da.reply,(s,i)=>{this.trigger(this.replyEventName(i),s)})}join(r=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=r,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(r=>r.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Tn.closed,this.bindings=[]}onClose(r){this.on(Da.close,r)}onError(r){return this.on(Da.error,e=>r(e))}on(r,e){let t=this.bindingRef++;return this.bindings.push({event:r,ref:t,callback:e}),t}off(r,e){this.bindings=this.bindings.filter(t=>!(t.event===r&&(typeof e>"u"||e===t.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(r,e,t=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${r}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new Ey(this,r,function(){return e},t);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(r=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Tn.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Da.close,"leave")},t=new Ey(this,Da.leave,Mp({}),r);return t.receive("ok",()=>e()).receive("timeout",()=>e()),t.send(),this.canPush()||t.trigger("ok",{}),t}onMessage(r,e,t){return e}filterBindings(r,e,t){return!0}isMember(r,e,t,s){return this.topic!==r?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:r,event:e,payload:t,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(r=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Tn.joining,this.joinPush.resend(r))}trigger(r,e,t,s){let i=this.onMessage(r,e,t,s);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(o=>o.event===r&&this.filterBindings(o,e,t));for(let o=0;o<a.length;o++)a[o].callback(i,t,s||this.joinRef())}replyEventName(r){return`chan_reply_${r}`}isClosed(){return this.state===Tn.closed}isErrored(){return this.state===Tn.errored}isJoined(){return this.state===Tn.joined}isJoining(){return this.state===Tn.joining}isLeaving(){return this.state===Tn.leaving}},Qb=class{static request(r,e,t,s,i,a,o){if(Wi.XDomainRequest){let c=new Wi.XDomainRequest;return this.xdomainRequest(c,r,e,s,i,a,o)}else if(Wi.XMLHttpRequest){let c=new Wi.XMLHttpRequest;return this.xhrRequest(c,r,e,t,s,i,a,o)}else{if(Wi.fetch&&Wi.AbortController)return this.fetchRequest(r,e,t,s,i,a,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(r,e,t,s,i,a,o){let c={method:r,headers:t,body:s},h=null;return i&&(h=new AbortController,setTimeout(()=>h.abort(),i),c.signal=h.signal),Wi.fetch(e,c).then(f=>f.text()).then(f=>this.parseJSON(f)).then(f=>o&&o(f)).catch(f=>{f.name==="AbortError"&&a?a():o&&o(null)}),h}static xdomainRequest(r,e,t,s,i,a,o){return r.timeout=i,r.open(e,t),r.onload=()=>{let c=this.parseJSON(r.responseText);o&&o(c)},a&&(r.ontimeout=a),r.onprogress=()=>{},r.send(s),r}static xhrRequest(r,e,t,s,i,a,o,c){r.open(e,t,!0),r.timeout=a;for(let[h,f]of Object.entries(s))r.setRequestHeader(h,f);return r.onerror=()=>c&&c(null),r.onreadystatechange=()=>{if(r.readyState===RW.complete&&c){let h=this.parseJSON(r.responseText);c(h)}},o&&(r.ontimeout=o),r.send(i),r}static parseJSON(r){if(!r||r==="")return null;try{return JSON.parse(r)}catch{return console&&console.log("failed to parse JSON response",r),null}}static serialize(r,e){let t=[];for(var s in r){if(!Object.prototype.hasOwnProperty.call(r,s))continue;let i=e?`${e}[${s}]`:s,a=r[s];typeof a=="object"?t.push(this.serialize(a,i)):t.push(encodeURIComponent(i)+"="+encodeURIComponent(a))}return t.join("&")}static appendParams(r,e){if(Object.keys(e).length===0)return r;let t=r.match(/\?/)?"&":"?";return`${r}${t}${this.serialize(e)}`}},IW=r=>
vendor: 14,539 bytes, lines 513-514
513{let e="",t=new Uint8Array(r),s=t.byteLength;for(let i=0;i<s;i++)e+=String.fromCharCode(t[i]);return btoa(e)},Wu=class{constructor(r,e){e&&e.length===2&&e[1].startsWith(ek)&&(this.authToken=atob(e[1].slice(ek.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(r),this.readyState=pa.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(r){return r.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+ZN.websocket),"$1/"+ZN.longpoll)}endpointURL(){return Qb.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(r,e,t){this.close(r,e,t),this.readyState=pa.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===pa.open||this.readyState===pa.connecting}poll(){const r={Accept:"application/json"};this.authToken&&(r["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",r,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:s,messages:i}=e;if(t===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else t=0;switch(t){case 200:i.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=pa.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}})}send(r){typeof r!="string"&&(r=IW(r)),this.currentBatch?this.currentBatch.push(r):this.awaitingBatchAck?this.batchBuffer.push(r):(this.currentBatch=[r],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(r){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(` 514`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(r,e,t){for(let i of this.reqs)i.abort();this.readyState=pa.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:r,reason:e,wasClean:t});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(r,e,t,s,i){let a,o=()=>{this.reqs.delete(a),s()};a=Qb.request(r,this.endpointURL(),e,t,this.timeout,o,c=>{this.reqs.delete(a),this.isActive()&&i(c)}),this.reqs.add(a)}},LW=class Np{constructor(e,t={}){let s=t.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,i=>{let{onJoin:a,onLeave:o,onSync:c}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Np.syncState(this.state,i,a,o),this.pendingDiffs.forEach(h=>{this.state=Np.syncDiff(this.state,h,a,o)}),this.pendingDiffs=[],c()}),this.channel.on(s.diff,i=>{let{onJoin:a,onLeave:o,onSync:c}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Np.syncDiff(this.state,i,a,o),c())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Np.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,s,i){let a=this.clone(e),o={},c={};return this.map(a,(h,f)=>{t[h]||(c[h]=f)}),this.map(t,(h,f)=>{let m=a[h];if(m){let g=f.metas.map(j=>j.phx_ref),x=m.metas.map(j=>j.phx_ref),y=f.metas.filter(j=>x.indexOf(j.phx_ref)<0),v=m.metas.filter(j=>g.indexOf(j.phx_ref)<0);y.length>0&&(o[h]=f,o[h].metas=y),v.length>0&&(c[h]=this.clone(m),c[h].metas=v)}else o[h]=f}),this.syncDiff(a,{joins:o,leaves:c},s,i)}static syncDiff(e,t,s,i){let{joins:a,leaves:o}=this.clone(t);return s||(s=function(){}),i||(i=function(){}),this.map(a,(c,h)=>{let f=e[c];if(e[c]=this.clone(h),f){let m=e[c].metas.map(x=>x.phx_ref),g=f.metas.filter(x=>m.indexOf(x.phx_ref)<0);e[c].metas.unshift(...g)}s(c,f,h)}),this.map(o,(c,h)=>{let f=e[c];if(!f)return;let m=h.metas.map(g=>g.phx_ref);f.metas=f.metas.filter(g=>m.indexOf(g.phx_ref)<0),i(c,f,h),f.metas.length===0&&delete e[c]}),e}static list(e,t){return t||(t=function(s,i){return i}),this.map(e,(s,i)=>t(s,i))}static map(e,t){return Object.getOwnPropertyNames(e).map(s=>t(s,e[s]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Cy={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(r,e){if(r.payload.constructor===ArrayBuffer)return e(this.binaryEncode(r));{let t=[r.join_ref,r.ref,r.topic,r.event,r.payload];return e(JSON.stringify(t))}},decode(r,e){if(r.constructor===ArrayBuffer)return e(this.binaryDecode(r));{let[t,s,i,a,o]=JSON.parse(r);return e({join_ref:t,ref:s,topic:i,event:a,payload:o})}},binaryEncode(r){let{join_ref:e,ref:t,event:s,topic:i,payload:a}=r,o=this.META_LENGTH+e.length+t.length+i.length+s.length,c=new ArrayBuffer(this.HEADER_LENGTH+o),h=new DataView(c),f=0;h.setUint8(f++,this.KINDS.push),h.setUint8(f++,e.length),h.setUint8(f++,t.length),h.setUint8(f++,i.length),h.setUint8(f++,s.length),Array.from(e,g=>h.setUint8(f++,g.charCodeAt(0))),Array.from(t,g=>h.setUint8(f++,g.charCodeAt(0))),Array.from(i,g=>h.setUint8(f++,g.charCodeAt(0))),Array.from(s,g=>h.setUint8(f++,g.charCodeAt(0)));var m=new Uint8Array(c.byteLength+a.byteLength);return m.set(new Uint8Array(c),0),m.set(new Uint8Array(a),c.byteLength),m.buffer},binaryDecode(r){let e=new DataView(r),t=e.getUint8(0),s=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(r,e,s);case this.KINDS.reply:return this.decodeReply(r,e,s);case this.KINDS.broadcast:return this.decodeBroadcast(r,e,s)}},decodePush(r,e,t){let s=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,c=t.decode(r.slice(o,o+s));o=o+s;let h=t.decode(r.slice(o,o+i));o=o+i;let f=t.decode(r.slice(o,o+a));o=o+a;let m=r.slice(o,r.byteLength);return{join_ref:c,ref:null,topic:h,event:f,payload:m}},decodeReply(r,e,t){let s=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),o=e.getUint8(4),c=this.HEADER_LENGTH+this.META_LENGTH,h=t.decode(r.slice(c,c+s));c=c+s;let f=t.decode(r.slice(c,c+i));c=c+i;let m=t.decode(r.slice(c,c+a));c=c+a;let g=t.decode(r.slice(c,c+o));c=c+o;let x=r.slice(c,r.byteLength),y={status:g,response:x};return{join_ref:h,ref:f,topic:m,event:Da.reply,payload:y}},decodeBroadcast(r,e,t){let s=e.getUint8(1),i=e.getUint8(2),a=this.HEADER_LENGTH+2,o=t.decode(r.slice(a,a+s));a=a+s;let c=t.decode(r.slice(a,a+i));a=a+i;let h=r.slice(a,r.byteLength);return{join_ref:null,ref:null,topic:o,event:c,payload:h}}},DW=class{constructor(r,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||TW,this.transport=e.transport||Wi.WebSocket||Wu,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||Wi&&Wi.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Cy.encode.bind(Cy),this.defaultDecoder=Cy.decode.bind(Cy),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Wu?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;oh&&oh.addEventListener&&(oh.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),t=this.connectClock)}),oh.addEventListener("pageshow",s=>{t===this.connectClock&&(t=null,this.connect())}),oh.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,i,a)=>{console.log(`${s}: ${i}`,a)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Mp(e.params||{}),this.endPoint=`${r}/${ZN.websocket}`,this.vsn=e.vsn||CW,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new OM(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Wu}replaceTransport(r){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=r}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let r=Qb.appendParams(Qb.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return r.charAt(0)!=="/"?r:r.charAt(1)==="/"?`${this.protocol()}:${r}`:`${this.protocol()}://${location.host}${r}`}disconnect(r,e,t){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,r&&r()},e,t)}connect(r){r&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Mp(r)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Wu?this.connectWithFallback(Wu,this.longPollFallbackMs):this.transportConnect())}log(r,e,t){this.logger&&this.logger(r,e,t)}hasLogger(){return this.logger!==null}onOpen(r){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,r]),e}onClose(r){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,r]),e}onError(r){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,r]),e}onMessage(r){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,r]),e}onHeartbeat(r){this.heartbeatCallback=r}ping(r){if(!this.isConnected())return!1;let e=this.makeRef(),t=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let s=this.onMessage(i=>{i.ref===e&&(this.off([s]),r(Date.now()-t))});return!0}transportName(r){switch(r){case Wu:return"LongPoll";default:return r.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let r;this.authToken&&(r=["phoenix",`${ek}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),r),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(r){return this.sessionStore&&this.sessionStore.getItem(r)}storeSession(r,e){this.sessionStore&&this.sessionStore.setItem(r,e)}connectWithFallback(r,e=2500){clearTimeout(this.fallbackTimer);let t=!1,s=!0,i,a,o=this.transportName(r),c=h=>{this.log("transport",`falling back to ${o}...`,h),this.off([i,a]),s=!1,this.replaceTransport(r),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return c("memorized");this.fallbackTimer=setTimeout(c,e),a=this.onError(h=>{this.log("transport","error",h),s&&!t&&(clearTimeout(this.fallbackTimer),c(h))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(t=!0,!s){let h=this.transportName(r);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${h}`,"true"),this.log("transport",`established ${h} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(c,e),this.ping(h=>{this.log("transport","connected to primary after",h),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),PW,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(r,e,t){if(!this.conn)return r&&r();const s=this.conn;this.waitForBufferDone(s,()=>{e?s.close(e,t||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),r&&r()})})}waitForBufferDone(r,e,t=1){if(t===5||!r.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(r,e,t+1)},150*t)}waitForSocketClosed(r,e,t=1){if(t===5||r.readyState===pa.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(r,e,t+1)},150*t)}onConnClose(r){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",r),this.triggerChanError(r),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",r)}onConnError(r){this.hasLogger()&&this.log("transport","error",r);let e=this.transport,t=this.establishedConnections;this.triggerStateCallbacks("error",r,e,t),(e===this.transport||t>0)&&this.triggerChanError(r)}
514triggerChanError(r){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Da.error,r)})}connectionState(){switch(this.conn&&this.conn.readyState){case pa.connecting:return"connecting";case pa.open:return"open";case pa.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(r){this.off(r.stateChangeRefs),this.channels=this.channels.filter(e=>e!==r)}off(r){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([t])=>r.indexOf(t)===-1)}channel(r,e={}){let t=new MW(r,e,this);return this.channels.push(t),t}push(r){if(this.hasLogger()){let{topic:e,event:t,payload:s,ref:i,join_ref:a}=r;this.log("push",`${e} ${t} (${a}, ${i})`,s)}this.isConnected()?this.encode(r,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(r,e=>this.conn.send(e)))}makeRef(){let r=this.ref+1;return r===this.ref?this.ref=0:this.ref=r,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(r=>r()),this.sendBuffer=[])}onConnMessage(r){this.decode(r.data,e=>{let{topic:t,event:s,payload:i,ref:a,join_ref:o}=e;if(a&&a===this.pendingHeartbeatRef){const c=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",c)}catch(h){this.log("error","error in heartbeat callback",h)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${t} ${s} ${a&&"("+a+")"||""}`.trim(),i);for(let c=0;c<this.channels.length;c++){const h=this.channels[c];h.isMember(t,s,i,o)&&h.trigger(s,i,a,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(r,...e){try{this.stateChangeCallbacks[r].forEach(([t,s])=>{try{s(...e)}catch(i){this.log("error",`error in ${r} callback`,i)}})}catch(t){this.log("error",`error triggering ${r} callbacks`,t)}}leaveOpenTopic(r){let e=this.channels.find(t=>t.topic===r&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${r}"`),e.leave())}};class Ip{constructor(e,t){const s=FW(t);this.presence=new LW(e.getChannel(),s),this.presence.onJoin((i,a,o)=>{const c=Ip.onJoinPayload(i,a,o);e.getChannel().trigger("presence",c)}),this.presence.onLeave((i,a,o)=>{const c=Ip.onLeavePayload(i,a,o);e.getChannel().trigger("presence",c)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Ip.transformState(this.presence.state)}static transformState(e){return e=OW(e),Object.getOwnPropertyNames(e).reduce((t,s)=>{const i=e[s];return t[s]=Eb(i),t},{})}static onJoinPayload(e,t,s){const i=d3(t),a=Eb(s);return{event:"join",key:e,currentPresences:i,newPresences:a}}static onLeavePayload(e,t,s){const i=d3(t),a=Eb(s);return{event:"leave",key:e,currentPresences:i,leftPresences:a}}}function Eb(r){return r.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function OW(r){return JSON.parse(JSON.stringify(r))}function FW(r){return(r==null?void 0:r.events)&&{events:r.events}}function d3(r){return r!=null&&r.metas?Eb(r):[]}var u3;(function(r){r.SYNC="sync",r.JOIN="join",r.LEAVE="leave"})(u3||(u3={}));class BW{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new Ip(this.channel.channelAdapter,t)}}function $W(r){if(r instanceof Error)return r;if(typeof r=="string")return new Error(r);if(r&&typeof r=="object"){const e=r;
514if(typeof e.code=="number"){const t=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${t}`,{cause:r})}return new Error("channel error: transport failure",{cause:r})}return new Error("channel error: connection lost")}class UW{constructor(e,t,s){const i=HW(s);this.channel=e.getSocket().channel(t,i),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,t,s){let i;try{i=this.channel.push(e,t,s)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>vW){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload())}return i}updateJoinPayload(e){const t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===al.joined}isJoined(){return this.state===al.joined}isJoining(){return this.state===al.joining}isClosed(){return this.state===al.closed}isLeaving(){return this.state===al.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function HW(r){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config)}}var h3;(function(r){r.ALL="*",r.INSERT="INSERT",r.UPDATE="UPDATE",r.DELETE="DELETE"})(h3||(h3={}));var mh;(function(r){r.BROADCAST="broadcast",r.PRESENCE="presence",r.POSTGRES_CHANGES="postgres_changes",r.SYSTEM="system"})(mh||(mh={}));var Oa;(function(r){r.SUBSCRIBED="SUBSCRIBED",r.TIMED_OUT="TIMED_OUT",r.CLOSED="CLOSED",r.CHANNEL_ERROR="CHANNEL_ERROR"})(Oa||(Oa={}));class Lp{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,t={config:{}},s){var i,a;if(this.topic=e,this.params=t,this.socket=s,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config),this.channelAdapter=new UW(this.socket.socketAdapter,e,this.params),this.presence=new BW(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=DM(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,t=this.timeout){var s,i,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:c,private:h}}=this.params,f=(i=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(y=>y.filter))!==null&&i!==void 0?i:[],m=!!this.bindings[mh.PRESENCE]&&this.bindings[mh.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,g={},x={broadcast:o,presence:Object.assign(Object.assign({},c),{enabled:m}),postgres_changes:f,private:h};this.socket.accessTokenValue&&(g.access_token=this.socket.accessTokenValue),this._onError(y=>{e==null||e(Oa.CHANNEL_ERROR,$W(y))}),this._onClose(()=>e==null?void 0:e(Oa.CLOSED)),this.updateJoinPayload(Object.assign({config:x},g)),this._updateFilterMessage(),this.channelAdapter.subscribe(t).receive("ok",async({postgres_changes:y})=>{if(this.socket._isManualToken()||this.socket.setAuth(),y===void 0){e==null||e(Oa.SUBSCRIBED);return}this._updatePostgresBindings(y,e)}).receive("error",y=>{this.state=al.errored;const v=Object.values(y).join(", ")||"error";e==null||e(Oa.CHANNEL_ERROR,new Error(v,{cause:y}))}).receive("timeout",()=>{e==null||e(Oa.TIMED_OUT)})}return this}_updatePostgresBindings(e,t){var s;const i=this.bindings.postgres_changes,a=(s=i==null?void 0:i.length)!==null&&s!==void 0?s:0,o=[];for(let c=0;c<a;c++){const h=i[c],{filter:{event:f,schema:m,table:g,filter:x}}=h,y=e&&e[c];if(y&&y.event===f&&Lp.isFilterValueEqual(y.schema,m)&&Lp.isFilterValueEqual(y.table,g)&&Lp.isFilterValueEqual(y.filter,x))o.push(Object.assign(Object.assign({},h),{id:y.id}));else{this.unsubscribe(),this.state=al.errored,t==null||t(Oa.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=al.errored&&t&&t(Oa.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,s){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=e===mh.PRESENCE||e===mh.POSTGRES_CHANGES;if(i&&a)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,s)}async httpSend(e,t,s={}){var i;if(t==null)return Promise.reject(new Error("Payload is required for httpSend()"));const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:t,private:this.private}]})},c=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(i=s.timeout)!==null&&i!==void 0?i:this.timeout);if(c.status===202)return{success:!0};let h=c.statusText;
514try{const f=await c.json();h=f.error||f.message||h}catch{}return Promise.reject(new Error(h))}async send(e,t={}){var s,i;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:o}=e,c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const h={method:"POST",headers:c,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const f=await this._fetchWithTimeout(this.broadcastEndpointURL,h,(s=t.timeout)!==null&&s!==void 0?s:this.timeout);return await((i=f.body)===null||i===void 0?void 0:i.cancel()),f.ok?"ok":"error"}catch(f){return f.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,c,h;const f=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);e.type==="broadcast"&&!(!((h=(c=(o=this.params)===null||o===void 0?void 0:o.config)===null||c===void 0?void 0:c.broadcast)===null||h===void 0)&&h.ack)&&a("ok"),f.receive("ok",()=>a("ok")),f.receive("error",()=>a("error")),f.receive("timeout",()=>a("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>t("ok")).receive("timeout",()=>t("timed out")).receive("error",()=>t("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,s){const i=new AbortController,a=setTimeout(()=>i.abort(),s),o=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:i.signal}));return clearTimeout(a),o}_on(e,t,s){const i=e.toLocaleLowerCase(),a=this.channelAdapter.on(e,s),o={type:i,filter:t,callback:s,ref:a};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,t,s)=>{var i,a,o,c,h,f,m;const g=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(g,s))return!1;const x=(i=this.bindings[g])===null||i===void 0?void 0:i.find(y=>y.ref===e.ref);if(!x)return!0;if(["broadcast","presence","postgres_changes"].includes(g))if("id"in x){const y=x.id,v=(a=x.filter)===null||a===void 0?void 0:a.event;return y&&((o=t.ids)===null||o===void 0?void 0:o.includes(y))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((c=t.data)===null||c===void 0?void 0:c.type.toLocaleLowerCase()))}else{const y=(f=(h=x==null?void 0:x.filter)===null||h===void 0?void 0:h.event)===null||f===void 0?void 0:f.toLocaleLowerCase();return y==="*"||y===((m=t==null?void 0:t.event)===null||m===void 0?void 0:m.toLocaleLowerCase())}else return x.type.toLocaleLowerCase()===g})}_notThisChannelEvent(e,t){const{close:s,error:i,leave:a,join:o}=IM;return t&&[s,i,a,o].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,s)=>{if(typeof t=="object"&&"ids"in t){const i=t.data,{schema:a,table:o,commit_timestamp:c,type:h,errors:f}=i;return Object.assign(Object.assign({},{schema:a,table:o,commit_timestamp:c,eventType:h,new:{},old:{},errors:f}),this._getPayloadRecords(i))}return t})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const t in e.bindings)for(const s of e.bindings[t])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}_getPayloadRecords(e){const t={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(t.new=c3(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(t.old=c3(e.columns,e.old_record)),t}}class zW{constructor(e,t){this.socket=new DW(e,t)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,t,s,i=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),i),this.socket.disconnect(()=>{e(),a("ok")},t,s)})}push(e){this.socket.push(e)}
514log(e,t,s){this.socket.log(e,t,s)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==JN.connecting}isDisconnecting(){return this.socket.connectionState()==JN.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const f3={HEARTBEAT_INTERVAL:25e3},VW=[1e3,2e3,5e3,1e4],WW=1e4,GW=` 515 addEventListener("message", (e) => { 516 if (e.data.event === "start") { 517 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 518 } 519 });`;class qW{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,t){var s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new wW,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=a=>a?(...o)=>a(...o):(...o)=>fetch(...o),!(!((s=t==null?void 0:t.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=t.params.apikey;const i=this._initializeOptions(t);this.socketAdapter=new zW(e,i),this.httpEndpoint=DM(e),this.fetch=this._resolveFetch(t==null?void 0:t.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const t=e.message;throw t.includes("Node.js")?new Error(`${t} 520 521To use Realtime in Node.js, you need to provide a WebSocket implementation: 522 523Option 1: Use Node.js 22+ which has native WebSocket support 524Option 2: Install and provide the "ws" package: 525 526 npm install ws 527 528 import ws from "ws" 529 const client = new RealtimeClient(url, { 530 ...options, 531 transport: ws 532 })`):new Error(`WebSocket not available: ${t}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return t==="ok"&&e.teardown(),t}async removeAllChannels(){const e=this.channels.map(async s=>{const i=await s.unsubscribe();return s.teardown(),i}),t=await Promise.all(e);return await this.disconnect(),t}
532log(e,t,s){this.socketAdapter.log(e,t,s)}connectionState(){return this.socketAdapter.connectionState()||JN.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){const s=`realtime:${e}`,i=this.getChannels().find(a=>a.topic===s);if(i)return i;{const a=new Lp(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(a),a}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
532this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let t,s=!1;if(e)t=e,s=!0;else if(this.accessToken)try{t=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),t=this.accessTokenValue}else t=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(i=>{const a={access_token:t,version:gW};t&&i.updateJoinPayload(a),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(IM.access_token,{access_token:t})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(t=>{this.log("error",`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(t=>{this.log("error","error waiting for auth on connect",t)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(t,s)=>{t=="sent"&&this._setAuthSafely(),e&&e(t,s)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=t=>{this.log("worker","worker error",t.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=t=>{t.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{const s=new Blob([GW],{type:"application/javascript"});t=URL.createObjectURL(s)}return t}_initializeOptions(e){var t,s,i,a,o,c,h,f,m,g,x;this.worker=(t=e==null?void 0:e.worker)!==null&&t!==void 0?t:!1,this.accessToken=(s=e==null?void 0:e.accessToken)!==null&&s!==void 0?s:null;const y={};y.timeout=(i=e==null?void 0:e.timeout)!==null&&i!==void 0?i:bW,y.heartbeatIntervalMs=(a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:f3.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((c=e==null?void 0:e.heartbeatIntervalMs)!==null&&c!==void 0?c:f3.HEARTBEAT_INTERVAL),y.transport=(h=e==null?void 0:e.transport)!==null&&h!==void 0?h:mW.getWebSocketConstructor(),y.params=e==null?void 0:e.params,y.logger=e==null?void 0:e.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),y.reconnectAfterMs=(f=e==null?void 0:e.reconnectAfterMs)!==null&&f!==void 0?f:(S=>VW[S-1]||WW);let v,j;const N=(m=e==null?void 0:e.vsn)!==null&&m!==void 0?m:yW;switch(N){case xW:v=(S,A)=>A(JSON.stringify(S)),j=(S,A)=>A(JSON.parse(S));break;case MM:v=this.serializer.encode.bind(this.serializer),j=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=N,y.encode=(g=e==null?void 0:e.encode)!==null&&g!==void 0?g:v,y.decode=(x=e==null?void 0:e.decode)!==null&&x!==void 0?x:j,y.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,y.params=Object.assign(Object.assign({},y.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
532var Jp=class extends Error{constructor(r,e){var t;super(r),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((t=e.icebergType)==null?void 0:t.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function KW(r,e,t){const s=new URL(e,r);if(t)for(const[i,a]of Object.entries(t))a!==void 0&&s.searchParams.set(i,a);return s.toString()}async function XW(r){return!r||r.type==="none"?{}:r.type==="bearer"?{Authorization:`Bearer ${r.token}`}:r.type==="header"?{[r.name]:r.value}:r.type==="custom"?await r.getHeaders():{}}function YW(r){const e=r.fetchImpl??globalThis.fetch;return{async request({method:t,path:s,query:i,body:a,headers:o}){const c=KW(r.baseUrl,s,i),h=await XW(r.auth),f=await e(c,{method:t,headers:{...a?{"Content-Type":"application/json"}:{},...h,...o},body:a?JSON.stringify(a):void 0}),m=await f.text(),g=(f.headers.get("content-type")||"").includes("application/json"),x=g&&m?JSON.parse(m):m;if(!f.ok){const y=g?x:void 0,v=y==null?void 0:y.error;throw new Jp((v==null?void 0:v.message)??`Request failed with status ${f.status}`,{status:f.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:y})}return{status:f.status,headers:f.headers,data:x}}}}function Ty(r){return r.join("�")}var JW=class{constructor(r,e=""){this.client=r,this.prefix=e}async listNamespaces(r){const e=r?{parent:Ty(r.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(r,e){const t={namespace:r.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:t})).data}async dropNamespace(r){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ty(r.namespace)}`})}async loadNamespaceMetadata(r){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ty(r.namespace)}`})).data.properties}}async namespaceExists(r){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ty(r.namespace)}`}),!0}catch(e){if(e instanceof Jp&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(r,e){try{return await this.createNamespace(r,e)}catch(t){if(t instanceof Jp&&t.status===409)return;throw t}}};function Gu(r){return r.join("�")}var QW=class{constructor(r,e="",t){this.client=r,this.prefix=e,this.accessDelegation=t}async listTables(r){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Gu(r.namespace)}/tables`})).data.identifiers}async createTable(r,e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Gu(r.namespace)}/tables`,body:e,headers:t})).data.metadata}async updateTable(r,e){const t=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Gu(r.namespace)}/tables/${r.name}`,body:e});return{"metadata-location":t.data["metadata-location"],metadata:t.data.metadata}}async dropTable(r,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Gu(r.namespace)}/tables/${r.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(r){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Gu(r.namespace)}/tables/${r.name}`,headers:e})).data.metadata}async tableExists(r){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Gu(r.namespace)}/tables/${r.name}`,headers:e}),!0}catch(t){if(t instanceof Jp&&t.status===404)return!1;throw t}}async createTableIfNotExists(r,e){try{return await this.createTable(r,e)}catch(t){if(t instanceof Jp&&t.status===409)return await this.loadTable({namespace:r.namespace,name:e.name});throw t}}},ZW=class{constructor(r){var s;let e="v1";r.catalogName&&(e+=`/${r.catalogName}`);const t=r.baseUrl.endsWith("/")?r.baseUrl:`${r.baseUrl}/`;this.client=YW({baseUrl:t,auth:r.auth,fetchImpl:r.fetch}),this.accessDelegation=(s=r.accessDelegation)==null?void 0:s.join(","),this.namespaceOps=new JW(this.client,e),this.tableOps=new QW(this.client,e,this.accessDelegation)}async listNamespaces(r){return this.namespaceOps.listNamespaces(r)}async createNamespace(r,e){return this.namespaceOps.createNamespace(r,e)}async dropNamespace(r){await this.namespaceOps.dropNamespace(r)}async loadNamespaceMetadata(r){return this.namespaceOps.loadNamespaceMetadata(r)}
532async listTables(r){return this.tableOps.listTables(r)}async createTable(r,e){return this.tableOps.createTable(r,e)}async updateTable(r,e){return this.tableOps.updateTable(r,e)}async dropTable(r,e){await this.tableOps.dropTable(r,e)}async loadTable(r){return this.tableOps.loadTable(r)}async namespaceExists(r){return this.namespaceOps.namespaceExists(r)}async tableExists(r){return this.tableOps.tableExists(r)}async createNamespaceIfNotExists(r,e){return this.namespaceOps.createNamespaceIfNotExists(r,e)}async createTableIfNotExists(r,e){return this.tableOps.createTableIfNotExists(r,e)}};function Qp(r){"@babel/helpers - typeof";return Qp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qp(r)}function eG(r,e){if(Qp(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var s=t.call(r,e);if(Qp(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function tG(r){var e=eG(r,"string");return Qp(e)=="symbol"?e:e+""}function sG(r,e,t){return(e=tG(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function m3(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,s)}return t}function Oe(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?m3(Object(t),!0).forEach(function(s){sG(r,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):m3(Object(t)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(t,s))})}return r}var nw=class extends Error{constructor(r,e="storage",t,s){super(r),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=t,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function rw(r){return typeof r=="object"&&r!==null&&"__isStorageError"in r}var tk=class extends nw{constructor(r,e,t,s="storage"){super(r,s,e,t),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=t}toJSON(){return Oe({},super.toJSON())}},FM=class extends nw{constructor(r,e,t="storage"){super(r,t),this.name=t==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Zb(r,e,t){const s=Oe({},r),i=e.toLowerCase();for(const a of Object.keys(s))a.toLowerCase()===i&&delete s[a];return s[i]=t,s}function nG(r){const e={};for(const[t,s]of Object.entries(r))e[t.toLowerCase()]=s;return e}const rG=r=>r?(...e)=>r(...e):(...e)=>fetch(...e),iG=r=>{if(typeof r!="object"||r===null)return!1;const e=Object.getPrototypeOf(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},sk=r=>{if(Array.isArray(r))return r.map(t=>sk(t));if(typeof r=="function"||r!==Object(r))return r;const e={};return Object.entries(r).forEach(([t,s])=>{const i=t.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[i]=sk(s)}),e},aG=r=>!r||typeof r!="string"||r.length===0||r.length>100||r.trim()!==r||r.includes("/")||r.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(r),p3=r=>{var e;return r.msg||r.message||r.error_description||(typeof r.error=="string"?r.error:(e=r.error)===null||e===void 0?void 0:e.message)||JSON.stringify(r)},oG=async(r,e,t,s)=>{if(r!==null&&typeof r=="object"&&typeof r.json=="function"){const i=r;let a=parseInt(i.status,10);Number.isFinite(a)||(a=500),i.json().then(o=>{const c=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";e(new tk(p3(o),a,c,s))}).catch(()=>{const o=a+"";e(new tk(i.statusText||`HTTP ${a} error`,a,o,s))})}else e(new FM(p3(r),r,s))},lG=(r,e,t,s)=>{const i={method:r,headers:(e==null?void 0:e.headers)||{}};if(r==="GET"||r==="HEAD"||!s)return Oe(Oe({},i),t);if(iG(s)){var a;const o=(e==null?void 0:e.headers)||{};let c;for(const[h,f]of Object.entries(o))h.toLowerCase()==="content-type"&&(c=f);i.headers=Zb(o,"Content-Type",(a=c)!==null&&a!==void 0?a:"application/json"),i.body=JSON.stringify(s)}else i.body=s;return e!=null&&e.duplex&&(i.duplex=e.duplex),Oe(Oe({},i),t)};async function Qm(r,e,t,s,i,a,o){return new Promise((c,h)=>{r(t,lG(e,s,i,a)).then(f=>{if(!f.ok)throw f;if(s!=null&&s.noResolveJson)return f;if(o==="vectors"){const m=f.headers.get("content-type");if(f.headers.get("content-length")==="0"||f.status===204)return{};if(!m||!m.includes("application/json"))return{}}return f.json()}).then(f=>c(f)).catch(f=>oG(f,h,s,o))})}function BM(r="storage"){return{get:async(e,t,s,i)=>Qm(e,"GET",t,s,i,void 0,r),post:async(e,t,s,i,a)=>Qm(e,"POST",t,i,a,s,r),put:async(e,t,s,i,a)=>Qm(e,"PUT",t,i,a,s,r),head:async(e,t,s,i)=>Qm(e,"HEAD",t,Oe(Oe({},s),{},{noResolveJson:!0}),i,void 0,r),remove:async(e,t,s,i,a)=>Qm(e,"DELETE",t,i,a,s,r)}}const cG=BM("storage"),{get:Zp,post:ui,put:nk,head:dG,remove:h5}=cG,xr=BM("vectors");var rm=class{constructor(r,e={},t,s="storage"){this.shouldThrowOnError=!1,this.url=r,this.headers=nG(e),this.fetch=rG(t),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(r,e){return this.headers=Zb(this.headers,r,e),this}async handleOperation(r){var e=this;try{return{data:await r(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(rw(t))return{data:null,error:t};throw t}}},uG=class{constructor(r,e){this.downloadFn=r,this.shouldThrowOnError=e}then(r,e){return this.execute().then(r,e)}async execute(){var r=this;try{return{data:(await r.downloadFn()).body,error:null}}catch(e){if(r.shouldThrowOnError)throw e;if(rw(e))return{data:null,error:e};throw e}}};let $M;$M=Symbol.toStringTag;var hG=class{constructor(r,e){this.downloadFn=r,this.shouldThrowOnError=e,this[$M]="BlobDownloadBuilder",this.promise=null}asStream(){return new uG(this.downloadFn,this.shouldThrowOnError)}then(r,e){return this.getPromise().then(r,e)}catch(r){return this.getPromise().catch(r)}finally(r){return this.getPromise().finally(r)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var r=this;try{return{data:await(await r.downloadFn()).blob(),error:null}}catch(e){if(r.shouldThrowOnError)throw e;if(rw(e))return{data:null,error:e};throw e}}};const fG={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},g3={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var mG=class extends rm{constructor(r,e={},t,s){super(r,e,s,"storage"),this.bucketId=t}async uploadOrUpdate(r,e,t,s){var i=this;return i.handleOperation(async()=>{let a;const o=Oe(Oe({},g3),s);let c=Oe(Oe({},i.headers),r==="POST"&&{"x-upsert":String(o.upsert)});const h=o.metadata;if(typeof Blob<"u"&&t instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),h&&a.append("metadata",i.encodeMetadata(h)),a.append("",t)):typeof FormData<"u"&&t instanceof FormData?(a=t,a.has("cacheControl")||a.append("cacheControl",o.cacheControl),h&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(h))):(a=t,c["cac
532he-control"]=`max-age=${o.cacheControl}`,c["content-type"]=o.contentType,h&&(c["x-metadata"]=i.toBase64(i.encodeMetadata(h))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),s!=null&&s.headers)for(const[x,y]of Object.entries(s.headers))c=Zb(c,x,y);const f=i._removeEmptyFolders(e),m=i._getFinalPath(f),g=await(r=="PUT"?nk:ui)(i.fetch,`${i.url}/object/${m}`,a,Oe({headers:c},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:f,id:g.Id,fullPath:g.Key}})}async upload(r,e,t){return this.uploadOrUpdate("POST",r,e,t)}async uploadToSignedUrl(r,e,t,s){var i=this;const a=i._removeEmptyFolders(r),o=i._getFinalPath(a),c=new URL(i.url+`/object/upload/sign/${o}`);return c.searchParams.set("token",e),i.handleOperation(async()=>{let h;const f=Oe(Oe({},g3),s);let m=Oe(Oe({},i.headers),{"x-upsert":String(f.upsert)});const g=f.metadata;if(typeof Blob<"u"&&t instanceof Blob?(h=new FormData,h.append("cacheControl",f.cacheControl),g&&h.append("metadata",i.encodeMetadata(g)),h.append("",t)):typeof FormData<"u"&&t instanceof FormData?(h=t,h.has("cacheControl")||h.append("cacheControl",f.cacheControl),g&&!h.has("metadata")&&h.append("metadata",i.encodeMetadata(g))):(h=t,m["cache-control"]=`max-age=${f.cacheControl}`,m["content-type"]=f.contentType,g&&(m["x-metadata"]=i.toBase64(i.encodeMetadata(g))),(typeof ReadableStream<"u"&&h instanceof ReadableStream||h&&typeof h=="object"&&"pipe"in h&&typeof h.pipe=="function")&&!f.duplex&&(f.duplex="half")),s!=null&&s.headers)for(const[x,y]of Object.entries(s.headers))m=Zb(m,x,y);return{path:a,fullPath:(await nk(i.fetch,c.toString(),h,Oe({headers:m},f!=null&&f.duplex?{duplex:f.duplex}:{}))).Key}})}async createSignedUploadUrl(r,e){var t=this;return t.handleOperation(async()=>{let s=t._getFinalPath(r);const i=Oe({},t.headers);e!=null&&e.upsert&&(i["x-upsert"]="true");const a=await ui(t.fetch,`${t.url}/object/upload/sign/${s}`,{},{headers:i}
532),o=new URL(t.url+a.url),c=o.searchParams.get("token");if(!c)throw new nw("No token returned by API");return{signedUrl:o.toString(),path:r,token:c}})}async update(r,e,t){return this.uploadOrUpdate("PUT",r,e,t)}async move(r,e,t){var s=this;return s.handleOperation(async()=>await ui(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:r,destinationKey:e,destinationBucket:t==null?void 0:t.destinationBucket},{headers:s.headers}))}async copy(r,e,t){var s=this;return s.handleOperation(async()=>({path:(await ui(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:r,destinationKey:e,destinationBucket:t==null?void 0:t.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(r,e,t){var s=this;return s.handleOperation(async()=>{let i=s._getFinalPath(r);const a=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0;let o=await ui(s.fetch,`${s.url}/object/sign/${i}`,Oe({expiresIn:e},a?{transform:t.transform}:{}),{headers:s.headers});const c=new URLSearchParams;t!=null&&t.download&&c.set("download",t.download===!0?"":t.download),(t==null?void 0:t.cacheNonce)!=null&&c.set("cacheNonce",String(t.cacheNonce));const h=c.toString();return{signedUrl:encodeURI(`${s.url}${o.signedURL}${h?`&${h}`:""}`)}})}async createSignedUrls(r,e,t){var s=this;return s.handleOperation(async()=>{const i=await ui(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:e,paths:r},{headers:s.headers}),a=new URLSearchParams;t!=null&&t.download&&a.set("download",t.download===!0?"":t.download),(t==null?void 0:t.cacheNonce)!=null&&a.set("cacheNonce",String(t.cacheNonce));const o=a.toString();return i.map(c=>Oe(Oe({},c),{},{signedUrl:c.signedURL?encodeURI(`${s.url}${c.signedURL}${o?`&${o}`:""}`):null}))})}download(r,e,t){const s=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(i,e.transform),(e==null?void 0:e.cacheNonce)!=null&&i.set("cacheNonce",String(e.cacheNonce));const a=i.toString(),o=this._getFinalPath(r),c=()=>Zp(this.fetch,`${this.url}/${s}/${o}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},t);return new hG(c,this.shouldThrowOnError)}async info(r){var e=this;const t=e._getFinalPath(r);return e.handleOperation(async()=>sk(await Zp(e.fetch,`${e.url}/object/info/${t}`,{headers:e.headers})))}async exists(r){var e=this;const t=e._getFinalPath(r);try{return await dG(e.fetch,`${e.url}/object/${t}`,{headers:e.headers}),{data:!0,error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(rw(i)){var s;const a=i instanceof tk?i.status:i instanceof FM?(s=i.originalError)===null||s===void 0?void 0:s.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:i}}throw i}}getPublicUrl(r,e){const t=this._getFinalPath(r),s=new URLSearchParams;e!=null&&e.download&&s.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),a=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${t}`)+(i?`?${i}`:"")}}}async remove(r){var e=this;return e.handleOperation(async()=>await h5(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:r},{headers:e.headers}))}async list(r,e,t){var s=this;return s.handleOperation(async()=>{const i=Oe(Oe(Oe({},fG),e),{},{prefix:r||""});return await ui(s.fetch,`${s.url}/object/list/${s.bucketId}`,i,{headers:s.headers},t)})}async listV2(r,e){var t=this;return t.handleOperation(async()=>{const s=Oe({},r);return await ui(t.fetch,`${t.url}/object/list-v2/${t.bucketId}`,s,{headers:t.headers},e)})}encodeMetadata(r){return JSON.stringify(r)}toBase64(r){return typeof Buffer<"u"?Buffer.from(r).toString("base64"):btoa(r)}_getFinalPath(r){return`${this.bucketId}/${r.replace(/^\/+/,"")}`}_removeEmptyFolders(r){return r.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(r,e){return e.width&&r.set("width",e.width.toString()),e.height&&r.set("height",e.height.toString()),e.resize&&r.set("resize",e.resize),e.format&&r.set("format",e.format),e.quality&&r.set("qual
532ity",e.quality.toString()),r}};const pG="2.105.1",Z0={"X-Client-Info":`storage-js/${pG}`};var gG=class extends rm{constructor(r,e={},t,s){const i=new URL(r);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const a=i.href.replace(/\/$/,""),o=Oe(Oe({},Z0),e);super(a,o,t,"storage")}async listBuckets(r){var e=this;return e.handleOperation(async()=>{const t=e.listBucketOptionsToQueryString(r);return await Zp(e.fetch,`${e.url}/bucket${t}`,{headers:e.headers})})}async getBucket(r){var e=this;return e.handleOperation(async()=>await Zp(e.fetch,`${e.url}/bucket/${r}`,{headers:e.headers}))}async createBucket(r,e={public:!1}){var t=this;return t.handleOperation(async()=>await ui(t.fetch,`${t.url}/bucket`,{id:r,name:r,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:t.headers}))}async updateBucket(r,e){var t=this;return t.handleOperation(async()=>await nk(t.fetch,`${t.url}/bucket/${r}`,{id:r,name:r,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:t.headers}))}async emptyBucket(r){var e=this;return e.handleOperation(async()=>await ui(e.fetch,`${e.url}/bucket/${r}/empty`,{},{headers:e.headers}))}async deleteBucket(r){var e=this;return e.handleOperation(async()=>await h5(e.fetch,`${e.url}/bucket/${r}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(r){const e={};return r&&("limit"in r&&(e.limit=String(r.limit)),"offset"in r&&(e.offset=String(r.offset)),r.search&&(e.search=r.search),r.sortColumn&&(e.sortColumn=r.sortColumn),r.sortOrder&&(e.sortOrder=r.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},xG=class extends rm{constructor(r,e={},t){const s=r.replace(/\/$/,""),i=Oe(Oe({},Z0),e);super(s,i,t,"storage")}async createBucket(r){var e=this;return e.handleOperation(async()=>await ui(e.fetch,`${e.url}/bucket`,{name:r},{headers:e.headers}))}async listBuckets(r){var e=this;return e.handleOperation(async()=>{const t=new URLSearchParams;(r==null?void 0:r.limit)!==void 0&&t.set("limit",r.limit.toString()),(r==null?void 0:r.offset)!==void 0&&t.set("offset",r.offset.toString()),r!=null&&r.sortColumn&&t.set("sortColumn",r.sortColumn),r!=null&&r.sortOrder&&t.set("sortOrder",r.sortOrder),r!=null&&r.search&&t.set("search",r.search);const s=t.toString(),i=s?`${e.url}/bucket?${s}`:`${e.url}/bucket`;return await Zp(e.fetch,i,{headers:e.headers})})}async deleteBucket(r){var e=this;return e.handleOperation(async()=>await h5(e.fetch,`${e.url}/bucket/${r}`,{},{headers:e.headers}))}from(r){var e=this;if(!aG(r))throw new nw("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const t=new ZW({baseUrl:this.url,catalogName:r,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(t,{get(i,a){const o=i[a];return typeof o!="function"?o:async(...c)=>{try{return{data:await o.apply(i,c),error:null}}catch(h){if(s)throw h;return{data:null,error:h}}}}})}},yG=class extends rm{constructor(r,e={},t){const s=r.replace(/\/$/,""),i=Oe(Oe({},Z0),{},{"Content-Type":"application/json"},e);super(s,i,t,"vectors")}async createIndex(r){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/CreateIndex`,r,{headers:e.headers})||{})}async getIndex(r,e){var t=this;return t.handleOperation(async()=>await xr.post(t.fetch,`${t.url}/GetIndex`,{vectorBucketName:r,indexName:e},{headers:t.headers}))}async listIndexes(r){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/ListIndexes`,r,{headers:e.headers}))}async deleteIndex(r,e){var t=this;return t.handleOperation(async()=>await xr.post(t.fetch,`${t.url}/DeleteIndex`,{vectorBucketName:r,indexName:e},{headers:t.headers})||{})}},bG=class extends rm{constructor(r,e={},t){const s=r.replace(/\/$/,""),i=Oe(Oe({},Z0),{},{"Content-Type":"application/json"},e);super(s,i,t,"vectors")}async putVectors(r){var e=this;if(r.vectors.length<1||r.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/PutVectors`,r,{headers:e.headers})||{})}async getVectors(r){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/GetVectors`,r,{headers:e.headers}))}async listVectors(r){var e=this;if(r.segmentCount!==void 0){if(r.segmentCount<1||r.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
532if(r.segmentIndex!==void 0&&(r.segmentIndex<0||r.segmentIndex>=r.segmentCount))throw new Error(`segmentIndex must be between 0 and ${r.segmentCount-1}`)}return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/ListVectors`,r,{headers:e.headers}))}async queryVectors(r){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/QueryVectors`,r,{headers:e.headers}))}async deleteVectors(r){var e=this;if(r.keys.length<1||r.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/DeleteVectors`,r,{headers:e.headers})||{})}},vG=class extends rm{constructor(r,e={},t){const s=r.replace(/\/$/,""),i=Oe(Oe({},Z0),{},{"Content-Type":"application/json"},e);super(s,i,t,"vectors")}async createBucket(r){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:r},{headers:e.headers})||{})}async getBucket(r){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:r},{headers:e.headers}))}async listBuckets(r={}){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/ListVectorBuckets`,r,{headers:e.headers}))}async deleteBucket(r){var e=this;return e.handleOperation(async()=>await xr.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:r},{headers:e.headers})||{})}},wG=class extends vG{constructor(r,e={}){super(r,e.headers||{},e.fetch)}from(r){return new jG(this.url,this.headers,r,this.fetch)}async createBucket(r){var e=()=>super.createBucket,t=this;return e().call(t,r)}async getBucket(r){var e=()=>super.getBucket,t=this;return e().call(t,r)}async listBuckets(r={}){var e=()=>super.listBuckets,t=this;return e().call(t,r)}async deleteBucket(r){var e=()=>super.deleteBucket,t=this;return e().call(t,r)}},jG=class extends yG{constructor(r,e,t,s){super(r,e,s),this.vectorBucketName=t}async createIndex(r){var e=()=>super.createIndex,t=this;return e().call(t,Oe(Oe({},r),{},{vectorBucketName:t.vectorBucketName}))}async listIndexes(r={}){var e=()=>super.listIndexes,t=this;return e().call(t,Oe(Oe({},r),{},{vectorBucketName:t.vectorBucketName}))}async getIndex(r){var e=()=>super.getIndex,t=this;return e().call(t,t.vectorBucketName,r)}async deleteIndex(r){var e=()=>super.deleteIndex,t=this;return e().call(t,t.vectorBucketName,r)}index(r){return new NG(this.url,this.headers,this.vectorBucketName,r,this.fetch)}},NG=class extends bG{constructor(r,e,t,s,i){super(r,e,i),this.vectorBucketName=t,this.indexName=s}async putVectors(r){var e=()=>super.putVectors,t=this;return e().call(t,Oe(Oe({},r),{},{vectorBucketName:t.vectorBucketName,indexName:t.indexName}))}async getVectors(r){var e=()=>super.getVectors,t=this;return e().call(t,Oe(Oe({},r),{},{vectorBucketName:t.vectorBucketName,indexName:t.indexName}))}async listVectors(r={}){var e=()=>super.listVectors,t=this;return e().call(t,Oe(Oe({},r),{},{vectorBucketName:t.vectorBucketName,indexName:t.indexName}))}async queryVectors(r){var e=()=>super.queryVectors,t=this;return e().call(t,Oe(Oe({},r),{},{vectorBucketName:t.vectorBucketName,indexName:t.indexName}))}async deleteVectors(r){var e=()=>super.deleteVectors,t=this;return e().call(t,Oe(Oe({},r),{},{vectorBucketName:t.vectorBucketName,indexName:t.indexName}))}},kG=class extends gG{constructor(r,e={},t,s){super(r,e,t,s)}from(r){return new mG(this.url,this.headers,r,this.fetch)}get vectors(){return new wG(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new xG(this.url+"/iceberg",this.headers,this.fetch)}};const UM="2.105.1",lh=30*1e3,rk=3,O2=rk*lh,SG="http://localhost:9999",AG="supabase.auth.token",_G={"X-Client-Info":`gotrue-js/${UM}`},ik="X-Supabase-Api-Version",HM={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},EG=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,CG=600*1e3;class eg extends Error{constructor(e,t,s){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function xe(r){return typeof r=="object"&&r!==null&&"__isAuthError"in r}class TG extends eg{constructor(e,t,s){super(e,t,s),this.name="AuthApiError",this.status=t,this.co
532de=s}}function PG(r){return xe(r)&&r.name==="AuthApiError"}class Ai extends eg{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class Io extends eg{constructor(e,t,s,i){super(e,s,i),this.name=t,this.status=s}}class ws extends Io{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Py(r){return xe(r)&&r.name==="AuthSessionMissingError"}class qu extends Io{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ry extends Io{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class My extends Io{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function RG(r){return xe(r)&&r.name==="AuthImplicitGrantRedirectError"}class x3 extends Io{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class MG extends Io{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class ak extends Io{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function F2(r){return xe(r)&&r.name==="AuthRetryableFetchError"}class y3 extends Io{constructor(e,t,s){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class ok extends Io{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const ev="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),b3=` 533\r=`.split(""),IG=(()=>{const r=new Array(128);for(let e=0;e<r.length;e+=1)r[e]=-1;for(let e=0;e<b3.length;e+=1)r[b3[e].charCodeAt(0)]=-2;for(let e=0;e<ev.length;e+=1)r[ev[e].charCodeAt(0)]=e;return r})();function v3(r,e,t){if(r!==null)for(e.queue=e.queue<<8|r,e.queuedBits+=8;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;t(ev[s]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;t(ev[s]),e.queuedBits-=6}}function zM(r,e,t){const s=IG[r];if(s>-1)for(e.queue=e.queue<<6|s,e.queuedBits+=6;e.queuedBits>=8;)t(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(r)}"`)}}function w3(r){const e=[],t=o=>{e.push(String.fromCodePoint(o))},s={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=o=>{OG(o,s,t)};for(let o=0;o<r.length;o+=1)zM(r.charCodeAt(o),i,a);return e.join("")}function LG(r,e){if(r<=127){e(r);return}else if(r<=2047){e(192|r>>6),e(128|r&63);return}else if(r<=65535){e(224|r>>12),e(128|r>>6&63),e(128|r&63);return}else if(r<=1114111){e(240|r>>18),e(128|r>>12&63),e(128|r>>6&63),e(128|r&63);return}throw new Error(`Unrecognized Unicode codepoint: ${r.toString(16)}`)}function DG(r,e){for(let t=0;t<r.length;t+=1){let s=r.charCodeAt(t);if(s>55295&&s<=56319){const i=(s-55296)*1024&65535;s=(r.charCodeAt(t+1)-56320&65535|i)+65536,t+=1}LG(s,e)}}function OG(r,e,t){if(e.utf8seq===0){if(r<=127){t(r);return}for(let s=1;s<6;s+=1)if((r>>7-s&1)===0){e.utf8seq=s;break}if(e.utf8seq===2)e.codepoint=r&31;else if(e.utf8seq===3)e.codepoint=r&15;else if(e.utf8seq===4)e.codepoint=r&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(r<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|r&63,e.utf8seq-=1,e.utf8seq===0&&t(e.codepoint)}}function yh(r){const e=[],t={queue:0,queuedBits:0},s=i=>{e.push(i)};for(let i=0;i<r.length;i+=1)zM(r.charCodeAt(i),t,s);return new Uint8Array(e)}function FG(r){const e=[];return DG(r,t=>e.push(t)),new Uint8Array(e)}function $c(r){const e=[],t={queue:0,queuedBits:0},s=i=>{e.push(i)};return r.forEach(i=>
533v3(i,t,s)),v3(null,t,s),e.join("")}function BG(r){return Math.round(Date.now()/1e3)+r}function $G(){return Symbol("auth-callback")}const Is=()=>typeof window<"u"&&typeof document<"u",_c={tested:!1,writable:!1},VM=()=>{if(!Is())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(_c.tested)return _c.writable;const r=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(r,r),globalThis.localStorage.removeItem(r),_c.tested=!0,_c.writable=!0}catch{_c.tested=!0,_c.writable=!1}return _c.writable};function UG(r){const e={},t=new URL(r);if(t.hash&&t.hash[0]==="#")try{new URLSearchParams(t.hash.substring(1)).forEach((i,a)=>{e[a]=i})}catch{}return t.searchParams.forEach((s,i)=>{e[i]=s}),e}const WM=r=>r?(...e)=>r(...e):(...e)=>fetch(...e),HG=r=>typeof r=="object"&&r!==null&&"status"in r&&"ok"in r&&"json"in r&&typeof r.json=="function",ch=async(r,e,t)=>{await r.setItem(e,JSON.stringify(t))},Ec=async(r,e)=>{const t=await r.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch{return t}},Ms=async(r,e)=>{await r.removeItem(e)};class iw{constructor(){this.promise=new iw.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}iw.promiseConstructor=Promise;function Iy(r){const e=r.split(".");if(e.length!==3)throw new ok("Invalid JWT structure");for(let s=0;s<e.length;s++)if(!EG.test(e[s]))throw new ok("JWT not in base64url format");return{header:JSON.parse(w3(e[0])),payload:JSON.parse(w3(e[1])),signature:yh(e[2]),raw:{header:e[0],payload:e[1]}}}async function zG(r){return await new Promise(e=>{setTimeout(()=>e(null),r)})}function VG(r,e){return new Promise((s,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await r(a);if(!e(a,null,o)){s(o);return}}catch(o){if(!e(a,o)){i(o);return}}})()})}function WG(r){return("0"+r.toString(16)).substr(-2)}function GG(){const e=new Uint32Array(56);if(typeof crypto>"u"){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=t.length;let i="";for(let a=0;a<56;a++)i+=t.charAt(Math.floor(Math.random()*s));return i}return crypto.getRandomValues(e),Array.from(e,WG).join("")}async function qG(r){const t=new TextEncoder().encode(r),s=await crypto.subtle.digest("SHA-256",t),i=new Uint8Array(s);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function KG(r){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),r;const t=await qG(r);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ku(r,e,t=!1){const s=GG();let i=s;t&&(i+="/recovery"),await ch(r,`${e}-code-verifier`,i);const a=await KG(s);return[a,s===a?"plain":"s256"]}const XG=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function YG(r){const e=r.headers.get(ik);if(!e||!e.match(XG))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function JG(r){if(!r)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(r<=e)throw new Error("JWT has expired")}function QG(r){switch(r){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const ZG=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ta(r){if(!ZG.test(r))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function ci(r){if(!r.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function B2(){const r={};return new Proxy(r,{get:(e,t)=>{if(t==="__isUserNotAvailableProxy")return!0;if(typeof t=="symbol"){const s=t.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function eq(r,e){return new Proxy(r,{get:(t,s,i)=>{if(s==="__isInsecureUserWarningProxy")return!0;
533if(typeof s=="symbol"){const a=s.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(t,s,i)}return!e.value&&typeof s=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(t,s,i)}})}function j3(r){return JSON.parse(JSON.stringify(r))}const Mc=r=>r.msg||r.message||r.error_description||r.error||JSON.stringify(r),tq=[502,503,504,520,521,522,523,524,530];async function N3(r){var e;if(!HG(r))throw new ak(Mc(r),0);if(tq.includes(r.status))throw new ak(Mc(r),r.status);let t;try{t=await r.json()}catch(a){throw new Ai(Mc(a),a)}let s;const i=YG(r);if(i&&i.getTime()>=HM["2024-01-01"].timestamp&&typeof t=="object"&&t&&typeof t.code=="string"?s=t.code:typeof t=="object"&&t&&typeof t.error_code=="string"&&(s=t.error_code),s){if(s==="weak_password")throw new y3(Mc(t),r.status,((e=t.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(s==="session_not_found")throw new ws}else if(typeof t=="object"&&t&&typeof t.weak_password=="object"&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((a,o)=>a&&typeof o=="string",!0))throw new y3(Mc(t),r.status,t.weak_password.reasons);throw new TG(Mc(t),r.status||500,s)}const sq=(r,e,t,s)=>{const i={method:r,headers:(e==null?void 0:e.headers)||{}};return r==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(s),Object.assign(Object.assign({},i),t))};async function ke(r,e,t,s){var i;const a=Object.assign({},s==null?void 0:s.headers);a[ik]||(a[ik]=HM["2024-01-01"].name),s!=null&&s.jwt&&(a.Authorization=`Bearer ${s.jwt}`);const o=(i=s==null?void 0:s.query)!==null&&i!==void 0?i:{};s!=null&&s.redirectTo&&(o.redirect_to=s.redirectTo);const c=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",h=await nq(r,e,t+c,{headers:a,noResolveJson:s==null?void 0:s.noResolveJson},{},s==null?void 0:s.body);return s!=null&&s.xform?s==null?void 0:s.xform(h):{data:Object.assign({},h),error:null}}async function nq(r,e,t,s,i,a){const o=sq(e,s,i,a);let c;try{c=await r(t,Object.assign({},o))}catch(h){throw console.error(h),new ak(Mc(h),0)}if(c.ok||await N3(c),s!=null&&s.noResolveJson)return c;try{return await c.json()}catch(h){await N3(h)}}function Rr(r){var e;let t=null;aq(r)&&(t=Object.assign({},r),r.expires_at||(t.expires_at=BG(r.expires_in)));const s=(e=r.user)!==null&&e!==void 0?e:r;return{data:{session:t,user:s},error:null}}function k3(r){const e=Rr(r);return!e.error&&r.weak_password&&typeof r.weak_password=="object"&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.message&&typeof r.weak_password.message=="string"&&r.weak_password.reasons.reduce((t,s)=>t&&typeof s=="string",!0)&&(e.data.weak_password=r.weak_password),e}function ol(r){var e;return{data:{user:(e=r.user)!==null&&e!==void 0?e:r},error:null}}function rq(r){return{data:r,error:null}}function iq(r){const{action_link:e,email_otp:t,hashed_token:s,redirect_to:i,verification_type:a}=r,o=sw(r,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),c={action_link:e,email_otp:t,hashed_token:s,redirect_to:i,verification_type:a},h=Object.assign({},o);return{data:{properties:c,user:h},error:null}}function S3(r){return r}function aq(r){return r.access_token&&r.refresh_token&&r.expires_in}const $2=["global","local","others"];class oq{constructor({url:e="",headers:t={},fetch:s,experimental:i}){this.url=e,this.headers=t,this.fetch=WM(s),this.experimental=i??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,t=$2[0]){if($2.indexOf(t)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${$2.join(", ")}`);try{return await ke(this.fetch,"POST",`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(s){if(xe(s))return{data:null,error:s};throw s}}async inviteUserByEmail(e,t={}){try{return await ke(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:ol})}catch(s){if(xe(s))return{data:{user:null},error:s};throw s}}async generateLink(e){try{const{options:t}=e,s=sw(e,["options"]),i=Object.assign(Object.assign({},s),t);return"newEmail"in s&&(i.new_email=s==null?void 0:s.newEmail,delete i.newEmail),await ke(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:iq,redirectTo:t==null?void 0:t.redirectTo})}catch(t){if(xe(t))return{data:{properties:null,user:null},error:t};throw t}}async createUser(e){try{return await ke(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ol})}catch(t){if(xe(t))return{data:{user:null},error:t};throw t}}async listUsers(e){var t,s,i,a,o,c,h;try{const f={nextPage:null,lastPage:0,total:0},m=await ke(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(t=e==null?void 0:e.page)===null||t===void 0?void 0:t.toString())!==null&&s!==void 0?s:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:S3});if(m.error)throw m.error;const g=await m.json(),x=(o=m.headers.get("x-total-count"))!==null&&o!==void 0?o:0,y=(h=(c=m.headers.get("link"))===null||c===void 0?void 0:c.split(","))!==null&&h!==void 0?h:[];return y.length>0&&(y.forEach(v=>{const j=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),N=JSON.parse(v.split(";")[1].split("=")[1]);f[`${N}Page`]=j}),f.total=parseInt(x)),{data:Object.assign(Object.assign({},g),f),error:null}}catch(f){if(xe(f))return{data:{users:[]},error:f};throw f}}async getUserById(e){Ta(e);try{return await ke(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ol})}catch(t){if(xe(t))return{data:{user:null},error:t};throw t}}async updateUserById(e,t){Ta(e);try{return await ke(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:ol})}catch(s){if(xe(s))return{data:{user:null},error:s};throw s}}async deleteUser(e,t=!1){Ta(e);
533try{return await ke(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:ol})}catch(s){if(xe(s))return{data:{user:null},error:s};throw s}}async _listFactors(e){Ta(e.userId);try{const{data:t,error:s}=await ke(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:t,error:s}}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _deleteFactor(e){Ta(e.userId),Ta(e.id);try{return{data:await ke(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _listOAuthClients(e){var t,s,i,a,o,c,h;try{const f={nextPage:null,lastPage:0,total:0},m=await ke(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(t=e==null?void 0:e.page)===null||t===void 0?void 0:t.toString())!==null&&s!==void 0?s:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:S3});if(m.error)throw m.error;const g=await m.json(),x=(o=m.headers.get("x-total-count"))!==null&&o!==void 0?o:0,y=(h=(c=m.headers.get("link"))===null||c===void 0?void 0:c.split(","))!==null&&h!==void 0?h:[];return y.length>0&&(y.forEach(v=>{const j=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),N=JSON.parse(v.split(";")[1].split("=")[1]);f[`${N}Page`]=j}),f.total=parseInt(x)),{data:Object.assign(Object.assign({},g),f),error:null}}catch(f){if(xe(f))return{data:{clients:[]},error:f};throw f}}async _createOAuthClient(e){try{return await ke(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:t=>({data:t,error:null})})}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _getOAuthClient(e){try{return await ke(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:t=>({data:t,error:null})})}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _updateOAuthClient(e,t){try{return await ke(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(xe(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(e){try{return await ke(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _regenerateOAuthClientSecret(e){try{return await ke(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:t=>({data:t,error:null})})}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _listCustomProviders(e){try{const t={};return e!=null&&e.type&&(t.type=e.type),await ke(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:s=>{var i;return{data:{providers:(i=s==null?void 0:s.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(t){if(xe(t))return{data:{providers:[]},error:t};throw t}}async _createCustomProvider(e){try{return await ke(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:t=>({data:t,error:null})})}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _getCustomProvider(e){try{return await ke(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:t=>({data:t,error:null})})}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _updateCustomProvider(e,t){try{return await ke(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(xe(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(e){try{return await ke(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _adminListPasskeys(e){ci(this.experimental),Ta(e.userId);try{return await ke(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:t=>({data:t,error:null})})}catch(t){if(xe(t))return{data:null,error:t};throw t}}async _adminDeletePasskey(e){ci(this.experimental),Ta(e.userId),Ta(e.passkeyId);
533try{return await ke(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(t){if(xe(t))return{data:null,error:t};throw t}}}function A3(r={}){return{getItem:e=>r[e]||null,setItem:(e,t)=>{r[e]=t},removeItem:e=>{delete r[e]}}}const Hi={debug:!!(globalThis&&VM()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class GM extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class _3 extends GM{}async function lq(r,e,t){Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",r,e);const s=new globalThis.AbortController;let i;e>0&&(i=setTimeout(()=>{s.abort(),Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",r)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(r,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:s.signal},async a=>{if(a){clearTimeout(i),Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",r,a.name);try{return await t()}finally{Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",r,a.name)}}else{if(e===0)throw Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",r),new _3(`Acquiring an exclusive Navigator LockManager lock "${r}" immediately failed`);if(Hi.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(i),await t()}})}catch(a){if(e>0&&clearTimeout(i),(a==null?void 0:a.name)==="AbortError"&&e>0){if(s.signal.aborted)return Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",r),console.warn(`@supabase/gotrue-js: Lock "${r}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(r,{mode:"exclusive",steal:!0},async o=>{if(o){Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",r,o.name);try{return await t()}finally{Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",r,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await t()}));throw Hi.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",r),new _3(`Lock "${r}" was released because another request stole it`)}throw a}}function cq(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function qM(r){if(!/^0x[a-fA-F0-9]{40}$/.test(r))throw new Error(`@supabase/auth-js: Address "${r}" is invalid.`);return r.toLowerCase()}function dq(r){return parseInt(r,16)}function uq(r){const e=new TextEncoder().encode(r);return"0x"+Array.from(e,s=>s.toString(16).padStart(2,"0")).join("")}function hq(r){var e;const{chainId:t,domain:s,expirationTime:i,issuedAt:a=new Date,nonce:o,notBefore:c,requestId:h,resources:f,scheme:m,uri:g,version:x}=r;{if(!Number.isInteger(t))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!s)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!g)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(x!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${x}`);if(!((e=r.statement)===null||e===void 0)&&e.includes(` 534`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${r.statement}`)}const y=qM(r.address),v=m?`${m}://${s}`:s,j=r.statement?`${r.statement} 535`:"",N=`${v} wants you to sign in with your Ethereum account: 536${y} 537 538${j}`;let S=`URI: ${g} 539Version: ${x} 540Chain ID: ${t}${o?` 541Nonce: ${o}`:""} 542Issued At: ${a.toISOString()}`;if(i&&(S+=` 543Expiration Time: ${i.toISOString()}
543`),c&&(S+=` 544Not Before: ${c.toISOString()}`),h&&(S+=` 545Request ID: ${h}`),f){let A=` 546Resources:`;for(const E of f){if(!E||typeof E!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${E}`);A+=` 547- ${E}`}S+=A}return`${N} 548${S}`}class as extends Error{constructor({message:e,code:t,cause:s,name:i}){var a;super(e,{cause:s}),this.__isWebAuthnError=!0,this.name=(a=i??(s instanceof Error?s.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=t}}class tv extends as{constructor(e,t){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t,message:e}),this.name="WebAuthnUnknownError",this.originalError=t}}function fq({error:r,options:e}){var t,s,i;const{publicKey:a}=e;if(!a)throw Error("options was missing required publicKey property");if(r.name==="AbortError"){if(e.signal instanceof AbortSignal)return new as({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:r})}else if(r.name==="ConstraintError"){if(((t=a.authenticatorSelection)===null||t===void 0?void 0:t.requireResidentKey)===!0)return new as({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:r});if(e.mediation==="conditional"&&((s=a.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new as({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:r});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new as({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:r})}else{if(r.name==="InvalidStateError")return new as({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:r});if(r.name==="NotAllowedError")return new as({message:r.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r});if(r.name==="NotSupportedError")return a.pubKeyCredParams.filter(c=>c.type==="public-key").length===0?new as({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:r}):new as({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:r});if(r.name==="SecurityError"){const o=window.location.hostname;if(KM(o)){if(a.rp.id!==o)return new as({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:r})}else return new as({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:r})}else if(r.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new as({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:r})}else if(r.name==="UnknownError")return new as({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:r})}return new as({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r})}function mq({error:r,options:e}){const{publicKey:t}=e;if(!t)throw Error("options was missing required publicKey property");if(r.name==="AbortError"){if(e.signal instanceof AbortSignal)return new as({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:r})}else{if(r.name==="NotAllowedError")return new as({message:r.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r});if(r.name==="SecurityError"){const s=window.location.hostname;if(KM(s)){if(t.rpId!==s)return new as({message:`The RP ID "${t.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:r})}else return new as({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:r})}else if(r.name==="UnknownError")return new as({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
548ROR",cause:r})}return new as({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r})}class pq{createNewAbortSignal(){if(this.controller){const t=new Error("Cancelling existing WebAuthn API call for new one");t.name="AbortError",this.controller.abort(t)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const lk=new pq;function E3(r){if(!r)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(r);const{challenge:e,user:t,excludeCredentials:s}=r,i=sw(r,["challenge","user","excludeCredentials"]),a=yh(e).buffer,o=Object.assign(Object.assign({},t),{id:yh(t.id).buffer}),c=Object.assign(Object.assign({},i),{challenge:a,user:o});if(s&&s.length>0){c.excludeCredentials=new Array(s.length);for(let h=0;h<s.length;h++){const f=s[h];c.excludeCredentials[h]=Object.assign(Object.assign({},f),{id:yh(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return c}function C3(r){if(!r)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(r);const{challenge:e,allowCredentials:t}=r,s=sw(r,["challenge","allowCredentials"]),i=yh(e).buffer,a=Object.assign(Object.assign({},s),{challenge:i});if(t&&t.length>0){a.allowCredentials=new Array(t.length);for(let o=0;o<t.length;o++){const c=t[o];a.allowCredentials[o]=Object.assign(Object.assign({},c),{id:yh(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function T3(r){var e;if("toJSON"in r&&typeof r.toJSON=="function")return r.toJSON();const t=r;return{id:r.id,rawId:r.id,response:{attestationObject:$c(new Uint8Array(r.response.attestationObject)),clientDataJSON:$c(new Uint8Array(r.response.clientDataJSON))},type:"public-key",clientExtensionResults:r.getClientExtensionResults(),authenticatorAttachment:(e=t.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function P3(r){var e;if("toJSON"in r&&typeof r.toJSON=="function")return r.toJSON();const t=r,s=r.getClientExtensionResults(),i=r.response;return{id:r.id,rawId:r.id,response:{authenticatorData:$c(new Uint8Array(i.authenticatorData)),clientDataJSON:$c(new Uint8Array(i.clientDataJSON)),signature:$c(new Uint8Array(i.signature)),userHandle:i.userHandle?$c(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(e=t.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function KM(r){return r==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(r)}function sv(){var r,e;return!!(Is()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((r=navigator==null?void 0:navigator.credentials)===null||r===void 0?void 0:r.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function XM(r){try{const e=await navigator.credentials.create(r);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new tv("Browser returned unexpected credential type",e)}:{data:null,error:new tv("Empty credential response",e)}}catch(e){return{data:null,error:fq({error:e,options:r})}}}async function YM(r){try{const e=await navigator.credentials.get(r);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new tv("Browser returned unexpected credential type",e)}:{data:null,error:new tv("Empty credential response",e)}}catch(e){return{data:null,error:mq({error:e,options:r})}}}const gq={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},xq={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function nv(...r){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),t=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),s={};for(const i of r)if(i)for(const a in i){const o=i[a];if(o!==void 0)if(Array.isArray(o))s[a]=o;else if(t(o))s[a]=o;else if(e(o)){const c=s[a];e(c)?s[a]=nv(c,o):s[a]=nv(o)}else s[a]=o}return s}function yq(r,e){return nv(gq,r,e||{})}function bq(r,e){return nv(xq,r,e||{})}class vq{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:t,friendlyName:s,signal:i},a){var o;try{const{data:c,error:h}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!c)return{data:null,error:h};const f=i??lk.createNewAbortSignal();if(c.webauthn.type==="create"){const{user:m}=c.webauthn.credential_options.publicKey;if(!m.name){const g=s;if(g)m.name=`${m.id}:${g}`;else{const y=(await this.client.getUser()).data.user,v=((o=y==null?void 0:y.user_metadata)===null||o===void 0?void 0:o.name)||(y==null?void 0:y.email)||(y==null?void 0:y.id)||"User";m.name=`${m.id}:${v}`}}m.displayName||(m.displayName=m.name)}
548switch(c.webauthn.type){case"create":{const m=yq(c.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:g,error:x}=await XM({publicKey:m,signal:f});return g?{data:{factorId:e,challengeId:c.id,webauthn:{type:c.webauthn.type,credential_response:g}},error:null}:{data:null,error:x}}case"request":{const m=bq(c.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:g,error:x}=await YM(Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:m,signal:f}));return g?{data:{factorId:e,challengeId:c.id,webauthn:{type:c.webauthn.type,credential_response:g}},error:null}:{data:null,error:x}}}}catch(c){return xe(c)?{data:null,error:c}:{data:null,error:new Ai("Unexpected error in challenge",c)}}}async _verify({challengeId:e,factorId:t,webauthn:s}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:s})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!t)return{data:null,error:new eg("rpId is required for WebAuthn authentication")};try{if(!sv())return{data:null,error:new Ai("Browser does not support WebAuthn",null)};const{data:o,error:c}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:s},signal:i},{request:a});if(!o)return{data:null,error:c};const{webauthn:h}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:h.type,rpId:t,rpOrigins:s,credential_response:h.credential_response}})}catch(o){return xe(o)?{data:null,error:o}:{data:null,error:new Ai("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!t)return{data:null,error:new eg("rpId is required for WebAuthn registration")};try{if(!sv())return{data:null,error:new Ai("Browser does not support WebAuthn",null)};const{data:o,error:c}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(m=>{var g;return(g=m.data)===null||g===void 0?void 0:g.all.find(x=>x.factor_type==="webauthn"&&x.friendly_name===e&&x.status!=="unverified")}).then(m=>m?this.client.mfa.unenroll({factorId:m==null?void 0:m.id}):void 0),{data:null,error:c};const{data:h,error:f}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:t,rpOrigins:s},signal:i},{create:a});return h?this._verify({factorId:o.id,challengeId:h.challengeId,webauthn:{rpId:t,rpOrigins:s,type:h.webauthn.type,credential_response:h.webauthn.credential_response}}):{data:null,error:f}}catch(o){return xe(o)?{data:null,error:o}:{data:null,error:new Ai("Unexpected error in register",o)}}}}cq();const wq={url:SG,storageKey:AG,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:_G,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function R3(r,e,t){return await t()}const Xu={};class tg{get jwks(){var e,t;return(t=(e=Xu[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&t!==void 0?t:{keys:[]}}set jwks(e){Xu[this.storageKey]=Object.assign(Object.assign({},Xu[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,t;return(t=(e=Xu[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&t!==void 0?t:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Xu[this.storageKey]=Object.assign(Object.assign({},Xu[this.storageKey]),{cachedAt:e})}constructor(e){var t,s,i,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},wq),e);if(this.storageKey=o.storageKey,this.instanceID=(t=tg.nextInstanceID[this.storageKey])!==null&&t!==void 0?t:0,tg.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Is()){const c=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(c),this.logDebugMessages&&console.trace(c)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(s=o.experimental)!==null&&s!==void 0?s:{},this.admin=new oq({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=WM(o.fetch),this.lock=o.lock||R3,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&Is()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=lq:this.lock=R3,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new vq(this)}
548,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:VM()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=A3(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=A3(this.memoryStorage)),Is()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(c){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",c)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async c=>{this._debug("received broadcast notification from other tab or client",c);try{await this._notifyAllSubscribers(c.data.event,c.data.session,!1)}catch(h){this._debug("#broadcastChannel","error",h)}})}o.skipAutoInitialize||this.initialize().catch(c=>{this._debug("#initialize()","error",c)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${UM}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let t={},s="none";if(Is()&&(t=UG(window.location.href),this._isImplicitGrantCallback(t)?s="implicit":await this._isPKCECallback(t)&&(s="pkce")),Is()&&this.detectSessionInUrl&&s!=="none"){const{data:i,error:a}=await this._getSessionFromURL(t,s);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),RG(a)){const h=(e=a.details)===null||e===void 0?void 0:e.code;if(h==="identity_already_exists"||h==="identity_not_found"||h==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:o,redirectType:c}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",c),await this._saveSession(o),setTimeout(async()=>{c==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return xe(t)?this._returnResult({error:t}):this._returnResult({error:new Ai("Unexpected error during initialization",t)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,s,i;try{const a=await ke(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(t=e==null?void 0:e.options)===null||t===void 0?void 0:t.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:Rr}),{data:o,error:c}=a;if(c||!o)return this._returnResult({data:{user:null,session:null},error:c});const h=o.session,f=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:f,session:h},error:null})}catch(a){if(xe(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(e){var t,s,i;try{let a;if("email"in e){const{email:m,password:g,options:x}=e;let y=null,v=null;this.flowType==="pkce"&&([y,v]=await Ku(this.storage,this.storageKey)),a=await ke(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:x==null?void 0:x.emailRedirectTo,body:{email:m,password:g,data:(t=x==null?void 0:x.data)!==null&&t!==void 0?t:{},gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken},code_challenge:y,code_challenge_method:v},xform:Rr})}else if("phone"in e){const{phone:m,password:g,options:x}=e;a=await ke(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:m,password:g,data:(s=x==null?void 0:x.data)!==null&&s!==void 0?s:{},channel:(i=x==null?void 0:x.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken}},xform:Rr})}else throw new Ry("You must provide either an email or phone number and a password");const{data:o,error:c}=a;if(c||!o)return await Ms(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:c});const h=o.session,f=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:f,session:h},error:null})}catch(a){if(await Ms(this.storage,`${this.storageKey}-code-verifier`),xe(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(e){try{let t;if("email"in e){const{email:a,password:o,options:c}=e;t=await ke(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}},xform:k3})}else if("phone"in e){const{phone:a,password:o,options:c}=e;t=await ke(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}},xform:k3})}else throw new Ry("You must provide either an email or phone number and a password");const{data:s,error:i}=t;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!s||!s.session||!s.user){const a=new qu;return this._returnResult({data:{user:null,session:null},error:a})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:i})}catch(t){if(xe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async signInWithOAuth(e){var t,s,i,a;return await this._handleProviderSignIn(e.provider,{redirectTo:(t=e.options)===null||t===void 0?void 0:t.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:t}=e;switch(t){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){var t,s,i,a,o,c,h,f,m,g,x;let y,v;if("message"in e)y=e.message,v=e.signature;else{const{chain:j,wallet:N,statement:S,options:A}=e;let E;if(Is())if(typeof N=="object")E=N;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")E=O.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof N!="object"||!(A!=null&&A.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");E=N}const M=new URL((t=A==null?void 0:A.url)!==null&&t!==void 0?t:window.location.href),R=await E.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!R||R.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const I=qM(R[0]);let F=(s=A==null?void 0:A.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!F){const O=await E.request({method:"eth_chainId"});F=dq(O)}const D={domain:M.host,address:I,statement:S,uri:M.href,version:"1",chainId:F,nonce:(i=A==null?void 0:A.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(o=(a=A
548==null?void 0:A.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(c=A==null?void 0:A.signInWithEthereum)===null||c===void 0?void 0:c.expirationTime,notBefore:(h=A==null?void 0:A.signInWithEthereum)===null||h===void 0?void 0:h.notBefore,requestId:(f=A==null?void 0:A.signInWithEthereum)===null||f===void 0?void 0:f.requestId,resources:(m=A==null?void 0:A.signInWithEthereum)===null||m===void 0?void 0:m.resources};y=hq(D),v=await E.request({method:"personal_sign",params:[uq(y),I]})}try{const{data:j,error:N}=await ke(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:y,signature:v},!((g=e.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(x=e.options)===null||x===void 0?void 0:x.captchaToken}}:null),xform:Rr});if(N)throw N;if(!j||!j.session||!j.user){const S=new qu;return this._returnResult({data:{user:null,session:null},error:S})}return j.session&&(await this._saveSession(j.session),await this._notifyAllSubscribers("SIGNED_IN",j.session)),this._returnResult({data:Object.assign({},j),error:N})}catch(j){if(xe(j))return this._returnResult({data:{user:null,session:null},error:j});throw j}}async signInWithSolana(e){var t,s,i,a,o,c,h,f,m,g,x,y;let v,j;if("message"in e)v=e.message,j=e.signature;else{const{chain:N,wallet:S,statement:A,options:E}=e;let M;if(Is())if(typeof S=="object")M=S;else{const I=window;if("solana"in I&&typeof I.solana=="object"&&("signIn"in I.solana&&typeof I.solana.signIn=="function"||"signMessage"in I.solana&&typeof I.solana.signMessage=="function"))M=I.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof S!="object"||!(E!=null&&E.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");M=S}const R=new URL((t=E==null?void 0:E.url)!==null&&t!==void 0?t:window.location.href);if("signIn"in M&&M.signIn){const I=await M.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},E==null?void 0:E.signInWithSolana),{version:"1",domain:R.host,uri:R.href}),A?{statement:A}:null));let F;if(Array.isArray(I)&&I[0]&&typeof I[0]=="object")F=I[0];else if(I&&typeof I=="object"&&"signedMessage"in I&&"signature"in I)F=I;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in F&&"signature"in F&&(typeof F.signedMessage=="string"||F.signedMessage instanceof Uint8Array)&&F.signature instanceof Uint8Array)v=typeof F.signedMessage=="string"?F.signedMessage:new TextDecoder().decode(F.signedMessage),j=F.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in M)||typeof M.signMessage!="function"||!("publicKey"in M)||typeof M!="object"||!M.publicKey||!("toBase58"in M.publicKey)||typeof M.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${R.host} wants you to sign in with your Solana account:`,M.publicKey.toBase58(),...A?["",A,""]:[""],"Version: 1",`URI: ${R.href}`,`Issued At: ${(i=(s=E==null?void 0:E.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=E==null?void 0:E.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${E.signInWithSolana.notBefore}`]:[],...!((o=E==null?void 0:E.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${E.signInWithSolana.expirationTime}`]:[],...!((c=E==null?void 0:E.signInWithSolana)===null||c===void 0)&&c.chainId?[`Chain ID: ${E.signInWithSolana.chainId}`]:[],...!((h=E==null?void 0:E.signInWithSolana)===null||h===void 0)&&h.nonce?[`Nonce: ${E.signInWithSolana.nonce}`]:[],...!((f=E==null?void 0:E.signInWithSolana)===null||f===void 0)&&f.requestId?[`Request ID: ${E.signInWithSolana.requestId}`]:[],...!((g=(m=E==null?void 0:E.signInWithSolana)===null||m===void 0?void 0:m.resources)===null||g===void 0)&&g.length?["Resources",...E.sign
548InWithSolana.resources.map(F=>`- ${F}`)]:[]].join(` 549`);const I=await M.signMessage(new TextEncoder().encode(v),"utf8");if(!I||!(I instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");j=I}}try{const{data:N,error:S}=await ke(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:$c(j)},!((x=e.options)===null||x===void 0)&&x.captchaToken?{gotrue_meta_security:{captcha_token:(y=e.options)===null||y===void 0?void 0:y.captchaToken}}:null),xform:Rr});if(S)throw S;if(!N||!N.session||!N.user){const A=new qu;return this._returnResult({data:{user:null,session:null},error:A})}return N.session&&(await this._saveSession(N.session),await this._notifyAllSubscribers("SIGNED_IN",N.session)),this._returnResult({data:Object.assign({},N),error:S})}catch(N){if(xe(N))return this._returnResult({data:{user:null,session:null},error:N});throw N}}async _exchangeCodeForSession(e){const t=await Ec(this.storage,`${this.storageKey}-code-verifier`),[s,i]=(t??"").split("/");try{if(!s&&this.flowType==="pkce")throw new MG;const{data:a,error:o}=await ke(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:Rr});if(await Ms(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!a||!a.session||!a.user){const c=new qu;return this._returnResult({data:{user:null,session:null,redirectType:null},error:c})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:o})}catch(a){if(await Ms(this.storage,`${this.storageKey}-code-verifier`),xe(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(e){try{const{options:t,provider:s,token:i,access_token:a,nonce:o}=e,c=await ke(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:i,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:t==null?void 0:t.captchaToken}},xform:Rr}),{data:h,error:f}=c;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!h||!h.session||!h.user){const m=new qu;return this._returnResult({data:{user:null,session:null},error:m})}return h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("SIGNED_IN",h.session)),this._returnResult({data:h,error:f})}catch(t){if(xe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async signInWithOtp(e){var t,s,i,a,o;try{if("email"in e){const{email:c,options:h}=e;let f=null,m=null;this.flowType==="pkce"&&([f,m]=await Ku(this.storage,this.storageKey));const{error:g}=await ke(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:c,data:(t=h==null?void 0:h.data)!==null&&t!==void 0?t:{},create_user:(s=h==null?void 0:h.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:f,code_challenge_method:m},redirectTo:h==null?void 0:h.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:g})}if("phone"in e){const{phone:c,options:h}=e,{data:f,error:m}=await ke(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:c,data:(i=h==null?void 0:h.data)!==null&&i!==void 0?i:{},create_user:(a=h==null?void 0:h.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},channel:(o=h==null?void 0:h.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:f==null?void 0:f.message_id},error:m})}throw new Ry("You must provide either an email or phone number.")}catch(c){if(await Ms(this.storage,`${this.storageKey}-code-verifier`),xe(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async verifyOtp(e){var t,s;try{let i,a;"options"in e&&(i=(t=e.options)===null||t===void 0?void 0:t.redirectTo,a=(s=e.options)===null||s===void 0?void 0:s.captchaToken);const{data:o,error:c}=await ke(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Rr});if(c)throw c;if(!o)throw new Error("An error occurred on token verification.");const h=o.session,f=o.user;return h!=null&&h.access_token&&(await this._saveSession(h),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",h)),this._returnResult({data:{user:f,session:h},error:null})}catch(i){if(xe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(e){var t,s,i,a,o;try{let c=null,h=null;this.flowType==="pkce"&&([c,h]=await Ku(this.storage,this.storageKey));const f=await ke(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(s=(t=e.options)===null||t===void 0?void 0:t.redirectTo)!==null&&s!==void 0?s:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:c,code_challenge_method:h}),headers:this.headers,xform:rq});return!((a=f.data)===null||a===void 0)&&a.url&&Is()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(f.data.url),this._returnResult(f)}catch(c){if(await Ms(this.storage,`${this.storageKey}-code-verifier`),xe(c))return this._returnResult({data:null,error:c});throw c}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:t},error:s}=e;if(s)throw s;if(!t)throw new ws;const{error:i}=await ke(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(e){if(xe(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const t=`${this.url}/resend`;if("email"in e){const{email:s,type:i,options:a}=e,{error:o}=await ke(this.fetch,"POST",t,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:s,type:i,options:a}=e,{data:o,error:c}=await ke(this.fetch,"POST",t,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:c})}throw new Ry("You must provide either an email or phone number and a type")}catch(t){if(xe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await s,await t()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=t();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const t=await Ec(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),t!==null&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not val
549id"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=e.expires_at?e.expires_at*1e3-Date.now()<O2:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.userStorage){const o=await Ec(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=B2()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=eq(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const t=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await ke(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ol}):await this._useSession(async t=>{var s,i,a;const{data:o,error:c}=t;if(c)throw c;return!(!((s=o.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ws}:await ke(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:ol})})}catch(t){if(xe(t))return Py(t)&&(await this._removeSession(),await Ms(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:t});throw t}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async s=>{const{data:i,error:a}=s;
549if(a)throw a;if(!i.session)throw new ws;const o=i.session;let c=null,h=null;this.flowType==="pkce"&&e.email!=null&&([c,h]=await Ku(this.storage,this.storageKey));const{data:f,error:m}=await ke(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:t==null?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:c,code_challenge_method:h}),jwt:o.access_token,xform:ol});if(m)throw m;return o.user=f.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(s){if(await Ms(this.storage,`${this.storageKey}-code-verifier`),xe(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ws;const t=Date.now()/1e3;let s=t,i=!0,a=null;const{payload:o}=Iy(e.access_token);if(o.exp&&(s=o.exp,i=s<=t),i){const{data:c,error:h}=await this._callRefreshToken(e.refresh_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!c)return{data:{user:null,session:null},error:null};a=c}else{const{data:c,error:h}=await this._getUser(e.access_token);if(h)return this._returnResult({data:{user:null,session:null},error:h});a={access_token:e.access_token,refresh_token:e.refresh_token,user:c.user,token_type:"bearer",expires_in:s-t,expires_at:s},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(t){if(xe(t))return this._returnResult({data:{session:null,user:null},error:t});throw t}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var s;if(!e){const{data:o,error:c}=t;if(c)throw c;e=(s=o.session)!==null&&s!==void 0?s:void 0}if(!(e!=null&&e.refresh_token))throw new ws;const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(t){if(xe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async _getSessionFromURL(e,t){var s;try{if(!Is())throw new My("No browser detected.");if(e.error||e.error_description||e.error_code)throw new My(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if(this.flowType==="pkce")throw new x3("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new My("Not a valid implicit grant flow url.");break;default:}if(t==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new x3("No code detected.");const{data:E,error:M}=await this._exchangeCodeForSession(e.code);if(M)throw M;const R=new URL(window.location.href);return R.searchParams.delete("code"),window.history.replaceState(window.history.state,"",R.toString()),{data:{session:E.session,redirectType:(s=E.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:i,provider_refresh_token:a,access_token:o,refresh_token:c,expires_in:h,expires_at:f,token_type:m}=e;if(!o||!h||!c||!m)throw new My("No session defined in URL");const g=Math.round(Date.now()/1e3),x=parseInt(h);let y=g+x;f&&(y=parseInt(f));const v=y-g;v*1e3<=lh&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${x}s`);const j=y-x;g-j>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",j,y,g):g-j<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",j,y,g);const{data:N,error:S}=await this._getUser(o);if(S)throw S;const A={provider_token:i,provider_refresh_token:a,access_token:o,expires_in:x,expires_at:y,refresh_token:c,token_type:m,user:N.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:A,redirectType:e.type},error:null})}catch(i){if(xe(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const t=await Ec(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var s;const{data:i,error:a}=t;if(a&&!Py(a))return this._returnResult({error:a});const o=(s=i.session)===null||s===void 0?void 0:s.access_token;if(o){const{error:c}=await this.admin.signOut(o,e);
549if(c&&!(PG(c)&&(c.status===404||c.status===401||c.status===403)||Py(c)))return this._returnResult({error:c})}return e!=="others"&&(await this._removeSession(),await Ms(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const t=$G(),s={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,s),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})))(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async t=>{var s,i;try{const{data:{session:a},error:o}=t;if(o)throw o;await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",a),Py(a)?console.warn(a):console.error(a)}})}async resetPasswordForEmail(e,t={}){let s=null,i=null;this.flowType==="pkce"&&([s,i]=await Ku(this.storage,this.storageKey,!0));try{return await ke(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:i,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(a){if(await Ms(this.storage,`${this.storageKey}-code-verifier`),xe(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var e;try{const{data:t,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(e=t.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var t;try{const{data:s,error:i}=await this._useSession(async a=>{var o,c,h,f,m;const{data:g,error:x}=a;if(x)throw x;const y=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(c=e.options)===null||c===void 0?void 0:c.scopes,queryParams:(h=e.options)===null||h===void 0?void 0:h.queryParams,skipBrowserRedirect:!0});return await ke(this.fetch,"GET",y,{headers:this.headers,jwt:(m=(f=g.session)===null||f===void 0?void 0:f.access_token)!==null&&m!==void 0?m:void 0})});if(i)throw i;return Is()&&!(!((t=e.options)===null||t===void 0)&&t.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),this._returnResult({data:{provider:e.provider,url:s==null?void 0:s.url},error:null})}catch(s){if(xe(s))return this._returnResult({data:{provider:e.provider,url:null},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async t=>{var s;try{const{error:i,data:{session:a}}=t;if(i)throw i;const{options:o,provider:c,token:h,access_token:f,nonce:m}=e,g=await ke(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=a==null?void 0:a.access_token)!==null&&s!==void 0?s:void 0,body:{provider:c,id_token:h,access_token:f,nonce:m,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Rr}),{data:x,error:y}=g;return y?this._returnResult({data:{user:null,session:null},error:y}):!x||!x.session||!x.user?this._returnResult({data:{user:null,session:null},error:new qu}):(x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("USER_UPDATED",x.session)),this._returnResult({data:x,error:y}))}catch(i){if(await Ms(this.storage,`${this.storageKey}-code-verifier`),xe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{var s,i;const{data:a,error:o}=t;if(o)throw o;return await ke(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const s=Date.now();return await VG(async i=>(i>0&&await zG(200*Math.pow(2,i-1)),this._debug(t,"refreshing attempt",i),await ke(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Rr})),(i,a)=>{const o=200*Math.pow(2,i);return a&&F2(a)&&Date.now()+o-s<lh})}catch(s){if(this._debug(t,"error",s),xe(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(t,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){const s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",s),Is()&&!t.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e,t;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const i=await Ec(this.storage,this.storageKey);if(i&&this.userStorage){let o=await Ec(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},await ch(this.userStorage,this.storageKey+"-user",o)),i.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:B2()}else if(i&&!i.user&&!i.user){const o=await Ec(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,await Ms(this.storage,this.storageKey+"-user"),await ch(this.storage,this.storageKey,i)):i.user=B2()}
549if(this._debug(s,"session from storage",i),!this._isValidSession(i)){this._debug(s,"session is not valid"),i!==null&&await this._removeSession();return}const a=((t=i.expires_at)!==null&&t!==void 0?t:1/0)*1e3-Date.now()<O2;if(this._debug(s,`session has${a?"":" not"} expired with margin of ${O2}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),F2(o)||(this._debug(s,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:c}=await this._getUser(i.access_token);!c&&(o!=null&&o.user)?(i.user=o.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(s,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(s,"error",i),console.error(i);return}finally{this._debug(s,"end")}}async _callRefreshToken(e){var t,s;if(!e)throw new ws;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new iw;const{data:a,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!a.session)throw new ws;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const c={data:a.session,error:null};return this.refreshingDeferred.resolve(c),c}catch(a){if(this._debug(i,"error",a),xe(a)){const o={data:null,error:a};return F2(a)||await this._removeSession(),(t=this.refreshingDeferred)===null||t===void 0||t.resolve(o),o}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,t,s=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",t,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:t});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async c=>{try{await c.callback(e,t)}catch(h){a.push(h)}});if(await Promise.all(o),a.length>0){for(let c=0;c<a.length;c+=1)console.error(a[c]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Ms(this.storage,`${this.storageKey}-code-verifier`);const t=Object.assign({},e),s=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&t.user&&await ch(this.userStorage,this.storageKey+"-user",{user:t.user});const i=Object.assign({},t);delete i.user;const a=j3(i);await ch(this.storage,this.storageKey,a)}else{const i=j3(t);await ch(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ms(this.storage,this.storageKey),await Ms(this.storage,this.storageKey+"-code-verifier"),await Ms(this.storage,this.storageKey+"-user"),this.userStorage&&await Ms(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Is()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(t){console.error("removing visibilitychange callback failed",t)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),lh);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async t=>{const{data:{session:s}}=t;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((s.expires_at*1e3-e)/lh);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${lh}ms, refresh threshold is ${rk} ticks`),i<=rk&&await this._callRefreshToken(s.refresh_token)})}catch(t){console.error("Auto refresh tick failed with error. This is likely a transient error.",t)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof GM)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Is()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(
549await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,s){const i=[`provider=${encodeURIComponent(t)}`];if(s!=null&&s.redirectTo&&i.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s!=null&&s.scopes&&i.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[a,o]=await Ku(this.storage,this.storageKey),c=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(c.toString())}if(s!=null&&s.queryParams){const a=new URLSearchParams(s.queryParams);i.push(a.toString())}return s!=null&&s.skipBrowserRedirect&&i.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var s;const{data:i,error:a}=t;return a?this._returnResult({data:null,error:a}):await ke(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _enroll(e){try{return await this._useSession(async t=>{var s,i;const{data:a,error:o}=t;if(o)return this._returnResult({data:null,error:o});const c=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:h,error:f}=await ke(this.fetch,"POST",`${this.url}/factors`,{body:c,headers:this.headers,jwt:(s=a==null?void 0:a.session)===null||s===void 0?void 0:s.access_token});return f?this._returnResult({data:null,error:f}):(e.factorType==="totp"&&h.type==="totp"&&(!((i=h==null?void 0:h.totp)===null||i===void 0)&&i.qr_code)&&(h.totp.qr_code=`data:image/svg+xml;utf-8,${h.totp.qr_code}`),this._returnResult({data:h,error:null}))})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{var s;const{data:i,error:a}=t;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?T3(e.webauthn.credential_response):P3(e.webauthn.credential_response)})}:{code:e.code}),{data:c,error:h}=await ke(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return h?this._returnResult({data:null,error:h}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+c.expires_in},c)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),this._returnResult({data:c,error:h}))})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{var s;const{data:i,error:a}=t;if(a)return this._returnResult({data:null,error:a});const o=await ke(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(o.error)return o;const{data:c}=o;if(c.type!=="webauthn")return{data:c,error:null};switch(c.webauthn.type){case"create":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:E3(c.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},c),{webauthn:Object.assign(Object.assign({},c.webauthn),{credential_options:Object.assign(Object.assign({},c.webauthn.credential_options),{publicKey:C3(c.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}})}async _challengeAndVerify(e){const{data:t,error:s}=await this._challenge({factorId:e.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){var e;const{data:{user:t},error:s}=await this.getUser();if(s)return{data:null,error:s};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(e=t==null?void 0:t.factors)!==null&&e!==void 0?e:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(e){var t,s,i,a;if(e)try{const{payload:y}=Iy(e);let v=null;y.aal&&(v=y.aal);let j=v;const{data:{user:N},error:S}=await this.getUser(e);if(S)return this._returnResult({data:null,error:S});((s=(t=N==null?void 0:N.factors)===null||t===void 0?void 0:t.filter(M=>M.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(j="aal2");const E=y.amr||[];return{data:{currentLevel:v,nextLevel:j,currentAuthenticationMethods:E},error:null}}catch(y){if(xe(y))return this._returnResult({data:null,error:y});throw y}const{data:{session:o},error:c}
549=await this.getSession();if(c)return this._returnResult({data:null,error:c});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:h}=Iy(o.access_token);let f=null;h.aal&&(f=h.aal);let m=f;((a=(i=o.user.factors)===null||i===void 0?void 0:i.filter(y=>y.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(m="aal2");const x=h.amr||[];return{data:{currentLevel:f,nextLevel:m,currentAuthenticationMethods:x},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{const{data:{session:s},error:i}=t;return i?this._returnResult({data:null,error:i}):s?await ke(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:s.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new ws})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _approveAuthorization(e,t){try{return await this._useSession(async s=>{const{data:{session:i},error:a}=s;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new ws});const o=await ke(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:c=>({data:c,error:null})});return o.data&&o.data.redirect_url&&Is()&&!(t!=null&&t.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(s){if(xe(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(e,t){try{return await this._useSession(async s=>{const{data:{session:i},error:a}=s;
549if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new ws});const o=await ke(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:c=>({data:c,error:null})});return o.data&&o.data.redirect_url&&Is()&&!(t!=null&&t.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(s){if(xe(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:t},error:s}=e;return s?this._returnResult({data:null,error:s}):t?await ke(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new ws})})}catch(e){if(xe(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{const{data:{session:s},error:i}=t;return i?this._returnResult({data:null,error:i}):s?(await ke(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ws})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async fetchJwk(e,t={keys:[]}){let s=t.keys.find(c=>c.kid===e);if(s)return s;const i=Date.now();if(s=this.jwks.keys.find(c=>c.kid===e),s&&this.jwks_cached_at+CG>i)return s;const{data:a,error:o}=await ke(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,s=a.keys.find(c=>c.kid===e),!s)?null:s}async getClaims(e,t={}){try{let s=e;if(!s){const{data:y,error:v}
549=await this.getSession();if(v||!y.session)return this._returnResult({data:null,error:v});s=y.session.access_token}const{header:i,payload:a,signature:o,raw:{header:c,payload:h}}=Iy(s);t!=null&&t.allowExpired||JG(a.exp);const f=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,t!=null&&t.keys?{keys:t.keys}:t==null?void 0:t.jwks);if(!f){const{error:y}=await this.getUser(s);if(y)throw y;return{data:{claims:a,header:i,signature:o},error:null}}const m=QG(i.alg),g=await crypto.subtle.importKey("jwk",f,m,!0,["verify"]);if(!await crypto.subtle.verify(m,g,o,FG(`${c}.${h}`)))throw new ok("Invalid JWT signature");return{data:{claims:a,header:i,signature:o},error:null}}catch(s){if(xe(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(e){var t,s,i;ci(this.experimental);try{if(!sv())return this._returnResult({data:null,error:new Ai("Browser does not support WebAuthn",null)});const{data:a,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(t=e==null?void 0:e.options)===null||t===void 0?void 0:t.captchaToken}});if(o||!a)return this._returnResult({data:null,error:o});const c=C3(a.options),h=(i=(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.signal)!==null&&i!==void 0?i:lk.createNewAbortSignal(),{data:f,error:m}=await YM({publicKey:c,signal:h});if(m||!f)return this._returnResult({data:null,error:m??new Ai("WebAuthn ceremony failed",null)});const g=P3(f);return this._verifyPasskeyAuthentication({challengeId:a.challenge_id,credential:g})}catch(a){if(xe(a))return this._returnResult({data:null,error:a});throw a}}async registerPasskey(e){var t,s;ci(this.experimental);try{if(!sv())return this._returnResult({data:null,error:new Ai("Browser does not support WebAuthn",null)});const{data:i,error:a}=await this._startPasskeyRegistration();if(a||!i)return this._returnResult({data:null,error:a});const o=E3(i.options),c=(s=(t=e==null?void 0:e.options)===null||t===void 0?void 0:t.signal)!==null&&s!==void 0?s:lk.createNewAbortSignal(),{data:h,error:f}=await XM({publicKey:o,signal:c});if(f||!h)return this._returnResult({data:null,error:f??new Ai("WebAuthn ceremony failed",null)});const m=T3(h);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:m})}catch(i){if(xe(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){ci(this.experimental);try{return await this._useSession(async e=>{const{data:{session:t},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!t)return this._returnResult({data:null,error:new ws});const{data:i,error:a}=await ke(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(xe(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){ci(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:i}=t;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ws});const{data:a,error:o}=await ke(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _startPasskeyAuthentication(e){var t;ci(this.experimental);try{const{data:s,error:i}=await ke(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(t=e==null?void 0:e.options)===null||t===void 0?void 0:t.captchaToken}}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})}catch(s){if(xe(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(e){ci(this.experimental);try{const{data:t,error:s}=await ke(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Rr});return s?this._returnResult({data:null,error:s}):(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:t,error:null}))}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _listPasskeys(){ci(this.experimental);try{return await this._useSession(async e=>{const{data:{session:t},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!t)return this._returnResult({data:null,error:new ws});const{data:i,error:a}=await ke(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:o=>({data:o,error:null})});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(xe(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){ci(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:i}=t;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ws});const{data:a,error:o}=await ke(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:a,error:null})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}async _deletePasskey(e){ci(this.experimental);try{return await this._useSession(async t=>{const{data:{session:s},error:i}=t;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ws});const{error:a}
549=await ke(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return a?this._returnResult({data:null,error:a}):this._returnResult({data:null,error:null})})}catch(t){if(xe(t))return this._returnResult({data:null,error:t});throw t}}}tg.nextInstanceID={};const jq=tg,Nq="2.105.1";let kp="";typeof Deno<"u"?kp="deno":typeof document<"u"?kp="web":typeof navigator<"u"&&navigator.product==="ReactNative"?kp="react-native":kp="node";const kq={"X-Client-Info":`supabase-js-${kp}/${Nq}`},Sq={headers:kq},Aq={schema:"public"},_q={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Eq={};function sg(r){"@babel/helpers - typeof";return sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sg(r)}function Cq(r,e){if(sg(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var s=t.call(r,e);if(sg(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Tq(r){var e=Cq(r,"string");return sg(e)=="symbol"?e:e+""}function Pq(r,e,t){return(e=Tq(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function M3(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,s)}return t}function Gt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?M3(Object(t),!0).forEach(function(s){Pq(r,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):M3(Object(t)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(t,s))})}return r}const Rq=r=>r?(...e)=>r(...e):(...e)=>fetch(...e),Mq=()=>Headers,Iq=(r,e,t)=>{const s=Rq(t),i=Mq();return async(a,o)=>{var c;const h=(c=await e())!==null&&c!==void 0?c:r;let f=new i(o==null?void 0:o.headers);return f.has("apikey")||f.set("apikey",r),f.has("Authorization")||f.set("Authorization",`Bearer ${h}`),s(a,Gt(Gt({},o),{},{headers:f}))}};function Lq(r){return r.endsWith("/")?r:r+"/"}function Dq(r,e){var t,s;const{db:i,auth:a,realtime:o,global:c}=r,{db:h,auth:f,realtime:m,global:g}=e,x={db:Gt(Gt({},h),i),auth:Gt(Gt({},f),a),realtime:Gt(Gt({},m),o),storage:{},global:Gt(Gt(Gt({},g),c),{},{headers:Gt(Gt({},(t=g==null?void 0:g.headers)!==null&&t!==void 0?t:{}),(s=c==null?void 0:c.headers)!==null&&s!==void 0?s:{})}),accessToken:async()=>""};return r.accessToken?x.accessToken=r.accessToken:delete x.accessToken,x}function Oq(r){const e=r==null?void 0:r.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Lq(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Fq=class extends jq{constructor(r){super(r)}},Bq=class{constructor(r,e,t){var s,i;this.supabaseUrl=r,this.supabaseKey=e;const a=Oq(r);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const o=`sb-${a.hostname.split(".")[0]}-auth-token`,c={db:Aq,realtime:Eq,auth:Gt(Gt({},_q),{},{storageKey:o}),global:Sq},h=Dq(t??{},c);if(this.storageKey=(s=h.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=h.global.headers)!==null&&i!==void 0?i:{},h.accessToken)this.accessToken=h.accessToken,this.auth=new Proxy({},{get:(m,g)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(g)} is not possible`)}});else{var f;this.auth=this._initSupabaseAuthClient((f=h.auth)!==null&&f!==void 0?f:{},this.headers,h.global.fetch)}this.fetch=Iq(e,this._getAccessToken.bind(this),h.global.fetch),this.realtime=this._initRealtimeClient(Gt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},h.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(m=>this.realtime.setAuth(m)).catch(m=>console.warn("Failed to set initial Realtime auth token:",m)),this.rest=new fW(new URL("rest/v1",a).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch,timeout:h.db.timeout,urlLengthLimit:h.db.urlLengthLimit}),this.storage=new kG(this.storageUrl.href,this.headers,this.fetch,t==null?void 0:t.storage),h.accessToken||this._listenForAuthEvents()}get functions(){return new nW(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(r){return this.rest.from(r)}schema(r){return this.rest.schema(r)}rpc(r,e={},t={head:!1,get:!1,count:void 0}){return this.rest.rpc(r,e,t)}channel(r,e={config:{}}){return this.realtime.channel(r,e)}getChannels(){return this.realtime.getChannels()}removeChannel(r){return this.realtime.removeChannel(r)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var r=this,e,t;if(r.accessToken)return await r.accessToken();const{data:s}=await r.auth.getSession();return(e=(t=s.session)===null||t===void 0?void 0:t.access_token)!==null&&e!==void 0?e:r.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:r,persistSession:e,detectSessionInUrl:t,storage:s,userStorage:i,storageKey:a,flowType:o,lock:c,debug:h,throwOnError:f,experimental:m},g,x){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Fq({url:this.authUrl.href,headers:Gt(Gt({},y),g),storageKey:a,autoRefreshToken:r,persistSession:e,detectSessionInUrl:t,storage:s,userStorage:i,flowType:o,lock:c,debug:h,throwOnError:f,experimental:m,fetch:x,hasCustomAuthorizationHeader:Object.keys(this.headers).some(v=>v.toLowerCase()==="authorization")})}_initRealtimeClient(r){return new qW(this.realtimeUrl.href,Gt(Gt({},r),{},{params:Gt(Gt({},{apikey:this.supabaseKey}),r==null?void 0:r.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,e)=>{this._handleTokenChanged(r,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(r,e,t){(r==="TOKEN_REFRESHED"||r==="SIGNED_IN")&&this.changedAccessToken!==t?(this.changedAccessToken=t,this.realtime.setAuth(t)):r==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const $q=(r,e,t)=>new Bq(r,e,t);function Uq(){if(typeof window<"u")return!1;const r=globalThis.process;if(!r)return!1;const e=r.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}Uq()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
549ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const Hq="https://vtwwmgltkwnlgjqojtcu.supabase.co",zq="sb_publishable_qWCnUlME_ZcfBQ1Gc4itIg_sZ7YPH6U",Me=$q(Hq,zq),Vq=()=>{const r=Zf(),[e,t]=T.useState(""),[s,i]=T.useState(""),[a,o]=T.useState(!1),[c,h]=T.useState(null),f=async m=>{m.preventDefault(),o(!0),h(null);try{const{data:g,error:x}=await Me.auth.signInWithPassword({email:e,password:s});if(x)throw x;g.user&&(console.log("Login successful:",g.user),r("/agency"))}catch(g){console.error("Login error:",g),h("ãã°ã¤ã³ã«å¤±æãã¾ãããIDã¾ãã¯ãã¹ã¯ã¼ãã確èªãã¦ãã ããã")}finally{o(!1)}};return n.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 relative overflow-hidden font-inter",children:[n.jsxs("div",{className:"absolute top-0 left-0 w-full h-full overflow-hidden pointer-events-none",children:[n.jsx("div",{className:"absolute top-[-10%] right-[-5%] w-[500px] h-[500px] bg-gradient-to-br from-blue-400/20 to-cyan-300/20 rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-[-10%] left-[-5%] w-[600px] h-[600px] bg-gradient-to-tr from-blue-600/10 to-purple-500/10 rounded-full blur-3xl"})]}),n.jsxs(Ce.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md bg-white rounded-2xl shadow-xl p-8 z-10 border border-slate-100",children:[n.jsxs(q,{to:"/",className:"inline-flex items-center gap-2 text-[10px] font-black uppercase tracking-widest text-slate-400 hover:text-blue-600 transition-colors mb-8 group",children:[n.jsx(rH,{size:12,className:"group-hover:-translate-x-1 transition-transform"}),"Back to Top"]}),n.jsxs("div",{className:"text-center mb-8",children:[n.jsx("img",{src:"/assets/MH.png",alt:"Meta Heroes",className:"h-16 sm:h-20 w-auto mx-auto mb-6 transition-transform hover:scale-105 duration-300"}),n.jsx("h1",{className:"text-2xl font-bold text-slate-800 uppercase tracking-tight",children:"Sales Portal"}),n.jsx("p",{className:"text-slate-500 text-sm mt-2 font-medium",children:"MetaHeroes ã»ã¼ã«ã¹ãã¼ã¿ã«"})]}),c&&n.jsxs("div",{className:"mb-6 p-4 bg-red-50 border border-red-100 rounded-lg flex items-start gap-3",children:[n.jsx(fH,{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5"}),n.jsx("p",{className:"text-sm text-red-600",children:c})]}),n.jsxs("form",{onSubmit:f,className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-bold text-slate-500 uppercase tracking-wider mb-1.5",children:"Email Address"}),n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-slate-400",children:n.jsx(Uv,{size:18})}),n.jsx("input",{type:"email",required:!0,value:e,onChange:m=>t(m.target.value),autoComplete:"email",className:"w-full pl-10 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all outline-none text-slate-800 text-sm",placeholder:"[email protected]"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-bold text-slate-500 uppercase tracking-wider mb-1.5",children:"Password"}),n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-slate-400",children:n.jsx(KH,{size:18})}),n.jsx("input",{type:"password",required:!0,value:s,onChange:m=>i(m.target.value),autoComplete:"current-password",className:"w-full pl-10 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all outline-none text-slate-800 text-sm",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢"})]})]}),n.jsx("button",{type:"submit",disabled:a,className:"w-full bg-gradient-to-r from-blue-600 to-cyan-500 text-white font-bold py-3 rounded-full hover:shadow-lg hover:shadow-blue-500/30 transition-all duration-300 transform active:scale-[0.98] flex items-center justify-center gap-2 disabled:opacity-70 disabled:cursor-not-allowed uppercase text-sm tracking-widest",children:a?n.jsx("span",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):n.jsxs(n.Fragment,{children:["Login",n.jsx(aH,{size:18})]})})]}),n.jsxs("div",{className:"my-8 flex items-center gap-4",children:[n.jsx("div",{className:"h-px bg-slate-100 flex-1"}),n.jsx("span",{className:"text-[10px] text-slate-300 font-black uppercase tracking-widest",children:"or"}),n.jsx("div",{className:"h-px bg-slate-100 flex-1"})]}),n.jsxs("button",{onClick:async()=>{o(!0);try{const{error:m}=await Me.auth.signInWithPassword({email:"[email protected]",password:"GuestHero2026"});if(m)throw m;r("/agency")}catch(m){console.error("Guest login error:",m),h("ã²ã¹ããã°ã¤ã³ã«å¤±æãã¾ããã"),o(!1)}},disabled:a,className:"w-full bg-white border border-slate-200 text-slate-500 font-bold py-3 rounded-full hover:bg-slate-50 hover:border-slate-300 transition-all duration-300 flex items-center justify-center gap-2 disabled:opacity-70 disabled:cursor-not-allowed group text-xs tracking-widest uppercase",children:[n.jsx(b7,{size:16}),"Guest Access (View Only)"]}),n.jsx("div",{className:"mt-8 text-center",children:n.jsx("p",{className:"text-[10px] text-slate-400 font-medium",children:"â» ã¢ã«ã¦ã³ãããæã¡ã§ãªãå ´åã¯ãæ
å½å¶æ¥ã¾ã§ãåãåãããã ããã"})})]})]})},Wq=[[{title:"伿¥æ
å ±",path:"/about",links:[{label:"代表ã¡ãã»ã¼ã¸",path:"/ceo-message"},{label:"ä¼ç¤¾æ¦è¦",path:"/about/profile"},{label:"MetaHeroesã®ä½¿å½",path:"/about/mission"},{label:"MetaHeroesã«ã¤ãã¦",path:"/about/company"},{label:"äºæ¥æã»æ½è¨",path:"/about/offices"},{label:"è¡åè¦ç¯",path:"/about/conduct"},{label:"ã°ã«ã¼ãä¼ç¤¾",path:"/about/group"}]}],[{title:"äºæ¥å
容",path:"/business",links:[{label:"XRäºæ¥",path:"/business"},{label:"AIäºæ¥",path:"/business"},{label:"ã¤ãã³ãäºæ¥",path:"/business"},{label:"æ½è¨æ´»ç¨äºæ¥",path:"/business"}]},{title:"ãµã¼ãã¹",path:"/services",links:[{label:"AIã»XRã½ãªã¥ã¼ã·ã§ã³",path:"/services#digital"},{label:"æè²Ããã¯ããã¸ã¼",path:"/services#education"},{label:"ã¤ãã³ãã»ã³ãã¥ããã£ã»å
±åµ",path:"/services#community"}]}],[{title:"å®ç¸¾ã»ã¡ã³ãã¼",path:"/works",links:[{label:"äºä¾ã»å®ç¸¾",path:"/works"},{label:"ã®ã£ã©ãªã¼",path:"/gallery"},{label:"ã¡ã³ãã¼ããã°",path:"/members/blog"}]},{title:"ãã®ä»",path:"#",links:[{label:"ãã¥ã¼ã¹ä¸è¦§",path:"/news"},{label:"æ¡ç¨æ
å ±",path:"/recruit"},{label:"ãåãåãã",path:"/contact"},{label:"ãå½¹ç«ã¡è³æ",path:"/document-request"},{label:"代çåºå°ç¨",path:"/agency-login"}]}]],Gq=({section:r})=>{const[e,t]=T.useState(!1);return n.jsxs("div",{className:"w-full border-b border-gray-100 last:border-0 md:border-0",children:[n.jsxs("button",{onClick:()=>t(!e),className:"w-full flex items-center justify-between py-4 md:py-0 md:cursor-default group",children:[n.jsx("h3",{className:"text-gray-900 font-black text-sm tracking-widest md:mb-4 md:border-l-4 border-blue-600 md:pl-4",children:r.path!=="#"?n.jsx(q,{to:r.path,className:"hover:text-blue-600 transition-colors pointer-events-auto",children:r.title}):r.title}),n.jsx(Vs,{className:`w-5 h-5 text-gray-400 transition-transform duration-300 md:hidden ${e?"rotate-180":""}`})]}),n.jsx(an,{children:e&&n.jsx(Ce.ul,{initial:{height:0,opacity:0}
549,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden md:hidden pb-4 space-y-3",children:r.links.map(s=>n.jsx("li",{children:s.path.startsWith("http")?n.jsx("a",{href:s.path,target:"_blank",rel:"noopener noreferrer",className:`text-xs font-bold transition-colors block pl-4 ${s.label==="代çåºå°ç¨"?"text-blue-600 hover:text-gray-500":"text-gray-500 hover:text-blue-600"}`,children:s.label}):n.jsx(q,{to:s.path,className:`text-xs font-bold transition-colors block pl-4 ${s.label==="代çåºå°ç¨"?"text-blue-600 hover:text-gray-500":"text-gray-500 hover:text-blue-600"}`,children:s.label})},s.label))})}),n.jsx("ul",{className:"hidden md:block space-y-3",children:r.links.map(s=>n.jsx("li",{children:s.path.startsWith("http")?n.jsx("a",{href:s.path,target:"_blank",rel:"noopener noreferrer",className:`text-[13px] font-bold transition-colors block ${s.label==="代çåºå°ç¨"?"text-blue-600 hover:text-gray-500":"text-gray-500 hover:text-blue-600"}`,children:s.label}):n.jsx(q,{to:s.path,className:`text-[13px] font-bold transition-colors block ${s.label==="代çåºå°ç¨"?"text-blue-600 hover:text-gray-500":"text-gray-500 hover:text-blue-600"}`,children:s.label})},s.label))})," "]})},qq=()=>n.jsxs("footer",{className:"bg-white border-t border-gray-100 pt-10 md:pt-24 pb-12",children:[n.jsx("svg",{width:"0",height:"0",className:"absolute",children:n.jsx("defs",{children:n.jsxs("linearGradient",{id:"footer-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"#2563eb"}),n.jsx("stop",{offset:"100%",stopColor:"#06b6d4"})]})})}),n.jsxs("div",{className:"container mx-auto px-4 sm:px-8",children:[n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-x-6 gap-y-0 md:gap-y-12 mb-12",children:Wq.map((r,e)=>n.jsx("div",{className:"flex flex-col gap-0 md:gap-10",children:r.map(t=>n.jsx(Gq,{section:t},t.title))},e))}),n.jsxs("div",{className:"flex flex-col items-center pt-10 md:pt-12 border-t border-gray-50",children:[n.jsx(q,{to:"/",className:"mb-12 hover:opacity-80 transition-opacity",children:n.jsx("img",{src:"/assets/MH.png",alt:"Meta Heroes",className:"h-10 w-auto grayscale opacity-50 hover:grayscale-0 hover:opacity-100 transition-all duration-500"})}),n.jsxs("div",{className:"flex flex-wrap justify-center items-center gap-x-8 gap-y-3 mb-10",children:[n.jsx(q,{to:"/about/privacy",className:"text-gray-400 hover:text-gray-600 transition-colors text-[10px] tracking-wider uppercase font-bold",children:"Privacy Policy"}),n.jsx(q,{to:"/contact/privacy",className:"text-gray-400 hover:text-gray-600 transition-colors text-[10px] tracking-wider uppercase font-bold",children:"Contact Privacy"}),n.jsx(q,{to:"/contact",className:"text-gray-400 hover:text-gray-600 transition-colors text-[10px] tracking-wider uppercase font-bold",children:"Contact"})]}),n.jsxs("div",{className:"flex gap-4 mb-10",children:[n.jsx("a",{href:"https://line.me/R/ti/p/@226osklk?ts=01231849&oat_content=url",target:"_blank",rel:"noopener noreferrer","aria-label":"LINE",className:"w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-500 hover:bg-[#06C755] hover:text-white transition-all duration-300",children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"w-5 h-5",children:n.jsx("path",{d:"M12 2.5C7.2 2.5 3.5 5.6 3.5 9.4c0 2.3 1.4 4.4 3.5 5.7 0.3 0.1 0.6 0.4 0.5 0.9l-0.6 2.1c-0.2 0.7 0.5 1.1 1 0.6l2.9-2.2c0.4-0.3 0.9-0.5 1.4-0.5 0.2 0 0.5 0 0.7 0 5.4 0 9-3.1 9-6.9 0-3.8-3.6-6.9-9.9-6.9z"})})}),n.jsx("a",{href:"https://x.com/MetaHeroes_100",target:"_blank",rel:"noopener noreferrer","aria-label":"X (Twitter)",className:"w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-500 hover:bg-black hover:text-white transition-all duration-300",children:n.jsx(x7,{size:20})}),n.jsx("a",{href:"https://www.facebook.com/people/%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BEMetaHeroes/100094289003996/",target:"_blank",rel:"noopener noreferrer","aria-label":"Facebook",className:"w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-500 hover:bg-[#1877F2] hover:text-white transition-all duration-300",children:n.jsx(SH,{size:20})}),n.jsx("a",{href:"https://www.instagram.com/metaheroes100/?utm_source=ig_web_button_share_sheet&igsh=ZDNlZDc0MzIxNw%3D%3D",target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",className:"w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-500 hover:bg-[#
549E4405F] hover:text-white transition-all duration-300",children:n.jsx(MH,{size:20})}),n.jsx("a",{href:"https://www.youtube.com/@MetaHeroes",target:"_blank",rel:"noopener noreferrer","aria-label":"YouTube",className:"w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-500 hover:bg-[#FF0000] hover:text-white transition-all duration-300",children:n.jsx(k7,{size:20})})]}),n.jsx("div",{className:"text-center",children:n.jsxs("p",{className:"text-gray-300 text-[10px] tracking-widest uppercase font-bold",children:["© ",new Date().getFullYear()," Meta Heroes Inc. All rights reserved."]})})]})]})]}),I3=[{label:"伿¥æ
å ±",en:"ABOUT",path:"/about",children:[{label:"代表ã¡ãã»ã¼ã¸",path:"/ceo-message"},{label:"ä¼ç¤¾æ¦è¦",path:"/about/profile"},{label:"MetaHeroesã®ä½¿å½",path:"/about/mission"},{label:"MetaHeroesã«ã¤ãã¦",path:"/about/company"},{label:"äºæ¥æã»æ½è¨",path:"/about/offices"},{label:"è¡åè¦ç¯",path:"/about/conduct"},{label:"ã°ã«ã¼ãä¼ç¤¾",path:"/about/group"}]},{label:"äºæ¥å
容",en:"BUSINESS",path:"/business",children:[{label:"XRäºæ¥",path:"/business"},{label:"AIäºæ¥",path:"/business"},{label:"ã¤ãã³ãäºæ¥",path:"/business"},{label:"æ½è¨æ´»ç¨äºæ¥",path:"/business"}]},{label:"ãµã¼ãã¹",en:"SERVICE",path:"/services",children:[{label:"AIã»XRã½ãªã¥ã¼ã·ã§ã³",path:"/services#digital"},{label:"æè²Ããã¯ããã¸ã¼",path:"/services#education"},{label:"ã¤ãã³ãã»ã³ãã¥ããã£ã»å
±åµ",path:"/services#community"}]},{label:"å®ç¸¾",en:"WORKS",path:"/works",children:[{label:"äºä¾ã»å®ç¸¾",path:"/works"},{label:"ã®ã£ã©ãªã¼",path:"/gallery"}]},{label:"ã¡ã³ãã¼",en:"MEMBERS",path:"/members",children:[{label:"ã¡ã³ãã¼ä¸è¦§",path:"/members/list"},{label:"ã¡ã³ãã¼ããã°ä¸è¦§",path:"/members/blog"}]},{label:"ãã¥ã¼ã¹",en:"NEWS",path:"/news",children:[{label:"ãã¥ã¼ã¹ä¸è¦§",path:"/news"},{label:"ãã¬ãã¸",path:"/knowledge"}]},{label:"æ¡ç¨æ
å ±",en:"RECRUIT",path:"/recruit"}],Kq=()=>{const[r,e]=T.useState(!1),[t,s]=T.useState(null),[i,a]=T.useState(!1),[o,c]=T.useState(null),h=Kt(),f=h.pathname==="/";T.useEffect(()=>{const x=()=>{e(window.scrollY>50)};return window.addEventListener("scroll",x),()=>window.removeEventListener("scroll",x)},[]),T.useEffect(()=>(i?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[i]),T.useEffect(()=>{a(!1)},[h]);const m=()=>f&&!r&&!i?"text-white":"text-gray-700",g=()=>i?"bg-gray-900":f&&!r?"bg-white":"bg-gray-900";return n.jsxs(n.Fragment,{children:[n.jsxs("header",{className:`fixed top-0 left-0 right-0 z-[101] transition-all duration-300 ${i?"bg-white h-20 sm:h-24":r?"bg-white/80 backdrop-blur-xl border-b border-gray-100 h-16 sm:h-20 shadow-sm":"bg-transparent h-20 sm:h-24"}`,children:[n.jsx("svg",{width:"0",height:"0",className:"absolute",children:n.jsx("defs",{children:n.jsxs("linearGradient",{id:"nav-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[n.jsx("stop",{offset:"0%",stopColor:"#2563eb"}),n.jsx("stop",{offset:"100%",stopColor:"#06b6d4"})]})})}),n.jsxs("div",{className:"container mx-auto px-4 sm:px-8 h-full flex items-center justify-between",children:[n.jsx(q,{to:"/",className:"flex items-center hover:opacity-80 transition-opacity z-50 flex-shrink-0 max-w-[60%] sm:max-w-none",children:n.jsx("img",{src:"/assets/MH.png",alt:"Meta Heroes",className:`h-10 sm:h-12 w-auto transition-all duration-300 ${f&&!r&&!i?"brightness-0 invert":""}`})}),n.jsxs("nav",{className:"hidden lg:flex items-center gap-1 xl:gap-4",children:[I3.map(x=>n.jsxs("div",{className:"relative flex flex-col items-center group px-2 py-4",onMouseEnter:()=>s(x.label),onMouseLeave:()=>s(null),children:[n.jsx(q,{to:x.path,className:"relative block px-3 z-10 h-7 overflow-hidden",children:n.jsxs("div",{className:"flex flex-col transition-transform duration-700 ease-[0.19,1,0.22,1] group-hover:-translate-y-1/2",children:[n.jsx("span",{className:`flex items-center justify-center h-7 text-[13px] font-bold tracking-wider transition-colors duration-700 ${t===x.label?"text-cyan-500":m()}`,children:x.label}),n.jsx("span",{className:"flex items-center justify-center h-7 text-[11px] font-black tracking-[0.15em] group-hover:tracking-[0.25em] uppercase bg-gradient-to-r from-blue-600 via-cyan-400 to-blue-600 bg-clip-text text-transparent transition-all duration-700 ease-[0.19,1,0.22,1]",children:x.en})]})}),n.jsx(an,{children:x.children&&t===x.label&&n.jsxs(Ce.div,{initial:{opacity:0,y:8,scale:.99,filter:"blur(4px)"}
549,animate:{opacity:1,y:0,scale:1,filter:"blur(0px)"},exit:{opacity:0,y:6,scale:.99,filter:"blur(2px)"},transition:{duration:.25,ease:[.23,1,.32,1]},className:"absolute top-[calc(100%+4px)] w-72 bg-white shadow-[0_25px_50px_-12px_rgba(0,0,0,0.25)] rounded-sm overflow-hidden border border-gray-100 ring-1 ring-black/5",children:[n.jsx("div",{className:"absolute top-0 inset-x-0 h-[2px] bg-gradient-to-r from-blue-600 via-cyan-400 to-blue-600"}),n.jsx("div",{className:"relative z-10 flex flex-col py-2",children:x.children.map(y=>n.jsxs(q,{to:y.path,className:"group/item relative flex items-center justify-between px-8 py-4 hover:bg-gray-50 transition-all duration-300",children:[n.jsx("span",{className:"text-[13px] font-bold text-gray-500 group-hover/item:text-gray-900 group-hover/item:translate-x-1 transition-all duration-300 tracking-wide",children:y.label}),n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-4 h-4 text-cyan-500 opacity-0 -translate-x-2 group-hover/item:opacity-100 group-hover/item:translate-x-0 transition-all duration-300 ease-out",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})]},y.label))})]})})]},x.label)),n.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[n.jsxs(q,{to:"/contact",className:"group relative inline-flex items-center justify-center px-6 py-2 text-[13px] font-bold text-white bg-gray-900 rounded-full overflow-hidden shadow-lg hover:shadow-[0_10px_30px_rgba(37,99,235,0.4)] transition-all duration-500 min-w-[140px]",children:[n.jsx("span",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-blue-600 to-cyan-500 opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),n.jsx("div",{className:"relative z-10 h-6 overflow-hidden w-full text-center",children:n.jsxs("div",{className:"flex flex-col transition-all duration-500 ease-[0.23,1,0.32,1] group-hover:-translate-y-1/2",children:[n.jsxs("span",{className:"flex items-center justify-center gap-1 h-6",children:["ãåãåãã",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-3.5 h-3.5 transition-colors duration-300",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25",stroke:"url(#nav-gradient)",className:"group-hover:stroke-white"})})]}),n.jsxs("span",{className:"flex items-center justify-center gap-1 h-6 tracking-widest font-black uppercase",children:["Contact",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-3.5 h-3.5 text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})]})})]}),n.jsxs(q,{to:"/document-request",className:"group relative inline-flex items-center justify-center px-6 py-2 text-[13px] font-bold text-white bg-gray-700 rounded-full overflow-hidden shadow-lg hover:shadow-[0_10px_30px_rgba(37,99,235,0.4)] transition-all duration-500 min-w-[140px]",children:[n.jsx("span",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-blue-600 to-cyan-500 opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),n.jsx("div",{className:"relative z-10 h-6 overflow-hidden w-full text-center",children:n.jsxs("div",{className:"flex flex-col transition-all duration-500 ease-[0.23,1,0.32,1] group-hover:-translate-y-1/2",children:[n.jsxs("span",{className:"flex items-center justify-center gap-1 h-6",children:["ãå½¹ç«ã¡è³æ",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-3.5 h-3.5 transition-colors duration-300",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25",stroke:"url(#nav-gradient)",className:"group-hover:stroke-white"})})]}),n.jsxs("span",{className:"flex items-center justify-center gap-1 h-6 tracking-widest font-black uppercase",children:["Document",n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-3.5 h-3.5 text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})})]})]})})]})]})]}),n.jsxs("button",{onClick:()=>a(!i),className:"lg:hidden w-10 h-10 flex flex-col items-center justify-center gap-1.5 z-50 hover:opacity-80 transition-all ml-auto flex-shrink-0 bg-white/10 backdrop-blur-sm rounded-full","aria-label":"Menu",children:[n.jsx(Ce.div,{animate:i?{rotate:45,y:8}:{rotate:0,y:0},className:`w-6 h-0.5 rounded-full transition-colors duration-300 ${g()} ${!i&&f&&!r?"shadow-sm":""}`}),n.jsx(Ce.div,{animate:i?{opacity:0}
549:{opacity:1},className:`w-6 h-0.5 rounded-full transition-colors duration-300 ${g()} ${!i&&f&&!r?"shadow-sm":""}`}),n.jsx(Ce.div,{animate:i?{rotate:-45,y:-8}:{rotate:0,y:0},className:`w-6 h-0.5 rounded-full transition-colors duration-300 ${g()} ${!i&&f&&!r?"shadow-sm":""}`})]})]})]}),B6.createPortal(n.jsx(an,{children:i&&n.jsx(Ce.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3},className:"fixed inset-0 z-[100] bg-white lg:hidden overflow-y-auto",children:n.jsxs("div",{className:"min-h-screen pt-24 pb-12 px-6 flex flex-col",children:[n.jsx("nav",{className:"flex-1 flex flex-col gap-6",children:I3.map(x=>n.jsx("div",{className:"border-b border-gray-100 pb-4 last:border-0",children:x.children?n.jsxs("div",{children:[n.jsxs("div",{className:"w-full flex items-center justify-between py-2 group",children:[n.jsxs(q,{to:x.path,onClick:()=>a(!1),className:"flex flex-col items-start text-left flex-grow",children:[n.jsx("span",{className:"text-xl font-bold text-gray-900 group-hover:text-blue-600 transition-colors",children:x.label}),n.jsx("span",{className:"text-xs font-black tracking-widest text-blue-500 uppercase",children:x.en})]}),n.jsx("button",{onClick:y=>{y.preventDefault(),y.stopPropagation(),c(o===x.label?null:x.label)},className:"p-2 -mr-2 text-gray-400 hover:text-blue-600 transition-colors","aria-label":"Toggle Submenu",children:n.jsx(Ce.svg,{animate:{rotate:o===x.label?180:0},xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-6 h-6",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]}),n.jsx(an,{children:o===x.label&&n.jsx(Ce.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:n.jsx("div",{className:"pl-4 pt-2 flex flex-col gap-3",children:x.children.map(y=>n.jsxs(q,{to:y.path,onClick:()=>a(!1),className:"flex items-center gap-2 text-gray-600 py-1 hover:text-blue-600 transition-colors",children:[n.jsx("span",{className:"w-1 h-1 rounded-full bg-gray-300"}),n.jsx("span",{className:"text-sm font-medium",children:y.label})]},y.label))})})})]}):n.jsxs(q,{to:x.path,onClick:()=>a(!1),className:"flex flex-col items-start py-2 group",children:[n.jsx("span",{className:"text-xl font-bold text-gray-900 group-hover:text-blue-600 transition-colors",children:x.label}),n.jsx("span",{className:"text-xs font-black tracking-widest text-blue-500 uppercase",children:x.en})]})},x.label))}),n.jsxs("div",{className:"mt-8 flex flex-col gap-4 pb-12",children:[n.jsxs(q,{to:"/contact",onClick:()=>a(!1),className:"group relative w-full flex items-center justify-between px-6 py-4 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-2xl shadow-lg shadow-blue-500/30 active:scale-[0.98] transition-all duration-300 overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 bg-white/0 group-hover:bg-white/10 transition-colors duration-300"}),n.jsxs("div",{className:"flex flex-col items-start relative z-10",children:[n.jsx("span",{className:"text-lg font-bold text-white tracking-wide",children:"ãåãåãã"}),n.jsx("span",{className:"text-[10px] font-black text-white/80 tracking-[0.2em] uppercase",children:"Contact"})]}),n.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-full flex items-center justify-center backdrop-blur-sm relative z-10",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5 text-white",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})})]}),n.jsxs(q,{to:"/document-request",onClick:()=>a(!1),className:"group w-full flex items-center justify-between px-6 py-4 bg-white border border-gray-100 rounded-2xl shadow-sm hover:shadow-md active:scale-[0.98] transition-all duration-300",children:[n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("span",{className:"text-lg font-bold text-gray-900 tracking-wide",children:"ãå½¹ç«ã¡è³æ"}),n.jsx("span",{className:"text-[10px] font-black text-gray-400 tracking-[0.2em] uppercase",children:"Document"})]}),n.jsx("div",{className:"w-10 h-10 bg-gray-50 rounded-full flex items-center justify-center group-hover:bg-gray-100 transition-colors",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5 text-gray-400 group-hover:text-blue-600 transition-colors",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})})]}),n.jsxs(q,{to:"/recruit",onClick:()=>a(!1),className:"group w-full flex items-center justify-between px-6 py-4 bg-white border border-gray-100 rounded-2xl shadow-sm hover:shadow-md active:scale-[0.98] transition-all duration-300",children:[n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("span",{className:"text-lg font-bold text-gray-900 tracking-wide",children:"æ¡ç¨æ
å ±"}),n.jsx("span",{className:"text-[10px] font-black text-gray-400 tracking-[0.2em] uppercase",children:"Recruit"})]}),n.jsx("div",{className:"w-10 h-10 bg-gray-50 rounded-full flex items-center justify-center group-hover:bg-gray-100 transition-colors",children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5 text-gray-400 group-hover:text-blue-600 transition-colors",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a5.971 5.971 0 00-.941 3.197m0 0c0 .01.001.02.001.03M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"})})})]})]})]})},"mobile-menu")}),document.body)]})},L3="https://meta-heroes.co.jp",D3={about:"伿¥æ
å ±",company:"MetaHeroesã«ã¤ãã¦",profile:"ä¼ç¤¾æ¦è¦",mission:"ããã·ã§ã³ã»ãã¸ã§ã³",offices:"äºæ¥æã»æ½è¨",conduct:"è¡åè¦ç¯",privacy:"ãã©ã¤ãã·ã¼ããªã·ã¼",group:"ã°ã«ã¼ãä¼ç¤¾",business:"äºæ¥å
容",services:"ãµã¼ãã¹",xr:"XRã½ãªã¥ã¼ã·ã§ã³",holoshare:"HoloShare","hero-aivo":"HERO AIVO","ai-training":"AI人æè²æç ä¿®","bousai-metaverse":"é²ç½ã¡ã¿ãã¼ã¹","bousai-expo":"é²ç½ä¸å","hero-egg-collection":"Hero Egg Collection","hero-egg":"Hero Egg","game-making-camp":"ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã","hero-expo":"HERO EXPO","global-hero-summit":"THE HERO SUMMIT","egg-jam":"EGG JAM","ai-monday":"AI MONDAY","game-event":"ã²ã¼ã Ãã¤ãã³ã","meta-heroes-guild":"Meta Heroes Guild",works:"å®ç¸¾",gallery:"ã®ã£ã©ãªã¼",news:"ãã¥ã¼ã¹",members:"ã¡ã³ãã¼",blog:"ããã°",contact:"ãåãåãã","document-request":"ãå½¹ç«ã¡è³æ",recruit:"æ¡ç¨æ
å ±",entry:"æ¡ç¨ã¨ã³ããªã¼",faq:"ãããã質å","ceo-message":"代表ã¡ãã»ã¼ã¸"},Xq=()=>{const r=Kt(),e=r.pathname.split("/").filter(t=>t);return T.useEffect(()=>{if(r.pathname==="/")return;const s={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{name:"HOME",url:`${L3}/`},...e.map((o,c)=>{const h=`${L3}/${e.slice(0,c+1).join("/")}`,f=D3[o]||o;return{name:f.length>20?"詳細":f,url:h}})].map((o,c)=>({"@type":"ListItem",position:c+1,name:o.name,item:o.url}))},i="json-ld-breadcrumb";let a=document.getElementById(i);return a||(a=document.createElement("script"),a.id=i,a.type="application/ld+json",document.head.appendChild(a)),a.text=JSON.stringify(s),()=>{const o=document.getElementById(i);o&&o.remove()}},[r.pathname,e]),r.pathname==="/"?null:n.jsx("nav",{className:"relative z-50 pointer-events-none","aria-label":"ãã³ãããªã¹ã",children:n.jsx("div",{className:"container mx-auto px-4 sm:px-8",children:n.jsxs("ol",{className:"flex items-center flex-wrap gap-2 text-[10px] font-bold tracking-wider pointer-events-auto py-4",children:[n.jsx("li",{className:"flex items-center",children:n.jsxs(q,{to:"/",className:"text-gray-400 hover:text-blue-600 transition-colors flex items-center gap-1",children:[n.jsx(Jk,{size:10}),n.jsx("span",{children:"HOME"})]})}),e.map((t,s)=>{const i=`/${e.slice(0,s+1).join("/")}`,a=s===e.length-1,o=D3[t]||t,c=o.length>20?"詳細":o;return n.jsxs("li",{className:"flex items-center gap-2",children:[n.jsx(ya,{size:10,
549className:"text-gray-300"}),a?n.jsx("span",{className:"text-gray-500 truncate max-w-[150px]",children:c}):n.jsx(q,{to:i,className:"text-gray-400 hover:text-blue-600 transition-colors uppercase",children:c})]},t)})]})})})},JM=T.createContext(void 0);function Yq({children:r}){const[e,t]=T.useState(null),[s,i]=T.useState(null),[a,o]=T.useState(null),[c,h]=T.useState(!0);T.useEffect(()=>{Me.auth.getSession().then(({data:{session:y}})=>{i(y),t((y==null?void 0:y.user)??null),y!=null&&y.user?f(y.user.id):h(!1)});const{data:{subscription:x}}=Me.auth.onAuthStateChange((y,v)=>{i(v),t((v==null?void 0:v.user)??null),v!=null&&v.user?f(v.user.id):(o(null),h(!1))});return()=>x.unsubscribe()},[]);const f=async x=>{try{const{data:y,error:v}=await Me.from("profiles").select("*").eq("id",x).single();v?console.error("Error fetching profile:",v):o(y)}catch(y){console.error("Error fetching profile:",y)}finally{h(!1)}},m=async()=>{await Me.auth.signOut(),o(null),t(null),i(null)},g={user:e,session:s,profile:a,role:(a==null?void 0:a.role)??null,loading:c,signOut:m};return n.jsx(JM.Provider,{value:g,children:r})}const dc=()=>{const r=T.useContext(JM);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r},O3=({children:r,allowedRoles:e})=>{const{user:t,role:s,loading:i}=dc(),a=Kt();return i?n.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):t?e&&s&&!e.includes(s)?n.jsx(H2,{to:"/agency",replace:!0}):n.jsx(n.Fragment,{children:r}):n.jsx(H2,{to:"/agency-login",state:{from:a},replace:!0})},Jq=()=>{const{profile:r,signOut:e,role:t}=dc(),s=Kt(),i=Zf(),[a,o]=T.useState(!0),[c,h]=T.useState(!1),f=async()=>{await e(),i("/agency-login")},g=[{label:"ããã·ã¥ãã¼ã",path:"/agency",icon:rP,roles:["admin","agent","guest"]},{label:"è³æä¸è¦§",path:"/agency/documents",icon:nP,roles:["admin","agent","guest"]},{label:"åç»ä¸è¦§",path:"/agency/videos",icon:bj,roles:["admin","agent","guest"]},{label:"ã¤ãã³ãæ
å ±",path:"/agency/events",icon:Ub,roles:["admin","agent"]},{label:"é¢é£ãªã³ã¯",path:"/agency/links",icon:HH,roles:["admin","agent","guest"]},{label:"管çè
è¨å®",path:"/agency/admin",icon:iP,roles:["admin"]}].filter(x=>t&&x.roles.includes(t));return n.jsxs("div",{className:"min-h-screen bg-slate-50 flex font-inter",children:[n.jsx(an,{children:c&&n.jsx(Ce.div,{initial:{opacity:0}
549,animate:{opacity:1},exit:{opacity:0},onClick:()=>h(!1),className:"fixed inset-0 bg-black/50 z-40 lg:hidden"})}),n.jsxs(Ce.aside,{className:`fixed lg:sticky top-0 left-0 h-screen bg-white border-r border-slate-200 z-50 flex flex-col transition-all duration-300 ${a?"w-64":"w-20"} ${c?"translate-x-0":"-translate-x-full lg:translate-x-0"}`,children:[n.jsxs("div",{className:`h-16 flex items-center border-b border-slate-100 ${a?"justify-between px-4":"justify-center"}`,children:[a&&n.jsx("div",{className:"flex items-center",children:n.jsx("img",{src:"/assets/MH.png",alt:"Meta Heroes",className:"h-8 w-auto"})}),n.jsx("button",{onClick:()=>o(!a),className:"p-1.5 rounded-lg hover:bg-slate-100 text-slate-500 hidden lg:block",children:a?n.jsx(yr,{size:18}):n.jsx(fC,{size:18})})]}),a&&n.jsx("div",{className:"p-4 border-b border-slate-100",children:n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-slate-800 truncate",children:(r==null?void 0:r.company_name)||(r==null?void 0:r.full_name)||"User"}),n.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:n.jsx("span",{className:`px-2 py-0.5 rounded-full text-[10px] font-medium uppercase tracking-wider ${t==="admin"?"bg-purple-100 text-purple-700":t==="agent"?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:t==="admin"?"管çè
":t==="agent"?"代çåº":"ã²ã¹ã"})})]})}),n.jsx("nav",{className:"flex-1 overflow-y-auto py-4 px-3 space-y-1",children:g.map(x=>{const y=s.pathname===x.path,v=x.icon;return n.jsxs(q,{to:x.path,onClick:()=>h(!1),className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 group ${y?"bg-blue-50 text-blue-600 shadow-sm":"text-slate-600 hover:bg-slate-50 hover:text-slate-900"} ${!a&&"justify-center"}`,children:[n.jsx(v,{size:20,className:y?"text-blue-600":"text-slate-400 group-hover:text-slate-600"}),a&&n.jsx("span",{className:"font-medium text-sm",children:x.label})]},x.path)})}),n.jsx("div",{className:"p-4 border-t border-slate-100",children:n.jsxs("button",{onClick:f,className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-slate-500 hover:bg-red-50 hover:text-red-600 transition-colors ${!a&&"justify-center"}`,children:[n.jsx(YH,{size:20}),a&&n.jsx("span",{className:"font-medium text-sm",children:"ãã°ã¢ã¦ã"})]})})]}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[n.jsx("header",{className:"lg:hidden h-16 bg-white border-b border-slate-200 flex items-center justify-between px-4 sticky top-0 z-30",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("button",{onClick:()=>h(!0),className:"p-2 -ml-2 rounded-lg hover:bg-slate-50 text-slate-600",children:n.jsx(fC,{size:20})}),n.jsx("img",{src:"/assets/MH.png",alt:"Meta Heroes",className:"h-6 w-auto"})]})}),n.jsx("main",{className:"flex-1 p-4 sm:p-6 lg:p-8 max-w-7xl mx-auto w-full",children:n.jsx(t6,{})})]})]})},Qq=()=>{const{profile:r,role:e}=dc(),[t,s]=T.useState([]),[i,a]=T.useState([]);T.useEffect(()=>{o()},[]);const o=async()=>{try{const[c,h]=await Promise.all([Me.from("categories").select("*").is("parent_id",null).order("display_order"),Me.from("documents").select("*").order("created_at",{ascending:!1}).limit(5)]);c.data&&s(c.data),h.data&&a(h.data)}catch(c){console.error("Error fetching dashboard data:",c)}};return n.jsxs("div",{className:"space-y-5 max-w-7xl mx-auto px-4 sm:px-0",children:[n.jsxs("div",{className:"flex items-end justify-between pb-3 border-b border-slate-200",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-lg font-bold text-slate-800 leading-tight",children:"ããã·ã¥ãã¼ã"}),n.jsxs("p",{className:"text-[11px] text-slate-500 font-medium uppercase tracking-wider mt-0.5",children:[r==null?void 0:r.company_name," / ",e==="admin"?"管çè
":e==="agent"?"代çåº":"ã²ã¹ã"]})]}),e==="admin"&&n.jsxs(q,{to:"/agency/admin",className:"px-3 py-1.5 bg-slate-800 text-white text-[10px] font-black uppercase tracking-widest rounded hover:bg-slate-700 transition-all flex items-center gap-1.5",children:[n.jsx(oP,{size:12})," 管çè
è¨å®"]})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-5",children:[n.jsxs("div",{className:"lg:col-span-8 space-y-5",children:[n.jsxs("div",{className:"bg-white border border-slate-200 rounded-md shadow-sm overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 border-b border-slate-100 bg-slate-50 flex items-center gap-2 text-slate-700",children:[n.jsx(EH,{size:14,className:"text-slate-400"}),n.jsx("h2",{className:"text-xs font-bold uppercase tracking-widest",children:"è³æã«ãã´ãª"})]}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 divide-y sm:divide-y-0 sm:divide-x divide-slate-100",children:t.map(c=>n.jsxs(q,{to:`/agency/documents?category=${c.id}`,className:"group flex items-center justify-between p-5 hover:bg-slate-50 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-8 h-8 rounded bg-blue-50 text-blue-600 flex items-center justify-center shrink-0",children:n.jsx(nP,{size:16})}),n.jsx("span",{className:"text-[13px] md:text-sm font-bold text-slate-700 group-hover:text-blue-600 leading-tight",children:c.name})]}),n.jsx(ya,{size:14,className:"text-slate-300 group-hover:text-blue-500 shrink-0 ml-2"})]},c.id))})]}),n.jsxs("div",{className:"bg-white border border-slate-200 rounded-md shadow-sm overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-3 border-b border-slate-100 bg-slate-50 flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2 text-slate-700",children:[n.jsx(xH,{size:14,className:"text-slate-400"}),n.jsx("h2",{className:"text-xs font-bold uppercase tracking-widest",children:"æ°çè³æ"})]}),n.jsx(q,{to:"/agency/documents",className:"text-[10px] font-bold text-blue-600 hover:underline uppercase",children:"ãã¹ã¦è¦ã"})]}),n.jsx("div",{className:"overflow-x-auto text-[13px]",children:n.jsxs("table",{className:"w-full text-left",children:[n.jsx("thead",{className:"bg-slate-50/50 text-slate-400 border-b border-slate-100 text-[10px] font-black uppercase",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-4 py-2 w-12 text-center",children:"å½¢å¼"}),n.jsx("th",{className:"px-4 py-2",children:"è³æå"}),n.jsx("th",{className:"px-4 py-2 text-right",children:"æ¥ä»"})]})}),n.jsx("tbody",{className:"divide-y divide-slate-50",children:i.length>0?i.map(c=>n.jsxs("tr",{className:"hover:bg-slate-50 transition-colors group",children:[n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsx("span",{className:"text-[9px] font-black px-1 py-0.5 rounded border border-slate-200 text-slate-400 uppercase",children:c.file_type||"DOC"})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("div",{className:"font-bold text-slate-700 group-hover:text-blue-600 truncate max-w-[200px] sm:max-w-md",children:c.title})}),n.jsx("td",{className:"px-4 py-3 text-right text-slate-400 text-[11px] font-mono tabular-nums",children:new Date(c.updated_at).toLocaleDateString()})]},c.id)):n.jsx("tr",{children:n.jsx("td",{colSpan:3,className:"px-4 py-10 text-center text-slate-400 font-bold text-[11px]",children:"表示ã§ããè³æã¯ããã¾ããã"})})})]})})]})]}),n.jsx("div",{className:"lg:col-span-4",children:n.jsxs("div",{className:"bg-white border border-slate-200 rounded-md shadow-sm p-5 space-y-4",children:[n.jsx("h3",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest border-b border-slate-100 pb-2",children:"ã¢ã«ã¦ã³ãæ
å ±"}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] text-slate-400 block mb-0.5",children:"ä¼ç¤¾å"}),n.jsx("div",{className:"text-sm font-bold text-slate-800",children:(r==null?void 0:r.company_name)||"-"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-[10px] text-slate-400 block mb-0.5",children:"権é"}),n.jsx("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded-full bg-blue-50 text-blue-600 border border-blue-100",children:e})]})]})]})})]})]})},Zq=()=>{var ee;const{role:r}=dc(),[e]=M6(),[t,s]=T.useState([]),[i,a]=T.useState([]),[o,c]=T.useState([]),[h,f]=T.useState(!0),[m,g]=T.useState(""),[x,y]=T.useState(e.get("category")||"all"),[v,j]=T.useState(e.get("service")||"all"),[N,S]=T.useState(!1),[A,E]=T.useState(null),[M,R]=T.useState([]),[I,F]=T.useState(!1),[D,O]=T.useState(!1),[$,z]=T.useState({title:"",description:"",content:"",categoryId:"",serviceId:"",allowedRoles:["admin","agent"]}),[re,he]=T.useState([]);T.useEffect(()=>{de()},[]),T.useEffect(()=>{const W=e.get("category"),G=e.get("service");W&&y(W),G&&j(G)},[e]);const de=async()=>{f(!0);try{const[W,G,ne]=await Promise.all([Me.from("categories").select("*").order("display_order",{ascending:!0}).order("name",{ascending:!0}),Me.from("services").select("*").order("name",{ascending:!0}),Me.from("documents").select("*, document_files(*)").order("created_at",{ascending:!1})]);W.data&&a(W.data),G.data&&c(G.data),ne.data&&s(ne.data)}catch(W){console.error(W)}finally{f(!1)}},fe=async W=>{if(E(W),F(!1),R([]),W.document_files&&W.document_files.length>0){const G=await Promise.all(W.document_files.map(async ne=>{const{data:ue}
549=await Me.storage.from("documents").createSignedUrl(ne.file_url,3600);return ue?{id:ne.id,url:ue.signedUrl}:null}));R(G.filter(ne=>ne!==null))}},oe=W=>{z({title:W.title,description:W.description||"",content:W.content||"",categoryId:W.category_id||"",serviceId:W.service_id||"",allowedRoles:W.allowed_roles||["admin","agent"]}),F(!0)},le=async W=>{var G;if(W.preventDefault(),!(!$.title||!$.categoryId)){O(!0);try{const ne={title:$.title,description:$.description,content:$.content,category_id:$.categoryId,service_id:$.serviceId||null,allowed_roles:$.allowedRoles,updated_at:new Date().toISOString()};let ue=A==null?void 0:A.id;if(A)await Me.from("documents").update(ne).eq("id",A.id);else{const{data:Se,error:Ye}=await Me.from("documents").insert({...ne,created_by:(G=(await Me.auth.getUser()).data.user)==null?void 0:G.id}).select();if(Se&&Se[0]&&(ue=Se[0].id),Ye)throw Ye}if(ue&&re.length>0)for(const Se of re){const Ye=Se.name.split(".").pop(),jr=`uploads/${`${Math.random().toString(36).substring(2)}-${Date.now()}.${Ye}`}`;await Me.storage.from("documents").upload(jr,Se),await Me.from("document_files").insert({document_id:ue,file_url:jr,file_type:Ye||null,file_name:Se.name})}S(!1),F(!1),E(null),se(),de()}catch(ne){console.error(ne)}finally{O(!1)}}},se=()=>{z({title:"",description:"",content:"",categoryId:"",serviceId:"",allowedRoles:["admin","agent"]}),he([])},K=async W=>{const{data:G}=await Me.storage.from("documents").createSignedUrl(W,60);G&&window.open(G.signedUrl,"_blank")},Q=async(W,G)=>{var ne;if(window.confirm("ãã¡ã¤ã«ãåé¤ãã¾ããï¼")&&(await Me.from("document_files").delete().eq("id",W),await Me.storage.from("documents").remove([G]),de(),A)){const ue=((ne=A.document_files)==null?void 0:ne.filter(Se=>Se.id!==W))||[];E({...A,document_files:ue})}},U=async(W,G)=>{window.confirm("è³æãåé¤ãã¾ããï¼")&&(await Me.from("documents").delete().eq("id",W),G&&G.length>0&&await Me.storage.from("documents").remove(G.map(ne=>ne.file_url)),E(null),de())},Z=t.filter(W=>{const G=W.title.toLowerCase().includes(m.toLowerCase()),ne=x==="all"||W.category_id===x,ue=v==="all"||W.service_id===v,Se=r==="admin"||W.allowed_roles&&W.allowed_roles.includes(r);return G&&ne&&ue&&Se});return n.jsxs("div",{className:"space-y-4 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-3 pb-3 border-b border-slate-200",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-lg font-bold text-slate-800",children:"è³æã©ã¤ãã©ãª"}),n.jsx("p",{className:"text-[10px] text-slate-400 font-black uppercase tracking-widest mt-0.5",children:"Document Repository"})]}),r==="admin"&&n.jsxs("button",{onClick:()=>{E(null),se(),S(!0)},className:"px-3 py-1.5 bg-slate-800 text-white text-[10px] font-black uppercase tracking-widest rounded hover:bg-slate-700 transition-all flex items-center gap-1.5",children:[n.jsx(K0,{size:12})," è³æã追å "]})]}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-3",children:[n.jsxs("div",{className:"sm:col-span-2 relative",children:[n.jsx(mu,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:14}),n.jsx("input",{type:"text",placeholder:"ã¿ã¤ãã«ã§æ¤ç´¢...",value:m,onChange:W=>g(W.target.value),className:"w-full pl-9 pr-4 py-1.5 bg-white border border-slate-200 rounded text-xs outline-none focus:ring-1 focus:ring-slate-200"})]}),n.jsxs("select",{value:x,onChange:W=>y(W.target.value),className:"px-2 py-1.5 bg-white border border-slate-200 rounded text-xs outline-none",children:[n.jsx("option",{value:"all",children:"ãã¹ã¦ã®ã«ãã´ãª"}),i.map(W=>n.jsx("option",{value:W.id,children:W.name},W.id))]}),n.jsxs("select",{value:v,onChange:W=>j(W.target.value),className:"px-2 py-1.5 bg-white border border-slate-200 rounded text-xs outline-none",children:[n.jsx("option",{value:"all",children:"ãã¹ã¦ã®ãµã¼ãã¹"}),o.map(W=>n.jsx("option",{value:W.id,children:W.name},W.id))]})]}),n.jsx("div",{className:"bg-white border border-slate-200 rounded shadow-sm overflow-hidden",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-left",children:[n.jsx("thead",{className:"bg-slate-50 text-slate-400 border-b border-slate-100 text-[9px] font-black uppercase tracking-wider",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-4 py-2",children:"è³æã¿ã¤ãã«"}),n.jsx("th",{className:"px-4 py-2",children:"ã«ãã´ãª / ãµã¼ãã¹"}),n.jsx("th",{className:"px-4 py-2 text-right",children:"æ·»ä»"})]})}),n.jsx("tbody",{className:"divide-y divide-slate-50 text-xs",children:h?n.jsx("tr",{children:n.jsx("td",{colSpan:3,className:"p-10 text-center",children:n.jsx($n,{className:"animate-spin mx-auto text-slate-200"})})}):Z.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:3,className:"p-10 text-center text-slate-400 font-bold",children:"è³æãè¦ã¤ããã¾ããã"})}):Z.map(W=>{var G,ne,ue;return n.jsxs("tr",{onClick:()=>fe(W),className:"hover:bg-blue-50/30 cursor-pointer transition-colors group",children:[n.jsx("td",{className:"px-4 py-3",children:n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"p-1.5 rounded bg-slate-100 text-slate-400 group-hover:bg-blue-50 group-hover:text-blue-600 transition-all",children:W.document_files&&W.document_files.length>0?n.jsx(NH,{size:12}):n.jsx(m7,{size:12})}),n.jsxs("div",{children:[n.jsx("div",{className:"font-bold text-slate-700 group-hover:text-blue-600 truncate max-w-[180px] sm:max-w-xs",children:W.title}),W.description&&n.jsx("div",{className:"text-[10px] text-slate-400 mt-0.5 truncate max-w-[180px]",children:W.description})]})]})}),n.jsx("td",{className:"px-4 py-3",children:n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-[9px] text-slate-500 font-black uppercase",children:(G=i.find(Se=>Se.id===W.category_id))==null?void 0:G.name}),W.service_id&&n.jsxs("span",{className:"text-[9px] text-blue-600 font-black uppercase flex items-center gap-1",children:[n.jsx(aP,{size:8})," ",(ne=o.find(Se=>Se.id===W.service_id))==null?void 0:ne.name]})]})}),n.jsx("td",{className:"px-4 py-3 text-right",children:n.jsxs("span",{className:"text-[8px] font-black px-1.5 py-0.5 rounded border border-slate-200 bg-slate-50 text-slate-400 uppercase",children:[((ue=W.document_files)==null?void 0:ue.length)||0," Files"]})})]},W.id)})})]})})}),(A||N)&&n.jsx("div",{className:"fixed inset-0 bg-slate-900/60 z-50 flex items-center justify-center p-2 sm:p-4 backdrop-blur-sm",children:n.jsxs("div",{className:`bg-white rounded shadow-2xl overflow-hidden flex flex-col w-full max-h-[95vh] ${!I&&!N&&(A!=null&&A.document_files)&&A.document_files.length>0?"max-w-5xl":"max-w-xl"}`,children:[n.jsxs("div",{className:"px-4 py-3 border-b border-slate-100 bg-slate-50 flex items-center justify-between shrink-0",children:[n.jsx("h2",{className:"font-black text-slate-800 text-[10px] uppercase tracking-widest",children:N?"æ°è¦è³æç»é²":I?"è³æç·¨é":"è³æãã¬ãã¥ã¼"}),n.jsx("button",{onClick:()=>{E(null),S(!1),F(!1),se()},className:"text-slate-400 hover:text-slate-600",children:n.jsx(yr,{size:18})})]}),n.jsxs("div",{className:"flex flex-col md:flex-row overflow-hidden",children:[!I&&!N&&(A==null?void 0:A.document_files)&&A.document_files.length>0&&n.jsx("div",{className:"flex-[1.5] bg-slate-100 p-4 border-r border-slate-200 overflow-y-auto min-h-[30vh]",children:n.jsx("div",{className:"grid grid-cols-1 gap-4",children:A.document_files.map(W=>{var ne,ue,Se;const G=(ne=M.find(Ye=>Ye.id===W.id))==null?void 0:ne.url;return n.jsxs("div",{className:"bg-white rounded border border-slate-200 p-2 space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between px-2",children:[n.jsx("span",{className:"text-[10px] font-bold text-slate-600 truncate max-w-[200px]",children:W.file_name||"File"}),n.jsx("button",{onClick:()=>K(W.file_url),className:"text-blue-600 hover:text-blue-700 p-1",children:n.jsx(uC,{size:14})})]}),((ue=W.file_type)==null?void 0:ue.toLowerCase())==="pdf"?G?n.jsx("iframe",{src:`${G}#toolbar=0`,className:"w-full h-[40vh] md:h-[60vh] rounded border border-slate-100",title:W.file_name||"Preview"}):n.jsx("div",{className:"h-20 flex items-center justify-center",children:n.jsx($n,{className:"animate-spin text-slate-200"})}):["jpg","jpeg","png","webp"].includes(((Se=W.file_type)==null?void 0:Se.toLowerCase())||"")?G?n.jsx("img",{src:G,className:"max-w-full h-auto rounded mx-auto",alt:"Preview"}):n.jsx("div",{className:"h-20 flex items-center justify-center",children:n.jsx($n,{className:"animate-spin text-slate-200"})}):n.jsxs("div",{className:"text-[9px] font-bold text-slate-300 text-center py-4 italic",children:["No Preview for ",W.file_type]})]},W.id)})})}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6 sm:p-8",children:N||I?n.jsxs("form",{onSubmit:le,className:"space-y-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"ã¿ã¤ãã«"}),n.jsx("input",{type:"text",required:!0,value:$.title,onChange:W=>z({...$,title:W.target.value}),className:"w-full px-3 py-1.5 border border-slate-200 rounded text-xs outline-none focus:ring-1 focus:ring-slate-200"})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"ã«ãã´ãª"}),n.jsx("select",{required:!0,value:$.categoryId,onChange:W=>z({...$,categoryId:W.target.value}),className:"w-full px-2 py-1.5 border border-slate-200 rounded text-xs outline-none",children:i.map(W=>n.jsx("option",{value:W.id,children:W.name},W.id))})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"ãµã¼ãã¹"}),n.jsxs("select",{value:$.serviceId,onChange:W=>z({...$,serviceId:W.target.value}),className:"w-full px-2 py-1.5 border border-slate-200 rounded text-xs outline-none",children:[n.jsx("option",{value:"",children:"None"}),o.map(W=>n.jsx("option",{value:W.id,children:W.name},W.id))]})]})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"å
¬éç¯å² (Allowed Roles)"}),n.jsx("div",{className:"flex flex-wrap gap-3 p-2 border border-slate-200 rounded bg-slate-50/50",children:["admin","agent","guest"].map(W=>n.jsxs("label",{className:`flex items-center gap-2 cursor-pointer ${W==="admin"?"opacity-50 cursor-not-allowed":""}`,children:[n.jsx("input",{type:"checkbox",checked:$.allowedRoles.includes(W),disabled:W==="admin",onChange:G=>{const ne=$.allowedRoles;G.target.checked?z({...$,allowedRoles:[...ne,W]}):z({...$,allowedRoles:ne.filter(ue=>ue!==W)})},className:"rounded border-slate-300 text-slate-800 focus:ring-slate-800 scale-90"}),n.jsx("span",{className:"text-xs font-bold text-slate-700 capitalize",children:W})]},W))})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"説æ"}),n.jsx("input",{type:"text",value:$.description,onChange:W=>z({...$,description:W.target.value}),className:"w-full px-3 py-1.5 border border-slate-200 rounded text-xs outline-none"})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"å
容"}),n.jsx("textarea",{value:$.content,onChange:W=>z({...$,content:W.target.value}),className:"w-full h-32 px-3 py-1.5 border border-slate-200 rounded text-xs outline-none resize-none"})]}),I&&(A==null?void 0:A.document_files)&&A.document_files.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"ç¾å¨ã®ãã¡ã¤ã«"}),n.jsx("div",{className:"space-y-1",children:A.document_files.map(W=>n.jsxs("div",{className:"flex items-center justify-between p-2 bg-slate-50 border border-slate-100 rounded",children:[n.jsx("span",{className:"text-[10px] text-slate-600 truncate max-w-[150px]",children:W.file_name}),n.jsx("button",{type:"button",onClick:()=>Q(W.id,W.file_url),className:"text-red-400 hover:text-red-600",children:n.jsx(So,{size:12})})]},W.id))})]}),n.jsxs("div",{className:"p-3 bg-slate-50 rounded border border-dashed border-slate-200 text-center",children:[n.jsx("label",{className:"text-[9px] font-black text-slate-400 uppercase block mb-1",children:"æ°è¦ãã¡ã¤ã«è¿½å (è¤æ°å¯)"}),n.jsx("input",{type:"file",multiple:!0,onChange:W=>he(Array.from(W.target.files||[])),className:"text-[10px] text-slate-500
549w-full"})]}),n.jsxs("div",{className:"pt-2 flex gap-2",children:[n.jsx("button",{type:"button",onClick:()=>{F(!1),S(!1),se()},className:"flex-1 px-3 py-2 border border-slate-200 text-slate-500 rounded text-[10px] font-black uppercase hover:bg-slate-50",children:"ãã£ã³ã»ã«"}),n.jsx("button",{type:"submit",disabled:D,className:"flex-1 px-3 py-2 bg-slate-800 text-white rounded text-[10px] font-black uppercase hover:bg-slate-700 disabled:opacity-50",children:D?"...":"ä¿å"})]})]}):A&&n.jsxs("div",{className:"space-y-5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"flex gap-1.5",children:i.find(W=>W.id===A.category_id)&&n.jsx("span",{className:"text-[8px] font-black px-1.5 py-0.5 bg-blue-100 text-blue-700 rounded uppercase",children:(ee=i.find(W=>W.id===A.category_id))==null?void 0:ee.name})}),r==="admin"&&n.jsx("button",{onClick:()=>oe(A),className:"text-slate-400 hover:text-blue-600 transition-colors",children:n.jsx(nc,{size:14})})]}),n.jsx("h3",{className:"text-base font-bold text-slate-900 leading-tight",children:A.title}),A.description&&n.jsx("p",{className:"text-[11px] text-slate-500 leading-relaxed",children:A.description}),A.content&&n.jsx("div",{className:"bg-slate-50 border border-slate-100 rounded p-4 text-[11px] text-slate-700 whitespace-pre-wrap leading-relaxed",children:A.content}),A.document_files&&A.document_files.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsxs("label",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:["æ·»ä»ãã¡ã¤ã« (",A.document_files.length,")"]}),n.jsx("div",{className:"grid grid-cols-1 gap-2",children:A.document_files.map(W=>n.jsxs("div",{className:"flex items-center justify-between p-2 bg-white border border-slate-200 rounded hover:border-blue-200 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[n.jsx("span",{className:"text-[8px] font-black px-1 py-0.5 bg-slate-100 rounded uppercase",children:W.file_type}),n.jsx("span",{className:"text-[10px] text-slate-600 truncate",children:W.file_name})]}),n.jsx("button",{onClick:()=>K(W.file_url),className:"text-blue-600 p-1",children:n.jsx(uC,{size:12})})]},W.id))})]}),n.jsxs("div",{className:"pt-4 border-t border-slate-100 flex items-center justify-between",children:[n.jsxs("div",{className:"text-[9px] font-bold text-slate-300 uppercase",children:["Updated: ",new Date(A.updated_at).toLocaleDateString()]}),r==="admin"&&n.jsx("button",{onClick:()=>U(A.id,A.document_files),className:"text-slate-300 hover:text-red-500 transition-colors",children:n.jsx(So,{size:14})})]})]})})]})]})})]})},eK=()=>{var W;const{role:r}=dc(),[e,t]=T.useState([]),[s,i]=T.useState([]),[a,o]=T.useState([]),[c,h]=T.useState(!0),[f,m]=T.useState(""),[g,x]=T.useState("all"),[y,v]=T.useState("all"),[j,N]=T.useState("grid"),[S,A]=T.useState(!1),[E,M]=T.useState(!1),[R,I]=T.useState(null),[F,D]=T.useState(!1),[O,$]=T.useState({title:"",url:"",description:"",categoryId:"",serviceId:""}),[z,re]=T.useState(null),[he,de]=T.useState(null);T.useEffect(()=>{fe()},[]);const fe=async()=>{h(!0);try{const[G,ne,ue]=await Promise.all([Me.from("categories").select("id, name").order("display_order"),Me.from("services").select("id, name").order("name"),Me.from("videos").select("*").order("created_at",{ascending:!1})]);G.data&&i(G.data),ne.data&&o(ne.data),ue.data&&t(ue.data)}catch(G){console.error("Error fetching videos:",G)}finally{h(!1)}},oe=()=>{$({title:"",url:"",description:"",categoryId:"",serviceId:""}),I(null),M(!1),re(null)},le=async G=>{if(G.preventDefault(),!O.title)return;if(!O.url&&!z&&!(R!=null&&R.file_url)){alert("YouTube URLã¾ãã¯åç»ãã¡ã¤ã«ã®ã©ã¡ããã¯å¿ é ã§ãã");return}const ne=100*1024*1024;if(z&&z.size>ne){alert(`ãã¡ã¤ã«ãµã¤ãºã大ãããã¾ã (${(z.size/1024/1024).toFixed(1)}MB)ã100MB以ä¸ã®ãã¡ã¤ã«ã鏿ãã¦ãã ããã 550 551â»100MB以ä¸ã®åç»ãæ²è¼ãããå ´åã¯ãYouTubeã«ã¢ãããã¼ããã¦ãã®URLãç»é²ãããã¨ããå§ããã¾ãã`);return}D(!0);try{let ue=(R==null?void 0:R.file_url)||null,Se=(R==null?void 0:R.file_type)||null;if(z){R!=null&&R.file_url&&await Me.storage.from("documents").remove([R.file_url]);const ds=z.name.split(".").pop();ue=`videos/${`${Math.random().toString(36).substring(2)}-${Date.now()}.${ds}`}`,Se=ds||null;const{error:Ii}=await Me.storage.from("documents").upload(ue,z);if(Ii)throw Ii.message.includes("size")?new Error("ãã¡ã¤ã«ã®ãµã¤ãºå¶éãè¶ ãã¦ãã¾ããSupabaseã®Storageè¨å®ã§æå¤§ãµã¤ãºãå¼ãä¸ããããããå°ãããã¡ã¤ã«ã鏿ãã¦ãã ããã"):Ii}const Ye={title:O.title,url:O.url||null,file_url:ue,file_type:Se,description:O.description,category_id:O.categoryId||null,service_id:O.serviceId||null,updated_at:new Date().toISOString()};R&&E?await Me.from("videos").update(Ye).eq("id",R.id):await Me.from("videos").insert(Ye),A(!1),oe(),fe()}catch(ue){console.error(ue),alert(ue.message||"ä¿åä¸ã«ã¨ã©ã¼ãçºçãã¾ããã")}finally{D(!1)}},se=async(G,ne)=>{if(G.stopPropagation(),!!window.confirm("åç»ãåé¤ãã¾ããï¼"))try{ne.file_url&&await Me.storage.from("documents").remove([ne.file_url]),await Me.from("videos").delete().eq("id",ne.id),fe()}catch(ue){console.error(ue)}},K=(G,ne)=>{G.stopPropagation(),I(ne),$({title:ne.title,url:ne.url||"",description:ne.description||"",categoryId:ne.category_id||"",serviceId:ne.service_id||""}),M(!0),A(!0)},Q=async G=>{if(I(G),M(!1),de(null),G.file_url){const{data:ne}=await Me.storage.from("documents").createSignedUrl(G.file_url,3600);ne&&de(ne.signedUrl)}},U=G=>{if(!G)return null;const ne=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/,ue=G.match(ne);return ue&&ue[2].length===11?ue[2]:null},Z=G=>{if(G.thumbnail_url)return G.thumbnail_url;const ne=U(G.url);return ne?`https://img.youtube.com/vi/${ne}/maxresdefault.jpg`:"/assets/top/business_bg.png"},ee=e.filter(G=>{const ne=G.title.toLowerCase().includes(f.toLowerCase()),ue=g==="all"||G.category_id===g,Se=y==="all"||G.service_id===y;return ne&&ue&&Se});return n.jsxs("div",{className:"space-y-6 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-4 border-b border-slate-200",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-xl font-bold text-slate-800",children:"åç»ã©ã¤ãã©ãª"}),n.jsx("p",{className:"text-[10px] text-slate-400 font-black uppercase tracking-widest mt-1",children:"Video Achievement Showcase"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[r==="admin"&&n.jsxs("button",{onClick:()=>{oe(),A(!0)},className:"px-3 py-1.5 bg-slate-800 text-white text-[10px] font-black uppercase tracking-widest rounded hover:bg-slate-700 transition-all flex items-center gap-1.5 mr-2",children:[n.jsx(K0,{size:12})," åç»ã追å "]}),n.jsxs("div",{className:"flex bg-slate-100 p-1 rounded-lg",children:[n.jsx("button",{onClick:()=>N("grid"),className:`p-1.5 rounded ${j==="grid"?"bg-white text-blue-600 shadow-sm":"text-slate-400"}`,children:n.jsx(FH,{size:16})}),n.jsx("button",{onClick:()=>N("list"),className:`p-1.5 rounded ${j==="list"?"bg-white text-blue-600 shadow-sm":"text-slate-400"}`,children:n.jsx(WH,{size:16})})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-3",children:[n.jsxs("div",{className:"sm:col-span-2 relative",children:[n.jsx(mu,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:14}),n.jsx("input",{type:"text",placeholder:"ã¿ã¤ãã«ã§æ¤ç´¢...",value:f,onChange:G=>m(G.target.value),className:"w-full pl-9 pr-4 py-2 bg-white border border-slate-200 rounded-lg text-sm outline-none focus:ring-2 focus:ring-blue-100"})]}),n.jsxs("select",{value:g,onChange:G=>x(G.target.value),className:"px-3 py-2 bg-white border border-slate-200 rounded-lg text-sm outline-none",children:[n.jsx("option",{value:"all",children:"ãã¹ã¦ã®ã«ãã´ãª"}),s.map(G=>n.jsx("option",{value:G.id,children:G.name},G.id))]}),n.jsxs("select",{value:y,onChange:G=>v(G.target.value),className:"px-3 py-2 bg-white border border-slate-200 rounded-lg text-sm outline-none",children:[n.jsx("option",{value:"all",children:"ãã¹ã¦ã®ãµã¼ãã¹"}),a.map(G=>n.jsx("option",{value:G.id,children:G.name},G.id))]})]}),c?n.jsx("div",{className:"flex justify-center py-20",children:n.jsx($n,{className:"animate-spin text-slate-200",size:40})}):ee.length===0?n.jsx("div",{className:"text-center py-20 bg-white rounded-xl border border-slate-200 shadow-sm",children:n.jsx("p",{className:"text-slate-400 font-bold",children:"åç»ãè¦ã¤ããã¾ããã"})}):j==="grid"?n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:ee.map(G=>{var ne,ue;return n.jsxs("div",{onClick:()=>
551Q(G),className:"group bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden hover:shadow-md transition-all cursor-pointer",children:[n.jsxs("div",{className:"aspect-video relative overflow-hidden bg-slate-900",children:[n.jsx("img",{src:Z(G),alt:G.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500 opacity-90"}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/20",children:n.jsx("div",{className:"w-12 h-12 bg-white/90 rounded-full flex items-center justify-center text-blue-600 shadow-xl",children:n.jsx(t7,{size:24,fill:"currentColor",className:"ml-1"})})}),r==="admin"&&n.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx("button",{onClick:Se=>K(Se,G),className:"p-1.5 bg-white/90 rounded-full text-blue-600 hover:bg-white shadow-lg",children:n.jsx(nc,{size:14})}),n.jsx("button",{onClick:Se=>se(Se,G),className:"p-1.5 bg-white/90 rounded-full text-red-600 hover:bg-white shadow-lg",children:n.jsx(So,{size:14})})]}),G.file_url&&n.jsxs("div",{className:"absolute bottom-2 left-2 px-2 py-0.5 bg-black/60 rounded text-[8px] text-white font-black uppercase flex items-center gap-1 backdrop-blur-sm",children:[n.jsx(bj,{size:10})," Local File"]})]}),n.jsxs("div",{className:"p-4",children:[n.jsx("h3",{className:"font-bold text-slate-800 line-clamp-1 mb-1 group-hover:text-blue-600 transition-colors",children:G.title}),n.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[G.category_id&&n.jsx("span",{className:"text-[9px] font-black px-1.5 py-0.5 bg-slate-100 text-slate-500 rounded uppercase",children:(ne=s.find(Se=>Se.id===G.category_id))==null?void 0:ne.name}),G.service_id&&n.jsx("span",{className:"text-[9px] font-black px-1.5 py-0.5 bg-blue-50 text-blue-600 rounded uppercase",children:(ue=a.find(Se=>Se.id===G.service_id))==null?void 0:ue.name})]})]})]},G.id)})}):n.jsx("div",{className:"bg-white border border-slate-200 rounded-xl shadow-sm overflow-hidden",children:n.jsx("div",{className:"divide-y divide-slate-100",children:ee.map(G=>{var ne;return n.jsxs("div",{onClick:()=>Q(G),className:"flex items-center gap-4 p-4 hover:bg-slate-50 cursor-pointer group transition-colors",children:[n.jsx("div",{className:"w-24 aspect-video rounded overflow-hidden bg-slate-900 shrink-0",children:n.jsx("img",{src:Z(G),alt:"",className:"w-full h-full object-cover"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("h3",{className:"font-bold text-slate-800 group-hover:text-blue-600 transition-colors truncate",children:G.title}),n.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[n.jsx("span",{className:"text-[10px] text-slate-400 font-mono",children:new Date(G.created_at).toLocaleDateString()}),G.service_id&&n.jsx("span",{className:"text-[10px] text-blue-500 font-bold uppercase",children:(ne=a.find(ue=>ue.id===G.service_id))==null?void 0:ne.name}),G.file_url&&n.jsx(bj,{size:12,className:"text-slate-300"})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[r==="admin"&&n.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-all mr-2",children:[n.jsx("button",{onClick:ue=>K(ue,G),className:"p-1.5 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded",children:n.jsx(nc,{size:16})}),n.jsx("button",{onClick:ue=>se(ue,G),className:"p-1.5 text-slate-400 hover:text-red-600 hover:bg-red-50 rounded",children:n.jsx(So,{size:16})})]}),n.jsx(ya,{size:16,className:"text-slate-300 group-hover:text-blue-500 group-hover:translate-x-1 transition-all"})]})]},G.id)})})}),R&&!E&&n.jsx("div",{className:"fixed inset-0 bg-slate-900/90 z-50 flex items-center justify-center p-4 backdrop-blur-sm",onClick:()=>I(null),children:n.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl overflow-hidden w-full max-w-4xl flex flex-col",onClick:G=>G.stopPropagation(),children:[n.jsxs("div",{className:"aspect-video bg-black relative",children:[R.file_url&&he?n.jsx("video",{src:he,className:"w-full h-full",controls:!0,autoPlay:!0}):U(R.url)?n.jsx("iframe",{src:`https://www.youtube.com/embed/${U(R.url)}?autoplay=1`,className:"absolute inset-0 w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:R.title}):n.jsx("div",{className:"flex items-center justify-center h-full text-white",children:n.jsx("p",{children:"åç»ãåçã§ãã¾ãã"})}),n.jsx("button",{onClick:()=>I(null),className:"absolute -top-12 right-0 text-white hover:text-slate-300",children:n.jsx(yr,{size:32})})]}),n.jsxs("div",{className:"p-6 md:p-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[R.service_id&&n.jsx("span",{className:"px-2 py-0.5 bg-blue-50 text-blue-600 text-[10px] font-black uppercase tracking-widest rounded border border-blue-100",children:(W=a.find(G=>
551G.id===R.service_id))==null?void 0:W.name}),n.jsx("span",{className:"text-xs text-slate-400 font-mono",children:new Date(R.created_at).toLocaleDateString()})]}),r==="admin"&&n.jsxs("button",{onClick:G=>K(G,R),className:"text-xs font-bold text-blue-600 hover:underline flex items-center gap-1",children:[n.jsx(nc,{size:12})," ç·¨éãã"]})]}),n.jsx("h2",{className:"text-xl md:text-2xl font-bold text-slate-900 mb-4",children:R.title}),R.description&&n.jsx("p",{className:"text-sm text-slate-600 leading-relaxed whitespace-pre-wrap",children:R.description})]})]})}),S&&n.jsx("div",{className:"fixed inset-0 bg-slate-900/60 z-[60] flex items-center justify-center p-4 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-white rounded-xl shadow-2xl w-full max-w-md overflow-hidden",children:[n.jsxs("div",{className:"px-6 py-4 border-b border-slate-200 bg-slate-50 flex items-center justify-between",children:[n.jsx("h2",{className:"font-bold text-slate-800 text-sm",children:E?"åç»ãç·¨é":"æ°è¦åç»ç»é²"}),n.jsx("button",{onClick:()=>{A(!1),oe()},className:"text-slate-400 hover:text-slate-600",children:n.jsx(yr,{size:20})})]}),n.jsxs("form",{onSubmit:le,className:"p-6 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"ã¿ã¤ãã«"}),n.jsx("input",{type:"text",required:!0,value:O.title,onChange:G=>$({...O,title:G.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]}),n.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-100 space-y-3",children:[n.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase",children:"åç»ã½ã¼ã¹ (URLã¾ãã¯ãã¡ã¤ã«ãæå®)"}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[9px] font-bold text-slate-500 mb-1",children:"YouTube URL"}),n.jsx("input",{type:"url",value:O.url,onChange:G=>$({...O,url:G.target.value}),placeholder:"https://www.youtube.com/watch?v=...",className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100 bg-white"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[9px] font-bold text-slate-500 mb-1",children:"ã¾ã㯠åç»ãã¡ã¤ã«ãã¢ãããã¼ã"}),n.jsx("input",{type:"file",accept:"video/*",onChange:G=>{var ne;return re(((ne=G.target.files)==null?void 0:ne[0])||null)},className:"text-xs text-slate-500 w-full file:mr-4 file:py-1 file:px-3 file:rounded-full file:border-0 file:text-[10px] file:font-black file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100"}),E&&(R==null?void 0:R.file_url)&&!z&&n.jsxs("p",{className:"text-[9px] text-blue-500 mt-1 flex items-center gap-1",children:[n.jsx(Kf,{size:10})," ãã¡ã¤ã«ãã¢ãããã¼ãæ¸ã¿ã§ã"]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"ãµã¼ãã¹"}),n.jsxs("select",{value:O.serviceId,onChange:G=>$({...O,serviceId:G.target.value}),className:"w-full px-2 py-2 border border-slate-200 rounded text-xs outline-none bg-white",children:[n.jsx("option",{value:"",children:"ãªã"}),a.map(G=>n.jsx("option",{value:G.id,children:G.name},G.id))]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"ã«ãã´ãª"}),n.jsxs("select",{value:O.categoryId,onChange:G=>$({...O,categoryId:G.target.value}),className:"w-full px-2 py-2 border border-slate-200 rounded text-xs outline-none bg-white",children:[n.jsx("option",{value:"",children:"ãªã"}),s.map(G=>n.jsx("option",{value:G.id,children:G.name},G.id))]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"説æ"}),n.jsx("textarea",{value:O.description,onChange:G=>$({...O,description:G.target.value}),className:"w-full h-24 px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100 resize-none"})]}),n.jsxs("div",{className:"pt-4 flex gap-3",children:[n.jsx("button",{type:"button",onClick:()=>{A(!1),oe()},className:"flex-1 px-4 py-2 border border-slate-200 text-slate-500 rounded text-xs font-bold hover:bg-slate-50",children:"ãã£ã³ã»ã«"}),n.jsxs("button",{type:"submit",disabled:F,className:"flex-1 px-4 py-2 bg-slate-800 text-white rounded text-xs font-bold hover:bg-slate-700 flex justify-center gap-2",children:[F?n.jsx($n,{size:14,className:"animate-spin"}):n.jsx(Kf,{size:14})," ",E?"æ´æ°":"ç»é²"]})]})]})]})})]})},tK=()=>{const{role:r}=dc(),[e,t]=T.useState([]),[s,i]=T.useState(!0),[a,o]=T.useState("list"),[c,h]=T.useState(null),[f,m]=T.useState(null),[g,x]=T.useState(!1),[y,v]=T.useState(!1),[j,N]=T.useState(!1),[S,A]=T.useState({title:"",content:"",url:"",dates:[],timeStart:"",timeEnd:""}),[E,M]=T.useState("");T.useEffect(()=>{R()},[]);const R=async()=>{try{i(!0);const{data:K,error:Q}=await Me.from("events").select("*").order("created_at",{ascending:!1});if(Q)throw Q;K&&t(K)}catch(K){console.error("Error fetching events:",K)}finally{i(!1)}},I=()=>{A({title:"",content:"",url:"",dates:[],timeStart:"",timeEnd:""}),M(""),v(!1),h(null)},F=async K=>{if(K.preventDefault(),!!S.title){N(!0);try{const Q={title:S.title,content:S.content,url:S.url,event_dates:S.dates.length>0?S.dates:null,event_time_start:S.timeStart||null,event_time_end:S.timeEnd||null,updated_at:new Date().toISOString()};c&&y?await Me.from("events").update(Q).eq("id",c.id):await Me.from("events").insert(Q),x(!1),I(),R()}catch(Q){console.error(Q)}finally{N(!1)}}},D=async(K,Q)=>{if(K.stopPropagation(),!!window.confirm("ã¤ãã³ããåé¤ãã¾ããï¼"))try{await Me.from("events").delete().eq("id",Q),R()}catch(U){console.error(U)}},O=(K,Q)=>{K.stopPropagation(),h(Q),A({title:Q.title,content:Q.content||"",url:Q.url||"",dates:Q.event_dates||[],timeStart:Q.event_time_start||"",timeEnd:Q.event_time_end||""}),v(!0),x(!0)},[$,z]=T.useState(new Date),re=(K,Q)=>new Date(K,Q+1,0).getDate(),he=(K,Q)=>new Date(K,Q,1).getDay(),de=()=>{const K=$.getFullYear(),Q=$.getMonth(),U=re(K,Q),Z=he(K,Q),ee=[];for(let W=0;W<Z;W++)ee.push(null);for(let W=1;W<=U;W++)ee.push(new Date(K,Q,W));return ee},fe=K=>{z(new Date($.getFullYear(),$.getMonth()+K,1))},oe=K=>e.filter(Q=>
551{if(Q.event_dates&&Q.event_dates.length>0)return Q.event_dates.some(Z=>{const ee=new Date(Z);return ee.getDate()===K.getDate()&&ee.getMonth()===K.getMonth()&&ee.getFullYear()===K.getFullYear()});const U=new Date(Q.created_at);return U.getDate()===K.getDate()&&U.getMonth()===K.getMonth()&&U.getFullYear()===K.getFullYear()}),le=K=>{var ee;const Q=K.event_dates,U=K.event_time_start?` (${K.event_time_start.slice(0,5)}ã${((ee=K.event_time_end)==null?void 0:ee.slice(0,5))||""})`:"";if(!Q||Q.length===0)return"æ¥ææªå®"+U;const Z=[...Q].sort();return Z.length<=3?Z.map(W=>new Date(W).toLocaleDateString()).join(", ")+U:`${Z[0]?new Date(Z[0]).toLocaleDateString():""} ...ä»${Z.length-1}æ¥`+U},se=K=>{const Q=oe(K);Q.length>0&&m({date:K,events:Q})};return n.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 border-b border-slate-200 pb-4",children:[n.jsxs("div",{children:[n.jsxs("h1",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[n.jsx(Ub,{className:"text-blue-500",size:24}),"ã¤ãã³ãæ
å ±"]}),n.jsx("p",{className:"text-xs text-slate-500 font-bold uppercase tracking-wider mt-1",children:"Events & Announcements"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[r==="admin"&&n.jsxs("button",{onClick:()=>{I(),x(!0)},className:"px-3 py-1.5 bg-slate-800 text-white text-[10px] font-black uppercase tracking-widest rounded hover:bg-slate-700 transition-all flex items-center gap-1.5 mr-2",children:[n.jsx(K0,{size:12})," ã¤ãã³ãã追å "]}),n.jsxs("div",{className:"flex bg-slate-100 p-1 rounded-lg",children:[n.jsxs("button",{onClick:()=>o("list"),className:`px-3 py-1.5 rounded text-xs font-bold flex items-center gap-1.5 transition-all ${a==="list"?"bg-white text-blue-600 shadow-sm":"text-slate-500 hover:text-slate-700"}`,children:[n.jsx($H,{size:14})," ãªã¹ã"]}),n.jsxs("button",{onClick:()=>o("calendar"),className:`px-3 py-1.5 rounded text-xs font-bold flex items-center gap-1.5 transition-all ${a==="calendar"?"bg-white text-blue-600 shadow-sm":"text-slate-500 hover:text-slate-700"}`,children:[n.jsx(Ub,{size:14})," ã«ã¬ã³ãã¼"]})]})]})]}),s?n.jsx("div",{className:"flex justify-center py-20",children:n.jsx($n,{className:"animate-spin text-slate-300",size:32})}):e.length===0?n.jsx("div",{className:"text-center py-20 bg-white rounded-lg border border-slate-200 shadow-sm",children:n.jsx("p",{className:"text-slate-400 font-bold text-sm",children:"ç¾å¨æ²è¼ããã¦ããã¤ãã³ãã¯ããã¾ããã"})}):n.jsxs(n.Fragment,{children:[a==="list"&&n.jsx("div",{className:"bg-white rounded-lg border border-slate-200 shadow-sm overflow-hidden animate-in fade-in slide-in-from-bottom-2 duration-300",children:n.jsx("div",{className:"divide-y divide-slate-100",children:e.map(K=>n.jsxs("button",{onClick:()=>h(K),className:"w-full flex items-center justify-between p-4 sm:p-6 hover:bg-slate-50 transition-colors text-left group",children:[n.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("h2",{className:"text-sm sm:text-base font-bold text-slate-800 truncate group-hover:text-blue-600 transition-colors",children:K.title}),n.jsx("div",{className:"text-[10px] sm:text-xs font-mono text-slate-400 mt-1",children:le(K)})]})]}),n.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[r==="admin"&&n.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-all mr-2",children:[n.jsx("button",{onClick:Q=>O(Q,K),className:"p-1.5 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded",children:n.jsx(nc,{size:16})}),n.jsx("button",{onClick:Q=>D(Q,K.id),className:"p-1.5 text-slate-400 hover:text-red-600 hover:bg-red-50 rounded",children:n.jsx(So,{size:16})})]}),n.jsx(ya,{size:14,className:"text-slate-300 group-hover:translate-x-1 transition-transform"})]})]},K.id))})}),a==="calendar"&&n.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 shadow-sm overflow-hidden animate-in fade-in slide-in-from-bottom-2 duration-300 p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsxs("h2",{className:"text-lg font-bold text-slate-800",children:[$.getFullYear(),"å¹´ ",$.getMonth()+1,"æ"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>fe(-1),className:"p-1.5 hover:bg-slate-100 rounded-full text-slate-500",children:n.jsx(q0,{size:20})}),n.jsx("button",{onClick:()=>fe(1),className:"p-1.5 hover:bg-slate-100 rounded-full text-slate-500",children:n.jsx(ya,{size:20})})]})]}),n.jsx("div",{className:"grid grid-cols-7 gap-2 text-center mb-2",children:["æ¥","æ","ç«","æ°´","æ¨","é","å"].map(K=>n.jsx("div",{className:"text-xs font-bold text-slate-400 py-2",children:K},K))}),n.jsx("div",{className:"grid grid-cols-7 gap-2",children:de().map((K,Q)=>{if(!K)return n.jsx("div",{className:"aspect-square"},Q);const U=oe(K),Z=new Date().toDateString()===K.toDateString();return n.jsxs("div",{onClick:()=>se(K),className:`min-h-[80px] border rounded-lg p-1 relative flex flex-col items-center justify-start cursor-pointer transition-all hover:shadow-md hover:border-blue-200 ${Z?"border-blue-500 bg-blue-50/30":"border-slate-100"}`,children:[n.jsx("span",{className:`text-[10px] font-medium mb-1 ${Z?"text-blue-600":"text-slate-500"}`,children:K.getDate()}),n.jsx("div",{className:"flex flex-col gap-1 w-full px-0.5 overflow-y-auto max-h-[60px] scrollbar-none",children:U.map(ee=>n.jsx("div",{className:"w-full text-[8px] bg-blue-100 text-blue-700 rounded px-1 py-0.5 truncate text-left",children:ee.title}
551,ee.id))})]},Q)})})]})]}),n.jsx(an,{children:f&&n.jsx(Ce.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 z-50 flex items-center justify-center p-4",onClick:()=>m(null),children:n.jsxs(Ce.div,{initial:{scale:.98,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.98,opacity:0},className:"bg-white rounded-lg shadow-xl overflow-hidden w-full max-w-md max-h-[80vh] flex flex-col border border-slate-200",onClick:K=>K.stopPropagation(),children:[n.jsxs("div",{className:"px-6 py-4 border-b border-slate-100 flex items-center justify-between shrink-0 bg-slate-50",children:[n.jsxs("h3",{className:"font-bold text-slate-700",children:[f.date.toLocaleDateString()," ã®ã¤ãã³ã"]}),n.jsx("button",{onClick:()=>m(null),className:"text-slate-400 hover:text-slate-600",children:n.jsx(yr,{size:20})})]}),n.jsx("div",{className:"overflow-y-auto p-4 space-y-3",children:f.events.map(K=>{var Q;return n.jsxs("button",{onClick:()=>{h(K),m(null)},className:"w-full p-4 rounded-lg border border-slate-100 hover:border-blue-200 hover:bg-blue-50/30 transition-all text-left group",children:[n.jsx("h4",{className:"font-bold text-slate-800 group-hover:text-blue-600 transition-colors",children:K.title}),K.event_time_start&&n.jsxs("p",{className:"text-[10px] text-blue-500 font-bold mt-1 uppercase tracking-wider",children:[K.event_time_start.slice(0,5)," ã ",(Q=K.event_time_end)==null?void 0:Q.slice(0,5)]})]},K.id)})})]})})}),n.jsx(an,{children:c&&!y&&n.jsx(Ce.div,{initial:{opacity:0}
551,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 z-50 flex items-center justify-center p-4",onClick:()=>h(null),children:n.jsxs(Ce.div,{initial:{scale:.98,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.98,opacity:0},className:"bg-white rounded-lg shadow-xl overflow-hidden w-full max-w-2xl max-h-[90vh] flex flex-col border border-slate-200",onClick:K=>K.stopPropagation(),children:[n.jsxs("div",{className:"px-6 py-4 border-b border-slate-100 flex items-center justify-between shrink-0",children:[n.jsx("h3",{className:"font-bold text-slate-700 text-lg",children:"ã¤ãã³ã詳細"}),n.jsxs("div",{className:"flex items-center gap-3",children:[r==="admin"&&n.jsxs("button",{onClick:K=>O(K,c),className:"text-xs font-bold text-blue-600 hover:underline flex items-center gap-1",children:[n.jsx(nc,{size:14})," ç·¨éãã"]}),n.jsx("button",{onClick:()=>h(null),className:"text-slate-400 hover:text-slate-600 transition-colors",children:n.jsx(yr,{size:20})})]})]}),n.jsxs("div",{className:"p-6 overflow-y-auto space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:"inline-block px-2 py-1 bg-slate-100 text-slate-600 text-xs rounded border border-slate-200 font-mono",children:le(c)}),n.jsx("h2",{className:"text-xl font-bold text-slate-800 leading-snug",children:c.title})]}),c.content&&n.jsx("div",{className:"text-sm text-slate-600 leading-relaxed whitespace-pre-wrap bg-slate-50 p-4 rounded border border-slate-100",children:c.content}),c.url&&n.jsx("div",{className:"pt-2",children:n.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800 hover:underline font-medium",children:[n.jsx(sP,{size:16}),"é¢é£ãªã³ã¯ãéã"]})})]}),n.jsx("div",{className:"px-6 py-4 bg-slate-50 border-t border-slate-100 flex justify-end",children:n.jsx("button",{onClick:()=>h(null),className:"px-4 py-2 bg-white border border-slate-300 text-slate-700 text-sm font-medium rounded hover:bg-slate-50 transition-colors shadow-sm",children:"éãã"})})]})})}),g&&n.jsx("div",{className:"fixed inset-0 bg-slate-900/60 z-[60] flex items-center justify-center p-4 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-white rounded-xl shadow-2xl w-full max-w-md overflow-hidden",children:[n.jsxs("div",{className:"px-6 py-4 border-b border-slate-200 bg-slate-50 flex items-center justify-between",children:[n.jsx("h2",{className:"font-bold text-slate-800 text-sm",children:y?"ã¤ãã³ããç·¨é":"æ°è¦ã¤ãã³ãç»é²"}),n.jsx("button",{onClick:()=>{x(!1),I()},className:"text-slate-400 hover:text-slate-600",children:n.jsx(yr,{size:20})})]}),n.jsxs("form",{onSubmit:F,className:"p-6 space-y-4 max-h-[80vh] overflow-y-auto",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"ã¤ãã³ãå"}),n.jsx("input",{type:"text",required:!0,value:S.title,onChange:K=>A({...S,title:K.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"éå§æé"}),n.jsx("input",{type:"time",value:S.timeStart,onChange:K=>A({...S,timeStart:K.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"çµäºæé"}),n.jsx("input",{type:"time",value:S.timeEnd,onChange:K=>A({...S,timeEnd:K.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"é嬿¥è¨å®"}),n.jsxs("div",{className:"flex gap-2 mb-2",children:[n.jsx("input",{type:"date",value:E,onChange:K=>M(K.target.value),className:"flex-1 px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"}),n.jsx("button",{type:"button",onClick:()=>{E&&!S.dates.includes(E)&&(A({...S,dates:[...S.dates,E].sort()}),M(""))},className:"px-3 py-2 bg-slate-100 text-slate-600 rounded text-xs font-bold hover:bg-slate-200",children:"追å "})]}),n.jsxs("div",{className:"flex flex-wrap gap-2 p-2 bg-slate-50 rounded border border-slate-100 min-h-[40px]",children:[S.dates.length===0&&n.jsx("span",{className:"text-xs text-slate-400",children:"æ¥ä»ã追å ããã¦ãã¾ãã"}),S.dates.map(K=>n.jsxs("span",{className:"flex items-center gap-1 bg-white border border-blue-200 text-blue-700 px-2 py-1 rounded text-xs font-bold shadow-sm",children:[new Date(K).toLocaleDateString(),n.jsx("button",{type:"button",onClick:()=>A({...S,dates:S.dates.filter(Q=>Q!==K)}),className:"text-blue-400 hover:text-red-500",children:n.jsx(yr,{size:12})})]},K))]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"å
容"}),n.jsx("textarea",{value:S.content,onChange:K=>A({...S,content:K.target.value}),className:"w-full h-32 px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100 resize-none"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"ãªã³ã¯URL"}),n.jsx("input",{type:"url",value:S.url,onChange:K=>A({...S,url:K.target.value}),placeholder:"https://...",className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]}),n.jsxs("div",{className:"pt-4 flex gap-3",children:[n.jsx("button",{type:"button",onClick:()=>{x(!1),I()},className:"flex-1 px-4 py-2 border border-slate-200 text-slate-500 rounded text-xs font-bold hover:bg-slate-50",children:"ãã£ã³ã»ã«"}),n.jsxs("button",{type:"submit",disabled:j,className:"flex-1 px-4 py-2 bg-slate-800 text-white rounded text-xs font-bold hover:bg-slate-700 flex justify-center gap-2",children:[j?n.jsx($n,{size:14,className:"animate-spin"}):n.jsx(Kf,{size:14})," ",y?"æ´æ°":"使"]})]})]})]})})]})},sK=()=>{const{role:r}=dc(),[e,t]=T.useState([]),[s,i]=T.useState(!0),[a,o]=T.useState(!1),[c,h]=T.useState(!1),[f,m]=T.useState(null),[g,x]=T.useState(!1),[y,v]=T.useState({title:"",url:"",category:"",description:""});T.useEffect(()=>{j()},[]);const j=async()=>{try{i(!0);const{data:R,error:I}=await Me.from("links").select("*").order("category",{ascending:!0}).order("title",{ascending:!0});if(I)throw I;R&&t(R)}catch(R){console.error("Error fetching links:",R)}finally{i(!1)}},N=()=>{v({title:"",url:"",category:"",description:""}),m(null),h(!1)},S=async R=>{if(R.preventDefault(),!(!y.title||!y.url)){x(!0);try{const I={title:y.title,url:y.url,category:y.category,description:y.description,updated_at:new Date().toISOString()};f&&c?await Me.from("links").update(I).eq("id",f.id):await Me.from("links").insert(I),o(!1),N(),j()}catch(I){console.error(I)}finally{x(!1)}}},A=async(R,I)=>
551{if(R.preventDefault(),R.stopPropagation(),!!window.confirm("ãªã³ã¯ãåé¤ãã¾ããï¼"))try{await Me.from("links").delete().eq("id",I),j()}catch(F){console.error(F)}},E=(R,I)=>{R.preventDefault(),R.stopPropagation(),m(I),v({title:I.title,url:I.url,category:I.category||"",description:I.description||""}),h(!0),o(!0)},M=R=>{const I=R==null?void 0:R.toLowerCase();return I!=null&&I.includes("sns")||I!=null&&I.includes("twitter")||I!=null&&I.includes("x")||I!=null&&I.includes("instagram")?n.jsx(c7,{size:18,className:"text-pink-500"}):I!=null&&I.includes("official")||I!=null&&I.includes("ãµã¤ã")?n.jsx(TH,{size:18,className:"text-blue-500"}):n.jsx(hC,{size:18,className:"text-slate-400"})};return n.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex items-end justify-between border-b border-slate-200 pb-4",children:[n.jsxs("div",{children:[n.jsxs("h1",{className:"text-xl font-bold text-slate-800 flex items-center gap-2",children:[n.jsx(hC,{className:"text-blue-500",size:24}),"é¢é£ãªã³ã¯"]}),n.jsx("p",{className:"text-xs text-slate-500 font-bold uppercase tracking-wider mt-1",children:"MetaHeroes Related Sites & SNS"})]}),r==="admin"&&n.jsxs("button",{onClick:()=>{N(),o(!0)},className:"px-3 py-1.5 bg-slate-800 text-white text-[10px] font-black uppercase tracking-widest rounded hover:bg-slate-700 transition-all flex items-center gap-1.5",children:[n.jsx(K0,{size:12})," ãªã³ã¯ã追å "]})]}),s?n.jsx("div",{className:"flex justify-center py-20",children:n.jsx($n,{className:"animate-spin text-slate-300",size:32})}):e.length===0?n.jsx("div",{className:"text-center py-20 bg-white rounded-lg border border-slate-200 shadow-sm",children:n.jsx("p",{className:"text-slate-400 font-bold text-sm",children:"ç¾å¨ç»é²ããã¦ãããªã³ã¯ã¯ããã¾ããã"})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.map(R=>n.jsxs("a",{href:R.url,target:"_blank",rel:"noopener noreferrer",className:"group bg-white p-5 rounded-xl border border-slate-200 shadow-sm hover:shadow-md hover:border-blue-200 transition-all flex items-start gap-4 relative",children:[n.jsx("div",{className:"p-2.5 rounded-lg bg-slate-50 group-hover:bg-blue-50 transition-colors",children:M(R.category)}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("h2",{className:"text-sm font-bold text-slate-800 truncate group-hover:text-blue-600 transition-colors",children:R.title}),n.jsx(sP,{size:12,className:"text-slate-300 group-hover:text-blue-400 shrink-0"})]}),R.description&&n.jsx("p",{className:"text-[11px] text-slate-500 leading-relaxed line-clamp-2",children:R.description}),R.category&&n.jsx("span",{className:"inline-block mt-2 text-[9px] font-black uppercase tracking-widest text-slate-400 bg-slate-100 px-2 py-0.5 rounded",children:R.category})]}),r==="admin"&&n.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx("button",{onClick:I=>E(I,R),className:"p-1.5 bg-white/90 rounded-full text-blue-600 hover:bg-white shadow-sm border border-slate-100",children:n.jsx(nc,{size:12})}),n.jsx("button",{onClick:I=>A(I,R.id),className:"p-1.5 bg-white/90 rounded-full text-red-600 hover:bg-white shadow-sm border border-slate-100",children:n.jsx(So,{size:12})})]})]},R.id))}),a&&n.jsx("div",{className:"fixed inset-0 bg-slate-900/60 z-[60] flex items-center justify-center p-4 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-white rounded-xl shadow-2xl w-full max-w-md overflow-hidden",children:[n.jsxs("div",{className:"px-6 py-4 border-b border-slate-200 bg-slate-50 flex items-center justify-between",children:[n.jsx("h2",{className:"font-bold text-slate-800 text-sm",children:c?"ãªã³ã¯ãç·¨é":"æ°è¦ãªã³ã¯ç»é²"}),n.jsx("button",{onClick:()=>{o(!1),N()},className:"text-slate-400 hover:text-slate-600",children:n.jsx(yr,{size:20})})]}),n.jsxs("form",{onSubmit:S,className:"p-6 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"ã¿ã¤ãã«"}),n.jsx("input",{type:"text",required:!0,value:y.title,onChange:R=>v({...y,title:R.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"URL"}),n.jsx("input",{type:"url",required:!0,value:y.url,onChange:R=>v({...y,url:R.target.value}),placeholder:"https://...",className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"ã«ãã´ãª"}),n.jsx("input",{type:"text",value:y.category,onChange:R=>v({...y,category:R.target.value}),placeholder:"SNS, å
¬å¼, etc.",className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-[10px] font-bold text-slate-400 uppercase mb-1",children:"説æ"}),n.jsx("textarea",{value:y.description,onChange:R=>v({...y,description:R.target.value}),className:"w-full h-24 px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-slate-100 resize-none"})]}),n.jsxs("div",{className:"pt-4 flex gap-3",children:[n.jsx("button",{type:"button",onClick:()=>{o(!1),N()},className:"flex-1 px-4 py-2 border border-slate-200 text-slate-500 rounded text-xs font-bold hover:bg-slate-50",children:"ãã£ã³ã»ã«"}),n.jsxs("button",{type:"submit",disabled:g,className:"flex-1 px-4 py-2 bg-slate-800 text-white rounded text-xs font-bold hover:bg-slate-700 flex justify-center gap-2",children:[g?n.jsx($n,{size:14,className:"animate-spin"}):n.jsx(Kf,{size:14})," ",c?"æ´æ°":"ç»é²"]})]})]})]})})]})},nK=()=>{const{role:r,user:e}=dc(),[t,s]=T.useState([]),[i,a]=T.useState([]),[o,c]=T.useState([]),[h,f]=T.useState(!0),[m,g]=T.useState(!1),[x,y]=T.useState(null),[v,j]=T.useState(!1),[N,S]=T.useState(!1),[A,E]=T.useState({email:"",password:"",company_name:"",role:"agent"}),[M,R]=T.useState({company_name:"",role:"agent"}),[I,F]=T.useState(!1),[D,O]=T.useState(""),[$,z]=T.useState(""),[re,he]=T.useState({name:"",display_order:0});T.useEffect(()=>{de()},[]);const de=async()=>{f(!0);try{const[ee,W,G]=await Promise.all([Me.from("services").select("*").order("name"),Me.from("categories").select("*").order("display_order",{ascending:!0}),Me.functions.invoke("manage-users",{body:{action:"list"}})]);ee.data&&s(ee.data),W.data&&a(W.data),G.data&&!G.error&&c(G.data)}catch(ee){console.error("Error fetching data:",ee)}finally{f(!1)}},fe=async ee=>{if(ee.preventDefault(),!(!A.email||!A.password||!A.company_name)){g(!0);try{const{data:W,error:G}=await Me.functions.invoke("manage-users",{body:{action:"create",...A}});if(G){const ne=await G.context.json().catch(()=>null);throw new Error((ne==null?void 0:ne.error)||"ã¢ã«ã¦ã³ã使ã«å¤±æãã¾ãã")}if(W!=null&&W.error)throw new Error(W.error);S(!1),E({email:"",password:"",company_name:"",role:"agent"}),de(),alert("ã¢ã«ã¦ã³ãã使ãã¾ããã")}catch(W){alert(W.message)}finally{g(!1)}}},oe=async ee=>{if(ee.preventDefault(),!re.name.trim())return;const W=re.name.toLowerCase().replace(/\s+/g,"-");await Me.from("categories").insert({name:re.name.trim(),display_order:0,slug:W}),he({name:"",display_order:0}),de()},le=async ee=>
551{window.confirm("ã«ãã´ãªãåé¤ãã¾ããï¼ç´ã¥ãè³æã表示ãããªããªãå¯è½æ§ãããã¾ãã")&&(await Me.from("categories").delete().eq("id",ee),de())},se=async()=>{if(!(!x||!M.company_name)){g(!0);try{const{error:ee}=await Me.from("profiles").update({company_name:M.company_name,role:M.role,updated_at:new Date().toISOString()}).eq("id",x.id);if(ee)throw ee;j(!1),de(),y({...x,company_name:M.company_name,role:M.role})}catch(ee){alert(ee.message)}finally{g(!1)}}},K=async()=>{if(!(!x||!D)){g(!0);try{const{data:ee,error:W}=await Me.functions.invoke("manage-users",{body:{action:"reset-password",userId:x.id,password:D}});if(W){const G=await W.context.json().catch(()=>null);throw new Error((G==null?void 0:G.error)||"åè¨å®ã«å¤±æãã¾ãã")}if(ee!=null&&ee.error)throw new Error(ee.error);alert("ãã¹ã¯ã¼ããæ´æ°ãã¾ããã"),F(!1),O("")}catch(ee){alert(ee.message)}finally{g(!1)}}},Q=async ee=>{if(window.confirm("æ¬å½ã«åé¤ãã¾ããï¼"))try{const{error:W,data:G}=await Me.functions.invoke("manage-users",{body:{action:"delete",userId:ee}});if(W){const ne=await W.context.json().catch(()=>null);throw new Error((ne==null?void 0:ne.error)||"åé¤ã«å¤±æãã¾ãã")}if(G!=null&&G.error)throw new Error(G.error);y(null),de()}catch(W){alert(W.message)}},U=async ee=>{ee.preventDefault(),$.trim()&&(await Me.from("services").insert({name:$.trim()}),z(""),de())},Z=async ee=>{window.confirm("åé¤ãã¾ããï¼")&&(await Me.from("services").delete().eq("id",ee),de())};return r!=="admin"?n.jsx("div",{className:"p-12 text-center",children:"ã¢ã¯ã»ã¹æ¨©éãããã¾ãã"}):n.jsxs("div",{className:"max-w-6xl mx-auto space-y-8 pb-12",children:[n.jsx("div",{className:"flex justify-between items-end border-b border-slate-200 pb-4",children:n.jsxs("div",{children:[n.jsxs("h1",{className:"text-xl font-semibold text-slate-800 flex items-center gap-2",children:[n.jsx(iP,{size:20,className:"text-slate-400"}),"管çè
è¨å®"]}),n.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"ã¢ã«ã¦ã³ãã¨ãã¹ã¿ã¼ãã¼ã¿ã®ç®¡ç"})]})}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[n.jsx("div",{className:"lg:col-span-2 space-y-4",children:n.jsxs("div",{className:"bg-white border border-slate-200 rounded-lg shadow-sm overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-4 border-b border-slate-200 bg-slate-50 flex items-center justify-between",children:[n.jsxs("h2",{className:"font-semibold text-slate-700 flex items-center gap-2 text-sm",children:[n.jsx(oP,{size:16,className:"text-slate-400"}),"ç»é²ã¢ã«ã¦ã³ãä¸è¦§"]}),n.jsxs("button",{onClick:()=>S(!0),className:"px-3 py-1.5 bg-blue-600 text-white text-[10px] font-bold uppercase tracking-widest rounded hover:bg-blue-700 transition-all flex items-center gap-1.5",children:[n.jsx(K0,{size:12})," ã¢ã«ã¦ã³ã追å "]})]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-left text-sm",children:[n.jsx("thead",{className:"bg-slate-50 text-slate-400 border-b border-slate-100 font-medium text-[10px] uppercase tracking-wider",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3",children:"ä¼ç¤¾å"}),n.jsx("th",{className:"px-6 py-3",children:"ãã¼ã«"}),n.jsx("th",{className:"px-6 py-3 text-right",children:"æçµæ´æ°"})]})}),n.jsx("tbody",{className:"divide-y divide-slate-100",children:h?n.jsx("tr",{children:n.jsx("td",{colSpan:3,className:"p-8 text-center",children:n.jsx($n,{className:"animate-spin mx-auto text-slate-200"})})}):o.map(ee=>n.jsxs("tr",{onClick:()=>{y(ee),F(!1),j(!1),R({company_name:ee.company_name||"",role:ee.role})},className:"hover:bg-blue-50/30 cursor-pointer transition-colors group",children:[n.jsx("td",{className:"px-6 py-4",children:n.jsx("div",{className:"font-medium text-slate-800 group-hover:text-blue-600",children:ee.company_name||"æªè¨å®"})}),n.jsx("td",{className:"px-6 py-4",children:n.jsx("span",{className:`text-[10px] font-bold uppercase px-2 py-0.5 rounded border ${ee.role==="admin"?"bg-purple-50 text-purple-600 border-purple-100":ee.role==="agent"?"bg-blue-50 text-blue-600 border-blue-100":"bg-slate-50 text-slate-500 border-slate-200"}`,children:ee.role})}),n.jsx("td",{className:"px-6 py-4 text-slate-400 text-xs text-right",children:new Date(ee.updated_at).toLocaleDateString()})]},ee.id))})]})})]})}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"bg-white border border-slate-200 rounded-lg shadow-sm overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-4 border-b border-slate-200 bg-slate-50 font-semibold text-slate-700 text-sm flex items-center gap-2",children:[n.jsx(rP,{size:16,className:"text-slate-400"})," ã«ãã´ãªç®¡ç"]}),n.jsxs("div",{className:"p-5 space-y-4",children:[n.jsxs("form",{onSubmit:oe,className:"flex gap-2",children:[n.jsx("input",{type:"text",placeholder:"æ°ã«ãã´ãªå",value:re.name,onChange:ee=>he({...re,name:ee.target.value}),className:"flex-1 px-3 py-1.5 border border-slate-200 rounded text-xs outline-none"}),n.jsx("button",{type:"submit",className:"px-3 py-1.5 bg-slate-800 text-white rounded text-[10px] font-bold",children:"追å "})]}),n.jsx("div",{className:"space-y-1 max-h-[300px] overflow-y-auto",children:i.map(ee=>n.jsxs("div",{className:"flex items-center justify-between p-2 text-xs bg-slate-50 rounded border border-slate-100 group",children:[n.jsx("span",{className:"text-slate-700",children:ee.name}),n.jsx("button",{onClick:()=>le(ee.id),className:"text-slate-300 hover:text-red-500 opacity-0 group-hover:opacity-100",children:n.jsx(So,{size:12})})]},ee.id))})]})]}),n.jsxs("div",{className:"bg-white border border-slate-200 rounded-lg shadow-sm overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-4 border-b border-slate-200 bg-slate-50 font-semibold text-slate-700 text-sm flex items-center gap-2",children:[n.jsx(aP,{size:16,className:"text-slate-400"})," ãµã¼ãã¹ç®¡ç"]}),n.jsxs("div",{className:"p-5 space-y-4",children:[n.jsxs("form",{onSubmit:U,className:"flex gap-2",children:[n.jsx("input",{type:"text",placeholder:"æ°ãµã¼ãã¹å",value:$,onChange:ee=>z(ee.target.value),className:"flex-1 px-3 py-1.5 border border-slate-200 rounded text-xs outline-none"}),n.jsx("button",{type:"submit",className:"px-3 py-1.5 bg-slate-800 text-white rounded text-[10px] font-bold",children:"追å "})]}),n.jsx("div",{className:"space-y-1",children:t.map(ee=>n.jsxs("div",{className:"flex items-center justify-between p-2 text-xs bg-slate-50 rounded border border-slate-100 group",children:[n.jsx("span",{className:"text-slate-700",children:ee.name}),n.jsx("button",{onClick:()=>Z(ee.id),className:"text-slate-300 hover:text-red-500 opacity-0 group-hover:opacity-100",children:n.jsx(So,{size:12})})]},ee.id))})]})]})]})]}),N&&n.jsx("div",{className:"fixed inset-0 bg-slate-900/60 z-50 flex items-center justify-center p-4 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-white rounded-lg shadow-2xl w-full max-w-md overflow-hidden",children:[n.jsxs("div",{className:"px-6 py-4 border-b border-slate-200 flex items-center justify-between bg-slate-50",children:[n.jsx("h2",{className:"font-bold text-slate-800 text-sm",children:"æ°è¦ã¢ã«ã¦ã³ã使"}),n.jsx("button",{onClick:()=>S(!1),className:"text-slate-400 hover:text-slate-600 transition-colors",children:n.jsx(yr,{size:20})})]}),n.jsxs("form",{onSubmit:fe,className:"p-6 space-y-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"ã¡ã¼ã«ã¢ãã¬ã¹"}),n.jsx("input",{type:"email",required:!0,value:A.email,onChange:ee=>E({...A,email:ee.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-blue-100",placeholder:"[email protected]"})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"ãã¹ã¯ã¼ã"}),n.jsx("input",{type:"password",required:!0,value:A.password,onChange:ee=>E({...A,password:ee.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-blue-100",placeholder:"6æå以ä¸"})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"ä¼ç¤¾å"}),n.jsx("input",{type:"text",required:!0,value:A.company_name,onChange:ee=>E({...A,company_name:ee.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-blue-100",placeholder:"æ ªå¼ä¼ç¤¾XXX"})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:"ãã¼ã«"}),n.jsxs("select",{value:A.role,onChange:ee=>E({...A,role:ee.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-sm outline-none bg-white focus:ring-2 focus:ring-blue-100",children:[n.jsx("option",{value:"agent",children:"AGENT (代çåº)"}),n.jsx("option",{value:"admin",children:"ADMIN (管çè
)"}),n.jsx("option",{value:"guest",children:"GUEST (ã²ã¹ã)"})]})]}),n.jsxs("div",{className:"pt-4 flex gap-3",children:[n.jsx("button",{type:"button",onClick:()=>S(!1),className:"flex-1 px-4 py-2 border border-slate-200 text-slate-600 rounded text-xs font-bold hover:bg-slate-50",children:"ãã£ã³ã»ã«"}),n.jsxs("button",{type:"submit",disabled:m,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded text-xs font-bold hover:bg-blue-700 disabled:opacity-50 flex justify-center items-center gap-2",children:[m?n.jsx($n,{size:14,className:"animate-spin"}):n.jsx(Kf,{size:14}),"使"]})]})]})]})}),x&&n.jsx("div",{className:"fixed inset-0 bg-slate-900/60 z-50 flex items-center justify-center p-4 backdrop-blur-sm",children:n.jsxs("div",{className:"bg-white rounded-lg shadow-2xl w-full max-w-lg overflow-hidden",children:[n.jsxs("div",{className:"px-6 py-4 border-b border-slate-200 flex items-center justify-between bg-slate-50",children:[n.jsx("h2",{className:"font-bold text-slate-800 text-sm",children:"ã¢ã«ã¦ã³ã詳細"}),n.jsx("button",{onClick:()=>y(null),className:"text-slate-400 hover:text-slate-600 transition-colors",children:n.jsx(yr,{size:20})})]}),n.jsxs("div",{className:"p-8 space-y-6",children:[n.jsxs("div",{className:"pb-6 border-b border-slate-100 flex items-center justify-between",children:[v?n.jsxs("div",{className:"flex-1 space-y-3",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-400 uppercase",children:"ä¼ç¤¾å"}),n.jsx("input",{type:"text",value:M.company_name,onChange:ee=>R({...M,company_name:ee.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded text-base font-bold outline-none focus:ring-2 focus:ring-blue-100"})]}):n.jsx("h3",{className:"text-xl font-bold text-slate-900",children:x.company_name||"ä¼ç¤¾åæªè¨å®"}),!v&&n.jsx("button",{onClick:()=>j(!0),className:"text-blue-600 hover:text-blue-800",children:n.jsx(nc,{size:16})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("label",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-1",children:[n.jsx(Uv,{size:12})," ã¡ã¼ã«ã¢ãã¬ã¹"]}),n.jsx("div",{className:"text-sm text-slate-700 bg-slate-50 px-3 py-2 rounded border border-slate-100 font-mono",children:x.email})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("label",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-1",children:[n.jsx(u7,{size:12})," ãã¼ã«"]}),v?n.jsxs("select",{value:M.role,onChange:ee=>R({...M,role:ee.target.value}),className:"w-full px-2 py-1 border border-slate-200 rounded text-xs outline-none bg-white",children:[n.jsx("option",{value:"admin",children:"ADMIN"}),n.jsx("option",{value:"agent",children:"AGENT"}),n.jsx("option",{value:"guest",children:"GUEST"})]}):n.jsx("div",{className:"text-sm font-bold text-blue-600",children:x.role.toUpperCase()})]}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs("label",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-1",children:[n.jsx(Ub,{size:12})," ç»é²æ¥"]}),n.jsx("div",{className:"text-sm text-slate-600",children:new Date(x.created_at).toLocaleDateString()})]})]}),v&&n.jsxs("div",{className:"pt-4 flex gap-2",children:[n.jsx("button",{onClick:se,disabled:m,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded text-xs font-bold hover:bg-blue-700 disabled:opacity-50",children:m?"ä¿åä¸...":"夿´ãä¿å"}),n.jsx("button",{onClick:()=>j(!1),className:"px-4 py-2 border border-slate-200 text-slate-600 rounded text-xs font-bold hover:bg-slate-50",children:"ãã£ã³ã»ã«"})]}),n.jsx("div",{className:"pt-4 mt-4 border-t border-slate-100",children:I?n.jsxs("div",{className:"space-y-3 animate-in slide-in-from-top-2 duration-200",children:[n.jsxs("label",{className:"block text-[10px] font-bold text-slate-400 uppercase tracking-widest",children:[n.jsx(LH,{size:12,className:"inline mr-1"})," æ°ãããã¹ã¯ã¼ã"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{type:"password",value:D,onChange:ee=>O(ee.target.value),placeholder:"æ°ãããã¹ã¯ã¼ããå
¥å",className:"flex-1 px-3 py-2 border border-slate-200 rounded text-sm outline-none focus:ring-2 focus:ring-blue-100"}),n.jsx("button",{onClick:K,disabled:m||!D,className:"px-4 py-2 bg-blue-600 text-white rounded text-xs font-bold hover:bg-blue-700 disabled:opacity-50",children:"ä¿å"}),n.jsx("button",{onClick:()=>F(!1),className:"px-3 py-2 border border-slate-200 text-slate-400 rounded hover:bg-slate-50",children:n.jsx(yr,{size:16})})]})]}):n.jsxs("button",{onClick:()=>F(!0),className:"text-[11px] font-bold text-blue-600 hover:text-blue-800 flex items-center gap-1.5 transition-colors",children:[n.jsx(r7,{size:12})," ãã¹ã¯ã¼ããåè¨å®ãã"]})})]}),n.jsxs("div",{className:"pt-6 flex gap-3 border-t border-slate-100",children:[n.jsx("button",{onClick:()=>y(null),className:"flex-1 px-4 py-2.5 border border-slate-200 text-slate-600 rounded text-xs font-bold hover:bg-slate-50",children:"éãã"}),x.id!==(e==null?void 0:e.id)&&n.jsxs("button",{onClick:()=>Q(x.id),className:"px-4 py-2.5 bg-red-50 text-red-600 rounded text-xs font-bold hover:bg-red-100 flex items-center gap-2",children:[n.jsx(So,{size:14})," åé¤"]})]})]})]})})]})};function rK(){const r=Kt(),e=r.pathname==="/agency-login"||r.pathname.startsWith("/agency");return n.jsx(Yq,{children:n.jsxs("div",{className:"flex flex-col min-h-screen",children:[n.jsx(U6,{}),!e&&n.jsxs(n.Fragment,{children:[n.jsx(Kq,{}),n.jsx("div",{className:"pt-16 sm:pt-20 lg:pt-24 absolute top-0 left-0 right-0 z-[100]",children:n.jsx(Xq,{})})]}),n.jsx("div",{className:"flex-grow",children:n.jsxs(n6,{children:[n.jsx(Te,{path:"/",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"æ ªå¼ä¼ç¤¾MetaHeroes | ãã¼ãã¼ã¨å
±åµããã¡ã¿ãã¼ã¹ã»AIã«ã³ããã¼",description:"æ ªå¼ä¼ç¤¾MetaHeroesã¯ãã¡ã¿ãã¼ã¹ãAIãXRæè¡ãé§ä½¿ãã¦ç¤¾ä¼èª²é¡ã解決ããã¤ã³ãã¯ãã»ãã¸ãã¹ãå±éã2044å¹´ã¾ã§ã«100ã®HEROãåµåºãããã¸ã§ã³ã®ãã¨ãæè²ã»é²ç½ã»å°æ¹åµçã®é©æ°ã«æã¿ã¾ãã",schema:{"@context":"https://schema.org","@type":"Organization",name:"æ ªå¼ä¼ç¤¾MetaHeroes",url:"https://meta-heroes.co.jp/",logo:"https://meta-heroes.co.jp/assets/logo.png",description:"ã¡ã¿ãã¼ã¹ã»AIã»XRã§ç¤¾ä¼èª²é¡ã解決ããæ¥æ¬ã®æªæ¥ãã¯ã¯ã¯ã¯ãããã¤ã³ãã¯ãã»ãã¸ãã¹ãå±éã",address:{"@type":"PostalAddress",streetAddress:"å å±±çº1-5 ä¸å
±æ¢
ç°ãã« 8F",addressLocality:"大éªå¸ååº",addressRegion:"大éªåº",postalCode:"530-0027",addressCountry:"JP"},founder:{"@type":"Person",name:"æ¾ç³ åä¿"},foundingDate:"2021-12-03",sameAs:["https://prtimes.jp/main/html/searchrlp/company_id/121285.html","https://www.facebook.com/metaheroes.jp"],contactPoint:{"@type":"ContactPoint",contactType:"customer service",url:"https://meta-heroes.co.jp/contact",availableLanguage:"Japanese"}}}),n.jsx(M7,{})]})}),n.jsx(Te,
551{path:"/agency-login",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"代çåºãã°ã¤ã³ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(Vq,{})]})}),n.jsxs(Te,{path:"/agency",element:n.jsx(O3,{children:n.jsx(Jq,{})}),children:[n.jsx(Te,{index:!0,element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"代çåºããã·ã¥ãã¼ã | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(Qq,{})]})}),n.jsx(Te,{path:"documents",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"è³æã©ã¤ãã©ãª | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(Zq,{})]})}),n.jsx(Te,{path:"videos",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"åç»ã©ã¤ãã©ãª | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(eK,{})]})}),n.jsx(Te,{path:"events",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã¤ãã³ãæ
å ± | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(tK,{})]})}),n.jsx(Te,{path:"links",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"é¢é£ãªã³ã¯ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(sK,{})]})}),n.jsx(Te,{path:"admin",element:n.jsxs(O3,{allowedRoles:["admin"],children:[n.jsx(De,{title:"管çè
è¨å® | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(nK,{})]})})]}),n.jsx(Te,{path:"/about",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"MetaHeroesã«ã¤ã㦠| æ ªå¼ä¼ç¤¾MetaHeroes",description:"æ ªå¼ä¼ç¤¾MetaHeroesã®ãã¸ã§ã³ãããã·ã§ã³ãããã¦2044å¹´ã«åãã100ã®HEROåµåºè¨ç»ã«ã¤ãã¦ãç´¹ä»ãã¾ãã"}),n.jsx(O7,{})]})}),n.jsx(Te,{path:"/about/company",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ä¼ç¤¾æ¦è¦ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(F7,{})]})}),n.jsx(Te,{path:"/about/profile",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"伿¥ãããã£ã¼ã« | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(oz,{})]})}),n.jsx(Te,{path:"/about/mission",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ããã·ã§ã³ã»ãã¸ã§ã³ | æ ªå¼ä¼ç¤¾MetaHeroes",description:"ãSociety 5.0 à SDGs à HEROããã¸ã¿ã«ã®åã§ç¤¾ä¼èª²é¡ã解決ãã誰ãããã¼ãã¼ã«ãªããä¸çãç®æãã¾ãã"}),n.jsx(lz,{})]})}),n.jsx(Te,{path:"/about/offices",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãªãã£ã¹æ¡å
| æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(uz,{})]})}),n.jsx(Te,{path:"/about/conduct",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"è¡åæé | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(fz,{})]})}),n.jsx(Te,{path:"/about/privacy",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãã©ã¤ãã·ã¼ããªã·ã¼ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(mz,{})]})}),n.jsx(Te,{path:"/about/group",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã°ã«ã¼ãä¼ç¤¾ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(gz,{})]})}),n.jsx(Te,{path:"/business",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"äºæ¥å
容 | æ ªå¼ä¼ç¤¾MetaHeroes",description:"æè²ãé²ç½ãå°æ¹åµçã®3é åã«ãããã¡ã¿ãã¼ã¹ã»AIæ´»ç¨ã½ãªã¥ã¼ã·ã§ã³ãæä¾ãã¦ãã¾ãã"}),n.jsx(H7,{})]})}),n.jsx(Te,{path:"/gallery",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã®ã£ã©ãªã¼ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(wz,{})]})}),n.jsx(Te,{path:"/contact/privacy",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"å人æ
å ±ã®åãæ±ãã«ã¤ã㦠| æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(Sz,{})]})}),n.jsx(Te,{path:"/contact",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãåãåãã | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(kz,{})]})}),n.jsx(Te,{path:"/document-request",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãå½¹ç«ã¡è³æ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(R9,{})]})}),n.jsx(Te,{path:"/speaking",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"è¬æ¼ã»ç»å£ | æ ªå¼ä¼ç¤¾MetaHeroes",description:"AIã»ã¡ã¿ãã¼ã¹ã»XRã®æåç·ã§äºæ¥ãæ¨é²ããMetaHeroesã«ããè¬æ¼ã»ç»å£ãµã¼ãã¹ãã«ã³ãã¡ã¬ã³ã¹ç»å£ããã¯ã¼ã¯ã·ã§ãããã¤ãã³ããããã¥ã¼ã¹ã¾ã§æè»ã«å¯¾å¿ãã¾ãã"}),n.jsx(Q9,{})]})}),n.jsx(Te,{path:"/recruit",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"æ¡ç¨æ
å ± | æ ªå¼ä¼ç¤¾MetaHeroes",description:"次ä¸ä»£ã®ç¤¾ä¼åºç¤ãåµãHEROãåéãã¦ãã¾ããã¡ã¿ãã¼ã¹ã»AIã®åã§ä¸çãã¯ã¯ã¯ã¯ããã¾ãããï¼"}),n.jsx(L9,{})]})}),n.jsx(Te,{path:"/recruit/entry",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"æ¡ç¨ã¨ã³ããªã¼ | æ ªå¼ä¼ç¤¾MetaHeroes",description:"Meta Heroesã®æªæ¥ãå
±ã«åµã仲éãåéãã¦ãã¾ããå¿åãã©ã¼ã ããã¨ã³ããªã¼ãã¦ãã ããã"}),n.jsx(V9,{})]})}),n.jsx(Te,{path:"/faq",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãããã質å | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(W9,{})]})}),n.jsx(Te,{path:"/services",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãµã¼ãã¹ä¸è¦§ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(V7,{})]})}),n.jsx(Te,{path:"/services/xr",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"XRã½ãªã¥ã¼ã·ã§ã³ | VRã»MRã«ããæ²¡å
¥å課é¡è§£æ±º | æ ªå¼ä¼ç¤¾MetaHeroes",description:"VR/AR/MRæè¡ãé§ä½¿ããå ´æãæéã®å¶ç´ãè¶
ããæ²¡å
¥ä½é¨ãæä¾ãé²ç½ã»æè²ã»å°ååµçãªã©ãå®ç¤¾ä¼ã®ãä¸ããè§£æ¶ããææ°ã®XRã½ãªã¥ã¼ã·ã§ã³ããªã¼ãã¼ã¡ã¤ãã§æ§ç¯ãã¾ãã",keywords:"VR, AR, MR, 没å
¥ä½é¨, ãã¸ã¿ã«ãã¤ã³, ã¡ã¿ãã¼ã¹éçº, UEFN"}),n.jsx(W7,{})]})}),n.jsx(Te,{path:"/services/holoshare",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"HoloShare | ããã°ã©ã ã»XRå
±æãã©ãããã©ã¼ã | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(G7,{})]})}),n.jsx(Te,{path:"/services/hero-aivo",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"HERO AIVO | AIæ¤ç´¢æé©å(LLMO)診æã»Webå¶ä½ | æ ªå¼ä¼ç¤¾MetaHeroes",description:"AIæ¤ç´¢ï¼ChatGPT/Perplexityçï¼ã主æµã«ãªãæä»£ãæ
å ±ã®èª¤èªèãé²ããAIããæ£ããå¼ç¨ã»æ¨å¥¨ãããWebãµã¤ãã¸ã¨æé©åããå½å
屿ã®LLMOã½ãªã¥ã¼ã·ã§ã³ã",keywords:"LLMO, AIæ¤ç´¢æé©å, AIé客, Webå¶ä½, HERO AIVO"}),n.jsx(q7,{})]})}),n.jsx(Te,{path:"/services/ai-training",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"AI人æè²æç ä¿® | å®åã«ç´çµããDXãªã¹ããªã³ã° | æ ªå¼ä¼ç¤¾MetaHeroes",description:"15,000å以ä¸ã®å®ç¸¾ãèªãå®è·µçAIç ä¿®ãåãªããã¼ã«ã®ç¿å¾ã§ã¯ãªããèªç¤¾ã®èª²é¡ãAIã§è§£æ±ºãããAIãªãã©ã·ã¼ããåºä¸ãããçµç¹å
¨ä½ã®çç£æ§ãåä¸ããã¾ãã",keywords:"AIç ä¿®, DXç ä¿®, ãªã¹ããªã³ã°, çç£æ§åä¸, çæAIæ´»ç¨"}),n.jsx(K7,{})]})}),n.jsx(Te,{path:"/services/bousai-metaverse",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"é²ç½ã¡ã¿ãã¼ã¹ | 没å
¥åé²ç½æè²ã»è¨ç·´ã·ãã¥ã¬ã¼ã·ã§ã³ | æ ªå¼ä¼ç¤¾MetaHeroes",description:"ãæããããé²ç½ããããèªãå¦ã¶é²ç½ãã¸ãä»®æ³ç©ºéã§ã®ç«ç½ã»æµ¸æ°´ä½é¨ãéããé«ã没å
¥æã§å±æ©æèãèªåäºåããããèªæ²»ä½ã»æè²æ©é¢åãã®æ¬¡ä¸ä»£é²ç½æè²ã",keywords:"é²ç½æè², é¿é£è¨ç·´, VRé²ç½, ã·ãã¥ã¬ã¼ã·ã§ã³, èªæ²»ä½DX"}),n.jsx(X7,{})]})}),n.jsx(Te,{path:"/services/bousai-expo",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"é²ç½ä¸å | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(Y7,{})]})}),n.jsx(Te,{path:"/services/hero-egg-collection",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"Hero Egg Collection | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(J7,{})]})}),n.jsx(Te,{path:"/services/hero-egg",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"Hero Egg | åã©ããã大人ã¾ã§å¦ã¹ãDXæè²æ½è¨ | æ ªå¼ä¼ç¤¾MetaHeroes",description:"ãã¹ã¦ã®ãã©ãã«ããã¼ãã¼ãã®åµãã10GBã®è¶
é«éåç·ããã¤ã¹ããã¯PCãå®åããæ¬¡ä¸ä»£ã®ãã¯ããã¸ã¼ã楽ãã¿ãªããå¦ã¹ãDXæè²ãã©ãããã©ã¼ã ã",keywords:"Hero Egg, DXæè², ã¡ã¿ãã¼ã¹æè², ããã°ã©ãã³ã°, åã©ãæè²"}),n.jsx(rz,{})]})}),n.jsx(Te,{path:"/services/game-making-camp",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã²ã¼ã ã¡ã¤ãã³ã°ãã£ã³ã | 親åã§å¦ã¶ã²ã¼ã å¶ä½ä½é¨ | æ ªå¼ä¼ç¤¾MetaHeroes",description:"ããã®è¬å¸«ããå¦ã¶ãåã©ãåãã²ã¼ã å¶ä½ã¯ã¼ã¯ã·ã§ãããFortniteï¼UEFNï¼ãRobloxãªã©ãéãã¦ãè«ççæèåã¨ã¯ãªã¨ã¤ãã£ããã£ãè²ã¿ã¾ãã",keywords:"ã²ã¼ã å¶ä½, UEFN, Roblox, ããã°ã©ãã³ã°æå®¤, å¤ä¼ã¿ã¤ãã³ã"}),n.jsx(nz,{})]})}),n.jsx(Te,{path:"/services/hero-expo",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"HERO EXPO | 次ä¸ä»£DXä½é¨ã¤ãã³ã | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(Q7,{})]})}),n.jsx(Te,{path:"/services/global-hero-summit",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"THE HERO SUMMIT | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(Z7,{})]})}),n.jsx(Te,{path:"/services/egg-jam",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"EGG JAM | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(ez,{})]})}),n.jsx(Te,{path:"/services/ai-monday",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"AI MONDAY | çæAIå®è·µå¦ç¿ã³ãã¥ãã㣠| æ ªå¼ä¼ç¤¾MetaHeroes",description:"æ¯é±æææ¥éå¬ãçæAIã®ææ°æ
å ±ãå¦ã³ãã¢ã¦ããããããå®è·µåã³ãã¥ããã£ãAIã©ã¤ã層ãããã¸ãã¹ãªã¼ãã¼ã¾ã§ãå
±ã«å¦ã³æé·ããå ´ãæä¾ãã¾ãã"}),n.jsx(tz,{})]})}),n.jsx(Te,{path:"/services/game-event",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã²ã¼ã Ãã¤ãã³ã | 没å
¥åããã¢ã¼ã·ã§ã³ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(sz,{})]})}),n.jsx(Te,{path:"/services/meta-heroes-guild",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"Meta Heroes Guild | ã¯ãªã¨ã¤ã¿ã¼å
±åµã³ãã¥ãã㣠| æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(iz,{})]})}),n.jsx(Te,{path:"/ceo-message",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"代表ã¡ãã»ã¼ã¸ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(az,{})]})}),n.jsx(Te,{path:"/news",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãã¥ã¼ã¹ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(S7,{})]})}),n.jsx(Te,{path:"/knowledge",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ãã¬ã㸠| æ ªå¼ä¼ç¤¾MetaHeroes",description:"AIã»ã¡ã¿ãã¼ã¹ã»XRã«é¢ãããã¬ãã¸è¨äºãMetaHeroesã®ç¥è¦ãæ¥çã®ææ°ååããå±ããã¾ãã"}),n.jsx(Z9,{})]})}),n.jsx(Te,{path:"/works",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"å¶ä½å
551®ç¸¾ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(_7,{})]})}),n.jsx(Te,{path:"/members/blog",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã¡ã³ãã¼ããã° | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(G9,{})]})}),n.jsx(Te,{path:"/members/list",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã¡ã³ãã¼ä¸è¦§ | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(JU,{})]})}),n.jsx(Te,{path:"/members",element:n.jsxs(n.Fragment,{children:[n.jsx(De,{title:"ã¡ã³ãã¼ç´¹ä» | æ ªå¼ä¼ç¤¾MetaHeroes"}),n.jsx(YU,{})]})}),n.jsx(Te,{path:"/member/:memberId",element:n.jsx(XU,{})}),n.jsx(Te,{path:"/news/:blogId",element:n.jsx(O_,{})}),n.jsx(Te,{path:"/member-blog/:blogId",element:n.jsx(O_,{})})]})}),!e&&n.jsx(qq,{}),!e&&n.jsx(q,{to:"/speaking",className:"fixed right-0 top-1/2 -translate-y-1/2 z-[99] bg-gradient-to-b from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 text-white font-bold text-sm lg:text-base py-3 lg:py-5 px-2 lg:px-3 rounded-l-lg shadow-lg shadow-blue-500/30 transition-all tracking-widest lg:tracking-[0.2em]",style:{writingMode:"vertical-rl"},children:"è¬æ¼ä¾é ¼ã¯ãã¡ã"})]})})}nD.createRoot(document.getElementById("root")).render(n.jsx(T.StrictMode,{children:n.jsx(E6,{children:n.jsx(rK,{})})}));
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.