diff --git a/bin/solid.pill b/bin/solid.pill index 13883ce068..3945f71608 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:feaae0eece54db3e92122263706c283674af581d14ffde8a29fb24e1873a35b1 -size 6453015 +oid sha256:c2ab6607450382e0ec80c7264dad2c72d69672eaf861eb1c24cde5a76921c6a3 +size 9972490 diff --git a/flake.nix b/flake.nix index 5f11eca88f..c1b65efed6 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ flake-utils.url = "github:numtide/flake-utils"; tools = { flake = false; - url = "github:urbit/tools"; + url = "github:urbit/tools/d454e2482c3d4820d37db6d5625a6d40db975864"; }; }; diff --git a/nix/test-fake-ship.nix b/nix/test-fake-ship.nix index 3a9a92a880..26f5d68bd4 100644 --- a/nix/test-fake-ship.nix +++ b/nix/test-fake-ship.nix @@ -28,17 +28,6 @@ let -- ''; - testThread = dojoCommand: - pkgs.writeTextFile { - name = "${dojoCommand}.hoon"; - text = '' - ${poke} - =/ m (strand ,vase) - ;< [=ship =desk =case] bind:m get-beak - ;< ok=? bind:m (poke [ship %dojo] %lens-command !>([%$ [%dojo '${dojoCommand}'] [%stdout ~]])) - (pure:m !>(ok)) - ''; - }; appThread = generator: app: pkgs.writeTextFile { name = ":${app}|${generator}.hoon"; @@ -87,11 +76,12 @@ in pkgs.stdenvNoCC.mkDerivation { sleep 2 - ${click} -k -p -i ${testThread "-test %/tests ~"} ./pier + ${click} -c ./pier "[0 %fyrd [%base %test %noun %noun 0]]" ${click} -k -p -i ${pokeApp "%agents" "noun" "test"} ./pier ${click} -k -p -i ${pokeApp "%generators" "noun" "test"} ./pier ${click} -k -p -i ${pokeApp "%marks" "noun" "test"} ./pier + ${click} -k -p -i ${pokeApp "%threads" "noun" "test"} ./pier ${click} -k -p -i ${appThread "mass" "hood"} ./pier sleep 2 @@ -112,7 +102,7 @@ in pkgs.stdenvNoCC.mkDerivation { ''; checkPhase = '' - if egrep "((FAILED|CRASHED|Failed)|warn:)" $out >/dev/null; then + if egrep "((FAILED|CRASHED|Failed|\[0 %avow 0 %noun 1\])|warn:)" $out >/dev/null; then exit 1 fi ''; diff --git a/pkg/arvo/app/aqua.hoon b/pkg/arvo/app/aqua.hoon index 9022afc4e4..f083f15225 100644 --- a/pkg/arvo/app/aqua.hoon +++ b/pkg/arvo/app/aqua.hoon @@ -85,7 +85,7 @@ =^ cards state ?+ mark ~|([%aqua-bad-mark mark] !!) %aqua-events (poke-aqua-events:ac !<((list aqua-event) vase)) - %pill (poke-pill:ac !<(pill vase)) + %pill (poke-pill:ac !<(pill vase)) %noun (poke-noun:ac !<(* vase)) %azimuth-action (poke-azimuth-action:ac !<(azimuth-action vase)) == @@ -663,34 +663,55 @@ (pe ~bud) :: XX why ~bud? need an example :: %read - ?~ pier=(~(get by ships.piers) from.ae) - (pe from.ae) + ?~ pier=(~(get by ships.piers) ship.from.ae) + (pe ship.from.ae) =/ cash (~(get by namespace.u.pier) path.ae) |- ?^ cash ?: (gth num.ae (lent u.cash)) - (pe from.ae) + (pe ship.from.ae) ::TODO depends on /ted/aqua/ames behavior in a weird indirect way - =/ for=@p `@`(tail for.ae) ::NOTE moons & comets not supported - =; task=task-arvo - ^$(ae [%event for /a/aqua/fine-response task], thus this) - :+ %hear `lane:ames`[%| `@`from.ae] + =/ for=@p `@`(tail lane.for.ae) ::NOTE moons & comets not supported + %- push-events:(pe for) + %- flop =< events + %+ roll u.cash + |= [=yowl:ames i=@ud events=(list unix-event)] + :- +(i) + :_ events + :- /a/aqua/fine-response/[(scot %ud i)] + ^- task-arvo + :+ %hear `lane:ames`[%| `@`ship.from.ae] ^- blob:ames - =/ =shot:ames - ::NOTE dec is important! so dumb!! - (sift-shot:ames `@`(snag (dec num.ae) u.cash)) - ::TODO runtime needs to update rcvr field also - ::NOTE rcvr life is allowed to be wrong - (etch-shot:ames shot(sndr from.ae, rcvr for)) + %- etch-shot:ames + :* [sndr=ship.from.ae rcvr=for] + req=| sam=| + sndr-tick=life.from.ae + rcvr-tick=life.for.ae + origin=~ + content=`@ux`yowl + == + :: =/ pacs=(unit (list yowl:ames)) + =/ =path [%fine %hunk (scot %ud num.ae) '512' path.ae] %+ biff - (peek-once:(pe from.ae) %ax %$ [%fine %message path.ae]) + (peek-once:(pe ship.from.ae) %ax %$ path) (soft (list yowl:ames)) - ?~ pacs (pe from.ae) + ?~ pacs (pe ship.from.ae) + =. u.pacs + :: add request to each response packet payload + :: + =+ pat=(spat path.ae) + =+ wid=(met 3 pat) + %- flop =< blobs + %+ roll u.pacs + |= [=yowl:ames num=_1 blobs=(list @ux)] + :- +(num) + :_ blobs + (can 3 4^num 2^wid wid^`@`pat (met 3 yowl)^yowl ~) =. namespace.u.pier (~(put by namespace.u.pier) path.ae u.pacs) =. ships.piers - (~(put by ships.piers) from.ae u.pier) + (~(put by ships.piers) ship.from.ae u.pier) $(cash pacs, thus this) :: %event diff --git a/pkg/arvo/app/dbug.hoon b/pkg/arvo/app/dbug.hoon index cc993c9074..af2f90ee74 100644 --- a/pkg/arvo/app/dbug.hoon +++ b/pkg/arvo/app/dbug.hoon @@ -42,8 +42,8 @@ ++ on-poke |= [=mark =vase] ^- (quip card _this) + ?> =(our src):bowl ?: ?=(%noun mark) - ?> (team:title [our src]:bowl) =/ code !<((unit @t) vase) =/ msg=tape ?~ code @@ -55,6 +55,13 @@ """ %- (slog leaf+msg ~) [~ this(passcode code)] + ?: ?=(%json mark) + =/ jon=json !<(json vase) + =, dejs:format + =/ cmd + ((of clear-eyre-cache+(ot url+so ~) ~) jon) + ?> ?=(%clear-eyre-cache -.cmd) + [[%pass /cmd %arvo %e %set-response +.cmd ~]~ this] ?. ?=(%handle-http-request mark) (on-poke:def mark vase) =+ !<([eyre-id=@ta =inbound-request:eyre] vase) @@ -315,6 +322,19 @@ :~ 'location'^s+(cat 3 (fall site '*') (spat path)) 'action'^(render-action:v-eyre action) == + :: + :: /eyre/cache.json + :: + [%eyre %cache ~] + %- some + :- %a + %+ turn (sort ~(tap by cache:v-eyre) aor) + |= [url=@t aeon=@ud val=(unit cache-entry:eyre)] + %- pairs + :~ 'url'^s+url + 'aeon'^(numb aeon) + 'val'^?~(val ~ (render-cache-entry:v-eyre u.val)) + == :: :: /eyre/connections.json :: @@ -566,7 +586,6 @@ %- pairs :~ 'messages'^(numb (lent messages)) 'packets'^(numb ~(wyt in packets)) - 'heeds'^(set-array heeds from-duct) 'keens'^(set-array ~(key by keens) path) == :: @@ -630,7 +649,6 @@ :: }, ...], :: closing: [bone, ..., bone], :: corked: [bone, ..., bone], - :: heeds: [['/paths', ...] ...] :: scries: :: -> { =path :: keen-state: { @@ -757,8 +775,6 @@ 'closing'^(set-array closing numb) :: 'corked'^(set-array corked numb) - :: - 'heeds'^(set-array heeds from-duct) :: 'scries'^(scries ~(tap by keens)) == @@ -773,7 +789,7 @@ 'next'^(numb next) :: :- 'unsent-messages' :: as byte sizes - (set-array unsent-messages (cork (cury met 3) numb)) + (set-array unsent-messages (cork jam (cork (cury met 3) numb))) :: 'unsent-fragments'^(numb (lent unsent-fragments)) :: as lent :: @@ -1038,6 +1054,9 @@ ++ bindings (scry ,(list [=binding =duct =action]) %e %bindings ~) :: + ++ cache + (scry ,(map url=@t [aeon=@ud (unit cache-entry)]) %e %cache ~) + :: ++ connections (scry ,(map duct outstanding-connection) %e %connections ~) :: @@ -1065,6 +1084,27 @@ %gen :((cury cat 3) '+' (spat [desk path]:generator.action)) %app (cat 3 ':' app.action) == + :: + ++ render-cache-entry + |= cache-entry + ^- json + %- pairs:enjs:format + :~ 'auth'^b+auth + 'payload'^(render-simple-payload simple-payload.body) + == + :: + ++ render-simple-payload + |= simple-payload:http + ^- json + =, enjs:format + %- pairs + :~ 'status'^(numb status-code.response-header) + 'data'^?~(data ~ (numb p.u.data)) + :: + :+ 'headers' %a + %+ turn headers.response-header + |=([k=@t v=@t] (pairs 'key'^s+k 'value'^s+v ~)) + == -- :: :: helpers diff --git a/pkg/arvo/app/debug/FileSystemWritableFileStream.js b/pkg/arvo/app/debug/FileSystemWritableFileStream.js new file mode 100644 index 0000000000..4b39ed22b6 --- /dev/null +++ b/pkg/arvo/app/debug/FileSystemWritableFileStream.js @@ -0,0 +1 @@ +const _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:e=>`Symbol(${e})`;function tt(){}function zr(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}const Wt=zr();function B(e){return typeof e=="object"&&e!==null||typeof e=="function"}const Nt=tt,rt=Promise,Fr=Promise.prototype.then,Dr=Promise.resolve.bind(rt),Lr=Promise.reject.bind(rt);function w(e){return new rt(e)}function b(e){return Dr(e)}function l(e){return Lr(e)}function O(e,t,r){return Fr.call(e,t,r)}function T(e,t,r){O(O(e,t,r),void 0,Nt)}function Ve(e,t){T(e,t)}function nt(e,t){T(e,void 0,t)}function we(e,t,r){return O(e,t,r)}function ue(e){O(e,void 0,Nt)}const We=(()=>{const e=Wt&&Wt.queueMicrotask;if(typeof e=="function")return e;const t=b(void 0);return r=>O(t,r)})();function it(e,t,r){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function de(e,t,r){try{return b(it(e,t,r))}catch(n){return l(n)}}const Tt=16384;class W{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const r=this._back;let n=r;r._elements.length===Tt-1&&(n={_elements:[],_next:void 0}),r._elements.push(t),n!==r&&(this._back=n,r._next=n),++this._size}shift(){const t=this._front;let r=t;const n=this._cursor;let i=n+1;const a=t._elements,o=a[n];return i===Tt&&(r=t._next,i=0),--this._size,this._cursor=i,t!==r&&(this._front=r),a[n]=void 0,o}forEach(t){let r=this._cursor,n=this._front,i=n._elements;for(;(r!==i.length||n._next!==void 0)&&!(r===i.length&&(n=n._next,i=n._elements,r=0,i.length===0));)t(i[r]),++r}peek(){const t=this._front,r=this._cursor;return t._elements[r]}}function Ut(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?ot(e):t._state==="closed"?$r(e):Yt(e,t._storedError)}function at(e,t){const r=e._ownerReadableStream;return E(r,t)}function k(e){e._ownerReadableStream._state==="readable"?st(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Mr(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function ee(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function ot(e){e._closedPromise=w((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}function Yt(e,t){ot(e),st(e,t)}function $r(e){ot(e),Vt(e)}function st(e,t){e._closedPromise_reject!==void 0&&(ue(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Mr(e,t){Yt(e,t)}function Vt(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const Gt=_("[[AbortSteps]]"),Qt=_("[[ErrorSteps]]"),lt=_("[[CancelSteps]]"),ut=_("[[PullSteps]]"),vt=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Nr=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Ur(e){return typeof e=="object"||typeof e=="function"}function X(e,t){if(e!==void 0&&!Ur(e))throw new TypeError(`${t} is not an object.`)}function L(e,t){if(typeof e!="function")throw new TypeError(`${t} is not a function.`)}function Yr(e){return typeof e=="object"&&e!==null||typeof e=="function"}function Ht(e,t){if(!Yr(e))throw new TypeError(`${t} is not an object.`)}function G(e,t,r){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function At(e,t,r){if(e===void 0)throw new TypeError(`${t} is required in '${r}'.`)}function Xt(e){return Number(e)}function Zt(e){return e===0?0:e}function Vr(e){return Zt(Nr(e))}function xt(e,t){const n=Number.MAX_SAFE_INTEGER;let i=Number(e);if(i=Zt(i),!vt(i))throw new TypeError(`${t} is not a finite number`);if(i=Vr(i),i<0||i>n)throw new TypeError(`${t} is outside the accepted range of 0 to ${n}, inclusive`);return!vt(i)||i===0?0:i}function dt(e,t){if(!z(e))throw new TypeError(`${t} is not a ReadableStream.`)}function te(e){return new ke(e)}function Jt(e,t){e._reader._readRequests.push(t)}function ft(e,t,r){const i=e._reader._readRequests.shift();r?i._closeSteps():i._chunkSteps(t)}function Oe(e){return e._reader._readRequests.length}function Kt(e){const t=e._reader;return!(t===void 0||!F(t))}class ke{constructor(t){if(G(t,1,"ReadableStreamDefaultReader"),dt(t,"First parameter"),D(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Ut(this,t),this._readRequests=new W}get closed(){return F(this)?this._closedPromise:l(me("closed"))}cancel(t=void 0){return F(this)?this._ownerReadableStream===void 0?l(ee("cancel")):at(this,t):l(me("cancel"))}read(){if(!F(this))return l(me("read"));if(this._ownerReadableStream===void 0)return l(ee("read from"));let t,r;const n=w((a,o)=>{t=a,r=o});return fe(this,{_chunkSteps:a=>t({value:a,done:!1}),_closeSteps:()=>t({value:void 0,done:!0}),_errorSteps:a=>r(a)}),n}releaseLock(){if(!F(this))throw me("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");k(this)}}}Object.defineProperties(ke.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(ke.prototype,_.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function F(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof ke}function fe(e,t){const r=e._ownerReadableStream;r._disturbed=!0,r._state==="closed"?t._closeSteps():r._state==="errored"?t._errorSteps(r._storedError):r._readableStreamController[ut](t)}function me(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}const Bt=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class er{constructor(t,r){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=t,this._preventCancel=r}next(){const t=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?we(this._ongoingPromise,t,t):t(),this._ongoingPromise}return(t){const r=()=>this._returnSteps(t);return this._ongoingPromise?we(this._ongoingPromise,r,r):r()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const t=this._reader;if(t._ownerReadableStream===void 0)return l(ee("iterate"));let r,n;const i=w((o,s)=>{r=o,n=s});return fe(t,{_chunkSteps:o=>{this._ongoingPromise=void 0,We(()=>r({value:o,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,k(t),r({value:void 0,done:!0})},_errorSteps:o=>{this._ongoingPromise=void 0,this._isFinished=!0,k(t),n(o)}}),i}_returnSteps(t){if(this._isFinished)return Promise.resolve({value:t,done:!0});this._isFinished=!0;const r=this._reader;if(r._ownerReadableStream===void 0)return l(ee("finish iterating"));if(!this._preventCancel){const n=at(r,t);return k(r),we(n,()=>({value:t,done:!0}))}return k(r),b({value:t,done:!0})}}const tr={next(){return Ot(this)?this._asyncIteratorImpl.next():l(kt("next"))},return(e){return Ot(this)?this._asyncIteratorImpl.return(e):l(kt("return"))}};Bt!==void 0&&Object.setPrototypeOf(tr,Bt);function Gr(e,t){const r=te(e),n=new er(r,t),i=Object.create(tr);return i._asyncIteratorImpl=n,i}function Ot(e){if(!B(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof er}catch{return!1}}function kt(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}const rr=Number.isNaN||function(e){return e!==e};function oe(e){return e.slice()}function nr(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function Te(e){return!1}function ir(e,t,r){if(e.slice)return e.slice(t,r);const n=r-t,i=new ArrayBuffer(n);return nr(i,0,e,t,n),i}function Qr(e){return!(typeof e!="number"||rr(e)||e<0)}function It(e){const t=ir(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function ct(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function bt(e,t,r){if(!Qr(r)||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function Hr(e){return e._queue.peek().value}function $(e){e._queue=new W,e._queueTotalSize=0}class Ie{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Ge(this))throw Qe("view");return this._view}respond(t){if(!Ge(this))throw Qe("respond");if(G(t,1,"respond"),t=xt(t,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Te(this._view.buffer),qe(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!Ge(this))throw Qe("respondWithNewView");if(G(t,1,"respondWithNewView"),!ArrayBuffer.isView(t))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Te(t.buffer),Ee(this._associatedReadableByteStreamController,t)}}Object.defineProperties(Ie.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(Ie.prototype,_.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class ce{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Y(this))throw ne("byobRequest");return Ze(this)}get desiredSize(){if(!Y(this))throw ne("desiredSize");return cr(this)}close(){if(!Y(this))throw ne("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const t=this._controlledReadableByteStream._state;if(t!=="readable")throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`);ie(this)}enqueue(t){if(!Y(this))throw ne("enqueue");if(G(t,1,"enqueue"),!ArrayBuffer.isView(t))throw new TypeError("chunk must be an array buffer view");if(t.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(t.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const r=this._controlledReadableByteStream._state;if(r!=="readable")throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be enqueued to`);Pe(this,t)}error(t=void 0){if(!Y(this))throw ne("error");q(this,t)}[lt](t){ar(this),$(this);const r=this._cancelAlgorithm(t);return je(this),r}[ut](t){const r=this._controlledReadableByteStream;if(this._queueTotalSize>0){const i=this._queue.shift();this._queueTotalSize-=i.byteLength,ur(this);const a=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);t._chunkSteps(a);return}const n=this._autoAllocateChunkSize;if(n!==void 0){let i;try{i=new ArrayBuffer(n)}catch(o){t._errorSteps(o);return}const a={buffer:i,bufferByteLength:n,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}Jt(r,t),Z(this)}}Object.defineProperties(ce.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(ce.prototype,_.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Y(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof ce}function Ge(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof Ie}function Z(e){if(!Jr(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const r=e._pullAlgorithm();T(r,()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Z(e))},n=>{q(e,n)})}function ar(e){_t(e),e._pendingPullIntos=new W}function ht(e,t){let r=!1;e._state==="closed"&&(r=!0);const n=or(t);t.readerType==="default"?ft(e,n,r):tn(e,n,r)}function or(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Ce(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function sr(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r;let s=i,u=!1;o>n&&(s=o-t.bytesFilled,u=!0);const f=e._queue;for(;s>0;){const p=f.peek(),S=Math.min(s,p.byteLength),C=t.byteOffset+t.bytesFilled;nr(t.buffer,C,p.buffer,p.byteOffset,S),p.byteLength===S?f.shift():(p.byteOffset+=S,p.byteLength-=S),e._queueTotalSize-=S,lr(e,S,t),s-=S}return u}function lr(e,t,r){r.bytesFilled+=t}function ur(e){e._queueTotalSize===0&&e._closeRequested?(je(e),he(e._controlledReadableByteStream)):Z(e)}function _t(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function dr(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;const t=e._pendingPullIntos.peek();sr(e,t)&&(mt(e),ht(e._controlledReadableByteStream,t))}}function Xr(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const a=t.constructor,o=t.buffer,s={buffer:o,bufferByteLength:o.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(s),jt(n,r);return}if(n._state==="closed"){const u=new a(s.buffer,s.byteOffset,0);r._closeSteps(u);return}if(e._queueTotalSize>0){if(sr(e,s)){const u=or(s);ur(e),r._chunkSteps(u);return}if(e._closeRequested){const u=new TypeError("Insufficient bytes to fill elements in the given buffer");q(e,u),r._errorSteps(u);return}}e._pendingPullIntos.push(s),jt(n,r),Z(e)}function Zr(e,t){const r=e._controlledReadableByteStream;if(pt(r))for(;_r(r)>0;){const n=mt(e);ht(r,n)}}function xr(e,t,r){if(lr(e,t,r),r.bytesFilled0){const i=r.byteOffset+r.bytesFilled,a=ir(r.buffer,i-n,i);Ce(e,a,0,a.byteLength)}r.bytesFilled-=n,ht(e._controlledReadableByteStream,r),dr(e)}function fr(e,t){const r=e._pendingPullIntos.peek();_t(e),e._controlledReadableByteStream._state==="closed"?Zr(e):xr(e,t,r),Z(e)}function mt(e){return e._pendingPullIntos.shift()}function Jr(e){const t=e._controlledReadableByteStream;return t._state!=="readable"||e._closeRequested||!e._started?!1:!!(Kt(t)&&Oe(t)>0||pt(t)&&_r(t)>0||cr(e)>0)}function je(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function ie(e){const t=e._controlledReadableByteStream;if(!(e._closeRequested||t._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){const n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw q(e,n),n}je(e),he(t)}}function Pe(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||r._state!=="readable")return;const n=t.buffer,i=t.byteOffset,a=t.byteLength,o=n;if(e._pendingPullIntos.length>0){const s=e._pendingPullIntos.peek();Te(s.buffer),s.buffer=s.buffer}if(_t(e),Kt(r))if(Oe(r)===0)Ce(e,o,i,a);else{const s=new Uint8Array(o,i,a);ft(r,s,!1)}else pt(r)?(Ce(e,o,i,a),dr(e)):Ce(e,o,i,a);Z(e)}function q(e,t){const r=e._controlledReadableByteStream;r._state==="readable"&&(ar(e),$(e),je(e),jr(r,t))}function Ze(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(Ie.prototype);en(n,e,r),e._byobRequest=n}return e._byobRequest}function cr(e){const t=e._controlledReadableByteStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function qe(e,t){const r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=r.buffer,fr(e,t)}function Ee(e,t){const r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");r.buffer=t.buffer,fr(e,t.byteLength)}function br(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,$(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=new W,e._readableStreamController=t;const s=r();T(b(s),()=>{t._started=!0,Z(t)},u=>{q(t,u)})}function Kr(e,t,r){const n=Object.create(ce.prototype);let i=()=>{},a=()=>b(void 0),o=()=>b(void 0);t.start!==void 0&&(i=()=>t.start(n)),t.pull!==void 0&&(a=()=>t.pull(n)),t.cancel!==void 0&&(o=u=>t.cancel(u));const s=t.autoAllocateChunkSize;if(s===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");br(e,n,i,a,o,r,s)}function en(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Qe(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function ne(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function hr(e){return new ze(e)}function jt(e,t){e._reader._readIntoRequests.push(t)}function tn(e,t,r){const i=e._reader._readIntoRequests.shift();r?i._closeSteps(t):i._chunkSteps(t)}function _r(e){return e._reader._readIntoRequests.length}function pt(e){const t=e._reader;return!(t===void 0||!V(t))}class ze{constructor(t){if(G(t,1,"ReadableStreamBYOBReader"),dt(t,"First parameter"),D(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Y(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Ut(this,t),this._readIntoRequests=new W}get closed(){return V(this)?this._closedPromise:l(pe("closed"))}cancel(t=void 0){return V(this)?this._ownerReadableStream===void 0?l(ee("cancel")):at(this,t):l(pe("cancel"))}read(t){if(!V(this))return l(pe("read"));if(!ArrayBuffer.isView(t))return l(new TypeError("view must be an array buffer view"));if(t.byteLength===0)return l(new TypeError("view must have non-zero byteLength"));if(t.buffer.byteLength===0)return l(new TypeError("view's buffer must have non-zero byteLength"));if(Te(t.buffer),this._ownerReadableStream===void 0)return l(ee("read from"));let r,n;const i=w((o,s)=>{r=o,n=s});return mr(this,t,{_chunkSteps:o=>r({value:o,done:!1}),_closeSteps:o=>r({value:o,done:!0}),_errorSteps:o=>n(o)}),i}releaseLock(){if(!V(this))throw pe("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");k(this)}}}Object.defineProperties(ze.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(ze.prototype,_.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function V(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof ze}function mr(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,n._state==="errored"?r._errorSteps(n._storedError):Xr(n._readableStreamController,t,r)}function pe(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function xe(e,t){const{highWaterMark:r}=e;if(r===void 0)return t;if(rr(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function pr(e){const{size:t}=e;return t||(()=>1)}function yr(e,t){X(e,t);const r=e==null?void 0:e.highWaterMark,n=e==null?void 0:e.size;return{highWaterMark:r===void 0?void 0:Xt(r),size:n===void 0?void 0:rn(n,`${t} has member 'size' that`)}}function rn(e,t){return L(e,t),r=>Xt(e(r))}function nn(e,t){X(e,t);const r=e==null?void 0:e.abort,n=e==null?void 0:e.close,i=e==null?void 0:e.start,a=e==null?void 0:e.type,o=e==null?void 0:e.write;return{abort:r===void 0?void 0:an(r,e,`${t} has member 'abort' that`),close:n===void 0?void 0:on(n,e,`${t} has member 'close' that`),start:i===void 0?void 0:sn(i,e,`${t} has member 'start' that`),write:o===void 0?void 0:ln(o,e,`${t} has member 'write' that`),type:a}}function an(e,t,r){return L(e,r),n=>de(e,t,[n])}function on(e,t,r){return L(e,r),()=>de(e,t,[])}function sn(e,t,r){return L(e,r),n=>it(e,t,[n])}function ln(e,t,r){return L(e,r),(n,i)=>de(e,t,[n,i])}function Sr(e,t){if(!J(e))throw new TypeError(`${t} is not a WritableStream.`)}function un(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch{return!1}}const dn=typeof AbortController=="function";function fn(){if(dn)return new AbortController}class Fe{constructor(t={},r={}){t===void 0?t=null:Ht(t,"First parameter");const n=yr(r,"Second parameter"),i=nn(t,"First parameter");if(cn(this),i.type!==void 0)throw new RangeError("Invalid type is specified");const o=pr(n),s=xe(n,1);En(this,i,s,o)}get locked(){if(!J(this))throw Se("locked");return K(this)}abort(t=void 0){return J(this)?K(this)?l(new TypeError("Cannot abort a stream that already has a writer")):ve(this,t):l(Se("abort"))}close(){return J(this)?K(this)?l(new TypeError("Cannot close a stream that already has a writer")):A(this)?l(new TypeError("Cannot close an already-closing stream")):gr(this):l(Se("close"))}getWriter(){if(!J(this))throw Se("getWriter");return Rr(this)}}Object.defineProperties(Fe.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(Fe.prototype,_.toStringTag,{value:"WritableStream",configurable:!0});function Rr(e){return new De(e)}function cn(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new W,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function J(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof Fe}function K(e){return e._writer!==void 0}function ve(e,t){var r;if(e._state==="closed"||e._state==="errored")return b(void 0);e._writableStreamController._abortReason=t,(r=e._writableStreamController._abortController)===null||r===void 0||r.abort();const n=e._state;if(n==="closed"||n==="errored")return b(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let i=!1;n==="erroring"&&(i=!0,t=void 0);const a=w((o,s)=>{e._pendingAbortRequest={_promise:void 0,_resolve:o,_reject:s,_reason:t,_wasAlreadyErroring:i}});return e._pendingAbortRequest._promise=a,i||St(e,t),a}function gr(e){const t=e._state;if(t==="closed"||t==="errored")return l(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=w((i,a)=>{const o={_resolve:i,_reject:a};e._closeRequest=o}),n=e._writer;return n!==void 0&&e._backpressure&&t==="writable"&&Pt(n),Wn(e._writableStreamController),r}function bn(e){return w((r,n)=>{const i={_resolve:r,_reject:n};e._writeRequests.push(i)})}function yt(e,t){if(e._state==="writable"){St(e,t);return}Rt(e)}function St(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;n!==void 0&&Cr(n,t),!yn(e)&&r._started&&Rt(e)}function Rt(e){e._state="errored",e._writableStreamController[Qt]();const t=e._storedError;if(e._writeRequests.forEach(i=>{i._reject(t)}),e._writeRequests=new W,e._pendingAbortRequest===void 0){ye(e);return}const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring){r._reject(t),ye(e);return}const n=e._writableStreamController[Gt](r._reason);T(n,()=>{r._resolve(),ye(e)},i=>{r._reject(i),ye(e)})}function hn(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function _n(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,yt(e,t)}function mn(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const r=e._writer;r!==void 0&&Br(r)}function pn(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),yt(e,t)}function A(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function yn(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function Sn(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Rn(e){e._inFlightWriteRequest=e._writeRequests.shift()}function ye(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;t!==void 0&&Ct(t,e._storedError)}function gt(e,t){const r=e._writer;r!==void 0&&t!==e._backpressure&&(t?In(r):Pt(r)),e._backpressure=t}class De{constructor(t){if(G(t,1,"WritableStreamDefaultWriter"),Sr(t,"First parameter"),K(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;const r=t._state;if(r==="writable")!A(t)&&t._backpressure?Ne(this):zt(this),Ae(this);else if(r==="erroring")Je(this,t._storedError),Ae(this);else if(r==="closed")zt(this),On(this);else{const n=t._storedError;Je(this,n),Ar(this,n)}}get closed(){return M(this)?this._closedPromise:l(N("closed"))}get desiredSize(){if(!M(this))throw N("desiredSize");if(this._ownerWritableStream===void 0)throw ae("desiredSize");return Pn(this)}get ready(){return M(this)?this._readyPromise:l(N("ready"))}abort(t=void 0){return M(this)?this._ownerWritableStream===void 0?l(ae("abort")):gn(this,t):l(N("abort"))}close(){if(!M(this))return l(N("close"));const t=this._ownerWritableStream;return t===void 0?l(ae("close")):A(t)?l(new TypeError("Cannot close an already-closing stream")):wr(this)}releaseLock(){if(!M(this))throw N("releaseLock");this._ownerWritableStream!==void 0&&Pr(this)}write(t=void 0){return M(this)?this._ownerWritableStream===void 0?l(ae("write to")):qr(this,t):l(N("write"))}}Object.defineProperties(De.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(De.prototype,_.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function M(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof De}function gn(e,t){const r=e._ownerWritableStream;return ve(r,t)}function wr(e){const t=e._ownerWritableStream;return gr(t)}function wn(e){const t=e._ownerWritableStream,r=t._state;return A(t)||r==="closed"?b(void 0):r==="errored"?l(t._storedError):wr(e)}function Cn(e,t){e._closedPromiseState==="pending"?Ct(e,t):kn(e,t)}function Cr(e,t){e._readyPromiseState==="pending"?Or(e,t):jn(e,t)}function Pn(e){const t=e._ownerWritableStream,r=t._state;return r==="errored"||r==="erroring"?null:r==="closed"?0:Wr(t._writableStreamController)}function Pr(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Cr(e,r),Cn(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function qr(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=Tn(n,t);if(r!==e._ownerWritableStream)return l(ae("write to"));const a=r._state;if(a==="errored")return l(r._storedError);if(A(r)||a==="closed")return l(new TypeError("The stream is closing or closed and cannot be written to"));if(a==="erroring")return l(r._storedError);const o=bn(r);return vn(n,t,i),o}const Er={};class Le{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!He(this))throw Xe("abortReason");return this._abortReason}get signal(){if(!He(this))throw Xe("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(t=void 0){if(!He(this))throw Xe("error");this._controlledWritableStream._state==="writable"&&vr(this,t)}[Gt](t){const r=this._abortAlgorithm(t);return $e(this),r}[Qt](){$(this)}}Object.defineProperties(Le.prototype,{error:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(Le.prototype,_.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function He(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof Le}function qn(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,$(t),t._abortReason=void 0,t._abortController=fn(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;const u=wt(t);gt(e,u);const f=r(),p=b(f);T(p,()=>{t._started=!0,Me(t)},S=>{t._started=!0,yt(e,S)})}function En(e,t,r,n){const i=Object.create(Le.prototype);let a=()=>{},o=()=>b(void 0),s=()=>b(void 0),u=()=>b(void 0);t.start!==void 0&&(a=()=>t.start(i)),t.write!==void 0&&(o=f=>t.write(f,i)),t.close!==void 0&&(s=()=>t.close()),t.abort!==void 0&&(u=f=>t.abort(f)),qn(e,i,a,o,s,u,r,n)}function $e(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Wn(e){bt(e,Er,0),Me(e)}function Tn(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return Tr(e,r),1}}function Wr(e){return e._strategyHWM-e._queueTotalSize}function vn(e,t,r){try{bt(e,t,r)}catch(i){Tr(e,i);return}const n=e._controlledWritableStream;if(!A(n)&&n._state==="writable"){const i=wt(e);gt(n,i)}Me(e)}function Me(e){const t=e._controlledWritableStream;if(!e._started||t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring"){Rt(t);return}if(e._queue.length===0)return;const n=Hr(e);n===Er?An(e):Bn(e,n)}function Tr(e,t){e._controlledWritableStream._state==="writable"&&vr(e,t)}function An(e){const t=e._controlledWritableStream;Sn(t),ct(e);const r=e._closeAlgorithm();$e(e),T(r,()=>{mn(t)},n=>{pn(t,n)})}function Bn(e,t){const r=e._controlledWritableStream;Rn(r);const n=e._writeAlgorithm(t);T(n,()=>{hn(r);const i=r._state;if(ct(e),!A(r)&&i==="writable"){const a=wt(e);gt(r,a)}Me(e)},i=>{r._state==="writable"&&$e(e),_n(r,i)})}function wt(e){return Wr(e)<=0}function vr(e,t){const r=e._controlledWritableStream;$e(e),St(r,t)}function Se(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Xe(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function N(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function ae(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Ae(e){e._closedPromise=w((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function Ar(e,t){Ae(e),Ct(e,t)}function On(e){Ae(e),Br(e)}function Ct(e,t){e._closedPromise_reject!==void 0&&(ue(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function kn(e,t){Ar(e,t)}function Br(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function Ne(e){e._readyPromise=w((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function Je(e,t){Ne(e),Or(e,t)}function zt(e){Ne(e),Pt(e)}function Or(e,t){e._readyPromise_reject!==void 0&&(ue(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function In(e){Ne(e)}function jn(e,t){Je(e,t)}function Pt(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}const Ft=typeof DOMException<"u"?DOMException:void 0;function zn(e){if(!(typeof e=="function"||typeof e=="object"))return!1;try{return new e,!0}catch{return!1}}function Fn(){const e=function(r,n){this.message=r||"",this.name=n||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}const Dn=zn(Ft)?Ft:Fn();function Dt(e,t,r,n,i,a){const o=te(e),s=Rr(t);e._disturbed=!0;let u=!1,f=b(void 0);return w((p,S)=>{let C;if(a!==void 0){if(C=()=>{const d=new Dn("Aborted","AbortError"),c=[];n||c.push(()=>t._state==="writable"?ve(t,d):b(void 0)),i||c.push(()=>e._state==="readable"?E(e,d):b(void 0)),g(()=>Promise.all(c.map(y=>y())),!0,d)},a.aborted){C();return}a.addEventListener("abort",C)}function x(){return w((d,c)=>{function y(P){P?d():O(re(),y,c)}y(!1)})}function re(){return u?b(!0):O(s._readyPromise,()=>w((d,c)=>{fe(o,{_chunkSteps:y=>{f=O(qr(s,y),void 0,tt),d(!1)},_closeSteps:()=>d(!0),_errorSteps:c})}))}if(R(e,o._closedPromise,d=>{n?h(!0,d):g(()=>ve(t,d),!0,d)}),R(t,s._closedPromise,d=>{i?h(!0,d):g(()=>E(e,d),!0,d)}),v(e,o._closedPromise,()=>{r?h():g(()=>wn(s))}),A(t)||t._state==="closed"){const d=new TypeError("the destination writable stream closed before all data could be piped to it");i?h(!0,d):g(()=>E(e,d),!0,d)}ue(x());function I(){const d=f;return O(f,()=>d!==f?I():void 0)}function R(d,c,y){d._state==="errored"?y(d._storedError):nt(c,y)}function v(d,c,y){d._state==="closed"?y():Ve(c,y)}function g(d,c,y){if(u)return;u=!0,t._state==="writable"&&!A(t)?Ve(I(),P):P();function P(){T(d(),()=>m(c,y),j=>m(!0,j))}}function h(d,c){u||(u=!0,t._state==="writable"&&!A(t)?Ve(I(),()=>m(d,c)):m(d,c))}function m(d,c){Pr(s),k(o),a!==void 0&&a.removeEventListener("abort",C),d?S(c):p(void 0)}})}class be{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Re(this))throw ge("desiredSize");return kr(this)}close(){if(!Re(this))throw ge("close");if(!le(this))throw new TypeError("The stream is not in a state that permits close");Ke(this)}enqueue(t=void 0){if(!Re(this))throw ge("enqueue");if(!le(this))throw new TypeError("The stream is not in a state that permits enqueue");return et(this,t)}error(t=void 0){if(!Re(this))throw ge("error");Q(this,t)}[lt](t){$(this);const r=this._cancelAlgorithm(t);return Be(this),r}[ut](t){const r=this._controlledReadableStream;if(this._queue.length>0){const n=ct(this);this._closeRequested&&this._queue.length===0?(Be(this),he(r)):se(this),t._chunkSteps(n)}else Jt(r,t),se(this)}}Object.defineProperties(be.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(be.prototype,_.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Re(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof be}function se(e){if(!Ln(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;const r=e._pullAlgorithm();T(r,()=>{e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,se(e))},n=>{Q(e,n)})}function Ln(e){const t=e._controlledReadableStream;return!le(e)||!e._started?!1:!!(D(t)&&Oe(t)>0||kr(e)>0)}function Be(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ke(e){if(!le(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(Be(e),he(t))}function et(e,t){if(!le(e))return;const r=e._controlledReadableStream;if(D(r)&&Oe(r)>0)ft(r,t,!1);else{let n;try{n=e._strategySizeAlgorithm(t)}catch(i){throw Q(e,i),i}try{bt(e,t,n)}catch(i){throw Q(e,i),i}}se(e)}function Q(e,t){const r=e._controlledReadableStream;r._state==="readable"&&($(e),Be(e),jr(r,t))}function kr(e){const t=e._controlledReadableStream._state;return t==="errored"?null:t==="closed"?0:e._strategyHWM-e._queueTotalSize}function le(e){const t=e._controlledReadableStream._state;return!e._closeRequested&&t==="readable"}function Ir(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,$(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;const s=r();T(b(s),()=>{t._started=!0,se(t)},u=>{Q(t,u)})}function $n(e,t,r,n){const i=Object.create(be.prototype);let a=()=>{},o=()=>b(void 0),s=()=>b(void 0);t.start!==void 0&&(a=()=>t.start(i)),t.pull!==void 0&&(o=()=>t.pull(i)),t.cancel!==void 0&&(s=u=>t.cancel(u)),Ir(e,i,a,o,s,r,n)}function ge(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function Mn(e,t){return Y(e._readableStreamController)?Un(e):Nn(e)}function Nn(e,t){const r=te(e);let n=!1,i=!1,a=!1,o,s,u,f,p;const S=w(R=>{p=R});function C(){return n||(n=!0,fe(r,{_chunkSteps:v=>{We(()=>{n=!1;const g=v,h=v;i||et(u._readableStreamController,g),a||et(f._readableStreamController,h)})},_closeSteps:()=>{n=!1,i||Ke(u._readableStreamController),a||Ke(f._readableStreamController),(!i||!a)&&p(void 0)},_errorSteps:()=>{n=!1}})),b(void 0)}function x(R){if(i=!0,o=R,a){const v=oe([o,s]),g=E(e,v);p(g)}return S}function re(R){if(a=!0,s=R,i){const v=oe([o,s]),g=E(e,v);p(g)}return S}function I(){}return u=$t(I,C,x),f=$t(I,C,re),nt(r._closedPromise,R=>{Q(u._readableStreamController,R),Q(f._readableStreamController,R),(!i||!a)&&p(void 0)}),[u,f]}function Un(e){let t=te(e),r=!1,n=!1,i=!1,a,o,s,u,f;const p=w(h=>{f=h});function S(h){nt(h._closedPromise,m=>{h===t&&(q(s._readableStreamController,m),q(u._readableStreamController,m),(!n||!i)&&f(void 0))})}function C(){V(t)&&(k(t),t=te(e),S(t)),fe(t,{_chunkSteps:m=>{We(()=>{r=!1;const d=m;let c=m;if(!n&&!i)try{c=It(m)}catch(y){q(s._readableStreamController,y),q(u._readableStreamController,y),f(E(e,y));return}n||Pe(s._readableStreamController,d),i||Pe(u._readableStreamController,c)})},_closeSteps:()=>{r=!1,n||ie(s._readableStreamController),i||ie(u._readableStreamController),s._readableStreamController._pendingPullIntos.length>0&&qe(s._readableStreamController,0),u._readableStreamController._pendingPullIntos.length>0&&qe(u._readableStreamController,0),(!n||!i)&&f(void 0)},_errorSteps:()=>{r=!1}})}function x(h,m){F(t)&&(k(t),t=hr(e),S(t));const d=m?u:s,c=m?s:u;mr(t,h,{_chunkSteps:P=>{We(()=>{r=!1;const j=m?i:n;if(m?n:i)j||Ee(d._readableStreamController,P);else{let Et;try{Et=It(P)}catch(Ye){q(d._readableStreamController,Ye),q(c._readableStreamController,Ye),f(E(e,Ye));return}j||Ee(d._readableStreamController,P),Pe(c._readableStreamController,Et)}})},_closeSteps:P=>{r=!1;const j=m?i:n,_e=m?n:i;j||ie(d._readableStreamController),_e||ie(c._readableStreamController),P!==void 0&&(j||Ee(d._readableStreamController,P),!_e&&c._readableStreamController._pendingPullIntos.length>0&&qe(c._readableStreamController,0)),(!j||!_e)&&f(void 0)},_errorSteps:()=>{r=!1}})}function re(){if(r)return b(void 0);r=!0;const h=Ze(s._readableStreamController);return h===null?C():x(h._view,!1),b(void 0)}function I(){if(r)return b(void 0);r=!0;const h=Ze(u._readableStreamController);return h===null?C():x(h._view,!0),b(void 0)}function R(h){if(n=!0,a=h,i){const m=oe([a,o]),d=E(e,m);f(d)}return p}function v(h){if(i=!0,o=h,n){const m=oe([a,o]),d=E(e,m);f(d)}return p}function g(){}return s=Mt(g,re,R),u=Mt(g,I,v),S(t),[s,u]}function Yn(e,t){X(e,t);const r=e,n=r==null?void 0:r.autoAllocateChunkSize,i=r==null?void 0:r.cancel,a=r==null?void 0:r.pull,o=r==null?void 0:r.start,s=r==null?void 0:r.type;return{autoAllocateChunkSize:n===void 0?void 0:xt(n,`${t} has member 'autoAllocateChunkSize' that`),cancel:i===void 0?void 0:Vn(i,r,`${t} has member 'cancel' that`),pull:a===void 0?void 0:Gn(a,r,`${t} has member 'pull' that`),start:o===void 0?void 0:Qn(o,r,`${t} has member 'start' that`),type:s===void 0?void 0:Hn(s,`${t} has member 'type' that`)}}function Vn(e,t,r){return L(e,r),n=>de(e,t,[n])}function Gn(e,t,r){return L(e,r),n=>de(e,t,[n])}function Qn(e,t,r){return L(e,r),n=>it(e,t,[n])}function Hn(e,t){if(e=`${e}`,e!=="bytes")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function Xn(e,t){X(e,t);const r=e==null?void 0:e.mode;return{mode:r===void 0?void 0:Zn(r,`${t} has member 'mode' that`)}}function Zn(e,t){if(e=`${e}`,e!=="byob")throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function xn(e,t){return X(e,t),{preventCancel:!!(e==null?void 0:e.preventCancel)}}function Lt(e,t){X(e,t);const r=e==null?void 0:e.preventAbort,n=e==null?void 0:e.preventCancel,i=e==null?void 0:e.preventClose,a=e==null?void 0:e.signal;return a!==void 0&&Jn(a,`${t} has member 'signal' that`),{preventAbort:!!r,preventCancel:!!n,preventClose:!!i,signal:a}}function Jn(e,t){if(!un(e))throw new TypeError(`${t} is not an AbortSignal.`)}function Kn(e,t){X(e,t);const r=e==null?void 0:e.readable;At(r,"readable","ReadableWritablePair"),dt(r,`${t} has member 'readable' that`);const n=e==null?void 0:e.writable;return At(n,"writable","ReadableWritablePair"),Sr(n,`${t} has member 'writable' that`),{readable:r,writable:n}}class H{constructor(t={},r={}){t===void 0?t=null:Ht(t,"First parameter");const n=yr(r,"Second parameter"),i=Yn(t,"First parameter");if(qt(this),i.type==="bytes"){if(n.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");const a=xe(n,0);Kr(this,i,a)}else{const a=pr(n),o=xe(n,1);$n(this,i,o,a)}}get locked(){if(!z(this))throw U("locked");return D(this)}cancel(t=void 0){return z(this)?D(this)?l(new TypeError("Cannot cancel a stream that already has a reader")):E(this,t):l(U("cancel"))}getReader(t=void 0){if(!z(this))throw U("getReader");return Xn(t,"First parameter").mode===void 0?te(this):hr(this)}pipeThrough(t,r={}){if(!z(this))throw U("pipeThrough");G(t,1,"pipeThrough");const n=Kn(t,"First parameter"),i=Lt(r,"Second parameter");if(D(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(K(n.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");const a=Dt(this,n.writable,i.preventClose,i.preventAbort,i.preventCancel,i.signal);return ue(a),n.readable}pipeTo(t,r={}){if(!z(this))return l(U("pipeTo"));if(t===void 0)return l("Parameter 1 is required in 'pipeTo'.");if(!J(t))return l(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let n;try{n=Lt(r,"Second parameter")}catch(i){return l(i)}return D(this)?l(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):K(t)?l(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Dt(this,t,n.preventClose,n.preventAbort,n.preventCancel,n.signal)}tee(){if(!z(this))throw U("tee");const t=Mn(this);return oe(t)}values(t=void 0){if(!z(this))throw U("values");const r=xn(t,"First parameter");return Gr(this,r.preventCancel)}}Object.defineProperties(H.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}});typeof _.toStringTag=="symbol"&&Object.defineProperty(H.prototype,_.toStringTag,{value:"ReadableStream",configurable:!0});typeof _.asyncIterator=="symbol"&&Object.defineProperty(H.prototype,_.asyncIterator,{value:H.prototype.values,writable:!0,configurable:!0});function $t(e,t,r,n=1,i=()=>1){const a=Object.create(H.prototype);qt(a);const o=Object.create(be.prototype);return Ir(a,o,e,t,r,n,i),a}function Mt(e,t,r){const n=Object.create(H.prototype);qt(n);const i=Object.create(ce.prototype);return br(n,i,e,t,r,0,void 0),n}function qt(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function z(e){return!B(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof H}function D(e){return e._reader!==void 0}function E(e,t){if(e._disturbed=!0,e._state==="closed")return b(void 0);if(e._state==="errored")return l(e._storedError);he(e);const r=e._reader;r!==void 0&&V(r)&&(r._readIntoRequests.forEach(i=>{i._closeSteps(void 0)}),r._readIntoRequests=new W);const n=e._readableStreamController[lt](t);return we(n,tt)}function he(e){e._state="closed";const t=e._reader;t!==void 0&&(Vt(t),F(t)&&(t._readRequests.forEach(r=>{r._closeSteps()}),t._readRequests=new W))}function jr(e,t){e._state="errored",e._storedError=t;const r=e._reader;r!==void 0&&(st(r,t),F(r)?(r._readRequests.forEach(n=>{n._errorSteps(t)}),r._readRequests=new W):(r._readIntoRequests.forEach(n=>{n._errorSteps(t)}),r._readIntoRequests=new W))}function U(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}const ei=globalThis.WritableStream||Fe;class Ue extends ei{constructor(t,r){super(t,r),this._closed=!1,Object.setPrototypeOf(this,Ue.prototype)}close(){this._closed=!0;const t=this.getWriter(),r=t.close();return t.releaseLock(),r}seek(t){return this.write({type:"seek",position:t})}truncate(t){return this.write({type:"truncate",size:t})}write(t){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const r=this.getWriter(),n=r.write(t);return r.releaseLock(),n}}Object.defineProperty(Ue.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Ue.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});export{Ue as FileSystemWritableFileStream,Ue as default}; diff --git a/pkg/arvo/app/debug/js/channel.js b/pkg/arvo/app/debug/channel.js similarity index 100% rename from pkg/arvo/app/debug/js/channel.js rename to pkg/arvo/app/debug/channel.js diff --git a/pkg/arvo/app/debug/css/index.css b/pkg/arvo/app/debug/css/index.css deleted file mode 100644 index 1121ba3f85..0000000000 Binary files a/pkg/arvo/app/debug/css/index.css and /dev/null differ diff --git a/pkg/arvo/app/debug/index.css b/pkg/arvo/app/debug/index.css new file mode 100644 index 0000000000..0fbd4cbd8b Binary files /dev/null and b/pkg/arvo/app/debug/index.css differ diff --git a/pkg/arvo/app/debug/index.html b/pkg/arvo/app/debug/index.html index cc97475f1d..d73c21e603 100644 --- a/pkg/arvo/app/debug/index.html +++ b/pkg/arvo/app/debug/index.html @@ -1,20 +1,16 @@ - - - - Debug Dashboard - - - - - - - -
-
- - - - - + + + + + Debug Dashboard + + + + + +
+ + + diff --git a/pkg/arvo/app/debug/index.js b/pkg/arvo/app/debug/index.js new file mode 100644 index 0000000000..e7ae07abbb --- /dev/null +++ b/pkg/arvo/app/debug/index.js @@ -0,0 +1,125 @@ +var QT=Object.defineProperty;var KT=(e,t,n)=>t in e?QT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Uy=(e,t,n)=>(KT(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ZT(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Mw={exports:{}},ah={},kw={exports:{}},je={};/** + * @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 xu=Symbol.for("react.element"),XT=Symbol.for("react.portal"),JT=Symbol.for("react.fragment"),eb=Symbol.for("react.strict_mode"),tb=Symbol.for("react.profiler"),nb=Symbol.for("react.provider"),rb=Symbol.for("react.context"),ib=Symbol.for("react.forward_ref"),sb=Symbol.for("react.suspense"),ob=Symbol.for("react.memo"),ab=Symbol.for("react.lazy"),$y=Symbol.iterator;function lb(e){return e===null||typeof e!="object"?null:(e=$y&&e[$y]||e["@@iterator"],typeof e=="function"?e:null)}var Cw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ow=Object.assign,Ew={};function el(e,t,n){this.props=e,this.context=t,this.refs=Ew,this.updater=n||Cw}el.prototype.isReactComponent={};el.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")};el.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tw(){}Tw.prototype=el.prototype;function s0(e,t,n){this.props=e,this.context=t,this.refs=Ew,this.updater=n||Cw}var o0=s0.prototype=new Tw;o0.constructor=s0;Ow(o0,el.prototype);o0.isPureReactComponent=!0;var Wy=Array.isArray,bw=Object.prototype.hasOwnProperty,a0={current:null},Pw={key:!0,ref:!0,__self:!0,__source:!0};function Rw(e,t,n){var r,s={},a=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(a=""+t.key),t)bw.call(t,r)&&!Pw.hasOwnProperty(r)&&(s[r]=t[r]);var c=arguments.length-2;if(c===1)s.children=n;else if(1>>1,G=R[M];if(0>>1;Ms(re,h))yes(Me,re)?(R[M]=Me,R[ye]=h,M=ye):(R[M]=re,R[ae]=h,M=ae);else if(yes(Me,h))R[M]=Me,R[ye]=h,M=ye;else break e}}return _}function s(R,_){var h=R.sortIndex-_.sortIndex;return h!==0?h:R.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var p=[],v=[],m=1,O=null,E=3,F=!1,B=!1,Q=!1,me=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(R){for(var _=n(v);_!==null;){if(_.callback===null)r(v);else if(_.startTime<=R)r(v),_.sortIndex=_.expirationTime,t(p,_);else break;_=n(v)}}function H(R){if(Q=!1,I(R),!B)if(n(p)!==null)B=!0,b(X);else{var _=n(v);_!==null&&L(H,_.startTime-R)}}function X(R,_){B=!1,Q&&(Q=!1,N(J),J=-1),F=!0;var h=E;try{for(I(_),O=n(p);O!==null&&(!(O.expirationTime>_)||R&&!P());){var M=O.callback;if(typeof M=="function"){O.callback=null,E=O.priorityLevel;var G=M(O.expirationTime<=_);_=e.unstable_now(),typeof G=="function"?O.callback=G:O===n(p)&&r(p),I(_)}else r(p);O=n(p)}if(O!==null)var se=!0;else{var ae=n(v);ae!==null&&L(H,ae.startTime-_),se=!1}return se}finally{O=null,E=h,F=!1}}var te=!1,K=null,J=-1,le=5,fe=-1;function P(){return!(e.unstable_now()-feR||125M?(R.sortIndex=h,t(v,R),n(p)===null&&R===n(v)&&(Q?(N(J),J=-1):Q=!0,L(H,h-M))):(R.sortIndex=G,t(p,R),B||F||(B=!0,b(X))),R},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(R){var _=E;return function(){var h=E;E=_;try{return R.apply(this,arguments)}finally{E=h}}}})(jw);Lw.exports=jw;var wb=Lw.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 Nw=oe,wr=wb;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zp=Object.prototype.hasOwnProperty,_b=/^[: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]*$/,zy={},Hy={};function xb(e){return Zp.call(Hy,e)?!0:Zp.call(zy,e)?!1:_b.test(e)?Hy[e]=!0:(zy[e]=!0,!1)}function Sb(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 Mb(e,t,n,r){if(t===null||typeof t>"u"||Sb(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 Hn(e,t,n,r,s,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kn[e]=new Hn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kn[t]=new Hn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kn[e]=new Hn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kn[e]=new Hn(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){kn[e]=new Hn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kn[e]=new Hn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kn[e]=new Hn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kn[e]=new Hn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kn[e]=new Hn(e,5,!1,e.toLowerCase(),null,!1,!1)});var u0=/[\-:]([a-z])/g;function f0(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-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(u0,f0);kn[t]=new Hn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!1,!1)});kn.xlinkHref=new Hn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kn[e]=new Hn(e,1,!1,e.toLowerCase(),null,!0,!0)});function c0(e,t,n,r){var s=kn.hasOwnProperty(t)?kn[t]:null;(s!==null?s.type!==0:r||!(2c||s[u]!==a[c]){var p=` +`+s[u].replace(" at new "," at ");return e.displayName&&p.includes("")&&(p=p.replace("",e.displayName)),p}while(1<=u&&0<=c);break}}}finally{pp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nl(e):""}function kb(e){switch(e.tag){case 5:return Nl(e.type);case 16:return Nl("Lazy");case 13:return Nl("Suspense");case 19:return Nl("SuspenseList");case 0:case 2:case 15:return e=mp(e.type,!1),e;case 11:return e=mp(e.type.render,!1),e;case 1:return e=mp(e.type,!0),e;default:return""}}function tm(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 wa:return"Fragment";case ya:return"Portal";case Xp:return"Profiler";case h0:return"StrictMode";case Jp:return"Suspense";case em:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uw:return(e.displayName||"Context")+".Consumer";case Fw:return(e._context.displayName||"Context")+".Provider";case d0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case p0:return t=e.displayName||null,t!==null?t:tm(e.type)||"Memo";case Es:t=e._payload,e=e._init;try{return tm(e(t))}catch{}}return null}function Cb(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 tm(t);case 8:return t===h0?"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 Ys(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ww(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ob(e){var t=Ww(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 s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){r=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $f(e){e._valueTracker||(e._valueTracker=Ob(e))}function Bw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ww(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mc(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 nm(e,t){var n=t.checked;return Zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ys(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 zw(e,t){t=t.checked,t!=null&&c0(e,"checked",t,!1)}function rm(e,t){zw(e,t);var n=Ys(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")?im(e,t.type,n):t.hasOwnProperty("defaultValue")&&im(e,t.type,Ys(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function im(e,t,n){(t!=="number"||Mc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Il=Array.isArray;function Da(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Wf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $l={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Eb=["Webkit","ms","Moz","O"];Object.keys($l).forEach(function(e){Eb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$l[t]=$l[e]})});function Vw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$l.hasOwnProperty(e)&&$l[e]?(""+t).trim():t+"px"}function qw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Vw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Tb=Zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function am(e,t){if(t){if(Tb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function lm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var um=null;function m0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fm=null,Aa=null,La=null;function Ky(e){if(e=ku(e)){if(typeof fm!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=hh(t),fm(e.stateNode,e.type,t))}}function Qw(e){Aa?La?La.push(e):La=[e]:Aa=e}function Kw(){if(Aa){var e=Aa,t=La;if(La=Aa=null,Ky(e),t)for(e=0;e>>=0,e===0?32:31-(Ub(e)/$b|0)|0}var Bf=64,zf=4194304;function Fl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ec(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes,u=n&268435455;if(u!==0){var c=u&~s;c!==0?r=Fl(c):(a&=u,a!==0&&(r=Fl(a)))}else u=n&~s,u!==0?r=Fl(u):a!==0&&(r=Fl(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Su(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ni(t),e[t]=n}function Hb(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Bl),s1=" ",o1=!1;function g_(e,t){switch(e){case"keyup":return yP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function _P(e,t){switch(e){case"compositionend":return v_(t);case"keypress":return t.which!==32?null:(o1=!0,s1);case"textInput":return e=t.data,e===s1&&o1?null:e;default:return null}}function xP(e,t){if(_a)return e==="compositionend"||!M0&&g_(e,t)?(e=p_(),uc=_0=Ds=null,_a=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=f1(n)}}function x_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?x_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S_(){for(var e=window,t=Mc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mc(e.document)}return t}function k0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function PP(e){var t=S_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&x_(n.ownerDocument.documentElement,n)){if(r!==null&&k0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!e.extend&&a>r&&(s=r,r=a,a=s),s=c1(n,a);var u=c1(n,r);s&&u&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,xa=null,gm=null,Hl=null,vm=!1;function h1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vm||xa==null||xa!==Mc(r)||(r=xa,"selectionStart"in r&&k0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hl&&au(Hl,r)||(Hl=r,r=Pc(gm,"onSelect"),0ka||(e.current=Mm[ka],Mm[ka]=null,ka--)}function kt(e,t){ka++,Mm[ka]=e.current,e.current=t}var Gs={},Dn=qs(Gs),nr=qs(!1),jo=Gs;function Ha(e,t){var n=e.type.contextTypes;if(!n)return Gs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function rr(e){return e=e.childContextTypes,e!=null}function Dc(){Dt(nr),Dt(Dn)}function w1(e,t,n){if(Dn.current!==Gs)throw Error(ne(168));kt(Dn,t),kt(nr,n)}function R_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ne(108,Cb(e)||"Unknown",s));return Zt({},n,r)}function Ac(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gs,jo=Dn.current,kt(Dn,e),kt(nr,nr.current),!0}function _1(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=R_(e,t,jo),r.__reactInternalMemoizedMergedChildContext=e,Dt(nr),Dt(Dn),kt(Dn,e)):Dt(nr),kt(nr,n)}var Qi=null,dh=!1,bp=!1;function D_(e){Qi===null?Qi=[e]:Qi.push(e)}function BP(e){dh=!0,D_(e)}function Qs(){if(!bp&&Qi!==null){bp=!0;var e=0,t=tt;try{var n=Qi;for(tt=1;e>=u,s-=u,Ki=1<<32-ni(t)+s|n<J?(le=K,K=null):le=K.sibling;var fe=E(N,K,I[J],H);if(fe===null){K===null&&(K=le);break}e&&K&&fe.alternate===null&&t(N,K),A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe,K=le}if(J===I.length)return n(N,K),Gt&&ko(N,J),X;if(K===null){for(;JJ?(le=K,K=null):le=K.sibling;var P=E(N,K,fe.value,H);if(P===null){K===null&&(K=le);break}e&&K&&P.alternate===null&&t(N,K),A=a(P,A,J),te===null?X=P:te.sibling=P,te=P,K=le}if(fe.done)return n(N,K),Gt&&ko(N,J),X;if(K===null){for(;!fe.done;J++,fe=I.next())fe=O(N,fe.value,H),fe!==null&&(A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe);return Gt&&ko(N,J),X}for(K=r(N,K);!fe.done;J++,fe=I.next())fe=F(K,N,J,fe.value,H),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?J:fe.key),A=a(fe,A,J),te===null?X=fe:te.sibling=fe,te=fe);return e&&K.forEach(function(f){return t(N,f)}),Gt&&ko(N,J),X}function me(N,A,I,H){if(typeof I=="object"&&I!==null&&I.type===wa&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case Uf:e:{for(var X=I.key,te=A;te!==null;){if(te.key===X){if(X=I.type,X===wa){if(te.tag===7){n(N,te.sibling),A=s(te,I.props.children),A.return=N,N=A;break e}}else if(te.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Es&&E1(X)===te.type){n(N,te.sibling),A=s(te,I.props),A.ref=Pl(N,te,I),A.return=N,N=A;break e}n(N,te);break}else t(N,te);te=te.sibling}I.type===wa?(A=Do(I.props.children,N.mode,H,I.key),A.return=N,N=A):(H=vc(I.type,I.key,I.props,null,N.mode,H),H.ref=Pl(N,A,I),H.return=N,N=H)}return u(N);case ya:e:{for(te=I.key;A!==null;){if(A.key===te)if(A.tag===4&&A.stateNode.containerInfo===I.containerInfo&&A.stateNode.implementation===I.implementation){n(N,A.sibling),A=s(A,I.children||[]),A.return=N,N=A;break e}else{n(N,A);break}else t(N,A);A=A.sibling}A=Ip(I,N.mode,H),A.return=N,N=A}return u(N);case Es:return te=I._init,me(N,A,te(I._payload),H)}if(Il(I))return B(N,A,I,H);if(Cl(I))return Q(N,A,I,H);Kf(N,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,A!==null&&A.tag===6?(n(N,A.sibling),A=s(A,I),A.return=N,N=A):(n(N,A),A=Np(I,N.mode,H),A.return=N,N=A),u(N)):n(N,A)}return me}var Ga=$_(!0),W_=$_(!1),Cu={},Oi=qs(Cu),cu=qs(Cu),hu=qs(Cu);function bo(e){if(e===Cu)throw Error(ne(174));return e}function A0(e,t){switch(kt(hu,t),kt(cu,e),kt(Oi,Cu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:om(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=om(t,e)}Dt(Oi),kt(Oi,t)}function Va(){Dt(Oi),Dt(cu),Dt(hu)}function B_(e){bo(hu.current);var t=bo(Oi.current),n=om(t,e.type);t!==n&&(kt(cu,e),kt(Oi,n))}function L0(e){cu.current===e&&(Dt(Oi),Dt(cu))}var Qt=qs(0);function Uc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pp=[];function j0(){for(var e=0;en?n:4,e(!0);var r=Rp.transition;Rp.transition={};try{e(!1),t()}finally{tt=n,Rp.transition=r}}function ix(){return Br().memoizedState}function GP(e,t,n){var r=Bs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sx(e))ox(t,n);else if(n=N_(e,t,n,r),n!==null){var s=Wn();ri(n,e,r,s),ax(n,t,r)}}function VP(e,t,n){var r=Bs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sx(e))ox(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,c=a(u,n);if(s.hasEagerState=!0,s.eagerState=c,ii(c,u)){var p=t.interleaved;p===null?(s.next=s,R0(t)):(s.next=p.next,p.next=s),t.interleaved=s;return}}catch{}finally{}n=N_(e,t,s,r),n!==null&&(s=Wn(),ri(n,e,r,s),ax(n,t,r))}}function sx(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function ox(e,t){Yl=$c=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ax(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v0(e,n)}}var Wc={readContext:Wr,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useInsertionEffect:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useMutableSource:Tn,useSyncExternalStore:Tn,useId:Tn,unstable_isNewReconciler:!1},qP={readContext:Wr,useCallback:function(e,t){return xi().memoizedState=[e,t===void 0?null:t],e},useContext:Wr,useEffect:b1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dc(4194308,4,J_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dc(4194308,4,e,t)},useInsertionEffect:function(e,t){return dc(4,2,e,t)},useMemo:function(e,t){var n=xi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=GP.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=xi();return e={current:e},t.memoizedState=e},useState:T1,useDebugValue:$0,useDeferredValue:function(e){return xi().memoizedState=e},useTransition:function(){var e=T1(!1),t=e[0];return e=YP.bind(null,e[1]),xi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,s=xi();if(Gt){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),yn===null)throw Error(ne(349));Io&30||Y_(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,b1(V_.bind(null,r,a,e),[e]),r.flags|=2048,mu(9,G_.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xi(),t=yn.identifierPrefix;if(Gt){var n=Zi,r=Ki;n=(r&~(1<<32-ni(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=du++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Si]=t,e[fu]=r,gx(e,t,!1,!1),t.stateNode=e;e:{switch(u=lm(n,r),n){case"dialog":Rt("cancel",e),Rt("close",e),s=r;break;case"iframe":case"object":case"embed":Rt("load",e),s=r;break;case"video":case"audio":for(s=0;sQa&&(t.flags|=128,r=!0,Rl(a,!1),t.lanes=4194304)}else{if(!r)if(e=Uc(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Gt)return bn(t),null}else 2*sn()-a.renderingStartTime>Qa&&n!==1073741824&&(t.flags|=128,r=!0,Rl(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(n=a.last,n!==null?n.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=sn(),t.sibling=null,n=Qt.current,kt(Qt,r?n&1|2:n&1),t):(bn(t),null);case 22:case 23:return G0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?dr&1073741824&&(bn(t),t.subtreeFlags&6&&(t.flags|=8192)):bn(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function nR(e,t){switch(O0(t),t.tag){case 1:return rr(t.type)&&Dc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Va(),Dt(nr),Dt(Dn),j0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return L0(t),null;case 13:if(Dt(Qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Qt),null;case 4:return Va(),null;case 10:return P0(t.type._context),null;case 22:case 23:return G0(),null;case 24:return null;default:return null}}var Xf=!1,Pn=!1,rR=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Ta(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Jt(e,t,r)}else n.current=null}function jm(e,t,n){try{n()}catch(r){Jt(e,t,r)}}var F1=!1;function iR(e,t){if(ym=Tc,e=S_(),k0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var u=0,c=-1,p=-1,v=0,m=0,O=e,E=null;t:for(;;){for(var F;O!==n||s!==0&&O.nodeType!==3||(c=u+s),O!==a||r!==0&&O.nodeType!==3||(p=u+r),O.nodeType===3&&(u+=O.nodeValue.length),(F=O.firstChild)!==null;)E=O,O=F;for(;;){if(O===e)break t;if(E===n&&++v===s&&(c=u),E===a&&++m===r&&(p=u),(F=O.nextSibling)!==null)break;O=E,E=O.parentNode}O=F}n=c===-1||p===-1?null:{start:c,end:p}}else n=null}n=n||{start:0,end:0}}else n=null;for(wm={focusedElem:e,selectionRange:n},Tc=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){t=ge;try{var B=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(B!==null){var Q=B.memoizedProps,me=B.memoizedState,N=t.stateNode,A=N.getSnapshotBeforeUpdate(t.elementType===t.type?Q:Xr(t.type,Q),me);N.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var I=t.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(H){Jt(t,t.return,H)}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}return B=F1,F1=!1,B}function Gl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&jm(t,n,a)}s=s.next}while(s!==r)}}function gh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wx(e){var t=e.alternate;t!==null&&(e.alternate=null,wx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Si],delete t[fu],delete t[Sm],delete t[$P],delete t[WP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _x(e){return e.tag===5||e.tag===3||e.tag===4}function U1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_x(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Im(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Rc));else if(r!==4&&(e=e.child,e!==null))for(Im(e,t,n),e=e.sibling;e!==null;)Im(e,t,n),e=e.sibling}function Fm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Fm(e,t,n),e=e.sibling;e!==null;)Fm(e,t,n),e=e.sibling}var Sn=null,Jr=!1;function Ms(e,t,n){for(n=n.child;n!==null;)xx(e,t,n),n=n.sibling}function xx(e,t,n){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(lh,n)}catch{}switch(n.tag){case 5:Pn||Ta(n,t);case 6:var r=Sn,s=Jr;Sn=null,Ms(e,t,n),Sn=r,Jr=s,Sn!==null&&(Jr?(e=Sn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Sn.removeChild(n.stateNode));break;case 18:Sn!==null&&(Jr?(e=Sn,n=n.stateNode,e.nodeType===8?Tp(e.parentNode,n):e.nodeType===1&&Tp(e,n),su(e)):Tp(Sn,n.stateNode));break;case 4:r=Sn,s=Jr,Sn=n.stateNode.containerInfo,Jr=!0,Ms(e,t,n),Sn=r,Jr=s;break;case 0:case 11:case 14:case 15:if(!Pn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,u=a.destroy;a=a.tag,u!==void 0&&(a&2||a&4)&&jm(n,t,u),s=s.next}while(s!==r)}Ms(e,t,n);break;case 1:if(!Pn&&(Ta(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Jt(n,t,c)}Ms(e,t,n);break;case 21:Ms(e,t,n);break;case 22:n.mode&1?(Pn=(r=Pn)||n.memoizedState!==null,Ms(e,t,n),Pn=r):Ms(e,t,n);break;default:Ms(e,t,n)}}function $1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rR),t.forEach(function(r){var s=dR.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Zr(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=u),r&=~a}if(r=s,r=sn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oR(r/1960))-r,10e?16:e,As===null)var r=!1;else{if(e=As,As=null,Hc=0,We&6)throw Error(ne(331));var s=We;for(We|=4,ge=e.current;ge!==null;){var a=ge,u=a.child;if(ge.flags&16){var c=a.deletions;if(c!==null){for(var p=0;psn()-H0?Ro(e,0):z0|=n),ir(e,t)}function bx(e,t){t===0&&(e.mode&1?(t=zf,zf<<=1,!(zf&130023424)&&(zf=4194304)):t=1);var n=Wn();e=is(e,t),e!==null&&(Su(e,t,n),ir(e,n))}function hR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bx(e,n)}function dR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),bx(e,n)}var Px;Px=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||nr.current)tr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return tr=!1,eR(e,t,n);tr=!!(e.flags&131072)}else tr=!1,Gt&&t.flags&1048576&&A_(t,jc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pc(e,t),e=t.pendingProps;var s=Ha(t,Dn.current);Na(t,n),s=I0(null,t,r,e,s,n);var a=F0();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rr(r)?(a=!0,Ac(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,D0(t),s.updater=ph,t.stateNode=s,s._reactInternals=t,Tm(t,r,e,n),t=Rm(null,t,r,!0,a,n)):(t.tag=0,Gt&&a&&C0(t),$n(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=mR(r),e=Xr(r,e),s){case 0:t=Pm(null,t,r,e,n);break e;case 1:t=j1(null,t,r,e,n);break e;case 11:t=A1(null,t,r,e,n);break e;case 14:t=L1(null,t,r,Xr(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),Pm(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),j1(e,t,r,s,n);case 3:e:{if(dx(t),e===null)throw Error(ne(387));r=t.pendingProps,a=t.memoizedState,s=a.element,I_(e,t),Fc(t,r,null,n);var u=t.memoizedState;if(r=u.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=qa(Error(ne(423)),t),t=N1(e,t,r,n,s);break e}else if(r!==s){s=qa(Error(ne(424)),t),t=N1(e,t,r,n,s);break e}else for(gr=Us(t.stateNode.containerInfo.firstChild),yr=t,Gt=!0,ei=null,n=W_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ya(),r===s){t=ss(e,t,n);break e}$n(e,t,r,n)}t=t.child}return t;case 5:return B_(t),e===null&&Cm(t),r=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,u=s.children,_m(r,s)?u=null:a!==null&&_m(r,a)&&(t.flags|=32),hx(e,t),$n(e,t,u,n),t.child;case 6:return e===null&&Cm(t),null;case 13:return px(e,t,n);case 4:return A0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ga(t,null,r,n):$n(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),A1(e,t,r,s,n);case 7:return $n(e,t,t.pendingProps,n),t.child;case 8:return $n(e,t,t.pendingProps.children,n),t.child;case 12:return $n(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,a=t.memoizedProps,u=s.value,kt(Nc,r._currentValue),r._currentValue=u,a!==null)if(ii(a.value,u)){if(a.children===s.children&&!nr.current){t=ss(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var c=a.dependencies;if(c!==null){u=a.child;for(var p=c.firstContext;p!==null;){if(p.context===r){if(a.tag===1){p=es(-1,n&-n),p.tag=2;var v=a.updateQueue;if(v!==null){v=v.shared;var m=v.pending;m===null?p.next=p:(p.next=m.next,m.next=p),v.pending=p}}a.lanes|=n,p=a.alternate,p!==null&&(p.lanes|=n),Om(a.return,n,t),c.lanes|=n;break}p=p.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(ne(341));u.lanes|=n,c=u.alternate,c!==null&&(c.lanes|=n),Om(u,n,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}$n(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Na(t,n),s=Wr(s),r=r(s),t.flags|=1,$n(e,t,r,n),t.child;case 14:return r=t.type,s=Xr(r,t.pendingProps),s=Xr(r.type,s),L1(e,t,r,s,n);case 15:return fx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xr(r,s),pc(e,t),t.tag=1,rr(r)?(e=!0,Ac(t)):e=!1,Na(t,n),U_(t,r,s),Tm(t,r,s,n),Rm(null,t,r,!0,e,n);case 19:return mx(e,t,n);case 22:return cx(e,t,n)}throw Error(ne(156,t.tag))};function Rx(e,t){return r_(e,t)}function pR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(e,t,n,r){return new pR(e,t,n,r)}function q0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mR(e){if(typeof e=="function")return q0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===d0)return 11;if(e===p0)return 14}return 2}function zs(e,t){var n=e.alternate;return n===null?(n=Ur(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vc(e,t,n,r,s,a){var u=2;if(r=e,typeof e=="function")q0(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case wa:return Do(n.children,s,a,t);case h0:u=8,s|=8;break;case Xp:return e=Ur(12,n,t,s|2),e.elementType=Xp,e.lanes=a,e;case Jp:return e=Ur(13,n,t,s),e.elementType=Jp,e.lanes=a,e;case em:return e=Ur(19,n,t,s),e.elementType=em,e.lanes=a,e;case $w:return yh(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fw:u=10;break e;case Uw:u=9;break e;case d0:u=11;break e;case p0:u=14;break e;case Es:u=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Ur(u,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function Do(e,t,n,r){return e=Ur(7,e,r,t),e.lanes=n,e}function yh(e,t,n,r){return e=Ur(22,e,r,t),e.elementType=$w,e.lanes=n,e.stateNode={isHidden:!1},e}function Np(e,t,n){return e=Ur(6,e,null,t),e.lanes=n,e}function Ip(e,t,n){return t=Ur(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gR(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vp(0),this.expirationTimes=vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vp(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Q0(e,t,n,r,s,a,u,c,p){return e=new gR(e,t,n,c,p),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Ur(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},D0(a),e}function vR(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jx)}catch(e){console.error(e)}}jx(),Aw.exports=_r;var SR=Aw.exports;const MR=_u(SR);function zm(e,t){return zm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},zm(e,t)}function Ti(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zm(e,t)}var Nx={exports:{}},kR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",CR=kR,OR=CR;function Ix(){}function Fx(){}Fx.resetWarningCache=Ix;var ER=function(){function e(r,s,a,u,c,p){if(p!==OR){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Fx,resetWarningCache:Ix};return n.PropTypes=n,n};Nx.exports=ER();var TR=Nx.exports;const q1=_u(TR);function Bn(){return Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;m--){var O=r[m];O==="."?Fp(r,m):O===".."?(Fp(r,m),v++):v&&(Fp(r,m),v--)}if(!u)for(;v--;v)r.unshift("..");u&&r[0]!==""&&(!r[0]||!tc(r[0]))&&r.unshift("");var E=r.join("/");return c&&E.substr(-1)!=="/"&&(E+="/"),E}var PR="Invariant failed";function zo(e,t){if(!e)throw new Error(PR)}function Ql(e){return e.charAt(0)==="/"?e:"/"+e}function Q1(e){return e.charAt(0)==="/"?e.substr(1):e}function RR(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function Ux(e,t){return RR(e,t)?e.substr(t.length):e}function $x(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function DR(e){var t=e||"/",n="",r="",s=t.indexOf("#");s!==-1&&(r=t.substr(s),t=t.substr(0,s));var a=t.indexOf("?");return a!==-1&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:n==="?"?"":n,hash:r==="#"?"":r}}function Jn(e){var t=e.pathname,n=e.search,r=e.hash,s=t||"/";return n&&n!=="?"&&(s+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function vr(e,t,n,r){var s;typeof e=="string"?(s=DR(e),s.state=t):(s=Bn({},e),s.pathname===void 0&&(s.pathname=""),s.search?s.search.charAt(0)!=="?"&&(s.search="?"+s.search):s.search="",s.hash?s.hash.charAt(0)!=="#"&&(s.hash="#"+s.hash):s.hash="",t!==void 0&&s.state===void 0&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(a){throw a instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):a}return n&&(s.key=n),r?s.pathname?s.pathname.charAt(0)!=="/"&&(s.pathname=bR(s.pathname,r.pathname)):s.pathname=r.pathname:s.pathname||(s.pathname="/"),s}function J0(){var e=null;function t(u){return e=u,function(){e===u&&(e=null)}}function n(u,c,p,v){if(e!=null){var m=typeof e=="function"?e(u,c):e;typeof m=="string"?typeof p=="function"?p(m,v):v(!0):v(m!==!1)}else v(!0)}var r=[];function s(u){var c=!0;function p(){c&&u.apply(void 0,arguments)}return r.push(p),function(){c=!1,r=r.filter(function(v){return v!==p})}}function a(){for(var u=arguments.length,c=new Array(u),p=0;pS?C.splice(S,C.length-S,P):C.push(P),m({action:fe,location:P,index:S,entries:C})}})}function me(J,le){var fe="REPLACE",P=vr(J,le,O(),K.location);v.confirmTransitionTo(P,fe,n,function(f){f&&(K.entries[K.index]=P,m({action:fe,location:P}))})}function N(J){var le=ew(K.index+J,0,K.entries.length-1),fe="POP",P=K.entries[le];v.confirmTransitionTo(P,fe,n,function(f){f?m({action:fe,location:P,index:le}):m()})}function A(){N(-1)}function I(){N(1)}function H(J){var le=K.index+J;return le>=0&&le=0)&&(n[s]=e[s]);return n}var Qx=f3,c3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h3={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Kx={};Kx[Qx.ForwardRef]=c3;Kx[Qx.Memo]=h3;var Zx=function(t){var n=VR();return n.displayName=t,n},d3=Zx("Router-History"),Ka=Zx("Router"),Lh=function(e){Ti(t,e),t.computeRootMatch=function(s){return{path:"/",url:"/",params:{},isExact:s==="/"}};function t(r){var s;return s=e.call(this,r)||this,s.state={location:r.history.location},s._isMounted=!1,s._pendingLocation=null,r.staticContext||(s.unlisten=r.history.listen(function(a){s._pendingLocation=a})),s}var n=t.prototype;return n.componentDidMount=function(){var s=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(a){s._isMounted&&s.setState({location:a})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return Qe.createElement(Ka.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},Qe.createElement(d3.Provider,{children:this.props.children||null,value:this.props.history}))},t}(Qe.Component);Qe.Component;Qe.Component;var nw={},p3=1e4,rw=0;function m3(e,t){var n=""+t.end+t.strict+t.sensitive,r=nw[n]||(nw[n]={});if(r[e])return r[e];var s=[],a=i3(e,s,t),u={regexp:a,keys:s};return rw"u"&&(Za=lg);function x3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var S3=Za(function(e,t){var n=e.innerRef,r=e.navigate,s=e.onClick,a=Ah(e,["innerRef","navigate","onClick"]),u=a.target,c=Bn({},a,{onClick:function(v){try{s&&s(v)}catch(m){throw v.preventDefault(),m}!v.defaultPrevented&&v.button===0&&(!u||u==="_self")&&!x3(v)&&(v.preventDefault(),r())}});return lg!==Za?c.ref=t||n:c.ref=n,Qe.createElement("a",c)}),ug=Za(function(e,t){var n=e.component,r=n===void 0?S3:n,s=e.replace,a=e.to,u=e.innerRef,c=Ah(e,["component","replace","to","innerRef"]);return Qe.createElement(Ka.Consumer,null,function(p){p||zo(!1);var v=p.history,m=Ym(Hm(a,p.location),p.location),O=m?v.createHref(m):"",E=Bn({},c,{href:O,navigate:function(){var B=Hm(a,p.location),Q=Jn(p.location)===Jn(Ym(B)),me=s||Q?v.replace:v.push;me(B)}});return lg!==Za?E.ref=t||u:E.innerRef=u,Qe.createElement(r,E)})}),Xx=function(t){return t},qc=Qe.forwardRef;typeof qc>"u"&&(qc=Xx);function M3(){for(var e=arguments.length,t=new Array(e),n=0;n + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Qc.exports;(function(e,t){(function(){var n,r="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",v=500,m="__lodash_placeholder__",O=1,E=2,F=4,B=1,Q=2,me=1,N=2,A=4,I=8,H=16,X=32,te=64,K=128,J=256,le=512,fe=30,P="...",f=800,g=16,S=1,C=2,b=3,L=1/0,R=9007199254740991,_=17976931348623157e292,h=NaN,M=4294967295,G=M-1,se=M>>>1,ae=[["ary",K],["bind",me],["bindKey",N],["curry",I],["curryRight",H],["flip",le],["partial",X],["partialRight",te],["rearg",J]],re="[object Arguments]",ye="[object Array]",Me="[object AsyncFunction]",Be="[object Boolean]",Re="[object Date]",Xe="[object DOMException]",ui="[object Error]",Je="[object Function]",vt="[object GeneratorFunction]",_n="[object Map]",rt="[object Number]",jt="[object Null]",Gn="[object Object]",Ct="[object Promise]",Nt="[object Proxy]",fi="[object RegExp]",Ue="[object Set]",it="[object String]",Di="[object Symbol]",It="[object Undefined]",st="[object WeakMap]",Yo="[object WeakSet]",Ye="[object ArrayBuffer]",Ge="[object DataView]",Ai="[object Float32Array]",Ne="[object Float64Array]",ut="[object Int8Array]",Li="[object Int16Array]",yt="[object Int32Array]",ft="[object Uint8Array]",Yr="[object Uint8ClampedArray]",ct="[object Uint16Array]",ht="[object Uint32Array]",Go=/\b__p \+= '';/g,Ke=/\b(__p \+=) '' \+/g,Ot=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ks=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"']/g,wt=RegExp(Ks.source),ci=RegExp(Et.source),_t=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,ji=/<%=([\s\S]+?)%>/g,ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/,Vo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Ut=RegExp(St.source),fs=/^\s+/,Tt=/\s/,Mt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cr=/\{\n\/\* \[wrapped with (.+)\] \*/,$t=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qo=/[()=,{}\[\]\/\s]/,Bt=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cn=/\w*$/,Zs=/^[-+]0x[0-9a-f]+$/i,Xs=/^0b[01]+$/i,Js=/^\[object .+?Constructor\]$/,eo=/^0o[0-7]+$/i,to=/^(?:0|[1-9]\d*)$/,or=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hi=/($^)/,no=/['\n\r\u2028\u2029\\]/g,di="\\ud800-\\udfff",ro="\\u0300-\\u036f",io="\\ufe20-\\ufe2f",pi="\\u20d0-\\u20ff",cs=ro+io+pi,hs="\\u2700-\\u27bf",jn="a-z\\xdf-\\xf6\\xf8-\\xff",so="\\xac\\xb1\\xd7\\xf7",oo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ao="\\u2000-\\u206f",nd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ju="A-Z\\xc0-\\xd6\\xd8-\\xde",Nu="\\ufe0e\\ufe0f",lo=so+oo+ao+nd,ol="['’]",uo="["+di+"]",al="["+lo+"]",fo="["+cs+"]",Iu="\\d+",rd="["+hs+"]",Fu="["+jn+"]",Uu="[^"+di+lo+Iu+hs+jn+ju+"]",Qo="\\ud83c[\\udffb-\\udfff]",id="(?:"+fo+"|"+Qo+")",$u="[^"+di+"]",Ko="(?:\\ud83c[\\udde6-\\uddff]){2}",ds="[\\ud800-\\udbff][\\udc00-\\udfff]",ar="["+ju+"]",Wu="\\u200d",Bu="(?:"+Fu+"|"+Uu+")",mi="(?:"+ar+"|"+Uu+")",zu="(?:"+ol+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+ol+"(?:D|LL|M|RE|S|T|VE))?",Yu=id+"?",Gu="["+Nu+"]?",sd="(?:"+Wu+"(?:"+[$u,Ko,ds].join("|")+")"+Gu+Yu+")*",Ni="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qu=Gu+Yu+sd,Zo="(?:"+[rd,Ko,ds].join("|")+")"+qu,od="(?:"+[$u+fo+"?",fo,Ko,ds,uo].join("|")+")",ll=RegExp(ol,"g"),ad=RegExp(fo,"g"),Xo=RegExp(Qo+"(?="+Qo+")|"+od+qu,"g"),Qu=RegExp([ar+"?"+Fu+"+"+zu+"(?="+[al,ar,"$"].join("|")+")",mi+"+"+Hu+"(?="+[al,ar+Bu,"$"].join("|")+")",ar+"?"+Bu+"+"+zu,ar+"+"+Hu,Vu,Ni,Iu,Zo].join("|"),"g"),Ku=RegExp("["+Wu+di+cs+Nu+"]"),co=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ld=-1,dt={};dt[Ai]=dt[Ne]=dt[ut]=dt[Li]=dt[yt]=dt[ft]=dt[Yr]=dt[ct]=dt[ht]=!0,dt[re]=dt[ye]=dt[Ye]=dt[Be]=dt[Ge]=dt[Re]=dt[ui]=dt[Je]=dt[_n]=dt[rt]=dt[Gn]=dt[fi]=dt[Ue]=dt[it]=dt[st]=!1;var at={};at[re]=at[ye]=at[Ye]=at[Ge]=at[Be]=at[Re]=at[Ai]=at[Ne]=at[ut]=at[Li]=at[yt]=at[_n]=at[rt]=at[Gn]=at[fi]=at[Ue]=at[it]=at[Di]=at[ft]=at[Yr]=at[ct]=at[ht]=!0,at[ui]=at[Je]=at[st]=!1;var T={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},$={"&":"&","<":"<",">":">",'"':""","'":"'"},Z={"&":"&","<":"<",">":">",""":'"',"'":"'"},he={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pt=parseFloat,Ce=parseInt,bt=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,on=typeof self=="object"&&self&&self.Object===Object&&self,Ie=bt||on||Function("return this")(),mt=t&&!t.nodeType&&t,en=mt&&!0&&e&&!e.nodeType&&e,Vn=en&&en.exports===mt,an=Vn&&bt.process,Pt=function(){try{var U=en&&en.require&&en.require("util").types;return U||an&&an.binding&&an.binding("util")}catch{}}(),Nn=Pt&&Pt.isArrayBuffer,Gr=Pt&&Pt.isDate,Or=Pt&&Pt.isMap,gi=Pt&&Pt.isRegExp,ul=Pt&&Pt.isSet,ho=Pt&&Pt.isTypedArray;function mn(U,Y,z){switch(z.length){case 0:return U.call(Y);case 1:return U.call(Y,z[0]);case 2:return U.call(Y,z[0],z[1]);case 3:return U.call(Y,z[0],z[1],z[2])}return U.apply(Y,z)}function yM(U,Y,z,de){for(var ke=-1,Ve=U==null?0:U.length;++ke-1}function ud(U,Y,z){for(var de=-1,ke=U==null?0:U.length;++de-1;);return z}function Vg(U,Y){for(var z=U.length;z--&&Jo(Y,U[z],0)>-1;);return z}function EM(U,Y){for(var z=U.length,de=0;z--;)U[z]===Y&&++de;return de}var TM=dd(T),bM=dd($);function PM(U){return"\\"+he[U]}function RM(U,Y){return U==null?n:U[Y]}function ea(U){return Ku.test(U)}function DM(U){return co.test(U)}function AM(U){for(var Y,z=[];!(Y=U.next()).done;)z.push(Y.value);return z}function vd(U){var Y=-1,z=Array(U.size);return U.forEach(function(de,ke){z[++Y]=[ke,de]}),z}function qg(U,Y){return function(z){return U(Y(z))}}function gs(U,Y){for(var z=-1,de=U.length,ke=0,Ve=[];++z-1}function _2(i,o){var l=this.__data__,d=gf(l,i);return d<0?(++this.size,l.push([i,o])):l[d][1]=o,this}Ii.prototype.clear=g2,Ii.prototype.delete=v2,Ii.prototype.get=y2,Ii.prototype.has=w2,Ii.prototype.set=_2;function Fi(i){var o=-1,l=i==null?0:i.length;for(this.clear();++o=o?i:o)),i}function Pr(i,o,l,d,w,k){var D,j=o&O,W=o&E,V=o&F;if(l&&(D=w?l(i,d,w,k):l(i)),D!==n)return D;if(!Vt(i))return i;var q=Oe(i);if(q){if(D=kk(i),!j)return qn(i,D)}else{var ee=En(i),ue=ee==Je||ee==vt;if(Ss(i))return Pv(i,j);if(ee==Gn||ee==re||ue&&!w){if(D=W||ue?{}:Qv(i),!j)return W?dk(i,N2(D,i)):hk(i,ov(D,i))}else{if(!at[ee])return w?i:{};D=Ck(i,ee,j)}}k||(k=new qr);var ve=k.get(i);if(ve)return ve;k.set(i,D),ky(i)?i.forEach(function(Se){D.add(Pr(Se,o,l,Se,i,k))}):Sy(i)&&i.forEach(function(Se,Ae){D.set(Ae,Pr(Se,o,l,Ae,i,k))});var xe=V?W?zd:Bd:W?Kn:gn,be=q?n:xe(i);return Er(be||i,function(Se,Ae){be&&(Ae=Se,Se=i[Ae]),gl(D,Ae,Pr(Se,o,l,Ae,i,k))}),D}function I2(i){var o=gn(i);return function(l){return av(l,i,o)}}function av(i,o,l){var d=l.length;if(i==null)return!d;for(i=gt(i);d--;){var w=l[d],k=o[w],D=i[w];if(D===n&&!(w in i)||!k(D))return!1}return!0}function lv(i,o,l){if(typeof i!="function")throw new Tr(u);return Ml(function(){i.apply(n,l)},o)}function vl(i,o,l,d){var w=-1,k=Xu,D=!0,j=i.length,W=[],V=o.length;if(!j)return W;l&&(o=Ht(o,lr(l))),d?(k=ud,D=!1):o.length>=s&&(k=fl,D=!1,o=new go(o));e:for(;++ww?0:w+l),d=d===n||d>w?w:Ee(d),d<0&&(d+=w),d=l>d?0:Oy(d);l0&&l(j)?o>1?xn(j,o-1,l,d,w):ms(w,j):d||(w[w.length]=j)}return w}var kd=Nv(),cv=Nv(!0);function vi(i,o){return i&&kd(i,o,gn)}function Cd(i,o){return i&&cv(i,o,gn)}function yf(i,o){return ps(o,function(l){return zi(i[l])})}function yo(i,o){o=_s(o,i);for(var l=0,d=o.length;i!=null&&lo}function $2(i,o){return i!=null&&et.call(i,o)}function W2(i,o){return i!=null&&o in gt(i)}function B2(i,o,l){return i>=On(o,l)&&i=120&&q.length>=120)?new go(D&&q):n}q=i[0];var ee=-1,ue=j[0];e:for(;++ee-1;)j!==i&&uf.call(j,W,1),uf.call(i,W,1);return i}function Sv(i,o){for(var l=i?o.length:0,d=l-1;l--;){var w=o[l];if(l==d||w!==k){var k=w;Bi(w)?uf.call(i,w,1):jd(i,w)}}return i}function Dd(i,o){return i+hf(nv()*(o-i+1))}function tk(i,o,l,d){for(var w=-1,k=cn(cf((o-i)/(l||1)),0),D=z(k);k--;)D[d?k:++w]=i,i+=l;return D}function Ad(i,o){var l="";if(!i||o<1||o>R)return l;do o%2&&(l+=i),o=hf(o/2),o&&(i+=i);while(o);return l}function Pe(i,o){return Kd(Xv(i,o,Zn),i+"")}function nk(i){return sv(ca(i))}function rk(i,o){var l=ca(i);return bf(l,vo(o,0,l.length))}function _l(i,o,l,d){if(!Vt(i))return i;o=_s(o,i);for(var w=-1,k=o.length,D=k-1,j=i;j!=null&&++ww?0:w+o),l=l>w?w:l,l<0&&(l+=w),w=o>l?0:l-o>>>0,o>>>=0;for(var k=z(w);++d>>1,D=i[k];D!==null&&!fr(D)&&(l?D<=o:D=s){var V=o?null:vk(i);if(V)return ef(V);D=!1,w=fl,W=new go}else W=o?[]:j;e:for(;++d=d?i:Rr(i,o,l)}var bv=qM||function(i){return Ie.clearTimeout(i)};function Pv(i,o){if(o)return i.slice();var l=i.length,d=Zg?Zg(l):new i.constructor(l);return i.copy(d),d}function Ud(i){var o=new i.constructor(i.byteLength);return new af(o).set(new af(i)),o}function lk(i,o){var l=o?Ud(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}function uk(i){var o=new i.constructor(i.source,Cn.exec(i));return o.lastIndex=i.lastIndex,o}function fk(i){return ml?gt(ml.call(i)):{}}function Rv(i,o){var l=o?Ud(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}function Dv(i,o){if(i!==o){var l=i!==n,d=i===null,w=i===i,k=fr(i),D=o!==n,j=o===null,W=o===o,V=fr(o);if(!j&&!V&&!k&&i>o||k&&D&&W&&!j&&!V||d&&D&&W||!l&&W||!w)return 1;if(!d&&!k&&!V&&i=j)return W;var V=l[d];return W*(V=="desc"?-1:1)}}return i.index-o.index}function Av(i,o,l,d){for(var w=-1,k=i.length,D=l.length,j=-1,W=o.length,V=cn(k-D,0),q=z(W+V),ee=!d;++j1?l[w-1]:n,D=w>2?l[2]:n;for(k=i.length>3&&typeof k=="function"?(w--,k):n,D&&Fn(l[0],l[1],D)&&(k=w<3?n:k,w=1),o=gt(o);++d-1?w[k?o[D]:D]:n}}function Uv(i){return Wi(function(o){var l=o.length,d=l,w=br.prototype.thru;for(i&&o.reverse();d--;){var k=o[d];if(typeof k!="function")throw new Tr(u);if(w&&!D&&Ef(k)=="wrapper")var D=new br([],!0)}for(d=D?d:l;++d1&&Fe.reverse(),q&&Wj))return!1;var V=k.get(i),q=k.get(o);if(V&&q)return V==o&&q==i;var ee=-1,ue=!0,ve=l&Q?new go:n;for(k.set(i,o),k.set(o,i);++ee1?"& ":"")+o[d],o=o.join(l>2?", ":" "),i.replace(Mt,`{ +/* [wrapped with `+o+`] */ +`)}function Ek(i){return Oe(i)||xo(i)||!!(ev&&i&&i[ev])}function Bi(i,o){var l=typeof i;return o=o??R,!!o&&(l=="number"||l!="symbol"&&to.test(i))&&i>-1&&i%1==0&&i0){if(++o>=f)return arguments[0]}else o=0;return i.apply(n,arguments)}}function bf(i,o){var l=-1,d=i.length,w=d-1;for(o=o===n?d:o;++l1?i[o-1]:n;return l=typeof l=="function"?(i.pop(),l):n,fy(i,l)});function cy(i){var o=x(i);return o.__chain__=!0,o}function FC(i,o){return o(i),i}function Pf(i,o){return o(i)}var UC=Wi(function(i){var o=i.length,l=o?i[0]:0,d=this.__wrapped__,w=function(k){return Md(k,i)};return o>1||this.__actions__.length||!(d instanceof Le)||!Bi(l)?this.thru(w):(d=d.slice(l,+l+(o?1:0)),d.__actions__.push({func:Pf,args:[w],thisArg:n}),new br(d,this.__chain__).thru(function(k){return o&&!k.length&&k.push(n),k}))});function $C(){return cy(this)}function WC(){return new br(this.value(),this.__chain__)}function BC(){this.__values__===n&&(this.__values__=Cy(this.value()));var i=this.__index__>=this.__values__.length,o=i?n:this.__values__[this.__index__++];return{done:i,value:o}}function zC(){return this}function HC(i){for(var o,l=this;l instanceof mf;){var d=iy(l);d.__index__=0,d.__values__=n,o?w.__wrapped__=d:o=d;var w=d;l=l.__wrapped__}return w.__wrapped__=i,o}function YC(){var i=this.__wrapped__;if(i instanceof Le){var o=i;return this.__actions__.length&&(o=new Le(this)),o=o.reverse(),o.__actions__.push({func:Pf,args:[Zd],thisArg:n}),new br(o,this.__chain__)}return this.thru(Zd)}function GC(){return Ev(this.__wrapped__,this.__actions__)}var VC=Sf(function(i,o,l){et.call(i,l)?++i[l]:Ui(i,l,1)});function qC(i,o,l){var d=Oe(i)?$g:F2;return l&&Fn(i,o,l)&&(o=n),d(i,_e(o,3))}function QC(i,o){var l=Oe(i)?ps:fv;return l(i,_e(o,3))}var KC=Fv(sy),ZC=Fv(oy);function XC(i,o){return xn(Rf(i,o),1)}function JC(i,o){return xn(Rf(i,o),L)}function eO(i,o,l){return l=l===n?1:Ee(l),xn(Rf(i,o),l)}function hy(i,o){var l=Oe(i)?Er:ys;return l(i,_e(o,3))}function dy(i,o){var l=Oe(i)?wM:uv;return l(i,_e(o,3))}var tO=Sf(function(i,o,l){et.call(i,l)?i[l].push(o):Ui(i,l,[o])});function nO(i,o,l,d){i=Qn(i)?i:ca(i),l=l&&!d?Ee(l):0;var w=i.length;return l<0&&(l=cn(w+l,0)),Nf(i)?l<=w&&i.indexOf(o,l)>-1:!!w&&Jo(i,o,l)>-1}var rO=Pe(function(i,o,l){var d=-1,w=typeof o=="function",k=Qn(i)?z(i.length):[];return ys(i,function(D){k[++d]=w?mn(o,D,l):yl(D,o,l)}),k}),iO=Sf(function(i,o,l){Ui(i,l,o)});function Rf(i,o){var l=Oe(i)?Ht:gv;return l(i,_e(o,3))}function sO(i,o,l,d){return i==null?[]:(Oe(o)||(o=o==null?[]:[o]),l=d?n:l,Oe(l)||(l=l==null?[]:[l]),_v(i,o,l))}var oO=Sf(function(i,o,l){i[l?0:1].push(o)},function(){return[[],[]]});function aO(i,o,l){var d=Oe(i)?fd:Hg,w=arguments.length<3;return d(i,_e(o,4),l,w,ys)}function lO(i,o,l){var d=Oe(i)?_M:Hg,w=arguments.length<3;return d(i,_e(o,4),l,w,uv)}function uO(i,o){var l=Oe(i)?ps:fv;return l(i,Lf(_e(o,3)))}function fO(i){var o=Oe(i)?sv:nk;return o(i)}function cO(i,o,l){(l?Fn(i,o,l):o===n)?o=1:o=Ee(o);var d=Oe(i)?A2:rk;return d(i,o)}function hO(i){var o=Oe(i)?L2:sk;return o(i)}function dO(i){if(i==null)return 0;if(Qn(i))return Nf(i)?ta(i):i.length;var o=En(i);return o==_n||o==Ue?i.size:bd(i).length}function pO(i,o,l){var d=Oe(i)?cd:ok;return l&&Fn(i,o,l)&&(o=n),d(i,_e(o,3))}var mO=Pe(function(i,o){if(i==null)return[];var l=o.length;return l>1&&Fn(i,o[0],o[1])?o=[]:l>2&&Fn(o[0],o[1],o[2])&&(o=[o[0]]),_v(i,xn(o,1),[])}),Df=QM||function(){return Ie.Date.now()};function gO(i,o){if(typeof o!="function")throw new Tr(u);return i=Ee(i),function(){if(--i<1)return o.apply(this,arguments)}}function py(i,o,l){return o=l?n:o,o=i&&o==null?i.length:o,$i(i,K,n,n,n,n,o)}function my(i,o){var l;if(typeof o!="function")throw new Tr(u);return i=Ee(i),function(){return--i>0&&(l=o.apply(this,arguments)),i<=1&&(o=n),l}}var Jd=Pe(function(i,o,l){var d=me;if(l.length){var w=gs(l,ua(Jd));d|=X}return $i(i,d,o,l,w)}),gy=Pe(function(i,o,l){var d=me|N;if(l.length){var w=gs(l,ua(gy));d|=X}return $i(o,d,i,l,w)});function vy(i,o,l){o=l?n:o;var d=$i(i,I,n,n,n,n,n,o);return d.placeholder=vy.placeholder,d}function yy(i,o,l){o=l?n:o;var d=$i(i,H,n,n,n,n,n,o);return d.placeholder=yy.placeholder,d}function wy(i,o,l){var d,w,k,D,j,W,V=0,q=!1,ee=!1,ue=!0;if(typeof i!="function")throw new Tr(u);o=Ar(o)||0,Vt(l)&&(q=!!l.leading,ee="maxWait"in l,k=ee?cn(Ar(l.maxWait)||0,o):k,ue="trailing"in l?!!l.trailing:ue);function ve(nn){var Kr=d,Yi=w;return d=w=n,V=nn,D=i.apply(Yi,Kr),D}function xe(nn){return V=nn,j=Ml(Ae,o),q?ve(nn):D}function be(nn){var Kr=nn-W,Yi=nn-V,Fy=o-Kr;return ee?On(Fy,k-Yi):Fy}function Se(nn){var Kr=nn-W,Yi=nn-V;return W===n||Kr>=o||Kr<0||ee&&Yi>=k}function Ae(){var nn=Df();if(Se(nn))return Fe(nn);j=Ml(Ae,be(nn))}function Fe(nn){return j=n,ue&&d?ve(nn):(d=w=n,D)}function cr(){j!==n&&bv(j),V=0,d=W=w=j=n}function Un(){return j===n?D:Fe(Df())}function hr(){var nn=Df(),Kr=Se(nn);if(d=arguments,w=this,W=nn,Kr){if(j===n)return xe(W);if(ee)return bv(j),j=Ml(Ae,o),ve(W)}return j===n&&(j=Ml(Ae,o)),D}return hr.cancel=cr,hr.flush=Un,hr}var vO=Pe(function(i,o){return lv(i,1,o)}),yO=Pe(function(i,o,l){return lv(i,Ar(o)||0,l)});function wO(i){return $i(i,le)}function Af(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new Tr(u);var l=function(){var d=arguments,w=o?o.apply(this,d):d[0],k=l.cache;if(k.has(w))return k.get(w);var D=i.apply(this,d);return l.cache=k.set(w,D)||k,D};return l.cache=new(Af.Cache||Fi),l}Af.Cache=Fi;function Lf(i){if(typeof i!="function")throw new Tr(u);return function(){var o=arguments;switch(o.length){case 0:return!i.call(this);case 1:return!i.call(this,o[0]);case 2:return!i.call(this,o[0],o[1]);case 3:return!i.call(this,o[0],o[1],o[2])}return!i.apply(this,o)}}function _O(i){return my(2,i)}var xO=ak(function(i,o){o=o.length==1&&Oe(o[0])?Ht(o[0],lr(_e())):Ht(xn(o,1),lr(_e()));var l=o.length;return Pe(function(d){for(var w=-1,k=On(d.length,l);++w=o}),xo=dv(function(){return arguments}())?dv:function(i){return Xt(i)&&et.call(i,"callee")&&!Jg.call(i,"callee")},Oe=z.isArray,NO=Nn?lr(Nn):H2;function Qn(i){return i!=null&&jf(i.length)&&!zi(i)}function tn(i){return Xt(i)&&Qn(i)}function IO(i){return i===!0||i===!1||Xt(i)&&In(i)==Be}var Ss=ZM||cp,FO=Gr?lr(Gr):Y2;function UO(i){return Xt(i)&&i.nodeType===1&&!kl(i)}function $O(i){if(i==null)return!0;if(Qn(i)&&(Oe(i)||typeof i=="string"||typeof i.splice=="function"||Ss(i)||fa(i)||xo(i)))return!i.length;var o=En(i);if(o==_n||o==Ue)return!i.size;if(Sl(i))return!bd(i).length;for(var l in i)if(et.call(i,l))return!1;return!0}function WO(i,o){return wl(i,o)}function BO(i,o,l){l=typeof l=="function"?l:n;var d=l?l(i,o):n;return d===n?wl(i,o,n,l):!!d}function tp(i){if(!Xt(i))return!1;var o=In(i);return o==ui||o==Xe||typeof i.message=="string"&&typeof i.name=="string"&&!kl(i)}function zO(i){return typeof i=="number"&&tv(i)}function zi(i){if(!Vt(i))return!1;var o=In(i);return o==Je||o==vt||o==Me||o==Nt}function xy(i){return typeof i=="number"&&i==Ee(i)}function jf(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=R}function Vt(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function Xt(i){return i!=null&&typeof i=="object"}var Sy=Or?lr(Or):V2;function HO(i,o){return i===o||Td(i,o,Yd(o))}function YO(i,o,l){return l=typeof l=="function"?l:n,Td(i,o,Yd(o),l)}function GO(i){return My(i)&&i!=+i}function VO(i){if(Pk(i))throw new ke(a);return pv(i)}function qO(i){return i===null}function QO(i){return i==null}function My(i){return typeof i=="number"||Xt(i)&&In(i)==rt}function kl(i){if(!Xt(i)||In(i)!=Gn)return!1;var o=lf(i);if(o===null)return!0;var l=et.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&rf.call(l)==YM}var np=gi?lr(gi):q2;function KO(i){return xy(i)&&i>=-R&&i<=R}var ky=ul?lr(ul):Q2;function Nf(i){return typeof i=="string"||!Oe(i)&&Xt(i)&&In(i)==it}function fr(i){return typeof i=="symbol"||Xt(i)&&In(i)==Di}var fa=ho?lr(ho):K2;function ZO(i){return i===n}function XO(i){return Xt(i)&&En(i)==st}function JO(i){return Xt(i)&&In(i)==Yo}var eE=Of(Pd),tE=Of(function(i,o){return i<=o});function Cy(i){if(!i)return[];if(Qn(i))return Nf(i)?Vr(i):qn(i);if(cl&&i[cl])return AM(i[cl]());var o=En(i),l=o==_n?vd:o==Ue?ef:ca;return l(i)}function Hi(i){if(!i)return i===0?i:0;if(i=Ar(i),i===L||i===-L){var o=i<0?-1:1;return o*_}return i===i?i:0}function Ee(i){var o=Hi(i),l=o%1;return o===o?l?o-l:o:0}function Oy(i){return i?vo(Ee(i),0,M):0}function Ar(i){if(typeof i=="number")return i;if(fr(i))return h;if(Vt(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=Vt(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=Yg(i);var l=Xs.test(i);return l||eo.test(i)?Ce(i.slice(2),l?2:8):Zs.test(i)?h:+i}function Ey(i){return yi(i,Kn(i))}function nE(i){return i?vo(Ee(i),-R,R):i===0?i:0}function Ze(i){return i==null?"":ur(i)}var rE=aa(function(i,o){if(Sl(o)||Qn(o)){yi(o,gn(o),i);return}for(var l in o)et.call(o,l)&&gl(i,l,o[l])}),Ty=aa(function(i,o){yi(o,Kn(o),i)}),If=aa(function(i,o,l,d){yi(o,Kn(o),i,d)}),iE=aa(function(i,o,l,d){yi(o,gn(o),i,d)}),sE=Wi(Md);function oE(i,o){var l=oa(i);return o==null?l:ov(l,o)}var aE=Pe(function(i,o){i=gt(i);var l=-1,d=o.length,w=d>2?o[2]:n;for(w&&Fn(o[0],o[1],w)&&(d=1);++l1),k}),yi(i,zd(i),l),d&&(l=Pr(l,O|E|F,yk));for(var w=o.length;w--;)jd(l,o[w]);return l});function CE(i,o){return Py(i,Lf(_e(o)))}var OE=Wi(function(i,o){return i==null?{}:J2(i,o)});function Py(i,o){if(i==null)return{};var l=Ht(zd(i),function(d){return[d]});return o=_e(o),xv(i,l,function(d,w){return o(d,w[0])})}function EE(i,o,l){o=_s(o,i);var d=-1,w=o.length;for(w||(w=1,i=n);++do){var d=i;i=o,o=d}if(l||i%1||o%1){var w=nv();return On(i+w*(o-i+pt("1e-"+((w+"").length-1))),o)}return Dd(i,o)}var FE=la(function(i,o,l){return o=o.toLowerCase(),i+(l?Ay(o):o)});function Ay(i){return sp(Ze(i).toLowerCase())}function Ly(i){return i=Ze(i),i&&i.replace(or,TM).replace(ad,"")}function UE(i,o,l){i=Ze(i),o=ur(o);var d=i.length;l=l===n?d:vo(Ee(l),0,d);var w=l;return l-=o.length,l>=0&&i.slice(l,w)==o}function $E(i){return i=Ze(i),i&&ci.test(i)?i.replace(Et,bM):i}function WE(i){return i=Ze(i),i&&Ut.test(i)?i.replace(St,"\\$&"):i}var BE=la(function(i,o,l){return i+(l?"-":"")+o.toLowerCase()}),zE=la(function(i,o,l){return i+(l?" ":"")+o.toLowerCase()}),HE=Iv("toLowerCase");function YE(i,o,l){i=Ze(i),o=Ee(o);var d=o?ta(i):0;if(!o||d>=o)return i;var w=(o-d)/2;return Cf(hf(w),l)+i+Cf(cf(w),l)}function GE(i,o,l){i=Ze(i),o=Ee(o);var d=o?ta(i):0;return o&&d>>0,l?(i=Ze(i),i&&(typeof o=="string"||o!=null&&!np(o))&&(o=ur(o),!o&&ea(i))?xs(Vr(i),0,l):i.split(o,l)):[]}var JE=la(function(i,o,l){return i+(l?" ":"")+sp(o)});function eT(i,o,l){return i=Ze(i),l=l==null?0:vo(Ee(l),0,i.length),o=ur(o),i.slice(l,l+o.length)==o}function tT(i,o,l){var d=x.templateSettings;l&&Fn(i,o,l)&&(o=n),i=Ze(i),o=If({},o,d,Hv);var w=If({},o.imports,d.imports,Hv),k=gn(w),D=gd(w,k),j,W,V=0,q=o.interpolate||hi,ee="__p += '",ue=yd((o.escape||hi).source+"|"+q.source+"|"+(q===ji?zt:hi).source+"|"+(o.evaluate||hi).source+"|$","g"),ve="//# sourceURL="+(et.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ld+"]")+` +`;i.replace(ue,function(Se,Ae,Fe,cr,Un,hr){return Fe||(Fe=cr),ee+=i.slice(V,hr).replace(no,PM),Ae&&(j=!0,ee+=`' + +__e(`+Ae+`) + +'`),Un&&(W=!0,ee+=`'; +`+Un+`; +__p += '`),Fe&&(ee+=`' + +((__t = (`+Fe+`)) == null ? '' : __t) + +'`),V=hr+Se.length,Se}),ee+=`'; +`;var xe=et.call(o,"variable")&&o.variable;if(!xe)ee=`with (obj) { +`+ee+` +} +`;else if(qo.test(xe))throw new ke(c);ee=(W?ee.replace(Go,""):ee).replace(Ke,"$1").replace(Ot,"$1;"),ee="function("+(xe||"obj")+`) { +`+(xe?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(j?", __e = _.escape":"")+(W?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+ee+`return __p +}`;var be=Ny(function(){return Ve(k,ve+"return "+ee).apply(n,D)});if(be.source=ee,tp(be))throw be;return be}function nT(i){return Ze(i).toLowerCase()}function rT(i){return Ze(i).toUpperCase()}function iT(i,o,l){if(i=Ze(i),i&&(l||o===n))return Yg(i);if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Vr(o),k=Gg(d,w),D=Vg(d,w)+1;return xs(d,k,D).join("")}function sT(i,o,l){if(i=Ze(i),i&&(l||o===n))return i.slice(0,Qg(i)+1);if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Vg(d,Vr(o))+1;return xs(d,0,w).join("")}function oT(i,o,l){if(i=Ze(i),i&&(l||o===n))return i.replace(fs,"");if(!i||!(o=ur(o)))return i;var d=Vr(i),w=Gg(d,Vr(o));return xs(d,w).join("")}function aT(i,o){var l=fe,d=P;if(Vt(o)){var w="separator"in o?o.separator:w;l="length"in o?Ee(o.length):l,d="omission"in o?ur(o.omission):d}i=Ze(i);var k=i.length;if(ea(i)){var D=Vr(i);k=D.length}if(l>=k)return i;var j=l-ta(d);if(j<1)return d;var W=D?xs(D,0,j).join(""):i.slice(0,j);if(w===n)return W+d;if(D&&(j+=W.length-j),np(w)){if(i.slice(j).search(w)){var V,q=W;for(w.global||(w=yd(w.source,Ze(Cn.exec(w))+"g")),w.lastIndex=0;V=w.exec(q);)var ee=V.index;W=W.slice(0,ee===n?j:ee)}}else if(i.indexOf(ur(w),j)!=j){var ue=W.lastIndexOf(w);ue>-1&&(W=W.slice(0,ue))}return W+d}function lT(i){return i=Ze(i),i&&wt.test(i)?i.replace(Ks,IM):i}var uT=la(function(i,o,l){return i+(l?" ":"")+o.toUpperCase()}),sp=Iv("toUpperCase");function jy(i,o,l){return i=Ze(i),o=l?n:o,o===n?DM(i)?$M(i):MM(i):i.match(o)||[]}var Ny=Pe(function(i,o){try{return mn(i,n,o)}catch(l){return tp(l)?l:new ke(l)}}),fT=Wi(function(i,o){return Er(o,function(l){l=wi(l),Ui(i,l,Jd(i[l],i))}),i});function cT(i){var o=i==null?0:i.length,l=_e();return i=o?Ht(i,function(d){if(typeof d[1]!="function")throw new Tr(u);return[l(d[0]),d[1]]}):[],Pe(function(d){for(var w=-1;++wR)return[];var l=M,d=On(i,M);o=_e(o),i-=M;for(var w=md(d,o);++l0||o<0)?new Le(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),o!==n&&(o=Ee(o),l=o<0?l.dropRight(-o):l.take(o-i)),l)},Le.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Le.prototype.toArray=function(){return this.take(M)},vi(Le.prototype,function(i,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),d=/^(?:head|last)$/.test(o),w=x[d?"take"+(o=="last"?"Right":""):o],k=d||/^find/.test(o);w&&(x.prototype[o]=function(){var D=this.__wrapped__,j=d?[1]:arguments,W=D instanceof Le,V=j[0],q=W||Oe(D),ee=function(Ae){var Fe=w.apply(x,ms([Ae],j));return d&&ue?Fe[0]:Fe};q&&l&&typeof V=="function"&&V.length!=1&&(W=q=!1);var ue=this.__chain__,ve=!!this.__actions__.length,xe=k&&!ue,be=W&&!ve;if(!k&&q){D=be?D:new Le(this);var Se=i.apply(D,j);return Se.__actions__.push({func:Pf,args:[ee],thisArg:n}),new br(Se,ue)}return xe&&be?i.apply(this,j):(Se=this.thru(ee),xe?d?Se.value()[0]:Se.value():Se)})}),Er(["pop","push","shift","sort","splice","unshift"],function(i){var o=tf[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);x.prototype[i]=function(){var w=arguments;if(d&&!this.__chain__){var k=this.value();return o.apply(Oe(k)?k:[],w)}return this[l](function(D){return o.apply(Oe(D)?D:[],w)})}}),vi(Le.prototype,function(i,o){var l=x[o];if(l){var d=l.name+"";et.call(sa,d)||(sa[d]=[]),sa[d].push({name:o,func:l})}}),sa[Mf(n,N).name]=[{name:"wrapper",func:n}],Le.prototype.clone=l2,Le.prototype.reverse=u2,Le.prototype.value=f2,x.prototype.at=UC,x.prototype.chain=$C,x.prototype.commit=WC,x.prototype.next=BC,x.prototype.plant=HC,x.prototype.reverse=YC,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=GC,x.prototype.first=x.prototype.head,cl&&(x.prototype[cl]=zC),x},na=WM();en?((en.exports=na)._=na,mt._=na):Ie._=na}).call(Fr)})(Qc,Qc.exports);var C3=Qc.exports;const ln=_u(C3);class O3{reduce(t,n){const r=ln.get(t,"local",!1);r&&(this.status(r,n),this.apps(r,n),this.app(r,n),this.appState(r,n),this.appFailed(r,n),this.verbResult(r,n),this.verbStatus(r,n),this.verbEventPlus(r,n),this.threads(r,n),this.amesPeers(r,n),this.amesPeer(r,n),this.behnTimers(r,n),this.clayCommits(r,n),this.eyreBindings(r,n),this.eyreCache(r,n),this.eyreConnections(r,n),this.eyreAuthentication(r,n),this.eyreChannels(r,n))}status(t,n){const r=ln.get(t,"status",!1);r&&(n.status=r)}apps(t,n){const r=ln.get(t,"apps",!1);r&&Object.keys(r).map(s=>{n.apps[s]||(n.apps[s]=r[s])})}app(t,n){const r=ln.get(t,"app",!1);r&&(n.apps[r.app]&&(r.state=n.apps[r.app].state),n.apps[r.app]=r)}appState(t,n){const r=ln.get(t,"appState",!1);r&&(n.apps[r.app].state=r.state)}appFailed(t,n){const r=ln.get(t,"appFailed",!1);r&&(console.log("loading app deets failed",r),n.apps[r]={noDebug:!0})}verbResult(t,n){const r=ln.get(t,"verbResult",!1);if(r){n.apps[r.app]||(n.apps[r.app]={}),n.apps[r.app].events||(n.apps[r.app].events=[]);let s="some event";r["on-init"]&&(s="+on-init"),r["on-load"]&&(s="+on-load"),r["on-poke"]&&(s="+on-poke with mark "+r["on-poke"]),r["on-watch"]&&(s="+on-watch at path "+r["on-watch"]),r["on-leave"]&&(s="+on-leave on path "+r["on-leave"]),r["on-agent"]&&(s="+on-agent at wire "+r["on-agent"].wire+" with sign "+r["on-agent"].sign),r["on-arvo"]&&(s="+on-arvo at wire "+r["on-arvo"].wire+" from vane "+r["on-arvo"].vane+" with sign "+r["on-arvo"].sign),r["on-fail"]&&(s="+on-fail on "+r["on-fail"]),n.apps[r.app].events.push(s)}}verbStatus(t,n){const r=ln.get(t,"verbStatus",!1);r&&(n.apps[r.app]||(n.apps[r.app]={}),n.apps[r.app].events||(n.apps[r.app].events=[]),n.apps[r.app].events.push(r.msg))}verbEventPlus(t,n){const r=ln.get(t,"verbEventPlus",!1);r&&(n.logs[r.gill]?(n.logs[r.gill].logs.push(r.log),n.logs[r.gill].newest=r.log.now,n.logsRange.newest=r.log.now):(n.logs[r.gill]={logs:[r.log],oldest:r.log.now,newest:r.log.now},n.logsRange.oldest=Math.min(n.logsRange.oldest||r.log.now,r.log.now),n.logsRange.newest=r.log.now))}threads(t,n){const r=ln.get(t,"threads",!1);r&&(n.threads=r)}amesPeers(t,n){const r=ln.get(t,"amesPeers",!1);r&&(n.peers.known=r.known,n.peers.alien=r.alien)}amesPeer(t,n){const r=ln.get(t,"amesPeer",!1);r&&(n.peers.deets[r.who]=r)}behnTimers(t,n){const r=ln.get(t,"behnTimers",!1);r&&(n.timers=r)}clayCommits(t,n){const r=ln.get(t,"clayCommits",!1);r&&(console.log("clay comms",r),n.commits=r)}eyreBindings(t,n){const r=ln.get(t,"eyreBindings",!1);r&&(n.bindings=r)}eyreCache(t,n){const r=ln.get(t,"eyreCache",!1);r&&(n.cache=r)}eyreConnections(t,n){const r=ln.get(t,"eyreConnections",!1);r&&(n.connections=r)}eyreAuthentication(t,n){const r=ln.get(t,"eyreAuthentication",!1);r&&(n.authentication=r)}eyreChannels(t,n){const r=ln.get(t,"eyreChannels",!1);r&&(n.channels=r)}}class E3{constructor(){this.state={status:null,apps:{},logs:{},logsRange:{oldest:null,newest:null},threads:{},peers:{known:[],alien:[],deets:{}},timers:[],commits:[],bindings:[],cache:[],connections:[],authentication:{sessions:[],visitors:[],visiting:[]},channels:[],sidebarShown:!0},this.localReducer=new O3,this.setState=()=>{}}setStateHandler(t){this.setState=t}handleEvent(t){let n;t.data?n=t.data:n=t,console.log("event",n),this.localReducer.reduce(n,this.state),this.setState(this.state)}addLogs(t,n,r){let s=this.state.logs[t],a=this.state.logsRange;s?n<(s.oldest||n+1)?(s.logs=[...r,...s.logs],s.oldest=r[0].now,a.oldest=Math.min(a.oldest||s.oldest,s.oldest)):n>s.newest?(s.logs=[...s.logs,...r],s.newest=r[r.length-1].now,a.newest=Math.max(a.newest||s.newest,s.newest)):console.log(`assuming duplicate load for ${t}, ignoring logs at ${n}`):(s={logs:r,oldest:r[0].now,newest:r[r.length-1].now},a.oldest=Math.min(a.oldest||s.oldest,s.oldest),a.newest=Math.max(a.newest||s.newest,s.newest)),this.state.logs[t]=s,this.state.logsRange=a,this.setState(this.state)}clearLogs(){this.state.logs={},this.state.logsRange={oldest:null,newest:null},this.setState(this.state)}}let qe=new E3;window.store=qe;//! moment.js +//! version : 2.29.3 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var Jx;function ce(){return Jx.apply(null,arguments)}function T3(e){Jx=e}function si(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Ao(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ze(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function fg(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ze(e,t))return!1;return!0}function Xn(e){return e===void 0}function os(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ou(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function eS(e,t){var n=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(n=0;n=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var pg=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,nc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,zp={},Fa={};function we(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(Fa[e]=s),t&&(Fa[t[0]]=function(){return bi(s.apply(this,arguments),t[1],t[2])}),n&&(Fa[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function A3(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L3(e){var t=e.match(pg),n,r;for(n=0,r=t.length;n=0&&nc.test(e);)e=e.replace(nc,r),nc.lastIndex=0,n-=1;return e}var j3={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function N3(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(pg).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var I3="Invalid date";function F3(){return this._invalidDate}var U3="%d",$3=/\d{1,2}/;function W3(e){return this._ordinal.replace("%d",e)}var B3={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function z3(e,t,n,r){var s=this._relativeTime[n];return Ri(s)?s(e,t,n,r):s.replace(/%d/i,e)}function H3(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ri(n)?n(t):n.replace(/%s/i,t)}var Kl={};function An(e,t){var n=e.toLowerCase();Kl[n]=Kl[n+"s"]=Kl[t]=e}function Hr(e){return typeof e=="string"?Kl[e]||Kl[e.toLowerCase()]:void 0}function mg(e){var t={},n,r;for(r in e)ze(e,r)&&(n=Hr(r),n&&(t[n]=e[r]));return t}var iS={};function Ln(e,t){iS[e]=t}function Y3(e){var t=[],n;for(n in e)ze(e,n)&&t.push({unit:n,priority:iS[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}function Nh(e){return e%4===0&&e%100!==0||e%400===0}function Nr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function De(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Nr(t)),n}function il(e,t){return function(n){return n!=null?(sS(this,e,n),ce.updateOffset(this,t),this):Kc(this,e)}}function Kc(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function sS(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Nh(e.year())&&e.month()===1&&e.date()===29?(n=De(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Bh(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function G3(e){return e=Hr(e),Ri(this[e])?this[e]():this}function V3(e,t){if(typeof e=="object"){e=mg(e);var n=Y3(e),r,s=n.length;for(r=0;r68?1900:2e3)};var mS=il("FullYear",!0);function hD(){return Nh(this.year())}function dD(e,t,n,r,s,a,u){var c;return e<100&&e>=0?(c=new Date(e+400,t,n,r,s,a,u),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,r,s,a,u),c}function vu(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xc(e,t,n){var r=7+t-n,s=(7+vu(e,0,r).getUTCDay()-t)%7;return-s+r-1}function gS(e,t,n,r,s){var a=(7+n-r)%7,u=Xc(e,r,s),c=1+7*(t-1)+a+u,p,v;return c<=0?(p=e-1,v=Zl(p)+c):c>Zl(e)?(p=e+1,v=c-Zl(e)):(p=e,v=c),{year:p,dayOfYear:v}}function yu(e,t,n){var r=Xc(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,a,u;return s<1?(u=e.year()-1,a=s+ts(u,t,n)):s>ts(e.year(),t,n)?(a=s-ts(e.year(),t,n),u=e.year()+1):(u=e.year(),a=s),{week:a,year:u}}function ts(e,t,n){var r=Xc(e,t,n),s=Xc(e+1,t,n);return(Zl(e)-r+s)/7}we("w",["ww",2],"wo","week");we("W",["WW",2],"Wo","isoWeek");An("week","w");An("isoWeek","W");Ln("week",5);Ln("isoWeek",5);pe("w",Lt);pe("ww",Lt,Mr);pe("W",Lt);pe("WW",Lt,Mr);bu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=De(e)});function pD(e){return yu(e,this._week.dow,this._week.doy).week}var mD={dow:0,doy:6};function gD(){return this._week.dow}function vD(){return this._week.doy}function yD(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function wD(e){var t=yu(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}we("d",0,"do","day");we("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});we("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});we("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});we("e",0,0,"weekday");we("E",0,0,"isoWeekday");An("day","d");An("weekday","e");An("isoWeekday","E");Ln("day",11);Ln("weekday",11);Ln("isoWeekday",11);pe("d",Lt);pe("e",Lt);pe("E",Lt);pe("dd",function(e,t){return t.weekdaysMinRegex(e)});pe("ddd",function(e,t){return t.weekdaysShortRegex(e)});pe("dddd",function(e,t){return t.weekdaysRegex(e)});bu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Te(n).invalidWeekday=e});bu(["d","e","E"],function(e,t,n,r){t[r]=De(e)});function _D(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function xD(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function yg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var SD="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),vS="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),MD="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),kD=Tu,CD=Tu,OD=Tu;function ED(e,t){var n=si(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?yg(n,this._week.dow):e?n[e.day()]:n}function TD(e){return e===!0?yg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function bD(e){return e===!0?yg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function PD(e,t,n){var r,s,a,u=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Pi([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(s=rn.call(this._weekdaysParse,u),s!==-1?s:null):t==="ddd"?(s=rn.call(this._shortWeekdaysParse,u),s!==-1?s:null):(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null):t==="dddd"?(s=rn.call(this._weekdaysParse,u),s!==-1||(s=rn.call(this._shortWeekdaysParse,u),s!==-1)?s:(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null)):t==="ddd"?(s=rn.call(this._shortWeekdaysParse,u),s!==-1||(s=rn.call(this._weekdaysParse,u),s!==-1)?s:(s=rn.call(this._minWeekdaysParse,u),s!==-1?s:null)):(s=rn.call(this._minWeekdaysParse,u),s!==-1||(s=rn.call(this._weekdaysParse,u),s!==-1)?s:(s=rn.call(this._shortWeekdaysParse,u),s!==-1?s:null))}function RD(e,t,n){var r,s,a;if(this._weekdaysParseExact)return PD.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Pi([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function DD(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=_D(e,this.localeData()),this.add(e-t,"d")):t}function AD(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function LD(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=xD(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function jD(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ze(this,"_weekdaysRegex")||(this._weekdaysRegex=kD),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ND(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ze(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=CD),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ID(e){return this._weekdaysParseExact?(ze(this,"_weekdaysRegex")||wg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ze(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=OD),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function wg(){function e(m,O){return O.length-m.length}var t=[],n=[],r=[],s=[],a,u,c,p,v;for(a=0;a<7;a++)u=Pi([2e3,1]).day(a),c=pr(this.weekdaysMin(u,"")),p=pr(this.weekdaysShort(u,"")),v=pr(this.weekdays(u,"")),t.push(c),n.push(p),r.push(v),s.push(c),s.push(p),s.push(v);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function _g(){return this.hours()%12||12}function FD(){return this.hours()||24}we("H",["HH",2],0,"hour");we("h",["hh",2],0,_g);we("k",["kk",2],0,FD);we("hmm",0,0,function(){return""+_g.apply(this)+bi(this.minutes(),2)});we("hmmss",0,0,function(){return""+_g.apply(this)+bi(this.minutes(),2)+bi(this.seconds(),2)});we("Hmm",0,0,function(){return""+this.hours()+bi(this.minutes(),2)});we("Hmmss",0,0,function(){return""+this.hours()+bi(this.minutes(),2)+bi(this.seconds(),2)});function yS(e,t){we(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}yS("a",!0);yS("A",!1);An("hour","h");Ln("hour",13);function wS(e,t){return t._meridiemParse}pe("a",wS);pe("A",wS);pe("H",Lt);pe("h",Lt);pe("k",Lt);pe("HH",Lt,Mr);pe("hh",Lt,Mr);pe("kk",Lt,Mr);pe("hmm",lS);pe("hmmss",uS);pe("Hmm",lS);pe("Hmmss",uS);lt(["H","HH"],pn);lt(["k","kk"],function(e,t,n){var r=De(e);t[pn]=r===24?0:r});lt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});lt(["h","hh"],function(e,t,n){t[pn]=De(e),Te(n).bigHour=!0});lt("hmm",function(e,t,n){var r=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r)),Te(n).bigHour=!0});lt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r,2)),t[Ji]=De(e.substr(s)),Te(n).bigHour=!0});lt("Hmm",function(e,t,n){var r=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r))});lt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[pn]=De(e.substr(0,r)),t[ti]=De(e.substr(r,2)),t[Ji]=De(e.substr(s))});function UD(e){return(e+"").toLowerCase().charAt(0)==="p"}var $D=/[ap]\.?m?\.?/i,WD=il("Hours",!0);function BD(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var _S={calendar:R3,longDateFormat:j3,invalidDate:I3,ordinal:U3,dayOfMonthOrdinalParse:$3,relativeTime:B3,months:nD,monthsShort:fS,week:mD,weekdays:SD,weekdaysMin:MD,weekdaysShort:vS,meridiemParse:$D},Yt={},Ll={},wu;function zD(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=zh(a.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&zD(a,r)>=n-1)break;n--}t++}return wu}function YD(e){return e.match("^[^/\\\\]*$")!=null}function zh(e){var t=null,n;if(Yt[e]===void 0&&typeof module<"u"&&module&&module.exports&&YD(e))try{t=wu._abbr,n=require,n("./locale/"+e),Hs(t)}catch{Yt[e]=null}return Yt[e]}function Hs(e,t){var n;return e&&(Xn(t)?n=ls(e):n=xg(e,t),n?wu=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),wu._abbr}function xg(e,t){if(t!==null){var n,r=_S;if(t.abbr=e,Yt[e]!=null)nS("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Yt[e]._config;else if(t.parentLocale!=null)if(Yt[t.parentLocale]!=null)r=Yt[t.parentLocale]._config;else if(n=zh(t.parentLocale),n!=null)r=n._config;else return Ll[t.parentLocale]||(Ll[t.parentLocale]=[]),Ll[t.parentLocale].push({name:e,config:t}),null;return Yt[e]=new dg(Vm(r,t)),Ll[e]&&Ll[e].forEach(function(s){xg(s.name,s.config)}),Hs(e),Yt[e]}else return delete Yt[e],null}function GD(e,t){if(t!=null){var n,r,s=_S;Yt[e]!=null&&Yt[e].parentLocale!=null?Yt[e].set(Vm(Yt[e]._config,t)):(r=zh(e),r!=null&&(s=r._config),t=Vm(s,t),r==null&&(t.abbr=e),n=new dg(t),n.parentLocale=Yt[e],Yt[e]=n),Hs(e)}else Yt[e]!=null&&(Yt[e].parentLocale!=null?(Yt[e]=Yt[e].parentLocale,e===Hs()&&Hs(e)):Yt[e]!=null&&delete Yt[e]);return Yt[e]}function ls(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return wu;if(!si(e)){if(t=zh(e),t)return t;e=[e]}return HD(e)}function VD(){return qm(Yt)}function Sg(e){var t,n=e._a;return n&&Te(e).overflow===-2&&(t=n[Xi]<0||n[Xi]>11?Xi:n[Mi]<1||n[Mi]>Bh(n[Rn],n[Xi])?Mi:n[pn]<0||n[pn]>24||n[pn]===24&&(n[ti]!==0||n[Ji]!==0||n[Po]!==0)?pn:n[ti]<0||n[ti]>59?ti:n[Ji]<0||n[Ji]>59?Ji:n[Po]<0||n[Po]>999?Po:-1,Te(e)._overflowDayOfYear&&(tMi)&&(t=Mi),Te(e)._overflowWeeks&&t===-1&&(t=J3),Te(e)._overflowWeekday&&t===-1&&(t=eD),Te(e).overflow=t),e}var qD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,QD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,KD=/Z|[+-]\d\d(?::?\d\d)?/,rc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Hp=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ZD=/^\/?Date\((-?\d+)/i,XD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,JD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xS(e){var t,n,r=e._i,s=qD.exec(r)||QD.exec(r),a,u,c,p,v=rc.length,m=Hp.length;if(s){for(Te(e).iso=!0,t=0,n=v;tZl(u)||e._dayOfYear===0)&&(Te(e)._overflowDayOfYear=!0),n=vu(u,0,e._dayOfYear),e._a[Xi]=n.getUTCMonth(),e._a[Mi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[pn]===24&&e._a[ti]===0&&e._a[Ji]===0&&e._a[Po]===0&&(e._nextDay=!0,e._a[pn]=0),e._d=(e._useUTC?vu:dD).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[pn]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(Te(e).weekdayMismatch=!0)}}function aA(e){var t,n,r,s,a,u,c,p,v;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,u=4,n=va(t.GG,e._a[Rn],yu(At(),1,4).year),r=va(t.W,1),s=va(t.E,1),(s<1||s>7)&&(p=!0)):(a=e._locale._week.dow,u=e._locale._week.doy,v=yu(At(),a,u),n=va(t.gg,e._a[Rn],v.year),r=va(t.w,v.week),t.d!=null?(s=t.d,(s<0||s>6)&&(p=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(p=!0)):s=a),r<1||r>ts(n,a,u)?Te(e)._overflowWeeks=!0:p!=null?Te(e)._overflowWeekday=!0:(c=gS(n,r,s,a,u),e._a[Rn]=c.year,e._dayOfYear=c.dayOfYear)}ce.ISO_8601=function(){};ce.RFC_2822=function(){};function kg(e){if(e._f===ce.ISO_8601){xS(e);return}if(e._f===ce.RFC_2822){SS(e);return}e._a=[],Te(e).empty=!0;var t=""+e._i,n,r,s,a,u,c=t.length,p=0,v,m;for(s=rS(e._f,e._locale).match(pg)||[],m=s.length,n=0;n0&&Te(e).unusedInput.push(u),t=t.slice(t.indexOf(r)+r.length),p+=r.length),Fa[a]?(r?Te(e).empty=!1:Te(e).unusedTokens.push(a),X3(a,r,e)):e._strict&&!r&&Te(e).unusedTokens.push(a);Te(e).charsLeftOver=c-p,t.length>0&&Te(e).unusedInput.push(t),e._a[pn]<=12&&Te(e).bigHour===!0&&e._a[pn]>0&&(Te(e).bigHour=void 0),Te(e).parsedDateParts=e._a.slice(0),Te(e).meridiem=e._meridiem,e._a[pn]=lA(e._locale,e._a[pn],e._meridiem),v=Te(e).era,v!==null&&(e._a[Rn]=e._locale.erasConvertYear(v,e._a[Rn])),Mg(e),Sg(e)}function lA(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function uA(e){var t,n,r,s,a,u,c=!1,p=e._f.length;if(p===0){Te(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:jh()});function CS(e,t){var n,r;if(t.length===1&&si(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function PA(){if(!Xn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return hg(e,this),e=MS(e),e._a?(t=e._isUTC?Pi(e._a):At(e._a),this._isDSTShifted=this.isValid()&&xA(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function RA(){return this.isValid()?!this._isUTC:!1}function DA(){return this.isValid()?this._isUTC:!1}function ES(){return this.isValid()?this._isUTC&&this._offset===0:!1}var AA=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,LA=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ai(e,t){var n=e,r=null,s,a,u;return _c(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:os(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=AA.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:De(r[Mi])*s,h:De(r[pn])*s,m:De(r[ti])*s,s:De(r[Ji])*s,ms:De(Km(r[Po]*1e3))*s}):(r=LA.exec(e))?(s=r[1]==="-"?-1:1,n={y:So(r[2],s),M:So(r[3],s),w:So(r[4],s),d:So(r[5],s),h:So(r[6],s),m:So(r[7],s),s:So(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(u=jA(At(n.from),At(n.to)),n={},n.ms=u.milliseconds,n.M=u.months),a=new Hh(n),_c(e)&&ze(e,"_locale")&&(a._locale=e._locale),_c(e)&&ze(e,"_isValid")&&(a._isValid=e._isValid),a}ai.fn=Hh.prototype;ai.invalid=_A;function So(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function uw(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function jA(e,t){var n;return e.isValid()&&t.isValid()?(t=Og(t,e),e.isBefore(t)?n=uw(e,t):(n=uw(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function TS(e,t){return function(n,r){var s,a;return r!==null&&!isNaN(+r)&&(nS(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),s=ai(n,r),bS(this,s,e),this}}function bS(e,t,n,r){var s=t._milliseconds,a=Km(t._days),u=Km(t._months);e.isValid()&&(r=r??!0,u&&hS(e,Kc(e,"Month")+u*n),a&&sS(e,"Date",Kc(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&ce.updateOffset(e,a||u))}var NA=TS(1,"add"),IA=TS(-1,"subtract");function PS(e){return typeof e=="string"||e instanceof String}function FA(e){return oi(e)||Ou(e)||PS(e)||os(e)||$A(e)||UA(e)||e===null||e===void 0}function UA(e){var t=Ao(e)&&!fg(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,a,u=r.length;for(s=0;sn.valueOf():n.valueOf()9999?wc(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ri(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wc(n,"Z")):wc(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eL(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+s+a)}function tL(e){e||(e=this.isUtc()?ce.defaultFormatUtc:ce.defaultFormat);var t=wc(this,e);return this.localeData().postformat(t)}function nL(e,t){return this.isValid()&&(oi(e)&&e.isValid()||At(e).isValid())?ai({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rL(e){return this.from(At(),e)}function iL(e,t){return this.isValid()&&(oi(e)&&e.isValid()||At(e).isValid())?ai({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sL(e){return this.to(At(),e)}function RS(e){var t;return e===void 0?this._locale._abbr:(t=ls(e),t!=null&&(this._locale=t),this)}var DS=zr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function AS(){return this._locale}var Jc=1e3,Ua=60*Jc,eh=60*Ua,LS=(365*400+97)*24*eh;function $a(e,t){return(e%t+t)%t}function jS(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-LS:new Date(e,t,n).valueOf()}function NS(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-LS:Date.UTC(e,t,n)}function oL(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?NS:jS,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$a(t+(this._isUTC?0:this.utcOffset()*Ua),eh);break;case"minute":t=this._d.valueOf(),t-=$a(t,Ua);break;case"second":t=this._d.valueOf(),t-=$a(t,Jc);break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function aL(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?NS:jS,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=eh-$a(t+(this._isUTC?0:this.utcOffset()*Ua),eh)-1;break;case"minute":t=this._d.valueOf(),t+=Ua-$a(t,Ua)-1;break;case"second":t=this._d.valueOf(),t+=Jc-$a(t,Jc)-1;break}return this._d.setTime(t),ce.updateOffset(this,!0),this}function lL(){return this._d.valueOf()-(this._offset||0)*6e4}function uL(){return Math.floor(this.valueOf()/1e3)}function fL(){return new Date(this.valueOf())}function cL(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function hL(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function dL(){return this.isValid()?this.toISOString():null}function pL(){return cg(this)}function mL(){return Ls({},Te(this))}function gL(){return Te(this).overflow}function vL(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}we("N",0,0,"eraAbbr");we("NN",0,0,"eraAbbr");we("NNN",0,0,"eraAbbr");we("NNNN",0,0,"eraName");we("NNNNN",0,0,"eraNarrow");we("y",["y",1],"yo","eraYear");we("y",["yy",2],0,"eraYear");we("y",["yyy",3],0,"eraYear");we("y",["yyyy",4],0,"eraYear");pe("N",Eg);pe("NN",Eg);pe("NNN",Eg);pe("NNNN",TL);pe("NNNNN",bL);lt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Te(n).era=s:Te(n).invalidEra=e});pe("y",sl);pe("yy",sl);pe("yyy",sl);pe("yyyy",sl);pe("yo",PL);lt(["y","yy","yyy","yyyy"],Rn);lt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Rn]=n._locale.eraYearOrdinalParse(e,s):t[Rn]=parseInt(e,10)});function yL(e,t){var n,r,s,a=this._eras||ls("en")._eras;for(n=0,r=a.length;n=0)return a[r]}function _L(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ce(e.since).year():ce(e.since).year()+(t-e.offset)*n}function xL(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ea&&(t=a),IL.call(this,e,t,n,r,s))}function IL(e,t,n,r,s){var a=gS(e,t,n,r,s),u=vu(a.year,0,a.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}we("Q",0,"Qo","quarter");An("quarter","Q");Ln("quarter",7);pe("Q",oS);lt("Q",function(e,t){t[Xi]=(De(e)-1)*3});function FL(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}we("D",["DD",2],"Do","date");An("date","D");Ln("date",9);pe("D",Lt);pe("DD",Lt,Mr);pe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});lt(["D","DD"],Mi);lt("Do",function(e,t){t[Mi]=De(e.match(Lt)[0])});var FS=il("Date",!0);we("DDD",["DDDD",3],"DDDo","dayOfYear");An("dayOfYear","DDD");Ln("dayOfYear",4);pe("DDD",Fh);pe("DDDD",aS);lt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=De(e)});function UL(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}we("m",["mm",2],0,"minute");An("minute","m");Ln("minute",14);pe("m",Lt);pe("mm",Lt,Mr);lt(["m","mm"],ti);var $L=il("Minutes",!1);we("s",["ss",2],0,"second");An("second","s");Ln("second",15);pe("s",Lt);pe("ss",Lt,Mr);lt(["s","ss"],Ji);var WL=il("Seconds",!1);we("S",0,0,function(){return~~(this.millisecond()/100)});we(0,["SS",2],0,function(){return~~(this.millisecond()/10)});we(0,["SSS",3],0,"millisecond");we(0,["SSSS",4],0,function(){return this.millisecond()*10});we(0,["SSSSS",5],0,function(){return this.millisecond()*100});we(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});we(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});we(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});we(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});An("millisecond","ms");Ln("millisecond",16);pe("S",Fh,oS);pe("SS",Fh,Mr);pe("SSS",Fh,aS);var js,US;for(js="SSSS";js.length<=9;js+="S")pe(js,sl);function BL(e,t){t[Po]=De(("0."+e)*1e3)}for(js="S";js.length<=9;js+="S")lt(js,BL);US=il("Milliseconds",!1);we("z",0,0,"zoneAbbr");we("zz",0,0,"zoneName");function zL(){return this._isUTC?"UTC":""}function HL(){return this._isUTC?"Coordinated Universal Time":""}var ie=Eu.prototype;ie.add=NA;ie.calendar=zA;ie.clone=HA;ie.diff=ZA;ie.endOf=aL;ie.format=tL;ie.from=nL;ie.fromNow=rL;ie.to=iL;ie.toNow=sL;ie.get=G3;ie.invalidAt=gL;ie.isAfter=YA;ie.isBefore=GA;ie.isBetween=VA;ie.isSame=qA;ie.isSameOrAfter=QA;ie.isSameOrBefore=KA;ie.isValid=pL;ie.lang=DS;ie.locale=RS;ie.localeData=AS;ie.max=pA;ie.min=dA;ie.parsingFlags=mL;ie.set=V3;ie.startOf=oL;ie.subtract=IA;ie.toArray=cL;ie.toObject=hL;ie.toDate=fL;ie.toISOString=JA;ie.inspect=eL;typeof Symbol<"u"&&Symbol.for!=null&&(ie[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ie.toJSON=dL;ie.toString=XA;ie.unix=uL;ie.valueOf=lL;ie.creationData=vL;ie.eraName=xL;ie.eraNarrow=SL;ie.eraAbbr=ML;ie.eraYear=kL;ie.year=mS;ie.isLeapYear=hD;ie.weekYear=RL;ie.isoWeekYear=DL;ie.quarter=ie.quarters=FL;ie.month=dS;ie.daysInMonth=uD;ie.week=ie.weeks=yD;ie.isoWeek=ie.isoWeeks=wD;ie.weeksInYear=jL;ie.weeksInWeekYear=NL;ie.isoWeeksInYear=AL;ie.isoWeeksInISOWeekYear=LL;ie.date=FS;ie.day=ie.days=DD;ie.weekday=AD;ie.isoWeekday=LD;ie.dayOfYear=UL;ie.hour=ie.hours=WD;ie.minute=ie.minutes=$L;ie.second=ie.seconds=WL;ie.millisecond=ie.milliseconds=US;ie.utcOffset=MA;ie.utc=CA;ie.local=OA;ie.parseZone=EA;ie.hasAlignedHourOffset=TA;ie.isDST=bA;ie.isLocal=RA;ie.isUtcOffset=DA;ie.isUtc=ES;ie.isUTC=ES;ie.zoneAbbr=zL;ie.zoneName=HL;ie.dates=zr("dates accessor is deprecated. Use date instead.",FS);ie.months=zr("months accessor is deprecated. Use month instead",dS);ie.years=zr("years accessor is deprecated. Use year instead",mS);ie.zone=zr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",kA);ie.isDSTShifted=zr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",PA);function YL(e){return At(e*1e3)}function GL(){return At.apply(null,arguments).parseZone()}function $S(e){return e}var He=dg.prototype;He.calendar=D3;He.longDateFormat=N3;He.invalidDate=F3;He.ordinal=W3;He.preparse=$S;He.postformat=$S;He.relativeTime=z3;He.pastFuture=H3;He.set=P3;He.eras=yL;He.erasParse=wL;He.erasConvertYear=_L;He.erasAbbrRegex=OL;He.erasNameRegex=CL;He.erasNarrowRegex=EL;He.months=sD;He.monthsShort=oD;He.monthsParse=lD;He.monthsRegex=cD;He.monthsShortRegex=fD;He.week=pD;He.firstDayOfYear=vD;He.firstDayOfWeek=gD;He.weekdays=ED;He.weekdaysMin=bD;He.weekdaysShort=TD;He.weekdaysParse=RD;He.weekdaysRegex=jD;He.weekdaysShortRegex=ND;He.weekdaysMinRegex=ID;He.isPM=UD;He.meridiem=BD;function th(e,t,n,r){var s=ls(),a=Pi().set(r,t);return s[n](a,e)}function WS(e,t,n){if(os(e)&&(t=e,e=void 0),e=e||"",t!=null)return th(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=th(e,r,n,"month");return s}function bg(e,t,n,r){typeof e=="boolean"?(os(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,os(t)&&(n=t,t=void 0),t=t||"");var s=ls(),a=e?s._week.dow:0,u,c=[];if(n!=null)return th(t,(n+a)%7,r,"day");for(u=0;u<7;u++)c[u]=th(t,(u+a)%7,r,"day");return c}function VL(e,t){return WS(e,t,"months")}function qL(e,t){return WS(e,t,"monthsShort")}function QL(e,t,n){return bg(e,t,n,"weekdays")}function KL(e,t,n){return bg(e,t,n,"weekdaysShort")}function ZL(e,t,n){return bg(e,t,n,"weekdaysMin")}Hs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=De(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});ce.lang=zr("moment.lang is deprecated. Use moment.locale instead.",Hs);ce.langData=zr("moment.langData is deprecated. Use moment.localeData instead.",ls);var Gi=Math.abs;function XL(){var e=this._data;return this._milliseconds=Gi(this._milliseconds),this._days=Gi(this._days),this._months=Gi(this._months),e.milliseconds=Gi(e.milliseconds),e.seconds=Gi(e.seconds),e.minutes=Gi(e.minutes),e.hours=Gi(e.hours),e.months=Gi(e.months),e.years=Gi(e.years),this}function BS(e,t,n,r){var s=ai(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function JL(e,t){return BS(this,e,t,1)}function ej(e,t){return BS(this,e,t,-1)}function fw(e){return e<0?Math.floor(e):Math.ceil(e)}function tj(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,a,u,c,p;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=fw(Xm(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=Nr(e/1e3),r.seconds=s%60,a=Nr(s/60),r.minutes=a%60,u=Nr(a/60),r.hours=u%24,t+=Nr(u/24),p=Nr(zS(t)),n+=p,t-=fw(Xm(p)),c=Nr(n/12),n%=12,r.days=t,r.months=n,r.years=c,this}function zS(e){return e*4800/146097}function Xm(e){return e*146097/4800}function nj(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Hr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+zS(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Xm(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function rj(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+De(this._months/12)*31536e6:NaN}function us(e){return function(){return this.as(e)}}var ij=us("ms"),sj=us("s"),oj=us("m"),aj=us("h"),lj=us("d"),uj=us("w"),fj=us("M"),cj=us("Q"),hj=us("y");function dj(){return ai(this)}function pj(e){return e=Hr(e),this.isValid()?this[e+"s"]():NaN}function Ho(e){return function(){return this.isValid()?this._data[e]:NaN}}var mj=Ho("milliseconds"),gj=Ho("seconds"),vj=Ho("minutes"),yj=Ho("hours"),wj=Ho("days"),_j=Ho("months"),xj=Ho("years");function Sj(){return Nr(this.days()/7)}var qi=Math.round,Pa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Mj(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function kj(e,t,n,r){var s=ai(e).abs(),a=qi(s.as("s")),u=qi(s.as("m")),c=qi(s.as("h")),p=qi(s.as("d")),v=qi(s.as("M")),m=qi(s.as("w")),O=qi(s.as("y")),E=a<=n.ss&&["s",a]||a0,E[4]=r,Mj.apply(null,E)}function Cj(e){return e===void 0?qi:typeof e=="function"?(qi=e,!0):!1}function Oj(e,t){return Pa[e]===void 0?!1:t===void 0?Pa[e]:(Pa[e]=t,e==="s"&&(Pa.ss=t-1),!0)}function Ej(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Pa,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Pa,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),a=kj(this,!n,r,s),n&&(a=s.pastFuture(+this,a)),s.postformat(a)}var Yp=Math.abs;function da(e){return(e>0)-(e<0)||+e}function Gh(){if(!this.isValid())return this.localeData().invalidDate();var e=Yp(this._milliseconds)/1e3,t=Yp(this._days),n=Yp(this._months),r,s,a,u,c=this.asSeconds(),p,v,m,O;return c?(r=Nr(e/60),s=Nr(r/60),e%=60,r%=60,a=Nr(n/12),n%=12,u=e?e.toFixed(3).replace(/\.?0+$/,""):"",p=c<0?"-":"",v=da(this._months)!==da(c)?"-":"",m=da(this._days)!==da(c)?"-":"",O=da(this._milliseconds)!==da(c)?"-":"",p+"P"+(a?v+a+"Y":"")+(n?v+n+"M":"")+(t?m+t+"D":"")+(s||r||e?"T":"")+(s?O+s+"H":"")+(r?O+r+"M":"")+(e?O+u+"S":"")):"P0D"}var $e=Hh.prototype;$e.isValid=wA;$e.abs=XL;$e.add=JL;$e.subtract=ej;$e.as=nj;$e.asMilliseconds=ij;$e.asSeconds=sj;$e.asMinutes=oj;$e.asHours=aj;$e.asDays=lj;$e.asWeeks=uj;$e.asMonths=fj;$e.asQuarters=cj;$e.asYears=hj;$e.valueOf=rj;$e._bubble=tj;$e.clone=dj;$e.get=pj;$e.milliseconds=mj;$e.seconds=gj;$e.minutes=vj;$e.hours=yj;$e.days=wj;$e.weeks=Sj;$e.months=_j;$e.years=xj;$e.humanize=Ej;$e.toISOString=Gh;$e.toString=Gh;$e.toJSON=Gh;$e.locale=RS;$e.localeData=AS;$e.toIsoString=zr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gh);$e.lang=DS;we("X",0,0,"unix");we("x",0,0,"valueOf");pe("x",$h);pe("X",Q3);lt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});lt("x",function(e,t,n){n._d=new Date(De(e))});//! moment.js +ce.version="2.29.3";T3(At);ce.fn=ie;ce.min=mA;ce.max=gA;ce.now=vA;ce.utc=Pi;ce.unix=YL;ce.months=VL;ce.isDate=Ou;ce.locale=Hs;ce.invalid=jh;ce.duration=ai;ce.isMoment=oi;ce.weekdays=QL;ce.parseZone=GL;ce.localeData=ls;ce.isDuration=_c;ce.monthsShort=qL;ce.weekdaysMin=ZL;ce.defineLocale=xg;ce.updateLocale=GD;ce.locales=VD;ce.weekdaysShort=KL;ce.normalizeUnits=Hr;ce.relativeTimeRounding=Cj;ce.relativeTimeThreshold=Oj;ce.calendarFormat=BA;ce.prototype=ie;ce.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Os(e,t=!1){let n=window.location.href.split("?")[1];return t&&n?n="?"+n:n="","/~debug/"+e+n}function mr(e,t){const n=new Date(e),r=function(s){return s>=10?s:"0"+s};return`~${n.getUTCFullYear()}.${n.getUTCMonth()+1}.${r(n.getUTCDate())}..${r(n.getUTCHours())}.${r(n.getUTCMinutes())}.${r(n.getUTCSeconds())}${t?".."+Math.floor(n.getUTCMilliseconds()/1e3*65536).toString(16).padStart(4,"0"):""}`}function bs(e){return e.reduce((t,n)=>t+n+" ","")}function Tj(e){let t="";for(let n=0;n=97&&a<=122||a>=48&&a<=57||r==="-"?s=r:s="~"+a.toString(16)+"."}t=t+s}return"~~"+t}class bj{setAuthTokens(t){this.authTokens=t,this.bindPaths=[],this.bind=this.bind.bind(this)}bind(t,n,r=this.authTokens.ship,s,a,u,c){this.bindPaths=ln.uniq([...this.bindPaths,t]),window.subscriptionId=window.urb.subscribe(r,s,t,p=>{u(p)},p=>{a({data:p,from:{ship:r,path:t}})},p=>{c(p)})}action(t,n,r){return new Promise((s,a)=>{window.urb.poke(ship,t,n,r,u=>{s(u)},u=>{a(u)})})}dbugAction(t){return this.action("dbug","dbug-action",t)}bindToVerb(t){return this.bind("/verb/events","PUT",this.authTokens.ship,t,n=>{n.data.app=t,qe.handleEvent({data:{local:{verbResult:n.data}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"failed to establish verb connection to "+t}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"verb connection to "+t+" was dropped"}}}})})}bindToVerbPlus(t){return this.bind("/verb/events-plus","PUT",this.authTokens.ship,t,n=>{n.data.app=t,qe.handleEvent({data:{local:{verbEventPlus:{gill:`~${this.authTokens.ship}/${t}`,log:n.data}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"failed to establish verb+ connection to "+t}}}})},()=>{qe.handleEvent({data:{local:{verbStatus:{app:t,msg:"verb+ connection to "+t+" was dropped"}}}})})}getJson(t,n,r){let s="/~debug"+t+".json";const a=window.location.href.split("?")[1];a&&(s=s+"?"+a),fetch(s).then(u=>{if(!u.ok)console.error("Network response not ok"),r();else return u.json()}).then(u=>{qe.handleEvent({data:{local:n(u)}})}).catch(u=>{console.error(`JSON fetch on ${s} failed:`,u),r()})}wrapLocal(t){return n=>{let r={};return r[t]=n,r.status=null,r}}showStatus(t){return()=>{qe.handleEvent({data:{local:{status:t}}})}}getApps(){this.getJson("/apps",this.wrapLocal("apps"),this.showStatus("error fetching apps"))}getAppDetails(t){this.getJson("/app/"+t,n=>(n.app=t,this.wrapLocal("app")(n)),()=>{qe.handleEvent({data:{local:{appFailed:t}}})})}getAppState(t,n=""){n!==""&&(n="/"+Tj(n)),this.getJson("/app/"+t+"/state"+n,r=>(r.app=t,this.wrapLocal("appState")(r)),()=>{qe.handleEvent({data:{local:{appFailed:t}}})})}getThreads(){this.getJson("/spider/threads",this.wrapLocal("threads"),this.showStatus("error fetching threads"))}killThread(t){return this.action("spider","spider-stop",{tid:t,nice:!1}).then(this.getThreads.bind(this))}getPeers(){this.getJson("/ames/peer",this.wrapLocal("amesPeers"),this.showStatus("error fetching ames peers"))}getPeer(t){this.getJson(`/ames/peer/${t}`,n=>(n.who=t,this.wrapLocal("amesPeer")(n)),this.showStatus("error fetching ames details for "+t))}getTimers(){this.getJson("/behn/timers",this.wrapLocal("behnTimers"),this.showStatus("error fetching behn timers"))}getCommits(){this.getJson("/clay/commits",this.wrapLocal("clayCommits"),this.showStatus("error fetching clay commits"))}getBindings(){this.getJson("/eyre/bindings",this.wrapLocal("eyreBindings"),this.showStatus("error fetching eyre bindings"))}getCache(){this.getJson("/eyre/cache",this.wrapLocal("eyreCache"),this.showStatus("error fetching eyre cache"))}getConnections(){this.getJson("/eyre/connections",this.wrapLocal("eyreConnections"),this.showStatus("error fetching eyre connections"))}getAuthenticationState(){this.getJson("/eyre/authentication",this.wrapLocal("eyreAuthentication"),this.showStatus("error fetching eyre authentication state"))}getChannels(){this.getJson("/eyre/channels",this.wrapLocal("eyreChannels"),this.showStatus("error fetching eyre channels"))}clearCache(t){return this.action("dbug","json",{"clear-eyre-cache":{url:t}}).then(this.getCache.bind(this))}sidebarToggle(){let t=!0;qe.state.sidebarShown===!0&&(t=!1),qe.handleEvent({data:{local:{sidebarToggle:t}}})}}let Pg=new bj;window.api=Pg;class Pj{start(){Pg.authTokens||console.error("~~~ ERROR: Must set api.authTokens before operation ~~~")}handleEvent(t){qe.handleEvent(t)}handleError(t){console.error(t)}handleQuitSilently(t){}handleQuitAndResubscribe(t){}}let Rj=new Pj;class Dj extends oe.Component{render(){const{props:t}=this;let n=t.selected?"bg-gray5 bg-gray1-d":"pointer hover-bg-gray5 hover-bg-gray1-d";return y.jsx(ug,{to:Os(t.what,!0),children:y.jsx("div",{className:"w-100 v-mid f9 ph4 z1 pv1 "+n,children:y.jsx("p",{className:"f9 dib",children:t.what})})},"what")}}class Cs extends oe.Component{render(){const{props:t}=this;let n=["apps","logs","spider","ames","behn","eyre"];n=n.map(a=>y.jsx(Dj,{what:a,selected:t.selected===a}));let r=this.props.rightPanelHide?"dn-s":"";const s=t.status?y.jsx("div",{style:{position:"absolute",right:"16px",bottom:"16px",padding:"8px",border:"1px solid #e22"},children:t.status}):null;return y.jsx("div",{className:"absolute h-100 w-100 mono",children:y.jsxs("div",{className:"cf w-100 h-100 flex",children:[y.jsxs("div",{className:"bn br-m br-l br-xl b--gray4 b--gray1-d lh-copy h-100 flex-shrink-0 mw5-m mw5-l mw5-xl pt3 pt0-m pt0-l pt0-xl relative",children:[y.jsx("a",{className:"db dn-m dn-l dn-xl f8 pb3 pl3",href:"/",children:"⟵ Landscape"}),y.jsxs("div",{className:"overflow-y-scroll h-100",children:[y.jsx("div",{className:"w-100 bg-transparent",children:y.jsx(ug,{className:"dib f9 pointer green2 gray4-d pa4",to:"/~chat/join/~/~dopzod/urbit-help",children:"Get help"})}),n]})]}),s,y.jsx("div",{className:"h-100 w-100 flex-auto overflow-scroll relative "+r,style:{flexGrow:1,padding:"8px"},children:this.props.children})]})})}}class Aj extends oe.Component{render(){return y.jsx("div",{className:"h-100 w-100 overflow-x-hidden flex flex-column bg-white bg-gray0-d dn db-ns",children:y.jsx("div",{className:"pl3 pr3 pt2 dt pb3 w-100 h-100",children:y.jsx("p",{className:"f8 pt3 gray2 w-100 h-100 dtc v-mid tc",children:this.props.text})})})}}var Rg={exports:{}};const Lj={},jj=Object.freeze(Object.defineProperty({__proto__:null,default:Lj},Symbol.toStringTag,{value:"Module"})),Nj=ZT(jj);Rg.exports;(function(e){(function(t,n){function r(P,f){if(!P)throw new Error(f||"Assertion failed")}function s(P,f){P.super_=f;var g=function(){};g.prototype=f.prototype,P.prototype=new g,P.prototype.constructor=P}function a(P,f,g){if(a.isBN(P))return P;this.negative=0,this.words=null,this.length=0,this.red=null,P!==null&&((f==="le"||f==="be")&&(g=f,f=10),this._init(P||0,f||10,g||"be"))}typeof t=="object"?t.exports=a:n.BN=a,a.BN=a,a.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=Nj.Buffer}catch{}a.isBN=function(f){return f instanceof a?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===a.wordSize&&Array.isArray(f.words)},a.max=function(f,g){return f.cmp(g)>0?f:g},a.min=function(f,g){return f.cmp(g)<0?f:g},a.prototype._init=function(f,g,S){if(typeof f=="number")return this._initNumber(f,g,S);if(typeof f=="object")return this._initArray(f,g,S);g==="hex"&&(g=16),r(g===(g|0)&&g>=2&&g<=36),f=f.toString().replace(/\s+/g,"");var C=0;f[0]==="-"&&(C++,this.negative=1),C=0;C-=3)L=f[C]|f[C-1]<<8|f[C-2]<<16,this.words[b]|=L<>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);else if(S==="le")for(C=0,b=0;C>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);return this.strip()};function c(P,f){var g=P.charCodeAt(f);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function p(P,f,g){var S=c(P,g);return g-1>=f&&(S|=c(P,g-1)<<4),S}a.prototype._parseHex=function(f,g,S){this.length=Math.ceil((f.length-g)/6),this.words=new Array(this.length);for(var C=0;C=g;C-=2)R=p(f,g,C)<=18?(b-=18,L+=1,this.words[L]|=R>>>26):b+=8;else{var _=f.length-g;for(C=_%2===0?g+1:g;C=18?(b-=18,L+=1,this.words[L]|=R>>>26):b+=8}this.strip()};function v(P,f,g,S){for(var C=0,b=Math.min(P.length,g),L=f;L=49?C+=R-49+10:R>=17?C+=R-17+10:C+=R}return C}a.prototype._parseBase=function(f,g,S){this.words=[0],this.length=1;for(var C=0,b=1;b<=67108863;b*=g)C++;C--,b=b/g|0;for(var L=f.length-S,R=L%C,_=Math.min(L,L-R)+S,h=0,M=S;M<_;M+=C)h=v(f,M,M+C,g),this.imuln(b),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(R!==0){var G=1;for(h=v(f,M,f.length,g),M=0;M1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],O=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(f,g){f=f||10,g=g|0||1;var S;if(f===16||f==="hex"){S="";for(var C=0,b=0,L=0;L>>24-C&16777215,b!==0||L!==this.length-1?S=m[6-_.length]+_+S:S=_+S,C+=2,C>=26&&(C-=26,L--)}for(b!==0&&(S=b.toString(16)+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(f===(f|0)&&f>=2&&f<=36){var h=O[f],M=E[f];S="";var G=this.clone();for(G.negative=0;!G.isZero();){var se=G.modn(M).toString(f);G=G.idivn(M),G.isZero()?S=se+S:S=m[h-se.length]+se+S}for(this.isZero()&&(S="0"+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(f,g){return r(typeof u<"u"),this.toArrayLike(u,f,g)},a.prototype.toArray=function(f,g){return this.toArrayLike(Array,f,g)},a.prototype.toArrayLike=function(f,g,S){var C=this.byteLength(),b=S||Math.max(1,C);r(C<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0"),this.strip();var L=g==="le",R=new f(b),_,h,M=this.clone();if(L){for(h=0;!M.isZero();h++)_=M.andln(255),M.iushrn(8),R[h]=_;for(;h=4096&&(S+=13,g>>>=13),g>=64&&(S+=7,g>>>=7),g>=8&&(S+=4,g>>>=4),g>=2&&(S+=2,g>>>=2),S+g},a.prototype._zeroBits=function(f){if(f===0)return 26;var g=f,S=0;return g&8191||(S+=13,g>>>=13),g&127||(S+=7,g>>>=7),g&15||(S+=4,g>>>=4),g&3||(S+=2,g>>>=2),g&1||S++,S},a.prototype.bitLength=function(){var f=this.words[this.length-1],g=this._countBits(f);return(this.length-1)*26+g};function F(P){for(var f=new Array(P.bitLength()),g=0;g>>C}return f}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,g=0;gf.length?this.clone().ior(f):f.clone().ior(this)},a.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},a.prototype.iuand=function(f){var g;this.length>f.length?g=f:g=this;for(var S=0;Sf.length?this.clone().iand(f):f.clone().iand(this)},a.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},a.prototype.iuxor=function(f){var g,S;this.length>f.length?(g=this,S=f):(g=f,S=this);for(var C=0;Cf.length?this.clone().ixor(f):f.clone().ixor(this)},a.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},a.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var g=Math.ceil(f/26)|0,S=f%26;this._expand(g),S>0&&g--;for(var C=0;C0&&(this.words[C]=~this.words[C]&67108863>>26-S),this.strip()},a.prototype.notn=function(f){return this.clone().inotn(f)},a.prototype.setn=function(f,g){r(typeof f=="number"&&f>=0);var S=f/26|0,C=f%26;return this._expand(S+1),g?this.words[S]=this.words[S]|1<f.length?(S=this,C=f):(S=f,C=this);for(var b=0,L=0;L>>26;for(;b!==0&&L>>26;if(this.length=S.length,b!==0)this.words[this.length]=b,this.length++;else if(S!==this)for(;Lf.length?this.clone().iadd(f):f.clone().iadd(this)},a.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var g=this.iadd(f);return f.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var S=this.cmp(f);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var C,b;S>0?(C=this,b=f):(C=f,b=this);for(var L=0,R=0;R>26,this.words[R]=g&67108863;for(;L!==0&&R>26,this.words[R]=g&67108863;if(L===0&&R>>26,G=_&67108863,se=Math.min(h,f.length-1),ae=Math.max(0,h-P.length+1);ae<=se;ae++){var re=h-ae|0;C=P.words[re]|0,b=f.words[ae]|0,L=C*b+G,M+=L/67108864|0,G=L&67108863}g.words[h]=G|0,_=M|0}return _!==0?g.words[h]=_|0:g.length--,g.strip()}var Q=function(f,g,S){var C=f.words,b=g.words,L=S.words,R=0,_,h,M,G=C[0]|0,se=G&8191,ae=G>>>13,re=C[1]|0,ye=re&8191,Me=re>>>13,Be=C[2]|0,Re=Be&8191,Xe=Be>>>13,ui=C[3]|0,Je=ui&8191,vt=ui>>>13,_n=C[4]|0,rt=_n&8191,jt=_n>>>13,Gn=C[5]|0,Ct=Gn&8191,Nt=Gn>>>13,fi=C[6]|0,Ue=fi&8191,it=fi>>>13,Di=C[7]|0,It=Di&8191,st=Di>>>13,Yo=C[8]|0,Ye=Yo&8191,Ge=Yo>>>13,Ai=C[9]|0,Ne=Ai&8191,ut=Ai>>>13,Li=b[0]|0,yt=Li&8191,ft=Li>>>13,Yr=b[1]|0,ct=Yr&8191,ht=Yr>>>13,Go=b[2]|0,Ke=Go&8191,Ot=Go>>>13,Ks=b[3]|0,Et=Ks&8191,wt=Ks>>>13,ci=b[4]|0,_t=ci&8191,xt=ci>>>13,ji=b[5]|0,ot=ji&8191,Ft=ji>>>13,Vo=b[6]|0,St=Vo&8191,Ut=Vo>>>13,fs=b[7]|0,Tt=fs&8191,Mt=fs>>>13,Cr=b[8]|0,$t=Cr&8191,Wt=Cr>>>13,qo=b[9]|0,Bt=qo&8191,zt=qo>>>13;S.negative=f.negative^g.negative,S.length=19,_=Math.imul(se,yt),h=Math.imul(se,ft),h=h+Math.imul(ae,yt)|0,M=Math.imul(ae,ft);var Cn=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,_=Math.imul(ye,yt),h=Math.imul(ye,ft),h=h+Math.imul(Me,yt)|0,M=Math.imul(Me,ft),_=_+Math.imul(se,ct)|0,h=h+Math.imul(se,ht)|0,h=h+Math.imul(ae,ct)|0,M=M+Math.imul(ae,ht)|0;var Zs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Zs>>>26)|0,Zs&=67108863,_=Math.imul(Re,yt),h=Math.imul(Re,ft),h=h+Math.imul(Xe,yt)|0,M=Math.imul(Xe,ft),_=_+Math.imul(ye,ct)|0,h=h+Math.imul(ye,ht)|0,h=h+Math.imul(Me,ct)|0,M=M+Math.imul(Me,ht)|0,_=_+Math.imul(se,Ke)|0,h=h+Math.imul(se,Ot)|0,h=h+Math.imul(ae,Ke)|0,M=M+Math.imul(ae,Ot)|0;var Xs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Xs>>>26)|0,Xs&=67108863,_=Math.imul(Je,yt),h=Math.imul(Je,ft),h=h+Math.imul(vt,yt)|0,M=Math.imul(vt,ft),_=_+Math.imul(Re,ct)|0,h=h+Math.imul(Re,ht)|0,h=h+Math.imul(Xe,ct)|0,M=M+Math.imul(Xe,ht)|0,_=_+Math.imul(ye,Ke)|0,h=h+Math.imul(ye,Ot)|0,h=h+Math.imul(Me,Ke)|0,M=M+Math.imul(Me,Ot)|0,_=_+Math.imul(se,Et)|0,h=h+Math.imul(se,wt)|0,h=h+Math.imul(ae,Et)|0,M=M+Math.imul(ae,wt)|0;var Js=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(Js>>>26)|0,Js&=67108863,_=Math.imul(rt,yt),h=Math.imul(rt,ft),h=h+Math.imul(jt,yt)|0,M=Math.imul(jt,ft),_=_+Math.imul(Je,ct)|0,h=h+Math.imul(Je,ht)|0,h=h+Math.imul(vt,ct)|0,M=M+Math.imul(vt,ht)|0,_=_+Math.imul(Re,Ke)|0,h=h+Math.imul(Re,Ot)|0,h=h+Math.imul(Xe,Ke)|0,M=M+Math.imul(Xe,Ot)|0,_=_+Math.imul(ye,Et)|0,h=h+Math.imul(ye,wt)|0,h=h+Math.imul(Me,Et)|0,M=M+Math.imul(Me,wt)|0,_=_+Math.imul(se,_t)|0,h=h+Math.imul(se,xt)|0,h=h+Math.imul(ae,_t)|0,M=M+Math.imul(ae,xt)|0;var eo=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(eo>>>26)|0,eo&=67108863,_=Math.imul(Ct,yt),h=Math.imul(Ct,ft),h=h+Math.imul(Nt,yt)|0,M=Math.imul(Nt,ft),_=_+Math.imul(rt,ct)|0,h=h+Math.imul(rt,ht)|0,h=h+Math.imul(jt,ct)|0,M=M+Math.imul(jt,ht)|0,_=_+Math.imul(Je,Ke)|0,h=h+Math.imul(Je,Ot)|0,h=h+Math.imul(vt,Ke)|0,M=M+Math.imul(vt,Ot)|0,_=_+Math.imul(Re,Et)|0,h=h+Math.imul(Re,wt)|0,h=h+Math.imul(Xe,Et)|0,M=M+Math.imul(Xe,wt)|0,_=_+Math.imul(ye,_t)|0,h=h+Math.imul(ye,xt)|0,h=h+Math.imul(Me,_t)|0,M=M+Math.imul(Me,xt)|0,_=_+Math.imul(se,ot)|0,h=h+Math.imul(se,Ft)|0,h=h+Math.imul(ae,ot)|0,M=M+Math.imul(ae,Ft)|0;var to=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(to>>>26)|0,to&=67108863,_=Math.imul(Ue,yt),h=Math.imul(Ue,ft),h=h+Math.imul(it,yt)|0,M=Math.imul(it,ft),_=_+Math.imul(Ct,ct)|0,h=h+Math.imul(Ct,ht)|0,h=h+Math.imul(Nt,ct)|0,M=M+Math.imul(Nt,ht)|0,_=_+Math.imul(rt,Ke)|0,h=h+Math.imul(rt,Ot)|0,h=h+Math.imul(jt,Ke)|0,M=M+Math.imul(jt,Ot)|0,_=_+Math.imul(Je,Et)|0,h=h+Math.imul(Je,wt)|0,h=h+Math.imul(vt,Et)|0,M=M+Math.imul(vt,wt)|0,_=_+Math.imul(Re,_t)|0,h=h+Math.imul(Re,xt)|0,h=h+Math.imul(Xe,_t)|0,M=M+Math.imul(Xe,xt)|0,_=_+Math.imul(ye,ot)|0,h=h+Math.imul(ye,Ft)|0,h=h+Math.imul(Me,ot)|0,M=M+Math.imul(Me,Ft)|0,_=_+Math.imul(se,St)|0,h=h+Math.imul(se,Ut)|0,h=h+Math.imul(ae,St)|0,M=M+Math.imul(ae,Ut)|0;var or=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(or>>>26)|0,or&=67108863,_=Math.imul(It,yt),h=Math.imul(It,ft),h=h+Math.imul(st,yt)|0,M=Math.imul(st,ft),_=_+Math.imul(Ue,ct)|0,h=h+Math.imul(Ue,ht)|0,h=h+Math.imul(it,ct)|0,M=M+Math.imul(it,ht)|0,_=_+Math.imul(Ct,Ke)|0,h=h+Math.imul(Ct,Ot)|0,h=h+Math.imul(Nt,Ke)|0,M=M+Math.imul(Nt,Ot)|0,_=_+Math.imul(rt,Et)|0,h=h+Math.imul(rt,wt)|0,h=h+Math.imul(jt,Et)|0,M=M+Math.imul(jt,wt)|0,_=_+Math.imul(Je,_t)|0,h=h+Math.imul(Je,xt)|0,h=h+Math.imul(vt,_t)|0,M=M+Math.imul(vt,xt)|0,_=_+Math.imul(Re,ot)|0,h=h+Math.imul(Re,Ft)|0,h=h+Math.imul(Xe,ot)|0,M=M+Math.imul(Xe,Ft)|0,_=_+Math.imul(ye,St)|0,h=h+Math.imul(ye,Ut)|0,h=h+Math.imul(Me,St)|0,M=M+Math.imul(Me,Ut)|0,_=_+Math.imul(se,Tt)|0,h=h+Math.imul(se,Mt)|0,h=h+Math.imul(ae,Tt)|0,M=M+Math.imul(ae,Mt)|0;var hi=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(hi>>>26)|0,hi&=67108863,_=Math.imul(Ye,yt),h=Math.imul(Ye,ft),h=h+Math.imul(Ge,yt)|0,M=Math.imul(Ge,ft),_=_+Math.imul(It,ct)|0,h=h+Math.imul(It,ht)|0,h=h+Math.imul(st,ct)|0,M=M+Math.imul(st,ht)|0,_=_+Math.imul(Ue,Ke)|0,h=h+Math.imul(Ue,Ot)|0,h=h+Math.imul(it,Ke)|0,M=M+Math.imul(it,Ot)|0,_=_+Math.imul(Ct,Et)|0,h=h+Math.imul(Ct,wt)|0,h=h+Math.imul(Nt,Et)|0,M=M+Math.imul(Nt,wt)|0,_=_+Math.imul(rt,_t)|0,h=h+Math.imul(rt,xt)|0,h=h+Math.imul(jt,_t)|0,M=M+Math.imul(jt,xt)|0,_=_+Math.imul(Je,ot)|0,h=h+Math.imul(Je,Ft)|0,h=h+Math.imul(vt,ot)|0,M=M+Math.imul(vt,Ft)|0,_=_+Math.imul(Re,St)|0,h=h+Math.imul(Re,Ut)|0,h=h+Math.imul(Xe,St)|0,M=M+Math.imul(Xe,Ut)|0,_=_+Math.imul(ye,Tt)|0,h=h+Math.imul(ye,Mt)|0,h=h+Math.imul(Me,Tt)|0,M=M+Math.imul(Me,Mt)|0,_=_+Math.imul(se,$t)|0,h=h+Math.imul(se,Wt)|0,h=h+Math.imul(ae,$t)|0,M=M+Math.imul(ae,Wt)|0;var no=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(no>>>26)|0,no&=67108863,_=Math.imul(Ne,yt),h=Math.imul(Ne,ft),h=h+Math.imul(ut,yt)|0,M=Math.imul(ut,ft),_=_+Math.imul(Ye,ct)|0,h=h+Math.imul(Ye,ht)|0,h=h+Math.imul(Ge,ct)|0,M=M+Math.imul(Ge,ht)|0,_=_+Math.imul(It,Ke)|0,h=h+Math.imul(It,Ot)|0,h=h+Math.imul(st,Ke)|0,M=M+Math.imul(st,Ot)|0,_=_+Math.imul(Ue,Et)|0,h=h+Math.imul(Ue,wt)|0,h=h+Math.imul(it,Et)|0,M=M+Math.imul(it,wt)|0,_=_+Math.imul(Ct,_t)|0,h=h+Math.imul(Ct,xt)|0,h=h+Math.imul(Nt,_t)|0,M=M+Math.imul(Nt,xt)|0,_=_+Math.imul(rt,ot)|0,h=h+Math.imul(rt,Ft)|0,h=h+Math.imul(jt,ot)|0,M=M+Math.imul(jt,Ft)|0,_=_+Math.imul(Je,St)|0,h=h+Math.imul(Je,Ut)|0,h=h+Math.imul(vt,St)|0,M=M+Math.imul(vt,Ut)|0,_=_+Math.imul(Re,Tt)|0,h=h+Math.imul(Re,Mt)|0,h=h+Math.imul(Xe,Tt)|0,M=M+Math.imul(Xe,Mt)|0,_=_+Math.imul(ye,$t)|0,h=h+Math.imul(ye,Wt)|0,h=h+Math.imul(Me,$t)|0,M=M+Math.imul(Me,Wt)|0,_=_+Math.imul(se,Bt)|0,h=h+Math.imul(se,zt)|0,h=h+Math.imul(ae,Bt)|0,M=M+Math.imul(ae,zt)|0;var di=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(di>>>26)|0,di&=67108863,_=Math.imul(Ne,ct),h=Math.imul(Ne,ht),h=h+Math.imul(ut,ct)|0,M=Math.imul(ut,ht),_=_+Math.imul(Ye,Ke)|0,h=h+Math.imul(Ye,Ot)|0,h=h+Math.imul(Ge,Ke)|0,M=M+Math.imul(Ge,Ot)|0,_=_+Math.imul(It,Et)|0,h=h+Math.imul(It,wt)|0,h=h+Math.imul(st,Et)|0,M=M+Math.imul(st,wt)|0,_=_+Math.imul(Ue,_t)|0,h=h+Math.imul(Ue,xt)|0,h=h+Math.imul(it,_t)|0,M=M+Math.imul(it,xt)|0,_=_+Math.imul(Ct,ot)|0,h=h+Math.imul(Ct,Ft)|0,h=h+Math.imul(Nt,ot)|0,M=M+Math.imul(Nt,Ft)|0,_=_+Math.imul(rt,St)|0,h=h+Math.imul(rt,Ut)|0,h=h+Math.imul(jt,St)|0,M=M+Math.imul(jt,Ut)|0,_=_+Math.imul(Je,Tt)|0,h=h+Math.imul(Je,Mt)|0,h=h+Math.imul(vt,Tt)|0,M=M+Math.imul(vt,Mt)|0,_=_+Math.imul(Re,$t)|0,h=h+Math.imul(Re,Wt)|0,h=h+Math.imul(Xe,$t)|0,M=M+Math.imul(Xe,Wt)|0,_=_+Math.imul(ye,Bt)|0,h=h+Math.imul(ye,zt)|0,h=h+Math.imul(Me,Bt)|0,M=M+Math.imul(Me,zt)|0;var ro=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(ro>>>26)|0,ro&=67108863,_=Math.imul(Ne,Ke),h=Math.imul(Ne,Ot),h=h+Math.imul(ut,Ke)|0,M=Math.imul(ut,Ot),_=_+Math.imul(Ye,Et)|0,h=h+Math.imul(Ye,wt)|0,h=h+Math.imul(Ge,Et)|0,M=M+Math.imul(Ge,wt)|0,_=_+Math.imul(It,_t)|0,h=h+Math.imul(It,xt)|0,h=h+Math.imul(st,_t)|0,M=M+Math.imul(st,xt)|0,_=_+Math.imul(Ue,ot)|0,h=h+Math.imul(Ue,Ft)|0,h=h+Math.imul(it,ot)|0,M=M+Math.imul(it,Ft)|0,_=_+Math.imul(Ct,St)|0,h=h+Math.imul(Ct,Ut)|0,h=h+Math.imul(Nt,St)|0,M=M+Math.imul(Nt,Ut)|0,_=_+Math.imul(rt,Tt)|0,h=h+Math.imul(rt,Mt)|0,h=h+Math.imul(jt,Tt)|0,M=M+Math.imul(jt,Mt)|0,_=_+Math.imul(Je,$t)|0,h=h+Math.imul(Je,Wt)|0,h=h+Math.imul(vt,$t)|0,M=M+Math.imul(vt,Wt)|0,_=_+Math.imul(Re,Bt)|0,h=h+Math.imul(Re,zt)|0,h=h+Math.imul(Xe,Bt)|0,M=M+Math.imul(Xe,zt)|0;var io=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(io>>>26)|0,io&=67108863,_=Math.imul(Ne,Et),h=Math.imul(Ne,wt),h=h+Math.imul(ut,Et)|0,M=Math.imul(ut,wt),_=_+Math.imul(Ye,_t)|0,h=h+Math.imul(Ye,xt)|0,h=h+Math.imul(Ge,_t)|0,M=M+Math.imul(Ge,xt)|0,_=_+Math.imul(It,ot)|0,h=h+Math.imul(It,Ft)|0,h=h+Math.imul(st,ot)|0,M=M+Math.imul(st,Ft)|0,_=_+Math.imul(Ue,St)|0,h=h+Math.imul(Ue,Ut)|0,h=h+Math.imul(it,St)|0,M=M+Math.imul(it,Ut)|0,_=_+Math.imul(Ct,Tt)|0,h=h+Math.imul(Ct,Mt)|0,h=h+Math.imul(Nt,Tt)|0,M=M+Math.imul(Nt,Mt)|0,_=_+Math.imul(rt,$t)|0,h=h+Math.imul(rt,Wt)|0,h=h+Math.imul(jt,$t)|0,M=M+Math.imul(jt,Wt)|0,_=_+Math.imul(Je,Bt)|0,h=h+Math.imul(Je,zt)|0,h=h+Math.imul(vt,Bt)|0,M=M+Math.imul(vt,zt)|0;var pi=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(pi>>>26)|0,pi&=67108863,_=Math.imul(Ne,_t),h=Math.imul(Ne,xt),h=h+Math.imul(ut,_t)|0,M=Math.imul(ut,xt),_=_+Math.imul(Ye,ot)|0,h=h+Math.imul(Ye,Ft)|0,h=h+Math.imul(Ge,ot)|0,M=M+Math.imul(Ge,Ft)|0,_=_+Math.imul(It,St)|0,h=h+Math.imul(It,Ut)|0,h=h+Math.imul(st,St)|0,M=M+Math.imul(st,Ut)|0,_=_+Math.imul(Ue,Tt)|0,h=h+Math.imul(Ue,Mt)|0,h=h+Math.imul(it,Tt)|0,M=M+Math.imul(it,Mt)|0,_=_+Math.imul(Ct,$t)|0,h=h+Math.imul(Ct,Wt)|0,h=h+Math.imul(Nt,$t)|0,M=M+Math.imul(Nt,Wt)|0,_=_+Math.imul(rt,Bt)|0,h=h+Math.imul(rt,zt)|0,h=h+Math.imul(jt,Bt)|0,M=M+Math.imul(jt,zt)|0;var cs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(cs>>>26)|0,cs&=67108863,_=Math.imul(Ne,ot),h=Math.imul(Ne,Ft),h=h+Math.imul(ut,ot)|0,M=Math.imul(ut,Ft),_=_+Math.imul(Ye,St)|0,h=h+Math.imul(Ye,Ut)|0,h=h+Math.imul(Ge,St)|0,M=M+Math.imul(Ge,Ut)|0,_=_+Math.imul(It,Tt)|0,h=h+Math.imul(It,Mt)|0,h=h+Math.imul(st,Tt)|0,M=M+Math.imul(st,Mt)|0,_=_+Math.imul(Ue,$t)|0,h=h+Math.imul(Ue,Wt)|0,h=h+Math.imul(it,$t)|0,M=M+Math.imul(it,Wt)|0,_=_+Math.imul(Ct,Bt)|0,h=h+Math.imul(Ct,zt)|0,h=h+Math.imul(Nt,Bt)|0,M=M+Math.imul(Nt,zt)|0;var hs=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(hs>>>26)|0,hs&=67108863,_=Math.imul(Ne,St),h=Math.imul(Ne,Ut),h=h+Math.imul(ut,St)|0,M=Math.imul(ut,Ut),_=_+Math.imul(Ye,Tt)|0,h=h+Math.imul(Ye,Mt)|0,h=h+Math.imul(Ge,Tt)|0,M=M+Math.imul(Ge,Mt)|0,_=_+Math.imul(It,$t)|0,h=h+Math.imul(It,Wt)|0,h=h+Math.imul(st,$t)|0,M=M+Math.imul(st,Wt)|0,_=_+Math.imul(Ue,Bt)|0,h=h+Math.imul(Ue,zt)|0,h=h+Math.imul(it,Bt)|0,M=M+Math.imul(it,zt)|0;var jn=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(jn>>>26)|0,jn&=67108863,_=Math.imul(Ne,Tt),h=Math.imul(Ne,Mt),h=h+Math.imul(ut,Tt)|0,M=Math.imul(ut,Mt),_=_+Math.imul(Ye,$t)|0,h=h+Math.imul(Ye,Wt)|0,h=h+Math.imul(Ge,$t)|0,M=M+Math.imul(Ge,Wt)|0,_=_+Math.imul(It,Bt)|0,h=h+Math.imul(It,zt)|0,h=h+Math.imul(st,Bt)|0,M=M+Math.imul(st,zt)|0;var so=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(so>>>26)|0,so&=67108863,_=Math.imul(Ne,$t),h=Math.imul(Ne,Wt),h=h+Math.imul(ut,$t)|0,M=Math.imul(ut,Wt),_=_+Math.imul(Ye,Bt)|0,h=h+Math.imul(Ye,zt)|0,h=h+Math.imul(Ge,Bt)|0,M=M+Math.imul(Ge,zt)|0;var oo=(R+_|0)+((h&8191)<<13)|0;R=(M+(h>>>13)|0)+(oo>>>26)|0,oo&=67108863,_=Math.imul(Ne,Bt),h=Math.imul(Ne,zt),h=h+Math.imul(ut,Bt)|0,M=Math.imul(ut,zt);var ao=(R+_|0)+((h&8191)<<13)|0;return R=(M+(h>>>13)|0)+(ao>>>26)|0,ao&=67108863,L[0]=Cn,L[1]=Zs,L[2]=Xs,L[3]=Js,L[4]=eo,L[5]=to,L[6]=or,L[7]=hi,L[8]=no,L[9]=di,L[10]=ro,L[11]=io,L[12]=pi,L[13]=cs,L[14]=hs,L[15]=jn,L[16]=so,L[17]=oo,L[18]=ao,R!==0&&(L[19]=R,S.length++),S};Math.imul||(Q=B);function me(P,f,g){g.negative=f.negative^P.negative,g.length=P.length+f.length;for(var S=0,C=0,b=0;b>>26)|0,C+=L>>>26,L&=67108863}g.words[b]=R,S=L,L=C}return S!==0?g.words[b]=S:g.length--,g.strip()}function N(P,f,g){var S=new A;return S.mulp(P,f,g)}a.prototype.mulTo=function(f,g){var S,C=this.length+f.length;return this.length===10&&f.length===10?S=Q(this,f,g):C<63?S=B(this,f,g):C<1024?S=me(this,f,g):S=N(this,f,g),S};function A(P,f){this.x=P,this.y=f}A.prototype.makeRBT=function(f){for(var g=new Array(f),S=a.prototype._countBits(f)-1,C=0;C>=1;return C},A.prototype.permute=function(f,g,S,C,b,L){for(var R=0;R>>1)b++;return 1<>>13,S[2*L+1]=b&8191,b=b>>>13;for(L=2*g;L>=26,g+=C/67108864|0,g+=b>>>26,this.words[S]=b&67108863}return g!==0&&(this.words[S]=g,this.length++),this},a.prototype.muln=function(f){return this.clone().imuln(f)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(f){var g=F(f);if(g.length===0)return new a(1);for(var S=this,C=0;C=0);var g=f%26,S=(f-g)/26,C=67108863>>>26-g<<26-g,b;if(g!==0){var L=0;for(b=0;b>>26-g}L&&(this.words[b]=L,this.length++)}if(S!==0){for(b=this.length-1;b>=0;b--)this.words[b+S]=this.words[b];for(b=0;b=0);var C;g?C=(g-g%26)/26:C=0;var b=f%26,L=Math.min((f-b)/26,this.length),R=67108863^67108863>>>b<L)for(this.length-=L,h=0;h=0&&(M!==0||h>=C);h--){var G=this.words[h]|0;this.words[h]=M<<26-b|G>>>b,M=G&R}return _&&M!==0&&(_.words[_.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(f,g,S){return r(this.negative===0),this.iushrn(f,g,S)},a.prototype.shln=function(f){return this.clone().ishln(f)},a.prototype.ushln=function(f){return this.clone().iushln(f)},a.prototype.shrn=function(f){return this.clone().ishrn(f)},a.prototype.ushrn=function(f){return this.clone().iushrn(f)},a.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var g=f%26,S=(f-g)/26,C=1<=0);var g=f%26,S=(f-g)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(g!==0&&S++,this.length=Math.min(S,this.length),g!==0){var C=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},a.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(_/67108864|0),this.words[b+S]=L&67108863}for(;b>26,this.words[b+S]=L&67108863;if(R===0)return this.strip();for(r(R===-1),R=0,b=0;b>26,this.words[b]=L&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(f,g){var S=this.length-f.length,C=this.clone(),b=f,L=b.words[b.length-1]|0,R=this._countBits(L);S=26-R,S!==0&&(b=b.ushln(S),C.iushln(S),L=b.words[b.length-1]|0);var _=C.length-b.length,h;if(g!=="mod"){h=new a(null),h.length=_+1,h.words=new Array(h.length);for(var M=0;M=0;se--){var ae=(C.words[b.length+se]|0)*67108864+(C.words[b.length+se-1]|0);for(ae=Math.min(ae/L|0,67108863),C._ishlnsubmul(b,ae,se);C.negative!==0;)ae--,C.negative=0,C._ishlnsubmul(b,1,se),C.isZero()||(C.negative^=1);h&&(h.words[se]=ae)}return h&&h.strip(),C.strip(),g!=="div"&&S!==0&&C.iushrn(S),{div:h||null,mod:C}},a.prototype.divmod=function(f,g,S){if(r(!f.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var C,b,L;return this.negative!==0&&f.negative===0?(L=this.neg().divmod(f,g),g!=="mod"&&(C=L.div.neg()),g!=="div"&&(b=L.mod.neg(),S&&b.negative!==0&&b.iadd(f)),{div:C,mod:b}):this.negative===0&&f.negative!==0?(L=this.divmod(f.neg(),g),g!=="mod"&&(C=L.div.neg()),{div:C,mod:L.mod}):this.negative&f.negative?(L=this.neg().divmod(f.neg(),g),g!=="div"&&(b=L.mod.neg(),S&&b.negative!==0&&b.isub(f)),{div:L.div,mod:b}):f.length>this.length||this.cmp(f)<0?{div:new a(0),mod:this}:f.length===1?g==="div"?{div:this.divn(f.words[0]),mod:null}:g==="mod"?{div:null,mod:new a(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new a(this.modn(f.words[0]))}:this._wordDiv(f,g)},a.prototype.div=function(f){return this.divmod(f,"div",!1).div},a.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},a.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},a.prototype.divRound=function(f){var g=this.divmod(f);if(g.mod.isZero())return g.div;var S=g.div.negative!==0?g.mod.isub(f):g.mod,C=f.ushrn(1),b=f.andln(1),L=S.cmp(C);return L<0||b===1&&L===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},a.prototype.modn=function(f){r(f<=67108863);for(var g=(1<<26)%f,S=0,C=this.length-1;C>=0;C--)S=(g*S+(this.words[C]|0))%f;return S},a.prototype.idivn=function(f){r(f<=67108863);for(var g=0,S=this.length-1;S>=0;S--){var C=(this.words[S]|0)+g*67108864;this.words[S]=C/f|0,g=C%f}return this.strip()},a.prototype.divn=function(f){return this.clone().idivn(f)},a.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var g=this,S=f.clone();g.negative!==0?g=g.umod(f):g=g.clone();for(var C=new a(1),b=new a(0),L=new a(0),R=new a(1),_=0;g.isEven()&&S.isEven();)g.iushrn(1),S.iushrn(1),++_;for(var h=S.clone(),M=g.clone();!g.isZero();){for(var G=0,se=1;!(g.words[0]&se)&&G<26;++G,se<<=1);if(G>0)for(g.iushrn(G);G-- >0;)(C.isOdd()||b.isOdd())&&(C.iadd(h),b.isub(M)),C.iushrn(1),b.iushrn(1);for(var ae=0,re=1;!(S.words[0]&re)&&ae<26;++ae,re<<=1);if(ae>0)for(S.iushrn(ae);ae-- >0;)(L.isOdd()||R.isOdd())&&(L.iadd(h),R.isub(M)),L.iushrn(1),R.iushrn(1);g.cmp(S)>=0?(g.isub(S),C.isub(L),b.isub(R)):(S.isub(g),L.isub(C),R.isub(b))}return{a:L,b:R,gcd:S.iushln(_)}},a.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var g=this,S=f.clone();g.negative!==0?g=g.umod(f):g=g.clone();for(var C=new a(1),b=new a(0),L=S.clone();g.cmpn(1)>0&&S.cmpn(1)>0;){for(var R=0,_=1;!(g.words[0]&_)&&R<26;++R,_<<=1);if(R>0)for(g.iushrn(R);R-- >0;)C.isOdd()&&C.iadd(L),C.iushrn(1);for(var h=0,M=1;!(S.words[0]&M)&&h<26;++h,M<<=1);if(h>0)for(S.iushrn(h);h-- >0;)b.isOdd()&&b.iadd(L),b.iushrn(1);g.cmp(S)>=0?(g.isub(S),C.isub(b)):(S.isub(g),b.isub(C))}var G;return g.cmpn(1)===0?G=C:G=b,G.cmpn(0)<0&&G.iadd(f),G},a.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var g=this.clone(),S=f.clone();g.negative=0,S.negative=0;for(var C=0;g.isEven()&&S.isEven();C++)g.iushrn(1),S.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;S.isEven();)S.iushrn(1);var b=g.cmp(S);if(b<0){var L=g;g=S,S=L}else if(b===0||S.cmpn(1)===0)break;g.isub(S)}while(!0);return S.iushln(C)},a.prototype.invm=function(f){return this.egcd(f).a.umod(f)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(f){return this.words[0]&f},a.prototype.bincn=function(f){r(typeof f=="number");var g=f%26,S=(f-g)/26,C=1<>>26,R&=67108863,this.words[L]=R}return b!==0&&(this.words[L]=b,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(f){var g=f<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this.strip();var S;if(this.length>1)S=1;else{g&&(f=-f),r(f<=67108863,"Number is too big");var C=this.words[0]|0;S=C===f?0:Cf.length)return 1;if(this.length=0;S--){var C=this.words[S]|0,b=f.words[S]|0;if(C!==b){Cb&&(g=1);break}}return g},a.prototype.gtn=function(f){return this.cmpn(f)===1},a.prototype.gt=function(f){return this.cmp(f)===1},a.prototype.gten=function(f){return this.cmpn(f)>=0},a.prototype.gte=function(f){return this.cmp(f)>=0},a.prototype.ltn=function(f){return this.cmpn(f)===-1},a.prototype.lt=function(f){return this.cmp(f)===-1},a.prototype.lten=function(f){return this.cmpn(f)<=0},a.prototype.lte=function(f){return this.cmp(f)<=0},a.prototype.eqn=function(f){return this.cmpn(f)===0},a.prototype.eq=function(f){return this.cmp(f)===0},a.red=function(f){return new le(f)},a.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(f){return this.red=f,this},a.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},a.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},a.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},a.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},a.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},a.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},a.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},a.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var I={k256:null,p224:null,p192:null,p25519:null};function H(P,f){this.name=P,this.p=new a(f,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var f=new a(null);return f.words=new Array(Math.ceil(this.n/13)),f},H.prototype.ireduce=function(f){var g=f,S;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),S=g.bitLength();while(S>this.n);var C=S0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},H.prototype.split=function(f,g){f.iushrn(this.n,0,g)},H.prototype.imulK=function(f){return f.imul(this.k)};function X(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(X,H),X.prototype.split=function(f,g){for(var S=4194303,C=Math.min(f.length,9),b=0;b>>22,L=R}L>>>=22,f.words[b-10]=L,L===0&&f.length>10?f.length-=10:f.length-=9},X.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var g=0,S=0;S>>=26,f.words[S]=b,g=C}return g!==0&&(f.words[f.length++]=g),f},a._prime=function(f){if(I[f])return I[f];var g;if(f==="k256")g=new X;else if(f==="p224")g=new te;else if(f==="p192")g=new K;else if(f==="p25519")g=new J;else throw new Error("Unknown prime "+f);return I[f]=g,g};function le(P){if(typeof P=="string"){var f=a._prime(P);this.m=f.p,this.prime=f}else r(P.gtn(1),"modulus must be greater than 1"),this.m=P,this.prime=null}le.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},le.prototype._verify2=function(f,g){r((f.negative|g.negative)===0,"red works only with positives"),r(f.red&&f.red===g.red,"red works only with red numbers")},le.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},le.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},le.prototype.add=function(f,g){this._verify2(f,g);var S=f.add(g);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},le.prototype.iadd=function(f,g){this._verify2(f,g);var S=f.iadd(g);return S.cmp(this.m)>=0&&S.isub(this.m),S},le.prototype.sub=function(f,g){this._verify2(f,g);var S=f.sub(g);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},le.prototype.isub=function(f,g){this._verify2(f,g);var S=f.isub(g);return S.cmpn(0)<0&&S.iadd(this.m),S},le.prototype.shl=function(f,g){return this._verify1(f),this.imod(f.ushln(g))},le.prototype.imul=function(f,g){return this._verify2(f,g),this.imod(f.imul(g))},le.prototype.mul=function(f,g){return this._verify2(f,g),this.imod(f.mul(g))},le.prototype.isqr=function(f){return this.imul(f,f.clone())},le.prototype.sqr=function(f){return this.mul(f,f)},le.prototype.sqrt=function(f){if(f.isZero())return f.clone();var g=this.m.andln(3);if(r(g%2===1),g===3){var S=this.m.add(new a(1)).iushrn(2);return this.pow(f,S)}for(var C=this.m.subn(1),b=0;!C.isZero()&&C.andln(1)===0;)b++,C.iushrn(1);r(!C.isZero());var L=new a(1).toRed(this),R=L.redNeg(),_=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new a(2*h*h).toRed(this);this.pow(h,_).cmp(R)!==0;)h.redIAdd(R);for(var M=this.pow(h,C),G=this.pow(f,C.addn(1).iushrn(1)),se=this.pow(f,C),ae=b;se.cmp(L)!==0;){for(var re=se,ye=0;re.cmp(L)!==0;ye++)re=re.redSqr();r(ye=0;b--){for(var M=g.words[b],G=h-1;G>=0;G--){var se=M>>G&1;if(L!==C[0]&&(L=this.sqr(L)),se===0&&R===0){_=0;continue}R<<=1,R|=se,_++,!(_!==S&&(b!==0||G!==0))&&(L=this.mul(L,C[R]),_=0,R=0)}h=26}return L},le.prototype.convertTo=function(f){var g=f.umod(this.m);return g===f?g.clone():g},le.prototype.convertFrom=function(f){var g=f.clone();return g.red=null,g},a.mont=function(f){return new fe(f)};function fe(P){le.call(this,P),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(fe,le),fe.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},fe.prototype.convertFrom=function(f){var g=this.imod(f.mul(this.rinv));return g.red=null,g},fe.prototype.imul=function(f,g){if(f.isZero()||g.isZero())return f.words[0]=0,f.length=1,f;var S=f.imul(g),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=S.isub(C).iushrn(this.shift),L=b;return b.cmp(this.m)>=0?L=b.isub(this.m):b.cmpn(0)<0&&(L=b.iadd(this.m)),L._forceRed(this)},fe.prototype.mul=function(f,g){if(f.isZero()||g.isZero())return new a(0)._forceRed(this);var S=f.mul(g),C=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=S.isub(C).iushrn(this.shift),L=b;return b.cmp(this.m)>=0?L=b.isub(this.m):b.cmpn(0)<0&&(L=b.iadd(this.m)),L._forceRed(this)},fe.prototype.invm=function(f){var g=this.imod(f._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(e,Fr)})(Rg);var Dg=Rg.exports,cw=1/0,HS=9007199254740991,Ij=17976931348623157e292,hw=NaN,Fj="[object Function]",Uj="[object GeneratorFunction]",$j="[object Symbol]",Wj=/^\s+|\s+$/g,Bj=/^[-+]0x[0-9a-f]+$/i,zj=/^0b[01]+$/i,Hj=/^0o[0-7]+$/i,Yj=/^(?:0|[1-9]\d*)$/,Gj=parseInt,Vj=Object.prototype,YS=Vj.toString,qj=Math.ceil,Qj=Math.max;function Kj(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r-1&&e%1==0&&e-1&&e%1==0&&e<=HS}function nh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function i6(e){return!!e&&typeof e=="object"}function s6(e){return typeof e=="symbol"||i6(e)&&YS.call(e)==$j}function o6(e){if(!e)return e===0?e:0;if(e=l6(e),e===cw||e===-cw){var t=e<0?-1:1;return t*Ij}return e===e?e:0}function a6(e){var t=o6(e),n=t%1;return t===t?n?t-n:t:0}function l6(e){if(typeof e=="number")return e;if(s6(e))return hw;if(nh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Wj,"");var n=zj.test(e);return n||Hj.test(e)?Gj(e.slice(2),n?2:8):Bj.test(e)?hw:+e}var u6=Jj,rh={exports:{}};rh.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",s=1,a=2,u=9007199254740991,c="[object Arguments]",p="[object Array]",v="[object AsyncFunction]",m="[object Boolean]",O="[object Date]",E="[object Error]",F="[object Function]",B="[object GeneratorFunction]",Q="[object Map]",me="[object Number]",N="[object Null]",A="[object Object]",I="[object Promise]",H="[object Proxy]",X="[object RegExp]",te="[object Set]",K="[object String]",J="[object Symbol]",le="[object Undefined]",fe="[object WeakMap]",P="[object ArrayBuffer]",f="[object DataView]",g="[object Float32Array]",S="[object Float64Array]",C="[object Int8Array]",b="[object Int16Array]",L="[object Int32Array]",R="[object Uint8Array]",_="[object Uint8ClampedArray]",h="[object Uint16Array]",M="[object Uint32Array]",G=/[\\^$.*+?()[\]{}|]/g,se=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,re={};re[g]=re[S]=re[C]=re[b]=re[L]=re[R]=re[_]=re[h]=re[M]=!0,re[c]=re[p]=re[P]=re[m]=re[f]=re[O]=re[E]=re[F]=re[Q]=re[me]=re[A]=re[X]=re[te]=re[K]=re[fe]=!1;var ye=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,Me=typeof self=="object"&&self&&self.Object===Object&&self,Be=ye||Me||Function("return this")(),Re=t&&!t.nodeType&&t,Xe=Re&&!0&&e&&!e.nodeType&&e,ui=Xe&&Xe.exports===Re,Je=ui&&ye.process,vt=function(){try{return Je&&Je.binding&&Je.binding("util")}catch{}}(),_n=vt&&vt.isTypedArray;function rt(T,$){for(var Z=-1,he=T==null?0:T.length,pt=0,Ce=[];++Z-1}function to(T,$){var Z=this.__data__,he=lo(Z,T);return he<0?(++this.size,Z.push([T,$])):Z[he][1]=$,this}Cn.prototype.clear=Zs,Cn.prototype.delete=Xs,Cn.prototype.get=Js,Cn.prototype.has=eo,Cn.prototype.set=to;function or(T){var $=-1,Z=T==null?0:T.length;for(this.clear();++$on))return!1;var mt=Ce.get(T);if(mt&&Ce.get($))return mt==$;var en=-1,Vn=!0,an=Z&a?new pi:void 0;for(Ce.set(T,$),Ce.set($,T);++en-1&&T%1==0&&T<$}function Hu(T){var $=typeof T;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?T!=="__proto__":T===null}function Yu(T){return!!ut&&ut in T}function Gu(T){var $=T&&T.constructor,Z=typeof $=="function"&&$.prototype||Ye;return T===Z}function sd(T){return Li.call(T)}function Ni(T){if(T!=null){try{return Ai.call(T)}catch{}try{return T+""}catch{}}return""}function Vu(T,$){return T===$||T!==T&&$!==$}var qu=al(function(){return arguments}())?al:function(T){return co(T)&&Ne.call(T,"callee")&&!ht.call(T,"callee")},Zo=Array.isArray;function od(T){return T!=null&&Qu(T.length)&&!Xo(T)}var ll=Ks||at;function ad(T,$){return fo(T,$)}function Xo(T){if(!Ku(T))return!1;var $=uo(T);return $==F||$==B||$==v||$==H}function Qu(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=u}function Ku(T){var $=typeof T;return T!=null&&($=="object"||$=="function")}function co(T){return T!=null&&typeof T=="object"}var Zu=_n?Nt(_n):Fu;function ld(T){return od(T)?Nu(T):Uu(T)}function dt(){return[]}function at(){return!1}e.exports=ad})(rh,rh.exports);var f6=rh.exports;const Vh=Dg,c6=new Vh(255),h6=new Vh(65280),d6=new Vh(256),p6=(e,t,n)=>{const r=n.and(c6).toNumber(),s=n.and(h6).div(d6).toNumber(),a=String.fromCharCode(r)+String.fromCharCode(s);return new Vh(m6(a,e))},m6=(e,t)=>{let n,r,s,a,u,c,p,v;for(n=e.length&3,r=e.length-n,s=t,u=3432918353,c=461845907,v=0;v>>16)*u&65535)<<16)&4294967295,p=p<<15|p>>>17,p=(p&65535)*c+(((p>>>16)*c&65535)<<16)&4294967295,s^=p,s=s<<13|s>>>19,a=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295,s=(a&65535)+27492+(((a>>>16)+58964&65535)<<16);switch(p=0,n){case 3:p^=(e.charCodeAt(v+2)&255)<<16;case 2:p^=(e.charCodeAt(v+1)&255)<<8;case 1:p^=e.charCodeAt(v)&255,p=(p&65535)*u+(((p>>>16)*u&65535)<<16)&4294967295,p=p<<15|p>>>17,p=(p&65535)*c+(((p>>>16)*c&65535)<<16)&4294967295,s^=p}return s^=e.length,s^=s>>>16,s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295,s^=s>>>13,s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295,s^=s>>>16,s>>>0};var g6={muk:p6};const li=Dg,{muk:v6}=g6,Wa=new li("10000","hex"),Xa=new li("ffffffff","hex"),GS=new li("100000000","hex"),VS=new li("ffffffffffffffff","hex"),qS=new li("ffffffff00000000","hex"),QS=new li("65535"),KS=new li("65536"),Ag=(e,t)=>v6([3077398253,3995603712,2243735041,1261992695][e],2,t),y6=e=>{const t=n=>{const r=n.and(Xa),s=n.and(qS);return n.gte(Wa)&&n.lte(Xa)?Wa.add(ZS(n.sub(Wa))):n.gte(GS)&&n.lte(VS)?s.or(t(r)):n};return t(new li(e))},w6=e=>{const t=n=>{const r=n.and(Xa),s=n.and(qS);return n.gte(Wa)&&n.lte(Xa)?Wa.add(JS(n.sub(Wa))):n.gte(GS)&&n.lte(VS)?s.or(t(r)):n};return t(new li(e))},ZS=e=>XS(4,QS,KS,Xa,Ag,new li(e)),XS=(e,t,n,r,s,a)=>{const u=Jm(e,t,n,s,a);return u.lt(r)?u:Jm(e,t,n,s,u)},Jm=(e,t,n,r,s)=>{const a=(p,v,m)=>{if(p>e)return e%2!==0||m.eq(t)?t.mul(m).add(v):t.mul(v).add(m);{const O=r(p-1,m),E=p%2!==0?v.add(O).mod(t):v.add(O).mod(n);return a(p+1,m,E)}},u=s.mod(t),c=s.div(t);return a(1,u,c)},JS=e=>eM(4,QS,KS,Xa,Ag,new li(e)),eM=(e,t,n,r,s,a)=>{const u=e0(e,t,n,s,a);return u.lt(r)?u:e0(e,t,n,s,u)},e0=(e,t,n,r,s)=>{const a=(m,O,E)=>{if(m<1)return t.mul(E).add(O);{const F=r(m-1,O),B=m%2!==0?E.add(t).sub(F.mod(t)).mod(t):E.add(n).sub(F.mod(n)).mod(n);return a(m-1,B,O)}},u=e%2!==0?s.div(t):s.mod(t),c=e%2!==0?s.mod(t):s.div(t),p=c.eq(t)?u:c,v=c.eq(t)?c:u;return a(e,p,v)};var tM={F:Ag,fe:Jm,Fe:XS,feis:ZS,fein:y6,fen:e0,Fen:eM,tail:JS,fynd:w6};const kr=Dg,dw=u6,_6=f6,nM=tM,Ba=new kr(0),Ir=new kr(1),rM=new kr(2),Xl=new kr(3),Ra=new kr(4),x6=new kr(5),S6=` +dozmarbinwansamlitsighidfidlissogdirwacsabwissibrigsoldopmodfoglidhopdardorlorhodfolrintogsilmirholpaslacrovlivdalsatlibtabhanticpidtorbolfosdotlosdilforpilramtirwintadbicdifrocwidbisdasmidloprilnardapmolsanlocnovsitnidtipsicropwitnatpanminritpodmottamtolsavposnapnopsomfinfonbanmorworsipronnorbotwicsocwatdolmagpicdavbidbaltimtasmalligsivtagpadsaldivdactansidfabtarmonranniswolmispallasdismaprabtobrollatlonnodnavfignomnibpagsopralbilhaddocridmocpacravripfaltodtiltinhapmicfanpattaclabmogsimsonpinlomrictapfirhasbosbatpochactidhavsaplindibhosdabbitbarracparloddosbortochilmactomdigfilfasmithobharmighinradmashalraglagfadtopmophabnilnosmilfopfamdatnoldinhatnacrisfotribhocnimlarfitwalrapsarnalmoslandondanladdovrivbacpollaptalpitnambonrostonfodponsovnocsorlavmatmipfip`,M6=` +zodnecbudwessevpersutletfulpensytdurwepserwylsunrypsyxdyrnuphebpeglupdepdysputlughecryttyvsydnexlunmeplutseppesdelsulpedtemledtulmetwenbynhexfebpyldulhetmevruttylwydtepbesdexsefwycburderneppurrysrebdennutsubpetrulsynregtydsupsemwynrecmegnetsecmulnymtevwebsummutnyxrextebfushepbenmuswyxsymselrucdecwexsyrwetdylmynmesdetbetbeltuxtugmyrpelsyptermebsetdutdegtexsurfeltudnuxruxrenwytnubmedlytdusnebrumtynseglyxpunresredfunrevrefmectedrusbexlebduxrynnumpyxrygryxfeptyrtustyclegnemfermertenlusnussyltecmexpubrymtucfyllepdebbermughuttunbylsudpemdevlurdefbusbeprunmelpexdytbyttyplevmylwedducfurfexnulluclennerlexrupnedlecrydlydfenwelnydhusrelrudneshesfetdesretdunlernyrsebhulrylludremlysfynwerrycsugnysnyllyndyndemluxfedsedbecmunlyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes`,iM=e=>e.replace(/[\^~-]/g,"").match(/.{1,3}/g)||[],k6=(e,t)=>[t.slice(0,e),t.slice(e)],Lo=S6.match(/.{1,3}/g),ki=M6.match(/.{1,3}/g),ih=e=>rM.pow(e),t0=(e,t,n)=>n.div(ih(ih(e).mul(t))),sh=(e,t,n=Ba)=>t.eq(Ba)?n:sh(e,t0(e,Ir,t),n.add(Ir)),Jl=(e,t,n)=>n.mod(ih(ih(e).mul(t))),C6=e=>{if(e===null)throw new Error("hex2patp: null input");return qh(new kr(e,"hex"))},sM=e=>{if(Pu(e)===!1)throw new Error("patp2hex: not a valid @p");const t=iM(e),n=u=>u.toString(2).padStart(8,"0"),r=t.reduce((u,c,p)=>p%2!==0||t.length===1?u+n(ki.indexOf(c)):u+n(Lo.indexOf(c)),""),s=new kr(r,2),a=nM.fynd(s).toString("hex");return a.length%2!==0?a.padStart(a.length+1,"0"):a},Lg=e=>new kr(sM(e),"hex"),oM=e=>{let t;try{t=Lg(e)}catch{throw new Error("patp2dec: not a valid @p")}return t.toString()},aM=e=>{const n=new kr(e).toArrayLike(Buffer);return lM(n)},lM=e=>{const t=e.length%2!==0&&e.length>1?[[e[0]]].concat(dw(e.slice(1),2)):dw(e,2),n=a=>a[1]===void 0?Lo[0]+ki[a[0]]:Lo[a[0]]+ki[a[1]],r=a=>a[1]===void 0?ki[a[0]]:Lo[a[0]]+ki[a[1]],s=a=>a.length%2!==0&&t.length>1?n(a):r(a);return t.reduce((a,u)=>a+(a==="~"?"":"-")+s(u),"~")},O6=e=>{const t=e.length%2!==0?e.padStart(e.length+1,"0"):e,n=Buffer.from(t,"hex");return lM(n)},oh=e=>{if(Pu(e)===!1)throw new Error("patq2hex: not a valid @q");const t=e.slice(1).split("-"),n=s=>s.toString(16).padStart(2,"0"),r=t.map(s=>{let a=k6(3,s);return a[1]===""?n(ki.indexOf(a[0])):n(Lo.indexOf(a[0]))+n(ki.indexOf(a[1]))});return e.length===0?"00":r.join("")},E6=e=>new kr(oh(e),"hex"),uM=e=>{let t;try{t=E6(e)}catch{throw new Error("patq2dec: not a valid @q")}return t.toString()},fM=e=>{let t;try{t=Lg(e)}catch{throw new Error("clan: not a valid @p")}const n=sh(Xl,t);return n.lte(Ir)?"galaxy":n.eq(rM)?"star":n.lte(Ra)?"planet":n.lte(new kr(8))?"moon":"comet"},T6=e=>{let t;try{t=Lg(e)}catch{throw new Error("sein: not a valid @p")}let n;try{n=fM(e)}catch{throw new Error("sein: not a valid @p")}const r=n==="galaxy"?t:n==="star"?Jl(Xl,Ir,t):n==="planet"?Jl(Ra,Ir,t):n==="moon"?Jl(x6,Ir,t):Ba;return qh(r)},Pu=e=>{if(typeof e!="string")throw new Error("isValidPat: non-string input");if(e.slice(0,1)==="~"===!1||e.length<4)return!1;{const n=iM(e),r=n.length%2!==0&&n.length!==1,s=n.reduce((a,u,c)=>a&&(c%2!==0||n.length===1?ki.includes(u):Lo.includes(u)),!0);return!r&&s}},b6=e=>Pu(e)&&e===qh(oM(e)),P6=e=>Pu(e)&&cM(e,aM(uM(e))),n0=e=>e.slice(0,2)==="00"?n0(e.slice(2)):e,R6=(e,t)=>_6(n0(e),n0(t)),cM=(e,t)=>{let n;try{n=oh(e)}catch{throw new Error("eqPatq: not a valid @q")}let r;try{r=oh(t)}catch{throw new Error("eqPatq: not a valid @q")}return R6(n,r)},qh=e=>{if(e===null)throw new Error("patp: null input");const t=new kr(e),n=nM.fein(t),r=sh(Ra,n),s=(u,c,p)=>{const v=Jl(Ra,Ir,u),m=Lo[t0(Xl,Ir,v)],O=ki[Jl(Xl,Ir,v)],E=c.mod(Ra).eq(Ba)?c.eq(Ba)?"":"--":"-",F=m+O+E+p;return c.eq(r)?p:s(t0(Ra,Ir,u),c.add(Ir),F)};return"~"+(sh(Xl,n).lte(Ir)?ki[n]:s(n,Ba,""))};var D6={patp:qh,patp2hex:sM,hex2patp:C6,patp2dec:oM,sein:T6,clan:fM,patq:aM,patq2hex:oh,hex2patq:O6,patq2dec:uM,eqPatq:cM,isValidPat:Pu,isValidPatp:b6,isValidPatq:P6};const A6=D6,L6=tM;Object.assign(A6,L6);class qt extends oe.Component{constructor(t){super(t),this.state={query:""},this.updateQuery=this.updateQuery.bind(this)}updateQuery(t){this.setState({query:t.target.value})}render(){const{state:t,props:n}=this,r=y.jsx("input",{type:"text",placeholder:n.placeholder,onChange:this.updateQuery,value:t.query,style:{border:"1px solid black"}});let s=n.items.filter(a=>t.query.split(" ").reduce((u,c)=>u&&(""+a.key).includes(c),!0));return s=s.map(a=>y.jsx("div",{style:{marginTop:"4px"},children:a.jsx},a.key)),y.jsxs("div",{style:{position:"relative",border:"1px solid grey",padding:"4px"},children:[n.children,y.jsxs("div",{children:[r," (",s.length,")"]}),y.jsxs("details",{open:n.open===void 0?!0:n.open,children:[y.jsxs("summary",{children:[s.length," items"]}),y.jsx("div",{children:s.length===0?"none":s})]})]})}}class j6 extends oe.Component{constructor(t){super(t)}componentDidMount(){this.componentDidUpdate()}componentDidUpdate(t){}render(){const t=this.props,n=t.in.map(s=>({key:"~"+s.ship+" "+s.path,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",style:{maxWidth:"10%"},children:["~",s.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"30%"},children:s.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"60%"},children:bs(s.duct)})]})})),r=t.out.map(s=>({key:`~${s.ship} ${s.app} ${s.wire} ${s.path}`,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:s.wire}),y.jsxs("div",{class:"flex-auto",style:{maxWidth:"10%"},children:["~",s.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"10%"},children:s.app}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:s.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"10%"},children:s.acked?"acked":"not acked"})]})}));return y.jsxs("div",{children:[y.jsx("h4",{children:"Incoming"}),y.jsx(qt,{placeholder:"ship / path",items:n}),y.jsx("h4",{children:"Outgoing"}),y.jsx(qt,{placeholder:"ship / app / wire / path",items:r})]})}}class Oo extends oe.Component{constructor(t){super(t),this.onToggle=this.onToggle.bind(this)}onToggle(t){t.target.open?this.props.onOpen&&this.props.onOpen(this.props.id):this.props.onClose&&this.props.onClose(this.props.id)}render(){const{props:t}=this;return y.jsxs("details",{onToggle:this.onToggle,...t,style:{border:"1px solid black",padding:"4px",position:"relative",...t.style},children:[y.jsx("summary",{children:t.summary}),y.jsx("div",{style:{borderTop:"1px solid black"},children:t.details})]})}}class N6 extends oe.Component{constructor(t){super(t),this.state={stateQuery:{}},this.changeStateQuery=this.changeStateQuery.bind(this),this.loadApps=this.loadApps.bind(this),this.loadAppDetails=this.loadAppDetails.bind(this)}componentDidMount(){Object.keys(this.props.apps).length===0&&this.loadApps()}componentDidUpdate(t,n){}changeStateQuery(t,n){this.state.stateQuery[t]=n.target.value,this.setState({stateQuery:this.state.stateQuery})}loadApps(){api.getApps()}loadAppDetails(t){api.getAppDetails(t)}loadAppState(t){api.getAppState(t,this.state.stateQuery[t])}render(){const{props:t,state:n}=this,r=Object.keys(t.apps).sort().map(s=>{const a=t.apps[s],u=typeof a=="object",c=u?!0:a,p=c?{borderLeft:"3px solid green"}:{borderLeft:"3px solid grey"};let v=null;if(!u)v=c?"Loading...":"App not running.";else if(a.noDebug)v="App doesn't use /lib/dbug";else{const O=a,E=(O.events||[]).map(F=>({key:F,jsx:y.jsxs(y.Fragment,{children:[F,y.jsx("br",{})]})}));v=y.jsxs(y.Fragment,{children:[y.jsx("button",{style:{position:"absolute",top:0,right:0},onClick:()=>{this.loadAppDetails(s)},children:"refresh"}),y.jsx("button",{onClick:()=>{this.loadAppState(s)},children:"query state"}),y.jsx("textarea",{class:"mono",onChange:F=>this.changeStateQuery(s,F),value:n.stateQuery[s],placeholder:"-.-",spellCheck:"false"}),y.jsx("div",{style:{maxHeight:"500px",overflow:"scroll"},children:y.jsx("pre",{children:(O.state||O.simpleState).join(` +`)})}),y.jsxs("div",{children:[y.jsx("button",{onClick:()=>{api.bindToVerb(s)},children:"listen to simple verb (here)"})," ",y.jsx("button",{onClick:()=>{api.bindToVerbPlus(s)},children:"listen to verb+ (logs viewer)"}),y.jsx(qt,{placeholder:"event description",items:E})]}),y.jsx("div",{children:y.jsx(j6,{...O.subscriptions})})]})}const m=c?this.loadAppDetails:null;return{key:s,jsx:y.jsx(Oo,{id:s,summary:"%"+s,details:v,onOpen:m,style:p})}});return y.jsx("div",{className:"h-100 w-100 pa3 pt4 overflow-x-hidden bg-gray0-d white-d flex flex-column",children:y.jsx(qt,{placeholder:"app name",items:r,children:y.jsx("button",{onClick:this.loadApps,children:"refresh"})})})}}const I6="modulepreload",F6=function(e){return"/~debug/"+e},pw={},hM=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));s=Promise.all(n.map(p=>{if(p=F6(p),p in pw)return;pw[p]=!0;const v=p.endsWith(".css"),m=v?'[rel="stylesheet"]':"";if(!!r)for(let F=a.length-1;F>=0;F--){const B=a[F];if(B.href===p&&(!v||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${m}`))return;const E=document.createElement("link");if(E.rel=v?"stylesheet":I6,v||(E.as="script",E.crossOrigin=""),E.href=p,c&&E.setAttribute("nonce",c),document.head.appendChild(E),v)return new Promise((F,B)=>{E.addEventListener("load",F),E.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${p}`)))})}))}return s.then(()=>t()).catch(a=>{const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a})},mw=globalThis.showDirectoryPicker;async function U6(e={}){if(mw&&!e._preferPolyfill)return mw(e);const t=document.createElement("input");t.type="file",t.webkitdirectory=!0,t.multiple=!0,t.style.position="fixed",t.style.top="-100000px",t.style.left="-100000px",document.body.appendChild(t);const{makeDirHandleFromFileList:n}=await hM(()=>import("./util.js"),[]);return new Promise((r,s)=>{t.addEventListener("change",()=>{n(t.files).then(r).catch(s),document.body.removeChild(t)}),t.click()})}const pa=Symbol("adapter");class jg{constructor(t){this.kind=t.kind,this.name=t.name,this[pa]=t}get isFile(){return this.kind==="file"}get isDirectory(){return this.kind==="directory"}async queryPermission(t={mode:"read"}){const n=this[pa];if(n.queryPermission)return n.queryPermission(t);if(t.mode==="read")return"granted";if(t.mode==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t.mode} must be 'read' or 'readwrite'`)}async requestPermission(t={mode:"read"}){const n=this[pa];if(n.requestPermission)return n.requestPermission(t);if(t.mode==="read")return"granted";if(t.mode==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t.mode} must be 'read' or 'readwrite'`)}async isSameEntry(t){return this===t?!0:this.kind!==t.kind||!t[pa]?!1:await this[pa].isSameEntry(t[pa])}}Object.defineProperty(jg.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const Gp=Symbol("adapter");class Ja extends jg{constructor(t){super(t),this.kind="file",this[Gp]=t}async createWritable(t={}){const{FileSystemWritableFileStream:n}=await hM(()=>import("./FileSystemWritableFileStream.js"),[]);return new n(await this[Gp].createWritable(t))}async getFile(){return this[Gp].getFile()}}Object.defineProperty(Ja.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Ja.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const s4=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:Ja,default:Ja},Symbol.toStringTag,{value:"Module"})),ma=Symbol("adapter");class $o extends jg{constructor(t){super(t),this.kind="directory",this[ma]=t}async getDirectoryHandle(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return new $o(await this[ma].getDirectoryHandle(t,n))}getDirectory(t,n={}){return this.getDirectoryHandle(t,n)}async*entries(){for await(const[t,n]of this[ma].entries())yield[n.name,n.kind==="file"?new Ja(n):new $o(n)]}async*getEntries(){return this.entries()}async*keys(){for await(const[t]of this[ma].entries())yield t}async*values(){for await(const[t,n]of this.entries())yield n}async getFileHandle(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return n.create=!!n.create,new Ja(await this[ma].getFileHandle(t,n))}getFile(t,n={}){return this.getFileHandle(t,n)}async removeEntry(t,n={}){if(t==="")throw new TypeError("Name can't be an empty string.");if(t==="."||t===".."||t.includes("/"))throw new TypeError("Name contains invalid characters.");return n.recursive=!!n.recursive,this[ma].removeEntry(t,n)}async resolve(t){if(await t.isSameEntry(this))return[];const n=[{handle:this,path:[]}];for(;n.length;){let{handle:r,path:s}=n.pop();for await(const a of r.values()){if(await a.isSameEntry(t))return[...s,a.name];a.kind==="directory"&&n.push({handle:a,path:[...s,a.name]})}}return null}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty($o.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties($o.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const o4=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:$o,default:$o},Symbol.toStringTag,{value:"Module"}));var Vp,qp;globalThis.CacheStorage&&globalThis.caches instanceof CacheStorage,(qp=(Vp=globalThis.navigator)===null||Vp===void 0?void 0:Vp.storage)===null||qp===void 0||qp.getDirectory,typeof window<"u"&&window.webkitRequestFileSystem;class $6 extends oe.Component{constructor(n){super(n);Uy(this,"view");this.state={},this.loadLogs=this.loadLogs.bind(this),this.clearLogs=this.clearLogs.bind(this),this.clickEvent=this.clickEvent.bind(this),this.view={oldest:null,newest:null,clicked:null}}componentDidMount(){}componentDidUpdate(n,r){console.log("updated component")}async loadLogs(){const n=await U6();if(n.kind!=="directory"||n.name!=="verb-logger")return alert("Not a real verb-logger put directory!");for await(const[r,s]of n.entries()){if(s.kind!=="directory"||r===".DS_Store")continue;let a=[];for await(const[u,c]of s.entries())c.kind==="file"&&u.slice(-5)===".json"&&a.push({key:u,log:c});a=a.sort((u,c)=>u.key{this.view.oldest=Number.parseInt(s.target.value),this.setState({view:this.view})},step:"1",min:qe.state.logsRange.oldest,max:qe.state.logsRange.newest,value:n}),y.jsx("br",{}),y.jsx("input",{type:"range",onChange:s=>{const a=Number.parseInt(s.target.value);a===qe.state.logsRange.newest?this.view.newest=null:this.view.newest=a,this.setState({view:this.view})},step:"1",min:qe.state.logsRange.oldest,max:qe.state.logsRange.newest,value:r}),y.jsx("br",{}),"thru ",mr(r,!0)+(this.view.newest?"":" (live)")]})}renderEvent(n,r,s){const a=this.view.oldest||qe.state.logsRange.oldest,c=(this.view.newest||qe.state.logsRange.newest)-a,p=`${n}#${r.act}`,v=this.view.clicked===p;let m=` + act: ${r.act}
+ now: ${mr(r.now,!0)}
+ src: ${r.src}${r.sap}
+ `;switch(r.kind){case"on-poke":m=m+` + mark: %${r.deets.mark}
+ mug: 0x${r.deets.mug} + `;break;case"on-watch":case"on-leave":m=m+`path: ${r.deets}`;break;case"on-agent":switch(m=m+` + wire: ${r.deets.wire}
+ ${r.deets.sign}
+ `,r.deets.sign){case"poke-ack":case"watch-ack":m=m+(r.deets.deets?"ack":"nack");break;case"fact":m=m+` + mark: %${r.deets.deets.mark}
+ mug: 0x${r.deets.deets.mug} + `;break}break}if(m=m+`
${r.effects.length} effects`,r.effects.length>0){m=m+":";for(const E of r.effects){switch(m=m+` +
+ ${E.kind}, ${E.deets.wire||E.deets.mark||""} + + `,E.kind){case"poke":m=m+` + wire: ${E.deets.wire}
+ gill: ${E.deets.gill}
+ mark: %${E.deets.mark}
+ mug: 0x${E.deets.mug} + `;break;case"watch":m=m+` + wire: ${E.deets.wire}
+ gill: ${E.deets.gill}
+ path: ${E.deets.path} + `;break;case"leave":m=m+` + wire: ${E.deets.wire}
+ gill: ${E.deets.gill} + `;break;case"fact":m=m+` + paths: ${E.deets.paths.join(", ")}
+ mark: %${E.deets.mark}
+ mug: 0x${E.deets.mug} + `;break;case"kick":m=m+`paths: ${E.deets.paths.join(", ")}`;break;case"arvo":m=m+` + wire: ${E.deets.wire}
+ task: %${E.deets.vane} %${E.deets.task} + `;break}m=m+"
"}}const O=(r.now-a)/c*98;return y.jsx("div",{className:"event"+(v?" focus":"")+(O>50?" right":""),onClick:()=>this.clickEvent(p),style:{left:O+"%",top:s%18*5+"%"},children:y.jsx("div",{className:"details"+(r.effects.length>0?" effects":""),onClick:E=>E.stopPropagation(),dangerouslySetInnerHTML:{__html:m}})})}renderCauseRow(n){return y.jsxs("div",{className:"cause",children:[y.jsx("div",{className:"legend",children:n.kind}),...n.events]})}renderCauses(n,r){const s=this.view.oldest||qe.state.logsRange.oldest,a=this.view.newest||qe.state.logsRange.newest;console.log("oldest, newest",s,a);let u={};for(const c of r){if(c.nowa)continue;const p=c.kind;console.log("vent kind",p);const v=u[p]||{kind:p,events:[]},m=this.renderEvent(n,c,v.events.length);v.events.push(m),u[p]=v}return Object.values(u).map(this.renderCauseRow)}renderLogs(n){const r=[];for(const[s,a]of Object.entries(n))r.push(y.jsxs("div",{className:"agent",children:[y.jsx("h3",{children:s}),this.renderCauses(s,a.logs)]}));return r}render(){return y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:this.loadLogs,children:"load logs"})," ",y.jsx("button",{onClick:this.clearLogs,children:"clear logs"}),y.jsx("br",{}),y.jsx("br",{}),Object.keys(qe.state.logs).length===0?"no logs yet. turn on verb+ for an app in the apps tab, or import log-viewer files.":[this.renderViewControls(),this.renderLogs(qe.state.logs)]]})}}class W6 extends oe.Component{constructor(t){super(t),this.state={},this.loadThreads=this.loadThreads.bind(this),this.renderThreads=this.renderThreads.bind(this),this.killThread=this.killThread.bind(this)}componentDidMount(){const{threads:t}=this.props;Object.keys(t).length===0&&this.loadThreads()}componentDidUpdate(t,n){}loadThreads(){api.getThreads()}killThread(t){api.killThread(t)}renderThreads(t){return Object.keys(t).map(n=>{const r=this.renderThreads(t[n]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{children:[y.jsx("button",{style:{margin:"4px"},onClick:()=>{this.killThread(n)},children:"kill"}),n]}),y.jsx("div",{style:{paddingLeft:"16px"},children:r})]})})}render(){return y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:this.loadThreads,children:"refresh"}),y.jsx("br",{}),Object.keys(this.props.threads).length===0?"no running threads":this.renderThreads(this.props.threads)]})}}class B6 extends oe.Component{constructor(t){super(t),this.loadPeers=this.loadPeers.bind(this),this.loadPeerDetails=this.loadPeerDetails.bind(this),this.renderFlow=this.renderFlow.bind(this),this.renderScry=this.renderScry.bind(this)}componentDidMount(){const{known:t,alien:n}=this.props.peers;t.length===0&&n.length===0&&this.loadPeers()}componentDidUpdate(t,n){}loadPeers(){api.getPeers()}loadPeerDetails(t){api.getPeer(t)}renderPaths(t){const n=t.map(r=>({key:r,jsx:r}));return y.jsx(qt,{placeholder:"path",items:n})}renderSnd(t){const n=t["unsent-messages"].reduce((F,B)=>F+B+" bytes, ","unsent msg sizes: "),r=t["queued-message-acks"].map(F=>({key:F["message-num"],jsx:F["message-num"]+": "+F.ack})),s=y.jsx(qt,{placeholder:"msg num",items:r}),a=t["packet-pump-state"].metrics,u=y.jsx(y.Fragment,{children:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"rto"}),y.jsx("td",{children:"rtt"}),y.jsx("td",{children:"rttvar"}),y.jsx("td",{children:"ssthresh"}),y.jsx("td",{children:"num-live"}),y.jsx("td",{children:"cwnd"}),y.jsx("td",{children:"counter"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:a.rto}),y.jsx("td",{children:a.rtt}),y.jsx("td",{children:a.rttvar}),y.jsx("td",{children:a.ssthresh}),y.jsx("td",{children:a["num-live"]}),y.jsx("td",{children:a.cwnd}),y.jsx("td",{children:a.counter})]})]})})}),c=t["packet-pump-state"].live.map(F=>({key:F["message-num"]+","+F["fragment-num"],jsx:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"message-num"}),y.jsx("td",{children:"fragment-num"}),y.jsx("td",{children:"num-fragments"}),y.jsx("td",{children:"last-sent"}),y.jsx("td",{children:"tries"}),y.jsx("td",{children:"skips"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:F["message-num"]}),y.jsx("td",{children:F["fragment-num"]}),y.jsx("td",{children:F["num-fragments"]}),y.jsx("td",{children:mr(F["last-sent"])}),y.jsx("td",{children:F.tries}),y.jsx("td",{children:F.skips})]})]})})})),p=y.jsx(qt,{placeholder:"msg-num,frag-num",items:c}),v=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:"snd"}),y.jsx("br",{}),bs(t.duct),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"bone"}),y.jsx("td",{children:"current"}),y.jsx("td",{children:"next"}),y.jsx("td",{children:"next wake"}),y.jsx("td",{children:"total unsent"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t.bone}),y.jsx("td",{children:t.current}),y.jsx("td",{children:t.next}),y.jsx("td",{children:mr(t["packet-pump-state"]["next-wake"])}),y.jsxs("td",{children:[t["unsent-messages"].reduce((F,B)=>F+B,0)," bytes (",t["unsent-messages"].length," messages)"]})]})]})})]}),m=y.jsxs(y.Fragment,{children:[u,n,s,p]}),O=t["unsent-messages"].length>0||t["packet-pump-state"].live.length>0?"active, ":"",E=t.closing?"lightyellow":t.corked?"lightred":"transparent";return{key:"snd "+O+t.bone+", "+bs(t.duct),jsx:y.jsx("div",{style:{backgroundColor:E},children:y.jsx(Oo,{summary:v,details:m})})}}renderRcv(t){const n=t["pending-vane-ack"].reduce((v,m)=>v+m+", ","pending vane acks: "),r=t.nax.reduce((v,m)=>v+m+", ","nacks: "),s=t["live-messages"].map(v=>({key:v["message-num"],jsx:y.jsxs(y.Fragment,{children:["Message #",v["message-num"],y.jsx("br",{}),v["num-received"]," out of ",v["num-fragments"]," fragments received:",y.jsx("br",{}),v.fragments.reduce((m,O)=>m+O+", ","")]})})),a=y.jsxs(y.Fragment,{children:["Live messages:",y.jsx("br",{}),y.jsx(qt,{placeholder:"message num",items:s})]}),u=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:"rcv"}),y.jsx("br",{}),bs(t.duct),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"bone"}),y.jsx("td",{children:"last-acked"}),y.jsx("td",{children:"last-heard"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t.bone}),y.jsx("td",{children:t["last-acked"]}),y.jsx("td",{children:t["last-heard"]})]})]})})]}),c=y.jsxs(y.Fragment,{children:[n,y.jsx("br",{}),r,y.jsx("br",{}),a]}),p=t.closing?"ligthyellow":t.corked?"lightred":"transparent";return{key:"rcv "+t.bone+", "+bs(t.duct),jsx:y.jsx("div",{style:{backgroundColor:p},children:y.jsx(Oo,{summary:u,details:c})})}}renderFlow(t){return t.snd?this.renderSnd(t.snd):t.rcv?this.renderRcv(t.rcv):(console.log("weird flow",t),"weird flow")}renderScry(t){const n=t["keen-state"].metrics,r=y.jsx(y.Fragment,{children:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"rto"}),y.jsx("td",{children:"rtt"}),y.jsx("td",{children:"rttvar"}),y.jsx("td",{children:"ssthresh"}),y.jsx("td",{children:"cwnd"}),y.jsx("td",{children:"counter"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:n.rto}),y.jsx("td",{children:n.rtt}),y.jsx("td",{children:n.rttvar}),y.jsx("td",{children:n.ssthresh}),y.jsx("td",{children:n.cwnd}),y.jsx("td",{children:n.counter})]})]})})}),s=t["keen-state"].wan.map(p=>({key:p.frag,jsx:y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{children:"fragment"}),y.jsx("td",{children:"size"}),y.jsx("td",{children:"last-sent"}),y.jsx("td",{children:"tries"}),y.jsx("td",{children:"skips"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:p.frag}),y.jsx("td",{children:p.size}),y.jsx("td",{children:mr(p["last-sent"])}),y.jsx("td",{children:p.tries}),y.jsx("td",{children:p.skips})]})]})})})),a=y.jsx(qt,{placeholder:"fragment",items:s}),u=y.jsxs(y.Fragment,{children:[y.jsx("b",{children:t["scry-path"]}),y.jsx("br",{}),y.jsx("h5",{style:{marginTop:"1em"},children:"listeners:"}),bs(t["keen-state"].listeners),y.jsx("h5",{style:{marginTop:"1em"},children:"scry state:"}),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{class:"inter",children:[y.jsx("td",{children:"num-fragments"}),y.jsx("td",{children:"num-received"}),y.jsx("td",{children:"next-wake"})]}),y.jsxs("tr",{children:[y.jsx("td",{children:t["keen-state"]["num-fragments"]}),y.jsx("td",{children:t["keen-state"]["num-received"]}),y.jsx("td",{children:mr(t["keen-state"]["next-wake"])})]})]})})]}),c=y.jsxs(y.Fragment,{children:[r,a]});return{key:t["scry-path"],jsx:y.jsx(Oo,{summary:u,details:c})}}render(){const{props:t,state:n}=this,{known:r,alien:s,deets:a}=t.peers,u=m=>{const O=a[m];if(O){if(O.alien)return y.jsxs(y.Fragment,{children:["Pending messages: ",O.alien.messages,"Pending packets: ",O.alien.packets,"Keens: ",this.renderPaths(O.alien.keens)]});if(O.known){const E=O.known,F=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"status"}),y.jsx("table",{children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Life"}),y.jsx("td",{children:E.life})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Route"}),y.jsx("td",{children:E.route?`${E.route.direct?"":"in"}direct, on lane ${E.route.lane}`:"none"})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"QoS"}),y.jsxs("td",{children:[E.qos.kind,", last contact ",mr(E.qos["last-contact"])]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"Bones "}),y.jsxs("td",{children:["closing: ",E.closing.length,", corked: ",E.corked.length]})]})]})})]}),B=E.flows.forward.map(this.renderFlow),Q=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"forward"}),y.jsx(qt,{placeholder:"bone, duct",items:B})]}),me=E.flows.backward.map(this.renderFlow),N=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"backward"}),y.jsx(qt,{placeholder:"bone, duct",items:me})]}),A=E.nax.map(te=>({key:te.bone,jsx:y.jsxs("div",{children:["bone ",te.bone,", message #",te["message-num"],", duct:",y.jsx("br",{}),bs(te.duct)]})})),I=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"nax"}),y.jsx(qt,{placeholder:"bone",items:A})]}),H=E.scries.map(this.renderScry),X=y.jsxs(y.Fragment,{children:[y.jsx("h4",{style:{marginTop:"1em"},children:"scries"}),y.jsx(qt,{placeholder:"path",items:H})]});return y.jsxs(y.Fragment,{children:[y.jsx("button",{style:{position:"absolute",top:0,right:0},onClick:()=>{this.loadPeerDetails(m)},children:"refresh"}),F,Q,N,I,X]})}else return console.log("weird peer",O),"???"}else return"Loading..."},c=r.map(m=>({key:"~"+m,jsx:y.jsx(Oo,{id:m,summary:"~"+m+" (known)",details:u(m),onOpen:this.loadPeerDetails})})),p=s.map(m=>({key:"~"+m,jsx:y.jsx(Oo,{id:m,summary:"~"+m+" (alien)",details:u(m),onOpen:this.loadPeerDetails})})),v=[...c,...p];return y.jsx(qt,{placeholder:"ship name",items:v,children:y.jsx("button",{onClick:this.loadPeers,children:"refresh"})})}}class z6 extends oe.Component{constructor(t){super(t),this.state={},this.loadTimers=this.loadTimers.bind(this)}componentDidMount(){const{timers:t}=this.props;t.length===0&&this.loadTimers()}componentDidUpdate(t,n){}loadTimers(){api.getTimers()}render(){const{props:t,state:n}=this,r=t.timers.map(s=>{const a=bs(s.duct);return{key:a,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:mr(s.date)}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:a})]})}});return y.jsx("table",{children:y.jsx("tbody",{children:y.jsx(qt,{placeholder:"duct",items:r,children:y.jsx("button",{onClick:this.loadTimers,children:"refresh"})})})})}}var Yn={},Ng={},ga={},ic={},Ru={},Qh={},Kh={},sr={},Zh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.VerticalReverse="vertical-reverse",t.Horizontal="horizontal",t.HorizontalReverse="horizontal-reverse"}(e.Orientation||(e.Orientation={}))})(Zh);Object.defineProperty(sr,"__esModule",{value:!0});const Qp=Zh;function H6(e,t){return typeof e=="boolean"?e:t}sr.booleanOptionOr=H6;function Y6(e,t){return typeof e=="number"?e:t}sr.numberOptionOr=Y6;function dM(e,t){return Object.assign({},t.reduce((n,r)=>Object.assign({},n,{[r]:e[r]}),{}))}sr.pick=dM;function G6(e,t){console.log(JSON.stringify(e.map(n=>dM(n,t)),null,2))}sr.debug=G6;function pM(e){return e===void 0}sr.isUndefined=pM;function V6(e={}){return Object.keys(e).reduce((t,n)=>pM(e[n])?t:Object.assign({},t,{[n]:e[n]}),{})}sr.withoutUndefinedKeys=V6;function q6(e,t,n){const r=n.style.dot.size,s=e.template.arrow.size,a=r+e.template.arrow.offset,u=Math.PI/7,c=Q6(e,t,n),p=a*Math.cos(c),v=a*Math.sin(c),m=(a+s)*Math.cos(c-u),O=(a+s)*Math.sin(c-u),E=(a+s/2)*Math.cos(c),F=(a+s/2)*Math.sin(c),B=(a+s)*Math.cos(c+u),Q=(a+s)*Math.sin(c+u);return`M${p},${v} L${m},${O} Q${E},${F} ${B},${Q} L${B},${Q}`}sr.arrowSvgPath=q6;function Q6(e,t,n){const r=t.x-n.x,s=t.y-n.y,a=e.template.commit.spacing;let u,c;switch(e.orientation){case Qp.Orientation.Horizontal:u=s,c=-a;break;case Qp.Orientation.HorizontalReverse:u=s,c=a;break;case Qp.Orientation.VerticalReverse:u=-a,c=r;break;default:u=a,c=r;break}return e.isVertical?Math.abs(s)>a&&(c=0):Math.abs(r)>a&&(u=0),e.reverseArrow&&(u*=-1,c*=-1),Math.atan2(u,c)}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=sr;var n;(function(v){v.Bezier="bezier",v.Straight="straight"})(n||(n={})),e.MergeStyle=n,e.DEFAULT_FONT="normal 12pt Calibri";class r{constructor(m){m.branch=m.branch||{},m.branch.label=m.branch.label||{},m.arrow=m.arrow||{},m.commit=m.commit||{},m.commit.dot=m.commit.dot||{},m.commit.message=m.commit.message||{},this.colors=m.colors||["#000000"],this.branch={color:m.branch.color,lineWidth:m.branch.lineWidth||2,mergeStyle:m.branch.mergeStyle||n.Bezier,spacing:t.numberOptionOr(m.branch.spacing,20),label:{display:t.booleanOptionOr(m.branch.label.display,!0),color:m.branch.label.color||m.commit.color,strokeColor:m.branch.label.strokeColor||m.commit.color,bgColor:m.branch.label.bgColor||"white",font:m.branch.label.font||m.commit.message.font||e.DEFAULT_FONT,borderRadius:t.numberOptionOr(m.branch.label.borderRadius,10)}},this.arrow={size:m.arrow.size||null,color:m.arrow.color||null,offset:m.arrow.offset||2},this.commit={color:m.commit.color,spacing:t.numberOptionOr(m.commit.spacing,25),hasTooltipInCompactMode:t.booleanOptionOr(m.commit.hasTooltipInCompactMode,!0),dot:{color:m.commit.dot.color||m.commit.color,size:m.commit.dot.size||3,strokeWidth:t.numberOptionOr(m.commit.dot.strokeWidth,0),strokeColor:m.commit.dot.strokeColor,font:m.commit.dot.font||m.commit.message.font||"normal 10pt Calibri"},message:{display:t.booleanOptionOr(m.commit.message.display,!0),displayAuthor:t.booleanOptionOr(m.commit.message.displayAuthor,!0),displayHash:t.booleanOptionOr(m.commit.message.displayHash,!0),color:m.commit.message.color||m.commit.color,font:m.commit.message.font||e.DEFAULT_FONT}},this.tag=m.tag||{}}}e.Template=r;const s=new r({colors:["#6963FF","#47E8D4","#6BDB52","#E84BA5","#FFA657"],branch:{color:"#000000",lineWidth:4,spacing:50,mergeStyle:n.Straight},commit:{spacing:60,dot:{size:16,strokeColor:"#000000",strokeWidth:4},message:{color:"black"}},arrow:{size:16,offset:-1.5}});e.blackArrowTemplate=s;const a=new r({colors:["#979797","#008fb5","#f1c109"],branch:{lineWidth:10,spacing:50},commit:{spacing:80,dot:{size:14},message:{font:"normal 14pt Arial"}}});e.metroTemplate=a;var u;(function(v){v.Metro="metro",v.BlackArrow="blackarrow"})(u||(u={})),e.TemplateName=u;function c(v,m){const O=p(v);return m.branch||(m.branch={}),m.commit||(m.commit={}),{colors:m.colors||O.colors,arrow:Object.assign({},O.arrow,m.arrow),branch:Object.assign({},O.branch,m.branch,{label:Object.assign({},O.branch.label,m.branch.label)}),commit:Object.assign({},O.commit,m.commit,{dot:Object.assign({},O.commit.dot,m.commit.dot),message:Object.assign({},O.commit.message,m.commit.message)}),tag:Object.assign({},O.tag,m.tag)}}e.templateExtend=c;function p(v){return v?typeof v=="string"?{[u.BlackArrow]:s,[u.Metro]:a}[v]:v:a}e.getTemplate=p})(Kh);Object.defineProperty(Qh,"__esModule",{value:!0});const K6=Kh,gw=sr;let Z6=class{constructor(t,n,r,s){this.name=t,this.tagStyle=n,this.commitStyle=s,this.render=r}get style(){return{strokeColor:this.tagStyle.strokeColor||this.commitStyle.color,bgColor:this.tagStyle.bgColor||this.commitStyle.color,color:this.tagStyle.color||"white",font:this.tagStyle.font||this.commitStyle.message.font||K6.DEFAULT_FONT,borderRadius:gw.numberOptionOr(this.tagStyle.borderRadius,10),pointerWidth:gw.numberOptionOr(this.tagStyle.pointerWidth,12)}}};Qh.Tag=Z6;Object.defineProperty(Ru,"__esModule",{value:!0});const X6=Qh,J6=()=>(Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)+Math.random().toString(16).substring(3)).substring(0,40);let eN=class mM{constructor(t){this.refs=[],this.x=0,this.y=0;let n,r;try{[,n,r]=t.author.match(/(.*) <(.*)>/)}catch{[n,r]=[t.author,""]}this.author={name:n,email:r,timestamp:Date.now()},this.committer={name:n,email:r,timestamp:Date.now()},this.subject=t.subject,this.body=t.body||"",this.hash=t.hash||J6(),this.hashAbbrev=this.hash.substring(0,7),this.parents=t.parents?t.parents:[],this.parentsAbbrev=this.parents.map(s=>s.substring(0,7)),this.style=Object.assign({},t.style,{message:Object.assign({},t.style.message),dot:Object.assign({},t.style.dot)}),this.dotText=t.dotText,this.onClick=()=>t.onClick?t.onClick(this):void 0,this.onMessageClick=()=>t.onMessageClick?t.onMessageClick(this):void 0,this.onMouseOver=()=>t.onMouseOver?t.onMouseOver(this):void 0,this.onMouseOut=()=>t.onMouseOut?t.onMouseOut(this):void 0,this.renderDot=t.renderDot,this.renderMessage=t.renderMessage,this.renderTooltip=t.renderTooltip}get message(){let t="";return this.style.message.displayHash&&(t+=`${this.hashAbbrev} `),t+=this.subject,this.style.message.displayAuthor&&(t+=` - ${this.author.name} <${this.author.email}>`),t}get branchToDisplay(){return this.branches?this.branches[0]:""}setRefs(t){return this.refs=t.getNames(this.hash),this}setTags(t,n,r){return this.tags=t.getNames(this.hash).map(s=>new X6.Tag(s,n(s),r(s),this.style)),this}setBranches(t){return this.branches=t,this}setPosition({x:t,y:n}){return this.x=t,this.y=n,this}withDefaultColor(t){const n=Object.assign({},this.style,{dot:Object.assign({},this.style.dot),message:Object.assign({},this.style.message)});n.color||(n.color=t),n.dot.color||(n.dot.color=t),n.message.color||(n.message.color=t);const r=this.cloneCommit();return r.style=n,r}cloneCommit(){const t=new mM({author:`${this.author.name} <${this.author.email}>`,subject:this.subject,style:this.style,body:this.body,hash:this.hash,parents:this.parents,dotText:this.dotText,onClick:this.onClick,onMessageClick:this.onMessageClick,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,renderDot:this.renderDot,renderMessage:this.renderMessage,renderTooltip:this.renderTooltip});return t.refs=this.refs,t.branches=this.branches,t.tags=this.tags,t.x=this.x,t.y=this.y,t}};Ru.Commit=eN;var vw;function gM(){if(vw)return ic;vw=1;var e=Fr&&Fr.__rest||function(u,c){var p={};for(var v in u)Object.prototype.hasOwnProperty.call(u,v)&&c.indexOf(v)<0&&(p[v]=u[v]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,v=Object.getOwnPropertySymbols(u);mE.commits.find(({hash:B})=>B===F);let O=m(p,p.refs.getCommit(v.name));for(;O&&O.hash!==v.parentCommitHash;)yield O,O=m(p,O.parents[0])}(this._graph,this._branch)].forEach(p=>{p.refs=p.refs.filter(v=>v!==this.name)}),this._graph.refs.delete(this.name),this._graph.branches.delete(this.name),this._branch=n.createDeletedBranch(this._graph,this._branch.style,()=>{}),this._onGraphUpdate(),this}merge(...c){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot merge to the deleted branch "${this.name}"`);let p=c[0];a(p)||(p={branch:c[0],fastForward:!1,commitOptions:{subject:c[1]}});const{branch:v,fastForward:m,commitOptions:O}=p,E=typeof v=="string"?v:v.name,F=this._graph.refs.getCommit(E);if(!F)throw new Error(`The branch called "${E}" is unknown`);let B=!1;if(m){const Q=this._graph.refs.getCommit(this._branch.name);Q&&(B=this._areCommitsConnected(Q,F))}return m&&B?this._fastForwardTo(F):this._commitWithParents(Object.assign({},O,{subject:O&&O.subject||`Merge branch ${E}`}),[F]),this._onGraphUpdate(),this}tag(c){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot tag on the deleted branch "${this.name}"`);return typeof c=="string"?this._graph.getUserApi().tag({name:c,ref:this._branch.name}):this._graph.getUserApi().tag(Object.assign({},c,{ref:this._branch.name})),this}checkout(){if(this._branch.isDeleted()&&!this._isReferenced())throw new Error(`Cannot checkout the deleted branch "${this.name}"`);const c=this._branch,p=this._graph.refs.getCommit(c.name);return this._graph.currentBranch=c,p&&this._graph.refs.set("HEAD",p),this}_commitWithParents(c,p){const v=this._graph.refs.getCommit(this._branch.name);v?p.unshift(v):this._branch.parentCommitHash&&p.unshift(this._branch.parentCommitHash);const{tag:m}=c,O=e(c,["tag"]),E=new t.Commit(Object.assign({hash:this._graph.generateCommitHash(),author:this._branch.commitDefaultOptions.author||this._graph.author,subject:this._branch.commitDefaultOptions.subject||this._graph.commitMessage},O,{parents:p,style:this._getCommitStyle(c.style)}));v?this._graph.refs.getNames(v).forEach(B=>this._graph.refs.set(B,E.hash)):this._graph.refs.set(this._branch.name,E.hash),this._graph.commits.push(E),this.checkout(),m&&this.tag(m)}_areCommitsConnected(c,p){const v=this._graph.commits.find(({hash:O})=>p===O);return!v||v.parents.length===0?!1:v.parents.includes(c)?!0:v.parents.some(O=>this._areCommitsConnected(c,O))}_fastForwardTo(c){this._graph.refs.set(this._branch.name,c)}_getCommitStyle(c={}){return Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style),c,{message:Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit.message),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style.message),c.message,r.withoutUndefinedKeys({display:this._graph.shouldDisplayCommitMessage&&void 0})),dot:Object.assign({},r.withoutUndefinedKeys(this._graph.template.commit.dot),r.withoutUndefinedKeys(this._branch.commitDefaultOptions.style.dot),c.dot)})}_isReferenced(){return this._graph.branches.has(this.name)||this._graph.refs.hasName(this.name)||this._graph.commits.reduce((c,{refs:p})=>[...c,...p],[]).includes(this.name)}}ic.BranchUserApi=s;function a(u){return typeof u=="object"&&!(u instanceof s)}return ic}var yw;function Xh(){if(yw)return ga;yw=1,Object.defineProperty(ga,"__esModule",{value:!0});const e=gM(),t="";ga.DELETED_BRANCH_NAME=t;class n{constructor(a){this.gitgraph=a.gitgraph,this.name=a.name,this.style=a.style,this.parentCommitHash=a.parentCommitHash,this.commitDefaultOptions=a.commitDefaultOptions||{style:{}},this.onGraphUpdate=a.onGraphUpdate,this.renderLabel=a.renderLabel}getUserApi(){return new e.BranchUserApi(this,this.gitgraph,this.onGraphUpdate)}isDeleted(){return this.name===t}}ga.Branch=n;function r(s,a,u){return new n({name:t,gitgraph:s,style:a,onGraphUpdate:u})}return ga.createDeletedBranch=r,ga}var Jh={},Du={};Object.defineProperty(Du,"__esModule",{value:!0});var r0;(function(e){e.Compact="compact"})(r0||(r0={}));Du.Mode=r0;var Ig={},ed={};Object.defineProperty(ed,"__esModule",{value:!0});class tN{constructor(t){this.rows=new Map,this.maxRowCache=void 0,this.computeRowsFromCommits(t)}getRowOf(t){return this.rows.get(t)||0}getMaxRow(){return this.maxRowCache===void 0&&(this.maxRowCache=nN(Array.from(this.rows.values())).length-1),this.maxRowCache}computeRowsFromCommits(t){t.forEach((n,r)=>{this.rows.set(n.hash,r)}),this.maxRowCache=void 0}}ed.RegularGraphRows=tN;function nN(e){const t=new Set;return e.forEach(n=>t.add(n)),Array.from(t)}Object.defineProperty(Ig,"__esModule",{value:!0});const rN=ed;class iN extends rN.RegularGraphRows{computeRowsFromCommits(t){t.forEach((n,r)=>{let s=r;if(!(r===0)){const u=this.getRowOf(n.parents[0]),c=t[r-1];if(s=Math.max(u+1,this.getRowOf(c.hash)),n.parents.length>1){const v=this.getRowOf(n.parents[1]);uthis.branches.add(s.branchToDisplay)),r&&(this.branches=new Set(Array.from(this.branches).sort(r)))}get(t){return Array.from(this.branches).findIndex(n=>n===t)}getColorOf(t){return this.colors[this.get(t)%this.colors.length]}}Fg.BranchesOrder=lN;var Au={};Object.defineProperty(Au,"__esModule",{value:!0});class uN{constructor(){this.commitPerName=new Map,this.namesPerCommit=new Map}set(t,n){const r=this.commitPerName.get(t);return r&&this.removeNameFrom(r,t),this.addNameTo(n,t),this.addCommitTo(t,n),this}delete(t){return this.hasName(t)&&(this.removeNameFrom(this.getCommit(t),t),this.commitPerName.delete(t)),this}getCommit(t){return this.commitPerName.get(t)}getNames(t){return this.namesPerCommit.get(t)||[]}getAllNames(){return Array.from(this.commitPerName.keys())}hasCommit(t){return this.namesPerCommit.has(t)}hasName(t){return this.commitPerName.has(t)}removeNameFrom(t,n){const r=this.namesPerCommit.get(t)||[];this.namesPerCommit.set(t,r.filter(s=>s!==n))}addNameTo(t,n){const r=this.namesPerCommit.get(t)||[];this.namesPerCommit.set(t,[...r,n])}addCommitTo(t,n){this.commitPerName.set(t,n)}}Au.Refs=uN;var Lu={};Object.defineProperty(Lu,"__esModule",{value:!0});const fN=sr;class cN{constructor(t,n,r,s,a,u){this.branchesPaths=new Map,this.commits=t,this.branches=n,this.commitSpacing=r,this.isGraphVertical=s,this.isGraphReverse=a,this.createDeletedBranch=u}execute(){return this.fromCommits(),this.withMergeCommits(),this.smoothBranchesPaths()}fromCommits(){this.commits.forEach(t=>{let n=this.branches.get(t.branchToDisplay);n||(n=this.getDeletedBranchInPath()||this.createDeletedBranch());const r=[],s=this.branchesPaths.get(n),a=this.commits.find(({hash:u})=>u===t.parents[0]);s?r.push(...s):a&&r.push({x:a.x,y:a.y}),r.push({x:t.x,y:t.y}),this.branchesPaths.set(n,r)})}withMergeCommits(){this.commits.filter(({parents:n})=>n.length>1).forEach(n=>{const r=this.commits.find(({hash:c})=>c===n.parents[1]);if(!r)return;const s=r.branches?r.branches[0]:"";let a=this.branches.get(s);if(!a&&(a=this.getDeletedBranchInPath(),!a))return;const u=[...this.branchesPaths.get(a)||[]];this.branchesPaths.set(a,[...u,{x:n.x,y:n.y,mergeCommit:!0}])})}getDeletedBranchInPath(){return Array.from(this.branchesPaths.keys()).find(t=>t.isDeleted())}smoothBranchesPaths(){const t=new Map;return this.branchesPaths.forEach((n,r)=>{if(n.length<=1){t.set(r,[n]);return}this.isGraphVertical?n=n.sort((a,u)=>a.y>u.y?-1:1):n=n.sort((a,u)=>a.x>u.x?1:-1),this.isGraphReverse&&(n=n.reverse());const s=n.reduce((a,u,c)=>{if(u.mergeCommit){a[a.length-1].push(fN.pick(u,["x","y"]));let p=c-1,v=n[p];for(;p>=0&&v.mergeCommit;)p--,v=n[p];p>=0&&a.push([v])}else a[a.length-1].push(u);return a},[[]]);this.isGraphReverse&&s.forEach(a=>a.reverse()),this.isGraphVertical?s.forEach(a=>{if(a.length<=1)return;const u=a[0],c=a[a.length-1],p=a[1].x,v=Math.round(Math.abs(u.y-c.y)/this.commitSpacing)-1,m=v>0?new Array(v).fill(0).map((E,F)=>({x:p,y:a[0].y-this.commitSpacing*(F+1)})):[],O=t.get(r)||[];t.set(r,[...O,[u,...m,c]])}):s.forEach(a=>{if(a.length<=1)return;const u=a[0],c=a[a.length-1],p=a[1].y,v=Math.round(Math.abs(u.x-c.x)/this.commitSpacing)-1,m=v>0?new Array(v).fill(0).map((E,F)=>({y:p,x:a[0].x+this.commitSpacing*(F+1)})):[],O=t.get(r)||[];t.set(r,[...O,[u,...m,c]])})}),t}}Lu.BranchesPathsCalculator=cN;function hN(e,t,n){return e.map(r=>"M"+r.map(({x:s,y:a},u,c)=>{if(t&&c.length>1&&(u===1||u===c.length-1)){const p=c[u-1];if(n){const v=(p.y+a)/2;return`C ${p.x} ${v} ${s} ${v} ${s} ${a}`}else{const v=(p.x+s)/2;return`C ${v} ${p.y} ${v} ${a} ${s} ${a}`}}return`L ${s} ${a}`}).join(" ").slice(1)).join(" ")}Lu.toSvgPath=hN;var td={};Object.defineProperty(td,"__esModule",{value:!0});const dN=Ru,pN=Xh(),ww=Au;class mN{constructor(t,n){this._graph=t,this._onGraphUpdate=n}clear(){return this._graph.refs=new ww.Refs,this._graph.tags=new ww.Refs,this._graph.commits=[],this._graph.branches=new Map,this._graph.currentBranch=this._graph.createBranch("master"),this._onGraphUpdate(),this}commit(t){return this._graph.currentBranch.getUserApi().commit(t),this}branch(t){return this._graph.createBranch(t).getUserApi()}tag(...t){let n,r,s,a;if(typeof t[0]=="string"?(n=t[0],r=t[1]):(n=t[0].name,r=t[0].ref,s=t[0].style,a=t[0].render),!r){const c=this._graph.refs.getCommit("HEAD");if(!c)return this;r=c}let u;if(this._graph.refs.hasCommit(r)&&(u=r),this._graph.refs.hasName(r)&&(u=this._graph.refs.getCommit(r)),!u)throw new Error(`The ref "${r}" does not exist`);return this._graph.tags.set(n,u),this._graph.tagStyles[n]=s,this._graph.tagRenders[n]=a,this._onGraphUpdate(),this}import(t){const n=new Error("Only `git2json` format is supported for imported data.");if(!Array.isArray(t)||!t.every(u=>typeof u=="object"&&typeof u.author=="object"&&Array.isArray(u.refs)))throw n;const s=t.map(u=>Object.assign({},u,{style:Object.assign({},this._graph.template.commit,{message:Object.assign({},this._graph.template.commit.message,{display:this._graph.shouldDisplayCommitMessage})}),author:`${u.author.name} <${u.author.email}>`})).reverse();this.clear(),this._graph.commits=s.map(u=>new dN.Commit(u)),s.forEach(({refs:u,hash:c})=>{if(!u||!c)return;const p="tag: ";u.map(m=>m.split(p)).map(([m,O])=>O).filter(m=>typeof m=="string").forEach(m=>this._graph.tags.set(m,c)),u.filter(m=>!m.startsWith(p)).forEach(m=>this._graph.refs.set(m,c))});const a=this._getBranches();return this._graph.commits.map(u=>this._withBranches(a,u)).reduce((u,c)=>(c.branches&&c.branches.forEach(p=>u.add(p)),u),new Set).forEach(u=>this.branch(u)),this._onGraphUpdate(),this}_withBranches(t,n){let r=Array.from((t.get(n.hash)||new Set).values());return r.length===0&&(r=[pN.DELETED_BRANCH_NAME]),n.setBranches(r)}_getBranches(){const t=new Map,n=[];return this._graph.refs.getAllNames().filter(s=>s!=="HEAD").forEach(s=>{const a=this._graph.refs.getCommit(s);for(a&&n.push(a);n.length>0;){const u=n.pop(),c=this._graph.commits.find(({hash:v})=>v===u),p=t.get(u)||new Set;p.add(s),t.set(u,p),c&&c.parents&&c.parents.length>0&&n.push(c.parents[0])}}),t}}td.GitgraphUserApi=mN;Object.defineProperty(Ng,"__esModule",{value:!0});const Kp=Xh(),gN=Jh,vN=Du,_w=Fg,yN=Kh,xw=Au,wN=Lu,sc=sr,Mo=Zh,_N=td;let xN=class{constructor(t={}){this.refs=new xw.Refs,this.tags=new xw.Refs,this.tagStyles={},this.tagRenders={},this.commits=[],this.branches=new Map,this.listeners=[],this.nextTimeoutId=null,this.template=yN.getTemplate(t.template),this.currentBranch=this.createBranch("master"),this.orientation=t.orientation,this.reverseArrow=sc.booleanOptionOr(t.reverseArrow,!1),this.initCommitOffsetX=sc.numberOptionOr(t.initCommitOffsetX,0),this.initCommitOffsetY=sc.numberOptionOr(t.initCommitOffsetY,0),this.mode=t.mode,this.author=t.author||"Sergio Flores ",this.commitMessage=t.commitMessage||"He doesn't like George Michael! Boooo!",this.generateCommitHash=typeof t.generateCommitHash=="function"?t.generateCommitHash:()=>{},this.branchesOrderFunction=typeof t.compareBranchesOrder=="function"?t.compareBranchesOrder:void 0,this.branchLabelOnEveryCommit=sc.booleanOptionOr(t.branchLabelOnEveryCommit,!1)}get isHorizontal(){return this.orientation===Mo.Orientation.Horizontal||this.orientation===Mo.Orientation.HorizontalReverse}get isVertical(){return!this.isHorizontal}get isReverse(){return this.orientation===Mo.Orientation.HorizontalReverse||this.orientation===Mo.Orientation.VerticalReverse}get shouldDisplayCommitMessage(){return!this.isHorizontal&&this.mode!==vN.Mode.Compact}getUserApi(){return new _N.GitgraphUserApi(this,()=>this.next())}subscribe(t){this.listeners.push(t);let n=!0;return()=>{if(!n)return;n=!1;const r=this.listeners.indexOf(t);this.listeners.splice(r,1)}}getRenderedData(){const t=this.computeRenderedCommits(),n=this.computeRenderedBranchesPaths(t),r=this.computeCommitMessagesX(n);return this.computeBranchesColor(t,n),{commits:t,branchesPaths:n,commitMessagesX:r}}createBranch(t){const n="HEAD";let r={gitgraph:this,name:"",parentCommitHash:this.refs.getCommit(n),style:this.template.branch,onGraphUpdate:()=>this.next()};if(typeof t=="string")r.name=t,r.parentCommitHash=this.refs.getCommit(n);else{const a=t.from?t.from.name:n,u=this.refs.getCommit(a)||(this.refs.hasCommit(t.from)?t.from:void 0);t.style=t.style||{},r=Object.assign({},r,t,{parentCommitHash:u,style:Object.assign({},r.style,t.style,{label:Object.assign({},r.style.label,t.style.label)})})}const s=new Kp.Branch(r);return this.branches.set(s.name,s),s}computeRenderedCommits(){const t=this.getBranches(),n=(()=>{const c=new Set(this.commits.reduce((m,{hash:O})=>t.has(O)?m:[...m,O],[])),p=this.commits.reduce((m,O)=>O.parents.length>1?[...m,...O.parents.slice(1).map(E=>this.commits.find(({hash:F})=>E===F))]:m,[]),v=new Set;return p.forEach(m=>{let O=m;for(;O&&c.has(O.hash);)v.add(O.hash),O=O.parents.length>0?this.commits.find(({hash:E})=>O.parents[0]===E):void 0}),v})(),r=this.commits.filter(({hash:c})=>t.has(c)||n.has(c)),s=r.map(c=>this.withBranches(t,c)),a=gN.createGraphRows(this.mode,r),u=new _w.BranchesOrder(s,this.template.colors,this.branchesOrderFunction);return s.map(c=>c.setRefs(this.refs)).map(c=>this.withPosition(a,u,c)).map(c=>c.withDefaultColor(this.getBranchDefaultColor(u,c.branchToDisplay))).map(c=>c.setTags(this.tags,p=>Object.assign({},this.tagStyles[p],this.template.tag),p=>this.tagRenders[p]))}computeRenderedBranchesPaths(t){return new wN.BranchesPathsCalculator(t,this.branches,this.template.commit.spacing,this.isVertical,this.isReverse,()=>Kp.createDeletedBranch(this,this.template.branch,()=>this.next())).execute()}computeBranchesColor(t,n){const r=new _w.BranchesOrder(t,this.template.colors,this.branchesOrderFunction);Array.from(n).forEach(([s])=>{s.computedColor=s.style.color||this.getBranchDefaultColor(r,s.name)})}computeCommitMessagesX(t){return Array.from(t).length*this.template.branch.spacing}withBranches(t,n){let r=Array.from((t.get(n.hash)||new Set).values());return r.length===0&&(r=[Kp.DELETED_BRANCH_NAME]),n.setBranches(r)}getBranches(){const t=new Map,n=[];return this.refs.getAllNames().filter(s=>s!=="HEAD").forEach(s=>{const a=this.refs.getCommit(s);for(a&&n.push(a);n.length>0;){const u=n.pop(),c=this.commits.find(({hash:v})=>v===u),p=t.get(u)||new Set;p.add(s),t.set(u,p),c&&c.parents&&c.parents.length>0&&n.push(c.parents[0])}}),t}withPosition(t,n,r){const s=t.getRowOf(r.hash),a=t.getMaxRow(),u=n.get(r.branchToDisplay);switch(this.orientation){default:return r.setPosition({x:this.initCommitOffsetX+this.template.branch.spacing*u,y:this.initCommitOffsetY+this.template.commit.spacing*(a-s)});case Mo.Orientation.VerticalReverse:return r.setPosition({x:this.initCommitOffsetX+this.template.branch.spacing*u,y:this.initCommitOffsetY+this.template.commit.spacing*s});case Mo.Orientation.Horizontal:return r.setPosition({x:this.initCommitOffsetX+this.template.commit.spacing*s,y:this.initCommitOffsetY+this.template.branch.spacing*u});case Mo.Orientation.HorizontalReverse:return r.setPosition({x:this.initCommitOffsetX+this.template.commit.spacing*(a-s),y:this.initCommitOffsetY+this.template.branch.spacing*u})}}getBranchDefaultColor(t,n){return t.getColorOf(n)}next(){this.nextTimeoutId&&window.clearTimeout(this.nextTimeoutId),this.nextTimeoutId=window.setTimeout(()=>{this.listeners.forEach(t=>t(this.getRenderedData()))},0)}};Ng.GitgraphCore=xN;Object.defineProperty(Yn,"__esModule",{value:!0});var SN=Ng,MN=Yn.GitgraphCore=SN.GitgraphCore,kN=Du,CN=Yn.Mode=kN.Mode,ON=td;Yn.GitgraphUserApi=ON.GitgraphUserApi;var EN=gM();Yn.BranchUserApi=EN.BranchUserApi;var TN=Xh();Yn.Branch=TN.Branch;var bN=Ru;Yn.Commit=bN.Commit;var PN=Qh;Yn.Tag=PN.Tag;var RN=Au;Yn.Refs=RN.Refs;var Ug=Kh,DN=Yn.MergeStyle=Ug.MergeStyle,AN=Yn.TemplateName=Ug.TemplateName,LN=Yn.templateExtend=Ug.templateExtend,jN=Zh,NN=Yn.Orientation=jN.Orientation,IN=Lu,FN=Yn.toSvgPath=IN.toSvgPath,UN=sr,$N=Yn.arrowSvgPath=UN.arrowSvgPath;function WN(e){var t=e.branch,n=e.commit,r=oe.useState({textWidth:0,textHeight:0}),s=r[0],a=r[1],u=oe.useCallback(function(v){if(v){var m=v.getBBox();a({textWidth:m.width,textHeight:m.height})}},[]),c=s.textWidth+2*Ei.paddingX,p=s.textHeight+2*Ei.paddingY;return oe.createElement("g",null,oe.createElement("rect",{stroke:t.style.label.strokeColor||n.style.color,fill:t.style.label.bgColor,rx:t.style.label.borderRadius,width:c,height:p}),oe.createElement("text",{ref:u,fill:t.style.label.color||n.style.color,style:{font:t.style.label.font},alignmentBaseline:"middle",dominantBaseline:"middle",x:Ei.paddingX,y:p/2},t.name))}var Ei=oe.forwardRef(function(e,t){var n=e.branch,r=e.commit,s=e.branchLabelX;if(!n.style.label.display)return null;if(!e.gitgraph.branchLabelOnEveryCommit){var a=e.gitgraph.refs.getCommit(n.name);if(r.hash!==a)return null}if(r.branchToDisplay!==n.name)return null;var u=n.renderLabel?n.renderLabel(n):oe.createElement(WN,{branch:n,commit:r});if(e.gitgraph.isVertical)return oe.createElement("g",{ref:t,transform:"translate("+(s||0)+", 0)"},u);var c=r.style.dot.size*2,p=10,v=c+p;return oe.createElement("g",{ref:t,transform:"translate("+r.x+", "+v+")"},u)});Ei.paddingX=10;Ei.paddingY=5;var BN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sc=function(e){BN(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={textWidth:0},n.$text=oe.createRef(),n}return t.prototype.componentDidMount=function(){this.setState({textWidth:this.$text.current.getBBox().width})},t.prototype.render=function(){if(this.props.commit.renderTooltip)return this.props.commit.renderTooltip(this.props.commit);var n=this.props.commit.style.dot.size*2,r=10,s=t.padding,a=5,u=50,c=r+this.state.textWidth+2*s,p=["M 0,0","L "+r+","+r,"V "+(u/2-a),"Q "+r+","+u/2+" "+(r+a)+","+u/2,"H "+(c-a),"Q "+c+","+u/2+" "+c+","+(u/2-a),"V -"+(u/2-a),"Q "+c+",-"+u/2+" "+(c-a)+",-"+u/2,"H "+(r+a),"Q "+r+",-"+u/2+" "+r+",-"+(u/2-a),"V -"+r,"z"].join(" ");return oe.createElement("g",{transform:"translate("+n+", "+n/2+")"},oe.createElement("path",{d:p,fill:"#EEE"}),oe.createElement("text",{ref:this.$text,x:r+s,y:0,alignmentBaseline:"central",fill:"#333"},this.props.children))},t.padding=10,t}(oe.Component),zN=function(e){var t=e.commit,n=e.onMouseOver,r=e.onMouseOut;return t.renderDot?t.renderDot(t):oe.createElement(oe.Fragment,null,oe.createElement("defs",null,oe.createElement("circle",{id:t.hash,cx:t.style.dot.size,cy:t.style.dot.size,r:t.style.dot.size,fill:t.style.dot.color}),oe.createElement("clipPath",{id:"clip-"+t.hash},oe.createElement("use",{xlinkHref:"#"+t.hash}))),oe.createElement("g",{onClick:t.onClick,onMouseOver:n,onMouseOut:r},oe.createElement("use",{xlinkHref:"#"+t.hash,clipPath:"url(#clip-"+t.hash+")",stroke:t.style.dot.strokeColor,strokeWidth:t.style.dot.strokeWidth&&t.style.dot.strokeWidth*2}),t.dotText&&oe.createElement("text",{alignmentBaseline:"central",textAnchor:"middle",x:t.style.dot.size,y:t.style.dot.size,style:{font:t.style.dot.font}},t.dotText)))},HN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),YN=function(e){HN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(){var n=this,r=this.props.commits.find(function(a){var u=a.hash;return u===n.props.parentHash});if(!r)return null;var s=this.props.gitgraph.reverseArrow?{x:this.props.commitRadius+(r.x-this.props.commit.x),y:this.props.commitRadius+(r.y-this.props.commit.y)}:{x:this.props.commitRadius,y:this.props.commitRadius};return oe.createElement("g",{transform:"translate("+s.x+", "+s.y+")"},oe.createElement("path",{d:$N(this.props.gitgraph,r,this.props.commit),fill:this.props.gitgraph.template.arrow.color}))},t}(oe.Component),GN=oe.forwardRef(function(e,t){var n=e.commit,r=e.messageX;if(n.renderMessage)return oe.createElement("g",{ref:t,transform:"translate("+r+", 0)"},n.renderMessage(n));var s=null;n.body&&(s=oe.createElement("foreignObject",{width:"600",x:"10"},oe.createElement("p",null,n.body)));var a=n.style.dot.size;return oe.createElement("g",{ref:t,transform:"translate("+r+", "+a+")"},oe.createElement("text",{alignmentBaseline:"central",fill:n.style.message.color,style:{font:n.style.message.font},onClick:n.onMessageClick},n.message),s)}),i0=10,VN=5;function qN(e){var t=oe.useState({textWidth:0,textHeight:0}),n=t[0],r=t[1],s=oe.useRef(null);oe.useEffect(function(){var O=s.current.getBBox();r({textWidth:O.width,textHeight:O.height})},[]);var a=e.tag,u=a.style.pointerWidth,c=a.style.borderRadius,p=u+n.textWidth+2*i0,v=n.textHeight+2*VN,m=["M 0,0","L "+u+","+v/2,"V "+v/2,"Q "+u+","+v/2+" "+(u+c)+","+v/2,"H "+(p-c),"Q "+p+","+v/2+" "+p+","+(v/2-c),"V "+-(v/2-c),"Q "+p+",-"+v/2+" "+(p-c)+",-"+v/2,"H "+(u+c),"Q "+u+",-"+v/2+" "+u+",-"+v/2,"V -"+v/2,"z"].join(" ");return oe.createElement("g",null,oe.createElement("path",{d:m,fill:a.style.bgColor,stroke:a.style.strokeColor}),oe.createElement("text",{ref:s,fill:a.style.color,style:{font:a.style.font},alignmentBaseline:"middle",dominantBaseline:"middle",x:u+i0,y:0},a.name))}var QN=oe.forwardRef(function(e,t){var n=e.tag,r=e.commit,s=e.tagX;return oe.createElement("g",{ref:t,transform:"translate("+(s||0)+", "+r.style.dot.size+")"},n.render?n.render(n.name,n.style):oe.createElement(qN,{tag:n}))}),KN=function(e){var t=e.commit,n=e.commits,r=e.gitgraph,s=e.commitMessagesX,a=oe.useRef(),u=oe.useRef([]),c=oe.useRef(),p=oe.useState(0),v=p[0],m=p[1],O=oe.useState([]),E=O[0],F=O[1],B=oe.useState(0),Q=B[0],me=B[1],N=oe.useMemo(function(){if(!r.template.arrow.size)return null;var J=t.style.dot.size;return t.parents.map(function(le){return oe.createElement(YN,{key:le,commits:n,commit:t,gitgraph:r,parentHash:le,commitRadius:J})})},[n,t,r]),A=oe.useMemo(function(){var J=Array.from(r.branches.values());return J.map(function(le){return oe.createElement(Ei,{key:le.name,gitgraph:r,branch:le,commit:t,ref:a,branchLabelX:v})})},[r,t,v]),I=oe.useMemo(function(){return u.current=[],!t.tags||r.isHorizontal?null:t.tags.map(function(J,le){return oe.createElement(QN,{key:t.hashAbbrev+"-"+J.name,commit:t,tag:J,ref:function(fe){return u.current[le]=fe},tagX:E[le]||0})})},[t,r,E]),H=e.getWithCommitOffset(t),X=H.x,te=H.y;oe.useLayoutEffect(function(){if(!r.isHorizontal){var J=10,le=s;if(a.current){m(le);var fe=a.current.getBBox().width+Ei.paddingX;le+=fe+J}var P=u.current.map(function(f){if(!f)return 0;var g=le,S=f.getBBox().width+i0;return le+=S+J,g});F(P),c.current&&me(le)}},[u,r,s]);var K=e.currentCommitOver===t&&(e.gitgraph.isHorizontal||e.gitgraph.mode===CN.Compact&&t.style.hasTooltipInCompactMode);return K&&e.setTooltip(oe.createElement("g",{transform:"translate("+X+", "+te+")"},oe.createElement(Sc,{commit:t},t.hashAbbrev," - ",t.subject))),oe.createElement("g",{transform:"translate("+X+", "+te+")"},oe.createElement(zN,{commit:t,onMouseOver:function(){e.setCurrentCommitOver(t),t.onMouseOver()},onMouseOut:function(){e.setCurrentCommitOver(null),e.setTooltip(null),t.onMouseOut()}}),N,oe.createElement("g",{transform:"translate("+-X+", 0)"},t.style.message.display&&oe.createElement(GN,{commit:t,ref:c,messageX:Q}),A,I))},ZN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),XN=function(e){ZN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(){var n=this;return oe.createElement("path",{d:FN(this.props.coordinates.map(function(r){return r.map(function(s){return n.props.getWithCommitOffset(s)})}),this.props.isBezier,this.props.gitgraph.isVertical),fill:"none",stroke:this.props.branch.computedColor,strokeWidth:this.props.branch.style.lineWidth,transform:"translate("+this.props.offset+", "+this.props.offset+")"})},t}(oe.Component),JN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function Sw(e){return"graph"in e}var e4=function(e){JN(t,e);function t(n){var r=e.call(this,n)||this;return r.$graph=oe.createRef(),r.$commits=oe.createRef(),r.$tooltip=null,r.state={commits:[],branchesPaths:new Map,commitMessagesX:0,commitYWithOffsets:{},shouldRecomputeOffsets:!0,currentCommitOver:null},r.gitgraph=Sw(n)?n.graph:new MN(n.options),r.gitgraph.subscribe(function(s){var a=s.commits,u=s.branchesPaths,c=s.commitMessagesX;r.setState({commits:a,branchesPaths:u,commitMessagesX:c,shouldRecomputeOffsets:!0})}),r}return t.prototype.render=function(){var n=this;return oe.createElement("svg",{ref:this.$graph},oe.createElement("g",{transform:"translate("+Ei.paddingX+", "+Sc.padding+")"},this.renderBranchesPaths(),oe.createElement("g",{ref:this.$commits},this.state.commits.map(function(r){return oe.createElement(KN,{key:r.hash,commits:n.state.commits,commit:r,currentCommitOver:n.state.currentCommitOver,setCurrentCommitOver:n.setCurrentCommitOver.bind(n),gitgraph:n.gitgraph,getWithCommitOffset:n.getWithCommitOffset.bind(n),setTooltip:n.setTooltip.bind(n),commitMessagesX:n.state.commitMessagesX})})),this.$tooltip))},t.prototype.componentDidMount=function(){Sw(this.props)||this.props.children(this.gitgraph.getUserApi())},t.prototype.componentDidUpdate=function(){if(this.$graph.current){var n=this.$graph.current.getBBox(),r=n.height,s=n.width;this.$graph.current.setAttribute("width",(s+Sc.padding+Ei.paddingX).toString()),this.$graph.current.setAttribute("height",(r+Sc.padding+Ei.paddingY).toString())}if(this.state.shouldRecomputeOffsets&&this.$commits.current){var a=Array.from(this.$commits.current.children);this.setState({commitYWithOffsets:this.computeOffsets(a),shouldRecomputeOffsets:!1})}},t.prototype.setCurrentCommitOver=function(n){this.setState({currentCommitOver:n})},t.prototype.setTooltip=function(n){this.$tooltip=n},t.prototype.renderBranchesPaths=function(){var n=this,r=this.gitgraph.template.commit.dot.size,s=this.gitgraph.template.branch.mergeStyle===DN.Bezier;return Array.from(this.state.branchesPaths).map(function(a){var u=a[0],c=a[1];return oe.createElement(XN,{key:u.name,gitgraph:n.gitgraph,branch:u,coordinates:c,getWithCommitOffset:n.getWithCommitOffset.bind(n),isBezier:s,offset:r})})},t.prototype.computeOffsets=function(n){var r=0,s=this.gitgraph.orientation===NN.VerticalReverse?n:n.reverse();return s.reduce(function(a,u){var c=parseInt(u.getAttribute("transform").split(",")[1].slice(0,-1),10),p=u.getElementsByTagName("foreignObject")[0],v=p&&p.firstElementChild,m=0;if(v){var O=v.getBoundingClientRect().height,E=window.getComputedStyle(v).marginTop||"0px",F=parseInt(E.replace("px",""),10);m=O+F}return p&&p.setAttribute("height",m+"px"),a[c]=c+r,r+=m,a},{})},t.prototype.getWithCommitOffset=function(n){var r=n.x,s=n.y;return{x:r,y:this.state.commitYWithOffsets[s]||s}},t.defaultProps={options:{}},t}(oe.Component);class t4 extends oe.Component{constructor(t){super(t),this.clickety=this.clickety.bind(this),this.clickCommit=this.clickCommit.bind(this),this.submit=this.submit.bind(this),this.graph=this.graph.bind(this),this.template=LN(AN.Metro,{branch:{lineWidth:6},commit:{spacing:40,dot:{size:10},message:{displayHash:!1,displayAuthor:!1,font:"normal 16pt monospace"}}})}componentDidMount(){api.getCommits()}clickety(){let{commits:t,gitgraph:n}=this.props;if(!t.commits)return;let r={};t.commits.forEach(a=>{r[a.commitHash]=a});let s=t.commits.map(a=>{console.log(a.commitHash,t.head);let u=[];return a.commitHash in t.head&&(u=["HEAD",t.head[a.commitHash]]),{refs:u,hash:a.commitHash.slice(2),parents:a.parents.map(c=>c.slice(2)),onMessageClick:this.clickCommit,subject:"commit: "+a.commitHash.slice(-5)+", content: "+a.contentHash.slice(-5)+", parents: "+a.parents.map(c=>c.slice(-5)),author:{name:"me",email:"me",timestamp:15e11}}});n.import(s)}clickCommit(t,n){console.log("click",t);let r=t.refs.slice(-1)[0];if(r)this.bobDesk.value==""?this.bobDesk.value=r:this.aliDesk.value=r;else return}submit(){api.pottery({ali:this.aliDesk.value,bob:this.bobDesk.value,germ:this.germ.value})}graph(t){this.setState({gitgraph:t})}render(){let t="f7 mono ba bg-gray0-d white-d pa3 mb2 db focus-b--black focus-b--white-d b--gray3 b--gray2-d nowrap ";return y.Fragment,this.submit,this.clickety(),y.jsx("div",{className:"cf w-100 flex flex-column pa4 ba-m ba-l ba-xl b--gray2 br1 h-100 h-100-minus-40-m h-100-minus-40-l h-100-minus-40-xl f9 white-d",children:y.jsx(e4,{options:{template:this.template},children:this.graph})})}}class n4 extends oe.Component{constructor(t){super(t),this.state={},this.loadBindings=this.loadBindings.bind(this),this.loadCache=this.loadCache.bind(this),this.loadConnections=this.loadConnections.bind(this),this.loadAuthenticationState=this.loadAuthenticationState.bind(this),this.loadChannels=this.loadChannels.bind(this)}componentDidMount(){const{props:t}=this;t.bindings.length===0&&this.loadBindings(),t.cache.length===0&&this.loadCache(),t.connections.length==0&&this.loadConnections(),t.authentication.sessions.length==0&&this.loadAuthenticationState(),t.channels.length==0&&this.loadChannels()}componentDidUpdate(t,n){}loadBindings(){api.getBindings()}loadCache(){api.getCache()}clearCache(t){api.clearCache(t)}loadConnections(){api.getConnections()}loadAuthenticationState(){api.getAuthenticationState()}loadChannels(){api.getChannels()}render(){const{props:t,state:n}=this,r=t.bindings.map(m=>({key:m.location+" "+m.action,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:m.location}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"50%"},children:m.action})]})})),s=t.cache.map(m=>({key:m.url+" "+(m.val?"LIVE":"CLEARED"),jsx:y.jsxs("div",{class:"flex",style:{marginBottom:"3px"},children:[y.jsx("div",{style:{width:"45%"},children:m.url}),y.jsxs("div",{style:{width:"5%"},children:["(v",m.aeon,")"]}),m.val?y.jsxs("div",{style:{width:"50%",position:"relative"},children:[y.jsx("div",{style:{display:"inline-block",width:"10%"},children:m.val.auth?"auth":"free"}),y.jsx("div",{style:{display:"inline-block",width:"10%"},children:m.val.payload.status}),y.jsx("div",{style:{display:"inline-block",width:"50%"},children:m.val.payload.headers.reduce((O,E)=>(O?O+"; ":"")+E.key+"="+E.value,"")}),y.jsx("div",{style:{display:"inline-block",width:"25%"},children:m.val.payload.data?m.val.payload.data.toLocaleString("de-DE")+" bytes":"no data"}),y.jsx("div",{style:{display:"inline-block",width:"5%"},children:y.jsx("button",{onClick:()=>{this.clearCache(m.url)},children:"clear"})})]}):"cleared"]})})),a=t.connections.map(m=>({key:m.duct+" "+m.action,jsx:y.jsx("table",{style:{borderBottom:"1px solid black"},children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"duct"}),y.jsx("td",{children:m.duct})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"binding"}),y.jsx("td",{children:m.action})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"request"}),y.jsxs("td",{children:["from ",m.request.source,",",m.request.authenticated?" ":" un","authenticated and",m.request.secure?" ":" in","secure"]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"response"}),y.jsxs("td",{children:["sent ",m.response.sent," bytes.",y.jsx("br",{}),m.response.header?y.jsxs(y.Fragment,{children:["status ",m.response.header["status-code"],y.jsx("br",{}),m.response.header.headers.reduce((O,E)=>O+E+", ","")]}):null]})]})]})})})),u=t.channels.map(m=>{const O=y.jsxs(y.Fragment,{children:[m.session,y.jsx("table",{style:{borderBottom:"1px solid black"},children:y.jsxs("tbody",{children:[y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"identity"}),y.jsx("td",{children:m.identity})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"connected?"}),y.jsx("td",{children:m.connected?"connected":"disconnected, expires "+mr(m.expiry)})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"next-id"}),y.jsx("td",{children:m["next-id"]})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"last-ack"}),y.jsx("td",{children:mr(m["last-ack"])})]}),y.jsxs("tr",{children:[y.jsx("td",{class:"inter",children:"unacked"}),y.jsx("td",{children:m.unacked.reduce((F,B)=>F+B+", ","")})]})]})})]}),E=m.subscriptions.map(F=>({key:`${F.id} ${F.ship} ${F.app} ${F.path}`,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",style:{maxWidth:"15%"},children:F.id}),y.jsxs("div",{class:"flex-auto",style:{maxWidth:"15%"},children:["~",F.ship]}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"20%"},children:F.app}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"35%"},children:F.path}),y.jsx("div",{class:"flex-auto",style:{maxWidth:"15%"},children:F.unacked})]})}));return{key:m.session,jsx:y.jsx(Oo,{summary:O,details:y.jsx(qt,{placeholder:"id, ship, app, path",items:E})})}}),c=t.authentication.sessions.map(m=>({key:m.identity,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",style:{maxWidth:"5em"},children:[m.cookie.slice(0,6),"…"]}),y.jsxs("div",{class:"flex-auto",style:{width:"40%"},children:["~",m.identity]}),y.jsx("div",{class:"flex-auto",children:mr(m.expiry)}),y.jsxs("div",{class:"flex-auto",children:[m.channels," channel(s)"]}),y.jsx("div",{class:"flex-auto",children:y.jsxs("form",{method:"post",action:"/~/logout?redirect=/~debug/eyre",children:[y.jsx("input",{type:"hidden",name:"sid",value:m.cookie}),y.jsx("button",{type:"submit",name:"all",children:"kick"})]})})]})})),p=t.authentication.visiting.map(m=>({key:"~"+m.who+":"+m.nonce,jsx:y.jsxs("div",{class:"flex",children:[y.jsxs("div",{class:"flex-auto",children:["~",m.who]}),y.jsx("div",{class:"flex-auto",children:m.nonce}),y.jsx("div",{class:"flex-auto",children:m.goal?"pending, will return to "+m.goal:y.jsxs("form",{method:"post",action:"/~/logout?redirect=/~debug/eyre",children:["logged in since ",mr(m.made),y.jsx("input",{type:"hidden",name:"host",value:"~"+m.who}),y.jsx("input",{type:"hidden",name:"sid",value:m.nonce}),y.jsx("button",{type:"submit",name:"eauth",children:"log out"})]})})]})})),v=t.authentication.visitors.map(m=>({key:m.nonce+":~"+m.ship,jsx:y.jsxs("div",{class:"flex",children:[y.jsx("div",{class:"flex-auto",children:m.nonce}),y.jsx("div",{class:"flex-auto",children:m.duct}),m.sesh?y.jsxs("div",{class:"flex-auto",children:["session: ",m.sesh.slice(0,6),"…"]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{class:"flex-auto",children:m.pend?"request pending":"no pending request"}),y.jsx("div",{class:"flex-auto",children:m.ship}),y.jsxs("div",{class:"flex-auto",children:["redirect: ",m.last]}),y.jsx("div",{class:"flex-auto",children:m.toke?"token received":"no token yet"})]})]})}));return y.jsxs(y.Fragment,{children:[y.jsx("h4",{children:"Bindings"}),y.jsx(qt,{placeholder:"binding",items:r,children:y.jsx("button",{onClick:this.loadBindings,children:"refresh"})}),y.jsx("h4",{children:"Cache"}),t.cache.reduce((m,O)=>m+(O.val&&O.val.payload.data||0),0).toLocaleString("de-DE")," bytes in cache",y.jsx(qt,{placeholder:"cache url, LIVE vs CLEARED",items:s,open:!1,children:y.jsx("button",{onClick:this.loadCache,children:"refresh"})}),y.jsx("h4",{children:"Connections"}),y.jsx(qt,{placeholder:"duct, binding",items:a,children:y.jsx("button",{onClick:this.loadConnections,children:"refresh"})}),y.jsx("h4",{children:"Channels"}),y.jsx(qt,{placeholder:"session id",items:u,children:y.jsx("button",{onClick:this.loadChannels,children:"refresh"})}),y.jsx("h4",{children:"Authentication"}),y.jsx("form",{method:"post",action:"/~/logout",children:y.jsx("button",{type:"submit",children:"logout self"})}),y.jsx("form",{method:"post",action:"/~/logout",children:y.jsx("button",{type:"submit",name:"all",children:"logout all selves"})}),y.jsx("br",{}),y.jsx("button",{onClick:this.loadAuthenticationState,children:"refresh"}),y.jsx("h3",{children:"Sessions"}),y.jsx(qt,{placeholder:"identity",items:c,open:!1}),y.jsx("h3",{children:"Outgoing eauth"}),y.jsx(qt,{placeholder:"host",items:p}),y.jsx("h3",{children:"Incoming eauth"}),y.jsx(qt,{placeholder:"visitor",items:v})]})}}class r4 extends oe.Component{constructor(t){super(t),this.state=qe.state,qe.setStateHandler(this.setState.bind(this))}componentDidMount(){new Image().src="/~debug/img/Spinner.png"}render(){const{state:t}=this;return y.jsx(_3,{children:y.jsxs(w3,{children:[y.jsx(ks,{exact:!0,path:"/~debug",render:n=>y.jsx(Cs,{status:t.status,selected:"",children:y.jsx(Aj,{text:"select a component on the left"})})}),y.jsx(ks,{exact:!0,path:Os("apps"),render:n=>y.jsx(Cs,{status:t.status,selected:"apps",children:y.jsx(N6,{apps:t.apps,...n})})}),y.jsx(ks,{exact:!0,path:Os("logs"),render:n=>y.jsx(Cs,{status:t.status,selected:"logs",children:y.jsx($6,{logs:t.logs,...n})})}),y.jsx(ks,{exact:!0,path:Os("spider"),render:n=>y.jsx(Cs,{status:t.status,selected:"spider",children:y.jsx(W6,{threads:t.threads,...n})})}),y.jsx(ks,{exact:!0,path:Os("ames"),render:n=>y.jsx(Cs,{status:t.status,selected:"ames",children:y.jsx(B6,{peers:t.peers,...n})})}),y.jsx(ks,{exact:!0,path:Os("behn"),render:n=>y.jsx(Cs,{status:t.status,selected:"behn",children:y.jsx(z6,{timers:t.timers,...n})})}),y.jsx(ks,{exact:!0,path:Os("clay"),render:n=>y.jsx(Cs,{status:t.status,selected:"clay",children:y.jsx(t4,{commits:t.commits,...n})})}),y.jsx(ks,{exact:!0,path:Os("eyre"),render:n=>y.jsx(Cs,{status:t.status,selected:"eyre",children:y.jsx(n4,{bindings:t.bindings,cache:t.cache,connections:t.connections,authentication:t.authentication,channels:t.channels,...n})})})]})})}}Pg.setAuthTokens({ship:window.ship});console.log("new world!");window.urb=new window.channel;Rj.start();MR.render(y.jsx(r4,{}),document.querySelectorAll("#root")[0]);export{s4 as F,hM as _,o4 as a}; diff --git a/pkg/arvo/app/debug/js/index.js b/pkg/arvo/app/debug/js/index.js deleted file mode 100644 index 31a52007e7..0000000000 --- a/pkg/arvo/app/debug/js/index.js +++ /dev/null @@ -1,67580 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('buffer')) : - typeof define === 'function' && define.amd ? define('index', ['buffer'], factory) : - (global = global || self, factory(global.buffer)); -}(this, (function (buffer) { 'use strict'; - - buffer = buffer && Object.prototype.hasOwnProperty.call(buffer, 'default') ? buffer['default'] : buffer; - - var global$1 = (typeof global !== "undefined" ? global : - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : {}); - - // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js - var performance$1 = global$1.performance || {}; - var performanceNow = - performance$1.now || - performance$1.mozNow || - performance$1.msNow || - performance$1.oNow || - performance$1.webkitNow || - function(){ return (new Date()).getTime() }; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); - } - - function unwrapExports (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; - } - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - /* - object-assign - (c) Sindre Sorhus - @license MIT - */ - /* eslint-disable no-unused-vars */ - var getOwnPropertySymbols = Object.getOwnPropertySymbols; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var propIsEnumerable = Object.prototype.propertyIsEnumerable; - - function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); - } - - function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } - } - - var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; - }; - - function C(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - printWarning('warn', format, args); - } - } - function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } - } - - function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0; - - if (!hasExistingStack) { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } - } - - var argsWithFormat = args.map(function (item) { - return '' + item; - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - throw new Error(message); - } catch (x) {} - } - } - - var didWarnStateUpdateForUnmountedComponent = {}; - - function warnNoop(publicInstance, callerName) { - { - var _constructor = publicInstance.constructor; - var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; - var warningKey = componentName + "." + callerName; - - if (didWarnStateUpdateForUnmountedComponent[warningKey]) { - return; - } - - error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); - - didWarnStateUpdateForUnmountedComponent[warningKey] = true; - } - } - /** - * This is the abstract API for an update queue. - */ - - - var ReactNoopUpdateQueue = { - /** - * Checks whether or not this composite component is mounted. - * @param {ReactClass} publicInstance The instance we want to test. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function (publicInstance) { - return false; - }, - - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueForceUpdate: function (publicInstance, callback, callerName) { - warnNoop(publicInstance, 'forceUpdate'); - }, - - /** - * Replaces all of the state. Always use this or `setState` to mutate state. - * You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} completeState Next state. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { - warnNoop(publicInstance, 'replaceState'); - }, - - /** - * Sets a subset of the state. This only exists because _pendingState is - * internal. This provides a merging strategy that is not available to deep - * properties which is confusing. TODO: Expose pendingState or don't use it - * during the merge. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} partialState Next partial state to be merged with state. - * @param {?function} callback Called after component is updated. - * @param {?string} Name of the calling function in the public API. - * @internal - */ - enqueueSetState: function (publicInstance, partialState, callback, callerName) { - warnNoop(publicInstance, 'setState'); - } - }; - - var emptyObject = {}; - - { - Object.freeze(emptyObject); - } - /** - * Base class helpers for the updating state of a component. - */ - - - function Component(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the - // renderer. - - this.updater = updater || ReactNoopUpdateQueue; - } - - Component.prototype.isReactComponent = {}; - /** - * Sets a subset of the state. Always use this to mutate - * state. You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * There is no guarantee that calls to `setState` will run synchronously, - * as they may eventually be batched together. You can provide an optional - * callback that will be executed when the call to setState is actually - * completed. - * - * When a function is provided to setState, it will be called at some point in - * the future (not synchronously). It will be called with the up to date - * component arguments (state, props, context). These values can be different - * from this.* because your function may be called after receiveProps but before - * shouldComponentUpdate, and this new state, props, and context will not yet be - * assigned to this. - * - * @param {object|function} partialState Next partial state or function to - * produce next partial state to be merged with current state. - * @param {?function} callback Called after state is updated. - * @final - * @protected - */ - - Component.prototype.setState = function (partialState, callback) { - if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == 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, partialState, callback, 'setState'); - }; - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {?function} callback Called after update is complete. - * @final - * @protected - */ - - - Component.prototype.forceUpdate = function (callback) { - this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); - }; - /** - * Deprecated APIs. These APIs used to exist on classic React classes but since - * we would like to deprecate them, we're not going to move them over to this - * modern base class. Instead, we define a getter that warns if it's accessed. - */ - - - { - var deprecatedAPIs = { - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] - }; - - var defineDeprecationWarning = function (methodName, info) { - Object.defineProperty(Component.prototype, methodName, { - get: function () { - warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); - - return undefined; - } - }); - }; - - for (var fnName in deprecatedAPIs) { - if (deprecatedAPIs.hasOwnProperty(fnName)) { - defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - } - } - } - - function ComponentDummy() {} - - ComponentDummy.prototype = Component.prototype; - /** - * Convenience component with default shallow equality check for sCU. - */ - - function PureComponent(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - - var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); - pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. - - _assign(pureComponentPrototype, Component.prototype); - - pureComponentPrototype.isPureReactComponent = true; - - // an immutable object with a single mutable value - function createRef() { - var refObject = { - current: null - }; - - { - Object.seal(refObject); - } - - return refObject; - } - - var hasOwnProperty = Object.prototype.hasOwnProperty; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; - - { - didWarnAboutStringRefs = {}; - } - - function hasValidRef(config) { - { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.ref !== undefined; - } - - function hasValidKey(config) { - { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.key !== undefined; - } - - function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function () { - { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - - 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://fb.me/react-special-props)', displayName); - } - } - }; - - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); - } - - function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function () { - { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - - error('%s: `ref` 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://fb.me/react-special-props)', displayName); - } - } - }; - - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); - } - - function warnIfStringRefCannotBeAutoConverted(config) { - { - if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { - var componentName = getComponentName(ReactCurrentOwner.current.type); - - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref); - - didWarnAboutStringRefs[componentName] = true; - } - } - } - } - /** - * Factory method to create a new React element. This no longer adheres to - * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check - * if something is a React Element. - * - * @param {*} type - * @param {*} props - * @param {*} key - * @param {string|object} ref - * @param {*} owner - * @param {*} self A *temporary* helper to detect places where `this` is - * different from the `owner` when React.createElement is called, so that we - * can warn. We want to get rid of owner and replace string `ref`s with arrow - * functions, and as long as `this` and owner are the same, there will be no - * change in behavior. - * @param {*} source An annotation object (added by a transpiler or otherwise) - * indicating filename, line number, and/or other information. - * @internal - */ - - - var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, - // Record the component responsible for creating this element. - _owner: owner - }; - - { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); // self and source are DEV only properties. - - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } - - return element; - }; - /** - * Create and return a new ReactElement of the given type. - * See https://reactjs.org/docs/react-api.html#createelement - */ - - function createElement(type, config, children) { - var propName; // Reserved names are extracted - - var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; - - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - - { - warnIfStringRefCannotBeAutoConverted(config); - } - } - - if (hasValidKey(config)) { - key = '' + config.key; - } - - self = config.__self === undefined ? null : config.__self; - source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object - - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - { - if (Object.freeze) { - Object.freeze(childArray); - } - } - - props.children = childArray; - } // Resolve default props - - - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - - { - if (key || ref) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); - } - function cloneAndReplaceKey(oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); - return newElement; - } - /** - * Clone and return a new ReactElement using element as the starting point. - * See https://reactjs.org/docs/react-api.html#cloneelement - */ - - function cloneElement(element, config, children) { - if (!!(element === null || element === undefined)) { - { - throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." ); - } - } - - var propName; // Original props are copied - - var props = _assign({}, element.props); // Reserved names are extracted - - - var key = element.key; - var ref = element.ref; // Self is preserved since the owner is preserved. - - var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a - // transpiler, and the original source is probably a better indicator of the - // true owner. - - var source = element._source; // Owner will be preserved, unless ref is overridden - - var owner = element._owner; - - if (config != null) { - if (hasValidRef(config)) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - - if (hasValidKey(config)) { - key = '' + config.key; - } // Remaining properties override existing props - - - var defaultProps; - - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === undefined && defaultProps !== undefined) { - // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; - } - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - props.children = childArray; - } - - return ReactElement(element.type, key, ref, self, source, owner, props); - } - /** - * Verifies the object is a ReactElement. - * See https://reactjs.org/docs/react-api.html#isvalidelement - * @param {?object} object - * @return {boolean} True if `object` is a ReactElement. - * @final - */ - - function isValidElement(object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } - - var SEPARATOR = '.'; - var SUBSEPARATOR = ':'; - /** - * Escape and wrap key so it is safe to use as a reactid - * - * @param {string} key to be escaped. - * @return {string} the escaped key. - */ - - function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = ('' + key).replace(escapeRegex, function (match) { - return escaperLookup[match]; - }); - return '$' + escapedString; - } - /** - * TODO: Test that a single child and an array with one item have the same key - * pattern. - */ - - - var didWarnAboutMaps = false; - var userProvidedKeyEscapeRegex = /\/+/g; - - function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); - } - - var POOL_SIZE = 10; - var traverseContextPool = []; - - function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { - if (traverseContextPool.length) { - var traverseContext = traverseContextPool.pop(); - traverseContext.result = mapResult; - traverseContext.keyPrefix = keyPrefix; - traverseContext.func = mapFunction; - traverseContext.context = mapContext; - traverseContext.count = 0; - return traverseContext; - } else { - return { - result: mapResult, - keyPrefix: keyPrefix, - func: mapFunction, - context: mapContext, - count: 0 - }; - } - } - - function releaseTraverseContext(traverseContext) { - traverseContext.result = null; - traverseContext.keyPrefix = null; - traverseContext.func = null; - traverseContext.context = null; - traverseContext.count = 0; - - if (traverseContextPool.length < POOL_SIZE) { - traverseContextPool.push(traverseContext); - } - } - /** - * @param {?*} children Children tree container. - * @param {!string} nameSoFar Name of the key path so far. - * @param {!function} callback Callback to invoke with each child found. - * @param {?*} traverseContext Used to pass information throughout the traversal - * process. - * @return {!number} The number of children in this subtree. - */ - - - function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { - var type = typeof children; - - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } - - var invokeCallback = false; - - if (children === null) { - invokeCallback = true; - } else { - switch (type) { - case 'string': - case 'number': - invokeCallback = true; - break; - - case 'object': - switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = true; - } - - } - } - - if (invokeCallback) { - callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); - return 1; - } - - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; - - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getComponentKey(child, i); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else { - var iteratorFn = getIteratorFn(children); - - if (typeof iteratorFn === 'function') { - - { - // Warn about using Maps as children - if (iteratorFn === children.entries) { - if (!didWarnAboutMaps) { - warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.'); - } - - didWarnAboutMaps = true; - } - } - - var iterator = iteratorFn.call(children); - var step; - var ii = 0; - - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getComponentKey(child, ii++); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else if (type === 'object') { - var addendum = ''; - - { - addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum(); - } - - var childrenString = '' + children; - - { - { - throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum ); - } - } - } - } - - return subtreeCount; - } - /** - * Traverses children that are typically specified as `props.children`, but - * might also be specified through attributes: - * - * - `traverseAllChildren(this.props.children, ...)` - * - `traverseAllChildren(this.props.leftPanelChildren, ...)` - * - * The `traverseContext` is an optional argument that is passed through the - * entire traversal. It can be used to store accumulations or anything else that - * the callback might find relevant. - * - * @param {?*} children Children tree object. - * @param {!function} callback To invoke upon traversing each child. - * @param {?*} traverseContext Context for traversal. - * @return {!number} The number of children in this subtree. - */ - - - function traverseAllChildren(children, callback, traverseContext) { - if (children == null) { - return 0; - } - - return traverseAllChildrenImpl(children, '', callback, traverseContext); - } - /** - * Generate a key string that identifies a component within a set. - * - * @param {*} component A component that could contain a manual key. - * @param {number} index Index that is used if a manual key is not provided. - * @return {string} - */ - - - function getComponentKey(component, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (typeof component === 'object' && component !== null && component.key != null) { - // Explicit key - return escape(component.key); - } // Implicit key determined by the index in the set - - - return index.toString(36); - } - - function forEachSingleChild(bookKeeping, child, name) { - var func = bookKeeping.func, - context = bookKeeping.context; - func.call(context, child, bookKeeping.count++); - } - /** - * Iterates through children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenforeach - * - * The provided forEachFunc(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc - * @param {*} forEachContext Context for forEachContext. - */ - - - function forEachChildren(children, forEachFunc, forEachContext) { - if (children == null) { - return children; - } - - var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext); - traverseAllChildren(children, forEachSingleChild, traverseContext); - releaseTraverseContext(traverseContext); - } - - function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result, - keyPrefix = bookKeeping.keyPrefix, - func = bookKeeping.func, - context = bookKeeping.context; - var mappedChild = func.call(context, child, bookKeeping.count++); - - if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) { - return c; - }); - } else if (mappedChild != null) { - if (isValidElement(mappedChild)) { - mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); - } - - result.push(mappedChild); - } - } - - function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { - var escapedPrefix = ''; - - if (prefix != null) { - escapedPrefix = escapeUserProvidedKey(prefix) + '/'; - } - - var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - releaseTraverseContext(traverseContext); - } - /** - * Maps children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenmap - * - * The provided mapFunction(child, key, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} func The map function. - * @param {*} context Context for mapFunction. - * @return {object} Object containing the ordered map of results. - */ - - - function mapChildren(children, func, context) { - if (children == null) { - return children; - } - - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, func, context); - return result; - } - /** - * Count the number of children that are typically specified as - * `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrencount - * - * @param {?*} children Children tree container. - * @return {number} The number of children. - */ - - - function countChildren(children) { - return traverseAllChildren(children, function () { - return null; - }, null); - } - /** - * Flatten a children object (typically specified as `props.children`) and - * return an array with appropriately re-keyed children. - * - * See https://reactjs.org/docs/react-api.html#reactchildrentoarray - */ - - - function toArray(children) { - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, function (child) { - return child; - }); - return result; - } - /** - * Returns the first child in a collection of children and verifies that there - * is only one child in the collection. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenonly - * - * The current implementation of this function assumes that a single child gets - * passed without a wrapper, but the purpose of this helper function is to - * abstract away the particular structure of children. - * - * @param {?object} children Child collection structure. - * @return {ReactElement} The first and only `ReactElement` contained in the - * structure. - */ - - - function onlyChild(children) { - if (!isValidElement(children)) { - { - throw Error( "React.Children.only expected to receive a single React element child." ); - } - } - - return children; - } - - function createContext(defaultValue, calculateChangedBits) { - if (calculateChangedBits === undefined) { - calculateChangedBits = null; - } else { - { - if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') { - error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits); - } - } - } - - var context = { - $$typeof: REACT_CONTEXT_TYPE, - _calculateChangedBits: calculateChangedBits, - // As a workaround to support multiple concurrent renderers, we categorize - // some renderers as primary and others as secondary. We only expect - // there to be two concurrent renderers at most: React Native (primary) and - // Fabric (secondary); React DOM (primary) and React ART (secondary). - // Secondary renderers store their context values on separate fields. - _currentValue: defaultValue, - _currentValue2: defaultValue, - // Used to track how many concurrent renderers this context currently - // supports within in a single renderer. Such as parallel server rendering. - _threadCount: 0, - // These are circular - Provider: null, - Consumer: null - }; - context.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: context - }; - var hasWarnedAboutUsingNestedContextConsumers = false; - var hasWarnedAboutUsingConsumerProvider = false; - - { - // A separate object, but proxies back to the original context object for - // backwards compatibility. It has a different $$typeof, so we can properly - // warn for the incorrect usage of Context as a Consumer. - var Consumer = { - $$typeof: REACT_CONTEXT_TYPE, - _context: context, - _calculateChangedBits: context._calculateChangedBits - }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here - - Object.defineProperties(Consumer, { - Provider: { - get: function () { - if (!hasWarnedAboutUsingConsumerProvider) { - hasWarnedAboutUsingConsumerProvider = true; - - error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?'); - } - - return context.Provider; - }, - set: function (_Provider) { - context.Provider = _Provider; - } - }, - _currentValue: { - get: function () { - return context._currentValue; - }, - set: function (_currentValue) { - context._currentValue = _currentValue; - } - }, - _currentValue2: { - get: function () { - return context._currentValue2; - }, - set: function (_currentValue2) { - context._currentValue2 = _currentValue2; - } - }, - _threadCount: { - get: function () { - return context._threadCount; - }, - set: function (_threadCount) { - context._threadCount = _threadCount; - } - }, - Consumer: { - get: function () { - if (!hasWarnedAboutUsingNestedContextConsumers) { - hasWarnedAboutUsingNestedContextConsumers = true; - - error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?'); - } - - return context.Consumer; - } - } - }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty - - context.Consumer = Consumer; - } - - { - context._currentRenderer = null; - context._currentRenderer2 = null; - } - - return context; - } - - function lazy(ctor) { - var lazyType = { - $$typeof: REACT_LAZY_TYPE, - _ctor: ctor, - // React uses these fields to store the result. - _status: -1, - _result: null - }; - - { - // In production, this would just set it on the object. - var defaultProps; - var propTypes; - Object.defineProperties(lazyType, { - defaultProps: { - configurable: true, - get: function () { - return defaultProps; - }, - set: function (newDefaultProps) { - error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); - - defaultProps = newDefaultProps; // Match production behavior more closely: - - Object.defineProperty(lazyType, 'defaultProps', { - enumerable: true - }); - } - }, - propTypes: { - configurable: true, - get: function () { - return propTypes; - }, - set: function (newPropTypes) { - error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); - - propTypes = newPropTypes; // Match production behavior more closely: - - Object.defineProperty(lazyType, 'propTypes', { - enumerable: true - }); - } - } - }); - } - - return lazyType; - } - - function forwardRef(render) { - { - if (render != null && render.$$typeof === REACT_MEMO_TYPE) { - error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).'); - } else if (typeof render !== 'function') { - error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); - } else { - if (render.length !== 0 && render.length !== 2) { - error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.'); - } - } - - if (render != null) { - if (render.defaultProps != null || render.propTypes != null) { - error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?'); - } - } - } - - return { - $$typeof: REACT_FORWARD_REF_TYPE, - render: render - }; - } - - function isValidElementType(type) { - return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); - } - - function memo(type, compare) { - { - if (!isValidElementType(type)) { - error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type); - } - } - - return { - $$typeof: REACT_MEMO_TYPE, - type: type, - compare: compare === undefined ? null : compare - }; - } - - function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher.current; - - if (!(dispatcher !== null)) { - { - throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." ); - } - } - - return dispatcher; - } - - function useContext(Context, unstable_observedBits) { - var dispatcher = resolveDispatcher(); - - { - if (unstable_observedBits !== undefined) { - error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : ''); - } // TODO: add a more generic warning for invalid values. - - - if (Context._context !== undefined) { - var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs - // and nobody should be using this in existing code. - - if (realContext.Consumer === Context) { - error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?'); - } else if (realContext.Provider === Context) { - error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?'); - } - } - } - - return dispatcher.useContext(Context, unstable_observedBits); - } - function useState(initialState) { - var dispatcher = resolveDispatcher(); - return dispatcher.useState(initialState); - } - function useReducer(reducer, initialArg, init) { - var dispatcher = resolveDispatcher(); - return dispatcher.useReducer(reducer, initialArg, init); - } - function useRef(initialValue) { - var dispatcher = resolveDispatcher(); - return dispatcher.useRef(initialValue); - } - function useEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useEffect(create, deps); - } - function useLayoutEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useLayoutEffect(create, deps); - } - function useCallback(callback, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useCallback(callback, deps); - } - function useMemo(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useMemo(create, deps); - } - function useImperativeHandle(ref, create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useImperativeHandle(ref, create, deps); - } - function useDebugValue(value, formatterFn) { - { - var dispatcher = resolveDispatcher(); - return dispatcher.useDebugValue(value, formatterFn); - } - } - - var propTypesMisspellWarningShown; - - { - propTypesMisspellWarningShown = false; - } - - function getDeclarationErrorAddendum() { - if (ReactCurrentOwner.current) { - var name = getComponentName(ReactCurrentOwner.current.type); - - if (name) { - return '\n\nCheck the render method of `' + name + '`.'; - } - } - - return ''; - } - - function getSourceInfoErrorAddendum(source) { - if (source !== undefined) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ''); - var lineNumber = source.lineNumber; - return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; - } - - return ''; - } - - function getSourceInfoErrorAddendumForProps(elementProps) { - if (elementProps !== null && elementProps !== undefined) { - return getSourceInfoErrorAddendum(elementProps.__source); - } - - return ''; - } - /** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ - - - var ownerHasKeyUseWarning = {}; - - function getCurrentComponentErrorInfo(parentType) { - var info = getDeclarationErrorAddendum(); - - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } - } - - return info; - } - /** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. - * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. - */ - - - function validateExplicitKey(element, parentType) { - if (!element._store || element._store.validated || element.key != null) { - return; - } - - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a - // property, it may be the creator of the child that's responsible for - // assigning it a key. - - var childOwner = ''; - - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { - // Give the component that originally created this child. - childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; - } - - setCurrentlyValidatingElement(element); - - { - error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner); - } - - setCurrentlyValidatingElement(null); - } - /** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. - * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. - */ - - - function validateChildKeys(node, parentType) { - if (typeof node !== 'object') { - return; - } - - if (Array.isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - - if (typeof iteratorFn === 'function') { - // Entry iterators used to provide implicit keys, - // but now we print a separate warning for them later. - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } - } - } - } - } - /** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. - * - * @param {ReactElement} element - */ - - - function validatePropTypes(element) { - { - var type = element.type; - - if (type === null || type === undefined || typeof type === 'string') { - return; - } - - var name = getComponentName(type); - var propTypes; - - if (typeof type === 'function') { - propTypes = type.propTypes; - } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes = type.propTypes; - } else { - return; - } - - if (propTypes) { - setCurrentlyValidatingElement(element); - checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum); - setCurrentlyValidatingElement(null); - } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; - - error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown'); - } - - if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { - error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); - } - } - } - /** - * Given a fragment, validate that it can only be provided with fragment props - * @param {ReactElement} fragment - */ - - - function validateFragmentProps(fragment) { - { - setCurrentlyValidatingElement(fragment); - var keys = Object.keys(fragment.props); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== 'children' && key !== 'key') { - error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); - - break; - } - } - - if (fragment.ref !== null) { - error('Invalid attribute `ref` supplied to `React.Fragment`.'); - } - - setCurrentlyValidatingElement(null); - } - } - function createElementWithValidation(type, props, children) { - var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - - if (!validType) { - var info = ''; - - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; - } - - var sourceInfo = getSourceInfoErrorAddendumForProps(props); - - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - - var typeString; - - if (type === null) { - typeString = 'null'; - } else if (Array.isArray(type)) { - typeString = 'array'; - } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />"; - info = ' Did you accidentally export a JSX literal instead of a component?'; - } else { - typeString = typeof type; - } - - { - error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); - } - } - - var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - - if (element == null) { - return element; - } // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - - - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); - } - } - - if (type === REACT_FRAGMENT_TYPE) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - - return element; - } - var didWarnAboutDeprecatedCreateFactory = false; - function createFactoryWithValidation(type) { - var validatedFactory = createElementWithValidation.bind(null, type); - validatedFactory.type = type; - - { - if (!didWarnAboutDeprecatedCreateFactory) { - didWarnAboutDeprecatedCreateFactory = true; - - warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.'); - } // Legacy hook: remove it - - - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function () { - warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); - - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } - }); - } - - return validatedFactory; - } - function cloneElementWithValidation(element, props, children) { - var newElement = cloneElement.apply(this, arguments); - - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], newElement.type); - } - - validatePropTypes(newElement); - return newElement; - } - - { - - try { - var frozenObject = Object.freeze({}); - var testMap = new Map([[frozenObject, null]]); - var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused. - // https://github.com/rollup/rollup/issues/1771 - // TODO: we can remove these if Rollup fixes the bug. - - testMap.set(0, 0); - testSet.add(0); - } catch (e) { - } - } - - var createElement$1 = createElementWithValidation ; - var cloneElement$1 = cloneElementWithValidation ; - var createFactory = createFactoryWithValidation ; - var Children = { - map: mapChildren, - forEach: forEachChildren, - count: countChildren, - toArray: toArray, - only: onlyChild - }; - - exports.Children = Children; - exports.Component = Component; - exports.Fragment = REACT_FRAGMENT_TYPE; - exports.Profiler = REACT_PROFILER_TYPE; - exports.PureComponent = PureComponent; - exports.StrictMode = REACT_STRICT_MODE_TYPE; - exports.Suspense = REACT_SUSPENSE_TYPE; - exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; - exports.cloneElement = cloneElement$1; - exports.createContext = createContext; - exports.createElement = createElement$1; - exports.createFactory = createFactory; - exports.createRef = createRef; - exports.forwardRef = forwardRef; - exports.isValidElement = isValidElement; - exports.lazy = lazy; - exports.memo = memo; - exports.useCallback = useCallback; - exports.useContext = useContext; - exports.useDebugValue = useDebugValue; - exports.useEffect = useEffect; - exports.useImperativeHandle = useImperativeHandle; - exports.useLayoutEffect = useLayoutEffect; - exports.useMemo = useMemo; - exports.useReducer = useReducer; - exports.useRef = useRef; - exports.useState = useState; - exports.version = ReactVersion; - })(); - } - }); - var react_development_1 = react_development.Children; - var react_development_2 = react_development.Component; - var react_development_3 = react_development.Fragment; - var react_development_4 = react_development.Profiler; - var react_development_5 = react_development.PureComponent; - var react_development_6 = react_development.StrictMode; - var react_development_7 = react_development.Suspense; - var react_development_8 = react_development.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - var react_development_9 = react_development.cloneElement; - var react_development_10 = react_development.createContext; - var react_development_11 = react_development.createElement; - var react_development_12 = react_development.createFactory; - var react_development_13 = react_development.createRef; - var react_development_14 = react_development.forwardRef; - var react_development_15 = react_development.isValidElement; - var react_development_16 = react_development.lazy; - var react_development_17 = react_development.memo; - var react_development_18 = react_development.useCallback; - var react_development_19 = react_development.useContext; - var react_development_20 = react_development.useDebugValue; - var react_development_21 = react_development.useEffect; - var react_development_22 = react_development.useImperativeHandle; - var react_development_23 = react_development.useLayoutEffect; - var react_development_24 = react_development.useMemo; - var react_development_25 = react_development.useReducer; - var react_development_26 = react_development.useRef; - var react_development_27 = react_development.useState; - var react_development_28 = react_development.version; - - var react = createCommonjsModule(function (module) { - - { - module.exports = react_development; - } - }); - var react_1 = react.Component; - var react_2 = react.createRef; - var react_3 = react.createElement; - var react_4 = react.useState; - var react_5 = react.useRef; - var react_6 = react.useEffect; - var react_7 = react.Fragment; - - var scheduler_production_min = createCommonjsModule(function (module, exports) { - var f,g,h,k,l; - if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null;}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0));};g=function(a,b){q=setTimeout(a,b);};h=function(){clearTimeout(q);};k=function(){return !1};l=exports.unstable_forceFrameRate=function(){};}else {var w=window.performance,x=window.Date, - y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");"function"!==typeof A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");}if("object"=== - typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else {var B=x.now();exports.unstable_now=function(){return x.now()-B};}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1; - function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O);}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else {var b=L(O);null!==b&&g(W,b.startTime-a);}} - function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b);}else M(N);Q=L(N);}if(null!==Q)var m=!0;else {var n=L(O);null!==n&&g(W,n.startTime-b);m=!1;}return m}finally{Q=null,R=c,S=!1;}} - function Y(a){switch(a){case 1:return -1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null;};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X));}; - exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R;}var c=R;R=b;try{return a()}finally{R=c;}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3;}var c=R;R=a;try{return b()}finally{R=c;}}; - exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a}; - exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime= deadline; - }; // Since we yield every frame regardless, `requestPaint` has no effect. - - - requestPaint = function () {}; - } - - exports.unstable_forceFrameRate = function (fps) { - if (fps < 0 || fps > 125) { - // Using console['error'] to evade Babel and ESLint - console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported'); - return; - } - - if (fps > 0) { - yieldInterval = Math.floor(1000 / fps); - } else { - // reset the framerate - yieldInterval = 5; - } - }; - - var performWorkUntilDeadline = function () { - if (scheduledHostCallback !== null) { - var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync - // cycle. This means there's always time remaining at the beginning of - // the message event. - - deadline = currentTime + yieldInterval; - var hasTimeRemaining = true; - - try { - var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); - - if (!hasMoreWork) { - isMessageLoopRunning = false; - scheduledHostCallback = null; - } else { - // If there's more work, schedule the next message event at the end - // of the preceding one. - port.postMessage(null); - } - } catch (error) { - // If a scheduler task throws, exit the current browser task so the - // error can be observed. - port.postMessage(null); - throw error; - } - } else { - isMessageLoopRunning = false; - } // Yielding to the browser will give it a chance to paint, so we can - }; - - var channel = new MessageChannel(); - var port = channel.port2; - channel.port1.onmessage = performWorkUntilDeadline; - - requestHostCallback = function (callback) { - scheduledHostCallback = callback; - - if (!isMessageLoopRunning) { - isMessageLoopRunning = true; - port.postMessage(null); - } - }; - - requestHostTimeout = function (callback, ms) { - taskTimeoutID = _setTimeout(function () { - callback(exports.unstable_now()); - }, ms); - }; - - cancelHostTimeout = function () { - _clearTimeout(taskTimeoutID); - - taskTimeoutID = -1; - }; - } - - function push(heap, node) { - var index = heap.length; - heap.push(node); - siftUp(heap, node, index); - } - function peek(heap) { - var first = heap[0]; - return first === undefined ? null : first; - } - function pop(heap) { - var first = heap[0]; - - if (first !== undefined) { - var last = heap.pop(); - - if (last !== first) { - heap[0] = last; - siftDown(heap, last, 0); - } - - return first; - } else { - return null; - } - } - - function siftUp(heap, node, i) { - var index = i; - - while (true) { - var parentIndex = index - 1 >>> 1; - var parent = heap[parentIndex]; - - if (parent !== undefined && compare(parent, node) > 0) { - // The parent is larger. Swap positions. - heap[parentIndex] = node; - heap[index] = parent; - index = parentIndex; - } else { - // The parent is smaller. Exit. - return; - } - } - } - - function siftDown(heap, node, i) { - var index = i; - var length = heap.length; - - while (index < length) { - var leftIndex = (index + 1) * 2 - 1; - var left = heap[leftIndex]; - var rightIndex = leftIndex + 1; - var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. - - if (left !== undefined && compare(left, node) < 0) { - if (right !== undefined && compare(right, left) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - heap[index] = left; - heap[leftIndex] = node; - index = leftIndex; - } - } else if (right !== undefined && compare(right, node) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - // Neither child is smaller. Exit. - return; - } - } - } - - function compare(a, b) { - // Compare sort index first, then task id. - var diff = a.sortIndex - b.sortIndex; - return diff !== 0 ? diff : a.id - b.id; - } - - // TODO: Use symbols? - var NoPriority = 0; - var ImmediatePriority = 1; - var UserBlockingPriority = 2; - var NormalPriority = 3; - var LowPriority = 4; - var IdlePriority = 5; - - var runIdCounter = 0; - var mainThreadIdCounter = 0; - var profilingStateSize = 4; - var sharedProfilingBuffer = // $FlowFixMe Flow doesn't know about SharedArrayBuffer - typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : // $FlowFixMe Flow doesn't know about ArrayBuffer - typeof ArrayBuffer === 'function' ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : null // Don't crash the init path on IE9 - ; - var profilingState = sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks - - var PRIORITY = 0; - var CURRENT_TASK_ID = 1; - var CURRENT_RUN_ID = 2; - var QUEUE_SIZE = 3; - - { - profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue - // array might include canceled tasks. - - profilingState[QUEUE_SIZE] = 0; - profilingState[CURRENT_TASK_ID] = 0; - } // Bytes per element is 4 - - - var INITIAL_EVENT_LOG_SIZE = 131072; - var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes - - var eventLogSize = 0; - var eventLogBuffer = null; - var eventLog = null; - var eventLogIndex = 0; - var TaskStartEvent = 1; - var TaskCompleteEvent = 2; - var TaskErrorEvent = 3; - var TaskCancelEvent = 4; - var TaskRunEvent = 5; - var TaskYieldEvent = 6; - var SchedulerSuspendEvent = 7; - var SchedulerResumeEvent = 8; - - function logEvent(entries) { - if (eventLog !== null) { - var offset = eventLogIndex; - eventLogIndex += entries.length; - - if (eventLogIndex + 1 > eventLogSize) { - eventLogSize *= 2; - - if (eventLogSize > MAX_EVENT_LOG_SIZE) { - // Using console['error'] to evade Babel and ESLint - console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.'); - stopLoggingProfilingEvents(); - return; - } - - var newEventLog = new Int32Array(eventLogSize * 4); - newEventLog.set(eventLog); - eventLogBuffer = newEventLog.buffer; - eventLog = newEventLog; - } - - eventLog.set(entries, offset); - } - } - - function startLoggingProfilingEvents() { - eventLogSize = INITIAL_EVENT_LOG_SIZE; - eventLogBuffer = new ArrayBuffer(eventLogSize * 4); - eventLog = new Int32Array(eventLogBuffer); - eventLogIndex = 0; - } - function stopLoggingProfilingEvents() { - var buffer = eventLogBuffer; - eventLogSize = 0; - eventLogBuffer = null; - eventLog = null; - eventLogIndex = 0; - return buffer; - } - function markTaskStart(task, ms) { - { - profilingState[QUEUE_SIZE]++; - - if (eventLog !== null) { - // performance.now returns a float, representing milliseconds. When the - // event is logged, it's coerced to an int. Convert to microseconds to - // maintain extra degrees of precision. - logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]); - } - } - } - function markTaskCompleted(task, ms) { - { - profilingState[PRIORITY] = NoPriority; - profilingState[CURRENT_TASK_ID] = 0; - profilingState[QUEUE_SIZE]--; - - if (eventLog !== null) { - logEvent([TaskCompleteEvent, ms * 1000, task.id]); - } - } - } - function markTaskCanceled(task, ms) { - { - profilingState[QUEUE_SIZE]--; - - if (eventLog !== null) { - logEvent([TaskCancelEvent, ms * 1000, task.id]); - } - } - } - function markTaskErrored(task, ms) { - { - profilingState[PRIORITY] = NoPriority; - profilingState[CURRENT_TASK_ID] = 0; - profilingState[QUEUE_SIZE]--; - - if (eventLog !== null) { - logEvent([TaskErrorEvent, ms * 1000, task.id]); - } - } - } - function markTaskRun(task, ms) { - { - runIdCounter++; - profilingState[PRIORITY] = task.priorityLevel; - profilingState[CURRENT_TASK_ID] = task.id; - profilingState[CURRENT_RUN_ID] = runIdCounter; - - if (eventLog !== null) { - logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]); - } - } - } - function markTaskYield(task, ms) { - { - profilingState[PRIORITY] = NoPriority; - profilingState[CURRENT_TASK_ID] = 0; - profilingState[CURRENT_RUN_ID] = 0; - - if (eventLog !== null) { - logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]); - } - } - } - function markSchedulerSuspended(ms) { - { - mainThreadIdCounter++; - - if (eventLog !== null) { - logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]); - } - } - } - function markSchedulerUnsuspended(ms) { - { - if (eventLog !== null) { - logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]); - } - } - } - - /* eslint-disable no-var */ - // Math.pow(2, 30) - 1 - // 0b111111111111111111111111111111 - - var maxSigned31BitInt = 1073741823; // Times out immediately - - var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out - - var USER_BLOCKING_PRIORITY = 250; - var NORMAL_PRIORITY_TIMEOUT = 5000; - var LOW_PRIORITY_TIMEOUT = 10000; // Never times out - - var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap - - var taskQueue = []; - var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. - - var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. - var currentTask = null; - var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy. - - var isPerformingWork = false; - var isHostCallbackScheduled = false; - var isHostTimeoutScheduled = false; - - function advanceTimers(currentTime) { - // Check for tasks that are no longer delayed and add them to the queue. - var timer = peek(timerQueue); - - while (timer !== null) { - if (timer.callback === null) { - // Timer was cancelled. - pop(timerQueue); - } else if (timer.startTime <= currentTime) { - // Timer fired. Transfer to the task queue. - pop(timerQueue); - timer.sortIndex = timer.expirationTime; - push(taskQueue, timer); - - { - markTaskStart(timer, currentTime); - timer.isQueued = true; - } - } else { - // Remaining timers are pending. - return; - } - - timer = peek(timerQueue); - } - } - - function handleTimeout(currentTime) { - isHostTimeoutScheduled = false; - advanceTimers(currentTime); - - if (!isHostCallbackScheduled) { - if (peek(taskQueue) !== null) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } else { - var firstTimer = peek(timerQueue); - - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - } - } - } - - function flushWork(hasTimeRemaining, initialTime) { - { - markSchedulerUnsuspended(initialTime); - } // We'll need a host callback the next time work is scheduled. - - - isHostCallbackScheduled = false; - - if (isHostTimeoutScheduled) { - // We scheduled a timeout but it's no longer needed. Cancel it. - isHostTimeoutScheduled = false; - cancelHostTimeout(); - } - - isPerformingWork = true; - var previousPriorityLevel = currentPriorityLevel; - - try { - if (enableProfiling) { - try { - return workLoop(hasTimeRemaining, initialTime); - } catch (error) { - if (currentTask !== null) { - var currentTime = exports.unstable_now(); - markTaskErrored(currentTask, currentTime); - currentTask.isQueued = false; - } - - throw error; - } - } else { - // No catch in prod codepath. - return workLoop(hasTimeRemaining, initialTime); - } - } finally { - currentTask = null; - currentPriorityLevel = previousPriorityLevel; - isPerformingWork = false; - - { - var _currentTime = exports.unstable_now(); - - markSchedulerSuspended(_currentTime); - } - } - } - - function workLoop(hasTimeRemaining, initialTime) { - var currentTime = initialTime; - advanceTimers(currentTime); - currentTask = peek(taskQueue); - - while (currentTask !== null && !(enableSchedulerDebugging )) { - if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { - // This currentTask hasn't expired, and we've reached the deadline. - break; - } - - var callback = currentTask.callback; - - if (callback !== null) { - currentTask.callback = null; - currentPriorityLevel = currentTask.priorityLevel; - var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; - markTaskRun(currentTask, currentTime); - var continuationCallback = callback(didUserCallbackTimeout); - currentTime = exports.unstable_now(); - - if (typeof continuationCallback === 'function') { - currentTask.callback = continuationCallback; - markTaskYield(currentTask, currentTime); - } else { - { - markTaskCompleted(currentTask, currentTime); - currentTask.isQueued = false; - } - - if (currentTask === peek(taskQueue)) { - pop(taskQueue); - } - } - - advanceTimers(currentTime); - } else { - pop(taskQueue); - } - - currentTask = peek(taskQueue); - } // Return whether there's additional work - - - if (currentTask !== null) { - return true; - } else { - var firstTimer = peek(timerQueue); - - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - - return false; - } - } - - function unstable_runWithPriority(priorityLevel, eventHandler) { - switch (priorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - case LowPriority: - case IdlePriority: - break; - - default: - priorityLevel = NormalPriority; - } - - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - } - - function unstable_next(eventHandler) { - var priorityLevel; - - switch (currentPriorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - // Shift down to normal priority - priorityLevel = NormalPriority; - break; - - default: - // Anything lower than normal priority should remain at the current level. - priorityLevel = currentPriorityLevel; - break; - } - - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - } - - function unstable_wrapCallback(callback) { - var parentPriorityLevel = currentPriorityLevel; - return function () { - // This is a fork of runWithPriority, inlined for performance. - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = parentPriorityLevel; - - try { - return callback.apply(this, arguments); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - }; - } - - function timeoutForPriorityLevel(priorityLevel) { - switch (priorityLevel) { - case ImmediatePriority: - return IMMEDIATE_PRIORITY_TIMEOUT; - - case UserBlockingPriority: - return USER_BLOCKING_PRIORITY; - - case IdlePriority: - return IDLE_PRIORITY; - - case LowPriority: - return LOW_PRIORITY_TIMEOUT; - - case NormalPriority: - default: - return NORMAL_PRIORITY_TIMEOUT; - } - } - - function unstable_scheduleCallback(priorityLevel, callback, options) { - var currentTime = exports.unstable_now(); - var startTime; - var timeout; - - if (typeof options === 'object' && options !== null) { - var delay = options.delay; - - if (typeof delay === 'number' && delay > 0) { - startTime = currentTime + delay; - } else { - startTime = currentTime; - } - - timeout = typeof options.timeout === 'number' ? options.timeout : timeoutForPriorityLevel(priorityLevel); - } else { - timeout = timeoutForPriorityLevel(priorityLevel); - startTime = currentTime; - } - - var expirationTime = startTime + timeout; - var newTask = { - id: taskIdCounter++, - callback: callback, - priorityLevel: priorityLevel, - startTime: startTime, - expirationTime: expirationTime, - sortIndex: -1 - }; - - { - newTask.isQueued = false; - } - - if (startTime > currentTime) { - // This is a delayed task. - newTask.sortIndex = startTime; - push(timerQueue, newTask); - - if (peek(taskQueue) === null && newTask === peek(timerQueue)) { - // All tasks are delayed, and this is the task with the earliest delay. - if (isHostTimeoutScheduled) { - // Cancel an existing timeout. - cancelHostTimeout(); - } else { - isHostTimeoutScheduled = true; - } // Schedule a timeout. - - - requestHostTimeout(handleTimeout, startTime - currentTime); - } - } else { - newTask.sortIndex = expirationTime; - push(taskQueue, newTask); - - { - markTaskStart(newTask, currentTime); - newTask.isQueued = true; - } // Schedule a host callback, if needed. If we're already performing work, - // wait until the next time we yield. - - - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } - } - - return newTask; - } - - function unstable_pauseExecution() { - } - - function unstable_continueExecution() { - - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } - } - - function unstable_getFirstCallbackNode() { - return peek(taskQueue); - } - - function unstable_cancelCallback(task) { - { - if (task.isQueued) { - var currentTime = exports.unstable_now(); - markTaskCanceled(task, currentTime); - task.isQueued = false; - } - } // Null out the callback to indicate the task has been canceled. (Can't - // remove from the queue because you can't remove arbitrary nodes from an - // array based heap, only the first one.) - - - task.callback = null; - } - - function unstable_getCurrentPriorityLevel() { - return currentPriorityLevel; - } - - function unstable_shouldYield() { - var currentTime = exports.unstable_now(); - advanceTimers(currentTime); - var firstTask = peek(taskQueue); - return firstTask !== currentTask && currentTask !== null && firstTask !== null && firstTask.callback !== null && firstTask.startTime <= currentTime && firstTask.expirationTime < currentTask.expirationTime || shouldYieldToHost(); - } - - var unstable_requestPaint = requestPaint; - var unstable_Profiling = { - startLoggingProfilingEvents: startLoggingProfilingEvents, - stopLoggingProfilingEvents: stopLoggingProfilingEvents, - sharedProfilingBuffer: sharedProfilingBuffer - } ; - - exports.unstable_IdlePriority = IdlePriority; - exports.unstable_ImmediatePriority = ImmediatePriority; - exports.unstable_LowPriority = LowPriority; - exports.unstable_NormalPriority = NormalPriority; - exports.unstable_Profiling = unstable_Profiling; - exports.unstable_UserBlockingPriority = UserBlockingPriority; - exports.unstable_cancelCallback = unstable_cancelCallback; - exports.unstable_continueExecution = unstable_continueExecution; - exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; - exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; - exports.unstable_next = unstable_next; - exports.unstable_pauseExecution = unstable_pauseExecution; - exports.unstable_requestPaint = unstable_requestPaint; - exports.unstable_runWithPriority = unstable_runWithPriority; - exports.unstable_scheduleCallback = unstable_scheduleCallback; - exports.unstable_shouldYield = unstable_shouldYield; - exports.unstable_wrapCallback = unstable_wrapCallback; - })(); - } - }); - var scheduler_development_1 = scheduler_development.unstable_now; - var scheduler_development_2 = scheduler_development.unstable_forceFrameRate; - var scheduler_development_3 = scheduler_development.unstable_IdlePriority; - var scheduler_development_4 = scheduler_development.unstable_ImmediatePriority; - var scheduler_development_5 = scheduler_development.unstable_LowPriority; - var scheduler_development_6 = scheduler_development.unstable_NormalPriority; - var scheduler_development_7 = scheduler_development.unstable_Profiling; - var scheduler_development_8 = scheduler_development.unstable_UserBlockingPriority; - var scheduler_development_9 = scheduler_development.unstable_cancelCallback; - var scheduler_development_10 = scheduler_development.unstable_continueExecution; - var scheduler_development_11 = scheduler_development.unstable_getCurrentPriorityLevel; - var scheduler_development_12 = scheduler_development.unstable_getFirstCallbackNode; - var scheduler_development_13 = scheduler_development.unstable_next; - var scheduler_development_14 = scheduler_development.unstable_pauseExecution; - var scheduler_development_15 = scheduler_development.unstable_requestPaint; - var scheduler_development_16 = scheduler_development.unstable_runWithPriority; - var scheduler_development_17 = scheduler_development.unstable_scheduleCallback; - var scheduler_development_18 = scheduler_development.unstable_shouldYield; - var scheduler_development_19 = scheduler_development.unstable_wrapCallback; - - var scheduler = createCommonjsModule(function (module) { - - { - module.exports = scheduler_development; - } - }); - - function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return !1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;}var C$1={}; - "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C$1[a]=new v(a,0,!1,a,null,!1);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];C$1[b]=new v(b,1,!1,a[1],null,!1);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){C$1[a]=new v(a,2,!1,a.toLowerCase(),null,!1);}); - ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C$1[a]=new v(a,2,!1,a,null,!1);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C$1[a]=new v(a,3,!1,a.toLowerCase(),null,!1);}); - ["checked","multiple","muted","selected"].forEach(function(a){C$1[a]=new v(a,3,!0,a,null,!1);});["capture","download"].forEach(function(a){C$1[a]=new v(a,4,!1,a,null,!1);});["cols","rows","size","span"].forEach(function(a){C$1[a]=new v(a,6,!1,a,null,!1);});["rowSpan","start"].forEach(function(a){C$1[a]=new v(a,5,!1,a.toLowerCase(),null,!1);});var Ua=/[\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()} - "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Ua, - Va);C$1[b]=new v(b,1,!1,a,null,!1);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ua,Va);C$1[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ua,Va);C$1[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1);});["tabIndex","crossOrigin"].forEach(function(a){C$1[a]=new v(a,1,!1,a.toLowerCase(),null,!1);}); - C$1.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){C$1[a]=new v(a,1,!1,a.toLowerCase(),null,!0);});var Wa=react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty("ReactCurrentDispatcher")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty("ReactCurrentBatchConfig")||(Wa.ReactCurrentBatchConfig={suspense:null}); - function Xa(a,b,c,d){var e=C$1.hasOwnProperty(b)?C$1[b]:null;var f=null!==e?0===e.type:d?!1:!(2"+b.valueOf().toString()+"";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}}); - function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Tb={animationend:Sb("Animation","AnimationEnd"),animationiteration:Sb("Animation","AnimationIteration"),animationstart:Sb("Animation","AnimationStart"),transitionend:Sb("Transition","TransitionEnd")},Ub={},Vb={}; - ya&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),"TransitionEvent"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a} - var Xb=Wb("animationend"),Yb=Wb("animationiteration"),Zb=Wb("animationstart"),$b=Wb("transitionend"),bc=new ("function"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b} - function dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else {a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function fc(a){if(dc(a)!==a)throw Error(u(188));} - function gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling;}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else {for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling;}if(!g){for(h=f.child;h;){if(h=== - c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling;}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else {if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}}return null} - function ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a);}var kc=null; - function lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;dthis.eventPool.length&&this.eventPool.push(a);}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe;}var ge=G$1.extend({data:null}),he=G$1.extend({data:null}),ie=[9,13,27,32],je=ya&&"CompositionEvent"in window,ke=null;ya&&"documentMode"in document&&(ke=document.documentMode); - var le=ya&&"TextEvent"in window&&!ke,me=ya&&(!je||ke&&8=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart", - captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},pe=!1; - function qe(a,b){switch(a){case "keyup":return -1!==ie.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return !0;default:return !1}}function re(a){a=a.detail;return "object"===typeof a&&"data"in a?a.data:null}var se=!1;function te(a,b){switch(a){case "compositionend":return re(b);case "keypress":if(32!==b.which)return null;pe=!0;return ne;case "textInput":return a=b.data,a===ne&&pe?null:a;default:return null}} - function ue(a,b){if(se)return "compositionend"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ef=null,ff=null,gf=null,hf=!1; - function jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;"selectionStart"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G$1.getPooled(df.select,ff,a,b),a.type="select",a.target=ef,Xd(a),a)} - var kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;g 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID; - - var interaction = { - __count: 1, - id: interactionIDCounter++, - name: name, - timestamp: timestamp - }; - var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate. - // To do that, clone the current interactions. - // The previous set will be restored upon completion. - - var interactions = new Set(prevInteractions); - interactions.add(interaction); - exports.__interactionsRef.current = interactions; - var subscriber = exports.__subscriberRef.current; - var returnValue; - - try { - if (subscriber !== null) { - subscriber.onInteractionTraced(interaction); - } - } finally { - try { - if (subscriber !== null) { - subscriber.onWorkStarted(interactions, threadID); - } - } finally { - try { - returnValue = callback(); - } finally { - exports.__interactionsRef.current = prevInteractions; - - try { - if (subscriber !== null) { - subscriber.onWorkStopped(interactions, threadID); - } - } finally { - interaction.__count--; // If no async work was scheduled for this interaction, - // Notify subscribers that it's completed. - - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - } - } - } - } - - return returnValue; - } - function unstable_wrap(callback) { - var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID; - - var wrappedInteractions = exports.__interactionsRef.current; - var subscriber = exports.__subscriberRef.current; - - if (subscriber !== null) { - subscriber.onWorkScheduled(wrappedInteractions, threadID); - } // Update the pending async work count for the current interactions. - // Update after calling subscribers in case of error. - - - wrappedInteractions.forEach(function (interaction) { - interaction.__count++; - }); - var hasRun = false; - - function wrapped() { - var prevInteractions = exports.__interactionsRef.current; - exports.__interactionsRef.current = wrappedInteractions; - subscriber = exports.__subscriberRef.current; - - try { - var returnValue; - - try { - if (subscriber !== null) { - subscriber.onWorkStarted(wrappedInteractions, threadID); - } - } finally { - try { - returnValue = callback.apply(undefined, arguments); - } finally { - exports.__interactionsRef.current = prevInteractions; - - if (subscriber !== null) { - subscriber.onWorkStopped(wrappedInteractions, threadID); - } - } - } - - return returnValue; - } finally { - if (!hasRun) { - // We only expect a wrapped function to be executed once, - // But in the event that it's executed more than once– - // Only decrement the outstanding interaction counts once. - hasRun = true; // Update pending async counts for all wrapped interactions. - // If this was the last scheduled async work for any of them, - // Mark them as completed. - - wrappedInteractions.forEach(function (interaction) { - interaction.__count--; - - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - } - } - - wrapped.cancel = function cancel() { - subscriber = exports.__subscriberRef.current; - - try { - if (subscriber !== null) { - subscriber.onWorkCanceled(wrappedInteractions, threadID); - } - } finally { - // Update pending async counts for all wrapped interactions. - // If this was the last scheduled async work for any of them, - // Mark them as completed. - wrappedInteractions.forEach(function (interaction) { - interaction.__count--; - - if (subscriber && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - }; - - return wrapped; - } - - var subscribers = null; - - { - subscribers = new Set(); - } - - function unstable_subscribe(subscriber) { - { - subscribers.add(subscriber); - - if (subscribers.size === 1) { - exports.__subscriberRef.current = { - onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted, - onInteractionTraced: onInteractionTraced, - onWorkCanceled: onWorkCanceled, - onWorkScheduled: onWorkScheduled, - onWorkStarted: onWorkStarted, - onWorkStopped: onWorkStopped - }; - } - } - } - function unstable_unsubscribe(subscriber) { - { - subscribers.delete(subscriber); - - if (subscribers.size === 0) { - exports.__subscriberRef.current = null; - } - } - } - - function onInteractionTraced(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onInteractionTraced(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onInteractionScheduledWorkCompleted(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkScheduled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkScheduled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkStarted(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkStarted(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkStopped(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkStopped(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkCanceled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkCanceled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - exports.unstable_clear = unstable_clear; - exports.unstable_getCurrent = unstable_getCurrent; - exports.unstable_getThreadID = unstable_getThreadID; - exports.unstable_subscribe = unstable_subscribe; - exports.unstable_trace = unstable_trace; - exports.unstable_unsubscribe = unstable_unsubscribe; - exports.unstable_wrap = unstable_wrap; - })(); - } - }); - var schedulerTracing_development_1 = schedulerTracing_development.__interactionsRef; - var schedulerTracing_development_2 = schedulerTracing_development.__subscriberRef; - var schedulerTracing_development_3 = schedulerTracing_development.unstable_clear; - var schedulerTracing_development_4 = schedulerTracing_development.unstable_getCurrent; - var schedulerTracing_development_5 = schedulerTracing_development.unstable_getThreadID; - var schedulerTracing_development_6 = schedulerTracing_development.unstable_subscribe; - var schedulerTracing_development_7 = schedulerTracing_development.unstable_trace; - var schedulerTracing_development_8 = schedulerTracing_development.unstable_unsubscribe; - var schedulerTracing_development_9 = schedulerTracing_development.unstable_wrap; - - var tracing = createCommonjsModule(function (module) { - - { - module.exports = schedulerTracing_development; - } - }); - - var reactDom_development = createCommonjsModule(function (module, exports) { - - - - { - (function() { - - var React = react; - var _assign = objectAssign; - var Scheduler = scheduler; - var checkPropTypes = checkPropTypes_1; - var tracing$1 = tracing; - - var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions. - // Current owner and dispatcher used to share the same ref, - // but PR #14548 split them out to better support the react-debug-tools package. - - if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) { - ReactSharedInternals.ReactCurrentDispatcher = { - current: null - }; - } - - if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) { - ReactSharedInternals.ReactCurrentBatchConfig = { - suspense: null - }; - } - - // by calls to these methods by a Babel plugin. - // - // In PROD (or in packages without access to React internals), - // they are left as they are instead. - - function warn(format) { - { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - printWarning('warn', format, args); - } - } - function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } - } - - function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0; - - if (!hasExistingStack) { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } - } - - var argsWithFormat = args.map(function (item) { - return '' + item; - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - throw new Error(message); - } catch (x) {} - } - } - - if (!React) { - { - throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." ); - } - } - - var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) { - var funcArgs = Array.prototype.slice.call(arguments, 3); - - try { - func.apply(context, funcArgs); - } catch (error) { - this.onError(error); - } - }; - - { - // In DEV mode, we swap out invokeGuardedCallback for a special version - // that plays more nicely with the browser's DevTools. The idea is to preserve - // "Pause on exceptions" behavior. Because React wraps all user-provided - // functions in invokeGuardedCallback, and the production version of - // invokeGuardedCallback uses a try-catch, all user exceptions are treated - // like caught exceptions, and the DevTools won't pause unless the developer - // takes the extra step of enabling pause on caught exceptions. This is - // unintuitive, though, because even though React has caught the error, from - // the developer's perspective, the error is uncaught. - // - // To preserve the expected "Pause on exceptions" behavior, we don't use a - // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake - // DOM node, and call the user-provided callback from inside an event handler - // for that fake event. If the callback throws, the error is "captured" using - // a global event handler. But because the error happens in a different - // event loop context, it does not interrupt the normal program flow. - // Effectively, this gives us try-catch behavior without actually using - // try-catch. Neat! - // Check that the browser supports the APIs we need to implement our special - // DEV version of invokeGuardedCallback - if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { - var fakeNode = document.createElement('react'); - - var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) { - // If document doesn't exist we know for sure we will crash in this method - // when we call document.createEvent(). However this can cause confusing - // errors: https://github.com/facebookincubator/create-react-app/issues/3482 - // So we preemptively throw with a better message instead. - if (!(typeof document !== 'undefined')) { - { - throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." ); - } - } - - var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We - // set this to true at the beginning, then set it to false right after - // calling the function. If the function errors, `didError` will never be - // set to false. This strategy works even if the browser is flaky and - // fails to call our global error handler, because it doesn't rely on - // the error event at all. - - var didError = true; // Keeps track of the value of window.event so that we can reset it - // during the callback to let user code access window.event in the - // browsers that support it. - - var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event - // dispatching: https://github.com/facebook/react/issues/13688 - - var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously - // dispatch our fake event using `dispatchEvent`. Inside the handler, we - // call the user-provided callback. - - var funcArgs = Array.prototype.slice.call(arguments, 3); - - function callCallback() { - // We immediately remove the callback from event listeners so that - // nested `invokeGuardedCallback` calls do not clash. Otherwise, a - // nested call would trigger the fake event handlers of any call higher - // in the stack. - fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the - // window.event assignment in both IE <= 10 as they throw an error - // "Member not found" in strict mode, and in Firefox which does not - // support window.event. - - if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { - window.event = windowEvent; - } - - func.apply(context, funcArgs); - didError = false; - } // Create a global error event handler. We use this to capture the value - // that was thrown. It's possible that this error handler will fire more - // than once; for example, if non-React code also calls `dispatchEvent` - // and a handler for that event throws. We should be resilient to most of - // those cases. Even if our error event handler fires more than once, the - // last error event is always used. If the callback actually does error, - // we know that the last error event is the correct one, because it's not - // possible for anything else to have happened in between our callback - // erroring and the code that follows the `dispatchEvent` call below. If - // the callback doesn't error, but the error event was fired, we know to - // ignore it because `didError` will be false, as described above. - - - var error; // Use this to track whether the error event is ever called. - - var didSetError = false; - var isCrossOriginError = false; - - function handleWindowError(event) { - error = event.error; - didSetError = true; - - if (error === null && event.colno === 0 && event.lineno === 0) { - isCrossOriginError = true; - } - - if (event.defaultPrevented) { - // Some other error handler has prevented default. - // Browsers silence the error report if this happens. - // We'll remember this to later decide whether to log it or not. - if (error != null && typeof error === 'object') { - try { - error._suppressLogging = true; - } catch (inner) {// Ignore. - } - } - } - } // Create a fake event type. - - - var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers - - window.addEventListener('error', handleWindowError); - fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function - // errors, it will trigger our global error handler. - - evt.initEvent(evtType, false, false); - fakeNode.dispatchEvent(evt); - - if (windowEventDescriptor) { - Object.defineProperty(window, 'event', windowEventDescriptor); - } - - if (didError) { - if (!didSetError) { - // The callback errored, but the error event never fired. - error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.'); - } else if (isCrossOriginError) { - error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.'); - } - - this.onError(error); - } // Remove our event listeners - - - window.removeEventListener('error', handleWindowError); - }; - - invokeGuardedCallbackImpl = invokeGuardedCallbackDev; - } - } - - var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; - - var hasError = false; - var caughtError = null; // Used by event system to capture/rethrow the first error. - - var hasRethrowError = false; - var rethrowError = null; - var reporter = { - onError: function (error) { - hasError = true; - caughtError = error; - } - }; - /** - * Call a function while guarding against errors that happens within it. - * Returns an error if it throws, otherwise null. - * - * In production, this is implemented using a try-catch. The reason we don't - * use a try-catch directly is so that we can swap out a different - * implementation in DEV mode. - * - * @param {String} name of the guard to use for logging or debugging - * @param {Function} func The function to invoke - * @param {*} context The context to use when calling the function - * @param {...*} args Arguments for function - */ - - function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { - hasError = false; - caughtError = null; - invokeGuardedCallbackImpl$1.apply(reporter, arguments); - } - /** - * Same as invokeGuardedCallback, but instead of returning an error, it stores - * it in a global so it can be rethrown by `rethrowCaughtError` later. - * TODO: See if caughtError and rethrowError can be unified. - * - * @param {String} name of the guard to use for logging or debugging - * @param {Function} func The function to invoke - * @param {*} context The context to use when calling the function - * @param {...*} args Arguments for function - */ - - function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { - invokeGuardedCallback.apply(this, arguments); - - if (hasError) { - var error = clearCaughtError(); - - if (!hasRethrowError) { - hasRethrowError = true; - rethrowError = error; - } - } - } - /** - * During execution of guarded functions we will capture the first error which - * we will rethrow to be handled by the top level error handler. - */ - - function rethrowCaughtError() { - if (hasRethrowError) { - var error = rethrowError; - hasRethrowError = false; - rethrowError = null; - throw error; - } - } - function hasCaughtError() { - return hasError; - } - function clearCaughtError() { - if (hasError) { - var error = caughtError; - hasError = false; - caughtError = null; - return error; - } else { - { - { - throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - } - - var getFiberCurrentPropsFromNode = null; - var getInstanceFromNode = null; - var getNodeFromInstance = null; - function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) { - getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl; - getInstanceFromNode = getInstanceFromNodeImpl; - getNodeFromInstance = getNodeFromInstanceImpl; - - { - if (!getNodeFromInstance || !getInstanceFromNode) { - error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.'); - } - } - } - var validateEventDispatches; - - { - validateEventDispatches = function (event) { - var dispatchListeners = event._dispatchListeners; - var dispatchInstances = event._dispatchInstances; - var listenersIsArr = Array.isArray(dispatchListeners); - var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; - var instancesIsArr = Array.isArray(dispatchInstances); - var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; - - if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) { - error('EventPluginUtils: Invalid `event`.'); - } - }; - } - /** - * Dispatch the event to the listener. - * @param {SyntheticEvent} event SyntheticEvent to handle - * @param {function} listener Application-level callback - * @param {*} inst Internal component instance - */ - - - function executeDispatch(event, listener, inst) { - var type = event.type || 'unknown-event'; - event.currentTarget = getNodeFromInstance(inst); - invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); - event.currentTarget = null; - } - /** - * Standard/simple iteration through an event's collected dispatches. - */ - - function executeDispatchesInOrder(event) { - var dispatchListeners = event._dispatchListeners; - var dispatchInstances = event._dispatchInstances; - - { - validateEventDispatches(event); - } - - if (Array.isArray(dispatchListeners)) { - for (var i = 0; i < dispatchListeners.length; i++) { - if (event.isPropagationStopped()) { - break; - } // Listeners and Instances are two parallel arrays that are always in sync. - - - executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); - } - } else if (dispatchListeners) { - executeDispatch(event, dispatchListeners, dispatchInstances); - } - - event._dispatchListeners = null; - event._dispatchInstances = null; - } - - var FunctionComponent = 0; - var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. - - var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. - - var HostComponent = 5; - var HostText = 6; - var Fragment = 7; - var Mode = 8; - var ContextConsumer = 9; - var ContextProvider = 10; - var ForwardRef = 11; - var Profiler = 12; - var SuspenseComponent = 13; - var MemoComponent = 14; - var SimpleMemoComponent = 15; - var LazyComponent = 16; - var IncompleteClassComponent = 17; - var DehydratedFragment = 18; - var SuspenseListComponent = 19; - var FundamentalComponent = 20; - var ScopeComponent = 21; - var Block = 22; - - /** - * Injectable ordering of event plugins. - */ - var eventPluginOrder = null; - /** - * Injectable mapping from names to event plugin modules. - */ - - var namesToPlugins = {}; - /** - * Recomputes the plugin list using the injected plugins and plugin ordering. - * - * @private - */ - - function recomputePluginOrdering() { - if (!eventPluginOrder) { - // Wait until an `eventPluginOrder` is injected. - return; - } - - for (var pluginName in namesToPlugins) { - var pluginModule = namesToPlugins[pluginName]; - var pluginIndex = eventPluginOrder.indexOf(pluginName); - - if (!(pluginIndex > -1)) { - { - throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`." ); - } - } - - if (plugins[pluginIndex]) { - continue; - } - - if (!pluginModule.extractEvents) { - { - throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not." ); - } - } - - plugins[pluginIndex] = pluginModule; - var publishedEvents = pluginModule.eventTypes; - - for (var eventName in publishedEvents) { - if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) { - { - throw Error( "EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`." ); - } - } - } - } - } - /** - * Publishes an event so that it can be dispatched by the supplied plugin. - * - * @param {object} dispatchConfig Dispatch configuration for the event. - * @param {object} PluginModule Plugin publishing the event. - * @return {boolean} True if the event was successfully published. - * @private - */ - - - function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { - if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) { - { - throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + eventName + "`." ); - } - } - - eventNameDispatchConfigs[eventName] = dispatchConfig; - var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; - - if (phasedRegistrationNames) { - for (var phaseName in phasedRegistrationNames) { - if (phasedRegistrationNames.hasOwnProperty(phaseName)) { - var phasedRegistrationName = phasedRegistrationNames[phaseName]; - publishRegistrationName(phasedRegistrationName, pluginModule, eventName); - } - } - - return true; - } else if (dispatchConfig.registrationName) { - publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); - return true; - } - - return false; - } - /** - * Publishes a registration name that is used to identify dispatched events. - * - * @param {string} registrationName Registration name to add. - * @param {object} PluginModule Plugin publishing the event. - * @private - */ - - - function publishRegistrationName(registrationName, pluginModule, eventName) { - if (!!registrationNameModules[registrationName]) { - { - throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + registrationName + "`." ); - } - } - - registrationNameModules[registrationName] = pluginModule; - registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; - - { - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - - if (registrationName === 'onDoubleClick') { - possibleRegistrationNames.ondblclick = registrationName; - } - } - } - /** - * Registers plugins so that they can extract and dispatch events. - */ - - /** - * Ordered list of injected plugins. - */ - - - var plugins = []; - /** - * Mapping from event name to dispatch config - */ - - var eventNameDispatchConfigs = {}; - /** - * Mapping from registration name to plugin module - */ - - var registrationNameModules = {}; - /** - * Mapping from registration name to event name - */ - - var registrationNameDependencies = {}; - /** - * Mapping from lowercase registration names to the properly cased version, - * used to warn in the case of missing event handlers. Available - * only in true. - * @type {Object} - */ - - var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true - - /** - * Injects an ordering of plugins (by plugin name). This allows the ordering - * to be decoupled from injection of the actual plugins so that ordering is - * always deterministic regardless of packaging, on-the-fly injection, etc. - * - * @param {array} InjectedEventPluginOrder - * @internal - */ - - function injectEventPluginOrder(injectedEventPluginOrder) { - if (!!eventPluginOrder) { - { - throw Error( "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React." ); - } - } // Clone the ordering so it cannot be dynamically mutated. - - - eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); - recomputePluginOrdering(); - } - /** - * Injects plugins to be used by plugin event system. The plugin names must be - * in the ordering injected by `injectEventPluginOrder`. - * - * Plugins can be injected as part of page initialization or on-the-fly. - * - * @param {object} injectedNamesToPlugins Map from names to plugin modules. - * @internal - */ - - function injectEventPluginsByName(injectedNamesToPlugins) { - var isOrderingDirty = false; - - for (var pluginName in injectedNamesToPlugins) { - if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { - continue; - } - - var pluginModule = injectedNamesToPlugins[pluginName]; - - if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { - if (!!namesToPlugins[pluginName]) { - { - throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + pluginName + "`." ); - } - } - - namesToPlugins[pluginName] = pluginModule; - isOrderingDirty = true; - } - } - - if (isOrderingDirty) { - recomputePluginOrdering(); - } - } - - var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); - - var PLUGIN_EVENT_SYSTEM = 1; - var IS_REPLAYED = 1 << 5; - var IS_FIRST_ANCESTOR = 1 << 6; - - var restoreImpl = null; - var restoreTarget = null; - var restoreQueue = null; - - function restoreStateOfTarget(target) { - // We perform this translation at the end of the event loop so that we - // always receive the correct fiber here - var internalInstance = getInstanceFromNode(target); - - if (!internalInstance) { - // Unmounted - return; - } - - if (!(typeof restoreImpl === 'function')) { - { - throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted. - - if (stateNode) { - var _props = getFiberCurrentPropsFromNode(stateNode); - - restoreImpl(internalInstance.stateNode, internalInstance.type, _props); - } - } - - function setRestoreImplementation(impl) { - restoreImpl = impl; - } - function enqueueStateRestore(target) { - if (restoreTarget) { - if (restoreQueue) { - restoreQueue.push(target); - } else { - restoreQueue = [target]; - } - } else { - restoreTarget = target; - } - } - function needsStateRestore() { - return restoreTarget !== null || restoreQueue !== null; - } - function restoreStateIfNeeded() { - if (!restoreTarget) { - return; - } - - var target = restoreTarget; - var queuedTargets = restoreQueue; - restoreTarget = null; - restoreQueue = null; - restoreStateOfTarget(target); - - if (queuedTargets) { - for (var i = 0; i < queuedTargets.length; i++) { - restoreStateOfTarget(queuedTargets[i]); - } - } - } - - var enableProfilerTimer = true; // Trace which interactions trigger each commit. - - var enableDeprecatedFlareAPI = false; // Experimental Host Component support. - - var enableFundamentalAPI = false; // Experimental Scope support. - var warnAboutStringRefs = false; - - // the renderer. Such as when we're dispatching events or if third party - // libraries need to call batchedUpdates. Eventually, this API will go away when - // everything is batched by default. We'll then have a similar API to opt-out of - // scheduled work and instead do synchronous work. - // Defaults - - var batchedUpdatesImpl = function (fn, bookkeeping) { - return fn(bookkeeping); - }; - - var discreteUpdatesImpl = function (fn, a, b, c, d) { - return fn(a, b, c, d); - }; - - var flushDiscreteUpdatesImpl = function () {}; - - var batchedEventUpdatesImpl = batchedUpdatesImpl; - var isInsideEventHandler = false; - var isBatchingEventUpdates = false; - - function finishEventHandler() { - // Here we wait until all updates have propagated, which is important - // when using controlled components within layers: - // https://github.com/facebook/react/issues/1698 - // Then we restore state of any controlled component. - var controlledComponentsHavePendingUpdates = needsStateRestore(); - - if (controlledComponentsHavePendingUpdates) { - // If a controlled event was fired, we may need to restore the state of - // the DOM node back to the controlled value. This is necessary when React - // bails out of the update without touching the DOM. - flushDiscreteUpdatesImpl(); - restoreStateIfNeeded(); - } - } - - function batchedUpdates(fn, bookkeeping) { - if (isInsideEventHandler) { - // If we are currently inside another batch, we need to wait until it - // fully completes before restoring state. - return fn(bookkeeping); - } - - isInsideEventHandler = true; - - try { - return batchedUpdatesImpl(fn, bookkeeping); - } finally { - isInsideEventHandler = false; - finishEventHandler(); - } - } - function batchedEventUpdates(fn, a, b) { - if (isBatchingEventUpdates) { - // If we are currently inside another batch, we need to wait until it - // fully completes before restoring state. - return fn(a, b); - } - - isBatchingEventUpdates = true; - - try { - return batchedEventUpdatesImpl(fn, a, b); - } finally { - isBatchingEventUpdates = false; - finishEventHandler(); - } - } // This is for the React Flare event system - function discreteUpdates(fn, a, b, c, d) { - var prevIsInsideEventHandler = isInsideEventHandler; - isInsideEventHandler = true; - - try { - return discreteUpdatesImpl(fn, a, b, c, d); - } finally { - isInsideEventHandler = prevIsInsideEventHandler; - - if (!isInsideEventHandler) { - finishEventHandler(); - } - } - } - function flushDiscreteUpdatesIfNeeded(timeStamp) { - // event.timeStamp isn't overly reliable due to inconsistencies in - // how different browsers have historically provided the time stamp. - // Some browsers provide high-resolution time stamps for all events, - // some provide low-resolution time stamps for all events. FF < 52 - // even mixes both time stamps together. Some browsers even report - // negative time stamps or time stamps that are 0 (iOS9) in some cases. - // Given we are only comparing two time stamps with equality (!==), - // we are safe from the resolution differences. If the time stamp is 0 - // we bail-out of preventing the flush, which can affect semantics, - // such as if an earlier flush removes or adds event listeners that - // are fired in the subsequent flush. However, this is the same - // behaviour as we had before this change, so the risks are low. - if (!isInsideEventHandler && (!enableDeprecatedFlareAPI )) { - flushDiscreteUpdatesImpl(); - } - } - function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) { - batchedUpdatesImpl = _batchedUpdatesImpl; - discreteUpdatesImpl = _discreteUpdatesImpl; - flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl; - batchedEventUpdatesImpl = _batchedEventUpdatesImpl; - } - - var DiscreteEvent = 0; - var UserBlockingEvent = 1; - var ContinuousEvent = 2; - - // A reserved attribute. - // It is handled by React separately and shouldn't be written to the DOM. - var RESERVED = 0; // A simple string attribute. - // Attributes that aren't in the whitelist are presumed to have this type. - - var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called - // "enumerated" attributes with "true" and "false" as possible values. - // When true, it should be set to a "true" string. - // When false, it should be set to a "false" string. - - var BOOLEANISH_STRING = 2; // A real boolean attribute. - // When true, it should be present (set either to an empty string or its name). - // When false, it should be omitted. - - var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. - // When true, it should be present (set either to an empty string or its name). - // When false, it should be omitted. - // For any other value, should be present with that value. - - var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. - // When falsy, it should be removed. - - var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. - // When falsy, it should be removed. - - var POSITIVE_NUMERIC = 6; - - /* eslint-disable max-len */ - var ATTRIBUTE_NAME_START_CHAR = ":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"; - /* eslint-enable max-len */ - - var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; - var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); - var hasOwnProperty = Object.prototype.hasOwnProperty; - var illegalAttributeNameCache = {}; - var validatedAttributeNameCache = {}; - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { - return true; - } - - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { - return false; - } - - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { - validatedAttributeNameCache[attributeName] = true; - return true; - } - - illegalAttributeNameCache[attributeName] = true; - - { - error('Invalid attribute name: `%s`', attributeName); - } - - return false; - } - function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null) { - return propertyInfo.type === RESERVED; - } - - if (isCustomComponentTag) { - return false; - } - - if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return true; - } - - return false; - } - function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null && propertyInfo.type === RESERVED) { - return false; - } - - switch (typeof value) { - case 'function': // $FlowIssue symbol is perfectly valid here - - case 'symbol': - // eslint-disable-line - return true; - - case 'boolean': - { - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - return !propertyInfo.acceptsBooleans; - } else { - var prefix = name.toLowerCase().slice(0, 5); - return prefix !== 'data-' && prefix !== 'aria-'; - } - } - - default: - return false; - } - } - function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { - if (value === null || typeof value === 'undefined') { - return true; - } - - if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { - return true; - } - - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - switch (propertyInfo.type) { - case BOOLEAN: - return !value; - - case OVERLOADED_BOOLEAN: - return value === false; - - case NUMERIC: - return isNaN(value); - - case POSITIVE_NUMERIC: - return isNaN(value) || value < 1; - } - } - - return false; - } - function getPropertyInfo(name) { - return properties.hasOwnProperty(name) ? properties[name] : null; - } - - function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) { - this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; - this.attributeName = attributeName; - this.attributeNamespace = attributeNamespace; - this.mustUseProperty = mustUseProperty; - this.propertyName = name; - this.type = type; - this.sanitizeURL = sanitizeURL; - } // When adding attributes to this list, be sure to also add them to - // the `possibleStandardNames` module to ensure casing and incorrect - // name warnings. - - - var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. - - var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular - // elements (not just inputs). Now that ReactDOMInput assigns to the - // defaultValue property -- do we need this? - 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style']; - - reservedProps.forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false); - }); // A few React string attributes have a different name. - // This is a mapping from React prop names to the attribute names. - - [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) { - var name = _ref[0], - attributeName = _ref[1]; - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, // attributeName - null, // attributeNamespace - false); - }); // These are "enumerated" HTML attributes that accept "true" and "false". - // In React, we let users pass `true` and `false` even though technically - // these aren't boolean attributes (they are coerced to strings). - - ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false); - }); // These are "enumerated" SVG attributes that accept "true" and "false". - // In React, we let users pass `true` and `false` even though technically - // these aren't boolean attributes (they are coerced to strings). - // Since these are SVG attributes, their attribute names are case-sensitive. - - ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false); - }); // These are HTML boolean attributes. - - ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM - // on the client side because the browsers are inconsistent. Instead we call focus(). - 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata - 'itemScope'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false); - }); // These are the few React props that we set as DOM properties - // rather than attributes. These are all booleans. - - ['checked', // Note: `option.selected` is not updated if `select.multiple` is - // disabled with `removeAttribute`. We have special logic for handling this. - 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false); - }); // These are HTML attributes that are "overloaded booleans": they behave like - // booleans, but can also accept a string value. - - ['capture', 'download' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false); - }); // These are HTML attributes that must be positive numbers. - - ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false); - }); // These are HTML attributes that must be numbers. - - ['rowSpan', 'start'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false); - }); - var CAMELIZE = /[\-\:]([a-z])/g; - - var capitalize = function (token) { - return token[1].toUpperCase(); - }; // This is a list of all SVG attributes that need special casing, namespacing, - // or boolean value assignment. Regular attributes that just accept strings - // and have the same names are omitted, just like in the HTML whitelist. - // Some of these attributes can be hard to find. This list was created by - // scraping the MDN documentation. - - - ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, null, // attributeNamespace - false); - }); // String SVG attributes with the xlink namespace. - - ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/1999/xlink', false); - }); // String SVG attributes with the xml namespace. - - ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/XML/1998/namespace', false); - }); // These attribute exists both in HTML and SVG. - // The attribute name is case-sensitive in SVG so we can't just use - // the React name like we do for attributes that exist only in HTML. - - ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - false); - }); // These attributes accept URLs. These must not allow javascript: URLS. - // These will also need to accept Trusted Types object in the future. - - var xlinkHref = 'xlinkHref'; - properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty - 'xlink:href', 'http://www.w3.org/1999/xlink', true); - ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - true); - }); - - var ReactDebugCurrentFrame = null; - - { - ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - } // A javascript: URL can contain leading C0 control or \u0020 SPACE, - // and any newline or tab are filtered out as if they're not part of the URL. - // https://url.spec.whatwg.org/#url-parsing - // Tab or newline are defined as \r\n\t: - // https://infra.spec.whatwg.org/#ascii-tab-or-newline - // A C0 control is a code point in the range \u0000 NULL to \u001F - // INFORMATION SEPARATOR ONE, inclusive: - // https://infra.spec.whatwg.org/#c0-control-or-space - - /* eslint-disable max-len */ - - - var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; - var didWarn = false; - - function sanitizeURL(url) { - { - if (!didWarn && isJavaScriptProtocol.test(url)) { - didWarn = true; - - error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url)); - } - } - } - - /** - * Get the value for a property on a node. Only used in DEV for SSR validation. - * The "expected" argument is used as a hint of what the expected value is. - * Some properties have multiple equivalent values. - */ - function getValueForProperty(node, name, expected, propertyInfo) { - { - if (propertyInfo.mustUseProperty) { - var propertyName = propertyInfo.propertyName; - return node[propertyName]; - } else { - if ( propertyInfo.sanitizeURL) { - // If we haven't fully disabled javascript: URLs, and if - // the hydration is successful of a javascript: URL, we - // still want to warn on the client. - sanitizeURL('' + expected); - } - - var attributeName = propertyInfo.attributeName; - var stringValue = null; - - if (propertyInfo.type === OVERLOADED_BOOLEAN) { - if (node.hasAttribute(attributeName)) { - var value = node.getAttribute(attributeName); - - if (value === '') { - return true; - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return value; - } - - if (value === '' + expected) { - return expected; - } - - return value; - } - } else if (node.hasAttribute(attributeName)) { - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - // We had an attribute but shouldn't have had one, so read it - // for the error message. - return node.getAttribute(attributeName); - } - - if (propertyInfo.type === BOOLEAN) { - // If this was a boolean, it doesn't matter what the value is - // the fact that we have it is the same as the expected. - return expected; - } // Even if this property uses a namespace we use getAttribute - // because we assume its namespaced name is the same as our config. - // To use getAttributeNS we need the local name which we don't have - // in our config atm. - - - stringValue = node.getAttribute(attributeName); - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return stringValue === null ? expected : stringValue; - } else if (stringValue === '' + expected) { - return expected; - } else { - return stringValue; - } - } - } - } - /** - * Get the value for a attribute on a node. Only used in DEV for SSR validation. - * The third argument is used as a hint of what the expected value is. Some - * attributes have multiple equivalent values. - */ - - function getValueForAttribute(node, name, expected) { - { - if (!isAttributeNameSafe(name)) { - return; - } - - if (!node.hasAttribute(name)) { - return expected === undefined ? undefined : null; - } - - var value = node.getAttribute(name); - - if (value === '' + expected) { - return expected; - } - - return value; - } - } - /** - * Sets the value for a property on a node. - * - * @param {DOMElement} node - * @param {string} name - * @param {*} value - */ - - function setValueForProperty(node, name, value, isCustomComponentTag) { - var propertyInfo = getPropertyInfo(name); - - if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { - return; - } - - if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { - value = null; - } // If the prop isn't in the special list, treat it as a simple attribute. - - - if (isCustomComponentTag || propertyInfo === null) { - if (isAttributeNameSafe(name)) { - var _attributeName = name; - - if (value === null) { - node.removeAttribute(_attributeName); - } else { - node.setAttribute(_attributeName, '' + value); - } - } - - return; - } - - var mustUseProperty = propertyInfo.mustUseProperty; - - if (mustUseProperty) { - var propertyName = propertyInfo.propertyName; - - if (value === null) { - var type = propertyInfo.type; - node[propertyName] = type === BOOLEAN ? false : ''; - } else { - // Contrary to `setAttribute`, object properties are properly - // `toString`ed by IE8/9. - node[propertyName] = value; - } - - return; - } // The rest are treated as attributes with special cases. - - - var attributeName = propertyInfo.attributeName, - attributeNamespace = propertyInfo.attributeNamespace; - - if (value === null) { - node.removeAttribute(attributeName); - } else { - var _type = propertyInfo.type; - var attributeValue; - - if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { - // If attribute type is boolean, we know for sure it won't be an execution sink - // and we won't require Trusted Type here. - attributeValue = ''; - } else { - // `setAttribute` with objects becomes only `[object]` in IE8/9, - // ('' + value) makes it output the correct toString()-value. - { - attributeValue = '' + value; - } - - if (propertyInfo.sanitizeURL) { - sanitizeURL(attributeValue.toString()); - } - } - - if (attributeNamespace) { - node.setAttributeNS(attributeNamespace, attributeName, attributeValue); - } else { - node.setAttribute(attributeName, attributeValue); - } - } - } - - var BEFORE_SLASH_RE = /^(.*)[\\\/]/; - function describeComponentFrame (name, source, ownerName) { - var sourceInfo = ''; - - if (source) { - var path = source.fileName; - var fileName = path.replace(BEFORE_SLASH_RE, ''); - - { - // In DEV, include code for a common special case: - // prefer "folder/index.js" instead of just "index.js". - if (/^index\./.test(fileName)) { - var match = path.match(BEFORE_SLASH_RE); - - if (match) { - var pathBeforeSlash = match[1]; - - if (pathBeforeSlash) { - var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, ''); - fileName = folderName + '/' + fileName; - } - } - } - } - - sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')'; - } else if (ownerName) { - sourceInfo = ' (created by ' + ownerName + ')'; - } - - return '\n in ' + (name || 'Unknown') + sourceInfo; - } - - // The Symbol used to tag the ReactElement-like types. If there is no native Symbol - // nor polyfill, then a plain number is used for performance. - var hasSymbol = typeof Symbol === 'function' && Symbol.for; - var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; - var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; - var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; - var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; - var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; - var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; - var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary - var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; - var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; - var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; - var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; - var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; - var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; - var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; - var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== 'object') { - return null; - } - - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - - return null; - } - - var Uninitialized = -1; - var Pending = 0; - var Resolved = 1; - var Rejected = 2; - function refineResolvedLazyComponent(lazyComponent) { - return lazyComponent._status === Resolved ? lazyComponent._result : null; - } - function initializeLazyComponentType(lazyComponent) { - if (lazyComponent._status === Uninitialized) { - lazyComponent._status = Pending; - var ctor = lazyComponent._ctor; - var thenable = ctor(); - lazyComponent._result = thenable; - thenable.then(function (moduleObject) { - if (lazyComponent._status === Pending) { - var defaultExport = moduleObject.default; - - { - if (defaultExport === undefined) { - error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); - } - } - - lazyComponent._status = Resolved; - lazyComponent._result = defaultExport; - } - }, function (error) { - if (lazyComponent._status === Pending) { - lazyComponent._status = Rejected; - lazyComponent._result = error; - } - }); - } - } - - function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ''; - return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); - } - - function getComponentName(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case REACT_FRAGMENT_TYPE: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case REACT_PROFILER_TYPE: - return "Profiler"; - - case REACT_STRICT_MODE_TYPE: - return 'StrictMode'; - - case REACT_SUSPENSE_TYPE: - return 'Suspense'; - - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - return 'Context.Consumer'; - - case REACT_PROVIDER_TYPE: - return 'Context.Provider'; - - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - - case REACT_MEMO_TYPE: - return getComponentName(type.type); - - case REACT_BLOCK_TYPE: - return getComponentName(type.render); - - case REACT_LAZY_TYPE: - { - var thenable = type; - var resolvedThenable = refineResolvedLazyComponent(thenable); - - if (resolvedThenable) { - return getComponentName(resolvedThenable); - } - - break; - } - } - } - - return null; - } - - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - - function describeFiber(fiber) { - switch (fiber.tag) { - case HostRoot: - case HostPortal: - case HostText: - case Fragment: - case ContextProvider: - case ContextConsumer: - return ''; - - default: - var owner = fiber._debugOwner; - var source = fiber._debugSource; - var name = getComponentName(fiber.type); - var ownerName = null; - - if (owner) { - ownerName = getComponentName(owner.type); - } - - return describeComponentFrame(name, source, ownerName); - } - } - - function getStackByFiberInDevAndProd(workInProgress) { - var info = ''; - var node = workInProgress; - - do { - info += describeFiber(node); - node = node.return; - } while (node); - - return info; - } - var current = null; - var isRendering = false; - function getCurrentFiberOwnerNameInDevOrNull() { - { - if (current === null) { - return null; - } - - var owner = current._debugOwner; - - if (owner !== null && typeof owner !== 'undefined') { - return getComponentName(owner.type); - } - } - - return null; - } - function getCurrentFiberStackInDev() { - { - if (current === null) { - return ''; - } // Safe because if current fiber exists, we are reconciling, - // and it is guaranteed to be the work-in-progress version. - - - return getStackByFiberInDevAndProd(current); - } - } - function resetCurrentFiber() { - { - ReactDebugCurrentFrame$1.getCurrentStack = null; - current = null; - isRendering = false; - } - } - function setCurrentFiber(fiber) { - { - ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev; - current = fiber; - isRendering = false; - } - } - function setIsRendering(rendering) { - { - isRendering = rendering; - } - } - - // Flow does not allow string concatenation of most non-string types. To work - // around this limitation, we use an opaque type that can only be obtained by - // passing the value through getToStringValue first. - function toString(value) { - return '' + value; - } - function getToStringValue(value) { - switch (typeof value) { - case 'boolean': - case 'number': - case 'object': - case 'string': - case 'undefined': - return value; - - default: - // function, symbol are assigned as empty strings - return ''; - } - } - - var ReactDebugCurrentFrame$2 = null; - var ReactControlledValuePropTypes = { - checkPropTypes: null - }; - - { - ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame; - var hasReadOnlyValue = { - button: true, - checkbox: true, - image: true, - hidden: true, - radio: true, - reset: true, - submit: true - }; - var propTypes = { - value: function (props, propName, componentName) { - if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) { - return null; - } - - return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - }, - checked: function (props, propName, componentName) { - if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) { - return null; - } - - return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - } - }; - /** - * Provide a linked `value` attribute for controlled forms. You should not use - * this outside of the ReactDOM controlled form components. - */ - - ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) { - checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum); - }; - } - - function isCheckable(elem) { - var type = elem.type; - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); - } - - function getTracker(node) { - return node._valueTracker; - } - - function detachTracker(node) { - node._valueTracker = null; - } - - function getValueFromNode(node) { - var value = ''; - - if (!node) { - return value; - } - - if (isCheckable(node)) { - value = node.checked ? 'true' : 'false'; - } else { - value = node.value; - } - - return value; - } - - function trackValueOnNode(node) { - var valueField = isCheckable(node) ? 'checked' : 'value'; - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail - // and don't track value will cause over reporting of changes, - // but it's better then a hard failure - // (needed for certain tests that spyOn input values and Safari) - - if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { - return; - } - - var get = descriptor.get, - set = descriptor.set; - Object.defineProperty(node, valueField, { - configurable: true, - get: function () { - return get.call(this); - }, - set: function (value) { - currentValue = '' + value; - set.call(this, value); - } - }); // We could've passed this the first time - // but it triggers a bug in IE11 and Edge 14/15. - // Calling defineProperty() again should be equivalent. - // https://github.com/facebook/react/issues/11768 - - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable - }); - var tracker = { - getValue: function () { - return currentValue; - }, - setValue: function (value) { - currentValue = '' + value; - }, - stopTracking: function () { - detachTracker(node); - delete node[valueField]; - } - }; - return tracker; - } - - function track(node) { - if (getTracker(node)) { - return; - } // TODO: Once it's just Fiber we can move this to node._wrapperState - - - node._valueTracker = trackValueOnNode(node); - } - function updateValueIfChanged(node) { - if (!node) { - return false; - } - - var tracker = getTracker(node); // if there is no tracker at this point it's unlikely - // that trying again will succeed - - if (!tracker) { - return true; - } - - var lastValue = tracker.getValue(); - var nextValue = getValueFromNode(node); - - if (nextValue !== lastValue) { - tracker.setValue(nextValue); - return true; - } - - return false; - } - - var didWarnValueDefaultValue = false; - var didWarnCheckedDefaultChecked = false; - var didWarnControlledToUncontrolled = false; - var didWarnUncontrolledToControlled = false; - - function isControlled(props) { - var usesChecked = props.type === 'checkbox' || props.type === 'radio'; - return usesChecked ? props.checked != null : props.value != null; - } - /** - * Implements an host component that allows setting these optional - * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. - * - * If `checked` or `value` are not supplied (or null/undefined), user actions - * that affect the checked state or value will trigger updates to the element. - * - * If they are supplied (and not null/undefined), the rendered element will not - * trigger updates to the element. Instead, the props must change in order for - * the rendered element to be updated. - * - * The rendered element will be initialized as unchecked (or `defaultChecked`) - * with an empty value (or `defaultValue`). - * - * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html - */ - - - function getHostProps(element, props) { - var node = element; - var checked = props.checked; - - var hostProps = _assign({}, props, { - defaultChecked: undefined, - defaultValue: undefined, - value: undefined, - checked: checked != null ? checked : node._wrapperState.initialChecked - }); - - return hostProps; - } - function initWrapperState(element, props) { - { - ReactControlledValuePropTypes.checkPropTypes('input', props); - - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { - error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnCheckedDefaultChecked = true; - } - - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { - error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnValueDefaultValue = true; - } - } - - var node = element; - var defaultValue = props.defaultValue == null ? '' : props.defaultValue; - node._wrapperState = { - initialChecked: props.checked != null ? props.checked : props.defaultChecked, - initialValue: getToStringValue(props.value != null ? props.value : defaultValue), - controlled: isControlled(props) - }; - } - function updateChecked(element, props) { - var node = element; - var checked = props.checked; - - if (checked != null) { - setValueForProperty(node, 'checked', checked, false); - } - } - function updateWrapper(element, props) { - var node = element; - - { - var controlled = isControlled(props); - - if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { - error('A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type); - - didWarnUncontrolledToControlled = true; - } - - if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { - error('A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type); - - didWarnControlledToUncontrolled = true; - } - } - - updateChecked(element, props); - var value = getToStringValue(props.value); - var type = props.type; - - if (value != null) { - if (type === 'number') { - if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible. - // eslint-disable-next-line - node.value != value) { - node.value = toString(value); - } - } else if (node.value !== toString(value)) { - node.value = toString(value); - } - } else if (type === 'submit' || type === 'reset') { - // Submit/reset inputs need the attribute removed completely to avoid - // blank-text buttons. - node.removeAttribute('value'); - return; - } - - { - // When syncing the value attribute, the value comes from a cascade of - // properties: - // 1. The value React property - // 2. The defaultValue React property - // 3. Otherwise there should be no change - if (props.hasOwnProperty('value')) { - setDefaultValue(node, props.type, value); - } else if (props.hasOwnProperty('defaultValue')) { - setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); - } - } - - { - // When syncing the checked attribute, it only changes when it needs - // to be removed, such as transitioning from a checkbox into a text input - if (props.checked == null && props.defaultChecked != null) { - node.defaultChecked = !!props.defaultChecked; - } - } - } - function postMountWrapper(element, props, isHydrating) { - var node = element; // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { - var type = props.type; - var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the - // default value provided by the browser. See: #12872 - - if (isButton && (props.value === undefined || props.value === null)) { - return; - } - - var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (!isHydrating) { - { - // When syncing the value attribute, the value property should use - // the wrapperState._initialValue property. This uses: - // - // 1. The value React property when present - // 2. The defaultValue React property when present - // 3. An empty string - if (initialValue !== node.value) { - node.value = initialValue; - } - } - } - - { - // Otherwise, the value attribute is synchronized to the property, - // so we assign defaultValue to the same thing as the value property - // assignment step above. - node.defaultValue = initialValue; - } - } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug - // this is needed to work around a chrome bug where setting defaultChecked - // will sometimes influence the value of checked (even after detachment). - // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 - // We need to temporarily unset name to avoid disrupting radio button groups. - - - var name = node.name; - - if (name !== '') { - node.name = ''; - } - - { - // When syncing the checked attribute, both the checked property and - // attribute are assigned at the same time using defaultChecked. This uses: - // - // 1. The checked React property when present - // 2. The defaultChecked React property when present - // 3. Otherwise, false - node.defaultChecked = !node.defaultChecked; - node.defaultChecked = !!node._wrapperState.initialChecked; - } - - if (name !== '') { - node.name = name; - } - } - function restoreControlledState(element, props) { - var node = element; - updateWrapper(node, props); - updateNamedCousins(node, props); - } - - function updateNamedCousins(rootNode, props) { - var name = props.name; - - if (props.type === 'radio' && name != null) { - var queryRoot = rootNode; - - while (queryRoot.parentNode) { - queryRoot = queryRoot.parentNode; - } // If `rootNode.form` was non-null, then we could try `form.elements`, - // but that sometimes behaves strangely in IE8. We could also try using - // `form.getElementsByName`, but that will only return direct children - // and won't include inputs that use the HTML5 `form=` attribute. Since - // the input might not even be in a form. It might not even be in the - // document. Let's just use the local `querySelectorAll` to ensure we don't - // miss anything. - - - var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); - - for (var i = 0; i < group.length; i++) { - var otherNode = group[i]; - - if (otherNode === rootNode || otherNode.form !== rootNode.form) { - continue; - } // This will throw if radio buttons rendered by different copies of React - // and the same name are rendered into the same form (same as #1939). - // That's probably okay; we don't support it just as we don't support - // mixing React radio buttons with non-React ones. - - - var otherProps = getFiberCurrentPropsFromNode$1(otherNode); - - if (!otherProps) { - { - throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." ); - } - } // We need update the tracked value on the named cousin since the value - // was changed but the input saw no event or value set - - - updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that - // was previously checked to update will cause it to be come re-checked - // as appropriate. - - updateWrapper(otherNode, otherProps); - } - } - } // In Chrome, assigning defaultValue to certain input types triggers input validation. - // For number inputs, the display value loses trailing decimal points. For email inputs, - // Chrome raises "The specified value is not a valid email address". - // - // Here we check to see if the defaultValue has actually changed, avoiding these problems - // when the user is inputting text - // - // https://github.com/facebook/react/issues/7253 - - - function setDefaultValue(node, type, value) { - if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js - type !== 'number' || node.ownerDocument.activeElement !== node) { - if (value == null) { - node.defaultValue = toString(node._wrapperState.initialValue); - } else if (node.defaultValue !== toString(value)) { - node.defaultValue = toString(value); - } - } - } - - var didWarnSelectedSetOnOption = false; - var didWarnInvalidChild = false; - - function flattenChildren(children) { - var content = ''; // Flatten children. We'll warn if they are invalid - // during validateProps() which runs for hydration too. - // Note that this would throw on non-element objects. - // Elements are stringified (which is normally irrelevant - // but matters for ). - - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } - - content += child; // Note: we don't warn about invalid children here. - // Instead, this is done separately below so that - // it happens during the hydration codepath too. - }); - return content; - } - /** - * Implements an