From 988af9af835f92690de58c19eb231e40fc99fe25 Mon Sep 17 00:00:00 2001 From: jchavarri Date: Mon, 30 Oct 2023 01:36:51 +0000 Subject: [PATCH] deploy: cbd91b32e6ef86b07aef69b25a2da48d7b82d89f --- demo/index.html | 2 +- index.html | 2 +- reshowcase45abd4b2ac351abf8cc7.js | 2 ++ ...LICENSE.txt => reshowcase45abd4b2ac351abf8cc7.js.LICENSE.txt | 0 reshowcaseb0509b1534dabb696094.js | 2 -- 5 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 reshowcase45abd4b2ac351abf8cc7.js rename reshowcaseb0509b1534dabb696094.js.LICENSE.txt => reshowcase45abd4b2ac351abf8cc7.js.LICENSE.txt (100%) delete mode 100644 reshowcaseb0509b1534dabb696094.js diff --git a/demo/index.html b/demo/index.html index 5d3f9d8..d95e893 100644 --- a/demo/index.html +++ b/demo/index.html @@ -1 +1 @@ -Reshowcase demo
\ No newline at end of file +Reshowcase demo
\ No newline at end of file diff --git a/index.html b/index.html index a41125e..0356979 100644 --- a/index.html +++ b/index.html @@ -20,4 +20,4 @@ display: flex; flex-direction: column; flex-grow: 1; - }
\ No newline at end of file + }
\ No newline at end of file diff --git a/reshowcase45abd4b2ac351abf8cc7.js b/reshowcase45abd4b2ac351abf8cc7.js new file mode 100644 index 0000000..95f624c --- /dev/null +++ b/reshowcase45abd4b2ac351abf8cc7.js @@ -0,0 +1,2 @@ +/*! For license information please see reshowcase45abd4b2ac351abf8cc7.js.LICENSE.txt */ +(()=>{"use strict";var e,n,t,r,i={2954:(e,n,t)=>{var r=t(406),i=t(1525),o=t(117),a=t(1609);function u(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function l(e){for(var n=e.length,t=0;t=0;--i)r=t(r,e[i]);return r}function x(e,n,t,i){for(var o=t,a=r.caml_int_min(e.length,n.length)-1|0;a>=0;--a)o=i(o,e[a],n[a]);return o}function S(e,n,t){for(var r=n,i=0,o=e.length;ii)return 1;if(r=0&&n=0&&n=0&&n=0&&ni?t-i|0:0,a=new Array(o),u=0;u=0;--d)t[d+c|0]=e[d+l|0]},n.blitUnsafe=function(e,n,t,r,i){if(r<=n)for(var o=0;o=0;--a)t[a+r|0]=e[a+n|0]},n.forEachU=v,n.forEach=function(e,n){v(e,o.__1(n))},n.mapU=_,n.map=function(e,n){return _(e,o.__1(n))},n.flatMapU=function(e,n){return d(_(e,n))},n.flatMap=function(e,n){return d(_(e,o.__1(n)))},n.getByU=p,n.getBy=function(e,n){return p(e,o.__1(n))},n.getIndexByU=h,n.getIndexBy=function(e,n){return h(e,o.__1(n))},n.keepU=m,n.keep=function(e,n){return m(e,o.__1(n))},n.keepWithIndexU=g,n.keepWithIndex=function(e,n){return g(e,o.__2(n))},n.keepMapU=y,n.keepMap=function(e,n){return y(e,o.__1(n))},n.forEachWithIndexU=b,n.forEachWithIndex=function(e,n){b(e,o.__2(n))},n.mapWithIndexU=w,n.mapWithIndex=function(e,n){return w(e,o.__2(n))},n.partitionU=D,n.partition=function(e,n){return D(e,o.__1(n))},n.reduceU=E,n.reduce=function(e,n,t){return E(e,n,o.__2(t))},n.reduceReverseU=k,n.reduceReverse=function(e,n,t){return k(e,n,o.__2(t))},n.reduceReverse2U=x,n.reduceReverse2=function(e,n,t,r){return x(e,n,t,o.__3(r))},n.reduceWithIndexU=S,n.reduceWithIndex=function(e,n,t){return S(e,n,o.__3(t))},n.joinWithU=F,n.joinWith=function(e,n,t){return F(e,n,o.__1(t))},n.someU=N,n.some=function(e,n){return N(e,o.__1(n))},n.everyU=C,n.every=function(e,n){return C(e,o.__1(n))},n.every2U=A,n.every2=function(e,n,t){return A(e,n,o.__2(t))},n.some2U=T,n.some2=function(e,n,t){return T(e,n,o.__2(t))},n.cmpU=R,n.cmp=function(e,n,t){return R(e,n,o.__2(t))},n.eqU=O,n.eq=function(e,n,t){return O(e,n,o.__2(t))},n.initU=z,n.init=function(e,n){return z(e,o.__1(n))}},7285:(e,n,t)=>{var r=t(2954),i=t(4822),o=t(1525),a=t(117);function u(e,n){for(;;){var t=n,r=e;if(!r)return t;var i={hd:r.hd,tl:0};t.tl=i,n=i,e=r.tl}}function l(e,n,t){for(;;){var r=t,i=n;if(!i)return;var o=i.tl,a=i.hd;if(e(a)){var u={hd:a,tl:0};r.tl=u,t=u,n=o}else n=o}}function c(e,n,t,r){for(;;){var i=r,o=t,a=n;if(!a)return;var u=a.tl,l=a.hd;if(e(l,i)){var c={hd:l,tl:0};o.tl=c,r=i+1|0,t=c,n=u}else r=i+1|0,n=u}}function f(e,n,t){for(;;){var r=t,i=n;if(!i)return;var a=i.tl,u=e(i.hd);if(void 0===u)n=a;else{var l={hd:o.valFromOption(u),tl:0};r.tl=l,t=l,n=a}}}function s(e,n){if(!e)return n;var t={hd:e.hd,tl:0};return u(e.tl,t).tl=n,t}function d(e,n){if(!e)return 0;var t={hd:n(e.hd),tl:0};return function(e,n,t){for(;;){var r=n,i=e;if(!i)return;var o={hd:t(i.hd),tl:0};r.tl=o,n=o,e=i.tl}}(e.tl,t,n),t}function v(e,n,t){if(!e)return 0;if(!n)return 0;var r={hd:t(e.hd,n.hd),tl:0};return function(e,n,t,r){for(;;){var i=r,o=t,a=n;if(!a)return;if(!o)return;var u={hd:e(a.hd,o.hd),tl:0};i.tl=u,r=u,t=o.tl,n=a.tl}}(t,e.tl,n.tl,r),r}function _(e,n){if(!e)return 0;var t={hd:n(0,e.hd),tl:0};return function(e,n,t,r){for(;;){var i=r,o=t,a=n;if(!o)return;var u={hd:e(a,o.hd),tl:0};i.tl=u,r=u,t=o.tl,n=a+1|0}}(n,1,e.tl,t),t}function p(e,n){if(e<=0)return 0;for(var t={hd:n(0),tl:0},r=t,i=1;i=0;--i)r=s(e[i],r);return r},n.reverseConcat=y,n.flatten=function(e){for(;;){var n=e;if(!n)return 0;var t=n.hd;if(t){var r={hd:t.hd,tl:0};return b(u(t.tl,r),n.tl),r}e=n.tl}},n.mapU=d,n.map=function(e,n){return d(e,a.__1(n))},n.zip=function(e,n){if(!e)return 0;if(!n)return 0;var t={hd:[e.hd,n.hd],tl:0};return function(e,n,t){for(;;){var r=t,i=n,o=e;if(!o)return;if(!i)return;var a={hd:[o.hd,i.hd],tl:0};r.tl=a,t=a,n=i.tl,e=o.tl}}(e.tl,n.tl,t),t},n.zipByU=v,n.zipBy=function(e,n,t){return v(e,n,a.__2(t))},n.mapWithIndexU=_,n.mapWithIndex=function(e,n){return _(e,a.__2(n))},n.fromArray=m,n.toArray=g,n.reverse=function(e){return y(e,0)},n.mapReverseU=w,n.mapReverse=function(e,n){return w(e,a.__1(n))},n.forEachU=E,n.forEach=function(e,n){E(e,a.__1(n))},n.forEachWithIndexU=k,n.forEachWithIndex=function(e,n){k(e,a.__2(n))},n.reduceU=x,n.reduce=function(e,n,t){return x(e,n,a.__2(t))},n.reduceWithIndexU=N,n.reduceWithIndex=function(e,n,t){return N(e,n,a.__3(t))},n.reduceReverseU=C,n.reduceReverse=function(e,n,t){return C(e,n,a.__2(t))},n.mapReverse2U=I,n.mapReverse2=function(e,n,t){return I(e,n,a.__2(t))},n.forEach2U=A,n.forEach2=function(e,n,t){A(e,n,a.__2(t))},n.reduce2U=T,n.reduce2=function(e,n,t,r){return T(e,n,t,a.__3(r))},n.reduceReverse2U=R,n.reduceReverse2=function(e,n,t,r){return R(e,n,t,a.__3(r))},n.everyU=D,n.every=function(e,n){return D(e,a.__1(n))},n.someU=F,n.some=function(e,n){return F(e,a.__1(n))},n.every2U=z,n.every2=function(e,n,t){return z(e,n,a.__2(t))},n.some2U=L,n.some2=function(e,n,t){return L(e,n,a.__2(t))},n.cmpByLength=function(e,n){for(;;){var t=e;if(!t)return n?-1:0;if(!n)return 1;n=n.tl,e=t.tl}},n.cmpU=U,n.cmp=function(e,n,t){return U(e,n,a.__2(t))},n.eqU=P,n.eq=function(e,n,t){return P(e,n,a.__2(t))},n.hasU=M,n.has=function(e,n,t){return M(e,n,a.__2(t))},n.getByU=$,n.getBy=function(e,n){return $(e,a.__1(n))},n.keepU=V,n.keep=q,n.filter=J,n.keepWithIndexU=H,n.keepWithIndex=Q,n.filterWithIndex=ee,n.keepMapU=K,n.keepMap=function(e,n){return K(e,a.__1(n))},n.partitionU=Y,n.partition=function(e,n){return Y(e,a.__1(n))},n.unzip=function(e){if(!e)return[0,0];var n=e.hd,t={hd:n[0],tl:0},r={hd:n[1],tl:0};return function(e,n,t){for(;;){var r=t,i=n,o=e;if(!o)return;var a=o.hd,u={hd:a[0],tl:0},l={hd:a[1],tl:0};i.tl=u,r.tl=l,t=l,n=u,e=o.tl}}(e.tl,t,r),[t,r]},n.getAssocU=j,n.getAssoc=function(e,n,t){return j(e,n,a.__2(t))},n.hasAssocU=B,n.hasAssoc=function(e,n,t){return B(e,n,a.__2(t))},n.removeAssocU=G,n.removeAssoc=function(e,n,t){return G(e,n,a.__2(t))},n.setAssocU=W,n.setAssoc=function(e,n,t,r){return W(e,n,t,a.__2(r))},n.sortU=X,n.sort=function(e,n){return X(e,a.__2(n))}},9896:(e,n,t)=>{var r=t(98),i=t(1008),o=t(1525),a=t(117);function u(e,n,t){if(void 0===e)return r.singleton(n,t);var i=o.valFromOption(e),a=i.k;if(n===a)return r.updateValue(i,t);var l=i.v;return n=t)return r;var u=c(r,n[a]);if(void 0===u)return u;i=a+1|0,r=o.valFromOption(u)}},n.set=u,n.updateU=l,n.update=function(e,n,t){return l(e,n,a.__1(t))},n.mergeU=$,n.merge=V,n.mergeMany=function(e,n){for(var t=n.length,r=e,i=0;i{var r=t(1525),i=t(117);function o(e,n){if(void 0!==e&&n(r.valFromOption(e)))return e}function a(e,n){if(void 0!==e)return n(r.valFromOption(e))}function u(e,n,t){return void 0!==e?t(r.valFromOption(e)):n}function l(e,n){if(void 0!==e)return r.some(n(r.valFromOption(e)))}function c(e,n){if(void 0!==e)return n(r.valFromOption(e))}function f(e,n,t){return void 0!==e?void 0!==n&&t(r.valFromOption(e),r.valFromOption(n)):void 0===n}function s(e,n,t){return void 0!==e?void 0!==n?t(r.valFromOption(e),r.valFromOption(n)):1:void 0!==n?-1:0}n.keepU=o,n.keep=function(e,n){return o(e,i.__1(n))},n.forEachU=a,n.forEach=function(e,n){a(e,i.__1(n))},n.getExn=function(e){if(void 0!==e)return r.valFromOption(e);throw{RE_EXN_ID:"Not_found",Error:new Error}},n.mapWithDefaultU=u,n.mapWithDefault=function(e,n,t){return u(e,n,i.__1(t))},n.mapU=l,n.map=function(e,n){return l(e,i.__1(n))},n.flatMapU=c,n.flatMap=function(e,n){return c(e,i.__1(n))},n.getWithDefault=function(e,n){return void 0!==e?r.valFromOption(e):n},n.orElse=function(e,n){return void 0!==e?e:n},n.isSome=function(e){return void 0!==e},n.isNone=function(e){return void 0===e},n.eqU=f,n.eq=function(e,n,t){return f(e,n,i.__2(t))},n.cmpU=s,n.cmp=function(e,n,t){return s(e,n,i.__2(t))}},4822:(e,n,t)=>{var r=t(2954),i=t(117);function o(e,n){var t=e.length;if(0===t||1===t)return t;var r=e[0],i=e[1];if(!n(r,i))return n(i,r)?0|-function(e,n,t,r,i){for(;;){var o=t,a=n;if(o>=r)return o;var u=e[o];if(!i(u,a))return o;t=o+1|0,n=u}}(e,i,2,t,n):1;for(var o=i,a=2;;){var u=a,l=o;if(u>=t)return u;var c=e[u];if(!n(l,c))return u;a=u+1|0,o=c}}function a(e,n){var t=e.length;if(0===t)return!0;for(var r=0,i=t-1|0;;){var o=r;if(o===i)return!0;if(n(e[o],e[o+1|0])>0)return!1;r=o+1|0}}function u(e,n,t,i,o,a,u,l,c){for(var f=n+t|0,s=o+a|0,d=n,v=e[n],_=o,p=i[o],h=l;;){var m=h,g=p,y=_,b=v,w=d;if(c(b,g)<=0){u[m]=b;var E=w+1|0;if(E>=f)return r.blitUnsafe(i,y,u,m+1|0,s-y|0);h=m+1|0,v=e[E],d=E}else{u[m]=g;var k=y+1|0;if(k>=s)return r.blitUnsafe(e,w,u,m+1|0,f-w|0);h=m+1|0,p=i[k],_=k}}}function l(e,n,t,i,o,a,u,l,c){for(var f=n+t|0,s=o+a|0,d=n,v=e[n],_=o,p=i[o],h=l;;){var m=h,g=p,y=_,b=v,w=d,E=c(b,g);if(E<0){u[m]=b;var k=w+1|0,x=m+1|0;if(k=c)return h;d=e[w],s=w}else if(0!==b){var E=m+1|0;if(E>=f)return h;_=r[E],v=E}else{a[h]=g;var k=y+1|0,x=m+1|0,S=h+1|0;if(!(k=f)return E;h=E,v=e[k],d=k}else if(0!==w){var x=g+1|0;if(!(x=r&&o(t[l],u)>0;)t[l+1|0]=t[l],l=l-1|0;t[l+1|0]=u}}function d(e,n,t,r,i,o){if(i<=5)return s(e,n,t,r,i,o);var a=i/2|0,l=i-a|0;d(e,n+a|0,t,r+a|0,l,o),d(e,n,e,n+l|0,a,o),u(e,n+l|0,a,t,r+a|0,l,t,r,o)}function v(e,n){var t=e.length;if(t<=5)return s(e,0,e,0,t,n);var r=t/2|0,i=t-r|0,o=new Array(i);d(e,r,o,0,i,n),d(e,0,e,i,r,n),u(e,i,r,o,0,i,e,0,n)}function _(e,n){var t=e.slice(0);return v(t,n),t}function p(e,n,t){var r=e.length;if(0===r)return-1;if(t(n,e[0])<0)return-1;if(t(n,e[r-1|0])>0)return 0|-(r+1|0);for(var i=0,o=r-1|0;;){var a=o,u=i,l=(u+a|0)/2|0,c=t(n,e[l]);if(0===c)return l;if(c<0){if(a===l)return 0===t(e[u],n)?u:0|-(a+1|0);o=l}else{if(u===l)return 0===t(e[a],n)?a:0|-(a+1|0);i=l}}}n.strictlySortedLengthU=o,n.strictlySortedLength=function(e,n){return o(e,i.__2(n))},n.isSortedU=a,n.isSorted=function(e,n){return a(e,i.__2(n))},n.stableSortInPlaceByU=v,n.stableSortInPlaceBy=function(e,n){v(e,i.__2(n))},n.stableSortByU=_,n.stableSortBy=function(e,n){return _(e,i.__2(n))},n.binarySearchByU=p,n.binarySearchBy=function(e,n,t){return p(e,n,i.__2(t))},n.unionU=l,n.union=function(e,n,t,r,o,a,u,c,f){return l(e,n,t,r,o,a,u,c,i.__2(f))},n.intersectU=c,n.intersect=function(e,n,t,r,o,a,u,l,f){return c(e,n,t,r,o,a,u,l,i.__2(f))},n.diffU=f,n.diff=function(e,n,t,r,o,a,u,l,c){return f(e,n,t,r,o,a,u,l,i.__2(c))}},98:(e,n,t)=>{var r=t(4822),i=t(1525),o=t(117);function a(e){return void 0!==e?i.valFromOption(e).h:0}function u(e,n,t,r){var i=a(e),o=a(r);return{k:n,v:t,h:i>=o?i+1|0:o+1|0,l:e,r}}function l(e,n){return{k:e,v:n,h:1,l:void 0,r:void 0}}function c(e,n){return void 0===n||void 0!==e&&e.h>=n.h}function f(e,n,t,r){var o=void 0!==e?i.valFromOption(e).h:0,l=void 0!==r?i.valFromOption(r).h:0;if(o>(l+2|0)){var c=e.l,f=e.r;if(a(c)>=a(f))return u(c,e.k,e.v,u(f,n,t,r));var s=i.valFromOption(f);return u(u(c,e.k,e.v,s.l),s.k,s.v,u(s.r,n,t,r))}if(l<=(o+2|0))return{k:n,v:t,h:o>=l?o+1|0:l+1|0,l:e,r};var d=i.valFromOption(r),v=d.l,_=d.r;if(a(_)>=a(v))return u(u(e,n,t,v),d.k,d.v,_);var p=i.valFromOption(v);return u(u(e,n,t,p.l),p.k,p.v,u(p.r,d.k,d.v,_))}function s(e){for(;;){var n=e,t=n.l;if(void 0===t)return n.k;e=i.valFromOption(t)}}function d(e){for(;;){var n=e,t=n.r;if(void 0===t)return n.k;e=i.valFromOption(t)}}function v(e){for(;;){var n=e,t=n.l;if(void 0===t)return[n.k,n.v];e=i.valFromOption(t)}}function _(e){for(;;){var n=e,t=n.r;if(void 0===t)return[n.k,n.v];e=i.valFromOption(t)}}function p(e,n,t){var r=e.l;return void 0!==r?f(p(i.valFromOption(r),n,t),e.k,e.v,e.r):(n.contents=e.k,t.contents=e.v,e.r)}function h(e,n){for(;;){var t=n,r=e;if(void 0===r)return t;var o=i.valFromOption(r);n={hd:o,tl:t},e=o.l}}function m(e,n){if(void 0!==e){var t=i.valFromOption(e),r=m(t.l,n);if(void 0!==r)return r;var o=t.k,a=t.v;if(n(o,a))return[o,a];var u=m(t.r,n);return void 0!==u?u:void 0}}function g(e,n){for(;;){var t=e;if(void 0===t)return;var r=i.valFromOption(t);g(r.l,n),n(r.k,r.v),e=r.r}}function y(e,n){if(void 0!==e){var t=i.valFromOption(e),r=y(t.l,n),o=n(t.v),a=y(t.r,n);return{k:t.k,v:o,h:t.h,l:r,r:a}}}function b(e,n){if(void 0!==e){var t=i.valFromOption(e),r=t.k,o=b(t.l,n),a=n(r,t.v),u=b(t.r,n);return{k:r,v:a,h:t.h,l:o,r:u}}}function w(e,n,t){for(;;){var r=n,o=e;if(void 0===o)return r;var a=i.valFromOption(o),u=a.k,l=a.v,c=a.l,f=a.r;n=t(w(c,r,t),u,l),e=f}}function E(e,n){for(;;){var t=e;if(void 0===t)return!0;var r=i.valFromOption(t);if(!n(r.k,r.v))return!1;if(!E(r.l,n))return!1;e=r.r}}function k(e,n){for(;;){var t=e;if(void 0===t)return!1;var r=i.valFromOption(t);if(n(r.k,r.v))return!0;if(k(r.l,n))return!0;e=r.r}}function x(e,n,t){if(void 0===e)return l(n,t);var r=i.valFromOption(e);return f(x(r.l,n,t),r.k,r.v,r.r)}function S(e,n,t){if(void 0===e)return l(n,t);var r=i.valFromOption(e);return f(r.l,r.k,r.v,S(r.r,n,t))}function C(e,n,t,r){if(void 0===e)return x(r,n,t);if(void 0===r)return S(e,n,t);var o=i.valFromOption(r),a=i.valFromOption(e),l=a.k,c=a.v,s=a.h,d=a.l,v=a.r,_=o.k,p=o.v,h=o.h,m=o.l,g=o.r;return s>(h+2|0)?f(d,l,c,C(v,n,t,r)):h>(s+2|0)?f(C(e,n,t,m),_,p,g):u(e,n,t,r)}function N(e,n){if(void 0===e)return n;if(void 0===n)return e;var t=i.valFromOption(n),r={contents:t.k},o={contents:t.v},a=p(t,r,o);return C(e,r.contents,o.contents,a)}function I(e,n){if(void 0!==e){var t=i.valFromOption(e),r=t.k,o=t.v,a=I(t.l,n),u=n(r,o),l=I(t.r,n);return u?C(a,r,o,l):N(a,l)}}function A(e,n){if(void 0!==e){var t=i.valFromOption(e),r=t.k,o=t.v,a=A(t.l,n),u=n(r,o),l=A(t.r,n);return void 0!==u?C(a,r,i.valFromOption(u),l):N(a,l)}}function T(e,n){if(void 0===e)return[void 0,void 0];var t=i.valFromOption(e),r=t.k,o=t.v,a=T(t.l,n),u=a[1],l=a[0],c=n(r,o),f=T(t.r,n),s=f[1],d=f[0];return c?[C(l,r,o,d),N(u,s)]:[N(l,d),C(u,r,o,s)]}function O(e){var n=e.l,t=e.r;return(1+(void 0!==n?O(i.valFromOption(n)):0)|0)+(void 0!==t?O(i.valFromOption(t)):0)|0}function R(e){return void 0!==e?O(e):0}function D(e,n){for(;;){var t=n,r=e;if(void 0===r)return t;var o=i.valFromOption(r),a=o.k,u=o.v,l=o.l;n={hd:[a,u],tl:D(o.r,t)},e=l}}function F(e,n,t){for(;;){var r=n,o=e,a=o.k,u=o.l,l=o.r,c=void 0!==u?F(i.valFromOption(u),r,t):r;t[c]=a;var f=c+1|0;if(void 0===l)return f;n=f,e=i.valFromOption(l)}}function z(e,n,t){for(;;){var r=n,o=e,a=o.l,u=o.r,l=void 0!==a?z(i.valFromOption(a),r,t):r;t[l]=o.v;var c=l+1|0;if(void 0===u)return c;n=c,e=i.valFromOption(u)}}function U(e,n,t){for(;;){var r=n,o=e,a=o.l,u=o.k,l=o.r,c=void 0!==a?U(i.valFromOption(a),r,t):r;t[c]=[u,o.v];var f=c+1|0;if(void 0===l)return f;n=f,e=i.valFromOption(l)}}function P(e,n,t){switch(t){case 0:return;case 1:var r=e[n];return l(r[0],r[1]);case 2:var i=e[n],o=e[n-1|0],a=i;return{k:o[0],v:o[1],h:2,l:l(a[0],a[1]),r:void 0};case 3:var c=e[n],f=e[n-1|0],s=e[n-2|0],d=f,v=c;return{k:d[0],v:d[1],h:2,l:l(v[0],v[1]),r:l(s[0],s[1])};default:var _=t/2|0,p=P(e,n,_),h=e[n-_|0],m=P(e,(n-_|0)-1|0,(t-_|0)-1|0);return u(p,h[0],h[1],m)}}function L(e,n,t){switch(t){case 0:return;case 1:var r=e[n];return l(r[0],r[1]);case 2:var i=e[n],o=e[n+1|0],a=i;return{k:o[0],v:o[1],h:2,l:l(a[0],a[1]),r:void 0};case 3:var c=e[n],f=e[n+1|0],s=e[n+2|0],d=f,v=c;return{k:d[0],v:d[1],h:2,l:l(v[0],v[1]),r:l(s[0],s[1])};default:var _=t/2|0,p=L(e,n,_),h=e[n+_|0],m=L(e,1+(n+_|0)|0,(t-_|0)-1|0);return u(p,h[0],h[1],m)}}function M(e,n,t,r){var i=R(e),o=R(n);if(i!==o)return io?r:o)+1|0;var u=a(t.l),l=e.h;return t.h=(u>l?u:l)+1|0,t}function G(e){var n=e.r,t=i.valFromOption(n);e.r=t.l,t.l=e;var r=a(e.l),o=a(e.r);e.h=(r>o?r:o)+1|0;var u=a(t.r),l=e.h;return t.h=(u>l?u:l)+1|0,t}function W(e){var n=a(e.l),t=a(e.r);return e.h=(n>t?n:t)+1|0,e}function X(e){var n,t,r,o=e.l,u=e.r,l=a(o),f=a(u);if(l>(2+f|0)){var s=i.valFromOption(o);return c(s.l,s.r)?W(B(e)):W((t=(n=e).l,r=G(i.valFromOption(t)),n.l=r,B(n)))}if(f>(2+l|0)){var d=i.valFromOption(u),v=d.l;return c(d.r,v)?W(G(e)):W(function(e){var n=e.r,t=B(i.valFromOption(n));return e.r=t,G(e)}(e))}return e.h=(l>f?l:f)+1|0,e}function $(e,n,t,r){if(void 0===e)return l(n,t);var o=i.valFromOption(e),a=r(n,o.k);if(0===a)return o.v=t,o;var u=o.l,c=o.r;if(a<0){var f=$(u,n,t,r);o.l=f}else o.r=$(c,n,t,r);return X(o)}n.copy=function e(n){if(void 0===n)return n;var t=i.valFromOption(n);return{k:t.k,v:t.v,h:t.h,l:e(t.l),r:e(t.r)}},n.create=u,n.bal=f,n.singleton=l,n.updateValue=function(e,n){return e.v===n?e:{k:e.k,v:n,h:e.h,l:e.l,r:e.r}},n.minKey=function(e){if(void 0!==e)return i.some(s(e))},n.minKeyUndefined=function(e){if(void 0!==e)return s(e)},n.maxKey=function(e){if(void 0!==e)return i.some(d(e))},n.maxKeyUndefined=function(e){if(void 0!==e)return d(e)},n.minimum=function(e){if(void 0!==e)return v(e)},n.minUndefined=function(e){if(void 0!==e)return v(e)},n.maximum=function(e){if(void 0!==e)return _(e)},n.maxUndefined=function(e){if(void 0!==e)return _(e)},n.removeMinAuxWithRef=p,n.isEmpty=function(e){return void 0===e},n.stackAllLeft=h,n.findFirstByU=m,n.findFirstBy=function(e,n){return m(e,o.__2(n))},n.forEachU=g,n.forEach=function(e,n){g(e,o.__2(n))},n.mapU=y,n.map=function(e,n){return y(e,o.__1(n))},n.mapWithKeyU=b,n.mapWithKey=function(e,n){return b(e,o.__2(n))},n.reduceU=w,n.reduce=function(e,n,t){return w(e,n,o.__3(t))},n.everyU=E,n.every=function(e,n){return E(e,o.__2(n))},n.someU=k,n.some=function(e,n){return k(e,o.__2(n))},n.join=C,n.concat=N,n.concatOrJoin=function(e,n,t,r){return void 0!==t?C(e,n,i.valFromOption(t),r):N(e,r)},n.keepSharedU=I,n.keepShared=function(e,n){return I(e,o.__2(n))},n.keepMapU=A,n.keepMap=function(e,n){return A(e,o.__2(n))},n.partitionSharedU=T,n.partitionShared=function(e,n){return T(e,o.__2(n))},n.lengthNode=O,n.size=R,n.toList=function(e){return D(e,0)},n.checkInvariantInternal=function e(n){for(;;){var t=n;if(void 0===t)return;var r=i.valFromOption(t),o=r.l,u=r.r,l=a(o)-a(u)|0;if(!(l<=2&&l>=-2))throw{RE_EXN_ID:"Assert_failure",_1:["jscomp/others/belt_internalAVLtree.ml",360,6],Error:new Error};e(o),n=u}},n.fillArray=U,n.toArray=function(e){if(void 0===e)return[];var n=O(e),t=new Array(n);return U(e,0,t),t},n.keysToArray=function(e){if(void 0===e)return[];var n=O(e),t=new Array(n);return F(e,0,t),t},n.valuesToArray=function(e){if(void 0===e)return[];var n=O(e),t=new Array(n);return z(e,0,t),t},n.fromSortedArrayAux=L,n.fromSortedArrayRevAux=P,n.fromSortedArrayUnsafe=function(e){return L(e,0,e.length)},n.cmpU=M,n.cmp=function(e,n,t,r){return M(e,n,t,o.__2(r))},n.eqU=j,n.eq=function(e,n,t,r){return j(e,n,t,o.__2(r))},n.get=function(e,n,t){for(;;){var r=e;if(void 0===r)return;var o=i.valFromOption(r),a=t(n,o.k);if(0===a)return i.some(o.v);e=a<0?o.l:o.r}},n.getUndefined=function(e,n,t){for(;;){var r=e;if(void 0===r)return;var o=i.valFromOption(r),a=t(n,o.k);if(0===a)return o.v;e=a<0?o.l:o.r}},n.getWithDefault=function(e,n,t,r){for(;;){var o=e;if(void 0===o)return t;var a=i.valFromOption(o),u=r(n,a.k);if(0===u)return a.v;e=u<0?a.l:a.r}},n.getExn=function(e,n,t){for(;;){var r=e;if(void 0===r)throw{RE_EXN_ID:"Not_found",Error:new Error};var o=i.valFromOption(r),a=t(n,o.k);if(0===a)return o.v;e=a<0?o.l:o.r}},n.has=function(e,n,t){for(;;){var r=e;if(void 0===r)return!1;var o=i.valFromOption(r),a=t(n,o.k);if(0===a)return!0;e=a<0?o.l:o.r}},n.fromArray=function(e,n){var t=e.length;if(0!==t){var i,o=r.strictlySortedLengthU(e,(function(e,t){return n(e[0],t[0])<0}));i=o>=0?L(e,0,o):P(e,(o=0|-o)-1|0,o);for(var a=o;a{var r=t(4822),i=t(98),o=t(406),a=t(1525),u=t(117);function l(e,n){var t=n.k,r=n.v,o=n.l,u=n.r;if(e===t)return[o,a.some(r),u];if(e=(void 0!==n?n.h:0)){var o=r.k,u=r.v,l=r.l,s=r.r,d=c(o,n);return i.concatOrJoin(f(l,d[0],t),o,t(o,a.some(u),d[1]),f(s,d[2],t))}}else if(void 0===n)return;var v=a.valFromOption(n),_=v.k,p=v.v,h=v.l,m=v.r,g=c(_,e);return i.concatOrJoin(f(g[0],h,t),_,t(_,g[1],a.some(p)),f(g[2],m,t))}function s(e,n,t){for(;;){var r=n,a=e;if(!a)return 0;if(!r)return 0;var u=r.hd,l=a.hd,c=o.caml_string_compare(l.k,u.k);if(0!==c)return c;var f=t(l.v,u.v);if(0!==f)return f;n=i.stackAllLeft(u.r,r.tl),e=i.stackAllLeft(l.r,a.tl)}}function d(e,n,t){var r=i.size(e),o=i.size(n);return r===o?s(i.stackAllLeft(e,0),i.stackAllLeft(n,0),t):r=0?t=i.fromSortedArrayAux(e,0,o):(o=0|-o,t=i.fromSortedArrayRevAux(e,o-1|0,o));for(var a=o;a{function t(e,n){return e[1]===n[1]&&e[0]===n[0]}function r(e,n){var t=n[0],r=e[0];return r>t||!(r=n[1]}function i(e,n){return e[0]>n[0]||!(e[0]n[1]}n.caml_int_compare=function(e,n){return en||e==e?1:n==n?-1:0},n.caml_string_compare=function(e,n){return e===n?0:en?e:n},n.caml_float_max=function(e,n){return e>n?e:n},n.caml_string_max=function(e,n){return e>n?e:n},n.caml_int32_max=function(e,n){return e>n?e:n},n.i64_eq=t,n.i64_neq=function(e,n){return!t(e,n)},n.i64_lt=function(e,n){return!r(e,n)},n.i64_gt=i,n.i64_le=function(e,n){return!i(e,n)},n.i64_ge=r,n.i64_min=function(e,n){return r(e,n)?n:e},n.i64_max=function(e,n){return i(e,n)?e:n}},6448:(e,n)=>{n.dup=function(e){return e.slice(0)},n.sub=function(e,n,t){for(var r=new Array(t),i=0,o=n;i=0;--a)t[a+r|0]=e[a+n|0]},n.get=function(e,n){if(n<0||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};return e[n]},n.set=function(e,n,t){if(n<0||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};e[n]=t}},5076:(e,n,t)=>{var r=t(3026);function i(e,n,t,r,i){for(;;){var o=t;if(o>=r)return i;var a=e[o],u=n[o];if(a>u)return 1;if(a>>8,i=255&t;e[n]=i,e[n+1|0]=r}function l(e,n,t){var r=255&t>>>24,i=255&t>>>16,o=255&t>>>8,a=255&t;e[n]=a,e[n+1|0]=o,e[n+2|0]=i,e[n+3|0]=r}function c(e,n,t){var i=255&(0|r.lsr_(t,56)[1]),o=255&(0|r.lsr_(t,48)[1]),a=255&(0|r.lsr_(t,40)[1]),u=255&(0|r.lsr_(t,32)[1]),l=255&(0|r.lsr_(t,24)[1]),c=255&(0|r.lsr_(t,16)[1]),f=255&(0|r.lsr_(t,8)[1]),s=255&(0|t[1]);e[n]=s,e[n+1|0]=f,e[n+2|0]=c,e[n+3|0]=l,e[n+4|0]=u,e[n+5|0]=a,e[n+6|0]=o,e[n+7|0]=i}n.caml_create_bytes=function(e){if(e<0)throw{RE_EXN_ID:"Invalid_argument",_1:"String.create",Error:new Error};for(var n=new Array(e),t=0;t=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};return e[n]},n.set=function(e,n,t){if(n<0||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};e[n]=t},n.bytes_to_string=function(e){var n=e.length,t="",r=n;if(n<=4096&&n===e.length)return String.fromCharCode.apply(null,e);for(var i=0;r>0;){for(var o=r<1024?r:1024,a=new Array(o),u=0;uf?f:c;s>=0;--s)e[r+s|0]=e[n+s|0];return}if(n<=r)return;for(var d=(e.length-n|0)-1|0,v=i-1|0,_=d>v?v:d,p=0;p<=_;++p)e[r+p|0]=e[n+p|0]}},n.caml_blit_string=function(e,n,t,r,i){if(!(i<=0)){var o=e.length-n|0;if(i<=o)for(var a=0;a0},n.caml_bytes_greaterequal=function(e,n){return o(e,n)>=0},n.caml_bytes_lessthan=function(e,n){return o(e,n)<0},n.caml_bytes_lessequal=function(e,n){return o(e,n)<=0},n.caml_bytes_equal=function(e,n){var t=e.length;if(t!==n.length)return!1;for(var r=0;;){var i=r;if(i===t)return!0;if(e[i]!==n[i])return!1;r=i+1|0}},n.bswap16=function(e){return(255&e)<<8|(65280&e)>>>8},n.bswap32=function(e){return(255&e)<<24|(65280&e)<<8|(16711680&e)>>>8|(-16777216&e)>>>24},n.bswap64=function(e){return r.or_(r.or_(r.or_(r.or_(r.or_(r.or_(r.or_(r.lsl_(r.and_(e,[0,255]),56),r.lsl_(r.and_(e,[0,65280]),40)),r.lsl_(r.and_(e,[0,16711680]),24)),r.lsl_(r.and_(e,[0,4278190080]),8)),r.lsr_(r.and_(e,[255,0]),8)),r.lsr_(r.and_(e,[65280,0]),24)),r.lsr_(r.and_(e,[16711680,0]),40)),r.lsr_(r.and_(e,[-16777216,0]),56))},n.get16u=a,n.get16=function(e,n){if(n<0||(n+1|0)>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};return a(e,n)},n.get32=function(e,n){if(n<0||(n+3|0)>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};var t=e[n],r=e[n+1|0],i=e[n+2|0];return e[n+3|0]<<24|i<<16|r<<8|t},n.get64=function(e,n){if(n<0||(n+7|0)>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};var t=e[n],i=e[n+1|0],o=e[n+2|0],a=e[n+3|0],u=e[n+4|0],l=e[n+5|0],c=e[n+6|0],f=e[n+7|0];return r.or_(r.lsl_(r.or_(r.lsl_(r.or_(r.lsl_(r.or_(r.lsl_(r.or_(r.lsl_(r.or_(r.lsl_(r.or_(r.lsl_(r.of_int32(f),56),r.of_int32(c)),48),r.of_int32(l)),40),r.of_int32(u)),32),r.of_int32(a)),24),r.of_int32(o)),16),r.of_int32(i)),8),r.of_int32(t))},n.set16u=u,n.set16=function(e,n,t){if(n<0||(n+1|0)>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};u(e,n,t)},n.set32u=l,n.set32=function(e,n,t){if(n<0||(n+3|0)>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};l(e,n,t)},n.set64u=c,n.set64=function(e,n,t){if(n<0||(n+7|0)>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};c(e,n,t)}},8580:(e,n)=>{var t={contents:0};n.id=t,n.create=function(e){return t.contents=t.contents+1|0,e+"/"+t.contents},n.caml_is_extension=function(e){return null!=e&&"string"==typeof e.RE_EXN_ID},n.caml_exn_slot_name=function(e){return e.RE_EXN_ID},n.caml_exn_slot_id=function(e){if(null!=e.RE_EXN_ID){var n=e.RE_EXN_ID.split("/");return n.length>1?Number(n[n.length-1]):-1}return-1}},2173:(e,n,t)=>{var r=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t.g)return t.g;if(void 0!==this)return this;throw new Error("Unable to locate global `this`")};n.getGlobalThis=r,n.resolve=function(e){var n=r();if(void 0===n[e])throw new Error(e+" not polyfilled by Melange yet\n");return n[e]},n.register=function(e,n){return r()[e]=n,0}},6604:(e,n,t)=>{var r=t(406),i=t(3026),o=t(3026);function a(e){return e>=65?e>=97?e>=123?-1:e-87|0:e>=91?-1:e-55|0:e>57||e<48?-1:e-48|0}function u(e){switch(e){case 0:return 8;case 1:return 16;case 2:return 10;case 3:return 2}}function l(e){var n=1,t=2,r=0;switch(e.charCodeAt(r)){case 43:r=r+1|0;break;case 44:break;case 45:n=-1,r=r+1|0}if("0"===e[r]){var i=e.charCodeAt(r+1|0);if(i>=89)if(i>=111){if(i<121)switch(i){case 111:t=0,r=r+2|0;break;case 117:r=r+2|0;break;case 112:case 113:case 114:case 115:case 116:case 118:case 119:break;case 120:t=1,r=r+2|0}}else 98===i&&(t=3,r=r+2|0);else if(66!==i){if(i>=79)switch(i){case 79:t=0,r=r+2|0;break;case 85:r=r+2|0;break;case 80:case 81:case 82:case 83:case 84:case 86:case 87:break;case 88:t=1,r=r+2|0}}else t=3,r=r+2|0}return[r,n,t]}function c(e){var n=l(e),t=n[0],r=u(n[2]),i=e.length,o=a(t=r)throw{RE_EXN_ID:"Failure",_1:"int_of_string",Error:new Error};var c=n[1]*function(n,t){for(;;){var o=t,u=n;if(o===i)return u;var l=e.charCodeAt(o);if(95!==l){var c=a(l);if(c<0||c>=r)throw{RE_EXN_ID:"Failure",_1:"int_of_string",Error:new Error};var f=r*u+c;if(f>4294967295)throw{RE_EXN_ID:"Failure",_1:"int_of_string",Error:new Error};t=o+1|0,n=f}else t=o+1|0}}(o,t+1|0),f=0|c;if(10===r&&c!==f)throw{RE_EXN_ID:"Failure",_1:"int_of_string",Error:new Error};return f}function f(e){return e>=65&&e<=90||e>=192&&e<=214||e>=216&&e<=222?e+32|0:e}function s(e){var n=e.length;if(n>31)throw{RE_EXN_ID:"Invalid_argument",_1:"format_int: format too long",Error:new Error};for(var t={justify:"+",signstyle:"-",filter:" ",alternate:!1,base:2,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:"f"},r=0;;){var i=r;if(i>=n)return t;var o=e.charCodeAt(i),a=0;if(o>=69)if(o>=88)if(o>=121)a=1;else switch(o){case 88:t.base=1,t.uppercase=!0,r=i+1|0;continue;case 101:case 102:case 103:a=5;break;case 100:case 105:a=4;break;case 111:t.base=0,r=i+1|0;continue;case 117:t.base=2,r=i+1|0;continue;case 89:case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:case 98:case 99:case 104:case 106:case 107:case 108:case 109:case 110:case 112:case 113:case 114:case 115:case 116:case 118:case 119:a=1;break;case 120:t.base=1,r=i+1|0;continue}else{if(!(o>=72)){t.signedconv=!0,t.uppercase=!0,t.conv=String.fromCharCode(f(o)),r=i+1|0;continue}a=1}else switch(o){case 35:t.alternate=!0,r=i+1|0;continue;case 32:case 43:a=2;break;case 45:t.justify="-",r=i+1|0;continue;case 46:t.prec=0;for(var u=i+1|0;function(n){return function(){var t=e.charCodeAt(n)-48|0;return t>=0&&t<=9}}(u)();)t.prec=(Math.imul(t.prec,10)+e.charCodeAt(u)|0)-48|0,u=u+1|0;r=u;continue;case 33:case 34:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 44:case 47:default:a=1;break;case 48:t.filter="0",r=i+1|0;continue;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:a=3}switch(a){case 1:r=i+1|0;continue;case 2:t.signstyle=String.fromCharCode(o),r=i+1|0;continue;case 3:t.width=0;for(var l=i;function(n){return function(){var t=e.charCodeAt(n)-48|0;return t>=0&&t<=9}}(l)();)t.width=(Math.imul(t.width,10)+e.charCodeAt(l)|0)-48|0,l=l+1|0;r=l;continue;case 4:t.signedconv=!0,t.base=2,r=i+1|0;continue;case 5:t.signedconv=!0,t.conv=String.fromCharCode(o),r=i+1|0;continue}}}function d(e,n){var t=e.justify,r=e.signstyle,i=e.filter,o=e.alternate,a=e.base,u=e.signedconv,l=e.width,c=e.uppercase,f=e.sign,s=n.length;u&&(f<0||"-"!==r)&&(s=s+1|0),o&&(0===a?s=s+1|0:1===a&&(s=s+2|0));var d="";if("+"===t&&" "===i)for(var v=s;v>>0):n>>>0:n).toString(function(e){switch(e){case 0:return 8;case 1:return 16;case 2:return 10}}(t.base));if(t.prec>=0){t.filter=" ";var i=t.prec-r.length|0;i>0&&(r="0".repeat(i)+r)}return d(t,r)}var _=v,p=v,h=c,m=c;n.caml_format_float=function(e,n){var t=s(e),r=t.prec<0?6:t.prec,i=n<0?(t.sign=-1,-n):n,o="";if(isNaN(i))o="nan",t.filter=" ";else if(isFinite(i))switch(t.conv){case"e":var a=(o=i.toExponential(r)).length;"e"===o[a-3|0]&&(o=o.slice(0,a-1|0)+"0"+o.slice(a-1|0));break;case"f":o=i.toFixed(r);break;case"g":var u=0!==r?r:1,l=(o=i.toExponential(u-1|0)).indexOf("e"),c=0|Number(o.slice(l+1|0));if(c<-4||i>=1e21||i.toFixed().length>u){for(var f=l-1|0;"0"===o[f];)f=f-1|0;"."===o[f]&&(f=f-1|0);var v=(o=o.slice(0,f+1|0)+o.slice(l)).length;"e"===o[v-3|0]&&(o=o.slice(0,v-1|0)+"0"+o.slice(v-1|0))}else{var _=u;if(c<0)_=_-(c+1|0)|0,o=i.toFixed(_);else for(;(o=i.toFixed(_)).length>(u+1|0);)_=_-1|0;if(0!==_){for(var p=o.length-1|0;"0"===o[p];)p=p-1|0;"."===o[p]&&(p=p-1|0),o=o.slice(0,p+1|0)}}}else o="inf",t.filter=" ";return d(t,o)},n.caml_hexstring_of_float=function(e,n,t){if(!isFinite(e))return isNaN(e)?"nan":e>0?"infinity":"-infinity";var r=0==e&&1/e==-1/0?1:e>=0?0:1;r&&(e=-e);var i=0;if(0==e);else if(e<1)for(;e<1&&i>-1022;)e*=2,i--;else for(;e>=2;)e/=2,i++;var o=i<0?"":"+",a="";if(r)a="-";else switch(t){case 43:a="+";break;case 32:a=" "}if(n>=0&&n<13){var u=Math.pow(2,4*n);e=Math.round(e*u)/u}var l=e.toString(16);if(n>=0){var c=l.indexOf(".");if(c<0)l+="."+"0".repeat(n);else{var f=c+1+n;l.length0&&t==t)return t;if(t=+(e=e.replace(/_/g,"")),e.length>0&&t==t||/^[+-]?nan$/i.test(e))return t;var r=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)p([+-]?[0-9]+)/i.exec(e);if(r){var i=r[3].replace(/0+$/,""),o=parseInt(r[1]+r[2]+i,16),a=(0|r[4])-4*i.length;return o*Math.pow(2,a)}if(/^\+?inf(inity)?$/i.test(e))return 1/0;if(/^-inf(inity)?$/i.test(e))return-1/0;throw n}(e,{RE_EXN_ID:"Failure",_1:"float_of_string"})},n.caml_int64_format=function(e,n){if("%d"===e)return o.to_string(n);var t,a,u=s(e),l=u.signedconv&&r.i64_lt(n,i.zero)?(u.sign=-1,i.neg(n)):n;switch(u.base){case 0:t=function(e){var n="",t=[0,8],a="01234567";if(r.i64_lt(e,i.zero)){var u=o.discard_sign(e),l=o.div_mod(u,t),c=i.add([268435456,0],l[0]),f=l[1];for(n=a[i.to_int32(f)]+n;r.i64_neq(c,i.zero);){var s=o.div_mod(c,t);c=s[0],f=s[1],n=a[i.to_int32(f)]+n}}else{var d=o.div_mod(e,t),v=d[0],_=d[1];for(n=a[i.to_int32(_)]+n;r.i64_neq(v,i.zero);){var p=o.div_mod(v,t);v=p[0],_=p[1],n=a[i.to_int32(_)]+n}}return n}(l);break;case 1:t=o.to_hex(l);break;case 2:t=function(e){if(!r.i64_lt(e,i.zero))return o.to_string(e);var n=[0,10],t=o.discard_sign(e),a=o.div_mod(t,n),u=o.div_mod(i.add([0,8],a[1]),n),l=i.add(i.add([214748364,3435973836],a[0]),u[0]);return o.to_string(l)+"0123456789"[i.to_int32(u[1])]}(l)}if(u.prec>=0){u.filter=" ";var c=u.prec-t.length|0;a=c>0?"0".repeat(c)+t:t}else a=t;return d(u,a)},n.caml_int_of_string=c,n.caml_int32_of_string=h,n.caml_int64_of_string=function(e){var n,t=l(e),o=t[2],c=t[0],f=i.of_int32(u(o)),s=i.of_int32(t[1]);switch(o){case 0:n=[536870911,4294967295];break;case 1:n=[268435455,4294967295];break;case 2:n=[429496729,2576980377];break;case 3:n=i.max_int}var d=e.length,v=c{var r=t(1010);function i(e,n){var t={content:n,next:void 0},r=e.last;void 0!==r?(e.length=e.length+1|0,r.next=t,e.last=t):(e.length=1,e.first=t,e.last=t)}n.caml_hash=function(e,n,t,o){var a=t;if("number"==typeof o){var u=0|o;return a=r.caml_hash_mix_int(a,1+(u+u|0)|0),r.caml_hash_final_mix(a)}if("string"==typeof o)return a=r.caml_hash_mix_string(a,o),r.caml_hash_final_mix(a);var l,c,f,s={length:0,first:void 0,last:void 0},d=e;for(i(s,o),d=d-1|0;0!==s.length&&d>0;){var v=(void 0,void 0,void 0===(f=(c=(l=s).first).next)?(l.length=0,l.first=void 0,l.last=void 0):(l.length=l.length-1|0,l.first=f),c.content);if("number"==typeof v){var _=0|v;a=r.caml_hash_mix_int(a,1+(_+_|0)|0),d=d-1|0}else if("string"==typeof v)a=r.caml_hash_mix_string(a,v),d=d-1|0;else if("boolean"==typeof v){var p=v?1:0;a=r.caml_hash_mix_int(a,1+(p+p|0)|0),d=d-1|0}else if(void 0!==v&&"symbol"!=typeof v&&"function"!=typeof v){var h=0|v.length;if(0!==h){var m=0|v.TAG,g=h<<10|m;if(248===m)a=r.caml_hash_mix_int(a,v[1]);else{a=r.caml_hash_mix_int(a,g);for(var y=h-1|0,b=y{function t(e,n){return e<>>(32-n|0)|0}function r(e,n){var r=n;r=t(r=Math.imul(r,-862048943),15);var i=e^(r=Math.imul(r,461845907));return((i=t(i,13))+(i<<2)|0)-430675100|0}n.caml_hash_mix_int=r,n.caml_hash_mix_string=function(e,n){for(var t=n.length,i=(t/4|0)-1|0,o=e,a=0;a<=i;++a){var u=a<<2;o=r(o,n.charCodeAt(u)|n.charCodeAt(u+1|0)<<8|n.charCodeAt(u+2|0)<<16|n.charCodeAt(u+3|0)<<24)}var l=3&t;return 0!==l&&(o=r(o,3===l?n.charCodeAt(t-1|0)<<16|n.charCodeAt(t-2|0)<<8|n.charCodeAt(t-3|0):2===l?n.charCodeAt(t-1|0)<<8|n.charCodeAt(t-2|0):n.charCodeAt(t-1|0))),o^t},n.caml_hash_final_mix=function(e){var n=e^e>>>16;return n=Math.imul(n,-2048144789),n^=n>>>13,(n=Math.imul(n,-1028477387))^n>>>16}},3026:(e,n,t)=>{var r=t(406),i=[-2147483648,0],o=[2147483647,4294967295],a=[0,1],u=[0,0],l=[-1,4294967295];function c(e){return 0!=(-2147483648&e)}function f(e){return 0==(-2147483648&e)}function s(e){var n=1+(-1^e[1])|0;return[(-1^e[0])+(0===n?1:0)|0,n>>>0]}function d(e,n,t){var r=e[1],i=r+n|0,o=c(r)&&(c(n)||f(i))||c(n)&&f(i)?1:0;return[e[0]+t+o|0,i>>>0]}function v(e,n){return d(e,n[1],n[0])}function _(e,n,t){var r=1+(-1^n)>>>0;return d(e,r,(-1^t)+(0===r?1:0)|0)}function p(e,n){return _(e,n[1],n[0])}function h(e,n){if(0===n)return e;var t=e[1];return n>=32?[t<<(n-32|0),0]:[t>>>(32-n|0)|e[0]<>>0]}function m(e,n){if(0===n)return e;var t=e[0];return n<32?[t>>n,(t<<(32-n|0)|e[1]>>>n)>>>0]:[t>=0?0:-1,t>>(n-32|0)>>>0]}function g(e){return 0===e[0]&&0===e[1]}function y(e,n){for(;;){var t,r=n,o=e,a=o[0],l=0,c=0,f=0;if(0!==a)f=4;else{if(0===o[1])return u;f=4}if(4===f)if(0!==r[0])c=3;else{if(0===r[1])return u;c=3}if(3===c&&(-2147483648!==a||0!==o[1]?l=2:t=r[1]),2===l){var d=r[0],v=o[1],_=0;if(-2147483648!==d||0!==r[1]?_=3:t=v,3===_){var p=r[1];if(a<0){if(d>=0)return s(y(s(o),r));n=s(r),e=s(o);continue}if(d<0)return s(y(o,s(r)));var h=65535&a,m=v>>>16,g=65535&v,b=65535&d,w=p>>>16,E=65535&p,k=0,x=0,S=0,C=g*E;return k=(x=(x=(S=(C>>>16)+m*E)>>>16)+((S=(65535&S)+g*w)>>>16)+h*E)>>>16,k+=(x=(65535&x)+m*w)>>>16,k+=(x=(65535&x)+g*b)>>>16,[(x&=65535)|(k=k+((a>>>16)*E+h*w+m*b+g*(d>>>16))&65535)<<16,(65535&C|(65535&S)<<16)>>>0]}}return 0==(1&t)?u:i}}function b(e){return 4294967296*e[0]+e[1]}function w(e){return isNaN(e)||!isFinite(e)?u:e<=-0x8000000000000000?i:e+1>=0x8000000000000000?o:e<0?s(w(-e)):[e/4294967296|0,(e%4294967296|0)>>>0]}function E(e,n){for(;;){var t=n,o=e;if(0===t[0]&&0===t[1])throw{RE_EXN_ID:"Division_by_zero",Error:new Error};var c=o[0],f=0;if(-2147483648!==c)if(0!==c)f=2;else{if(0===o[1])return u;f=2}else if(0!==o[1])f=2;else{if(r.i64_eq(t,a)||r.i64_eq(t,l))return o;if(r.i64_eq(t,i))return a;var d=h(E(m(o,1),t),1),_=0;if(0!==d[0])_=3;else{if(0===d[1])return t[0]<0?a:s(a);_=3}if(3===_)return v(d,E(p(o,y(t,d)),t))}if(2===f){var k=t[0],x=0;if(-2147483648!==k)x=3;else{if(0===t[1])return u;x=3}if(3===x){if(c<0){if(k>=0)return s(E(s(o),t));n=s(t),e=s(o);continue}if(k<0)return s(E(o,s(t)));for(var S=u,C=o;r.i64_ge(C,t);){for(var N=Math.floor(b(C)/b(t)),I=1>N?1:N,A=Math.ceil(Math.log(I)/Math.LN2),T=A<=48?1:Math.pow(2,A-48),O=w(I),R=y(O,t);R[0]<0||r.i64_gt(R,C);)R=y(O=w(I-=T),t);g(O)&&(O=a),S=v(S,O),C=p(C,R)}return S}}}}n.mk=function(e,n){return[n,e>>>0]},n.succ=function(e){var n=e[1]+1|0;return[e[0]+(0===n?1:0)|0,n>>>0]},n.min_int=i,n.max_int=o,n.one=a,n.zero=u,n.neg_one=l,n.of_int32=function(e){return[e<0?-1:0,e>>>0]},n.to_int32=function(e){return 0|e[1]},n.add=v,n.neg=s,n.sub=p,n.lsl_=h,n.lsr_=function(e,n){if(0===n)return e;var t=e[0],r=n-32|0;return 0===r?[0,t>>>0]:r>0?[0,t>>>r]:[t>>>n,(t<<(0|-r)|e[1]>>>n)>>>0]},n.asr_=m,n.is_zero=g,n.mul=y,n.xor=function(e,n){return[e[0]^n[0],(e[1]^n[1])>>>0]},n.or_=function(e,n){return[e[0]|n[0],(e[1]|n[1])>>>0]},n.and_=function(e,n){return[e[0]&n[0],(e[1]&n[1])>>>0]},n.equal_null=function(e,n){return null!==n&&r.i64_eq(e,n)},n.equal_undefined=function(e,n){return void 0!==n&&r.i64_eq(e,n)},n.equal_nullable=function(e,n){return null!=n&&r.i64_eq(e,n)},n.to_float=b,n.of_float=w,n.div=E,n.mod_=function(e,n){return p(e,y(E(e,n),n))},n.compare=function(e,n){var t=n[0],r=e[0],i=r>>0]},n.div_mod=function(e,n){var t=E(e,n);return[t,p(e,y(t,n))]},n.to_hex=function(e){var n=e[1],t=e[0],r=function(e){return(e>>>0).toString(16)};if(0===t&&0===n)return"0";if(0===n)return r(t)+"00000000";if(0===t)return r(n);var i=r(n),o=8-i.length|0;return o<=0?r(t)+i:r(t)+("0".repeat(o)+i)},n.discard_sign=function(e){return[2147483647&e[0],e[1]]},n.to_string=function e(n){if(function(e){var n=e[0],t=n>>21;return 0===t||-1===t&&!(0===e[1]&&-2097152===n)}(n))return String(b(n));if(n[0]<0)return r.i64_eq(n,i)?"-9223372036854775808":"-"+e(s(n));var t=w(Math.floor(b(n)/10)),o=t[1],a=t[0],u=_(_(n,o<<3,o>>>29|a<<3),o<<1,o>>>31|a<<1),l=u[1],c=u[0];if(0===l&&0===c)return e(t)+"0";if(c<0){var f=1+(-1^l)>>>0,v=Math.ceil(f/10),p=10*v-f;return e(_(t,0|v,0))+String(0|p)}var h=Math.floor(l/10),m=l-10*h;return e(d(t,0|h,0))+String(0|m)}},9448:(e,n)=>{var t={buffer:"",output:function(e,n){var t=n.length-1|0;return"undefined"!=typeof process&&process.stdout&&process.stdout.write?process.stdout.write(n):void("\n"===n[t]?console.log(n.slice(0,t)):console.log(n))}},r={buffer:"",output:function(e,n){var t=n.length-1|0;"\n"===n[t]?console.log(n.slice(0,t)):console.log(n)}};function i(e){if(""!==e.buffer)return e.output(e,e.buffer),void(e.buffer="")}function o(e,n,r,o){var a=0===r&&o===n.length?n:n.slice(r,o);if("undefined"!=typeof process&&process.stdout&&process.stdout.write&&e===t)return process.stdout.write(a);var u=a.lastIndexOf("\n");u<0?e.buffer=e.buffer+a:(e.buffer=e.buffer+a.slice(0,u+1|0),i(e),e.buffer=e.buffer+a.slice(u+1|0))}n.stdin=void 0,n.stdout=t,n.stderr=r,n.caml_ml_flush=i,n.caml_ml_output=o,n.caml_ml_output_char=function(e,n){o(e,String.fromCharCode(n),0,1)},n.caml_ml_out_channels_list=function(e){return{hd:t,tl:{hd:r,tl:0}}}},8420:(e,n,t)=>{var r=t(8580),i=t(1525),o=t(8580),a=r.create("Js__Caml_js_exceptions.Error");n.$$Error=a,n.internalToOCamlException=function(e){return o.caml_is_extension(e)?e:{RE_EXN_ID:a,_1:e}},n.caml_as_js_exn=function(e){if(e.RE_EXN_ID===a)return i.some(e._1)}},1525:(e,n)=>{function t(e){return void 0===e?{BS_PRIVATE_NESTED_SOME_NONE:0}:null!==e&&void 0!==e.BS_PRIVATE_NESTED_SOME_NONE?{BS_PRIVATE_NESTED_SOME_NONE:e.BS_PRIVATE_NESTED_SOME_NONE+1|0}:e}function r(e){if(null===e||void 0===e.BS_PRIVATE_NESTED_SOME_NONE)return e;var n=e.BS_PRIVATE_NESTED_SOME_NONE;return 0===n?void 0:{BS_PRIVATE_NESTED_SOME_NONE:n-1|0}}n.nullable_to_opt=function(e){return null==e?void 0:t(e)},n.undefined_to_opt=function(e){return void 0===e?void 0:t(e)},n.null_to_opt=function(e){return null===e?void 0:t(e)},n.valFromOption=r,n.some=t,n.isNested=function(e){return void 0!==e.BS_PRIVATE_NESTED_SOME_NONE},n.option_get=function(e){return void 0===e?void 0:r(e)},n.option_unwrap=function(e){return void 0!==e?e.VAL:e}},7133:(e,n)=>{n.get=function(e,n){if(n>=e.length||n<0)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};return e.charCodeAt(n)},n.make=function(e,n){return String.fromCharCode(n).repeat(e)}},9378:(e,n)=>{n.caml_sys_getenv=function(e){if("undefined"==typeof process||void 0===process.env)throw{RE_EXN_ID:"Not_found",Error:new Error};var n=process.env[e];if(void 0!==n)return n;throw{RE_EXN_ID:"Not_found",Error:new Error}},n.caml_sys_time=function(e){return"undefined"==typeof process||void 0===process.uptime?-1:process.uptime()},n.os_type=function(e){return"undefined"!=typeof process&&"win32"===process.platform?"Win32":"Unix"},n.caml_sys_system_command=function(e){return 127},n.caml_sys_getcwd=function(e){return"undefined"==typeof process||void 0===process.cwd?"/":process.cwd()},n.caml_sys_executable_name=function(e){if("undefined"==typeof process)return"";var n=process.argv;return null==n?"":n[0]},n.caml_sys_argv=function(e){if("undefined"==typeof process)return[""];var n=process.argv;return null==n?[""]:n},n.caml_sys_exit=function(e){if("undefined"!=typeof process)return process.exit(e)},n.caml_sys_is_directory=function(e){throw{RE_EXN_ID:"Failure",_1:"caml_sys_is_directory not implemented",Error:new Error}},n.caml_sys_file_exists=function(e){throw{RE_EXN_ID:"Failure",_1:"caml_sys_file_exists not implemented",Error:new Error}}},117:(e,n,t)=>{var r=t(6448);function i(e,n){for(;;){var t=n,o=e,a=o.length,u=0===a?1:a,l=u-t.length|0;if(0===l)return o.apply(null,t);if(l>=0)return function(e,n){return function(t){return i(e,n.concat([t]))}}(o,t);n=r.sub(t,u,0|-l),e=o.apply(null,r.sub(t,0,u))}}function o(e,n){var t=e.length;if(1===t)return e(n);switch(t){case 1:return e(n);case 2:return function(t){return e(n,t)};case 3:return function(t,r){return e(n,t,r)};case 4:return function(t,r,i){return e(n,t,r,i)};case 5:return function(t,r,i,o){return e(n,t,r,i,o)};case 6:return function(t,r,i,o,a){return e(n,t,r,i,o,a)};case 7:return function(t,r,i,o,a,u){return e(n,t,r,i,o,a,u)};default:return i(e,[n])}}function a(e,n,t){var r=e.length;if(2===r)return e(n,t);switch(r){case 1:return i(e(n),[t]);case 2:return e(n,t);case 3:return function(r){return e(n,t,r)};case 4:return function(r,i){return e(n,t,r,i)};case 5:return function(r,i,o){return e(n,t,r,i,o)};case 6:return function(r,i,o,a){return e(n,t,r,i,o,a)};case 7:return function(r,i,o,a,u){return e(n,t,r,i,o,a,u)};default:return i(e,[n,t])}}function u(e,n,t,r){var o=e.length;if(3===o)return e(n,t,r);switch(o){case 1:return i(e(n),[t,r]);case 2:return i(e(n,t),[r]);case 3:return e(n,t,r);case 4:return function(i){return e(n,t,r,i)};case 5:return function(i,o){return e(n,t,r,i,o)};case 6:return function(i,o,a){return e(n,t,r,i,o,a)};case 7:return function(i,o,a,u){return e(n,t,r,i,o,a,u)};default:return i(e,[n,t,r])}}function l(e,n,t,r,o){var a=e.length;if(4===a)return e(n,t,r,o);switch(a){case 1:return i(e(n),[t,r,o]);case 2:return i(e(n,t),[r,o]);case 3:return i(e(n,t,r),[o]);case 4:return e(n,t,r,o);case 5:return function(i){return e(n,t,r,o,i)};case 6:return function(i,a){return e(n,t,r,o,i,a)};case 7:return function(i,a,u){return e(n,t,r,o,i,a,u)};default:return i(e,[n,t,r,o])}}function c(e,n,t,r,o,a){var u=e.length;if(5===u)return e(n,t,r,o,a);switch(u){case 1:return i(e(n),[t,r,o,a]);case 2:return i(e(n,t),[r,o,a]);case 3:return i(e(n,t,r),[o,a]);case 4:return i(e(n,t,r,o),[a]);case 5:return e(n,t,r,o,a);case 6:return function(i){return e(n,t,r,o,a,i)};case 7:return function(i,u){return e(n,t,r,o,a,i,u)};default:return i(e,[n,t,r,o,a])}}function f(e,n,t,r,o,a,u){var l=e.length;if(6===l)return e(n,t,r,o,a,u);switch(l){case 1:return i(e(n),[t,r,o,a,u]);case 2:return i(e(n,t),[r,o,a,u]);case 3:return i(e(n,t,r),[o,a,u]);case 4:return i(e(n,t,r,o),[a,u]);case 5:return i(e(n,t,r,o,a),[u]);case 6:return e(n,t,r,o,a,u);case 7:return function(i){return e(n,t,r,o,a,u,i)};default:return i(e,[n,t,r,o,a,u])}}function s(e,n,t,r,o,a,u,l){var c=e.length;if(7===c)return e(n,t,r,o,a,u,l);switch(c){case 1:return i(e(n),[t,r,o,a,u,l]);case 2:return i(e(n,t),[r,o,a,u,l]);case 3:return i(e(n,t,r),[o,a,u,l]);case 4:return i(e(n,t,r,o),[a,u,l]);case 5:return i(e(n,t,r,o,a),[u,l]);case 6:return i(e(n,t,r,o,a,u),[l]);case 7:return e(n,t,r,o,a,u,l);default:return i(e,[n,t,r,o,a,u,l])}}function d(e,n,t,r,o,a,u,l,c){var f=e.length;if(8===f)return e(n,t,r,o,a,u,l,c);switch(f){case 1:return i(e(n),[t,r,o,a,u,l,c]);case 2:return i(e(n,t),[r,o,a,u,l,c]);case 3:return i(e(n,t,r),[o,a,u,l,c]);case 4:return i(e(n,t,r,o),[a,u,l,c]);case 5:return i(e(n,t,r,o,a),[u,l,c]);case 6:return i(e(n,t,r,o,a,u),[l,c]);case 7:return i(e(n,t,r,o,a,u,l),[c]);default:return i(e,[n,t,r,o,a,u,l,c])}}n.app=i,n._1=o,n.__1=function(e){return 1===e.length?e:function(n){return o(e,n)}},n._2=a,n.__2=function(e){return 2===e.length?e:function(n,t){return a(e,n,t)}},n._3=u,n.__3=function(e){return 3===e.length?e:function(n,t,r){return u(e,n,t,r)}},n._4=l,n.__4=function(e){return 4===e.length?e:function(n,t,r,i){return l(e,n,t,r,i)}},n._5=c,n.__5=function(e){return 5===e.length?e:function(n,t,r,i,o){return c(e,n,t,r,i,o)}},n._6=f,n.__6=function(e){return 6===e.length?e:function(n,t,r,i,o,a){return f(e,n,t,r,i,o,a)}},n._7=s,n.__7=function(e){return 7===e.length?e:function(n,t,r,i,o,a,u){return s(e,n,t,r,i,o,a,u)}},n._8=d,n.__8=function(e){return 8===e.length?e:function(n,t,r,i,o,a,u,l){return d(e,n,t,r,i,o,a,u,l)}}},8549:(e,n,t)=>{var r=t(1525);n.get=function(e,n){if(n in e)return r.some(e[n])},n.unsafeDeleteKey=function(e,n){delete e[n]},n.entries=function(e){for(var n=Object.keys(e),t=n.length,r=new Array(t),i=0;i{n.equal=function(e,n){return e===n},n.max=2147483647,n.min=-2147483648},1609:(e,n,t)=>{var r=t(796);function i(e){return e>r.max?r.max:er.max?r.max:e{var r=t(3803),i=r.make,o=r.get,a=r.set,u=r.exchange,l=r.compare_and_set,c=r.fetch_and_add,f=r.incr,s=r.decr;n.make=i,n.get=o,n.set=a,n.exchange=u,n.compare_and_set=l,n.fetch_and_add=c,n.incr=f,n.decr=s},8954:(e,n,t)=>{var r=t(5076),i=t(8420),o=t(117),a=t(5186),u=t(3530),l=t(9149),c=t(6137),f=t(5502);function s(e,n){var t=r.caml_create_bytes(e);return r.caml_fill_bytes(t,0,e,n),t}var d=[];function v(e){var n=e.length,t=r.caml_create_bytes(n);return r.caml_blit_bytes(e,0,t,0,n),t}function _(e,n,t){if(n<0||t<0||n>(e.length-t|0))throw{RE_EXN_ID:"Invalid_argument",_1:"String.sub / Bytes.sub",Error:new Error};var i=r.caml_create_bytes(t);return r.caml_blit_bytes(e,n,i,0,t),i}function p(e,n){var t=e+n|0,r=n<0,i=t<0;if(e<0){if(!r)return t;if(i)return t;throw{RE_EXN_ID:"Invalid_argument",_1:"Bytes.extend",Error:new Error}}if(r)return t;if(i)throw{RE_EXN_ID:"Invalid_argument",_1:"Bytes.extend",Error:new Error};return t}function h(e,n,t,i,o){if(o<0||n<0||n>(e.length-o|0)||i<0||i>(t.length-o|0))throw{RE_EXN_ID:"Invalid_argument",_1:"Bytes.blit",Error:new Error};r.caml_blit_bytes(e,n,t,i,o)}function m(e,n){if(e>=n)return e;throw{RE_EXN_ID:"Invalid_argument",_1:"Bytes.concat",Error:new Error}}function g(e){return e>13||e<9?32===e:11!==e}function y(e){for(var n=0,t=0,i=e.length;t=32?o>92||o<34?o>=127?4:1:o>91||o<35?2:1:o>=11?13!==o?4:2:o>=8?2:4)|0}if(n===e.length)return e;var a=r.caml_create_bytes(n);n=0;for(var u=0,l=e.length;u=35)92!==c?c>=127?f=1:a[n]=c:f=2;else if(c>=32)c>=34?f=2:a[n]=c;else if(c>=14)f=1;else switch(c){case 8:a[n]=92,a[n=n+1|0]=98;break;case 9:a[n]=92,a[n=n+1|0]=116;break;case 10:a[n]=92,a[n=n+1|0]=110;break;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 11:case 12:f=1;break;case 13:a[n]=92,a[n=n+1|0]=114}switch(f){case 1:a[n]=92,a[n=n+1|0]=48+(c/100|0)|0,a[n=n+1|0]=48+(c/10|0)%10|0,a[n=n+1|0]=48+c%10|0;break;case 2:a[n]=92,a[n=n+1|0]=c}n=n+1|0}return a}function b(e,n){var t=n.length;if(0===t)return n;for(var i=r.caml_create_bytes(t),a=0;a=n)throw{RE_EXN_ID:a.Not_found,Error:new Error};if(e[i]===r)return i;t=i+1|0}}function k(e,n,t,r){for(;;){var i=t;if(i>=n)return;if(e[i]===r)return i;t=i+1|0}}function x(e,n,t){for(;;){var r=n;if(r<0)throw{RE_EXN_ID:a.Not_found,Error:new Error};if(e[r]===t)return r;n=r-1|0}}function S(e,n,t){for(;;){var r=n;if(r<0)return;if(e[r]===t)return r;n=r-1|0}}function C(e,n,t){var r=e.length;if(n<0||n>r)throw{RE_EXN_ID:"Invalid_argument",_1:"String.contains_from / Bytes.contains_from",Error:new Error};try{return E(e,r,n,t),!0}catch(e){var o=i.internalToOCamlException(e);if(o.RE_EXN_ID===a.Not_found)return!1;throw o}}var N=r.caml_bytes_compare;function I(e,n){return f.big_endian?r.bswap16(r.get16u(e,n)):r.get16u(e,n)}function A(e,n){return f.big_endian?r.get16u(e,n):r.bswap16(r.get16u(e,n))}function T(e,n){return f.big_endian?r.bswap16(r.get16(e,n)):r.get16(e,n)}function O(e,n){return f.big_endian?r.get16(e,n):r.bswap16(r.get16(e,n))}function R(e,n,t){return f.big_endian?r.set16u(e,n,r.bswap16(t)):r.set16u(e,n,t)}function D(e,n,t){return f.big_endian?r.set16u(e,n,t):r.set16u(e,n,r.bswap16(t))}function F(e,n,t){return f.big_endian?r.set16(e,n,r.bswap16(t)):r.set16(e,n,t)}function z(e,n,t){return f.big_endian?r.set16(e,n,t):r.set16(e,n,r.bswap16(t))}var U=r.set,P=r.set16,L=r.caml_bytes_equal,M=r.bytes_to_string,j=r.bytes_of_string,B=r.get,G=r.get16,W=r.get32,X=r.get64,$=r.set,V=z,q=F,H=r.set16,Q=r.set32,K=r.set64;n.make=s,n.init=function(e,n){for(var t=r.caml_create_bytes(e),i=0;i0&&r.caml_blit_bytes(e,c,o,u,f),o},n.fill=function(e,n,t,i){if(n<0||t<0||n>(e.length-t|0))throw{RE_EXN_ID:"Invalid_argument",_1:"String.fill / Bytes.fill",Error:new Error};r.caml_fill_bytes(e,n,t,i)},n.blit=h,n.blit_string=function(e,n,t,i,o){if(o<0||n<0||n>(e.length-o|0)||i<0||i>(t.length-o|0))throw{RE_EXN_ID:"Invalid_argument",_1:"String.blit / Bytes.blit_string",Error:new Error};r.caml_blit_string(e,n,t,i,o)},n.concat=function(e,n){if(!n)return d;for(var t=e.length,i=r.caml_create_bytes(function(e,n,t){for(;;){var r=t,i=e;if(!r)return i;var o=r.hd;if(!r.tl)return o.length+i|0;t=r.tl,e=m((o.length+n|0)+i|0,i)}}(0,t,n)),o=0,a=n;;){var u=a,l=o;if(!u)return i;var c=u.hd;if(!u.tl)return r.caml_blit_bytes(c,0,i,l,c.length),i;r.caml_blit_bytes(c,0,i,l,c.length),r.caml_blit_bytes(e,0,i,l+c.length|0,t),a=u.tl,o=(l+c.length|0)+t|0}},n.cat=function(e,n){var t=e.length,i=n.length,o=r.caml_create_bytes(t+i|0);return r.caml_blit_bytes(e,0,o,0,t),r.caml_blit_bytes(n,0,o,t,i),o},n.iter=function(e,n){for(var t=0,r=n.length;t=0;--i)r=o._2(e,n[i],r);return r},n.for_all=function(e,n){for(var t=n.length,r=0;;){var i=r;if(i===t)return!0;if(!o._1(e,n[i]))return!1;r=i+1|0}},n.exists=function(e,n){for(var t=n.length,r=0;;){var i=r;if(i===t)return!1;if(o._1(e,n[i]))return!0;r=i+1|0}},n.trim=function(e){for(var n=e.length,t=0;t=t&&g(e[r]);)r=r-1|0;return r>=t?_(e,t,1+(r-t|0)|0):d},n.escaped=function(e){return y(v(e))},n.index=function(e,n){return E(e,e.length,0,n)},n.index_opt=function(e,n){return k(e,e.length,0,n)},n.rindex=function(e,n){return x(e,e.length-1|0,n)},n.rindex_opt=function(e,n){return S(e,e.length-1|0,n)},n.index_from=function(e,n,t){var r=e.length;if(n<0||n>r)throw{RE_EXN_ID:"Invalid_argument",_1:"String.index_from / Bytes.index_from",Error:new Error};return E(e,r,n,t)},n.index_from_opt=function(e,n,t){var r=e.length;if(n<0||n>r)throw{RE_EXN_ID:"Invalid_argument",_1:"String.index_from_opt / Bytes.index_from_opt",Error:new Error};return k(e,r,n,t)},n.rindex_from=function(e,n,t){if(n<-1||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"String.rindex_from / Bytes.rindex_from",Error:new Error};return x(e,n,t)},n.rindex_from_opt=function(e,n,t){if(n<-1||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"String.rindex_from_opt / Bytes.rindex_from_opt",Error:new Error};return S(e,n,t)},n.contains=function(e,n){return C(e,0,n)},n.contains_from=C,n.rcontains_from=function(e,n,t){if(n<0||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"String.rcontains_from / Bytes.rcontains_from",Error:new Error};try{return x(e,n,t),!0}catch(e){var r=i.internalToOCamlException(e);if(r.RE_EXN_ID===a.Not_found)return!1;throw r}},n.uppercase_ascii=function(e){return b(u.uppercase_ascii,e)},n.lowercase_ascii=function(e){return b(u.lowercase_ascii,e)},n.capitalize_ascii=function(e){return w(u.uppercase_ascii,e)},n.uncapitalize_ascii=function(e){return w(u.lowercase_ascii,e)},n.compare=N,n.equal=L,n.starts_with=function(e,n){var t=n.length,r=e.length;if(!(t>=r))return!1;for(var i=0;;){var o=i;if(o===r)return!0;if(n[o]!==e[o])return!1;i=o+1|0}},n.ends_with=function(e,n){var t=n.length,r=e.length,i=t-r|0;if(!(i>=0))return!1;for(var o=0;;){var a=o;if(a===r)return!0;if(n[i+a|0]!==e[a])return!1;o=a+1|0}},n.unsafe_to_string=M,n.unsafe_of_string=j,n.split_on_char=function(e,n){for(var t=0,r=n.length,i=n.length-1|0;i>=0;--i)n[i]===e&&(t={hd:_(n,i+1|0,(r-i|0)-1|0),tl:t},r=i);return{hd:_(n,0,r),tl:t}},n.to_seq=function(e){var n=function(t,i){if(t===e.length)return 0;var o=r.get(e,t),a=t+1|0;return{_0:o,_1:function(e){return n(a,e)}}};return function(e){return n(0,e)}},n.to_seqi=function(e){var n=function(t,i){if(t===e.length)return 0;var o=r.get(e,t),a=t+1|0;return{_0:[t,o],_1:function(e){return n(a,e)}}};return function(e){return n(0,e)}},n.of_seq=function(e){var n={contents:0},t={contents:s(256,0)};return c.iter((function(e){n.contents===t.contents.length&&function(e){var r=l.min(t.contents.length<<1,f.max_string_length);if(t.contents.length===r)throw{RE_EXN_ID:"Failure",_1:"Bytes.of_seq: cannot grow bytes",Error:new Error};var i=s(r,0);h(t.contents,0,i,0,n.contents),t.contents=i}(),r.set(t.contents,n.contents,e),n.contents=n.contents+1|0}),e),_(t.contents,0,n.contents)},n.get_utf_8_uchar=function(e,n){var t=r.get(e,n),i=e.length-1|0,o=0;if(!(t>=224)){if(t<128)return 150994944|t;if(t<194)return 16842749;var a=n+1|0;if(a>i)return 16842749;var u=e[a];return u>>>6!=2?16842749:(31&t)<<6|63&u|167772160}if(t>=237){if(t>=245)return 16842749;switch(t){case 237:var l=n+1|0;if(l>i)return 16842749;var c=e[l];if(c>>>5!=4)return 16842749;var f=l+1|0;if(f>i)return 33619965;var s=e[f];return s>>>6!=2?33619965:(15&t)<<12|(63&c)<<6|63&s|184549376;case 238:case 239:o=1;break;case 240:var d=n+1|0;if(d>i)return 16842749;var v=e[d];if(v<144||191i)return 33619965;var p=e[_];if(p>>>6!=2)return 33619965;var h=_+1|0;if(h>i)return 50397181;var m=e[h];return m>>>6!=2?50397181:(7&t)<<18|(63&v)<<12|(63&p)<<6|63&m|201326592;case 241:case 242:case 243:o=2;break;case 244:var g=n+1|0;if(g>i)return 16842749;var y=e[g];if(y>>>4!=8)return 16842749;var b=g+1|0;if(b>i)return 33619965;var w=e[b];if(w>>>6!=2)return 33619965;var E=b+1|0;if(E>i)return 50397181;var k=e[E];return k>>>6!=2?50397181:(7&t)<<18|(63&y)<<12|(63&w)<<6|63&k|201326592}}else{if(!(t>=225)){var x=n+1|0;if(x>i)return 16842749;var S=e[x];if(S>>>5!=5)return 16842749;var C=x+1|0;if(C>i)return 33619965;var N=e[C];return N>>>6!=2?33619965:(15&t)<<12|(63&S)<<6|63&N|184549376}o=1}switch(o){case 1:var I=n+1|0;if(I>i)return 16842749;var A=e[I];if(A>>>6!=2)return 16842749;var T=I+1|0;if(T>i)return 33619965;var O=e[T];return O>>>6!=2?33619965:(15&t)<<12|(63&A)<<6|63&O|184549376;case 2:var R=n+1|0;if(R>i)return 16842749;var D=e[R];if(D>>>6!=2)return 16842749;var F=R+1|0;if(F>i)return 33619965;var z=e[F];if(z>>>6!=2)return 33619965;var U=F+1|0;if(U>i)return 50397181;var P=e[U];return P>>>6!=2?50397181:(7&t)<<18|(63&D)<<12|(63&z)<<6|63&P|201326592}},n.set_utf_8_uchar=function(e,n,t){var i=e.length-1|0,o=t;if(o<0)throw{RE_EXN_ID:"Assert_failure",_1:["bytes.cppo.ml",654,20],Error:new Error};if(o<=127)return r.set(e,n,o),1;if(o<=2047){var a=n+1|0;return a>i?0:(r.set(e,n,192|o>>>6),e[a]=128|63&o,2)}if(o<=65535){var u=n+2|0;return u>i?0:(r.set(e,n,224|o>>>12),e[n+1|0]=128|o>>>6&63,e[u]=128|63&o,3)}if(o<=1114111){var l=n+3|0;return l>i?0:(r.set(e,n,240|o>>>18),e[n+1|0]=128|o>>>12&63,e[n+2|0]=128|o>>>6&63,e[l]=128|63&o,4)}throw{RE_EXN_ID:"Assert_failure",_1:["bytes.cppo.ml",679,9],Error:new Error}},n.is_valid_utf_8=function(e){for(var n=e.length-1|0,t=0;;){var r=t;if(r>n)return!0;var i=e[r],o=0;if(i>=224){if(i>=237){if(i>=245)return!1;switch(i){case 237:var a=r+2|0;if(a>n||e[r+1|0]>>>5!=4||e[a]>>>6!=2)return!1;t=a+1|0;continue;case 238:case 239:o=1;break;case 240:var u=r+3|0,l=!0;if(u<=n){var c=e[r+1|0];l=c<144||191>>6!=2||e[u]>>>6!=2}if(l)return!1;t=u+1|0;continue;case 241:case 242:case 243:o=2;break;case 244:var f=r+3|0;if(f>n||e[r+1|0]>>>4!=8||e[r+2|0]>>>6!=2||e[f]>>>6!=2)return!1;t=f+1|0;continue}}else{if(!(i>=225)){var s=r+2|0;if(s>n||e[r+1|0]>>>5!=5||e[s]>>>6!=2)return!1;t=s+1|0;continue}o=1}switch(o){case 1:var d=r+2|0;if(d>n||e[r+1|0]>>>6!=2||e[d]>>>6!=2)return!1;t=d+1|0;continue;case 2:var v=r+3|0;if(v>n||e[r+1|0]>>>6!=2||e[r+2|0]>>>6!=2||e[v]>>>6!=2)return!1;t=v+1|0;continue}}else{if(i>=128){if(i<194)return!1;var _=r+1|0;if(_>n||e[_]>>>6!=2)return!1;t=_+1|0;continue}t=r+1|0}}},n.get_utf_16be_uchar=function(e,n){var t=e.length-1|0;if(n<0||n>t)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};if(n===t)return 16842749;var r=A(e,n);if(r<55296||r>57343)return 167772160|r;if(r>56319)return 33619965;if((n+3|0)>t)return(1+(t-n|0)|0)<<24|65533;var i=A(e,n+2|0);return i<56320||i>57343?33619965:201326592|65536+((1023&r)<<10|1023&i)},n.set_utf_16be_uchar=function(e,n,t){var r=e.length-1|0;if(n<0||n>r)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};var i=t;if(i<0)throw{RE_EXN_ID:"Assert_failure",_1:["bytes.cppo.ml",766,20],Error:new Error};if(i<=65535)return(n+1|0)>r?0:(D(e,n,i),2);if(i<=1114111){if((n+3|0)>r)return 0;var o=i-65536|0,a=56320|1023&o;return D(e,n,55296|o>>>10),D(e,n+2|0,a),4}throw{RE_EXN_ID:"Assert_failure",_1:["bytes.cppo.ml",777,9],Error:new Error}},n.is_valid_utf_16be=function(e){for(var n=e.length-1|0,t=0;;){var r=t;if(r>n)return!0;if(r===n)return!1;var i=A(e,r);if(i<55296||i>57343)t=r+2|0;else{if(i>56319)return!1;if((r+3|0)>n)return!1;var o=A(e,r+2|0);if(o<56320||o>57343)return!1;t=r+4|0}}},n.get_utf_16le_uchar=function(e,n){var t=e.length-1|0;if(n<0||n>t)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};if(n===t)return 16842749;var r=I(e,n);if(r<55296||r>57343)return 167772160|r;if(r>56319)return 33619965;if((n+3|0)>t)return(1+(t-n|0)|0)<<24|65533;var i=I(e,n+2|0);return i<56320||i>57343?33619965:201326592|65536+((1023&r)<<10|1023&i)},n.set_utf_16le_uchar=function(e,n,t){var r=e.length-1|0;if(n<0||n>r)throw{RE_EXN_ID:"Invalid_argument",_1:"index out of bounds",Error:new Error};var i=t;if(i<0)throw{RE_EXN_ID:"Assert_failure",_1:["bytes.cppo.ml",820,20],Error:new Error};if(i<=65535)return(n+1|0)>r?0:(R(e,n,i),2);if(i<=1114111){if((n+3|0)>r)return 0;var o=i-65536|0,a=56320|1023&o;return R(e,n,55296|o>>>10),R(e,n+2|0,a),4}throw{RE_EXN_ID:"Assert_failure",_1:["bytes.cppo.ml",831,9],Error:new Error}},n.is_valid_utf_16le=function(e){for(var n=e.length-1|0,t=0;;){var r=t;if(r>n)return!0;if(r===n)return!1;var i=I(e,r);if(i<55296||i>57343)t=r+2|0;else{if(i>56319)return!1;if((r+3|0)>n)return!1;var o=I(e,r+2|0);if(o<56320||o>57343)return!1;t=r+4|0}}},n.get_uint8=B,n.get_int8=function(e,n){return r.get(e,n)<<(f.int_size-8|0)>>(f.int_size-8|0)},n.get_uint16_ne=G,n.get_uint16_be=O,n.get_uint16_le=T,n.get_int16_ne=function(e,n){return r.get16(e,n)<<(f.int_size-16|0)>>(f.int_size-16|0)},n.get_int16_be=function(e,n){return O(e,n)<<(f.int_size-16|0)>>(f.int_size-16|0)},n.get_int16_le=function(e,n){return T(e,n)<<(f.int_size-16|0)>>(f.int_size-16|0)},n.get_int32_ne=W,n.get_int32_be=function(e,n){return f.big_endian?r.get32(e,n):r.bswap32(r.get32(e,n))},n.get_int32_le=function(e,n){return f.big_endian?r.bswap32(r.get32(e,n)):r.get32(e,n)},n.get_int64_ne=X,n.get_int64_be=function(e,n){return f.big_endian?r.get64(e,n):r.bswap64(r.get64(e,n))},n.get_int64_le=function(e,n){return f.big_endian?r.bswap64(r.get64(e,n)):r.get64(e,n)},n.set_uint8=U,n.set_int8=$,n.set_uint16_ne=P,n.set_uint16_be=V,n.set_uint16_le=q,n.set_int16_ne=H,n.set_int16_be=z,n.set_int16_le=F,n.set_int32_ne=Q,n.set_int32_be=function(e,n,t){return f.big_endian?r.set32(e,n,t):r.set32(e,n,r.bswap32(t))},n.set_int32_le=function(e,n,t){return f.big_endian?r.set32(e,n,r.bswap32(t)):r.set32(e,n,t)},n.set_int64_ne=K,n.set_int64_be=function(e,n,t){return f.big_endian?r.set64(e,n,t):r.set64(e,n,r.bswap64(t))},n.set_int64_le=function(e,n,t){return f.big_endian?r.set64(e,n,r.bswap64(t)):r.set64(e,n,t)},n.unsafe_escape=y},3803:(e,n)=>{function t(e,n){var t=e.v;return e.v=t+n|0,t}n.make=function(e){return{v:e}},n.get=function(e){return e.v},n.set=function(e,n){e.v=n},n.exchange=function(e,n){var t=e.v;return e.v=n,t},n.compare_and_set=function(e,n,t){return e.v===n&&(e.v=t,!0)},n.fetch_and_add=t,n.incr=function(e){t(e,1)},n.decr=function(e){t(e,-1)}},9861:(e,n)=>{n.concat_fmtty=function e(n,t){if("number"==typeof n)return t;switch(0|n.TAG){case 0:return{TAG:0,_0:e(n._0,t)};case 1:return{TAG:1,_0:e(n._0,t)};case 2:return{TAG:2,_0:e(n._0,t)};case 3:return{TAG:3,_0:e(n._0,t)};case 4:return{TAG:4,_0:e(n._0,t)};case 5:return{TAG:5,_0:e(n._0,t)};case 6:return{TAG:6,_0:e(n._0,t)};case 7:return{TAG:7,_0:e(n._0,t)};case 8:return{TAG:8,_0:n._0,_1:e(n._1,t)};case 9:return{TAG:9,_0:n._0,_1:n._1,_2:e(n._2,t)};case 10:return{TAG:10,_0:e(n._0,t)};case 11:return{TAG:11,_0:e(n._0,t)};case 12:return{TAG:12,_0:e(n._0,t)};case 13:return{TAG:13,_0:e(n._0,t)};case 14:return{TAG:14,_0:e(n._0,t)}}},n.erase_rel=function e(n){if("number"==typeof n)return 0;switch(0|n.TAG){case 0:return{TAG:0,_0:e(n._0)};case 1:return{TAG:1,_0:e(n._0)};case 2:return{TAG:2,_0:e(n._0)};case 3:return{TAG:3,_0:e(n._0)};case 4:return{TAG:4,_0:e(n._0)};case 5:return{TAG:5,_0:e(n._0)};case 6:return{TAG:6,_0:e(n._0)};case 7:return{TAG:7,_0:e(n._0)};case 8:return{TAG:8,_0:n._0,_1:e(n._1)};case 9:var t=n._0;return{TAG:9,_0:t,_1:t,_2:e(n._2)};case 10:return{TAG:10,_0:e(n._0)};case 11:return{TAG:11,_0:e(n._0)};case 12:return{TAG:12,_0:e(n._0)};case 13:return{TAG:13,_0:e(n._0)};case 14:return{TAG:14,_0:e(n._0)}}},n.concat_fmt=function e(n,t){if("number"==typeof n)return t;switch(0|n.TAG){case 0:return{TAG:0,_0:e(n._0,t)};case 1:return{TAG:1,_0:e(n._0,t)};case 2:return{TAG:2,_0:n._0,_1:e(n._1,t)};case 3:return{TAG:3,_0:n._0,_1:e(n._1,t)};case 4:return{TAG:4,_0:n._0,_1:n._1,_2:n._2,_3:e(n._3,t)};case 5:return{TAG:5,_0:n._0,_1:n._1,_2:n._2,_3:e(n._3,t)};case 6:return{TAG:6,_0:n._0,_1:n._1,_2:n._2,_3:e(n._3,t)};case 7:return{TAG:7,_0:n._0,_1:n._1,_2:n._2,_3:e(n._3,t)};case 8:return{TAG:8,_0:n._0,_1:n._1,_2:n._2,_3:e(n._3,t)};case 9:return{TAG:9,_0:n._0,_1:e(n._1,t)};case 10:return{TAG:10,_0:e(n._0,t)};case 11:return{TAG:11,_0:n._0,_1:e(n._1,t)};case 12:return{TAG:12,_0:n._0,_1:e(n._1,t)};case 13:return{TAG:13,_0:n._0,_1:n._1,_2:e(n._2,t)};case 14:return{TAG:14,_0:n._0,_1:n._1,_2:e(n._2,t)};case 15:return{TAG:15,_0:e(n._0,t)};case 16:return{TAG:16,_0:e(n._0,t)};case 17:return{TAG:17,_0:n._0,_1:e(n._1,t)};case 18:return{TAG:18,_0:n._0,_1:e(n._1,t)};case 19:return{TAG:19,_0:e(n._0,t)};case 20:return{TAG:20,_0:n._0,_1:n._1,_2:e(n._2,t)};case 21:return{TAG:21,_0:n._0,_1:e(n._1,t)};case 22:return{TAG:22,_0:e(n._0,t)};case 23:return{TAG:23,_0:n._0,_1:e(n._1,t)};case 24:return{TAG:24,_0:n._0,_1:n._1,_2:e(n._2,t)}}}},1903:(e,n,t)=>{var r=t(8580).create("CamlinternalLazy.Undefined");function i(e,n){var t=n();return e.VAL=t,e.LAZY_DONE=!0,t}function o(){throw{RE_EXN_ID:r,Error:new Error}}function a(e){var n=e.VAL;e.VAL=o;try{return i(e,n)}catch(n){throw e.VAL=function(){throw n},n}}function u(e){var n=e.VAL;return e.VAL=o,i(e,n)}n.Undefined=r,n.force_lazy_block=a,n.force_val_lazy_block=u,n.force=function(e){return e.LAZY_DONE?e.VAL:a(e)},n.force_val=function(e){return e.LAZY_DONE?e.VAL:u(e)},n.is_val=function(e){return e.LAZY_DONE}},3530:(e,n,t)=>{var r=t(5076),i=t(5750);n.chr=function(e){if(e<0||e>255)throw{RE_EXN_ID:"Invalid_argument",_1:"Char.chr",Error:new Error};return e},n.escaped=function(e){var n=0;if(e>=40){if(92===e)return"\\\\";n=e>=127?1:2}else if(e>=32){if(e>=39)return"\\'";n=2}else if(e>=14)n=1;else switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 11:case 12:n=1;break;case 13:return"\\r"}switch(n){case 1:var t=[0,0,0,0];return t[0]=92,t[1]=48+(e/100|0)|0,t[2]=48+(e/10|0)%10|0,t[3]=48+e%10|0,r.bytes_to_string(t);case 2:var i=[0];return i[0]=e,r.bytes_to_string(i)}},n.lowercase_ascii=function(e){return e>90||e<65?e:e+32|0},n.uppercase_ascii=function(e){return e>122||e<97?e:e-32|0},n.compare=function(e,n){return e-n|0},n.equal=function(e,n){return 0==(e-n|0)},n.seeded_hash=function(e,n){return i.caml_hash(10,100,e,n)},n.hash=function(e){return i.caml_hash(10,100,0,e)}},9149:(e,n,t)=>{var r=t(406),i=t(6604),o=t(5750),a=r.caml_int_compare;n.zero=0,n.one=1,n.minus_one=-1,n.abs=function(e){return e>=0?e:0|-e},n.max_int=2147483647,n.min_int=-2147483648,n.lognot=function(e){return-1^e},n.equal=function(e,n){return e===n},n.compare=a,n.min=function(e,n){return e<=n?e:n},n.max=function(e,n){return e>=n?e:n},n.to_string=function(e){return i.caml_format_int("%d",e)},n.seeded_hash=function(e,n){return o.caml_hash(10,100,e,n)},n.hash=function(e){return o.caml_hash(10,100,0,e)}},6137:(e,n,t)=>{var r=t(8580),i=t(1525),o=t(1903),a=t(117),u=t(2534);function l(e){return 0}function c(e,n,t){var r=a._1(e,void 0);if(!r)return a._1(n,void 0);var i=r._1;return{_0:r._0,_1:function(e){return c(i,n)}}}function f(e,n,t){var r=a._1(n,void 0);if(!r)return 0;var i=r._1;return{_0:a._1(e,r._0),_1:function(n){return f(e,i)}}}function s(e,n,t){for(;;){var r=n,o=a._1(r,void 0);if(!o)return 0;var u=o._1,l=a._1(e,o._0);if(void 0!==l)return{_0:i.valFromOption(l),_1:function(n){return function(t){return s(e,n)}}(u)};n=u}}function d(e,n,t){for(;;){var r=n,i=a._1(r,void 0);if(!i)return 0;var o=i._1,u=i._0;if(a._1(e,u))return{_0:u,_1:function(n){return function(t){return d(e,n)}}(o)};n=o}}function v(e,n){var t=a._1(e,void 0);if(!t)return 0;var r=t._1;return c(t._0,(function(e){return v(r)}))}function _(e,n,t){var r=a._1(n,void 0);if(!r)return 0;var i=r._1;return c(a._1(e,r._0),(function(n){return _(e,i)}))}function p(e){return!a._1(e,void 0)}function h(e){var n=a._1(e,void 0);if(n)return[n._0,n._1]}function m(e,n,t,r){if(n>=t)return 0;var i=n+1|0;return{_0:a._1(e,n),_1:function(n){return m(e,i,t)}}}function g(e,n){return c(e,(function(n){return g(e)}))}function y(e,n,t){var r=a._1(e,n);return{_0:r,_1:function(n){return y(e,r)}}}function b(e,n,t,r){var i=a._1(t,void 0);if(!i)return 0;var o=i._1,u=n+1|0;return{_0:a._2(e,n,i._0),_1:function(n){return b(e,u,o)}}}function w(e,n,t,r){var i=a._1(t,void 0);if(!i)return 0;var o=i._1,u=a._2(e,n,i._0);return{_0:u,_1:function(n){return w(e,u,o)}}}function E(e,n){return 0===e?l:function(t){var r=a._1(n,void 0);return r?{_0:r._0,_1:E(e-1|0,r._1)}:0}}function k(e,n,t){var r=a._1(n,void 0);if(!r)return 0;var i=r._1,o=r._0;return a._1(e,o)?{_0:o,_1:function(n){return k(e,i)}}:0}function x(e,n,t){for(;;){var r=n,i=a._1(r,void 0);if(!i)return 0;if(!a._1(e,i._0))return i;n=i._1}}var S=r.create("Stdlib.Seq.Forced_twice");function C(e){throw{RE_EXN_ID:S,Error:new Error}}function N(e,n,t,r,i){return a._2(e,n,r)<=0?{_0:n,_1:function(n){var o=a._1(t,void 0);return o?N(e,o._0,o._1,r,i):{_0:r,_1:i}}}:{_0:r,_1:function(r){var o=a._1(i,void 0);return o?N(e,n,t,o._0,o._1):{_0:n,_1:t}}}}function I(e,n){var t=a._1(e,void 0);if(!t)return 0;var r=t._1;return{_0:t._0[0],_1:function(e){return I(r)}}}function A(e,n){var t=a._1(e,void 0);if(!t)return 0;var r=t._1;return{_0:t._0[1],_1:function(e){return A(r)}}}function T(e){return[function(n){return I(e)},function(n){return A(e)}]}function O(e,n,t){for(;;){var r=n,i=a._1(r,void 0);if(!i)return 0;var o=i._1,u=a._1(e,i._0);if(0===u.TAG)return{_0:u._0,_1:function(n){return function(t){return O(e,n)}}(o)};n=o}}function R(e,n,t){for(;;){var r=n,i=a._1(r,void 0);if(!i)return 0;var o=i._1,u=a._1(e,i._0);if(0!==u.TAG)return{_0:u._0,_1:function(n){return function(t){return R(e,n)}}(o)};n=o}}function D(e,n){var t=T((function(n){return s(h,e)})),r=t[1],i=t[0];if(!p(i))return{_0:i,_1:function(e){return D(r)}};if(!p(r))throw{RE_EXN_ID:"Assert_failure",_1:["jscomp/stdlib/seq.ml",616,4],Error:new Error};return 0}function F(e,n,t){var r=a._1(n,void 0);if(!r)return D(e);var i=r._1,o=a._1(r._0,void 0);if(o){var u=o._1,l=o._0,c=T((function(n){return s(h,e)})),f=c[1],d=c[0];return{_0:function(e){return{_0:l,_1:d}},_1:function(e){return F((function(e){return{_0:u,_1:f}}),i)}}}var v=T((function(n){return s(h,e)})),_=v[1];return{_0:v[0],_1:function(e){return F(_,i)}}}function z(e,n,t){return function(r){return v((function(r){return F(l,(function(r){return f((function(n){return function(r){return f((function(t){return a._2(e,n,t)}),t)}}),n)}))}))}}var U=_,P=T;n.is_empty=p,n.uncons=h,n.length=function(e){for(var n=0,t=e;;){var r=t,i=n,o=a._1(r,void 0);if(!o)return i;t=o._1,n=i+1|0}},n.iter=function(e,n){for(;;){var t=n,r=a._1(t,void 0);if(!r)return;a._1(e,r._0),n=r._1}},n.fold_left=function(e,n,t){for(;;){var r=t,i=n,o=a._1(r,void 0);if(!o)return i;var u=a._2(e,i,o._0);t=o._1,n=u}},n.iteri=function(e,n){for(var t=0,r=n;;){var i=r,o=t,u=a._1(i,void 0);if(!u)return;a._2(e,o,u._0),r=u._1,t=o+1|0}},n.fold_lefti=function(e,n,t){for(var r=n,i=0,o=t;;){var u=o,l=i,c=r,f=a._1(u,void 0);if(!f)return c;var s=a._3(e,c,l,f._0);o=f._1,i=l+1|0,r=s}},n.for_all=function(e,n){for(;;){var t=n,r=a._1(t,void 0);if(!r)return!0;if(!a._1(e,r._0))return!1;n=r._1}},n.exists=function(e,n){for(;;){var t=n,r=a._1(t,void 0);if(!r)return!1;if(a._1(e,r._0))return!0;n=r._1}},n.find=function(e,n){for(;;){var t=n,r=a._1(t,void 0);if(!r)return;var o=r._0;if(a._1(e,o))return i.some(o);n=r._1}},n.find_index=function(e,n){for(var t=0,r=n;;){var i=r,o=t,u=a._1(i,void 0);if(!u)return;if(a._1(e,u._0))return o;r=u._1,t=o+1|0}},n.find_map=function(e,n){for(;;){var t=n,r=a._1(t,void 0);if(!r)return;var i=a._1(e,r._0);if(void 0!==i)return i;n=r._1}},n.find_mapi=function(e,n){for(var t=0,r=n;;){var i=r,o=t,u=a._1(i,void 0);if(!u)return;var l=a._2(e,o,u._0);if(void 0!==l)return l;r=u._1,t=o+1|0}},n.iter2=function(e,n,t){for(;;){var r=t,i=n,o=a._1(i,void 0);if(!o)return;var u=a._1(r,void 0);if(!u)return;a._2(e,o._0,u._0),t=u._1,n=o._1}},n.fold_left2=function(e,n,t,r){for(;;){var i=r,o=t,u=n,l=a._1(o,void 0);if(!l)return u;var c=a._1(i,void 0);if(!c)return u;var f=a._3(e,u,l._0,c._0);r=c._1,t=l._1,n=f}},n.for_all2=function(e,n,t){for(;;){var r=t,i=n,o=a._1(i,void 0);if(!o)return!0;var u=a._1(r,void 0);if(!u)return!0;if(!a._2(e,o._0,u._0))return!1;t=u._1,n=o._1}},n.exists2=function(e,n,t){for(;;){var r=t,i=n,o=a._1(i,void 0);if(!o)return!1;var u=a._1(r,void 0);if(!u)return!1;if(a._2(e,o._0,u._0))return!0;t=u._1,n=o._1}},n.equal=function(e,n,t){for(;;){var r=t,i=n,o=a._1(i,void 0),u=a._1(r,void 0);if(!o)return!u;if(!u)return!1;if(!a._2(e,o._0,u._0))return!1;t=u._1,n=o._1}},n.compare=function(e,n,t){for(;;){var r=t,i=n,o=a._1(i,void 0),u=a._1(r,void 0);if(!o)return u?-1:0;if(!u)return 1;var l=a._2(e,o._0,u._0);if(0!==l)return l;t=u._1,n=o._1}},n.empty=l,n.$$return=function(e,n){return{_0:e,_1:l}},n.cons=function(e,n,t){return{_0:e,_1:n}},n.init=function(e,n){if(e<0)throw{RE_EXN_ID:"Invalid_argument",_1:"Seq.init",Error:new Error};return function(t){return m(n,0,e)}},n.unfold=function e(n,t,r){var i=a._1(n,t);if(void 0===i)return 0;var o=i[1];return{_0:i[0],_1:function(t){return e(n,o)}}},n.repeat=function e(n,t){return{_0:n,_1:function(t){return e(n)}}},n.forever=function e(n,t){return{_0:a._1(n,void 0),_1:function(t){return e(n)}}},n.cycle=function(e,n){var t=a._1(e,void 0);if(!t)return 0;var r=t._1;return{_0:t._0,_1:function(n){return c(r,(function(n){return g(e)}))}}},n.iterate=function(e,n){return function(t){return{_0:n,_1:function(t){return y(e,n)}}}},n.map=f,n.mapi=function(e,n){return function(t){return b(e,0,n)}},n.filter=d,n.filter_map=s,n.scan=function(e,n,t){return function(r){return{_0:n,_1:function(r){return w(e,n,t)}}}},n.take=function(e,n){if(e<0)throw{RE_EXN_ID:"Invalid_argument",_1:"Seq.take",Error:new Error};return E(e,n)},n.drop=function(e,n){if(e<0)throw{RE_EXN_ID:"Invalid_argument",_1:"Seq.drop",Error:new Error};return 0===e?n:function(t){for(var r=e,i=n;;){var o=i,u=r,l=a._1(o,void 0);if(!l)return 0;var c=l._1,f=u-1|0;if(0===f)return a._1(c,void 0);i=c,r=f}}},n.take_while=k,n.drop_while=x,n.group=function e(n,t,r){var i=a._1(t,void 0);if(!i)return 0;var o=i._1,u=i._0,l=a._1(n,u),c=function(e){return k(l,o)},f=a._1(n,u),s=function(e){return x(f,o)};return{_0:function(e){return{_0:u,_1:c}},_1:function(t){return e(n,s)}}},n.memoize=function e(n){var t={LAZY_DONE:!1,VAL:function(){var t=a._1(n,void 0);return t?{_0:t._0,_1:e(t._1)}:0}};return function(e){return o.force(t)}},n.Forced_twice=S,n.once=function e(n){var t=u.make((function(t){var r=a._1(n,void 0);return r?{_0:r._0,_1:e(r._1)}:0}));return function(e){var n=u.exchange(t,C);return a._1(n,void 0)}},n.transpose=D,n.append=c,n.concat=v,n.flat_map=_,n.concat_map=U,n.zip=function e(n,t,r){var i=a._1(n,void 0);if(!i)return 0;var o=i._1,u=a._1(t,void 0);if(!u)return 0;var l=u._1;return{_0:[i._0,u._0],_1:function(n){return e(o,l)}}},n.map2=function e(n,t,r,i){var o=a._1(t,void 0);if(!o)return 0;var u=o._1,l=a._1(r,void 0);if(!l)return 0;var c=l._1;return{_0:a._2(n,o._0,l._0),_1:function(t){return e(n,u,c)}}},n.interleave=function e(n,t,r){var i=a._1(n,void 0);if(!i)return a._1(t,void 0);var o=i._1;return{_0:i._0,_1:function(n){return e(t,o)}}},n.sorted_merge=function(e,n,t,r){var i=a._1(n,void 0),o=a._1(t,void 0);return i?o?N(e,i._0,i._1,o._0,o._1):i:o||0},n.product=function(e,n){return z((function(e,n){return[e,n]}),e,n)},n.map_product=z,n.unzip=T,n.split=P,n.partition_map=function(e,n){return[function(t){return O(e,n)},function(t){return R(e,n)}]},n.partition=function(e,n){return[function(t){return d(e,n)},function(t){return d((function(n){return!a._1(e,n)}),n)}]},n.of_dispenser=function(e){var n=function(t){var r=a._1(e,void 0);return void 0!==r?{_0:i.valFromOption(r),_1:n}:0};return n},n.to_dispenser=function(e){var n={contents:e};return function(e){var t=a._1(n.contents,void 0);if(t)return n.contents=t._1,i.some(t._0)}},n.ints=function e(n,t){var r=n+1|0;return{_0:n,_1:function(n){return e(r)}}}},5186:(e,n,t)=>{var r=t(5076),i=t(8580),o=t(2173),a=t(6604),u=t(9448),l=t(8420),c=t(7133),f=t(9378),s=t(9861),d=t(117),v=i.create("Stdlib.Exit"),_="Failure",p="Sys_error",h="End_of_file";function m(e){try{return a.caml_int_of_string(e)}catch(e){var n=l.internalToOCamlException(e);if(n.RE_EXN_ID===_)return;throw n}}function g(e){for(var n=e.length,t=0;;){var r=t;if(r>=n)return e+".";var i=c.get(e,r);if(i>=48){if(i>=58)return e;t=r+1|0}else{if(45!==i)return e;t=r+1|0}}}function y(e){try{return a.caml_float_of_string(e)}catch(e){var n=l.internalToOCamlException(e);if(n.RE_EXN_ID===_)return;throw n}}function b(e,n,t,r){for(;;){var i=e,o=n,a=t;if(!a)return void(i[o]=r);var u=a.tl,l=a.hd;if(!u)return void(i[o]={hd:l,tl:r});var c=u.tl,f=u.hd;if(!c)return void(i[o]={hd:l,tl:{hd:f,tl:r}});var s={hd:c.hd,tl:24029};i[o]={hd:l,tl:{hd:f,tl:s}},t=c.tl,n="tl",e=s}}var w=u.stdin,E=u.stdout,k=u.stderr;function x(e,n,t){var r=o.resolve("caml_ml_open_descriptor_out")(o.resolve("caml_sys_open")(t,e,n));return o.resolve("caml_ml_set_channel_name")(r,t),r}function S(e){for(var n=u.caml_ml_out_channels_list(void 0);;){var t=n;if(!t)return;try{u.caml_ml_flush(t.hd)}catch(e){var r=l.internalToOCamlException(e);if(r.RE_EXN_ID!==p)throw r}n=t.tl}}function C(e,n){o.resolve("caml_ml_output_bytes")(e,n,0,n.length)}function N(e,n){u.caml_ml_output(e,n,0,n.length)}function I(e,n,t){var r=o.resolve("caml_ml_open_descriptor_in")(o.resolve("caml_sys_open")(t,e,n));return o.resolve("caml_ml_set_channel_name")(r,t),r}function A(e,n,t,r){for(;;){var i=r,a=t;if(i<=0)return;var u=o.resolve("caml_ml_input")(e,n,a,i);if(0===u)throw{RE_EXN_ID:h,Error:new Error};r=i-u|0,t=a+u|0}}function T(e,n,t,r){if(t<0||r<0||t>(n.length-r|0))throw{RE_EXN_ID:"Invalid_argument",_1:"really_input",Error:new Error};A(e,n,t,r)}function O(e){var n=function(e,n,t){for(;;){var i=t,o=n;if(!i)return e;var a=i.hd,u=a.length;r.caml_blit_bytes(a,0,e,o-u|0,u),t=i.tl,n=o-u|0}};return r.bytes_to_string(function(t,i){for(;;){var a=i,u=t,l=o.resolve("caml_ml_input_scan_line")(e);if(0===l){if(u)return n(r.caml_create_bytes(a),a,u);throw{RE_EXN_ID:h,Error:new Error}}if(l>0){var c=r.caml_create_bytes(l-1|0);if(o.resolve("caml_ml_input")(e,c,0,l-1|0),o.resolve("caml_ml_input_char")(e),!u)return c;var f=(a+l|0)-1|0;return n(r.caml_create_bytes(f),f,{hd:c,tl:u})}var s=r.caml_create_bytes(0|-l);o.resolve("caml_ml_input")(e,s,0,0|-l),i=a-l|0,t={hd:s,tl:u}}}(0,0))}var R={contents:S},D={contents:function(e){}};function F(e){d._1(D.contents,void 0),d._1(R.contents,void 0)}var z=u.caml_ml_flush,U=u.caml_ml_output_char,P=u.caml_ml_output_char,L={seek_out:function(e,n){return o.resolve("caml_ml_seek_out_64")(e,n)},pos_out:function(e){return o.resolve("caml_ml_pos_out_64")(e)},out_channel_length:function(e){return o.resolve("caml_ml_channel_size_64")(e)},seek_in:function(e,n){return o.resolve("caml_ml_seek_in_64")(e,n)},pos_in:function(e){return o.resolve("caml_ml_pos_in_64")(e)},in_channel_length:function(e){return o.resolve("caml_ml_channel_size_64")(e)}};n.invalid_arg=function(e){throw{RE_EXN_ID:"Invalid_argument",_1:e,Error:new Error}},n.failwith=function(e){throw{RE_EXN_ID:"Failure",_1:e,Error:new Error}},n.Exit=v,n.Match_failure="Match_failure",n.Assert_failure="Assert_failure",n.Invalid_argument="Invalid_argument",n.Failure=_,n.Not_found="Not_found",n.Out_of_memory="Out_of_memory",n.Stack_overflow="Stack_overflow",n.Sys_error=p,n.End_of_file=h,n.Division_by_zero="Division_by_zero",n.Sys_blocked_io="Sys_blocked_io",n.Undefined_recursive_module="Undefined_recursive_module",n.abs=function(e){return e>=0?e:0|-e},n.max_int=2147483647,n.min_int=-2147483648,n.lnot=function(e){return-1^e},n.infinity=1/0,n.neg_infinity=-1/0,n.max_float=17976931348623157e292,n.min_float=22250738585072014e-324,n.epsilon_float=2220446049250313e-31,n.classify_float=function(e){return isFinite(e)?Math.abs(e)>=22250738585072014e-324?0:0!==e?1:2:isNaN(e)?4:3},n.char_of_int=function(e){if(e<0||e>255)throw{RE_EXN_ID:"Invalid_argument",_1:"char_of_int",Error:new Error};return e},n.string_of_bool=function(e){return e?"true":"false"},n.bool_of_string_opt=function(e){switch(e){case"false":return!1;case"true":return!0;default:return}},n.bool_of_string=function(e){switch(e){case"false":return!1;case"true":return!0;default:throw{RE_EXN_ID:"Invalid_argument",_1:"bool_of_string",Error:new Error}}},n.int_of_string_opt=m,n.string_of_float=function(e){return g(a.caml_format_float("%.12g",e))},n.float_of_string_opt=y,n.$at=function(e,n){if(!e)return n;var t=e.tl,r=e.hd;if(!t)return{hd:r,tl:n};var i=t.tl,o=t.hd;if(!i)return{hd:r,tl:{hd:o,tl:n}};var a={hd:i.hd,tl:24029};return{hd:r,tl:{hd:o,tl:(b(a,"tl",i.tl,n),a)}}},n.stdin=w,n.stdout=E,n.stderr=k,n.print_char=function(e){u.caml_ml_output_char(E,e)},n.print_string=function(e){N(E,e)},n.print_bytes=function(e){C(E,e)},n.print_int=function(e){N(E,String(e))},n.print_float=function(e){N(E,g(a.caml_format_float("%.12g",e)))},n.print_newline=function(e){u.caml_ml_output_char(E,10),u.caml_ml_flush(E)},n.prerr_char=function(e){u.caml_ml_output_char(k,e)},n.prerr_string=function(e){N(k,e)},n.prerr_bytes=function(e){C(k,e)},n.prerr_int=function(e){N(k,String(e))},n.prerr_float=function(e){N(k,g(a.caml_format_float("%.12g",e)))},n.prerr_newline=function(e){u.caml_ml_output_char(k,10),u.caml_ml_flush(k)},n.read_line=function(e){return u.caml_ml_flush(E),O(w)},n.read_int_opt=function(e){return m((u.caml_ml_flush(E),O(w)))},n.read_int=function(e){return a.caml_int_of_string((u.caml_ml_flush(E),O(w)))},n.read_float_opt=function(e){return y((u.caml_ml_flush(E),O(w)))},n.read_float=function(e){return a.caml_float_of_string((u.caml_ml_flush(E),O(w)))},n.open_out=function(e){return x({hd:1,tl:{hd:3,tl:{hd:4,tl:{hd:7,tl:0}}}},438,e)},n.open_out_bin=function(e){return x({hd:1,tl:{hd:3,tl:{hd:4,tl:{hd:6,tl:0}}}},438,e)},n.open_out_gen=x,n.flush=z,n.flush_all=S,n.output_char=U,n.output_string=N,n.output_bytes=C,n.output=function(e,n,t,r){if(t<0||r<0||t>(n.length-r|0))throw{RE_EXN_ID:"Invalid_argument",_1:"output",Error:new Error};o.resolve("caml_ml_output_bytes")(e,n,t,r)},n.output_substring=function(e,n,t,r){if(t<0||r<0||t>(n.length-r|0))throw{RE_EXN_ID:"Invalid_argument",_1:"output_substring",Error:new Error};u.caml_ml_output(e,n,t,r)},n.output_byte=P,n.output_binary_int=function(e,n){return o.resolve("caml_ml_output_int")(e,n)},n.output_value=function(e,n){o.resolve("caml_output_value")(e,n,0)},n.seek_out=function(e,n){return o.resolve("caml_ml_seek_out")(e,n)},n.pos_out=function(e){return o.resolve("caml_ml_pos_out")(e)},n.out_channel_length=function(e){return o.resolve("caml_ml_channel_size")(e)},n.close_out=function(e){u.caml_ml_flush(e),o.resolve("caml_ml_close_channel")(e)},n.close_out_noerr=function(e){try{u.caml_ml_flush(e)}catch(e){}try{return o.resolve("caml_ml_close_channel")(e)}catch(e){return}},n.set_binary_mode_out=function(e,n){return o.resolve("caml_ml_set_binary_mode")(e,n)},n.open_in=function(e){return I({hd:0,tl:{hd:7,tl:0}},0,e)},n.open_in_bin=function(e){return I({hd:0,tl:{hd:6,tl:0}},0,e)},n.open_in_gen=I,n.input_char=function(e){return o.resolve("caml_ml_input_char")(e)},n.input_line=O,n.input=function(e,n,t,r){if(t<0||r<0||t>(n.length-r|0))throw{RE_EXN_ID:"Invalid_argument",_1:"input",Error:new Error};return o.resolve("caml_ml_input")(e,n,t,r)},n.really_input=T,n.really_input_string=function(e,n){var t=r.caml_create_bytes(n);return T(e,t,0,n),r.bytes_to_string(t)},n.input_byte=function(e){return o.resolve("caml_ml_input_char")(e)},n.input_binary_int=function(e){return o.resolve("caml_ml_input_int")(e)},n.input_value=function(e){return o.resolve("caml_input_value")(e)},n.seek_in=function(e,n){return o.resolve("caml_ml_seek_in")(e,n)},n.pos_in=function(e){return o.resolve("caml_ml_pos_in")(e)},n.in_channel_length=function(e){return o.resolve("caml_ml_channel_size")(e)},n.close_in=function(e){return o.resolve("caml_ml_close_channel")(e)},n.close_in_noerr=function(e){try{return o.resolve("caml_ml_close_channel")(e)}catch(e){return}},n.set_binary_mode_in=function(e,n){return o.resolve("caml_ml_set_binary_mode")(e,n)},n.LargeFile=L,n.string_of_format=function(e){return e._1},n.$caret$caret=function(e,n){return{_0:s.concat_fmt(e._0,n._0),_1:e._1+"%,"+n._1}},n.exit=function(e){return F(),f.caml_sys_exit(e)},n.at_exit=function(e){var n={contents:!0},t=R.contents;R.contents=function(r){n.contents||(n.contents=!1,d._1(e,void 0)),d._1(t,void 0)}},n.valid_float_lexem=g,n.unsafe_really_input=A,n.do_at_exit=F,n.do_domain_local_at_exit=D},2942:(e,n,t)=>{var r=t(406),i=t(5076),o=t(2173),a=t(8420),u=t(117),l=t(5186),c=t(8954);function f(e,n,t){return i.bytes_to_string(c.sub(i.bytes_of_string(e),n,t))}function s(e,n){if(e>=n)return e;throw{RE_EXN_ID:"Invalid_argument",_1:"String.concat",Error:new Error}}function d(e){return e>13||e<9?32===e:11!==e}function v(e,n,t,r){for(;;){var i=t;if(i>=n)throw{RE_EXN_ID:l.Not_found,Error:new Error};if(e.charCodeAt(i)===r)return i;t=i+1|0}}function _(e,n,t,r){for(;;){var i=t;if(i>=n)return;if(e.charCodeAt(i)===r)return i;t=i+1|0}}function p(e,n,t){for(;;){var r=n;if(r<0)throw{RE_EXN_ID:l.Not_found,Error:new Error};if(e.charCodeAt(r)===t)return r;n=r-1|0}}function h(e,n,t){for(;;){var r=n;if(r<0)return;if(e.charCodeAt(r)===t)return r;n=r-1|0}}function m(e,n,t){var r=e.length;if(n<0||n>r)throw{RE_EXN_ID:"Invalid_argument",_1:"String.contains_from / Bytes.contains_from",Error:new Error};try{return v(e,r,n,t),!0}catch(e){var i=a.internalToOCamlException(e);if(i.RE_EXN_ID===l.Not_found)return!1;throw i}}var g=r.caml_string_compare,y=c.to_string,b=c.of_string,w=c.blit_string;n.make=function(e,n){return i.bytes_to_string(c.make(e,n))},n.init=function(e,n){return i.bytes_to_string(c.init(e,n))},n.empty="",n.of_bytes=y,n.to_bytes=b,n.concat=function(e,n){if(!n)return"";var t=e.length;return i.bytes_to_string(function(e,n,t,r,o){for(;;){var a=o,u=n;if(!a)return e;var l=a.hd;if(!a.tl)return i.caml_blit_string(l,0,e,u,l.length),e;i.caml_blit_string(l,0,e,u,l.length),i.caml_blit_string(t,0,e,u+l.length|0,r),o=a.tl,n=(u+l.length|0)+r|0}}(i.caml_create_bytes(function(e,n,t){for(;;){var r=t,i=e;if(!r)return i;var o=r.hd;if(!r.tl)return o.length+i|0;t=r.tl,e=s((o.length+n|0)+i|0,i)}}(0,t,n)),0,e,t,n))},n.cat=function(e,n){return e+n},n.equal=function(e,n){return e===n},n.compare=g,n.starts_with=function(e,n){var t=n.length,r=e.length;if(!(t>=r))return!1;for(var i=0;;){var o=i;if(o===r)return!0;if(n.charCodeAt(o)!==e.charCodeAt(o))return!1;i=o+1|0}},n.ends_with=function(e,n){var t=n.length,r=e.length,i=t-r|0;if(!(i>=0))return!1;for(var o=0;;){var a=o;if(a===r)return!0;if(n.charCodeAt(i+a|0)!==e.charCodeAt(a))return!1;o=a+1|0}},n.contains_from=m,n.rcontains_from=function(e,n,t){if(n<0||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"String.rcontains_from / Bytes.rcontains_from",Error:new Error};try{return p(e,n,t),!0}catch(e){var r=a.internalToOCamlException(e);if(r.RE_EXN_ID===l.Not_found)return!1;throw r}},n.contains=function(e,n){return m(e,0,n)},n.sub=f,n.split_on_char=function(e,n){for(var t=0,r=n.length,i=n.length-1|0;i>=0;--i)n.charCodeAt(i)===e&&(t={hd:f(n,i+1|0,(r-i|0)-1|0),tl:t},r=i);return{hd:f(n,0,r),tl:t}},n.map=function(e,n){return i.bytes_to_string(c.map(e,i.bytes_of_string(n)))},n.mapi=function(e,n){return i.bytes_to_string(c.mapi(e,i.bytes_of_string(n)))},n.fold_left=function(e,n,t){return c.fold_left(e,n,i.bytes_of_string(t))},n.fold_right=function(e,n,t){return c.fold_right(e,i.bytes_of_string(n),t)},n.for_all=function(e,n){return c.for_all(e,i.bytes_of_string(n))},n.exists=function(e,n){return c.exists(e,i.bytes_of_string(n))},n.trim=function(e){return""===e||!d(e.charCodeAt(0))&&!d(e.charCodeAt(e.length-1|0))?e:i.bytes_to_string(c.trim(i.bytes_of_string(e)))},n.escaped=function(e){var n=i.bytes_of_string(e);return i.bytes_to_string(c.unsafe_escape(n))},n.uppercase_ascii=function(e){return i.bytes_to_string(c.uppercase_ascii(i.bytes_of_string(e)))},n.lowercase_ascii=function(e){return i.bytes_to_string(c.lowercase_ascii(i.bytes_of_string(e)))},n.capitalize_ascii=function(e){return i.bytes_to_string(c.capitalize_ascii(i.bytes_of_string(e)))},n.uncapitalize_ascii=function(e){return i.bytes_to_string(c.uncapitalize_ascii(i.bytes_of_string(e)))},n.iter=function(e,n){for(var t=0,r=n.length;tr)throw{RE_EXN_ID:"Invalid_argument",_1:"String.index_from / Bytes.index_from",Error:new Error};return v(e,r,n,t)},n.index_from_opt=function(e,n,t){var r=e.length;if(n<0||n>r)throw{RE_EXN_ID:"Invalid_argument",_1:"String.index_from_opt / Bytes.index_from_opt",Error:new Error};return _(e,r,n,t)},n.rindex_from=function(e,n,t){if(n<-1||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"String.rindex_from / Bytes.rindex_from",Error:new Error};return p(e,n,t)},n.rindex_from_opt=function(e,n,t){if(n<-1||n>=e.length)throw{RE_EXN_ID:"Invalid_argument",_1:"String.rindex_from_opt / Bytes.rindex_from_opt",Error:new Error};return h(e,n,t)},n.index=function(e,n){return v(e,e.length,0,n)},n.index_opt=function(e,n){return _(e,e.length,0,n)},n.rindex=function(e,n){return p(e,e.length-1|0,n)},n.rindex_opt=function(e,n){return h(e,e.length-1|0,n)},n.to_seq=function(e){return c.to_seq(i.bytes_of_string(e))},n.to_seqi=function(e){return c.to_seqi(i.bytes_of_string(e))},n.of_seq=function(e){return i.bytes_to_string(c.of_seq(e))},n.blit=w,n.hash=function(e){return o.resolve("caml_string_hash")(0,e)},n.seeded_hash=function(e,n){return o.resolve("caml_string_hash")(e,n)}},5502:(e,n,t)=>{var r=t(8580),i=t(2173),o=t(9378),a=o.caml_sys_executable_name(void 0),u=o.os_type(void 0),l="Unix"===o.os_type(void 0),c="Win32"===o.os_type(void 0),f=r.create("Stdlib.Sys.Break");n.executable_name=a,n.getenv_opt=function(e){var n="undefined"==typeof process?void 0:process;if(void 0!==n)return n.env[e]},n.interactive={contents:!1},n.os_type=u,n.backend_type={_0:"BS"},n.unix=l,n.win32=c,n.cygwin=!1,n.word_size=32,n.int_size=32,n.big_endian=!1,n.max_string_length=2147483647,n.max_array_length=2147483647,n.max_floatarray_length=2147483647,n.set_signal=function(e,n){},n.sigabrt=-1,n.sigalrm=-2,n.sigfpe=-3,n.sighup=-4,n.sigill=-5,n.sigint=-6,n.sigkill=-7,n.sigpipe=-8,n.sigquit=-9,n.sigsegv=-10,n.sigterm=-11,n.sigusr1=-12,n.sigusr2=-13,n.sigchld=-14,n.sigcont=-15,n.sigstop=-16,n.sigtstp=-17,n.sigttin=-18,n.sigttou=-19,n.sigvtalrm=-20,n.sigprof=-21,n.sigbus=-22,n.sigpoll=-23,n.sigsys=-24,n.sigtrap=-25,n.sigurg=-26,n.sigxcpu=-27,n.sigxfsz=-28,n.Break=f,n.catch_break=function(e){},n.ocaml_version="4.14.0+mel",n.development_version=!1,n.ocaml_release={major:4,minor:14,patchlevel:0,extra:[0,"mel"]},n.enable_runtime_warnings=function(e){return i.resolve("caml_ml_enable_runtime_warnings")(e)},n.runtime_warnings_enabled=function(e){return i.resolve("caml_ml_runtime_warnings_enabled")(e)},n.Immediate64={Make:function(e,n){return{repr:1}}}},3226:(e,n)=>{n.unsafeAddProp=function(e,n,t){var r={};return r[n]=t,Object.assign({},e,r)}},6109:(e,n,t)=>{var r=t(117),i=t(2784);function o(e){if("function"==typeof Event)return new Event(e);var n=document.createEvent("Event");return n.initEvent(e,!0,!0),n}function a(e){switch(e){case"":case"/":return 0;default:for(var n=e.slice(1),t="/"===n[n.length-1|0]?n.slice(0,-1):n,r=t.split("?",2),i=(2!==r.length?t:r[0]).split("/").filter((function(e){return 0!==e.length})),o=i.length-1|0,a=0;;){var u=a,l=o;if(l<0)return u;a={hd:i[l],tl:u},o=l-1|0}}}function u(e,n){var t="undefined"==typeof window?void 0:window;return void 0!==e?a(e):void 0!==t?a(t.location.pathname):0}function l(e){var n="undefined"==typeof window?void 0:window;if(void 0===n)return"";var t=n.location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function c(e){switch(e){case"":case"?":return"";default:var n=e.split("?",2);return 2!==n.length?"":n[1]}}function f(e,n){var t="undefined"==typeof window?void 0:window;return void 0!==e?c(e):void 0!==t?c(t.location.search):""}function s(e,n){return{path:u(e),hash:l(),search:f(e)}}function d(e){var n="undefined"==typeof window?void 0:window;if(void 0===n)return function(e){};var t=function(n){r._1(e,s(void 0))};return n.addEventListener("popstate",t),t}function v(e){var n="undefined"==typeof window?void 0:window;void 0===n||n.removeEventListener("popstate",e)}var _=s;n.push=function(e){var n="undefined"==typeof history?void 0:history,t="undefined"==typeof window?void 0:window;if(void 0!==n&&void 0!==t)return n.pushState(null,"",e),void t.dispatchEvent(o("popstate"))},n.replace=function(e){var n="undefined"==typeof history?void 0:history,t="undefined"==typeof window?void 0:window;if(void 0!==n&&void 0!==t)return n.replaceState(null,"",e),void t.dispatchEvent(o("popstate"))},n.watchUrl=d,n.unwatchUrl=v,n.dangerouslyGetInitialUrl=_,n.useUrl=function(e,n){var t=i.useState((function(){return void 0!==e?e:s(void 0)})),o=t[1],a=t[0];return i.useEffect((function(){var e=d((function(e){r._1(o,(function(n){return e}))})),n=s(void 0);return function(e,n){if(e.hash!==n.hash||e.search!==n.search)return!0;for(var t=e.path,r=n.path;;){var i=r,o=t;if(!o)return!!i;if(!i)return!0;if(o.hd!==i.hd)return!0;r=i.tl,t=o.tl}}(n,a)&&r._1(o,(function(e){return n})),function(n){v(e)}}),[]),a}},6043:(e,n)=>{var t={Message:{toString:function(e){return"RightSidebarDisplayed"},fromStringOpt:function(e){if("RightSidebarDisplayed"===e)return 0}},addMessageListener:function(e){window.addEventListener("message",e,!1)},postMessage:function(e,n){e.postMessage("RightSidebarDisplayed","*")}};n.$$URLSearchParams={toArray:function(e,n){var t=[];return e.forEach((function(e,n){t.push([n,e])})),t}},n.$$Window=t,n.LocalStorage={}},9235:(e,n,t)=>{var r=t(2954),i=t(7285),o=t(9496),a=t(8549),u=t(6043),l=t(19),c=t(2942);function f(e,n,t){if(!n)return o.flatMap(a.get(e,t),(function(e){if(0===e.TAG)return e._0}));var r=n.tl;return o.flatMap(a.get(e,n.hd),(function(e){return 0===e.TAG?void 0:f(e._0,r,t)}))}n.dig=f,n.findDemo=function(e,n,t){return f(t,i.map(i.sort(i.keep(i.fromArray(u.$$URLSearchParams.toArray(e,void 0)),(function(e){return e[0].startsWith("category")})),(function(e,n){return c.compare(e[0],n[0])})),(function(e){return e[1]})),n)},n.isNestedEntityMatchSearch=function e(n,t){return r.some(a.entries(n),(function(n){var r=n[1],i=0!==l.getMatchingTerms(t,n[0]).length;return 0===r.TAG?i:!!i||e(r._0,t)}))}},462:(e,n,t)=>{var r=t(117),i=t(9717),o=t(8316),a=t(2322),u={};n.demo=function(e){var n=function(e,t,i){var o={};i[e]={TAG:1,_0:o},r._1(t,{addDemo:function(e,n){o[e]={TAG:0,_0:n}},addCategory:function(e){return function(t){return n(e,t,o)}}})};r._1(e,{addDemo:function(e,n){u[e]={TAG:0,_0:n}},addCategory:function(e){return function(t){return n(e,t,u)}}})},n.start=function(e){var n=document.querySelector("#root");null==n||o.render(a.jsx(i.App.make,{demos:u}),n)}},19:(e,n,t)=>{var r=t(2954),i=t(7285),o=t(406),a=t(3463),u=t(2784),l=t(2322);function c(e,n){if(""===e)return[];var t=e.toLowerCase();return n.toLowerCase().includes(t)?[[t]]:t.replace(/\s+/g," ").replace(/( , |, | ,)/g,",").split(",").map((function(e){return e.split(" ")})).map((function(e){return r.keepMap(e,(function(e){if(e.length>1)return e}))}))}function f(e,n){var t=e.toLowerCase().indexOf(n.toLowerCase());return[t,t+n.length|0]}function s(e,n){return 0!==e[0]?e[1]>=n?2:1:0}function d(e,n){var t=n[1],r=n[0],i=e[1],o=e[0];return!(r>i&&r>o&&t>i&&t>o)}function v(e){return i.reverse(function(e,n){for(;;){var t=n,r=e;if(!t)return r;var i=t.hd;if(r){var o=r.hd,a=t.tl;if(d(o,i)){n=a,e={hd:[o[0],i[1]],tl:r.tl};continue}n=a,e={hd:i,tl:r}}else n=t.tl,e={hd:i,tl:0}}}(0,e))}var _=o.caml_int_compare;function p(e,n){return n.map((function(n){return f(e,n)})).slice().sort((function(e,n){return o.caml_int_compare(e[0]+e[1]|0,n[0]+n[1]|0)}))}function h(e,n){var t,r=n.length,o=function(e,t,i){for(;;){var o=i,a=t,u=e;if(!o)return u{var r=t(1525),i=t(117),o=t(3226),a=t(2784),u=t(2322),l="#f5f6f6",c="#e0e2e4",f="#42484d",s={white:"#fff",lightGray:l,midGray:c,darkGray:f,black40a:"rgba(0, 0, 0, 0.4)",blue:"#0091ff",orange:"#ffae4b",transparent:"transparent"},d="2px",v="5px",_="8px";function p(e){switch(e){case 0:return d;case 1:return v;case 2:return _}}var h={xxs:d,xs:v,md:_,getGap:p},m="1px solid "+c,g={$$default:m};function y(e){return{padding:e}}function b(e){return{padding:"0 "+e}}function w(e){return{padding:e+" "+e+" 0"}}function E(e,n){var t=p(n);switch(e){case 0:return y(t);case 1:return b(t);case 2:return w(t)}}function k(e){return e?{borderBottom:m}:{}}function x(e,n,t){var r=E(e,n),i=k(t);return Object.assign({},r,i)}var S={Styles:{around:y,leftRight:b,topLeftRight:w,getPadding:E,getBorder:k,make:x},make:function(e){var n=e.gap,t=e.padding,i=e.border,o=e.id,a={children:e.children,style:x(void 0!==t?t:0,void 0!==n?n:1,void 0!==i?i:0),name:"PaddedBox"};return void 0!==o&&(a.id=r.valFromOption(o)),u.jsx("div",a)}},C={display:"grid",gridGap:v},N={Styles:{stack:C},make:function(e){var n=e.children;return u.jsx("div",{children:n,style:C,name:"Stack"})}},I="230px";function A(e){return o.unsafeAddProp({backgroundColor:l,height:e?"100vh":"auto",minWidth:I,overflowY:"auto",width:I},"WebkitOverflowScrolling","touch")}var T={Styles:{width:I,sidebar:A},make:function(e){var n=e.innerContainerId,t=e.fullHeight,i=e.children,o=void 0!==t&&t,a={children:void 0!==i?r.valFromOption(i):null,style:A(o),name:"Sidebar"};return void 0!==n&&(a.id=r.valFromOption(n)),u.jsx("div",a)}},O={desktop:u.jsx("svg",{children:u.jsxs("g",{children:[u.jsx("rect",{height:"13",width:"18",rx:"1",stroke:"currentColor",x:"2"}),u.jsx("rect",{height:"2",width:"22",fill:"currentColor",rx:"1",y:"13"})],fill:"none",fillRule:"evenodd",transform:"translate(5 8)"}),height:"32",width:"32"}),mobile:u.jsx("svg",{children:u.jsxs("g",{children:[u.jsx("rect",{height:"18",width:"10",rx:"2",stroke:"currentColor"}),u.jsx("path",{d:"M2 0h6v1a1 1 0 01-1 1H3a1 1 0 01-1-1V0z",fill:"currentColor"})],fill:"none",fillRule:"evenodd",transform:"translate(11 7)"}),height:"32",width:"32"}),sidebar:u.jsx("svg",{children:u.jsx("g",{children:u.jsx("path",{d:"M25.438 17H12.526M19 10.287L12.287 17 19 23.713M8.699 7.513v17.2"}),fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),height:"32",width:"32"}),close:u.jsx("svg",{children:u.jsx("path",{d:"M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z",fill:"gray"}),style:{display:"block"},height:"18",width:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"}),categoryCollapsed:u.jsxs("svg",{children:[u.jsx("rect",{height:"2",width:"16",x:"2",y:"1"}),u.jsx("rect",{height:"2",width:"16",x:"2",y:"7"}),u.jsx("rect",{height:"2",width:"16",x:"2",y:"13"})],height:"17",width:"20",fill:f,viewBox:"0 0 20 17",xmlns:"http://www.w3.org/2000/svg"}),categoryExpanded:u.jsxs("svg",{children:[u.jsx("rect",{height:"2",width:"16",x:"6",y:"1"}),u.jsx("rect",{height:"2",width:"2",x:"2",y:"1"}),u.jsx("rect",{height:"2",width:"12",x:"10",y:"7"}),u.jsx("rect",{height:"2",width:"2",x:"6",y:"7"}),u.jsx("rect",{height:"2",width:"12",x:"10",y:"13"}),u.jsx("rect",{height:"2",width:"2",x:"6",y:"13"})],height:"17",width:"26",fill:f,viewBox:"0 0 26 17",xmlns:"http://www.w3.org/2000/svg"})},R={cursor:"pointer",display:"flex",alignItems:"center",gridGap:"2px"};function D(e){return u.jsx("svg",{children:u.jsx("polygon",{fill:f,points:"0,0 10,0 5,6"}),style:{transition:"200ms ease-out transform",transform:e?"":"rotate(-90deg)"},height:"6",width:"10"})}var F={Styles:{clickableArea:R},triangleIcon:D,make:function(e){var n=e.title,t=e.isDefaultOpen,r=e.isForceOpen,o=e.children,l=void 0!==t&&t,c=void 0!==r&&r,f=a.useState((function(){return l})),s=f[1],d=f[0];return a.useEffect((function(){i._1(s,(function(e){return l}))}),[l]),u.jsxs("div",{children:[u.jsxs("div",{children:[D(d),n],style:R,onClick:function(e){i._1(s,(function(e){return!e}))}}),c||d?o:null]})}};n.Color=s,n.Gap=h,n.Border=g,n.BorderRadius={$$default:"5px"},n.FontSize={sm:"12px",md:"14px",lg:"20px"},n.PaddedBox=S,n.Stack=N,n.Sidebar=T,n.Icon=O,n.Collapsible=F},9717:(e,n,t)=>{var r=t(9896),i=t(9496),o=t(6604),a=t(1525),u=t(117),l=t(8549),c=t(3226),f=t(6109),s=t(6043),d=t(9235),v=t(19),_=t(3463),p=t(2942),h=t(2784),m=t(8316),g=t(2322),y={borderBottom:_.Border.$$default,display:"flex",justifyContent:"flex-end"},b={display:"flex",overflow:"hidden",borderRadius:_.BorderRadius.$$default,alignItems:"stretch",flexDirection:"row"},w={backgroundColor:_.Color.lightGray,border:"none",color:_.Color.darkGray,cursor:"pointer",display:"flex",fontSize:_.FontSize.sm,height:"32px",margin:"0",padding:"0",width:"48px",alignItems:"center",justifyContent:"center"},E=Object.assign({},w,{width:"32px"}),k=Object.assign({},w,{backgroundColor:_.Color.blue,color:_.Color.white}),x={display:"flex",flex:"1",justifyContent:"center"},S={display:"flex"};function C(e){var n=e.isSidebarHidden,t=e.responsiveMode,r=e.onRightSidebarToggle,i=e.onSetResponsiveMode;return g.jsxs("div",{children:[g.jsx("div",{style:S}),g.jsx("div",{children:g.jsx(_.PaddedBox.make,{gap:2,children:g.jsxs("div",{children:[g.jsx("button",{children:_.Icon.desktop,style:1===t?k:w,title:"Show in desktop mode",onClick:function(e){e.preventDefault(),u._1(i,(function(e){return 1}))}}),g.jsx("button",{children:_.Icon.mobile,style:0===t?k:w,title:"Show in mobile mode",onClick:function(e){e.preventDefault(),u._1(i,(function(e){return 0}))}})],style:b})}),style:x}),g.jsx("div",{children:g.jsx(_.PaddedBox.make,{gap:2,children:g.jsx("div",{children:g.jsx("button",{children:g.jsx("div",{children:_.Icon.sidebar,style:{transition:"200ms ease-in-out transform",transform:n?"rotate(0)":"rotate(180deg)"}}),style:E,title:n?"Show sidebar":"Hide sidebar",onClick:function(e){e.preventDefault(),u._1(r,void 0)}}),style:b})}),style:S})],style:y})}var N="rightSidebar";function I(e){var n,t=e.href,r=e.text,i=e.style,o=e.activeStyle,u=f.useUrl(void 0,void 0),l=(p.concat("/",u.path)+"?"+u.search).endsWith(t);if(void 0!==i){var c=a.valFromOption(i);n=l&&void 0!==o?a.some(Object.assign({},c,a.valFromOption(o))):a.some(c)}else n=void 0!==o&&l?a.some(a.valFromOption(o)):void 0;var s={children:r,href:t,onClick:function(e){var n=e.metaKey,r=e.ctrlKey;return n||r?void 0:(e.preventDefault(),f.push(t))}};return void 0!==n&&(s.style=a.valFromOption(n)),g.jsx("a",s)}var A={fontSize:_.FontSize.md,fontWeight:"500",padding:_.Gap.xs+" "+_.Gap.xxs},T={color:_.Color.blue,display:"block",fontSize:_.FontSize.md,fontWeight:"500",padding:_.Gap.xs+" "+_.Gap.md,textDecoration:"none",borderRadius:_.BorderRadius.$$default},O={backgroundColor:_.Color.midGray},R={backgroundColor:_.Color.transparent,border:"none",cursor:"pointer",display:"flex",margin:"0",padding:"0",position:"absolute",right:"7px",top:"50%",transform:"translateY(-50%)"},D={backgroundColor:_.Color.midGray,display:"flex",position:"relative",borderRadius:_.BorderRadius.$$default,alignItems:"center"},F={backgroundColor:_.Color.transparent,border:"none",fontFamily:"inherit",fontSize:_.FontSize.md,height:"32px",margin:"0",padding:_.Gap.xs+" "+_.Gap.md,width:"100%",borderRadius:_.BorderRadius.$$default,boxSizing:"border-box"};function z(e){var n=e.onClear;return g.jsx("button",{children:_.Icon.close,style:R,onClick:function(e){u._1(n,void 0)}})}function U(e){var n=e.value,t=e.onChange,r=e.onClear;return g.jsxs("div",{children:[g.jsx("input",{style:F,placeholder:"Filter",value:n,onChange:t}),""===n?null:g.jsx(z,{onClear:r})],style:D})}function P(e,n,t,r){var i=function(r,o,a,u){return l.entries(u).map((function(u){var l=u[1],c=u[0],f=v.getMatchingTerms(t,c),s=""===t||0!==f.length;if(0===l.TAG)return s||r?g.jsx(I,{href:"?demo="+encodeURIComponent(c)+a,text:g.jsx(v.make,{text:c,terms:f}),style:T,activeStyle:O},c):null;var p=l._0;if(!(s||d.isNestedEntityMatchSearch(p,t)||r))return null;var h=String(o),m="category"+h,y=n.get(m),b=null!=y&&decodeURIComponent(y)===c;return g.jsx(_.PaddedBox.make,{padding:1,children:g.jsx(_.Collapsible.make,{title:g.jsx("div",{children:g.jsx(v.make,{text:c,terms:f}),style:A}),isDefaultOpen:b||!e,isForceOpen:""!==t,children:g.jsx(_.PaddedBox.make,{padding:1,children:i(s||r,o+1|0,"&category"+h+"="+encodeURIComponent(c)+a,p)})})},c)}))};return i(!1,0,"",r)}function L(e){var n=e.urlSearchParams,t=e.demos,r=e.isCategoriesCollapsedByDefault,o=e.onToggleCollapsedCategoriesByDefault,a=h.useState((function(){})),l=a[1],c=a[0];return g.jsxs(_.Sidebar.make,{fullHeight:!0,children:[g.jsx(_.PaddedBox.make,{gap:2,border:1,children:g.jsxs("div",{children:[g.jsx("button",{children:r?_.Icon.categoryCollapsed:_.Icon.categoryExpanded,style:{backgroundColor:_.Color.white,border:_.Border.$$default,color:_.Color.darkGray,cursor:"pointer",display:"flex",fontSize:_.FontSize.sm,height:"32px",margin:"0",minWidth:"32px",padding:"0",width:"32px",borderRadius:_.BorderRadius.$$default,alignItems:"center",justifyContent:"center"},title:"Toggle default collapsed categories",onClick:function(e){e.preventDefault(),u._1(o,void 0)}}),g.jsx(U,{value:i.getWithDefault(c,""),onChange:function(e){var n=e.target.value;u._1(l,(function(e){return""===n.trim()?void 0:n}))},onClear:function(e){u._1(l,(function(e){}))}})],style:{display:"flex",alignItems:"center",gridGap:"5px"}})}),g.jsx(_.PaddedBox.make,{gap:0,children:P(r,n,i.mapWithDefault(c,"",(function(e){return e.toLowerCase()})),t)})]})}var M={backgroundColor:_.Color.white,display:"block",borderRadius:_.BorderRadius.$$default,boxShadow:"0 5px 10px rgba(0, 0, 0, 0.07)"},j={fontSize:_.FontSize.md,textAlign:"center"},B={backgroundColor:_.Color.lightGray,border:"none",fontSize:_.FontSize.md,padding:_.Gap.md,width:"100%",borderRadius:_.BorderRadius.$$default,boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.1)",boxSizing:"border-box"},G=c.unsafeAddProp({backgroundColor:_.Color.lightGray,backgroundImage:"url(\"data:image/svg+xml,%3Csvg width='36' height='36' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%2342484E' stroke-width='2' d='M12.246 14.847l5.826 5.826 5.827-5.826' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")",backgroundPosition:"center right",backgroundRepeat:"no-repeat",border:"none",fontSize:_.FontSize.md,padding:_.Gap.md,paddingRight:"30px",width:"100%",backgroundSize:"contain",borderRadius:_.BorderRadius.$$default,boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.1)",boxSizing:"border-box",appearance:"none"},"WebkitAppearance","none"),W={display:"block",fontSize:_.FontSize.md,margin:"0 auto"};function X(e){var n=e.propName,t=e.children;return g.jsx("label",{children:g.jsx(_.PaddedBox.make,{children:g.jsxs(_.Stack.make,{children:[g.jsx("div",{children:n,style:j}),t]})}),style:M})}function $(e){var n=e.strings,t=e.ints,i=e.floats,a=e.bools,l=e.onStringChange,c=e.onIntChange,f=e.onFloatChange,s=e.onBoolChange;return g.jsx(_.PaddedBox.make,{gap:2,children:g.jsxs(_.Stack.make,{children:[r.toArray(n).map((function(e){var n=e[1],t=n[2],r=n[1],i=e[0];return g.jsx(X,{propName:i,children:void 0!==t?g.jsx("select",{children:t.map((function(e){var n=e[1],t=e[0];return g.jsx("option",{children:t,selected:r===n,value:n},t)})),style:G,onChange:function(e){var n=e.target.value;u._2(l,i,n)}}):g.jsx("input",{style:B,type:"text",value:r,onChange:function(e){u._2(l,i,e.target.value)}})},i)})),r.toArray(t).map((function(e){var n=e[1],t=n[0],r=e[0];return g.jsx(X,{propName:r,children:g.jsx("input",{style:B,max:""+t.max,min:""+t.min,type:"number",value:""+n[1],onChange:function(e){u._2(c,r,o.caml_int_of_string(e.target.value))}})},r)})),r.toArray(i).map((function(e){var n=e[1],t=n[0],r=e[0];return g.jsx(X,{propName:r,children:g.jsx("input",{style:B,max:""+t.max,min:""+t.min,type:"number",value:""+n[1],onChange:function(e){u._2(f,r,o.caml_float_of_string(e.target.value))}})},r)})),r.toArray(a).map((function(e){var n=e[0];return g.jsx(X,{propName:n,children:g.jsx("input",{style:W,checked:e[1][1],type:"checkbox",onChange:function(e){u._2(s,n,e.target.checked)}})},n)}))]})})}var V={display:"flex",alignItems:"stretch",flexDirection:"row",flexGrow:"1"},q=c.unsafeAddProp({display:"flex",overflowY:"auto",alignItems:"center",flexDirection:"column",flexGrow:"1",justifyContent:"center"},"WebkitOverflowScrolling","touch");function H(e){return a.nullable_to_opt(window.parent.document.getElementById(N))}function Q(e){var n=e.demoUnit,t=h.useState((function(){})),o=t[1],l=t[0];h.useEffect((function(){var e=H();if(void 0!==e){var n=a.valFromOption(e);u._1(o,(function(e){return a.some(n)}))}}),[]),h.useEffect((function(){s.$$Window.addMessageListener((function(e){if(window.parent===e.source){var n=e.data;if(void 0!==u._1(s.$$Window.Message.fromStringOpt,n)){var t=H();if(void 0===t)return;var r=a.valFromOption(t);return u._1(o,(function(e){return a.some(r)}))}console.error("Unexpected message received")}}))}),[]);var c={contents:void 0},f={contents:void 0},d={contents:void 0},v={contents:void 0},_={string:function(e,n,t){return c.contents=r.set(c.contents,e,[t,t,n]),t},int:function(e,n){return f.contents=r.set(f.contents,e,[n,n.initial]),n.initial},float:function(e,n){return d.contents=r.set(d.contents,e,[n,n.initial]),n.initial},bool:function(e,n){return v.contents=r.set(v.contents,e,[n,n]),n}},p=h.useReducer((function(e,n){switch(0|n.TAG){case 0:var t=n._1;return{strings:r.update(e.strings,n._0,(function(e){return i.map(e,(function(e){return[e[0],t,e[2]]}))})),ints:e.ints,floats:e.floats,bools:e.bools};case 1:var o=n._1;return{strings:e.strings,ints:r.update(e.ints,n._0,(function(e){return i.map(e,(function(e){return[e[0],o]}))})),floats:e.floats,bools:e.bools};case 2:var a=n._1;return{strings:e.strings,ints:e.ints,floats:r.update(e.floats,n._0,(function(e){return i.map(e,(function(e){return[e[0],a]}))})),bools:e.bools};case 3:var u=n._1;return{strings:e.strings,ints:e.ints,floats:e.floats,bools:r.update(e.bools,n._0,(function(e){return i.map(e,(function(e){return[e[0],u]}))}))}}}),(u._1(n,_),{strings:c.contents,ints:f.contents,floats:d.contents,bools:v.contents})),y=p[1],b=p[0],w={string:function(e,n,t){return r.getExn(b.strings,e)[1]},int:function(e,n){return r.getExn(b.ints,e)[1]},float:function(e,n){return r.getExn(b.floats,e)[1]},bool:function(e,n){return r.getExn(b.bools,e)[1]}};return g.jsxs("div",{children:[g.jsx("div",{children:u._1(n,w),style:q}),void 0!==l?m.createPortal(g.jsx($,{strings:b.strings,ints:b.ints,floats:b.floats,bools:b.bools,onStringChange:function(e,n){u._1(y,{TAG:0,_0:e,_1:n})},onIntChange:function(e,n){u._1(y,{TAG:1,_0:e,_1:n})},onFloatChange:function(e,n){u._1(y,{TAG:2,_0:e,_1:n})},onBoolChange:function(e,n){u._1(y,{TAG:3,_0:e,_1:n})}}),a.valFromOption(l)):null],style:V,name:"DemoUnit"})}function K(e){return{backgroundColor:e?_.Color.white:_.Color.midGray,display:"flex",height:"1px",overflowY:"auto",alignItems:"center",flex:"1",justifyContent:"center"}}var Y=!1;function Z(e){var n=e.queryString,t=e.responsiveMode,r=e.onLoad,i=Y?"demo/index.html":"demo";return g.jsx("div",{children:g.jsx("iframe",{style:{border:"none",height:t?"100%":"667px",width:t?"100%":"375px"},src:i+"?iframe=true&"+n,onLoad:function(e){var n=e.target;u._1(r,n.contentWindow)}}),style:K(t),name:"DemoUnitFrame"})}var J={color:_.Color.darkGray,display:"flex",minHeight:"100vh",alignItems:"stretch",flexDirection:"row"},ee={display:"flex",flexDirection:"column",flexGrow:"1"},ne={display:"flex",alignItems:"center",flexDirection:"column",flexGrow:"1",justifyContent:"center"},te={color:_.Color.black40a,fontSize:_.FontSize.lg,textAlign:"center"},re={display:"flex",width:"100%",flexDirection:"column"},ie={display:"flex",alignItems:"stretch",flex:"1",flexDirection:"row"},oe={display:"flex",flex:"1",flexDirection:"column"},ae={make:function(e){var n,t=e.demos,r=f.useUrl(void 0,void 0),o=new URLSearchParams(r.search),l=o.get("iframe"),c=o.get("demo"),v=0;null==l||"true"!==l?v=1:n=null==c?0:{TAG:0,_0:o,_1:c},1===v&&(n=null==c?0:{TAG:1,_0:r.search});var p=h.useState((function(){})),m=p[1],y=p[0],b=h.useState((function(){return String(Date.now())})),w=b[1],E=b[0];h.useEffect((function(){u._1(w,(function(e){return String(Date.now())}))}),[r]);var k=h.useState((function(){return i.isSome(a.nullable_to_opt(localStorage.getItem("sidebar")))})),x=k[1],S=k[0],I=h.useState((function(){return 1})),A=I[0];h.useEffect((function(){S?localStorage.setItem("sidebar","1"):localStorage.removeItem("sidebar")}),[S]);var T,O=h.useState((function(){var e=localStorage.getItem("isCategoriesCollapsedByDefault");return null!=e&&"true"===e})),R=O[1],D=O[0],F=function(e){u._1(R,(function(e){return!D})),localStorage.setItem("isCategoriesCollapsedByDefault",D?"false":"true")};if("number"==typeof n)T=h.createElement(g.Fragment,void 0,g.jsx(L,{urlSearchParams:o,demos:t,isCategoriesCollapsedByDefault:D,onToggleCollapsedCategoriesByDefault:F}),g.jsx("div",{children:g.jsx("div",{children:"Pick a demo",style:te}),style:ne}));else if(0===n.TAG){var z=d.findDemo(n._0,n._1,t);T=g.jsx("div",{children:i.getWithDefault(i.map(z,(function(e){return g.jsx(Q,{demoUnit:e})})),"Demo not found"),style:ee})}else{var U,P="DemoUnitFrame"+E;if(S){var M="Sidebar"+E;U=g.jsx(_.Sidebar.make,{innerContainerId:N},M)}else U=null;T=h.createElement(g.Fragment,void 0,g.jsx(L,{urlSearchParams:o,demos:t,isCategoriesCollapsedByDefault:D,onToggleCollapsedCategoriesByDefault:F}),g.jsxs("div",{children:[g.jsx(C,{isSidebarHidden:!S,responsiveMode:A,onRightSidebarToggle:function(e){if(u._1(x,(function(e){return!S})),void 0!==y&&!S)return s.$$Window.postMessage(a.valFromOption(y),0)},onSetResponsiveMode:I[1]}),g.jsxs("div",{children:[g.jsx("div",{children:g.jsx(Z,{queryString:n._0,responsiveMode:A,onLoad:function(e){u._1(m,(function(n){return a.some(e)}))}},P),style:oe}),U],style:ie,name:"Demo"})],style:re,name:"Content"}))}return g.jsx("div",{children:T,style:J,name:"App"})}};n.App=ae},7320:e=>{var n=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{var r=t(2784),i=t(7320),o=t(4616);function a(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t