mirror of
https://github.com/eternal-flame-AD/unitdc-rs.git
synced 2025-02-02 03:20:17 -06:00
44 lines
150 KiB
JavaScript
44 lines
150 KiB
JavaScript
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function wc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rs={exports:{}},dl={},ls={exports:{}},L={};/**
|
||
|
* @license React
|
||
|
* react.production.min.js
|
||
|
*
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var nr=Symbol.for("react.element"),kc=Symbol.for("react.portal"),Sc=Symbol.for("react.fragment"),_c=Symbol.for("react.strict_mode"),xc=Symbol.for("react.profiler"),Ec=Symbol.for("react.provider"),Cc=Symbol.for("react.context"),Nc=Symbol.for("react.forward_ref"),Pc=Symbol.for("react.suspense"),zc=Symbol.for("react.memo"),Tc=Symbol.for("react.lazy"),Yo=Symbol.iterator;function Lc(e){return e===null||typeof e!="object"?null:(e=Yo&&e[Yo]||e["@@iterator"],typeof e=="function"?e:null)}var is={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},os=Object.assign,us={};function cn(e,t,n){this.props=e,this.context=t,this.refs=us,this.updater=n||is}cn.prototype.isReactComponent={};cn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};cn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ss(){}ss.prototype=cn.prototype;function Ji(e,t,n){this.props=e,this.context=t,this.refs=us,this.updater=n||is}var qi=Ji.prototype=new ss;qi.constructor=Ji;os(qi,cn.prototype);qi.isPureReactComponent=!0;var Xo=Array.isArray,as=Object.prototype.hasOwnProperty,bi={current:null},cs={key:!0,ref:!0,__self:!0,__source:!0};function fs(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)as.call(t,r)&&!cs.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1<u){for(var s=Array(u),a=0;a<u;a++)s[a]=arguments[a+2];l.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)l[r]===void 0&&(l[r]=u[r]);return{$$typeof:nr,type:e,key:i,ref:o,props:l,_owner:bi.current}}function jc(e,t){return{$$typeof:nr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function eo(e){return typeof e=="object"&&e!==null&&e.$$typeof===nr}function Rc(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Go=/\/+/g;function jl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Rc(""+e.key):t.toString(36)}function Nr(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case nr:case kc:o=!0}}if(o)return o=e,l=l(o),e=r===""?"."+jl(o,0):r,Xo(l)?(n="",e!=null&&(n=e.replace(Go,"$&/")+"/"),Nr(l,t,n,"",function(a){return a})):l!=null&&(eo(l)&&(l=jc(l,n+(!l.key||o&&o.key===l.key?"":(""+l.key).replace(Go,"$&/")+"/")+e)),t.push(l)),1;if(o=0,r=r===""?".":r+":",Xo(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+jl(i,u);o+=Nr(i,t,n,s,l)}else if(s=Lc(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+jl(i,u++),o+=Nr(i,t,n,s,l);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ar(e,t,n){if(e==null)return e;var r=[],l=0;return Nr(e,r,"","",function(i){return t.call(n,i,l++)}),r}function Oc(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var se={current:null},Pr={transition:null},Mc={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:Pr,ReactCurrentOwner:bi};function ds(){throw Error("act(...) is not supported in production builds of React.")}L.Children={map:ar,forEach:function(e,t,n){ar(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ar(e,function(){t++}),t},toArray:function(e){return ar(e,function(t){return t})||[]},only:function(e){if(!eo(e))throw Error("React.Children.only expected to receive a sing
|
||
|
* @license React
|
||
|
* react-jsx-runtime.production.min.js
|
||
|
*
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var Ic=ge,Fc=Symbol.for("react.element"),Uc=Symbol.for("react.fragment"),$c=Object.prototype.hasOwnProperty,Ac=Ic.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Vc={key:!0,ref:!0,__self:!0,__source:!0};function ps(e,t,n){var r,l={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)$c.call(t,r)&&!Vc.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Fc,type:e,key:i,ref:o,props:l,_owner:Ac.current}}dl.Fragment=Uc;dl.jsx=ps;dl.jsxs=ps;rs.exports=dl;var N=rs.exports,ri={},ms={exports:{}},Se={},hs={exports:{}},vs={};/**
|
||
|
* @license React
|
||
|
* scheduler.production.min.js
|
||
|
*
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/(function(e){function t(x,z){var T=x.length;x.push(z);e:for(;0<T;){var H=T-1>>>1,G=x[H];if(0<l(G,z))x[H]=z,x[T]=G,T=H;else break e}}function n(x){return x.length===0?null:x[0]}function r(x){if(x.length===0)return null;var z=x[0],T=x.pop();if(T!==z){x[0]=T;e:for(var H=0,G=x.length,ur=G>>>1;H<ur;){var kt=2*(H+1)-1,Ll=x[kt],St=kt+1,sr=x[St];if(0>l(Ll,T))St<G&&0>l(sr,Ll)?(x[H]=sr,x[St]=T,H=St):(x[H]=Ll,x[kt]=T,H=kt);else if(St<G&&0>l(sr,T))x[H]=sr,x[St]=T,H=St;else break e}}return z}function l(x,z){var T=x.sortIndex-z.sortIndex;return T!==0?T:x.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],a=[],h=1,m=null,p=3,v=!1,w=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(x){for(var z=n(a);z!==null;){if(z.callback===null)r(a);else if(z.startTime<=x)r(a),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(a)}}function y(x){if(k=!1,d(x),!w)if(n(s)!==null)w=!0,zl(_);else{var z=n(a);z!==null&&Tl(y,z.startTime-x)}}function _(x,z){w=!1,k&&(k=!1,f(P),P=-1),v=!0;var T=p;try{for(d(z),m=n(s);m!==null&&(!(m.expirationTime>z)||x&&!Te());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var G=H(m.expirationTime<=z);z=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(s)&&r(s),d(z)}else r(s);m=n(s)}if(m!==null)var ur=!0;else{var kt=n(a);kt!==null&&Tl(y,kt.startTime-z),ur=!1}return ur}finally{m=null,p=T,v=!1}}var E=!1,C=null,P=-1,W=5,j=-1;function Te(){return!(e.unstable_now()-j<W)}function pn(){if(C!==null){var x=e.unstable_now();j=x;var z=!0;try{z=C(!0,x)}finally{z?mn():(E=!1,C=null)}}else E=!1}var mn;if(typeof c=="function")mn=function(){c(pn)};else if(typeof MessageChannel<"u"){var Ko=new MessageChannel,gc=Ko.port2;Ko.port1.onmessage=pn,mn=function(){gc.postMessage(null)}}else mn=function(){F(pn,0)};function zl(x){C=x,E||(E=!0,mn())}function Tl(x,z){P=F(function(){x(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(x){x.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,zl(_))},e.unstable_forceFrameRate=function(x){0>x||125<x?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<x?Math.floor(1e3/x):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(x){switch(p){case 1:case 2:case 3:var z=3;break;default:z=p}var T=p;p=z;try{return x()}finally{p=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(x,z){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var T=p;p=x;try{return z()}finally{p=T}},e.unstable_scheduleCallback=function(x,z,T){var H=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?H+T:H):T=H,x){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=T+G,x={id:h++,callback:z,priorityLevel:x,startTime:T,expirationTime:G,sortIndex:-1},T>H?(x.sortIndex=T,t(a,x),n(s)===null&&x===n(a)&&(k?(f(P),P=-1):k=!0,Tl(y,T-H))):(x.sortIndex=G,t(s,x),w||v||(w=!0,zl(_))),x},e.unstable_shouldYield=Te,e.unstable_wrapCallback=function(x){var z=p;return function(){var T=p;p=z;try{return x.apply(this,arguments)}finally{p=T}}}})(vs);hs.exports=vs;var Bc=hs.exports;/**
|
||
|
* @license React
|
||
|
* react-dom.production.min.js
|
||
|
*
|
||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var Wc=ge,ke=Bc;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ys=new Set,$n={};function Dt(e,t){nn(e,t),nn(e+"Capture",t)}function nn(e,t){for($n[e]=t,e=0;e<t.length;e++)ys.add(t[e])}var Xe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),li=Object.prototype.hasOwnProperty,Hc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Zo={},Jo={};function Qc(e){return li.call(Jo,e)?!0:li.call(Zo,e)?!1:Hc.test(e)?Jo[e]=!0:(Zo[e]=!0,!1)}function Kc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Yc(e,t,n,r){if(t===null||typeof t>"u"||Kc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ae(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){te[e]=new ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];te[t]=new ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){te[e]=new ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){te[e]=new ae(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){te[e]=new ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){te[e]=new ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){te[e]=new ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){te[e]=new ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){te[e]=new ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var to=/[\-:]([a-z])/g;function no(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin
|
||
|
`+Rl+e}var Ol=!1;function Ml(e,t){if(!e||Ol)return"";Ol=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var l=a.stack.split(`
|
||
|
`),i=r.stack.split(`
|
||
|
`),o=l.length-1,u=i.length-1;1<=o&&0<=u&&l[o]!==i[u];)u--;for(;1<=o&&0<=u;o--,u--)if(l[o]!==i[u]){if(o!==1||u!==1)do if(o--,u--,0>u||l[o]!==i[u]){var s=`
|
||
|
`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{Ol=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xn(e):""}function Xc(e){switch(e.tag){case 5:return xn(e.type);case 16:return xn("Lazy");case 13:return xn("Suspense");case 19:return xn("SuspenseList");case 0:case 2:case 15:return e=Ml(e.type,!1),e;case 11:return e=Ml(e.type.render,!1),e;case 1:return e=Ml(e.type,!0),e;default:return""}}function si(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $t:return"Fragment";case Ut:return"Portal";case ii:return"Profiler";case lo:return"StrictMode";case oi:return"Suspense";case ui:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ws:return(e.displayName||"Context")+".Consumer";case gs:return(e._context.displayName||"Context")+".Provider";case io:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oo:return t=e.displayName||null,t!==null?t:si(e.type)||"Memo";case et:t=e._payload,e=e._init;try{return si(e(t))}catch{}}return null}function Gc(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return si(t);case 8:return t===lo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ss(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zc(e){var t=Ss(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fr(e){e._valueTracker||(e._valueTracker=Zc(e))}function _s(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ss(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ar(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ai(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ht(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xs(e,t){t=t.checked,t!=null&&ro(e,"checked",t,!1)}function ci(e,t){xs(e,t);var n=ht(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fi(e,t.type,n):t.hasOwnProperty("defaultValue")&&fi(e,t.type,ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eu(e,t,n){if(t.hasOwnProperty("valu
|
||
|
`).replace(ud,"")}function wr(e,t,n){if(t=xu(t),xu(e)!==t&&n)throw Error(g(425))}function Xr(){}var Ci=null,Ni=null;function Pi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zi=typeof setTimeout=="function"?setTimeout:void 0,sd=typeof clearTimeout=="function"?clearTimeout:void 0,Eu=typeof Promise=="function"?Promise:void 0,ad=typeof queueMicrotask=="function"?queueMicrotask:typeof Eu<"u"?function(e){return Eu.resolve(null).then(e).catch(cd)}:zi;function cd(e){setTimeout(function(){throw e})}function Yl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Hn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Hn(t)}function ct(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Cu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var dn=Math.random().toString(36).slice(2),$e="__reactFiber$"+dn,Gn="__reactProps$"+dn,Ge="__reactContainer$"+dn,Ti="__reactEvents$"+dn,fd="__reactListeners$"+dn,dd="__reactHandles$"+dn;function Ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ge]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cu(e);e!==null;){if(n=e[$e])return n;e=Cu(e)}return t}e=n,n=e.parentNode}return null}function ir(e){return e=e[$e]||e[Ge],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wt(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(g(33))}function yl(e){return e[Gn]||null}var Li=[],Ht=-1;function gt(e){return{current:e}}function I(e){0>Ht||(e.current=Li[Ht],Li[Ht]=null,Ht--)}function M(e,t){Ht++,Li[Ht]=e.current,e.current=t}var vt={},ie=gt(vt),pe=gt(!1),Lt=vt;function rn(e,t){var n=e.type.contextTypes;if(!n)return vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function me(e){return e=e.childContextTypes,e!=null}function Gr(){I(pe),I(ie)}function Nu(e,t,n){if(ie.current!==vt)throw Error(g(168));M(ie,t),M(pe,n)}function fa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(g(108,Gc(e)||"Unknown",l));return V({},n,r)}function Zr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vt,Lt=ie.current,M(ie,e),M(pe,pe.current),!0}function Pu(e,t,n){var r=e.stateNode;if(!r)throw Error(g(169));n?(e=fa(e,t,Lt),r.__reactInternalMemoizedMergedChildContext=e,I(pe),I(ie),M(ie,e)):I(pe),M(pe,n)}var We=null,gl=!1,Xl=!1;function da(e){We===null?We=[e]:We.push(e)}function pd(e){gl=!0,da(e)}function wt(){if(!Xl&&We!==null){Xl=!0;var e=0,t=O;try{var n=We;for(O=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}We=null,gl=!1}catch(l){throw We!==null&&(We=We.slice(e+1)),Fs(so,wt),l}finally{O=t,Xl=!1}}return null}var Qt=[],Kt=0,Jr=null,qr=0,xe=[],Ee=0,jt=null,Qe=1,Ke="";function _t(e,t){Qt[Kt++]=qr,Qt[Kt++]=Jr,Jr=e,qr=t}function pa(e,t,n){xe[Ee++]=Qe,xe[Ee++]=Ke,xe[Ee++]=jt,jt=e;var r=Qe;e=Ke;var l=32-Me(r)-1;r&=~(1<<l),n+=1;var i=32-Me(t)+l;if(30<i){var o=l-l%5;i=(r&(1<<o)-1).toString(32),r>>=o,l-=o,Qe=1<<32-Me(t)+l|n<<l|r,Ke=i+e}else Qe=1<<i|n<<l|r,Ke=e}function go(e){e.return!==null&&(_t(e,1),pa(e,1,0))}function wo(e){for(;e===Jr;)Jr=Qt[--Kt],Qt[Kt]=null,qr=Qt[--Kt],Qt[Kt]=null;for(;e===jt;)jt=xe[--Ee],xe[Ee]=null,Ke=xe[--Ee],xe[Ee]=null,Qe=xe[--Ee],xe[Ee]=null}var we=null,ye=null,U=!1,Oe=null;function ma(e,t){var n=Ce(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.del
|
||
|
Error generating stack: `+i.message+`
|
||
|
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function bl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ii(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var _d=typeof WeakMap=="function"?WeakMap:Map;function Va(e,t,n){n=Ye(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ol||(ol=!0,Ki=r),Ii(e,t)},n}function Ba(e,t,n){n=Ye(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Ii(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ii(e,t),typeof r!="function"&&(dt===null?dt=new Set([this]):dt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Fu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new _d;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Id.bind(null,e,t,n),t.then(e,e))}function Uu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function $u(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ye(-1,1),t.tag=2,ft(n,t,1))),n.lanes|=1),e)}var xd=qe.ReactCurrentOwner,de=!1;function oe(e,t,n,r){t.child=e===null?ya(t,null,n,r):on(t,e.child,n,r)}function Au(e,t,n,r,l){n=n.render;var i=t.ref;return en(t,l),r=Lo(e,t,n,r,i,l),n=jo(),e!==null&&!de?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Je(e,t,l)):(U&&n&&go(t),t.flags|=1,oe(e,t,r,l),t.child)}function Vu(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Vo(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Wa(e,t,i,r,l)):(e=Fr(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Kn,n(o,r)&&e.ref===t.ref)return Je(e,t,l)}return t.flags|=1,e=mt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Wa(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(Kn(i,r)&&e.ref===t.ref)if(de=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(de=!0);else return t.lanes=e.lanes,Je(e,t,l)}return Fi(e,t,n,r,l)}function Ha(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},M(Gt,ve),ve|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,M(Gt,ve),ve|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,M(Gt,ve),ve|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,M(Gt,ve),ve|=r;return oe(e,t,l,n),t.child}function Qa(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Fi(e,t,n,r,l){var i=me(n)?Lt:ie.current;return i=rn(t,i),en(t,l),n=Lo(e,t,n,r,i,l),r=jo(),e!==null&&!de?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Je(e,t,l)):(U&&r&&go(t),t.flags|=1,oe(e,t,n,l),t.child)}function Bu(e,t,n,r,l){if(me(n)){var i=!0;Zr(t)}else i=!1;if(en(t,l),t.stateNode===null)Mr(e,t),Aa(t,n,r),Di(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,a=n.contextType;typeof a=="object"&&a!==null?a=Pe(a):(a=me(n)?Lt:ie.current,a=rn(t,a));var h=n.getDerivedStateFromProps,m=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";m||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||s!==a)&&Iu(t,o,r,a),tt=!1;var p=t.memoizedState;o.state=p,tl(t,r,o,l),s=t.memoizedState,u!==r||p!==s||pe.current||tt?(typeof h=="function"&&(Mi(t,n,h,r),s=t.memoizedState),(u=tt||Du(t,n,u,r,p,s,a))?(m||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.compon
|
||
|
${e.stack}`:r}let cl=0;const $r=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Jd=typeof $r.encodeInto=="function"?function(e,t){return $r.encodeInto(e,t)}:function(e,t){const n=$r.encode(e);return t.set(n),{read:e.length,written:n.length}};function vc(e,t,n){if(n===void 0){const u=$r.encode(e),s=t(u.length,1)>>>0;return Ur().subarray(s,s+u.length).set(u),cl=u.length,s}let r=e.length,l=t(r,1)>>>0;const i=Ur();let o=0;for(;o<r;o++){const u=e.charCodeAt(o);if(u>127)break;i[l+o]=u}if(o!==r){o!==0&&(e=e.slice(o)),l=n(l,r,r=o+e.length*3,1)>>>0;const u=Ur().subarray(l+o,l+r),s=Jd(e,u);o+=s.written,l=n(l,r,o,1)>>>0}return cl=o,l}let Et=null;function fl(){return(Et===null||Et.buffer.detached===!0||Et.buffer.detached===void 0&&Et.buffer!==b.memory.buffer)&&(Et=new DataView(b.memory.buffer)),Et}function qd(e){try{const r=b.__wbindgen_add_to_stack_pointer(-16),l=vc(e,b.__wbindgen_malloc,b.__wbindgen_realloc),i=cl;b.unitdc_input(r,l,i);var t=fl().getInt32(r+4*0,!0),n=fl().getInt32(r+4*1,!0);if(n)throw Pn(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}function bd(e){b.unitdc_init(nt(e))}function ep(e,t){try{return e.apply(this,t)}catch(n){b.__wbindgen_exn_store(nt(n))}}async function tp(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function np(){const e={};return e.wbg={},e.wbg.__wbindgen_object_drop_ref=function(t){Pn(t)},e.wbg.__wbindgen_string_new=function(t,n){const r=ns(t,n);return nt(r)},e.wbg.__wbg_debug_5a33c41aeac15ee6=function(t){console.debug(ce(t))},e.wbg.__wbg_error_09480e4aadca50ad=function(t){console.error(ce(t))},e.wbg.__wbg_info_c261acb2deacd903=function(t){console.info(ce(t))},e.wbg.__wbg_log_b103404cc5920657=function(t){console.log(ce(t))},e.wbg.__wbg_warn_2b3adb99ce26c314=function(t){console.warn(ce(t))},e.wbg.__wbindgen_number_new=function(t){return nt(t)},e.wbg.__wbindgen_object_clone_ref=function(t){const n=ce(t);return nt(n)},e.wbg.__wbg_set_841ac57cff3d672b=function(t,n,r){ce(t)[Pn(n)]=Pn(r)},e.wbg.__wbg_new_a220cf903aa02ca2=function(){const t=new Array;return nt(t)},e.wbg.__wbg_new_525245e2b9901204=function(){const t=new Object;return nt(t)},e.wbg.__wbg_set_673dda6c73d19609=function(t,n,r){ce(t)[n>>>0]=Pn(r)},e.wbg.__wbg_call_c6fe275aaa60da79=function(){return ep(function(t,n,r,l){const i=ce(t).call(ce(n),ce(r),ce(l));return nt(i)},arguments)},e.wbg.__wbindgen_debug_string=function(t,n){const r=Zi(ce(n)),l=vc(r,b.__wbindgen_malloc,b.__wbindgen_realloc),i=cl;fl().setInt32(t+4*1,i,!0),fl().setInt32(t+4*0,l,!0)},e.wbg.__wbindgen_throw=function(t,n){throw new Error(ns(t,n))},e}function rp(e,t){return b=e.exports,yc.__wbindgen_wasm_module=t,Et=null,zn=null,b.__wbindgen_start(),b}async function yc(e){if(b!==void 0)return b;typeof e<"u"&&Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead"),typeof e>"u"&&(e=new URL(""+new URL("unitdc_web_bg-ad9bd580.wasm",import.meta.url).href,self.location));const t=np();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await tp(await e,t);return rp(n,r)}function lp(e){return N.jsxs("div",{className:"unitdc-io error",children:[N.jsx("label",{className:"prompt",children:"Error:"}),N.jsx("div",{className:"error-text",children:e.text})]})}function ip(e){return N.jsxs("div",{className:"unitdc-io output",children:[N.jsx("la
|
||
|
`)})]})}function op(){const[e,t]=ge.useState(0);return()=>t(()=>e+1)}function up(e,t){switch(t.type){case"add":return[...e,t.cell];case"updateText":const n=[...e];return n[t.index].text=t.text,n;default:throw new Error}}function sp(){const[e,t]=ge.useReducer(up,[]),[n,r]=ge.useState(!1),[l,i]=ge.useState(""),o=op(),u=p=>{p.forEach(v=>{t({type:"add",cell:v})})},s=()=>e.filter(p=>p.type==="input").slice(-1)[0],a=(p,v)=>{let w=s();l!=v&&(w.text+=" "),v==="unit"&&(p="("+p+")"),w.text+=p,i(v),o()},h=(p,v)=>{p==="quantity"?u([{type:"output",quantity:[v]}]):p==="quantity_list"?u([{type:"output",quantity:v}]):p==="message"&&u([{type:"message",text:v}])},m=()=>{let p=!1,v=s().text;console.log("submit",v);try{qd(v),p=!0}catch(w){u([{type:"error",text:w.toString()}])}u([{type:"input",text:p?"":v}])};return n||(r(!0),yc().then(()=>{bd(h),u([{type:"input",text:""}])}).catch(p=>{u([{type:"error",text:p.toString()}])})),N.jsxs(N.Fragment,{children:[N.jsxs("div",{className:"unitdc-container",children:[N.jsxs("h1",{style:{whiteSpace:"nowrap"},children:["UnitDC",N.jsx("span",{style:{fontStyle:"italic",fontWeight:"lighter",fontSize:"smaller"},id:"unitdc-description",children:"Unit-aware Desk Calculator"})]}),N.jsx("div",{id:"unitdc-dialog",children:e.map((p,v)=>{switch(p.type){case"output":return N.jsx(ip,{quantities:p.quantity},v);case"input":return N.jsx(Gd,{number:v,text:p.text,active:v==e.length-1,onchange:w=>{console.log("onchange",w),t({type:"updateText",index:v,text:w})},onsubmit:m},v);case"error":return N.jsx(lp,{text:p.text},v);case"message":return N.jsx("pre",{children:p.text},v)}})}),N.jsx("div",{className:"unitdc-keyboard-spacer"})]}),N.jsx(Xd,{onToken:a,onUiAction:p=>{switch(p){case"append_space":s().text+=" ",o();break;case"append_newline":s().text+=`
|
||
|
`,o();break;case"clear":s().text="",o();break;case"backspace":s().text=s().text.slice(0,-1),o();break;case"submit":m();break}}})]})}ri.createRoot(document.getElementById("root")).render(N.jsx(Dc.StrictMode,{children:N.jsx(sp,{})}));
|