@articles-media/articles-dev-box 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/articles-dev-box.css +1 -0
- package/dist/articles-dev-box.js +3341 -0
- package/dist/articles-dev-box.umd.cjs +11 -0
- package/package.json +9 -5
- package/index.js +0 -16
- package/src/components/Ads/Ad.jsx +0 -629
- package/src/components/Ads/ArticlesAd.jsx +0 -76
- package/src/components/Games/GameScoreboard.jsx +0 -188
- package/src/components/Games/ReturnToLauncherButton.jsx +0 -55
- package/src/components/UI/Button.js +0 -61
- package/src/hooks/Ads/useAd.js +0 -55
- package/src/hooks/Ads/useAds.js +0 -54
- package/src/hooks/Games/useGameScoreboard.js +0 -59
- package/src/styles/components/Ad.scss +0 -223
- package/src/styles/components/GameScoreboard.scss +0 -37
- package/src/styles/global.scss +0 -98
- package/src/styles/variables.scss +0 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function(re,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],R):(re=typeof globalThis<"u"?globalThis:re||self,R(re.ArticlesDevBox={},re.React))})(this,(function(re,R){"use strict";function er(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Se=er(R);function tr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={exports:{}},Ne={};var Lt;function nr(){if(Lt)return Ne;Lt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:i,ref:s!==void 0?s:null,props:o}}return Ne.Fragment=t,Ne.jsx=n,Ne.jsxs=n,Ne}var Ce={};var kt;function rr(){return kt||(kt=1,process.env.NODE_ENV!=="production"&&(function(){function e(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===q?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case b:return"Fragment";case w:return"Profiler";case O:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList";case Q:return"Activity"}if(typeof d=="object")switch(typeof d.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),d.$$typeof){case m:return"Portal";case D:return d.displayName||"Context";case T:return(d._context.displayName||"Context")+".Consumer";case x:var S=d.render;return d=d.displayName,d||(d=S.displayName||S.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case v:return S=d.displayName||null,S!==null?S:e(d.type)||"Memo";case C:S=d._payload,d=d._init;try{return e(d(S))}catch{}}return null}function t(d){return""+d}function n(d){try{t(d);var S=!1}catch{S=!0}if(S){S=console;var A=S.error,L=typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object";return A.call(S,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",L),t(d)}}function r(d){if(d===b)return"<>";if(typeof d=="object"&&d!==null&&d.$$typeof===C)return"<...>";try{var S=e(d);return S?"<"+S+">":"<...>"}catch{return"<...>"}}function s(){var d=H.A;return d===null?null:d.getOwner()}function o(){return Error("react-stack-top-frame")}function i(d){if(k.call(d,"key")){var S=Object.getOwnPropertyDescriptor(d,"key").get;if(S&&S.isReactWarning)return!1}return d.key!==void 0}function a(d,S){function A(){W||(W=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",S))}A.isReactWarning=!0,Object.defineProperty(d,"key",{get:A,configurable:!0})}function p(){var d=e(this.type);return he[d]||(he[d]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),d=this.props.ref,d!==void 0?d:null}function f(d,S,A,L,oe,me){var U=A.ref;return d={$$typeof:l,type:d,key:S,props:A,_owner:L},(U!==void 0?U:null)!==null?Object.defineProperty(d,"ref",{enumerable:!1,get:p}):Object.defineProperty(d,"ref",{enumerable:!1,value:null}),d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(d,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(d,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.defineProperty(d,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:me}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d}function u(d,S,A,L,oe,me){var U=S.children;if(U!==void 0)if(L)if(j(U)){for(L=0;L<U.length;L++)h(U[L]);Object.freeze&&Object.freeze(U)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(U);if(k.call(S,"key")){U=e(d);var be=Object.keys(S).filter(function(Qe){return Qe!=="key"});L=0<be.length?"{key: someKey, "+be.join(": ..., ")+": ...}":"{key: someKey}",we[U+L]||(be=0<be.length?"{"+be.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,L,U,be,U),we[U+L]=!0)}if(U=null,A!==void 0&&(n(A),U=""+A),i(S)&&(n(S.key),U=""+S.key),"key"in S){A={};for(var Te in S)Te!=="key"&&(A[Te]=S[Te])}else A=S;return U&&a(A,typeof d=="function"?d.displayName||d.name||"Unknown":d),f(d,U,A,s(),oe,me)}function h(d){y(d)?d._store&&(d._store.validated=1):typeof d=="object"&&d!==null&&d.$$typeof===C&&(d._payload.status==="fulfilled"?y(d._payload.value)&&d._payload.value._store&&(d._payload.value._store.validated=1):d._store&&(d._store.validated=1))}function y(d){return typeof d=="object"&&d!==null&&d.$$typeof===l}var g=R,l=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),D=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),H=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,j=Array.isArray,ee=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(d){return d()}};var W,he={},Z=g.react_stack_bottom_frame.bind(g,o)(),te=ee(r(o)),we={};Ce.Fragment=b,Ce.jsx=function(d,S,A){var L=1e4>H.recentlyCreatedOwnerStacks++;return u(d,S,A,!1,L?Error("react-stack-top-frame"):Z,L?ee(r(d)):te)},Ce.jsxs=function(d,S,A){var L=1e4>H.recentlyCreatedOwnerStacks++;return u(d,S,A,!0,L?Error("react-stack-top-frame"):Z,L?ee(r(d)):te)}})()),Ce}var Ft;function sr(){return Ft||(Ft=1,process.env.NODE_ENV==="production"?Ue.exports=nr():Ue.exports=rr()),Ue.exports}var E=sr(),et={exports:{}};var It;function or(){return It||(It=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)t.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(et)),et.exports}var ir=or();const ar=tr(ir),Re=R.forwardRef((e,t)=>{const{size:n,variant:r,style:s,small:o,large:i,onClick:a,className:p,disabled:f,active:u,type:h,onMouseDown:y,onMouseUp:g,onMouseLeave:l,onTouchStart:m,onTouchEnd:b,...O}=e;return E.jsx("button",{ref:t,...h&&{type:"submit"},disabled:f,style:s,onMouseDown:y,onMouseUp:g,onMouseLeave:l,onTouchStart:m,onTouchEnd:b,className:ar(`btn ${r?`btn-${r}`:"btn-articles"}`,{[p]:p,"btn-lg":i,"btn-sm":o,active:u,[`btn-${n}`]:n}),onClick:a,children:e.children})});Re.displayName="ArticlesButton";function cr(){if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search),t=Object.fromEntries(e);let{launcher_mode:n}=t;return n=n==="1",n?E.jsxs(Re,{className:"w-100",small:!0,style:{zIndex:10,position:"relative"},onClick:()=>{window.location.href="https://games.articles.media"},children:[E.jsx("i",{className:"fad fa-gamepad"}),"Return to Games"]}):E.jsxs(Re,{className:"w-100",small:!0,style:{zIndex:10,position:"relative"},onClick:()=>{window.location.href="https://games.articles.media"},children:[E.jsx("i",{className:"fad fa-gamepad"}),"View our other games"]})}function lr({darkMode:e}){return R.useEffect(()=>{},[]),R.useEffect(()=>{const t=document.createElement("script");return t.src="https://accounts.articles.media/js/ad.js",t.async=!0,document.body.appendChild(t),()=>{document.body.removeChild(t)}},[]),E.jsx("div",{className:"",children:E.jsx("div",{className:"articles-media-ad"})})}function Ut(e,t){return function(){return e.apply(t,arguments)}}const{toString:ur}=Object.prototype,{getPrototypeOf:tt}=Object,{iterator:Me,toStringTag:Mt}=Symbol,Be=(e=>t=>{const n=ur.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),se=e=>(e=e.toLowerCase(),t=>Be(t)===e),$e=e=>t=>typeof t===e,{isArray:Oe}=Array,_e=$e("undefined");function je(e){return e!==null&&!_e(e)&&e.constructor!==null&&!_e(e.constructor)&&Y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bt=se("ArrayBuffer");function fr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Bt(e.buffer),t}const dr=$e("string"),Y=$e("function"),$t=$e("number"),De=e=>e!==null&&typeof e=="object",pr=e=>e===!0||e===!1,Ve=e=>{if(Be(e)!=="object")return!1;const t=tt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Mt in e)&&!(Me in e)},hr=e=>{if(!De(e)||je(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},mr=se("Date"),br=se("File"),Er=se("Blob"),yr=se("FileList"),gr=e=>De(e)&&Y(e.pipe),wr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Y(e.append)&&((t=Be(e))==="formdata"||t==="object"&&Y(e.toString)&&e.toString()==="[object FormData]"))},Sr=se("URLSearchParams"),[Rr,Or,_r,vr]=["ReadableStream","Request","Response","Headers"].map(se),xr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Oe(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(je(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Vt(e,t){if(je(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Ee=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qt=e=>!_e(e)&&e!==Ee;function nt(){const{caseless:e,skipUndefined:t}=qt(this)&&this||{},n={},r=(s,o)=>{const i=e&&Vt(n,o)||o;Ve(n[i])&&Ve(s)?n[i]=nt(n[i],s):Ve(s)?n[i]=nt({},s):Oe(s)?n[i]=s.slice():(!t||!_e(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Pe(arguments[s],r);return n}const Tr=(e,t,n,{allOwnKeys:r}={})=>(Pe(t,(s,o)=>{n&&Y(s)?e[o]=Ut(s,n):e[o]=s},{allOwnKeys:r}),e),Ar=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Cr=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&tt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Dr=e=>{if(!e)return null;if(Oe(e))return e;let t=e.length;if(!$t(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Pr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tt(Uint8Array)),Lr=(e,t)=>{const r=(e&&e[Me]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},kr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Fr=se("HTMLFormElement"),Ir=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ht=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ur=se("RegExp"),Wt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Pe(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Mr=e=>{Wt(e,(t,n)=>{if(Y(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Y(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Br=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Oe(e)?r(e):r(String(e).split(t)),n},$r=()=>{},Vr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function qr(e){return!!(e&&Y(e.append)&&e[Mt]==="FormData"&&e[Me])}const Hr=e=>{const t=new Array(10),n=(r,s)=>{if(De(r)){if(t.indexOf(r)>=0)return;if(je(r))return r;if(!("toJSON"in r)){t[s]=r;const o=Oe(r)?[]:{};return Pe(r,(i,a)=>{const p=n(i,s+1);!_e(p)&&(o[a]=p)}),t[s]=void 0,o}}return r};return n(e,0)},Wr=se("AsyncFunction"),zr=e=>e&&(De(e)||Y(e))&&Y(e.then)&&Y(e.catch),zt=((e,t)=>e?setImmediate:t?((n,r)=>(Ee.addEventListener("message",({source:s,data:o})=>{s===Ee&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Ee.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Y(Ee.postMessage)),Jr=typeof queueMicrotask<"u"?queueMicrotask.bind(Ee):typeof process<"u"&&process.nextTick||zt,c={isArray:Oe,isArrayBuffer:Bt,isBuffer:je,isFormData:wr,isArrayBufferView:fr,isString:dr,isNumber:$t,isBoolean:pr,isObject:De,isPlainObject:Ve,isEmptyObject:hr,isReadableStream:Rr,isRequest:Or,isResponse:_r,isHeaders:vr,isUndefined:_e,isDate:mr,isFile:br,isBlob:Er,isRegExp:Ur,isFunction:Y,isStream:gr,isURLSearchParams:Sr,isTypedArray:Pr,isFileList:yr,forEach:Pe,merge:nt,extend:Tr,trim:xr,stripBOM:Ar,inherits:Nr,toFlatObject:Cr,kindOf:Be,kindOfTest:se,endsWith:jr,toArray:Dr,forEachEntry:Lr,matchAll:kr,isHTMLForm:Fr,hasOwnProperty:Ht,hasOwnProp:Ht,reduceDescriptors:Wt,freezeMethods:Mr,toObjectSet:Br,toCamelCase:Ir,noop:$r,toFiniteNumber:Vr,findKey:Vt,global:Ee,isContextDefined:qt,isSpecCompliantForm:qr,toJSONObject:Hr,isAsyncFn:Wr,isThenable:zr,setImmediate:zt,asap:Jr,isIterable:e=>e!=null&&Y(e[Me])};function _(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const Jt=_.prototype,Kt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Kt[e]={value:e}}),Object.defineProperties(_,Kt),Object.defineProperty(Jt,"isAxiosError",{value:!0}),_.from=(e,t,n,r,s,o)=>{const i=Object.create(Jt);c.toFlatObject(e,i,function(u){return u!==Error.prototype},f=>f!=="isAxiosError");const a=e&&e.message?e.message:"Error",p=t==null&&e?e.code:t;return _.call(i,a,p,n,r,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const Kr=null;function rt(e){return c.isPlainObject(e)||c.isArray(e)}function Gt(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Yt(e,t,n){return e?e.concat(t).map(function(s,o){return s=Gt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Gr(e){return c.isArray(e)&&!e.some(rt)}const Yr=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function qe(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!c.isUndefined(b[m])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function f(l){if(l===null)return"";if(c.isDate(l))return l.toISOString();if(c.isBoolean(l))return l.toString();if(!p&&c.isBlob(l))throw new _("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(l)||c.isTypedArray(l)?p&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function u(l,m,b){let O=l;if(l&&!b&&typeof l=="object"){if(c.endsWith(m,"{}"))m=r?m:m.slice(0,-2),l=JSON.stringify(l);else if(c.isArray(l)&&Gr(l)||(c.isFileList(l)||c.endsWith(m,"[]"))&&(O=c.toArray(l)))return m=Gt(m),O.forEach(function(T,D){!(c.isUndefined(T)||T===null)&&t.append(i===!0?Yt([m],D,o):i===null?m:m+"[]",f(T))}),!1}return rt(l)?!0:(t.append(Yt(b,m,o),f(l)),!1)}const h=[],y=Object.assign(Yr,{defaultVisitor:u,convertValue:f,isVisitable:rt});function g(l,m){if(!c.isUndefined(l)){if(h.indexOf(l)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(l),c.forEach(l,function(O,w){(!(c.isUndefined(O)||O===null)&&s.call(t,O,c.isString(w)?w.trim():w,m,y))===!0&&g(O,m?m.concat(w):[w])}),h.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function st(e,t){this._pairs=[],e&&qe(e,this,t)}const Zt=st.prototype;Zt.append=function(t,n){this._pairs.push([t,n])},Zt.toString=function(t){const n=t?function(r){return t.call(this,r,Xt)}:Xt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Xr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Qt(e,t,n){if(!t)return e;const r=n&&n.encode||Xr;c.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=c.isURLSearchParams(t)?t.toString():new st(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class en{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const tn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:st,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ot=typeof window<"u"&&typeof document<"u",it=typeof navigator=="object"&&navigator||void 0,Qr=ot&&(!it||["ReactNative","NativeScript","NS"].indexOf(it.product)<0),es=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ts=ot&&window.location.href||"http://localhost",J={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ot,hasStandardBrowserEnv:Qr,hasStandardBrowserWebWorkerEnv:es,navigator:it,origin:ts},Symbol.toStringTag,{value:"Module"})),...Zr};function ns(e,t){return qe(e,new J.classes.URLSearchParams,{visitor:function(n,r,s,o){return J.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function rs(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ss(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function nn(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),p=o>=n.length;return i=!i&&c.isArray(s)?s.length:i,p?(c.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!c.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&c.isArray(s[i])&&(s[i]=ss(s[i])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(rs(r),s,n,0)}),n}return null}function os(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Le={transitional:tn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=c.isObject(t);if(o&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(nn(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ns(t,this.formSerializer).toString();if((a=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return qe(a?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),os(t)):t}],transformResponse:[function(t){const n=this.transitional||Le.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?_.from(a,_.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{Le.headers[e]={}});const is=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),as=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
7
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&is[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rn=Symbol("internals");function ke(e){return e&&String(e).trim().toLowerCase()}function He(e){return e===!1||e==null?e:c.isArray(e)?e.map(He):String(e)}function cs(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const ls=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function at(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function us(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function fs(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let X=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,p,f){const u=ke(p);if(!u)throw new Error("header name must be a non-empty string");const h=c.findKey(s,u);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||p]=He(a))}const i=(a,p)=>c.forEach(a,(f,u)=>o(f,u,p));if(c.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(c.isString(t)&&(t=t.trim())&&!ls(t))i(as(t),n);else if(c.isObject(t)&&c.isIterable(t)){let a={},p,f;for(const u of t){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[f=u[0]]=(p=a[f])?c.isArray(p)?[...p,u[1]]:[p,u[1]]:u[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=ke(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return cs(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ke(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||at(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=ke(i),i){const a=c.findKey(r,i);a&&(!n||at(r,r[a],a,n))&&(delete r[a],s=!0)}}return c.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||at(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,o)=>{const i=c.findKey(r,o);if(i){n[i]=He(s),delete n[o];return}const a=t?us(o):String(o).trim();a!==o&&delete n[o],n[a]=He(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
8
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[rn]=this[rn]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=ke(i);r[a]||(fs(s,i),r[a]=!0)}return c.isArray(t)?t.forEach(o):o(t),this}};X.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(X.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),c.freezeMethods(X);function ct(e,t){const n=this||Le,r=t||n,s=X.from(r.headers);let o=r.data;return c.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function sn(e){return!!(e&&e.__CANCEL__)}function ve(e,t,n){_.call(this,e??"canceled",_.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(ve,_,{__CANCEL__:!0});function on(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new _("Request failed with status code "+n.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ds(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ps(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(p){const f=Date.now(),u=r[o];i||(i=f),n[s]=p,r[s]=f;let h=o,y=0;for(;h!==s;)y+=n[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i<t)return;const g=u&&f-u;return g?Math.round(y*1e3/g):void 0}}function hs(e,t){let n=0,r=1e3/t,s,o;const i=(f,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),h=u-n;h>=r?i(f,u):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-h)))},()=>s&&i(s)]}const We=(e,t,n=3)=>{let r=0;const s=ps(50,250);return hs(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,p=i-r,f=s(p),u=i<=a;r=i;const h={loaded:i,total:a,progress:a?i/a:void 0,bytes:p,rate:f||void 0,estimated:f&&a&&u?(a-i)/f:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(h)},n)},an=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},cn=e=>(...t)=>c.asap(()=>e(...t)),ms=J.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,J.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(J.origin),J.navigator&&/(msie|trident)/i.test(J.navigator.userAgent)):()=>!0,bs=J.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Es(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ys(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ln(e,t,n){let r=!Es(t);return e&&(r||n==!1)?ys(e,t):t}const un=e=>e instanceof X?{...e}:e;function ye(e,t){t=t||{};const n={};function r(f,u,h,y){return c.isPlainObject(f)&&c.isPlainObject(u)?c.merge.call({caseless:y},f,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function s(f,u,h,y){if(c.isUndefined(u)){if(!c.isUndefined(f))return r(void 0,f,h,y)}else return r(f,u,h,y)}function o(f,u){if(!c.isUndefined(u))return r(void 0,u)}function i(f,u){if(c.isUndefined(u)){if(!c.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function a(f,u,h){if(h in t)return r(f,u);if(h in e)return r(void 0,f)}const p={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(f,u,h)=>s(un(f),un(u),h,!0)};return c.forEach(Object.keys({...e,...t}),function(u){const h=p[u]||s,y=h(e[u],t[u],u);c.isUndefined(y)&&h!==a||(n[u]=y)}),n}const fn=e=>{const t=ye({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=X.from(i),t.url=Qt(ln(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(J.hasStandardBrowserEnv||J.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const p=n.getHeaders(),f=["content-type","content-length"];Object.entries(p).forEach(([u,h])=>{f.includes(u.toLowerCase())&&i.set(u,h)})}}if(J.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&ms(t.url))){const p=s&&o&&bs.read(o);p&&i.set(s,p)}return t},gs=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=fn(e);let o=s.data;const i=X.from(s.headers).normalize();let{responseType:a,onUploadProgress:p,onDownloadProgress:f}=s,u,h,y,g,l;function m(){g&&g(),l&&l(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function O(){if(!b)return;const T=X.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};on(function(P){n(P),m()},function(P){r(P),m()},x),b=null}"onloadend"in b?b.onloadend=O:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(O)},b.onabort=function(){b&&(r(new _("Request aborted",_.ECONNABORTED,e,b)),b=null)},b.onerror=function(D){const x=D&&D.message?D.message:"Network Error",I=new _(x,_.ERR_NETWORK,e,b);I.event=D||null,r(I),b=null},b.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const x=s.transitional||tn;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new _(D,x.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,e,b)),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&c.forEach(i.toJSON(),function(D,x){b.setRequestHeader(x,D)}),c.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),f&&([y,l]=We(f,!0),b.addEventListener("progress",y)),p&&b.upload&&([h,g]=We(p),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=T=>{b&&(r(!T||T.type?new ve(null,e,b):T),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=ds(s.url);if(w&&J.protocols.indexOf(w)===-1){r(new _("Unsupported protocol "+w+":",_.ERR_BAD_REQUEST,e));return}b.send(o||null)})},ws=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(f){if(!s){s=!0,a();const u=f instanceof Error?f:this.reason;r.abort(u instanceof _?u:new ve(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new _(`timeout ${t} of ms exceeded`,_.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:p}=r;return p.unsubscribe=()=>c.asap(a),p}},Ss=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Rs=async function*(e,t){for await(const n of Os(e))yield*Ss(n,t)},Os=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},dn=(e,t,n,r)=>{const s=Rs(e,t);let o=0,i,a=p=>{i||(i=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:f,value:u}=await s.next();if(f){a(),p.close();return}let h=u.byteLength;if(n){let y=o+=h;n(y)}p.enqueue(new Uint8Array(u))}catch(f){throw a(f),f}},cancel(p){return a(p),s.return()}},{highWaterMark:2})},pn=64*1024,{isFunction:ze}=c,_s=(({Request:e,Response:t})=>({Request:e,Response:t}))(c.global),{ReadableStream:hn,TextEncoder:mn}=c.global,bn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vs=e=>{e=c.merge.call({skipUndefined:!0},_s,e);const{fetch:t,Request:n,Response:r}=e,s=t?ze(t):typeof fetch=="function",o=ze(n),i=ze(r);if(!s)return!1;const a=s&&ze(hn),p=s&&(typeof mn=="function"?(l=>m=>l.encode(m))(new mn):async l=>new Uint8Array(await new n(l).arrayBuffer())),f=o&&a&&bn(()=>{let l=!1;const m=new n(J.origin,{body:new hn,method:"POST",get duplex(){return l=!0,"half"}}).headers.has("Content-Type");return l&&!m}),u=i&&a&&bn(()=>c.isReadableStream(new r("").body)),h={stream:u&&(l=>l.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!h[l]&&(h[l]=(m,b)=>{let O=m&&m[l];if(O)return O.call(m);throw new _(`Response type '${l}' is not supported`,_.ERR_NOT_SUPPORT,b)})});const y=async l=>{if(l==null)return 0;if(c.isBlob(l))return l.size;if(c.isSpecCompliantForm(l))return(await new n(J.origin,{method:"POST",body:l}).arrayBuffer()).byteLength;if(c.isArrayBufferView(l)||c.isArrayBuffer(l))return l.byteLength;if(c.isURLSearchParams(l)&&(l=l+""),c.isString(l))return(await p(l)).byteLength},g=async(l,m)=>{const b=c.toFiniteNumber(l.getContentLength());return b??y(m)};return async l=>{let{url:m,method:b,data:O,signal:w,cancelToken:T,timeout:D,onDownloadProgress:x,onUploadProgress:I,responseType:P,headers:v,withCredentials:C="same-origin",fetchOptions:Q}=fn(l),q=t||fetch;P=P?(P+"").toLowerCase():"text";let H=ws([w,T&&T.toAbortSignal()],D),k=null;const j=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let ee;try{if(I&&f&&b!=="get"&&b!=="head"&&(ee=await g(v,O))!==0){let d=new n(m,{method:"POST",body:O,duplex:"half"}),S;if(c.isFormData(O)&&(S=d.headers.get("content-type"))&&v.setContentType(S),d.body){const[A,L]=an(ee,We(cn(I)));O=dn(d.body,pn,A,L)}}c.isString(C)||(C=C?"include":"omit");const W=o&&"credentials"in n.prototype,he={...Q,signal:H,method:b.toUpperCase(),headers:v.normalize().toJSON(),body:O,duplex:"half",credentials:W?C:void 0};k=o&&new n(m,he);let Z=await(o?q(k,Q):q(m,he));const te=u&&(P==="stream"||P==="response");if(u&&(x||te&&j)){const d={};["status","statusText","headers"].forEach(oe=>{d[oe]=Z[oe]});const S=c.toFiniteNumber(Z.headers.get("content-length")),[A,L]=x&&an(S,We(cn(x),!0))||[];Z=new r(dn(Z.body,pn,A,()=>{L&&L(),j&&j()}),d)}P=P||"text";let we=await h[c.findKey(h,P)||"text"](Z,l);return!te&&j&&j(),await new Promise((d,S)=>{on(d,S,{data:we,headers:X.from(Z.headers),status:Z.status,statusText:Z.statusText,config:l,request:k})})}catch(W){throw j&&j(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new _("Network Error",_.ERR_NETWORK,l,k),{cause:W.cause||W}):_.from(W,W&&W.code,l,k)}}},xs=new Map,En=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,p,f,u=xs;for(;a--;)p=o[a],f=u.get(p),f===void 0&&u.set(p,f=a?new Map:vs(t)),u=f;return f};En();const lt={http:Kr,xhr:gs,fetch:{get:En}};c.forEach(lt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yn=e=>`- ${e}`,Ts=e=>c.isFunction(e)||e===null||e===!1;function As(e,t){e=c.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let a;if(s=r,!Ts(r)&&(s=lt[(a=String(r)).toLowerCase()],s===void 0))throw new _(`Unknown adapter '${a}'`);if(s&&(c.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([p,f])=>`adapter ${p} `+(f===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
9
|
+
`+i.map(yn).join(`
|
|
10
|
+
`):" "+yn(i[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const gn={getAdapter:As,adapters:lt};function ut(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ve(null,e)}function wn(e){return ut(e),e.headers=X.from(e.headers),e.data=ct.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gn.getAdapter(e.adapter||Le.adapter,e)(e).then(function(r){return ut(e),r.data=ct.call(e,e.transformResponse,r),r.headers=X.from(r.headers),r},function(r){return sn(r)||(ut(e),r&&r.response&&(r.response.data=ct.call(e,e.transformResponse,r.response),r.response.headers=X.from(r.response.headers))),Promise.reject(r)})}const Sn="1.13.2",Je={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Je[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Rn={};Je.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Sn+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new _(s(i," has been removed"+(n?" in "+n:"")),_.ERR_DEPRECATED);return n&&!Rn[i]&&(Rn[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}},Je.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ns(e,t,n){if(typeof e!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],p=a===void 0||i(a,o,e);if(p!==!0)throw new _("option "+o+" must be "+p,_.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _("Unknown option "+o,_.ERR_BAD_OPTION)}}const Ke={assertOptions:Ns,validators:Je},ae=Ke.validators;let ge=class{constructor(t){this.defaults=t||{},this.interceptors={request:new en,response:new en}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
11
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ye(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ke.assertOptions(r,{silentJSONParsing:ae.transitional(ae.boolean),forcedJSONParsing:ae.transitional(ae.boolean),clarifyTimeoutError:ae.transitional(ae.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:Ke.assertOptions(s,{encode:ae.function,serialize:ae.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ke.assertOptions(n,{baseUrl:ae.spelling("baseURL"),withXsrfToken:ae.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&c.merge(o.common,o[n.method]);o&&c.forEach(["delete","get","head","post","put","patch","common"],l=>{delete o[l]}),n.headers=X.concat(i,o);const a=[];let p=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(p=p&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let u,h=0,y;if(!p){const l=[wn.bind(this),void 0];for(l.unshift(...a),l.push(...f),y=l.length,u=Promise.resolve(n);h<y;)u=u.then(l[h++],l[h++]);return u}y=a.length;let g=n;for(;h<y;){const l=a[h++],m=a[h++];try{g=l(g)}catch(b){m.call(this,b);break}}try{u=wn.call(this,g)}catch(l){return Promise.reject(l)}for(h=0,y=f.length;h<y;)u=u.then(f[h++],f[h++]);return u}getUri(t){t=ye(this.defaults,t);const n=ln(t.baseURL,t.url,t.allowAbsoluteUrls);return Qt(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){ge.prototype[t]=function(n,r){return this.request(ye(r||{},{method:t,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(ye(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ge.prototype[t]=n(),ge.prototype[t+"Form"]=n(!0)});let Cs=class Qn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new ve(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Qn(function(s){t=s}),cancel:t}}};function js(e){return function(n){return e.apply(null,n)}}function Ds(e){return c.isObject(e)&&e.isAxiosError===!0}const ft={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ft).forEach(([e,t])=>{ft[t]=e});function On(e){const t=new ge(e),n=Ut(ge.prototype.request,t);return c.extend(n,ge.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return On(ye(e,s))},n}const F=On(Le);F.Axios=ge,F.CanceledError=ve,F.CancelToken=Cs,F.isCancel=sn,F.VERSION=Sn,F.toFormData=qe,F.AxiosError=_,F.Cancel=F.CanceledError,F.all=function(t){return Promise.all(t)},F.spread=js,F.isAxiosError=Ds,F.mergeConfig=ye,F.AxiosHeaders=X,F.formToJSON=e=>nn(c.isHTMLForm(e)?new FormData(e):e),F.getAdapter=gn.getAdapter,F.HttpStatusCode=ft,F.default=F;const{Axios:qo,AxiosError:Ho,CanceledError:Wo,isCancel:zo,CancelToken:Jo,VERSION:Ko,all:Go,Cancel:Yo,isAxiosError:Xo,spread:Zo,toFormData:Qo,AxiosHeaders:ei,HttpStatusCode:ti,formToJSON:ni,getAdapter:ri,mergeConfig:si}=F;var dt=new Map,Ge=new WeakMap,_n=0,Ps;function Ls(e){return e?(Ge.has(e)||(_n+=1,Ge.set(e,_n.toString())),Ge.get(e)):"0"}function ks(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?Ls(e.root):e[t]}`).toString()}function Fs(e){const t=ks(e);let n=dt.get(t);if(!n){const r=new Map;let s;const o=new IntersectionObserver(i=>{i.forEach(a=>{var p;const f=a.isIntersecting&&s.some(u=>a.intersectionRatio>=u);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=f),(p=r.get(a.target))==null||p.forEach(u=>{u(f,a)})})},e);s=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},dt.set(t,n)}return n}function Is(e,t,n={},r=Ps){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const p=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:p,intersectionRect:p,rootBounds:p}),()=>{}}const{id:s,observer:o,elements:i}=Fs(n),a=i.get(e)||[];return i.has(e)||i.set(e,a),a.push(t),o.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(i.delete(e),o.unobserve(e)),i.size===0&&(o.disconnect(),dt.delete(s))}}function Us({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:s,triggerOnce:o,skip:i,initialInView:a,fallbackInView:p,onChange:f}={}){var u;const[h,y]=Se.useState(null),g=Se.useRef(f),l=Se.useRef(a),[m,b]=Se.useState({inView:!!a,entry:void 0});g.current=f,Se.useEffect(()=>{if(l.current===void 0&&(l.current=a),i||!h)return;let D;return D=Is(h,(x,I)=>{const P=l.current;l.current=x,!(P===void 0&&!x)&&(b({inView:x,entry:I}),g.current&&g.current(x,I),I.isIntersecting&&o&&D&&(D(),D=void 0))},{root:s,rootMargin:r,threshold:e,trackVisibility:n,delay:t},p),()=>{D&&D()}},[Array.isArray(e)?e.toString():e,h,s,r,o,i,n,p,t]);const O=(u=m.entry)==null?void 0:u.target,w=Se.useRef(void 0);!h&&O&&!o&&!i&&w.current!==O&&(w.current=O,b({inView:!!a,entry:void 0}),l.current=a);const T=[y,m.inView,m.entry];return T.ref=T[0],T.inView=T[1],T.entry=T[2],T}var Ye={exports:{}},pt={};var vn;function Ms(){if(vn)return pt;vn=1;var e=R;function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function a(h,y){var g=y(),l=r({inst:{value:g,getSnapshot:y}}),m=l[0].inst,b=l[1];return o(function(){m.value=g,m.getSnapshot=y,p(m)&&b({inst:m})},[h,g,y]),s(function(){return p(m)&&b({inst:m}),h(function(){p(m)&&b({inst:m})})},[h]),i(g),g}function p(h){var y=h.getSnapshot;h=h.value;try{var g=y();return!n(h,g)}catch{return!0}}function f(h,y){return y()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:a;return pt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,pt}var ht={};var xn;function Bs(){return xn||(xn=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,l){return g===l&&(g!==0||1/g===1/l)||g!==g&&l!==l}function t(g,l){u||s.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=l();if(!h){var b=l();o(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}b=i({inst:{value:m,getSnapshot:l}});var O=b[0].inst,w=b[1];return p(function(){O.value=m,O.getSnapshot=l,n(O)&&w({inst:O})},[g,m,l]),a(function(){return n(O)&&w({inst:O}),g(function(){n(O)&&w({inst:O})})},[g]),f(m),m}function n(g){var l=g.getSnapshot;g=g.value;try{var m=l();return!o(g,m)}catch{return!0}}function r(g,l){return l()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=R,o=typeof Object.is=="function"?Object.is:e,i=s.useState,a=s.useEffect,p=s.useLayoutEffect,f=s.useDebugValue,u=!1,h=!1,y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;ht.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ht}var Tn;function $s(){return Tn||(Tn=1,process.env.NODE_ENV==="production"?Ye.exports=Ms():Ye.exports=Bs()),Ye.exports}var An=$s();const Nn=0,Cn=1,jn=2,Dn=3;var Pn=Object.prototype.hasOwnProperty;function mt(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&mt(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Pn.call(e,n)&&++r&&!Pn.call(t,n)||!(n in t)||!mt(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const le=new WeakMap,ue=()=>{},K=ue(),bt=Object,N=e=>e===K,ce=e=>typeof e=="function",pe=(e,t)=>({...e,...t}),Ln=e=>ce(e.then),Et={},Xe={},yt="undefined",Fe=typeof window!=yt,gt=typeof document!=yt,Vs=Fe&&"Deno"in window,qs=()=>Fe&&typeof window.requestAnimationFrame!=yt,kn=(e,t)=>{const n=le.get(e);return[()=>!N(t)&&e.get(t)||Et,r=>{if(!N(t)){const s=e.get(t);t in Xe||(Xe[t]=s),n[5](t,pe(s,r),s||Et)}},n[6],()=>!N(t)&&t in Xe?Xe[t]:!N(t)&&e.get(t)||Et]};let wt=!0;const Hs=()=>wt,[St,Rt]=Fe&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ue,ue],Ws=()=>{const e=gt&&document.visibilityState;return N(e)||e!=="hidden"},zs=e=>(gt&&document.addEventListener("visibilitychange",e),St("focus",e),()=>{gt&&document.removeEventListener("visibilitychange",e),Rt("focus",e)}),Js=e=>{const t=()=>{wt=!0,e()},n=()=>{wt=!1};return St("online",t),St("offline",n),()=>{Rt("online",t),Rt("offline",n)}},Ks={isOnline:Hs,isVisible:Ws},Gs={initFocus:zs,initReconnect:Js},Fn=!R.useId,xe=!Fe||Vs,Ys=e=>qs()?window.requestAnimationFrame(e):setTimeout(e,1),Ot=xe?R.useEffect:R.useLayoutEffect,_t=typeof navigator<"u"&&navigator.connection,In=!xe&&_t&&(["slow-2g","2g"].includes(_t.effectiveType)||_t.saveData),Ze=new WeakMap,Xs=e=>bt.prototype.toString.call(e),vt=(e,t)=>e===`[object ${t}]`;let Zs=0;const xt=e=>{const t=typeof e,n=Xs(e),r=vt(n,"Date"),s=vt(n,"RegExp"),o=vt(n,"Object");let i,a;if(bt(e)===e&&!r&&!s){if(i=Ze.get(e),i)return i;if(i=++Zs+"~",Ze.set(e,i),Array.isArray(e)){for(i="@",a=0;a<e.length;a++)i+=xt(e[a])+",";Ze.set(e,i)}if(o){i="#";const p=bt.keys(e).sort();for(;!N(a=p.pop());)N(e[a])||(i+=a+":"+xt(e[a])+",");Ze.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},Tt=e=>{if(ce(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?xt(e):"",[e,t]};let Qs=0;const At=()=>++Qs;async function Un(...e){const[t,n,r,s]=e,o=pe({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let i=o.populateCache;const a=o.rollbackOnError;let p=o.optimisticData;const f=y=>typeof a=="function"?a(y):a!==!1,u=o.throwOnError;if(ce(n)){const y=n,g=[],l=t.keys();for(const m of l)!/^\$(inf|sub)\$/.test(m)&&y(t.get(m)._k)&&g.push(m);return Promise.all(g.map(h))}return h(n);async function h(y){const[g]=Tt(y);if(!g)return;const[l,m]=kn(t,g),[b,O,w,T]=le.get(t),D=()=>{const j=b[g];return(ce(o.revalidate)?o.revalidate(l().data,y):o.revalidate!==!1)&&(delete w[g],delete T[g],j&&j[0])?j[0](jn).then(()=>l().data):l().data};if(e.length<3)return D();let x=r,I,P=!1;const v=At();O[g]=[v,0];const C=!N(p),Q=l(),q=Q.data,H=Q._c,k=N(H)?q:H;if(C&&(p=ce(p)?p(k,q):p,m({data:p,_c:k})),ce(x))try{x=x(k)}catch(j){I=j,P=!0}if(x&&Ln(x))if(x=await x.catch(j=>{I=j,P=!0}),v!==O[g][0]){if(P)throw I;return x}else P&&C&&f(I)&&(i=!0,m({data:k,_c:K}));if(i&&!P)if(ce(i)){const j=i(x,k);m({data:j,error:K,_c:K})}else m({data:x,error:K,_c:K});if(O[g][1]=At(),Promise.resolve(D()).then(()=>{m({_c:K})}),P){if(u)throw I;return}return x}}const Mn=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},eo=(e,t)=>{if(!le.has(e)){const n=pe(Gs,t),r=Object.create(null),s=Un.bind(K,e);let o=ue;const i=Object.create(null),a=(u,h)=>{const y=i[u]||[];return i[u]=y,y.push(h),()=>y.splice(y.indexOf(h),1)},p=(u,h,y)=>{e.set(u,h);const g=i[u];if(g)for(const l of g)l(h,y)},f=()=>{if(!le.has(e)&&(le.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,p,a]),!xe)){const u=n.initFocus(setTimeout.bind(K,Mn.bind(K,r,Nn))),h=n.initReconnect(setTimeout.bind(K,Mn.bind(K,r,Cn)));o=()=>{u&&u(),h&&h(),le.delete(e)}}};return f(),[e,s,f,o]}return[e,le.get(e)[4]]},to=(e,t,n,r,s)=>{const o=n.errorRetryCount,i=s.retryCount,a=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!N(o)&&i>o||setTimeout(r,a,s)},no=mt,[Bn,ro]=eo(new Map),so=pe({onLoadingSlow:ue,onSuccess:ue,onError:ue,onErrorRetry:to,onDiscarded:ue,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:In?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:In?5e3:3e3,compare:no,isPaused:()=>!1,cache:Bn,mutate:ro,fallback:{}},Ks),oo=(e,t)=>{const n=pe(e,t);if(t){const{use:r,fallback:s}=e,{use:o,fallback:i}=t;r&&o&&(n.use=r.concat(o)),s&&i&&(n.fallback=pe(s,i))}return n},io=R.createContext({}),ao="$inf$",$n=Fe&&window.__SWR_DEVTOOLS_USE__,co=$n?window.__SWR_DEVTOOLS_USE__:[],lo=()=>{$n&&(window.__SWR_DEVTOOLS_REACT__=R)},uo=e=>ce(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],fo=()=>{const e=R.useContext(io);return R.useMemo(()=>pe(so,e),[e])},po=e=>(t,n,r)=>e(t,n&&((...o)=>{const[i]=Tt(t),[,,,a]=le.get(Bn);if(i.startsWith(ao))return n(...o);const p=a[i];return N(p)?n(...o):(delete a[i],p)}),r),ho=co.concat(po),mo=e=>function(...n){const r=fo(),[s,o,i]=uo(n),a=oo(r,i);let p=e;const{use:f}=a,u=(f||[]).concat(ho);for(let h=u.length;h--;)p=u[h](p);return p(s,o||a.fetcher||null,a)},bo=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const s=r.indexOf(n);s>=0&&(r[s]=r[r.length-1],r.pop())}};lo();const Nt=R.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),Ct={dedupe:!0},Vn=Promise.resolve(K),jt=mo((e,t,n)=>{const{cache:r,compare:s,suspense:o,fallbackData:i,revalidateOnMount:a,revalidateIfStale:p,refreshInterval:f,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:y,strictServerPrefetchWarning:g}=n,[l,m,b,O]=le.get(r),[w,T]=Tt(e),D=R.useRef(!1),x=R.useRef(!1),I=R.useRef(w),P=R.useRef(t),v=R.useRef(n),C=()=>v.current,Q=()=>C().isVisible()&&C().isOnline(),[q,H,k,j]=kn(r,w),ee=R.useRef({}).current,W=N(i)?N(n.fallback)?K:n.fallback[w]:i,he=(M,B)=>{for(const V in ee){const $=V;if($==="data"){if(!s(M[$],B[$])&&(!N(M[$])||!s(me,B[$])))return!1}else if(B[$]!==M[$])return!1}return!0},Z=R.useMemo(()=>{const M=!w||!t?!1:N(a)?C().isPaused()||o?!1:p!==!1:a,B=G=>{const fe=pe(G);return delete fe._k,M?{isValidating:!0,isLoading:!0,...fe}:fe},V=q(),$=j(),ie=B(V),Ae=V===$?ie:B($);let z=ie;return[()=>{const G=B(q());return he(G,z)?(z.data=G.data,z.isLoading=G.isLoading,z.isValidating=G.isValidating,z.error=G.error,z):(z=G,G)},()=>Ae]},[r,w]),te=An.useSyncExternalStore(R.useCallback(M=>k(w,(B,V)=>{he(V,B)||M()}),[r,w]),Z[0],Z[1]),we=!D.current,d=l[w]&&l[w].length>0,S=te.data,A=N(S)?W&&Ln(W)?Nt(W):W:S,L=te.error,oe=R.useRef(A),me=y?N(S)?N(oe.current)?A:oe.current:S:A,U=w&&N(A),be=!xe&&An.useSyncExternalStore(()=>ue,()=>!1,()=>!0);g&&be&&!o&&U&&console.warn(`Missing pre-initiated data for serialized key "${w}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const Te=d&&!N(L)?!1:we&&!N(a)?a:C().isPaused()?!1:o?N(A)?!1:p:N(A)||p,Qe=!!(w&&t&&we&&Te),Lo=N(te.isValidating)?Qe:te.isValidating,ko=N(te.isLoading)?Qe:te.isLoading,Ie=R.useCallback(async M=>{const B=P.current;if(!w||!B||x.current||C().isPaused())return!1;let V,$,ie=!0;const Ae=M||{},z=!b[w]||!Ae.dedupe,G=()=>Fn?!x.current&&w===I.current&&D.current:w===I.current,fe={isValidating:!1,isLoading:!1},Yn=()=>{H(fe)},Xn=()=>{const ne=b[w];ne&&ne[1]===$&&delete b[w]},Zn={isValidating:!0};N(q().data)&&(Zn.isLoading=!0);try{if(z&&(H(Zn),n.loadingTimeout&&N(q().data)&&setTimeout(()=>{ie&&G()&&C().onLoadingSlow(w,n)},n.loadingTimeout),b[w]=[B(T),At()]),[V,$]=b[w],V=await V,z&&setTimeout(Xn,n.dedupingInterval),!b[w]||b[w][1]!==$)return z&&G()&&C().onDiscarded(w),!1;fe.error=K;const ne=m[w];if(!N(ne)&&($<=ne[0]||$<=ne[1]||ne[1]===0))return Yn(),z&&G()&&C().onDiscarded(w),!1;const de=q().data;fe.data=s(de,V)?de:V,z&&G()&&C().onSuccess(V,w,n)}catch(ne){Xn();const de=C(),{shouldRetryOnError:Dt}=de;de.isPaused()||(fe.error=ne,z&&G()&&(de.onError(ne,w,de),(Dt===!0||ce(Dt)&&Dt(ne))&&(!C().revalidateOnFocus||!C().revalidateOnReconnect||Q())&&de.onErrorRetry(ne,w,de,Fo=>{const Pt=l[w];Pt&&Pt[0]&&Pt[0](Dn,Fo)},{retryCount:(Ae.retryCount||0)+1,dedupe:!0})))}return ie=!1,Yn(),!0},[w,r]),Gn=R.useCallback((...M)=>Un(r,I.current,...M),[]);if(Ot(()=>{P.current=t,v.current=n,N(S)||(oe.current=S)}),Ot(()=>{if(!w)return;const M=Ie.bind(K,Ct);let B=0;C().revalidateOnFocus&&(B=Date.now()+C().focusThrottleInterval);const $=bo(w,l,(ie,Ae={})=>{if(ie==Nn){const z=Date.now();C().revalidateOnFocus&&z>B&&Q()&&(B=z+C().focusThrottleInterval,M())}else if(ie==Cn)C().revalidateOnReconnect&&Q()&&M();else{if(ie==jn)return Ie();if(ie==Dn)return Ie(Ae)}});return x.current=!1,I.current=w,D.current=!0,H({_k:T}),Te&&(b[w]||(N(A)||xe?M():Ys(M))),()=>{x.current=!0,$()}},[w]),Ot(()=>{let M;function B(){const $=ce(f)?f(q().data):f;$&&M!==-1&&(M=setTimeout(V,$))}function V(){!q().error&&(u||C().isVisible())&&(h||C().isOnline())?Ie(Ct).then(B):B()}return B(),()=>{M&&(clearTimeout(M),M=-1)}},[f,u,h,w]),R.useDebugValue(me),o){if(!Fn&&xe&&U)throw new Error("Fallback data is required when using Suspense in SSR.");U&&(P.current=t,v.current=n,x.current=!1);const M=O[w],B=!N(M)&&U?Gn(M):Vn;if(Nt(B),!N(L)&&U)throw L;const V=U?Ie(Ct):Vn;!N(me)&&U&&(V.status="fulfilled",V.value=!0),Nt(V)}return{mutate:Gn,get data(){return ee.data=!0,me},get error(){return ee.error=!0,L},get isValidating(){return ee.isValidating=!0,Lo},get isLoading(){return ee.isLoading=!0,ko}}}),Eo=async e=>{if(process.env.NODE_ENV==="development")try{return(await F.get(`http://localhost:3001/api/ads/${e.ad_id}`,{params:{ad_id:e.ad_id}})).data.result}catch{}return F.get(e.url,{params:{ad_id:e.ad_id}}).then(t=>t.data.result)},yo={dedupingInterval:1e3*60*60},go=e=>{const{data:t,error:n,isLoading:r,mutate:s}=jt(e?{url:`https://articles.media/api/ads/${e}`,ad_id:e}:null,Eo,yo);return{data:t,error:n,isLoading:r,mutate:s}},qn=6e4,Hn=Symbol.for("constructDateFrom");function wo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Hn in e?e[Hn](t):e instanceof Date?new e.constructor(t):new Date(t)}function Wn(e,t){return wo(e,e)}function So(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function Ro(e,t){return+Wn(e)-+Wn(t)}function zn(e,t,n){const r=Ro(e,t)/qn;return So(n?.roundingMethod)(r)}function Jn(e){return Math.trunc(e*qn)}const Oo=async e=>{if(process.env.NODE_ENV==="development")try{return(await F.get("http://localhost:3001/api/ads",{params:{}})).data}catch{}return F.get(e.url,{params:{}}).then(t=>t.data)},Kn=60,_o={dedupingInterval:Jn(Kn),focusThrottleInterval:Jn(Kn)},vo=e=>{const{data:t,error:n,isLoading:r,mutate:s}=jt({url:"https://articles.media/api/ads"},Oo,_o);return{data:t,error:n,isLoading:r,mutate:s}};function xo(e,t){return Math.floor(Math.random()*(t-e+1))+e}function To(e){const n=[],{data:r}=vo();let{previewMode:s}=e,o=e.previewData||{};const[i,a]=R.useState(null),[p,f]=R.useState(null),[u,h]=R.useState(null),[y,g]=R.useState(null),[l,m]=R.useState(0),[b,O]=R.useState(!1),[w,T]=R.useState(!1),[D,x]=R.useState(new Date),[I,P]=R.useState([]),{data:v}=go(i);R.useEffect(()=>{r&&r?.length>0&&!i&&(console.log("Ad Mounted or reduxAds changed"),a(e.ad_id||r[xo(0,r?.length-1)]?._id))},[r]),R.useEffect(()=>{},[v]),R.useEffect(()=>{v?.populated_promos&&l>=0&&g(v?.populated_promos[l])},[l,v]);function C(){T(!w)}const{ref:Q,inView:q}=Us({threshold:0,triggerOnce:!0});function H(k){if(s&&console.log("Preventing this event from being logged as this ad is being shown in preview mode."),I.find(j=>j==k)){console.log("Already logged this event");return}F.get("/api/ads/event",{params:{ad_id:v?._id,event:k}}).then(function(j){P([...I,k]),console.log(j.data)}).catch(function(j){console.log(j)})}return R.useEffect(()=>{if(!s&&(console.log("inView",q),q&&i)){let k=[{ad_id:i,date:new Date().toString()},...n.filter(j=>{if(console.log(zn(new Date,new Date(j.date))),zn(new Date,new Date(j.date))>5){console.log("adsViewed - Remove Old Ad View Object");return}else return console.log("adsViewed - Keep Ad View Object"),j})];console.log("unexpiredRecentViews",k)}},[q,i]),E.jsxs("div",{ref:Q,className:"ad-wrap",style:{"--articles-ad-background-color":o.background_color||v?.background_color,"--articles-ad-font-color":o.font_color||v?.font_color,"--articles-ad-border-color":o.border_color||v?.border_color},children:[E.jsx("div",{className:"ad",children:E.jsxs("div",{className:"main-panel",children:[E.jsx("div",{className:"ad-warning flex-header",children:E.jsxs("div",{className:"",children:[v?.city&&"Local"," Advertisement"]})}),E.jsxs("div",{className:"content-wrap",children:[E.jsxs("div",{className:"photo-banner",children:[E.jsx("div",{className:"logo",children:(o.logo?.location||v?.logo?.location)&&E.jsx("img",{src:o?.logo?.key?`${process.env.NEXT_PUBLIC_CDN}${o?.logo?.key}`:`${process.env.NEXT_PUBLIC_CDN}${v?.logo?.key}`,alt:""})}),E.jsx("div",{className:"icon d-none",children:E.jsx("i",{className:"fas fa-mug-hot"})}),E.jsx("img",{className:"photo",src:o?.background?.key?`${process.env.NEXT_PUBLIC_CDN}${o.background?.key}`:`${process.env.NEXT_PUBLIC_CDN}${v?.background?.key}`,alt:""})]}),E.jsxs("div",{className:"details-wrap",children:[E.jsxs("div",{className:"detail-title",children:[E.jsx("div",{className:"detail",children:E.jsx("span",{className:"h4",children:o?.business||v?.business})}),E.jsxs("div",{className:"flex flex-column d-none",children:[E.jsxs("div",{className:"detail",children:[E.jsx("span",{className:"icon",children:E.jsx("i",{className:"fas fa-search-location"})}),E.jsxs("span",{children:[v?.city,", ",v?.state]})]}),E.jsxs("div",{className:"detail",children:[E.jsx("span",{className:"icon",children:E.jsx("i",{className:"fas fa-clock me-2"})}),E.jsx("span",{children:"6:30AM–8PM"})]})]})]}),v?.city&&E.jsx("div",{className:"details mb-3 d-none"}),E.jsx("div",{className:"short-description",children:o?.description||v?.description})]})]}),(!1)?.roles?.isDev&&v?.populated_promos?.length>0&&E.jsxs("div",{children:[y&&E.jsx("div",{className:"promos-wrap",children:y&&E.jsxs("div",{className:"promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",children:[E.jsxs("div",{className:"",children:[E.jsx("div",{children:y.title}),E.jsx("div",{className:"small",children:E.jsx("div",{className:"small",children:y.details})})]}),E.jsx(Re,{className:"px-3",small:!0,onClick:()=>{console.log("Load Save Modal"),O(!0)},children:"Save"})]},y._id)}),E.jsxs("div",{className:"d-flex justify-content-between",children:[E.jsxs("div",{className:"px-2",children:[v?.populated_promos?.length," Promos Active"]}),E.jsxs("div",{className:"controls",children:[E.jsx("i",{className:"fad fa-arrow-circle-left",type:"button",onClick:()=>{l==0?m(v?.populated_promos?.length-1):m(k=>k-1)}}),v?.populated_promos?.map((k,j)=>E.jsx("i",{className:`fa-square ${j==l?"fad":"fas"}`},k._id)),E.jsx("i",{className:"fad fa-arrow-circle-right",type:"button",onClick:()=>{l==v?.populated_promos?.length-1?m(0):m(k=>k+1)}})]})]})]}),E.jsx("hr",{style:{borderColor:"white"},className:"mt-auto mb-0"}),E.jsxs("div",{className:"action-wrap d-flex justify-content-lg-between px-3 py-2",children:[E.jsx("div",{onClick:()=>{C(),H("Details")},className:"action flex-grow-1 flex-shrink-0",children:"Details"}),E.jsx("span",{className:"px-4"}),E.jsx("a",{className:"action flex-grow-1 flex-shrink-0",href:v?.website,target:"_blank",rel:"noreferrer",onClick:()=>H("Website"),children:E.jsx("div",{children:"Website"})})]})]})}),!s&&E.jsx("div",{className:"advertise-with-us p-1",style:{backgroundColor:o.background_color||v?.background_color,color:o.font_color||v?.font_color,borderColor:o.border_color||v?.border_color},children:E.jsxs("div",{className:"small d-block w-100 text-center",children:[E.jsx("i",{className:"fas fa-share me-1"}),"Advertise with Articles Media!"]})})]})}const Ao=R.memo(To),No=async e=>{if(process.env.NODE_ENV==="development")try{return(await F.get("http://localhost:3001/api/community/games/scoreboard",{params:{game:e.game}})).data}catch{}return F.get(e.url,{params:{game:e.game}}).then(t=>t.data)},Co={dedupingInterval:1e3*60*30,refreshInterval:0,revalidateOnFocus:!1,revalidateIfStale:!1,shouldRetryOnError:!1},jo=e=>{const{data:t,error:n,isLoading:r,isValidating:s,mutate:o}=jt(e?.game?{url:"https://articles.media/api/community/games/scoreboard",game:e.game}:null,No,Co);return{data:t,error:n,isLoading:r,isValidating:s,mutate:o}};function Do({game:e,reloadScoreboard:t,setReloadScoreboard:n}){const[r,s]=R.useState(!1),[o,i]=R.useState(!1),{data:a,mutate:p}=jo({game:e});return R.useEffect(()=>{},[]),R.useEffect(()=>{t&&(n(!1),p())},[t]),E.jsx("div",{className:"scoreboard",children:E.jsxs("div",{className:"card card-articles card-sm mb-3 mb-lg-0",children:[E.jsxs("div",{className:"card-header d-flex justify-content-between align-items-center",children:[E.jsxs("span",{children:[e," Scoreboard"]}),E.jsx(Re,{onClick:()=>{p()},small:!0,children:E.jsx("i",{className:"fad fa-redo me-0"})})]}),E.jsxs("div",{className:"card-body p-0",children:[(a?.length||0)==0&&E.jsx("div",{className:"small p-2",children:"No scores yet"}),a?.map((f,u)=>E.jsxs("div",{className:"result d-flex flex-column justify-content-between border-bottom p-2",children:[E.jsxs("div",{className:"d-flex justify-content-between lh-sm",children:[E.jsxs("div",{className:"d-flex",children:[E.jsx("h5",{className:"mb-0 me-3",children:u+1}),E.jsx("div",{className:"lh-sm"})]}),E.jsx("div",{children:E.jsx("h5",{className:"mb-0",children:f.score||f.total})})]}),f.last_play&&f.public_last_play&&E.jsxs("small",{className:"mt-1",style:{fontSize:"0.75rem"},children:["Played: ",format(new Date(f.last_play),"MM/d/yy hh:mmaa")]})]},f._id))]}),E.jsxs("div",{className:"card-footer d-flex justify-content-between align-items-center",children:[E.jsx("div",{className:"small",children:"Play to get on the board!"}),E.jsx(Re,{small:!0,onClick:()=>{s(!0)},children:E.jsx("i",{className:"fad fa-cog me-0"})})]})]})})}function Po(){return"Hello, world!"}re.Ad=Ao,re.ArticlesAd=lr,re.GameScoreboard=Do,re.ReturnToLauncherButton=cr,re.helloWorld=Po,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@articles-media/articles-dev-box",
|
|
3
3
|
"description": "Shared code, functions, and components for different Articles Media projects.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
7
7
|
"#root/src/*": "./src/*"
|
|
8
8
|
},
|
|
9
|
-
"main": "
|
|
9
|
+
"main": "./dist/articles-dev-box.umd.cjs",
|
|
10
|
+
"module": "./dist/articles-dev-box.js",
|
|
10
11
|
"files": [
|
|
11
|
-
"
|
|
12
|
-
"src"
|
|
12
|
+
"dist"
|
|
13
13
|
],
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "https://github.com/Articles-Joey/articles-dev-box"
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|
|
19
|
-
".":
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./dist/articles-dev-box.js",
|
|
21
|
+
"require": "./dist/articles-dev-box.umd.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./dist/style.css": "./dist/articles-dev-box.css"
|
|
20
24
|
},
|
|
21
25
|
"scripts": {
|
|
22
26
|
"dev": "vite",
|
package/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import ReturnToLauncherButton from '#root/src/components/Games/ReturnToLauncherButton.jsx';
|
|
2
|
-
import ArticlesAd from '#root/src/components/Ads/ArticlesAd.jsx';
|
|
3
|
-
import Ad from '#root/src/components/Ads/Ad.jsx';
|
|
4
|
-
import GameScoreboard from '#root/src/components/Games/GameScoreboard.jsx';
|
|
5
|
-
|
|
6
|
-
function helloWorld() {
|
|
7
|
-
return "Hello, world!";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
helloWorld,
|
|
12
|
-
ReturnToLauncherButton,
|
|
13
|
-
ArticlesAd,
|
|
14
|
-
Ad,
|
|
15
|
-
GameScoreboard,
|
|
16
|
-
};
|