-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreactopus.js
More file actions
1 lines (1 loc) · 23.4 KB
/
reactopus.js
File metadata and controls
1 lines (1 loc) · 23.4 KB
1
(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Component:()=>N,Fragment:()=>$,cloneElement:()=>X,createContext:()=>Y,createElement:()=>S,createRef:()=>E,h:()=>S,hydrate:()=>Q,isValidElement:()=>l,options:()=>s,render:()=>K,toChildArray:()=>F});var n={};function r(t){this.input=t,this.pos=0}function o(t){switch(t.type){case"import":return function(t){if(!t.specifiers)return`require("${t.source}");\n`;const{specifiers:e,source:n}=t,r=n.replace(/[^a-zA-Z0-9]/g,"_");if(e.includes("{")){const[t,o]=e.split("{"),_=t.replace(",","").trim(),i=o.replace("}","").trim();let s=`const _pkg_${r} = require("${n}");\n`;return _&&(s+=`const ${_} = _pkg_${r}.default || _pkg_${r};\n`),i&&(s+=`const { ${i} } = _pkg_${r};\n`),s}return e.startsWith("* as")?`const ${e.substring(4).trim()} = require("${n}");\n`:`const ${e} = require("${n}").default || require("${n}");\n`}(t);case"element":return _(t);case"expression":return t.children.map(o).join("");case"text":return function(t){let e=t;return e=e.replace(/export\s+default\s+/g,"exports.default = "),e=e.replace(/export\s+function\s+([a-zA-Z0-9_$]+)/g,"exports.$1 = function $1"),e=e.replace(/export\s+(const|let|var)\s+([a-zA-Z0-9_$]+)/g,"$1 $2 = exports.$2"),e}(t.value);default:return""}}function _(t){let e="React.Fragment";t.tagName&&(e=/^[A-Z]/.test(t.tagName)?t.tagName:`"${t.tagName}"`);let n="null";const r=Object.keys(t.attributes||{});return r.length>0&&(n=`{ ${r.map(e=>{const n=t.attributes[e];return`"${e}": ${"expression"===n.type?n.value:JSON.stringify(n.value)}`}).join(", ")} }`),`React.createElement(${[e,n,...(t.children||[]).map(t=>"text"===t.type?JSON.stringify(t.value):"expression"===t.type?t.children.map(o).join(""):"element"===t.type?_(t):"null")].join(", ")})`}t.r(n),t.d(n,{useCallback:()=>bt,useContext:()=>kt,useDebugValue:()=>wt,useEffect:()=>mt,useErrorBoundary:()=>Ct,useId:()=>St,useImperativeHandle:()=>gt,useLayoutEffect:()=>yt,useMemo:()=>xt,useReducer:()=>dt,useRef:()=>vt,useState:()=>ft}),r.prototype.eof=function(){return this.pos>=this.input.length},r.prototype.nextChar=function(){return this.input[this.pos]},r.prototype.startsWith=function(t){return this.input.slice(this.pos).startsWith(t)},r.prototype.expect=function(t){if(!this.startsWith(t))throw new Error(`Parser Error: Expected "${t}" at pos ${this.pos}`);this.pos+=t.length},r.prototype.consumeChar=function(){return this.input[this.pos++]},r.prototype.consumeWhile=function(t){let e="";for(;!this.eof()&&t(this.nextChar());)e+=this.consumeChar();return e},r.prototype.consumeWhiteSpace=function(){this.consumeWhile(t=>/\s/.test(t))},r.prototype.parseName=function(){return this.consumeWhile(t=>/[a-zA-Z0-9:_-]/.test(t))},r.prototype.consumeStringLiteral=function(t){if(this.nextChar()!==t)throw new Error(`Expected string start "${t}" at ${this.pos}`);let e=this.consumeChar();for(;!this.eof();){const n=this.consumeChar();if(e+=n,"\\"!==n||this.eof())if("`"!==t||"$"!==n||"{"!==this.nextChar()){if(n===t)break}else e+=this.consumeBalancedBlock("{","}");else e+=this.consumeChar()}return e},r.prototype.consumeBalancedBlock=function(t,e){if(this.nextChar()!==t)throw new Error(`Expected "${t}"`);let n=0,r="";for(;!this.eof();){const o=this.nextChar();if(["'",'"',"`"].includes(o)){r+=this.consumeStringLiteral(o);continue}const _=this.consumeChar();if(r+=_,_===t)n++;else if(_===e&&(n--,0===n))break}if(0!==n)throw new Error(`Unbalanced block ${t}${e}`);return r},r.prototype.looksLikeTagStart=function(){return!!this.startsWith("<")&&!this.startsWith("</")&&(!!this.startsWith("<>")||/[a-zA-Z]/.test(this.input[this.pos+1]))},r.prototype.looksLikeClosingTagStart=function(){return!!this.startsWith("</")&&(!!this.startsWith("</>")||/[a-zA-Z]/.test(this.input[this.pos+2]))},r.prototype.parse=function(){return[...this.parseAllImports(),...this.parseAllNodes(!1)]},r.prototype.parseAllImports=function(){const t=[];for(this.consumeWhiteSpace();this.startsWith("import");)t.push(this.parseImport()),this.consumeWhiteSpace();return t},r.prototype.parseImport=function(){this.expect("import"),this.consumeWhiteSpace();const t=this.nextChar();if(["'",'"',"`"].includes(t)){const t=this.consumeChar(),e=this.consumeWhile(e=>e!==t);return this.expect(t),this.startsWith(";")&&this.consumeChar(),{type:"import",specifiers:null,source:e}}let e="";for(;!this.eof()&&!this.startsWith("from");)e+=this.consumeChar();e=e.trim(),this.expect("from"),this.consumeWhiteSpace();const n=this.consumeChar(),r=this.consumeWhile(t=>t!==n);return this.expect(n),this.startsWith(";")&&this.consumeChar(),{type:"import",specifiers:e,source:r}},r.prototype.parseAllNodes=function(t){const e=[];for(;this.consumeWhiteSpace(),!(this.eof()||t&&this.startsWith("</"));){const n=this.parseNode(t);n&&e.push(n)}return e},r.prototype.parseNode=function(t){return t&&this.startsWith("{")?this.parseExpression():this.looksLikeTagStart()?this.parseElement():this.parseText(t)},r.prototype.parseExpression=function(){this.expect("{");const t=[];let e="",n=1;for(;n>0&&!this.eof();){const r=this.nextChar();if("}"!==r)"{"!==r?this.looksLikeTagStart()?(e&&(t.push({type:"text",value:e}),e=""),t.push(this.parseElement())):["'",'"',"`"].includes(r)?e+=this.consumeStringLiteral(r):e+=this.consumeChar():(n++,e+=this.consumeChar());else{if(n--,0===n){this.consumeChar();break}e+=this.consumeChar()}}return e&&t.push({type:"text",value:e}),{type:"expression",children:t}},r.prototype.parseText=function(t){let e="";for(;!this.eof();){const n=this.nextChar();if("<"===n&&(this.looksLikeTagStart()||this.looksLikeClosingTagStart()))break;if(t&&"{"===n)break;t||"/"!==n||"/"!==this.input[this.pos+1]?["'",'"',"`"].includes(n)?e+=this.consumeStringLiteral(n):e+=this.consumeChar():(e+=this.consumeChar(),e+=this.consumeChar(),e+=this.consumeWhile(t=>"\n"!==t))}return e?{type:"text",value:e}:null},r.prototype.parseElement=function(){this.expect("<");const t=this.parseName(),e=""===t,n={};for(;this.consumeWhiteSpace(),!this.startsWith("/>")&&!this.startsWith(">");){const[t,e]=this.parseAttribute();n[t]=e}let r=[];if(this.startsWith("/>")){if(e)throw new Error("Fragments cannot be self-closing");this.expect("/>")}else this.expect(">"),r=this.parseAllNodes(!0),e?this.expect("</>"):(this.expect("</"),this.consumeWhile(t=>">"!==t).trim(),this.expect(">"));return{type:"element",tagName:e?null:t,attributes:n,children:r}},r.prototype.parseAttribute=function(){const t=this.parseName();return this.consumeWhiteSpace(),this.expect("="),this.consumeWhiteSpace(),[t,this.parseAttributeValue()]},r.prototype.parseAttributeValue=function(){const t=this.nextChar();if(["'",'"'].includes(t)){const t=this.consumeChar(),e=this.consumeWhile(e=>e!==t);return this.expect(t),{type:"string",value:e}}if("{"===t){this.consumeChar();let t=1,e="";for(;!this.eof()&&t>0;){const n=this.consumeChar();"{"===n?t++:"}"===n&&t--,t>0&&(e+=n)}return{type:"expression",value:e}}const e=this.consumeWhile(t=>t&&!/[\s/>]/.test(t));return{type:"string",value:e}};var i,s,u,l,c,a,h,p,f,d,m,y,v,g={},x=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,k=Array.isArray;function w(t,e){for(var n in e)t[n]=e[n];return t}function C(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function S(t,e,n){var r,o,_,s={};for(_ in e)"key"==_?r=e[_]:"ref"==_?o=e[_]:s[_]=e[_];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(_ in t.defaultProps)void 0===s[_]&&(s[_]=t.defaultProps[_]);return W(t,s,r,o,null)}function W(t,e,n,r,o){var _={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=s.vnode&&s.vnode(_),_}function E(){return{current:null}}function $(t){return t.children}function N(t,e){this.props=t,this.context=e}function P(t,e){if(null==e)return t.__?P(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?P(t):null}function A(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return A(t)}}function H(t){(!t.__d&&(t.__d=!0)&&c.push(t)&&!T.__r++||a!=s.debounceRendering)&&((a=s.debounceRendering)||h)(T)}function T(){for(var t,e,n,r,o,_,i,u=1;c.length;)c.length>u&&c.sort(p),t=c.shift(),u=c.length,t.__d&&(n=void 0,r=void 0,o=(r=(e=t).__v).__e,_=[],i=[],e.__P&&((n=w({},r)).__v=r.__v+1,s.vnode&&s.vnode(n),O(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[o]:null,_,null==o?P(r):o,!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,B(_,n,i),r.__e=r.__=null,n.__e!=o&&A(n)));T.__r=0}function L(t,e,n,r,o,_,i,s,u,l,c){var a,h,p,f,d,m,y,v=r&&r.__k||x,b=e.length;for(u=U(n,e,v,u,b),a=0;a<b;a++)null!=(p=n.__k[a])&&(h=-1==p.__i?g:v[p.__i]||g,p.__i=a,m=O(t,p,h,o,_,i,s,u,l,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Z(h.ref,null,p),c.push(p.ref,p.__c||f,p)),null==d&&null!=f&&(d=f),(y=!!(4&p.__u))||h.__k===p.__k?u=D(p,u,t,y):"function"==typeof p.type&&void 0!==m?u=m:f&&(u=f.nextSibling),p.__u&=-7);return n.__e=d,u}function U(t,e,n,r,o){var _,i,s,u,l,c=n.length,a=c,h=0;for(t.__k=new Array(o),_=0;_<o;_++)null!=(i=e[_])&&"boolean"!=typeof i&&"function"!=typeof i?("string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?i=t.__k[_]=W(null,i,null,null,null):k(i)?i=t.__k[_]=W($,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?i=t.__k[_]=W(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):t.__k[_]=i,u=_+h,i.__=t,i.__b=t.__b+1,s=null,-1!=(l=i.__i=M(i,n,u,a))&&(a--,(s=n[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(o>c?h--:o<c&&h++),"function"!=typeof i.type&&(i.__u|=4)):l!=u&&(l==u-1?h--:l==u+1?h++:(l>u?h--:h++,i.__u|=4))):t.__k[_]=null;if(a)for(_=0;_<c;_++)null!=(s=n[_])&&!(2&s.__u)&&(s.__e==r&&(r=P(s)),J(s,s));return r}function D(t,e,n,r){var o,_;if("function"==typeof t.type){for(o=t.__k,_=0;o&&_<o.length;_++)o[_]&&(o[_].__=t,e=D(o[_],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=P(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function F(t,e){return e=e||[],null==t||"boolean"==typeof t||(k(t)?t.some(function(t){F(t,e)}):e.push(t)),e}function M(t,e,n,r){var o,_,i,s=t.key,u=t.type,l=e[n],c=null!=l&&!(2&l.__u);if(null===l&&null==s||c&&s==l.key&&u==l.type)return n;if(r>(c?1:0))for(o=n-1,_=n+1;o>=0||_<e.length;)if(null!=(l=e[i=o>=0?o--:_++])&&!(2&l.__u)&&s==l.key&&u==l.type)return i;return-1}function R(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||b.test(e)?n:n+"px"}function j(t,e,n,r,o){var _,i;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||R(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||R(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])_=e!=(e=e.replace(f,"$1")),i=e.toLowerCase(),e=i in t||"onFocusOut"==e||"onFocusIn"==e?i.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+_]=n,n?r?n.u=r.u:(n.u=d,t.addEventListener(e,_?y:m,_)):t.removeEventListener(e,_?y:m,_);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function I(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=d++;else if(e.t<n.u)return;return n(s.event?s.event(e):e)}}}function O(t,e,n,r,o,_,i,u,l,c){var a,h,p,f,d,m,y,v,g,x,b,S,W,E,P,A,H,T=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(l=!!(32&n.__u),_=[u=e.__e=n.__e]),(a=s.__b)&&a(e);t:if("function"==typeof T)try{if(v=e.props,g="prototype"in T&&T.prototype.render,x=(a=T.contextType)&&r[a.__c],b=a?x?x.props.value:a.__:r,n.__c?y=(h=e.__c=n.__c).__=h.__E:(g?e.__c=h=new T(v,b):(e.__c=h=new N(v,b),h.constructor=T,h.render=G),x&&x.sub(h),h.state||(h.state={}),h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),g&&null==h.__s&&(h.__s=h.state),g&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,T.getDerivedStateFromProps(v,h.__s))),f=h.props,d=h.state,h.__v=e,p)g&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),g&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(g&&null==T.getDerivedStateFromProps&&v!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,b),e.__v==n.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,b)){for(e.__v!=n.__v&&(h.props=v,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(t){t&&(t.__=e)}),S=0;S<h._sb.length;S++)h.__h.push(h._sb[S]);h._sb=[],h.__h.length&&i.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,b),g&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,d,m)})}if(h.context=b,h.props=v,h.__P=t,h.__e=!1,W=s.__r,E=0,g){for(h.state=h.__s,h.__d=!1,W&&W(e),a=h.render(h.props,h.state,h.context),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[]}else do{h.__d=!1,W&&W(e),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++E<25);h.state=h.__s,null!=h.getChildContext&&(r=w(w({},r),h.getChildContext())),g&&!p&&null!=h.getSnapshotBeforeUpdate&&(m=h.getSnapshotBeforeUpdate(f,d)),A=a,null!=a&&a.type===$&&null==a.key&&(A=z(a.props.children)),u=L(t,k(A)?A:[A],e,n,r,o,_,i,u,l,c),h.base=e.__e,e.__u&=-161,h.__h.length&&i.push(h),y&&(h.__E=h.__=null)}catch(t){if(e.__v=null,l||null!=_)if(t.then){for(e.__u|=l?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;_[_.indexOf(u)]=null,e.__e=u}else{for(H=_.length;H--;)C(_[H]);q(e)}else e.__e=n.__e,e.__k=n.__k,t.then||q(e);s.__e(t,e,n)}else null==_&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):u=e.__e=V(n.__e,e,n,r,o,_,i,l,c);return(a=s.diffed)&&a(e),128&e.__u?void 0:u}function q(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(q)}function B(t,e,n){for(var r=0;r<n.length;r++)Z(n[r],n[++r],n[++r]);s.__c&&s.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){s.__e(t,e.__v)}})}function z(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:k(t)?t.map(z):w({},t)}function V(t,e,n,r,o,_,u,l,c){var a,h,p,f,d,m,y,v=n.props||g,x=e.props,b=e.type;if("svg"==b?o="http://www.w3.org/2000/svg":"math"==b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=_)for(a=0;a<_.length;a++)if((d=_[a])&&"setAttribute"in d==!!b&&(b?d.localName==b:3==d.nodeType)){t=d,_[a]=null;break}if(null==t){if(null==b)return document.createTextNode(x);t=document.createElementNS(o,b,x.is&&x),l&&(s.__m&&s.__m(e,_),l=!1),_=null}if(null==b)v===x||l&&t.data==x||(t.data=x);else{if(_=_&&i.call(t.childNodes),!l&&null!=_)for(v={},a=0;a<t.attributes.length;a++)v[(d=t.attributes[a]).name]=d.value;for(a in v)if(d=v[a],"children"==a);else if("dangerouslySetInnerHTML"==a)p=d;else if(!(a in x)){if("value"==a&&"defaultValue"in x||"checked"==a&&"defaultChecked"in x)continue;j(t,a,null,d,o)}for(a in x)d=x[a],"children"==a?f=d:"dangerouslySetInnerHTML"==a?h=d:"value"==a?m=d:"checked"==a?y=d:l&&"function"!=typeof d||v[a]===d||j(t,a,d,v[a],o);if(h)l||p&&(h.__html==p.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(p&&(t.innerHTML=""),L("template"==e.type?t.content:t,k(f)?f:[f],e,n,r,"foreignObject"==b?"http://www.w3.org/1999/xhtml":o,_,u,_?_[0]:n.__k&&P(n,0),l,c),null!=_)for(a=_.length;a--;)C(_[a]);l||(a="value","progress"==b&&null==m?t.removeAttribute("value"):null!=m&&(m!==t[a]||"progress"==b&&!m||"option"==b&&m!=v[a])&&j(t,a,m,v[a],o),a="checked",null!=y&&y!=t[a]&&j(t,a,y,v[a],o))}return t}function Z(t,e,n){try{if("function"==typeof t){var r="function"==typeof t.__u;r&&t.__u(),r&&null==e||(t.__u=t(e))}else t.current=e}catch(t){s.__e(t,n)}}function J(t,e,n){var r,o;if(s.unmount&&s.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Z(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){s.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&J(r[o],e,n||"function"!=typeof t.type);n||C(t.__e),t.__c=t.__=t.__e=void 0}function G(t,e,n){return this.constructor(t,n)}function K(t,e,n){var r,o,_,u;e==document&&(e=document.documentElement),s.__&&s.__(t,e),o=(r="function"==typeof n)?null:n&&n.__k||e.__k,_=[],u=[],O(e,t=(!r&&n||e).__k=S($,null,[t]),o||g,g,e.namespaceURI,!r&&n?[n]:o?null:e.firstChild?i.call(e.childNodes):null,_,!r&&n?n:o?o.__e:e.firstChild,r,u),B(_,t,u)}function Q(t,e){K(t,e,Q)}function X(t,e,n){var r,o,_,s,u=w({},t.props);for(_ in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==_?r=e[_]:"ref"==_?o=e[_]:u[_]=void 0===e[_]&&null!=s?s[_]:e[_];return arguments.length>2&&(u.children=arguments.length>3?i.call(arguments,2):n),W(t.type,u,r||t.key,o||t.ref,null)}function Y(t){function e(t){var n,r;return this.getChildContext||(n=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!=t.value&&n.forEach(function(t){t.__e=!0,H(t)})},this.sub=function(t){n.add(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.delete(t),e&&e.call(t)}}),t.children}return e.__c="__cC"+v++,e.__=t,e.Provider=e.__l=(e.Consumer=function(t,e){return t.children(e)}).contextType=e,e}i=x.slice,s={__e:function(t,e,n,r){for(var o,_,i;e=e.__;)if((o=e.__c)&&!o.__)try{if((_=o.constructor)&&null!=_.getDerivedStateFromError&&(o.setState(_.getDerivedStateFromError(t)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),i=o.__d),i)return o.__E=o}catch(e){t=e}throw t}},u=0,l=function(t){return null!=t&&void 0===t.constructor},N.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),"function"==typeof t&&(t=t(w({},n),this.props)),t&&w(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),H(this))},N.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),H(this))},N.prototype.render=$,c=[],h="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=function(t,e){return t.__v.__b-e.__v.__b},T.__r=0,f=/(PointerCapture)$|Capture$/i,d=0,m=I(!1),y=I(!0),v=0;var tt,et,nt,rt,ot=0,_t=[],it=s,st=it.__b,ut=it.__r,lt=it.diffed,ct=it.__c,at=it.unmount,ht=it.__;function pt(t,e){it.__h&&it.__h(et,t,ot||e),ot=0;var n=et.__H||(et.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ft(t){return ot=1,dt(Ht,t)}function dt(t,e,n){var r=pt(tt++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Ht(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=et,!et.__f)){var o=function(t,e,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(t){return!!t.__c});if(o.every(function(t){return!t.__N}))return!_||_.call(this,t,e,n);var i=r.__c.props!==t;return o.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(i=!0)}}),_&&_.call(this,t,e,n)||i};et.__f=!0;var _=et.shouldComponentUpdate,i=et.componentWillUpdate;et.componentWillUpdate=function(t,e,n){if(this.__e){var r=_;_=void 0,o(t,e,n),_=r}i&&i.call(this,t,e,n)},et.shouldComponentUpdate=o}return r.__N||r.__}function mt(t,e){var n=pt(tt++,3);!it.__s&&At(n.__H,e)&&(n.__=t,n.u=e,et.__H.__h.push(n))}function yt(t,e){var n=pt(tt++,4);!it.__s&&At(n.__H,e)&&(n.__=t,n.u=e,et.__h.push(n))}function vt(t){return ot=5,xt(function(){return{current:t}},[])}function gt(t,e,n){ot=6,yt(function(){if("function"==typeof t){var n=t(e());return function(){t(null),n&&"function"==typeof n&&n()}}if(t)return t.current=e(),function(){return t.current=null}},null==n?n:n.concat(t))}function xt(t,e){var n=pt(tt++,7);return At(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function bt(t,e){return ot=8,xt(function(){return t},e)}function kt(t){var e=et.context[t.__c],n=pt(tt++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(et)),e.props.value):t.__}function wt(t,e){it.useDebugValue&&it.useDebugValue(e?e(t):t)}function Ct(t){var e=pt(tt++,10),n=ft();return e.__=t,et.componentDidCatch||(et.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function St(){var t=pt(tt++,11);if(!t.__){for(var e=et.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Wt(){for(var t;t=_t.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Nt),t.__H.__h.forEach(Pt),t.__H.__h=[]}catch(e){t.__H.__h=[],it.__e(e,t.__v)}}it.__b=function(t){et=null,st&&st(t)},it.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ht&&ht(t,e)},it.__r=function(t){ut&&ut(t),tt=0;var e=(et=t.__c).__H;e&&(nt===et?(e.__h=[],et.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach(Nt),e.__h.forEach(Pt),e.__h=[],tt=0)),nt=et},it.diffed=function(t){lt&<(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==_t.push(e)&&rt===it.requestAnimationFrame||((rt=it.requestAnimationFrame)||$t)(Wt)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),nt=et=null},it.__c=function(t,e){e.some(function(t){try{t.__h.forEach(Nt),t.__h=t.__h.filter(function(t){return!t.__||Pt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],it.__e(n,t.__v)}}),ct&&ct(t,e)},it.unmount=function(t){at&&at(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{Nt(t)}catch(t){e=t}}),n.__H=void 0,e&&it.__e(e,n.__v))};var Et="function"==typeof requestAnimationFrame;function $t(t){var e,n=function(){clearTimeout(r),Et&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Et&&(e=requestAnimationFrame(n))}function Nt(t){var e=et,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),et=e}function Pt(t){var e=et;t.__c=t.__(),et=e}function At(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function Ht(t,e){return"function"==typeof e?e(t):e}const Tt={react:{exports:{...e,...n}},preact:{exports:e},"preact/hooks":{exports:n},"react-dom":{exports:{render:K}}},Lt={},Ut=[],Dt=new Set;async function Ft(t){try{if(Tt[t])return;const e=await fetch(t);if(!e.ok)throw new Error(`HTTP ${e.status} for ${t}`);const n=await e.text(),o=new r(n).parse();Lt[t]={source:n,ast:o},Mt(o,t)}catch(e){console.error(`[Loader] Failed to load ${t}:`,e)}}function Mt(t,e){for(const n of t)if("import"===n.type&&n.source.startsWith(".")){const t=new URL(n.source,e).href;Tt[t]||Dt.has(t)||(Dt.add(t),Ut.push(t))}}function Rt(t){if(Tt[t])return Tt[t].exports;if(!Lt[t])throw new Error(`[Runtime] Source not found in cache: ${t}`);const{ast:e}=Lt[t];return jt(e,t)}function jt(t,e){const n=function(t){return t.map(t=>o(t)).join("")}(t),r=t=>{if("react"===t)return Tt.react.exports;if("react-dom"===t)return Tt["react-dom"].exports;let n=t;if(t.startsWith(".")&&(n=new URL(t,e).href),Tt[n])return Tt[n].exports;if(Lt[n])return Rt(n);throw new Error(`[Runtime] Module not loaded: ${t}`)},_={exports:{}};try{new Function("require","module","exports",n)(r,_,_.exports)}catch(t){console.error(`[Runtime] Execution Error in ${e}:`,t),console.debug("Transpiled Code:",n)}return e!==window.location.href&&(Tt[e]=_),_.exports}document.addEventListener("DOMContentLoaded",async function(){const t=document.querySelectorAll("script[type='text/jsx']"),e=[];for(const n of t)if(n.src){const t=new URL(n.src,window.location.href).href;Dt.has(t)||(Dt.add(t),Ut.push(t),e.push({type:"url",url:t}))}else{const t=new r(n.textContent).parse();Mt(t,window.location.href),e.push({type:"inline",ast:t})}await async function(){for(;Ut.length>0;){const t=Ut.splice(0,4);await Promise.all(t.map(Ft))}}();for(const t of e)"url"===t.type?Rt(t.url):jt(t.ast,window.location.href)})})();