@pinc-official/pincjsc 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,487 @@
1
+ var Pf=Object.create;var Jo=Object.defineProperty;var Bf=Object.getOwnPropertyDescriptor;var qf=Object.getOwnPropertyNames;var Ff=Object.getPrototypeOf,zf=Object.prototype.hasOwnProperty;var Of=(t,n)=>{for(var e in n)Jo(t,e,{get:n[e],enumerable:!0})},Ms=(t,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of qf(n))!zf.call(t,o)&&o!==e&&Jo(t,o,{get:()=>n[o],enumerable:!(r=Bf(n,o))||r.enumerable});return t};var Vf=(t,n,e)=>(e=t!=null?Pf(Ff(t)):{},Ms(n||!t||!t.__esModule?Jo(e,"default",{value:t,enumerable:!0}):e,t)),Uf=t=>Ms(Jo({},"__esModule",{value:!0}),t);var Mg={};Of(Mg,{compile:()=>Xf});module.exports=Uf(Mg);var ks={};function T_(t){let n=ks[t],e=n==null?1:n+1|0;return ks[t]=e,e}function It(t){let n=T_(t);return t+("/"+n)}function Is(t){return t==null?!1:typeof t.MEL_EXN_ID=="string"}function Ls(t){return t.MEL_EXN_ID}var d=(function(n,e){var r=e??{MEL_EXN_ID:n},o=Error.call(this,n,{cause:r});return o.cause==null&&Object.defineProperty(o,"cause",{configurable:!0,enumerable:!1,writable:!0,value:r}),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,writable:!0,value:"MelangeError"}),Object.assign(o,r),o});d.prototype=Error.prototype;function Rf(t){if(Is(t))return t;let n=new d("Js__Js_exn.Error/1");return n._1=t,n}var yt=Rf;function gr(t,n,e){let r=new Array(e),o=0,i=n;for(;o<e;)r[o]=t[i],o=o+1|0,i=i+1|0;return r}function Wt(t,n,e){if(n<0||n>=t.length)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});t[n]=e}function Tt(t,n){if(n<0||n>=t.length)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});return t[n]}function Gt(t,n){let e=new Array(t);for(let r=0;r<t;++r)e[r]=n;return e}function Ds(t,n,e,r,o){if(r<=n){for(let i=0;i<o;++i)e[i+r|0]=t[i+n|0];return}for(let i=o-1|0;i>=0;--i)e[i+r|0]=t[i+n|0]}function Cn(t,n){for(;;){let e=n,r=t,o=r.length,i=o===0?1:o,_=e.length,c=i-_|0;if(c===0)return r.apply(null,e);if(c>=0)return function(s){return Cn(r,e.concat([s]))};n=gr(e,i,-c|0),t=r.apply(null,gr(e,0,i))}}function b(t,n){let e=t.length;if(e===1)return t(n);switch(e){case 1:return t(n);case 2:return function(r){return t(n,r)};case 3:return function(r,o){return t(n,r,o)};case 4:return function(r,o,i){return t(n,r,o,i)};case 5:return function(r,o,i,_){return t(n,r,o,i,_)};case 6:return function(r,o,i,_,c){return t(n,r,o,i,_,c)};case 7:return function(r,o,i,_,c,s){return t(n,r,o,i,_,c,s)};default:return Cn(t,[n])}}function $(t,n,e){let r=t.length;if(r===2)return t(n,e);switch(r){case 1:return Cn(t(n),[e]);case 2:return t(n,e);case 3:return function(o){return t(n,e,o)};case 4:return function(o,i){return t(n,e,o,i)};case 5:return function(o,i,_){return t(n,e,o,i,_)};case 6:return function(o,i,_,c){return t(n,e,o,i,_,c)};case 7:return function(o,i,_,c,s){return t(n,e,o,i,_,c,s)};default:return Cn(t,[n,e])}}function U(t,n,e,r){let o=t.length;if(o===3)return t(n,e,r);switch(o){case 1:return Cn(t(n),[e,r]);case 2:return Cn(t(n,e),[r]);case 3:return t(n,e,r);case 4:return function(i){return t(n,e,r,i)};case 5:return function(i,_){return t(n,e,r,i,_)};case 6:return function(i,_,c){return t(n,e,r,i,_,c)};case 7:return function(i,_,c,s){return t(n,e,r,i,_,c,s)};default:return Cn(t,[n,e,r])}}function ti(t,n,e,r,o){let i=t.length;if(i===4)return t(n,e,r,o);switch(i){case 1:return Cn(t(n),[e,r,o]);case 2:return Cn(t(n,e),[r,o]);case 3:return Cn(t(n,e,r),[o]);case 4:return t(n,e,r,o);case 5:return function(_){return t(n,e,r,o,_)};case 6:return function(_,c){return t(n,e,r,o,_,c)};case 7:return function(_,c,s){return t(n,e,r,o,_,c,s)};default:return Cn(t,[n,e,r,o])}}function mo(t,n,e,r,o,i){let _=t.length;if(_===5)return t(n,e,r,o,i);switch(_){case 1:return Cn(t(n),[e,r,o,i]);case 2:return Cn(t(n,e),[r,o,i]);case 3:return Cn(t(n,e,r),[o,i]);case 4:return Cn(t(n,e,r,o),[i]);case 5:return t(n,e,r,o,i);case 6:return function(c){return t(n,e,r,o,i,c)};case 7:return function(c,s){return t(n,e,r,o,i,c,s)};default:return Cn(t,[n,e,r,o,i])}}function z(t){return t===void 0?{MEL_PRIVATE_NESTED_SOME_NONE:0}:t!==null&&t.MEL_PRIVATE_NESTED_SOME_NONE!==void 0?{MEL_PRIVATE_NESTED_SOME_NONE:t.MEL_PRIVATE_NESTED_SOME_NONE+1|0}:t}function wt(t){if(!(t!==null&&t.MEL_PRIVATE_NESTED_SOME_NONE!==void 0))return t;let n=t.MEL_PRIVATE_NESTED_SOME_NONE;if(n!==0)return{MEL_PRIVATE_NESTED_SOME_NONE:n-1|0}}function De(t,n){return t<n?-1:t===n?0:1}function po(t,n){return t===n?0:t<n?-1:t>n||t===t?1:n===n?-1:0}function Ne(t,n){return t===n?0:t<n?-1:1}function Ns(t,n){return t<n?t:n}function G_(t,n){return t>n?t:n}function We(t,n){return t[1]===n[1]?t[0]===n[0]:!1}function ho(t,n){let e=n[0],r=t[0];return r>e?!0:r<e?!1:t[1]>=n[1]}function ni(t,n){return!We(t,n)}function go(t,n){return!ho(t,n)}function zr(t,n){return t[0]>n[0]?!0:t[0]<n[0]?!1:t[1]>n[1]}function v_(t,n){return!zr(t,n)}var bo=[-2147483648,0],ii=[2147483647,4294967295],Ke=[0,1],Sn=[0,0],Ps=[-1,4294967295];function j_(t){return(t&-2147483648)!==0}function Xs(t){return(t&-2147483648)===0}function rn(t){let n=(t[1]^-1)+1|0;return[(t[0]^-1)+(n===0?1:0)|0,n>>>0]}function M_(t,n,e){let r=t[1],o=r+n|0,i=j_(r)&&(j_(n)||Xs(o))||j_(n)&&Xs(o)?1:0;return[t[0]+e+i|0,o>>>0]}function ye(t,n){return M_(t,n[1],n[0])}function ei(t,n,e){let r=(n^-1)+1>>>0,o=(e^-1)+(r===0?1:0)|0;return M_(t,r,o)}function tr(t,n){return ei(t,n[1],n[0])}function ee(t,n){if(n===0)return t;let e=t[1];return n>=32?[e<<(n-32|0),0]:[e>>>(32-n|0)|t[0]<<n,e<<n>>>0]}function fn(t,n){if(n===0)return t;let e=t[0],r=n-32|0;return r===0?[0,e>>>0]:r>0?[0,e>>>r]:[e>>>n,(e<<(-r|0)|t[1]>>>n)>>>0]}function Yf(t,n){if(n===0)return t;let e=t[0];return n<32?[e>>n,(e<<(32-n|0)|t[1]>>>n)>>>0]:[e>=0?0:-1,e>>(n-32|0)>>>0]}function Qf(t){return t[0]!==0?!1:t[1]===0}function Xe(t,n){for(;;){let e=n,r=t,o,i=r[0],_=0,c=0,s=0;if(i!==0)s=4;else{if(r[1]===0)return Sn;s=4}if(s===4)if(e[0]!==0)c=3;else{if(e[1]===0)return Sn;c=3}if(c===3&&(i!==-2147483648||r[1]!==0?_=2:o=e[1]),_===2){let a=e[0],m=r[1],p=0;if(a!==-2147483648||e[1]!==0?p=3:o=m,p===3){let h=e[1];if(i<0){if(a>=0)return rn(Xe(rn(r),e));n=rn(e),t=rn(r);continue}if(a<0)return rn(Xe(r,rn(e)));let C=i>>>16,x=i&65535,y=m>>>16,S=m&65535,G=a>>>16,D=a&65535,j=h>>>16,k=h&65535,q=0,N=0,rt=0,ot=S*k;return rt=(ot>>>16)+y*k,N=rt>>>16,rt=(rt&65535)+S*j,N=N+(rt>>>16)+x*k,q=N>>>16,N=(N&65535)+y*j,q=q+(N>>>16),N=(N&65535)+S*D,q=q+(N>>>16),N=N&65535,q=q+(C*k+x*j+y*D+S*G)&65535,[N|q<<16,(ot&65535|(rt&65535)<<16)>>>0]}}return(o&1)===0?Sn:bo}}function Pn(t,n){return[t[0]|n[0],(t[1]|n[1])>>>0]}function Ce(t,n){return[t[0]&n[0],(t[1]&n[1])>>>0]}function ri(t){return t[0]*4294967296+t[1]}function oi(t){if(isNaN(t)||!isFinite(t))return Sn;if(t<=-9223372036854776e3)return bo;if(t+1>=9223372036854776e3)return ii;if(t<0)return rn(oi(-t));let n=t/4294967296|0,e=t%4294967296|0;return[n,e>>>0]}function Hf(t){let n=t[0],e=n>>21;return e===0?!0:e===-1?!(t[1]===0&&n===-2097152):!1}function Je(t){if(Hf(t))return String(ri(t));if(t[0]<0)return We(t,bo)?"-9223372036854775808":"-"+Je(rn(t));let n=oi(Math.floor(ri(t)/10)),e=n[1],r=n[0],o=ei(ei(t,e<<3,e>>>29|r<<3),e<<1,e>>>31|r<<1),i=o[1],_=o[0];if(i===0&&_===0)return Je(n)+"0";if(_<0){let a=(i^-1)+1>>>0,m=Math.ceil(a/10),p=10*m-a;return Je(ei(n,m|0,0))+String(p|0)}let c=Math.floor(i/10),s=i-10*c;return Je(M_(n,c|0,0))+String(s|0)}function br(t,n){for(;;){let e=n,r=t,o=0;if(e[0]!==0||e[1]!==0)o=1;else throw new d("Division_by_zero",{MEL_EXN_ID:"Division_by_zero"});if(o===1){let i=r[0],_=0;if(i!==-2147483648)if(i!==0)_=2;else{if(r[1]===0)return Sn;_=2}else if(r[1]!==0)_=2;else{if(We(e,Ke)||We(e,Ps))return r;if(We(e,bo))return Ke;let c=Yf(r,1),s=ee(br(c,e),1),a=0;if(s[0]!==0)a=3;else{if(s[1]===0)return e[0]<0?Ke:rn(Ke);a=3}if(a===3){let m=tr(r,Xe(e,s));return ye(s,br(m,e))}}if(_===2){let c=e[0],s=0;if(c!==-2147483648)s=3;else{if(e[1]===0)return Sn;s=3}if(s===3){if(i<0){if(c>=0)return rn(br(rn(r),e));n=rn(e),t=rn(r);continue}if(c<0)return rn(br(r,rn(e)));let a=Sn,m=r;for(;ho(m,e);){let p=Math.floor(ri(m)/ri(e)),h=1>p?1:p,C=Math.ceil(Math.log(h)/Math.LN2),x=C<=48?1:Math.pow(2,C-48),y=oi(h),S=Xe(y,e);for(;S[0]<0||zr(S,m);)h=h-x,y=oi(h),S=Xe(y,e);Qf(y)&&(y=Ke),a=ye(a,y),m=tr(m,S)}return a}}}}}function k_(t,n){return tr(t,Xe(br(t,n),n))}function yr(t,n){let e=br(t,n);return[e,tr(t,Xe(e,n))]}function Bn(t){return[t<0?-1:0,t>>>0]}function Rn(t){return t[1]|0}function Bs(t){let n=t[1],e=t[0],r=function(_){return(_>>>0).toString(16)};if(e===0&&n===0)return"0";if(n===0)return r(e)+"00000000";if(e===0)return r(n);let o=r(n),i=8-o.length|0;return i<=0?r(e)+o:r(e)+("0".repeat(i)+o)}function I_(t){return[2147483647&t[0],t[1]]}function L_(t){return(function(n,e){return new Float64Array(new Int32Array([n,e]).buffer)[0]})(t[1],t[0])}function qs(t){let n=(function(e){return new Int32Array(new Float64Array([e]).buffer)})(t);return[n[1],n[0]>>>0]}function Rt(t,n,e){if(n<0||n>=t.length)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});t[n]=e}function yo(t,n){if(n<0||n>=t.length)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});return t[n]}function Fs(t,n,e,r){if(!(e<=0))for(let o=n,i=e+n|0;o<i;++o)t[o]=r}function $t(t){if(t<0)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"String.create"});let n=new Array(t);for(let e=0;e<t;++e)n[e]=0;return n}function Cr(t,n,e,r,o){if(o<=0)return;if(t===e){if(n<r){let a=(t.length-r|0)-1|0,m=o-1|0,p=a>m?m:a;for(let h=p;h>=0;--h)t[r+h|0]=t[n+h|0];return}if(n<=r)return;let _=(t.length-n|0)-1|0,c=o-1|0,s=_>c?c:_;for(let a=0;a<=s;++a)t[r+a|0]=t[n+a|0];return}let i=t.length-n|0;if(o<=i){for(let _=0;_<o;++_)e[r+_|0]=t[n+_|0];return}for(let _=0;_<i;++_)e[r+_|0]=t[n+_|0];for(let _=i;_<o;++_)e[r+_|0]=0}function mt(t){let n=0,e=t.length,r="",o=e;if(n===0&&e<=4096&&e===t.length)return String.fromCharCode.apply(null,t);let i=0;for(;o>0;){let _=o<1024?o:1024,c=new Array(_);for(let s=0;s<_;++s)c[s]=t[s+i|0];r=r+String.fromCharCode.apply(null,c),o=o-_|0,i=i+_|0}return r}function fe(t,n,e,r,o){if(o<=0)return;let i=t.length-n|0;if(o<=i){for(let _=0;_<o;++_)e[r+_|0]=t.charCodeAt(n+_|0);return}for(let _=0;_<i;++_)e[r+_|0]=t.charCodeAt(n+_|0);for(let _=i;_<o;++_)e[r+_|0]=0}function mn(t){let n=t.length,e=new Array(n);for(let r=0;r<n;++r)e[r]=t.charCodeAt(r);return e}function _i(t){return(t&255)<<8|(t&65280)>>>8}function ci(t){return(t&255)<<24|(t&65280)<<8|(t&16711680)>>>8|(t&-16777216)>>>24}function D_(t){return Pn(Pn(Pn(Pn(Pn(Pn(Pn(ee(Ce(t,[0,255]),56),ee(Ce(t,[0,65280]),40)),ee(Ce(t,[0,16711680]),24)),ee(Ce(t,[0,4278190080]),8)),fn(Ce(t,[255,0]),8)),fn(Ce(t,[65280,0]),24)),fn(Ce(t,[16711680,0]),40)),fn(Ce(t,[-16777216,0]),56))}function si(t,n,e){let r=255&e>>>8,o=255&e;t[n]=o,t[n+1|0]=r}function Co(t,n,e){if(n<0||(n+1|0)>=t.length)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});si(t,n,e)}function N_(t,n,e){let r=255&e>>>24,o=255&e>>>16,i=255&e>>>8,_=255&e;t[n]=_,t[n+1|0]=i,t[n+2|0]=o,t[n+3|0]=r}function So(t,n,e){if(n<0||(n+3|0)>=t.length)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});N_(t,n,e)}function X_(t,n,e){let o=255&(fn(e,56)[1]|0),_=255&(fn(e,48)[1]|0),s=255&(fn(e,40)[1]|0),m=255&(fn(e,32)[1]|0),h=255&(fn(e,24)[1]|0),x=255&(fn(e,16)[1]|0),S=255&(fn(e,8)[1]|0),G=255&(e[1]|0);t[n]=G,t[n+1|0]=S,t[n+2|0]=x,t[n+3|0]=h,t[n+4|0]=m,t[n+5|0]=s,t[n+6|0]=_,t[n+7|0]=o}function P_(t,n,e){if(n<0||(n+7|0)>=t.length)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});X_(t,n,e)}var Zf=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof this<"u")return this;throw new Error("Unable to locate global `this`")}),vt=(function(t){var n=Zf();if(n[t]===void 0)throw new Error(t+` not polyfilled by Melange yet
2
+ `);return n[t]});function zs(t){return t>=65?t>=97?t>=123?-1:t-87|0:t>=91?-1:t-55|0:t>57||t<48?-1:t-48|0}function Wf(t){switch(t){case 0:return 8;case 1:return 16;case 2:return 10;case 3:return 2}}function Kf(t){let n=1,e=2,r=0;switch(t.charCodeAt(r)){case 43:r=r+1|0;break;case 45:n=-1,r=r+1|0;break}if(t[r]==="0"){let i=t.charCodeAt(r+1|0);if(i>=89)if(i>=111){if(i<121)switch(i){case 111:e=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:e=1,r=r+2|0;break}}else i===98&&(e=3,r=r+2|0);else if(i!==66){if(i>=79)switch(i){case 79:e=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:e=1,r=r+2|0;break}}else e=3,r=r+2|0}return[r,n,e]}function wo(t){let n=Kf(t),e=n[0],r=Wf(n[2]),o=4294967295,i=t.length,_=e<i?t.charCodeAt(e):0,c=zs(_);if(c<0||c>=r)throw new d("Failure",{MEL_EXN_ID:"Failure",_1:"int_of_string"});let s=function(p,h){for(;;){let C=h,x=p;if(C===i)return x;let y=t.charCodeAt(C);if(y===95){h=C+1|0;continue}let S=zs(y);if(S<0||S>=r)throw new d("Failure",{MEL_EXN_ID:"Failure",_1:"int_of_string"});let G=r*x+S;if(G>o)throw new d("Failure",{MEL_EXN_ID:"Failure",_1:"int_of_string"});h=C+1|0,p=G}},a=n[1]*s(c,e+1|0),m=a|0;if(r===10&&a!==m)throw new d("Failure",{MEL_EXN_ID:"Failure",_1:"int_of_string"});return m}function Jf(t){switch(t){case 0:return 8;case 1:return 16;case 2:return 10}}function tm(t){return t>=65&&t<=90||t>=192&&t<=214||t>=216&&t<=222?t+32|0:t}function B_(t){let n=t.length;if(n>31)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"format_int: format too long"});let e={justify:"+",signstyle:"-",filter:" ",alternate:!1,base:2,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:"f"},r=0;for(;;){let o=r;if(o>=n)return e;let i=t.charCodeAt(o),_=0;if(i>=69)if(i>=88)if(i>=121)_=1;else switch(i){case 88:e.base=1,e.uppercase=!0,r=o+1|0;continue;case 101:case 102:case 103:_=5;break;case 100:case 105:_=4;break;case 111:e.base=0,r=o+1|0;continue;case 117:e.base=2,r=o+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:_=1;break;case 120:e.base=1,r=o+1|0;continue}else if(i>=72)_=1;else{e.signedconv=!0,e.uppercase=!0,e.conv=String.fromCharCode(tm(i)),r=o+1|0;continue}else switch(i){case 35:e.alternate=!0,r=o+1|0;continue;case 32:case 43:_=2;break;case 45:e.justify="-",r=o+1|0;continue;case 46:e.prec=0;let c=o+1|0;for(;(function(){let s=t.charCodeAt(c)-48|0;return s>=0&&s<=9})();)e.prec=(Math.imul(e.prec,10)+t.charCodeAt(c)|0)-48|0,c=c+1|0;r=c;continue;case 48:e.filter="0",r=o+1|0;continue;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:_=3;break;default:_=1}switch(_){case 1:r=o+1|0;continue;case 2:e.signstyle=String.fromCharCode(i),r=o+1|0;continue;case 3:e.width=0;let c=o;for(;(function(){let s=t.charCodeAt(c)-48|0;return s>=0&&s<=9})();)e.width=(Math.imul(e.width,10)+t.charCodeAt(c)|0)-48|0,c=c+1|0;r=c;continue;case 4:e.signedconv=!0,e.base=2,r=o+1|0;continue;case 5:e.signedconv=!0,e.conv=String.fromCharCode(i),r=o+1|0;continue}}}function q_(t,n){let e=t.justify,r=t.signstyle,o=t.filter,i=t.alternate,_=t.base,c=t.signedconv,s=t.width,a=t.uppercase,m=t.sign,p=n.length;c&&(m<0||r!=="-")&&(p=p+1|0),i&&(_===0?p=p+1|0:_===1&&(p=p+2|0));let h="";if(e==="+"&&o===" ")for(let C=p;C<s;++C)h=h+o;if(c&&(m<0?h=h+"-":r!=="-"&&(h=h+r)),i&&_===0&&(h=h+"0"),i&&_===1&&(h=h+"0x"),e==="+"&&o==="0")for(let C=p;C<s;++C)h=h+o;if(h=a?h+n.toUpperCase():h+n,e==="-")for(let C=p;C<s;++C)h=h+" ";return h}function re(t,n){if(t==="%d")return String(n);let e=B_(t),o=(n<0?e.signedconv?(e.sign=-1,-n>>>0):n>>>0:n).toString(Jf(e.base));if(e.prec>=0){e.filter=" ";let i=e.prec-o.length|0;i>0&&(o="0".repeat(i)+o)}return q_(e,o)}function nm(t){if(!go(t,Sn))return Je(t);let n=[0,10],e=I_(t),r=yr(e,n),o=yr(ye([0,8],r[1]),n),i=ye(ye([214748364,3435973836],r[0]),o[0]);return Je(i)+"0123456789"[Rn(o[1])]}function em(t){let n="",e=[0,8],r="01234567";if(go(t,Sn)){let o=I_(t),i=yr(o,e),_=ye([268435456,0],i[0]),c=i[1];for(n=r[Rn(c)]+n;ni(_,Sn);){let s=yr(_,e);_=s[0],c=s[1],n=r[Rn(c)]+n}}else{let o=yr(t,e),i=o[0],_=o[1];for(n=r[Rn(_)]+n;ni(i,Sn);){let c=yr(i,e);i=c[0],_=c[1],n=r[Rn(_)]+n}}return n}function F_(t,n){if(t==="%d")return Je(n);let e=B_(t),r=e.signedconv&&go(n,Sn)?(e.sign=-1,rn(n)):n,o=e.base,i;switch(o){case 0:i=em(r);break;case 1:i=Bs(r);break;case 2:i=nm(r);break}let _;if(e.prec>=0){e.filter=" ";let c=e.prec-i.length|0;_=c>0?"0".repeat(c)+i:i}else _=i;return q_(e,_)}function xo(t,n){let e=B_(t),r=e.prec<0?6:e.prec,o=n<0?(e.sign=-1,-n):n,i="";if(isNaN(o))i="nan",e.filter=" ";else if(isFinite(o))switch(e.conv){case"e":i=o.toExponential(r);let c=i.length;i[c-3|0]==="e"&&(i=i.slice(0,c-1|0)+("0"+i.slice(c-1|0)));break;case"f":i=o.toFixed(r);break;case"g":let s=r!==0?r:1;i=o.toExponential(s-1|0);let a=i.indexOf("e"),m=Number(i.slice(a+1|0))|0;if(m<-4||o>=1e21||o.toFixed().length>s){let p=a-1|0;for(;i[p]==="0";)p=p-1|0;i[p]==="."&&(p=p-1|0),i=i.slice(0,p+1|0)+i.slice(a);let h=i.length;i[h-3|0]==="e"&&(i=i.slice(0,h-1|0)+("0"+i.slice(h-1|0)))}else{let p=s;if(m<0)p=p-(m+1|0)|0,i=o.toFixed(p);else for(;(function(){return i=o.toFixed(p),i.length>(s+1|0)})();)p=p-1|0;if(p!==0){let h=i.length-1|0;for(;i[h]==="0";)h=h-1|0;i[h]==="."&&(h=h-1|0),i=i.slice(0,h+1|0)}}break}else i="inf",e.filter=" ";return q_(e,i)}var Os=(function(t,n,e){if(!isFinite(t))return isNaN(t)?"nan":t>0?"infinity":"-infinity";var r=t==0&&1/t==-1/0?1:t>=0?0:1;r&&(t=-t);var o=0;if(t!=0)if(t<1)for(;t<1&&o>-1022;)t*=2,o--;else for(;t>=2;)t/=2,o++;var i=o<0?"":"+",_="";if(r)_="-";else switch(e){case 43:_="+";break;case 32:_=" ";break;default:break}if(n>=0&&n<13){var c=Math.pow(2,n*4);t=Math.round(t*c)/c}var s=t.toString(16);if(n>=0){var a=s.indexOf(".");if(a<0)s+="."+"0".repeat(n);else{var m=a+1+n;s.length<m?s+="0".repeat(m-s.length):s=s.substr(0,m)}}return _+"0x"+s+"p"+i+o.toString(10)}),rm=(function(t,n){var e=+t;if(t.length>0&&e===e||(t=t.replace(/_/g,""),e=+t,t.length>0&&e===e||/^[+-]?nan$/i.test(t)))return e;var r=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)p([+-]?[0-9]+)/i.exec(t);if(r){var o=r[3].replace(/0+$/,""),i=parseInt(r[1]+r[2]+o,16),_=(r[4]|0)-4*o.length;return e=i*Math.pow(2,_),e}if(/^\+?inf(inity)?$/i.test(t))return 1/0;if(/^-inf(inity)?$/i.test(t))return-1/0;throw n});function z_(t){return rm(t,new d("Failure",{MEL_EXN_ID:"Failure",_1:"float_of_string"}))}var Vs=re,O_=re;var ai={buffer:"",output:(function(t,n){let e=n.length-1|0;if(typeof process<"u"&&process.stdout&&process.stdout.write)return process.stdout.write(n);n[e]===`
3
+ `?console.log(n.slice(0,e)):console.log(n)})},V_={buffer:"",output:(function(t,n){let e=n.length-1|0;n[e]===`
4
+ `?console.log(n.slice(0,e)):console.log(n)})};function er(t){if(t.buffer!==""){t.output(t,t.buffer),t.buffer="";return}}function Us(t,n,e,r){let o=e===0&&r===n.length?n:n.slice(e,r);if(typeof process<"u"&&process.stdout&&process.stdout.write&&t===ai)return process.stdout.write(o);let i=o.lastIndexOf(`
5
+ `);i<0?t.buffer=t.buffer+o:(t.buffer=t.buffer+o.slice(0,i+1|0),er(t),t.buffer=t.buffer+o.slice(i+1|0))}function Rs(t){return{hd:ai,tl:{hd:V_,tl:0}}}function R(t,n){if(n>=t.length||n<0)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"index out of bounds"});return t.charCodeAt(n)}function U_(t){if(typeof process>"u"||process.env===void 0)throw new d("Not_found",{MEL_EXN_ID:"Not_found"});let n=process.env[t];if(n!==void 0)return n;throw new d("Not_found",{MEL_EXN_ID:"Not_found"})}var ui=(function(t){return typeof process<"u"&&process.platform==="win32"?"Win32":"Unix"});function Ys(t){if(typeof process>"u")return"";let n=process.argv;return n==null?"":n[0]}function Qs(t){if(typeof process<"u")return process.exit(t)}function jt(t){if(typeof t!="object"&&typeof t!="function")return 0;switch(t.TAG){case 0:return{TAG:0,_0:jt(t._0)};case 1:return{TAG:1,_0:jt(t._0)};case 2:return{TAG:2,_0:jt(t._0)};case 3:return{TAG:3,_0:jt(t._0)};case 4:return{TAG:4,_0:jt(t._0)};case 5:return{TAG:5,_0:jt(t._0)};case 6:return{TAG:6,_0:jt(t._0)};case 7:return{TAG:7,_0:jt(t._0)};case 8:return{TAG:8,_0:t._0,_1:jt(t._1)};case 9:let n=t._0;return{TAG:9,_0:n,_1:n,_2:jt(t._2)};case 10:return{TAG:10,_0:jt(t._0)};case 11:return{TAG:11,_0:jt(t._0)};case 12:return{TAG:12,_0:jt(t._0)};case 13:return{TAG:13,_0:jt(t._0)};case 14:return{TAG:14,_0:jt(t._0)}}}function dn(t,n){if(typeof t!="object"&&typeof t!="function")return n;switch(t.TAG){case 0:return{TAG:0,_0:dn(t._0,n)};case 1:return{TAG:1,_0:dn(t._0,n)};case 2:return{TAG:2,_0:dn(t._0,n)};case 3:return{TAG:3,_0:dn(t._0,n)};case 4:return{TAG:4,_0:dn(t._0,n)};case 5:return{TAG:5,_0:dn(t._0,n)};case 6:return{TAG:6,_0:dn(t._0,n)};case 7:return{TAG:7,_0:dn(t._0,n)};case 8:return{TAG:8,_0:t._0,_1:dn(t._1,n)};case 9:return{TAG:9,_0:t._0,_1:t._1,_2:dn(t._2,n)};case 10:return{TAG:10,_0:dn(t._0,n)};case 11:return{TAG:11,_0:dn(t._0,n)};case 12:return{TAG:12,_0:dn(t._0,n)};case 13:return{TAG:13,_0:dn(t._0,n)};case 14:return{TAG:14,_0:dn(t._0,n)}}}function Et(t,n){if(typeof t!="object"&&typeof t!="function")return n;switch(t.TAG){case 0:return{TAG:0,_0:Et(t._0,n)};case 1:return{TAG:1,_0:Et(t._0,n)};case 2:return{TAG:2,_0:t._0,_1:Et(t._1,n)};case 3:return{TAG:3,_0:t._0,_1:Et(t._1,n)};case 4:return{TAG:4,_0:t._0,_1:t._1,_2:t._2,_3:Et(t._3,n)};case 5:return{TAG:5,_0:t._0,_1:t._1,_2:t._2,_3:Et(t._3,n)};case 6:return{TAG:6,_0:t._0,_1:t._1,_2:t._2,_3:Et(t._3,n)};case 7:return{TAG:7,_0:t._0,_1:t._1,_2:t._2,_3:Et(t._3,n)};case 8:return{TAG:8,_0:t._0,_1:t._1,_2:t._2,_3:Et(t._3,n)};case 9:return{TAG:9,_0:t._0,_1:Et(t._1,n)};case 10:return{TAG:10,_0:Et(t._0,n)};case 11:return{TAG:11,_0:t._0,_1:Et(t._1,n)};case 12:return{TAG:12,_0:t._0,_1:Et(t._1,n)};case 13:return{TAG:13,_0:t._0,_1:t._1,_2:Et(t._2,n)};case 14:return{TAG:14,_0:t._0,_1:t._1,_2:Et(t._2,n)};case 15:return{TAG:15,_0:Et(t._0,n)};case 16:return{TAG:16,_0:Et(t._0,n)};case 17:return{TAG:17,_0:t._0,_1:Et(t._1,n)};case 18:return{TAG:18,_0:t._0,_1:Et(t._1,n)};case 19:return{TAG:19,_0:Et(t._0,n)};case 20:return{TAG:20,_0:t._0,_1:t._1,_2:Et(t._2,n)};case 21:return{TAG:21,_0:t._0,_1:Et(t._1,n)};case 22:return{TAG:22,_0:Et(t._0,n)};case 23:return{TAG:23,_0:t._0,_1:Et(t._1,n)};case 24:return{TAG:24,_0:t._0,_1:t._1,_2:Et(t._2,n)}}}function pn(t){throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:t})}var Ao="Failure",fi="Sys_error",mi="End_of_file";function Sr(t){return t>=0?t:-t|0}function Hs(t){return isFinite(t)?Math.abs(t)>=22250738585072014e-324?0:t!==0?1:2:isNaN(t)?4:3}function Zs(t){return t?"true":"false"}function im(t){let n=t.length,e=0;for(;;){let r=e;if(r>=n)return t+".";let o=R(t,r);if(o>=48){if(o>=58)return t;e=r+1|0;continue}if(o!==45)return t;e=r+1|0}}function di(t){return im(xo("%.12g",t))}function _m(t,n,e,r){for(;;){let o=t,i=n,_=e;if(!_){o[i]=r;return}let c=_.tl,s=_.hd;if(!c){o[i]={hd:s,tl:r};return}let a=c.tl,m=c.hd;if(!a){o[i]={hd:s,tl:{hd:m,tl:r}};return}let p={hd:a.hd,tl:24029};o[i]={hd:s,tl:{hd:m,tl:p}},e=a.tl,n="tl",t=p}}function oe(t,n){if(!t)return n;let e=t.tl,r=t.hd;if(!e)return{hd:r,tl:n};let o=e.tl,i=e.hd;if(!o)return{hd:r,tl:{hd:i,tl:n}};let _={hd:o.hd,tl:24029};return{hd:r,tl:{hd:i,tl:(_m(_,"tl",o.tl,n),_)}}}var Or=ai,Vr=V_;function cm(t){let n=Rs();for(;;){let e=n;if(!e)return;try{er(e.hd)}catch(r){let o=yt(r);if(o.MEL_EXN_ID!==fi)throw o}n=e.tl}}function H_(t,n,e,r){if(e<0||r<0||e>(n.length-r|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"output_substring"});Us(t,n,e,r)}function Ws(t,n,e){let r=vt("caml_ml_open_descriptor_in")(vt("caml_sys_open")(e,t,n));return vt("caml_ml_set_channel_name")(r,e),r}function Ks(t){return Ws({hd:0,tl:{hd:6,tl:0}},0,t)}function pi(t,n,e,r){if(e<0||r<0||e>(n.length-r|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"input"});return vt("caml_ml_input")(t,n,e,r)}function Js(t){try{return vt("caml_ml_close_channel")(t)}catch{return}}var Q_={contents:cm};function ta(t){let n={contents:!0},e=Q_.contents,r=function(o){n.contents||(n.contents=!1,b(t,void 0)),b(e,void 0)};Q_.contents=r}var sm={contents:(function(t){})};function am(t){b(sm.contents,void 0),b(Q_.contents,void 0)}function Z_(t){return am(),Qs(t)}var na="Match_failure",ea="Assert_failure",L="Invalid_argument",pt="Not_found",ra="Out_of_memory",oa="Stack_overflow";var ia="Undefined_recursive_module",qe=2147483647;function lm(t,n){return vt("caml_ml_seek_out_64")(t,n)}function um(t){return vt("caml_ml_pos_out_64")(t)}function fm(t){return vt("caml_ml_channel_size_64")(t)}function mm(t,n){return vt("caml_ml_seek_in_64")(t,n)}function dm(t){return vt("caml_ml_pos_in_64")(t)}function pm(t){return vt("caml_ml_channel_size_64")(t)}var hi={seek_out:lm,pos_out:um,out_channel_length:fm,seek_in:mm,pos_in:dm,in_channel_length:pm};var gi=(function(t,n){for(var e in t)n(e)});function Eo(t,n){if(t===n)return 0;let e=typeof t,r=typeof n;switch(e){case"bigint":if(r==="bigint")return po(t,n);break;case"boolean":if(r==="boolean")return De(t,n);break;case"function":if(r==="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"compare: functional value"});break;case"number":if(r==="number")return po(t,n);break;case"string":return r==="string"?Ne(t,n):1;case"undefined":return-1}switch(r){case"string":return-1;case"undefined":return 1;default:if(e==="boolean")return 1;if(r==="boolean")return-1;if(e==="function")return 1;if(r==="function")return-1;if(e==="number")return n===null||n.MEL_PRIVATE_NESTED_SOME_NONE!==void 0?1:-1;if(r==="number")return t===null||t.MEL_PRIVATE_NESTED_SOME_NONE!==void 0?-1:1;if(t===null)return n.MEL_PRIVATE_NESTED_SOME_NONE!==void 0?1:-1;if(n===null)return t.MEL_PRIVATE_NESTED_SOME_NONE!==void 0?-1:1;if(t.MEL_PRIVATE_NESTED_SOME_NONE!==void 0)return n.MEL_PRIVATE_NESTED_SOME_NONE!==void 0?_a(t,n):-1;let o=t.TAG,i=n.TAG;if(o===248)return De(t[1],n[1]);if(o===251)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"equal: abstract value"});if(o!==i)return o<i?-1:1;let _=t.length|0,c=n.length|0;if(_===c)if(Array.isArray(t)){let s=0;for(;;){let a=s;if(a===_)return 0;let m=Eo(t[a],n[a]);if(m!==0)return m;s=a+1|0}}else return t instanceof Date&&n instanceof Date?t-n:_a(t,n);else if(_<c){let s=0;for(;;){let a=s;if(a===_)return-1;let m=Eo(t[a],n[a]);if(m!==0)return m;s=a+1|0}}else{let s=0;for(;;){let a=s;if(a===c)return 1;let m=Eo(t[a],n[a]);if(m!==0)return m;s=a+1|0}}}}function _a(t,n){let e={contents:void 0},r={contents:void 0},o=function(p,h){let C=p[2],x=p[1];if(!(!Object.prototype.hasOwnProperty.call(x,h)||Eo(p[0][h],x[h])>0))return;let y=C.contents;if(!(y!==void 0&&h>=y)){C.contents=h;return}},i=[t,n,r],_=function(p){return o(i,p)},c=[n,t,e],s=function(p){return o(c,p)};gi(t,_),gi(n,s);let a=e.contents,m=r.contents;return a!==void 0?m!==void 0?Ne(a,m):-1:m!==void 0?1:0}function ut(t,n){if(t===n)return!0;let e=typeof t;if(e==="string"||e==="number"||e==="bigint"||e==="boolean"||e==="undefined"||t===null)return!1;let r=typeof n;if(e==="function"||r==="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"equal: functional value"});if(r==="number"||r==="bigint"||r==="undefined"||n===null)return!1;let o=t.TAG,i=n.TAG;if(o===248)return t[1]===n[1];if(o===251)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"equal: abstract value"});if(o!==i)return!1;let _=t.length|0,c=n.length|0;if(_===c)if(Array.isArray(t)){let s=0;for(;;){let a=s;if(a===_)return!0;if(!ut(t[a],n[a]))return!1;s=a+1|0}}else{if(t instanceof Date&&n instanceof Date)return!(t>n||t<n);{let s={contents:!0},a=function(p){if(!Object.prototype.hasOwnProperty.call(n,p)){s.contents=!1;return}},m=function(p){if(!Object.prototype.hasOwnProperty.call(t,p)||!ut(n[p],t[p])){s.contents=!1;return}};return gi(t,a),s.contents&&gi(n,m),s.contents}}else return!1}function wr(t,n){return(typeof t=="number"||typeof t=="bigint")&&(typeof n=="number"||typeof n=="bigint")?t!==n:!ut(t,n)}function ca(t,n){return(typeof t=="number"||typeof t=="bigint")&&(typeof n=="number"||typeof n=="bigint")?t<n:Eo(t,n)<0}function Yt(t){let n=0,e=t;for(;;){let r=e,o=n;if(!r)return o;e=r.tl,n=o+1|0}}function $o(t,n){for(;;){let e=n,r=t;if(!r)return e;n={hd:r.hd,tl:e},t=r.tl}}function Qt(t){return $o(t,0)}function hm(t,n,e,r){for(;;){let o=t,i=n,_=r;if(!_){o[i]=0;return}let c=_.tl,s=_.hd;if(c){let m=b(e,s),h={hd:b(e,c.hd),tl:24029};o[i]={hd:m,tl:h},r=c.tl,n="tl",t=h;continue}let a=b(e,s);o[i]={hd:a,tl:0};return}}function hn(t,n){if(!n)return 0;let e=n.tl,r=n.hd;if(e){let i=b(t,r),c={hd:b(t,e.hd),tl:24029};return{hd:i,tl:(hm(c,"tl",t,e.tl),c)}}return{hd:b(t,r),tl:0}}function gm(t,n,e,r,o){for(;;){let i=t,_=n,c=e,s=o;if(!s){i[_]=0;return}let a=s.tl,m=s.hd;if(a){let h=$(r,c,m),x={hd:$(r,c+1|0,a.hd),tl:24029};i[_]={hd:h,tl:x},o=a.tl,e=c+2|0,n="tl",t=x;continue}let p=$(r,c,m);i[_]={hd:p,tl:0};return}}function sa(t,n){let e=0;if(!n)return 0;let r=n.tl,o=n.hd;if(r){let _=$(t,e,o),s={hd:$(t,e+1|0,r.hd),tl:24029};return{hd:_,tl:(gm(s,"tl",e+2|0,t,r.tl),s)}}return{hd:$(t,e,o),tl:0}}function Se(t,n){for(;;){let e=n;if(!e)return;b(t,e.hd),n=e.tl}}function _t(t,n,e){for(;;){let r=e,o=n;if(!r)return o;e=r.tl,n=$(t,o,r.hd)}}function aa(t,n){for(;;){let e=n;if(!e)return!1;if(b(t,e.hd))return!0;n=e.tl}}function To(t,n){for(;;){let e=n;if(!e)return;let r=e.hd;if(ut(r[0],t))return z(r[1]);n=e.tl}}function bm(t,n,e,r,o){for(;;){let i=t,_=n,c=r,s=o;if(!s){i[_]=0;return}let a=s.tl,m=s.hd,p=c+1|0;if($(e,c,m)){let h={hd:m,tl:24029};i[_]=h,o=a,r=p,n="tl",t=h;continue}o=a,r=p}}function la(t,n){let e=0,r=n;for(;;){let o=r,i=e;if(!o)return 0;let _=o.tl,c=o.hd,s=i+1|0;if($(t,i,c)){let a={hd:c,tl:24029};return bm(a,"tl",t,s,_),a}r=_,e=s}}function bi(t,n){for(;;){let e=n;if(!e)return 0;let r=e.tl,o=b(t,e.hd);if(o!==void 0){let i={hd:wt(o),tl:24029};return ym(i,"tl",t,r),i}n=r}}function ym(t,n,e,r){for(;;){let o=t,i=n,_=r;if(!_){o[i]=0;return}let c=_.tl,s=b(e,_.hd);if(s!==void 0){let a={hd:wt(s),tl:24029};o[i]=a,r=c,n="tl",t=a;continue}r=c}}function W_(t,n){if(n){let e=b(t,n.hd),r=n.tl;if(!e)return W_(t,r);let o={hd:e.hd,tl:24029};return ua(o,"tl",e.tl,t,r),o}else return 0}function ua(t,n,e,r,o){for(;;){let i=t,_=n,c=e;if(!c){if(o)return ua(i,_,b(r,o.hd),r,o.tl);i[_]=0;return}let s={hd:c.hd,tl:24029};i[_]=s,e=c.tl,n="tl",t=s}}function fa(t,n){let e=function(r,o,i,_){for(;;){let c=r,s=o,a=i,m=_;if(a===0){c[s]=0;return}if(!m){c[s]=0;return}let p={hd:m.hd,tl:24029};c[s]=p,_=m.tl,i=a-1|0,o="tl",r=p}};if(t<=0)return 0;{if(t===0||!n)return 0;let r={hd:n.hd,tl:24029};return e(r,"tl",t-1|0,n.tl),r}}function ma(t,n){if(t<=0)return n;{let e=0,r=n;for(;;){let o=r,i=e;if(!o||i>=t)return o;r=o.tl,e=i+1|0}}}function xr(t){if(!t)return[0,0];let n=t.hd,e=xr(t.tl);return[{hd:n[0],tl:e[0]},{hd:n[1],tl:e[1]}]}function da(t,n){let e=function(c,s,a){for(;;){let m=a,p=s,h=c;if(!h)return $o(p,m);if(!p)return $o(h,m);let C=p.tl,x=p.hd,y=h.tl,S=h.hd,G=$(t,S,x);if(G===0){a={hd:S,tl:m},s=C,c=y;continue}if(G<0){a={hd:S,tl:m},c=y;continue}a={hd:x,tl:m},s=C}},r=function(c,s,a){for(;;){let m=a,p=s,h=c;if(!h)return $o(p,m);if(!p)return $o(h,m);let C=p.tl,x=p.hd,y=h.tl,S=h.hd,G=$(t,S,x);if(G===0){a={hd:S,tl:m},s=C,c=y;continue}if(G>0){a={hd:S,tl:m},c=y;continue}a={hd:x,tl:m},s=C}},o=function(c,s){if(c!==2){if(c===3&&s){let C=s.tl;if(C){let x=C.tl;if(x){let y=x.hd,S=C.hd,G=s.hd,D=$(t,G,S),j;if(D===0){let k=$(t,G,y);j=k===0?{hd:G,tl:0}:k<0?{hd:G,tl:{hd:y,tl:0}}:{hd:y,tl:{hd:G,tl:0}}}else if(D<0){let k=$(t,S,y);if(k===0)j={hd:G,tl:{hd:S,tl:0}};else if(k<0)j={hd:G,tl:{hd:S,tl:{hd:y,tl:0}}};else{let q=$(t,G,y);j=q===0?{hd:G,tl:{hd:S,tl:0}}:q<0?{hd:G,tl:{hd:y,tl:{hd:S,tl:0}}}:{hd:y,tl:{hd:G,tl:{hd:S,tl:0}}}}}else{let k=$(t,G,y);if(k===0)j={hd:S,tl:{hd:G,tl:0}};else if(k<0)j={hd:S,tl:{hd:G,tl:{hd:y,tl:0}}};else{let q=$(t,S,y);j=q===0?{hd:S,tl:{hd:G,tl:0}}:q<0?{hd:S,tl:{hd:y,tl:{hd:G,tl:0}}}:{hd:y,tl:{hd:S,tl:{hd:G,tl:0}}}}}return[j,x.tl]}}}}else if(s){let C=s.tl;if(C){let x=C.hd,y=s.hd,S=$(t,y,x);return[S===0?{hd:y,tl:0}:S<0?{hd:y,tl:{hd:x,tl:0}}:{hd:x,tl:{hd:y,tl:0}},C.tl]}}let a=c>>1,m=c-a|0,p=i(a,s),h=i(m,p[1]);return[r(p[0],h[0],0),h[1]]},i=function(c,s){if(c!==2){if(c===3&&s){let C=s.tl;if(C){let x=C.tl;if(x){let y=x.hd,S=C.hd,G=s.hd,D=$(t,G,S),j;if(D===0){let k=$(t,G,y);j=k===0?{hd:G,tl:0}:k>0?{hd:G,tl:{hd:y,tl:0}}:{hd:y,tl:{hd:G,tl:0}}}else if(D>0){let k=$(t,S,y);if(k===0)j={hd:G,tl:{hd:S,tl:0}};else if(k>0)j={hd:G,tl:{hd:S,tl:{hd:y,tl:0}}};else{let q=$(t,G,y);j=q===0?{hd:G,tl:{hd:S,tl:0}}:q>0?{hd:G,tl:{hd:y,tl:{hd:S,tl:0}}}:{hd:y,tl:{hd:G,tl:{hd:S,tl:0}}}}}else{let k=$(t,G,y);if(k===0)j={hd:S,tl:{hd:G,tl:0}};else if(k>0)j={hd:S,tl:{hd:G,tl:{hd:y,tl:0}}};else{let q=$(t,S,y);j=q===0?{hd:S,tl:{hd:G,tl:0}}:q>0?{hd:S,tl:{hd:y,tl:{hd:G,tl:0}}}:{hd:y,tl:{hd:S,tl:{hd:G,tl:0}}}}}return[j,x.tl]}}}}else if(s){let C=s.tl;if(C){let x=C.hd,y=s.hd,S=$(t,y,x);return[S===0?{hd:y,tl:0}:S>0?{hd:y,tl:{hd:x,tl:0}}:{hd:x,tl:{hd:y,tl:0}},C.tl]}}let a=c>>1,m=c-a|0,p=o(a,s),h=o(m,p[1]);return[e(p[0],h[0],0),h[1]]},_=Yt(n);return _<2?n:o(_,n)[0]}function Cm(t,n,e){for(;;){let r=t,o=n,_=b(e,void 0);if(typeof _!="object"&&typeof _!="function"){r[o]=0;return}let c=_._0,s=b(_._1,void 0);if(typeof s!="object"&&typeof s!="function"){r[o]={hd:c,tl:0};return}let a={hd:s._0,tl:24029};r[o]={hd:c,tl:a},e=s._1,n="tl",t=a}}function pa(t){let n=b(t,void 0);if(typeof n!="object"&&typeof n!="function")return 0;let e=n._0,r=b(n._1,void 0);if(typeof r!="object"&&typeof r!="function")return{hd:e,tl:0};let o={hd:r._0,tl:24029};return{hd:e,tl:(Cm(o,"tl",r._1),o)}}function ha(t,n,e){return t.v===n?(t.v=e,!0):!1}function K_(t,n){let e=t.v;return t.v=e+n|0,e}function ga(t){K_(t,1)}var Lg=Ys(),ba=ui();var Ar=!1,Dg=ui()==="Unix",Ng=ui()==="Win32";function ya(t){let n=typeof process>"u"?void 0:process;if(n!==void 0)return n.env[t]}var yi=65536;var tc=32;var Mn=2147483647,Ur=2147483647;var Xg=Ur-2|0;var nc=253,Ci=254;function Rr(t,n,e){for(;;){let r=e,o=n,i=b(r,void 0);if(typeof i!="object"&&typeof i!="function")return o;let _=$(t,o,i._0);e=i._1,n=_}}function Sa(t){let n=function(u){return typeof u!="object"&&typeof u!="function"?0:u.h},e=function(u,f,l,g){let w=n(u),E=n(g);return{TAG:0,l:u,v:f,d:l,r:g,h:w>=E?w+1|0:E+1|0}},r=function(u,f){return{TAG:0,l:0,v:u,d:f,r:0,h:1}},o=function(u,f,l,g){let w;w=typeof u!="object"&&typeof u!="function"?0:u.h;let E;if(E=typeof g!="object"&&typeof g!="function"?0:g.h,w>(E+2|0)){if(typeof u!="object"&&typeof u!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let ct=u.r,un=u.d,Ut=u.v,Le=u.l;if(n(Le)>=n(ct))return e(Le,Ut,un,e(ct,f,l,g));if(!(typeof ct!="object"&&typeof ct!="function"))return e(e(Le,Ut,un,ct.l),ct.v,ct.d,e(ct.r,f,l,g));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})}if(E<=(w+2|0))return{TAG:0,l:u,v:f,d:l,r:g,h:w>=E?w+1|0:E+1|0};if(typeof g!="object"&&typeof g!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let v=g.r,I=g.d,B=g.v,H=g.l;if(n(v)>=n(H))return e(e(u,f,l,H),B,I,v);if(!(typeof H!="object"&&typeof H!="function"))return e(e(u,f,l,H.l),H.v,H.d,e(H.r,B,I,v));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})},i=function(u){return typeof u!="object"&&typeof u!="function"},_=function(u){if(typeof u!="object"&&typeof u!="function")return!1;let f=u.l;if(!(typeof f!="object"&&typeof f!="function"))return!1;let l=u.r;return typeof l!="object"&&typeof l!="function"},c=function(u,f,l){if(typeof l!="object"&&typeof l!="function")return{TAG:0,l:0,v:u,d:f,r:0,h:1};let g=l.r,w=l.d,E=l.v,v=l.l,I=$(t.compare,u,E);if(I===0)return w===f?l:{TAG:0,l:v,v:u,d:f,r:g,h:l.h};if(I<0){let H=c(u,f,v);return v===H?l:o(H,E,w,g)}let B=c(u,f,g);return g===B?l:o(v,E,w,B)},s=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")throw new d(pt,{MEL_EXN_ID:pt});let g=$(t.compare,u,l.v);if(g===0)return l.d;f=g<0?l.l:l.r}},a=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")throw new d(pt,{MEL_EXN_ID:pt});let g=l.v;if(b(u,g)){let w=g,E=l.d,v=l.l;for(;;){let I=v,B=E,H=w;if(typeof I!="object"&&typeof I!="function")return[H,B];let ct=I.v;if(b(u,ct)){v=I.l,E=I.d,w=ct;continue}v=I.r}}f=l.r}},m=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;let g=l.v;if(b(u,g)){let w=g,E=l.d,v=l.l;for(;;){let I=v,B=E,H=w;if(typeof I!="object"&&typeof I!="function")return[H,B];let ct=I.v;if(b(u,ct)){v=I.l,E=I.d,w=ct;continue}v=I.r}}f=l.r}},p=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")throw new d(pt,{MEL_EXN_ID:pt});let g=l.v;if(b(u,g)){let w=g,E=l.d,v=l.r;for(;;){let I=v,B=E,H=w;if(typeof I!="object"&&typeof I!="function")return[H,B];let ct=I.v;if(b(u,ct)){v=I.r,E=I.d,w=ct;continue}v=I.l}}f=l.l}},h=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;let g=l.v;if(b(u,g)){let w=g,E=l.d,v=l.r;for(;;){let I=v,B=E,H=w;if(typeof I!="object"&&typeof I!="function")return[H,B];let ct=I.v;if(b(u,ct)){v=I.r,E=I.d,w=ct;continue}v=I.l}}f=l.l}},C=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;let g=$(t.compare,u,l.v);if(g===0)return z(l.d);f=g<0?l.l:l.r}},x=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return!1;let g=$(t.compare,u,l.v);if(g===0)return!0;f=g<0?l.l:l.r}},y=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")throw new d(pt,{MEL_EXN_ID:pt});let l=f.l;if(typeof l!="object"&&typeof l!="function")return[f.v,f.d];u=l}},S=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")return;let l=f.l;if(typeof l!="object"&&typeof l!="function")return[f.v,f.d];u=l}},G=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")throw new d(pt,{MEL_EXN_ID:pt});let l=f.r;if(typeof l!="object"&&typeof l!="function")return[f.v,f.d];u=f.r}},D=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")return;let l=f.r;if(typeof l!="object"&&typeof l!="function")return[f.v,f.d];u=f.r}},j=function(u){if(typeof u!="object"&&typeof u!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.remove_min_elt"});let f=u.l;return typeof f!="object"&&typeof f!="function"?u.r:o(j(f),u.v,u.d,u.r)},k=function(u,f){if(typeof u!="object"&&typeof u!="function")return f;if(typeof f!="object"&&typeof f!="function")return u;let l=y(f);return o(u,l[0],l[1],j(f))},q=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.r,g=f.d,w=f.v,E=f.l,v=$(t.compare,u,w);if(v===0)return k(E,l);if(v<0){let B=q(u,E);return E===B?f:o(B,w,g,l)}let I=q(u,l);return l===I?f:o(E,w,g,I)},N=function(u,f,l){if(typeof l!="object"&&typeof l!="function"){let H=b(f,void 0);return H!==void 0?{TAG:0,l:0,v:u,d:wt(H),r:0,h:1}:0}let g=l.r,w=l.d,E=l.v,v=l.l,I=$(t.compare,u,E);if(I===0){let H=b(f,z(w));if(H===void 0)return k(v,g);let ct=wt(H);return w===ct?l:{TAG:0,l:v,v:u,d:ct,r:g,h:l.h}}if(I<0){let H=N(u,f,v);return v===H?l:o(H,E,w,g)}let B=N(u,f,g);return g===B?l:o(v,E,w,B)},rt=function(u,f,l){return N(u,function(w){return w!==void 0?{hd:f,tl:w}:{hd:f,tl:0}},l)},ot=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;ot(u,l.l),$(u,l.v,l.d),f=l.r}},Z=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=Z(u,f.l),g=b(u,f.d),w=Z(u,f.r);return{TAG:0,l,v:f.v,d:g,r:w,h:f.h}},Ct=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.v,g=Ct(u,f.l),w=$(u,l,f.d),E=Ct(u,f.r);return{TAG:0,l:g,v:l,d:w,r:E,h:f.h}},X=function(u,f,l){for(;;){let g=l,w=f;if(typeof w!="object"&&typeof w!="function")return g;l=U(u,w.v,w.d,X(u,w.l,g)),f=w.r}},O=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return!0;if(!$(u,l.v,l.d)||!O(u,l.l))return!1;f=l.r}},M=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return!1;if($(u,l.v,l.d)||M(u,l.l))return!0;f=l.r}},V=function(u,f,l){return typeof l!="object"&&typeof l!="function"?r(u,f):o(V(u,f,l.l),l.v,l.d,l.r)},gt=function(u,f,l){return typeof l!="object"&&typeof l!="function"?r(u,f):o(l.l,l.v,l.d,gt(u,f,l.r))},tt=function(u,f,l,g){if(typeof u!="object"&&typeof u!="function")return V(f,l,g);let w=u.h;if(typeof g!="object"&&typeof g!="function")return gt(f,l,u);let E=g.h;return w>(E+2|0)?o(u.l,u.v,u.d,tt(u.r,f,l,g)):E>(w+2|0)?o(tt(u,f,l,g.l),g.v,g.d,g.r):e(u,f,l,g)},St=function(u,f){if(typeof u!="object"&&typeof u!="function")return f;if(typeof f!="object"&&typeof f!="function")return u;let l=y(f);return tt(u,l[0],l[1],j(f))},lt=function(u,f,l,g){return l!==void 0?tt(u,f,wt(l),g):St(u,g)},J=function(u,f){if(typeof f!="object"&&typeof f!="function")return[0,void 0,0];let l=f.r,g=f.d,w=f.v,E=f.l,v=$(t.compare,u,w);if(v===0)return[E,z(g),l];if(v<0){let B=J(u,E);return[B[0],B[1],tt(B[2],w,g,l)]}let I=J(u,l);return[tt(E,w,g,I[0]),I[1],I[2]]},Mt=function(u,f,l){if(typeof f!="object"&&typeof f!="function"){if(typeof l!="object"&&typeof l!="function")return 0}else{let E=f.v;if(f.h>=n(l)){let v=J(E,l);return lt(Mt(u,f.l,v[0]),E,U(u,E,z(f.d),v[1]),Mt(u,f.r,v[2]))}}if(typeof l!="object"&&typeof l!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["jscomp/stdlib/map.ml",413,10]});let g=l.v,w=J(g,f);return lt(Mt(u,w[0],l.l),g,U(u,g,w[1],z(l.d)),Mt(u,w[2],l.r))},ln=function(u,f,l){if(typeof f!="object"&&typeof f!="function")return l;let g=f.d,w=f.v;if(typeof l!="object"&&typeof l!="function")return f;let E=l.d,v=l.v;if(f.h>=l.h){let un=J(w,l),Ut=un[1],Le=ln(u,f.l,un[0]),fo=ln(u,f.r,un[2]);return Ut!==void 0?lt(Le,w,U(u,w,g,wt(Ut)),fo):tt(Le,w,g,fo)}let I=J(v,f),B=I[1],H=ln(u,I[0],l.l),ct=ln(u,I[2],l.r);return B!==void 0?lt(H,v,U(u,v,wt(B),E),ct):tt(H,v,E,ct)},se=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.r,g=f.d,w=f.v,E=f.l,v=se(u,E),I=$(u,w,g),B=se(u,l);return I?E===v&&l===B?f:tt(v,w,g,B):St(v,B)},Nn=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.v,g=Nn(u,f.l),w=$(u,l,f.d),E=Nn(u,f.r);return w!==void 0?tt(g,l,wt(w),E):St(g,E)},Kn=function(u,f){if(typeof f!="object"&&typeof f!="function")return[0,0];let l=f.d,g=f.v,w=Kn(u,f.l),E=w[1],v=w[0],I=$(u,g,l),B=Kn(u,f.r),H=B[1],ct=B[0];return I?[tt(v,g,l,ct),St(E,H)]:[St(v,ct),tt(E,g,l,H)]},tn=function(u,f){for(;;){let l=f,g=u;if(typeof g!="object"&&typeof g!="function")return l;f={TAG:0,_0:g.v,_1:g.d,_2:g.r,_3:l},u=g.l}},Jn=function(u,f,l){let g=tn(f,0),w=tn(l,0);for(;;){let E=w,v=g;if(typeof v!="object"&&typeof v!="function")return typeof E!="object"&&typeof E!="function"?0:-1;if(typeof E!="object"&&typeof E!="function")return 1;let I=$(t.compare,v._0,E._0);if(I!==0)return I;let B=$(u,v._1,E._1);if(B!==0)return B;w=tn(E._2,E._3),g=tn(v._2,v._3)}},mr=function(u,f,l){let g=tn(f,0),w=tn(l,0);for(;;){let E=w,v=g;if(typeof v!="object"&&typeof v!="function")return typeof E!="object"&&typeof E!="function";if(typeof E!="object"&&typeof E!="function"||$(t.compare,v._0,E._0)!==0||!$(u,v._1,E._1))return!1;w=tn(E._2,E._3),g=tn(v._2,v._3)}},ae=function(u){return typeof u!="object"&&typeof u!="function"?0:(ae(u.l)+1|0)+ae(u.r)|0},Un=function(u,f){for(;;){let l=f,g=u;if(typeof l!="object"&&typeof l!="function")return g;f=l.l,u={hd:[l.v,l.d],tl:Un(g,l.r)}}},le=function(u){return Un(0,u)},Ze=function(u){return _t((function(f,l){return c(l[0],l[1],f)}),0,u)},te=function(u,f){return Rr((function(l,g){return c(g[0],g[1],l)}),f,u)},dr=function(u){return te(u,0)},ue=function(u,f){if(typeof u!="object"&&typeof u!="function")return 0;let l=tn(u._2,u._3);return{TAG:0,_0:[u._0,u._1],_1:(function(g){return ue(l,g)})}},pr=function(u){let f=tn(u,0);return function(l){return ue(f,l)}},hr=function(u,f){for(;;){let l=f,g=u;if(typeof g!="object"&&typeof g!="function")return l;f={TAG:0,_0:g.v,_1:g.d,_2:g.l,_3:l},u=g.r}},ge=function(u,f){if(typeof u!="object"&&typeof u!="function")return 0;let l=hr(u._2,u._3);return{TAG:0,_0:[u._0,u._1],_1:(function(g){return ge(l,g)})}};return{empty:0,add:c,add_to_list:rt,update:N,singleton:r,remove:q,merge:Mt,union:ln,cardinal:ae,bindings:le,min_binding:y,min_binding_opt:S,max_binding:G,max_binding_opt:D,choose:y,choose_opt:S,find:s,find_opt:C,find_first:a,find_first_opt:m,find_last:p,find_last_opt:h,iter:ot,fold:X,map:Z,mapi:Ct,filter:se,filter_map:Nn,partition:Kn,split:J,is_empty:i,is_singleton:_,mem:x,equal:mr,compare:Jn,for_all:O,exists:M,to_list:le,of_list:Ze,to_seq:pr,to_rev_seq:function(u){let f=hr(u,0);return function(l){return ge(f,l)}},to_seq_from:function(u,f){let g=function(w,E,v){for(;;){let I=v,B=E;if(typeof B!="object"&&typeof B!="function")return I;let H=B.r,ct=B.d,un=B.v,Ut=$(t.compare,un,w);if(Ut===0)return{TAG:0,_0:un,_1:ct,_2:H,_3:I};if(Ut<0){E=H;continue}v={TAG:0,_0:un,_1:ct,_2:H,_3:I},E=B.l}}(u,f,0);return function(w){return ue(g,w)}},add_seq:te,of_seq:dr}}function wa(t,n){return t<<n|t>>>(32-n|0)|0}function Fe(t,n){let e=n;e=Math.imul(e,-862048943),e=wa(e,15),e=Math.imul(e,461845907);let r=t^e;return r=wa(r,13),(r+(r<<2)|0)-430675100|0}function Si(t){let n=t^t>>>16;return n=Math.imul(n,-2048144789),n=n^n>>>13,n=Math.imul(n,-1028477387),n^n>>>16}function ec(t,n){let e=n.length,r=(e/4|0)-1|0,o=t;for(let _=0;_<=r;++_){let c=_<<2,s=n.charCodeAt(c)|n.charCodeAt(c+1|0)<<8|n.charCodeAt(c+2|0)<<16|n.charCodeAt(c+3|0)<<24;o=Fe(o,s)}let i=e&3;if(i!==0){let _=i===3?n.charCodeAt(e-1|0)<<16|n.charCodeAt(e-2|0)<<8|n.charCodeAt(e-3|0):i===2?n.charCodeAt(e-1|0)<<8|n.charCodeAt(e-2|0):n.charCodeAt(e-1|0);o=Fe(o,_)}return o=o^e,o}function rc(t,n){let e={content:n,next:void 0},r=t.last;r!==void 0?(t.length=t.length+1|0,r.next=e,t.last=e):(t.length=1,t.first=e,t.last=e)}function Am(t){let n=t.first,e=n.next;return e!==void 0?(t.length=t.length-1|0,t.first=e):(t.length=0,t.first=void 0,t.last=void 0),n.content}function rr(t,n,e,r){let o=e;switch(typeof r){case"number":let _=r|0;return o=Fe(o,(_+_|0)+1|0),Si(o);case"string":return o=ec(o,r),Si(o);default:let c={length:0,first:void 0,last:void 0},s=t;for(rc(c,r),s=s-1|0;c.length!==0&&s>0;){let a=Am(c);switch(typeof a){case"boolean":let p=a?1:0;o=Fe(o,(p+p|0)+1|0),s=s-1|0;break;case"number":let h=a|0;o=Fe(o,(h+h|0)+1|0),s=s-1|0;break;case"string":o=ec(o,a),s=s-1|0;break;case"function":case"symbol":case"undefined":break;default:let C=a.length|0;if(C!==0){let x=a.TAG,y=C<<10|x;if(x===248)o=Fe(o,a[1]);else{o=Fe(o,y);let S=C-1|0,G=S<s?S:s;for(let D=0;D<=G;++D)rc(c,a[D])}}else{let x=(function(y,S){var G=0;for(var D in y)S(y[D]),++G;return G})(a,(function(y){rc(c,y)}));o=Fe(o,x<<10|0)}}}return Si(o)}}function Go(t,n){if(t===0)return[];if(t<0)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Array.init"});let e=Gt(t,b(n,0));for(let r=1;r<t;++r)e[r]=b(n,r);return e}function oc(t){let n=t.length;return n===0?[]:gr(t,0,n)}function xa(t,n){let e=t.length;return e===0?oc(n):n.length===0?gr(t,0,e):t.concat(n)}function Aa(t,n,e){if(n<0||e<0||n>(t.length-e|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Array.sub"});return gr(t,n,e)}function ic(t,n,e,r){if(n<0||e<0||n>(t.length-e|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Array.fill"});for(let o=n,i=n+e|0;o<i;++o)t[o]=r}function ir(t,n,e,r,o){if(o<0||n<0||n>(t.length-o|0)||r<0||r>(e.length-o|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Array.blit"});Ds(t,n,e,r,o)}function _e(t,n){for(let e=0,r=n.length;e<r;++e)b(t,n[e])}function vo(t,n){let e=n.length;if(e===0)return[];let r=Gt(e,b(t,n[0]));for(let o=1;o<e;++o)r[o]=b(t,n[o]);return r}function Ea(t,n){for(let e=0,r=n.length;e<r;++e)$(t,e,n[e])}function _c(t){let n=t.length-1|0,e=0;for(;;){let r=e,o=n;if(o<0)return r;e={hd:t[o],tl:r},n=o-1|0}}function $m(t,n){for(;;){let e=n,r=t;if(!e)return r;n=e.tl,t=r+1|0}}function jo(t){if(!t)return[];let n=Gt($m(0,t),t.hd),e=1,r=t.tl;for(;;){let o=r,i=e;if(!o)return n;n[i]=o.hd,r=o.tl,e=i+1|0}}function Mo(t,n,e){let r=n;for(let o=0,i=e.length;o<i;++o)r=$(t,r,e[o]);return r}function $a(t,n){let e=n.length,r=0;for(;;){let o=r;if(o===e)return;if(b(t,n[o]))return o;r=o+1|0}}function ko(t){if(t<0||t>255)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Char.chr"});return t}function Ta(t){let n=0;if(t>=40){if(t===92)return"\\\\";n=t>=127?1:2}else if(t>=32){if(t>=39)return"\\'";n=2}else if(t>=14)n=1;else switch(t){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:let e=[0,0,0,0];return e[0]=92,e[1]=48+(t/100|0)|0,e[2]=48+(t/10|0)%10|0,e[3]=48+t%10|0,mt(e);case 2:let r=[0];return r[0]=t,mt(r)}}function wi(t){return t>90||t<65?t:t+32|0}function Io(t){return t>122||t<97?t:t-32|0}function Er(t,n){return t<=n?t:n}function ze(t,n){return t>=n?t:n}var zg=Rn([1431655765,1431655765]),Og=Rn([858993459,858993459]),Vg=Rn([252645135,252645135]);function gn(t,n){let e=$t(t);return Fs(e,0,t,n),e}function cc(t,n){let e=$t(t);for(let r=0;r<t;++r)e[r]=b(n,r);return e}function Mm(t){let n=t.length,e=$t(n);return Cr(t,0,e,0,n),e}function xi(t,n,e){if(n<0||e<0||n>(t.length-e|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"String.sub / Bytes.sub"});let r=$t(e);return Cr(t,n,r,0,e),r}function xe(t,n,e){return mt(xi(t,n,e))}function $r(t,n,e,r,o){if(o<0||n<0||n>(t.length-o|0)||r<0||r>(e.length-o|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Bytes.blit"});Cr(t,n,e,r,o)}function Hn(t,n,e,r,o){if(o<0||n<0||n>(t.length-o|0)||r<0||r>(e.length-o|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"String.blit / Bytes.blit_string"});fe(t,n,e,r,o)}function Ga(t){let n=0;for(let r=0,o=t.length;r<o;++r){let i=t[r];n=n+(i>=32?i>92||i<34?i>=127?4:1:i>91||i<35?2:1:i>=11?i!==13?4:2:i>=8?2:4)|0}if(n===t.length)return t;let e=$t(n);n=0;for(let r=0,o=t.length;r<o;++r){let i=t[r],_=0;if(i>=35)i!==92?i>=127?_=1:e[n]=i:_=2;else if(i>=32)i>=34?_=2:e[n]=i;else if(i>=14)_=1;else switch(i){case 8:e[n]=92,n=n+1|0,e[n]=98;break;case 9:e[n]=92,n=n+1|0,e[n]=116;break;case 10:e[n]=92,n=n+1|0,e[n]=110;break;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 11:case 12:_=1;break;case 13:e[n]=92,n=n+1|0,e[n]=114;break}switch(_){case 1:e[n]=92,n=n+1|0,e[n]=48+(i/100|0)|0,n=n+1|0,e[n]=48+(i/10|0)%10|0,n=n+1|0,e[n]=48+i%10|0;break;case 2:e[n]=92,n=n+1|0,e[n]=i;break}n=n+1|0}return e}function Ai(t,n){let e=n.length;if(e===0)return n;let r=$t(e);for(let o=0;o<e;++o)r[o]=b(t,n[o]);return r}function Ei(t,n){let e=n.length,r=0;for(;;){let o=r;if(o===e)return!1;if(b(t,n[o]))return!0;r=o+1|0}}function va(t,n){let e=n.length,r=0;for(;;){let o=r;if(o===e)return!0;if(!b(t,n[o]))return!1;r=o+1|0}}function sc(t){return Ai(Io,t)}function Lo(t){return Ai(wi,t)}function km(t,n){if(n.length===0)return n;let e=Mm(n);return e[0]=b(t,n[0]),e}function ja(t){return km(Io,t)}function Ma(t,n,e){return Ar?Co(t,n,_i(e)):Co(t,n,e)}function ka(t,n,e){return Ar?So(t,n,ci(e)):So(t,n,e)}function ac(t,n){let e=yo(t,n),r=t.length-1|0,o=0;if(e>=224)if(e>=237){if(e>=245)return 16842749;switch(e){case 237:let i=n+1|0;if(i>r)return 16842749;let _=t[i];if(_>>>5!==4)return 16842749;let c=i+1|0;if(c>r)return 33619965;let s=t[c];return s>>>6!==2?33619965:184549376|((e&15)<<12|(_&63)<<6|s&63);case 238:case 239:o=1;break;case 240:let m=n+1|0;if(m>r)return 16842749;let p=t[m];if(p<144||191<p)return 16842749;let h=m+1|0;if(h>r)return 33619965;let C=t[h];if(C>>>6!==2)return 33619965;let x=h+1|0;if(x>r)return 50397181;let y=t[x];return y>>>6!==2?50397181:201326592|((e&7)<<18|(p&63)<<12|(C&63)<<6|y&63);case 241:case 242:case 243:o=2;break;case 244:let G=n+1|0;if(G>r)return 16842749;let D=t[G];if(D>>>4!==8)return 16842749;let j=G+1|0;if(j>r)return 33619965;let k=t[j];if(k>>>6!==2)return 33619965;let q=j+1|0;if(q>r)return 50397181;let N=t[q];return N>>>6!==2?50397181:201326592|((e&7)<<18|(D&63)<<12|(k&63)<<6|N&63)}}else if(e>=225)o=1;else{let i=n+1|0;if(i>r)return 16842749;let _=t[i];if(_>>>5!==5)return 16842749;let c=i+1|0;if(c>r)return 33619965;let s=t[c];return s>>>6!==2?33619965:184549376|((e&15)<<12|(_&63)<<6|s&63)}else{if(e<128)return 150994944|e;if(e<194)return 16842749;let i=n+1|0;if(i>r)return 16842749;let _=t[i];return _>>>6!==2?16842749:167772160|((e&31)<<6|_&63)}switch(o){case 1:let i=n+1|0;if(i>r)return 16842749;let _=t[i];if(_>>>6!==2)return 16842749;let c=i+1|0;if(c>r)return 33619965;let s=t[c];return s>>>6!==2?33619965:184549376|((e&15)<<12|(_&63)<<6|s&63);case 2:let m=n+1|0;if(m>r)return 16842749;let p=t[m];if(p>>>6!==2)return 16842749;let h=m+1|0;if(h>r)return 33619965;let C=t[h];if(C>>>6!==2)return 33619965;let x=h+1|0;if(x>r)return 50397181;let y=t[x];return y>>>6!==2?50397181:201326592|((e&7)<<18|(p&63)<<12|(C&63)<<6|y&63)}}function Ia(t,n,e){let r=t.length-1|0;if(e<0)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["jscomp/stdlib/bytes.ml",654,20]});if(e<=127)return Rt(t,n,e),1;if(e<=2047){let o=n+1|0;return o>r?0:(Rt(t,n,192|e>>>6),t[o]=128|e&63,2)}if(e<=65535){let o=n+2|0;return o>r?0:(Rt(t,n,224|e>>>12),t[n+1|0]=128|e>>>6&63,t[o]=128|e&63,3)}if(e<=1114111){let o=n+3|0;return o>r?0:(Rt(t,n,240|e>>>18),t[n+1|0]=128|e>>>12&63,t[n+2|0]=128|e>>>6&63,t[o]=128|e&63,4)}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["jscomp/stdlib/bytes.ml",679,9]})}function Im(t){return re("%X",t)+" is not a Unicode scalar value"}function $i(t){return 0<=t&&t<=55295?!0:57344<=t?t<=1114111:!1}function Ti(t){if($i(t))return t;let n=Im(t);throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:n})}function Fn(t,n){return mt(gn(t,n))}function Na(t,n){return mt(cc(t,n))}function Bt(t,n,e){return n===0&&t.length===e?t:mt(xi(mn(t),n,e))}function Nm(t,n){if(t>=n)return t;throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"String.concat"})}function Xm(t,n,e){for(;;){let r=e,o=t;if(!r)return o;let i=r.hd;if(!r.tl)return i.length+o|0;e=r.tl,t=Nm((i.length+n|0)+o|0,o)}}function Pm(t,n,e,r,o){for(;;){let i=o,_=n;if(!i)return t;let c=i.hd;if(i.tl){fe(c,0,t,_,c.length),fe(e,0,t,_+c.length|0,r),o=i.tl,n=(_+c.length|0)+r|0;continue}return fe(c,0,t,_,c.length),t}}function wn(t,n){if(!n)return"";if(!n.tl)return n.hd;let e=t.length;return mt(Pm($t(Xm(0,e,n)),0,t,e,n))}function Xa(t,n){for(let e=0,r=n.length;e<r;++e)b(t,n.charCodeAt(e))}function No(t,n){for(let e=0,r=n.length;e<r;++e)$(t,e,n.charCodeAt(e))}function Pa(t,n){return mt(Ai(t,mn(n)))}function Ba(t,n){return va(t,mn(n))}function qa(t){let n=mn(t),e=Ga(n);return n===e?t:mt(e)}function Bm(t,n,e,r){for(;;){let o=e;if(o>=n)throw new d(pt,{MEL_EXN_ID:pt});if(t.charCodeAt(o)===r)return o;e=o+1|0}}function qm(t,n,e){let r=t.length;if(n<0||n>r)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"String.contains_from / Bytes.contains_from"});try{return Bm(t,r,n,e),!0}catch(o){let i=yt(o);if(i.MEL_EXN_ID===pt)return!1;throw i}}function Fa(t,n){return qm(t,0,n)}function Gi(t){return mt(Lo(mn(t)))}function Tr(t){return mt(ja(mn(t)))}function Gr(t,n){let e=n.length,r=t.length;if(e>=r){let o=0;for(;;){let i=o;if(i===r)return!0;if(n.charCodeAt(i)!==t.charCodeAt(i))return!1;o=i+1|0}}else return!1}function za(t,n){let e=n.length,r=t.length,o=e-r|0;if(o>=0){let i=0;for(;;){let _=i;if(_===r)return!0;if(n.charCodeAt(o+_|0)!==t.charCodeAt(_))return!1;i=_+1|0}}else return!1}function vi(t,n){let e=0,r=n.length;for(let o=n.length-1|0;o>=0;--o)n.charCodeAt(o)===t&&(e={hd:Bt(n,o+1|0,(r-o|0)-1|0),tl:e},r=o);return{hd:Bt(n,0,r),tl:e}}var Xo=Ne;var fc="";var st=Sa({compare:Xo}),Po=st.map,mc=st.mapi;function vr(t,n,e){let r={contents:n},o=$(Po,(function(i){let _=$(e,r.contents,i);return r.contents=_[0],_[1]}),t);return[r.contents,o]}function Oa(t,n,e){let r={contents:n},o=$(mc,(function(i,_){let c=U(e,i,r.contents,_);return r.contents=c[0],c[1]}),t);return[r.contents,o]}var ji=st.empty,jr=st.add,Va=st.add_to_list,Cb=st.update,Ua=st.singleton,Ra=st.remove,Sb=st.merge,Ya=st.union,Hr=st.cardinal,Zr=st.bindings,wb=st.min_binding,xb=st.min_binding_opt,Ab=st.max_binding,Eb=st.max_binding_opt,$b=st.choose,Tb=st.choose_opt,Mi=st.find,bn=st.find_opt,Gb=st.find_first,vb=st.find_first_opt,jb=st.find_last,Mb=st.find_last_opt,_r=st.iter,Mr=st.fold,kb=st.filter,Ib=st.filter_map,Lb=st.partition,Db=st.split,dc=st.is_empty,Nb=st.is_singleton,Xb=st.mem,Fm=st.equal,zm=st.compare,Pb=st.for_all,Bb=st.exists,qb=st.to_list,Ae=st.of_list,Fb=st.to_seq,zb=st.to_rev_seq,Ob=st.to_seq_from,Vb=st.add_seq,Ub=st.of_seq;function ki(t,n,e,r,o){return{name:t,kind:n,address:e,is_mutable:o,level:r}}function Om(t){return t.name}function Vm(t){return t.kind}function Um(t){return t.address}function Rm(t){return t.level}function Ym(t){return t.is_mutable}var Wr={make:ki,name:Om,kind:Vm,address:Um,level:Rm,is_mutable:Ym};function Qa(t){return{store:ji,free_variables:0,num_bindings:0,outer:void 0,scope:0}}function Ha(t){return t.scope=t.scope+1|0,t}function Za(t){return t.scope=t.scope-1|0,t}function Wa(t){let n={store:ji,free_variables:0,num_bindings:0,outer:void 0,scope:0};return{store:n.store,free_variables:n.free_variables,num_bindings:n.num_bindings,outer:t,scope:n.scope}}function Ka(t){let n=t.outer;if(n!==void 0)return n;throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/symbol_table.ml",64,12]})}function pc(t,n,e,r){let o=t.outer,_=ki(n,r||o===void 0?0:1,t.num_bindings,t.scope,e);return[{store:U(jr,n,_,t.store),free_variables:t.free_variables,num_bindings:t.num_bindings+1|0,outer:t.outer,scope:t.scope},_]}function Qm(t,n){let e=n.name,r=n.is_mutable,o=n.level,i=ki(e,2,Yt(t.free_variables),o,r);return[{store:U(jr,e,i,t.store),free_variables:oe(t.free_variables,{hd:n,tl:0}),num_bindings:t.num_bindings,outer:t.outer,scope:t.scope},i]}function Ja(t,n){let e=ki(n,3,0,t.scope,!1);return[{store:U(jr,n,e,t.store),free_variables:t.free_variables,num_bindings:t.num_bindings,outer:t.outer,scope:t.scope},e]}function hc(t,n){let e=$(bn,n,t.store),r=t.outer;if(e!==void 0)return e.level<=t.scope?[t,e]:[t,void 0];if(r===void 0)return[t,void 0];let o=hc(r,n),i=o[1],_=o[0];if(i===void 0)return[{store:t.store,free_variables:t.free_variables,num_bindings:t.num_bindings,outer:_,scope:t.scope},void 0];if(i.kind===0)return[{store:t.store,free_variables:t.free_variables,num_bindings:t.num_bindings,outer:_,scope:t.scope},i];let s=Qm(t,i),a=s[0];return[{store:a.store,free_variables:a.free_variables,num_bindings:a.num_bindings,outer:_,scope:a.scope},s[1]]}function bt(t){let n=t<1?1:t,e=n>Mn?Mn:n,r=$t(e);return{inner:{buffer:r,length:e},position:0,initial_buffer:r}}function W(t){return xe(t.inner.buffer,0,t.position)}function tl(t,n,e){if(n<0||e<0||n>(t.position-e|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Buffer.sub"});return xe(t.inner.buffer,n,e)}function gc(t){t.position=0}function nl(t){t.position=0;let n=t.initial_buffer,e=t.initial_buffer.length,r={buffer:n,length:e};t.inner=r}function Ve(t,n){let e=t.position,o=t.inner.length;for(;(e+n|0)>o;)o=o<<1;if(o>Mn)if((e+n|0)<=Mn)o=Mn;else throw new d("Failure",{MEL_EXN_ID:"Failure",_1:"Buffer.add: cannot grow buffer"});let i=$t(o);$r(t.inner.buffer,0,i,0,t.position),t.inner={buffer:i,length:o}}function it(t,n){let e=t.position,r=t.inner;e>=r.length?(Ve(t,1),Rt(t.inner.buffer,t.position,n)):r.buffer[e]=n,t.position=e+1|0}function el(t,n){for(;;){let e=t.position;e>=t.inner.length&&Ve(t,4);let r=Ia(t.inner.buffer,e,n);if(r!==0){t.position=e+r|0;return}Ve(t,4)}}function Ii(t,n,e,r){if(e<0||r<0||e>(n.length-r|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Buffer.add_substring"});let o=t.position,i=t.inner,_=o+r|0;_>i.length?(Ve(t,r),Hn(n,e,t.inner.buffer,t.position,r)):fe(n,e,i.buffer,o,r),t.position=_}function Zm(t,n,e,r){if(e<0||r<0||e>(n.length-r|0))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Buffer.add_subbytes"});let o=t.position,i=t.inner,_=o+r|0;_>i.length?(Ve(t,r),$r(n,e,t.inner.buffer,t.position,r)):Cr(n,e,i.buffer,o,r),t.position=_}function Lt(t,n){Ii(t,n,0,n.length)}function Li(t,n){Zm(t,n,0,n.length)}function Dt(t,n){let e=t.position,r=t.inner,o=e+1|0;o>r.length?(Ve(t,1),Rt(t.inner.buffer,t.position,n)):r.buffer[e]=n,t.position=o}function Wm(t,n){let e=t.position,r=t.inner,o=e+2|0;o>r.length?(Ve(t,2),Co(t.inner.buffer,t.position,n)):si(r.buffer,e,n),t.position=o}function Km(t,n){let e=t.position,r=t.inner,o=e+4|0;o>r.length?(Ve(t,4),So(t.inner.buffer,t.position,n)):N_(r.buffer,e,n),t.position=o}function Jm(t,n){let e=t.position,r=t.inner,o=e+8|0;o>r.length?(Ve(t,8),P_(t.inner.buffer,t.position,n)):X_(r.buffer,e,n),t.position=o}function bc(t,n){Wm(t,Ar?_i(n):n)}function qt(t,n){Km(t,Ar?ci(n):n)}function Di(t,n){Jm(t,Ar?D_(n):n)}function yc(t){return t[1]===5?12:-6}function ol(t,n){let e=t.bytes.length,r=t.ind+n|0;if(r<=e)return;let o=ze(e<<1,r),i=$t(o);$r(t.bytes,0,i,0,e),t.bytes=i}function Jr(t,n){ol(t,1),Rt(t.bytes,t.ind,n),t.ind=t.ind+1|0}function _n(t,n){let e=n.length;ol(t,e),Hn(n,0,t.bytes,t.ind,e),t.ind=t.ind+e|0}function il(t){return xe(t.bytes,0,t.ind)}function n0(t,n){let e=t!==void 0?t:70;switch(n[1]){case 0:return 102;case 1:return 101;case 2:return 69;case 3:return 103;case 4:return 71;case 5:return e;case 6:return 104;case 7:return 72;case 8:return 70}}function e0(t,n){switch(n[0]){case 0:break;case 1:Jr(t,43);break;case 2:Jr(t,32);break}if(n[1]===8)return Jr(t,35)}function r0(t){if(typeof t!="object"&&typeof t!="function")switch(t){case 0:return"@]";case 1:return"@}";case 2:return"@?";case 3:return`@
6
+ `;case 4:return"@.";case 5:return"@@";case 6:return"@%"}else switch(t.TAG){case 0:case 1:return t._0;case 2:return"@"+mt(gn(1,t._0))}}function wc(t,n){for(;;){let e=n;if(typeof e!="object"&&typeof e!="function")return;switch(e.TAG){case 0:_n(t,"%c"),n=e._0;continue;case 1:_n(t,"%s"),n=e._0;continue;case 2:_n(t,"%i"),n=e._0;continue;case 3:_n(t,"%li"),n=e._0;continue;case 4:_n(t,"%ni"),n=e._0;continue;case 5:_n(t,"%Li"),n=e._0;continue;case 6:_n(t,"%f"),n=e._0;continue;case 7:_n(t,"%B"),n=e._0;continue;case 8:_n(t,"%{"),wc(t,e._0),_n(t,"%}"),n=e._1;continue;case 9:_n(t,"%("),wc(t,e._0),_n(t,"%)"),n=e._2;continue;case 10:_n(t,"%a"),n=e._0;continue;case 11:_n(t,"%t"),n=e._0;continue;case 12:_n(t,"%?"),n=e._0;continue;case 13:_n(t,"%r"),n=e._0;continue;case 14:_n(t,"%_r"),n=e._0;continue}}}function Vt(t){if(typeof t!="object"&&typeof t!="function")return 0;switch(t.TAG){case 0:return{TAG:0,_0:Vt(t._0)};case 1:return{TAG:1,_0:Vt(t._0)};case 2:return{TAG:2,_0:Vt(t._0)};case 3:return{TAG:3,_0:Vt(t._0)};case 4:return{TAG:4,_0:Vt(t._0)};case 5:return{TAG:5,_0:Vt(t._0)};case 6:return{TAG:6,_0:Vt(t._0)};case 7:return{TAG:7,_0:Vt(t._0)};case 8:return{TAG:8,_0:t._0,_1:Vt(t._1)};case 9:return{TAG:9,_0:t._1,_1:t._0,_2:Vt(t._2)};case 10:return{TAG:10,_0:Vt(t._0)};case 11:return{TAG:11,_0:Vt(t._0)};case 12:return{TAG:12,_0:Vt(t._0)};case 13:return{TAG:13,_0:Vt(t._0)};case 14:return{TAG:14,_0:Vt(t._0)}}}function cn(t){if(typeof t!="object"&&typeof t!="function")return[(function(n){return 0}),(function(n){return 0}),(function(n){return 0}),(function(n){return 0})];switch(t.TAG){case 0:let n=cn(t._0),e=n[1],r=n[0];return[(function(l){return b(r,0),0}),(function(l){return b(e,0),0}),n[2],n[3]];case 1:let o=cn(t._0),i=o[1],_=o[0];return[(function(l){return b(_,0),0}),(function(l){return b(i,0),0}),o[2],o[3]];case 2:let c=cn(t._0),s=c[1],a=c[0];return[(function(l){return b(a,0),0}),(function(l){return b(s,0),0}),c[2],c[3]];case 3:let m=cn(t._0),p=m[1],h=m[0];return[(function(l){return b(h,0),0}),(function(l){return b(p,0),0}),m[2],m[3]];case 4:let C=cn(t._0),x=C[1],y=C[0];return[(function(l){return b(y,0),0}),(function(l){return b(x,0),0}),C[2],C[3]];case 5:let S=cn(t._0),G=S[1],D=S[0];return[(function(l){return b(D,0),0}),(function(l){return b(G,0),0}),S[2],S[3]];case 6:let j=cn(t._0),k=j[1],q=j[0];return[(function(l){return b(q,0),0}),(function(l){return b(k,0),0}),j[2],j[3]];case 7:let N=cn(t._0),rt=N[1],ot=N[0];return[(function(l){return b(ot,0),0}),(function(l){return b(rt,0),0}),N[2],N[3]];case 8:let Z=cn(t._1),Ct=Z[1],X=Z[0];return[(function(l){return b(X,0),0}),(function(l){return b(Ct,0),0}),Z[2],Z[3]];case 9:let O=cn(t._2),M=O[3],V=O[2],gt=O[1],tt=O[0],St=Ht(Vt(t._0),t._1),lt=cn(St),J=lt[3],Mt=lt[2],ln=lt[1],se=lt[0];return[(function(l){return b(tt,0),b(se,0),0}),(function(l){return b(ln,0),b(gt,0),0}),(function(l){return b(V,0),b(Mt,0),0}),(function(l){return b(J,0),b(M,0),0})];case 10:let Nn=cn(t._0),Kn=Nn[1],tn=Nn[0];return[(function(l){return b(tn,0),0}),(function(l){return b(Kn,0),0}),Nn[2],Nn[3]];case 11:let Jn=cn(t._0),mr=Jn[1],ae=Jn[0];return[(function(l){return b(ae,0),0}),(function(l){return b(mr,0),0}),Jn[2],Jn[3]];case 12:let Un=cn(t._0),le=Un[1],Ze=Un[0];return[(function(l){return b(Ze,0),0}),(function(l){return b(le,0),0}),Un[2],Un[3]];case 13:let te=cn(t._0),dr=te[3],ue=te[2],pr=te[1],hr=te[0];return[(function(l){return b(hr,0),0}),(function(l){return b(pr,0),0}),(function(l){return b(ue,0),0}),(function(l){return b(dr,0),0})];case 14:let ge=cn(t._0),x_=ge[3],A_=ge[2],u=ge[1],f=ge[0];return[(function(l){return b(f,0),0}),(function(l){return b(u,0),0}),(function(l){return b(A_,0),0}),(function(l){return b(x_,0),0})]}}function Ht(t,n){let e=0;if(typeof t!="object"&&typeof t!="function"){if(typeof n!="object"&&typeof n!="function")return 0;switch(n.TAG){case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break;default:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",850,23]})}}else switch(t.TAG){case 0:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 0:return{TAG:0,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 1:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 1:return{TAG:1,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 2:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 2:return{TAG:2,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 3:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 3:return{TAG:3,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 4:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 4:return{TAG:4,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 5:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 5:return{TAG:5,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 6:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 6:return{TAG:6,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 7:if(typeof n!="object"&&typeof n!="function")e=8;else switch(n.TAG){case 7:return{TAG:7,_0:Ht(t._0,n._0)};case 8:e=6;break;case 9:e=7;break;case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break}break;case 8:if(typeof n!="object"&&typeof n!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",836,26]});switch(n.TAG){case 8:return{TAG:8,_0:Ht(t._0,n._0),_1:Ht(t._1,n._1)};case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break;default:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",836,26]})}break;case 9:if(typeof n!="object"&&typeof n!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",846,28]});switch(n.TAG){case 8:e=6;break;case 9:let r=Ht(Vt(t._1),n._0),o=cn(r);return b(o[1],0),b(o[3],0),{TAG:9,_0:t._0,_1:n._1,_2:Ht(t._2,n._2)};case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:e=5;break;default:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",846,28]})}break;case 10:if(typeof n!="object"&&typeof n!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",814,21]});if(n.TAG===10)return{TAG:10,_0:Ht(t._0,n._0)};throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",814,21]});case 11:if(typeof n!="object"&&typeof n!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",818,21]});switch(n.TAG){case 10:e=1;break;case 11:return{TAG:11,_0:Ht(t._0,n._0)};default:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",818,21]})}break;case 12:if(typeof n!="object"&&typeof n!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",822,19]});switch(n.TAG){case 10:e=1;break;case 11:e=2;break;case 12:return{TAG:12,_0:Ht(t._0,n._0)};default:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",822,19]})}break;case 13:if(typeof n!="object"&&typeof n!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",826,22]});switch(n.TAG){case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:return{TAG:13,_0:Ht(t._0,n._0)};default:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",826,22]})}break;case 14:if(typeof n!="object"&&typeof n!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",831,30]});switch(n.TAG){case 10:e=1;break;case 11:e=2;break;case 12:e=3;break;case 13:e=4;break;case 14:return{TAG:14,_0:Ht(t._0,n._0)};default:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",831,30]})}break}switch(e){case 1:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",815,21]});case 2:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",819,21]});case 3:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",823,19]});case 4:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",827,22]});case 5:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",832,30]});case 6:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",837,26]});case 7:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",847,28]});case 8:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",851,23]})}}var T=It("CamlinternalFormat.Type_mismatch");function Xi(t,n){if(typeof t!="object"&&typeof t!="function")return{TAG:0,_0:0,_1:n};if(t.TAG===0)return{TAG:0,_0:{TAG:0,_0:t._0,_1:t._1},_1:n};if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===2)return{TAG:0,_0:{TAG:1,_0:t._0},_1:n._0};throw new d(T,{MEL_EXN_ID:T})}function Bo(t,n,e){let r=Xi(t,e);if(!(typeof n!="object"&&typeof n!="function"))return{TAG:0,_0:r._0,_1:{TAG:0,_0:n._0},_2:r._1};if(n===0)return{TAG:0,_0:r._0,_1:0,_2:r._1};let o=r._1;if(typeof o!="object"&&typeof o!="function")throw new d(T,{MEL_EXN_ID:T});if(o.TAG===2)return{TAG:0,_0:r._0,_1:1,_2:o._0};throw new d(T,{MEL_EXN_ID:T})}function At(t,n){if(typeof t!="object"&&typeof t!="function")return{TAG:0,_0:0,_1:n};switch(t.TAG){case 0:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===0){let M=At(t._0,n._0);return{TAG:0,_0:{TAG:0,_0:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 1:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===0){let M=At(t._0,n._0);return{TAG:0,_0:{TAG:1,_0:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 2:let e=Xi(t._0,n),r=e._1;if(typeof r!="object"&&typeof r!="function")throw new d(T,{MEL_EXN_ID:T});if(r.TAG===1){let M=At(t._1,r._0);return{TAG:0,_0:{TAG:2,_0:e._0,_1:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 3:let o=Xi(t._0,n),i=o._1;if(typeof i!="object"&&typeof i!="function")throw new d(T,{MEL_EXN_ID:T});if(i.TAG===1){let M=At(t._1,i._0);return{TAG:0,_0:{TAG:3,_0:o._0,_1:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 4:let _=Bo(t._1,t._2,n),c=_._2;if(typeof c!="object"&&typeof c!="function")throw new d(T,{MEL_EXN_ID:T});if(c.TAG===2){let M=At(t._3,c._0);return{TAG:0,_0:{TAG:4,_0:t._0,_1:_._0,_2:_._1,_3:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 5:let s=Bo(t._1,t._2,n),a=s._2;if(typeof a!="object"&&typeof a!="function")throw new d(T,{MEL_EXN_ID:T});if(a.TAG===3){let M=At(t._3,a._0);return{TAG:0,_0:{TAG:5,_0:t._0,_1:s._0,_2:s._1,_3:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 6:let m=Bo(t._1,t._2,n),p=m._2;if(typeof p!="object"&&typeof p!="function")throw new d(T,{MEL_EXN_ID:T});if(p.TAG===4){let M=At(t._3,p._0);return{TAG:0,_0:{TAG:6,_0:t._0,_1:m._0,_2:m._1,_3:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 7:let h=Bo(t._1,t._2,n),C=h._2;if(typeof C!="object"&&typeof C!="function")throw new d(T,{MEL_EXN_ID:T});if(C.TAG===5){let M=At(t._3,C._0);return{TAG:0,_0:{TAG:7,_0:t._0,_1:h._0,_2:h._1,_3:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 8:let x=Bo(t._1,t._2,n),y=x._2;if(typeof y!="object"&&typeof y!="function")throw new d(T,{MEL_EXN_ID:T});if(y.TAG===6){let M=At(t._3,y._0);return{TAG:0,_0:{TAG:8,_0:t._0,_1:x._0,_2:x._1,_3:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 9:let S=Xi(t._0,n),G=S._1;if(typeof G!="object"&&typeof G!="function")throw new d(T,{MEL_EXN_ID:T});if(G.TAG===7){let M=At(t._1,G._0);return{TAG:0,_0:{TAG:9,_0:S._0,_1:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 10:let D=At(t._0,n);return{TAG:0,_0:{TAG:10,_0:D._0},_1:D._1};case 11:let j=At(t._1,n);return{TAG:0,_0:{TAG:11,_0:t._0,_1:j._0},_1:j._1};case 12:let k=At(t._1,n);return{TAG:0,_0:{TAG:12,_0:t._0,_1:k._0},_1:k._1};case 13:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===8){let M=n._0;if(wr({TAG:0,_0:t._1},{TAG:0,_0:M}))throw new d(T,{MEL_EXN_ID:T});let V=At(t._2,n._1);return{TAG:0,_0:{TAG:13,_0:t._0,_1:M,_2:V._0},_1:V._1}}throw new d(T,{MEL_EXN_ID:T});case 14:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===9){let M=n._0;if(wr({TAG:0,_0:jt(t._1)},{TAG:0,_0:jt(M)}))throw new d(T,{MEL_EXN_ID:T});let V=At(t._2,jt(n._2));return{TAG:0,_0:{TAG:14,_0:t._0,_1:M,_2:V._0},_1:V._1}}throw new d(T,{MEL_EXN_ID:T});case 15:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===10){let M=At(t._0,n._0);return{TAG:0,_0:{TAG:15,_0:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 16:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===11){let M=At(t._0,n._0);return{TAG:0,_0:{TAG:16,_0:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 17:let q=At(t._1,n);return{TAG:0,_0:{TAG:17,_0:t._0,_1:q._0},_1:q._1};case 18:let N=t._0,rt=t._1;if(N.TAG===0){let M=N._0,V=At(M._0,n),gt=At(rt,V._1);return{TAG:0,_0:{TAG:18,_0:{TAG:0,_0:{TAG:0,_0:V._0,_1:M._1}},_1:gt._0},_1:gt._1}}let ot=N._0,Z=At(ot._0,n),Ct=At(rt,Z._1);return{TAG:0,_0:{TAG:18,_0:{TAG:1,_0:{TAG:0,_0:Z._0,_1:ot._1}},_1:Ct._0},_1:Ct._1};case 19:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===13){let M=At(t._0,n._0);return{TAG:0,_0:{TAG:19,_0:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 20:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===1){let M=At(t._2,n._0);return{TAG:0,_0:{TAG:20,_0:t._0,_1:t._1,_2:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 21:if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===2){let M=At(t._1,n._0);return{TAG:0,_0:{TAG:21,_0:t._0,_1:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T});case 23:let X=t._0,O=t._1;if(typeof X!="object"&&typeof X!="function"){if(X!==2)return Cc(X,O,n);if(typeof n!="object"&&typeof n!="function")throw new d(T,{MEL_EXN_ID:T});if(n.TAG===14){let M=At(O,n._0);return{TAG:0,_0:{TAG:23,_0:2,_1:M._0},_1:M._1}}throw new d(T,{MEL_EXN_ID:T})}else switch(X.TAG){case 8:return Cc({TAG:8,_0:X._0,_1:X._1},O,n);case 9:let M=In(X._1,O,n),V=M._1;return{TAG:0,_0:{TAG:23,_0:{TAG:9,_0:X._0,_1:M._0},_1:V._0},_1:V._1};default:return Cc(X,O,n)}case 22:case 24:throw new d(T,{MEL_EXN_ID:T})}}function Cc(t,n,e){let r=At(n,e);return{TAG:0,_0:{TAG:23,_0:t,_1:r._0},_1:r._1}}function In(t,n,e){if(typeof t!="object"&&typeof t!="function")return{TAG:0,_0:0,_1:At(n,e)};switch(t.TAG){case 0:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===0){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:0,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 1:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===1){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:1,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 2:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===2){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:2,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 3:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===3){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:3,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 4:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===4){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:4,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 5:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===5){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:5,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 6:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===6){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:6,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 7:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===7){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:7,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 8:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===8){let r=e._0;if(wr({TAG:0,_0:t._0},{TAG:0,_0:r}))throw new d(T,{MEL_EXN_ID:T});let o=In(t._1,n,e._1);return{TAG:0,_0:{TAG:8,_0:r,_1:o._0},_1:o._1}}throw new d(T,{MEL_EXN_ID:T});case 9:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===9){let r=e._1,o=e._0;if(wr({TAG:0,_0:jt(t._0)},{TAG:0,_0:jt(o)}))throw new d(T,{MEL_EXN_ID:T});if(wr({TAG:0,_0:jt(t._1)},{TAG:0,_0:jt(r)}))throw new d(T,{MEL_EXN_ID:T});let i=Ht(Vt(o),r),_=cn(i);b(_[1],0),b(_[3],0);let c=In(jt(t._2),n,e._2);return{TAG:0,_0:{TAG:9,_0:o,_1:r,_2:Vt(c._0)},_1:c._1}}throw new d(T,{MEL_EXN_ID:T});case 10:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===10){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:10,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 11:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===11){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:11,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 12:throw new d(T,{MEL_EXN_ID:T});case 13:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===13){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:13,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T});case 14:if(typeof e!="object"&&typeof e!="function")throw new d(T,{MEL_EXN_ID:T});if(e.TAG===14){let r=In(t._0,n,e._0);return{TAG:0,_0:{TAG:14,_0:r._0},_1:r._1}}throw new d(T,{MEL_EXN_ID:T})}}function o0(t,n){let e=At(t,n),r=e._1;if(typeof r!="object"&&typeof r!="function")return e._0;throw new d(T,{MEL_EXN_ID:T})}function i0(t,n){return o0(t,jt(Vt(n)))}function On(t,n,e){let r=e.length,o=Sr(n),i=n<0?0:t;if(o<=r)return e;let _=gn(o,i===2?48:32);switch(i){case 0:Hn(e,0,_,0,r);break;case 1:Hn(e,0,_,o-r|0,r);break;case 2:r>0&&(R(e,0)===43||R(e,0)===45||R(e,0)===32)?(Rt(_,0,R(e,0)),Hn(e,1,_,(o-r|0)+1|0,r-1|0)):r>1&&R(e,0)===48&&(R(e,1)===120||R(e,1)===88)?(Rt(_,1,R(e,1)),Hn(e,2,_,(o-r|0)+2|0,r-2|0)):Hn(e,0,_,o-r|0,r);break}return mt(_)}function Kr(t,n){let e=Sr(t),r=n.length,o=R(n,0),i=0;if(o>=58)if(o>=71){if(o>102||o<97)return n;i=2}else{if(o<65)return n;i=2}else if(o!==32){if(o<43)return n;switch(o){case 43:case 45:i=1;break;case 44:case 46:case 47:return n;case 48:if((e+2|0)>r&&r>1&&(R(n,1)===120||R(n,1)===88)){let _=gn(e+2|0,48);return Rt(_,1,R(n,1)),Hn(n,2,_,(e-r|0)+4|0,r-2|0),mt(_)}i=2;break;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:i=2;break}}else i=1;switch(i){case 1:if((e+1|0)<=r)return n;let _=gn(e+1|0,48);return Rt(_,0,o),Hn(n,1,_,(e-r|0)+2|0,r-1|0),mt(_);case 2:if(e<=r)return n;let c=gn(e,48);return Hn(n,0,c,e-r|0,r),mt(c)}}function _0(t){let n=qa(t),e=n.length,r=gn(e+2|0,34);return fe(n,0,r,1,e),mt(r)}function c0(t){switch(t){case 1:return"%+d";case 2:return"% d";case 4:return"%+i";case 5:return"% i";case 6:return"%x";case 7:return"%#x";case 8:return"%X";case 9:return"%#X";case 10:return"%o";case 11:return"%#o";case 0:case 13:return"%d";case 3:case 14:return"%i";case 12:case 15:return"%u"}}function s0(t){switch(t){case 1:return"%+Ld";case 2:return"% Ld";case 4:return"%+Li";case 5:return"% Li";case 6:return"%Lx";case 7:return"%#Lx";case 8:return"%LX";case 9:return"%#LX";case 10:return"%Lo";case 11:return"%#Lo";case 0:case 13:return"%Ld";case 3:case 14:return"%Li";case 12:case 15:return"%Lu"}}function a0(t){switch(t){case 1:return"%+ld";case 2:return"% ld";case 4:return"%+li";case 5:return"% li";case 6:return"%lx";case 7:return"%#lx";case 8:return"%lX";case 9:return"%#lX";case 10:return"%lo";case 11:return"%#lo";case 0:case 13:return"%ld";case 3:case 14:return"%li";case 12:case 15:return"%lu"}}function l0(t){switch(t){case 1:return"%+nd";case 2:return"% nd";case 4:return"%+ni";case 5:return"% ni";case 6:return"%nx";case 7:return"%#nx";case 8:return"%nX";case 9:return"%#nX";case 10:return"%no";case 11:return"%#no";case 0:case 13:return"%nd";case 3:case 14:return"%ni";case 12:case 15:return"%nu"}}function rl(t,n){let e=Sr(n),r=n0(103,t),o={ind:0,bytes:$t(16)};return Jr(o,37),e0(o,t),Jr(o,46),_n(o,re("%d",e)),Jr(o,r),il(o)}function Pi(t,n){switch(t){case 13:case 14:case 15:break;default:return n}let e=0;for(let s=0,a=n.length;s<a;++s){let m=n.charCodeAt(s);m>57||m<48||(e=e+1|0)}let r=e,o=$t(n.length+((r-1|0)/3|0)|0),i={contents:0},_=function(s){Rt(o,i.contents,s),i.contents=i.contents+1|0},c=(r-1|0)%3+1|0;for(let s=0,a=n.length;s<a;++s){let m=n.charCodeAt(s);m>57||m<48||(c===0&&(_(95),c=3),c=c-1|0),_(m)}return mt(o)}function u0(t,n){return Pi(t,re(c0(t),n))}function f0(t,n){return Pi(t,O_(a0(t),n))}function m0(t,n){return Pi(t,Vs(l0(t),n))}function d0(t,n){return Pi(t,F_(s0(t),n))}function Ue(t,n,e){let r=function(c){let s=t[0],a;switch(s){case 0:a=45;break;case 1:a=43;break;case 2:a=32;break}return Os(e,n,a)},o=function(c){let s=c.length;return function(m){for(;;){let p=m;if(p===s)return!1;let h=R(c,p);if(h>69||h<46){if(h===101)return!0;m=p+1|0;continue}if(h>68||h<47)return!0;m=p+1|0}}(0)?c:c+"."},i=function(c){switch(Hs(e)){case 3:return e<0?"neg_infinity":"infinity";case 4:return"nan";default:return c}};switch(t[1]){case 5:let c=xo(rl(t,n),e);return i(o(c));case 6:return r();case 7:let s=r();return mt(sc(mn(s)));case 8:return i(r());default:return xo(rl(t,n),e)}}function p0(t){let n=Ta(t),e=n.length,r=gn(e+2|0,39);return fe(n,0,r,1,e),mt(r)}function h0(t){let n={ind:0,bytes:$t(16)};return wc(n,t),il(n)}function dt(t,n,e){for(;;){let r=e,o=n,i=t;if(typeof r!="object"&&typeof r!="function")return b(i,o);switch(r.TAG){case 0:let _=r._0;return function(X){return dt(i,{TAG:5,_0:o,_1:X},_)};case 1:let c=r._0;return function(X){let O=p0(X);return dt(i,{TAG:4,_0:o,_1:O},c)};case 2:return Sc(i,o,r._1,r._0,(function(X){return X}));case 3:return Sc(i,o,r._1,r._0,_0);case 4:return Ni(i,o,r._3,r._1,r._2,u0,r._0);case 5:return Ni(i,o,r._3,r._1,r._2,f0,r._0);case 6:return Ni(i,o,r._3,r._1,r._2,m0,r._0);case 7:return Ni(i,o,r._3,r._1,r._2,d0,r._0);case 8:let s=r._3,a=r._1,m=r._2,p=r._0;if(typeof a!="object"&&typeof a!="function"){if(typeof m!="object"&&typeof m!="function")return m===0?function(O){let M=Ue(p,yc(p),O);return dt(i,{TAG:4,_0:o,_1:M},s)}:function(O,M){let V=Ue(p,O,M);return dt(i,{TAG:4,_0:o,_1:V},s)};let X=m._0;return function(O){let M=Ue(p,X,O);return dt(i,{TAG:4,_0:o,_1:M},s)}}if(a.TAG===0){let X=a._1,O=a._0;if(typeof m!="object"&&typeof m!="function")return m===0?function(V){let gt=Ue(p,yc(p),V),tt=On(O,X,gt);return dt(i,{TAG:4,_0:o,_1:tt},s)}:function(V,gt){let tt=On(O,X,Ue(p,V,gt));return dt(i,{TAG:4,_0:o,_1:tt},s)};let M=m._0;return function(V){let gt=On(O,X,Ue(p,M,V));return dt(i,{TAG:4,_0:o,_1:gt},s)}}let h=a._0;if(typeof m!="object"&&typeof m!="function")return m===0?function(X,O){let M=Ue(p,yc(p),O),V=On(h,X,M);return dt(i,{TAG:4,_0:o,_1:V},s)}:function(X,O,M){let V=On(h,X,Ue(p,O,M));return dt(i,{TAG:4,_0:o,_1:V},s)};let C=m._0;return function(X,O){let M=On(h,X,Ue(p,C,O));return dt(i,{TAG:4,_0:o,_1:M},s)};case 9:return Sc(i,o,r._1,r._0,Zs);case 10:e=r._0,n={TAG:7,_0:o};continue;case 11:e=r._1,n={TAG:2,_0:o,_1:r._0};continue;case 12:e=r._1,n={TAG:3,_0:o,_1:r._0};continue;case 13:let x=r._2,y=h0(r._1);return function(X){return dt(i,{TAG:4,_0:o,_1:y},x)};case 14:let S=r._2,G=r._1;return function(X){return dt(i,o,Et(i0(X._0,G),S))};case 15:let D=r._0;return function(X,O){return dt(i,{TAG:6,_0:o,_1:(function(M){return $(X,M,O)})},D)};case 16:let j=r._0;return function(X){return dt(i,{TAG:6,_0:o,_1:X},j)};case 17:e=r._1,n={TAG:0,_0:o,_1:r._0};continue;case 18:let k=r._0;if(k.TAG===0){let X=r._1,O=function(M){return dt(i,{TAG:1,_0:o,_1:{TAG:0,_0:M}},X)};e=k._0._0,n=0,t=O;continue}let q=r._1,N=function(X){return dt(i,{TAG:1,_0:o,_1:{TAG:1,_0:X}},q)};e=k._0._0,n=0,t=N;continue;case 19:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",1558,4]});case 20:let rt=r._2,ot={TAG:8,_0:o,_1:"Printf: bad conversion %["};return function(X){return dt(i,ot,rt)};case 21:let Z=r._1;return function(X){let O=re("%u",X);return dt(i,{TAG:4,_0:o,_1:O},Z)};case 22:let Ct=r._0;return function(X){return dt(i,{TAG:5,_0:o,_1:X},Ct)};case 23:return g0(i,o,r._0,r._1);case 24:return _l(i,o,r._2,r._0,b(r._1,void 0))}}}function g0(t,n,e,r){if(!(typeof e!="object"&&typeof e!="function"))return e.TAG===9?zn(t,n,e._1,r):xc(t,n,r);if(e!==2)return xc(t,n,r);throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",1626,39]})}function zn(t,n,e,r){if(typeof e!="object"&&typeof e!="function")return xc(t,n,r);switch(e.TAG){case 0:let o=e._0;return function(D){return zn(t,n,o,r)};case 1:let i=e._0;return function(D){return zn(t,n,i,r)};case 2:let _=e._0;return function(D){return zn(t,n,_,r)};case 3:let c=e._0;return function(D){return zn(t,n,c,r)};case 4:let s=e._0;return function(D){return zn(t,n,s,r)};case 5:let a=e._0;return function(D){return zn(t,n,a,r)};case 6:let m=e._0;return function(D){return zn(t,n,m,r)};case 7:let p=e._0;return function(D){return zn(t,n,p,r)};case 8:let h=e._1;return function(D){return zn(t,n,h,r)};case 9:let C=e._2,x=Ht(Vt(e._0),e._1);return function(D){return zn(t,n,dn(x,C),r)};case 10:let y=e._0;return function(D,j){return zn(t,n,y,r)};case 11:let S=e._0;return function(D){return zn(t,n,S,r)};case 12:let G=e._0;return function(D){return zn(t,n,G,r)};case 13:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",1649,31]});case 14:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./camlinternalFormat.cppo.ml",1650,31]})}}function xc(t,n,e){return dt(t,{TAG:8,_0:n,_1:"Printf: bad conversion %_"},e)}function Sc(t,n,e,r,o){if(typeof r!="object"&&typeof r!="function")return function(_){let c=b(o,_);return dt(t,{TAG:4,_0:n,_1:c},e)};if(r.TAG===0){let _=r._1,c=r._0;return function(s){let a=On(c,_,b(o,s));return dt(t,{TAG:4,_0:n,_1:a},e)}}let i=r._0;return function(_,c){let s=On(i,_,b(o,c));return dt(t,{TAG:4,_0:n,_1:s},e)}}function Ni(t,n,e,r,o,i,_){if(typeof r!="object"&&typeof r!="function"){if(typeof o!="object"&&typeof o!="function")return o===0?function(m){let p=$(i,_,m);return dt(t,{TAG:4,_0:n,_1:p},e)}:function(m,p){let h=Kr(m,$(i,_,p));return dt(t,{TAG:4,_0:n,_1:h},e)};let a=o._0;return function(m){let p=Kr(a,$(i,_,m));return dt(t,{TAG:4,_0:n,_1:p},e)}}if(r.TAG===0){let a=r._1,m=r._0;if(typeof o!="object"&&typeof o!="function")return o===0?function(h){let C=On(m,a,$(i,_,h));return dt(t,{TAG:4,_0:n,_1:C},e)}:function(h,C){let x=On(m,a,Kr(h,$(i,_,C)));return dt(t,{TAG:4,_0:n,_1:x},e)};let p=o._0;return function(h){let C=On(m,a,Kr(p,$(i,_,h)));return dt(t,{TAG:4,_0:n,_1:C},e)}}let c=r._0;if(typeof o!="object"&&typeof o!="function")return o===0?function(a,m){let p=On(c,a,$(i,_,m));return dt(t,{TAG:4,_0:n,_1:p},e)}:function(a,m,p){let h=On(c,a,Kr(m,$(i,_,p)));return dt(t,{TAG:4,_0:n,_1:h},e)};let s=o._0;return function(a,m){let p=On(c,a,Kr(s,$(i,_,m)));return dt(t,{TAG:4,_0:n,_1:p},e)}}function _l(t,n,e,r,o){if(typeof r!="object"&&typeof r!="function")return dt(t,{TAG:4,_0:n,_1:o},e);let i=r._0;return function(_){return _l(t,n,e,i,b(o,_))}}function Te(t,n){for(;;){let e=n,r=0;if(typeof e!="object"&&typeof e!="function")return;switch(e.TAG){case 0:let o=r0(e._1);return Te(t,e._0),Lt(t,o);case 1:let i=e._1,_=e._0;if(i.TAG===0){Te(t,_),Lt(t,"@{"),n=i._0;continue}Te(t,_),Lt(t,"@["),n=i._0;continue;case 2:case 4:r=1;break;case 3:case 5:r=2;break;case 6:return Te(t,e._0),Lt(t,b(e._1,void 0));case 7:n=e._0;continue;case 8:throw Te(t,e._0),new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:e._1})}switch(r){case 1:return Te(t,e._0),Lt(t,e._1);case 2:return Te(t,e._0),it(t,e._1)}}}function b0(t){let n=bt(256);return dt(function(r){Te(n,r);let o=W(n);throw new d("Failure",{MEL_EXN_ID:"Failure",_1:o})},0,t._0)}function Ac(t){if(t==="")return[0,4];let n=t.length,e=function(x){return b(b0({TAG:0,_0:{TAG:11,_0:"invalid box description ",_1:{TAG:3,_0:0,_1:0}},_1:"invalid box description %S"}),t)},r=function(x){for(;;){let y=x;if(y===n)return y;let S=R(t,y);if(S!==9){if(S!==32)return y;x=y+1|0;continue}x=y+1|0}},o=function(x,y){for(;;){let S=y;if(S===n)return S;let G=R(t,S);if(G>122||G<97)return S;y=S+1|0}},i=function(x,y){for(;;){let S=y;if(S===n)return S;let G=R(t,S);if(G>=48){if(G>=58)return S;y=S+1|0;continue}if(G!==45)return S;y=S+1|0}},_=r(0),c=o(_,_),s=Bt(t,_,c-_|0),a=r(c),m=i(a,a),p;if(a===m)p=0;else try{p=wo(Bt(t,a,m-a|0))}catch(x){let y=yt(x);if(y.MEL_EXN_ID===Ao)p=e();else throw y}r(m)!==n&&e();let C;switch(s){case"":case"b":C=4;break;case"h":C=0;break;case"hov":C=3;break;case"hv":C=2;break;case"v":C=1;break;default:C=e()}return[p,C]}function Re(t,n){return dt(function(r){let o=bt(64);return Te(o,r),b(t,W(o))},0,n._0)}function Zt(t){return Re((function(n){return n}),t)}function w0(t){return t!==void 0?t==="Yellow"?"33":"31":""}function Bi(t,n,e){let r=w0(n),o=r===""?0:{hd:r,tl:0},_=wn(";",t?{hd:"1",tl:o}:o);return $(Zt({TAG:0,_0:{TAG:11,_0:"\x1B[",_1:{TAG:2,_0:0,_1:{TAG:12,_0:109,_1:{TAG:2,_0:0,_1:{TAG:11,_0:"\x1B[0m",_1:0}}}}},_1:"\x1B[%sm%s\x1B[0m"}),_,e)}var qo=Zt({TAG:0,_0:{TAG:11,_0:"\x1B[2m",_1:{TAG:2,_0:0,_1:{TAG:11,_0:"\x1B[22m",_1:0}}},_1:"\x1B[2m%s\x1B[22m"});var $c={v:0},Ec={TAG:0,_0:{TAG:11,_0:'File "',_1:{TAG:2,_0:0,_1:{TAG:11,_0:'", line ',_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:", characters ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:12,_0:45,_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:": ",_1:{TAG:2,_0:0,_1:0}}}}}}}}}},_1:'File "%s", line %d, characters %d-%d: %s'},x0=(function(t){for(var n="",e=1;"_"+e in t;)n+=t["_"+e],++e;return e===1?n:"("+n+")"});function A0(t){let n=$c.v;for(;;){let e=n;if(!e)return;let r=e.tl,o;try{o=b(e.hd,t)}catch{n=r;continue}if(o!==void 0)return z(wt(o));n=r}}function E0(t){if(t.MEL_EXN_ID===ra)return"Out of memory";if(t.MEL_EXN_ID===oa)return"Stack overflow";if(t.MEL_EXN_ID===na){let e=t._1,r=e[2];return mo(Zt(Ec),e[0],e[1],r,r+5|0,"Pattern matching failed")}if(t.MEL_EXN_ID===ea){let e=t._1,r=e[2];return mo(Zt(Ec),e[0],e[1],r,r+6|0,"Assertion failed")}if(t.MEL_EXN_ID===ia){let e=t._1,r=e[2];return mo(Zt(Ec),e[0],e[1],r,r+6|0,"Undefined recursive module")}return Ls(t)+x0(t)}function al(t){let n=A0(t);return n!==void 0?n:E0(t)}function ll(t){for(;;){let n=$c.v;if(ha($c,n,{hd:t,tl:n}))return}}function ul(t){return t}var Tc=It("Stdlib.Fun.Finally_raised");ll(function(t){if(t.MEL_EXN_ID===Tc)return"Fun.Finally_raised: "+al(t._1)});function qi(t,n){let e=function(o){try{return b(t,void 0)}catch(i){let _=yt(i),c,s=new d(Tc,{MEL_EXN_ID:Tc,_1:_});throw vt("caml_restore_raw_backtrace")(s,c),s}},r;try{r=b(n,void 0)}catch(o){let i=yt(o),_;throw e(),vt("caml_restore_raw_backtrace")(i,_),i}return e(),r}function G0(t,n,e){let r=b(t,n);return qi((function(o){Js(r)}),(function(o){return b(e,r)}))}function vc(t,n){return G0(Ks,t,n)}var ly=hi.seek_in,uy=hi.pos_in,v0=hi.in_channel_length;function fl(t,n,e,r){return function(i,_){for(;;){let c=_,s=i;if(c===0)return s;let a=pi(t,n,s,c);if(a===0)return s;_=c-a|0,i=s+a|0}}(e,r)-e|0}function ml(t,n,e){let r=t.length;if(r>=(n+e|0))return t;let o=r;for(;o<(n+e|0);)o=(o<<1)+1|0;let i=o,_;if(i<=Mn)_=i;else if(n<Mn)_=Mn;else throw new d("Failure",{MEL_EXN_ID:"Failure",_1:"In_channel.input_all: channel content is larger than maximum string length"});let c=$t(_);return $r(t,0,c,0,n),c}function dl(t){let n;try{n=vt("caml_ml_channel_size")(t)-vt("caml_ml_pos_in")(t)|0}catch(m){let p=yt(m);if(p.MEL_EXN_ID===fi)n=-1;else throw p}let e=n<0?yi:n,r=e<=Mn?e:Mn,o=$t(r),i=fl(t,o,0,r);if(i<r)return xe(o,0,i);let _;try{_=vt("caml_ml_input_char")(t)}catch(m){let p=yt(m);if(p.MEL_EXN_ID===mi)return mt(o);throw p}let c=ml(o,i,yi+1|0);Rt(c,i,_);let s=c,a=i+1|0;for(;;){let m=a,h=ml(s,m,yi),C=h.length-m|0,x=fl(t,h,m,C);if(x<C)return xe(h,0,m+x|0);a=m+C|0,s=h}}function jc(t){if(!(typeof t!="object"&&typeof t!="function"))return t.TAG===0,t._0}function Fi(t){return typeof t!="object"&&typeof t!="function"?"":t.TAG===0?vc(t._0,dl):t._1}var Mc=0;function hl(t){return{length:0,first:0,last:0}}function Ic(t){t.length=0,t.first=0,t.last=0}function de(t,n){let e={TAG:0,content:t,next:0},r=n.last;if(typeof r!="object"&&typeof r!="function"){n.length=1,n.first=e,n.last=e;return}n.length=n.length+1|0,r.next=e,n.last=e}function zi(t){let n=t.first;if(!(typeof n!="object"&&typeof n!="function"))return z(n.content)}function Fo(t){let n=t.first;if(typeof n!="object"&&typeof n!="function")return;let e=n.content,r=n.next;if(typeof r!="object"&&typeof r!="function")return Ic(t),z(e);let o=n.next;return t.length=t.length-1|0,t.first=o,z(e)}function gl(t){let n=function(r,o){if(typeof r!="object"&&typeof r!="function")return 0;let i=r.next;return{TAG:0,_0:r.content,_1:(function(_){return n(i,_)})}},e=t.first;return function(r){return n(e,r)}}var bl=de;var yl={contents:!1};function zo(t){return yl.contents=!0,qi((function(n){yl.contents=!1}),t)}var j0={length:0,first:0,last:0},M0={contents:!1};function wl(t){zo(function(n){if(M0.contents)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Domain.before_first_spawn"});bl(t,j0)})}var Cl={contents:0};function Dc(t){zo(function(n){Cl.contents={hd:t,tl:Cl.contents}})}var Sl={contents:0};function k0(t,n){let e={table:void 0,split_from_parent:t,init:n};return zo(function(r){Sl.contents={hd:{TAG:0,_0:e},tl:Sl.contents}}),e}function I0(t){let n=t.table;if(n!==void 0)return wt(n);let e=b(t.init,void 0);return zo(function(r){t.table=z(e)}),e}function L0(t,n){zo(function(e){t.table=z(n)})}var Ft={new_key:k0,get:I0,set:L0};function to(t){t.c=0,t.len=0}function cr(t,n){n.c={hd:t,tl:n.c},n.len=n.len+1|0}function Ir(t){let n=t.c;if(n)return t.c=n.tl,t.len=t.len-1|0,z(n.hd)}function Lr(t){let n=t.c;if(n)return z(n.hd)}function N0(t){return t}var Zi=It("Stdlib.Format.String_tag");function Uo(t,n){t.pp_right_total=t.pp_right_total+n.length|0,de(n,t.pp_queue)}function X0(t){t.pp_left_total=1,t.pp_right_total=1,Ic(t.pp_queue)}function Xc(t,n){U(t.pp_out_string,n,0,n.length)}function Dr(t,n){return U(t.pp_out_width,n,0,n.length)}function P0(t,n,e,r){U(t.pp_out_string,r,n,e)}function $l(t,n,e){t.pp_space_left=t.pp_space_left-n|0,Xc(t,e),t.pp_is_new_line=!1}function Vi(t,n){if(n!=="")return $l(t,Dr(t,n),n)}function Oo(t,n,e){Vi(t,n[0]),b(t.pp_out_newline,void 0),t.pp_is_new_line=!0;let r=(t.pp_margin-e|0)+n[1]|0,o=Er(t.pp_max_indent,r);t.pp_current_indent=o,t.pp_space_left=t.pp_margin-t.pp_current_indent|0,b(t.pp_out_indent,t.pp_current_indent),Vi(t,n[2])}function Tl(t,n){Oo(t,["",0,""],n)}function Oi(t,n){let e=n[1];Vi(t,n[0]),t.pp_space_left=t.pp_space_left-e|0,b(t.pp_out_spaces,e),Vi(t,n[2])}function B0(t){let n=Lr(t.pp_format_stack);if(n===void 0)return b(t.pp_out_newline,void 0);let e=n.width;if(!(e<=t.pp_space_left))switch(n.box_type){case 0:case 5:return;default:return Tl(t,e)}}function q0(t,n,e){if(typeof e!="object"&&typeof e!="function")switch(e){case 0:let r=Lr(t.pp_tbox_stack);if(r===void 0)return;let o=r._0,i=function(a,m){if(!m)return{hd:a,tl:0};let p=m.hd;return ca(a,p)?{hd:a,tl:m}:{hd:p,tl:i(a,m.tl)}};o.contents=i(t.pp_margin-t.pp_space_left|0,o.contents);return;case 1:Ir(t.pp_format_stack);return;case 2:Ir(t.pp_tbox_stack);return;case 3:let _=Lr(t.pp_format_stack);return _!==void 0?Tl(t,_.width):b(t.pp_out_newline,void 0);case 4:if(t.pp_current_indent!==(t.pp_margin-t.pp_space_left|0)){let a=Fo(t.pp_queue);if(a===void 0)return;let m=a.size;t.pp_left_total=t.pp_left_total-a.length|0,t.pp_space_left=t.pp_space_left+m|0;return}else return;case 5:let c=Ir(t.pp_mark_stack);if(c===void 0)return;let s=b(t.pp_mark_close_tag,wt(c));return Xc(t,s)}else switch(e.TAG){case 0:return $l(t,n,e._0);case 1:let r=e.pos,o=e.len,i=e.source;t.pp_space_left=t.pp_space_left-n|0,P0(t,r,o,i),t.pp_is_new_line=!1;return;case 2:let _=e.breaks,c=_[0],s=e.fits,a=Lr(t.pp_format_stack);if(a===void 0)return;let m=a.width;switch(a.box_type){case 1:case 2:return Oo(t,_,m);case 3:return(n+Dr(t,c)|0)>t.pp_space_left?Oo(t,_,m):Oi(t,s);case 4:return t.pp_is_new_line||!((n+Dr(t,c)|0)>t.pp_space_left||t.pp_current_indent>((t.pp_margin-m|0)+_[1]|0))?Oi(t,s):Oo(t,_,m);case 0:case 5:return Oi(t,s)}case 3:let p=t.pp_margin-t.pp_space_left|0,h=Lr(t.pp_tbox_stack);if(h===void 0)return;let C=h._0,x=C.contents,y;if(x){let rt=x.hd;y=function(Z){for(;;){let Ct=Z;if(!Ct)return rt;let X=Ct.hd;if(X>=p)return X;Z=Ct.tl}}(C.contents)}else y=p;let S=y-p|0;return S>=0?Oi(t,["",S+e._0|0,""]):Oo(t,["",y+e._1|0,""],t.pp_margin);case 4:let G=e._1;(t.pp_margin-t.pp_space_left|0)>t.pp_max_indent&&B0(t);let j=t.pp_space_left-e._0|0,k;return k=G===1?1:n>t.pp_space_left?G:5,cr({box_type:k,width:j},t.pp_format_stack);case 5:return cr(e._0,t.pp_tbox_stack);case 6:let q=e._0,N=b(t.pp_mark_open_tag,q);return Xc(t,N),cr(q,t.pp_mark_stack)}}function Gl(t){for(;;){let n=zi(t.pp_queue);if(n===void 0)return;let e=n.size,r=t.pp_right_total-t.pp_left_total|0;if(!(e>=0||r>=t.pp_space_left))return;if(Fo(t.pp_queue)!==void 0){let i=e>=0?e:1000000010;q0(t,i,n.token),t.pp_left_total=n.length+t.pp_left_total|0;continue}throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Format: Unsynchronized access to formatter"})}}function vl(t,n){Uo(t,n),Gl(t)}function jl(t,n,e){vl(t,{size:n,token:{TAG:0,_0:e},length:n})}function qc(t){to(t),cr({left_total:-1,queue_elem:{size:-1,token:{TAG:0,_0:""},length:0}},t)}function Pc(t,n){let e=Lr(t.pp_scan_stack);if(e===void 0)return;let r=e.queue_elem,o=r.size;if(e.left_total<t.pp_left_total)return qc(t.pp_scan_stack);let i=r.token;if(!(typeof i!="object"&&typeof i!="function")){switch(i.TAG){case 2:case 3:break;case 4:if(n)return;r.size=t.pp_right_total+o|0,Ir(t.pp_scan_stack);return;default:return}if(n){r.size=t.pp_right_total+o|0,Ir(t.pp_scan_stack);return}}}function F0(t,n){de(n,t.pp_queue),Pc(t,!0),t.pp_right_total=t.pp_right_total+n.length|0}function Ml(t,n,e){n?F0(t,e):Uo(t,e);let o={left_total:t.pp_right_total,queue_elem:e};cr(o,t.pp_scan_stack)}function Fc(t,n,e){if(t.pp_curr_depth=t.pp_curr_depth+1|0,t.pp_curr_depth>=t.pp_max_boxes)if(t.pp_curr_depth===t.pp_max_boxes){let i=t.pp_ellipsis,_=Dr(t,i);return jl(t,_,i)}else return;let o={size:-t.pp_right_total|0,token:{TAG:4,_0:n,_1:e},length:0};Ml(t,!1,o)}function kl(t,n){if(t.pp_curr_depth>1){t.pp_curr_depth<t.pp_max_boxes&&(Uo(t,{size:0,token:1,length:0}),Pc(t,!0),Pc(t,!1)),t.pp_curr_depth=t.pp_curr_depth-1|0;return}}function Il(t,n){if(t.pp_print_tags&&(cr(n,t.pp_tag_stack),b(t.pp_print_open_tag,n)),!t.pp_mark_tags)return;Uo(t,{size:0,token:{TAG:6,_0:n},length:0})}function Ll(t,n){if(t.pp_mark_tags&&Uo(t,{size:0,token:5,length:0}),!t.pp_print_tags)return;let e=Ir(t.pp_tag_stack);if(e!==void 0)return b(t.pp_print_close_tag,wt(e))}function z0(t){X0(t),qc(t.pp_scan_stack),to(t.pp_format_stack),to(t.pp_tbox_stack),to(t.pp_tag_stack),to(t.pp_mark_stack),t.pp_current_indent=0,t.pp_curr_depth=0,t.pp_space_left=t.pp_margin,Fc(t,0,3)}function O0(t){let n=t.pp_tag_stack;Se(function(r){Ll(t,void 0)},n.c)}function zc(t,n){for(O0(t);t.pp_curr_depth>1;)kl(t,void 0);t.pp_right_total=1000000010,Gl(t),n&&b(t.pp_out_newline,void 0),z0(t)}function no(t,n,e){if(t.pp_curr_depth<t.pp_max_boxes)return jl(t,n,e)}var Dl=no;function Vo(t,n){Dl(t,Dr(t,n),n)}function sr(t,n){Dl(t,1,mt(gn(1,n)))}function Wi(t,n){zc(t,!0),b(t.pp_out_flush,void 0)}function ar(t,n){zc(t,!1),b(t.pp_out_flush,void 0)}function V0(t,n){if(t.pp_curr_depth<t.pp_max_boxes)return vl(t,{size:0,token:3,length:0})}function U0(t,n,e){if(t.pp_curr_depth>=t.pp_max_boxes)return;let r=-t.pp_right_total|0,o={TAG:2,fits:n,breaks:e},i=(Dr(t,n[0])+n[1]|0)+Dr(t,n[2])|0;Ml(t,!0,{size:r,token:o,length:i})}function R0(t,n,e){U0(t,["",n,""],["",e,""])}function xl(t,n){t.pp_out_string=n.out_string,t.pp_out_width=n.out_width,t.pp_out_flush=n.out_flush,t.pp_out_newline=n.out_newline,t.pp_out_spaces=n.out_spaces,t.pp_out_indent=n.out_indent}function Al(t,n){return{out_string:t.pp_out_string,out_width:t.pp_out_width,out_flush:t.pp_out_flush,out_newline:t.pp_out_newline,out_spaces:t.pp_out_spaces,out_indent:t.pp_out_indent}}function Oc(t,n){U(t.pp_out_string,`
7
+ `,0,1)}var El=mt(gn(80,32));function eo(t,n){for(;;){let e=n;if(e<=0)return;if(e<=80)return U(t.pp_out_string,El,0,e);U(t.pp_out_string,El,0,80),n=e-80|0}}function Y0(t){return t.MEL_EXN_ID===Zi?"<"+(t._1+">"):""}function Q0(t){return t.MEL_EXN_ID===Zi?"</"+(t._1+">"):""}function H0(t){}function Z0(t){}function W0(t,n,e){let r=0,o=n,i=n+e|0;for(;;){let _=o,c=r;if(_>=i)return c;let a=ac(mn(t),_)>>>24&7;o=_+a|0,r=c+1|0}}function Vc(t,n,e,r,o){let i={length:0,first:0,last:0},_={size:-1,token:{TAG:4,_0:0,_1:3},length:0};de(_,i);let c={c:0,len:0};return qc(c),cr({left_total:1,queue_elem:_},c),{pp_scan_stack:c,pp_format_stack:{c:0,len:0},pp_tbox_stack:{c:0,len:0},pp_tag_stack:{c:0,len:0},pp_mark_stack:{c:0,len:0},pp_margin:78,pp_min_space_left:10,pp_max_indent:68,pp_space_left:78,pp_current_indent:0,pp_is_new_line:!0,pp_left_total:1,pp_right_total:1,pp_curr_depth:1,pp_max_boxes:qe,pp_ellipsis:".",pp_out_string:t,pp_out_width:W0,pp_out_flush:n,pp_out_newline:e,pp_out_spaces:r,pp_out_indent:o,pp_print_tags:!1,pp_mark_tags:!1,pp_mark_open_tag:Y0,pp_mark_close_tag:Q0,pp_print_open_tag:H0,pp_print_close_tag:Z0,pp_queue:i}}function Nl(t,n){let e=Vc(t,n,(function(r){}),(function(r){}),(function(r){}));return e.pp_out_newline=(function(r){return Oc(e,r)}),e.pp_out_spaces=(function(r){return eo(e,r)}),e.pp_out_indent=(function(r){return eo(e,r)}),e}function Xl(t){return Nl((function(n,e,r){return H_(t,n,e,r)}),(function(n){er(t)}))}function Nr(t){return Nl((function(n,e,r){return Ii(t,n,e,r)}),(function(n){}))}function K0(t){return bt(512)}var Pl=bt(512),Bc=Xl(Or),ro=Xl(Vr),J0=Nr(Pl),Bl=Ft.new_key(void 0,K0);Ft.set(Bl,Pl);var td=Ft.new_key(void 0,(function(t){return Nr(Ft.get(Bl))}));Ft.set(td,J0);function Ui(t,n,e,r){Ii(Ft.get(t),n,e,r)}function Ri(t,n,e){let r=Ft.get(n),o=r.position,i=W(r);H_(t,i,0,o),er(t),r.position=0}var Yi=Ft.new_key(void 0,(function(t){return bt(512)})),Qi=Ft.new_key(void 0,(function(t){return bt(512)})),ql=Ft.new_key(void 0,(function(t){let n=Vc((function(e,r,o){return Ui(Yi,e,r,o)}),(function(e){return Ri(Or,Yi,e)}),(function(e){}),(function(e){}),(function(e){}));return n.pp_out_newline=(function(e){return Oc(n,e)}),n.pp_out_spaces=(function(e){return eo(n,e)}),n.pp_out_indent=(function(e){return eo(n,e)}),Dc(function(e){return ar(n,e)}),n}));Ft.set(ql,Bc);var Fl=Ft.new_key(void 0,(function(t){let n=Vc((function(e,r,o){return Ui(Qi,e,r,o)}),(function(e){return Ri(Vr,Qi,e)}),(function(e){}),(function(e){}),(function(e){}));return n.pp_out_newline=(function(e){return Oc(n,e)}),n.pp_out_spaces=(function(e){return eo(n,e)}),n.pp_out_indent=(function(e){return eo(n,e)}),Dc(function(e){return ar(n,e)}),n}));Ft.set(Fl,ro);function nd(t,n){zc(n,!1);let e=W(t);return nl(t),e}function Hi(t,n){let e=bt(16),r=Nr(e);$(t,r,n),ar(r,void 0);let o=e.position;return o<2?W(e):tl(e,1,o-2|0)}function zl(t,n){if(typeof n!="object"&&typeof n!="function")switch(n){case 0:return kl(t,void 0);case 1:return Ll(t,void 0);case 2:return ar(t,void 0);case 3:return V0(t,void 0);case 4:return Wi(t,void 0);case 5:return sr(t,64);case 6:return sr(t,37)}else switch(n.TAG){case 0:return R0(t,n._1,n._2);case 1:return;case 2:return sr(t,64),sr(t,n._0)}}function Ln(t,n){let e=0,r,o,i,_,c,s;if(!(typeof n!="object"&&typeof n!="function")){switch(n.TAG){case 0:return Ln(t,n._0),zl(t,n._1);case 1:let a=n._1,m=n._0;if(a.TAG===0)return Ln(t,m),Il(t,{MEL_EXN_ID:Zi,_1:Hi(Ln,a._0)});Ln(t,m);let p=Ac(Hi(Ln,a._0));return Fc(t,p[0],p[1]);case 2:let h=n._0,C=0;if(typeof h!="object"&&typeof h!="function"||h.TAG!==0)C=3;else{let k=h._1;typeof k!="object"&&typeof k!="function"||k.TAG!==1?C=3:(r=h._0,o=k._1,i=n._1,e=1)}if(C===3)return Ln(t,h),Vo(t,n._1);break;case 3:let x=n._0,y=0;if(typeof x!="object"&&typeof x!="function"||x.TAG!==0)y=3;else{let k=x._1;typeof k!="object"&&typeof k!="function"||k.TAG!==1?y=3:(_=x._0,c=k._1,s=n._1,e=2)}if(y===3)return Ln(t,x),sr(t,n._1);break;case 4:let S=n._0,G=0;if(typeof S!="object"&&typeof S!="function"||S.TAG!==0)G=3;else{let k=S._1;typeof k!="object"&&typeof k!="function"||k.TAG!==1?G=3:(r=S._0,o=k._1,i=n._1,e=1)}if(G===3)return Ln(t,S),Vo(t,n._1);break;case 5:let D=n._0,j=0;if(typeof D!="object"&&typeof D!="function"||D.TAG!==0)j=3;else{let k=D._1;typeof k!="object"&&typeof k!="function"||k.TAG!==1?j=3:(_=D._0,c=k._1,s=n._1,e=2)}if(j===3)return Ln(t,D),sr(t,n._1);break;case 6:return Ln(t,n._0),b(n._1,t);case 7:return Ln(t,n._0),ar(t,void 0);case 8:throw Ln(t,n._0),new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:n._1})}switch(e){case 1:return Ln(t,r),no(t,o,i);case 2:return Ln(t,_),no(t,c,mt(gn(1,s)))}}}function xn(t,n){let e=0,r,o,i,_,c,s;if(!(typeof n!="object"&&typeof n!="function")){switch(n.TAG){case 0:return xn(t,n._0),zl(t,n._1);case 1:let a=n._1,m=n._0;if(a.TAG===0)return xn(t,m),Il(t,{MEL_EXN_ID:Zi,_1:Hi(xn,a._0)});xn(t,m);let p=Ac(Hi(xn,a._0));return Fc(t,p[0],p[1]);case 2:let h=n._0,C=0;if(typeof h!="object"&&typeof h!="function"||h.TAG!==0)C=3;else{let N=h._1;typeof N!="object"&&typeof N!="function"||N.TAG!==1?C=3:(r=h._0,o=N._1,i=n._1,e=1)}if(C===3)return xn(t,h),Vo(t,n._1);break;case 3:let x=n._0,y=0;if(typeof x!="object"&&typeof x!="function"||x.TAG!==0)y=3;else{let N=x._1;typeof N!="object"&&typeof N!="function"||N.TAG!==1?y=3:(_=x._0,c=N._1,s=n._1,e=2)}if(y===3)return xn(t,x),sr(t,n._1);break;case 4:let S=n._0,G=0;if(typeof S!="object"&&typeof S!="function"||S.TAG!==0)G=3;else{let N=S._1;typeof N!="object"&&typeof N!="function"||N.TAG!==1?G=3:(r=S._0,o=N._1,i=n._1,e=1)}if(G===3)return xn(t,S),Vo(t,n._1);break;case 5:let D=n._0,j=0;if(typeof D!="object"&&typeof D!="function"||D.TAG!==0)j=3;else{let N=D._1;typeof N!="object"&&typeof N!="function"||N.TAG!==1?j=3:(_=D._0,c=N._1,s=n._1,e=2)}if(j===3)return xn(t,D),sr(t,n._1);break;case 6:let k=n._0,q=0;if(typeof k!="object"&&typeof k!="function"||k.TAG!==0)q=3;else{let N=k._1;if(typeof N!="object"&&typeof N!="function")q=3;else{if(N.TAG===1)return xn(t,k._0),no(t,N._1,b(n._1,void 0));q=3}}if(q===3)return xn(t,k),Vo(t,b(n._1,void 0));break;case 7:return xn(t,n._0),ar(t,void 0);case 8:throw xn(t,n._0),new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:n._1})}switch(e){case 1:return xn(t,r),no(t,o,i);case 2:return xn(t,_),no(t,c,mt(gn(1,s)))}}}function ed(t,n,e){return dt((function(r){return Ln(n,r),b(t,n)}),0,e._0)}function sn(t){return function(n){return ed((function(e){}),t,n)}}function rd(t,n){let e=bt(512),r=Nr(e);return dt(function(i){return xn(r,i),b(t,nd(e,r))},0,n._0)}function Ki(t){return rd(N0,t)}function Ol(t){ar(Ft.get(ql),void 0),ar(Ft.get(Fl),void 0)}ta(Ol);wl(function(t){Ol();let n=Al(Bc,void 0);xl(Bc,{out_string:(function(r,o,i){return Ui(Yi,r,o,i)}),out_width:n.out_width,out_flush:(function(r){return Ri(Or,Yi,r)}),out_newline:n.out_newline,out_spaces:n.out_spaces,out_indent:n.out_indent});let e=Al(ro,void 0);xl(ro,{out_string:(function(r,o,i){return Ui(Qi,r,o,i)}),out_width:e.out_width,out_flush:(function(r){return Ri(Vr,Qi,r)}),out_newline:e.out_newline,out_spaces:e.out_spaces,out_indent:e.out_indent})});function od(t,n,e){return{source:t,line:n,column:e}}function id(t){return t.line}function _d(t){return t.column}function cd(t){return t.source}var Ye={make:od,get_line:id,get_column:_d,get_source:cd};function Zn(t,n,e){return{loc_start:t.loc_start,loc_end:n.loc_end}}function nt(t,n,e){return t!==void 0?{loc_start:n,loc_end:t}:{loc_start:n,loc_end:n}}var sd={source:Mc,line:0,column:0},ad={source:Mc,line:0,column:0},Ro={loc_start:sd,loc_end:ad};function Ul(t){return t.loc_start.source}function ld(t){let n=jc(t.loc_start.source),e=ut(t,Ro);if(n===void 0||e)return"";let r=t.loc_start.line===t.loc_end.line?t.loc_start.column===t.loc_end.column?$(Ki({TAG:0,_0:{TAG:4,_0:3,_1:0,_2:0,_3:{TAG:12,_0:58,_1:{TAG:4,_0:3,_1:0,_2:0,_3:0}}},_1:"%i:%i"}),t.loc_start.line,t.loc_start.column):U(Ki({TAG:0,_0:{TAG:4,_0:3,_1:0,_2:0,_3:{TAG:12,_0:58,_1:{TAG:4,_0:3,_1:0,_2:0,_3:{TAG:12,_0:45,_1:{TAG:4,_0:3,_1:0,_2:0,_3:0}}}}},_1:"%i:%i-%i"}),t.loc_start.line,t.loc_start.column,t.loc_end.column):ti(Ki({TAG:0,_0:{TAG:4,_0:3,_1:0,_2:0,_3:{TAG:12,_0:58,_1:{TAG:4,_0:3,_1:0,_2:0,_3:{TAG:12,_0:45,_1:{TAG:4,_0:3,_1:0,_2:0,_3:{TAG:12,_0:58,_1:{TAG:4,_0:3,_1:0,_2:0,_3:0}}}}}}},_1:"%i:%i-%i:%i"}),t.loc_start.line,t.loc_start.column,t.loc_end.line,t.loc_end.column);return $(Zt({TAG:0,_0:{TAG:11,_0:"in file ",_1:{TAG:2,_0:0,_1:{TAG:12,_0:58,_1:{TAG:2,_0:0,_1:0}}}},_1:"in file %s:%s"}),n,r)}function Rl(t,n){let e=jc(n.loc_start.source),r=ut(n,Ro);if(e!==void 0&&!r)return b(sn(t)({TAG:0,_0:{TAG:2,_0:0,_1:0},_1:"%s"}),b(qo,ld(n)))}var t_=It("Pinc_diagnostics.Pinc_error");function ud(t,n,e){let r=n.loc_start,o=n.loc_end,i=Ye.get_line(r),_=Ye.get_line(o),c=Ye.get_column(r),s=Ye.get_column(o),a=ze(0,i-1|0),m=_+1|0,p=sa((function(x,y){return[x+a|0,y]}),la((function(x,y){let S=x+1|0;return S>=a?S<=m:!1}),vi(10,e))),h=bt(400),C=Nr(h);return Se((function(x){let y=x[1],S=x[0];if(S>=i&&S<=_){let j=b(Zt({TAG:0,_0:{TAG:4,_0:0,_1:{TAG:0,_0:1,_1:4},_2:0,_3:0},_1:"%4d"}),S);b(sn(C)({TAG:0,_0:{TAG:2,_0:0,_1:0},_1:"%s"}),Bi(!0,t,j))}else b(sn(C)({TAG:0,_0:{TAG:4,_0:0,_1:{TAG:0,_0:1,_1:4},_2:0,_3:0},_1:"%4d"}),S);b(sn(C)({TAG:0,_0:{TAG:12,_0:32,_1:{TAG:2,_0:0,_1:{TAG:12,_0:32,_1:0}}},_1:" %s "}),b(qo,"\xE2\x94\x82"));let G={contents:!1},D=function(j){let k=S===i,q=j>=c,N=S>=i&&S<=_,rt=j>=c&&j<s,ot=S===_,Z=j<s;return k&&!ot&&q||N&&rt?!0:ot&&!k?Z:!1};No((function(j,k){let q=j+1|0;if(!D(q))return b(sn(C)({TAG:0,_0:{TAG:0,_0:0},_1:"%c"}),k);let N=Fn(1,k);b(sn(C)({TAG:0,_0:{TAG:2,_0:0,_1:0},_1:"%s"}),Bi(!0,t,N)),G.contents=!0}),y),G.contents&&t===void 0&&(Wi(C,void 0),b(sn(C)({TAG:0,_0:{TAG:11,_0:" ",_1:{TAG:2,_0:0,_1:{TAG:12,_0:32,_1:0}}},_1:" %s "}),b(qo,"\xE2\x94\x82")),No((function(j,k){return D(j+1|0)?sn(C)({TAG:0,_0:{TAG:12,_0:94,_1:0},_1:"^"}):sn(C)({TAG:0,_0:{TAG:12,_0:32,_1:0},_1:" "})}),y)),Wi(C,void 0)}),p),W(h)}function Uc(t,n,e){let r=ya("NO_COLOR"),o=r!==void 0?r===""?t==="warning"?"Yellow":"Red":void 0:t==="warning"?"Yellow":"Red",i=t==="warning"?"WARNING":"ERROR";$(sn(n)({TAG:0,_0:{TAG:18,_0:{TAG:1,_0:{TAG:0,_0:0,_1:""}},_1:{TAG:15,_0:{TAG:17,_0:0,_1:{TAG:12,_0:32,_1:0}}}},_1:"@[%a@] "}),(function(c){return function(s){return b(sn(c)({TAG:0,_0:{TAG:2,_0:0,_1:0},_1:"%s"}),Bi(!0,o,s))}}),i),$(sn(n)({TAG:0,_0:{TAG:18,_0:{TAG:1,_0:{TAG:0,_0:0,_1:""}},_1:{TAG:15,_0:{TAG:17,_0:0,_1:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:0}}}},_1:"@[%a@]@,"}),Rl,e);let _=Fi(Ul(e));if(_!=="")return b(sn(n)({TAG:0,_0:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:2,_0:0,_1:0}},_1:"@,%s"}),ud(o,e,_))}function fd(t,n){U(sn(ro)({TAG:0,_0:{TAG:18,_0:{TAG:1,_0:{TAG:0,_0:{TAG:11,_0:"<v>",_1:0},_1:"<v>"}},_1:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:15,_0:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:2,_0:0,_1:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:17,_0:0,_1:0}}}}}}},_1:"@[<v>@,%a@,%s@,@]"}),(function(e,r){return Uc("error",e,r)}),t,n)}function P(t,n){fd(t,n);let e=bt(1),r=Nr(e);throw U(sn(r)({TAG:0,_0:{TAG:18,_0:{TAG:1,_0:{TAG:0,_0:{TAG:11,_0:"<v>",_1:0},_1:"<v>"}},_1:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:15,_0:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:2,_0:0,_1:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:17,_0:0,_1:0}}}}}}},_1:"@[<v>@,%a@,%s@,@]"}),(function(o,i){return Uc("error",o,i)}),t,n),new d(t_,{MEL_EXN_ID:t_,_1:W(e)})}function Yl(t,n){U(sn(ro)({TAG:0,_0:{TAG:18,_0:{TAG:1,_0:{TAG:0,_0:{TAG:11,_0:"<v>",_1:0},_1:"<v>"}},_1:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:15,_0:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:2,_0:0,_1:{TAG:17,_0:{TAG:0,_0:"@,",_1:0,_2:0},_1:{TAG:17,_0:0,_1:0}}}}}}},_1:"@[<v>@,%a@,%s@,@]"}),(function(e,r){return Uc("warning",e,r)}),t,n)}function Ql(t,n){if(n.length!==1)throw new d(L,{MEL_EXN_ID:L,_1:"The Array.length function expects one argument (the array to compute the length of)."});let e=n[0],r;if(typeof e!="object"&&typeof e!="function")throw new d(L,{MEL_EXN_ID:L,_1:"The argument given to the Array.length function is not of type array"});if(e.TAG===5)r=e._0;else throw new d(L,{MEL_EXN_ID:L,_1:"The argument given to the Array.length function is not of type array"});return[t,{TAG:0,_0:r.length}]}function Hl(t,n){if(n.length!==2)throw new d(L,{MEL_EXN_ID:L,_1:"The Array.append function expects two arguments"});let e=n[0],r,o=0,i=0;if(typeof e!="object"&&typeof e!="function"||e.TAG!==5)i=2;else{let _=n[1];typeof _!="object"&&typeof _!="function"||_.TAG!==5?o=1:r=[e._0,_._0]}if(i===2){let _=n[1];if(typeof _!="object"&&typeof _!="function")o=1;else{if(_.TAG===5)throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to the Array.append function is not of type array"});o=1}}if(o===1)throw typeof e!="object"&&typeof e!="function"?new d(L,{MEL_EXN_ID:L,_1:"The Array.append function expects two arguments"}):e.TAG===5?new d(L,{MEL_EXN_ID:L,_1:"The second argument given to the Array.append function is not of type array"}):new d(L,{MEL_EXN_ID:L,_1:"The Array.append function expects two arguments"});return[t,{TAG:5,_0:xa(r[0],r[1])}]}function Zl(t,n){if(n.length!==3)throw new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects exactly three arguments"});let e=n[0],r,o=0,i=0;if(typeof e!="object"&&typeof e!="function"||e.TAG!==10)i=2;else{let s=n[1];if(typeof s!="object"&&typeof s!="function"||s.TAG!==4)o=1;else{let a=n[2];r=[e._0,s._0,a]}}if(i===2){let s=n[1];if(typeof s!="object"&&typeof s!="function")o=1;else{if(s.TAG===4)throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to the Html.with_attribute function is not of type html element"});o=1}}if(o===1)throw typeof e!="object"&&typeof e!="function"?new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects exactly three arguments"}):e.TAG===10?new d(L,{MEL_EXN_ID:L,_1:"The second argument given to the Html.with_attribute function is not of type string"}):new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects exactly three arguments"});let _=r[0],c=U(jr,r[1],r[2],_.attributes);return[t,{TAG:10,_0:{tag:_.tag,attributes:c,children:_.children}}]}function Wl(t,n){if(n.length!==1)throw new d(L,{MEL_EXN_ID:L,_1:"The Math.floor function expects one argument (the number to floor)."});let e=n[0],r;if(typeof e!="object"&&typeof e!="function")throw new d(L,{MEL_EXN_ID:L,_1:"The argument given to the Math.floor function is not of type float or int"});switch(e.TAG){case 0:r=e._0;break;case 1:r=Math.floor(e._0)|0;break;default:throw new d(L,{MEL_EXN_ID:L,_1:"The argument given to the Math.floor function is not of type float or int"})}return[t,{TAG:0,_0:r}]}function Kl(t,n){if(n.length!==2)throw new d(L,{MEL_EXN_ID:L,_1:"The Portal.push function expects exactly two arguments"});let e=n[0],r;if(typeof e!="object"&&typeof e!="function")throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to the Portal.push function is not of type string"});if(e.TAG===4){let D=n[1];r=[e._0,D]}else throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to the Portal.push function is not of type string"});let o=U(Va,r[0],r[1],t.portals),i=t.declaration_render_path,_=t.stack,c=t.resolved_functions,s=t.globals,a=t.past_frames,m=t.current_frame,p=t.constants,h=t.declarations,C=t.tag_path,x=t.tag_meta,y=t.tag_data_provider,S=t.tag_meta_provider;return[{declaration_render_path:i,stack:_,resolved_functions:c,globals:s,past_frames:a,current_frame:m,constants:p,declarations:h,tag_path:C,tag_meta:x,tag_data_provider:y,tag_meta_provider:S,portals:o},0]}function Jl(t,n){if(n.length!==2)throw new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects two arguments"});let e=n[0],r,o=0,i=0;if(typeof e!="object"&&typeof e!="function"||e.TAG!==6)i=2;else{let _=n[1];if(typeof _!="object"&&typeof _!="function")throw new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects two arguments"});if(_.TAG===6)r=[e._0,_._0];else throw new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects two arguments"})}if(i===2){let _=n[1];if(typeof _!="object"&&typeof _!="function")o=1;else{if(_.TAG===6)throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to the Record.merge function is not of type record"});o=1}}if(o===1)throw typeof e!="object"&&typeof e!="function"?new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects two arguments"}):e.TAG===5?new d(L,{MEL_EXN_ID:L,_1:"The second argument given to the Record.merge function is not of type record"}):new d(L,{MEL_EXN_ID:L,_1:"The Record.merge function expects two arguments"});return[t,{TAG:6,_0:U(Ya,(function(_,c,s){return s}),r[0],r[1])}]}function nu(t,n){let e=t!==void 0?t:0;return{s:n,len:n.length,i:e}}var Rc=It("Pinc_core__Utf8_string.Malformed");function eu(t,n,e,r){let o=function(c){throw new d(Rc,{MEL_EXN_ID:Rc,_1:c.s,_2:c.i})},i=function(c,s,a){let m=c!==void 0?c:0;if(s<1)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_core/utf8_string.ml",55,4]});if((t.i+s|0)<t.len){let p=1,h=a;for(;;){let C=h,x=p,y=R(t.s,t.i+x|0);y>>>6!==2&&o(t),x===1&&m!==0&&(y&63)<m&&o(t);let S=C<<6|y&63;if(x===s)return $i(S)?(t.i=(t.i+x|0)+1|0,b(n,S)):o(t);h=S,p=x+1|0}}else return o(t)};if(t.i>=t.len)return b(e,void 0);let _=R(t.s,t.i);return _>=225?_>=241?_>=245?o(t):i(void 0,3,_&7):_>=240?i(16,3,_&7):i(void 0,2,_&15):_>=194?_>=224?i(32,2,_&15):i(void 0,1,_&31):_>=128?o(t):(t.i=1+t.i|0,b(n,Ti(_)))}function bd(t,n,e,r){let o=nu(t,r),i=function(_){return eu(o,(function(c){return i($(n,_,c))}),(function(c){return _}),void 0)};return i(e)}function Yc(t,n){return Qt(bd(t!==void 0?t:0,(function(r,o){return{hd:o,tl:r}}),0,n))}function ru(t){let n=_t((function(o,i){let _=i;return o+(_<=127?1:_<=2047?2:_<=65535?3:_<=2097151?4:5)|0}),0,t);n>Mn&&pn("CCUtf8_string.of_list: string size limit exceeded");let e=gn(n,0),r={contents:0};if(Se((function(o){let i=function(c){e[r.contents]=c,r.contents=r.contents+1|0},_=o;if(!$i(_))throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_core/utf8_string.ml",117,2]});return _<=127?i(_):_<=2047?(i(192|_>>>6),i(128|_&63)):_<=65535?(i(224|_>>>12),i(128|_>>>6&63),i(128|_&63)):_<=2097151?(i(240|_>>>18),i(128|_>>>12&63),i(128|_>>>6&63),i(128|_&63)):(i(248|_>>>24),i(128|_>>>18&63),i(128|_>>>12&63),i(128|_>>>6&63),i(128|_&63))}),t),r.contents!==n)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_core/utf8_string.ml",168,2]});return mt(e)}function yd(t){let n=It("Stop");try{let e=nu(void 0,t);for(;;)eu(e,(function(r){}),(function(r){throw new d(n,{MEL_EXN_ID:n})}),void 0);throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_core/utf8_string.ml",179,4]})}catch(e){let r=yt(e);if(r.MEL_EXN_ID===Rc)return!1;if(r.MEL_EXN_ID===n)return!0;throw r}}function Qc(t){return yd(t)?t:pn("CCUtf8_string.of_string_exn")}function ou(t,n){if(n.length!==1)throw new d(L,{MEL_EXN_ID:L,_1:"The String.length function expects one argument (the string to compute the length of)."});let e=n[0],r;if(typeof e!="object"&&typeof e!="function")throw new d(L,{MEL_EXN_ID:L,_1:"The argument given to the String.length function is not of type string"});if(e.TAG===4)r=e._0;else throw new d(L,{MEL_EXN_ID:L,_1:"The argument given to the String.length function is not of type string"});return[t,{TAG:0,_0:r.length}]}function iu(t,n){if(n.length!==1)throw new d(L,{MEL_EXN_ID:L,_1:"The `String.characters` function must recieve one argument (string)."});let e=n[0],r;if(typeof e!="object"&&typeof e!="function")throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to `String.characters` is not of type string"});if(e.TAG===4)r=e._0;else throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to `String.characters` is not of type string"});let o=jo(hn((function(i){return{TAG:3,_0:i}}),Yc(void 0,Qc(r))));return[t,{TAG:5,_0:o}]}function _u(t,n){if(n.length!==3)throw new d(L,{MEL_EXN_ID:L,_1:"The String.sub function must recieve three arguments (string, offset, length)."});let e=n[0],r,o=0,i=0;if(typeof e!="object"&&typeof e!="function"||e.TAG!==4)i=2;else{let c=n[1];if(typeof c!="object"&&typeof c!="function"||c.TAG!==0)o=1;else{let s=n[2];typeof s!="object"&&typeof s!="function"||s.TAG!==0?o=1:r=[e._0,c._0,s._0]}}if(i===2){let c=n[1];if(typeof c!="object"&&typeof c!="function"||c.TAG!==0)o=1;else{let s=n[2];if(typeof s!="object"&&typeof s!="function")o=1;else{if(s.TAG===0)throw new d(L,{MEL_EXN_ID:L,_1:"The first argument given to `String.sub` is not of type string"});o=1}}}if(o===1){if(typeof e!="object"&&typeof e!="function")throw new d(L,{MEL_EXN_ID:L,_1:"The String.sub function must recieve three arguments (string, offset, length)."});if(e.TAG===4){let c=n[1],s=0,a=n[2];if(typeof a!="object"&&typeof a!="function")s=2;else{if(a.TAG===0)throw new d(L,{MEL_EXN_ID:L,_1:"The second argument (offset) given to `String.sub` is not of type int"});s=2}if(s===2)throw typeof c!="object"&&typeof c!="function"?new d(L,{MEL_EXN_ID:L,_1:"The String.sub function must recieve three arguments (string, offset, length)."}):c.TAG===0?new d(L,{MEL_EXN_ID:L,_1:"The third argument (length) given to `String.sub` is not of type int"}):new d(L,{MEL_EXN_ID:L,_1:"The String.sub function must recieve three arguments (string, offset, length)."})}else throw new d(L,{MEL_EXN_ID:L,_1:"The String.sub function must recieve three arguments (string, offset, length)."})}let _=ru(fa(r[2],ma(r[1],Yc(void 0,Qc(r[0])))));return[t,{TAG:4,_0:_}]}var cu=[["pinc_array_length",[1,Ql]],["pinc_array_append",[2,Hl]],["pinc_string_length",[1,ou]],["pinc_string_characters",[1,iu]],["pinc_string_sub",[3,_u]],["pinc_record_merge",[2,Jl]],["pinc_html_with_attribute",[3,Zl]],["pinc_math_floor",[1,Wl]],["pinc_portal_push",[2,Kl]]];function su(t){return $a((function(n){return t===n[0]}),cu)}var wd=vo((function(t){return t[1]}),cu);function au(t){return Tt(wd,t)[0]}function Ad(t){if(typeof t!="object"&&typeof t!="function")switch(t){case 0:return 22;case 1:return 0;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;case 8:return 8;case 9:return 9;case 10:return 10;case 11:return 11;case 12:return 12;case 13:return 13;case 14:return 14;case 15:return 15;case 16:return 16;case 17:return 17;case 18:return 18;case 19:return 19;case 20:return 25;case 21:return 26;case 22:return 28;case 23:return 29;case 24:return 30;case 25:return 31;case 26:return 33;case 27:return 36;case 28:return 41;case 29:return 42;case 30:return 43;case 31:return 47;case 32:return 254}else switch(t.TAG){case 0:return 1;case 1:return 20;case 2:return 21;case 3:return 23;case 4:return 24;case 5:return 27;case 6:return 32;case 7:return 34;case 8:return 35;case 9:return 38;case 10:return 39;case 11:return 40;case 12:return 44;case 13:return 46;case 14:return 45}}function Ed(t){if(typeof t!="object"&&typeof t!="function")return 0;switch(t.TAG){case 10:return 8;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 11:return 4;case 12:case 13:return 2;case 14:return 5}}function n_(t,n,e){return ka(t,n,e),n+4|0}function e_(t){let n=1+Ed(t)|0,e=$t(n);Rt(e,0,Ad(t));let r=1,o=0;if(!(typeof t!="object"&&typeof t!="function"))switch(t.TAG){case 10:let i=t._0;r=n_(e,r,i[0]),r=n_(e,r,i[1]);break;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 11:o=1;break;case 12:case 13:o=2;break;case 14:let _=t._0;Rt(e,r,_[0]),r=r+1|0,r=n_(e,r,_[1]);break}switch(o){case 1:r=n_(e,r,t._0);break;case 2:Ma(e,r,t._0),r=r+2|0;break}return e}function uu(t,n){return t!==void 0?wt(t):n}function fu(t){if(t!==void 0)return wt(t);throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"option is None"})}function Kt(t,n){if(t!==void 0)return b(n,wt(t))}function An(t,n){if(n!==void 0)return z(b(t,wt(n)))}function $d(t,n,e){let r={contents:n},o=An((function(i){let _=$(e,r.contents,i);return r.contents=_[0],_[1]}),t);return[r.contents,o]}var r_={fold_map:$d};function Td(t,n,e){let r={contents:n},o=hn((function(i){let _=$(e,r.contents,i);return r.contents=_[0],_[1]}),t);return[r.contents,o]}function Gd(t){for(;;){let n=t;if(n){if(!n.tl)return n.hd;t=n.tl;continue}throw new d(L,{MEL_EXN_ID:L,_1:"List.last_exn"})}}function vd(t,n){return Qt(_t(function(r,o){return aa(b(t,o),r)?r:{hd:o,tl:r}},0,n))}var pe={fold_map:Td,last_exn:Gd,uniq:vd};function jd(t){return t>=14?t===32:t>=9}var mu={is_whitespace:jd};function Md(t,n){try{return Bt(n,t,n.length-t|0)}catch(e){let r=yt(e);if(r.MEL_EXN_ID===L)return"";throw r}}function kd(t,n){let e=It("Found");try{No((function(r,o){if(b(n,o))throw new d(e,{MEL_EXN_ID:e,_1:r})}),t);return}catch(r){let o=yt(r);if(o.MEL_EXN_ID===e)return o._1;throw o}}function Id(t){let n=t.length,e=0;for(;(function(){let o=!1;if(e<n){let i=t.charCodeAt(e);o=i>=14?i===32:i>=9}return o})();)e=e+1|0;let r=n-1|0;return r>=e?Bt(t,e,(r-e|0)+1|0):fc}function Ld(t){let e=t.length-1|0;for(;(function(){let r=!1;if(e>=0){let o=t.charCodeAt(e);r=o>=14?o===32:o>=9}return r})();)e=e-1|0;return e>=0?Bt(t,0,(e-0|0)+1|0):fc}function Dd(t){let n=function(o){return ko(o<10?48+o|0:(97+o|0)-10|0)},e=t.length,r=$t(e<<1);for(let o=0;o<e;++o){let i=R(t,o);r[o<<1]=n(i>>>4),r[(o<<1)+1|0]=n(i&15)}return mt(r)}function Nd(t){let n=function(r){return r>=65?r>=97?r>=103?pn("String.of_hex"):(r-97|0)+10|0:r>=71?pn("String.of_hex"):(r-65|0)+10|0:r>57||r<48?pn("String.of_hex"):r-48|0},e=function(r){return(n(R(t,r))<<4)+n(R(t,r+1|0))|0};return Na(t.length>>1,(function(r){return ko(e(r<<1))}))}var Xr={drop_first:Md,find_index:kd,trim_left:Id,trim_right:Ld,to_hex:Dd,of_hex:Nd};var vy=Number.NaN,jy=L_([2146435072,1]);function Ge(t,n){if(typeof n!="object"&&typeof n!="function")return Dt(t,0);switch(n.TAG){case 0:return Dt(t,1),Di(t,Bn(n._0));case 1:return Dt(t,2),Di(t,qs(n._0));case 2:return n._0?Dt(t,3):Dt(t,4);case 3:return Dt(t,5),Di(t,Bn(n._0));case 4:let e=n._0,r=e.length;return Dt(t,6),qt(t,r),Lt(t,e);case 5:let o=n._0,i=o.length;return Dt(t,7),qt(t,i),_e((function(s){return Ge(t,s)}),o);case 6:let _=n._0,c=b(Hr,_);return Dt(t,8),qt(t,c),$(_r,(function(s,a){let m=s.length;qt(t,m),Lt(t,s),Ge(t,a)}),_);case 7:return du(t,n._0);case 8:return zd(t,n._0);case 9:return Fd(t,n._0);case 10:return Od(t,n._0);case 11:return Ud(t,n._0);case 12:return Rd(t,n._0);case 13:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_types/Value.ml",209,32]});case 14:return Vd(t,n._0)}}function du(t,n){let e=n.num_locals,r=n.num_parameters,o=n.instructions;Dt(t,9),qt(t,e),qt(t,r),qt(t,o.length),_e((function(i){let _=e_(i);Li(t,_)}),o)}function Fd(t,n){let e=n.builtin_num_parameters,r=n.builtin_fn_index;Dt(t,10),qt(t,e),qt(t,r)}function zd(t,n){let e=n.fn,r=n.free_variables,o=r.length;Dt(t,11),qt(t,o),_e((function(i){return Ge(t,i)}),r),du(t,e)}function Od(t,n){let e=n.tag,r=n.attributes,o=n.children;Dt(t,12);let i=e.length;Dt(t,i),Lt(t,e);let _=b(Hr,r);qt(t,_),$(_r,(function(s,a){let m=s.length;qt(t,m),Lt(t,s),Ge(t,a)}),r);let c=o.length;qt(t,c),_e((function(s){return Ge(t,s)}),o)}function Vd(t,n){let e=n.portal_name,r=n.portal_attributes;Dt(t,15);let o=e.length;Dt(t,o),Lt(t,e);let i=b(Hr,r);qt(t,i),$(_r,(function(_,c){let s=_.length;qt(t,s),Lt(t,_),Ge(t,c)}),r)}function Ud(t,n){Dt(t,13);let e=n.length;qt(t,e),_e((function(r){return Ge(t,r)}),n)}function Rd(t,n){let e=n.name,r=n.subtree;Dt(t,14);let o=e.length;Dt(t,o),Lt(t,e),Ge(t,r)}function pu(t,n){let e=e_(n);Li(t,e)}function Qd(t){let n=bt(65565),e=t.constants,r=e.length;return qt(n,r),_e((function(o){return Ge(n,o)}),e),qt(n,t.instructions.length),_e((function(o){return pu(n,o)}),t.instructions),qt(n,t.meta_instructions.length),_e((function(o){return pu(n,o)}),t.meta_instructions),W(n)}function Hc(t){let n=bt(65565);return $(_r,(function(e,r){r.kind===0?Dt(n,0):Dt(n,1),bc(n,r.id),bc(n,e.length),Lt(n,e);let i=Qd(r);qt(n,i.length),Lt(n,i)}),t),W(n)}var Ny=Gt(1e3,0);function gu(t){let n=T_("CamlOO");return t[1]=n,t}var Zd=(function(t){var n=new Array(t);return n.TAG=248,n});function Wd(t){let n=0;for(let e=0,r=t.length;e<r;++e)n=Math.imul(223,n)+R(t,e)|0;return n=n&2147483647,n>1073741823?n- -2147483648|0:n}var Kd=Ne,wu={compare:Kd};function io(t){return typeof t!="object"&&typeof t!="function"?0:t.h}function ve(t,n,e,r){let o=io(t),i=io(r);return{TAG:0,l:t,v:n,d:e,r,h:o>=i?o+1|0:i+1|0}}function bu(t,n,e,r){let o;o=typeof t!="object"&&typeof t!="function"?0:t.h;let i;if(i=typeof r!="object"&&typeof r!="function"?0:r.h,o>(i+2|0)){if(typeof t!="object"&&typeof t!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let m=t.r,p=t.d,h=t.v,C=t.l;if(io(C)>=io(m))return ve(C,h,p,ve(m,n,e,r));if(!(typeof m!="object"&&typeof m!="function"))return ve(ve(C,h,p,m.l),m.v,m.d,ve(m.r,n,e,r));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})}if(i<=(o+2|0))return{TAG:0,l:t,v:n,d:e,r,h:o>=i?o+1|0:i+1|0};if(typeof r!="object"&&typeof r!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let _=r.r,c=r.d,s=r.v,a=r.l;if(io(_)>=io(a))return ve(ve(t,n,e,a),s,c,_);if(!(typeof a!="object"&&typeof a!="function"))return ve(ve(t,n,e,a.l),a.v,a.d,ve(a.r,s,c,_));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})}function Zc(t,n,e){if(typeof e!="object"&&typeof e!="function")return{TAG:0,l:0,v:t,d:n,r:0,h:1};let r=e.r,o=e.d,i=e.v,_=e.l,c=$(wu.compare,t,i);if(c===0)return o===n?e:{TAG:0,l:_,v:t,d:n,r,h:e.h};if(c<0){let a=Zc(t,n,_);return _===a?e:bu(a,i,o,r)}let s=Zc(t,n,r);return r===s?e:bu(_,i,o,s)}function Jd(t,n){for(;;){let e=n;if(typeof e!="object"&&typeof e!="function")throw new d(pt,{MEL_EXN_ID:pt});let r=$(wu.compare,t,e.v);if(r===0)return e.d;n=r<0?e.l:e.r}}var t1=Ne,n1={compare:t1};function _o(t){return typeof t!="object"&&typeof t!="function"?0:t.h}function je(t,n,e,r){let o=_o(t),i=_o(r);return{TAG:0,l:t,v:n,d:e,r,h:o>=i?o+1|0:i+1|0}}function yu(t,n,e,r){let o;o=typeof t!="object"&&typeof t!="function"?0:t.h;let i;if(i=typeof r!="object"&&typeof r!="function"?0:r.h,o>(i+2|0)){if(typeof t!="object"&&typeof t!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let m=t.r,p=t.d,h=t.v,C=t.l;if(_o(C)>=_o(m))return je(C,h,p,je(m,n,e,r));if(!(typeof m!="object"&&typeof m!="function"))return je(je(C,h,p,m.l),m.v,m.d,je(m.r,n,e,r));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})}if(i<=(o+2|0))return{TAG:0,l:t,v:n,d:e,r,h:o>=i?o+1|0:i+1|0};if(typeof r!="object"&&typeof r!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let _=r.r,c=r.d,s=r.v,a=r.l;if(_o(_)>=_o(a))return je(je(t,n,e,a),s,c,_);if(!(typeof a!="object"&&typeof a!="function"))return je(je(t,n,e,a.l),a.v,a.d,je(a.r,s,c,_));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})}function Wc(t,n,e){if(typeof e!="object"&&typeof e!="function")return{TAG:0,l:0,v:t,d:n,r:0,h:1};let r=e.r,o=e.d,i=e.v,_=e.l,c=$(n1.compare,t,i);if(c===0)return o===n?e:{TAG:0,l:_,v:t,d:n,r,h:e.h};if(c<0){let a=Wc(t,n,_);return _===a?e:yu(a,i,o,r)}let s=Wc(t,n,r);return r===s?e:yu(_,i,o,s)}var e1=De,r1={compare:e1};function co(t){return typeof t!="object"&&typeof t!="function"?0:t.h}function Me(t,n,e,r){let o=co(t),i=co(r);return{TAG:0,l:t,v:n,d:e,r,h:o>=i?o+1|0:i+1|0}}function Cu(t,n,e,r){let o;o=typeof t!="object"&&typeof t!="function"?0:t.h;let i;if(i=typeof r!="object"&&typeof r!="function"?0:r.h,o>(i+2|0)){if(typeof t!="object"&&typeof t!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let m=t.r,p=t.d,h=t.v,C=t.l;if(co(C)>=co(m))return Me(C,h,p,Me(m,n,e,r));if(!(typeof m!="object"&&typeof m!="function"))return Me(Me(C,h,p,m.l),m.v,m.d,Me(m.r,n,e,r));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})}if(i<=(o+2|0))return{TAG:0,l:t,v:n,d:e,r,h:o>=i?o+1|0:i+1|0};if(typeof r!="object"&&typeof r!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"});let _=r.r,c=r.d,s=r.v,a=r.l;if(co(_)>=co(a))return Me(Me(t,n,e,a),s,c,_);if(!(typeof a!="object"&&typeof a!="function"))return Me(Me(t,n,e,a.l),a.v,a.d,Me(a.r,s,c,_));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Map.bal"})}function Kc(t,n,e){if(typeof e!="object"&&typeof e!="function")return{TAG:0,l:0,v:t,d:n,r:0,h:1};let r=e.r,o=e.d,i=e.v,_=e.l,c=$(r1.compare,t,i);if(c===0)return o===n?e:{TAG:0,l:_,v:t,d:n,r,h:e.h};if(c<0){let a=Kc(t,n,_);return _===a?e:Cu(a,i,o,r)}let s=Kc(t,n,r);return r===s?e:Cu(_,i,o,s)}var o1={v:0};function xu(t){return t<=2?t:xu((t+1|0)/2|0)<<1}function Su(t){ga(o1);let n=t.length,e=Gt((n<<1)+2|0,0);Wt(e,0,n),Wt(e,1,((xu(n)<<5)/8|0)-1|0);for(let r=0;r<n;++r)Wt(e,(r<<1)+3|0,Tt(t,r));return{size:2,methods:e,methods_by_name:0,methods_by_label:0,previous_states:0,hidden_meths:0,vars:0,initializers:0}}function i1(t,n){let e=t.methods.length;if(n<=e)return;let r=Gt(n,0);ir(t.methods,0,r,0,e),t.methods=r}var _1={v:0};function c1(t){let n=t.size;return t.size=n+1|0,n}function Au(t,n){try{return $(Jd,n,t.vars)}catch(e){let r=yt(e);if(r.MEL_EXN_ID===pt){let o=c1(t);return n!==""&&(t.vars=U(Zc,n,o,t.vars)),o}throw r}}function Eu(t){if(t===0)return Su([]);let n=vo(Wd,t),e=Su(n);return Ea((function(r,o){let i=(r<<1)+2|0;e.methods_by_name=U(Wc,o,i,e.methods_by_name),e.methods_by_label=U(Kc,i,!0,e.methods_by_label)}),t),e}function $u(t){K_(_1,t.size-1|0),t.initializers=Qt(t.initializers),i1(t,3+((Tt(t.methods,1)<<4)/32|0)|0)}function Tu(t,n){if(t)return t;let e=Zd(n.size);return e[0]=n.methods,gu(e)}var Jc={TAG:0,key:void 0,data:void 0,next:void 0};function a1(t){let n={contents:void 0};if(!Jc.key){let o=Eu(0),i=Au(o,"x"),_=function(c){let s=Tu(void 0,o);return s[i]=c[1],s};$u(o),Jc.key=_}let e=[void 0,n],r=b(Jc.key,e);return n.contents=z(r),{TAG:0,_0:r}}function l1(t,n,e){if(n.TAG!==nc)return Gt(t,n);let r=Gt(t,e);return ic(r,0,t,n),r}function Gu(t,n){if(t.TAG!==Ci)return oc(t);let e=t.length,r=Gt(e,n);for(let o=0;o<e;++o)r[o]=t[o];return r}function u1(t,n){return t.TAG!==Ci?t:Gu(t,n)}var Pr=It("Stdlib.Dynarray.Dummy.Array.Dummy_found");function f1(t,n){let e=t.length;if(e===0||Tt(t,0).TAG!==nc){for(let o=0;o<e;++o)if(t[o]===n)throw new d(Pr,{MEL_EXN_ID:Pr,_1:o});return t}let r=Gt(e,Tt(t,0));for(let o=1;o<e;++o){let i=t[o];if(i===n)throw new d(Pr,{MEL_EXN_ID:Pr,_1:o});r[o]=i}return r}function m1(t,n,e){let r=Gt(t,e);for(let o=0;o<t;++o)r[o]=b(n,o);return r}function d1(t,n,e,r,o){if(t.TAG!==Ci)return ir(t,n,e,r,o);for(let i=0;i<o;++i)Wt(e,r+i|0,Tt(t,n+i|0))}function p1(t,n,e,r,o,i,_){if(n===o)return ir(t,e,r,i,_);if(_<0||e<0||(e+_|0)<0||(e+_|0)>t.length||i<0||(i+_|0)<0||(i+_|0)>r.length)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./dynarray.cppo.ml",351,13]});if(t===r)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./dynarray.cppo.ml",364,8]});for(let c=0;c<_;++c){let s=t[e+c|0];if(s===n)throw new d(Pr,{MEL_EXN_ID:Pr,_1:e+c|0});r[i+c|0]=s}}function h1(t,n){return Aa(t,0,n)}function g1(t,n,e,r){let o=Gt(r,e);return ir(t,0,o,0,n),o}var b1={make:l1,init:m1,copy_from_array:Gu,unsafe_nocopy_from_array:u1,Dummy_found:Pr,unsafe_nocopy_to_array:f1,blit_array:d1,blit:p1,prefix:h1,extend:g1},y1=a1();function C1(t,n,e){return e===0?$(Re(pn,{TAG:0,_0:{TAG:11,_0:"Dynarray.",_1:{TAG:2,_0:0,_1:{TAG:11,_0:": index ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" out of bounds (empty dynarray)",_1:0}}}}},_1:"Dynarray.%s: index %d out of bounds (empty dynarray)"}),t,n):U(Re(pn,{TAG:0,_0:{TAG:11,_0:"Dynarray.",_1:{TAG:2,_0:0,_1:{TAG:11,_0:": index ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" out of bounds (0..",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:12,_0:41,_1:0}}}}}}},_1:"Dynarray.%s: index %d out of bounds (0..%d)"}),t,n,e-1|0)}function S1(t,n){return $(Re(pn,{TAG:0,_0:{TAG:11,_0:"Dynarray.",_1:{TAG:2,_0:0,_1:{TAG:11,_0:": negative capacity ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" requested",_1:0}}}}},_1:"Dynarray.%s: negative capacity %d requested"}),t,n)}function w1(t,n){return U(Re(pn,{TAG:0,_0:{TAG:11,_0:"Dynarray.",_1:{TAG:2,_0:0,_1:{TAG:11,_0:": cannot grow to requested length ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" (max_array_length is ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:12,_0:41,_1:0}}}}}}},_1:"Dynarray.%s: cannot grow to requested length %d (max_array_length is %d)"}),t,n,Ur)}var vu="Invalid dynarray (unsynchronized concurrent length change)";function x1(t,n){return U(Re(pn,{TAG:0,_0:{TAG:2,_0:0,_1:{TAG:11,_0:": missing element at position ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" < length ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:0}}}}},_1:"%s: missing element at position %d < length %d"}),vu,t,n)}function A1(t,n){return U(Re(pn,{TAG:0,_0:{TAG:2,_0:0,_1:{TAG:11,_0:": length ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" > capacity ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:0}}}}},_1:"%s: length %d > capacity %d"}),vu,t,n)}function E1(t,n,e){return U(Re(pn,{TAG:0,_0:{TAG:11,_0:"Dynarray.",_1:{TAG:2,_0:0,_1:{TAG:11,_0:": a length change from ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" to ",_1:{TAG:4,_0:0,_1:0,_2:0,_3:{TAG:11,_0:" occurred during iteration",_1:0}}}}}}},_1:"Dynarray.%s: a length change from %d to %d occurred during iteration"}),t,n,e)}function $1(t,n,e){let r=n.length;if(e!==r)return E1(t,e,r)}function i_(t){return{length:0,arr:[],dummy:y1._0}}function ts(t,n,e){let r=t.length,o=t.arr;return n>=r?C1("set",n,r):Wt(o,n,e)}function ju(t){let n=t.length-1|0;if(n>=0)return t.length=n,Wt(t.arr,n,t.dummy)}function T1(t){let n=t<=512?t<<1:t+(t/2|0)|0;return Ns(8>n?8:n,Ur)}function ns(t,n){let e=t.arr,r=e.length;if(n<0)return S1("ensure_capacity",n);if(r>=n)return;n>Ur&&w1("ensure_capacity",n);let o=G_(T1(r),n);if(o<=0)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./dynarray.cppo.ml",685,4]});let i=b1.extend(e,t.length,t.dummy,o);if(t.arr=i,0>n)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./dynarray.cppo.ml",690,4]});if(!(n<=i.length))throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["./dynarray.cppo.ml",691,4]})}function G1(t,n){ns(t,t.length+n|0)}function es(t,n){let e=t.length,r=t.arr;if(!(!(e>=r.length)&&(t.length=e+1|0,r[e]=n,!0)))for(;;){G1(t,1);let o=t.length,i=t.arr;if(!(o>=i.length)&&(t.length=o+1|0,i[o]=n,!0))return}}function Br(t){let n=t.length,e=t.arr,r=t.dummy,o=e.length;n>o&&A1(n,o);let i=Go(n,(function(_){let c=e[_];return c===r?x1(_,n):c}));return $1("to_array",t,n),i}var __={offset:0,instruction:0};function j1(t,n){let r={hd:{instructions:i_(),last_instruction:__,previous_instruction:__,loop_level:0,break_instructions:0,continue_instructions:0},tl:0},o=i_();ns(o,2048);let i=Qa();return{constants:o,symbol_table:i,frames:r,declaration_ids:t}}function he(t){let n=t.frames;if(n)return n.hd;throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",45,10]})}function so(t){return he(t).last_instruction.offset}function M1(t,n,e){let r=t.frames;if(r){let o=r.hd,i=o.instructions,_={offset:n,instruction:e},c=o.last_instruction,s=o.loop_level,a=o.break_instructions,m=o.continue_instructions,p={instructions:i,last_instruction:_,previous_instruction:c,loop_level:s,break_instructions:a,continue_instructions:m};return{constants:t.constants,symbol_table:t.symbol_table,frames:{hd:p,tl:r.tl},declaration_ids:t.declaration_ids}}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",66,10]})}function c_(t,n,e){let r=t.frames;if(r)return ts(r.hd.instructions,n,e),t;throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",80,10]})}function Qo(t){let n=t.frames;if(n){let e=n.hd;ju(e.instructions);let r=e.instructions,o=e.previous_instruction,i=e.previous_instruction,_=e.loop_level,c=e.break_instructions,s=e.continue_instructions,a={instructions:r,last_instruction:o,previous_instruction:i,loop_level:_,break_instructions:c,continue_instructions:s};return{constants:t.constants,symbol_table:t.symbol_table,frames:{hd:a,tl:n.tl},declaration_ids:t.declaration_ids}}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",88,10]})}function qr(t,n){return he(t).last_instruction.instruction===n}function k1(t){let n=t.frames;if(n){let e=n.hd,r=e.instructions,o=e.last_instruction,i=e.previous_instruction,_=e.loop_level+1|0,c=e.break_instructions,s=e.continue_instructions,a={instructions:r,last_instruction:o,previous_instruction:i,loop_level:_,break_instructions:c,continue_instructions:s};return{constants:t.constants,symbol_table:t.symbol_table,frames:{hd:a,tl:n.tl},declaration_ids:t.declaration_ids}}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",102,10]})}function I1(t){let n=t.frames;if(n){let e=n.hd,r=e.instructions,o=e.last_instruction,i=e.previous_instruction,_=e.loop_level-1|0,c=e.break_instructions,s=e.continue_instructions,a={instructions:r,last_instruction:o,previous_instruction:i,loop_level:_,break_instructions:c,continue_instructions:s};return{constants:t.constants,symbol_table:t.symbol_table,frames:{hd:a,tl:n.tl},declaration_ids:t.declaration_ids}}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",110,10]})}function rs(t){let n=t.frames;if(n)return n.hd.loop_level;throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",118,10]})}function L1(t,n,e){let r=t.frames;if(r){let o=r.hd,i=o.instructions,_=o.last_instruction,c=o.previous_instruction,s=o.loop_level,a={hd:[n,e],tl:o.break_instructions},m=o.continue_instructions,p={instructions:i,last_instruction:_,previous_instruction:c,loop_level:s,break_instructions:a,continue_instructions:m};return{constants:t.constants,symbol_table:t.symbol_table,frames:{hd:p,tl:r.tl},declaration_ids:t.declaration_ids}}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",124,10]})}function D1(t,n,e){let r=t.frames;if(r){let o=r.hd,i=o.instructions,_=o.last_instruction,c=o.previous_instruction,s=o.loop_level,a=o.break_instructions,m={hd:[n,e],tl:o.continue_instructions},p={instructions:i,last_instruction:_,previous_instruction:c,loop_level:s,break_instructions:a,continue_instructions:m};return{constants:t.constants,symbol_table:t.symbol_table,frames:{hd:p,tl:r.tl},declaration_ids:t.declaration_ids}}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",134,10]})}function N1(t,n,e){let r=rs(t),o=function(_,c,s){let a=s[1],m=s[0];if(r===a){ts(_.instructions,m,{TAG:1,_0:c});return}else return[m,a]},i=t.frames;if(i){let _=i.hd,s=bi(function(S){return o(_,n,S)},_.continue_instructions),m=bi(function(S){return o(_,e,S)},_.break_instructions),p=_.instructions,h=_.last_instruction,C=_.previous_instruction,x=_.loop_level,y={instructions:p,last_instruction:h,previous_instruction:C,loop_level:x,break_instructions:m,continue_instructions:s};return{constants:t.constants,symbol_table:t.symbol_table,frames:{hd:y,tl:i.tl},declaration_ids:t.declaration_ids}}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",156,10]})}function s_(t){let e={instructions:i_(),last_instruction:__,previous_instruction:__,loop_level:0,break_instructions:0,continue_instructions:0};return{constants:t.constants,symbol_table:Wa(t.symbol_table),frames:{hd:e,tl:t.frames},declaration_ids:t.declaration_ids}}function a_(t){let n=t.frames;if(n)return[{constants:t.constants,symbol_table:Ka(t.symbol_table),frames:n.tl,declaration_ids:t.declaration_ids},n.hd];throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",190,10]})}function Mu(t){return{constants:t.constants,symbol_table:Ha(t.symbol_table),frames:t.frames,declaration_ids:t.declaration_ids}}function ku(t){return{constants:t.constants,symbol_table:Za(t.symbol_table),frames:t.frames,declaration_ids:t.declaration_ids}}function l_(t,n){return es(t.constants,n),[t.constants.length-1|0,t]}function F(t,n){let e=he(t),r=e.instructions.length;return es(e.instructions,n),M1(t,r,n)}function Nt(t,n){let e=l_(t,n),r={TAG:0,_0:e[0]};return F(e[1],r)}function lr(t,n,e,r){let o=pc(t.symbol_table,n,e,r);return[{constants:t.constants,symbol_table:o[0],frames:t.frames,declaration_ids:t.declaration_ids},o[1]]}function os(t,n,e){let r=hc(n.symbol_table,e),o=r[1];return o!==void 0?[{constants:n.constants,symbol_table:r[0],frames:n.frames,declaration_ids:n.declaration_ids},o]:P(t,"Unbound identifier `"+(e+"`"))}function Vn(t,n){let e=Wr.kind(n),r;switch(e){case 0:r={TAG:4,_0:n.address};break;case 1:r={TAG:8,_0:n.address};break;case 2:r={TAG:11,_0:n.address};break;case 3:r=28;break}return F(t,r)}function Qe(t,n){let e=Wr.kind(n),r;switch(e){case 0:r={TAG:3,_0:Wr.address(n)};break;case 1:r={TAG:7,_0:Wr.address(n)};break;case 2:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",250,32]});case 3:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",251,36]})}return F(t,r)}function Iu(t,n,e){let r=$(bn,e,n.declaration_ids);return r!==void 0?r:P(t,"Unbound declaration `"+(e+"`"))}function Y(t,n){let e=n.expression_loc,r=n.expression_desc;if(typeof r!="object"&&typeof r!="function")return t;switch(r.TAG){case 0:return K1(t,r._0);case 1:return op(t,r._0);case 2:return Nt(t,{TAG:0,_0:r._0});case 3:return Nt(t,{TAG:1,_0:r._0});case 4:return ep(t,r._0);case 5:return sp(t,r._0);case 6:return np(t,r._0);case 7:return Y1(t,e,r.name,r.parameters);case 8:return Q1(t,r.identifier,r.parameters,r.body);case 9:return rp(t,r.function_definition,r.arguments);case 10:return cp(t,e,r._0);case 11:return ip(t,e,r._0);case 12:return _p(t,r._0.tag_desc);case 13:return tp(t,r.index,r.iterator,r.iterable,r.body);case 14:return Du(t,r._0);case 15:return H1(t,r._0);case 16:return Z1(t,r.condition,r.consequent,r.alternate);case 17:return W1(t,r._0,r._1);case 18:return J1(t,r._0,r._1,r._2)}}function is(t,n){let e=_t(Du,t,n),r=Yt(n),o=Nt(e,{TAG:0,_0:r});return F(o,21)}function _s(t,n){let e=b(Zr,n),r=xr(e),o=r[0],_=_t(function(m,p){return Nt(m,{TAG:4,_0:p})},t,o),s=_t(Y,_,r[1]),a=Yt(o);return F(s,{TAG:5,_0:a})}function X1(t,n){let e=_t((function(o,i){let _=i[2]._0[0],c=lr(o[0],_,i[1],!0);return[c[0],{hd:[_,c[1]],tl:o[1]}]}),[t,0],n),r=e[1];return _t((function(o,i){return Lu(r,o,i)}),e[0],n)}function P1(t){let n=rs(t),e=F(t,{TAG:1,_0:268435455}),r=so(e);return L1(e,r,n)}function B1(t,n,e){let r=n._0,o=r[1],i=r[0],_=os(o,t,i),c=_[1],s=Wr.is_mutable(c),a;if(s){let p=Y(_[0],e);a=Qe(p,c)}else a=P(o,"Trying to update a non mutable variable `"+(i+"`."));let m=F(a,0);return F(m,1)}function Lu(t,n,e){let r=e[2]._0[0],o=e[1],i=Y(n,e[3]),_=To(r,t),c=_!==void 0?[i,_]:lr(i,r,o,o),s=Qe(c[0],c[1]),a=F(s,0);return F(a,1)}function q1(t){let n=rs(t),e=F(t,{TAG:1,_0:268435455}),r=so(e);return D1(e,r,n)}function F1(t,n){let e=Y(t,n);return F(e,1)}function Du(t,n){let e=n.template_node_desc;switch(e.TAG){case 0:return U1(t,e.html_tag_identifier,e.html_tag_attributes,e.html_tag_children);case 1:return V1(t,e.component_tag_identifier,e.component_tag_attributes,e.component_tag_children);case 2:return R1(t,e._0);case 3:return O1(t,e.portal_tag_name,e.portal_tag_attributes);case 4:return Y(t,e._0);case 5:return Nt(t,{TAG:4,_0:e._0})}}function u_(t,n){let e=n.statement_desc;if(typeof e!="object"&&typeof e!="function")return e===0?P1(t):q1(t);switch(e.TAG){case 0:return Lu(0,t,e._0);case 1:return X1(t,e._0);case 2:return B1(t,e._0,e._1);case 3:return F1(t,e._0)}}function z1(t,n){let e=b(Zr,n),r=xr(e),o=r[0],_=_t(function(m,p){return Nt(m,{TAG:4,_0:p})},t,o),s=_t(Y,_,r[1]),a=Yt(o);return F(s,{TAG:5,_0:a})}function O1(t,n,e){let r=Nt(t,{TAG:4,_0:n}),o=_s(r,e);return F(o,31)}function V1(t,n,e,r){let o=n._0,i=Iu(o[1],t,o[0]),_=_s(t,e),c=is(_,r);return F(c,{TAG:13,_0:i})}function U1(t,n,e,r){let o=Nt(t,{TAG:4,_0:n}),i=_s(o,e),_=is(i,r);return F(_,29)}function R1(t,n){let e=is(t,n);return F(e,30)}function Y1(t,n,e,r){let o=su(e),i=o!==void 0?o:P(n,"Unbound external function `"+(e+"`")),_=au(i),c=Yt(r);return _!==c?P(n,"External function %%"+(e+("%% expected "+(String(_)+(" parameters, but got "+String(c)))))):F(t,{TAG:9,_0:i})}function Q1(t,n,e,r){let o=s_(t),i;if(n!==void 0){let k=Ja(o.symbol_table,n._0[0]);i={constants:o.constants,symbol_table:k[0],frames:o.frames,declaration_ids:o.declaration_ids}}else i=o;let _=_t((function(k,q){return lr(k,q._0[0],!1,!1)[0]}),i,e),c=r.expression_desc,s,a=0;if(typeof c!="object"&&typeof c!="function"||c.TAG!==15?a=1:s=_t(u_,_,c._0),a===1){let k=Y(_,r);s=F(k,26)}let m;if(qr(s,1)){let k=Qo(s);m=F(k,26)}else m=s;let p;if(qr(m,26))p=m;else{let k=F(m,0);p=F(k,26)}let h=p.symbol_table.free_variables,C=p.symbol_table.num_bindings,x=a_(p),y=_t(Vn,x[0],h),S=Yt(h),G=Yt(e),D=Br(x[1].instructions),j=l_(y,{TAG:7,_0:{fn_addr:-1,num_locals:C,num_parameters:G,instructions:D}});return F(j[1],{TAG:10,_0:[j[0],S]})}function H1(t,n){let e=Mu(t),r=_t(u_,e,n);return ku(qr(r,1)?Qo(r):r)}function Z1(t,n,e,r){let o=Y(t,n),i=F(o,{TAG:2,_0:268435455}),_=so(i),c=Y(i,e),s=qr(c,1)?Qo(c):c,a=F(s,{TAG:1,_0:268435455}),m=so(a),p=he(a).instructions.length,h=c_(a,_,{TAG:2,_0:p}),C;if(r!==void 0){let y=Y(h,r);C=qr(y,1)?Qo(y):y}else C=F(h,0);let x=he(C).instructions.length;return c_(C,m,{TAG:1,_0:x})}function W1(t,n,e){let r=Y(t,e);return n===0?F(r,18):F(r,19)}function K1(t,n){return n?_t((function(e,r){let o=e[1],i=e[0],_=r.string_template_desc,c;if(_.TAG===0){let a=_._0._0,m=os(a[1],i,a[0]);c=Vn(m[0],m[1])}else c=Nt(i,{TAG:4,_0:_._0});return[o>0?F(c,20):c,o+1|0]}),[t,0],n)[0]:Nt(t,{TAG:4,_0:""})}function J1(t,n,e,r){switch(e){case 0:let o=Y(t,n),i=Y(o,r);return F(i,10);case 1:let _=Y(t,n),c=Y(_,r);return F(c,11);case 2:let s=Y(t,n),a=Y(s,r);return F(a,12);case 3:let m=Y(t,n),p=Y(m,r);return F(p,13);case 4:let h=Y(t,n),C=Y(h,r);return F(C,14);case 5:let x=Y(t,n),y=Y(x,r);return F(y,15);case 6:let S=Y(t,n),G=Y(S,r);return F(G,2);case 7:let D=Y(t,n),j=Y(D,r);return F(j,3);case 8:let k=Y(t,n),q=Y(k,r);return F(q,5);case 9:let N=Y(t,n),rt=Y(N,r);return F(rt,4);case 10:let ot=Y(t,n),Z=Y(ot,r);return F(Z,7);case 11:let Ct=Y(t,n),X=Y(Ct,r);return F(X,6);case 12:let O=Y(t,n),M=Y(O,r);return F(M,20);case 13:let V=Y(t,n),gt=Y(V,r);return F(gt,16);case 14:let tt=Y(t,n),St=Y(tt,r);return F(St,17);case 15:let lt=Y(t,n),J=r.expression_desc,Mt;if(typeof J!="object"&&typeof J!="function")throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",526,12]});if(J.TAG===11)Mt=Nt(lt,{TAG:4,_0:J._0});else throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",526,12]});return F(Mt,23);case 16:let ln=Y(t,n),se=Y(ln,r);return F(se,22);case 17:throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",533,40]});case 18:let Nn=Y(t,n),Kn=Y(Nn,r);return F(Kn,24);case 19:let tn=Y(t,n),Jn=Y(tn,r);return F(Jn,25)}}function tp(t,n,e,r,o){let i=Mu(t),_=k1(i),c=lr(_,e._0[0],!1,!1),s=lr(c[0],".length",!1,!1),a=s[1],m=n!==void 0?n._0[0]:".index",p=Nt(s[0],{TAG:0,_0:0}),h=lr(p,m,!1,!1),C=h[1],x=Qe(h[0],C),y=lr(x,".n_iterations",!1,!1),S=y[1],G=Nt(y[0],{TAG:0,_0:0}),D=Qe(G,S),j=Y(D,r),k=lr(j,".iterable",!1,!1),q=k[1],N=Qe(k[0],q),rt=Vn(N,q),ot=F(rt,27),Z=Qe(ot,a),Ct=he(Z).instructions.length,X=Vn(Z,a),O=Vn(X,C),M=F(O,12),V=F(M,{TAG:2,_0:268435455}),gt=so(V),tt=Vn(V,q),St=Vn(tt,C),lt=F(St,22),J=Qe(lt,c[1]),Mt=Y(J,o),ln=Nt(Mt,{TAG:0,_0:1}),se=Vn(ln,S),Nn=F(se,2),Kn=Qe(Nn,S),tn=he(Kn).instructions.length,Jn=Nt(Kn,{TAG:0,_0:1}),mr=Vn(Jn,C),ae=F(mr,2),Un=Qe(ae,C),le=F(Un,{TAG:1,_0:Ct}),Ze=he(le).instructions.length,te=Vn(le,S),dr=F(te,21),ue=c_(dr,gt,{TAG:2,_0:Ze}),pr=N1(ue,tn,Ze);return ku(I1(pr))}function np(t,n){let e=b(Zr,n),r=xr(e),o=r[0],_=_t(function(m,p){return Nt(m,{TAG:4,_0:p})},t,o),s=_t(function(m,p){return Y(m,p[1])},_,r[1]),a=Yt(o);return F(s,{TAG:5,_0:a})}function ep(t,n){return n?F(t,8):F(t,9)}function rp(t,n,e){let r=Y(t,n),o=_t(Y,r,e),i=Yt(e);return F(o,{TAG:6,_0:i})}function op(t,n){return Nt(t,{TAG:3,_0:n})}function ip(t,n,e){let r=os(n,t,e);return Vn(r[0],r[1])}function _p(t,n){let e=n.kind,r;if(typeof e!="object"&&typeof e!="function")switch(e){case 0:r="String";break;case 1:r="Int";break;case 2:r="Float";break;case 3:r="Boolean";break;case 4:r="Array";break;case 5:r="Record";break;case 6:r="Slot";break;case 7:r="Store";break;case 8:r="SetContext";break;case 9:r="GetContext";break}else r=e._0;let o=Nt(t,{TAG:4,_0:r}),i=_t((function(S,G){return Nt(S,{TAG:4,_0:G})}),o,n.path),_=Nt(i,{TAG:0,_0:Yt(n.path)}),c=F(_,21),a=n.required?1:0,p=b(dc,n.attributes)?[c,a]:[z1(c,n.attributes),a|2],h=p[1],C=p[0],x=n.children,y;if(x!==void 0){let S=F(C,{TAG:1,_0:268435455}),G=so(S),D=he(S).instructions.length,j=Y(S,x),k=h|4,q=F(j,32),N=he(q).instructions.length;y=[c_(q,G,{TAG:1,_0:N}),k,D]}else y=[C,h,0];return F(y[0],{TAG:14,_0:[y[1],y[2]]})}function cp(t,n,e){let r=Iu(n,t,e);return F(t,{TAG:12,_0:r})}function sp(t,n){let e=Mo(Y,t,n),r=Nt(e,{TAG:0,_0:n.length});return F(r,21)}function ap(t,n,e){let r=pc(t.symbol_table,n,!1,!0),o=t.constants,i=r[0],_=t.frames,c=t.declaration_ids,a=s_({constants:o,symbol_table:i,frames:_,declaration_ids:c}),m=e.declaration_body,p=m.expression_desc,h,C=0;if(typeof p!="object"&&typeof p!="function"||p.TAG!==15?C=1:h=_t(u_,a,p._0),C===1){let Z=Y(a,m);h=F(Z,26)}let x;if(qr(h,1)){let Z=Qo(h);x=F(Z,26)}else x=h;let y;if(qr(x,26))y=x;else{let Z=F(x,0);y=F(Z,26)}let S=y.symbol_table.free_variables,G=y.symbol_table.num_bindings,D=a_(y),j=_t(Vn,D[0],S),k=Yt(S);if(k!==0)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",904,2]});let q=Br(D[1].instructions),N=l_(j,{TAG:7,_0:{fn_addr:-1,num_locals:G,num_parameters:0,instructions:q}}),rt=F(N[1],{TAG:10,_0:[N[0],k]}),ot=F(rt,{TAG:6,_0:0});return F(ot,32)}function lp(t,n,e){let r=s_(t),o=e.declaration_body,i=o.expression_desc,_;_=typeof i!="object"&&typeof i!="function"||i.TAG!==15?P(o.expression_loc,"A library declaration must use curly braces."):_t(u_,r,i._0);let c=b(Zr,_.symbol_table.store),s=xr(c),a=s[0],p=_t(function(Z,Ct){return Nt(Z,{TAG:4,_0:Ct})},_,a),h=_t(Vn,p,s[1]),C=Yt(a),x=F(h,{TAG:5,_0:C}),y=F(x,26),S=y.symbol_table.free_variables,G=y.symbol_table.num_bindings,D=a_(y),j=_t(Vn,D[0],S),k=Yt(S);if(k!==0)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_compiler/compiler.ml",941,2]});let q=Br(D[1].instructions),N=l_(j,{TAG:7,_0:{fn_addr:-1,num_locals:G,num_parameters:0,instructions:q}}),rt=F(N[1],{TAG:10,_0:[N[0],k]}),ot=F(rt,{TAG:6,_0:0});return F(ot,32)}function up(t,n){let e=n.declaration_attributes,r=s_(t),o=b(Zr,e),i=xr(o),_=i[0],s=_t(function(y,S){return Nt(y,{TAG:4,_0:S})},r,_),a=_t(Y,s,i[1]),m=Yt(_),p=F(a,{TAG:5,_0:m}),h=F(p,32),C=a_(h),x=Br(C[1].instructions);return[C[0],x]}function fp(t,n,e){let r=j1(t,void 0),o=$(Mi,n,t),i=e.declaration_kind,_;switch(i){case 1:_=[1,lp(r,n,e)];break;case 0:case 2:_=[0,ap(r,n,e)];break}let c=_[1],s=Br(he(c).instructions),a=up(c,e),m=Br(a[0].constants);return{id:o,kind:_[0],instructions:s,meta_instructions:a[1],constants:m}}function Nu(t){let n={contents:-1},e=$(Po,(function(r){return n.contents=n.contents+1|0,n.contents}),t);return $(mc,(function(r,o){return fp(e,r,o)}),t)}function dp(t){return _t((function(n,e){let r=Xr.find_index(e,(function(o){return!mu.is_whitespace(o)}));return r!==void 0?n!==void 0?Er(r,n):r:n}),void 0,t)}function Xu(t){let n=dp(t);return n!==void 0?hn((function(e){return Xr.drop_first(n,e)}),t):t}function pp(t){let n=vi(10,t),e=hn(Xr.trim_right,n);if(!e)return 0;let r=e.hd;return r===""?Xu(e.tl):{hd:Xr.trim_left(r),tl:Xu(e.tl)}}function Pu(t){return wn(`
8
+ `,pp(t))}function Bu(t){let n=function(u){return typeof u!="object"&&typeof u!="function"?0:u.h},e=function(u,f,l){let g;g=typeof u!="object"&&typeof u!="function"?0:u.h;let w;return w=typeof l!="object"&&typeof l!="function"?0:l.h,{TAG:0,l:u,v:f,r:l,h:g>=w?g+1|0:w+1|0}},r=function(u,f,l){let g;g=typeof u!="object"&&typeof u!="function"?0:u.h;let w;if(w=typeof l!="object"&&typeof l!="function"?0:l.h,g>(w+2|0)){if(typeof u!="object"&&typeof u!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Set.bal"});let B=u.r,H=u.v,ct=u.l;if(n(ct)>=n(B))return e(ct,H,e(B,f,l));if(!(typeof B!="object"&&typeof B!="function"))return e(e(ct,H,B.l),B.v,e(B.r,f,l));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Set.bal"})}if(w<=(g+2|0))return{TAG:0,l:u,v:f,r:l,h:g>=w?g+1|0:w+1|0};if(typeof l!="object"&&typeof l!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Set.bal"});let E=l.r,v=l.v,I=l.l;if(n(E)>=n(I))return e(e(u,f,I),v,E);if(!(typeof I!="object"&&typeof I!="function"))return e(e(u,f,I.l),I.v,e(I.r,v,E));throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Set.bal"})},o=function(u,f){if(typeof f!="object"&&typeof f!="function")return{TAG:0,l:0,v:u,r:0,h:1};let l=f.r,g=f.v,w=f.l,E=$(t.compare,u,g);if(E===0)return f;if(E<0){let I=o(u,w);return w===I?f:r(I,g,l)}let v=o(u,l);return l===v?f:r(w,g,v)},i=function(u){return{TAG:0,l:0,v:u,r:0,h:1}},_=function(u,f){return typeof f!="object"&&typeof f!="function"?i(u):r(_(u,f.l),f.v,f.r)},c=function(u,f){return typeof f!="object"&&typeof f!="function"?i(u):r(f.l,f.v,c(u,f.r))},s=function(u,f,l){if(typeof u!="object"&&typeof u!="function")return _(f,l);let g=u.h;if(typeof l!="object"&&typeof l!="function")return c(f,u);let w=l.h;return g>(w+2|0)?r(u.l,u.v,s(u.r,f,l)):w>(g+2|0)?r(s(u,f,l.l),l.v,l.r):e(u,f,l)},a=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")throw new d(pt,{MEL_EXN_ID:pt});let l=f.l;if(typeof l!="object"&&typeof l!="function")return f.v;u=l}},m=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")return;let l=f.l;if(typeof l!="object"&&typeof l!="function")return z(f.v);u=l}},p=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")throw new d(pt,{MEL_EXN_ID:pt});let l=f.r;if(typeof l!="object"&&typeof l!="function")return f.v;u=f.r}},h=function(u){for(;;){let f=u;if(typeof f!="object"&&typeof f!="function")return;let l=f.r;if(typeof l!="object"&&typeof l!="function")return z(f.v);u=f.r}},C=function(u){if(typeof u!="object"&&typeof u!="function")throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Set.remove_min_elt"});let f=u.l;return typeof f!="object"&&typeof f!="function"?u.r:r(C(f),u.v,u.r)},x=function(u,f){return typeof u!="object"&&typeof u!="function"?f:typeof f!="object"&&typeof f!="function"?u:s(u,a(f),C(f))},y=function(u,f){if(typeof f!="object"&&typeof f!="function")return[0,!1,0];let l=f.r,g=f.v,w=f.l,E=$(t.compare,u,g);if(E===0)return[w,!0,l];if(E<0){let I=y(u,w);return[I[0],I[1],s(I[2],g,l)]}let v=y(u,l);return[s(w,g,v[0]),v[1],v[2]]},S=function(u){return typeof u!="object"&&typeof u!="function"},G=function(u){if(typeof u!="object"&&typeof u!="function")return!1;let f=u.l;if(!(typeof f!="object"&&typeof f!="function"))return!1;let l=u.r;return typeof l!="object"&&typeof l!="function"},D=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return!1;let g=$(t.compare,u,l.v);if(g===0)return!0;f=g<0?l.l:l.r}},j=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.r,g=f.v,w=f.l,E=$(t.compare,u,g);if(E===0)return typeof w!="object"&&typeof w!="function"?l:typeof l!="object"&&typeof l!="function"?w:r(w,a(l),C(l));if(E<0){let I=j(u,w);return w===I?f:r(I,g,l)}let v=j(u,l);return l===v?f:r(w,g,v)},k=function(u,f){if(typeof u!="object"&&typeof u!="function")return f;let l=u.h,g=u.v;if(typeof f!="object"&&typeof f!="function")return u;let w=f.h,E=f.v;if(l>=w){if(w===1)return o(E,u);let I=y(g,f);return s(k(u.l,I[0]),g,k(u.r,I[2]))}if(l===1)return o(g,f);let v=y(E,u);return s(k(v[0],f.l),E,k(v[2],f.r))},q=function(u,f){if(typeof u!="object"&&typeof u!="function"||typeof f!="object"&&typeof f!="function")return 0;let l=u.r,g=u.v,w=u.l,E=y(g,f),v=E[0];return E[1]?s(q(w,v),g,q(l,E[2])):x(q(w,v),q(l,E[2]))},N=function(u,f){if(typeof f!="object"&&typeof f!="function")return{TAG:0,_0:0,_1:(function(I){return 0})};let l=f.r,g=f.v,w=f.l,E=$(t.compare,u,g);if(E===0)return 0;if(E<0){let I=N(u,w);if(typeof I!="object"&&typeof I!="function")return 0;let B=I._1;return{TAG:0,_0:I._0,_1:(function(H){return s(b(B,void 0),g,l)})}}let v=N(u,l);return typeof v!="object"&&typeof v!="function"?0:{TAG:0,_0:s(w,g,v._0),_1:v._1}},rt=function(u,f){for(;;){let l=f,g=u;if(typeof g!="object"&&typeof g!="function"||typeof l!="object"&&typeof l!="function")return!0;if(g===l)return!1;let w=N(g.v,l);if(typeof w!="object"&&typeof w!="function"||!rt(g.l,w._0))return!1;f=b(w._1,void 0),u=g.r}},ot=function(u,f){if(typeof u!="object"&&typeof u!="function")return 0;if(typeof f!="object"&&typeof f!="function")return u;let l=u.r,g=u.v,w=u.l,E=y(g,f),v=E[0];return E[1]?x(ot(w,v),ot(l,E[2])):s(ot(w,v),g,ot(l,E[2]))},Z=function(u,f){for(;;){let l=f,g=u;if(typeof g!="object"&&typeof g!="function")return l;f={TAG:0,_0:g.v,_1:g.r,_2:l},u=g.l}},Ct=function(u,f){let l=Z(u,0),g=Z(f,0);for(;;){let w=g,E=l;if(typeof E!="object"&&typeof E!="function")return typeof w!="object"&&typeof w!="function"?0:-1;if(typeof w!="object"&&typeof w!="function")return 1;let v=$(t.compare,E._0,w._0);if(v!==0)return v;g=Z(w._1,w._2),l=Z(E._1,E._2)}},X=function(u,f){return Ct(u,f)===0},O=function(u,f){for(;;){let l=f,g=u;if(typeof g!="object"&&typeof g!="function")return!0;let w=g.r,E=g.v,v=g.l;if(typeof l!="object"&&typeof l!="function")return!1;let I=l.r,B=l.l,H=$(t.compare,E,l.v);if(H===0){if(!O(v,B))return!1;f=I,u=w;continue}if(H<0){if(!O({TAG:0,l:v,v:E,r:0,h:0},B))return!1;u=w;continue}if(!O({TAG:0,l:0,v:E,r:w,h:0},I))return!1;u=v}},M=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;M(u,l.l),b(u,l.v),f=l.r}},V=function(u,f,l){for(;;){let g=l,w=f;if(typeof w!="object"&&typeof w!="function")return g;l=$(u,w.v,V(u,w.l,g)),f=w.r}},gt=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return!0;if(!b(u,l.v)||!gt(u,l.l))return!1;f=l.r}},tt=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return!1;if(b(u,l.v)||tt(u,l.l))return!0;f=l.r}},St=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.r,g=f.v,w=f.l,E=St(u,w),v=b(u,g),I=St(u,l);return v?w===E&&l===I?f:s(E,g,I):x(E,I)},lt=function(u,f){if(typeof f!="object"&&typeof f!="function")return[0,0];let l=f.v,g=lt(u,f.l),w=g[1],E=g[0],v=b(u,l),I=lt(u,f.r),B=I[1],H=I[0];return v?[s(E,l,H),x(w,B)]:[x(E,H),s(w,l,B)]},J=function(u){return typeof u!="object"&&typeof u!="function"?0:(J(u.l)+1|0)+J(u.r)|0},Mt=function(u,f){for(;;){let l=f,g=u;if(typeof l!="object"&&typeof l!="function")return g;f=l.l,u={hd:l.v,tl:Mt(g,l.r)}}},ln=function(u){return Mt(0,u)},se=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")throw new d(pt,{MEL_EXN_ID:pt});let g=l.v,w=$(t.compare,u,g);if(w===0)return g;f=w<0?l.l:l.r}},Nn=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")throw new d(pt,{MEL_EXN_ID:pt});let g=l.v;if(b(u,g)){let w=g,E=l.l;for(;;){let v=E,I=w;if(typeof v!="object"&&typeof v!="function")return I;let B=v.v;if(b(u,B)){E=v.l,w=B;continue}E=v.r}}f=l.r}},Kn=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;let g=l.v;if(b(u,g)){let w=g,E=l.l;for(;;){let v=E,I=w;if(typeof v!="object"&&typeof v!="function")return z(I);let B=v.v;if(b(u,B)){E=v.l,w=B;continue}E=v.r}}f=l.r}},tn=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")throw new d(pt,{MEL_EXN_ID:pt});let g=l.v;if(b(u,g)){let w=g,E=l.r;for(;;){let v=E,I=w;if(typeof v!="object"&&typeof v!="function")return I;let B=v.v;if(b(u,B)){E=v.r,w=B;continue}E=v.l}}f=l.l}},Jn=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;let g=l.v;if(b(u,g)){let w=g,E=l.r;for(;;){let v=E,I=w;if(typeof v!="object"&&typeof v!="function")return z(I);let B=v.v;if(b(u,B)){E=v.r,w=B;continue}E=v.l}}f=l.l}},mr=function(u,f){for(;;){let l=f;if(typeof l!="object"&&typeof l!="function")return;let g=l.v,w=$(t.compare,u,g);if(w===0)return z(g);f=w<0?l.l:l.r}},ae=function(u,f,l){return(ut(u,0)||$(t.compare,p(u),f)<0)&&(ut(l,0)||$(t.compare,f,a(l))<0)?s(u,f,l):k(u,o(f,l))},Un=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.r,g=f.v,w=f.l,E=Un(u,w),v=b(u,g),I=Un(u,l);return w===E&&g===v&&l===I?f:ae(E,v,I)},le=function(u,f){if(typeof f!="object"&&typeof f!="function")return 0;let l=f.r,g=f.v,w=f.l,E=le(u,w),v=b(u,g),I=le(u,l);if(v===void 0)return typeof E!="object"&&typeof E!="function"?I:typeof I!="object"&&typeof I!="function"?E:ae(E,a(I),C(I));let B=wt(v);return w===E&&g===B&&l===I?f:ae(E,B,I)},Ze=function(u){if(!u)return 0;let f=u.tl,l=u.hd;if(!f)return i(l);let g=f.tl,w=f.hd;if(!g)return o(w,i(l));let E=g.tl,v=g.hd;if(!E)return o(v,o(w,i(l)));let I=E.tl,B=E.hd;if(I)if(I.tl){let H=da(t.compare,u),ct=function(un,Ut){switch(un){case 0:return[0,Ut];case 1:if(Ut)return[{TAG:0,l:0,v:Ut.hd,r:0,h:1},Ut.tl];break;case 2:if(Ut){let be=Ut.tl;if(be)return[{TAG:0,l:{TAG:0,l:0,v:Ut.hd,r:0,h:1},v:be.hd,r:0,h:2},be.tl]}break;case 3:if(Ut){let be=Ut.tl;if(be){let $_=be.tl;if($_)return[{TAG:0,l:{TAG:0,l:0,v:Ut.hd,r:0,h:1},v:be.hd,r:{TAG:0,l:0,v:$_.hd,r:0,h:1},h:2},$_.tl]}}break}let Le=un/2|0,fo=ct(Le,Ut),E_=fo[1];if(E_){let be=ct((un-Le|0)-1|0,E_.tl);return[e(fo[0],E_.hd,be[0]),be[1]]}throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["jscomp/stdlib/set.ml",576,18]})};return ct(Yt(H),H)[0]}else return o(I.hd,o(B,o(v,o(w,i(l)))));else return o(B,o(v,o(w,i(l))))},te=function(u,f){return Rr((function(l,g){return o(g,l)}),f,u)},dr=function(u){return te(u,0)},ue=function(u,f){if(typeof u!="object"&&typeof u!="function")return 0;let l=Z(u._1,u._2);return{TAG:0,_0:u._0,_1:(function(g){return ue(l,g)})}},pr=function(u){let f=Z(u,0);return function(l){return ue(f,l)}},hr=function(u,f){for(;;){let l=f,g=u;if(typeof g!="object"&&typeof g!="function")return l;f={TAG:0,_0:g.v,_1:g.l,_2:l},u=g.r}},ge=function(u,f){if(typeof u!="object"&&typeof u!="function")return 0;let l=hr(u._1,u._2);return{TAG:0,_0:u._0,_1:(function(g){return ge(l,g)})}};return{empty:0,add:o,singleton:i,remove:j,union:k,inter:q,disjoint:rt,diff:ot,cardinal:J,elements:ln,min_elt:a,min_elt_opt:m,max_elt:p,max_elt_opt:h,choose:a,choose_opt:m,find:se,find_opt:mr,find_first:Nn,find_first_opt:Kn,find_last:tn,find_last_opt:Jn,iter:M,fold:V,map:Un,filter:St,filter_map:le,partition:lt,split:y,is_empty:S,is_singleton:G,mem:D,equal:X,compare:Ct,subset:O,for_all:gt,exists:tt,to_list:ln,of_list:Ze,to_seq_from:function(u,f){let g=function(w,E,v){for(;;){let I=v,B=E;if(typeof B!="object"&&typeof B!="function")return I;let H=B.r,ct=B.v,un=$(t.compare,ct,w);if(un===0)return{TAG:0,_0:ct,_1:H,_2:I};if(un<0){E=H;continue}v={TAG:0,_0:ct,_1:H,_2:I},E=B.l}}(u,f,0);return function(w){return ue(g,w)}},to_seq:pr,to_rev_seq:function(u){let f=hr(u,0);return function(l){return ge(f,l)}},add_seq:te,of_seq:dr}}var at=Bu({compare:Xo}),cs=at.empty,ss=at.add,Uy=at.singleton,Ry=at.remove,bp=at.union,Yy=at.inter,Qy=at.disjoint,Hy=at.diff,Zy=at.cardinal,qu=at.elements,Wy=at.min_elt,Ky=at.min_elt_opt,Jy=at.max_elt,tC=at.max_elt_opt,nC=at.choose,eC=at.choose_opt,rC=at.find,oC=at.find_opt,iC=at.find_first,_C=at.find_first_opt,cC=at.find_last,sC=at.find_last_opt,aC=at.iter,Fu=at.fold,lC=at.map,uC=at.filter,fC=at.filter_map,mC=at.partition,dC=at.split,pC=at.is_empty,hC=at.is_singleton,yp=at.mem,gC=at.equal,bC=at.compare,yC=at.subset,CC=at.for_all,SC=at.exists,wC=at.to_list,xC=at.of_list,AC=at.to_seq_from,EC=at.to_seq,$C=at.to_rev_seq,TC=at.add_seq,GC=at.of_seq;function f_(t,n,e){return{typ:e,indentation:n,location:t}}function ke(t){if(typeof t!="object"&&typeof t!="function")switch(t){case 0:return"(";case 1:return")";case 2:return"[";case 3:return"]";case 4:return"{";case 5:return"}";case 6:return"$(";case 7:return'"';case 8:return":";case 9:return",";case 10:return";";case 11:return".";case 12:return"..";case 13:return"...";case 14:return"->";case 15:return"|>";case 16:return"?";case 17:return"=";case 18:return":=";case 19:return"!";case 20:return">";case 21:return"<";case 22:return"+";case 23:return"-";case 24:return"*";case 25:return"**";case 26:return"/";case 27:return"%";case 28:return"&&";case 29:return"||";case 30:return"!=";case 31:return"==";case 32:return">=";case 33:return"<=";case 34:return"++";case 35:return"fn";case 36:return"let";case 37:return"and";case 38:return"mutable";case 39:return"true";case 40:return"false";case 41:return"if";case 42:return"else";case 43:return"for";case 44:return"in";case 45:return"break";case 46:return"continue";case 47:return"component";case 48:return"library";case 49:return"page";case 50:return"(NEWLINE)";case 51:return"<>";case 52:return"</>";case 53:return"/>";case 54:return"> (TAG END)";case 55:return"(BLANKLINE)";case 56:return"(EOF)"}else switch(t.TAG){case 0:return"%%"+(t._0+"%%");case 2:return Gi(t._0);case 3:return Tr(t._0);case 4:return String(t._0);case 5:return di(t._0);case 6:return'"'+(t._0+'"');case 7:let n=bt(32);return el(n,t._0[1]),"'"+(W(n)+"'");case 8:return"#"+Tr(t._0);case 1:case 9:return"/* "+(t._0+" */");case 10:case 11:return t._0;case 12:case 14:return"<"+t._0;case 13:case 15:return"</"+(t._0+">");case 16:return"<@"+t._0}}function Ou(t){if(!(typeof t!="object"&&typeof t!="function"))return!1;switch(t){case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:return!0;default:return!1}}function Cp(t){switch(t){case"and":return 37;case"break":return 45;case"component":return 47;case"continue":return 46;case"else":return 42;case"false":return 40;case"fn":return 35;case"for":return 43;case"if":return 41;case"in":return 44;case"let":return 36;case"library":return 48;case"mutable":return 38;case"page":return 49;case"true":return 39;default:return}}function as(t){let n=Cp(t);if(n!==void 0)return n;let e=R(t,0);return e>90||e<65?{TAG:2,_0:t}:{TAG:3,_0:t}}function Qu(t){let n=Fi(t),e=n===""?"EOF":{NAME:"Chr",VAL:n.charCodeAt(0)};return{source:t,src:n,current:e,offset:0,line_offset:0,line:1,column:0,saw_characters_on_line:!1,line_indentation:bt(32),mode:{hd:0,tl:0}}}function K(t){return Ye.make(t.source,t.line,t.column+1|0)}function Hu(t){let n=t.mode;if(!n)return 0;switch(n.hd){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4}}function zt(t,n){n.mode={hd:t,tl:n.mode}}function Wn(t,n){let e=n.mode;if(e&&e.hd===t){n.mode=e.tl;return}}function Zu(t){let n=t.current;if(typeof n=="string"||n.NAME!=="Chr")return!1;let e=n.VAL;return e>13||e<9?e===32:!(e===12||e===11)}function xt(t,n){try{return{NAME:"Chr",VAL:R(n.src,n.offset+t|0)}}catch(e){let r=yt(e);if(r.MEL_EXN_ID===L)return"EOF";throw r}}function Sp(t){let n=W(t.line_indentation);return gc(t.line_indentation),n.length}function Wu(t){if(!t.saw_characters_on_line){t.saw_characters_on_line=!0;return}}function A(t){let n=t.offset+1|0,e=t.current,r=0;if(typeof e=="string"||e.NAME!=="Chr")r=1;else{let i=e.VAL,_=0;i===10||i===9?i>=10?(t.line_offset=n,t.line=t.line+1|0,t.saw_characters_on_line=!1,gc(t.line_indentation)):_=2:i!==32?r=1:_=2,_===2&&(t.saw_characters_on_line?r=1:it(t.line_indentation,i))}r===1&&(Zu(t)||Wu(t)),t.column=n-t.line_offset|0,t.offset=n;let o;try{o={NAME:"Chr",VAL:R(t.src,n)}}catch(i){let _=yt(i);if(_.MEL_EXN_ID===L)o="EOF";else throw _}t.current=o}function us(t){A(t),A(t),A(t)}function wp(t,n){for(let e=1;e<=t;++e)A(n)}function Uu(t,n,e){let r=t!==void 0?t:!1,i=function(c,s,a){for(;;){let m=a,p=c,h=xt(m,s);if(!p)return[!0,m];if(typeof h=="string")return[!1,0];if(h.NAME!=="Chr")return[!1,0];let C=h.VAL,x=p.tl,y=p.hd;if(!r&&y===C){a=m+1|0,c=x;continue}if(!(r&&(Io(y)===C||wi(y)===C)))return[!1,0];a=m+1|0,c=x}}(n,e,0),_=i[0];return _&&wp(i[1],e),_}function Zo(t){for(;;){let n=t.current;if(typeof n=="string"||n.NAME!=="Chr")return;let e=n.VAL;if(e>=14){if(e!==32)return;A(t);continue}if(e<9)return;switch(e){case 10:if(!t.saw_characters_on_line)return;A(t);continue;case 11:case 12:return;case 9:case 13:A(t);continue}}}function fs(t){for(;;){let n=t.current,e=0;if(typeof n!="string"&&n.NAME==="Chr"){let r=n.VAL;r!==9&&r!==32||(e=2)}if(e===2&&!t.saw_characters_on_line){A(t);continue}return Zu(t)?void 0:Wu(t)}}function ls(t){let n=function(i){if(typeof i=="string"||i.NAME!=="Chr")return 16;let _=i.VAL;return _>=65?_>=97?_>=103?16:(_-97|0)+10|0:_>=71?16:((_+32|0)-97|0)+10|0:_>57||_<48?16:_-48|0},e=function(i,_,c){let s=0;for(let a=_;a>=1;--a){let m=n(i.current);s=Math.imul(s,c)+m|0,A(i)}return Ti(s)},r=t.current;if(typeof r=="string"){let i=K(t);return P(nt(void 0,i,void 0),"This escape sequence is not terminated.")}let o=r.VAL;if(o>=58)switch(o){case 98:return A(t),["Char",8];case 102:return A(t),["Char",12];case 110:return A(t),["Char",10];case 111:return A(t),["Octal",e(t,3,8)];case 114:return A(t),["Char",13];case 116:return A(t),["Char",9];case 120:return A(t),["Hex",e(t,2,16)]}else if(o>=48)return["Decimal",e(t,3,10)];return A(t),["Char",o]}function m_(t){let n=bt(32);return function(r){for(;;){let o=r.current,i;if(typeof o=="string"||o.NAME!=="Chr")return;let _=o.VAL;if(_>=91)if(_>=97){if(_>=123)return;i=_}else{if(_!==95)return;i=_}else if(_>=58){if(_<65)return;i=_}else{if(_<48)return;i=_}A(r),it(n,i)}}(t),as(W(n))}function d_(t,n){let e=bt(512);return function(o){for(;;){let i=o.current;if(typeof i=="string")return P(nt(void 0,t,void 0),'This string is not terminated. Please add a double-quote (") at the end.');let _=i.VAL;if(_>=37){if(_===92){let c=xt(1,o);if(typeof c=="string")return P(nt(z(K(o)),t,void 0),'This string is not terminated. Please add a double-quote (") at the end.');let s=c.VAL,a=0;if(s>=40)switch(s){case 92:a=2;break;case 98:A(o),A(o),it(e,8);continue;case 102:A(o),A(o),it(e,12);continue;case 110:A(o),A(o),it(e,10);continue;case 114:A(o),A(o),it(e,13);continue;case 116:A(o),A(o),it(e,9);continue;default:a=3}else if(s>=32)switch(s){case 32:a=2;break;case 34:A(o),A(o),it(e,34);continue;case 33:case 35:case 36:case 37:case 38:a=3;break;case 39:A(o),A(o),it(e,39);continue}else a=3;switch(a){case 2:A(o),A(o),it(e,92);continue;case 3:let m=K(o);return P(nt(void 0,m,void 0),"Unknown escape sequence in string.")}}}else if(_>=34)switch(_){case 34:return;case 35:break;case 36:if(ut(xt(1,o),{NAME:"Chr",VAL:40}))return;break}A(o),it(e,_)}}(n),{TAG:6,_0:W(e)}}function xp(t){let n=K(t),e=bt(32);(function(_){for(;;){let c=_.current,s;if(typeof c=="string"||c.NAME!=="Chr")return;let a=c.VAL;if(a>=91)if(a>=97){if(a>=123)return;s=a}else{if(a!==95)return;s=a}else if(a>=58){if(a<65)return;s=a}else{if(a<48)return;s=a}A(_),it(e,s)}})(t);let o=W(e),i=R(o,0);return i>90||i<65?P(nt(z(K(t)),n,void 0),"Invalid Tag! Tags have to start with an uppercase character. Did you mean to write #"+(Tr(o)+"?")):o}function ms(t){let n=K(t),e=function(_,c){for(;;){let s=c.current,a;if(typeof s=="string")return W(_);if(s.NAME!=="Chr")return W(_);let m=s.VAL;if(m<58)if(m!==45){if(m<48)return W(_);a=m}else a=m;else{if(m>122||m<97)return W(_);a=m}A(c),it(_,a)}},r=bt(32),o=e(r,t);Zo(t);let i=R(o,0);return i>122||i<97?P(nt(z(K(t)),n,void 0),"Invalid Html tag! Html tags have to start with a lowercase letter. Instead saw: "+o):o}function Ku(t){let n=bt(32);for(;;){let e=t.current,r;if(typeof e=="string")return W(n);if(e.NAME!=="Chr")return W(n);let o=e.VAL;if(o>=91)if(o>=97){if(o>=123)return W(n);r=o}else{if(o!==95)return W(n);r=o}else if(o>=58){if(o<65)return W(n);r=o}else{if(o<48)return W(n);r=o}A(t),it(n,r)}}function Ju(t){let n=K(t);A(t);let e=t.current;if(typeof e=="string")return P(nt(z(K(t)),n,void 0),"Your Template was not closed correctly. You probably mismatched or forgot a closing tag.");let r=e.VAL;return r>90||r<65?P(nt(z(K(t)),n,void 0),"Invalid Component tag! Component tags have to start with an uppercase letter. Instead saw: "+Fn(1,r)):{TAG:14,_0:Ku(t)}}function tf(t){let n=K(t);A(t),A(t);let e=t.current;if(typeof e=="string")return P(nt(z(K(t)),n,void 0),"Your Template was not closed correctly. You probably mismatched or forgot a closing tag.");let r=e.VAL;return r>122||r<97?P(nt(z(K(t)),n,void 0),"Invalid Portal tag! Portal tags have to start with a lowercase letter. Instead saw: "+Fn(1,r)):{TAG:16,_0:ms(t)}}function nf(t){let n=K(t),e=function(_){return P(nt(z(K(_)),n,void 0),"Invalid DOCTYPE. Currently only the html5 doctype is supported. (<!DOCTYPE html>)")};Uu(!0,{hd:60,tl:{hd:33,tl:{hd:68,tl:{hd:79,tl:{hd:67,tl:{hd:84,tl:{hd:89,tl:{hd:80,tl:{hd:69,tl:0}}}}}}}}},t)||e(t),Zo(t),Uu(!0,{hd:104,tl:{hd:116,tl:{hd:109,tl:{hd:108,tl:0}}}},t)||e(t),Zo(t);let o=t.current;if(typeof o=="string")return P(nt(z(K(t)),n,void 0),"Your DOCTYPE was not closed correctly. You probably forgot the > at the end.");let i=o.VAL;return i!==62?P(nt(void 0,K(t),void 0),"Expected to see `>` (GREATER-THAN SIGN) at this point. Instead saw: "+Fn(1,i)):(A(t),{TAG:10,_0:"<!DOCTYPE html>"})}function ef(t){let n=K(t);A(t);let e=t.current;if(typeof e=="string")return P(nt(z(K(t)),n,void 0),"Your Template was not closed correctly. You probably mismatched or forgot a closing tag.");let r=e.VAL;return r>122||r<97?P(nt(z(K(t)),n,void 0),"Invalid Template tag! Template tags have to start with a lowercase letter. Instead saw: "+Fn(1,r)):{TAG:12,_0:ms(t)}}function rf(t){let n=K(t);A(t),A(t);let e=t.current,r;if(typeof e=="string")r=P(nt(z(K(t)),n,void 0),"Your Template was not closed correctly. You probably mismatched or forgot a closing tag.");else{let i=e.VAL;r=i>90||i<65?P(nt(z(K(t)),n,void 0),"Invalid Component tag! Component tags have to start with an uppercase letter. Instead saw: "+Fn(1,i)):Ku(t)}let o=t.current;return typeof o!="string"&&o.NAME==="Chr"&&o.VAL===62?(A(t),{TAG:15,_0:r}):P(nt(z(K(t)),n,void 0),"Expected token "+(ke(20)+" at this point."))}function of(t){let n=K(t);A(t),A(t);let e=t.current,r;if(typeof e=="string")r=P(nt(z(K(t)),n,void 0),"Your Template was not closed correctly. You probably mismatched or forgot a closing tag.");else{let i=e.VAL;r=i>122||i<97?P(nt(z(K(t)),n,void 0),"Invalid Template tag! Template tags have to start with a lowercase letter. Instead saw: "+Fn(1,i)):{TAG:13,_0:ms(t)}}let o=t.current;return typeof o!="string"&&o.NAME==="Chr"&&o.VAL===62?(A(t),r):P(nt(z(K(t)),n,void 0),"Expected token "+(ke(20)+" at this point."))}function yn(t){let n=K(t),e=function(i,_){for(;;){let c=_.current;if(typeof c=="string")return P(nt(z(K(_)),n,void 0),"Your Template was not closed correctly. You probably mismatched or forgot a closing tag.");let s=c.VAL;if(s!==10){if(s!==60){if(s===123)return W(i);A(_),it(i,s);continue}let a=xt(1,_);if(typeof a!="string"&&a.NAME==="Chr"){let m=a.VAL;if(m>=64){if(m<91)return W(i);if(!(m>122||m<97))return W(i)}else{if(m===47)return W(i);if(m===62)return W(i)}}A(_),it(i,60);continue}A(_),it(i,10),fs(_)}},r=bt(32);return{TAG:11,_0:e(r,t)}}function _f(t){return A(t),A(t),zt(4,t),51}function Ru(t){let n=function(r,o){for(;;){let i=o.current,_;if(typeof i=="string")return W(r);if(i.NAME!=="Chr")return W(r);let c=i.VAL;if(c>=59)if(c>=91){if(c>122||c<97)return W(r);_=c}else{if(c<65)return W(r);_=c}else if(c>=48)_=c;else{if(c!==45)return W(r);_=c}A(o),it(r,_)}},e=bt(32);return as(n(e,t))}function Yu(t){let n=bt(5),e=function(a){for(;;){let m=a.current;if(typeof m=="string"||m.NAME!=="Chr")return;let p=m.VAL;if(p>=58){if(p!==95)return;A(a);continue}if(p<48)return;it(n,p),A(a)}};e(t);let r=t.current,o;if(typeof r=="string"||!(r.NAME==="Chr"&&r.VAL===46))o=!1;else{let a=xt(1,t),m=0;typeof a=="string"||!(a.NAME==="Chr"&&a.VAL===46)?m=1:o=!1,m===1&&(it(n,46),A(t),e(t),o=!0)}let i=t.current,_,c=0;if(typeof i=="string"||i.NAME!=="Chr")_=o;else{let a=i.VAL;a!==69&&a!==101?_=o:c=1}if(c===1){it(n,101),A(t);let a=t.current;if(typeof a!="string"&&a.NAME==="Chr")switch(a.VAL){case 43:it(n,43),A(t);break;case 45:it(n,45),A(t);break}e(t),_=!0}let s=W(n);return _?{TAG:5,_0:z_(s)}:{TAG:4,_0:wo(s)}}function Ap(t){A(t),A(t),Zo(t);let n=bt(128);for(;;){let e=t.current;if(typeof e=="string")return W(n);let r=e.VAL;if(r===10)return W(n);A(t),it(n,r)}}function cf(t,n){let e=t!==void 0?t:!1,r=K(n);A(n),A(n);let o=bt(512);for(e&&Lt(o,"/*");;){let i=n.current;if(typeof i=="string")return P(nt(void 0,r,void 0),"This comment is not terminated. Please add a `*/` at the end.");let _=i.VAL;if(_!==42){if(_===47&&ut(xt(1,n),{NAME:"Chr",VAL:42})){Lt(o,cf(!0,n));continue}}else if(ut(xt(1,n),{NAME:"Chr",VAL:47}))return A(n),A(n),e&&Lt(o,"*/"),W(o);A(n),it(o,_)}}function Ep(t){let n=K(t);A(t),A(t);let e=bt(512);for(;;){let r=t.current;if(typeof r=="string")return P(nt(void 0,n,void 0),"This external function symbol is not terminated. Please add a `%%%%` at the end.");let o=r.VAL;if(o===37&&ut(xt(1,t),{NAME:"Chr",VAL:37}))return A(t),A(t),W(e);A(t),it(e,o)}}function Ho(t,n){let e=n.current;if(typeof e=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
9
+ You probably mismatched or forgot a closing tag.`);let r=e.VAL;if(r<63)if(r!==47){if(r<60)return yn(n);switch(r){case 60:let o=xt(1,n);if(typeof o=="string"||o.NAME!=="Chr")return yn(n);let i=o.VAL;if(i>=62){if(i>=91)return i>122||i<97?yn(n):(zt(4,n),zt(2,n),ef(n));if(i>=65)return zt(4,n),zt(3,n),Ju(n);switch(i){case 62:return _f(n);case 63:return yn(n);case 64:return zt(4,n),zt(2,n),tf(n)}}else{if(i===33)return nf(n);if(i!==47)return yn(n);Wn(4,n);let _=xt(2,n);if(typeof _=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
10
+ You probably mismatched or forgot a closing tag.`);let c=_.VAL;if(c<91)if(c!==62){if(c>=65)return rf(n)}else return us(n),52;else if(!(c>122||c<97))return of(n);return P(nt(z(K(n)),t,void 0),"Invalid Template tag! Template tags have to start with an uppercase or lowercase letter. Instead saw: "+Fn(1,c))}break;case 61:return yn(n);case 62:return A(n),54}}else{let o=xt(1,n);if(typeof o=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
11
+ You probably mismatched or forgot a closing tag.`);let i=o.VAL;return i!==62?P(nt(z(K(n)),t,void 0),"The character "+(Fn(1,i)+" is unknown. You should remove it.")):(Wn(4,n),A(n),A(n),53)}else switch(r){case 123:return zt(0,n),A(n),4;case 125:return Wn(0,n),A(n),5;default:return yn(n)}}function sf(t,n){switch(Hu(n)){case 0:let r=n.current;if(typeof r=="string")return 56;let o=r.VAL;if(o>=123){if(o<126)switch(o){case 123:return zt(0,n),A(n),4;case 124:let m=xt(1,n),p=0;if(typeof m=="string"||m.NAME!=="Chr")p=2;else{let h=m.VAL;if(h!==62)if(h!==124)p=2;else return A(n),A(n),29;else return A(n),A(n),15}if(p===2)return P(nt(z(K(n)),t,void 0),"The character | is unknown. You should remove it.");break;case 125:return Wn(0,n),A(n),5}}else{if(o>=97)return m_(n);switch(o){case 10:return A(n),55;case 33:let m=xt(1,n);return typeof m=="string"||!(m.NAME==="Chr"&&m.VAL===61)?(A(n),19):(A(n),A(n),30);case 34:return A(n),zt(1,n),7;case 35:let p=xt(1,n),h=0;if(typeof p=="string")h=2;else{if(p.NAME==="Chr"&&p.VAL-65>>>0<=25)return A(n),{TAG:8,_0:xp(n)};h=2}if(h===2)return P(nt(z(K(n)),t,void 0),"The character # is unknown. You should remove it.");break;case 37:let C=xt(1,n);return typeof C=="string"||!(C.NAME==="Chr"&&C.VAL===37)?(A(n),27):{TAG:0,_0:Ep(n)};case 38:let x=xt(1,n),y=0;if(typeof x=="string")y=2;else{if(x.NAME==="Chr"&&x.VAL===38)return A(n),A(n),28;y=2}if(y===2)return P(nt(z(K(n)),t,void 0),"The character & is unknown. You should remove it.");break;case 39:A(n);let S=n.current,G;if(typeof S=="string")G=P(nt(void 0,t,void 0),"This char is not terminated. Please add a single-quote (') at the end.");else{let O=S.VAL;if(O!==92)A(n),G=["Char",O];else{let M=xt(1,n);if(typeof M=="string")G=P(nt(z(K(n)),t,void 0),"This char is not terminated. Please add a single-quote (') at the end.");else{let V=M.VAL;if(V>=40)V!==92?(A(n),G=ls(n)):(A(n),A(n),G=["Char",92]);else if(V>=32)switch(V){case 32:A(n),A(n),G=["Char",32];break;case 34:A(n),A(n),G=["Char",34];break;case 33:case 35:case 36:case 37:case 38:A(n),G=ls(n);break;case 39:A(n),A(n),G=["Char",39];break}else A(n),G=ls(n)}}}let D=n.current;return typeof D!="string"&&D.NAME==="Chr"&&D.VAL===39?(A(n),{TAG:7,_0:G}):P(nt(void 0,t,void 0),"This char is not terminated. Please add a single-quote (') at the end.");case 40:return A(n),zt(0,n),0;case 41:return A(n),Wn(0,n),1;case 42:let j=xt(1,n);return typeof j=="string"||!(j.NAME==="Chr"&&j.VAL===42)?(A(n),24):(A(n),A(n),25);case 43:let k=xt(1,n);return typeof k=="string"||!(k.NAME==="Chr"&&k.VAL===43)?(A(n),22):(A(n),A(n),34);case 44:return A(n),9;case 45:let q=xt(1,n);return typeof q=="string"||!(q.NAME==="Chr"&&q.VAL===62)?(A(n),23):(A(n),A(n),14);case 46:let N=xt(1,n);if(typeof N=="string")return A(n),11;if(N.NAME==="Chr"){let O=N.VAL;if(O>=48)return O>=58?(A(n),11):Yu(n);if(O!==46)return A(n),11;let M=xt(2,n);return typeof M=="string"||!(M.NAME==="Chr"&&M.VAL===46)?(A(n),A(n),12):(us(n),13)}return A(n),11;case 47:let rt=xt(1,n);if(typeof rt=="string")return A(n),26;if(rt.NAME==="Chr"){let O=rt.VAL;return O!==42?O!==47?(A(n),26):{TAG:1,_0:Ap(n)}:{TAG:1,_0:cf(void 0,n)}}return A(n),26;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Yu(n);case 58:let ot=xt(1,n);return typeof ot=="string"||!(ot.NAME==="Chr"&&ot.VAL===61)?(A(n),8):(A(n),A(n),18);case 59:return A(n),10;case 60:let Z=xt(1,n);if(typeof Z=="string")return A(n),21;if(Z.NAME==="Chr"){let O=Z.VAL;if(O>=65)return O>=97?O>=123?(A(n),21):(zt(4,n),zt(2,n),ef(n)):O>=91?(A(n),21):(zt(4,n),zt(3,n),Ju(n));if(O===33)return nf(n);if(O>=47)switch(O){case 47:Wn(4,n);let M=xt(2,n);if(typeof M=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
12
+ You probably mismatched or forgot a closing tag.`);let V=M.VAL,gt=0;if(V<91)if(V!==62){if(V>=65)return rf(n);gt=2}else return us(n),52;else{if(!(V>122||V<97))return of(n);gt=2}if(gt===2)return P(nt(z(K(n)),t,void 0),`Invalid Template tag!
13
+ Template tags have to start with an uppercase or lowercase letter. Instead saw: `+Fn(1,V));break;case 61:return A(n),A(n),33;case 62:return _f(n);case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 63:return A(n),21;case 64:return zt(4,n),zt(2,n),tf(n)}else return A(n),21}else return A(n),21;break;case 61:let Ct=xt(1,n);return typeof Ct=="string"||!(Ct.NAME==="Chr"&&Ct.VAL===61)?(A(n),17):(A(n),A(n),31);case 62:let X=xt(1,n);return typeof X=="string"||!(X.NAME==="Chr"&&X.VAL===61)?(A(n),20):(A(n),A(n),32);case 63:return A(n),16;case 91:return A(n),2;case 93:return A(n),3;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:return m_(n);case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 36:case 64:case 92:case 94:case 96:break}}return A(n),sf(t,n);case 1:let i=n.current;if(typeof i=="string"||i.NAME!=="Chr")return d_(t,n);switch(i.VAL){case 34:return Wn(1,n),A(n),7;case 36:return ut(xt(1,n),{NAME:"Chr",VAL:40})?(zt(0,n),A(n),A(n),6):d_(t,n);default:return d_(t,n)}case 2:let _=n.current;if(typeof _=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
14
+ You probably mismatched or forgot a closing tag.`);let c=_.VAL;if(c>=62){if(c<91)return c>=63?c>=65?Ru(n):yn(n):(Wn(2,n),Ho(t,n));if(c<123)return c>=97?Ru(n):yn(n);if(c>=126)return yn(n);switch(c){case 123:return zt(0,n),A(n),4;case 124:return yn(n);case 125:return Wn(0,n),A(n),5}}else{if(c!==34){if(c!==47)return c>=61?(A(n),17):yn(n);let m=xt(1,n);if(typeof m=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
15
+ You probably mismatched or forgot a closing tag.`);let p=m.VAL;return p!==62?P(nt(z(K(n)),t,void 0),"The character "+(Fn(1,p)+" is unknown. You should remove it.")):(Wn(2,n),Ho(t,n))}return A(n),zt(1,n),7}case 3:let s=n.current;if(typeof s=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
16
+ You probably mismatched or forgot a closing tag.`);let a=s.VAL;if(a>=62){if(a<97)return a!==95?a>=63?yn(n):(Wn(3,n),Ho(t,n)):m_(n);if(a<123)return m_(n);if(a>=126)return yn(n);switch(a){case 123:return zt(0,n),A(n),4;case 124:return yn(n);case 125:return Wn(0,n),A(n),5}}else{if(a!==34){if(a!==47)return a>=61?(A(n),17):yn(n);let m=xt(1,n);if(typeof m=="string")return P(nt(z(K(n)),t,void 0),`Your Template was not closed correctly.
17
+ You probably mismatched or forgot a closing tag.`);let p=m.VAL;return p!==62?P(nt(z(K(n)),t,void 0),"The character "+(Fn(1,p)+" is unknown. You should remove it.")):(Wn(3,n),Ho(t,n))}return A(n),zt(1,n),7}case 4:return fs(n),Ho(t,n)}}function Fr(t){switch(Hu(t)){case 1:break;case 4:fs(t);break;default:Zo(t)}let e=K(t),r=sf(e,t),o=t.saw_characters_on_line?Sp(t):0,i=K(t),_=nt(z(i),e,void 0);return f_(_,o,r)}var Tp=`library Base_Fn {
18
+ let default = fn (value, default) -> {
19
+ if (!value) {
20
+ default
21
+ } else {
22
+ value
23
+ }
24
+ };
25
+
26
+ let id = fn (x) -> x;
27
+ }
28
+ `,Gp=`library Base_Portal {
29
+ let push = fn (name, element) -> %%pinc_portal_push%%;
30
+ }
31
+ `,vp=`library Base_Record {
32
+ let merge = fn (record1, record2) -> %%pinc_record_merge%%;
33
+ }
34
+ `,jp=`library Base_Math {
35
+ let floor = fn (n) -> %%pinc_math_floor%%;
36
+
37
+ let ceil = fn (n) -> -(floor(-n));
38
+ }
39
+ `,Mp=`library Base_Array {
40
+ let make = fn (length) -> {
41
+ 0..length
42
+ };
43
+
44
+ let init = fn (length, f) -> {
45
+ for (index in make(length)) {
46
+ f(index)
47
+ }
48
+ };
49
+
50
+ let length = fn (array) -> %%pinc_array_length%%;
51
+
52
+ let append = fn (array1, array2) -> %%pinc_array_append%%;
53
+
54
+ let rev = fn (array) -> {
55
+ let mutable result = [];
56
+
57
+ for (value in array) {
58
+ result := append([value], result);
59
+ };
60
+
61
+ result
62
+ };
63
+
64
+ let first = fn (array) -> {
65
+ array[0]
66
+ };
67
+
68
+ let map = fn (array, f) -> {
69
+ for (item in array) {
70
+ f(item)
71
+ }
72
+ };
73
+
74
+ let map_reverse = fn (array, f) -> {
75
+ for (item in rev(array)) {
76
+ f(item)
77
+ }
78
+ };
79
+
80
+ let mapi = fn (array, f) -> {
81
+ for (index, item in array) {
82
+ f(index, item)
83
+ }
84
+ };
85
+
86
+ let mapi_reverse = fn (array, f) -> {
87
+ for (index, item in rev(array)) {
88
+ f(index, item)
89
+ }
90
+ };
91
+
92
+ let last = fn (array) -> {
93
+ let len = length(array);
94
+ if (len > 0) {
95
+ array[len - 1]
96
+ }
97
+ };
98
+
99
+ let take_until = fn (array, condition) -> {
100
+ for (item in array) {
101
+ if (condition(item)) {
102
+ break;
103
+ };
104
+ item
105
+ }
106
+ };
107
+
108
+ let slice = fn (array, offset, length) -> {
109
+ for (index, item in array) {
110
+ if (index < offset) {
111
+ continue;
112
+ };
113
+ if (index == length + offset) {
114
+ break;
115
+ };
116
+ item
117
+ }
118
+ };
119
+
120
+ let chunk = fn (array, size) -> {
121
+ let len = length(array);
122
+ let x = Base_Math.ceil(len / size);
123
+ 0..x
124
+ |> mapi(fn (index, item) -> { slice(array, index * size, size) })
125
+ };
126
+
127
+ let join = fn (array, sep) -> {
128
+ let mutable result = "";
129
+ for (index, item in array) {
130
+ if (index > 0) {
131
+ result := result ++ sep;
132
+ };
133
+ result := result ++ item;
134
+ };
135
+ result
136
+ };
137
+
138
+ let partition = fn (array, condition) -> {
139
+ let len = length(array);
140
+ let part = fn (yes, no, index) -> {
141
+ if (index == len) {
142
+ [yes, no]
143
+ } else {
144
+ let item = array[index];
145
+ if (condition(item)) {
146
+ part(append(yes, [item]), no, index + 1)
147
+ } else {
148
+ part(yes, append(no, [item]), index + 1)
149
+ }
150
+ }
151
+ };
152
+ part([], [], 0)
153
+ };
154
+
155
+ let filter = fn (array, condition) -> {
156
+ let len = length(array);
157
+ let aux = fn (acc, index) -> {
158
+ if (index == len) {
159
+ acc
160
+ } else {
161
+ let item = array[index];
162
+ if (condition(item)) {
163
+ aux(append(acc, [item]), index + 1)
164
+ } else {
165
+ aux(acc, index + 1)
166
+ }
167
+ }
168
+ };
169
+
170
+ aux([], 0)
171
+ };
172
+
173
+ let keep = filter;
174
+
175
+ let find = fn (array, condition) -> {
176
+ let len = length(array);
177
+ let aux = fn (index) -> {
178
+ if (index < len) {
179
+ let item = array[index];
180
+ if (condition(item)) {
181
+ item
182
+ } else {
183
+ aux(index + 1)
184
+ }
185
+ }
186
+ };
187
+
188
+ aux(0)
189
+ };
190
+
191
+ let exists = fn (array, condition) -> {
192
+ let len = length(array);
193
+ let aux = fn (index) -> {
194
+ if (index < len) {
195
+ let item = array[index];
196
+ if (condition(item)) {
197
+ true
198
+ } else {
199
+ aux(index + 1)
200
+ }
201
+ } else {
202
+ false
203
+ }
204
+ };
205
+
206
+ aux(0)
207
+ };
208
+
209
+ let some = exists;
210
+
211
+ let for_all = fn (array, condition) -> {
212
+ let len = length(array);
213
+ let aux = fn (acc, index) -> {
214
+ if (index == len || acc == false) {
215
+ acc
216
+ } else {
217
+ let item = array[index];
218
+ aux(acc && condition(item), index + 1)
219
+ }
220
+ };
221
+
222
+ aux(true, 0)
223
+ };
224
+
225
+ let every = for_all;
226
+
227
+ let fold_lefti = fn (array, init, f) -> {
228
+ let len = length(array);
229
+ let aux = fn (acc, index) -> {
230
+ if (index == len || acc == false) {
231
+ acc
232
+ } else {
233
+ let item = array[index];
234
+ let acc = f(acc, item, index);
235
+ aux(acc, index + 1)
236
+ }
237
+ };
238
+
239
+ aux(init, 0)
240
+ };
241
+
242
+ let reducei = fold_lefti;
243
+
244
+ let fold_left = fn (array, init, f) -> {
245
+ fold_lefti(array, init, fn (acc, curr, index) -> { f(acc, curr) })
246
+ };
247
+
248
+ let reduce = fold_left;
249
+
250
+ let group = fn (array, size) -> {
251
+ let array_length = length(array);
252
+ let group_size = Base_Math.floor`,kp=`library Base_String {
253
+ let length = fn (string) -> %%pinc_string_length%%;
254
+ let characters = fn (string) -> %%pinc_string_characters%%;
255
+
256
+ let map = fn (string, f) -> {
257
+ let mutable result = "";
258
+ for (char in characters(string)) {
259
+ result := result ++ f(char);
260
+ };
261
+ result
262
+ };
263
+
264
+ let map_reverse = fn (string, f) -> {
265
+ let mutable result = "";
266
+ for (char in Base_Array.rev(characters(string))) {
267
+ result := result ++ f(char);
268
+ };
269
+ result
270
+ };
271
+
272
+ let mapi = fn (string, f) -> {
273
+ let mutable result = "";
274
+ for (index, char in characters(string)) {
275
+ result := result ++ f(index, char);
276
+ };
277
+ result
278
+ };
279
+
280
+ let mapi_reverse = fn (string, f) -> {
281
+ let mutable result = "";
282
+ for (index, char in Base_Array.rev(characters(string))) {
283
+ result := result ++ f(index, char);
284
+ };
285
+ result
286
+ };
287
+
288
+ let iter = fn (string, f) -> {
289
+ for (char in characters(string)) {
290
+ f(char)
291
+ }
292
+ };
293
+
294
+ let iter_reverse = fn (string, f) -> {
295
+ for (char in Base_Array.rev(characters(string))) {
296
+ f(char)
297
+ }
298
+ };
299
+
300
+ let iteri = fn (string, f) -> {
301
+ for (index, char in characters(string)) {
302
+ f(index, char)
303
+ }
304
+ };
305
+
306
+ let iteri_reverse = fn (string, f) -> {
307
+ for (index, char in Base_Array.rev(characters(string))) {
308
+ f(index, char)
309
+ }
310
+ };
311
+
312
+ let uppercase_ascii = fn (string) -> {
313
+ map(string, fn (c) -> { if (c >= 'a' && c <= 'z') c - 32 else c })
314
+ };
315
+
316
+ let lowercase_ascii = fn (string) -> {
317
+ map(string, fn (c) -> { if (c >= 'A' && c <= 'Z') c + 32 else c })
318
+ };
319
+
320
+ let capitalize_ascii = fn (string) -> {
321
+ mapi(string, fn (index, c) -> { if (index == 0 && c >= 'a' && c <= 'z') c - 32 else c })
322
+ };
323
+
324
+ let nl2br = fn (string) -> {
325
+ let mutable result = "";
326
+ for (char in characters(string)) {
327
+ if (Base_Char.is_newline(char)) {
328
+ result := result ++ "<br>";
329
+ } else {
330
+ result := result ++ char;
331
+ }
332
+ };
333
+ result
334
+ };
335
+
336
+ let sub = fn (string, ofs, len) -> %%pinc_string_sub%%;
337
+
338
+ let trim = fn (string) -> {
339
+ let len = length(string);
340
+ let mutable i = 0;
341
+ let mutable j = len - 1;
342
+ for (char in characters(string)) {
343
+ if (Base_Char.is_whitespace(char)) {
344
+ i := i + 1;
345
+ } else {
346
+ break;
347
+ }
348
+ };
349
+
350
+ for (char in Base_Array.rev(characters(string))) {
351
+ if (Base_Char.is_whitespace(char)) {
352
+ j := j - 1;
353
+ } else {
354
+ break;
355
+ }
356
+ };
357
+
358
+ if (j >= i) {
359
+ sub(string, i, (j - i + 1))
360
+ } else {
361
+ ""
362
+ }
363
+ };
364
+
365
+ let split = fn (string, sep) -> {
366
+ let mutable result = [];
367
+ let chars = characters(string);
368
+ let mutable j = Base_Array.length(chars);
369
+
370
+ for (i in Base_Array.rev(0...j)) {
371
+ if (chars[i] == sep) {
372
+ let slice = Base_Array.slice(chars, i + 1, j - i - 1);
373
+ j := i;
374
+ result := Base_Array.append([Base_Array.join(slice, "")], result);
375
+ }
376
+ };
377
+
378
+ Base_Array.append([Base_Array.join(Base_Array.slice(chars, 0, j), "")], result)
379
+ };
380
+ }
381
+ `,Ip=`library Base_Char {
382
+ let is_whitespace = fn (char) -> {
383
+ char == ' ' || char == '\\012' || char == '\\n' || char == '\\r' || char == '\\t'
384
+ };
385
+
386
+ let is_newline = fn (char) -> {
387
+ char == '\\n' || char == '\\r'
388
+ };
389
+ }
390
+ `,Lp=`library Base_Html {
391
+ let with_attribute = fn (element, key, value) -> %%pinc_html_with_attribute%%;
392
+ }
393
+ `,Dp=`(array_length / size);
394
+
395
+ 0..size
396
+ |> fold_lefti(
397
+ [],
398
+ fn (acc, curr, index) -> {
399
+ append(
400
+ acc,
401
+ [slice(array, index * group_size, if (index == size - 1) array_length else group_size)],
402
+ )
403
+ },
404
+ )
405
+ };
406
+
407
+ let nth = fn (array, index) -> {
408
+ array[index]
409
+ };
410
+
411
+ let sort = fn (array, f) -> {
412
+ let merge = fn (a, b) -> {
413
+ let len_a = length(a);
414
+ if (len_a == 0) {
415
+ b
416
+ } else {
417
+ let len_b = length(b);
418
+ if (len_b == 0) {
419
+ a
420
+ } else {
421
+ let first_a = a[0];
422
+ let first_b = b[0];
423
+ if (f(first_a, first_b) < 0) {
424
+ append([first_a], merge(slice(a, 1, len_a), b))
425
+ } else {
426
+ append([first_b], merge(a, slice(b, 1, len_b)))
427
+ }
428
+ }
429
+ }
430
+ };
431
+
432
+ let len = length(array);
433
+ if (len < 2) {
434
+ array
435
+ } else {
436
+ let h = Base_Math.ceil(len / 2);
437
+ let first_half = array
438
+ |> slice(0, h);
439
+ let second_half = array
440
+ |> slice(h, len);
441
+ merge(sort(first_half, f), sort(second_half, f))
442
+ }
443
+ };
444
+
445
+ let unique = fn (array) -> {
446
+ let isSorted = false;
447
+ let mutable result = [];
448
+ let mutable seen = [];
449
+
450
+ for (index, value in array) {
451
+ if (index == 0 || !exists(seen, fn (item) -> item == value)) {
452
+ seen := append(seen, [value]);
453
+ result := append(result, [value]);
454
+ }
455
+ };
456
+
457
+ result
458
+ };
459
+ }
460
+ `;function Np(t){switch(t){case"/Base_Array.pi":case"Base_Array.pi":return{hd:Mp,tl:{hd:Dp,tl:0}};case"/Base_Char.pi":case"Base_Char.pi":return{hd:Ip,tl:0};case"/Base_Fn.pi":case"Base_Fn.pi":return{hd:Tp,tl:0};case"/Base_Html.pi":case"Base_Html.pi":return{hd:Lp,tl:0};case"/Base_Math.pi":case"Base_Math.pi":return{hd:jp,tl:0};case"/Base_Portal.pi":case"Base_Portal.pi":return{hd:Gp,tl:0};case"/Base_Record.pi":case"Base_Record.pi":return{hd:vp,tl:0};case"/Base_String.pi":case"Base_String.pi":return{hd:kp,tl:0};default:return}}var af={hd:"Base_Array.pi",tl:{hd:"Base_Char.pi",tl:{hd:"Base_Fn.pi",tl:{hd:"Base_Html.pi",tl:{hd:"Base_Math.pi",tl:{hd:"Base_Portal.pi",tl:{hd:"Base_Record.pi",tl:{hd:"Base_String.pi",tl:0}}}}}}}};function lf(t){let n=Np(t);if(n!==void 0)return n&&!n.tl?n.hd:wn("",n)}function Pp(t){switch(t){case 6:case 7:return 50;case 10:return 70;case 8:case 9:case 11:return 60;case 12:return 40;case 13:return 20;case 14:return 10;case 15:return 110;case 16:case 17:return 0;case 18:case 19:return 5;default:return 30}}function Bp(t){return t===10?1:0}function qp(t){switch(t){case 0:return"==";case 1:return"!=";case 2:return">";case 3:return">=";case 4:return"<";case 5:return"<=";case 6:return"+";case 7:return"-";case 8:return"*";case 9:return"/";case 10:return"**";case 11:return"%";case 12:return"++";case 13:return"&&";case 14:return"||";case 15:return".";case 16:return"[";case 17:return"|>";case 18:return"..";case 19:return"..."}}var p_={get_precedence:Pp,get_associativity:Bp,to_string:qp};function Fp(t){return 100}function zp(t){return t===0?"-...":"!..."}var uf={get_precedence:Fp,to_string:zp};function Vp(t){let n=Fo(t.next);return n!==void 0?n:Fr(t.lexer)}function et(t){let n=Vp(t);t.prev_token=t.token,t.token=n}function Up(t){let n=t.token;for(;;){let r=n.typ;if(typeof r!="object"&&typeof r!="function"){if(r!==55)return r}else if(r.TAG!==1)return r;let o=Fr(t.lexer);de(o,t.next),n=o}}function hs(t){let n=zi(t.next),e;if(n!==void 0)e=n;else{let r=Fr(t.lexer);de(r,t.next),e=r}return e.typ}function Rp(t){let n=pa(gl(t.next)),e;if(n){let r=n.tl;if(r)e=r.hd;else{let o=Fr(t.lexer);de(o,t.next),e=o}}else{let r=Fr(t.lexer);de(r,t.next);let o=Fr(t.lexer);de(o,t.next),e=o}return e.typ}function En(t,n){let e=ut(n.token.typ,t);return e&&et(n),e}function Xt(t,n){return ut(n.token.typ,t)?et(n):P(n.token.location,"Expected: `"+(ke(t)+("`, got `"+(ke(n.token.typ)+"`"))))}function Yp(t){let n=Qu(t),e=Ye.make(t,0,0),r=nt(void 0,e,void 0),o=f_(r,0,56),i={lexer:n,prev_token:o,token:o,next:hl()};return et(i),i}function lo(t,n,e){let r=n!==void 0?n:"All",o=e.token.location,i=e.token.typ;if(!(typeof i!="object"&&typeof i!="function"))switch(i.TAG){case 2:if(ut(r,"Lower")||ut(r,"All"))return et(e),[i._0,o];break;case 3:if(ut(r,"Upper")||ut(r,"All"))return et(e),[i._0,o];break}if(ut(r,"Lower")){let c;if(t!==void 0)c=t;else if(typeof i!="object"&&typeof i!="function")c="Expected to see a lowercase identifier at this point. Instead saw "+ke(i);else if(i.TAG===3){let s=i._0;c="Expected to see a lowercase identifier at this point. Did you mean "+(Gi(s)+(" instead of "+(s+"?")))}else c="Expected to see a lowercase identifier at this point. Instead saw "+ke(i);return P(o,c)}if(!ut(r,"Upper"))return P(o,t!==void 0?t:Ou(i)?'"'+(ke(i)+'" is a keyword. Please choose another name.'):"Expected to see an identifier at this point.");let _;if(t!==void 0)_=t;else if(typeof i!="object"&&typeof i!="function"||i.TAG!==2)_="Expected to see an uppercase identifier at this point.";else{let c=i._0;_="Expected to see an uppercase identifier at this point. Did you mean "+(Tr(c)+(" instead of "+(c+"?")))}return P(o,_)}function ao(t,n,e){let r=0;for(;;){let o=r,i=En(t,e),_=b(n,e);if(_===void 0)return Qt(o);if(!(i||ut(o,0)))return P(e.token.location,"Expected list to be separated by `"+(ke(t)+"`"));r={hd:wt(_),tl:o}}}function ur(t,n){let e=0;for(;;){let r=e,o=b(t,n);if(o===void 0)return Qt(r);e={hd:wt(o),tl:r}}}function fr(t){let n=0;for(;;){let e=n,r=t.token.typ;if(typeof r!="object"&&typeof r!="function"){if(r!==55)return Qt(e);if(ut(hs(t),55)){et(t);continue}et(t),n={hd:0,tl:e};continue}else{if(r.TAG!==1)return Qt(e);et(t),n={hd:{TAG:0,_0:r._0},tl:e};continue}}}function Qp(t){let n=t.token.typ,e;if(typeof n!="object"&&typeof n!="function")switch(n){case 19:e=1;break;case 23:e=0;break;default:e=void 0}else e=void 0;return Kt(e,(function(r){return et(t),Kt(Dn(uf.get_precedence(r),t),(function(o){return{TAG:17,_0:r,_1:o}}))}))}function ps(t){let n=fr(t),e=t.token,r=t.token.typ,o,i=0;if(typeof r!="object"&&typeof r!="function")switch(r){case 36:let c=function(a,m,p){for(;;){let h=m,C=a,x=p.token;et(p);let y=En(38,p),S=lo(void 0,"Lower",p),G=En(16,p);Xt(17,p);let D=p.token,j=Dn(void 0,p),k=j!==void 0?j:P(Zn(x.location,D.location,void 0),"Expected expression as right hand side of let declaration"),N=[G,y,{TAG:0,_0:S},k],rt=k.expression_desc,ot,Z=0;typeof rt!="object"&&typeof rt!="function"||rt.TAG!==8?Z=1:ot=!0,Z===1&&(ot=C?P(k.expression_loc,"All expressions in `let ... and` declarations must be function definitions"):!1);let Ct=Up(p);if(!(typeof Ct!="object"&&typeof Ct!="function"))return Qt({hd:N,tl:h});if(Ct!==37)return Qt({hd:N,tl:h});if(!ot)return P(k.expression_loc,"All expressions in `let ... and` declarations must be function definitions");fr(p),m={hd:N,tl:h},a=!0}}(!1,0,t),s;if(c)s=c.tl?{TAG:1,_0:c}:{TAG:0,_0:c.hd};else throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["lib/pinc_parser/parser.ml",493,20]});o=s;break;case 45:et(t),o=0;break;case 46:et(t),o=1;break;default:i=1}else if(r.TAG===2&&ut(hs(t),18)){let _=t.token,c=t.token.location;et(t),et(t);let s=t.token,a=Dn(void 0,t),m=a!==void 0?a:P(Zn(_.location,s.location,void 0),"Expected expression as right hand side of mutation statement");o={TAG:2,_0:{TAG:0,_0:[r._0,c]},_1:m}}else i=1;return i===1&&(o=Kt(Dn(void 0,t),(function(_){return{TAG:3,_0:_}}))),Kt(o,(function(_){let c=t.token;return{statement_loc:Zn(e.location,c.location,void 0),statement_desc:_,statement_annotations:n}}))}function h_(t){let n=fr(t),e=t.token,r=t.token.indentation,o=t.token.typ,i;if(typeof o!="object"&&typeof o!="function")switch(o){case 4:let _=t.token;et(t);let c=t.token.typ,s;s=typeof c!="object"&&typeof c!="function"||c.TAG!==1?void 0:c._0;let a=Dn(void 0,t),m;if(a!==void 0)m={TAG:4,_0:a};else{let h=Zn(_.location,t.token.location,void 0);s!==void 0?m={TAG:5,_0:s}:(Yl(h,"Expected to see an expression between these braces. \nThis is currently not doing anything, so you can safely remove it.\nIf you wanted to have an empty record here, you need to write `{{}}`"),m={TAG:4,_0:{expression_loc:h,expression_desc:{TAG:6,_0:0},expression_parenthesized:!1,expression_annotations:0}})}Xt(5,t),i=m;break;case 51:et(t);let p=ur(h_,t);Xt(52,t),i={TAG:3,_0:p};break;default:i=void 0}else switch(o.TAG){case 10:case 11:et(t),i={TAG:6,_0:o._0};break;case 12:let _=o._0;et(t);let c=17,s=ur((function(j){return Wo(c,j)}),t),a=En(53,t),m;if(a)m=0;else{Xt(54,t);let j=ur(h_,t);Xt({TAG:13,_0:_},t),m=j}i={TAG:0,html_tag_identifier:_,html_tag_attributes:s,html_tag_children:m};break;case 14:let p=o._0,h={TAG:0,_0:[p,t.token.location]};et(t);let C=17,x=ur((function(j){return Wo(C,j)}),t),y=En(53,t),S;if(y)S=0;else{Xt(54,t);let j=ur(h_,t);Xt({TAG:15,_0:p},t),S=j}i={TAG:1,component_tag_identifier:h,component_tag_attributes:x,component_tag_children:S};break;case 16:et(t);let G=17,D=ur((function(j){return Wo(G,j)}),t);Xt(53,t),i={TAG:2,portal_tag_name:o._0,portal_tag_attributes:D};break;default:i=void 0}return Kt(i,(function(_){let c=t.prev_token;return{template_node_loc:Zn(e.location,c.location,void 0),template_node_desc:_,template_node_annotations:n,template_node_indent:r}}))}function Hp(t){let n=t.token.typ;if(typeof n!="object"&&typeof n!="function"||n.TAG!==2)return;let e=n._0;et(t);let r=En(16,t)?"Optional":"Required";Xt(8,t);let o=Dn(void 0,t);return An((function(i){return[e,[r,i]]}),o)}function Zp(t){let n=t.token.location,e=t.token.typ,r;if(typeof e!="object"&&typeof e!="function")if(e===6){et(t);let o=lo(`Only lowercase identifiers are allowed as string interpolation placeholders.
461
+ If you want to use more complex constructs, you can always assign them to a let binding.`,"Lower",t);Xt(1,t),r={TAG:0,_0:{TAG:0,_0:o}}}else r=void 0;else e.TAG===6?(et(t),r={TAG:1,_0:e._0}):r=void 0;return Kt(r,(function(o){let i=t.token.location;return{string_template_loc:Zn(n,i,void 0),string_template_desc:o}}))}function ds(t){let n=fr(t),e=t.token.location,r=t.token.typ,o,i=0;if(typeof r!="object"&&typeof r!="function"&&r===4){et(t);let c=function(s){for(;;){let a=s,m=ps(t);if(m===void 0)return Qt(a);if(!En(10,t))return Qt({hd:m,tl:a});s={hd:m,tl:a}}}(0);Xt(5,t),o=[!1,{TAG:15,_0:c}]}else i=1;return i===1&&(o=Kt(Dn(void 0,t),(function(_){return[_.expression_parenthesized,_.expression_desc]}))),Kt(o,(function(_){let c=t.token.location;return{expression_loc:Zn(e,c,void 0),expression_desc:_[1],expression_parenthesized:_[0],expression_annotations:n}}))}function Wp(t,n){let e=n.token,r;if(En(0,n)){let c=ao(9,(function(s){return Wo(void 0,s)}),n);Xt(1,n),r=c}else r=0;let o;switch(t){case"Array":o=4;break;case"Boolean":o=3;break;case"Float":o=2;break;case"GetContext":o=9;break;case"Int":o=1;break;case"Record":o=5;break;case"SetContext":o=8;break;case"Slot":o=6;break;case"Store":o=7;break;case"String":o=0;break;default:o={TAG:0,_0:t}}return{TAG:12,_0:{tag_loc:Zn(e.location,n.token.location,void 0),tag_desc:{tag:o,attributes:r}}}}function ff(t){let n=t.token.typ;if(typeof n!="object"&&typeof n!="function"||n.TAG!==2)return;let e=t.token.location;return et(t),{TAG:0,_0:[n._0,e]}}function Dn(t,n){let e=t!==void 0?t:-999,r=function(o,i,_){for(;;){let c=i,s=_.token.location,a=_.token.typ;if(typeof a!="object"&&typeof a!="function")switch(a){case 0:let j=fr(_);et(_);let k=ao(9,(function(Z){return Dn(void 0,Z)}),_),q={TAG:9,function_definition:c,arguments:k};Xt(1,_);let N=_.token.location;i={expression_loc:Zn(s,N,void 0),expression_desc:q,expression_parenthesized:!1,expression_annotations:j};continue;case 10:return c}let m=Jp(_);if(m===void 0)return c;let p=p_.get_precedence(m);if(p<o)return c;let h=fr(_);et(_);let C=p_.get_associativity(m),x;x=C===0?p+1|0:p;let y;if(m===15){let j=lo(void 0,"Lower",_),k=j[1],q={TAG:11,_0:j[0]};y={TAG:18,_0:c,_1:m,_2:{expression_loc:k,expression_desc:q,expression_parenthesized:!1,expression_annotations:0}}}else{let j=Dn(x,_);y=j!==void 0?{TAG:18,_0:c,_1:m,_2:j}:P(_.token.location,"Expected expression on right hand side of `"+(p_.to_string(m)+"`"))}m===16&&Xt(3,_);let S=_.token.location;i={expression_loc:Zn(s,S,void 0),expression_desc:y,expression_parenthesized:!1,expression_annotations:h}}};return Kt(Kp(n),(function(o){return r(e,o,n)}))}function Wo(t,n){let e=t!==void 0?t:8,r=n.token.typ;if(typeof r!="object"&&typeof r!="function"||r.TAG!==2)return;let o=r._0;et(n),Xt(e,n);let i=Dn(void 0,n);return An((function(_){return[o,_]}),i)}function Kp(t){let n=fr(t),e=t.token.location,r=t.token.typ,o,i=0;if(typeof r!="object"&&typeof r!="function")switch(r){case 0:et(t);let _=Dn(void 0,t);Xt(1,t);let c=t.token.location;o=An((function(X){return[!0,X.expression_desc,c]}),_);break;case 2:et(t);let s=ao(9,(function(X){return Dn(void 0,X)}),t),a=t.token.location;Xt(3,t),o=[!1,{TAG:5,_0:s},a];break;case 4:let m=hs(t),p=Rp(t),h;if(typeof m!="object"&&typeof m!="function")h=m===5;else if(m.TAG===2&&typeof p!="object"&&typeof p!="function")switch(p){case 8:case 16:h=!0;break;default:h=!1}else h=!1;if(h){et(t);let X=ao(9,Hp,t);Xt(5,t);let O=t.token.location;o=[!1,{TAG:6,_0:X},O]}else o=Kt(ds(t),(function(X){let O=t.token.location;return[!1,X.expression_desc,O]}));break;case 7:et(t);let C=ur(Zp,t),x=t.token.location;Xt(7,t),o=[!1,{TAG:0,_0:C},x];break;case 35:let y=t.token.location;et(t);let S=En(0,t),G;if(S){let X=ao(9,ff,t);Xt(1,t),G=X}else{let X=ff(t);G=X!==void 0?{hd:X,tl:0}:P(y,"Expected this function to have exactly one parameter,\nor a `()` if no parameter is needed.")}let D=t.token.location;Xt(14,t);let j=t.token.typ,k=0;if(typeof j!="object"&&typeof j!="function"||j.TAG!==0)k=3;else{let X=t.token.location;et(t),o=[!1,{TAG:7,parameters:G,name:j._0},X]}k===3&&(o=Kt(ds(t),(function(X){return[!1,{TAG:8,parameters:G,body:X},D]})));break;case 39:let q=t.token.location;et(t),o=[!1,{TAG:4,_0:!0},q];break;case 40:let N=t.token.location;et(t),o=[!1,{TAG:4,_0:!1},N];break;case 41:et(t),En(0,t),o=Kt(Dn(void 0,t),(function(X){let O=t.token.location;En(1,t);let M=ps(t),V;if(M!==void 0){let gt=0,tt=M.statement_desc;if(typeof tt!="object"&&typeof tt!="function"||tt.TAG!==3)gt=1;else{let St=tt._0;V={expression_loc:St.expression_loc,expression_desc:St.expression_desc,expression_parenthesized:St.expression_parenthesized,expression_annotations:oe(M.statement_annotations,St.expression_annotations)}}gt===1&&(V={expression_loc:M.statement_loc,expression_desc:{TAG:15,_0:{hd:M,tl:0}},expression_parenthesized:!1,expression_annotations:M.statement_annotations})}else V=void 0;return Kt(V,(function(gt){let tt;if(En(42,t)){let St=ps(t);if(St!==void 0){let lt=0,J=St.statement_desc;if(typeof J!="object"&&typeof J!="function"||J.TAG!==3)lt=1;else{let Mt=J._0;tt={expression_loc:Mt.expression_loc,expression_desc:Mt.expression_desc,expression_parenthesized:Mt.expression_parenthesized,expression_annotations:oe(St.statement_annotations,Mt.expression_annotations)}}lt===1&&(tt={expression_loc:St.statement_loc,expression_desc:{TAG:15,_0:{hd:St,tl:0}},expression_parenthesized:!1,expression_annotations:St.statement_annotations})}else tt=void 0}else tt=void 0;return[!1,{TAG:16,condition:X,consequent:gt,alternate:tt},O]}))}));break;case 43:et(t),En(0,t);let rt=lo(void 0,"Lower",t),ot;if(En(9,t)){let X=lo(void 0,"Lower",t);ot=[{TAG:0,_0:rt},X]}else ot=[void 0,rt];let Z=ot[0],Ct={TAG:0,_0:ot[1]};Xt(44,t),o=Kt(Dn(void 0,t),(function(X){En(1,t);let O=t.token.location,M=ds(t);return M!==void 0?[!1,{TAG:13,index:Z,iterator:Ct,iterable:X,body:M},O]:P(t.token.location,"Expected expression as body of for loop")}));break;case 50:case 51:i=2;break;default:i=1}else switch(r.TAG){case 2:let _=t.token.location;et(t),o=[!1,{TAG:11,_0:r._0},_];break;case 3:let c=t.token.location;et(t),o=[!1,{TAG:10,_0:r._0},c];break;case 4:let s=t.token.location;et(t),o=[!1,{TAG:2,_0:r._0},s];break;case 5:let a=t.token.location;et(t),o=[!1,{TAG:3,_0:r._0},a];break;case 7:let m=t.token.location;et(t),o=[!1,{TAG:1,_0:r._0},m];break;case 8:let p=t.token.location;et(t),o=An((function(h){return[!1,h,p]}),Wp(r._0,t));break;case 10:case 11:case 12:case 14:case 16:i=2;break;default:i=1}switch(i){case 1:o=An((function(_){return[!1,_,t.token.location]}),Qp(t));break;case 2:o=Kt(h_(t),(function(_){let c=t.token.location;return[!1,{TAG:14,_0:_},c]}));break}return Kt(o,(function(_){return{expression_loc:Zn(e,_[2],void 0),expression_desc:_[1],expression_parenthesized:_[0],expression_annotations:n}}))}function Jp(t){let n=t.token.typ;if(typeof n!="object"&&typeof n!="function")switch(n){case 2:return 16;case 11:return 15;case 12:return 18;case 13:return 19;case 15:return 17;case 20:return 2;case 21:return 4;case 22:return 6;case 23:return 7;case 24:return 8;case 25:return 10;case 26:return 9;case 27:return 11;case 28:return 13;case 29:return 14;case 30:return 1;case 31:return 0;case 32:return 3;case 33:return 5;case 34:return 12;default:return}}function th(t){let n=fr(t),e=t.token.location,r=t.token.typ,o;if(typeof r!="object"&&typeof r!="function")switch(r){case 47:et(t),o=0;break;case 48:et(t),o=1;break;case 49:et(t),o=2;break;case 56:o=void 0;break;default:o=P(t.token.location,"Expected to see a declaration (page, component, store or library).")}else o=P(t.token.location,"Expected to see a declaration (page, component, store or library).");return Kt(o,(function(i){let _=lo(void 0,"Upper",t)[0],c;if(En(0,t)){let h=ao(9,(function(C){return Wo(void 0,C)}),t);Xt(1,t),c=h}else c=0;let s=Dn(void 0,t),a=s!==void 0?s:P(t.token.location,"Expected declaration to have a body"),m=t.token.location,p=Zn(e,m,void 0);return[_,{declaration_loc:p,declaration_kind:i,declaration_attributes:c,declaration_body:a,declaration_annotations:n}]}))}function nh(t){let n=Yp(t);return ur(th,n)}var eh=hn((function(t){return{TAG:1,_0:t,_1:fu(lf(t))}}),af);function mf(t,n){return Qt(_t((function(o,i){let _=nh(i);return _t((function(c,s){let a=s[1],m=s[0];if(To(m,c)===void 0)return{hd:[m,a],tl:c};let h="Found multiple declarations with identifier `"+(m+"`.\nEvery declaration has to have a unique name in pinc.");return P(a.declaration_loc,h)}),o,_)}),0,oe((t!==void 0?t:!0)?eh:0,n)))}function df(t){return Ba((function(n){return n>=91?n>=97?n<123:n===95:n>=58?n>=65:n>=48}),t)}var ih={tags:0,current_identifier:void 0,tag_path:0};function He(t,n){let e=n._0;return[t,{TAG:0,_0:[e[0],e[1]]}]}function g_(t,n){let e=n.template_node_desc,r;switch(e.TAG){case 0:r=lh(t,e.html_tag_identifier,e.html_tag_attributes,e.html_tag_children);break;case 1:r=uh(t,e.component_tag_identifier,e.component_tag_attributes,e.component_tag_children);break;case 2:r=ch(t,e.portal_tag_name,e.portal_tag_attributes);break;case 3:r=ah(t,e._0);break;case 4:r=sh(t,e._0);break;case 5:r=[t,{TAG:5,_0:""}];break;case 6:r=[t,{TAG:5,_0:e._0}];break}return[r[0],{template_node_loc:n.template_node_loc,template_node_desc:r[1]}]}function _h(t,n){let e=n._0;return[t,{TAG:0,_0:[e[0],e[1]]}]}function kt(t,n){let e=n.expression_desc,r;if(typeof e!="object"&&typeof e!="function")r=[t,0];else switch(e.TAG){case 0:r=Ah(t,e._0);break;case 1:r=[t,{TAG:1,_0:e._0[1]}];break;case 2:r=[t,{TAG:2,_0:e._0}];break;case 3:r=[t,{TAG:3,_0:e._0}];break;case 4:r=[t,{TAG:4,_0:e._0}];break;case 5:r=wh(t,e._0);break;case 6:r=Gh(t,e._0);break;case 7:r=Ch(t,n.expression_loc,e.parameters,e.name);break;case 8:r=vh(t,e.parameters,e.body);break;case 9:r=xh(t,e.function_definition,e.arguments);break;case 10:r=[t,{TAG:10,_0:e._0}];break;case 11:r=[t,{TAG:11,_0:e._0}];break;case 12:r=Eh(t,e._0);break;case 13:r=gh(t,e.index,e.iterator,e.iterable,e.body);break;case 14:r=Th(t,e._0);break;case 15:r=Sh(t,e._0);break;case 16:r=yh(t,e.condition,e.consequent,e.alternate);break;case 17:r=$h(t,e._0,e._1);break;case 18:r=bh(t,e._0,e._1,e._2);break}return[r[0],{expression_loc:n.expression_loc,expression_desc:r[1]}]}function ch(t,n,e){let r=vr(b(Ae,e),t,kt);return[r[0],{TAG:3,portal_tag_name:n,portal_tag_attributes:r[1]}]}function sh(t,n){let e=kt(t,n);return[e[0],{TAG:4,_0:e[1]}]}function ah(t,n){let e=pe.fold_map(n,t,g_);return[e[0],{TAG:2,_0:e[1]}]}function lh(t,n,e,r){let o=vr(b(Ae,e),t,kt),i=pe.fold_map(r,o[0],g_);return[i[0],{TAG:0,html_tag_identifier:n,html_tag_attributes:o[1],html_tag_children:i[1]}]}function uh(t,n,e,r){let o=_h(t,n),i=vr(b(Ae,e),o[0],kt),_=pe.fold_map(r,i[0],g_);return[_[0],{TAG:1,component_tag_identifier:o[1],component_tag_attributes:i[1],component_tag_children:_[1]}]}function pf(t,n){let e=n[2],r=n[0],o=r?"Optional":"Required",i=He(t,e),_=i[0],c=_.tags,s=[o,e],a=_.tag_path,p=kt({tags:c,current_identifier:s,tag_path:a},n[3]),h=p[0],C=h.tags,x=h.tag_path;return[{tags:C,current_identifier:void 0,tag_path:x},[r,n[1],i[1],p[1]]]}function fh(t,n){let e=n.statement_desc,r;if(typeof e!="object"&&typeof e!="function")r=e===0?[t,0]:[t,1];else switch(e.TAG){case 0:let o=e._0;r=mh(t,o[0],o[1],o[2],o[3]);break;case 1:r=ph(t,e._0);break;case 2:r=hh(t,e._0,e._1);break;case 3:r=dh(t,e._0);break}return[r[0],{statement_loc:n.statement_loc,statement_desc:r[1]}]}function mh(t,n,e,r,o){let i=pf(t,[n,e,r,o]);return[i[0],{TAG:0,_0:i[1]}]}function dh(t,n){let e=kt(t,n);return[e[0],{TAG:3,_0:e[1]}]}function ph(t,n){let e=pe.fold_map(n,t,pf);return[e[0],{TAG:1,_0:e[1]}]}function hh(t,n,e){let r=He(t,n),o=kt(r[0],e);return[o[0],{TAG:2,_0:r[1],_1:o[1]}]}function gh(t,n,e,r,o){let i=r_.fold_map(n,t,He),_=He(i[0],e),c=kt(_[0],r),s=kt(c[0],o);return[s[0],{TAG:13,index:i[1],iterator:_[1],iterable:c[1],body:s[1]}]}function bh(t,n,e,r){let o=kt(t,n),i=o[1],_=kt(o[0],r),c=_[1],s=_[0];if(e===17){let a=c.expression_desc,m;return m=typeof a!="object"&&typeof a!="function"||a.TAG!==9?{TAG:9,function_definition:c,arguments:{hd:i,tl:0}}:{TAG:9,function_definition:a.function_definition,arguments:{hd:i,tl:a.arguments}},[s,m]}else return[s,{TAG:18,_0:i,_1:e,_2:c}]}function yh(t,n,e,r){let o=kt(t,n),i=kt(o[0],e),_=r_.fold_map(r,i[0],kt);return[_[0],{TAG:16,condition:o[1],consequent:i[1],alternate:_[1]}]}function Ch(t,n,e,r){let o=t.current_identifier;if(o===void 0)return P(n,"This function is missing an identifier.");let i=He(t,o[1]),_=pe.fold_map(e,i[0],He);return[_[0],{TAG:7,identifier:i[1],parameters:_[1],name:r}]}function Sh(t,n){let e=pe.fold_map(n,t,fh);return[e[0],{TAG:15,_0:e[1]}]}function wh(t,n){let e=pe.fold_map(n,t,kt);return[e[0],{TAG:5,_0:jo(e[1])}]}function xh(t,n,e){let r=kt(t,n),o=pe.fold_map(e,r[0],kt);return[o[0],{TAG:9,function_definition:r[1],arguments:o[1]}]}function Ah(t,n){let e=function(o,i){let _=i.string_template_desc,c;if(_.TAG===0){let s=He(o,_._0);c=[s[0],{TAG:0,_0:s[1]}]}else c=[o,{TAG:1,_0:_._0}];return[c[0],{string_template_loc:i.string_template_loc,string_template_desc:c[1]}]},r=pe.fold_map(n,t,e);return[r[0],{TAG:0,_0:r[1]}]}function Eh(t,n){let r=function(o,i){let _=o.current_identifier,c=vr($(Ra,"of",b(Ae,i.attributes)),o,kt),s=c[1],a=c[0],m=An((function(M){let V=M.expression_loc,gt=M.expression_desc;if(typeof gt!="object"&&typeof gt!="function")return P(V,"Expected attribute `key` on tag to be of type string");if(gt.TAG!==0)return P(V,"Expected attribute `key` on tag to be of type string");let tt=gt._0;if(!tt)return"";let St=tt.hd.string_template_desc;if(St.TAG===0)return P(V,"Expected attribute `key` on tag to be a plain string without interpolations.");if(tt.tl)return P(V,"Expected attribute `key` on tag to be a plain string without interpolations.");let lt=St._0;return df(lt)?lt:P(V,"Tag keys may only contain ASCII characters (a-Z), numbers (0-9) and underscores (_).")}),$(bn,"key",s)),p=m!==void 0?m:_!==void 0?_[1]._0[0]:"",h=oe(a.tag_path,{hd:p,tl:0}),C=i.tag,x;x=typeof C!="object"&&typeof C!="function"&&C===4?["Optional",{TAG:0,_0:["#",Ro]}]:void 0;let y={tags:0,current_identifier:x,tag_path:h},S=r_.fold_map,G=(function(M){return U(S,M,y,kt)})($(bn,"of",b(Ae,i.attributes))),D=i.tag,j;if(typeof D!="object"&&typeof D!="function")switch(D){case 0:j=["String",0,An((function(lt){let J=lt.expression_desc;if(typeof J!="object"&&typeof J!="function")return P(lt.expression_loc,"Expected attribute `initialValue` on tag `#String` to be of type string");if(J.TAG!==0)return P(lt.expression_loc,"Expected attribute `initialValue` on tag `#String` to be of type string");let Mt=J._0;if(!Mt)return{NAME:"String",VAL:""};let ln=Mt.hd.string_template_desc;return ln.TAG===0||Mt.tl?P(lt.expression_loc,"Expected attribute `initialValue` on tag `#String` to be of type string"):{NAME:"String",VAL:ln._0}}),$(bn,"initialValue",s))];break;case 1:j=["Int",1,An((function(lt){let J=lt.expression_desc;return typeof J!="object"&&typeof J!="function"||J.TAG!==2?P(lt.expression_loc,"Expected attribute `initialValue` on tag `#Int` to be of type int"):{NAME:"Int",VAL:J._0}}),$(bn,"initialValue",s))];break;case 2:j=["Float",2,An((function(lt){let J=lt.expression_desc;return typeof J!="object"&&typeof J!="function"||J.TAG!==3?P(lt.expression_loc,"Expected attribute `initialValue` on tag `#Float` to be of type float"):{NAME:"Float",VAL:J._0}}),$(bn,"initialValue",s))];break;case 3:j=["Boolean",3,An((function(lt){let J=lt.expression_desc;return typeof J!="object"&&typeof J!="function"||J.TAG!==4?P(lt.expression_loc,"Expected attribute `initialValue` on tag `#Boolean` to be of type boolean"):{NAME:"Boolean",VAL:J._0}}),$(bn,"initialValue",s))];break;case 4:j=["Array",4,An((function(lt){let J=lt.expression_desc;return typeof J!="object"&&typeof J!="function"||J.TAG!==2?P(lt.expression_loc,"Expected attribute `initialSize` on tag `#Array` to be of type int"):{NAME:"Int",VAL:J._0}}),$(bn,"initialSize",s))];break;case 5:j=["Record",5,void 0];break;case 6:j=["Slot",6,void 0];break;case 7:j=["Store",7,void 0];break;case 8:j=[void 0,8,void 0];break;case 9:j=[void 0,9,void 0];break}else{let M=D._0,V=An((function(gt){let tt=gt.expression_desc;if(!(typeof tt!="object"&&typeof tt!="function"))switch(tt.TAG){case 0:let St=tt._0;if(!St)return{NAME:"String",VAL:""};let lt=St.hd.string_template_desc;if(lt.TAG!==0&&!St.tl)return{NAME:"String",VAL:lt._0};break;case 2:return{NAME:"Int",VAL:tt._0};case 3:return{NAME:"Float",VAL:tt._0};case 4:return{NAME:"Boolean",VAL:tt._0}}return P(gt.expression_loc,"Expected attribute `initialValue` on tag `#"+(M+"` to be and immediate primitive value (string, int, float, bool)."))}),$(bn,"initialValue",s));j=[{NAME:"Custom",VAL:M},{TAG:0,_0:M},V]}let k=j[0],q=_!==void 0?_[0]==="Required":!0,N=j[1],rt=G[1],ot={kind:N,path:h,required:q,attributes:s,children:rt},Z;if(k!==void 0){let M=G[0].tags;Z=oe(a.tags,{hd:{public_tag_key:p,public_tag_typ:k,public_tag_children:M||void 0,public_tag_initial_value:j[2]},tl:0})}else Z=a.tags;let Ct=a.current_identifier,X=a.tag_path;return[{tags:Z,current_identifier:Ct,tag_path:X},ot]}(t,n.tag_desc);return[r[0],{TAG:12,_0:{tag_loc:n.tag_loc,tag_desc:r[1]}}]}function $h(t,n,e){let r=kt(t,e);return[r[0],{TAG:17,_0:n,_1:r[1]}]}function Th(t,n){let e=g_(t,n);return[e[0],{TAG:14,_0:e[1]}]}function Gh(t,n){let e=function(o,i,_){let c=_[0],s=i.tags,a=[c,{TAG:0,_0:[o,Ro]}],m=i.tag_path,h=kt({tags:s,current_identifier:a,tag_path:m},_[1]),C=h[0],x=h[1],y=[c,x],S=C.tags,G=C.tag_path;return[{tags:S,current_identifier:void 0,tag_path:G},y]},r=(function(o){return Oa(o,t,e)})(b(Ae,n));return[r[0],{TAG:6,_0:r[1]}]}function vh(t,n,e){let r=t.current_identifier,o;if(r!==void 0){let c=He(t,r[1]);o=[c[0],c[1]]}else o=[t,void 0];let i=pe.fold_map(n,o[0],He),_=kt(i[0],e);return[_[0],{TAG:8,identifier:o[1],parameters:i[1],body:_[1]}]}function jh(t,n){let e=n.declaration_kind,r;switch(e){case 0:r=0;break;case 1:r=1;break;case 2:r=2;break}let o=vr(b(Ae,n.declaration_attributes),t,kt),i=kt(o[0],n.declaration_body);return[i[0],{declaration_loc:n.declaration_loc,declaration_kind:r,declaration_attributes:o[1],declaration_body:i[1]}]}function Mh(t,n){return vr(b(Ae,n),t,jh)}function hf(t){return Mh(ih,t)[1]}function gf(t,n){return hf(mf(t,n))}function b_(t,n,e,r,o,i){let _=((n+t|0)+r|0)+i|0;return(_<<o|_>>>(32-o|0)|0)+e|0}function $n(t,n,e,r,o,i,_){return b_(n&e|(n^-1)&r,t,n,o,i,_)}function Tn(t,n,e,r,o,i,_){return b_(n&r|e&(r^-1),t,n,o,i,_)}function Gn(t,n,e,r,o,i,_){return b_(n^e^r,t,n,o,i,_)}function vn(t,n,e,r,o,i,_){return b_(e^(n|r^-1),t,n,o,i,_)}function gs(t,n){let e=t[0],r=t[1],o=t[2],i=t[3];e=$n(e,r,o,i,n[0],7,-680876936),i=$n(i,e,r,o,n[1],12,-389564586),o=$n(o,i,e,r,n[2],17,606105819),r=$n(r,o,i,e,n[3],22,-1044525330),e=$n(e,r,o,i,n[4],7,-176418897),i=$n(i,e,r,o,n[5],12,1200080426),o=$n(o,i,e,r,n[6],17,-1473231341),r=$n(r,o,i,e,n[7],22,-45705983),e=$n(e,r,o,i,n[8],7,1770035416),i=$n(i,e,r,o,n[9],12,-1958414417),o=$n(o,i,e,r,n[10],17,-42063),r=$n(r,o,i,e,n[11],22,-1990404162),e=$n(e,r,o,i,n[12],7,1804603682),i=$n(i,e,r,o,n[13],12,-40341101),o=$n(o,i,e,r,n[14],17,-1502002290),r=$n(r,o,i,e,n[15],22,1236535329),e=Tn(e,r,o,i,n[1],5,-165796510),i=Tn(i,e,r,o,n[6],9,-1069501632),o=Tn(o,i,e,r,n[11],14,643717713),r=Tn(r,o,i,e,n[0],20,-373897302),e=Tn(e,r,o,i,n[5],5,-701558691),i=Tn(i,e,r,o,n[10],9,38016083),o=Tn(o,i,e,r,n[15],14,-660478335),r=Tn(r,o,i,e,n[4],20,-405537848),e=Tn(e,r,o,i,n[9],5,568446438),i=Tn(i,e,r,o,n[14],9,-1019803690),o=Tn(o,i,e,r,n[3],14,-187363961),r=Tn(r,o,i,e,n[8],20,1163531501),e=Tn(e,r,o,i,n[13],5,-1444681467),i=Tn(i,e,r,o,n[2],9,-51403784),o=Tn(o,i,e,r,n[7],14,1735328473),r=Tn(r,o,i,e,n[12],20,-1926607734),e=Gn(e,r,o,i,n[5],4,-378558),i=Gn(i,e,r,o,n[8],11,-2022574463),o=Gn(o,i,e,r,n[11],16,1839030562),r=Gn(r,o,i,e,n[14],23,-35309556),e=Gn(e,r,o,i,n[1],4,-1530992060),i=Gn(i,e,r,o,n[4],11,1272893353),o=Gn(o,i,e,r,n[7],16,-155497632),r=Gn(r,o,i,e,n[10],23,-1094730640),e=Gn(e,r,o,i,n[13],4,681279174),i=Gn(i,e,r,o,n[0],11,-358537222),o=Gn(o,i,e,r,n[3],16,-722521979),r=Gn(r,o,i,e,n[6],23,76029189),e=Gn(e,r,o,i,n[9],4,-640364487),i=Gn(i,e,r,o,n[12],11,-421815835),o=Gn(o,i,e,r,n[15],16,530742520),r=Gn(r,o,i,e,n[2],23,-995338651),e=vn(e,r,o,i,n[0],6,-198630844),i=vn(i,e,r,o,n[7],10,1126891415),o=vn(o,i,e,r,n[14],15,-1416354905),r=vn(r,o,i,e,n[5],21,-57434055),e=vn(e,r,o,i,n[12],6,1700485571),i=vn(i,e,r,o,n[3],10,-1894986606),o=vn(o,i,e,r,n[10],15,-1051523),r=vn(r,o,i,e,n[1],21,-2054922799),e=vn(e,r,o,i,n[8],6,1873313359),i=vn(i,e,r,o,n[15],10,-30611744),o=vn(o,i,e,r,n[6],15,-1560198380),r=vn(r,o,i,e,n[13],21,1309151649),e=vn(e,r,o,i,n[4],6,-145523070),i=vn(i,e,r,o,n[11],10,-1120210379),o=vn(o,i,e,r,n[2],15,718787259),r=vn(r,o,i,e,n[9],21,-343485551),t[0]=e+t[0]|0,t[1]=r+t[1]|0,t[2]=o+t[2]|0,t[3]=i+t[3]|0}var Pt=[1732584193,-271733879,-1732584194,271733878],ce=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function bf(t,n,e){let r=t.slice(n,e),o=r.length;Pt[0]=1732584193,Pt[1]=-271733879,Pt[2]=-1732584194,Pt[3]=271733878;for(let a=0;a<=15;++a)ce[a]=0;let i=o/64|0;for(let a=1;a<=i;++a){for(let m=0;m<=15;++m){let p=((a<<6)-64|0)+(m<<2)|0;ce[m]=((r.charCodeAt(p)+(r.charCodeAt(p+1|0)<<8)|0)+(r.charCodeAt(p+2|0)<<16)|0)+(r.charCodeAt(p+3|0)<<24)|0}gs(Pt,ce)}let _=r.slice(i<<6);for(let a=0;a<=15;++a)ce[a]=0;let c=_.length-1|0;for(let a=0;a<=c;++a)ce[a/4|0]=ce[a/4|0]|_.charCodeAt(a)<<(a%4<<3);let s=c+1|0;if(ce[s/4|0]=ce[s/4|0]|128<<(s%4<<3),s>55){gs(Pt,ce);for(let a=0;a<=15;++a)ce[a]=0}return ce[14]=o<<3,gs(Pt,ce),String.fromCharCode(Pt[0]&255,Pt[0]>>8&255,Pt[0]>>16&255,Pt[0]>>24&255,Pt[1]&255,Pt[1]>>8&255,Pt[1]>>16&255,Pt[1]>>24&255,Pt[2]&255,Pt[2]>>8&255,Pt[2]>>16&255,Pt[2]>>24&255,Pt[3]&255,Pt[3]>>8&255,Pt[3]>>16&255,Pt[3]>>24&255)}function yf(t){return bf(t,0,t.length)}var Cf;if(tc!==32){if(tc!==64)throw new d("Assert_failure",{MEL_EXN_ID:"Assert_failure",_1:["jscomp/stdlib/int32.ml",69,6]});Cf=(function(t){return t&-1})}else Cf=(function(t){if(t>=0&&t<=qe)return t});var Sf=2147483647;var PC=Bn(qe);var wf=ii;function Ph(t){return[Math.floor(Math.random()*2147483647)]}function Bh(t,n){ir(n.st,0,t.st,0,55),t.idx=n.idx}function qh(t,n){let e=function(c,s){return yf(c+re("%d",s))},r=function(c){return((R(c,0)+(R(c,1)<<8)|0)+(R(c,2)<<16)|0)+(R(c,3)<<24)|0},o=n.length===0?[0]:n,i=o.length;for(let c=0;c<=54;++c)Wt(t.st,c,c);let _="x";for(let c=0,s=54+ze(55,i)|0;c<=s;++c){let a=c%55,m=c%i;_=e(_,Tt(o,m)),Wt(t.st,a,(Tt(t.st,a)^r(_))&1073741823)}t.idx=0}function xf(t){let n={st:Gt(55,0),idx:0};return qh(n,t),n}function Fh(t){return xf(Ph())}function zh(t){let n={st:Gt(55,0),idx:0};return Bh(n,t),n}function an(t){t.idx=(t.idx+1|0)%55;let n=Tt(t.st,t.idx),r=(Tt(t.st,(t.idx+24|0)%55)+(n^n>>>25&31)|0)&1073741823;return Wt(t.st,t.idx,r),r}function Af(t,n){for(;;){let e=an(t),r=e%n;if((e-r|0)<=((1073741823-n|0)+1|0))return r}}function Oh(t,n){if(n>1073741823||n<=0)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Random.int"});return Af(t,n)}function Vh(t,n){if(n<=0)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Random.full_int"});if(n>1073741823)for(;;){let e=an(t),r=an(t),o;n<=2147483647?o=[(r&1073725440)<<1|e>>>15,2147483647]:o=[((an(t)&1073741312)<<12|r>>>9)<<20|e>>>10,qe];let i=o[0],_=i%n;if((i-_|0)<=((o[1]-n|0)+1|0))return _}else return Af(t,n)}function Uh(t,n){if(n<=0)throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Random.int32"});for(;;){let e=an(t),r=(an(t)&1)<<30,o=e|r,i=o%n;if((o-i|0)<=((Sf-n|0)+1|0))return i}}function Rh(t,n){if(v_(n,Sn))throw new d("Invalid_argument",{MEL_EXN_ID:"Invalid_argument",_1:"Random.int64"});for(;;){let e=Bn(an(t)),r=ee(Bn(an(t)),30),o=ee(Bn(an(t)&7),60),i=Pn(e,Pn(r,o)),_=k_(i,n);if(!zr(tr(i,_),ye(tr(wf,n),Ke)))return _}}function Yh(t){let n=an(t),e=an(t);return(n/1073741824+e)/1073741824}function Qh(t,n){return Yh(t)*n}function Hh(t){return(an(t)&1)===0}function Zh(t){let n=an(t)>>>14,e=an(t)>>>14;return n|e<<16}function Wh(t){let n=fn(Bn(an(t)),9),e=fn(Bn(an(t)),9),r=fn(Bn(an(t)),8);return Pn(n,Pn(ee(e,21),ee(r,42)))}var Ko={make:xf,make_self_init:Fh,copy:zh,bits:an,$$int:Oh,full_int:Vh,int32:Uh,int64:Rh,$$float:Qh,bool:Hh,bits32:Zh,bits64:Wh};var Kh={v:!1};var Jh=Ft.new_key(void 0,Ko.make_self_init);function tg(t,n){for(;;){let e=t;if(e>=n||e<<1<e)return e;t=e<<1}}function $f(t,n){let e=t!==void 0?t:Kh.v,r=tg(16,n),o=e?Ko.bits(Ft.get(Jh)):0;return{size:0,data:Gt(r,0),seed:o,initial_size:r}}function ng(t,n,e,r){let o=r.length,i=Gt(o,0),_=function(c){for(;;){let s=c;if(typeof s!="object"&&typeof s!="function")return;let a=s.key,m=s.data,p=s.next,h=n?s:{TAG:0,key:a,data:m,next:0},C=b(t,a),x=Tt(i,C);typeof x!="object"&&typeof x!="function"?Wt(r,C,h):x.next=h,Wt(i,C,h),c=p}};for(let c=0,s=e.length;c<s;++c)_(Tt(e,c));if(n)for(let c=0;c<o;++c){let s=Tt(i,c);typeof s!="object"&&typeof s!="function"||(s.next=0)}}function eg(t,n){let e=n.data,r=e.length,o=r<<1;if(o<r)return;let i=Gt(o,0),_=n.initial_size>=0;n.data=i,ng(b(t,n),_,e,i)}function bs(t,n){return rr(10,100,t.seed,n)&(t.data.length-1|0)}function Tf(t,n){let e=Tt(t.data,bs(t,n));if(typeof e!="object"&&typeof e!="function")return;let r=e.key,o=e.data,i=e.next;if(ut(n,r))return z(o);if(typeof i!="object"&&typeof i!="function")return;let _=i.key,c=i.data,s=i.next;if(ut(n,_))return z(c);if(typeof s!="object"&&typeof s!="function")return;let a=s.key,m=s.data,p=s.next;if(ut(n,a))return z(m);{let h=p;for(;;){let C=h;if(typeof C!="object"&&typeof C!="function")return;let x=C.key,y=C.data,S=C.next;if(ut(n,x))return z(y);h=S}}}function rg(t,n){for(;;){let e=n;if(typeof e!="object"&&typeof e!="function")return e;let r=e.key,o=e.next;if(ut(r,t))return e;n=o}}function og(t,n,e,r,o,i){if(typeof i!="object"&&typeof i!="function")return Wt(t.data,e,{TAG:0,key:n,data:o,next:r}),t.size=t.size+1|0,t.size>t.data.length<<1?eg(bs,t):void 0;i.key=n,i.data=o}function ys(t,n,e){let r=bs(t,n),o=Tt(t.data,r),i=rg(n,o);og(t,n,r,o,e,i)}function Jt(t,n){for(;;){let e=n,r=t,o=e.expression_desc;if(typeof o!="object"&&typeof o!="function")return r;switch(o.TAG){case 5:return Mo(Jt,r,o._0);case 6:return U(Mr,(function(x,y,S){return Jt(S,y[1])}),o._0,r);case 8:n=o.body;continue;case 9:let i=Jt(r,o.function_definition);return _t(Jt,i,o.arguments);case 10:return $(ss,o._0,r);case 12:let _=o._0,c=U(Mr,(function(x,y,S){return Jt(S,y)}),_.tag_desc.attributes,r),s=_.tag_desc.children;return s!==void 0?Jt(c,s):c;case 13:let a=Jt(r,o.iterable);n=o.body,t=a;continue;case 14:return y_(r,o._0);case 15:return _t(_g,r,o._0);case 16:let m=o.alternate,p=Jt(r,o.condition),h=Jt(p,o.consequent);if(m===void 0)return h;n=m,t=h;continue;case 17:n=o._1;continue;case 18:let C=Jt(r,o._0);n=o._2,t=C;continue;default:return r}}}function _g(t,n){let e=n.statement_desc;if(typeof e!="object"&&typeof e!="function")return t;switch(e.TAG){case 0:return Jt(t,e._0[3]);case 1:return _t((function(r,o){return Jt(r,o[3])}),t,e._0);case 2:return Jt(t,e._1);case 3:return Jt(t,e._0)}}function y_(t,n){let e=n.template_node_desc;switch(e.TAG){case 0:let r=U(Mr,(function(_,c,s){return Jt(s,c)}),e.html_tag_attributes,t);return _t(y_,r,e.html_tag_children);case 1:let o=$(ss,e.component_tag_identifier._0[0],t),i=U(Mr,(function(_,c,s){return Jt(s,c)}),e.component_tag_attributes,o);return _t(y_,i,e.component_tag_children);case 2:return _t(y_,t,e._0);case 4:return Jt(t,e._0);case 3:case 5:return t}}function cg(t){let n=U(Mr,(function(e,r,o){return Jt(o,r)}),t.declaration_attributes,cs);return Jt(n,t.declaration_body)}function sg(t){let n=$f(void 0,b(Hr,t)),e=function(r,o,i,_){ys(n,r,"Unresolved");let c=U(Fu,(function(s,a){let m={hd:s,tl:_},p=Tf(n,s);if(p!==void 0)return p==="Unresolved"?{hd:[r,Qt(m)],tl:a}:a;let h=$(bn,s,t);return h!==void 0?e(s,wt(h),a,m):a}),o,i);return ys(n,r,"Resolved"),c};return U(Mr,(function(r,o,i){return e(r,o,i,{hd:r,tl:0})}),t,0)}function ag(t,n){Se((function(e){let r=e[0],o=$(Mi,r,t),i=wn(" -> ",e[1]);P(o.declaration_loc,"Found cyclic dependency in `"+(r+("`:\n"+(i+`
462
+ %!`))))}),n)}function Gf(t){let n=$(Po,cg,t);return ag(t,sg(n)),n}function vf(t,n){let e=$(bn,n,t);return uu(e,cs)}function S_(t,n){let e=n.length,r=bt(e+20|0);it(r,39);for(let o=0;o<e;++o)R(n,o)===39?Lt(r,t):it(r,R(n,o));return it(r,39),W(r)}function ws(t,n,e){if(e==="")return n;{let r=e.length-1|0;for(;;){let o=r;if(o<0)return Bt(e,0,1);if(!$(t,e,o)){let i=o,_=o+1|0;for(;;){let c=i;if(c<0)return Bt(e,0,_);if($(t,e,c))return Bt(e,c+1|0,(_-c|0)-1|0);i=c-1|0}}r=o-1|0}}}function xs(t,n,e){if(e==="")return n;{let r=e.length-1|0;for(;;){let o=r;if(o<0)return Bt(e,0,1);if(!$(t,e,o)){let i=o;for(;;){let _=i;if(_<0)return n;if($(t,e,_)){let c=_;for(;;){let s=c;if(s<0)return Bt(e,0,1);if(!$(t,e,s))return Bt(e,0,s+1|0);c=s-1|0}}i=_-1|0}}r=o-1|0}}}var As=".";function Es(t,n){return R(t,n)===47}function jf(t){return t.length<1?!0:R(t,0)!==47}function ug(t){return jf(t)&&!Gr("./",t)?!Gr("../",t):!1}function fg(t,n){return za(n,t)}var w_;try{w_=U_("TMPDIR")}catch(t){let n=yt(t);if(n.MEL_EXN_ID===pt)w_="/tmp";else throw n}function $s(t){return S_("'\\''",t)}function Mf(t,n,e,r,o){return wn(" ",hn($s,{hd:t,tl:o}))+((n!==void 0?" <"+S_("'\\''",n):"")+((e!==void 0?" >"+S_("'\\''",e):"")+(r!==void 0?ut(r,e)?" 2>&1":" 2>"+S_("'\\''",r):"")))}function mg(t){return ws(Es,As,t)}function dg(t){return xs(Es,As,t)}var pg={$$null:"/dev/null",current_dir_name:As,parent_dir_name:"..",dir_sep:"/",is_dir_sep:Es,is_relative:jf,is_implicit:ug,check_suffix:fg,temp_dir_name:w_,quote:$s,quote_command:Mf,basename:mg,dirname:dg},Ts=".";function uo(t,n){let e=R(t,n);return e===47||e===92?!0:e===58}function Gs(t){return(t.length<1||R(t,0)!==47)&&(t.length<1||R(t,0)!==92)?t.length<2?!0:R(t,1)!==58:!1}function kf(t){return Gs(t)&&!Gr("./",t)&&!Gr(".\\",t)&&!Gr("../",t)?!Gr("..\\",t):!1}function If(t,n){let e=n.length,r=t.length;if(r<e)return!1;let o=Bt(t,r-e|0,e);return mt(Lo(mn(o)))===mt(Lo(mn(n)))}var Cs;try{Cs=U_("TEMP")}catch(t){let n=yt(t);if(n.MEL_EXN_ID===pt)Cs=".";else throw n}function Lf(t){let n=t.length,e=bt(n+20|0);it(e,34);let r=function(_){for(;;){let c=_;if(c===n)return it(e,34);let s=R(t,c);if(s===34||s===92)return o(0,c);it(e,s),_=c+1|0}},o=function(_,c){for(;;){let s=c,a=_;if(s===n)return it(e,34),i(a);let m=R(t,s);if(m!==34){if(m!==92)return i(a),r(s);c=s+1|0,_=a+1|0;continue}return i((a<<1)+1|0),it(e,34),r(s+1|0)}},i=function(_){for(let c=1;c<=_;++c)it(e,92)};return r(0),W(e)}function hg(t){let n=bt(t.length+20|0);return Xa((function(e){if(e>=62){if(e>123||e<63){if(e>=125)return it(n,e)}else if(e!==94)return it(n,e)}else if(e>=42){if(e!==60)return it(n,e)}else{if(e<33)return it(n,e);switch(e){case 35:case 36:case 39:return it(n,e);case 33:case 34:case 37:case 38:case 40:case 41:break}}it(n,94),it(n,e)}),t),W(n)}function C_(t){let n=Fa(t,47)?Pa((function(o){return o!==47?o:92}),t):t;if(Ei(function(o){return o!==34?o===37:!0},mn(n))){let o="Filename.quote_command: bad file name "+n;throw new d("Failure",{MEL_EXN_ID:"Failure",_1:o})}return Ei(function(o){if(o>=42)return o===94;if(o<32)return!1;switch(o){case 34:case 35:case 36:case 37:case 39:return!1;case 32:case 33:case 38:case 40:case 41:return!0}},mn(n))?wn("",{hd:'"',tl:{hd:n,tl:{hd:'"',tl:0}}}):n}function gg(t,n,e,r,o){return wn("",{hd:'"',tl:{hd:C_(t),tl:{hd:" ",tl:{hd:hg(wn(" ",hn(Lf,o))),tl:{hd:n!==void 0?" <"+C_(n):"",tl:{hd:e!==void 0?" >"+C_(e):"",tl:{hd:r!==void 0?ut(r,e)?" 2>&1":" 2>"+C_(r):"",tl:{hd:'"',tl:0}}}}}}}})}function bg(t){let n=function(e){return e>=91?!(e>122||e<97):e>=65};return t.length>=2&&n(R(t,0))?R(t,1)===58:!1}function Df(t){return bg(t)?[Bt(t,0,2),Bt(t,2,t.length-2|0)]:["",t]}function yg(t){let n=Df(t),e=xs(uo,Ts,n[1]);return n[0]+e}function Cg(t){let n=Df(t);return ws(uo,Ts,n[1])}var Sg={$$null:"NUL",current_dir_name:Ts,parent_dir_name:"..",dir_sep:"\\",is_dir_sep:uo,is_relative:Gs,is_implicit:kf,check_suffix:If,temp_dir_name:Cs,quote:Lf,quote_command:gg,basename:Cg,dirname:yg},vs=".";function wg(t){return ws(uo,vs,t)}function xg(t){return xs(uo,vs,t)}var Ag={$$null:"/dev/null",current_dir_name:vs,parent_dir_name:"..",dir_sep:"/",is_dir_sep:uo,is_relative:Gs,is_implicit:kf,check_suffix:If,temp_dir_name:w_,quote:$s,quote_command:Mf,basename:wg,dirname:xg},jn;switch(ba){case"Cygwin":jn=Ag;break;case"Win32":jn=Sg;break;default:jn=pg}var Eg=jn.dir_sep,Ss=jn.is_dir_sep,FC=jn.check_suffix,$g=jn.temp_dir_name;function js(t,n){let e=t.length;return e===0||$(Ss,t,e-1|0)?t+n:t+(Eg+n)}function Tg(t){let n=t.length-1|0;for(;;){let e=n;if(e<0||$(Ss,t,e))return 0;if(R(t,e)===46){let r=e-1|0;for(;;){let o=r;if(o<0||$(Ss,t,o))return 0;if(R(t,o)!==46)return t.length-e|0;r=o-1|0}}n=e-1|0}}function Nf(t){let n=Tg(t);return n===0?"":Bt(t,t.length-n|0,n)}var zC=Ft.new_key(void 0,Ko.make_self_init);var OC=Ft.new_key(ul,(function(t){return $g}));var VC=jn.current_dir_name,UC=jn.parent_dir_name,RC=jn.is_relative,YC=jn.is_implicit,QC=jn.basename,HC=jn.dirname,ZC=jn.$$null,WC=jn.quote,KC=jn.quote_command;var Ie=Vf(require("fs"),1);function vg(t,n){let e=0,r={hd:n,tl:0};for(;;){let o=r,i=e;if(!o)return i;let _=o.hd,c=o.tl;if(Ie.lstatSync(_).isDirectory()){r=oe(c,hn((function(s){return js(_,s)}),_c(Ie.readdirSync(_))));continue}if(Nf(_)===t){r=c,e={hd:_,tl:i};continue}r=o.tl}}function jg(t,n){return hn((function(e){let r=Ie.readFileSync(e,"utf8");return{TAG:1,_0:e,_1:r}}),vg(".pi",t))}function Xf(t,n){Ie.mkdirSync(n,{recursive:!0});try{let e=jg(t,void 0),r=gf(!0,e),o=Gf(r),i=Nu(r);return $(_r,(function(_,c){let s=Xr.to_hex(Hc($(Ua,_,c))),a=b(qu,vf(o,_)),m=wn("",hn((function(G){let D=b(Zt({TAG:0,_0:{TAG:11,_0:"./",_1:{TAG:2,_0:0,_1:{TAG:11,_0:".pi.mjs",_1:0}}},_1:"./%s.pi.mjs"}),G),j=b(Zt({TAG:0,_0:{TAG:2,_0:0,_1:{TAG:11,_0:"Deps",_1:0}},_1:"%sDeps"}),G);return U(Zt({TAG:0,_0:{TAG:11,_0:"import { __internal_code as ",_1:{TAG:2,_0:0,_1:{TAG:11,_0:", __internal_deps as ",_1:{TAG:2,_0:0,_1:{TAG:11,_0:" } from ",_1:{TAG:3,_0:0,_1:{TAG:11,_0:`;
463
+ `,_1:0}}}}}}},_1:`import { __internal_code as %s, __internal_deps as %s } from %S;
464
+ `}),G,j,D)}),a)),p='export const __internal_code = "'+(s+`";
465
+ `),h=b(Zt({TAG:0,_0:{TAG:11,_0:"export const __internal_deps = [",_1:{TAG:2,_0:0,_1:{TAG:11,_0:`];
466
+ `,_1:0}}},_1:`export const __internal_deps = [%s];
467
+ `}),wn(",",W_((function(G){return{hd:b(Zt({TAG:0,_0:{TAG:11,_0:"...",_1:{TAG:2,_0:0,_1:{TAG:11,_0:"Deps",_1:0}}},_1:"...%sDeps"}),G),tl:{hd:G,tl:0}}}),a))),C=Pu(b(Zt({TAG:0,_0:{TAG:11,_0:`
468
+ export default function(data, defaultSlot) {
469
+ return {
470
+ __pinc_declaration: true,
471
+ name: `,_1:{TAG:3,_0:0,_1:{TAG:11,_0:`,
472
+ code: [...__internal_deps, __internal_code],
473
+ data: data,
474
+ defaultSlot: defaultSlot,
475
+ };
476
+ };
477
+ `,_1:0}}},_1:`
478
+ export default function(data, defaultSlot) {
479
+ return {
480
+ __pinc_declaration: true,
481
+ name: %S,
482
+ code: [...__internal_deps, __internal_code],
483
+ data: data,
484
+ defaultSlot: defaultSlot,
485
+ };
486
+ };
487
+ `}),_)),x=m+(p+(h+C)),y=b(Zt({TAG:0,_0:{TAG:2,_0:0,_1:{TAG:11,_0:".pi.mjs",_1:0}},_1:"%s.pi.mjs"}),_),S=js(n,y);Ie.writeFileSync(S,x,"utf8")}),i)}catch(e){let r=yt(e);if(r.MEL_EXN_ID===t_)return Z_(1);throw r}}0&&(module.exports={compile});