!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["lib-database"]=e():t["lib-database"]=e()}(this,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){(function(n){var i,o,r;o=[e],void 0===(r="function"==typeof(i=function(t){var e,i,o,r,a,s,c,l,p=t;function u(t){if(!("kotlinHashCodeValue$"in t)){var e=4294967296*Math.random()|0;Object.defineProperty(t,"kotlinHashCodeValue$",{value:e,enumerable:!1})}return t.kotlinHashCodeValue$}function d(){throw new Error("This marker function should never been called. Looks like compiler did not eliminate it properly. Please, report an issue if you caught this exception.")}function h(t,e){return(4294901760&t)*(65535&e)+(65535&t)*(0|e)|0}t.isBooleanArray=function(t){return(Array.isArray(t)||t instanceof Int8Array)&&"BooleanArray"===t.$type$},t.isByteArray=function(t){return t instanceof Int8Array&&"BooleanArray"!==t.$type$},t.isShortArray=function(t){return t instanceof Int16Array},t.isCharArray=function(t){return t instanceof Uint16Array&&"CharArray"===t.$type$},t.isIntArray=function(t){return t instanceof Int32Array},t.isFloatArray=function(t){return t instanceof Float32Array},t.isDoubleArray=function(t){return t instanceof Float64Array},t.isLongArray=function(t){return Array.isArray(t)&&"LongArray"===t.$type$},t.isArray=function(t){return Array.isArray(t)&&!t.$type$},t.isArrayish=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)},t.arrayToString=function(e){if(null===e)return"null";var n=t.isCharArray(e)?String.fromCharCode:t.toString;return"["+Array.prototype.map.call(e,(function(t){return n(t)})).join(", ")+"]"},t.arrayEquals=function(e,n){if(e===n)return!0;if(null===e||null===n||!t.isArrayish(n)||e.length!==n.length)return!1;for(var i=0,o=e.length;i>16},t.toByte=function(t){return(255&t)<<24>>24},t.toChar=function(t){return 65535&t},t.numberToInt=function(e){return e instanceof t.Long?e.toInt():t.doubleToInt(e)},t.doubleToInt=function(t){return t>2147483647?2147483647:t<-2147483648?-2147483648:0|t},t.toBoxedChar=function(e){return null==e||e instanceof t.BoxedChar?e:new t.BoxedChar(e)},t.unboxChar=function(e){return null==e?e:t.toChar(e)},t.equals=function(t,e){return null==t?null==e:null!=e&&(t!=t?e!=e:"object"==typeof t&&"function"==typeof t.equals?t.equals(e):"number"==typeof t&&"number"==typeof e?t===e&&(0!==t||1/t==1/e):t===e)},t.hashCode=function(e){if(null==e)return 0;var n=typeof e;return"object"===n?"function"==typeof e.hashCode?e.hashCode():u(e):"function"===n?u(e):"number"===n?t.numberHashCode(e):"boolean"===n?Number(e):function(t){for(var e=0,n=0;n=t.Long.TWO_PWR_63_DBL_?t.Long.MAX_VALUE:e<0?t.Long.fromNumber(-e).negate():new t.Long(e%t.Long.TWO_PWR_32_DBL_|0,e/t.Long.TWO_PWR_32_DBL_|0)},t.Long.fromBits=function(e,n){return new t.Long(e,n)},t.Long.fromString=function(e,n){if(0==e.length)throw Error("number format error: empty string");var i=n||10;if(i<2||36=0)throw Error('number format error: interior "-" character: '+e);for(var o=t.Long.fromNumber(Math.pow(i,8)),r=t.Long.ZERO,a=0;a=0?this.low_:t.Long.TWO_PWR_32_DBL_+this.low_},t.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equalsLong(t.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!=this.high_?this.high_:this.low_,n=31;n>0&&0==(e&1<0},t.Long.prototype.greaterThanOrEqual=function(t){return this.compare(t)>=0},t.Long.prototype.compare=function(t){if(this.equalsLong(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.subtract(t).isNegative()?-1:1},t.Long.prototype.negate=function(){return this.equalsLong(t.Long.MIN_VALUE)?t.Long.MIN_VALUE:this.not().add(t.Long.ONE)},t.Long.prototype.add=function(e){var n=this.high_>>>16,i=65535&this.high_,o=this.low_>>>16,r=65535&this.low_,a=e.high_>>>16,s=65535&e.high_,c=e.low_>>>16,l=0,p=0,u=0,d=0;return u+=(d+=r+(65535&e.low_))>>>16,d&=65535,p+=(u+=o+c)>>>16,u&=65535,l+=(p+=i+s)>>>16,p&=65535,l+=n+a,l&=65535,t.Long.fromBits(u<<16|d,l<<16|p)},t.Long.prototype.subtract=function(t){return this.add(t.negate())},t.Long.prototype.multiply=function(e){if(this.isZero())return t.Long.ZERO;if(e.isZero())return t.Long.ZERO;if(this.equalsLong(t.Long.MIN_VALUE))return e.isOdd()?t.Long.MIN_VALUE:t.Long.ZERO;if(e.equalsLong(t.Long.MIN_VALUE))return this.isOdd()?t.Long.MIN_VALUE:t.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(t.Long.TWO_PWR_24_)&&e.lessThan(t.Long.TWO_PWR_24_))return t.Long.fromNumber(this.toNumber()*e.toNumber());var n=this.high_>>>16,i=65535&this.high_,o=this.low_>>>16,r=65535&this.low_,a=e.high_>>>16,s=65535&e.high_,c=e.low_>>>16,l=65535&e.low_,p=0,u=0,d=0,h=0;return d+=(h+=r*l)>>>16,h&=65535,u+=(d+=o*l)>>>16,d&=65535,u+=(d+=r*c)>>>16,d&=65535,p+=(u+=i*l)>>>16,u&=65535,p+=(u+=o*c)>>>16,u&=65535,p+=(u+=r*s)>>>16,u&=65535,p+=n*l+i*c+o*s+r*a,p&=65535,t.Long.fromBits(d<<16|h,p<<16|u)},t.Long.prototype.div=function(e){if(e.isZero())throw Error("division by zero");if(this.isZero())return t.Long.ZERO;if(this.equalsLong(t.Long.MIN_VALUE)){if(e.equalsLong(t.Long.ONE)||e.equalsLong(t.Long.NEG_ONE))return t.Long.MIN_VALUE;if(e.equalsLong(t.Long.MIN_VALUE))return t.Long.ONE;if((o=this.shiftRight(1).div(e).shiftLeft(1)).equalsLong(t.Long.ZERO))return e.isNegative()?t.Long.ONE:t.Long.NEG_ONE;var n=this.subtract(e.multiply(o));return o.add(n.div(e))}if(e.equalsLong(t.Long.MIN_VALUE))return t.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().div(e.negate()):this.negate().div(e).negate();if(e.isNegative())return this.div(e.negate()).negate();var i=t.Long.ZERO;for(n=this;n.greaterThanOrEqual(e);){for(var o=Math.max(1,Math.floor(n.toNumber()/e.toNumber())),r=Math.ceil(Math.log(o)/Math.LN2),a=r<=48?1:Math.pow(2,r-48),s=t.Long.fromNumber(o),c=s.multiply(e);c.isNegative()||c.greaterThan(n);)o-=a,c=(s=t.Long.fromNumber(o)).multiply(e);s.isZero()&&(s=t.Long.ONE),i=i.add(s),n=n.subtract(c)}return i},t.Long.prototype.modulo=function(t){return this.subtract(this.div(t).multiply(t))},t.Long.prototype.not=function(){return t.Long.fromBits(~this.low_,~this.high_)},t.Long.prototype.and=function(e){return t.Long.fromBits(this.low_&e.low_,this.high_&e.high_)},t.Long.prototype.or=function(e){return t.Long.fromBits(this.low_|e.low_,this.high_|e.high_)},t.Long.prototype.xor=function(e){return t.Long.fromBits(this.low_^e.low_,this.high_^e.high_)},t.Long.prototype.shiftLeft=function(e){if(0==(e&=63))return this;var n=this.low_;if(e<32){var i=this.high_;return t.Long.fromBits(n<>>32-e)}return t.Long.fromBits(0,n<>>e|n<<32-e,n>>e)}return t.Long.fromBits(n>>e-32,n>=0?0:-1)},t.Long.prototype.shiftRightUnsigned=function(e){if(0==(e&=63))return this;var n=this.high_;if(e<32){var i=this.low_;return t.Long.fromBits(i>>>e|n<<32-e,n>>>e)}return 32==e?t.Long.fromBits(n,0):t.Long.fromBits(n>>>e-32,0)},t.Long.prototype.equals=function(e){return e instanceof t.Long&&this.equalsLong(e)},t.Long.prototype.compareTo_11rb$=t.Long.prototype.compare,t.Long.prototype.inc=function(){return this.add(t.Long.ONE)},t.Long.prototype.dec=function(){return this.add(t.Long.NEG_ONE)},t.Long.prototype.valueOf=function(){return this.toNumber()},t.Long.prototype.unaryPlus=function(){return this},t.Long.prototype.unaryMinus=t.Long.prototype.negate,t.Long.prototype.inv=t.Long.prototype.not,t.Long.prototype.rangeTo=function(e){return new t.kotlin.ranges.LongRange(this,e)},t.defineInlineFunction=function(t,e){return e},t.wrapFunction=function(t){var e=function(){return(e=t()).apply(this,arguments)};return function(){return e.apply(this,arguments)}},t.suspendCall=function(t){return t},t.coroutineResult=function(t){d()},t.coroutineReceiver=function(t){d()},t.setCoroutineResult=function(t,e){d()},t.getReifiedTypeParameterKType=function(t){d()},t.compareTo=function(e,n){var i=typeof e;return"number"===i?"number"==typeof n?t.doubleCompareTo(e,n):t.primitiveCompareTo(e,n):"string"===i||"boolean"===i?t.primitiveCompareTo(e,n):e.compareTo_11rb$(n)},t.primitiveCompareTo=function(t,e){return te?1:0},t.doubleCompareTo=function(t,e){if(te)return 1;if(t===e){if(0!==t)return 0;var n=1/t;return n===1/e?0:n<0?-1:1}return t!=t?e!=e?0:1:-1},t.imul=Math.imul||h,t.imulEmulated=h,e=new ArrayBuffer(8),i=new Float64Array(e),o=new Float32Array(e),r=new Int32Array(e),a=0,s=1,i[0]=-1,0!==r[a]&&(a=1,s=0),t.doubleToRawBits=function(e){return i[0]=e,t.Long.fromBits(r[a],r[s])},t.doubleFromBits=function(t){return r[a]=t.low_,r[s]=t.high_,i[0]},t.floatToRawBits=function(t){return o[0]=t,r[0]},t.floatFromBits=function(t){return r[0]=t,o[0]},t.numberHashCode=function(t){return(0|t)===t?0|t:(i[0]=t,(31*r[s]|0)+r[a]|0)},t.ensureNotNull=function(e){return null!=e?e:t.throwNPE()},void 0===String.prototype.startsWith&&Object.defineProperty(String.prototype,"startsWith",{value:function(t,e){return e=e||0,this.lastIndexOf(t,e)===e}}),void 0===String.prototype.endsWith&&Object.defineProperty(String.prototype,"endsWith",{value:function(t,e){var n=this.toString();(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}}),void 0===Math.sign&&(Math.sign=function(t){return 0==(t=+t)||isNaN(t)?Number(t):t>0?1:-1}),void 0===Math.trunc&&(Math.trunc=function(t){return isNaN(t)?NaN:t>0?Math.floor(t):Math.ceil(t)}),function(){var t=Math.sqrt(2220446049250313e-31),e=Math.sqrt(t),n=1/t,i=1/e;if(void 0===Math.sinh&&(Math.sinh=function(n){if(Math.abs(n)t&&(i+=n*n*n/6),i}var o=Math.exp(n),r=1/o;return isFinite(o)?isFinite(r)?(o-r)/2:-Math.exp(-n-Math.LN2):Math.exp(n-Math.LN2)}),void 0===Math.cosh&&(Math.cosh=function(t){var e=Math.exp(t),n=1/e;return isFinite(e)&&isFinite(n)?(e+n)/2:Math.exp(Math.abs(t)-Math.LN2)}),void 0===Math.tanh&&(Math.tanh=function(n){if(Math.abs(n)t&&(i-=n*n*n/3),i}var o=Math.exp(+n),r=Math.exp(-n);return o===1/0?1:r===1/0?-1:(o-r)/(o+r)}),void 0===Math.asinh){var o=function(r){if(r>=+e)return r>i?r>n?Math.log(r)+Math.LN2:Math.log(2*r+1/(2*r)):Math.log(r+Math.sqrt(r*r+1));if(r<=-e)return-o(-r);var a=r;return Math.abs(r)>=t&&(a-=r*r*r/6),a};Math.asinh=o}void 0===Math.acosh&&(Math.acosh=function(i){if(i<1)return NaN;if(i-1>=e)return i>n?Math.log(i)+Math.LN2:Math.log(i+Math.sqrt(i*i-1));var o=Math.sqrt(i-1),r=o;return o>=t&&(r-=o*o*o/12),Math.sqrt(2)*r}),void 0===Math.atanh&&(Math.atanh=function(n){if(Math.abs(n)t&&(i+=n*n*n/3),i}return Math.log((1+n)/(1-n))/2}),void 0===Math.log1p&&(Math.log1p=function(t){if(Math.abs(t)>>0;return 0===e?32:31-(c(e)/l|0)|0})),void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(t){return null!=t&&null!=t.__proto__&&t.__proto__.__proto__===Int8Array.prototype.__proto__}),void 0===Array.prototype.fill&&Object.defineProperty(Array.prototype,"fill",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");for(var e=Object(this),n=e.length>>>0,i=arguments[1],o=i>>0,r=o<0?Math.max(n+o,0):Math.min(o,n),a=arguments[2],s=void 0===a?n:a>>0,c=s<0?Math.max(n+s,0):Math.min(s,n);re)return 1;if(t===e){if(0!==t)return 0;var n=1/t;return n===1/e?0:n<0?-1:1}return t!=t?e!=e?0:1:-1};for(i=0;i=0}function nt(t,e){return ct(t,e)>=0}function it(t,e){return lt(t,e)>=0}function ot(t,e){return pt(t,e)>=0}function rt(t,e){return ut(t,e)>=0}function at(t,e){return dt(t,e)>=0}function st(t,e){if(null==e){for(var n=0;n!==t.length;++n)if(null==t[n])return n}else for(var i=0;i!==t.length;++i)if(r(e,t[i]))return i;return-1}function ct(t,e){for(var n=0;n!==t.length;++n)if(e===t[n])return n;return-1}function lt(t,e){for(var n=0;n!==t.length;++n)if(e===t[n])return n;return-1}function pt(t,e){for(var n=0;n!==t.length;++n)if(e===t[n])return n;return-1}function ut(t,e){for(var n=0;n!==t.length;++n)if(r(e,t[n]))return n;return-1}function dt(t,e){for(var n=0;n!==t.length;++n)if(e===t[n])return n;return-1}function ht(t,e){var n,i;if(null==e)for(n=Mt(_t(t)).iterator();n.hasNext();){var o=n.next();if(null==t[o])return o}else for(i=Mt(_t(t)).iterator();i.hasNext();){var a=i.next();if(r(e,t[a]))return a}return-1}function Et(t){var e;switch(t.length){case 0:throw new gn("Array is empty.");case 1:e=t[0];break;default:throw pn("Array has more than one element.")}return e}function _t(t){return new Tl(0,mt(t))}function mt(t){return t.length-1|0}function ft(t){return t.length-1|0}function yt(t,e){var n;for(n=0;n!==t.length;++n){var i=t[n];e.add_11rb$(i)}return e}function Tt(t){return fi(ns(t))}function $t(t){var e;switch(t.length){case 0:e=_c();break;case 1:e=Kn(t[0]);break;default:e=yt(t,Ji(t.length))}return e}function Nt(t){this.closure$iterator=t}function gt(e,n){return t.isType(e,de)?e.contains_11rb$(n):St(e,n)>=0}function Rt(e){if(t.isType(e,Ee))return Ct(e);var n=e.iterator();if(!n.hasNext())throw new gn("Collection is empty.");return n.next()}function Ct(t){if(t.isEmpty())throw new gn("List is empty.");return t.get_za3lpa$(0)}function St(e,n){var i;if(t.isType(e,Ee))return e.indexOf_11rb$(n);var o=0;for(i=e.iterator();i.hasNext();){var a=i.next();if(Zn(o),r(n,a))return o;o=o+1|0}return-1}function It(e){if(t.isType(e,Ee))return Lt(e);var n=e.iterator();if(!n.hasNext())throw new gn("Collection is empty.");for(var i=n.next();n.hasNext();)i=n.next();return i}function Lt(t){if(t.isEmpty())throw new gn("List is empty.");return t.get_za3lpa$(cs(t))}function bt(e){if(t.isType(e,Ee))return vt(e);var n=e.iterator();if(!n.hasNext())throw new gn("Collection is empty.");var i=n.next();if(n.hasNext())throw pn("Collection has more than one element.");return i}function vt(t){var e;switch(t.size){case 0:throw new gn("List is empty.");case 1:e=t.get_za3lpa$(0);break;default:throw pn("List has more than one element.")}return e}function Ot(e,n){var i;if(!(n>=0))throw pn(("Requested element count "+n+" is less than zero.").toString());if(0===n)return os();if(t.isType(e,de)){if(n>=e.size)return At(e);if(1===n)return Vn(Rt(e))}var o=0,r=mi();for(i=e.iterator();i.hasNext();){var a=i.next();if(r.add_11rb$(a),(o=o+1|0)===n)break}return ls(r)}function Ut(t,e){for(var n=cs(t);n>=1;n--){var i=e.nextInt_za3lpa$(n+1|0);t.set_wxm5ur$(i,t.set_wxm5ur$(n,t.get_za3lpa$(i)))}}function Dt(t,e){var n;for(n=t.iterator();n.hasNext();){var i=n.next();e.add_11rb$(i)}return e}function At(e){var n;if(t.isType(e,de)){switch(e.size){case 0:n=os();break;case 1:n=Vn(t.isType(e,Ee)?e.get_za3lpa$(0):e.iterator().next());break;default:n=Pt(e)}return n}return ls(kt(e))}function kt(e){return t.isType(e,de)?Pt(e):Dt(e,_i())}function Pt(t){return fi(t)}function xt(e){var n;if(t.isType(e,de)){switch(e.size){case 0:n=_c();break;case 1:n=Kn(t.isType(e,Ee)?e.get_za3lpa$(0):e.iterator().next());break;default:n=Dt(e,Ji(e.size))}return n}return fc(Dt(e,Vi()))}function wt(e,n){if(t.isType(n,de)){var i=mi((e.size,n.size));return i.addAll_brywnq$(e),i.addAll_brywnq$(n),i}var o=fi(e);return Os(o,n),o}function zt(t,e,n,i,o,r,a,s){var c;void 0===n&&(n=", "),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=-1),void 0===a&&(a="..."),void 0===s&&(s=null),e.append_gw00v9$(i);var l=0;for(c=t.iterator();c.hasNext();){var p=c.next();if((l=l+1|0)>1&&e.append_gw00v9$(n),!(r<0||l<=r))break;Jl(e,p,s)}return r>=0&&l>r&&e.append_gw00v9$(a),e.append_gw00v9$(o),e}function Gt(t,e,n,i,o,r,a){return void 0===e&&(e=", "),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=-1),void 0===r&&(r="..."),void 0===a&&(a=null),zt(t,_r(),e,n,i,o,r,a).toString()}function jt(t){return new Nt((e=t,function(){return e.iterator()}));var e}function Ft(t,e){return wl().fromClosedRange_qt1dr2$(t,e,-1)}function Mt(t){return wl().fromClosedRange_qt1dr2$(t.last,t.first,0|-t.step)}function Wt(t,e){return e<=-2147483648?gl().EMPTY:new Tl(t,e-1|0)}function Xt(t,e){return te?e:t}function qt(t,e,n){if(e>n)throw pn("Cannot coerce value to an empty range: maximum "+n+" is less than minimum "+e+".");return tn?n:t}function Ht(t,e,n){if(e.compareTo_11rb$(n)>0)throw pn("Cannot coerce value to an empty range: maximum "+n.toString()+" is less than minimum "+e.toString()+".");return t.compareTo_11rb$(e)<0?e:t.compareTo_11rb$(n)>0?n:t}function Vt(t,e){if(e.isEmpty())throw pn("Cannot coerce value to an empty range: "+e+".");return e.lessThanOrEquals_n65qkk$(t,e.start)&&!e.lessThanOrEquals_n65qkk$(e.start,t)?e.start:e.lessThanOrEquals_n65qkk$(e.endInclusive,t)&&!e.lessThanOrEquals_n65qkk$(t,e.endInclusive)?e.endInclusive:t}function Kt(e,n){if(t.isType(n,ql))return Vt(e,n);if(n.isEmpty())throw pn("Cannot coerce value to an empty range: "+n+".");return e.compareTo_11rb$(n.start)<0?n.start:e.compareTo_11rb$(n.endInclusive)>0?n.endInclusive:e}function Jt(t){this.closure$iterator=t}function Yt(t,e){return new Qs(t,!1,e)}function Qt(t){return null==t}function Zt(e){var n;return t.isType(n=Yt(e,Qt),Ms)?n:ro()}function te(e,n){if(!(n>=0))throw pn(("Requested element count "+n+" is less than zero.").toString());return 0===n?Vs():t.isType(e,oc)?e.take_za3lpa$(n):new sc(e,n)}function ee(t,e){var n;for(n=t.iterator();n.hasNext();){var i=n.next();e.add_11rb$(i)}return e}function ne(t){return ls(ie(t))}function ie(t){return ee(t,_i())}function oe(t,e){return new tc(t,e)}function re(t){return new Jt((e=t,function(){return e.iterator()}));var e}function ae(t){if(0===t.length)throw new gn("Char sequence is empty.");return t.charCodeAt(up(t))}function se(t,e){if(!(e>=0))throw pn(("Requested character count "+e+" is less than zero.").toString());return t.substring(Bt(e,t.length))}function ce(){}function le(){}function pe(){}function ue(){}function de(){}function he(){}function Ee(){}function _e(){}function me(){}function fe(){}function ye(){}function Te(){}function $e(){}function Ne(){}function ge(){}function Re(){}function Ce(){}function Se(){}function Ie(){Le=this}on.prototype=Object.create(v.prototype),on.prototype.constructor=on,an.prototype=Object.create(on.prototype),an.prototype.constructor=an,Oe.prototype=Object.create(Fs.prototype),Oe.prototype.constructor=Oe,De.prototype=Object.create(ks.prototype),De.prototype.constructor=De,ke.prototype=Object.create(xs.prototype),ke.prototype.constructor=ke,xe.prototype=Object.create(Ps.prototype),xe.prototype.constructor=xe,ze.prototype=Object.create(ws.prototype),ze.prototype.constructor=ze,je.prototype=Object.create(Gs.prototype),je.prototype.constructor=je,Me.prototype=Object.create(js.prototype),Me.prototype.constructor=Me,Xe.prototype=Object.create(zs.prototype),Xe.prototype.constructor=Xe,en.prototype=Object.create(v.prototype),en.prototype.constructor=en,cn.prototype=Object.create(an.prototype),cn.prototype.constructor=cn,un.prototype=Object.create(an.prototype),un.prototype.constructor=un,hn.prototype=Object.create(an.prototype),hn.prototype.constructor=hn,En.prototype=Object.create(an.prototype),En.prototype.constructor=En,fn.prototype=Object.create(cn.prototype),fn.prototype.constructor=fn,yn.prototype=Object.create(an.prototype),yn.prototype.constructor=yn,Tn.prototype=Object.create(an.prototype),Tn.prototype.constructor=Tn,$n.prototype=Object.create(en.prototype),$n.prototype.constructor=$n,gn.prototype=Object.create(an.prototype),gn.prototype.constructor=gn,Cn.prototype=Object.create(an.prototype),Cn.prototype.constructor=Cn,Sn.prototype=Object.create(an.prototype),Sn.prototype.constructor=Sn,Ln.prototype=Object.create(an.prototype),Ln.prototype.constructor=Ln,Ua.prototype=Object.create(Oa.prototype),Ua.prototype.constructor=Ua,ei.prototype=Object.create(Oa.prototype),ei.prototype.constructor=ei,oi.prototype=Object.create(ii.prototype),oi.prototype.constructor=oi,ni.prototype=Object.create(ei.prototype),ni.prototype.constructor=ni,ri.prototype=Object.create(ni.prototype),ri.prototype.constructor=ri,hi.prototype=Object.create(ei.prototype),hi.prototype.constructor=hi,ci.prototype=Object.create(hi.prototype),ci.prototype.constructor=ci,li.prototype=Object.create(hi.prototype),li.prototype.constructor=li,ui.prototype=Object.create(ei.prototype),ui.prototype.constructor=ui,ai.prototype=Object.create(za.prototype),ai.prototype.constructor=ai,Ei.prototype=Object.create(ni.prototype),Ei.prototype.constructor=Ei,Li.prototype=Object.create(ci.prototype),Li.prototype.constructor=Li,Ii.prototype=Object.create(ai.prototype),Ii.prototype.constructor=Ii,Di.prototype=Object.create(hi.prototype),Di.prototype.constructor=Di,Fi.prototype=Object.create(si.prototype),Fi.prototype.constructor=Fi,Mi.prototype=Object.create(ci.prototype),Mi.prototype.constructor=Mi,ji.prototype=Object.create(Ii.prototype),ji.prototype.constructor=ji,Hi.prototype=Object.create(Di.prototype),Hi.prototype.constructor=Hi,Zi.prototype=Object.create(Qi.prototype),Zi.prototype.constructor=Zi,to.prototype=Object.create(Qi.prototype),to.prototype.constructor=to,eo.prototype=Object.create(to.prototype),eo.prototype.constructor=eo,io.prototype=Object.create(un.prototype),io.prototype.constructor=io,go.prototype=Object.create(No.prototype),go.prototype.constructor=go,Ro.prototype=Object.create(No.prototype),Ro.prototype.constructor=Ro,Co.prototype=Object.create(No.prototype),Co.prototype.constructor=Co,dr.prototype=Object.create(on.prototype),dr.prototype.constructor=dr,Ir.prototype=Object.create(S.prototype),Ir.prototype.constructor=Ir,Yr.prototype=Object.create(Ua.prototype),Yr.prototype.constructor=Yr,Qr.prototype=Object.create(Oa.prototype),Qr.prototype.constructor=Qr,ya.prototype=Object.create(S.prototype),ya.prototype.constructor=ya,Da.prototype=Object.create(Ua.prototype),Da.prototype.constructor=Da,ka.prototype=Object.create(Aa.prototype),ka.prototype.constructor=ka,qa.prototype=Object.create(Oa.prototype),qa.prototype.constructor=qa,Ga.prototype=Object.create(qa.prototype),Ga.prototype.constructor=Ga,Fa.prototype=Object.create(Oa.prototype),Fa.prototype.constructor=Fa,Hs.prototype=Object.create(qs.prototype),Hs.prototype.constructor=Hs,Fc.prototype=Object.create(S.prototype),Fc.prototype.constructor=Fc,Zc.prototype=Object.create(Qc.prototype),Zc.prototype.constructor=Zc,ul.prototype=Object.create(Qc.prototype),ul.prototype.constructor=ul,_l.prototype=Object.create(Ol.prototype),_l.prototype.constructor=_l,Tl.prototype=Object.create(kl.prototype),Tl.prototype.constructor=Tl,Rl.prototype=Object.create(zl.prototype),Rl.prototype.constructor=Rl,Ll.prototype=Object.create(Ps.prototype),Ll.prototype.constructor=Ll,bl.prototype=Object.create(ws.prototype),bl.prototype.constructor=bl,vl.prototype=Object.create(zs.prototype),vl.prototype.constructor=vl,lp.prototype=Object.create(Ps.prototype),lp.prototype.constructor=lp,cu.prototype=Object.create(S.prototype),cu.prototype.constructor=cu,Su.prototype=Object.create(en.prototype),Su.prototype.constructor=Su,Fu.prototype=Object.create(Bu.prototype),Fu.prototype.constructor=Fu,nd.prototype=Object.create(ad.prototype),nd.prototype.constructor=nd,Nt.prototype.iterator=function(){return this.closure$iterator()},Nt.$metadata$={kind:e,interfaces:[Ms]},Jt.prototype.iterator=function(){return this.closure$iterator()},Jt.$metadata$={kind:e,interfaces:[pe]},ce.$metadata$={kind:R,simpleName:"Annotation",interfaces:[]},le.$metadata$={kind:R,simpleName:"CharSequence",interfaces:[]},pe.$metadata$={kind:R,simpleName:"Iterable",interfaces:[]},ue.$metadata$={kind:R,simpleName:"MutableIterable",interfaces:[pe]},de.$metadata$={kind:R,simpleName:"Collection",interfaces:[pe]},he.$metadata$={kind:R,simpleName:"MutableCollection",interfaces:[ue,de]},Ee.$metadata$={kind:R,simpleName:"List",interfaces:[de]},_e.$metadata$={kind:R,simpleName:"MutableList",interfaces:[he,Ee]},me.$metadata$={kind:R,simpleName:"Set",interfaces:[de]},fe.$metadata$={kind:R,simpleName:"MutableSet",interfaces:[he,me]},ye.prototype.getOrDefault_xwzc9p$=function(t,e){throw new Su},Te.$metadata$={kind:R,simpleName:"Entry",interfaces:[]},ye.$metadata$={kind:R,simpleName:"Map",interfaces:[]},$e.prototype.remove_xwzc9p$=function(t,e){return!0},Ne.$metadata$={kind:R,simpleName:"MutableEntry",interfaces:[Te]},$e.$metadata$={kind:R,simpleName:"MutableMap",interfaces:[ye]},ge.$metadata$={kind:R,simpleName:"Iterator",interfaces:[]},Re.$metadata$={kind:R,simpleName:"MutableIterator",interfaces:[ge]},Ce.$metadata$={kind:R,simpleName:"ListIterator",interfaces:[ge]},Se.$metadata$={kind:R,simpleName:"MutableListIterator",interfaces:[Re,Ce]},Ie.prototype.toString=function(){return"kotlin.Unit"},Ie.$metadata$={kind:C,simpleName:"Unit",interfaces:[]};var Le=null;function be(){return null===Le&&new Ie,Le}function ve(t){this.closure$arr=t,this.index=0}function Oe(t){this.closure$array=t,Fs.call(this),this.index=0}function Ue(t){return new Oe(t)}function De(t){this.closure$array=t,ks.call(this),this.index=0}function Ae(t){return new De(t)}function ke(t){this.closure$array=t,xs.call(this),this.index=0}function Pe(t){return new ke(t)}function xe(t){this.closure$array=t,Ps.call(this),this.index=0}function we(t){return new xe(t)}function ze(t){this.closure$array=t,ws.call(this),this.index=0}function Ge(t){return new ze(t)}function je(t){this.closure$array=t,Gs.call(this),this.index=0}function Fe(t){return new je(t)}function Me(t){this.closure$array=t,js.call(this),this.index=0}function We(t){return new Me(t)}function Xe(t){this.closure$array=t,zs.call(this),this.index=0}function Be(t){return new Xe(t)}function qe(t){this.c=t}function He(t){this.resultContinuation_0=t,this.state_0=0,this.exceptionState_0=0,this.result_0=null,this.exception_0=null,this.finallyPath_0=null,this.context_hxcuhl$_0=this.resultContinuation_0.context,this.intercepted__0=null}function Ve(){Ke=this}ve.prototype.hasNext=function(){return this.indexr)for(o.length=e;r=0))throw pn(("Invalid new array size: "+e+".").toString());return vn(t,new Int8Array(e))}function kn(t,e,n){return wa().checkRangeIndexes_cub51b$(e,n,t.length),t.slice(e,n)}function Pn(t,e){t.length>1&&yi(t,e)}function xn(e,n){return t.compareTo(e,n)>=0?e:n}function wn(){Gn=this,this.rangeStart_8be2vx$=new Int32Array([48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296])}Ye.prototype=Object.create(He.prototype),Ye.prototype.constructor=Ye,Ye.prototype.doResume=function(){var t;if(null!=(t=this.exception_0))throw t;return this.closure$block()},Ye.$metadata$={kind:e,interfaces:[He]},Object.defineProperty(en.prototype,"message",{get:function(){return this.message_q7r8iu$_0}}),Object.defineProperty(en.prototype,"cause",{get:function(){return this.cause_us9j0c$_0}}),en.$metadata$={kind:e,simpleName:"Error",interfaces:[v]},Object.defineProperty(on.prototype,"message",{get:function(){return this.message_8yp7un$_0}}),Object.defineProperty(on.prototype,"cause",{get:function(){return this.cause_th0jdv$_0}}),on.$metadata$={kind:e,simpleName:"Exception",interfaces:[v]},an.$metadata$={kind:e,simpleName:"RuntimeException",interfaces:[on]},cn.$metadata$={kind:e,simpleName:"IllegalArgumentException",interfaces:[an]},un.$metadata$={kind:e,simpleName:"IllegalStateException",interfaces:[an]},hn.$metadata$={kind:e,simpleName:"IndexOutOfBoundsException",interfaces:[an]},En.$metadata$={kind:e,simpleName:"UnsupportedOperationException",interfaces:[an]},fn.$metadata$={kind:e,simpleName:"NumberFormatException",interfaces:[cn]},yn.$metadata$={kind:e,simpleName:"NullPointerException",interfaces:[an]},Tn.$metadata$={kind:e,simpleName:"ClassCastException",interfaces:[an]},$n.$metadata$={kind:e,simpleName:"AssertionError",interfaces:[en]},gn.$metadata$={kind:e,simpleName:"NoSuchElementException",interfaces:[an]},Cn.$metadata$={kind:e,simpleName:"ArithmeticException",interfaces:[an]},Sn.$metadata$={kind:e,simpleName:"NoWhenBranchMatchedException",interfaces:[an]},Ln.$metadata$={kind:e,simpleName:"UninitializedPropertyAccessException",interfaces:[an]},wn.$metadata$={kind:C,simpleName:"Digit",interfaces:[]};var zn,Gn=null;function jn(){return null===Gn&&new wn,Gn}function Fn(t,e){for(var n=0,i=t.length-1|0,o=-1,r=0;n<=i;)if(e>(r=t[o=(n+i|0)/2|0]))n=o+1|0;else{if(e===r)return o;i=o-1|0}return o-(e4096&&(5760===e||8192<=e&&e<=8202||8232===e||8233===e||8239===e||8287===e||12288===e)}function Xn(t){this.function$=t}function Bn(t){return void 0!==t.toArray?t.toArray():qn(t)}function qn(t){for(var e=[],n=t.iterator();n.hasNext();)e.push(n.next());return e}function Hn(t,e){var n;if(e.length=0;c--)e[n+c|0]=t[i+c|0]}function Zn(t){return t<0&&ps(),t}function ti(t){return t}function ei(){Oa.call(this)}function ni(){ei.call(this),this.modCount=0}function ii(t){this.$outer=t,this.index_0=0,this.last_0=-1}function oi(t,e){this.$outer=t,ii.call(this,this.$outer),wa().checkPositionIndex_6xvm5r$(e,this.$outer.size),this.index_0=e}function ri(t,e,n){ni.call(this),this.list_0=t,this.fromIndex_0=e,this._size_0=0,wa().checkRangeIndexes_cub51b$(this.fromIndex_0,n,this.list_0.size),this._size_0=n-this.fromIndex_0|0}function ai(){za.call(this),this._keys_qe2m0n$_0=null,this._values_kxdlqh$_0=null}function si(t,e){this.key_5xhq3d$_0=t,this._value_0=e}function ci(){hi.call(this)}function li(t){this.this$AbstractMutableMap=t,hi.call(this)}function pi(t){this.closure$entryIterator=t}function ui(t){this.this$AbstractMutableMap=t,ei.call(this)}function di(t){this.closure$entryIterator=t}function hi(){ei.call(this)}function Ei(t){ni.call(this),this.array_hd7ov6$_0=t,this.isReadOnly_dbt2oh$_0=!1}function _i(t){return t=t||Object.create(Ei.prototype),Ei.call(t,[]),t}function mi(t,e){return e=e||Object.create(Ei.prototype),Ei.call(e,[]),e}function fi(t,e){return e=e||Object.create(Ei.prototype),Ei.call(e,Bn(t)),e}function yi(e,n){if(function(){if(null!=zn)return zn;zn=!1;for(var t=[],e=0;e<600;e++)t.push(e);var n=Ti;t.sort(n);for(var i=1;i=r)return!1}return zn=!0,!0}()){var i=(o=n,function(t,e){return o.compare(t,e)});e.sort(i)}else!function(e,n,i,o){var r=t.newArray(e.length,null),a=function t(e,n,i,o,r){if(i===o)return e;for(var a=(i+o|0)/2|0,s=t(e,n,i,a,r),c=t(e,n,a+1|0,o,r),l=s===n?e:n,p=i,u=a+1|0,d=i;d<=o;d++)if(p<=a&&u<=o){var h=s[p],E=c[u];r.compare(h,E)<=0?(l[d]=h,p=p+1|0):(l[d]=E,u=u+1|0)}else p<=a?(l[d]=s[p],p=p+1|0):(l[d]=c[u],u=u+1|0);return l}(e,r,n,i,o);if(a!==e)for(var s=n;s<=i;s++)e[s]=a[s]}(e,0,mt(e),n);var o}function Ti(t,e){return(3&t)-(3&e)|0}function $i(){}function Ni(){Ci=this}Xn.prototype.compare=function(t,e){return this.function$(t,e)},Xn.$metadata$={kind:R,simpleName:"Comparator",interfaces:[]},ei.prototype.remove_11rb$=function(t){this.checkIsMutable();for(var e=this.iterator();e.hasNext();)if(r(e.next(),t))return e.remove(),!0;return!1},ei.prototype.addAll_brywnq$=function(t){var e;this.checkIsMutable();var n=!1;for(e=t.iterator();e.hasNext();){var i=e.next();this.add_11rb$(i)&&(n=!0)}return n},ei.prototype.removeAll_brywnq$=function(e){var n;return this.checkIsMutable(),Us(t.isType(this,ue)?this:ro(),(n=e,function(t){return n.contains_11rb$(t)}))},ei.prototype.retainAll_brywnq$=function(e){var n;return this.checkIsMutable(),Us(t.isType(this,ue)?this:ro(),(n=e,function(t){return!n.contains_11rb$(t)}))},ei.prototype.clear=function(){this.checkIsMutable();for(var t=this.iterator();t.hasNext();)t.next(),t.remove()},ei.prototype.toJSON=function(){return this.toArray()},ei.prototype.checkIsMutable=function(){},ei.$metadata$={kind:e,simpleName:"AbstractMutableCollection",interfaces:[he,Oa]},ni.prototype.add_11rb$=function(t){return this.checkIsMutable(),this.add_wxm5ur$(this.size,t),!0},ni.prototype.addAll_u57x28$=function(t,e){var n,i;wa().checkPositionIndex_6xvm5r$(t,this.size),this.checkIsMutable();var o=t,r=!1;for(n=e.iterator();n.hasNext();){var a=n.next();this.add_wxm5ur$((o=(i=o)+1|0,i),a),r=!0}return r},ni.prototype.clear=function(){this.checkIsMutable(),this.removeRange_vux9f0$(0,this.size)},ni.prototype.removeAll_brywnq$=function(t){return this.checkIsMutable(),As(this,(e=t,function(t){return e.contains_11rb$(t)}));var e},ni.prototype.retainAll_brywnq$=function(t){return this.checkIsMutable(),As(this,(e=t,function(t){return!e.contains_11rb$(t)}));var e},ni.prototype.iterator=function(){return new ii(this)},ni.prototype.contains_11rb$=function(t){return this.indexOf_11rb$(t)>=0},ni.prototype.indexOf_11rb$=function(t){var e;e=cs(this);for(var n=0;n<=e;n++)if(r(this.get_za3lpa$(n),t))return n;return-1},ni.prototype.lastIndexOf_11rb$=function(t){for(var e=cs(this);e>=0;e--)if(r(this.get_za3lpa$(e),t))return e;return-1},ni.prototype.listIterator=function(){return this.listIterator_za3lpa$(0)},ni.prototype.listIterator_za3lpa$=function(t){return new oi(this,t)},ni.prototype.subList_vux9f0$=function(t,e){return new ri(this,t,e)},ni.prototype.removeRange_vux9f0$=function(t,e){for(var n=this.listIterator_za3lpa$(t),i=e-t|0,o=0;o0},oi.prototype.nextIndex=function(){return this.index_0},oi.prototype.previous=function(){if(!this.hasPrevious())throw Rn();return this.last_0=(this.index_0=this.index_0-1|0,this.index_0),this.$outer.get_za3lpa$(this.last_0)},oi.prototype.previousIndex=function(){return this.index_0-1|0},oi.prototype.add_11rb$=function(t){this.$outer.add_wxm5ur$(this.index_0,t),this.index_0=this.index_0+1|0,this.last_0=-1},oi.prototype.set_11rb$=function(t){if(-1===this.last_0)throw dn("Call next() or previous() before updating element value with the iterator.".toString());this.$outer.set_wxm5ur$(this.last_0,t)},oi.$metadata$={kind:e,simpleName:"ListIteratorImpl",interfaces:[Se,ii]},ri.prototype.add_wxm5ur$=function(t,e){wa().checkPositionIndex_6xvm5r$(t,this._size_0),this.list_0.add_wxm5ur$(this.fromIndex_0+t|0,e),this._size_0=this._size_0+1|0},ri.prototype.get_za3lpa$=function(t){return wa().checkElementIndex_6xvm5r$(t,this._size_0),this.list_0.get_za3lpa$(this.fromIndex_0+t|0)},ri.prototype.removeAt_za3lpa$=function(t){wa().checkElementIndex_6xvm5r$(t,this._size_0);var e=this.list_0.removeAt_za3lpa$(this.fromIndex_0+t|0);return this._size_0=this._size_0-1|0,e},ri.prototype.set_wxm5ur$=function(t,e){return wa().checkElementIndex_6xvm5r$(t,this._size_0),this.list_0.set_wxm5ur$(this.fromIndex_0+t|0,e)},Object.defineProperty(ri.prototype,"size",{configurable:!0,get:function(){return this._size_0}}),ri.prototype.checkIsMutable=function(){this.list_0.checkIsMutable()},ri.$metadata$={kind:e,simpleName:"SubList",interfaces:[Yi,ni]},ni.$metadata$={kind:e,simpleName:"AbstractMutableList",interfaces:[_e,ei]},Object.defineProperty(si.prototype,"key",{get:function(){return this.key_5xhq3d$_0}}),Object.defineProperty(si.prototype,"value",{configurable:!0,get:function(){return this._value_0}}),si.prototype.setValue_11rc$=function(t){var e=this._value_0;return this._value_0=t,e},si.prototype.hashCode=function(){return Ba().entryHashCode_9fthdn$(this)},si.prototype.toString=function(){return Ba().entryToString_9fthdn$(this)},si.prototype.equals=function(t){return Ba().entryEquals_js7fox$(this,t)},si.$metadata$={kind:e,simpleName:"SimpleEntry",interfaces:[Ne]},ci.prototype.contains_11rb$=function(t){return this.containsEntry_kw6fkd$(t)},ci.prototype.remove_11rb$=function(t){return this.removeEntry_kw6fkd$(t)},ci.$metadata$={kind:e,simpleName:"AbstractEntrySet",interfaces:[hi]},ai.prototype.clear=function(){this.entries.clear()},li.prototype.add_11rb$=function(t){throw mn("Add is not supported on keys")},li.prototype.clear=function(){this.this$AbstractMutableMap.clear()},li.prototype.contains_11rb$=function(t){return this.this$AbstractMutableMap.containsKey_11rb$(t)},pi.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},pi.prototype.next=function(){return this.closure$entryIterator.next().key},pi.prototype.remove=function(){this.closure$entryIterator.remove()},pi.$metadata$={kind:e,interfaces:[Re]},li.prototype.iterator=function(){return new pi(this.this$AbstractMutableMap.entries.iterator())},li.prototype.remove_11rb$=function(t){return this.checkIsMutable(),!!this.this$AbstractMutableMap.containsKey_11rb$(t)&&(this.this$AbstractMutableMap.remove_11rb$(t),!0)},Object.defineProperty(li.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMutableMap.size}}),li.prototype.checkIsMutable=function(){this.this$AbstractMutableMap.checkIsMutable()},li.$metadata$={kind:e,interfaces:[hi]},Object.defineProperty(ai.prototype,"keys",{configurable:!0,get:function(){return null==this._keys_qe2m0n$_0&&(this._keys_qe2m0n$_0=new li(this)),L(this._keys_qe2m0n$_0)}}),ai.prototype.putAll_a2k3zr$=function(t){var e;for(this.checkIsMutable(),e=t.entries.iterator();e.hasNext();){var n=e.next(),i=n.key,o=n.value;this.put_xwzc9p$(i,o)}},ui.prototype.add_11rb$=function(t){throw mn("Add is not supported on values")},ui.prototype.clear=function(){this.this$AbstractMutableMap.clear()},ui.prototype.contains_11rb$=function(t){return this.this$AbstractMutableMap.containsValue_11rc$(t)},di.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},di.prototype.next=function(){return this.closure$entryIterator.next().value},di.prototype.remove=function(){this.closure$entryIterator.remove()},di.$metadata$={kind:e,interfaces:[Re]},ui.prototype.iterator=function(){return new di(this.this$AbstractMutableMap.entries.iterator())},Object.defineProperty(ui.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMutableMap.size}}),ui.prototype.checkIsMutable=function(){this.this$AbstractMutableMap.checkIsMutable()},ui.$metadata$={kind:e,interfaces:[ei]},Object.defineProperty(ai.prototype,"values",{configurable:!0,get:function(){return null==this._values_kxdlqh$_0&&(this._values_kxdlqh$_0=new ui(this)),L(this._values_kxdlqh$_0)}}),ai.prototype.remove_11rb$=function(t){this.checkIsMutable();for(var e=this.entries.iterator();e.hasNext();){var n=e.next(),i=n.key;if(r(t,i)){var o=n.value;return e.remove(),o}}return null},ai.prototype.checkIsMutable=function(){},ai.$metadata$={kind:e,simpleName:"AbstractMutableMap",interfaces:[$e,za]},hi.prototype.equals=function(e){return e===this||!!t.isType(e,me)&&Ka().setEquals_y8f7en$(this,e)},hi.prototype.hashCode=function(){return Ka().unorderedHashCode_nykoif$(this)},hi.$metadata$={kind:e,simpleName:"AbstractMutableSet",interfaces:[fe,ei]},Ei.prototype.build=function(){return this.checkIsMutable(),this.isReadOnly_dbt2oh$_0=!0,this},Ei.prototype.trimToSize=function(){},Ei.prototype.ensureCapacity_za3lpa$=function(t){},Object.defineProperty(Ei.prototype,"size",{configurable:!0,get:function(){return this.array_hd7ov6$_0.length}}),Ei.prototype.get_za3lpa$=function(e){var n;return null==(n=this.array_hd7ov6$_0[this.rangeCheck_xcmk5o$_0(e)])||t.isType(n,b)?n:ro()},Ei.prototype.set_wxm5ur$=function(e,n){var i;this.checkIsMutable(),this.rangeCheck_xcmk5o$_0(e);var o=this.array_hd7ov6$_0[e];return this.array_hd7ov6$_0[e]=n,null==(i=o)||t.isType(i,b)?i:ro()},Ei.prototype.add_11rb$=function(t){return this.checkIsMutable(),this.array_hd7ov6$_0.push(t),this.modCount=this.modCount+1|0,!0},Ei.prototype.add_wxm5ur$=function(t,e){this.checkIsMutable(),this.array_hd7ov6$_0.splice(this.insertionRangeCheck_xwivfl$_0(t),0,e),this.modCount=this.modCount+1|0},Ei.prototype.addAll_brywnq$=function(t){return this.checkIsMutable(),!t.isEmpty()&&(this.array_hd7ov6$_0=this.array_hd7ov6$_0.concat(Bn(t)),this.modCount=this.modCount+1|0,!0)},Ei.prototype.addAll_u57x28$=function(t,e){return this.checkIsMutable(),this.insertionRangeCheck_xwivfl$_0(t),t===this.size?this.addAll_brywnq$(e):!e.isEmpty()&&(t===this.size?this.addAll_brywnq$(e):(this.array_hd7ov6$_0=0===t?Bn(e).concat(this.array_hd7ov6$_0):kn(this.array_hd7ov6$_0,0,t).concat(Bn(e),kn(this.array_hd7ov6$_0,t,this.size)),this.modCount=this.modCount+1|0,!0))},Ei.prototype.removeAt_za3lpa$=function(t){return this.checkIsMutable(),this.rangeCheck_xcmk5o$_0(t),this.modCount=this.modCount+1|0,t===cs(this)?this.array_hd7ov6$_0.pop():this.array_hd7ov6$_0.splice(t,1)[0]},Ei.prototype.remove_11rb$=function(t){var e;this.checkIsMutable(),e=this.array_hd7ov6$_0;for(var n=0;n!==e.length;++n)if(r(this.array_hd7ov6$_0[n],t))return this.array_hd7ov6$_0.splice(n,1),this.modCount=this.modCount+1|0,!0;return!1},Ei.prototype.removeRange_vux9f0$=function(t,e){this.checkIsMutable(),this.modCount=this.modCount+1|0,this.array_hd7ov6$_0.splice(t,e-t|0)},Ei.prototype.clear=function(){this.checkIsMutable(),this.array_hd7ov6$_0=[],this.modCount=this.modCount+1|0},Ei.prototype.indexOf_11rb$=function(t){return st(this.array_hd7ov6$_0,t)},Ei.prototype.lastIndexOf_11rb$=function(t){return ht(this.array_hd7ov6$_0,t)},Ei.prototype.toString=function(){return O(this.array_hd7ov6$_0)},Ei.prototype.toArray_ro6dgy$=function(e){var n,i;if(e.lengththis.size&&(e[this.size]=null),e},Ei.prototype.toArray=function(){return[].slice.call(this.array_hd7ov6$_0)},Ei.prototype.checkIsMutable=function(){if(this.isReadOnly_dbt2oh$_0)throw _n()},Ei.prototype.rangeCheck_xcmk5o$_0=function(t){return wa().checkElementIndex_6xvm5r$(t,this.size),t},Ei.prototype.insertionRangeCheck_xwivfl$_0=function(t){return wa().checkPositionIndex_6xvm5r$(t,this.size),t},Ei.$metadata$={kind:e,simpleName:"ArrayList",interfaces:[Yi,ni,_e]},Ni.prototype.equals_oaftn8$=function(t,e){return r(t,e)},Ni.prototype.getHashCode_s8jyv4$=function(t){var e;return null!=(e=null!=t?D(t):null)?e:0},Ni.$metadata$={kind:C,simpleName:"HashCode",interfaces:[$i]};var gi,Ri,Ci=null;function Si(){return null===Ci&&new Ni,Ci}function Ii(){this.internalMap_uxhen5$_0=null,this.equality_vgh6cm$_0=null,this._entries_7ih87x$_0=null}function Li(t){this.$outer=t,ci.call(this)}function bi(t,e){return e=e||Object.create(Ii.prototype),ai.call(e),Ii.call(e),e.internalMap_uxhen5$_0=t,e.equality_vgh6cm$_0=t.equality,e}function vi(t){return t=t||Object.create(Ii.prototype),bi(new xi(Si()),t),t}function Oi(t,e,n){if(vi(n=n||Object.create(Ii.prototype)),!(t>=0))throw pn(("Negative initial capacity: "+t).toString());if(!(e>=0))throw pn(("Non-positive load factor: "+e).toString());return n}function Ui(t,e){return Oi(t,0,e=e||Object.create(Ii.prototype)),e}function Di(){this.map_8be2vx$=null}function Ai(t,e,n){return n=n||Object.create(Di.prototype),hi.call(n),Di.call(n),n.map_8be2vx$=Oi(t,e),n}function ki(t,e){return Ai(t,0,e=e||Object.create(Di.prototype)),e}function Pi(t,e){return e=e||Object.create(Di.prototype),hi.call(e),Di.call(e),e.map_8be2vx$=t,e}function xi(t){this.equality_mamlu8$_0=t,this.backingMap_0=this.createJsMap(),this.size_x3bm7r$_0=0}function wi(t){this.this$InternalHashCodeMap=t,this.state=-1,this.keys=Object.keys(t.backingMap_0),this.keyIndex=-1,this.chainOrEntry=null,this.isChain=!1,this.itemIndex=-1,this.lastEntry=null}function zi(){}function Gi(t){this.equality_qma612$_0=t,this.backingMap_0=this.createJsMap(),this.size_6u3ykz$_0=0}function ji(){this.head_1lr44l$_0=null,this.map_97q5dv$_0=null,this.isReadOnly_uhyvn5$_0=!1}function Fi(t,e,n){this.$outer=t,si.call(this,e,n),this.next_8be2vx$=null,this.prev_8be2vx$=null}function Mi(t){this.$outer=t,ci.call(this)}function Wi(t){this.$outer=t,this.last_0=null,this.next_0=null,this.next_0=this.$outer.$outer.head_1lr44l$_0}function Xi(t){return vi(t=t||Object.create(ji.prototype)),ji.call(t),t.map_97q5dv$_0=vi(),t}function Bi(t,e,n){return Oi(t,e,n=n||Object.create(ji.prototype)),ji.call(n),n.map_97q5dv$_0=vi(),n}function qi(t,e){return Bi(t,0,e=e||Object.create(ji.prototype)),e}function Hi(){}function Vi(t){return t=t||Object.create(Hi.prototype),Pi(Xi(),t),Hi.call(t),t}function Ki(t,e,n){return n=n||Object.create(Hi.prototype),Pi(Bi(t,e),n),Hi.call(n),n}function Ji(t,e){return Ki(t,0,e=e||Object.create(Hi.prototype)),e}function Yi(){}function Qi(){}function Zi(t){Qi.call(this),this.outputStream=t}function to(){Qi.call(this),this.buffer=""}function eo(){to.call(this)}function no(t,e){this.delegate_0=t,this.result_0=e}function io(){this.name="CancellationException"}function oo(t,e){this.closure$context=t,this.closure$resumeWith=e}function ro(){throw new Tn("Illegal cast")}function ao(t){throw dn(t)}function so(){}function co(e){if(Eo(e)||e===c.NEGATIVE_INFINITY)return e;if(0===e)return-c.MIN_VALUE;var n=A(e).add(t.Long.fromInt(e>0?-1:1));return t.doubleFromBits(n)}function lo(t){if(Eo(t))throw pn("Cannot round NaN value.");return t>2147483647?2147483647:t<-2147483648?-2147483648:_(Math.round(t))}function po(e){if(Eo(e))throw pn("Cannot round NaN value.");return e>T.toNumber()?T:e0?1:0}function ho(t){return t.toNumber()<0?-1:t.toNumber()>0?1:0}function Eo(t){return t!=t}function _o(t){return t===c.POSITIVE_INFINITY||t===c.NEGATIVE_INFINITY}function mo(t){return!_o(t)&&!Eo(t)}function fo(){return ol(Math.random()*Math.pow(2,32)|0)}function yo(t,e){return t*gi+e*Ri}function To(){}function $o(){}function No(t){this.jClass_1ppatx$_0=t}function go(t){var e;No.call(this,t),this.simpleName_m7mxi0$_0=null!=(e=t.$metadata$)?e.simpleName:null}function Ro(t,e,n){No.call(this,t),this.givenSimpleName_0=e,this.isInstanceFunction_0=n}function Co(){So=this,No.call(this,Object),this.simpleName_lnzy73$_0="Nothing"}$i.$metadata$={kind:R,simpleName:"EqualityComparator",interfaces:[]},Li.prototype.add_11rb$=function(t){throw mn("Add is not supported on entries")},Li.prototype.clear=function(){this.$outer.clear()},Li.prototype.containsEntry_kw6fkd$=function(t){return this.$outer.containsEntry_8hxqw4$(t)},Li.prototype.iterator=function(){return this.$outer.internalMap_uxhen5$_0.iterator()},Li.prototype.removeEntry_kw6fkd$=function(t){return!!gt(this,t)&&(this.$outer.remove_11rb$(t.key),!0)},Object.defineProperty(Li.prototype,"size",{configurable:!0,get:function(){return this.$outer.size}}),Li.$metadata$={kind:e,simpleName:"EntrySet",interfaces:[ci]},Ii.prototype.clear=function(){this.internalMap_uxhen5$_0.clear()},Ii.prototype.containsKey_11rb$=function(t){return this.internalMap_uxhen5$_0.contains_11rb$(t)},Ii.prototype.containsValue_11rc$=function(e){var n,i=this.internalMap_uxhen5$_0;t:do{var o;if(t.isType(i,de)&&i.isEmpty()){n=!1;break t}for(o=i.iterator();o.hasNext();){var r=o.next();if(this.equality_vgh6cm$_0.equals_oaftn8$(r.value,e)){n=!0;break t}}n=!1}while(0);return n},Object.defineProperty(Ii.prototype,"entries",{configurable:!0,get:function(){return null==this._entries_7ih87x$_0&&(this._entries_7ih87x$_0=this.createEntrySet()),L(this._entries_7ih87x$_0)}}),Ii.prototype.createEntrySet=function(){return new Li(this)},Ii.prototype.get_11rb$=function(t){return this.internalMap_uxhen5$_0.get_11rb$(t)},Ii.prototype.put_xwzc9p$=function(t,e){return this.internalMap_uxhen5$_0.put_xwzc9p$(t,e)},Ii.prototype.remove_11rb$=function(t){return this.internalMap_uxhen5$_0.remove_11rb$(t)},Object.defineProperty(Ii.prototype,"size",{configurable:!0,get:function(){return this.internalMap_uxhen5$_0.size}}),Ii.$metadata$={kind:e,simpleName:"HashMap",interfaces:[ai,$e]},Di.prototype.add_11rb$=function(t){return null==this.map_8be2vx$.put_xwzc9p$(t,this)},Di.prototype.clear=function(){this.map_8be2vx$.clear()},Di.prototype.contains_11rb$=function(t){return this.map_8be2vx$.containsKey_11rb$(t)},Di.prototype.isEmpty=function(){return this.map_8be2vx$.isEmpty()},Di.prototype.iterator=function(){return this.map_8be2vx$.keys.iterator()},Di.prototype.remove_11rb$=function(t){return null!=this.map_8be2vx$.remove_11rb$(t)},Object.defineProperty(Di.prototype,"size",{configurable:!0,get:function(){return this.map_8be2vx$.size}}),Di.$metadata$={kind:e,simpleName:"HashSet",interfaces:[hi,fe]},Object.defineProperty(xi.prototype,"equality",{get:function(){return this.equality_mamlu8$_0}}),Object.defineProperty(xi.prototype,"size",{configurable:!0,get:function(){return this.size_x3bm7r$_0},set:function(t){this.size_x3bm7r$_0=t}}),xi.prototype.put_xwzc9p$=function(e,n){var i=this.equality.getHashCode_s8jyv4$(e),o=this.getChainOrEntryOrNull_0(i);if(null==o)this.backingMap_0[i]=new si(e,n);else{if(!t.isArray(o)){var r=o;return this.equality.equals_oaftn8$(r.key,e)?r.setValue_11rc$(n):(this.backingMap_0[i]=[r,new si(e,n)],this.size=this.size+1|0,null)}var a=o,s=this.findEntryInChain_0(a,e);if(null!=s)return s.setValue_11rc$(n);a.push(new si(e,n))}return this.size=this.size+1|0,null},xi.prototype.remove_11rb$=function(e){var n,i=this.equality.getHashCode_s8jyv4$(e);if(null==(n=this.getChainOrEntryOrNull_0(i)))return null;var o=n;if(!t.isArray(o)){var r=o;return this.equality.equals_oaftn8$(r.key,e)?(delete this.backingMap_0[i],this.size=this.size-1|0,r.value):null}for(var a=o,s=0;s!==a.length;++s){var c=a[s];if(this.equality.equals_oaftn8$(e,c.key))return 1===a.length?(a.length=0,delete this.backingMap_0[i]):a.splice(s,1),this.size=this.size-1|0,c.value}return null},xi.prototype.clear=function(){this.backingMap_0=this.createJsMap(),this.size=0},xi.prototype.contains_11rb$=function(t){return null!=this.getEntry_0(t)},xi.prototype.get_11rb$=function(t){var e;return null!=(e=this.getEntry_0(t))?e.value:null},xi.prototype.getEntry_0=function(e){var n;if(null==(n=this.getChainOrEntryOrNull_0(this.equality.getHashCode_s8jyv4$(e))))return null;var i=n;if(t.isArray(i)){var o=i;return this.findEntryInChain_0(o,e)}var r=i;return this.equality.equals_oaftn8$(r.key,e)?r:null},xi.prototype.findEntryInChain_0=function(t,e){var n;t:do{var i;for(i=0;i!==t.length;++i){var o=t[i];if(this.equality.equals_oaftn8$(o.key,e)){n=o;break t}}n=null}while(0);return n},wi.prototype.computeNext_0=function(){if(null!=this.chainOrEntry&&this.isChain){var e=this.chainOrEntry.length;if(this.itemIndex=this.itemIndex+1|0,this.itemIndex=0&&(this.buffer=this.buffer+e.substring(0,n),this.flush(),e=e.substring(n+1|0)),this.buffer=this.buffer+e},eo.prototype.flush=function(){console.log(this.buffer),this.buffer=""},eo.$metadata$={kind:e,simpleName:"BufferedOutputToConsoleLog",interfaces:[to]},Object.defineProperty(no.prototype,"context",{configurable:!0,get:function(){return this.delegate_0.context}}),no.prototype.resumeWith_tl1gpc$=function(t){var e=this.result_0;if(e===Xc())this.result_0=t.value;else{if(e!==jc())throw dn("Already resumed");this.result_0=Bc(),this.delegate_0.resumeWith_tl1gpc$(t)}},no.prototype.getOrThrow=function(){var e;if(this.result_0===Xc())return this.result_0=jc(),jc();var n=this.result_0;if(n===Bc())e=jc();else{if(t.isType(n,gu))throw n.exception;e=n}return e},no.$metadata$={kind:e,simpleName:"SafeContinuation",interfaces:[yc]},io.$metadata$={kind:e,simpleName:"CancellationException",interfaces:[un]},Object.defineProperty(oo.prototype,"context",{configurable:!0,get:function(){return this.closure$context}}),oo.prototype.resumeWith_tl1gpc$=function(t){this.closure$resumeWith(t)},oo.$metadata$={kind:e,interfaces:[yc]},so.$metadata$={kind:R,simpleName:"Serializable",interfaces:[]},To.$metadata$={kind:R,simpleName:"KCallable",interfaces:[]},$o.$metadata$={kind:R,simpleName:"KClass",interfaces:[Vl]},Object.defineProperty(No.prototype,"jClass",{get:function(){return this.jClass_1ppatx$_0}}),Object.defineProperty(No.prototype,"qualifiedName",{configurable:!0,get:function(){throw new Su}}),No.prototype.equals=function(e){return t.isType(e,No)&&r(this.jClass,e.jClass)},No.prototype.hashCode=function(){var t,e;return null!=(e=null!=(t=this.simpleName)?D(t):null)?e:0},No.prototype.toString=function(){return"class "+$(this.simpleName)},No.$metadata$={kind:e,simpleName:"KClassImpl",interfaces:[$o]},Object.defineProperty(go.prototype,"simpleName",{configurable:!0,get:function(){return this.simpleName_m7mxi0$_0}}),go.prototype.isInstance_s8jyv4$=function(e){var n=this.jClass;return t.isType(e,n)},go.$metadata$={kind:e,simpleName:"SimpleKClassImpl",interfaces:[No]},Ro.prototype.equals=function(e){return!!t.isType(e,Ro)&&No.prototype.equals.call(this,e)&&r(this.givenSimpleName_0,e.givenSimpleName_0)},Object.defineProperty(Ro.prototype,"simpleName",{configurable:!0,get:function(){return this.givenSimpleName_0}}),Ro.prototype.isInstance_s8jyv4$=function(t){return this.isInstanceFunction_0(t)},Ro.$metadata$={kind:e,simpleName:"PrimitiveKClassImpl",interfaces:[No]},Object.defineProperty(Co.prototype,"simpleName",{configurable:!0,get:function(){return this.simpleName_lnzy73$_0}}),Co.prototype.isInstance_s8jyv4$=function(t){return!1},Object.defineProperty(Co.prototype,"jClass",{configurable:!0,get:function(){throw mn("There's no native JS class for Nothing type")}}),Co.prototype.equals=function(t){return t===this},Co.prototype.hashCode=function(){return 0},Co.$metadata$={kind:C,simpleName:"NothingKClassImpl",interfaces:[No]};var So=null;function Io(){return null===So&&new Co,So}function Lo(){}function bo(){}function vo(){}function Oo(){}function Uo(){}function Do(){}function Ao(){}function ko(){}function Po(t,e,n){this.classifier_50lv52$_0=t,this.arguments_lev63t$_0=e,this.isMarkedNullable_748rxs$_0=n}function xo(){rr=this,this.anyClass=new Ro(Object,"Any",wo),this.numberClass=new Ro(Number,"Number",zo),this.nothingClass=Io(),this.booleanClass=new Ro(Boolean,"Boolean",Go),this.byteClass=new Ro(Number,"Byte",jo),this.shortClass=new Ro(Number,"Short",Fo),this.intClass=new Ro(Number,"Int",Mo),this.floatClass=new Ro(Number,"Float",Wo),this.doubleClass=new Ro(Number,"Double",Xo),this.arrayClass=new Ro(Array,"Array",Bo),this.stringClass=new Ro(String,"String",qo),this.throwableClass=new Ro(Error,"Throwable",Ho),this.booleanArrayClass=new Ro(Array,"BooleanArray",Vo),this.charArrayClass=new Ro(Uint16Array,"CharArray",Ko),this.byteArrayClass=new Ro(Int8Array,"ByteArray",Jo),this.shortArrayClass=new Ro(Int16Array,"ShortArray",Yo),this.intArrayClass=new Ro(Int32Array,"IntArray",Qo),this.longArrayClass=new Ro(Array,"LongArray",Zo),this.floatArrayClass=new Ro(Float32Array,"FloatArray",tr),this.doubleArrayClass=new Ro(Float64Array,"DoubleArray",er)}function wo(e){return t.isType(e,b)}function zo(e){return t.isNumber(e)}function Go(t){return"boolean"==typeof t}function jo(t){return"number"==typeof t}function Fo(t){return"number"==typeof t}function Mo(t){return"number"==typeof t}function Wo(t){return"number"==typeof t}function Xo(t){return"number"==typeof t}function Bo(e){return t.isArray(e)}function qo(t){return"string"==typeof t}function Ho(e){return t.isType(e,v)}function Vo(e){return t.isBooleanArray(e)}function Ko(e){return t.isCharArray(e)}function Jo(e){return t.isByteArray(e)}function Yo(e){return t.isShortArray(e)}function Qo(e){return t.isIntArray(e)}function Zo(e){return t.isLongArray(e)}function tr(e){return t.isFloatArray(e)}function er(e){return t.isDoubleArray(e)}Object.defineProperty(Lo.prototype,"simpleName",{configurable:!0,get:function(){throw dn("Unknown simpleName for ErrorKClass".toString())}}),Object.defineProperty(Lo.prototype,"qualifiedName",{configurable:!0,get:function(){throw dn("Unknown qualifiedName for ErrorKClass".toString())}}),Lo.prototype.isInstance_s8jyv4$=function(t){throw dn("Can's check isInstance on ErrorKClass".toString())},Lo.prototype.equals=function(t){return t===this},Lo.prototype.hashCode=function(){return 0},Lo.$metadata$={kind:e,simpleName:"ErrorKClass",interfaces:[$o]},bo.$metadata$={kind:R,simpleName:"KProperty",interfaces:[To]},vo.$metadata$={kind:R,simpleName:"KMutableProperty",interfaces:[bo]},Oo.$metadata$={kind:R,simpleName:"KProperty0",interfaces:[bo]},Uo.$metadata$={kind:R,simpleName:"KMutableProperty0",interfaces:[vo,Oo]},Do.$metadata$={kind:R,simpleName:"KProperty1",interfaces:[bo]},Ao.$metadata$={kind:R,simpleName:"KMutableProperty1",interfaces:[vo,Do]},ko.$metadata$={kind:R,simpleName:"KType",interfaces:[]},Object.defineProperty(Po.prototype,"classifier",{get:function(){return this.classifier_50lv52$_0}}),Object.defineProperty(Po.prototype,"arguments",{get:function(){return this.arguments_lev63t$_0}}),Object.defineProperty(Po.prototype,"isMarkedNullable",{get:function(){return this.isMarkedNullable_748rxs$_0}}),Po.prototype.equals=function(e){return t.isType(e,Po)&&r(this.classifier,e.classifier)&&r(this.arguments,e.arguments)&&this.isMarkedNullable===e.isMarkedNullable},Po.prototype.hashCode=function(){return(31*((31*D(this.classifier)|0)+D(this.arguments)|0)|0)+D(this.isMarkedNullable)|0},Po.prototype.toString=function(){var e,n=t.isType(e=this.classifier,$o)?e:null;return(null==n?this.classifier.toString():null!=n.simpleName?n.simpleName:"(non-denotable type)")+(this.arguments.isEmpty()?"":Gt(this.arguments,", ","<",">"))+(this.isMarkedNullable?"?":"")},Po.$metadata$={kind:e,simpleName:"KTypeImpl",interfaces:[ko]},xo.prototype.functionClass=function(t){var e,n,i;if(null!=(e=nr[t]))n=e;else{var o=new Ro(Function,"Function"+t,(i=t,function(t){return"function"==typeof t&&t.length===i}));nr[t]=o,n=o}return n},xo.$metadata$={kind:C,simpleName:"PrimitiveClasses",interfaces:[]};var nr,ir,or,rr=null;function ar(){return null===rr&&new xo,rr}function sr(t){return Array.isArray(t)?cr(t):lr(t)}function cr(t){switch(t.length){case 1:return lr(t[0]);case 0:return Io();default:return new Lo}}function lr(t){var e;if(t===String)return ar().stringClass;var n=t.$metadata$;if(null!=n)if(null==n.$kClass$){var i=new go(t);n.$kClass$=i,e=i}else e=n.$kClass$;else e=new go(t);return e}function pr(t){t.lastIndex=0}function ur(){}function dr(t){rn(t,this),this.name="CharacterCodingException"}function hr(t){this.string_0=void 0!==t?t:""}function Er(t,e){return _r(e=e||Object.create(hr.prototype)),e}function _r(t){return t=t||Object.create(hr.prototype),hr.call(t,""),t}function mr(t){var e=String.fromCharCode(t).toUpperCase();return e.length>1?t:e.charCodeAt(0)}function fr(t){return new _l(P.MIN_HIGH_SURROGATE,P.MAX_HIGH_SURROGATE).contains_mef7kx$(t)}function yr(t){return new _l(P.MIN_LOW_SURROGATE,P.MAX_LOW_SURROGATE).contains_mef7kx$(t)}function Tr(t){return Wn(t)}function $r(t){var e;return null!=(e=tp(t))?e:op(t)}function Nr(t){var e;return null!=(e=np(t))?e:op(t)}function gr(t){var e=+t;return(Eo(e)&&!Rr(t)||0===e&&ca(t))&&op(t),e}function Rr(t){switch(t.toLowerCase()){case"nan":case"+nan":case"-nan":return!0;default:return!1}}function Cr(t){if(!(2<=t&&t<=36))throw pn("radix "+t+" was not in valid range 2..36");return t}function Sr(t,e){var n;return(n=t>=48&&t<=57?t-48:t>=65&&t<=90?t-65+10|0:t>=97&&t<=122?t-97+10|0:t<128?-1:t>=65313&&t<=65338?t-65313+10|0:t>=65345&&t<=65370?t-65345+10|0:Mn(t))>=e?-1:n}function Ir(t,e,n){S.call(this),this.value=n,this.name$=t,this.ordinal$=e}function Lr(){Lr=function(){},ir=new Ir("IGNORE_CASE",0,"i"),or=new Ir("MULTILINE",1,"m")}function br(){return Lr(),ir}function vr(){return Lr(),or}function Or(t){return t.value}function Ur(t,e){return Gt(t,"",e,void 0,void 0,void 0,Or)}function Dr(t){this.value=t}function Ar(e,n){var i,o;if(null==(o=t.isType(i=e,kp)?i:null))throw mn("Retrieving groups by name is not supported on this platform.");return o.get_61zpoe$(n)}function kr(t,e){Vr(),this.pattern=t,this.options=xt(e),this.nativePattern_0=new RegExp(t,Ur(e,"gu")),this.nativeStickyPattern_0=null,this.nativeMatchesEntirePattern_0=null}function Pr(t){return t.next()}function xr(t,e,n,i,o,r){He.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$input=t,this.local$this$Regex=e,this.local$closure$limit=n,this.local$match=void 0,this.local$nextStart=void 0,this.local$splitCount=void 0,this.local$foundMatch=void 0,this.local$$receiver=i}function wr(){Hr=this,this.patternEscape_0=new RegExp("[\\\\^$*+?.()|[\\]{}]","g"),this.replacementEscape_0=new RegExp("[\\\\$]","g"),this.nativeReplacementEscape_0=new RegExp("\\$","g")}ur.$metadata$={kind:R,simpleName:"Appendable",interfaces:[]},dr.$metadata$={kind:e,simpleName:"CharacterCodingException",interfaces:[on]},Object.defineProperty(hr.prototype,"length",{configurable:!0,get:function(){return this.string_0.length}}),hr.prototype.charCodeAt=function(t){var e=this.string_0;if(!(t>=0&&t<=up(e)))throw new hn("index: "+t+", length: "+this.length+"}");return e.charCodeAt(t)},hr.prototype.subSequence_vux9f0$=function(t,e){return this.string_0.substring(t,e)},hr.prototype.append_s8itvh$=function(t){return this.string_0+=String.fromCharCode(t),this},hr.prototype.append_gw00v9$=function(t){return this.string_0+=$(t),this},hr.prototype.append_ezbsdh$=function(t,e,n){return this.appendRange_3peag4$(null!=t?t:"null",e,n)},hr.prototype.reverse=function(){for(var t,e,n="",i=this.string_0.length-1|0;i>=0;){var o=this.string_0.charCodeAt((i=(t=i)-1|0,t));if(yr(o)&&i>=0){var r=this.string_0.charCodeAt((i=(e=i)-1|0,e));n=fr(r)?n+String.fromCharCode(a(r))+String.fromCharCode(a(o)):n+String.fromCharCode(a(o))+String.fromCharCode(a(r))}else n+=String.fromCharCode(o)}return this.string_0=n,this},hr.prototype.append_s8jyv4$=function(t){return this.string_0+=$(t),this},hr.prototype.append_6taknv$=function(t){return this.string_0+=t,this},hr.prototype.append_4hbowm$=function(t){return this.string_0+=ia(t),this},hr.prototype.append_61zpoe$=function(t){return this.append_pdl1vj$(t)},hr.prototype.append_pdl1vj$=function(t){return this.string_0=this.string_0+(null!=t?t:"null"),this},hr.prototype.capacity=function(){return this.length},hr.prototype.ensureCapacity_za3lpa$=function(t){},hr.prototype.indexOf_61zpoe$=function(t){return this.string_0.indexOf(t)},hr.prototype.indexOf_bm4lxs$=function(t,e){return this.string_0.indexOf(t,e)},hr.prototype.lastIndexOf_61zpoe$=function(t){return this.string_0.lastIndexOf(t)},hr.prototype.lastIndexOf_bm4lxs$=function(t,e){return 0===t.length&&e<0?-1:this.string_0.lastIndexOf(t,e)},hr.prototype.insert_fzusl$=function(t,e){return wa().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+$(e)+this.string_0.substring(t),this},hr.prototype.insert_6t1mh3$=function(t,e){return wa().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+String.fromCharCode(a(e))+this.string_0.substring(t),this},hr.prototype.insert_7u455s$=function(t,e){return wa().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+ia(e)+this.string_0.substring(t),this},hr.prototype.insert_1u9bqd$=function(t,e){return wa().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+$(e)+this.string_0.substring(t),this},hr.prototype.insert_6t2rgq$=function(t,e){return wa().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+$(e)+this.string_0.substring(t),this},hr.prototype.insert_19mbxw$=function(t,e){return this.insert_vqvrqt$(t,e)},hr.prototype.insert_vqvrqt$=function(t,e){wa().checkPositionIndex_6xvm5r$(t,this.length);var n=null!=e?e:"null";return this.string_0=this.string_0.substring(0,t)+n+this.string_0.substring(t),this},hr.prototype.setLength_za3lpa$=function(t){if(t<0)throw pn("Negative new length: "+t+".");if(t<=this.length)this.string_0=this.string_0.substring(0,t);else for(var e=this.length;en)throw new hn("startIndex: "+t+", length: "+n);if(t>e)throw pn("startIndex("+t+") > endIndex("+e+")")},hr.prototype.deleteAt_za3lpa$=function(t){return wa().checkElementIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+this.string_0.substring(t+1|0),this},hr.prototype.deleteRange_vux9f0$=function(t,e){return this.checkReplaceRange_0(t,e,this.length),this.string_0=this.string_0.substring(0,t)+this.string_0.substring(e),this},hr.prototype.toCharArray_pqkatk$=function(t,e,n,i){var o;void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=this.length),wa().checkBoundsIndexes_cub51b$(n,i,this.length),wa().checkBoundsIndexes_cub51b$(e,e+i-n|0,t.length);for(var r=e,a=n;at.length)throw new hn("index out of bounds: "+e+", input length: "+t.length);var n=this.initStickyPattern_0();return n.lastIndex=e,n.test(t.toString())},kr.prototype.find_905azu$=function(t,e){if(void 0===e&&(e=0),e<0||e>t.length)throw new hn("Start index out of bounds: "+e+", input length: "+t.length);return Zr(this.nativePattern_0,t.toString(),e,this.nativePattern_0)},kr.prototype.findAll_905azu$=function(t,e){if(void 0===e&&(e=0),e<0||e>t.length)throw new hn("Start index out of bounds: "+e+", input length: "+t.length);return uc((n=t,i=e,o=this,function(){return o.find_905azu$(n,i)}),Pr);var n,i,o},kr.prototype.matchEntire_6bul2c$=function(t){return Zr(this.initMatchesEntirePattern_0(),t.toString(),0,this.nativePattern_0)},kr.prototype.matchAt_905azu$=function(t,e){if(e<0||e>t.length)throw new hn("index out of bounds: "+e+", input length: "+t.length);return Zr(this.initStickyPattern_0(),t.toString(),e,this.nativePattern_0)},kr.prototype.replace_x2uqeu$=function(t,e){return gp(e,92)||gp(e,36)?this.replace_20wsma$(t,(n=e,function(t){return ta(t,n)})):t.toString().replace(this.nativePattern_0,e);var n},kr.prototype.replace_20wsma$=function(t,e){var n=this.find_905azu$(t);if(null==n)return t.toString();var i=0,o=t.length,r=Er();do{var a=L(n);r.append_ezbsdh$(t,i,a.range.start),r.append_gw00v9$(e(a)),i=a.range.endInclusive+1|0,n=a.next()}while(i=h.size)throw new hn("Group with index "+_+" does not exist");l.append_pdl1vj$(null!=(s=null!=(a=h.get_za3lpa$(_))?a.value:null)?s:""),c=E}}else l.append_s8itvh$(p)}return l.toString()}function ea(t,e){for(var n=e;n=i)return pa(0,n,o);var r=0|t.charCodeAt(n);return 56320<=r&&r<=57343?65536+((1023&e)<<10)|1023&r:pa(0,n,o)}function da(t,e,n,i,o){if(0==(30&e)||n>=i)return pa(0,n,o);var r=t[n];return 128!=(192&r)?pa(0,n,o):e<<6^r^3968}function ha(t,e,n,i,o){if(n>=i)return pa(0,n,o);var r=t[n];if(0==(15&e)){if(160!=(224&r))return pa(0,n,o)}else if(13==(15&e)){if(128!=(224&r))return pa(0,n,o)}else if(128!=(192&r))return pa(0,n,o);if((n+1|0)===i)return pa(1,n,o);var a=t[n+1|0];return 128!=(192&a)?pa(1,n,o):e<<12^r<<6^a^-123008}function Ea(t,e,n,i,o){n>=i&&pa(0,n,o);var r=t[n];if(0==(15&e)){if((240&r)<=128)return pa(0,n,o)}else if(4==(15&e)){if(128!=(240&r))return pa(0,n,o)}else{if((15&e)>4)return pa(0,n,o);if(128!=(192&r))return pa(0,n,o)}if((n+1|0)===i)return pa(1,n,o);var a=t[n+1|0];if(128!=(192&a))return pa(1,n,o);if((n+2|0)===i)return pa(2,n,o);var s=t[n+2|0];return 128!=(192&s)?pa(2,n,o):e<<18^r<<12^a<<6^s^3678080}function _a(t,e,n,i){var o,r,a,s,c,l,p,u,d,h,_,m,f,y;if(!(e>=0&&n<=t.length&&e<=n))throw pn("Failed requirement.".toString());for(var T=new Int8Array(3*(n-e|0)|0),$=0,N=e;N>6|192),T[(s=$,$=s+1|0,s)]=E(63&g|128);else if(g<55296||g>=57344)T[(c=$,$=c+1|0,c)]=E(g>>12|224),T[(l=$,$=l+1|0,l)]=E(g>>6&63|128),T[(p=$,$=p+1|0,p)]=E(63&g|128);else{var R=ua(t,g,N,n,i);R<=0?(T[(u=$,$=u+1|0,u)]=zr[0],T[(d=$,$=d+1|0,d)]=zr[1],T[(h=$,$=h+1|0,h)]=zr[2]):(T[(_=$,$=_+1|0,_)]=E(R>>18|240),T[(m=$,$=m+1|0,m)]=E(R>>12&63|128),T[(f=$,$=f+1|0,f)]=E(R>>6&63|128),T[(y=$,$=y+1|0,y)]=E(63&R|128),N=N+1|0)}}return T.length===$?T:An(T,$)}function ma(t,e,n,i){var o;if(!(e>=0&&n<=t.length&&e<=n))throw pn("Failed requirement.".toString());for(var r=e,a=_r();r=0)a.append_s8itvh$(d(s));else if(s>>5==-2){var c=da(t,s,r,n,i);c<=0?(a.append_s8itvh$(Gr),r=r+(0|-c)|0):(a.append_s8itvh$(d(c)),r=r+1|0)}else if(s>>4==-2){var l=ha(t,s,r,n,i);l<=0?(a.append_s8itvh$(Gr),r=r+(0|-l)|0):(a.append_s8itvh$(d(l)),r=r+2|0)}else if(s>>3==-2){var p=Ea(t,s,r,n,i);if(p<=0)a.append_s8itvh$(Gr),r=r+(0|-p)|0;else{var u=p-65536>>10|55296,h=1023&p|56320;a.append_s8itvh$(d(u)),a.append_s8itvh$(d(h)),r=r+3|0}}else pa(0,r,i),a.append_s8itvh$(Gr)}return a.toString()}function fa(t,e){var n,i;if(0===e)n=t;else{var o=u.pow(10,e);n=Math.round(u.abs(t)*o)/o*x(t)}var r=n;if(u.abs(r)<1e21)i=r.toFixed(e);else{var a=u.abs(r),s=a.toPrecision(u.ceil(w(a))+e);i=r<0?"-"+s:s}return i}function ya(t,e,n){S.call(this),this.scale_8be2vx$=n,this.name$=t,this.ordinal$=e}function Ta(){Ta=function(){},jr=new ya("NANOSECONDS",0,1),Fr=new ya("MICROSECONDS",1,1e3),Mr=new ya("MILLISECONDS",2,1e6),Wr=new ya("SECONDS",3,1e9),Xr=new ya("MINUTES",4,6e10),Br=new ya("HOURS",5,36e11),qr=new ya("DAYS",6,864e11)}function $a(){return Ta(),jr}function Na(){return Ta(),Fr}function ga(){return Ta(),Mr}function Ra(){return Ta(),Wr}function Ca(){return Ta(),Xr}function Sa(){return Ta(),Br}function Ia(){return Ta(),qr}function La(e,n,i){var o=t.compareTo(n.scale_8be2vx$,i.scale_8be2vx$);return o>0?e*(n.scale_8be2vx$/i.scale_8be2vx$):o<0?e/(i.scale_8be2vx$/n.scale_8be2vx$):e}function ba(e,n,i){var o=t.compareTo(n.scale_8be2vx$,i.scale_8be2vx$);return o>0?e.multiply(t.Long.fromNumber(n.scale_8be2vx$/i.scale_8be2vx$)):o<0?e.div(t.Long.fromNumber(i.scale_8be2vx$/n.scale_8be2vx$)):e}function va(e,n,i){var o,a=t.compareTo(n.scale_8be2vx$,i.scale_8be2vx$);if(a>0){var s=t.Long.fromNumber(n.scale_8be2vx$/i.scale_8be2vx$),c=e.multiply(s);o=r(c.div(s),e)?c:e.toNumber()>0?T:y}else o=a<0?e.div(t.Long.fromNumber(i.scale_8be2vx$/n.scale_8be2vx$)):e;return o}function Oa(){}function Ua(){wa(),Oa.call(this)}function Da(t,e,n){Ua.call(this),this.list_0=t,this.fromIndex_0=e,this._size_0=0,wa().checkRangeIndexes_cub51b$(this.fromIndex_0,n,this.list_0.size),this._size_0=n-this.fromIndex_0|0}function Aa(t){this.$outer=t,this.index_0=0}function ka(t,e){this.$outer=t,Aa.call(this,this.$outer),wa().checkPositionIndex_6xvm5r$(e,this.$outer.size),this.index_0=e}function Pa(){xa=this}kr.$metadata$={kind:e,simpleName:"Regex",interfaces:[]},Object.defineProperty(Jr.prototype,"range",{configurable:!0,get:function(){return this.range_co6b9w$_0}}),Object.defineProperty(Jr.prototype,"value",{configurable:!0,get:function(){return L(this.closure$match[0])}}),Object.defineProperty(Jr.prototype,"groups",{configurable:!0,get:function(){return this.groups_qcaztb$_0}}),Jr.prototype.hasOwnPrototypeProperty_0=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Object.defineProperty(Yr.prototype,"size",{configurable:!0,get:function(){return this.closure$match.length}}),Yr.prototype.get_za3lpa$=function(t){var e;return null!=(e=this.closure$match[t])?e:""},Yr.$metadata$={kind:e,interfaces:[Ua]},Object.defineProperty(Jr.prototype,"groupValues",{configurable:!0,get:function(){return null==this.groupValues__0&&(this.groupValues__0=new Yr(this.closure$match)),L(this.groupValues__0)}}),Jr.prototype.next=function(){return Zr(this.closure$nextPattern,this.closure$input,this.closure$range.isEmpty()?this.advanceToNextCharacter_0(this.closure$range.start):this.closure$range.endInclusive+1|0,this.closure$nextPattern)},Jr.prototype.advanceToNextCharacter_0=function(t){if(t0},ka.prototype.nextIndex=function(){return this.index_0},ka.prototype.previous=function(){if(!this.hasPrevious())throw Rn();return this.$outer.get_za3lpa$((this.index_0=this.index_0-1|0,this.index_0))},ka.prototype.previousIndex=function(){return this.index_0-1|0},ka.$metadata$={kind:e,simpleName:"ListIteratorImpl",interfaces:[Ce,Aa]},Pa.prototype.checkElementIndex_6xvm5r$=function(t,e){if(t<0||t>=e)throw new hn("index: "+t+", size: "+e)},Pa.prototype.checkPositionIndex_6xvm5r$=function(t,e){if(t<0||t>e)throw new hn("index: "+t+", size: "+e)},Pa.prototype.checkRangeIndexes_cub51b$=function(t,e,n){if(t<0||e>n)throw new hn("fromIndex: "+t+", toIndex: "+e+", size: "+n);if(t>e)throw pn("fromIndex: "+t+" > toIndex: "+e)},Pa.prototype.checkBoundsIndexes_cub51b$=function(t,e,n){if(t<0||e>n)throw new hn("startIndex: "+t+", endIndex: "+e+", size: "+n);if(t>e)throw pn("startIndex: "+t+" > endIndex: "+e)},Pa.prototype.orderedHashCode_nykoif$=function(t){var e,n,i=1;for(e=t.iterator();e.hasNext();){var o=e.next();i=(31*i|0)+(null!=(n=null!=o?D(o):null)?n:0)|0}return i},Pa.prototype.orderedEquals_e92ka7$=function(t,e){var n;if(t.size!==e.size)return!1;var i=e.iterator();for(n=t.iterator();n.hasNext();){var o=n.next(),a=i.next();if(!r(o,a))return!1}return!0},Pa.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var xa=null;function wa(){return null===xa&&new Pa,xa}function za(){Ba(),this._keys_up5z3z$_0=null,this._values_6nw1f1$_0=null}function Ga(t){this.this$AbstractMap=t,qa.call(this)}function ja(t){this.closure$entryIterator=t}function Fa(t){this.this$AbstractMap=t,Oa.call(this)}function Ma(t){this.closure$entryIterator=t}function Wa(){Xa=this}Ua.$metadata$={kind:e,simpleName:"AbstractList",interfaces:[Ee,Oa]},za.prototype.containsKey_11rb$=function(t){return null!=this.implFindEntry_8k1i24$_0(t)},za.prototype.containsValue_11rc$=function(e){var n,i=this.entries;t:do{var o;if(t.isType(i,de)&&i.isEmpty()){n=!1;break t}for(o=i.iterator();o.hasNext();){var a=o.next();if(r(a.value,e)){n=!0;break t}}n=!1}while(0);return n},za.prototype.containsEntry_8hxqw4$=function(e){if(!t.isType(e,Te))return!1;var n=e.key,i=e.value,o=(t.isType(this,ye)?this:N()).get_11rb$(n);if(!r(i,o))return!1;var a=null==o;return a&&(a=!(t.isType(this,ye)?this:N()).containsKey_11rb$(n)),!a},za.prototype.equals=function(e){if(e===this)return!0;if(!t.isType(e,ye))return!1;if(this.size!==e.size)return!1;var n,i=e.entries;t:do{var o;if(t.isType(i,de)&&i.isEmpty()){n=!0;break t}for(o=i.iterator();o.hasNext();){var r=o.next();if(!this.containsEntry_8hxqw4$(r)){n=!1;break t}}n=!0}while(0);return n},za.prototype.get_11rb$=function(t){var e;return null!=(e=this.implFindEntry_8k1i24$_0(t))?e.value:null},za.prototype.hashCode=function(){return D(this.entries)},za.prototype.isEmpty=function(){return 0===this.size},Object.defineProperty(za.prototype,"size",{configurable:!0,get:function(){return this.entries.size}}),Ga.prototype.contains_11rb$=function(t){return this.this$AbstractMap.containsKey_11rb$(t)},ja.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},ja.prototype.next=function(){return this.closure$entryIterator.next().key},ja.$metadata$={kind:e,interfaces:[ge]},Ga.prototype.iterator=function(){return new ja(this.this$AbstractMap.entries.iterator())},Object.defineProperty(Ga.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMap.size}}),Ga.$metadata$={kind:e,interfaces:[qa]},Object.defineProperty(za.prototype,"keys",{configurable:!0,get:function(){return null==this._keys_up5z3z$_0&&(this._keys_up5z3z$_0=new Ga(this)),L(this._keys_up5z3z$_0)}}),za.prototype.toString=function(){return Gt(this.entries,", ","{","}",void 0,void 0,(t=this,function(e){return t.toString_55he67$_0(e)}));var t},za.prototype.toString_55he67$_0=function(t){return this.toString_kthv8s$_0(t.key)+"="+this.toString_kthv8s$_0(t.value)},za.prototype.toString_kthv8s$_0=function(t){return t===this?"(this Map)":$(t)},Fa.prototype.contains_11rb$=function(t){return this.this$AbstractMap.containsValue_11rc$(t)},Ma.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},Ma.prototype.next=function(){return this.closure$entryIterator.next().value},Ma.$metadata$={kind:e,interfaces:[ge]},Fa.prototype.iterator=function(){return new Ma(this.this$AbstractMap.entries.iterator())},Object.defineProperty(Fa.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMap.size}}),Fa.$metadata$={kind:e,interfaces:[Oa]},Object.defineProperty(za.prototype,"values",{configurable:!0,get:function(){return null==this._values_6nw1f1$_0&&(this._values_6nw1f1$_0=new Fa(this)),L(this._values_6nw1f1$_0)}}),za.prototype.implFindEntry_8k1i24$_0=function(t){var e,n=this.entries;t:do{var i;for(i=n.iterator();i.hasNext();){var o=i.next();if(r(o.key,t)){e=o;break t}}e=null}while(0);return e},Wa.prototype.entryHashCode_9fthdn$=function(t){var e,n,i,o;return(null!=(n=null!=(e=t.key)?D(e):null)?n:0)^(null!=(o=null!=(i=t.value)?D(i):null)?o:0)},Wa.prototype.entryToString_9fthdn$=function(t){return $(t.key)+"="+$(t.value)},Wa.prototype.entryEquals_js7fox$=function(e,n){return!!t.isType(n,Te)&&r(e.key,n.key)&&r(e.value,n.value)},Wa.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Xa=null;function Ba(){return null===Xa&&new Wa,Xa}function qa(){Ka(),Oa.call(this)}function Ha(){Va=this}za.$metadata$={kind:e,simpleName:"AbstractMap",interfaces:[ye]},qa.prototype.equals=function(e){return e===this||!!t.isType(e,me)&&Ka().setEquals_y8f7en$(this,e)},qa.prototype.hashCode=function(){return Ka().unorderedHashCode_nykoif$(this)},Ha.prototype.unorderedHashCode_nykoif$=function(t){var e,n=0;for(e=t.iterator();e.hasNext();){var i,o=e.next();n=n+(null!=(i=null!=o?D(o):null)?i:0)|0}return n},Ha.prototype.setEquals_y8f7en$=function(t,e){return t.size===e.size&&t.containsAll_brywnq$(e)},Ha.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Va=null;function Ka(){return null===Va&&new Ha,Va}function Ja(){Ya=this}qa.$metadata$={kind:e,simpleName:"AbstractSet",interfaces:[me,Oa]},Ja.prototype.hasNext=function(){return!1},Ja.prototype.hasPrevious=function(){return!1},Ja.prototype.nextIndex=function(){return 0},Ja.prototype.previousIndex=function(){return-1},Ja.prototype.next=function(){throw Rn()},Ja.prototype.previous=function(){throw Rn()},Ja.$metadata$={kind:C,simpleName:"EmptyIterator",interfaces:[Ce]};var Ya=null;function Qa(){return null===Ya&&new Ja,Ya}function Za(){ts=this,this.serialVersionUID_0=z}Za.prototype.equals=function(e){return t.isType(e,Ee)&&e.isEmpty()},Za.prototype.hashCode=function(){return 1},Za.prototype.toString=function(){return"[]"},Object.defineProperty(Za.prototype,"size",{configurable:!0,get:function(){return 0}}),Za.prototype.isEmpty=function(){return!0},Za.prototype.contains_11rb$=function(t){return!1},Za.prototype.containsAll_brywnq$=function(t){return t.isEmpty()},Za.prototype.get_za3lpa$=function(t){throw new hn("Empty list doesn't contain element at index "+t+".")},Za.prototype.indexOf_11rb$=function(t){return-1},Za.prototype.lastIndexOf_11rb$=function(t){return-1},Za.prototype.iterator=function(){return Qa()},Za.prototype.listIterator=function(){return Qa()},Za.prototype.listIterator_za3lpa$=function(t){if(0!==t)throw new hn("Index: "+t);return Qa()},Za.prototype.subList_vux9f0$=function(t,e){if(0===t&&0===e)return this;throw new hn("fromIndex: "+t+", toIndex: "+e)},Za.prototype.readResolve_0=function(){return es()},Za.$metadata$={kind:C,simpleName:"EmptyList",interfaces:[Yi,so,Ee]};var ts=null;function es(){return null===ts&&new Za,ts}function ns(t){return new is(t,!1)}function is(t,e){this.values=t,this.isVarargs=e}function os(){return es()}function rs(t){return 0===t.length?_i():fi(new is(t,!0))}function as(t){return 0===t.length?_i():fi(new is(t,!0))}function ss(t){return new Tl(0,t.size-1|0)}function cs(t){return t.size-1|0}function ls(t){switch(t.size){case 0:return os();case 1:return Vn(t.get_za3lpa$(0));default:return t}}function ps(){throw new Cn("Index overflow has happened.")}function us(t,e){this.index=t,this.value=e}function ds(t){this.iteratorFactory_0=t}function hs(e){return t.isType(e,de)?e.size:null}function Es(e,n){return t.isType(e,de)?e.size:n}function _s(t){this.iterator_0=t,this.index_0=0}function ms(e,n){if(t.isType(e,fs))return e.getOrImplicitDefault_11rb$(n);var i,o=e.get_11rb$(n);if(null==o&&!e.containsKey_11rb$(n))throw new gn("Key "+n+" is missing in the map.");return null==(i=o)||t.isType(i,b)?i:N()}function fs(){}function ys(){}function Ts(t,e){this.map_a09uzx$_0=t,this.default_0=e}function $s(){Ns=this,this.serialVersionUID_0=G}Object.defineProperty(is.prototype,"size",{configurable:!0,get:function(){return this.values.length}}),is.prototype.isEmpty=function(){return 0===this.values.length},is.prototype.contains_11rb$=function(t){return et(this.values,t)},is.prototype.containsAll_brywnq$=function(e){var n;t:do{var i;if(t.isType(e,de)&&e.isEmpty()){n=!0;break t}for(i=e.iterator();i.hasNext();){var o=i.next();if(!this.contains_11rb$(o)){n=!1;break t}}n=!0}while(0);return n},is.prototype.iterator=function(){return t.arrayIterator(this.values)},is.prototype.toArray=function(){var t=this.values;return this.isVarargs?t:t.slice()},is.$metadata$={kind:e,simpleName:"ArrayAsCollection",interfaces:[de]},us.$metadata$={kind:e,simpleName:"IndexedValue",interfaces:[]},us.prototype.component1=function(){return this.index},us.prototype.component2=function(){return this.value},us.prototype.copy_wxm5ur$=function(t,e){return new us(void 0===t?this.index:t,void 0===e?this.value:e)},us.prototype.toString=function(){return"IndexedValue(index="+t.toString(this.index)+", value="+t.toString(this.value)+")"},us.prototype.hashCode=function(){var e=0;return e=31*(e=31*e+t.hashCode(this.index)|0)+t.hashCode(this.value)|0},us.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.index,e.index)&&t.equals(this.value,e.value)},ds.prototype.iterator=function(){return new _s(this.iteratorFactory_0())},ds.$metadata$={kind:e,simpleName:"IndexingIterable",interfaces:[pe]},_s.prototype.hasNext=function(){return this.iterator_0.hasNext()},_s.prototype.next=function(){var t;return new us(Zn((t=this.index_0,this.index_0=t+1|0,t)),this.iterator_0.next())},_s.$metadata$={kind:e,simpleName:"IndexingIterator",interfaces:[ge]},fs.$metadata$={kind:R,simpleName:"MapWithDefault",interfaces:[ye]},$s.prototype.equals=function(e){return t.isType(e,ye)&&e.isEmpty()},$s.prototype.hashCode=function(){return 0},$s.prototype.toString=function(){return"{}"},Object.defineProperty($s.prototype,"size",{configurable:!0,get:function(){return 0}}),$s.prototype.isEmpty=function(){return!0},$s.prototype.containsKey_11rb$=function(t){return!1},$s.prototype.containsValue_11rc$=function(t){return!1},$s.prototype.get_11rb$=function(t){return null},Object.defineProperty($s.prototype,"entries",{configurable:!0,get:function(){return Ec()}}),Object.defineProperty($s.prototype,"keys",{configurable:!0,get:function(){return Ec()}}),Object.defineProperty($s.prototype,"values",{configurable:!0,get:function(){return es()}}),$s.prototype.readResolve_0=function(){return gs()},$s.$metadata$={kind:C,simpleName:"EmptyMap",interfaces:[so,ye]};var Ns=null;function gs(){return null===Ns&&new $s,Ns}function Rs(){var e;return t.isType(e=gs(),ye)?e:ro()}function Cs(t){var e=Ui(t.length);return Ss(e,t),e}function Ss(t,e){var n;for(n=0;n!==e.length;++n){var i=e[n],o=i.component1(),r=i.component2();t.put_xwzc9p$(o,r)}}function Is(t,e){var n;for(n=e.iterator();n.hasNext();){var i=n.next(),o=i.component1(),r=i.component2();t.put_xwzc9p$(o,r)}}function Ls(t,e){return Is(e,t),e}function bs(t,e){return Ss(e,t),e}function vs(t){switch(t.size){case 0:return Rs();case 1:default:return t}}function Os(e,n){var i;if(t.isType(n,de))return e.addAll_brywnq$(n);var o=!1;for(i=n.iterator();i.hasNext();){var r=i.next();e.add_11rb$(r)&&(o=!0)}return o}function Us(t,e){return Ds(t,e,!0)}function Ds(t,e,n){for(var i={v:!1},o=t.iterator();o.hasNext();)e(o.next())===n&&(o.remove(),i.v=!0);return i.v}function As(e,n){return function(e,n,i){var o,r,a,s;if(!t.isType(e,Yi))return Ds(t.isType(o=e,ue)?o:ro(),n,i);var c=0;r=cs(e);for(var l=0;l<=r;l++){var p=e.get_za3lpa$(l);n(p)!==i&&(c!==l&&e.set_wxm5ur$(c,p),c=c+1|0)}if(c=s;u--)e.removeAt_za3lpa$(u);return!0}return!1}(e,n,!0)}function ks(){}function Ps(){}function xs(){}function ws(){}function zs(){}function Gs(){}function js(){}function Fs(){}function Ms(){}function Ws(t){this.closure$iterator=t}function Xs(t){return new Ws((e=t,function(){return Bs(e)}));var e}function Bs(t){var e=new Hs;return e.nextStep=Ze(t,e,e),e}function qs(){}function Hs(){qs.call(this),this.state_0=0,this.nextValue_0=null,this.nextIterator_0=null,this.nextStep=null}function Vs(){return Ys()}function Ks(){Js=this}ks.prototype.next=function(){return this.nextByte()},ks.$metadata$={kind:e,simpleName:"ByteIterator",interfaces:[ge]},Ps.prototype.next=function(){return a(this.nextChar())},Ps.$metadata$={kind:e,simpleName:"CharIterator",interfaces:[ge]},xs.prototype.next=function(){return this.nextShort()},xs.$metadata$={kind:e,simpleName:"ShortIterator",interfaces:[ge]},ws.prototype.next=function(){return this.nextInt()},ws.$metadata$={kind:e,simpleName:"IntIterator",interfaces:[ge]},zs.prototype.next=function(){return this.nextLong()},zs.$metadata$={kind:e,simpleName:"LongIterator",interfaces:[ge]},Gs.prototype.next=function(){return this.nextFloat()},Gs.$metadata$={kind:e,simpleName:"FloatIterator",interfaces:[ge]},js.prototype.next=function(){return this.nextDouble()},js.$metadata$={kind:e,simpleName:"DoubleIterator",interfaces:[ge]},Fs.prototype.next=function(){return this.nextBoolean()},Fs.$metadata$={kind:e,simpleName:"BooleanIterator",interfaces:[ge]},Ms.$metadata$={kind:R,simpleName:"Sequence",interfaces:[]},Ws.prototype.iterator=function(){return this.closure$iterator()},Ws.$metadata$={kind:e,interfaces:[Ms]},qs.prototype.yieldAll_p1ys8y$=function(e,n){if(!t.isType(e,de)||!e.isEmpty())return this.yieldAll_1phuh2$(e.iterator(),n)},qs.prototype.yieldAll_swo9gw$=function(t,e){return this.yieldAll_1phuh2$(t.iterator(),e)},qs.$metadata$={kind:e,simpleName:"SequenceScope",interfaces:[]},Hs.prototype.hasNext=function(){for(;;){switch(this.state_0){case 0:break;case 1:if(L(this.nextIterator_0).hasNext())return this.state_0=2,!0;this.nextIterator_0=null;break;case 4:return!1;case 3:case 2:return!0;default:throw this.exceptionalState_0()}this.state_0=5;var t=L(this.nextStep);this.nextStep=null,t.resumeWith_tl1gpc$(new yu(be()))}},Hs.prototype.next=function(){var e;switch(this.state_0){case 0:case 1:return this.nextNotReady_0();case 2:return this.state_0=1,L(this.nextIterator_0).next();case 3:this.state_0=0;var n=null==(e=this.nextValue_0)||t.isType(e,b)?e:ro();return this.nextValue_0=null,n;default:throw this.exceptionalState_0()}},Hs.prototype.nextNotReady_0=function(){if(this.hasNext())return this.next();throw Rn()},Hs.prototype.exceptionalState_0=function(){switch(this.state_0){case 4:return Rn();case 5:return dn("Iterator has failed.");default:return dn("Unexpected state of the iterator: "+this.state_0)}},Hs.prototype.yield_11rb$=function(t,e){return this.nextValue_0=t,this.state_0=3,(n=this,function(t){return n.nextStep=t,jc()})(e);var n},Hs.prototype.yieldAll_1phuh2$=function(t,e){var n;if(t.hasNext())return this.nextIterator_0=t,this.state_0=2,(n=this,function(t){return n.nextStep=t,jc()})(e)},Hs.prototype.resumeWith_tl1gpc$=function(e){var n;Cu(e),null==(n=e.value)||t.isType(n,b)||N(),this.state_0=4},Object.defineProperty(Hs.prototype,"context",{configurable:!0,get:function(){return Uc()}}),Hs.$metadata$={kind:e,simpleName:"SequenceBuilderIterator",interfaces:[yc,ge,qs]},Ks.prototype.iterator=function(){return Qa()},Ks.prototype.drop_za3lpa$=function(t){return Ys()},Ks.prototype.take_za3lpa$=function(t){return Ys()},Ks.$metadata$={kind:C,simpleName:"EmptySequence",interfaces:[oc,Ms]};var Js=null;function Ys(){return null===Js&&new Ks,Js}function Qs(t,e,n){void 0===e&&(e=!0),this.sequence_0=t,this.sendWhen_0=e,this.predicate_0=n}function Zs(t){this.this$FilteringSequence=t,this.iterator=t.sequence_0.iterator(),this.nextState=-1,this.nextItem=null}function tc(t,e){this.sequence_0=t,this.transformer_0=e}function ec(t){this.this$TransformingSequence=t,this.iterator=t.sequence_0.iterator()}function nc(t,e,n){this.sequence_0=t,this.transformer_0=e,this.iterator_0=n}function ic(t){this.this$FlatteningSequence=t,this.iterator=t.sequence_0.iterator(),this.itemIterator=null}function oc(){}function rc(t,e,n){if(this.sequence_0=t,this.startIndex_0=e,this.endIndex_0=n,!(this.startIndex_0>=0))throw pn(("startIndex should be non-negative, but is "+this.startIndex_0).toString());if(!(this.endIndex_0>=0))throw pn(("endIndex should be non-negative, but is "+this.endIndex_0).toString());if(!(this.endIndex_0>=this.startIndex_0))throw pn(("endIndex should be not less than startIndex, but was "+this.endIndex_0+" < "+this.startIndex_0).toString())}function ac(t){this.this$SubSequence=t,this.iterator=t.sequence_0.iterator(),this.position=0}function sc(t,e){if(this.sequence_0=t,this.count_0=e,!(this.count_0>=0))throw pn(("count must be non-negative, but was "+this.count_0+".").toString())}function cc(t){this.left=t.count_0,this.iterator=t.sequence_0.iterator()}function lc(t,e){this.getInitialValue_0=t,this.getNextValue_0=e}function pc(t){this.this$GeneratorSequence=t,this.nextItem=null,this.nextState=-2}function uc(t,e){return new lc(t,e)}function dc(){hc=this,this.serialVersionUID_0=j}Zs.prototype.calcNext_0=function(){for(;this.iterator.hasNext();){var t=this.iterator.next();if(this.this$FilteringSequence.predicate_0(t)===this.this$FilteringSequence.sendWhen_0)return this.nextItem=t,void(this.nextState=1)}this.nextState=0},Zs.prototype.next=function(){var e;if(-1===this.nextState&&this.calcNext_0(),0===this.nextState)throw Rn();var n=this.nextItem;return this.nextItem=null,this.nextState=-1,null==(e=n)||t.isType(e,b)?e:ro()},Zs.prototype.hasNext=function(){return-1===this.nextState&&this.calcNext_0(),1===this.nextState},Zs.$metadata$={kind:e,interfaces:[ge]},Qs.prototype.iterator=function(){return new Zs(this)},Qs.$metadata$={kind:e,simpleName:"FilteringSequence",interfaces:[Ms]},ec.prototype.next=function(){return this.this$TransformingSequence.transformer_0(this.iterator.next())},ec.prototype.hasNext=function(){return this.iterator.hasNext()},ec.$metadata$={kind:e,interfaces:[ge]},tc.prototype.iterator=function(){return new ec(this)},tc.prototype.flatten_1tglza$=function(t){return new nc(this.sequence_0,this.transformer_0,t)},tc.$metadata$={kind:e,simpleName:"TransformingSequence",interfaces:[Ms]},ic.prototype.next=function(){if(!this.ensureItemIterator_0())throw Rn();return L(this.itemIterator).next()},ic.prototype.hasNext=function(){return this.ensureItemIterator_0()},ic.prototype.ensureItemIterator_0=function(){var t;for(!1===(null!=(t=this.itemIterator)?t.hasNext():null)&&(this.itemIterator=null);null==this.itemIterator;){if(!this.iterator.hasNext())return!1;var e=this.iterator.next(),n=this.this$FlatteningSequence.iterator_0(this.this$FlatteningSequence.transformer_0(e));if(n.hasNext())return this.itemIterator=n,!0}return!0},ic.$metadata$={kind:e,interfaces:[ge]},nc.prototype.iterator=function(){return new ic(this)},nc.$metadata$={kind:e,simpleName:"FlatteningSequence",interfaces:[Ms]},oc.$metadata$={kind:R,simpleName:"DropTakeSequence",interfaces:[Ms]},Object.defineProperty(rc.prototype,"count_0",{configurable:!0,get:function(){return this.endIndex_0-this.startIndex_0|0}}),rc.prototype.drop_za3lpa$=function(t){return t>=this.count_0?Vs():new rc(this.sequence_0,this.startIndex_0+t|0,this.endIndex_0)},rc.prototype.take_za3lpa$=function(t){return t>=this.count_0?this:new rc(this.sequence_0,this.startIndex_0,this.startIndex_0+t|0)},ac.prototype.drop_0=function(){for(;this.position=this.this$SubSequence.endIndex_0)throw Rn();return this.position=this.position+1|0,this.iterator.next()},ac.$metadata$={kind:e,interfaces:[ge]},rc.prototype.iterator=function(){return new ac(this)},rc.$metadata$={kind:e,simpleName:"SubSequence",interfaces:[oc,Ms]},sc.prototype.drop_za3lpa$=function(t){return t>=this.count_0?Vs():new rc(this.sequence_0,t,this.count_0)},sc.prototype.take_za3lpa$=function(t){return t>=this.count_0?this:new sc(this.sequence_0,t)},cc.prototype.next=function(){if(0===this.left)throw Rn();return this.left=this.left-1|0,this.iterator.next()},cc.prototype.hasNext=function(){return this.left>0&&this.iterator.hasNext()},cc.$metadata$={kind:e,interfaces:[ge]},sc.prototype.iterator=function(){return new cc(this)},sc.$metadata$={kind:e,simpleName:"TakeSequence",interfaces:[oc,Ms]},pc.prototype.calcNext_0=function(){this.nextItem=-2===this.nextState?this.this$GeneratorSequence.getInitialValue_0():this.this$GeneratorSequence.getNextValue_0(L(this.nextItem)),this.nextState=null==this.nextItem?0:1},pc.prototype.next=function(){var e;if(this.nextState<0&&this.calcNext_0(),0===this.nextState)throw Rn();var n=t.isType(e=this.nextItem,b)?e:ro();return this.nextState=-1,n},pc.prototype.hasNext=function(){return this.nextState<0&&this.calcNext_0(),1===this.nextState},pc.$metadata$={kind:e,interfaces:[ge]},lc.prototype.iterator=function(){return new pc(this)},lc.$metadata$={kind:e,simpleName:"GeneratorSequence",interfaces:[Ms]},dc.prototype.equals=function(e){return t.isType(e,me)&&e.isEmpty()},dc.prototype.hashCode=function(){return 0},dc.prototype.toString=function(){return"[]"},Object.defineProperty(dc.prototype,"size",{configurable:!0,get:function(){return 0}}),dc.prototype.isEmpty=function(){return!0},dc.prototype.contains_11rb$=function(t){return!1},dc.prototype.containsAll_brywnq$=function(t){return t.isEmpty()},dc.prototype.iterator=function(){return Qa()},dc.prototype.readResolve_0=function(){return Ec()},dc.$metadata$={kind:C,simpleName:"EmptySet",interfaces:[so,me]};var hc=null;function Ec(){return null===hc&&new dc,hc}function _c(){return Ec()}function mc(t){return yt(t,ki(t.length))}function fc(t){switch(t.size){case 0:return _c();case 1:return Kn(t.iterator().next());default:return t}}function yc(){}function Tc(){gc()}function $c(){Nc=this}yc.$metadata$={kind:R,simpleName:"Continuation",interfaces:[]},i("kotlin.kotlin.coroutines.suspendCoroutine_922awp$",o((function(){var e=p.kotlin.coroutines.intrinsics.intercepted_f9mg25$,n=p.kotlin.coroutines.SafeContinuation_init_wj8d80$;return function(i,o){var r;return t.suspendCall((r=i,function(t){var i=n(e(t));return r(i),i.getOrThrow()})(t.coroutineReceiver())),t.coroutineResult(t.coroutineReceiver())}}))),$c.$metadata$={kind:C,simpleName:"Key",interfaces:[Sc]};var Nc=null;function gc(){return null===Nc&&new $c,Nc}function Rc(){}function Cc(t,e){var n=t.minusKey_yeqjby$(e.key);if(n===Uc())return e;var i=n.get_j3r2sn$(gc());if(null==i)return new Dc(n,e);var o=n.minusKey_yeqjby$(gc());return o===Uc()?new Dc(e,i):new Dc(new Dc(o,e),i)}function Sc(){}function Ic(){}function Lc(t){this.key_no4tas$_0=t}function bc(e,n){this.safeCast_9rw4bk$_0=n,this.topmostKey_3x72pn$_0=t.isType(e,bc)?e.topmostKey_3x72pn$_0:e}function vc(){Oc=this,this.serialVersionUID_0=l}Tc.prototype.releaseInterceptedContinuation_k98bjh$=function(t){},Tc.prototype.get_j3r2sn$=function(e){var n;return t.isType(e,bc)?e.isSubKey_i2ksv9$(this.key)&&t.isType(n=e.tryCast_m1180o$(this),Ic)?n:null:gc()===e?t.isType(this,Ic)?this:ro():null},Tc.prototype.minusKey_yeqjby$=function(e){return t.isType(e,bc)?e.isSubKey_i2ksv9$(this.key)&&null!=e.tryCast_m1180o$(this)?Uc():this:gc()===e?Uc():this},Tc.$metadata$={kind:R,simpleName:"ContinuationInterceptor",interfaces:[Ic]},Rc.prototype.plus_1fupul$=function(t){return t===Uc()?this:t.fold_3cc69b$(this,Cc)},Sc.$metadata$={kind:R,simpleName:"Key",interfaces:[]},Ic.prototype.get_j3r2sn$=function(e){return r(this.key,e)?t.isType(this,Ic)?this:ro():null},Ic.prototype.fold_3cc69b$=function(t,e){return e(t,this)},Ic.prototype.minusKey_yeqjby$=function(t){return r(this.key,t)?Uc():this},Ic.$metadata$={kind:R,simpleName:"Element",interfaces:[Rc]},Rc.$metadata$={kind:R,simpleName:"CoroutineContext",interfaces:[]},Object.defineProperty(Lc.prototype,"key",{get:function(){return this.key_no4tas$_0}}),Lc.$metadata$={kind:e,simpleName:"AbstractCoroutineContextElement",interfaces:[Ic]},bc.prototype.tryCast_m1180o$=function(t){return this.safeCast_9rw4bk$_0(t)},bc.prototype.isSubKey_i2ksv9$=function(t){return t===this||this.topmostKey_3x72pn$_0===t},bc.$metadata$={kind:e,simpleName:"AbstractCoroutineContextKey",interfaces:[Sc]},vc.prototype.readResolve_0=function(){return Uc()},vc.prototype.get_j3r2sn$=function(t){return null},vc.prototype.fold_3cc69b$=function(t,e){return t},vc.prototype.plus_1fupul$=function(t){return t},vc.prototype.minusKey_yeqjby$=function(t){return this},vc.prototype.hashCode=function(){return 0},vc.prototype.toString=function(){return"EmptyCoroutineContext"},vc.$metadata$={kind:C,simpleName:"EmptyCoroutineContext",interfaces:[so,Rc]};var Oc=null;function Uc(){return null===Oc&&new vc,Oc}function Dc(t,e){this.left_0=t,this.element_0=e}function Ac(t,e){return 0===t.length?e.toString():t+", "+e}function kc(t){null===Gc&&new Pc,this.elements=t}function Pc(){Gc=this,this.serialVersionUID_0=l}Dc.prototype.get_j3r2sn$=function(e){for(var n,i=this;;){if(null!=(n=i.element_0.get_j3r2sn$(e)))return n;var o=i.left_0;if(!t.isType(o,Dc))return o.get_j3r2sn$(e);i=o}},Dc.prototype.fold_3cc69b$=function(t,e){return e(this.left_0.fold_3cc69b$(t,e),this.element_0)},Dc.prototype.minusKey_yeqjby$=function(t){if(null!=this.element_0.get_j3r2sn$(t))return this.left_0;var e=this.left_0.minusKey_yeqjby$(t);return e===this.left_0?this:e===Uc()?this.element_0:new Dc(e,this.element_0)},Dc.prototype.size_0=function(){for(var e,n,i=this,o=2;;){if(null==(n=t.isType(e=i.left_0,Dc)?e:null))return o;i=n,o=o+1|0}},Dc.prototype.contains_0=function(t){return r(this.get_j3r2sn$(t.key),t)},Dc.prototype.containsAll_0=function(e){for(var n,i=e;;){if(!this.contains_0(i.element_0))return!1;var o=i.left_0;if(!t.isType(o,Dc))return this.contains_0(t.isType(n=o,Ic)?n:ro());i=o}},Dc.prototype.equals=function(e){return this===e||t.isType(e,Dc)&&e.size_0()===this.size_0()&&e.containsAll_0(this)},Dc.prototype.hashCode=function(){return D(this.left_0)+D(this.element_0)|0},Dc.prototype.toString=function(){return"["+this.fold_3cc69b$("",Ac)+"]"},Dc.prototype.writeReplace_0=function(){var e,n,i,o=this.size_0(),r=t.newArray(o,null),a={v:0};if(this.fold_3cc69b$(be(),(n=r,i=a,function(t,e){var o;return n[(o=i.v,i.v=o+1|0,o)]=e,Ie})),a.v!==o)throw dn("Check failed.".toString());return new kc(t.isArray(e=r)?e:ro())},Pc.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var xc,wc,zc,Gc=null;function jc(){return Wc()}function Fc(t,e){S.call(this),this.name$=t,this.ordinal$=e}function Mc(){Mc=function(){},xc=new Fc("COROUTINE_SUSPENDED",0),wc=new Fc("UNDECIDED",1),zc=new Fc("RESUMED",2)}function Wc(){return Mc(),xc}function Xc(){return Mc(),wc}function Bc(){return Mc(),zc}function qc(t,e){var n=t%e|0;return n>=0?n:n+e|0}function Hc(t,e){var n=t.modulo(e);return n.toNumber()>=0?n:n.add(e)}function Vc(t,e,n){return qc(qc(t,n)-qc(e,n)|0,n)}function Kc(t,e,n){return Hc(Hc(t,n).subtract(Hc(e,n)),n)}function Jc(t,e,n){if(n>0)return t>=e?e:e-Vc(e,t,n)|0;if(n<0)return t<=e?e:e+Vc(t,e,0|-n)|0;throw pn("Step is zero.")}function Yc(t,e,n){if(n.toNumber()>0)return t.compareTo_11rb$(e)>=0?e:e.subtract(Kc(e,t,n));if(n.toNumber()<0)return t.compareTo_11rb$(e)<=0?e:e.add(Kc(t,e,n.unaryMinus()));throw pn("Step is zero.")}function Qc(){il()}function Zc(){nl=this,Qc.call(this),this.defaultRandom_0=fo()}function tl(){el=this,this.serialVersionUID_0=l}kc.prototype.readResolve_0=function(){var t,e=this.elements,n=Uc();for(t=0;t!==e.length;++t){var i=e[t];n=n.plus_1fupul$(i)}return n},kc.$metadata$={kind:e,simpleName:"Serialized",interfaces:[so]},Dc.$metadata$={kind:e,simpleName:"CombinedContext",interfaces:[so,Rc]},i("kotlin.kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn_zb0pmy$",o((function(){var t=p.kotlin.NotImplementedError;return function(e,n){throw new t("Implementation of suspendCoroutineUninterceptedOrReturn is intrinsic")}}))),Fc.$metadata$={kind:e,simpleName:"CoroutineSingletons",interfaces:[S]},Fc.values=function(){return[Wc(),Xc(),Bc()]},Fc.valueOf_61zpoe$=function(t){switch(t){case"COROUTINE_SUSPENDED":return Wc();case"UNDECIDED":return Xc();case"RESUMED":return Bc();default:ao("No enum constant kotlin.coroutines.intrinsics.CoroutineSingletons."+t)}},Qc.prototype.nextInt=function(){return this.nextBits_za3lpa$(32)},Qc.prototype.nextInt_za3lpa$=function(t){return this.nextInt_vux9f0$(0,t)},Qc.prototype.nextInt_vux9f0$=function(t,e){var n;sl(t,e);var i=e-t|0;if(i>0||-2147483648===i){if((i&(0|-i))===i){var o=rl(i);n=this.nextBits_za3lpa$(o)}else{var r;do{var a=this.nextInt()>>>1;r=a%i|0}while((a-r+(i-1)|0)<0);n=r}return t+n|0}for(;;){var s=this.nextInt();if(t<=s&&s0){var a;if(r(o.and(o.unaryMinus()),o)){var s=o.toInt(),c=o.shiftRightUnsigned(32).toInt();if(0!==s){var l=rl(s);i=t.Long.fromInt(this.nextBits_za3lpa$(l)).and(g)}else if(1===c)i=t.Long.fromInt(this.nextInt()).and(g);else{var p=rl(c);i=t.Long.fromInt(this.nextBits_za3lpa$(p)).shiftLeft(32).add(t.Long.fromInt(this.nextInt()).and(g))}a=i}else{var u;do{var d=this.nextLong().shiftRightUnsigned(1);u=d.modulo(o)}while(d.subtract(u).add(o.subtract(t.Long.fromInt(1))).toNumber()<0);a=u}return e.add(a)}for(;;){var h=this.nextLong();if(e.lessThanOrEqual(h)&&h.lessThan(n))return h}},Qc.prototype.nextBoolean=function(){return 0!==this.nextBits_za3lpa$(1)},Qc.prototype.nextDouble=function(){return yo(this.nextBits_za3lpa$(26),this.nextBits_za3lpa$(27))},Qc.prototype.nextDouble_14dthe$=function(t){return this.nextDouble_lu1900$(0,t)},Qc.prototype.nextDouble_lu1900$=function(t,e){var n;ll(t,e);var i=e-t;if(_o(i)&&mo(t)&&mo(e)){var o=this.nextDouble()*(e/2-t/2);n=t+o+o}else n=t+this.nextDouble()*i;var r=n;return r>=e?co(e):r},Qc.prototype.nextFloat=function(){return this.nextBits_za3lpa$(24)/16777216},Qc.prototype.nextBytes_mj6st8$$default=function(t,e,n){var i,o,r;if(!(0<=e&&e<=t.length&&0<=n&&n<=t.length))throw pn((i=e,o=n,r=t,function(){return"fromIndex ("+i+") or toIndex ("+o+") are out of range: 0.."+r.length+"."})().toString());if(!(e<=n))throw pn(("fromIndex ("+e+") must be not greater than toIndex ("+n+").").toString());for(var a=(n-e|0)/4|0,s={v:e},c=0;c>>8),t[s.v+2|0]=E(l>>>16),t[s.v+3|0]=E(l>>>24),s.v=s.v+4|0}for(var p=n-s.v|0,u=this.nextBits_za3lpa$(8*p|0),d=0;d>>(8*d|0));return t},Qc.prototype.nextBytes_mj6st8$=function(t,e,n,i){return void 0===e&&(e=0),void 0===n&&(n=t.length),i?i(t,e,n):this.nextBytes_mj6st8$$default(t,e,n)},Qc.prototype.nextBytes_fqrh44$=function(t){return this.nextBytes_mj6st8$(t,0,t.length)},Qc.prototype.nextBytes_za3lpa$=function(t){return this.nextBytes_fqrh44$(new Int8Array(t))},tl.prototype.readResolve_0=function(){return il()},tl.$metadata$={kind:C,simpleName:"Serialized",interfaces:[so]};var el=null;Zc.prototype.writeReplace_0=function(){return null===el&&new tl,el},Zc.prototype.nextBits_za3lpa$=function(t){return this.defaultRandom_0.nextBits_za3lpa$(t)},Zc.prototype.nextInt=function(){return this.defaultRandom_0.nextInt()},Zc.prototype.nextInt_za3lpa$=function(t){return this.defaultRandom_0.nextInt_za3lpa$(t)},Zc.prototype.nextInt_vux9f0$=function(t,e){return this.defaultRandom_0.nextInt_vux9f0$(t,e)},Zc.prototype.nextLong=function(){return this.defaultRandom_0.nextLong()},Zc.prototype.nextLong_s8cxhz$=function(t){return this.defaultRandom_0.nextLong_s8cxhz$(t)},Zc.prototype.nextLong_3pjtqy$=function(t,e){return this.defaultRandom_0.nextLong_3pjtqy$(t,e)},Zc.prototype.nextBoolean=function(){return this.defaultRandom_0.nextBoolean()},Zc.prototype.nextDouble=function(){return this.defaultRandom_0.nextDouble()},Zc.prototype.nextDouble_14dthe$=function(t){return this.defaultRandom_0.nextDouble_14dthe$(t)},Zc.prototype.nextDouble_lu1900$=function(t,e){return this.defaultRandom_0.nextDouble_lu1900$(t,e)},Zc.prototype.nextFloat=function(){return this.defaultRandom_0.nextFloat()},Zc.prototype.nextBytes_fqrh44$=function(t){return this.defaultRandom_0.nextBytes_fqrh44$(t)},Zc.prototype.nextBytes_za3lpa$=function(t){return this.defaultRandom_0.nextBytes_za3lpa$(t)},Zc.prototype.nextBytes_mj6st8$$default=function(t,e,n){return this.defaultRandom_0.nextBytes_mj6st8$(t,e,n)},Zc.$metadata$={kind:C,simpleName:"Default",interfaces:[so,Qc]};var nl=null;function il(){return null===nl&&new Zc,nl}function ol(t){return El(t,t>>31)}function rl(t){return 31-k(t)|0}function al(t,e){return t>>>32-e&(0|-e)>>31}function sl(t,e){if(!(e>t))throw pn(pl(t,e).toString())}function cl(t,e){if(!(e.compareTo_11rb$(t)>0))throw pn(pl(t,e).toString())}function ll(t,e){if(!(e>t))throw pn(pl(t,e).toString())}function pl(t,e){return"Random range is empty: ["+t.toString()+", "+e.toString()+")."}function ul(t,e,n,i,o,r){if(null===hl&&new dl,Qc.call(this),this.x_0=t,this.y_0=e,this.z_0=n,this.w_0=i,this.v_0=o,this.addend_0=r,0==(this.x_0|this.y_0|this.z_0|this.w_0|this.v_0))throw pn("Initial state must have at least one non-zero element.".toString());for(var a=0;a<64;a++)this.nextInt()}function dl(){hl=this,this.serialVersionUID_0=l}Qc.$metadata$={kind:e,simpleName:"Random",interfaces:[]},ul.prototype.nextInt=function(){var t=this.x_0;t^=t>>>2,this.x_0=this.y_0,this.y_0=this.z_0,this.z_0=this.w_0;var e=this.v_0;return this.w_0=e,t=t^t<<1^e^e<<4,this.v_0=t,this.addend_0=this.addend_0+362437|0,t+this.addend_0|0},ul.prototype.nextBits_za3lpa$=function(t){return al(this.nextInt(),t)},dl.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var hl=null;function El(t,e,n){return n=n||Object.create(ul.prototype),ul.call(n,t,e,0,0,~t,t<<10^e>>>4),n}function _l(t,e){yl(),Ol.call(this,t,e,1)}function ml(){fl=this,this.EMPTY=new _l(d(1),d(0))}ul.$metadata$={kind:e,simpleName:"XorWowRandom",interfaces:[so,Qc]},Object.defineProperty(_l.prototype,"start",{configurable:!0,get:function(){return a(this.first)}}),Object.defineProperty(_l.prototype,"endInclusive",{configurable:!0,get:function(){return a(this.last)}}),Object.defineProperty(_l.prototype,"endExclusive",{configurable:!0,get:function(){if(this.last===P.MAX_VALUE)throw dn("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return a(d(this.last+1))}}),_l.prototype.contains_mef7kx$=function(t){return this.first<=t&&t<=this.last},_l.prototype.isEmpty=function(){return this.first>this.last},_l.prototype.equals=function(e){return t.isType(e,_l)&&(this.isEmpty()&&e.isEmpty()||this.first===e.first&&this.last===e.last)},_l.prototype.hashCode=function(){return this.isEmpty()?-1:(31*(0|this.first)|0)+(0|this.last)|0},_l.prototype.toString=function(){return String.fromCharCode(this.first)+".."+String.fromCharCode(this.last)},ml.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var fl=null;function yl(){return null===fl&&new ml,fl}function Tl(t,e){gl(),kl.call(this,t,e,1)}function $l(){Nl=this,this.EMPTY=new Tl(1,0)}_l.$metadata$={kind:e,simpleName:"CharRange",interfaces:[Wl,Ml,Ol]},Object.defineProperty(Tl.prototype,"start",{configurable:!0,get:function(){return this.first}}),Object.defineProperty(Tl.prototype,"endInclusive",{configurable:!0,get:function(){return this.last}}),Object.defineProperty(Tl.prototype,"endExclusive",{configurable:!0,get:function(){if(2147483647===this.last)throw dn("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return this.last+1|0}}),Tl.prototype.contains_mef7kx$=function(t){return this.first<=t&&t<=this.last},Tl.prototype.isEmpty=function(){return this.first>this.last},Tl.prototype.equals=function(e){return t.isType(e,Tl)&&(this.isEmpty()&&e.isEmpty()||this.first===e.first&&this.last===e.last)},Tl.prototype.hashCode=function(){return this.isEmpty()?-1:(31*this.first|0)+this.last|0},Tl.prototype.toString=function(){return this.first.toString()+".."+this.last},$l.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Nl=null;function gl(){return null===Nl&&new $l,Nl}function Rl(t,e){Il(),zl.call(this,t,e,F)}function Cl(){Sl=this,this.EMPTY=new Rl(F,l)}Tl.$metadata$={kind:e,simpleName:"IntRange",interfaces:[Wl,Ml,kl]},Object.defineProperty(Rl.prototype,"start",{configurable:!0,get:function(){return this.first}}),Object.defineProperty(Rl.prototype,"endInclusive",{configurable:!0,get:function(){return this.last}}),Object.defineProperty(Rl.prototype,"endExclusive",{configurable:!0,get:function(){if(r(this.last,T))throw dn("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return this.last.add(t.Long.fromInt(1))}}),Rl.prototype.contains_mef7kx$=function(t){return this.first.compareTo_11rb$(t)<=0&&t.compareTo_11rb$(this.last)<=0},Rl.prototype.isEmpty=function(){return this.first.compareTo_11rb$(this.last)>0},Rl.prototype.equals=function(e){return t.isType(e,Rl)&&(this.isEmpty()&&e.isEmpty()||r(this.first,e.first)&&r(this.last,e.last))},Rl.prototype.hashCode=function(){return this.isEmpty()?-1:t.Long.fromInt(31).multiply(this.first.xor(this.first.shiftRightUnsigned(32))).add(this.last.xor(this.last.shiftRightUnsigned(32))).toInt()},Rl.prototype.toString=function(){return this.first.toString()+".."+this.last.toString()},Cl.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Sl=null;function Il(){return null===Sl&&new Cl,Sl}function Ll(t,e,n){Ps.call(this),this.step=n,this.finalElement_0=0|e,this.hasNext_0=this.step>0?t<=e:t>=e,this.next_0=this.hasNext_0?0|t:this.finalElement_0}function bl(t,e,n){ws.call(this),this.step=n,this.finalElement_0=e,this.hasNext_0=this.step>0?t<=e:t>=e,this.next_0=this.hasNext_0?t:this.finalElement_0}function vl(t,e,n){zs.call(this),this.step=n,this.finalElement_0=e,this.hasNext_0=this.step.toNumber()>0?t.compareTo_11rb$(e)<=0:t.compareTo_11rb$(e)>=0,this.next_0=this.hasNext_0?t:this.finalElement_0}function Ol(t,e,n){if(Al(),0===n)throw pn("Step must be non-zero.");if(-2147483648===n)throw pn("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=d(Jc(0|t,0|e,n)),this.step=n}function Ul(){Dl=this}Rl.$metadata$={kind:e,simpleName:"LongRange",interfaces:[Wl,Ml,zl]},Ll.prototype.hasNext=function(){return this.hasNext_0},Ll.prototype.nextChar=function(){var t=this.next_0;if(t===this.finalElement_0){if(!this.hasNext_0)throw Rn();this.hasNext_0=!1}else this.next_0=this.next_0+this.step|0;return d(t)},Ll.$metadata$={kind:e,simpleName:"CharProgressionIterator",interfaces:[Ps]},bl.prototype.hasNext=function(){return this.hasNext_0},bl.prototype.nextInt=function(){var t=this.next_0;if(t===this.finalElement_0){if(!this.hasNext_0)throw Rn();this.hasNext_0=!1}else this.next_0=this.next_0+this.step|0;return t},bl.$metadata$={kind:e,simpleName:"IntProgressionIterator",interfaces:[ws]},vl.prototype.hasNext=function(){return this.hasNext_0},vl.prototype.nextLong=function(){var t=this.next_0;if(r(t,this.finalElement_0)){if(!this.hasNext_0)throw Rn();this.hasNext_0=!1}else this.next_0=this.next_0.add(this.step);return t},vl.$metadata$={kind:e,simpleName:"LongProgressionIterator",interfaces:[zs]},Ol.prototype.iterator=function(){return new Ll(this.first,this.last,this.step)},Ol.prototype.isEmpty=function(){return this.step>0?this.first>this.last:this.first0?String.fromCharCode(this.first)+".."+String.fromCharCode(this.last)+" step "+this.step:String.fromCharCode(this.first)+" downTo "+String.fromCharCode(this.last)+" step "+(0|-this.step)},Ul.prototype.fromClosedRange_ayra44$=function(t,e,n){return new Ol(t,e,n)},Ul.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Dl=null;function Al(){return null===Dl&&new Ul,Dl}function kl(t,e,n){if(wl(),0===n)throw pn("Step must be non-zero.");if(-2147483648===n)throw pn("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=Jc(t,e,n),this.step=n}function Pl(){xl=this}Ol.$metadata$={kind:e,simpleName:"CharProgression",interfaces:[pe]},kl.prototype.iterator=function(){return new bl(this.first,this.last,this.step)},kl.prototype.isEmpty=function(){return this.step>0?this.first>this.last:this.first0?this.first.toString()+".."+this.last+" step "+this.step:this.first.toString()+" downTo "+this.last+" step "+(0|-this.step)},Pl.prototype.fromClosedRange_qt1dr2$=function(t,e,n){return new kl(t,e,n)},Pl.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var xl=null;function wl(){return null===xl&&new Pl,xl}function zl(t,e,n){if(Fl(),r(n,l))throw pn("Step must be non-zero.");if(r(n,y))throw pn("Step must be greater than Long.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=Yc(t,e,n),this.step=n}function Gl(){jl=this}kl.$metadata$={kind:e,simpleName:"IntProgression",interfaces:[pe]},zl.prototype.iterator=function(){return new vl(this.first,this.last,this.step)},zl.prototype.isEmpty=function(){return this.step.toNumber()>0?this.first.compareTo_11rb$(this.last)>0:this.first.compareTo_11rb$(this.last)<0},zl.prototype.equals=function(e){return t.isType(e,zl)&&(this.isEmpty()&&e.isEmpty()||r(this.first,e.first)&&r(this.last,e.last)&&r(this.step,e.step))},zl.prototype.hashCode=function(){return this.isEmpty()?-1:t.Long.fromInt(31).multiply(t.Long.fromInt(31).multiply(this.first.xor(this.first.shiftRightUnsigned(32))).add(this.last.xor(this.last.shiftRightUnsigned(32)))).add(this.step.xor(this.step.shiftRightUnsigned(32))).toInt()},zl.prototype.toString=function(){return this.step.toNumber()>0?this.first.toString()+".."+this.last.toString()+" step "+this.step.toString():this.first.toString()+" downTo "+this.last.toString()+" step "+this.step.unaryMinus().toString()},Gl.prototype.fromClosedRange_b9bd0d$=function(t,e,n){return new zl(t,e,n)},Gl.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var jl=null;function Fl(){return null===jl&&new Gl,jl}function Ml(){}function Wl(){}function Xl(t,e){this.start_p1gsmm$_0=t,this.endInclusive_jj4lf7$_0=e}function Bl(t,e){this.start_ndr8iz$_0=t,this.endExclusive_cyyf3u$_0=e}function ql(){}function Hl(t,e){this._start_0=t,this._endInclusive_0=e}function Vl(){}function Kl(){}function Jl(e,n,i){null!=i?e.append_gw00v9$(i(n)):null==n||t.isCharSequence(n)?e.append_gw00v9$(n):t.isChar(n)?e.append_s8itvh$(s(n)):e.append_gw00v9$($(n))}function Yl(t,e,n){if(void 0===n&&(n=!1),t===e)return!0;if(!n)return!1;var i=mr(t),o=mr(e),r=i===o;return r||(r=String.fromCharCode(i).toLowerCase().charCodeAt(0)===String.fromCharCode(o).toLowerCase().charCodeAt(0)),r}function Ql(e,n,i){if(void 0===n&&(n=""),void 0===i&&(i="|"),ca(i))throw pn("marginPrefix must be non-blank string.".toString());var o,r,c,l,p=Dp(e),u=(e.length,t.imul(n.length,p.size),0===(o=n).length?Zl:(r=o,function(t){return r+t})),d=cs(p),h=_i(),E=0;for(c=p.iterator();c.hasNext();){var _,m,f,y,T=c.next(),$=Zn((E=(l=E)+1|0,l));if(0!==$&&$!==d||!ca(T)){var N;t:do{var g,R,C,S;R=(g=pp(T)).first,C=g.last,S=g.step;for(var I=R;I<=C;I+=S)if(!Tr(s(a(T.charCodeAt(I))))){N=I;break t}N=-1}while(0);var L=N;y=null!=(f=null!=(m=-1===L?null:sa(T,i,L)?T.substring(L+i.length|0):null)?u(m):null)?f:T}else y=null;null!=(_=y)&&h.add_11rb$(_)}return zt(h,Er(),"\n").toString()}function Zl(t){return t}function tp(t){return ep(t,10)}function ep(e,n){Cr(n);var i,o,r,a=e.length;if(0===a)return null;var s=e.charCodeAt(0);if(s<48){if(1===a)return null;if(i=1,45===s)o=!0,r=-2147483648;else{if(43!==s)return null;o=!1,r=-2147483647}}else i=0,o=!1,r=-2147483647;for(var c=-59652323,l=0,p=i;p(t.length-o|0)||i>(n.length-o|0))return!1;for(var a=0;a0&&Yl(t.charCodeAt(0),e,n)}function _p(t,e,n){return void 0===n&&(n=!1),t.length>0&&Yl(t.charCodeAt(up(t)),e,n)}function mp(t,e,n){return void 0===n&&(n=!1),n||"string"!=typeof t||"string"!=typeof e?hp(t,0,e,0,e.length,n):aa(t,e)}function fp(t,e,n,i){var o,r;if(void 0===n&&(n=0),void 0===i&&(i=!1),!i&&1===e.length&&"string"==typeof t){var c=Et(e);return t.indexOf(String.fromCharCode(c),n)}o=Xt(n,0),r=up(t);for(var l=o;l<=r;l++){var p,u=t.charCodeAt(l);t:do{var d;for(d=0;d!==e.length;++d){var h=s(e[d]);if(Yl(s(a(h)),u,i)){p=!0;break t}}p=!1}while(0);if(p)return l}return-1}function yp(t,e,n,i,o,r){var a,s;void 0===r&&(r=!1);var c=r?Ft(Bt(n,up(t)),Xt(i,0)):new Tl(Xt(n,0),Bt(i,t.length));if("string"==typeof t&&"string"==typeof e)for(a=c.iterator();a.hasNext();){var l=a.next();if(la(e,0,t,l,e.length,o))return l}else for(s=c.iterator();s.hasNext();){var p=s.next();if(hp(e,0,t,p,e.length,o))return p}return-1}function Tp(e,n,i,o){return void 0===i&&(i=0),void 0===o&&(o=!1),o||"string"!=typeof e?fp(e,t.charArrayOf(n),i,o):e.indexOf(String.fromCharCode(n),i)}function $p(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=!1),i||"string"!=typeof t?yp(t,e,n,t.length,i):t.indexOf(e,n)}function Np(t,e,n,i){return void 0===n&&(n=up(t)),void 0===i&&(i=!1),i||"string"!=typeof t?yp(t,e,n,0,i,!0):t.lastIndexOf(e,n)}function gp(t,e,n){return void 0===n&&(n=!1),Tp(t,e,void 0,n)>=0}function Rp(t,e,n,i){this.input_0=t,this.startIndex_0=e,this.limit_0=n,this.getNextMatch_0=i}function Cp(t){this.this$DelimitedRangesSequence=t,this.nextState=-1,this.currentStartIndex=qt(t.startIndex_0,0,t.input_0.length),this.nextSearchIndex=this.currentStartIndex,this.nextItem=null,this.counter=0}function Sp(t,e,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=!1),void 0===o&&(o=0),bp(o),new Rp(t,n,o,(r=e,a=i,function(t,e){var n=fp(t,r,e,a);return n<0?null:Lu(n,1)}));var r,a}function Ip(t,e){return function(n,i){var o;return null!=(o=function(t,e,n,i,o){var r,a;if(!i&&1===e.size){var s=bt(e),c=o?Np(t,s,n):$p(t,s,n);return c<0?null:Lu(c,s)}var l=o?Ft(Bt(n,up(t)),0):new Tl(Xt(n,0),t.length);if("string"==typeof t)for(r=l.iterator();r.hasNext();){var p,u=r.next();t:do{var d;for(d=e.iterator();d.hasNext();){var h=d.next();if(la(h,0,t,u,h.length,i)){p=h;break t}}p=null}while(0);if(null!=p)return Lu(u,p)}else for(a=l.iterator();a.hasNext();){var E,_=a.next();t:do{var m;for(m=e.iterator();m.hasNext();){var f=m.next();if(hp(f,0,t,_,f.length,i)){E=f;break t}}E=null}while(0);if(null!=E)return Lu(_,E)}return null}(n,t,i,e,!1))?Lu(o.first,o.second.length):null}}function Lp(t,e,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=!1),void 0===o&&(o=0),bp(o),new Rp(t,n,o,Ip(Dn(e),i))}function bp(t){if(!(t>=0))throw pn(("Limit must be non-negative, but was "+t).toString())}function vp(t,e,n,i){return void 0===n&&(n=!1),void 0===i&&(i=0),oe(Lp(t,e,void 0,n,i),(o=t,function(t){return dp(o,t)}));var o}function Op(e,n,i,o){bp(o);var r=0,a=$p(e,n,r,i);if(-1===a||1===o)return Vn(e.toString());var s=o>0,c=mi(s&&Bt(o,10));do{if(c.add_11rb$(t.subSequence(e,r,a).toString()),r=a+n.length|0,s&&c.size===(o-1|0))break;a=$p(e,n,r,i)}while(-1!==a);return c.add_11rb$(t.subSequence(e,r,e.length).toString()),c}function Up(t){return vp(t,["\r\n","\n","\r"])}function Dp(t){return ne(Up(t))}function Ap(){}function kp(){}function Pp(){}function xp(t){this.match=t}function wp(t){var e,n,i;if(qp(),this.rawValue_0=t,this.isInNanos_0()){if(e=this.value_0,!J.lessThanOrEqual(e)||!e.lessThanOrEqual(Gp))throw Nn(this.value_0.toString()+" ns is out of nanoseconds range")}else{if(n=this.value_0,!X.lessThanOrEqual(n)||!n.lessThanOrEqual(jp))throw Nn(this.value_0.toString()+" ms is out of milliseconds range");if(i=this.value_0,B.lessThanOrEqual(i)&&i.lessThanOrEqual(Fp))throw Nn(this.value_0.toString()+" ms is denormalized")}}function zp(){Bp=this,this.ZERO=new wp(l),this.INFINITE=eu(jp),this.NEG_INFINITE_8be2vx$=eu(X)}zl.$metadata$={kind:e,simpleName:"LongProgression",interfaces:[pe]},Ml.prototype.contains_mef7kx$=function(e){return t.compareTo(e,this.start)>=0&&t.compareTo(e,this.endInclusive)<=0},Ml.prototype.isEmpty=function(){return t.compareTo(this.start,this.endInclusive)>0},Ml.$metadata$={kind:R,simpleName:"ClosedRange",interfaces:[]},Wl.prototype.contains_mef7kx$=function(e){return t.compareTo(e,this.start)>=0&&t.compareTo(e,this.endExclusive)<0},Wl.prototype.isEmpty=function(){return t.compareTo(this.start,this.endExclusive)>=0},Wl.$metadata$={kind:R,simpleName:"OpenEndRange",interfaces:[]},ql.prototype.contains_mef7kx$=function(t){return this.lessThanOrEquals_n65qkk$(this.start,t)&&this.lessThanOrEquals_n65qkk$(t,this.endInclusive)},ql.prototype.isEmpty=function(){return!this.lessThanOrEquals_n65qkk$(this.start,this.endInclusive)},ql.$metadata$={kind:R,simpleName:"ClosedFloatingPointRange",interfaces:[Ml]},Object.defineProperty(Hl.prototype,"start",{configurable:!0,get:function(){return this._start_0}}),Object.defineProperty(Hl.prototype,"endInclusive",{configurable:!0,get:function(){return this._endInclusive_0}}),Hl.prototype.lessThanOrEquals_n65qkk$=function(t,e){return t<=e},Hl.prototype.contains_mef7kx$=function(t){return t>=this._start_0&&t<=this._endInclusive_0},Hl.prototype.isEmpty=function(){return!(this._start_0<=this._endInclusive_0)},Hl.prototype.equals=function(e){return t.isType(e,Hl)&&(this.isEmpty()&&e.isEmpty()||this._start_0===e._start_0&&this._endInclusive_0===e._endInclusive_0)},Hl.prototype.hashCode=function(){return this.isEmpty()?-1:(31*D(this._start_0)|0)+D(this._endInclusive_0)|0},Hl.prototype.toString=function(){return this._start_0.toString()+".."+this._endInclusive_0},Hl.$metadata$={kind:e,simpleName:"ClosedDoubleRange",interfaces:[ql]},Vl.$metadata$={kind:R,simpleName:"KClassifier",interfaces:[]},Kl.$metadata$={kind:R,simpleName:"KTypeParameter",interfaces:[Vl]},lp.prototype.nextChar=function(){var t,e;return t=this.index_0,this.index_0=t+1|0,e=t,this.this$iterator.charCodeAt(e)},lp.prototype.hasNext=function(){return this.index_00&&(this.counter=this.counter+1|0,this.counter>=this.this$DelimitedRangesSequence.limit_0)||this.nextSearchIndex>this.this$DelimitedRangesSequence.input_0.length)this.nextItem=new Tl(this.currentStartIndex,up(this.this$DelimitedRangesSequence.input_0)),this.nextSearchIndex=-1;else{var t=this.this$DelimitedRangesSequence.getNextMatch_0(this.this$DelimitedRangesSequence.input_0,this.nextSearchIndex);if(null==t)this.nextItem=new Tl(this.currentStartIndex,up(this.this$DelimitedRangesSequence.input_0)),this.nextSearchIndex=-1;else{var e=t.component1(),n=t.component2();this.nextItem=Wt(this.currentStartIndex,e),this.currentStartIndex=e+n|0,this.nextSearchIndex=this.currentStartIndex+(0===n?1:0)|0}}this.nextState=1}},Cp.prototype.next=function(){var e;if(-1===this.nextState&&this.calcNext_0(),0===this.nextState)throw Rn();var n=t.isType(e=this.nextItem,Tl)?e:ro();return this.nextItem=null,this.nextState=-1,n},Cp.prototype.hasNext=function(){return-1===this.nextState&&this.calcNext_0(),1===this.nextState},Cp.$metadata$={kind:e,interfaces:[ge]},Rp.prototype.iterator=function(){return new Cp(this)},Rp.$metadata$={kind:e,simpleName:"DelimitedRangesSequence",interfaces:[Ms]},Ap.$metadata$={kind:R,simpleName:"MatchGroupCollection",interfaces:[de]},kp.$metadata$={kind:R,simpleName:"MatchNamedGroupCollection",interfaces:[Ap]},Object.defineProperty(Pp.prototype,"destructured",{configurable:!0,get:function(){return new xp(this)}}),xp.prototype.component1=i("kotlin.kotlin.text.MatchResult.Destructured.component1",(function(){return this.match.groupValues.get_za3lpa$(1)})),xp.prototype.component2=i("kotlin.kotlin.text.MatchResult.Destructured.component2",(function(){return this.match.groupValues.get_za3lpa$(2)})),xp.prototype.component3=i("kotlin.kotlin.text.MatchResult.Destructured.component3",(function(){return this.match.groupValues.get_za3lpa$(3)})),xp.prototype.component4=i("kotlin.kotlin.text.MatchResult.Destructured.component4",(function(){return this.match.groupValues.get_za3lpa$(4)})),xp.prototype.component5=i("kotlin.kotlin.text.MatchResult.Destructured.component5",(function(){return this.match.groupValues.get_za3lpa$(5)})),xp.prototype.component6=i("kotlin.kotlin.text.MatchResult.Destructured.component6",(function(){return this.match.groupValues.get_za3lpa$(6)})),xp.prototype.component7=i("kotlin.kotlin.text.MatchResult.Destructured.component7",(function(){return this.match.groupValues.get_za3lpa$(7)})),xp.prototype.component8=i("kotlin.kotlin.text.MatchResult.Destructured.component8",(function(){return this.match.groupValues.get_za3lpa$(8)})),xp.prototype.component9=i("kotlin.kotlin.text.MatchResult.Destructured.component9",(function(){return this.match.groupValues.get_za3lpa$(9)})),xp.prototype.component10=i("kotlin.kotlin.text.MatchResult.Destructured.component10",(function(){return this.match.groupValues.get_za3lpa$(10)})),xp.prototype.toList=function(){return this.match.groupValues.subList_vux9f0$(1,this.match.groupValues.size)},xp.$metadata$={kind:e,simpleName:"Destructured",interfaces:[]},Pp.$metadata$={kind:R,simpleName:"MatchResult",interfaces:[]},Object.defineProperty(wp.prototype,"value_0",{configurable:!0,get:function(){return this.rawValue_0.shiftRight(1)}}),Object.defineProperty(wp.prototype,"unitDiscriminator_0",{configurable:!0,get:function(){return 1&this.rawValue_0.toInt()}}),wp.prototype.isInNanos_0=function(){return 0==(1&this.rawValue_0.toInt())},wp.prototype.isInMillis_0=function(){return 1==(1&this.rawValue_0.toInt())},Object.defineProperty(wp.prototype,"storageUnit_0",{configurable:!0,get:function(){return this.isInNanos_0()?$a():ga()}}),zp.prototype.convert_d8pp1e$=function(t,e,n){return La(t,e,n)},zp.prototype.get_nanoseconds_s8ev3n$=i("kotlin.kotlin.time.Duration.Companion.get_nanoseconds_s8ev3n$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_14orw9$;return function(n){return e(n,t.NANOSECONDS)}}))),zp.prototype.get_nanoseconds_mts6qi$=i("kotlin.kotlin.time.Duration.Companion.get_nanoseconds_mts6qi$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_rrkdm6$;return function(n){return e(n,t.NANOSECONDS)}}))),zp.prototype.get_nanoseconds_yrwdxr$=i("kotlin.kotlin.time.Duration.Companion.get_nanoseconds_yrwdxr$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_n769wd$;return function(n){return e(n,t.NANOSECONDS)}}))),zp.prototype.get_microseconds_s8ev3n$=i("kotlin.kotlin.time.Duration.Companion.get_microseconds_s8ev3n$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_14orw9$;return function(n){return e(n,t.MICROSECONDS)}}))),zp.prototype.get_microseconds_mts6qi$=i("kotlin.kotlin.time.Duration.Companion.get_microseconds_mts6qi$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_rrkdm6$;return function(n){return e(n,t.MICROSECONDS)}}))),zp.prototype.get_microseconds_yrwdxr$=i("kotlin.kotlin.time.Duration.Companion.get_microseconds_yrwdxr$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_n769wd$;return function(n){return e(n,t.MICROSECONDS)}}))),zp.prototype.get_milliseconds_s8ev3n$=i("kotlin.kotlin.time.Duration.Companion.get_milliseconds_s8ev3n$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_14orw9$;return function(n){return e(n,t.MILLISECONDS)}}))),zp.prototype.get_milliseconds_mts6qi$=i("kotlin.kotlin.time.Duration.Companion.get_milliseconds_mts6qi$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_rrkdm6$;return function(n){return e(n,t.MILLISECONDS)}}))),zp.prototype.get_milliseconds_yrwdxr$=i("kotlin.kotlin.time.Duration.Companion.get_milliseconds_yrwdxr$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_n769wd$;return function(n){return e(n,t.MILLISECONDS)}}))),zp.prototype.get_seconds_s8ev3n$=i("kotlin.kotlin.time.Duration.Companion.get_seconds_s8ev3n$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_14orw9$;return function(n){return e(n,t.SECONDS)}}))),zp.prototype.get_seconds_mts6qi$=i("kotlin.kotlin.time.Duration.Companion.get_seconds_mts6qi$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_rrkdm6$;return function(n){return e(n,t.SECONDS)}}))),zp.prototype.get_seconds_yrwdxr$=i("kotlin.kotlin.time.Duration.Companion.get_seconds_yrwdxr$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_n769wd$;return function(n){return e(n,t.SECONDS)}}))),zp.prototype.get_minutes_s8ev3n$=i("kotlin.kotlin.time.Duration.Companion.get_minutes_s8ev3n$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_14orw9$;return function(n){return e(n,t.MINUTES)}}))),zp.prototype.get_minutes_mts6qi$=i("kotlin.kotlin.time.Duration.Companion.get_minutes_mts6qi$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_rrkdm6$;return function(n){return e(n,t.MINUTES)}}))),zp.prototype.get_minutes_yrwdxr$=i("kotlin.kotlin.time.Duration.Companion.get_minutes_yrwdxr$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_n769wd$;return function(n){return e(n,t.MINUTES)}}))),zp.prototype.get_hours_s8ev3n$=i("kotlin.kotlin.time.Duration.Companion.get_hours_s8ev3n$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_14orw9$;return function(n){return e(n,t.HOURS)}}))),zp.prototype.get_hours_mts6qi$=i("kotlin.kotlin.time.Duration.Companion.get_hours_mts6qi$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_rrkdm6$;return function(n){return e(n,t.HOURS)}}))),zp.prototype.get_hours_yrwdxr$=i("kotlin.kotlin.time.Duration.Companion.get_hours_yrwdxr$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_n769wd$;return function(n){return e(n,t.HOURS)}}))),zp.prototype.get_days_s8ev3n$=i("kotlin.kotlin.time.Duration.Companion.get_days_s8ev3n$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_14orw9$;return function(n){return e(n,t.DAYS)}}))),zp.prototype.get_days_mts6qi$=i("kotlin.kotlin.time.Duration.Companion.get_days_mts6qi$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_rrkdm6$;return function(n){return e(n,t.DAYS)}}))),zp.prototype.get_days_yrwdxr$=i("kotlin.kotlin.time.Duration.Companion.get_days_yrwdxr$",o((function(){var t=p.kotlin.time.DurationUnit,e=p.kotlin.time.toDuration_n769wd$;return function(n){return e(n,t.DAYS)}}))),zp.prototype.nanoseconds_za3lpa$=function(t){return Hp(t,$a())},zp.prototype.nanoseconds_s8cxhz$=function(t){return Vp(t,$a())},zp.prototype.nanoseconds_14dthe$=function(t){return Kp(t,$a())},zp.prototype.microseconds_za3lpa$=function(t){return Hp(t,Na())},zp.prototype.microseconds_s8cxhz$=function(t){return Vp(t,Na())},zp.prototype.microseconds_14dthe$=function(t){return Kp(t,Na())},zp.prototype.milliseconds_za3lpa$=function(t){return Hp(t,ga())},zp.prototype.milliseconds_s8cxhz$=function(t){return Vp(t,ga())},zp.prototype.milliseconds_14dthe$=function(t){return Kp(t,ga())},zp.prototype.seconds_za3lpa$=function(t){return Hp(t,Ra())},zp.prototype.seconds_s8cxhz$=function(t){return Vp(t,Ra())},zp.prototype.seconds_14dthe$=function(t){return Kp(t,Ra())},zp.prototype.minutes_za3lpa$=function(t){return Hp(t,Ca())},zp.prototype.minutes_s8cxhz$=function(t){return Vp(t,Ca())},zp.prototype.minutes_14dthe$=function(t){return Kp(t,Ca())},zp.prototype.hours_za3lpa$=function(t){return Hp(t,Sa())},zp.prototype.hours_s8cxhz$=function(t){return Vp(t,Sa())},zp.prototype.hours_14dthe$=function(t){return Kp(t,Sa())},zp.prototype.days_za3lpa$=function(t){return Hp(t,Ia())},zp.prototype.days_s8cxhz$=function(t){return Vp(t,Ia())},zp.prototype.days_14dthe$=function(t){return Kp(t,Ia())},zp.prototype.parse_61zpoe$=function(e){try{return Jp(e,!1)}catch(n){throw t.isType(n,cn)?new cn("Invalid duration string format: '"+e+"'.",n):n}},zp.prototype.parseIsoString_61zpoe$=function(e){try{return Jp(e,!0)}catch(n){throw t.isType(n,cn)?new cn("Invalid ISO duration string format: '"+e+"'.",n):n}},zp.prototype.parseOrNull_61zpoe$=function(e){try{return Jp(e,!1)}catch(e){if(t.isType(e,cn))return null;throw e}},zp.prototype.parseIsoStringOrNull_61zpoe$=function(e){try{return Jp(e,!0)}catch(e){if(t.isType(e,cn))return null;throw e}},zp.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Gp,jp,Fp,Mp,Wp,Xp,Bp=null;function qp(){return null===Bp&&new zp,Bp}function Hp(e,n){return n.compareTo_11rb$(Ra())<=0?tu(ba(t.Long.fromInt(e),n,$a())):Vp(t.Long.fromInt(e),n)}function Vp(t,e){var n=ba(Gp,$a(),e);return n.unaryMinus().lessThanOrEqual(t)&&t.lessThanOrEqual(n)?tu(ba(t,e,$a())):eu(Ht(va(t,e,ga()),X,jp))}function Kp(t,e){var n=La(t,e,$a());if(Eo(n))throw pn("Duration value cannot be NaN.".toString());var i=po(n);return J.lessThanOrEqual(i)&&i.lessThanOrEqual(Gp)?tu(i):iu(po(La(t,e,ga())))}function Jp(t,e){var n=t.length;if(0===n)throw pn("The string is empty");var i=0,o=qp().ZERO;switch(t.charCodeAt(i)){case 43:case 45:i=i+1|0}var r=i>0,c=r&&Ep(t,45);if(n<=i)throw pn("No components");if(80===t.charCodeAt(i)){if((i=i+1|0)===n)throw ln();for(var l=!1,p=null;i=0&&f<=up(t)))throw pn("Missing unit for value "+m);i=i+1|0;var y=au(t.charCodeAt(f),l);if(null!=p&&p.compareTo_11rb$(y)<=0)throw pn("Unexpected order of duration components");p=y;var T=Tp(m,46);if(y===Ra()&&T>0){var $=m.substring(0,T);o=(o=o.plus_cgako$(Vp(Yp($),y))).plus_cgako$(Kp(gr(m.substring(T)),y))}else o=o.plus_cgako$(Vp(Yp(m),y))}else{if(l||(i=i+1|0)===n)throw ln();l=!0}}else{if(e)throw ln();if(la(t,i,"Infinity",0,u.max(n-i|0,"Infinity".length),!0))o=qp().INFINITE;else{var N=null,g=!1,R=!r;if(r&&40===t.charCodeAt(i)&&41===ae(t)&&(R=!0,(i=i+1|0)==(n=n-1|0)))throw pn("No components");for(;i0){var z=O.substring(0,w);if(o=(o=o.plus_cgako$(Vp(Nr(z),x))).plus_cgako$(Kp(gr(O.substring(w)),x)),i0&&gp("+-",e.charCodeAt(0))&&(i=i+1|0);var o=(n-i|0)>16;if(o){var r,a=new Tl(i,up(e));t:do{var s;if(t.isType(a,de)&&a.isEmpty()){r=!0;break t}for(s=a.iterator();s.hasNext();){var c=s.next();if(!new _l(48,57).contains_mef7kx$(e.charCodeAt(c))){r=!1;break t}}r=!0}while(0);o=r}return o?45===e.charCodeAt(0)?y:T:aa(e,"+")?Nr(se(e,1)):Nr(e)}function Qp(e){return e.div(t.Long.fromInt(1e6))}function Zp(e){return e.multiply(t.Long.fromInt(1e6))}function tu(t){return new wp(t.shiftLeft(1))}function eu(e){return new wp(e.shiftLeft(1).add(t.Long.fromInt(1)))}function nu(t){return J.lessThanOrEqual(t)&&t.lessThanOrEqual(Gp)?tu(t):eu(Qp(t))}function iu(t){return B.lessThanOrEqual(t)&&t.lessThanOrEqual(Fp)?tu(Zp(t)):eu(Ht(t,X,jp))}function ou(t){switch(t.name){case"NANOSECONDS":return"ns";case"MICROSECONDS":return"us";case"MILLISECONDS":return"ms";case"SECONDS":return"s";case"MINUTES":return"m";case"HOURS":return"h";case"DAYS":return"d";default:throw dn(("Unknown unit: "+t).toString())}}function ru(t){switch(t){case"ns":return $a();case"us":return Na();case"ms":return ga();case"s":return Ra();case"m":return Ca();case"h":return Sa();case"d":return Ia();default:throw pn("Unknown duration unit short name: "+t)}}function au(t,e){if(!e){if(68===t)return Ia();throw pn("Invalid or unsupported duration ISO non-time unit: "+String.fromCharCode(t))}switch(t){case 72:return Sa();case 77:return Ca();case 83:return Ra();default:throw pn("Invalid duration ISO time unit: "+String.fromCharCode(t))}}function su(){}function cu(t,e){S.call(this),this.name$=t,this.ordinal$=e}function lu(){lu=function(){},Mp=new cu("SYNCHRONIZED",0),Wp=new cu("PUBLICATION",1),Xp=new cu("NONE",2)}function pu(){return lu(),Mp}function uu(){return lu(),Wp}function du(){return lu(),Xp}function hu(){Eu=this}wp.prototype.unaryMinus=function(){return e=this.value_0.unaryMinus(),n=1&this.rawValue_0.toInt(),new wp(e.shiftLeft(1).add(t.Long.fromInt(n)));var e,n},wp.prototype.plus_cgako$=function(t){var e;if(this.isInfinite()){if(t.isFinite()||this.rawValue_0.xor(t.rawValue_0).toNumber()>=0)return this;throw pn("Summing infinite durations of different signs yields an undefined result.")}if(t.isInfinite())return t;if((1&this.rawValue_0.toInt())==(1&t.rawValue_0.toInt())){var n=this.value_0.add(t.value_0);e=this.isInNanos_0()?nu(n):iu(n)}else e=this.isInMillis_0()?this.addValuesMixedRanges_0(this.value_0,t.value_0):this.addValuesMixedRanges_0(t.value_0,this.value_0);return e},wp.prototype.addValuesMixedRanges_0=function(t,e){var n,i=Qp(e),o=t.add(i);if(B.lessThanOrEqual(o)&&o.lessThanOrEqual(Fp)){var r=e.subtract(Zp(i));n=tu(Zp(o).add(r))}else n=eu(Ht(o,X,jp));return n},wp.prototype.minus_cgako$=function(t){return this.plus_cgako$(t.unaryMinus())},wp.prototype.times_za3lpa$=function(e){var n;if(this.isInfinite()){if(0===e)throw pn("Multiplying infinite duration by zero yields an undefined result.");return e>0?this:this.unaryMinus()}if(0===e)return qp().ZERO;var i=this.value_0,o=i.multiply(t.Long.fromInt(e));if(this.isInNanos_0())if(q.lessThanOrEqual(i)&&i.lessThanOrEqual(f))n=tu(o);else if(r(o.div(t.Long.fromInt(e)),i))n=nu(o);else{var a=Qp(i),s=i.subtract(Zp(a)),c=a.multiply(t.Long.fromInt(e)),l=c.add(Qp(s.multiply(t.Long.fromInt(e))));n=r(c.div(t.Long.fromInt(e)),a)&&l.xor(c).toNumber()>=0?eu(Kt(l,X.rangeTo(jp))):t.imul(ho(i),uo(e))>0?qp().INFINITE:qp().NEG_INFINITE_8be2vx$}else n=r(o.div(t.Long.fromInt(e)),i)?eu(Kt(o,X.rangeTo(jp))):t.imul(ho(i),uo(e))>0?qp().INFINITE:qp().NEG_INFINITE_8be2vx$;return n},wp.prototype.times_14dthe$=function(t){var e=lo(t);if(e===t)return this.times_za3lpa$(e);var n=this.storageUnit_0;return Kp(this.toDouble_p6uejw$(n)*t,n)},wp.prototype.div_za3lpa$=function(e){var n;if(0===e){if(this.isPositive())n=qp().INFINITE;else{if(!this.isNegative())throw pn("Dividing zero duration by zero yields an undefined result.");n=qp().NEG_INFINITE_8be2vx$}return n}if(this.isInNanos_0())return tu(this.value_0.div(t.Long.fromInt(e)));if(this.isInfinite())return this.times_za3lpa$(uo(e));var i=this.value_0.div(t.Long.fromInt(e));if(B.lessThanOrEqual(i)&&i.lessThanOrEqual(Fp)){var o=Zp(this.value_0.subtract(i.multiply(t.Long.fromInt(e)))).div(t.Long.fromInt(e));return tu(Zp(i).add(o))}return eu(i)},wp.prototype.div_14dthe$=function(t){var e=lo(t);if(e===t&&0!==e)return this.div_za3lpa$(e);var n=this.storageUnit_0;return Kp(this.toDouble_p6uejw$(n)/t,n)},wp.prototype.div_cgako$=function(t){var e=xn(this.storageUnit_0,t.storageUnit_0);return this.toDouble_p6uejw$(e)/t.toDouble_p6uejw$(e)},wp.prototype.isNegative=function(){return this.rawValue_0.toNumber()<0},wp.prototype.isPositive=function(){return this.rawValue_0.toNumber()>0},wp.prototype.isInfinite=function(){return r(this.rawValue_0,qp().INFINITE.rawValue_0)||r(this.rawValue_0,qp().NEG_INFINITE_8be2vx$.rawValue_0)},wp.prototype.isFinite=function(){return!this.isInfinite()},Object.defineProperty(wp.prototype,"absoluteValue",{configurable:!0,get:function(){return this.isNegative()?this.unaryMinus():this}}),wp.prototype.compareTo_11rb$=function(t){var e=this.rawValue_0.xor(t.rawValue_0);if(e.toNumber()<0||0==(1&e.toInt()))return this.rawValue_0.compareTo_11rb$(t.rawValue_0);var n=(1&this.rawValue_0.toInt())-(1&t.rawValue_0.toInt())|0;return this.isNegative()?0|-n:n},wp.prototype.toComponents_hve5lh$=i("kotlin.kotlin.time.Duration.toComponents_hve5lh$",(function(t){return t(this.inWholeDays,this.hoursComponent,this.minutesComponent,this.secondsComponent,this.nanosecondsComponent)})),wp.prototype.toComponents_s6np4d$=i("kotlin.kotlin.time.Duration.toComponents_s6np4d$",(function(t){return t(this.inWholeHours,this.minutesComponent,this.secondsComponent,this.nanosecondsComponent)})),wp.prototype.toComponents_vtr74h$=i("kotlin.kotlin.time.Duration.toComponents_vtr74h$",(function(t){return t(this.inWholeMinutes,this.secondsComponent,this.nanosecondsComponent)})),wp.prototype.toComponents_obfv9r$=i("kotlin.kotlin.time.Duration.toComponents_obfv9r$",(function(t){return t(this.inWholeSeconds,this.nanosecondsComponent)})),Object.defineProperty(wp.prototype,"hoursComponent",{configurable:!0,get:function(){return this.isInfinite()?0:this.inWholeHours.modulo(t.Long.fromInt(24)).toInt()}}),Object.defineProperty(wp.prototype,"minutesComponent",{configurable:!0,get:function(){return this.isInfinite()?0:this.inWholeMinutes.modulo(t.Long.fromInt(60)).toInt()}}),Object.defineProperty(wp.prototype,"secondsComponent",{configurable:!0,get:function(){return this.isInfinite()?0:this.inWholeSeconds.modulo(t.Long.fromInt(60)).toInt()}}),Object.defineProperty(wp.prototype,"nanosecondsComponent",{configurable:!0,get:function(){return this.isInfinite()?0:this.isInMillis_0()?Zp(this.value_0.modulo(t.Long.fromInt(1e3))).toInt():this.value_0.modulo(t.Long.fromInt(1e9)).toInt()}}),wp.prototype.toDouble_p6uejw$=function(t){var e;return e=this.rawValue_0,r(e,qp().INFINITE.rawValue_0)?c.POSITIVE_INFINITY:r(e,qp().NEG_INFINITE_8be2vx$.rawValue_0)?c.NEGATIVE_INFINITY:La(this.value_0.toNumber(),this.storageUnit_0,t)},wp.prototype.toLong_p6uejw$=function(t){var e;return e=this.rawValue_0,r(e,qp().INFINITE.rawValue_0)?T:r(e,qp().NEG_INFINITE_8be2vx$.rawValue_0)?y:va(this.value_0,this.storageUnit_0,t)},wp.prototype.toInt_p6uejw$=function(t){return Ht(this.toLong_p6uejw$(t),m,f).toInt()},Object.defineProperty(wp.prototype,"inDays",{configurable:!0,get:function(){return this.toDouble_p6uejw$(Ia())}}),Object.defineProperty(wp.prototype,"inHours",{configurable:!0,get:function(){return this.toDouble_p6uejw$(Sa())}}),Object.defineProperty(wp.prototype,"inMinutes",{configurable:!0,get:function(){return this.toDouble_p6uejw$(Ca())}}),Object.defineProperty(wp.prototype,"inSeconds",{configurable:!0,get:function(){return this.toDouble_p6uejw$(Ra())}}),Object.defineProperty(wp.prototype,"inMilliseconds",{configurable:!0,get:function(){return this.toDouble_p6uejw$(ga())}}),Object.defineProperty(wp.prototype,"inMicroseconds",{configurable:!0,get:function(){return this.toDouble_p6uejw$(Na())}}),Object.defineProperty(wp.prototype,"inNanoseconds",{configurable:!0,get:function(){return this.toDouble_p6uejw$($a())}}),Object.defineProperty(wp.prototype,"inWholeDays",{configurable:!0,get:function(){return this.toLong_p6uejw$(Ia())}}),Object.defineProperty(wp.prototype,"inWholeHours",{configurable:!0,get:function(){return this.toLong_p6uejw$(Sa())}}),Object.defineProperty(wp.prototype,"inWholeMinutes",{configurable:!0,get:function(){return this.toLong_p6uejw$(Ca())}}),Object.defineProperty(wp.prototype,"inWholeSeconds",{configurable:!0,get:function(){return this.toLong_p6uejw$(Ra())}}),Object.defineProperty(wp.prototype,"inWholeMilliseconds",{configurable:!0,get:function(){return this.isInMillis_0()&&this.isFinite()?this.value_0:this.toLong_p6uejw$(ga())}}),Object.defineProperty(wp.prototype,"inWholeMicroseconds",{configurable:!0,get:function(){return this.toLong_p6uejw$(Na())}}),Object.defineProperty(wp.prototype,"inWholeNanoseconds",{configurable:!0,get:function(){var t=this.value_0;return this.isInNanos_0()?t:t.compareTo_11rb$(H)>0?T:t.compareTo_11rb$(V)<0?y:Zp(t)}}),wp.prototype.toLongNanoseconds=function(){return this.inWholeNanoseconds},wp.prototype.toLongMilliseconds=function(){return this.inWholeMilliseconds},wp.prototype.toString=function(){var t;if(t=this.rawValue_0,r(t,l))return"0s";if(r(t,qp().INFINITE.rawValue_0))return"Infinity";if(r(t,qp().NEG_INFINITE_8be2vx$.rawValue_0))return"-Infinity";var e=this.isNegative(),n=_r();e&&n.append_s8itvh$(45);var i,o,a,s=this.absoluteValue,c=s.inWholeDays,p=s.hoursComponent,u=s.minutesComponent,d=s.secondsComponent,h=s.nanosecondsComponent,E=!r(c,l),_=0!==p,m=0!==u,f=0!==d||0!==h,y=0;return E&&(n.append_s8jyv4$(c).append_s8itvh$(100),y=y+1|0),(_||E&&(m||f))&&(y=(i=y)+1|0,i>0&&n.append_s8itvh$(32),n.append_s8jyv4$(p).append_s8itvh$(104)),(m||f&&(_||E))&&(y=(o=y)+1|0,o>0&&n.append_s8itvh$(32),n.append_s8jyv4$(u).append_s8itvh$(109)),f&&(y=(a=y)+1|0,a>0&&n.append_s8itvh$(32),0!==d||E||_||m?this.appendFractional_0(n,d,h,9,"s",!1):h>=1e6?this.appendFractional_0(n,h/1e6|0,h%1e6|0,6,"ms",!1):h>=1e3?this.appendFractional_0(n,h/1e3|0,h%1e3|0,3,"us",!1):n.append_s8jyv4$(h).append_pdl1vj$("ns")),e&&y>1&&n.insert_6t1mh3$(1,40).append_s8itvh$(41),n.toString()},wp.prototype.appendFractional_0=function(t,e,n,i,o,r){if(t.append_s8jyv4$(e),0!==n){t.append_s8itvh$(46);var c,l=cp(n.toString(),i,48);t:do{var p;for(p=Mt(pp(l)).iterator();p.hasNext();){var u=p.next();if(48!==s(a(l.charCodeAt(u)))){c=u;break t}}c=-1}while(0);var d=c+1|0;!r&&d<3?t.appendRange_3peag4$(l,0,d):t.appendRange_3peag4$(l,0,3*((d+2|0)/3|0)|0)}t.append_pdl1vj$(o)},wp.prototype.toString_mha1pa$=function(t,e){if(void 0===e&&(e=0),!(e>=0))throw pn(("decimals must be not negative, but was "+e).toString());var n=this.toDouble_p6uejw$(t);return _o(n)?n.toString():fa(n,Bt(e,12))+ou(t)},wp.prototype.toIsoString=function(){var t=_r();this.isNegative()&&t.append_s8itvh$(45),t.append_pdl1vj$("PT");var e=this.absoluteValue,n=e.inWholeHours,i=e.minutesComponent,o=e.secondsComponent,a=e.nanosecondsComponent,s=n;this.isInfinite()&&(s=K);var c=!r(s,l),p=0!==o||0!==a,u=0!==i||p&&c;return c&&t.append_s8jyv4$(s).append_s8itvh$(72),u&&t.append_s8jyv4$(i).append_s8itvh$(77),(p||!c&&!u)&&this.appendFractional_0(t,o,a,9,"S",!0),t.toString()},wp.$metadata$={kind:e,simpleName:"Duration",interfaces:[I]},wp.prototype.unbox=function(){return this.rawValue_0},wp.prototype.hashCode=function(){var e=0;return e=31*e+t.hashCode(this.rawValue_0)|0},wp.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.rawValue_0,e.rawValue_0)},su.$metadata$={kind:R,simpleName:"Lazy",interfaces:[]},cu.$metadata$={kind:e,simpleName:"LazyThreadSafetyMode",interfaces:[S]},cu.values=function(){return[pu(),uu(),du()]},cu.valueOf_61zpoe$=function(t){switch(t){case"SYNCHRONIZED":return pu();case"PUBLICATION":return uu();case"NONE":return du();default:ao("No enum constant kotlin.LazyThreadSafetyMode."+t)}},hu.$metadata$={kind:C,simpleName:"UNINITIALIZED_VALUE",interfaces:[]};var Eu=null;function _u(){return null===Eu&&new hu,Eu}function mu(t){this.initializer_0=t,this._value_0=_u()}function fu(t){this.value_7taq70$_0=t}function yu(t){Nu(),this.value=t}function Tu(){$u=this}Object.defineProperty(mu.prototype,"value",{configurable:!0,get:function(){var e;return this._value_0===_u()&&(this._value_0=L(this.initializer_0)(),this.initializer_0=null),null==(e=this._value_0)||t.isType(e,b)?e:ro()}}),mu.prototype.isInitialized=function(){return this._value_0!==_u()},mu.prototype.toString=function(){return this.isInitialized()?$(this.value):"Lazy value not initialized yet."},mu.prototype.writeReplace_0=function(){return new fu(this.value)},mu.$metadata$={kind:e,simpleName:"UnsafeLazyImpl",interfaces:[so,su]},Object.defineProperty(fu.prototype,"value",{get:function(){return this.value_7taq70$_0}}),fu.prototype.isInitialized=function(){return!0},fu.prototype.toString=function(){return $(this.value)},fu.$metadata$={kind:e,simpleName:"InitializedLazyImpl",interfaces:[so,su]},Object.defineProperty(yu.prototype,"isSuccess",{configurable:!0,get:function(){return!t.isType(this.value,gu)}}),Object.defineProperty(yu.prototype,"isFailure",{configurable:!0,get:function(){return t.isType(this.value,gu)}}),yu.prototype.getOrNull=i("kotlin.kotlin.Result.getOrNull",o((function(){var e=Object,n=t.throwCCE;return function(){var i;return this.isFailure?null:null==(i=this.value)||t.isType(i,e)?i:n()}}))),yu.prototype.exceptionOrNull=function(){return t.isType(this.value,gu)?this.value.exception:null},yu.prototype.toString=function(){return t.isType(this.value,gu)?this.value.toString():"Success("+$(this.value)+")"},Tu.prototype.success_mh5how$=i("kotlin.kotlin.Result.Companion.success_mh5how$",o((function(){var t=p.kotlin.Result;return function(e){return new t(e)}}))),Tu.prototype.failure_lsqlk3$=i("kotlin.kotlin.Result.Companion.failure_lsqlk3$",o((function(){var t=p.kotlin.createFailure_tcv7n7$,e=p.kotlin.Result;return function(n){return new e(t(n))}}))),Tu.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var $u=null;function Nu(){return null===$u&&new Tu,$u}function gu(t){this.exception=t}function Ru(t){return new gu(t)}function Cu(e){if(t.isType(e.value,gu))throw e.value.exception}function Su(t){void 0===t&&(t="An operation is not implemented."),nn(t,this),this.name="NotImplementedError"}function Iu(t,e){this.first=t,this.second=e}function Lu(t,e){return new Iu(t,e)}function bu(t,e,n){this.first=t,this.second=e,this.third=n}function vu(t){Du(),this.data=t}function Ou(){Uu=this,this.MIN_VALUE=new vu(0),this.MAX_VALUE=new vu(-1),this.SIZE_BYTES=1,this.SIZE_BITS=8}gu.prototype.equals=function(e){return t.isType(e,gu)&&r(this.exception,e.exception)},gu.prototype.hashCode=function(){return D(this.exception)},gu.prototype.toString=function(){return"Failure("+this.exception+")"},gu.$metadata$={kind:e,simpleName:"Failure",interfaces:[so]},yu.$metadata$={kind:e,simpleName:"Result",interfaces:[so]},yu.prototype.unbox=function(){return this.value},yu.prototype.hashCode=function(){var e=0;return e=31*e+t.hashCode(this.value)|0},yu.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.value,e.value)},Su.$metadata$={kind:e,simpleName:"NotImplementedError",interfaces:[en]},Iu.prototype.toString=function(){return"("+this.first+", "+this.second+")"},Iu.$metadata$={kind:e,simpleName:"Pair",interfaces:[so]},Iu.prototype.component1=function(){return this.first},Iu.prototype.component2=function(){return this.second},Iu.prototype.copy_xwzc9p$=function(t,e){return new Iu(void 0===t?this.first:t,void 0===e?this.second:e)},Iu.prototype.hashCode=function(){var e=0;return e=31*(e=31*e+t.hashCode(this.first)|0)+t.hashCode(this.second)|0},Iu.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.first,e.first)&&t.equals(this.second,e.second)},bu.prototype.toString=function(){return"("+this.first+", "+this.second+", "+this.third+")"},bu.$metadata$={kind:e,simpleName:"Triple",interfaces:[so]},bu.prototype.component1=function(){return this.first},bu.prototype.component2=function(){return this.second},bu.prototype.component3=function(){return this.third},bu.prototype.copy_1llc0w$=function(t,e,n){return new bu(void 0===t?this.first:t,void 0===e?this.second:e,void 0===n?this.third:n)},bu.prototype.hashCode=function(){var e=0;return e=31*(e=31*(e=31*e+t.hashCode(this.first)|0)+t.hashCode(this.second)|0)+t.hashCode(this.third)|0},bu.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.first,e.first)&&t.equals(this.second,e.second)&&t.equals(this.third,e.third)},Ou.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Uu=null;function Du(){return null===Uu&&new Ou,Uu}function Au(t){this.storage=t}function ku(t){this.array_0=t,this.index_0=0}function Pu(t){zu(),this.data=t}function xu(){wu=this,this.MIN_VALUE=new Pu(0),this.MAX_VALUE=new Pu(-1),this.SIZE_BYTES=4,this.SIZE_BITS=32}vu.prototype.compareTo_11rb$=i("kotlin.kotlin.UByte.compareTo_11rb$",(function(e){return t.primitiveCompareTo(255&this.data,255&e.data)})),vu.prototype.compareTo_6hrhkk$=i("kotlin.kotlin.UByte.compareTo_6hrhkk$",(function(e){return t.primitiveCompareTo(255&this.data,65535&e.data)})),vu.prototype.compareTo_s87ys9$=i("kotlin.kotlin.UByte.compareTo_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintCompare_vux9f0$;return function(n){return e(new t(255&this.data).data,n.data)}}))),vu.prototype.compareTo_mpgczg$=i("kotlin.kotlin.UByte.compareTo_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongCompare_3pjtqy$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)).data,o.data)}}))),vu.prototype.plus_mpmjao$=i("kotlin.kotlin.UByte.plus_mpmjao$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(255&this.data).data+new t(255&e.data).data|0)}}))),vu.prototype.plus_6hrhkk$=i("kotlin.kotlin.UByte.plus_6hrhkk$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(255&this.data).data+new t(65535&e.data).data|0)}}))),vu.prototype.plus_s87ys9$=i("kotlin.kotlin.UByte.plus_s87ys9$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(255&this.data).data+e.data|0)}}))),vu.prototype.plus_mpgczg$=i("kotlin.kotlin.UByte.plus_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong;return function(i){return new n(new n(t.Long.fromInt(this.data).and(e)).data.add(i.data))}}))),vu.prototype.minus_mpmjao$=i("kotlin.kotlin.UByte.minus_mpmjao$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(255&this.data).data-new t(255&e.data).data|0)}}))),vu.prototype.minus_6hrhkk$=i("kotlin.kotlin.UByte.minus_6hrhkk$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(255&this.data).data-new t(65535&e.data).data|0)}}))),vu.prototype.minus_s87ys9$=i("kotlin.kotlin.UByte.minus_s87ys9$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(255&this.data).data-e.data|0)}}))),vu.prototype.minus_mpgczg$=i("kotlin.kotlin.UByte.minus_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong;return function(i){return new n(new n(t.Long.fromInt(this.data).and(e)).data.subtract(i.data))}}))),vu.prototype.times_mpmjao$=i("kotlin.kotlin.UByte.times_mpmjao$",o((function(){var e=p.kotlin.UInt;return function(n){return new e(t.imul(new e(255&this.data).data,new e(255&n.data).data))}}))),vu.prototype.times_6hrhkk$=i("kotlin.kotlin.UByte.times_6hrhkk$",o((function(){var e=p.kotlin.UInt;return function(n){return new e(t.imul(new e(255&this.data).data,new e(65535&n.data).data))}}))),vu.prototype.times_s87ys9$=i("kotlin.kotlin.UByte.times_s87ys9$",o((function(){var e=p.kotlin.UInt;return function(n){return new e(t.imul(new e(255&this.data).data,n.data))}}))),vu.prototype.times_mpgczg$=i("kotlin.kotlin.UByte.times_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong;return function(i){return new n(new n(t.Long.fromInt(this.data).and(e)).data.multiply(i.data))}}))),vu.prototype.div_mpmjao$=i("kotlin.kotlin.UByte.div_mpmjao$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(255&this.data),new t(255&n.data))}}))),vu.prototype.div_6hrhkk$=i("kotlin.kotlin.UByte.div_6hrhkk$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(255&this.data),new t(65535&n.data))}}))),vu.prototype.div_s87ys9$=i("kotlin.kotlin.UByte.div_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(255&this.data),n)}}))),vu.prototype.div_mpgczg$=i("kotlin.kotlin.UByte.div_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),vu.prototype.rem_mpmjao$=i("kotlin.kotlin.UByte.rem_mpmjao$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(255&this.data),new t(255&n.data))}}))),vu.prototype.rem_6hrhkk$=i("kotlin.kotlin.UByte.rem_6hrhkk$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(255&this.data),new t(65535&n.data))}}))),vu.prototype.rem_s87ys9$=i("kotlin.kotlin.UByte.rem_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(255&this.data),n)}}))),vu.prototype.rem_mpgczg$=i("kotlin.kotlin.UByte.rem_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),vu.prototype.floorDiv_mpmjao$=i("kotlin.kotlin.UByte.floorDiv_mpmjao$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(255&this.data),new t(255&n.data))}}))),vu.prototype.floorDiv_6hrhkk$=i("kotlin.kotlin.UByte.floorDiv_6hrhkk$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(255&this.data),new t(65535&n.data))}}))),vu.prototype.floorDiv_s87ys9$=i("kotlin.kotlin.UByte.floorDiv_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(255&this.data),n)}}))),vu.prototype.floorDiv_mpgczg$=i("kotlin.kotlin.UByte.floorDiv_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),vu.prototype.mod_mpmjao$=i("kotlin.kotlin.UByte.mod_mpmjao$",o((function(){var e=p.kotlin.UInt,n=p.kotlin.uintRemainder_oqfnby$,i=t.toByte,o=p.kotlin.UByte;return function(t){return new o(i(n(new e(255&this.data),new e(255&t.data)).data))}}))),vu.prototype.mod_6hrhkk$=i("kotlin.kotlin.UByte.mod_6hrhkk$",o((function(){var e=p.kotlin.UInt,n=p.kotlin.uintRemainder_oqfnby$,i=t.toShort,o=p.kotlin.UShort;return function(t){return new o(i(n(new e(255&this.data),new e(65535&t.data)).data))}}))),vu.prototype.mod_s87ys9$=i("kotlin.kotlin.UByte.mod_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(255&this.data),n)}}))),vu.prototype.mod_mpgczg$=i("kotlin.kotlin.UByte.mod_mpgczg$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),vu.prototype.inc=i("kotlin.kotlin.UByte.inc",o((function(){var e=t.toByte,n=p.kotlin.UByte;return function(){return new n(e(this.data+1))}}))),vu.prototype.dec=i("kotlin.kotlin.UByte.dec",o((function(){var e=t.toByte,n=p.kotlin.UByte;return function(){return new n(e(this.data-1))}}))),vu.prototype.rangeTo_mpmjao$=i("kotlin.kotlin.UByte.rangeTo_mpmjao$",o((function(){var t=p.kotlin.ranges.UIntRange,e=p.kotlin.UInt;return function(n){return new t(new e(255&this.data),new e(255&n.data))}}))),vu.prototype.and_mpmjao$=i("kotlin.kotlin.UByte.and_mpmjao$",o((function(){var e=p.kotlin.UByte,n=t.toByte;return function(t){return new e(n(this.data&t.data))}}))),vu.prototype.or_mpmjao$=i("kotlin.kotlin.UByte.or_mpmjao$",o((function(){var e=p.kotlin.UByte,n=t.toByte;return function(t){return new e(n(this.data|t.data))}}))),vu.prototype.xor_mpmjao$=i("kotlin.kotlin.UByte.xor_mpmjao$",o((function(){var e=p.kotlin.UByte,n=t.toByte;return function(t){return new e(n(this.data^t.data))}}))),vu.prototype.inv=i("kotlin.kotlin.UByte.inv",o((function(){var e=p.kotlin.UByte,n=t.toByte;return function(){return new e(n(~this.data))}}))),vu.prototype.toByte=i("kotlin.kotlin.UByte.toByte",(function(){return this.data})),vu.prototype.toShort=i("kotlin.kotlin.UByte.toShort",o((function(){var e=t.toShort;return function(){return e(255&this.data)}}))),vu.prototype.toInt=i("kotlin.kotlin.UByte.toInt",(function(){return 255&this.data})),vu.prototype.toLong=i("kotlin.kotlin.UByte.toLong",o((function(){var e=t.Long.fromInt(255);return function(){return t.Long.fromInt(this.data).and(e)}}))),vu.prototype.toUByte=i("kotlin.kotlin.UByte.toUByte",(function(){return this})),vu.prototype.toUShort=i("kotlin.kotlin.UByte.toUShort",o((function(){var e=p.kotlin.UShort,n=t.toShort;return function(){return new e(n(255&this.data))}}))),vu.prototype.toUInt=i("kotlin.kotlin.UByte.toUInt",o((function(){var t=p.kotlin.UInt;return function(){return new t(255&this.data)}}))),vu.prototype.toULong=i("kotlin.kotlin.UByte.toULong",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong;return function(){return new n(t.Long.fromInt(this.data).and(e))}}))),vu.prototype.toFloat=i("kotlin.kotlin.UByte.toFloat",(function(){return 255&this.data})),vu.prototype.toDouble=i("kotlin.kotlin.UByte.toDouble",(function(){return 255&this.data})),vu.prototype.toString=function(){return(255&this.data).toString()},vu.$metadata$={kind:e,simpleName:"UByte",interfaces:[I]},vu.prototype.unbox=function(){return this.data},vu.prototype.hashCode=function(){var e=0;return e=31*e+t.hashCode(this.data)|0},vu.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)},Au.prototype.get_za3lpa$=function(t){return new vu(this.storage[t])},Au.prototype.set_2c6cbe$=function(t,e){this.storage[t]=e.data},Object.defineProperty(Au.prototype,"size",{configurable:!0,get:function(){return this.storage.length}}),Au.prototype.iterator=function(){return new ku(this.storage)},ku.prototype.hasNext=function(){return this.index_0>>e)}}))),Pu.prototype.and_s87ys9$=i("kotlin.kotlin.UInt.and_s87ys9$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(this.data&e.data)}}))),Pu.prototype.or_s87ys9$=i("kotlin.kotlin.UInt.or_s87ys9$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(this.data|e.data)}}))),Pu.prototype.xor_s87ys9$=i("kotlin.kotlin.UInt.xor_s87ys9$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(this.data^e.data)}}))),Pu.prototype.inv=i("kotlin.kotlin.UInt.inv",o((function(){var t=p.kotlin.UInt;return function(){return new t(~this.data)}}))),Pu.prototype.toByte=i("kotlin.kotlin.UInt.toByte",o((function(){var e=t.toByte;return function(){return e(this.data)}}))),Pu.prototype.toShort=i("kotlin.kotlin.UInt.toShort",o((function(){var e=t.toShort;return function(){return e(this.data)}}))),Pu.prototype.toInt=i("kotlin.kotlin.UInt.toInt",(function(){return this.data})),Pu.prototype.toLong=i("kotlin.kotlin.UInt.toLong",o((function(){var e=new t.Long(-1,0);return function(){return t.Long.fromInt(this.data).and(e)}}))),Pu.prototype.toUByte=i("kotlin.kotlin.UInt.toUByte",o((function(){var e=t.toByte,n=p.kotlin.UByte;return function(){return new n(e(this.data))}}))),Pu.prototype.toUShort=i("kotlin.kotlin.UInt.toUShort",o((function(){var e=t.toShort,n=p.kotlin.UShort;return function(){return new n(e(this.data))}}))),Pu.prototype.toUInt=i("kotlin.kotlin.UInt.toUInt",(function(){return this})),Pu.prototype.toULong=i("kotlin.kotlin.UInt.toULong",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong;return function(){return new n(t.Long.fromInt(this.data).and(e))}}))),Pu.prototype.toFloat=i("kotlin.kotlin.UInt.toFloat",o((function(){var t=p.kotlin.uintToDouble_za3lpa$;return function(){return t(this.data)}}))),Pu.prototype.toDouble=i("kotlin.kotlin.UInt.toDouble",o((function(){var t=p.kotlin.uintToDouble_za3lpa$;return function(){return t(this.data)}}))),Pu.prototype.toString=function(){return t.Long.fromInt(this.data).and(g).toString()},Pu.$metadata$={kind:e,simpleName:"UInt",interfaces:[I]},Pu.prototype.unbox=function(){return this.data},Pu.prototype.hashCode=function(){var e=0;return e=31*e+t.hashCode(this.data)|0},Pu.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)},Gu.prototype.get_za3lpa$=function(t){return new Pu(this.storage[t])},Gu.prototype.set_6sqrdv$=function(t,e){this.storage[t]=e.data},Object.defineProperty(Gu.prototype,"size",{configurable:!0,get:function(){return this.storage.length}}),Gu.prototype.iterator=function(){return new ju(this.storage)},ju.prototype.hasNext=function(){return this.index_00},Fu.prototype.equals=function(e){var n,i;return t.isType(e,Fu)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null))},Fu.prototype.hashCode=function(){return this.isEmpty()?-1:(31*this.first.data|0)+this.last.data|0},Fu.prototype.toString=function(){return this.first.toString()+".."+this.last},Mu.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Wu=null;function Xu(){return null===Wu&&new Mu,Wu}function Bu(t,e,n){if(Vu(),0===n)throw pn("Step must be non-zero.");if(-2147483648===n)throw pn("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=hd(t,e,n),this.step=n}function qu(){Hu=this}Fu.$metadata$={kind:e,simpleName:"UIntRange",interfaces:[Wl,Ml,Bu]},Bu.prototype.iterator=function(){return new Ku(this.first,this.last,this.step)},Bu.prototype.isEmpty=function(){return this.step>0?Nd(this.first.data,this.last.data)>0:Nd(this.first.data,this.last.data)<0},Bu.prototype.equals=function(e){var n,i;return t.isType(e,Bu)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null)&&this.step===e.step)},Bu.prototype.hashCode=function(){return this.isEmpty()?-1:(31*((31*this.first.data|0)+this.last.data|0)|0)+this.step|0},Bu.prototype.toString=function(){return this.step>0?this.first.toString()+".."+this.last+" step "+this.step:this.first.toString()+" downTo "+this.last+" step "+(0|-this.step)},qu.prototype.fromClosedRange_fjk8us$=function(t,e,n){return new Bu(t,e,n)},qu.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Hu=null;function Vu(){return null===Hu&&new qu,Hu}function Ku(t,e,n){this.finalElement_0=e,this.hasNext_0=n>0?Nd(t.data,e.data)<=0:Nd(t.data,e.data)>=0,this.step_0=new Pu(n),this.next_0=this.hasNext_0?t:this.finalElement_0}function Ju(t){Zu(),this.data=t}function Yu(){Qu=this,this.MIN_VALUE=new Ju(l),this.MAX_VALUE=new Ju(h),this.SIZE_BYTES=8,this.SIZE_BITS=64}Bu.$metadata$={kind:e,simpleName:"UIntProgression",interfaces:[pe]},Ku.prototype.hasNext=function(){return this.hasNext_0},Ku.prototype.next=function(){var t=this.next_0;if(null!=t&&t.equals(this.finalElement_0)){if(!this.hasNext_0)throw Rn();this.hasNext_0=!1}else this.next_0=new Pu(this.next_0.data+this.step_0.data|0);return t},Ku.$metadata$={kind:e,simpleName:"UIntProgressionIterator",interfaces:[ge]},Yu.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var Qu=null;function Zu(){return null===Qu&&new Yu,Qu}function td(t){this.storage=t}function ed(t){this.array_0=t,this.index_0=0}function nd(t,e){rd(),ad.call(this,t,e,F)}function id(){od=this,this.EMPTY=new nd(Zu().MAX_VALUE,Zu().MIN_VALUE)}Ju.prototype.compareTo_mpmjao$=i("kotlin.kotlin.ULong.compareTo_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongCompare_3pjtqy$;return function(o){return i(this.data,new n(t.Long.fromInt(o.data).and(e)).data)}}))),Ju.prototype.compareTo_6hrhkk$=i("kotlin.kotlin.ULong.compareTo_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongCompare_3pjtqy$;return function(o){return i(this.data,new n(t.Long.fromInt(o.data).and(e)).data)}}))),Ju.prototype.compareTo_s87ys9$=i("kotlin.kotlin.ULong.compareTo_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong,i=p.kotlin.ulongCompare_3pjtqy$;return function(o){return i(this.data,new n(t.Long.fromInt(o.data).and(e)).data)}}))),Ju.prototype.compareTo_11rb$=i("kotlin.kotlin.ULong.compareTo_11rb$",o((function(){var t=p.kotlin.ulongCompare_3pjtqy$;return function(e){return t(this.data,e.data)}}))),Ju.prototype.plus_mpmjao$=i("kotlin.kotlin.ULong.plus_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong;return function(i){return new n(this.data.add(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.plus_6hrhkk$=i("kotlin.kotlin.ULong.plus_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong;return function(i){return new n(this.data.add(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.plus_s87ys9$=i("kotlin.kotlin.ULong.plus_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong;return function(i){return new n(this.data.add(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.plus_mpgczg$=i("kotlin.kotlin.ULong.plus_mpgczg$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.add(e.data))}}))),Ju.prototype.minus_mpmjao$=i("kotlin.kotlin.ULong.minus_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong;return function(i){return new n(this.data.subtract(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.minus_6hrhkk$=i("kotlin.kotlin.ULong.minus_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong;return function(i){return new n(this.data.subtract(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.minus_s87ys9$=i("kotlin.kotlin.ULong.minus_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong;return function(i){return new n(this.data.subtract(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.minus_mpgczg$=i("kotlin.kotlin.ULong.minus_mpgczg$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.subtract(e.data))}}))),Ju.prototype.times_mpmjao$=i("kotlin.kotlin.ULong.times_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong;return function(i){return new n(this.data.multiply(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.times_6hrhkk$=i("kotlin.kotlin.ULong.times_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong;return function(i){return new n(this.data.multiply(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.times_s87ys9$=i("kotlin.kotlin.ULong.times_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong;return function(i){return new n(this.data.multiply(new n(t.Long.fromInt(i.data).and(e)).data))}}))),Ju.prototype.times_mpgczg$=i("kotlin.kotlin.ULong.times_mpgczg$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.multiply(e.data))}}))),Ju.prototype.div_mpmjao$=i("kotlin.kotlin.ULong.div_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.div_6hrhkk$=i("kotlin.kotlin.ULong.div_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.div_s87ys9$=i("kotlin.kotlin.ULong.div_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.div_mpgczg$=i("kotlin.kotlin.ULong.div_mpgczg$",o((function(){var t=p.kotlin.ulongDivide_jpm79w$;return function(e){return t(this,e)}}))),Ju.prototype.rem_mpmjao$=i("kotlin.kotlin.ULong.rem_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.rem_6hrhkk$=i("kotlin.kotlin.ULong.rem_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.rem_s87ys9$=i("kotlin.kotlin.ULong.rem_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.rem_mpgczg$=i("kotlin.kotlin.ULong.rem_mpgczg$",o((function(){var t=p.kotlin.ulongRemainder_jpm79w$;return function(e){return t(this,e)}}))),Ju.prototype.floorDiv_mpmjao$=i("kotlin.kotlin.ULong.floorDiv_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.floorDiv_6hrhkk$=i("kotlin.kotlin.ULong.floorDiv_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.floorDiv_s87ys9$=i("kotlin.kotlin.ULong.floorDiv_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(this,new n(t.Long.fromInt(o.data).and(e)))}}))),Ju.prototype.floorDiv_mpgczg$=i("kotlin.kotlin.ULong.floorDiv_mpgczg$",o((function(){var t=p.kotlin.ulongDivide_jpm79w$;return function(e){return t(this,e)}}))),Ju.prototype.mod_mpmjao$=i("kotlin.kotlin.ULong.mod_mpmjao$",o((function(){var e=t.Long.fromInt(255),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$,o=t.toByte,r=p.kotlin.UByte;return function(a){return new r(o(i(this,new n(t.Long.fromInt(a.data).and(e))).data.toInt()))}}))),Ju.prototype.mod_6hrhkk$=i("kotlin.kotlin.ULong.mod_6hrhkk$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$,o=t.toShort,r=p.kotlin.UShort;return function(a){return new r(o(i(this,new n(t.Long.fromInt(a.data).and(e))).data.toInt()))}}))),Ju.prototype.mod_s87ys9$=i("kotlin.kotlin.ULong.mod_s87ys9$",o((function(){var e=new t.Long(-1,0),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$,o=p.kotlin.UInt;return function(r){return new o(i(this,new n(t.Long.fromInt(r.data).and(e))).data.toInt())}}))),Ju.prototype.mod_mpgczg$=i("kotlin.kotlin.ULong.mod_mpgczg$",o((function(){var t=p.kotlin.ulongRemainder_jpm79w$;return function(e){return t(this,e)}}))),Ju.prototype.inc=i("kotlin.kotlin.ULong.inc",o((function(){var t=p.kotlin.ULong;return function(){return new t(this.data.inc())}}))),Ju.prototype.dec=i("kotlin.kotlin.ULong.dec",o((function(){var t=p.kotlin.ULong;return function(){return new t(this.data.dec())}}))),Ju.prototype.rangeTo_mpgczg$=i("kotlin.kotlin.ULong.rangeTo_mpgczg$",o((function(){var t=p.kotlin.ranges.ULongRange;return function(e){return new t(this,e)}}))),Ju.prototype.shl_za3lpa$=i("kotlin.kotlin.ULong.shl_za3lpa$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.shiftLeft(e))}}))),Ju.prototype.shr_za3lpa$=i("kotlin.kotlin.ULong.shr_za3lpa$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.shiftRightUnsigned(e))}}))),Ju.prototype.and_mpgczg$=i("kotlin.kotlin.ULong.and_mpgczg$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.and(e.data))}}))),Ju.prototype.or_mpgczg$=i("kotlin.kotlin.ULong.or_mpgczg$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.or(e.data))}}))),Ju.prototype.xor_mpgczg$=i("kotlin.kotlin.ULong.xor_mpgczg$",o((function(){var t=p.kotlin.ULong;return function(e){return new t(this.data.xor(e.data))}}))),Ju.prototype.inv=i("kotlin.kotlin.ULong.inv",o((function(){var t=p.kotlin.ULong;return function(){return new t(this.data.inv())}}))),Ju.prototype.toByte=i("kotlin.kotlin.ULong.toByte",o((function(){var e=t.toByte;return function(){return e(this.data.toInt())}}))),Ju.prototype.toShort=i("kotlin.kotlin.ULong.toShort",o((function(){var e=t.toShort;return function(){return e(this.data.toInt())}}))),Ju.prototype.toInt=i("kotlin.kotlin.ULong.toInt",(function(){return this.data.toInt()})),Ju.prototype.toLong=i("kotlin.kotlin.ULong.toLong",(function(){return this.data})),Ju.prototype.toUByte=i("kotlin.kotlin.ULong.toUByte",o((function(){var e=t.toByte,n=p.kotlin.UByte;return function(){return new n(e(this.data.toInt()))}}))),Ju.prototype.toUShort=i("kotlin.kotlin.ULong.toUShort",o((function(){var e=t.toShort,n=p.kotlin.UShort;return function(){return new n(e(this.data.toInt()))}}))),Ju.prototype.toUInt=i("kotlin.kotlin.ULong.toUInt",o((function(){var t=p.kotlin.UInt;return function(){return new t(this.data.toInt())}}))),Ju.prototype.toULong=i("kotlin.kotlin.ULong.toULong",(function(){return this})),Ju.prototype.toFloat=i("kotlin.kotlin.ULong.toFloat",o((function(){var t=p.kotlin.ulongToDouble_s8cxhz$;return function(){return t(this.data)}}))),Ju.prototype.toDouble=i("kotlin.kotlin.ULong.toDouble",o((function(){var t=p.kotlin.ulongToDouble_s8cxhz$;return function(){return t(this.data)}}))),Ju.prototype.toString=function(){return Sd(this.data)},Ju.$metadata$={kind:e,simpleName:"ULong",interfaces:[I]},Ju.prototype.unbox=function(){return this.data},Ju.prototype.hashCode=function(){var e=0;return e=31*e+t.hashCode(this.data)|0},Ju.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)},td.prototype.get_za3lpa$=function(t){return new Ju(this.storage[t])},td.prototype.set_2ccimm$=function(t,e){this.storage[t]=e.data},Object.defineProperty(td.prototype,"size",{configurable:!0,get:function(){return this.storage.length}}),td.prototype.iterator=function(){return new ed(this.storage)},ed.prototype.hasNext=function(){return this.index_00},nd.prototype.equals=function(e){var n,i;return t.isType(e,nd)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null))},nd.prototype.hashCode=function(){return this.isEmpty()?-1:(31*new Ju(this.first.data.xor(new Ju(this.first.data.shiftRightUnsigned(32)).data)).data.toInt()|0)+new Ju(this.last.data.xor(new Ju(this.last.data.shiftRightUnsigned(32)).data)).data.toInt()|0},nd.prototype.toString=function(){return this.first.toString()+".."+this.last},id.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var od=null;function rd(){return null===od&&new id,od}function ad(t,e,n){if(ld(),r(n,l))throw pn("Step must be non-zero.");if(r(n,y))throw pn("Step must be greater than Long.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=Ed(t,e,n),this.step=n}function sd(){cd=this}nd.$metadata$={kind:e,simpleName:"ULongRange",interfaces:[Wl,Ml,ad]},ad.prototype.iterator=function(){return new pd(this.first,this.last,this.step)},ad.prototype.isEmpty=function(){return this.step.toNumber()>0?gd(this.first.data,this.last.data)>0:gd(this.first.data,this.last.data)<0},ad.prototype.equals=function(e){var n,i;return t.isType(e,ad)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null)&&r(this.step,e.step))},ad.prototype.hashCode=function(){return this.isEmpty()?-1:(31*((31*new Ju(this.first.data.xor(new Ju(this.first.data.shiftRightUnsigned(32)).data)).data.toInt()|0)+new Ju(this.last.data.xor(new Ju(this.last.data.shiftRightUnsigned(32)).data)).data.toInt()|0)|0)+this.step.xor(this.step.shiftRightUnsigned(32)).toInt()|0},ad.prototype.toString=function(){return this.step.toNumber()>0?this.first.toString()+".."+this.last+" step "+this.step.toString():this.first.toString()+" downTo "+this.last+" step "+this.step.unaryMinus().toString()},sd.prototype.fromClosedRange_15zasp$=function(t,e,n){return new ad(t,e,n)},sd.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var cd=null;function ld(){return null===cd&&new sd,cd}function pd(t,e,n){this.finalElement_0=e,this.hasNext_0=n.toNumber()>0?gd(t.data,e.data)<=0:gd(t.data,e.data)>=0,this.step_0=new Ju(n),this.next_0=this.hasNext_0?t:this.finalElement_0}function ud(t,e,n){var i=Rd(t,n),o=Rd(e,n);return Nd(i.data,o.data)>=0?new Pu(i.data-o.data|0):new Pu(new Pu(i.data-o.data|0).data+n.data|0)}function dd(t,e,n){var i=Cd(t,n),o=Cd(e,n);return gd(i.data,o.data)>=0?new Ju(i.data.subtract(o.data)):new Ju(new Ju(i.data.subtract(o.data)).data.add(n.data))}function hd(t,e,n){if(n>0)return Nd(t.data,e.data)>=0?e:new Pu(e.data-ud(e,t,new Pu(n)).data|0);if(n<0)return Nd(t.data,e.data)<=0?e:new Pu(e.data+ud(t,e,new Pu(0|-n)).data|0);throw pn("Step is zero.")}function Ed(t,e,n){if(n.toNumber()>0)return gd(t.data,e.data)>=0?e:new Ju(e.data.subtract(dd(e,t,new Ju(n)).data));if(n.toNumber()<0)return gd(t.data,e.data)<=0?e:new Ju(e.data.add(dd(t,e,new Ju(n.unaryMinus())).data));throw pn("Step is zero.")}function _d(t){yd(),this.data=t}function md(){fd=this,this.MIN_VALUE=new _d(0),this.MAX_VALUE=new _d(-1),this.SIZE_BYTES=2,this.SIZE_BITS=16}ad.$metadata$={kind:e,simpleName:"ULongProgression",interfaces:[pe]},pd.prototype.hasNext=function(){return this.hasNext_0},pd.prototype.next=function(){var t=this.next_0;if(null!=t&&t.equals(this.finalElement_0)){if(!this.hasNext_0)throw Rn();this.hasNext_0=!1}else this.next_0=new Ju(this.next_0.data.add(this.step_0.data));return t},pd.$metadata$={kind:e,simpleName:"ULongProgressionIterator",interfaces:[ge]},md.$metadata$={kind:C,simpleName:"Companion",interfaces:[]};var fd=null;function yd(){return null===fd&&new md,fd}function Td(t){this.storage=t}function $d(t){this.array_0=t,this.index_0=0}function Nd(e,n){return t.primitiveCompareTo(-2147483648^e,-2147483648^n)}function gd(t,e){return t.xor(y).compareTo_11rb$(e.xor(y))}function Rd(e,n){return new Pu(t.Long.fromInt(e.data).and(g).modulo(t.Long.fromInt(n.data).and(g)).toInt())}function Cd(t,e){var n=t.data,i=e.data;if(i.toNumber()<0)return gd(t.data,e.data)<0?t:new Ju(t.data.subtract(e.data));if(n.toNumber()>=0)return new Ju(n.modulo(i));var o=n.shiftRightUnsigned(1).div(i).shiftLeft(1),r=n.subtract(o.multiply(i));return new Ju(r.subtract(gd(new Ju(r).data,new Ju(i).data)>=0?i:l))}function Sd(t){return Id(t,10)}function Id(e,n){if(e.toNumber()>=0)return Un(e,n);var i=e.shiftRightUnsigned(1).div(t.Long.fromInt(n)).shiftLeft(1),o=e.subtract(i.multiply(t.Long.fromInt(n)));return o.toNumber()>=n&&(o=o.subtract(t.Long.fromInt(n)),i=i.add(t.Long.fromInt(1))),Un(i,n)+Un(o,n)}_d.prototype.compareTo_mpmjao$=i("kotlin.kotlin.UShort.compareTo_mpmjao$",(function(e){return t.primitiveCompareTo(65535&this.data,255&e.data)})),_d.prototype.compareTo_11rb$=i("kotlin.kotlin.UShort.compareTo_11rb$",(function(e){return t.primitiveCompareTo(65535&this.data,65535&e.data)})),_d.prototype.compareTo_s87ys9$=i("kotlin.kotlin.UShort.compareTo_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintCompare_vux9f0$;return function(n){return e(new t(65535&this.data).data,n.data)}}))),_d.prototype.compareTo_mpgczg$=i("kotlin.kotlin.UShort.compareTo_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongCompare_3pjtqy$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)).data,o.data)}}))),_d.prototype.plus_mpmjao$=i("kotlin.kotlin.UShort.plus_mpmjao$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data+new t(255&e.data).data|0)}}))),_d.prototype.plus_6hrhkk$=i("kotlin.kotlin.UShort.plus_6hrhkk$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data+new t(65535&e.data).data|0)}}))),_d.prototype.plus_s87ys9$=i("kotlin.kotlin.UShort.plus_s87ys9$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data+e.data|0)}}))),_d.prototype.plus_mpgczg$=i("kotlin.kotlin.UShort.plus_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong;return function(i){return new n(new n(t.Long.fromInt(this.data).and(e)).data.add(i.data))}}))),_d.prototype.minus_mpmjao$=i("kotlin.kotlin.UShort.minus_mpmjao$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data-new t(255&e.data).data|0)}}))),_d.prototype.minus_6hrhkk$=i("kotlin.kotlin.UShort.minus_6hrhkk$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data-new t(65535&e.data).data|0)}}))),_d.prototype.minus_s87ys9$=i("kotlin.kotlin.UShort.minus_s87ys9$",o((function(){var t=p.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data-e.data|0)}}))),_d.prototype.minus_mpgczg$=i("kotlin.kotlin.UShort.minus_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong;return function(i){return new n(new n(t.Long.fromInt(this.data).and(e)).data.subtract(i.data))}}))),_d.prototype.times_mpmjao$=i("kotlin.kotlin.UShort.times_mpmjao$",o((function(){var e=p.kotlin.UInt;return function(n){return new e(t.imul(new e(65535&this.data).data,new e(255&n.data).data))}}))),_d.prototype.times_6hrhkk$=i("kotlin.kotlin.UShort.times_6hrhkk$",o((function(){var e=p.kotlin.UInt;return function(n){return new e(t.imul(new e(65535&this.data).data,new e(65535&n.data).data))}}))),_d.prototype.times_s87ys9$=i("kotlin.kotlin.UShort.times_s87ys9$",o((function(){var e=p.kotlin.UInt;return function(n){return new e(t.imul(new e(65535&this.data).data,n.data))}}))),_d.prototype.times_mpgczg$=i("kotlin.kotlin.UShort.times_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong;return function(i){return new n(new n(t.Long.fromInt(this.data).and(e)).data.multiply(i.data))}}))),_d.prototype.div_mpmjao$=i("kotlin.kotlin.UShort.div_mpmjao$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(65535&this.data),new t(255&n.data))}}))),_d.prototype.div_6hrhkk$=i("kotlin.kotlin.UShort.div_6hrhkk$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(65535&this.data),new t(65535&n.data))}}))),_d.prototype.div_s87ys9$=i("kotlin.kotlin.UShort.div_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(65535&this.data),n)}}))),_d.prototype.div_mpgczg$=i("kotlin.kotlin.UShort.div_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),_d.prototype.rem_mpmjao$=i("kotlin.kotlin.UShort.rem_mpmjao$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(65535&this.data),new t(255&n.data))}}))),_d.prototype.rem_6hrhkk$=i("kotlin.kotlin.UShort.rem_6hrhkk$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(65535&this.data),new t(65535&n.data))}}))),_d.prototype.rem_s87ys9$=i("kotlin.kotlin.UShort.rem_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(65535&this.data),n)}}))),_d.prototype.rem_mpgczg$=i("kotlin.kotlin.UShort.rem_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),_d.prototype.floorDiv_mpmjao$=i("kotlin.kotlin.UShort.floorDiv_mpmjao$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(65535&this.data),new t(255&n.data))}}))),_d.prototype.floorDiv_6hrhkk$=i("kotlin.kotlin.UShort.floorDiv_6hrhkk$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(65535&this.data),new t(65535&n.data))}}))),_d.prototype.floorDiv_s87ys9$=i("kotlin.kotlin.UShort.floorDiv_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintDivide_oqfnby$;return function(n){return e(new t(65535&this.data),n)}}))),_d.prototype.floorDiv_mpgczg$=i("kotlin.kotlin.UShort.floorDiv_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongDivide_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),_d.prototype.mod_mpmjao$=i("kotlin.kotlin.UShort.mod_mpmjao$",o((function(){var e=p.kotlin.UInt,n=p.kotlin.uintRemainder_oqfnby$,i=t.toByte,o=p.kotlin.UByte;return function(t){return new o(i(n(new e(65535&this.data),new e(255&t.data)).data))}}))),_d.prototype.mod_6hrhkk$=i("kotlin.kotlin.UShort.mod_6hrhkk$",o((function(){var e=p.kotlin.UInt,n=p.kotlin.uintRemainder_oqfnby$,i=t.toShort,o=p.kotlin.UShort;return function(t){return new o(i(n(new e(65535&this.data),new e(65535&t.data)).data))}}))),_d.prototype.mod_s87ys9$=i("kotlin.kotlin.UShort.mod_s87ys9$",o((function(){var t=p.kotlin.UInt,e=p.kotlin.uintRemainder_oqfnby$;return function(n){return e(new t(65535&this.data),n)}}))),_d.prototype.mod_mpgczg$=i("kotlin.kotlin.UShort.mod_mpgczg$",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong,i=p.kotlin.ulongRemainder_jpm79w$;return function(o){return i(new n(t.Long.fromInt(this.data).and(e)),o)}}))),_d.prototype.inc=i("kotlin.kotlin.UShort.inc",o((function(){var e=t.toShort,n=p.kotlin.UShort;return function(){return new n(e(this.data+1))}}))),_d.prototype.dec=i("kotlin.kotlin.UShort.dec",o((function(){var e=t.toShort,n=p.kotlin.UShort;return function(){return new n(e(this.data-1))}}))),_d.prototype.rangeTo_6hrhkk$=i("kotlin.kotlin.UShort.rangeTo_6hrhkk$",o((function(){var t=p.kotlin.ranges.UIntRange,e=p.kotlin.UInt;return function(n){return new t(new e(65535&this.data),new e(65535&n.data))}}))),_d.prototype.and_6hrhkk$=i("kotlin.kotlin.UShort.and_6hrhkk$",o((function(){var e=p.kotlin.UShort,n=t.toShort;return function(t){return new e(n(this.data&t.data))}}))),_d.prototype.or_6hrhkk$=i("kotlin.kotlin.UShort.or_6hrhkk$",o((function(){var e=p.kotlin.UShort,n=t.toShort;return function(t){return new e(n(this.data|t.data))}}))),_d.prototype.xor_6hrhkk$=i("kotlin.kotlin.UShort.xor_6hrhkk$",o((function(){var e=p.kotlin.UShort,n=t.toShort;return function(t){return new e(n(this.data^t.data))}}))),_d.prototype.inv=i("kotlin.kotlin.UShort.inv",o((function(){var e=p.kotlin.UShort,n=t.toShort;return function(){return new e(n(~this.data))}}))),_d.prototype.toByte=i("kotlin.kotlin.UShort.toByte",o((function(){var e=t.toByte;return function(){return e(this.data)}}))),_d.prototype.toShort=i("kotlin.kotlin.UShort.toShort",(function(){return this.data})),_d.prototype.toInt=i("kotlin.kotlin.UShort.toInt",(function(){return 65535&this.data})),_d.prototype.toLong=i("kotlin.kotlin.UShort.toLong",o((function(){var e=t.Long.fromInt(65535);return function(){return t.Long.fromInt(this.data).and(e)}}))),_d.prototype.toUByte=i("kotlin.kotlin.UShort.toUByte",o((function(){var e=t.toByte,n=p.kotlin.UByte;return function(){return new n(e(this.data))}}))),_d.prototype.toUShort=i("kotlin.kotlin.UShort.toUShort",(function(){return this})),_d.prototype.toUInt=i("kotlin.kotlin.UShort.toUInt",o((function(){var t=p.kotlin.UInt;return function(){return new t(65535&this.data)}}))),_d.prototype.toULong=i("kotlin.kotlin.UShort.toULong",o((function(){var e=t.Long.fromInt(65535),n=p.kotlin.ULong;return function(){return new n(t.Long.fromInt(this.data).and(e))}}))),_d.prototype.toFloat=i("kotlin.kotlin.UShort.toFloat",(function(){return 65535&this.data})),_d.prototype.toDouble=i("kotlin.kotlin.UShort.toDouble",(function(){return 65535&this.data})),_d.prototype.toString=function(){return(65535&this.data).toString()},_d.$metadata$={kind:e,simpleName:"UShort",interfaces:[I]},_d.prototype.unbox=function(){return this.data},_d.prototype.hashCode=function(){var e=0;return e=31*e+t.hashCode(this.data)|0},_d.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)},Td.prototype.get_za3lpa$=function(t){return new _d(this.storage[t])},Td.prototype.set_1pe3u2$=function(t,e){this.storage[t]=e.data},Object.defineProperty(Td.prototype,"size",{configurable:!0,get:function(){return this.storage.length}}),Td.prototype.iterator=function(){return new $d(this.storage)},$d.prototype.hasNext=function(){return this.index_0=0))throw pn(("Requested element count "+n+" is less than zero.").toString());if(0===n)return At(e);if(t.isType(e,de)){var s=e.size-n|0;if(s<=0)return os();if(1===s)return Vn(It(e));if(a=mi(),t.isType(e,Ee)){if(t.isType(e,Yi)){i=e.size;for(var c=n;c=n?a.add_11rb$(u):p=p+1|0}return ls(a)},vd.dropLast_yzln2o$=function(t,e){if(!(e>=0))throw pn(("Requested element count "+e+" is less than zero.").toString());return Ot(t,Xt(t.size-e|0,0))},vd.take_ba2ldo$=Ot,vd.toList_7wnvza$=At,vd.shuffle_9jeydg$=Ut,vd.sortWith_nqfjgj$=Yn,vd.sortedWith_eknfly$=function(e,n){var i;if(t.isType(e,de)){if(e.size<=1)return At(e);var o=t.isArray(i=Bn(e))?i:ro();return Pn(o,n),Dn(o)}var r=kt(e);return Yn(r,n),r},vd.toBooleanArray_xmyvgf$=function(e){var n,i,o=t.booleanArray(e.size),r=0;for(n=e.iterator();n.hasNext();){var a=n.next();o[(i=r,r=i+1|0,i)]=a}return o},vd.toCollection_5cfyqp$=Dt,vd.toHashSet_7wnvza$=function(t){return Dt(t,ki(Es(t,12)))},vd.toMutableList_7wnvza$=kt,vd.toMutableList_4c7yge$=Pt,vd.toSet_7wnvza$=xt,vd.Collection=de,vd.plus_qloxvw$=function(t,e){var n=mi(t.size);return n.addAll_brywnq$(t),n.add_11rb$(e),n},vd.plus_q4559j$=function(e,n){if(t.isType(e,de))return wt(e,n);var i=_i();return Os(i,e),Os(i,n),i},vd.plus_mydzjv$=wt,vd.joinTo_gcc71v$=zt,vd.joinToString_fmv235$=Gt,vd.asSequence_7wnvza$=jt;var Dd=Ld.comparisons||(Ld.comparisons={}),Ad=Ld.text||(Ld.text={});Od.ClosedRange=Ml,Od.downTo_dqglrj$=Ft,Od.until_dqglrj$=Wt,Od.coerceAtMost_2p08ub$=function(t,e){return t.compareTo_11rb$(e)>0?e:t},Od.coerceIn_e4yvb3$=qt,Od.coerceIn_ekzx8g$=Ht,Od.coerceIn_52zmhz$=Vt,Od.coerceIn_k7ygy9$=Kt;var kd=Ld.sequences||(Ld.sequences={});kd.Sequence=Ms,kd.filterNot_euau3h$=Yt,kd.filterNotNull_q2m9h7$=Zt,kd.take_wuwhe2$=te,kd.toCollection_gtszxp$=ee,kd.toList_veqyi0$=ne,kd.toMutableList_veqyi0$=ie,kd.map_z5avom$=oe,kd.mapNotNull_qpz9h9$=function(t,e){return Zt(new tc(t,e))},kd.asIterable_veqyi0$=re,vd.plus_khz7k3$=function(t,e){var n,i,o=Ji(null!=(i=null!=(n=hs(e))?t.size+n|0:null)?i:2*t.size|0);return o.addAll_brywnq$(t),Os(o,e),o},Ad.get_lastIndex_gw00vp$=up,Ad.first_gw00vp$=function(t){if(0===t.length)throw new gn("Char sequence is empty.");return t.charCodeAt(0)},Ad.iterator_gw00vp$=function(t){return new lp(t)},Ad.get_indices_gw00vp$=pp,Ad.last_gw00vp$=ae,Ad.drop_6ic1pp$=se,Ad.StringBuilder_init=_r,Ad.take_6ic1pp$=function(t,e){if(!(e>=0))throw pn(("Requested character count "+e+" is less than zero.").toString());return t.substring(0,Bt(e,t.length))},Ld.UInt=Pu,Ld.ULong=Ju,Ld.UByte=vu,Ld.UShort=_d,vd.copyOf_c03ot6$=function(t,e){if(!(e>=0))throw pn(("Invalid new array size: "+e+".").toString());return vn(t,new Int32Array(e))},vd.copyOf_3aefkx$=function(t,e){if(!(e>=0))throw pn(("Invalid new array size: "+e+".").toString());var n=On(t,e,l);return n.$type$="LongArray",n},vd.copyOf_mrm5p$=An,vd.copyOf_m2jy6x$=function(t,e){if(!(e>=0))throw pn(("Invalid new array size: "+e+".").toString());return vn(t,new Int16Array(e))};var Pd=Ld.js||(Ld.js={}),xd=Ld.math||(Ld.math={}),wd=Ld.io||(Ld.io={});Ld.Annotation=ce,Ld.CharSequence=le,vd.Iterable=pe,vd.MutableIterable=ue,vd.MutableCollection=he,vd.List=Ee,vd.MutableList=_e,vd.Set=me,vd.MutableSet=fe,ye.Entry=Te,vd.Map=ye,$e.MutableEntry=Ne,vd.MutableMap=$e,vd.Iterator=ge,vd.MutableIterator=Re,vd.ListIterator=Ce,vd.MutableListIterator=Se,Object.defineProperty(Ld,"Unit",{get:be}),p.arrayIterator=function(t,e){if(null==e)return new ve(t);switch(e){case"BooleanArray":return Ue(t);case"ByteArray":return Ae(t);case"ShortArray":return Pe(t);case"CharArray":return we(t);case"IntArray":return Ge(t);case"LongArray":return Be(t);case"FloatArray":return Fe(t);case"DoubleArray":return We(t);default:throw dn("Unsupported type argument for arrayIterator: "+$(e))}},p.booleanArrayIterator=Ue,p.byteArrayIterator=Ae,p.shortArrayIterator=Pe,p.charArrayIterator=we,p.intArrayIterator=Ge,p.floatArrayIterator=Fe,p.doubleArrayIterator=We,p.longArrayIterator=Be,p.noWhenBranchMatched=function(){throw In()},p.subSequence=function(t,e,n){return"string"==typeof t?t.substring(e,n):t.subSequence_vux9f0$(e,n)},p.captureStack=function(t,e){Error.captureStackTrace?Error.captureStackTrace(e):e.stack=(new Error).stack},p.BoxedChar=qe,p.charArrayOf=function(){var t="CharArray",e=new Uint16Array(arguments);return e.$type$=t,e};var zd=Ld.coroutines||(Ld.coroutines={});zd.CoroutineImpl=He,Object.defineProperty(zd,"CompletedContinuation",{get:Je});var Gd=zd.intrinsics||(zd.intrinsics={});Gd.createCoroutineUnintercepted_x18nsh$=Qe,Gd.createCoroutineUnintercepted_3a617i$=Ze,Gd.intercepted_f9mg25$=tn,Ld.Error_init_pdl1vj$=nn,Ld.Error=en,Ld.Exception_init=function(t){return t=t||Object.create(on.prototype),on.call(t,null,null),t},Ld.Exception_init_pdl1vj$=rn,Ld.Exception=on,Ld.RuntimeException_init_pdl1vj$=sn,Ld.RuntimeException=an,Ld.IllegalArgumentException_init=ln,Ld.IllegalArgumentException=cn,Ld.IllegalStateException_init=function(t){return t=t||Object.create(un.prototype),un.call(t,null,null),t},Ld.IllegalStateException_init_pdl1vj$=dn,Ld.IllegalStateException=un,Ld.IndexOutOfBoundsException_init=function(t){return t=t||Object.create(hn.prototype),hn.call(t,null),t},Ld.IndexOutOfBoundsException=hn,Ld.UnsupportedOperationException_init=_n,Ld.UnsupportedOperationException=En,Ld.NumberFormatException=fn,Ld.NullPointerException=yn,Ld.ClassCastException=Tn,Ld.AssertionError_init_pdl1vj$=Nn,Ld.AssertionError=$n,Ld.NoSuchElementException=gn,Ld.ArithmeticException=Cn,Ld.NoWhenBranchMatchedException_init=In,Ld.NoWhenBranchMatchedException=Sn,Ld.UninitializedPropertyAccessException_init_pdl1vj$=bn,Ld.UninitializedPropertyAccessException=Ln,Ld.lazy_klfg04$=function(t){return new mu(t)},Ld.lazy_kls4a0$=function(t,e){return new mu(e)},Ld.fillFrom_dgzutr$=vn,Ld.arrayCopyResize_xao4iu$=On,p.findAssociatedObject_yjf3nl$=function(t,e){return null},Ad.toString_if0zpk$=Un,vd.asList_us0mfu$=Dn,vd.arrayCopy=Qn,vd.copyOf_rblqex$=function(t,e){if(!(e>=0))throw pn(("Invalid new array size: "+e+".").toString());return vn(t,new Float32Array(e))},vd.copyOf_xgrzbe$=function(t,e){if(!(e>=0))throw pn(("Invalid new array size: "+e+".").toString());return vn(t,new Float64Array(e))},vd.copyOf_1qu12l$=function(t,e){if(!(e>=0))throw pn(("Invalid new array size: "+e+".").toString());var n=On(t,e,!1);return n.$type$="BooleanArray",n},vd.copyOf_gtcw5h$=function(e,n){if(!(n>=0))throw pn(("Invalid new array size: "+n+".").toString());var i=vn(e,t.charArray(n));return i.$type$="CharArray",i},vd.copyOfRange_5f8l3u$=kn,vd.fill_jfbbbd$=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.length),wa().checkRangeIndexes_cub51b$(n,i,t.length),t.fill(e,n,i)},vd.fill_6mk3ue$=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.length),wa().checkRangeIndexes_cub51b$(n,i,t.length),t.fill(e,n,i)},vd.fill_tpuxuu$=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.length),wa().checkRangeIndexes_cub51b$(n,i,t.length),t.fill(e,n,i)},Dd.maxOf_sdesaw$=xn,Ad.binarySearchRange_wmnbas$=Fn,Ad.digitToIntImpl_nupfqh$=Mn,Ad.isWhitespaceImpl_nupfqh$=Wn,Ld.Comparator=Xn,vd.copyToArray=Bn,vd.copyToArrayImpl=qn,vd.copyToExistingArrayImpl=Hn,vd.setOf_mh5how$=Kn,vd.LinkedHashSet_init_287e2$=Vi,vd.LinkedHashSet_init_ww73n8$=Ji,vd.mapOf_x2b85n$=Jn,vd.shuffle_vvxzk3$=function(t){Ut(t,il())},vd.AbstractMutableCollection=ei,vd.AbstractMutableList=ni,ai.SimpleEntry_init_trwmqg$=function(t,e){return e=e||Object.create(si.prototype),si.call(e,t.key,t.value),e},ai.SimpleEntry=si,ai.AbstractEntrySet=ci,vd.AbstractMutableMap=ai,vd.AbstractMutableSet=hi,vd.ArrayList_init_mqih57$=fi,vd.ArrayList=Ei,vd.sortArrayWith_6xblhi$=yi,Object.defineProperty($i,"HashCode",{get:Si}),vd.EqualityComparator=$i,vd.HashMap_init_va96d4$=bi,vd.HashMap_init_q3lmfv$=vi,vd.HashMap_init_xf5xz2$=Oi,vd.HashMap_init_bwtc7$=Ui,vd.HashMap_init_73mtqc$=function(t,e){return vi(e=e||Object.create(Ii.prototype)),e.putAll_a2k3zr$(t),e},vd.HashMap=Ii,vd.HashSet_init_mqih57$=function(t,e){return e=e||Object.create(Di.prototype),hi.call(e),Di.call(e),e.map_8be2vx$=Ui(t.size),e.addAll_brywnq$(t),e},vd.HashSet_init_2wofer$=Ai,vd.HashSet_init_ww73n8$=ki,vd.HashSet_init_nn01ho$=Pi,vd.HashSet=Di,vd.InternalHashCodeMap=xi,vd.InternalMap=zi,vd.InternalStringMap=Gi,vd.LinkedHashMap_init_xf5xz2$=Bi,vd.LinkedHashMap_init_73mtqc$=function(t,e){return vi(e=e||Object.create(ji.prototype)),ji.call(e),e.map_97q5dv$_0=vi(),e.putAll_a2k3zr$(t),e},vd.LinkedHashMap=ji,vd.LinkedHashSet_init_mqih57$=function(t,e){return e=e||Object.create(Hi.prototype),Pi(Xi(),e),Hi.call(e),e.addAll_brywnq$(t),e},vd.LinkedHashSet_init_2wofer$=Ki,vd.LinkedHashSet=Hi,vd.RandomAccess=Yi,wd.BaseOutput=Qi,wd.NodeJsOutput=Zi,wd.BufferedOutput=to,wd.BufferedOutputToConsoleLog=eo,zd.SafeContinuation_init_wj8d80$=function(t,e){return e=e||Object.create(no.prototype),no.call(e,t,Xc()),e},zd.SafeContinuation=no;var jd=zd.cancellation||(zd.cancellation={});jd.CancellationException_init_pdl1vj$=function(t,e){return dn(t,e=e||Object.create(io.prototype)),io.call(e),e},jd.CancellationException_init_wspj0f$=function(t,e,n){return n=n||Object.create(io.prototype),un.call(n,t,e),io.call(n),n},jd.CancellationException=io,p.throwNPE=function(t){throw new yn(t)},p.throwCCE=ro,p.throwISE=ao,p.throwUPAE=function(t){throw bn("lateinit property "+t+" has not been initialized")},wd.Serializable=so,xd.nextDown_yrwdxr$=co,xd.roundToInt_yrwdxr$=lo,xd.roundToLong_yrwdxr$=po,xd.get_sign_s8ev3n$=uo,xd.get_sign_mts6qi$=ho,Ld.isNaN_yrwdxr$=Eo,Ld.isInfinite_yrwdxr$=_o,Ld.isFinite_yrwdxr$=mo,Ud.defaultPlatformRandom_8be2vx$=fo,Ud.doubleFromParts_6xvm5r$=yo;var Fd=Ld.reflect||(Ld.reflect={});Pd.get_js_1yb8b7$=function(e){var n;return(t.isType(n=e,No)?n:ro()).jClass},Fd.KCallable=To,Fd.KClass=$o;var Md=Fd.js||(Fd.js={}),Wd=Md.internal||(Md.internal={});Wd.KClassImpl=No,Wd.SimpleKClassImpl=go,Wd.PrimitiveKClassImpl=Ro,Object.defineProperty(Wd,"NothingKClassImpl",{get:Io}),Wd.ErrorKClass=Lo,Fd.KProperty=bo,Fd.KMutableProperty=vo,Fd.KProperty0=Oo,Fd.KMutableProperty0=Uo,Fd.KProperty1=Do,Fd.KMutableProperty1=Ao,Fd.KType=ko,p.createKType=function(t,e,n){return new Po(t,Dn(e),n)},p.markKTypeNullable=function(t){return new Po(L(t.classifier),t.arguments,!0)},Wd.KTypeImpl=Po,Object.defineProperty(Wd,"PrimitiveClasses",{get:ar}),p.getKClass=sr,p.getKClassM=cr,p.getKClassFromExpression=function(e){var n;switch(typeof e){case"string":n=ar().stringClass;break;case"number":n=(0|e)===e?ar().intClass:ar().doubleClass;break;case"boolean":n=ar().booleanClass;break;case"function":n=ar().functionClass(e.length);break;default:if(t.isBooleanArray(e))n=ar().booleanArrayClass;else if(t.isCharArray(e))n=ar().charArrayClass;else if(t.isByteArray(e))n=ar().byteArrayClass;else if(t.isShortArray(e))n=ar().shortArrayClass;else if(t.isIntArray(e))n=ar().intArrayClass;else if(t.isLongArray(e))n=ar().longArrayClass;else if(t.isFloatArray(e))n=ar().floatArrayClass;else if(t.isDoubleArray(e))n=ar().doubleArrayClass;else if(t.isType(e,$o))n=sr($o);else if(t.isArray(e))n=ar().arrayClass;else{var i=Object.getPrototypeOf(e).constructor;n=i===Object?ar().anyClass:i===Error?ar().throwableClass:lr(i)}}return n},p.getKClass1=lr,Pd.reset_xjqeni$=pr,Ad.Appendable=ur,Ad.CharacterCodingException=dr,Ad.StringBuilder_init_za3lpa$=Er,Ad.StringBuilder=hr,Ad.uppercaseChar_myv2d0$=mr,Ad.isHighSurrogate_myv2d0$=fr,Ad.isLowSurrogate_myv2d0$=yr,Ad.isWhitespace_myv2d0$=Tr,Ad.toInt_pdl1vz$=$r,Ad.toLong_pdl1vz$=Nr,Ad.toDouble_pdl1vz$=gr,Ad.toDoubleOrNull_pdl1vz$=function(t){var e=+t;return Eo(e)&&!Rr(t)||0===e&&ca(t)?null:e},Ad.toString_dqglrj$=function(t,e){return t.toString(Cr(e))},Ad.checkRadix_za3lpa$=Cr,Ad.digitOf_xvg9q0$=Sr,Object.defineProperty(Ir,"IGNORE_CASE",{get:br}),Object.defineProperty(Ir,"MULTILINE",{get:vr}),Ad.RegexOption=Ir,Ad.MatchGroup=Dr,Ad.get_bnt56j$=Ar,Object.defineProperty(kr,"Companion",{get:Vr}),Ad.Regex_init_sb3q2$=function(t,e,n){return n=n||Object.create(kr.prototype),kr.call(n,t,Kn(e)),n},Ad.Regex_init_61zpoe$=Kr,Ad.Regex=kr,Ad.concatToString_355ntz$=ia,Ad.concatToString_wlitf7$=oa,Ad.decodeToString_964n91$=function(t){return ma(t,0,t.length,!1)},Ad.encodeToByteArray_pdl1vz$=function(t){return _a(t,0,t.length,!1)},Ad.compareTo_7epoxm$=ra,Ad.startsWith_7epoxm$=aa,Ad.startsWith_3azpy2$=sa,Ad.isBlank_gw00vp$=ca,Ad.equals_igcy3c$=function(t,e,n){var i;if(void 0===n&&(n=!1),null==t)return null==e;if(null==e)return!1;if(!n)return r(t,e);if(t.length!==e.length)return!1;i=t.length;for(var o=0;o0?Dn(t):os()},vd.mutableListOf_i5x0yv$=rs,vd.arrayListOf_i5x0yv$=as,vd.get_indices_gzk92b$=ss,vd.optimizeReadOnlyList_qzupvv$=ls,Dd.compareValues_s00gnj$=function(e,n){var i;return e===n?0:null==e?-1:null==n?1:t.compareTo(t.isComparable(i=e)?i:ro(),n)},vd.throwIndexOverflow=ps,vd.IndexedValue=us,vd.IndexingIterable=ds,vd.collectionSizeOrNull_7wnvza$=hs,vd.IndexingIterator=_s,vd.getOrImplicitDefault_t9ocha$=ms,vd.emptyMap_q3lmfv$=Rs,vd.mapOf_qfcya0$=function(t){return t.length>0?bs(t,qi(t.length)):Rs()},vd.hashMapOf_qfcya0$=Cs,vd.getValue_t9ocha$=function(t,e){return ms(t,e)},vd.putAll_5gv49o$=Ss,vd.putAll_cweazw$=Is,vd.toMap_6hr0sd$=function(e){var n;if(t.isType(e,de)){switch(e.size){case 0:n=Rs();break;case 1:n=Jn(t.isType(e,Ee)?e.get_za3lpa$(0):e.iterator().next());break;default:n=Ls(e,qi(e.size))}return n}return vs(Ls(e,Xi()))},vd.toMap_jbpz7q$=Ls,vd.toMap_ujwnei$=bs,vd.optimizeReadOnlyMap_1vp4qn$=vs,vd.removeAll_uhyeqt$=Us,vd.removeAll_qafx1e$=As,vd.ByteIterator=ks,vd.CharIterator=Ps,vd.ShortIterator=xs,vd.IntIterator=ws,vd.LongIterator=zs,vd.FloatIterator=Gs,vd.DoubleIterator=js,vd.BooleanIterator=Fs,kd.sequence_o0x0bg$=Xs,kd.iterator_o0x0bg$=Bs,kd.SequenceScope=qs,kd.emptySequence_287e2$=Vs,kd.FilteringSequence=Qs,kd.TransformingSequence=tc,kd.FlatteningSequence=nc,kd.DropTakeSequence=oc,kd.SubSequence=rc,kd.TakeSequence=sc,kd.generateSequence_c6s9hp$=uc,Object.defineProperty(vd,"EmptySet",{get:Ec}),vd.emptySet_287e2$=_c,vd.setOf_i5x0yv$=function(t){return t.length>0?$t(t):_c()},vd.hashSetOf_i5x0yv$=mc,vd.optimizeReadOnlySet_94kdbt$=fc,zd.Continuation=yc,Ld.Result=yu,zd.startCoroutine_x18nsh$=function(t,e){tn(Qe(t,e)).resumeWith_tl1gpc$(new yu(be()))},zd.startCoroutine_3a617i$=function(t,e,n){tn(Ze(t,e,n)).resumeWith_tl1gpc$(new yu(be()))},Gd.get_COROUTINE_SUSPENDED=jc,Object.defineProperty(Tc,"Key",{get:gc}),zd.ContinuationInterceptor=Tc,Rc.Key=Sc,Rc.Element=Ic,zd.CoroutineContext=Rc,zd.AbstractCoroutineContextElement=Lc,zd.AbstractCoroutineContextKey=bc,Object.defineProperty(zd,"EmptyCoroutineContext",{get:Uc}),zd.CombinedContext=Dc,Object.defineProperty(Gd,"COROUTINE_SUSPENDED",{get:jc}),Object.defineProperty(Fc,"COROUTINE_SUSPENDED",{get:Wc}),Object.defineProperty(Fc,"UNDECIDED",{get:Xc}),Object.defineProperty(Fc,"RESUMED",{get:Bc}),Gd.CoroutineSingletons=Fc,bd.getProgressionLastElement_qt1dr2$=Jc,bd.getProgressionLastElement_b9bd0d$=Yc,Object.defineProperty(Qc,"Default",{get:il}),Ud.Random_za3lpa$=ol,Ud.Random_s8cxhz$=function(t){return El(t.toInt(),t.shiftRight(32).toInt())},Ud.fastLog2_kcn2v3$=rl,Ud.takeUpperBits_b6l1hq$=al,Ud.checkRangeBounds_6xvm5r$=sl,Ud.checkRangeBounds_cfj5zr$=cl,Ud.checkRangeBounds_sdh6z7$=ll,Ud.boundsErrorMessage_dgzutr$=pl,Ud.XorWowRandom_init_6xvm5r$=El,Ud.XorWowRandom=ul,Object.defineProperty(_l,"Companion",{get:yl}),Od.CharRange=_l,Object.defineProperty(Tl,"Companion",{get:gl}),Od.IntRange=Tl,Object.defineProperty(Rl,"Companion",{get:Il}),Od.LongRange=Rl,Od.CharProgressionIterator=Ll,Od.IntProgressionIterator=bl,Od.LongProgressionIterator=vl,Object.defineProperty(Ol,"Companion",{get:Al}),Od.CharProgression=Ol,Object.defineProperty(kl,"Companion",{get:wl}),Od.IntProgression=kl,Object.defineProperty(zl,"Companion",{get:Fl}),Od.LongProgression=zl,Od.OpenEndRange=Wl,Od.ClosedFloatingPointRange=ql,Od.rangeTo_38ydlf$=function(t,e){return new Hl(t,e)},Fd.KClassifier=Vl,Fd.KTypeParameter=Kl,Ad.appendElement_k2zgzt$=Jl,Ad.equals_4lte5s$=Yl,Ad.isSurrogate_myv2d0$=function(t){return new _l(P.MIN_SURROGATE,P.MAX_SURROGATE).contains_mef7kx$(t)},Ad.trimMargin_rjktp$=function(t,e){return void 0===e&&(e="|"),Ql(t,"",e)},Ad.replaceIndentByMargin_j4ogox$=Ql,Ad.toIntOrNull_pdl1vz$=tp,Ad.toIntOrNull_6ic1pp$=ep,Ad.toLongOrNull_pdl1vz$=np,Ad.toLongOrNull_6ic1pp$=ip,Ad.numberFormatError_y4putb$=op,Ad.trimStart_wqw3xr$=rp,Ad.trimEnd_wqw3xr$=ap,Ad.trim_gw00vp$=function(e){for(var n=0,i=e.length-1|0,o=!1;n<=i;){var r=o?i:n,c=Tr(s(a(e.charCodeAt(r))));if(o){if(!c)break;i=i-1|0}else c?n=n+1|0:o=!0}return t.subSequence(e,n,i+1|0)},Ad.padStart_yk9sg4$=sp,Ad.padStart_vrc1nu$=cp,Ad.substring_fc3b62$=function(t,e){return t.substring(e.start,e.endInclusive+1|0)},Ad.substring_i511yc$=dp,Ad.removePrefix_gsj5wt$=function(t,e){return mp(t,e)?t.substring(e.length):t},Ad.regionMatchesImpl_4c7s8r$=hp,Ad.startsWith_sgbm27$=Ep,Ad.endsWith_sgbm27$=_p,Ad.startsWith_li3zpu$=mp,Ad.indexOfAny_junqau$=fp,Ad.indexOf_8eortd$=Tp,Ad.indexOf_l5u8uk$=$p,Ad.lastIndexOf_l5u8uk$=Np,Ad.contains_sgbm27$=gp,Ad.requireNonNegativeLimit_kcn2v3$=bp,Ad.splitToSequence_ip8yn$=vp,Ad.split_ip8yn$=function(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=0),1===e.length){var o=e[0];if(0!==o.length)return Op(t,o,n,i)}var r,a=re(Lp(t,e,void 0,n,i)),s=mi(Es(a,10));for(r=a.iterator();r.hasNext();){var c=r.next();s.add_11rb$(dp(t,c))}return s},Ad.split_o64adg$=function(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=0),1===e.length)return Op(t,String.fromCharCode(e[0]),n,i);var o,r=re(Sp(t,e,void 0,n,i)),a=mi(Es(r,10));for(o=r.iterator();o.hasNext();){var s=o.next();a.add_11rb$(dp(t,s))}return a},Ad.lineSequence_gw00vp$=Up,Ad.lines_gw00vp$=Dp,Ad.MatchGroupCollection=Ap,Ad.MatchNamedGroupCollection=kp,Pp.Destructured=xp,Ad.MatchResult=Pp,Xd.toDuration_14orw9$=Hp,Xd.toDuration_rrkdm6$=Vp,Xd.toDuration_n769wd$=Kp,Object.defineProperty(wp,"Companion",{get:qp}),Xd.Duration=wp,Xd.shortName_d5gje$=ou,Xd.durationUnitByShortName_y4putb$=ru,Xd.durationUnitByIsoChar_4b3kw1$=au,Ld.Lazy=su,Object.defineProperty(cu,"SYNCHRONIZED",{get:pu}),Object.defineProperty(cu,"PUBLICATION",{get:uu}),Object.defineProperty(cu,"NONE",{get:du}),Ld.LazyThreadSafetyMode=cu,Object.defineProperty(Ld,"UNINITIALIZED_VALUE",{get:_u}),Ld.UnsafeLazyImpl=mu,Ld.InitializedLazyImpl=fu,Ld.createFailure_tcv7n7$=Ru,Object.defineProperty(yu,"Companion",{get:Nu}),yu.Failure=gu,Ld.throwOnFailure_iacion$=Cu,Ld.NotImplementedError=Su,Ld.Pair=Iu,Ld.to_ujzrz7$=Lu,Ld.Triple=bu,Object.defineProperty(vu,"Companion",{get:Du}),Ld.UByteArray_init_za3lpa$=function(t,e){return e=e||Object.create(Au.prototype),Au.call(e,new Int8Array(t)),e},Ld.UByteArray=Au,Object.defineProperty(Pu,"Companion",{get:zu}),Ld.uintCompare_vux9f0$=Nd,Ld.uintDivide_oqfnby$=function(e,n){return new Pu(t.Long.fromInt(e.data).and(g).div(t.Long.fromInt(n.data).and(g)).toInt())},Ld.uintRemainder_oqfnby$=Rd,Ld.uintToDouble_za3lpa$=function(t){return(2147483647&t)+2*(t>>>31<<30)},Ld.UIntArray_init_za3lpa$=function(t,e){return e=e||Object.create(Gu.prototype),Gu.call(e,new Int32Array(t)),e},Ld.UIntArray=Gu,Object.defineProperty(Fu,"Companion",{get:Xu}),Od.UIntRange=Fu,Object.defineProperty(Bu,"Companion",{get:Vu}),Od.UIntProgression=Bu,Object.defineProperty(Ju,"Companion",{get:Zu}),Ld.ulongCompare_3pjtqy$=gd,Ld.ulongDivide_jpm79w$=function(e,n){var i=e.data,o=n.data;if(o.toNumber()<0)return gd(e.data,n.data)<0?new Ju(l):new Ju(F);if(i.toNumber()>=0)return new Ju(i.div(o));var r=i.shiftRightUnsigned(1).div(o).shiftLeft(1),a=i.subtract(r.multiply(o));return new Ju(r.add(t.Long.fromInt(gd(new Ju(a).data,new Ju(o).data)>=0?1:0)))},Ld.ulongRemainder_jpm79w$=Cd,Ld.ulongToDouble_s8cxhz$=function(t){return 2048*t.shiftRightUnsigned(11).toNumber()+t.and(tt).toNumber()},Ld.ULongArray_init_za3lpa$=function(e,n){return n=n||Object.create(td.prototype),td.call(n,t.longArray(e)),n},Ld.ULongArray=td,Object.defineProperty(nd,"Companion",{get:rd}),Od.ULongRange=nd,Object.defineProperty(ad,"Companion",{get:ld}),Od.ULongProgression=ad,bd.getProgressionLastElement_fjk8us$=hd,bd.getProgressionLastElement_15zasp$=Ed,Object.defineProperty(_d,"Companion",{get:yd}),Ld.UShortArray_init_za3lpa$=function(t,e){return e=e||Object.create(Td.prototype),Td.call(e,new Int16Array(t)),e},Ld.UShortArray=Td,Ld.ulongToString_8e33dg$=Sd,Ld.ulongToString_plstum$=Id,$e.prototype.getOrDefault_xwzc9p$=ye.prototype.getOrDefault_xwzc9p$,za.prototype.getOrDefault_xwzc9p$=ye.prototype.getOrDefault_xwzc9p$,ai.prototype.remove_xwzc9p$=$e.prototype.remove_xwzc9p$,xi.prototype.createJsMap=zi.prototype.createJsMap,Gi.prototype.createJsMap=zi.prototype.createJsMap,Object.defineProperty(Jr.prototype,"destructured",Object.getOwnPropertyDescriptor(Pp.prototype,"destructured")),fs.prototype.getOrDefault_xwzc9p$=ye.prototype.getOrDefault_xwzc9p$,ys.prototype.remove_xwzc9p$=$e.prototype.remove_xwzc9p$,ys.prototype.getOrDefault_xwzc9p$=$e.prototype.getOrDefault_xwzc9p$,fs.prototype.getOrDefault_xwzc9p$,Ts.prototype.remove_xwzc9p$=ys.prototype.remove_xwzc9p$,Ts.prototype.getOrDefault_xwzc9p$=ys.prototype.getOrDefault_xwzc9p$,$s.prototype.getOrDefault_xwzc9p$=ye.prototype.getOrDefault_xwzc9p$,Ic.prototype.plus_1fupul$=Rc.prototype.plus_1fupul$,Tc.prototype.fold_3cc69b$=Ic.prototype.fold_3cc69b$,Tc.prototype.plus_1fupul$=Ic.prototype.plus_1fupul$,Lc.prototype.get_j3r2sn$=Ic.prototype.get_j3r2sn$,Lc.prototype.fold_3cc69b$=Ic.prototype.fold_3cc69b$,Lc.prototype.minusKey_yeqjby$=Ic.prototype.minusKey_yeqjby$,Lc.prototype.plus_1fupul$=Ic.prototype.plus_1fupul$,Dc.prototype.plus_1fupul$=Rc.prototype.plus_1fupul$,Xl.prototype.contains_mef7kx$=Ml.prototype.contains_mef7kx$,Xl.prototype.isEmpty=Ml.prototype.isEmpty,Bl.prototype.contains_mef7kx$=Wl.prototype.contains_mef7kx$,Bl.prototype.isEmpty=Wl.prototype.isEmpty,zn=null,void 0!==n&&n.versions&&n.versions.node?new Zi(n.stdout):new eo,new oo(Uc(),(function(e){var n;return Cu(e),null==(n=e.value)||t.isType(n,b)||N(),Ie})),gi=u.pow(2,-26),Ri=u.pow(2,-53),nr=t.newArray(0,null),new Xn((function(t,e){return ra(t,e,!0)})),zr=new Int8Array([E(239),E(191),E(189)]),Gr=65533,Gp=Y,jp=Q,Fp=Z,new yu(jc())}()})?i.apply(e,o):i)||(t.exports=r)}).call(this,n(5))},function(t,e,n){(function(i){var o,r,a;r=[e,n(0),n(2)],void 0===(a="function"==typeof(o=function(t,e,n){"use strict";var o,r=t.$$importsForInline$$||(t.$$importsForInline$$={}),a=Object,s=e.throwCCE,c=e.Kind.CLASS,l=e.kotlin.coroutines.Continuation,p=(e.kotlin.Annotation,e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED),u=e.kotlin.coroutines.CoroutineImpl,d=(e.kotlin.collections.emptyList_287e2$,e.kotlin.Unit),h=e.throwUPAE,E=n.kotlinx.atomicfu.atomic$ref$1,_=n.kotlinx.atomicfu.atomic$int$1,m=(e.kotlin.collections.copyToArray,e.kotlin.coroutines.intrinsics.intercepted_f9mg25$),f=e.kotlin.collections.ArrayList_init_ww73n8$,y=e.kotlin.Result,T=e.kotlin.coroutines,$=e.kotlin.coroutines.intrinsics.createCoroutineUnintercepted_3a617i$,N=e.kotlin.coroutines.ContinuationInterceptor,g=e.equals,R=e.defineInlineFunction,C=e.wrapFunction,S=e.kotlin.IllegalStateException_init_pdl1vj$,I=e.Kind.INTERFACE,L=Error,b=e.toString,v=e.Kind.OBJECT,O=n.kotlinx.atomicfu.atomic$boolean$1,U=e.kotlin.coroutines.cancellation.CancellationException_init_pdl1vj$,D=e.kotlin.createFailure_tcv7n7$,A=e.kotlin.coroutines.AbstractCoroutineContextKey,k=e.kotlin.coroutines.AbstractCoroutineContextElement,P=e.kotlin.RuntimeException,x=e.kotlin.coroutines.CoroutineContext.Key,w=e.kotlin.coroutines.CoroutineContext.Element,z=e.kotlin.coroutines.cancellation.CancellationException_init_wspj0f$,G=e.kotlin.coroutines.startCoroutine_x18nsh$,j=e.kotlin.coroutines.startCoroutine_3a617i$,F=e.kotlin.Enum,M=e.throwISE,W=e.Long.MAX_VALUE,X=(e.kotlin.time.Duration,e.Long.ONE),B=e.Long.ZERO,q=new e.Long(0,1),H=(e.Long.fromInt(1e6),new e.Long(2077252342,2147),new e.Long(-1,1073741823),e.ensureNotNull),V=(e.kotlin.Comparable,e.kotlin.IllegalArgumentException_init_pdl1vj$),K=e.kotlin.Error,J=e.kotlin.coroutines.cancellation.CancellationException,Y=e.kotlin.IllegalStateException,Q=e.kotlin.sequences.sequence_o0x0bg$,Z=e.kotlin.collections.ArrayList,tt=e.kotlin.text.StringBuilder_init,et=e.kotlin.UnsupportedOperationException,nt=e.kotlin.UnsupportedOperationException_init_pdl1vj$,it=(e.kotlin.sequences.emptySequence_287e2$,e.kotlin.addSuppressed_oh0dqn$),ot=Function,rt=(e.kotlin.ranges.coerceAtMost_2p08ub$,n.kotlinx.atomicfu.atomic$long$1),at=e.kotlin.collections.fill_jfbbbd$,st=Math,ct=e.kotlin.NoSuchElementException,lt=e.hashCode,pt=e.kotlin.collections.ArrayList_init_287e2$,ut=(e.kotlin.collections.indexOf_mjy6jw$,e.kotlin.collections.arrayCopy),dt=(e.kotlin.IndexOutOfBoundsException,e.kotlin.collections.LinkedHashMap_init_q3lmfv$,e.kotlin.collections.IndexedValue,e.kotlin.collections.HashSet_init_287e2$,e.kotlin.collections.LinkedHashSet_init_287e2$),ht=(e.kotlin.to_ujzrz7$,e.Long.NEG_ONE,e.kotlin.collections.joinToString_fmv235$,e.kotlin.collections.listOf_mh5how$,e.toByte,e.kotlin.ranges.coerceAtLeast_dqglrj$,e.kotlin.ArithmeticException,new e.Long(0,805306368)),Et=e.Long.fromInt(1073741823),_t=new e.Long(-1073741824,268435455),mt=new e.Long(0,268435456),ft=new e.Long(0,536870912),yt=n.kotlinx.atomicfu.atomicfu$AtomicRefArray$ofNulls,Tt=(e.kotlin.text.toLongOrNull_pdl1vz$,e.kotlin.coroutines.intrinsics.createCoroutineUnintercepted_x18nsh$),$t=e.kotlin.collections.shuffle_vvxzk3$,Nt=e.Long.fromInt(2147483647),gt=e.kotlin.ranges.coerceIn_ekzx8g$,Rt=e.kotlin.collections.HashSet_init_ww73n8$,Ct=(e.kotlin.collections.get_lastIndex_55thoc$,e.kotlin.NoSuchElementException_init,e.kotlin.collections.MutableIterator,e.kotlin.collections.AbstractMutableList,e.kotlin.UnsupportedOperationException_init);function St(t,e,n){ln.call(this,n),e&&this.initParentJob_5dx9e$(t.get_j3r2sn$(Xe())),this.context_p8rm81$_0=t.plus_1fupul$(this)}function It(t,e){St.call(this,t,!0,e)}function Lt(t,e){It.call(this,t,!1),this.continuation_0=$(e,this,this)}function bt(t,e){or.call(this,t,e),this._decision_0=_(0)}function vt(){}function Ot(t){var n,i;return e.isType(t,bo)?null==(i=null!=(n=t.claimReusableCancellableContinuation())&&n.resetStateReusable_8be2vx$()?n:null)?new Pt(t,2):i:new Pt(t,1)}function Ut(t,e){t.invokeOnCancellation_f05bi3$(new At(e))}function Dt(t,e){t.invokeOnCancellation_f05bi3$(new kt(e))}function At(t){Ft.call(this),this.node_0=t}function kt(t){jt.call(this),this.handle_0=t}function Pt(t,e){Do.call(this,e),this.delegate_dhbmku$_0=t,this.context_xycjfy$_0=this.delegate.context,this._decision_0=_(0),this._state_0=E(Gt()),this.parentHandle_0=null}function xt(){}function wt(){zt=this}St.prototype=Object.create(ln.prototype),St.prototype.constructor=St,jt.prototype=Object.create(Ar.prototype),jt.prototype.constructor=jt,Dr.prototype=Object.create(ga.prototype),Dr.prototype.constructor=Dr,Nn.prototype=Object.create(Dr.prototype),Nn.prototype.constructor=Nn,It.prototype=Object.create(St.prototype),It.prototype.constructor=It,Lt.prototype=Object.create(It.prototype),Lt.prototype.constructor=Lt,or.prototype=Object.create(St.prototype),or.prototype.constructor=or,bt.prototype=Object.create(or.prototype),bt.prototype.constructor=bt,Ft.prototype=Object.create(jt.prototype),Ft.prototype.constructor=Ft,At.prototype=Object.create(Ft.prototype),At.prototype.constructor=At,kt.prototype=Object.create(jt.prototype),kt.prototype.constructor=kt,Do.prototype=Object.create(ma.prototype),Do.prototype.constructor=Do,Pt.prototype=Object.create(Do.prototype),Pt.prototype.constructor=Pt,Mt.prototype=Object.create(jt.prototype),Mt.prototype.constructor=Mt,Bt.prototype=Object.create(ln.prototype),Bt.prototype.constructor=Bt,Zt.prototype=Object.create(Qt.prototype),Zt.prototype.constructor=Zt,ee.prototype=Object.create(A.prototype),ee.prototype.constructor=ee,te.prototype=Object.create(k.prototype),te.prototype.constructor=te,ue.prototype=Object.create(k.prototype),ue.prototype.constructor=ue,Re.prototype=Object.create(F.prototype),Re.prototype.constructor=Re,ke.prototype=Object.create(te.prototype),ke.prototype.constructor=ke,Qr.prototype=Object.create(ke.prototype),Qr.prototype.constructor=Qr,ze.prototype=Object.create(Qr.prototype),Ge.prototype=Object.create(P.prototype),Ge.prototype.constructor=Ge,je.prototype=Object.create(K.prototype),je.prototype.constructor=je,hn.prototype=Object.create(Nn.prototype),hn.prototype.constructor=hn,En.prototype=Object.create(Pt.prototype),En.prototype.constructor=En,Tn.prototype=Object.create(ln.prototype),Tn.prototype.constructor=Tn,La.prototype=Object.create(ga.prototype),La.prototype.constructor=La,gn.prototype=Object.create(La.prototype),gn.prototype.constructor=gn,Cn.prototype=Object.create(Nn.prototype),Cn.prototype.constructor=Cn,Sn.prototype=Object.create(Nn.prototype),Sn.prototype.constructor=Sn,In.prototype=Object.create(Nn.prototype),In.prototype.constructor=In,Ln.prototype=Object.create(Nn.prototype),Ln.prototype.constructor=Ln,bn.prototype=Object.create(Nn.prototype),bn.prototype.constructor=bn,vn.prototype=Object.create(Nn.prototype),vn.prototype.constructor=vn,On.prototype=Object.create(Nn.prototype),On.prototype.constructor=On,Un.prototype=Object.create(On.prototype),Un.prototype.constructor=Un,Dn.prototype=Object.create(On.prototype),Dn.prototype.constructor=Dn,An.prototype=Object.create(On.prototype),An.prototype.constructor=An,kn.prototype=Object.create(te.prototype),kn.prototype.constructor=kn,Pn.prototype=Object.create(k.prototype),xn.prototype=Object.create(Tn.prototype),xn.prototype.constructor=xn,Gn.prototype=Object.create(or.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(J.prototype),jn.prototype.constructor=jn,Mn.prototype=Object.create(te.prototype),Mn.prototype.constructor=Mn,Sa.prototype=Object.create(Lo.prototype),Sa.prototype.constructor=Sa,Ra.prototype=Object.create(Sa.prototype),Ra.prototype.constructor=Ra,ai.prototype=Object.create(Ra.prototype),ai.prototype.constructor=ai,Ca.prototype=Object.create(Sa.prototype),Ca.prototype.constructor=Ca,ci.prototype=Object.create(Ca.prototype),ci.prototype.constructor=ci,Ri.prototype=Object.create(ga.prototype),Ri.prototype.constructor=Ri,pi.prototype=Object.create(Ri.prototype),pi.prototype.constructor=pi,ui.prototype=Object.create(Ri.prototype),ui.prototype.constructor=ui,Ei.prototype=Object.create(Ca.prototype),Ei.prototype.constructor=Ei,fi.prototype=Object.create(Ft.prototype),fi.prototype.constructor=fi,bi.prototype=Object.create(ga.prototype),bi.prototype.constructor=bi,Ti.prototype=Object.create(bi.prototype),Ti.prototype.constructor=Ti,$i.prototype=Object.create(Ti.prototype),$i.prototype.constructor=$i,Ni.prototype=Object.create(bi.prototype),Ni.prototype.constructor=Ni,gi.prototype=Object.create(bi.prototype),gi.prototype.constructor=gi,di.prototype=Object.create(ri.prototype),di.prototype.constructor=di,Si.prototype=Object.create(Ri.prototype),Si.prototype.constructor=Si,Ii.prototype=Object.create(Si.prototype),Ii.prototype.constructor=Ii,Li.prototype=Object.create(Ri.prototype),Li.prototype.constructor=Li,vi.prototype=Object.create(di.prototype),vi.prototype.constructor=vi,Oi.prototype=Object.create(St.prototype),Di.prototype=Object.create(F.prototype),Di.prototype.constructor=Di,Xi.prototype=Object.create(Wi.prototype),Xi.prototype.constructor=Xi,ao.prototype=Object.create(Y.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(ct.prototype),so.prototype.constructor=so,co.prototype=Object.create(St.prototype),po.prototype=Object.create(di.prototype),po.prototype.constructor=po,uo.prototype=Object.create(di.prototype),uo.prototype.constructor=uo,Eo.prototype=Object.create(di.prototype),Eo.prototype.constructor=Eo,Io.prototype=Object.create(So.prototype),Io.prototype.constructor=Io,bo.prototype=Object.create(Do.prototype),bo.prototype.constructor=bo,xo.prototype=Object.create(te.prototype),xo.prototype.constructor=xo,ir.prototype=Object.create(P.prototype),ir.prototype.constructor=ir,Ir.prototype=Object.create(On.prototype),Ir.prototype.constructor=Ir,Lr.prototype=Object.create(So.prototype),Lr.prototype.constructor=Lr,br.prototype=Object.create(Io.prototype),br.prototype.constructor=br,vr.prototype=Object.create(ga.prototype),vr.prototype.constructor=vr,Sr.prototype=Object.create(La.prototype),Sr.prototype.constructor=Sr,Fr.prototype=Object.create(or.prototype),Fr.prototype.constructor=Fr,Kr.prototype=Object.create(kn.prototype),Kr.prototype.constructor=Kr,Yr.prototype=Object.create(ke.prototype),Yr.prototype.constructor=Yr,ta.prototype=Object.create(J.prototype),ta.prototype.constructor=ta,Ea.prototype=Object.create(Co.prototype),Ea.prototype.constructor=Ea,ia.prototype=Object.create(Ea.prototype),ia.prototype.constructor=ia,na.prototype=Object.create(te.prototype),na.prototype.constructor=na,oa.prototype=Object.create(na.prototype),oa.prototype.constructor=oa,sa.prototype=Object.create(na.prototype),sa.prototype.constructor=sa,pa.prototype=Object.create(jt.prototype),pa.prototype.constructor=pa,ua.prototype=Object.create(te.prototype),ua.prototype.constructor=ua,ha.prototype=Object.create(Ea.prototype),ha.prototype.constructor=ha,Ta.prototype=Object.create(J.prototype),Ta.prototype.constructor=Ta,Ia.prototype=Object.create(So.prototype),Ia.prototype.constructor=Ia,Object.defineProperty(St.prototype,"context",{configurable:!0,get:function(){return this.context_p8rm81$_0}}),Object.defineProperty(St.prototype,"coroutineContext",{configurable:!0,get:function(){return this.context}}),Object.defineProperty(St.prototype,"isActive",{configurable:!0,get:function(){return e.callGetter(this,ln.prototype,"isActive")}}),St.prototype.onCompleted_11rb$=function(t){},St.prototype.onCancelled_z1nxw$=function(t,e){},St.prototype.cancellationExceptionMessage=function(){return Xr(this)+" was cancelled"},St.prototype.onCompletionInternal_s8jyv4$=function(t){var n;e.isType(t,Qt)?this.onCancelled_z1nxw$(t.cause,t.handled):this.onCompleted_11rb$(null==(n=t)||e.isType(n,a)?n:s())},St.prototype.resumeWith_tl1gpc$=function(t){var e=this.makeCompletingOnce_8ea4ql$(Vt(t));e!==tn&&this.afterResume_s8jyv4$(e)},St.prototype.afterResume_s8jyv4$=function(t){this.afterCompletion_s8jyv4$(t)},St.prototype.handleOnCompletionException_tcv7n7$=function(t){re(this.context,t)},St.prototype.nameString=function(){var t;return this.context,null==(t=null)?ln.prototype.nameString.call(this):'"'+t+'":'+ln.prototype.nameString.call(this)},St.prototype.start_b5ul0p$=function(t,e,n){t.invoke_3o0yor$(n,e,this)},St.$metadata$={kind:c,simpleName:"AbstractCoroutine",interfaces:[_e,l,ln,Fe]},R("kotlinx-coroutines-core.kotlinx.coroutines.invoke_5xrhu2$",C((function(){var n=t.kotlinx.coroutines.withContext_i5cbzn$;return function(t,i,o){return e.suspendCall(n(t,i,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),It.prototype.handleJobException_tcv7n7$=function(t){return re(this.context,t),!0},It.$metadata$={kind:c,simpleName:"StandaloneCoroutine",interfaces:[St]},Lt.prototype.onStart=function(){pr(this.continuation_0,this)},Lt.$metadata$={kind:c,simpleName:"LazyStandaloneCoroutine",interfaces:[It]},bt.prototype.trySuspend_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,1))return!0;break;case 2:return!1;default:throw S("Already suspended".toString())}},bt.prototype.tryResume_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,2))return!0;break;case 1:return!1;default:throw S("Already resumed".toString())}},bt.prototype.afterCompletion_s8jyv4$=function(t){this.afterResume_s8jyv4$(t)},bt.prototype.afterResume_s8jyv4$=function(t){this.tryResume_0()||vo(m(this.uCont),Jt(t,this.uCont))},bt.prototype.getResult=function(){var t;if(this.trySuspend_0())return p;var n=fn(this.state_8be2vx$);if(e.isType(n,Qt))throw n.cause;return null==(t=n)||e.isType(t,a)?t:s()},bt.$metadata$={kind:c,simpleName:"DispatchedCoroutine",interfaces:[or]},vt.prototype.tryResume_19pj23$=function(t,e,n){return void 0===e&&(e=null),n?n(t,e):this.tryResume_19pj23$$default(t,e)},vt.prototype.cancel_dbl4no$=function(t,e){return void 0===t&&(t=null),e?e(t):this.cancel_dbl4no$$default(t)},vt.$metadata$={kind:I,simpleName:"CancellableContinuation",interfaces:[l]},R("kotlinx-coroutines-core.kotlinx.coroutines.suspendCancellableCoroutine_o6sdx9$",C((function(){var n=e.kotlin.coroutines.intrinsics.intercepted_f9mg25$,i=t.kotlinx.coroutines.CancellableContinuationImpl;return function(t,o){var r;return e.suspendCall((r=t,function(t){var e=new i(n(t),1);return e.initCancellability(),r(e),e.getResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.suspendCancellableCoroutineReusable_mkkzkw$",C((function(){var n=e.kotlin.coroutines.intrinsics.intercepted_f9mg25$,i=t.kotlinx.coroutines.getOrCreateCancellableContinuation_3j0xf1$;return function(t,o){var r;return e.suspendCall((r=t,function(t){var e=i(n(t));return r(e),e.getResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),At.prototype.invoke=function(t){this.node_0.remove()},At.prototype.toString=function(){return"RemoveOnCancel["+this.node_0+"]"},At.$metadata$={kind:c,simpleName:"RemoveOnCancel",interfaces:[Ft]},kt.prototype.invoke=function(t){this.handle_0.dispose()},kt.prototype.toString=function(){return"DisposeOnCancel["+this.handle_0+"]"},kt.$metadata$={kind:c,simpleName:"DisposeOnCancel",interfaces:[jt]},Object.defineProperty(Pt.prototype,"delegate",{get:function(){return this.delegate_dhbmku$_0}}),Object.defineProperty(Pt.prototype,"context",{configurable:!0,get:function(){return this.context_xycjfy$_0}}),Object.defineProperty(Pt.prototype,"state_8be2vx$",{configurable:!0,get:function(){return this._state_0.kotlinx$atomicfu$value}}),Object.defineProperty(Pt.prototype,"isActive",{configurable:!0,get:function(){return e.isType(this.state_8be2vx$,xt)}}),Object.defineProperty(Pt.prototype,"isCompleted",{configurable:!0,get:function(){return!e.isType(this.state_8be2vx$,xt)}}),Object.defineProperty(Pt.prototype,"isCancelled",{configurable:!0,get:function(){return e.isType(this.state_8be2vx$,Zt)}}),Object.defineProperty(Pt.prototype,"stateDebugRepresentation_0",{configurable:!0,get:function(){var t;return t=this.state_8be2vx$,e.isType(t,xt)?"Active":e.isType(t,Zt)?"Cancelled":"Completed"}}),Pt.prototype.initCancellability=function(){var t;if(null!=(t=this.installParentHandle_0())){var e=t;this.isCompleted&&(e.dispose(),this.parentHandle_0=cn())}},Pt.prototype.isReusable_0=function(){var t;return Uo(this.resumeMode)&&(e.isType(t=this.delegate,bo)?t:s()).isReusable()},Pt.prototype.resetStateReusable_8be2vx$=function(){var t=this._state_0.kotlinx$atomicfu$value;return e.isType(t,Wt)&&null!=t.idempotentResume?(this.detachChild_8be2vx$(),!1):(this._decision_0.kotlinx$atomicfu$value=0,this._state_0.kotlinx$atomicfu$value=Gt(),!0)},Object.defineProperty(Pt.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.delegate,Ua)?t:null}}),Pt.prototype.getStackTraceElement=function(){return null},Pt.prototype.takeState=function(){return this.state_8be2vx$},Pt.prototype.cancelCompletedResult_83a7kv$=function(t,n){for(var i=this._state_0;;){var o=i.kotlinx$atomicfu$value;if(e.isType(o,xt))throw S("Not completed".toString());if(e.isType(o,Qt))return;if(e.isType(o,Wt)){if(o.cancelled)throw S("Must be called at most once".toString());var r=o.copy_pkdjca$(void 0,void 0,void 0,void 0,n);if(this._state_0.atomicfu$compareAndSet(o,r))return void o.invokeHandlers_gygfbe$(this,n)}else if(this._state_0.atomicfu$compareAndSet(o,new Wt(o,void 0,void 0,void 0,n)))return}},Pt.prototype.cancelLater_0=function(t){var n;return!!this.isReusable_0()&&(e.isType(n=this.delegate,bo)?n:s()).postponeCancellation_tcv7n7$(t)},Pt.prototype.cancel_dbl4no$$default=function(t){for(var n=this._state_0;;){var i=n.kotlinx$atomicfu$value;t:do{var o,r;if(!e.isType(i,xt))return!1;var a=new Zt(this,t,e.isType(i,jt));if(!this._state_0.atomicfu$compareAndSet(i,a))break t;return null!=(r=e.isType(o=i,jt)?o:null)&&this.callCancelHandler_gluymk$(r,t),this.detachChildIfNonResuable_0(),this.dispatchResume_0(this.resumeMode),!0}while(0)}},Pt.prototype.parentCancelled_8o0b5c$=function(t){this.cancelLater_0(t)||(this.cancel_dbl4no$(t),this.detachChildIfNonResuable_0())},Pt.prototype.callCancelHandlerSafely_0=function(t){try{t()}catch(t){if(!e.isType(t,L))throw t;re(this.context,new Ge("Exception in invokeOnCancellation handler for "+this,t))}},Pt.prototype.callCancelHandler_0=function(t,n){try{kr(t,n)}catch(t){if(!e.isType(t,L))throw t;re(this.context,new Ge("Exception in invokeOnCancellation handler for "+this,t))}},Pt.prototype.callCancelHandler_gluymk$=function(t,n){try{t.invoke(n)}catch(t){if(!e.isType(t,L))throw t;re(this.context,new Ge("Exception in invokeOnCancellation handler for "+this,t))}},Pt.prototype.callOnCancellation_e590hv$=function(t,n){try{t(n)}catch(t){if(!e.isType(t,L))throw t;re(this.context,new Ge("Exception in resume onCancellation handler for "+this,t))}},Pt.prototype.getContinuationCancellationCause_dqr1mp$=function(t){return t.getCancellationException()},Pt.prototype.trySuspend_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,1))return!0;break;case 2:return!1;default:throw S("Already suspended".toString())}},Pt.prototype.tryResume_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,2))return!0;break;case 1:return!1;default:throw S("Already resumed".toString())}},Pt.prototype.getResult=function(){var t=this.isReusable_0();if(this.trySuspend_0())return null==this.parentHandle_0&&this.installParentHandle_0(),t&&this.releaseClaimedReusableContinuation_0(),p;t&&this.releaseClaimedReusableContinuation_0();var n=this.state_8be2vx$;if(e.isType(n,Qt))throw ba(n.cause);if(Oo(this.resumeMode)){var i=this.context.get_j3r2sn$(Xe());if(null!=i&&!i.isActive){var o=i.getCancellationException();throw this.cancelCompletedResult_83a7kv$(n,o),ba(o)}}return this.getSuccessfulResult_tpy1pm$(n)},Pt.prototype.installParentHandle_0=function(){var t;if(null==(t=this.context.get_j3r2sn$(Xe())))return null;var e=t.invokeOnCompletion_ct2b2z$(!0,void 0,new An(this));return this.parentHandle_0=e,e},Pt.prototype.releaseClaimedReusableContinuation_0=function(){var t,n,i;if(null!=(i=null!=(n=e.isType(t=this.delegate,bo)?t:null)?n.tryReleaseClaimedContinuation_jp3215$(this):null)){var o=i;this.detachChild_8be2vx$(),this.cancel_dbl4no$(o)}},Pt.prototype.resumeWith_tl1gpc$=function(t){this.resumeImpl_0(Kt(t,this),this.resumeMode)},Pt.prototype.resume_q1ktlu$=function(t,e){this.resumeImpl_0(t,this.resumeMode,e)},Pt.prototype.invokeOnCancellation_f05bi3$=function(t){for(var n=this.makeCancelHandler_0(t),i=this._state_0;;){var o,r,a=i.kotlinx$atomicfu$value;if(e.isType(a,wt)){if(this._state_0.atomicfu$compareAndSet(a,n))return}else if(e.isType(a,jt))this.multipleHandlersError_0(t,a);else{if(e.isType(a,Qt))return a.makeHandled()||this.multipleHandlersError_0(t,a),void(e.isType(a,Zt)&&this.callCancelHandler_0(t,null!=(r=e.isType(o=a,Qt)?o:null)?r.cause:null));if(e.isType(a,Wt)){if(null!=a.cancelHandler&&this.multipleHandlersError_0(t,a),e.isType(n,Ft))return;if(a.cancelled)return void this.callCancelHandler_0(t,a.cancelCause);var s=a.copy_pkdjca$(void 0,n);if(this._state_0.atomicfu$compareAndSet(a,s))return}else{if(e.isType(n,Ft))return;var c=new Wt(a,n);if(this._state_0.atomicfu$compareAndSet(a,c))return}}}},Pt.prototype.multipleHandlersError_0=function(t,e){throw S(("It's prohibited to register multiple handlers, tried to register "+t+", already has "+b(e)).toString())},Pt.prototype.makeCancelHandler_0=function(t){return e.isType(t,jt)?t:new Mt(t)},Pt.prototype.dispatchResume_0=function(t){this.tryResume_0()||Ao(this,t)},Pt.prototype.resumedState_0=function(t,n,i,o,r){var a;return e.isType(n,Qt)||!Oo(i)&&null==r||null==o&&(!e.isType(t,jt)||e.isType(t,Ft))&&null==r?n:new Wt(n,e.isType(a=t,jt)?a:null,o,r)},Pt.prototype.resumeImpl_0=function(t,n,i){void 0===i&&(i=null);for(var o=this._state_0;;){var r=o.kotlinx$atomicfu$value;t:do{if(e.isType(r,xt)){var a=this.resumedState_0(r,t,n,i,null);if(!this._state_0.atomicfu$compareAndSet(r,a))break t;return this.detachChildIfNonResuable_0(),void this.dispatchResume_0(n)}if(e.isType(r,Zt)&&r.makeResumed())return void(null!=i&&this.callOnCancellation_e590hv$(i,r.cause));this.alreadyResumedError_0(t)}while(0)}},Pt.prototype.tryResumeImpl_0=function(t,n,i){for(var r=this._state_0;;){var a=r.kotlinx$atomicfu$value;t:do{if(e.isType(a,xt)){var s=this.resumedState_0(a,t,this.resumeMode,i,n);if(!this._state_0.atomicfu$compareAndSet(a,s))break t;return this.detachChildIfNonResuable_0(),o}return e.isType(a,Wt)&&null!=n&&a.idempotentResume===n?o:null}while(0)}},Pt.prototype.alreadyResumedError_0=function(t){throw S(("Already resumed, but proposed with update "+b(t)).toString())},Pt.prototype.detachChildIfNonResuable_0=function(){this.isReusable_0()||this.detachChild_8be2vx$()},Pt.prototype.detachChild_8be2vx$=function(){var t;null!=(t=this.parentHandle_0)&&(t.dispose(),this.parentHandle_0=cn())},Pt.prototype.tryResume_19pj23$$default=function(t,e){return this.tryResumeImpl_0(t,e,null)},Pt.prototype.tryResume_i8qury$=function(t,e,n){return this.tryResumeImpl_0(t,e,n)},Pt.prototype.tryResumeWithException_tcv7n7$=function(t){return this.tryResumeImpl_0(new Qt(t),null,null)},Pt.prototype.completeResume_za3rmp$=function(t){this.dispatchResume_0(this.resumeMode)},Pt.prototype.resumeUndispatched_hyuxa3$=function(t,n){var i,o=e.isType(i=this.delegate,bo)?i:null;this.resumeImpl_0(n,(null!=o?o.dispatcher:null)===t?4:this.resumeMode)},Pt.prototype.resumeUndispatchedWithException_gd0rtt$=function(t,n){var i,o=e.isType(i=this.delegate,bo)?i:null;this.resumeImpl_0(new Qt(n),(null!=o?o.dispatcher:null)===t?4:this.resumeMode)},Pt.prototype.getSuccessfulResult_tpy1pm$=function(t){var n,i;return e.isType(t,Wt)?null==(n=t.result)||e.isType(n,a)?n:s():null==(i=t)||e.isType(i,a)?i:s()},Pt.prototype.getExceptionalResult_s8jyv4$=function(t){var e;return null!=(e=Do.prototype.getExceptionalResult_s8jyv4$.call(this,t))?ba(e,this.delegate):null},Pt.prototype.toString=function(){return this.nameString()+"("+Gr(this.delegate)+"){"+this.stateDebugRepresentation_0+"}@"+Wr(this)},Pt.prototype.nameString=function(){return"CancellableContinuation"},Pt.$metadata$={kind:c,simpleName:"CancellableContinuationImpl",interfaces:[Ua,vt,Do]},xt.$metadata$={kind:I,simpleName:"NotCompleted",interfaces:[]},wt.prototype.toString=function(){return"Active"},wt.$metadata$={kind:v,simpleName:"Active",interfaces:[xt]};var zt=null;function Gt(){return null===zt&&new wt,zt}function jt(){Ar.call(this)}function Ft(){jt.call(this)}function Mt(t){jt.call(this),this.handler_0=t}function Wt(t,e,n,i,o){void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),this.result=t,this.cancelHandler=e,this.onCancellation=n,this.idempotentResume=i,this.cancelCause=o}function Xt(){}function Bt(t){ln.call(this,!0),this.initParentJob_5dx9e$(t)}function qt(t,e){u.call(this,e),this.exceptionState_0=1,this.$this=t}function Ht(){}function Vt(t,n){var i,o;void 0===n&&(n=null);var r=t.exceptionOrNull();if(null==r){var c=null==(i=t.value)||e.isType(i,a)?i:s();o=null!=n?new Yt(c,n):c}else o=new Qt(r);return o}function Kt(t,n){var i,o=t.exceptionOrNull();return null==o?null==(i=t.value)||e.isType(i,a)?i:s():new Qt(ba(o))}function Jt(t,n){var i;return e.isType(t,Qt)?new y(D(ba(t.cause))):(y.Companion,new y(null==(i=t)||e.isType(i,a)?i:s()))}function Yt(t,e){this.result=t,this.onCancellation=e}function Qt(t,e){void 0===e&&(e=!1),this.cause=t,this._handled_0=O(e)}function Zt(t,e,n){Qt.call(this,null!=e?e:U("Continuation "+t+" was cancelled normally"),n),this._resumed_0=O(!1)}function te(){oe(),k.call(this,N.Key)}function ee(){ie=this,A.call(this,N.Key,ne)}function ne(t){var n;return e.isType(n=t,te)?n:null}jt.$metadata$={kind:c,simpleName:"CancelHandler",interfaces:[xt,Ar]},Ft.$metadata$={kind:c,simpleName:"BeforeResumeCancelHandler",interfaces:[jt]},Mt.prototype.invoke=function(t){this.handler_0(t)},Mt.prototype.toString=function(){return"InvokeOnCancel["+Xr(this.handler_0)+"@"+Wr(this)+"]"},Mt.$metadata$={kind:c,simpleName:"InvokeOnCancel",interfaces:[jt]},Object.defineProperty(Wt.prototype,"cancelled",{configurable:!0,get:function(){return null!=this.cancelCause}}),Wt.prototype.invokeHandlers_gygfbe$=function(t,e){var n,i;null!=(n=this.cancelHandler)&&t.callCancelHandler_gluymk$(n,e),null!=(i=this.onCancellation)&&t.callOnCancellation_e590hv$(i,e)},Wt.$metadata$={kind:c,simpleName:"CompletedContinuation",interfaces:[]},Wt.prototype.component1=function(){return this.result},Wt.prototype.component2=function(){return this.cancelHandler},Wt.prototype.component3=function(){return this.onCancellation},Wt.prototype.component4=function(){return this.idempotentResume},Wt.prototype.component5=function(){return this.cancelCause},Wt.prototype.copy_pkdjca$=function(t,e,n,i,o){return new Wt(void 0===t?this.result:t,void 0===e?this.cancelHandler:e,void 0===n?this.onCancellation:n,void 0===i?this.idempotentResume:i,void 0===o?this.cancelCause:o)},Wt.prototype.toString=function(){return"CompletedContinuation(result="+e.toString(this.result)+", cancelHandler="+e.toString(this.cancelHandler)+", onCancellation="+e.toString(this.onCancellation)+", idempotentResume="+e.toString(this.idempotentResume)+", cancelCause="+e.toString(this.cancelCause)+")"},Wt.prototype.hashCode=function(){var t=0;return t=31*(t=31*(t=31*(t=31*(t=31*t+e.hashCode(this.result)|0)+e.hashCode(this.cancelHandler)|0)+e.hashCode(this.onCancellation)|0)+e.hashCode(this.idempotentResume)|0)+e.hashCode(this.cancelCause)|0},Wt.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.result,t.result)&&e.equals(this.cancelHandler,t.cancelHandler)&&e.equals(this.onCancellation,t.onCancellation)&&e.equals(this.idempotentResume,t.idempotentResume)&&e.equals(this.cancelCause,t.cancelCause)},Xt.$metadata$={kind:I,simpleName:"CompletableDeferred",interfaces:[Oe]},Object.defineProperty(Bt.prototype,"onCancelComplete",{configurable:!0,get:function(){return!0}}),Bt.prototype.getCompleted=function(){var t;return null==(t=this.getCompletedInternal_8be2vx$())||e.isType(t,a)?t:s()},qt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[u]},qt.prototype=Object.create(u.prototype),qt.prototype.constructor=qt,qt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.state_0=2,this.result_0=this.$this.awaitInternal_8be2vx$(this),this.result_0===p)return p;continue;case 1:throw this.exception_0;case 2:return null==(t=this.result_0)||e.isType(t,a)?t:s();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Bt.prototype.await=function(t,e){var n=new qt(this,t);return e?n:n.doResume(null)},Object.defineProperty(Bt.prototype,"onAwait",{configurable:!0,get:function(){return this}}),Bt.prototype.registerSelectClause1_o3xas4$=function(t,e){this.registerSelectClause1Internal_u6kgbh$(t,e)},Bt.prototype.complete_11rb$=function(t){return this.makeCompleting_8ea4ql$(t)},Bt.prototype.completeExceptionally_tcv7n7$=function(t){return this.makeCompleting_8ea4ql$(new Qt(t))},Bt.$metadata$={kind:c,simpleName:"CompletableDeferredImpl",interfaces:[Nr,Xt,ln]},Ht.$metadata$={kind:I,simpleName:"CompletableJob",interfaces:[Fe]},Yt.$metadata$={kind:c,simpleName:"CompletedWithCancellation",interfaces:[]},Yt.prototype.component1=function(){return this.result},Yt.prototype.component2=function(){return this.onCancellation},Yt.prototype.copy_pe4fyg$=function(t,e){return new Yt(void 0===t?this.result:t,void 0===e?this.onCancellation:e)},Yt.prototype.toString=function(){return"CompletedWithCancellation(result="+e.toString(this.result)+", onCancellation="+e.toString(this.onCancellation)+")"},Yt.prototype.hashCode=function(){var t=0;return t=31*(t=31*t+e.hashCode(this.result)|0)+e.hashCode(this.onCancellation)|0},Yt.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.result,t.result)&&e.equals(this.onCancellation,t.onCancellation)},Object.defineProperty(Qt.prototype,"handled",{configurable:!0,get:function(){return this._handled_0.kotlinx$atomicfu$value}}),Qt.prototype.makeHandled=function(){return this._handled_0.atomicfu$compareAndSet(!1,!0)},Qt.prototype.toString=function(){return Xr(this)+"["+this.cause+"]"},Qt.$metadata$={kind:c,simpleName:"CompletedExceptionally",interfaces:[]},Zt.prototype.makeResumed=function(){return this._resumed_0.atomicfu$compareAndSet(!1,!0)},Zt.$metadata$={kind:c,simpleName:"CancelledContinuation",interfaces:[Qt]},ee.$metadata$={kind:v,simpleName:"Key",interfaces:[A]};var ie=null;function oe(){return null===ie&&new ee,ie}function re(t,n){var i;try{if(null!=(i=t.get_j3r2sn$(pe())))return void i.handleException_1ur55u$(t,n)}catch(t){if(e.isType(t,L))return void Mr(0,ae(n,t));throw t}Mr(0,n)}function ae(t,e){return t===e?t:new P("Exception while trying to handle coroutine exception",e)}function se(){pe()}function ce(){le=this}te.prototype.isDispatchNeeded_1fupul$=function(t){return!0},te.prototype.limitedParallelism_za3lpa$=function(t){return wo(t),new xo(this,t)},te.prototype.dispatchYield_5bn72i$=function(t,e){this.dispatch_5bn72i$(t,e)},te.prototype.interceptContinuation_wj8d80$=function(t){return new bo(this,t)},te.prototype.releaseInterceptedContinuation_k98bjh$=function(t){var n;(e.isType(n=t,bo)?n:s()).release()},te.prototype.plus_9wrrq5$=function(t){return t},te.prototype.toString=function(){return Xr(this)+"@"+Wr(this)},te.$metadata$={kind:c,simpleName:"CoroutineDispatcher",interfaces:[N,k]},ce.$metadata$={kind:v,simpleName:"Key",interfaces:[x]};var le=null;function pe(){return null===le&&new ce,le}function ue(t){Ee(),k.call(this,Ee()),this.name=t}function de(){he=this}de.$metadata$={kind:v,simpleName:"Key",interfaces:[x]};var he=null;function Ee(){return null===he&&new de,he}function _e(){}function me(){Ne=this}ue.prototype.toString=function(){return"CoroutineName("+this.name+")"},ue.$metadata$={kind:c,simpleName:"CoroutineName",interfaces:[k]},ue.prototype.component1=function(){return this.name},ue.prototype.copy_61zpoe$=function(t){return new ue(void 0===t?this.name:t)},ue.prototype.hashCode=function(){var t=0;return t=31*t+e.hashCode(this.name)|0},ue.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.name,t.name)},_e.$metadata$={kind:I,simpleName:"CoroutineScope",interfaces:[]},Object.defineProperty(me.prototype,"coroutineContext",{configurable:!0,get:function(){return T.EmptyCoroutineContext}}),me.$metadata$={kind:v,simpleName:"GlobalScope",interfaces:[_e]};var fe,ye,Te,$e,Ne=null;function ge(t,e){var n;if(void 0===e&&(e=null),null==(n=t.coroutineContext.get_j3r2sn$(Xe())))throw S(("Scope cannot be cancelled because it does not have a job: "+t).toString());n.cancel_x5z25k$(e)}function Re(t,e){F.call(this),this.name$=t,this.ordinal$=e}function Ce(){Ce=function(){},fe=new Re("DEFAULT",0),ye=new Re("LAZY",1),Te=new Re("ATOMIC",2),$e=new Re("UNDISPATCHED",3)}function Se(){return Ce(),fe}function Ie(){return Ce(),ye}function Le(){return Ce(),Te}function be(){return Ce(),$e}function ve(){}function Oe(){}function Ue(t){return function(e){var n=new Pt(m(e),1);return n.initCancellability(),t(n),n.getResult()}}function De(){}function Ae(t){var n,i;return null!=(i=e.isType(n=t.get_j3r2sn$(N.Key),De)?n:null)?i:xr()}function ke(){te.call(this),this.useCount_0=B,this.shared_0=!1,this.unconfinedQueue_0=null}function Pe(){xe=this,this.ref_0=new Pa}R("kotlinx-coroutines-core.kotlinx.coroutines.currentCoroutineContext",(function(t){return e.coroutineReceiver().context})),Re.prototype.invoke_810yno$=function(t,n){switch(this.name){case"DEFAULT":cr(t,n);break;case"ATOMIC":G(t,n);break;case"UNDISPATCHED":Er(t,n);break;case"LAZY":break;default:e.noWhenBranchMatched()}},Re.prototype.invoke_3o0yor$=function(t,n,i){switch(this.name){case"DEFAULT":lr(t,n,i);break;case"ATOMIC":j(t,n,i);break;case"UNDISPATCHED":_r(t,n,i);break;case"LAZY":break;default:e.noWhenBranchMatched()}},Object.defineProperty(Re.prototype,"isLazy",{configurable:!0,get:function(){return this===Ie()}}),Re.$metadata$={kind:c,simpleName:"CoroutineStart",interfaces:[F]},Re.values=function(){return[Se(),Ie(),Le(),be()]},Re.valueOf_61zpoe$=function(t){switch(t){case"DEFAULT":return Se();case"LAZY":return Ie();case"ATOMIC":return Le();case"UNDISPATCHED":return be();default:M("No enum constant kotlinx.coroutines.CoroutineStart."+t)}},ve.$metadata$={kind:I,simpleName:"CopyableThrowable",interfaces:[]},Oe.$metadata$={kind:I,simpleName:"Deferred",interfaces:[Fe]},De.prototype.delay_s8cxhz$=function(t,e){var n,i;if(!(t.toNumber()<=0))return Ue((n=t,i=this,function(t){return i.scheduleResumeAfterDelay_egqmvs$(n,t),d}))(e)},De.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){return xr().invokeOnTimeout_oczv3n$(t,e,n)},De.$metadata$={kind:I,simpleName:"Delay",interfaces:[]},ke.prototype.processNextEvent=function(){return this.processUnconfinedEvent()?B:W},Object.defineProperty(ke.prototype,"isEmpty",{configurable:!0,get:function(){return this.isUnconfinedQueueEmpty}}),Object.defineProperty(ke.prototype,"nextTime",{configurable:!0,get:function(){var t;return null==(t=this.unconfinedQueue_0)||t.isEmpty?W:B}}),ke.prototype.processUnconfinedEvent=function(){var t,e;return null!=(t=this.unconfinedQueue_0)&&null!=(e=t.removeFirstOrNull())&&(e.run(),!0)},ke.prototype.shouldBeProcessedFromContext=function(){return!1},ke.prototype.dispatchUnconfined_4avnfa$=function(t){var e,n;if(null!=(e=this.unconfinedQueue_0))n=e;else{var i=new Co;this.unconfinedQueue_0=i,n=i}n.addLast_trkh7z$(t)},Object.defineProperty(ke.prototype,"isActive",{configurable:!0,get:function(){return this.useCount_0.toNumber()>0}}),Object.defineProperty(ke.prototype,"isUnconfinedLoopActive",{configurable:!0,get:function(){return this.useCount_0.compareTo_11rb$(this.delta_0(!0))>=0}}),Object.defineProperty(ke.prototype,"isUnconfinedQueueEmpty",{configurable:!0,get:function(){var t,e;return null==(e=null!=(t=this.unconfinedQueue_0)?t.isEmpty:null)||e}}),ke.prototype.delta_0=function(t){return t?q:X},ke.prototype.incrementUseCount_6taknv$=function(t){void 0===t&&(t=!1),this.useCount_0=this.useCount_0.add(this.delta_0(t)),t||(this.shared_0=!0)},ke.prototype.decrementUseCount_6taknv$=function(t){void 0===t&&(t=!1),this.useCount_0=this.useCount_0.subtract(this.delta_0(t)),this.useCount_0.toNumber()>0||this.shared_0&&this.shutdown()},ke.prototype.limitedParallelism_za3lpa$=function(t){return wo(t),this},ke.prototype.shutdown=function(){},ke.$metadata$={kind:c,simpleName:"EventLoop",interfaces:[te]},Object.defineProperty(Pe.prototype,"eventLoop_8be2vx$",{configurable:!0,get:function(){var t,e;if(null!=(t=this.ref_0.get()))e=t;else{var n=Jr();this.ref_0.set_11rb$(n),e=n}return e}}),Pe.prototype.currentOrNull_8be2vx$=function(){return this.ref_0.get()},Pe.prototype.resetEventLoop_8be2vx$=function(){this.ref_0.set_11rb$(null)},Pe.prototype.setEventLoop_13etkv$=function(t){this.ref_0.set_11rb$(t)},Pe.$metadata$={kind:v,simpleName:"ThreadLocalEventLoop",interfaces:[]};var xe=null;function we(){return null===xe&&new Pe,xe}function ze(){Qr.call(this),this._queue_0=E(null),this._delayed_0=E(null),this._isCompleted_0=O(!1)}function Ge(t,e){P.call(this,t,e),this.name="CompletionHandlerException"}function je(t,e){K.call(this,t,e),this.name="CoroutinesInternalError"}function Fe(){Xe()}function Me(){We=this}Ge.$metadata$={kind:c,simpleName:"CompletionHandlerException",interfaces:[P]},je.$metadata$={kind:c,simpleName:"CoroutinesInternalError",interfaces:[K]},Me.$metadata$={kind:v,simpleName:"Key",interfaces:[x]};var We=null;function Xe(){return null===We&&new Me,We}function Be(t){this.function$=t}function qe(){}function He(){}function Ve(){}function Ke(t,e){return t.invokeOnCompletion_f05bi3$(new Ln(e))}function Je(t){if(!t.isActive)throw t.getCancellationException()}function Ye(t){var e;null!=(e=t.get_j3r2sn$(Xe()))&&Je(e)}function Qe(){sn=this}Fe.prototype.cancel_x5z25k$=function(t,e){void 0===t&&(t=null),e?e(t):this.cancel_x5z25k$$default(t)},Fe.prototype.cancel=function(){this.cancel_x5z25k$(null)},Fe.prototype.cancel_dbl4no$=function(t,e){return void 0===t&&(t=null),e?e(t):this.cancel_dbl4no$$default(t)},Fe.prototype.invokeOnCompletion_ct2b2z$=function(t,e,n,i){return void 0===t&&(t=!1),void 0===e&&(e=!0),i?i(t,e,n):this.invokeOnCompletion_ct2b2z$$default(t,e,n)},Fe.prototype.plus_dqr1mp$=function(t){return t},Fe.$metadata$={kind:I,simpleName:"Job",interfaces:[w]},Be.prototype.dispose=function(){return this.function$()},Be.$metadata$={kind:I,simpleName:"DisposableHandle",interfaces:[]},qe.$metadata$={kind:I,simpleName:"ChildJob",interfaces:[Fe]},He.$metadata$={kind:I,simpleName:"ParentJob",interfaces:[Fe]},Ve.$metadata$={kind:I,simpleName:"ChildHandle",interfaces:[Be]},Object.defineProperty(Qe.prototype,"parent",{configurable:!0,get:function(){return null}}),Qe.prototype.dispose=function(){},Qe.prototype.childCancelled_tcv7n7$=function(t){return!1},Qe.prototype.toString=function(){return"NonDisposableHandle"},Qe.$metadata$={kind:v,simpleName:"NonDisposableHandle",interfaces:[Ve,Be]};var Ze,tn,en,nn,on,rn,an,sn=null;function cn(){return null===sn&&new Qe,sn}function ln(t){this._state_v70vig$_0=E(t?an:rn),this._parentHandle_acgcx5$_0=E(null)}function pn(t,e){return function(){return t.state_8be2vx$===e}}function un(t,e,n,i){u.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$this$JobSupport=t,this.local$tmp$=void 0,this.local$tmp$_0=void 0,this.local$cur=void 0,this.local$$receiver=e}function dn(t,e,n){this.list_m9wkmb$_0=t,this._isCompleting_0=O(e),this._rootCause_0=E(n),this._exceptionsHolder_0=E(null)}function hn(t,e,n,i){Nn.call(this),this.parent_0=t,this.state_0=e,this.child_0=n,this.proposedUpdate_0=i}function En(t,e){Pt.call(this,t,1),this.job_0=e}function _n(t){this.state=t}function mn(t){return e.isType(t,$n)?new _n(t):t}function fn(t){var n,i,o;return null!=(o=null!=(i=e.isType(n=t,_n)?n:null)?i.state:null)?o:t}function yn(t){this.isActive_hyoax9$_0=t}function Tn(t){ln.call(this,!0),this.initParentJob_5dx9e$(t),this.handlesException_fejgjb$_0=this.handlesExceptionF()}function $n(){}function Nn(){Dr.call(this),this.job_ndnibc$_0=this.job_ndnibc$_0}function gn(){La.call(this)}function Rn(t){this.list_afai45$_0=t}function Cn(t){Nn.call(this),this.handler_0=t}function Sn(t){Nn.call(this),this.continuation_0=t}function In(t){Nn.call(this),this.continuation_0=t}function Ln(t){Nn.call(this),this.handle_0=t}function bn(t,e){Nn.call(this),this.select_0=t,this.block_0=e}function vn(t,e){Nn.call(this),this.select_0=t,this.block_0=e}function On(){Nn.call(this)}function Un(t){On.call(this),this.handler_0=t,this._invoked_0=_(0)}function Dn(t){On.call(this),this.childJob=t}function An(t){On.call(this),this.child=t}function kn(){te.call(this)}function Pn(){k.call(this,Xe()),this.message_0="NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"}function xn(t){Tn.call(this,t)}function wn(t,e,n){return function(i){var o,r,a,s=new Gn(t,i);return e.v=s,r=n,a=(o=s).uCont.context,Ke(o,Ae(a).invokeOnTimeout_oczv3n$(o.time,o,o.context)),fr(o,o,r)}}function zn(t,e,n){u.call(this,n),this.exceptionState_0=7,this.local$coroutine=void 0,this.local$e=void 0,this.local$timeMillis=t,this.local$block=e}function Gn(t,e){or.call(this,e.context,e),this.time=t}function jn(t,e){U(t,this),this.coroutine_8be2vx$=e,this.name="TimeoutCancellationException"}function Fn(t,e){return new jn("Timed out waiting for "+t.toString()+" ms",e)}function Mn(){Wn=this,te.call(this)}Object.defineProperty(ln.prototype,"key",{configurable:!0,get:function(){return Xe()}}),Object.defineProperty(ln.prototype,"parentHandle_8be2vx$",{configurable:!0,get:function(){return this._parentHandle_acgcx5$_0.kotlinx$atomicfu$value},set:function(t){this._parentHandle_acgcx5$_0.kotlinx$atomicfu$value=t}}),ln.prototype.initParentJob_5dx9e$=function(t){if(null!=t){t.start();var e=t.attachChild_kx8v25$(this);this.parentHandle_8be2vx$=e,this.isCompleted&&(e.dispose(),this.parentHandle_8be2vx$=cn())}else this.parentHandle_8be2vx$=cn()},Object.defineProperty(ln.prototype,"state_8be2vx$",{configurable:!0,get:function(){for(var t=this._state_v70vig$_0;;){var n=t.kotlinx$atomicfu$value;if(!e.isType(n,So))return n;n.perform_s8jyv4$(this)}}}),ln.prototype.loopOnState_46ivxf$_0=function(t){for(;;)t(this.state_8be2vx$)},Object.defineProperty(ln.prototype,"isActive",{configurable:!0,get:function(){var t=this.state_8be2vx$;return e.isType(t,$n)&&t.isActive}}),Object.defineProperty(ln.prototype,"isCompleted",{configurable:!0,get:function(){return!e.isType(this.state_8be2vx$,$n)}}),Object.defineProperty(ln.prototype,"isCancelled",{configurable:!0,get:function(){var t=this.state_8be2vx$;return e.isType(t,Qt)||e.isType(t,dn)&&t.isCancelling}}),ln.prototype.finalizeFinishingState_10mr1z$_0=function(t,n){var i,o,r,a=null!=(o=e.isType(i=n,Qt)?i:null)?o.cause:null,c={v:!1};c.v=t.isCancelling;var l=t.sealLocked_dbl4no$(a),p=this.getFinalRootCause_3zkch4$_0(t,l);null!=p&&this.addSuppressedExceptions_85dgeo$_0(p,l);var u=p,d=null==u||u===a?n:new Qt(u);return null!=u&&(this.cancelParent_7dutpz$_0(u)||this.handleJobException_tcv7n7$(u))&&(e.isType(r=d,Qt)?r:s()).makeHandled(),c.v||this.onCancelling_dbl4no$(u),this.onCompletionInternal_s8jyv4$(d),this._state_v70vig$_0.atomicfu$compareAndSet(t,mn(d)),this.completeStateFinalization_a4ilmi$_0(t,d),d},ln.prototype.getFinalRootCause_3zkch4$_0=function(t,n){if(n.isEmpty())return t.isCancelling?new ta(this.cancellationExceptionMessage(),null,this):null;var i;t:do{var o;for(o=n.iterator();o.hasNext();){var r=o.next();if(!e.isType(r,J)){i=r;break t}}i=null}while(0);if(null!=i)return i;var a=n.get_za3lpa$(0);if(e.isType(a,jn)){var s;t:do{var c;for(c=n.iterator();c.hasNext();){var l=c.next();if(l!==a&&e.isType(l,jn)){s=l;break t}}s=null}while(0);if(null!=s)return s}return a},ln.prototype.addSuppressedExceptions_85dgeo$_0=function(t,n){var i;if(!(n.size<=1)){var o=Na(n.size),r=t;for(i=n.iterator();i.hasNext();){var a=i.next();a!==t&&a!==r&&!e.isType(a,J)&&o.add_11rb$(a)}}},ln.prototype.tryFinalizeSimpleState_5emg4m$_0=function(t,e){return!!this._state_v70vig$_0.atomicfu$compareAndSet(t,mn(e))&&(this.onCancelling_dbl4no$(null),this.onCompletionInternal_s8jyv4$(e),this.completeStateFinalization_a4ilmi$_0(t,e),!0)},ln.prototype.completeStateFinalization_a4ilmi$_0=function(t,n){var i,o,r,a;null!=(i=this.parentHandle_8be2vx$)&&(i.dispose(),this.parentHandle_8be2vx$=cn());var s=null!=(r=e.isType(o=n,Qt)?o:null)?r.cause:null;if(e.isType(t,Nn))try{t.invoke(s)}catch(n){if(!e.isType(n,L))throw n;this.handleOnCompletionException_tcv7n7$(new Ge("Exception in completion handler "+t+" for "+this,n))}else null!=(a=t.list)&&this.notifyCompletion_mgxta4$_0(a,s)},ln.prototype.notifyCancelling_xkpzb8$_0=function(t,n){var i;this.onCancelling_dbl4no$(n);for(var o={v:null},r=t._next;!g(r,t);){if(e.isType(r,On)){var a,s=r;try{s.invoke(n)}catch(t){if(!e.isType(t,L))throw t;null==(null!=(a=o.v)?a:null)&&(o.v=new Ge("Exception in completion handler "+s+" for "+this,t))}}r=r._next}null!=(i=o.v)&&this.handleOnCompletionException_tcv7n7$(i),this.cancelParent_7dutpz$_0(n)},ln.prototype.cancelParent_7dutpz$_0=function(t){if(this.isScopedCoroutine)return!0;var n=e.isType(t,J),i=this.parentHandle_8be2vx$;return null===i||i===cn()?n:i.childCancelled_tcv7n7$(t)||n},ln.prototype.notifyCompletion_mgxta4$_0=function(t,n){for(var i,o={v:null},r=t._next;!g(r,t);){if(e.isType(r,Nn)){var a,s=r;try{s.invoke(n)}catch(t){if(!e.isType(t,L))throw t;null==(null!=(a=o.v)?a:null)&&(o.v=new Ge("Exception in completion handler "+s+" for "+this,t))}}r=r._next}null!=(i=o.v)&&this.handleOnCompletionException_tcv7n7$(i)},ln.prototype.notifyHandlers_8g4jwh$_0=C((function(){var t=e.equals;return function(n,i,o,r){for(var a,s={v:null},c=o._next;!t(c,o);){if(i(c)){var l,p=c;try{p.invoke(r)}catch(t){if(!e.isType(t,L))throw t;null==(null!=(l=s.v)?l:null)&&(s.v=new Ge("Exception in completion handler "+p+" for "+this,t))}}c=c._next}null!=(a=s.v)&&this.handleOnCompletionException_tcv7n7$(a)}})),ln.prototype.start=function(){for(;;)switch(this.startInternal_tp1bqd$_0(this.state_8be2vx$)){case 0:return!1;case 1:return!0}},ln.prototype.startInternal_tp1bqd$_0=function(t){return e.isType(t,yn)?t.isActive?0:this._state_v70vig$_0.atomicfu$compareAndSet(t,an)?(this.onStart(),1):-1:e.isType(t,Rn)?this._state_v70vig$_0.atomicfu$compareAndSet(t,t.list)?(this.onStart(),1):-1:0},ln.prototype.onStart=function(){},ln.prototype.getCancellationException=function(){var t,n,i=this.state_8be2vx$;if(e.isType(i,dn)){if(null==(n=null!=(t=i.rootCause)?this.toCancellationException_rg9tb7$(t,Xr(this)+" is cancelling"):null))throw S(("Job is still new or active: "+this).toString());return n}if(e.isType(i,$n))throw S(("Job is still new or active: "+this).toString());return e.isType(i,Qt)?this.toCancellationException_rg9tb7$(i.cause):new ta(Xr(this)+" has completed normally",null,this)},ln.prototype.toCancellationException_rg9tb7$=function(t,n){var i,o;return void 0===n&&(n=null),null!=(o=e.isType(i=t,J)?i:null)?o:new ta(null!=n?n:this.cancellationExceptionMessage(),t,this)},Object.defineProperty(ln.prototype,"completionCause",{configurable:!0,get:function(){var t,n=this.state_8be2vx$;if(e.isType(n,dn)){if(null==(t=n.rootCause))throw S(("Job is still new or active: "+this).toString());return t}if(e.isType(n,$n))throw S(("Job is still new or active: "+this).toString());return e.isType(n,Qt)?n.cause:null}}),Object.defineProperty(ln.prototype,"completionCauseHandled",{configurable:!0,get:function(){var t=this.state_8be2vx$;return e.isType(t,Qt)&&t.handled}}),ln.prototype.invokeOnCompletion_f05bi3$=function(t){return this.invokeOnCompletion_ct2b2z$(!1,!0,t)},ln.prototype.invokeOnCompletion_ct2b2z$$default=function(t,n,i){for(var o=this.makeNode_9qhc1i$_0(i,t);;){var r=this.state_8be2vx$;t:do{var a,c,l;if(e.isType(r,yn))if(r.isActive){if(this._state_v70vig$_0.atomicfu$compareAndSet(r,o))return o}else this.promoteEmptyToNodeList_lchanx$_0(r);else{if(!e.isType(r,$n))return n&&kr(i,null!=(l=e.isType(c=r,Qt)?c:null)?l.cause:null),cn();var p=r.list;if(null==p)this.promoteSingleToNodeList_l9deey$_0(e.isType(a=r,Nn)?a:s());else{var u={v:null},d={v:cn()};if(t&&e.isType(r,dn)){u.v=r.rootCause;var h=null==u.v;if(h||(h=e.isType(i,Dn)&&!r.isCompleting),h){if(!this.addLastAtomic_ct8uo8$_0(r,p,o))break t;if(null==u.v)return o;d.v=o}}if(null!=u.v)return n&&kr(i,u.v),d.v;if(this.addLastAtomic_ct8uo8$_0(r,p,o))return o}}}while(0)}},ln.prototype.makeNode_9qhc1i$_0=function(t,n){var i,o,r,a,s,c=n?null!=(o=e.isType(i=t,On)?i:null)?o:new Un(t):null!=(s=null!=(a=e.isType(r=t,Nn)?r:null)?a:null)?s:new Cn(t);return c.job=this,c},ln.prototype.addLastAtomic_ct8uo8$_0=function(t,e,n){var i;t:do{if(!pn(this,t)()){i=!1;break t}e.addLast_l2j9rm$(n),i=!0}while(0);return i},ln.prototype.promoteEmptyToNodeList_lchanx$_0=function(t){var e=new gn,n=t.isActive?e:new Rn(e);this._state_v70vig$_0.atomicfu$compareAndSet(t,n)},ln.prototype.promoteSingleToNodeList_l9deey$_0=function(t){t.addOneIfEmpty_l2j9rm$(new gn);var e=t._next;this._state_v70vig$_0.atomicfu$compareAndSet(t,e)},ln.prototype.join=function(t){if(this.joinInternal_ta6o25$_0())return this.joinSuspend_kfh5g8$_0(t);Ye(t.context)},ln.prototype.joinInternal_ta6o25$_0=function(){for(;;){var t=this.state_8be2vx$;if(!e.isType(t,$n))return!1;if(this.startInternal_tp1bqd$_0(t)>=0)return!0}},ln.prototype.joinSuspend_kfh5g8$_0=function(t){return(n=this,e=function(t){return Dt(t,n.invokeOnCompletion_f05bi3$(new Sn(t))),d},function(t){var n=new Pt(m(t),1);return n.initCancellability(),e(n),n.getResult()})(t);var e,n},Object.defineProperty(ln.prototype,"onJoin",{configurable:!0,get:function(){return this}}),ln.prototype.registerSelectClause0_s9h9qd$=function(t,n){for(;;){var i=this.state_8be2vx$;if(t.isSelected)return;if(!e.isType(i,$n))return void(t.trySelect()&&dr(n,t.completion));if(0===this.startInternal_tp1bqd$_0(i))return void t.disposeOnSelect_rvfg84$(this.invokeOnCompletion_f05bi3$(new bn(t,n)))}},ln.prototype.removeNode_jr34ao$=function(t){for(;;){var n=this.state_8be2vx$;if(!e.isType(n,Nn))return e.isType(n,$n)?void(null!=n.list&&t.remove()):void 0;if(n!==t)return;if(this._state_v70vig$_0.atomicfu$compareAndSet(n,an))return}},Object.defineProperty(ln.prototype,"onCancelComplete",{configurable:!0,get:function(){return!1}}),ln.prototype.cancel_x5z25k$$default=function(t){this.cancelInternal_tcv7n7$(null!=t?t:new ta(this.cancellationExceptionMessage(),null,this))},ln.prototype.cancellationExceptionMessage=function(){return"Job was cancelled"},ln.prototype.cancel_dbl4no$$default=function(t){var e;return this.cancelInternal_tcv7n7$(null!=(e=null!=t?this.toCancellationException_rg9tb7$(t):null)?e:new ta(this.cancellationExceptionMessage(),null,this)),!0},ln.prototype.cancelInternal_tcv7n7$=function(t){this.cancelImpl_8ea4ql$(t)},ln.prototype.parentCancelled_pv1t6x$=function(t){this.cancelImpl_8ea4ql$(t)},ln.prototype.childCancelled_tcv7n7$=function(t){return!!e.isType(t,J)||this.cancelImpl_8ea4ql$(t)&&this.handlesException},ln.prototype.cancelCoroutine_dbl4no$=function(t){return this.cancelImpl_8ea4ql$(t)},ln.prototype.cancelImpl_8ea4ql$=function(t){var e,n=Ze;return!(!this.onCancelComplete||(n=this.cancelMakeCompleting_z3ww04$_0(t))!==tn)||(n===Ze&&(n=this.makeCancelling_xjon1g$_0(t)),n===Ze||n===tn?e=!0:n===nn?e=!1:(this.afterCompletion_s8jyv4$(n),e=!0),e)},ln.prototype.cancelMakeCompleting_z3ww04$_0=function(t){for(;;){var n=this.state_8be2vx$;if(!e.isType(n,$n)||e.isType(n,dn)&&n.isCompleting)return Ze;var i=new Qt(this.createCauseException_kfrsk8$_0(t)),o=this.tryMakeCompleting_w5s53t$_0(n,i);if(o!==en)return o}},ln.prototype.defaultCancellationException_6umzry$=R("kotlinx-coroutines-core.kotlinx.coroutines.JobSupport.defaultCancellationException_6umzry$",C((function(){var e=t.kotlinx.coroutines.JobCancellationException;return function(t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new e(null!=t?t:this.cancellationExceptionMessage(),n,this)}}))),ln.prototype.getChildJobCancellationCause=function(){var t,n,i,o=this.state_8be2vx$;if(e.isType(o,dn))t=o.rootCause;else if(e.isType(o,Qt))t=o.cause;else{if(e.isType(o,$n))throw S(("Cannot be cancelling child in this state: "+b(o)).toString());t=null}var r=t;return null!=(i=e.isType(n=r,J)?n:null)?i:new ta("Parent job is "+this.stateString_u2sjqg$_0(o),r,this)},ln.prototype.createCauseException_kfrsk8$_0=function(t){var n;return null==t||e.isType(t,L)?null!=t?t:new ta(this.cancellationExceptionMessage(),null,this):(e.isType(n=t,He)?n:s()).getChildJobCancellationCause()},ln.prototype.makeCancelling_xjon1g$_0=function(t){for(var n={v:null};;){var i,o,r=this.state_8be2vx$;if(e.isType(r,dn)){var a;if(r.isSealed)return nn;var s=r.isCancelling;if(null!=t||!s){var c;if(null!=(a=n.v))c=a;else{var l=this.createCauseException_kfrsk8$_0(t);n.v=l,c=l}var p=c;r.addExceptionLocked_tcv7n7$(p)}var u=r.rootCause,d=s?null:u;return null!=d&&this.notifyCancelling_xkpzb8$_0(r.list,d),Ze}if(!e.isType(r,$n))return nn;if(null!=(i=n.v))o=i;else{var h=this.createCauseException_kfrsk8$_0(t);n.v=h,o=h}var E=o;if(r.isActive){if(this.tryMakeCancelling_v0qvyy$_0(r,E))return Ze}else{var _=this.tryMakeCompleting_w5s53t$_0(r,new Qt(E));if(_===Ze)throw S(("Cannot happen in "+b(r)).toString());if(_!==en)return _}}},ln.prototype.getOrPromoteCancellingList_dmij2j$_0=function(t){var n,i;if(null==(i=t.list)){if(e.isType(t,yn))n=new gn;else{if(!e.isType(t,Nn))throw S(("State should have list: "+t).toString());this.promoteSingleToNodeList_l9deey$_0(t),n=null}i=n}return i},ln.prototype.tryMakeCancelling_v0qvyy$_0=function(t,e){var n;if(null==(n=this.getOrPromoteCancellingList_dmij2j$_0(t)))return!1;var i=n,o=new dn(i,!1,e);return!!this._state_v70vig$_0.atomicfu$compareAndSet(t,o)&&(this.notifyCancelling_xkpzb8$_0(i,e),!0)},ln.prototype.makeCompleting_8ea4ql$=function(t){for(;;){var e=this.tryMakeCompleting_w5s53t$_0(this.state_8be2vx$,t);if(e===Ze)return!1;if(e===tn)return!0;if(e!==en)return this.afterCompletion_s8jyv4$(e),!0}},ln.prototype.makeCompletingOnce_8ea4ql$=function(t){for(;;){var e=this.tryMakeCompleting_w5s53t$_0(this.state_8be2vx$,t);if(e===Ze)throw new Y("Job "+this+" is already complete or completing, but is being completed with "+b(t),this.get_exceptionOrNull_ejijbb$_0(t));if(e!==en)return e}},ln.prototype.tryMakeCompleting_w5s53t$_0=function(t,n){return e.isType(t,$n)?!e.isType(t,yn)&&!e.isType(t,Nn)||e.isType(t,Dn)||e.isType(n,Qt)?this.tryMakeCompletingSlowPath_uh1ctj$_0(t,n):this.tryFinalizeSimpleState_5emg4m$_0(t,n)?n:en:Ze},ln.prototype.tryMakeCompletingSlowPath_uh1ctj$_0=function(t,n){var i,o,r,a;if(null==(i=this.getOrPromoteCancellingList_dmij2j$_0(t)))return en;var s,c,l=i,p=null!=(r=e.isType(o=t,dn)?o:null)?r:new dn(l,!1,null),u={v:null};if(p.isCompleting)return Ze;if(p.isCompleting=!0,p!==t&&!this._state_v70vig$_0.atomicfu$compareAndSet(t,p))return en;var d=p.isCancelling;null!=(c=e.isType(s=n,Qt)?s:null)&&p.addExceptionLocked_tcv7n7$(c.cause);var h=p.rootCause;u.v=d?null:h,null!=(a=u.v)&&this.notifyCancelling_xkpzb8$_0(l,a);var E=this.firstChild_15hr5g$_0(t);return null!=E&&this.tryWaitForChild_dzo3im$_0(p,E,n)?tn:this.finalizeFinishingState_10mr1z$_0(p,n)},ln.prototype.get_exceptionOrNull_ejijbb$_0=function(t){var n,i;return null!=(i=e.isType(n=t,Qt)?n:null)?i.cause:null},ln.prototype.firstChild_15hr5g$_0=function(t){var n,i,o;return null!=(o=e.isType(n=t,Dn)?n:null)?o:null!=(i=t.list)?this.nextChild_n2no7k$_0(i):null},ln.prototype.tryWaitForChild_dzo3im$_0=function(t,e,n){var i;if(e.childJob.invokeOnCompletion_ct2b2z$(void 0,!1,new hn(this,t,e,n))!==cn())return!0;if(null==(i=this.nextChild_n2no7k$_0(e)))return!1;var o=i;return this.tryWaitForChild_dzo3im$_0(t,o,n)},ln.prototype.continueCompleting_vth2d4$_0=function(t,e,n){var i=this.nextChild_n2no7k$_0(e);if(null==i||!this.tryWaitForChild_dzo3im$_0(t,i,n)){var o=this.finalizeFinishingState_10mr1z$_0(t,n);this.afterCompletion_s8jyv4$(o)}},ln.prototype.nextChild_n2no7k$_0=function(t){for(var n=t;n._removed;)n=n._prev;for(;;)if(!(n=n._next)._removed){if(e.isType(n,Dn))return n;if(e.isType(n,gn))return null}},un.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[u]},un.prototype=Object.create(u.prototype),un.prototype.constructor=un,un.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t=this.local$this$JobSupport.state_8be2vx$;if(e.isType(t,Dn)){if(this.state_0=8,this.result_0=this.local$$receiver.yield_11rb$(t.childJob,this),this.result_0===p)return p;continue}if(e.isType(t,$n)){if(null!=(this.local$tmp$=t.list)){this.local$cur=this.local$tmp$._next,this.state_0=2;continue}this.local$tmp$_0=null,this.state_0=6;continue}this.state_0=7;continue;case 1:throw this.exception_0;case 2:if(g(this.local$cur,this.local$tmp$)){this.state_0=5;continue}if(e.isType(this.local$cur,Dn)){if(this.state_0=3,this.result_0=this.local$$receiver.yield_11rb$(this.local$cur.childJob,this),this.result_0===p)return p;continue}this.state_0=4;continue;case 3:this.state_0=4;continue;case 4:this.local$cur=this.local$cur._next,this.state_0=2;continue;case 5:this.local$tmp$_0=d,this.state_0=6;continue;case 6:return this.local$tmp$_0;case 7:this.state_0=9;continue;case 8:return this.result_0;case 9:return d;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(ln.prototype,"children",{configurable:!0,get:function(){return Q((t=this,function(e,n,i){var o=new un(t,e,this,n);return i?o:o.doResume(null)}));var t}}),ln.prototype.attachChild_kx8v25$=function(t){var n;return e.isType(n=this.invokeOnCompletion_ct2b2z$(!0,void 0,new Dn(t)),Ve)?n:s()},ln.prototype.handleOnCompletionException_tcv7n7$=function(t){throw t},ln.prototype.onCancelling_dbl4no$=function(t){},Object.defineProperty(ln.prototype,"isScopedCoroutine",{configurable:!0,get:function(){return!1}}),Object.defineProperty(ln.prototype,"handlesException",{configurable:!0,get:function(){return!0}}),ln.prototype.handleJobException_tcv7n7$=function(t){return!1},ln.prototype.onCompletionInternal_s8jyv4$=function(t){},ln.prototype.afterCompletion_s8jyv4$=function(t){},ln.prototype.toString=function(){return this.toDebugString()+"@"+Wr(this)},ln.prototype.toDebugString=function(){return this.nameString()+"{"+this.stateString_u2sjqg$_0(this.state_8be2vx$)+"}"},ln.prototype.nameString=function(){return Xr(this)},ln.prototype.stateString_u2sjqg$_0=function(t){return e.isType(t,dn)?t.isCancelling?"Cancelling":t.isCompleting?"Completing":"Active":e.isType(t,$n)?t.isActive?"Active":"New":e.isType(t,Qt)?"Cancelled":"Completed"},Object.defineProperty(dn.prototype,"list",{get:function(){return this.list_m9wkmb$_0}}),Object.defineProperty(dn.prototype,"isCompleting",{configurable:!0,get:function(){return this._isCompleting_0.kotlinx$atomicfu$value},set:function(t){this._isCompleting_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(dn.prototype,"rootCause",{configurable:!0,get:function(){return this._rootCause_0.kotlinx$atomicfu$value},set:function(t){this._rootCause_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(dn.prototype,"exceptionsHolder_0",{configurable:!0,get:function(){return this._exceptionsHolder_0.kotlinx$atomicfu$value},set:function(t){this._exceptionsHolder_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(dn.prototype,"isSealed",{configurable:!0,get:function(){return this.exceptionsHolder_0===on}}),Object.defineProperty(dn.prototype,"isCancelling",{configurable:!0,get:function(){return null!=this.rootCause}}),Object.defineProperty(dn.prototype,"isActive",{configurable:!0,get:function(){return null==this.rootCause}}),dn.prototype.sealLocked_dbl4no$=function(t){var n,i,o=this.exceptionsHolder_0;if(null==o)i=this.allocateList_0();else if(e.isType(o,L)){var r=this.allocateList_0();r.add_11rb$(o),i=r}else{if(!e.isType(o,Z))throw S(("State is "+b(o)).toString());i=e.isType(n=o,Z)?n:s()}var a=i,c=this.rootCause;return null!=c&&a.add_wxm5ur$(0,c),null==t||g(t,c)||a.add_11rb$(t),this.exceptionsHolder_0=on,a},dn.prototype.addExceptionLocked_tcv7n7$=function(t){var n,i=this.rootCause;if(null!=i){if(t!==i){var o=this.exceptionsHolder_0;if(null==o)this.exceptionsHolder_0=t;else if(e.isType(o,L)){if(t===o)return;var r=this.allocateList_0();r.add_11rb$(o),r.add_11rb$(t),this.exceptionsHolder_0=r}else{if(!e.isType(o,Z))throw S(("State is "+b(o)).toString());(e.isType(n=o,Z)?n:s()).add_11rb$(t)}}}else this.rootCause=t},dn.prototype.allocateList_0=function(){return f(4)},dn.prototype.toString=function(){return"Finishing[cancelling="+this.isCancelling+", completing="+this.isCompleting+", rootCause="+b(this.rootCause)+", exceptions="+b(this.exceptionsHolder_0)+", list="+this.list+"]"},dn.$metadata$={kind:c,simpleName:"Finishing",interfaces:[$n]},ln.prototype.get_isCancelling_dpdoz8$_0=function(t){return e.isType(t,dn)&&t.isCancelling},hn.prototype.invoke=function(t){this.parent_0.continueCompleting_vth2d4$_0(this.state_0,this.child_0,this.proposedUpdate_0)},hn.$metadata$={kind:c,simpleName:"ChildCompletion",interfaces:[Nn]},En.prototype.getContinuationCancellationCause_dqr1mp$=function(t){var n,i=this.job_0.state_8be2vx$;return e.isType(i,dn)&&null!=(n=i.rootCause)?n:e.isType(i,Qt)?i.cause:t.getCancellationException()},En.prototype.nameString=function(){return"AwaitContinuation"},En.$metadata$={kind:c,simpleName:"AwaitContinuation",interfaces:[Pt]},Object.defineProperty(ln.prototype,"isCompletedExceptionally",{configurable:!0,get:function(){return e.isType(this.state_8be2vx$,Qt)}}),ln.prototype.getCompletionExceptionOrNull=function(){var t=this.state_8be2vx$;if(e.isType(t,$n))throw S("This job has not completed yet".toString());return this.get_exceptionOrNull_ejijbb$_0(t)},ln.prototype.getCompletedInternal_8be2vx$=function(){var t=this.state_8be2vx$;if(e.isType(t,$n))throw S("This job has not completed yet".toString());if(e.isType(t,Qt))throw t.cause;return fn(t)},ln.prototype.awaitInternal_8be2vx$=function(t){for(;;){var n=this.state_8be2vx$;if(!e.isType(n,$n)){if(e.isType(n,Qt))throw n.cause;return fn(n)}if(this.startInternal_tp1bqd$_0(n)>=0)break}return this.awaitSuspend_ixl9xw$_0(t)},ln.prototype.awaitSuspend_ixl9xw$_0=function(t){return(e=this,function(t){var n=new En(m(t),e);return n.initCancellability(),Dt(n,e.invokeOnCompletion_f05bi3$(new In(n))),n.getResult()})(t);var e},ln.prototype.registerSelectClause1Internal_u6kgbh$=function(t,n){for(;;){var i,o=this.state_8be2vx$;if(t.isSelected)return;if(!e.isType(o,$n))return void(t.trySelect()&&(e.isType(o,Qt)?t.resumeSelectWithException_tcv7n7$(o.cause):hr(n,null==(i=fn(o))||e.isType(i,a)?i:s(),t.completion)));if(0===this.startInternal_tp1bqd$_0(o))return void t.disposeOnSelect_rvfg84$(this.invokeOnCompletion_f05bi3$(new vn(t,n)))}},ln.prototype.selectAwaitCompletion_u6kgbh$=function(t,n){var i,o=this.state_8be2vx$;e.isType(o,Qt)?t.resumeSelectWithException_tcv7n7$(o.cause):lr(n,null==(i=fn(o))||e.isType(i,a)?i:s(),t.completion)},ln.$metadata$={kind:c,simpleName:"JobSupport",interfaces:[$r,He,qe,Fe]},_n.$metadata$={kind:c,simpleName:"IncompleteStateBox",interfaces:[]},Object.defineProperty(yn.prototype,"isActive",{get:function(){return this.isActive_hyoax9$_0}}),Object.defineProperty(yn.prototype,"list",{configurable:!0,get:function(){return null}}),yn.prototype.toString=function(){return"Empty{"+(this.isActive?"Active":"New")+"}"},yn.$metadata$={kind:c,simpleName:"Empty",interfaces:[$n]},Object.defineProperty(Tn.prototype,"onCancelComplete",{configurable:!0,get:function(){return!0}}),Object.defineProperty(Tn.prototype,"handlesException",{configurable:!0,get:function(){return this.handlesException_fejgjb$_0}}),Tn.prototype.complete=function(){return this.makeCompleting_8ea4ql$(d)},Tn.prototype.completeExceptionally_tcv7n7$=function(t){return this.makeCompleting_8ea4ql$(new Qt(t))},Tn.prototype.handlesExceptionF=function(){var t,n,i,o,r,a;if(null==(i=null!=(n=e.isType(t=this.parentHandle_8be2vx$,Dn)?t:null)?n.job:null))return!1;for(var s=i;;){if(s.handlesException)return!0;if(null==(a=null!=(r=e.isType(o=s.parentHandle_8be2vx$,Dn)?o:null)?r.job:null))return!1;s=a}},Tn.$metadata$={kind:c,simpleName:"JobImpl",interfaces:[Ht,ln]},$n.$metadata$={kind:I,simpleName:"Incomplete",interfaces:[]},Object.defineProperty(Nn.prototype,"job",{configurable:!0,get:function(){return null==this.job_ndnibc$_0?h("job"):this.job_ndnibc$_0},set:function(t){this.job_ndnibc$_0=t}}),Object.defineProperty(Nn.prototype,"isActive",{configurable:!0,get:function(){return!0}}),Object.defineProperty(Nn.prototype,"list",{configurable:!0,get:function(){return null}}),Nn.prototype.dispose=function(){this.job.removeNode_jr34ao$(this)},Nn.prototype.toString=function(){return Xr(this)+"@"+Wr(this)+"[job@"+Wr(this.job)+"]"},Nn.$metadata$={kind:c,simpleName:"JobNode",interfaces:[$n,Be,Dr]},Object.defineProperty(gn.prototype,"isActive",{configurable:!0,get:function(){return!0}}),Object.defineProperty(gn.prototype,"list",{configurable:!0,get:function(){return this}}),gn.prototype.getString_61zpoe$=function(t){var n=tt();n.append_pdl1vj$("List{"),n.append_pdl1vj$(t),n.append_pdl1vj$("}[");for(var i={v:!0},o=this._next;!g(o,this);){if(e.isType(o,Nn)){var r=o;i.v?i.v=!1:n.append_pdl1vj$(", "),n.append_s8jyv4$(r)}o=o._next}return n.append_pdl1vj$("]"),n.toString()},gn.prototype.toString=function(){return Yo?this.getString_61zpoe$("Active"):La.prototype.toString.call(this)},gn.$metadata$={kind:c,simpleName:"NodeList",interfaces:[$n,La]},Object.defineProperty(Rn.prototype,"list",{get:function(){return this.list_afai45$_0}}),Object.defineProperty(Rn.prototype,"isActive",{configurable:!0,get:function(){return!1}}),Rn.prototype.toString=function(){return Yo?this.list.getString_61zpoe$("New"):a.prototype.toString.call(this)},Rn.$metadata$={kind:c,simpleName:"InactiveNodeList",interfaces:[$n]},Cn.prototype.invoke=function(t){this.handler_0(t)},Cn.$metadata$={kind:c,simpleName:"InvokeOnCompletion",interfaces:[Nn]},Sn.prototype.invoke=function(t){this.continuation_0.resumeWith_tl1gpc$(new y(d))},Sn.$metadata$={kind:c,simpleName:"ResumeOnCompletion",interfaces:[Nn]},In.prototype.invoke=function(t){var n,i,o=this.job.state_8be2vx$;if(e.isType(o,Qt)){var r=this.continuation_0,c=o.cause;r.resumeWith_tl1gpc$(new y(D(c)))}else{i=this.continuation_0;var l=null==(n=fn(o))||e.isType(n,a)?n:s();i.resumeWith_tl1gpc$(new y(l))}},In.$metadata$={kind:c,simpleName:"ResumeAwaitOnCompletion",interfaces:[Nn]},Ln.prototype.invoke=function(t){this.handle_0.dispose()},Ln.$metadata$={kind:c,simpleName:"DisposeOnCompletion",interfaces:[Nn]},bn.prototype.invoke=function(t){this.select_0.trySelect()&&cr(this.block_0,this.select_0.completion)},bn.$metadata$={kind:c,simpleName:"SelectJoinOnCompletion",interfaces:[Nn]},vn.prototype.invoke=function(t){this.select_0.trySelect()&&this.job.selectAwaitCompletion_u6kgbh$(this.select_0,this.block_0)},vn.$metadata$={kind:c,simpleName:"SelectAwaitOnCompletion",interfaces:[Nn]},On.$metadata$={kind:c,simpleName:"JobCancellingNode",interfaces:[Nn]},Un.prototype.invoke=function(t){this._invoked_0.atomicfu$compareAndSet(0,1)&&this.handler_0(t)},Un.$metadata$={kind:c,simpleName:"InvokeOnCancelling",interfaces:[On]},Object.defineProperty(Dn.prototype,"parent",{configurable:!0,get:function(){return this.job}}),Dn.prototype.invoke=function(t){this.childJob.parentCancelled_pv1t6x$(this.job)},Dn.prototype.childCancelled_tcv7n7$=function(t){return this.job.childCancelled_tcv7n7$(t)},Dn.$metadata$={kind:c,simpleName:"ChildHandleNode",interfaces:[Ve,On]},An.prototype.invoke=function(t){this.child.parentCancelled_8o0b5c$(this.child.getContinuationCancellationCause_dqr1mp$(this.job))},An.$metadata$={kind:c,simpleName:"ChildContinuation",interfaces:[On]},kn.prototype.toString=function(){var t;return null!=(t=this.toStringInternalImpl())?t:Xr(this)+"@"+Wr(this)},kn.prototype.limitedParallelism_za3lpa$=function(t){return wo(t),this},kn.prototype.toStringInternalImpl=function(){var t,n=Vr().Main;if(this===n)return"Dispatchers.Main";try{t=n.immediate}catch(n){if(!e.isType(n,et))throw n;t=null}return this===t?"Dispatchers.Main.immediate":null},kn.$metadata$={kind:c,simpleName:"MainCoroutineDispatcher",interfaces:[te]},xn.prototype.childCancelled_tcv7n7$=function(t){return!1},xn.$metadata$={kind:c,simpleName:"SupervisorJobImpl",interfaces:[Tn]},zn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[u]},zn.prototype=Object.create(u.prototype),zn.prototype.constructor=zn,zn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$timeMillis.compareTo_11rb$(B)<=0)return null;this.state_0=1;continue;case 1:if(this.local$coroutine={v:null},this.exceptionState_0=3,this.state_0=2,this.result_0=wn(this.local$timeMillis,this.local$coroutine,this.local$block)(this),this.result_0===p)return p;continue;case 2:return this.result_0;case 3:if(this.exceptionState_0=7,this.local$e=this.exception_0,e.isType(this.local$e,jn)){if(this.local$e.coroutine_8be2vx$===this.local$coroutine.v)return null;this.state_0=4;continue}throw this.local$e;case 4:throw this.local$e;case 5:this.state_0=6;continue;case 6:return;case 7:throw this.exception_0;default:throw this.state_0=7,new Error("State Machine Unreachable execution")}}catch(t){if(7===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Gn.prototype.run=function(){this.cancelCoroutine_dbl4no$(Fn(this.time,this))},Gn.prototype.nameString=function(){return or.prototype.nameString.call(this)+"(timeMillis="+this.time.toString()+")"},Gn.$metadata$={kind:c,simpleName:"TimeoutCoroutine",interfaces:[_a,or]},jn.prototype.createCopy=function(){var t,e=new jn(null!=(t=this.message)?t:"",this.coroutine_8be2vx$);return e},jn.$metadata$={kind:c,simpleName:"TimeoutCancellationException",interfaces:[ve,J]},Mn.prototype.limitedParallelism_za3lpa$=function(t){throw nt("limitedParallelism is not supported for Dispatchers.Unconfined")},Mn.prototype.isDispatchNeeded_1fupul$=function(t){return!1},Mn.prototype.dispatch_5bn72i$=function(t,e){var n=t.get_j3r2sn$(ii());if(null==n)throw nt("Dispatchers.Unconfined.dispatch function can only be used by the yield function. If you wrap Unconfined dispatcher in your code, make sure you properly delegate isDispatchNeeded and dispatch calls.");n.dispatcherWasUnconfined=!0},Mn.prototype.toString=function(){return"Dispatchers.Unconfined"},Mn.$metadata$={kind:v,simpleName:"Unconfined",interfaces:[te]};var Wn=null;function Xn(){return null===Wn&&new Mn,Wn}function Bn(){ii(),k.call(this,ii()),this.dispatcherWasUnconfined=!1}function qn(){ni=this}qn.$metadata$={kind:v,simpleName:"Key",interfaces:[x]};var Hn,Vn,Kn,Jn,Yn,Qn,Zn,ti,ei,ni=null;function ii(){return null===ni&&new qn,ni}function oi(t){return function(e){var n=Ot(m(e));return t(n),n.getResult()}}function ri(t){this.onUndeliveredElement_0=t,this.queue_0=new La,this.onCloseHandler_0=E(null)}function ai(t,e){Ra.call(this,t,new ui(e))}function si(t){return function(){return t.isBufferFull}}function ci(t,e){Ca.call(this,e),this.element=t}function li(t){this.this$AbstractSendChannel=t}function pi(t,e,n,i){Ri.call(this),this.pollResult_m5nr4l$_0=t,this.channel=e,this.select=n,this.block=i}function ui(t){Ri.call(this),this.element=t}function di(t){ri.call(this,t)}function hi(t){return function(){return t.isBufferEmpty}}function Ei(t){Ca.call(this,t)}function _i(t){this.this$AbstractChannel=t}function mi(t){this.this$AbstractChannel=t}function fi(t,e){this.$outer=t,Ft.call(this),this.receive_0=e}function yi(t){this.channel=t,this.result=Jn}function Ti(t,e){bi.call(this),this.cont=t,this.receiveMode=e}function $i(t,e,n){Ti.call(this,t,e),this.onUndeliveredElement=n}function Ni(t,e){bi.call(this),this.iterator=t,this.cont=e}function gi(t,e,n,i){bi.call(this),this.channel=t,this.select=e,this.block=n,this.receiveMode=i}function Ri(){ga.call(this)}function Ci(){}function Si(t,e){Ri.call(this),this.pollResult_vo6xxe$_0=t,this.cont=e}function Ii(t,e,n){Si.call(this,t,e),this.onUndeliveredElement=n}function Li(t){Ri.call(this),this.closeCause=t}function bi(){ga.call(this)}function vi(t,n,i){if(di.call(this,i),this.capacity_0=t,this.onBufferOverflow_0=n,!(this.capacity_0>=1)){var o="ArrayChannel capacity must be at least 1, but "+this.capacity_0+" was specified";throw V(o.toString())}this.lock_0=new $a;var r=this.capacity_0,a=e.newArray(st.min(r,8),null);at(a,Hn),this.buffer_0=a,this.head_0=0,this.size_0=_(0)}function Oi(t,e,n){St.call(this,t,!1,n),this._channel_0=e,this.initParentJob_5dx9e$(t.get_j3r2sn$(Xe()))}function Ui(){}function Di(t,e){F.call(this),this.name$=t,this.ordinal$=e}function Ai(){Ai=function(){},Zn=new Di("SUSPEND",0),ti=new Di("DROP_OLDEST",1),ei=new Di("DROP_LATEST",2)}function ki(){return Ai(),Zn}function Pi(){return Ai(),ti}function xi(){return Ai(),ei}function wi(){}function zi(){}function Gi(t,e){u.call(this,e),this.exceptionState_0=1,this.$this=t}function ji(t){this.this$ReceiveChannel=t}function Fi(t,e,n){u.call(this,n),this.exceptionState_0=1,this.local$closure$block=t,this.local$it=e}function Mi(t){Hi(),this.holder=t}function Wi(){}function Xi(t){Wi.call(this),this.cause=t}function Bi(){qi=this,this.failed_0=new Wi}ri.prototype.offerInternal_11rb$=function(t){for(var e;;){if(null==(e=this.takeFirstReceiveOrPeekClosed()))return Kn;var n=e;if(null!=n.tryResumeReceive_j43gjz$(t,null))return n.completeResumeReceive_11rb$(t),n.offerResult}},ri.prototype.offerSelectInternal_ys5ufj$=function(t,e){var n=this.describeTryOffer_0(t),i=e.performAtomicTrySelect_6q0pxr$(n);if(null!=i)return i;var o=n.result;return o.completeResumeReceive_11rb$(t),o.offerResult},Object.defineProperty(ri.prototype,"closedForSend_0",{configurable:!0,get:function(){var t,n,i;return null!=(n=e.isType(t=this.queue_0._prev,Li)?t:null)?(this.helpClose_0(n),i=n):i=null,i}}),Object.defineProperty(ri.prototype,"closedForReceive_0",{configurable:!0,get:function(){var t,n,i;return null!=(n=e.isType(t=this.queue_0._next,Li)?t:null)?(this.helpClose_0(n),i=n):i=null,i}}),ri.prototype.takeFirstSendOrPeekClosed_0=function(){var t,n=this.queue_0;t:do{var i=n._next;if(i===n){t=null;break t}if(!e.isType(i,Ri)){t=null;break t}if(e.isType(i,Li)){t=i;break t}if(!i.removeImpl())throw S("Should remove".toString());t=i}while(0);return t},ri.prototype.sendBuffered_0=function(t){var n=this.queue_0,i=new ui(t),o=n._prev;return e.isType(o,Ci)?o:(n.addLast_l2j9rm$(i),null)},ri.prototype.describeSendBuffered_0=function(t){return new ai(this.queue_0,t)},ai.prototype.failure_l2j9rm$=function(t){return e.isType(t,Li)?t:e.isType(t,Ci)?Kn:null},ai.$metadata$={kind:c,simpleName:"SendBufferedDesc",interfaces:[Ra]},Object.defineProperty(ri.prototype,"isClosedForSend",{configurable:!0,get:function(){return null!=this.closedForSend_0}}),Object.defineProperty(ri.prototype,"isFullImpl_0",{configurable:!0,get:function(){return!e.isType(this.queue_0._next,Ci)&&this.isBufferFull}}),ri.prototype.send_11rb$=function(t,e){if(this.offerInternal_11rb$(t)!==Vn)return this.sendSuspend_0(t,e)},ri.prototype.offer_11rb$=function(t){var n,i;try{return wi.prototype.offer_11rb$.call(this,t)}catch(o){if(e.isType(o,L)){if(null!=(i=null!=(n=this.onUndeliveredElement_0)?tr(n,t):null))throw it(i,o),i;throw o}throw o}},ri.prototype.trySend_11rb$=function(t){var n,i,o=this.offerInternal_11rb$(t);if(o===Vn)i=Hi().success_mh5how$(d);else if(o===Kn){if(null==(n=this.closedForSend_0))return Hi().failure_287e2$();var r=n;i=Hi().closed_xo0v4m$(this.helpCloseAndGetSendException_0(r))}else{if(!e.isType(o,Li))throw S(("trySend returned "+o.toString()).toString());i=Hi().closed_xo0v4m$(this.helpCloseAndGetSendException_0(o))}return i},ri.prototype.helpCloseAndGetSendException_0=function(t){return this.helpClose_0(t),t.sendException},ri.prototype.helpCloseAndGetSendException_1=function(t,e){var n,i;if(this.helpClose_0(e),null!=(i=null!=(n=this.onUndeliveredElement_0)?tr(n,t):null))throw it(i,e.sendException),i;return e.sendException},ri.prototype.sendSuspend_0=function(t,n){return oi((i=this,o=t,function(t){for(;;){if(i.isFullImpl_0){var n=null==i.onUndeliveredElement_0?new Si(o,t):new Ii(o,t,i.onUndeliveredElement_0),r=i.enqueueSend_vs6846$(n);if(null==r)return void Ut(t,n);if(e.isType(r,Li))return void i.helpCloseAndResumeWithSendException_0(t,o,r);if(r!==Yn&&!e.isType(r,bi))throw S(("enqueueSend returned "+b(r)).toString())}var a=i.offerInternal_11rb$(o);if(a===Vn)return void t.resumeWith_tl1gpc$(new y(d));if(a!==Kn){if(e.isType(a,Li))return void i.helpCloseAndResumeWithSendException_0(t,o,a);throw S(("offerInternal returned "+a.toString()).toString())}}}))(n);var i,o},ri.prototype.helpCloseAndResumeWithSendException_0=function(t,e,n){var i,o;this.helpClose_0(n);var r=n.sendException;if(null!=(o=null!=(i=this.onUndeliveredElement_0)?tr(i,e):null))return it(o,r),void t.resumeWith_tl1gpc$(new y(D(o)));t.resumeWith_tl1gpc$(new y(D(r)))},ri.prototype.enqueueSend_vs6846$=function(t){if(this.isBufferAlwaysFull){var n=this.queue_0,i=n._prev;if(e.isType(i,Ci))return i;n.addLast_l2j9rm$(t)}else{var o,r=this.queue_0;t:do{var a=r._prev;if(e.isType(a,Ci))return a;if(!si(this)()){o=!1;break t}r.addLast_l2j9rm$(t),o=!0}while(0);if(!o)return Yn}return null},ri.prototype.close_dbl4no$$default=function(t){var n,i,o=new Li(t),r=this.queue_0;t:do{if(e.isType(r._prev,Li)){i=!1;break t}r.addLast_l2j9rm$(o),i=!0}while(0);var a=i,c=a?o:e.isType(n=this.queue_0._prev,Li)?n:s();return this.helpClose_0(c),a&&this.invokeOnCloseHandler_0(t),a},ri.prototype.invokeOnCloseHandler_0=function(t){var e,n=this.onCloseHandler_0.kotlinx$atomicfu$value;null!==n&&n!==Qn&&this.onCloseHandler_0.atomicfu$compareAndSet(n,Qn)&&("function"==typeof(e=n)?e:s())(t)},ri.prototype.invokeOnClose_f05bi3$=function(t){if(!this.onCloseHandler_0.atomicfu$compareAndSet(null,t)){var e=this.onCloseHandler_0.kotlinx$atomicfu$value;if(e===Qn)throw S("Another handler was already registered and successfully invoked");throw S("Another handler was already registered: "+b(e))}var n=this.closedForSend_0;null!=n&&this.onCloseHandler_0.atomicfu$compareAndSet(t,Qn)&&t(n.closeCause)},ri.prototype.helpClose_0=function(t){for(var n,i,o=new Po;null!=(i=e.isType(n=t._prev,bi)?n:null);){var r=i;r.remove()?o=o.plus_11rb$(r):r.helpRemove()}var c,l,p,u=o;if(null!=(c=u.holder_0))if(e.isType(c,Z))for(var d=e.isType(p=u.holder_0,Z)?p:s(),h=d.size-1|0;h>=0;h--)d.get_za3lpa$(h).resumeReceiveClosed_1zqbm$(t);else(null==(l=u.holder_0)||e.isType(l,a)?l:s()).resumeReceiveClosed_1zqbm$(t);this.onClosedIdempotent_l2j9rm$(t)},ri.prototype.onClosedIdempotent_l2j9rm$=function(t){},ri.prototype.takeFirstReceiveOrPeekClosed=function(){var t,n=this.queue_0;t:do{var i=n._next;if(i===n){t=null;break t}if(!e.isType(i,Ci)){t=null;break t}if(e.isType(i,Li)){t=i;break t}if(!i.removeImpl())throw S("Should remove".toString());t=i}while(0);return t},ri.prototype.describeTryOffer_0=function(t){return new ci(t,this.queue_0)},ci.prototype.failure_l2j9rm$=function(t){return e.isType(t,Li)?t:e.isType(t,Ci)?null:Kn},ci.prototype.onPrepare_xe32vn$=function(t){var n,i;return null==(i=(e.isType(n=t.affected,Ci)?n:s()).tryResumeReceive_j43gjz$(this.element,t))?io:i===to?to:null},ci.$metadata$={kind:c,simpleName:"TryOfferDesc",interfaces:[Ca]},li.prototype.registerSelectClause2_rol3se$=function(t,e,n){this.this$AbstractSendChannel.registerSelectSend_0(t,e,n)},li.$metadata$={kind:c,interfaces:[gr]},Object.defineProperty(ri.prototype,"onSend",{configurable:!0,get:function(){return new li(this)}}),ri.prototype.registerSelectSend_0=function(t,n,i){for(;;){if(t.isSelected)return;if(this.isFullImpl_0){var o=new pi(n,this,t,i),r=this.enqueueSend_vs6846$(o);if(null==r)return void t.disposeOnSelect_rvfg84$(o);if(e.isType(r,Li))throw this.helpCloseAndGetSendException_1(n,r);if(r!==Yn&&!e.isType(r,bi))throw S(("enqueueSend returned "+b(r)+" ").toString())}var a=this.offerSelectInternal_ys5ufj$(n,t);if(a===Wo)return;if(a!==Kn&&a!==to){if(a===Vn)return void hr(i,this,t.completion);throw e.isType(a,Li)?this.helpCloseAndGetSendException_1(n,a):S(("offerSelectInternal returned "+a.toString()).toString())}}},ri.prototype.toString=function(){return Xr(this)+"@"+Wr(this)+"{"+this.queueDebugStateString_0+"}"+this.bufferDebugString},Object.defineProperty(ri.prototype,"queueDebugStateString_0",{configurable:!0,get:function(){var t=this.queue_0._next;if(t===this.queue_0)return"EmptyQueue";var n=e.isType(t,Li)?t.toString():e.isType(t,bi)?"ReceiveQueued":e.isType(t,Ri)?"SendQueued":"UNEXPECTED:"+t,i=this.queue_0._prev;return i!==t&&(n+=",queueSize="+this.countQueueSize_0(),e.isType(i,Li)&&(n+=",closedForSend="+i)),n}}),ri.prototype.countQueueSize_0=function(){for(var t={v:0},n=this.queue_0,i=n._next;!g(i,n);)e.isType(i,ga)&&(t.v=t.v+1|0),i=i._next;return t.v},Object.defineProperty(ri.prototype,"bufferDebugString",{configurable:!0,get:function(){return""}}),Object.defineProperty(pi.prototype,"pollResult",{get:function(){return this.pollResult_m5nr4l$_0}}),pi.prototype.tryResumeSend_uc1cc4$=function(t){var n;return null==(n=this.select.trySelectOther_uc1cc4$(t))||e.isType(n,rr)?n:s()},pi.prototype.completeResumeSend=function(){lr(this.block,this.channel,this.select.completion)},pi.prototype.dispose=function(){this.remove()&&this.undeliveredElement()},pi.prototype.resumeSendClosed_1zqbm$=function(t){this.select.trySelect()&&this.select.resumeSelectWithException_tcv7n7$(t.sendException)},pi.prototype.undeliveredElement=function(){var t;null!=(t=this.channel.onUndeliveredElement_0)&&er(t,this.pollResult,this.select.completion.context)},pi.prototype.toString=function(){return"SendSelect@"+Wr(this)+"("+this.pollResult+")["+this.channel+", "+this.select+"]"},pi.$metadata$={kind:c,simpleName:"SendSelect",interfaces:[Be,Ri]},Object.defineProperty(ui.prototype,"pollResult",{configurable:!0,get:function(){return this.element}}),ui.prototype.tryResumeSend_uc1cc4$=function(t){return null!=t&&t.finishPrepare(),o},ui.prototype.completeResumeSend=function(){},ui.prototype.resumeSendClosed_1zqbm$=function(t){},ui.prototype.toString=function(){return"SendBuffered@"+Wr(this)+"("+this.element+")"},ui.$metadata$={kind:c,simpleName:"SendBuffered",interfaces:[Ri]},ri.$metadata$={kind:c,simpleName:"AbstractSendChannel",interfaces:[wi]},di.prototype.pollInternal=function(){for(var t;;){if(null==(t=this.takeFirstSendOrPeekClosed_0()))return Jn;var e=t;if(null!=e.tryResumeSend_uc1cc4$(null))return e.completeResumeSend(),e.pollResult;e.undeliveredElement()}},di.prototype.pollSelectInternal_y5yyj0$=function(t){var e=this.describeTryPoll_0(),n=t.performAtomicTrySelect_6q0pxr$(e);return null!=n?n:(e.result.completeResumeSend(),e.result.pollResult)},Object.defineProperty(di.prototype,"hasReceiveOrClosed_0",{configurable:!0,get:function(){return e.isType(this.queue_0._next,Ci)}}),Object.defineProperty(di.prototype,"isClosedForReceive",{configurable:!0,get:function(){return null!=this.closedForReceive_0&&this.isBufferEmpty}}),Object.defineProperty(di.prototype,"isEmpty",{configurable:!0,get:function(){return this.isEmptyImpl_0}}),Object.defineProperty(di.prototype,"isEmptyImpl_0",{configurable:!0,get:function(){return!e.isType(this.queue_0._next,Ri)&&this.isBufferEmpty}}),di.prototype.receive=function(t){var n,i=this.pollInternal();return i===Jn||e.isType(i,Li)?this.receiveSuspend_0(0,t):null==(n=i)||e.isType(n,a)?n:s()},di.prototype.receiveSuspend_0=function(t,n){return oi((i=this,o=t,function(t){var n,r,c,l,p,u,h;null==i.onUndeliveredElement_0?p=new Ti(e.isType(n=t,vt)?n:s(),o):(c=e.isType(r=t,vt)?r:s(),l=i.onUndeliveredElement_0,p=new $i(c,o,l));for(var E=p;;){if(i.enqueueReceive_0(E))return void i.removeReceiveOnCancel_0(t,E);var _=i.pollInternal();if(e.isType(_,Li))return void E.resumeReceiveClosed_1zqbm$(_);if(_!==Jn)return void t.resume_q1ktlu$(E.resumeValue_11rb$(null==(u=_)||e.isType(u,a)?u:s()),E.resumeOnCancellationFun_11rb$(null==(h=_)||e.isType(h,a)?h:s()))}return d}))(n);var i,o},di.prototype.enqueueReceiveInternal_i292ax$=function(t){var n;if(this.isBufferAlwaysEmpty){var i,o=this.queue_0;t:do{if(e.isType(o._prev,Ri)){i=!1;break t}o.addLast_l2j9rm$(t),i=!0}while(0);n=i}else{var r,a=this.queue_0;t:do{if(e.isType(a._prev,Ri)){r=!1;break t}if(!hi(this)()){r=!1;break t}a.addLast_l2j9rm$(t),r=!0}while(0);n=r}return n},di.prototype.enqueueReceive_0=function(t){var e=this.enqueueReceiveInternal_i292ax$(t);return e&&this.onReceiveEnqueued(),e},di.prototype.receiveCatching=function(t){var n,i=this.pollInternal();return i!==Jn?e.isType(i,Li)?Hi().closed_xo0v4m$(i.closeCause):Hi().success_mh5how$(null==(n=i)||e.isType(n,a)?n:s()):this.receiveSuspend_0(1,t)},di.prototype.tryReceive=function(){var t,n=this.pollInternal();return n===Jn?Hi().failure_287e2$():e.isType(n,Li)?Hi().closed_xo0v4m$(n.closeCause):Hi().success_mh5how$(null==(t=n)||e.isType(t,a)?t:s())},di.prototype.cancel_dbl4no$$default=function(t){return this.cancelInternal_fg6mcv$(t)},di.prototype.cancel_x5z25k$$default=function(t){this.isClosedForReceive||this.cancelInternal_fg6mcv$(null!=t?t:U(Xr(this)+" was cancelled"))},di.prototype.cancelInternal_fg6mcv$=function(t){var e=this.close_dbl4no$(t);return this.onCancelIdempotent_6taknv$(e),e},di.prototype.onCancelIdempotent_6taknv$=function(t){var n;if(null==(n=this.closedForSend_0))throw S("Cannot happen".toString());for(var i=n,o=new Po;;){var r,a=i._prev;if(e.isType(a,La))break;a.remove()?o=o.plus_11rb$(e.isType(r=a,Ri)?r:s()):a.helpRemove()}this.onCancelIdempotentList_kji3ae$(o,i)},di.prototype.onCancelIdempotentList_kji3ae$=function(t,n){var i,o,r;if(null!=(i=t.holder_0))if(e.isType(i,Z))for(var c=e.isType(r=t.holder_0,Z)?r:s(),l=c.size-1|0;l>=0;l--)c.get_za3lpa$(l).resumeSendClosed_1zqbm$(n);else(null==(o=t.holder_0)||e.isType(o,a)?o:s()).resumeSendClosed_1zqbm$(n)},di.prototype.iterator=function(){return new yi(this)},di.prototype.describeTryPoll_0=function(){return new Ei(this.queue_0)},Ei.prototype.failure_l2j9rm$=function(t){return e.isType(t,Li)?t:e.isType(t,Ri)?null:Jn},Ei.prototype.onPrepare_xe32vn$=function(t){var n,i;return null==(i=(e.isType(n=t.affected,Ri)?n:s()).tryResumeSend_uc1cc4$(t))?io:i===to?to:null},Ei.prototype.onRemoved_l2j9rm$=function(t){var n;(e.isType(n=t,Ri)?n:s()).undeliveredElement()},Ei.$metadata$={kind:c,simpleName:"TryPollDesc",interfaces:[Ca]},_i.prototype.registerSelectClause1_o3xas4$=function(t,n){var i,o;o=e.isType(i=n,ot)?i:s(),this.this$AbstractChannel.registerSelectReceiveMode_0(t,0,o)},_i.$metadata$={kind:c,interfaces:[Nr]},Object.defineProperty(di.prototype,"onReceive",{configurable:!0,get:function(){return new _i(this)}}),mi.prototype.registerSelectClause1_o3xas4$=function(t,n){var i,o;o=e.isType(i=n,ot)?i:s(),this.this$AbstractChannel.registerSelectReceiveMode_0(t,1,o)},mi.$metadata$={kind:c,interfaces:[Nr]},Object.defineProperty(di.prototype,"onReceiveCatching",{configurable:!0,get:function(){return new mi(this)}}),di.prototype.registerSelectReceiveMode_0=function(t,e,n){for(;;){if(t.isSelected)return;if(this.isEmptyImpl_0){if(this.enqueueReceiveSelect_0(t,n,e))return}else{var i=this.pollSelectInternal_y5yyj0$(t);if(i===Wo)return;i!==Jn&&i!==to&&this.tryStartBlockUnintercepted_0(n,t,e,i)}}},di.prototype.tryStartBlockUnintercepted_0=function(t,n,i,o){var r;if(e.isType(o,Li))switch(i){case 0:throw o.receiveException;case 1:if(!n.trySelect())return;hr(t,Hi().closed_xo0v4m$(o.closeCause),n.completion)}else hr(t,1===i?e.isType(o,Li)?Hi().closed_xo0v4m$(o.closeCause):Hi().success_mh5how$(null==(r=o)||e.isType(r,a)?r:s()):o,n.completion)},di.prototype.enqueueReceiveSelect_0=function(t,e,n){var i=new gi(this,t,e,n),o=this.enqueueReceive_0(i);return o&&t.disposeOnSelect_rvfg84$(i),o},di.prototype.takeFirstReceiveOrPeekClosed=function(){var t=ri.prototype.takeFirstReceiveOrPeekClosed.call(this);return null==t||e.isType(t,Li)||this.onReceiveDequeued(),t},di.prototype.onReceiveEnqueued=function(){},di.prototype.onReceiveDequeued=function(){},di.prototype.removeReceiveOnCancel_0=function(t,e){t.invokeOnCancellation_f05bi3$(new fi(this,e))},fi.prototype.invoke=function(t){this.receive_0.remove()&&this.$outer.onReceiveDequeued()},fi.prototype.toString=function(){return"RemoveReceiveOnCancel["+this.receive_0+"]"},fi.$metadata$={kind:c,simpleName:"RemoveReceiveOnCancel",interfaces:[Ft]},yi.prototype.hasNext=function(t){return this.result!==Jn?this.hasNextResult_0(this.result):(this.result=this.channel.pollInternal(),this.result!==Jn?this.hasNextResult_0(this.result):this.hasNextSuspend_0(t))},yi.prototype.hasNextResult_0=function(t){if(e.isType(t,Li)){if(null!=t.closeCause)throw t.receiveException;return!1}return!0},yi.prototype.hasNextSuspend_0=function(t){return oi((n=this,function(t){for(var i,o,r,c,l=new Ni(n,t);;){if(n.channel.enqueueReceive_0(l))return void n.channel.removeReceiveOnCancel_0(t,l);var p=n.channel.pollInternal();if(n.result=p,e.isType(p,Li)){if(null==p.closeCause)t.resumeWith_tl1gpc$(new y(!1));else{var u=p.receiveException;t.resumeWith_tl1gpc$(new y(D(u)))}return}if(p!==Jn)return c=n.channel.onUndeliveredElement_0,o=null==(i=p)||e.isType(i,a)?i:s(),r=t.context,void t.resume_q1ktlu$(!0,null!=c?nr(c,o,r):null)}return d}))(t);var n},yi.prototype.next=function(){var t,n=this.result;if(e.isType(n,Li))throw n.receiveException;if(n!==Jn)return this.result=Jn,null==(t=n)||e.isType(t,a)?t:s();throw S("'hasNext' should be called prior to 'next' invocation")},yi.$metadata$={kind:c,simpleName:"Itr",interfaces:[Vi]},Ti.prototype.resumeValue_11rb$=function(t){return 1===this.receiveMode?Hi().success_mh5how$(t):t},Ti.prototype.tryResumeReceive_j43gjz$=function(t,e){return null==this.cont.tryResume_i8qury$(this.resumeValue_11rb$(t),null!=e?e.desc:null,this.resumeOnCancellationFun_11rb$(t))?null:(null!=e&&e.finishPrepare(),o)},Ti.prototype.completeResumeReceive_11rb$=function(t){this.cont.completeResume_za3rmp$(o)},Ti.prototype.resumeReceiveClosed_1zqbm$=function(t){if(1===this.receiveMode){var e=this.cont,n=Hi().closed_xo0v4m$(t.closeCause);e.resumeWith_tl1gpc$(new y(n))}else{var i=this.cont,o=t.receiveException;i.resumeWith_tl1gpc$(new y(D(o)))}},Ti.prototype.toString=function(){return"ReceiveElement@"+Wr(this)+"[receiveMode="+this.receiveMode+"]"},Ti.$metadata$={kind:c,simpleName:"ReceiveElement",interfaces:[bi]},$i.prototype.resumeOnCancellationFun_11rb$=function(t){return nr(this.onUndeliveredElement,t,this.cont.context)},$i.$metadata$={kind:c,simpleName:"ReceiveElementWithUndeliveredHandler",interfaces:[Ti]},Ni.prototype.tryResumeReceive_j43gjz$=function(t,e){return null==this.cont.tryResume_i8qury$(!0,null!=e?e.desc:null,this.resumeOnCancellationFun_11rb$(t))?null:(null!=e&&e.finishPrepare(),o)},Ni.prototype.completeResumeReceive_11rb$=function(t){this.iterator.result=t,this.cont.completeResume_za3rmp$(o)},Ni.prototype.resumeReceiveClosed_1zqbm$=function(t){var e=null==t.closeCause?this.cont.tryResume_19pj23$(!1):this.cont.tryResumeWithException_tcv7n7$(t.receiveException);null!=e&&(this.iterator.result=t,this.cont.completeResume_za3rmp$(e))},Ni.prototype.resumeOnCancellationFun_11rb$=function(t){var e;return null!=(e=this.iterator.channel.onUndeliveredElement_0)?nr(e,t,this.cont.context):null},Ni.prototype.toString=function(){return"ReceiveHasNext@"+Wr(this)},Ni.$metadata$={kind:c,simpleName:"ReceiveHasNext",interfaces:[bi]},gi.prototype.tryResumeReceive_j43gjz$=function(t,n){var i;return null==(i=this.select.trySelectOther_uc1cc4$(n))||e.isType(i,rr)?i:s()},gi.prototype.completeResumeReceive_11rb$=function(t){lr(this.block,1===this.receiveMode?Hi().success_mh5how$(t):t,this.select.completion,this.resumeOnCancellationFun_11rb$(t))},gi.prototype.resumeReceiveClosed_1zqbm$=function(t){if(this.select.trySelect())switch(this.receiveMode){case 0:this.select.resumeSelectWithException_tcv7n7$(t.receiveException);break;case 1:lr(this.block,Hi().closed_xo0v4m$(t.closeCause),this.select.completion)}},gi.prototype.dispose=function(){this.remove()&&this.channel.onReceiveDequeued()},gi.prototype.resumeOnCancellationFun_11rb$=function(t){var e;return null!=(e=this.channel.onUndeliveredElement_0)?nr(e,t,this.select.completion.context):null},gi.prototype.toString=function(){return"ReceiveSelect@"+Wr(this)+"["+this.select+",receiveMode="+this.receiveMode+"]"},gi.$metadata$={kind:c,simpleName:"ReceiveSelect",interfaces:[Be,bi]},di.$metadata$={kind:c,simpleName:"AbstractChannel",interfaces:[Ji,ri]},Ri.prototype.undeliveredElement=function(){},Ri.$metadata$={kind:c,simpleName:"Send",interfaces:[ga]},Ci.$metadata$={kind:I,simpleName:"ReceiveOrClosed",interfaces:[]},Object.defineProperty(Si.prototype,"pollResult",{get:function(){return this.pollResult_vo6xxe$_0}}),Si.prototype.tryResumeSend_uc1cc4$=function(t){return null==this.cont.tryResume_19pj23$(d,null!=t?t.desc:null)?null:(null!=t&&t.finishPrepare(),o)},Si.prototype.completeResumeSend=function(){this.cont.completeResume_za3rmp$(o)},Si.prototype.resumeSendClosed_1zqbm$=function(t){var e=this.cont,n=t.sendException;e.resumeWith_tl1gpc$(new y(D(n)))},Si.prototype.toString=function(){return Xr(this)+"@"+Wr(this)+"("+this.pollResult+")"},Si.$metadata$={kind:c,simpleName:"SendElement",interfaces:[Ri]},Ii.prototype.remove=function(){return!!Si.prototype.remove.call(this)&&(this.undeliveredElement(),!0)},Ii.prototype.undeliveredElement=function(){er(this.onUndeliveredElement,this.pollResult,this.cont.context)},Ii.$metadata$={kind:c,simpleName:"SendElementWithUndeliveredHandler",interfaces:[Si]},Object.defineProperty(Li.prototype,"sendException",{configurable:!0,get:function(){var t;return null!=(t=this.closeCause)?t:new ao(Qi)}}),Object.defineProperty(Li.prototype,"receiveException",{configurable:!0,get:function(){var t;return null!=(t=this.closeCause)?t:new so(Qi)}}),Object.defineProperty(Li.prototype,"offerResult",{configurable:!0,get:function(){return this}}),Object.defineProperty(Li.prototype,"pollResult",{configurable:!0,get:function(){return this}}),Li.prototype.tryResumeSend_uc1cc4$=function(t){return null!=t&&t.finishPrepare(),o},Li.prototype.completeResumeSend=function(){},Li.prototype.tryResumeReceive_j43gjz$=function(t,e){return null!=e&&e.finishPrepare(),o},Li.prototype.completeResumeReceive_11rb$=function(t){},Li.prototype.resumeSendClosed_1zqbm$=function(t){},Li.prototype.toString=function(){return"Closed@"+Wr(this)+"["+b(this.closeCause)+"]"},Li.$metadata$={kind:c,simpleName:"Closed",interfaces:[Ci,Ri]},Object.defineProperty(bi.prototype,"offerResult",{configurable:!0,get:function(){return Vn}}),bi.prototype.resumeOnCancellationFun_11rb$=function(t){return null},bi.$metadata$={kind:c,simpleName:"Receive",interfaces:[Ci,ga]},Object.defineProperty(vi.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!1}}),Object.defineProperty(vi.prototype,"isBufferEmpty",{configurable:!0,get:function(){return 0===this.size_0.kotlinx$atomicfu$value}}),Object.defineProperty(vi.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(vi.prototype,"isBufferFull",{configurable:!0,get:function(){return this.size_0.kotlinx$atomicfu$value===this.capacity_0&&this.onBufferOverflow_0===ki()}}),Object.defineProperty(vi.prototype,"isEmpty",{configurable:!0,get:function(){return this.isEmptyImpl_0}}),Object.defineProperty(vi.prototype,"isClosedForReceive",{configurable:!0,get:function(){return e.callGetter(this,di.prototype,"isClosedForReceive")}}),vi.prototype.offerInternal_11rb$=function(t){var n={v:null};t:do{var i,o,r,a=this.size_0.kotlinx$atomicfu$value;if(null!=(i=this.closedForSend_0))return i;if(null!=(o=this.updateBufferSize_0(a)))return o;if(0===a)for(;null!=(r=this.takeFirstReceiveOrPeekClosed());){if(n.v=r,e.isType(n.v,Li))return this.size_0.kotlinx$atomicfu$value=a,H(n.v);if(null!=H(n.v).tryResumeReceive_j43gjz$(t,null)){this.size_0.kotlinx$atomicfu$value=a;break t}}return this.enqueueElement_0(a,t),Vn}while(0);return H(n.v).completeResumeReceive_11rb$(t),H(n.v).offerResult},vi.prototype.offerSelectInternal_ys5ufj$=function(t,n){var i={v:null};t:do{var o,r,a=this.size_0.kotlinx$atomicfu$value;if(null!=(o=this.closedForSend_0))return o;if(null!=(r=this.updateBufferSize_0(a)))return r;if(0===a)e:for(;;){var s=this.describeTryOffer_0(t),c=n.performAtomicTrySelect_6q0pxr$(s);if(null==c){this.size_0.kotlinx$atomicfu$value=a,i.v=s.result;break t}if(c===Kn)break e;if(c!==to){if(c===Wo||e.isType(c,Li))return this.size_0.kotlinx$atomicfu$value=a,c;throw S(("performAtomicTrySelect(describeTryOffer) returned "+b(c)).toString())}}return n.trySelect()?(this.enqueueElement_0(a,t),Vn):(this.size_0.kotlinx$atomicfu$value=a,Wo)}while(0);return H(i.v).completeResumeReceive_11rb$(t),H(i.v).offerResult},vi.prototype.enqueueSend_vs6846$=function(t){return di.prototype.enqueueSend_vs6846$.call(this,t)},vi.prototype.updateBufferSize_0=function(t){var n;if(t=this.buffer_0.length){for(var n=2*this.buffer_0.length|0,i=this.capacity_0,o=st.min(n,i),r=e.newArray(o,null),a=0;a=1))throw V(("Expected positive parallelism level, but got "+t).toString())}function zo(t){this._cur_0=E(new Go(8,t))}function Go(t,e){if(Zo(),this.capacity_0=t,this.singleConsumer_0=e,this.mask_0=this.capacity_0-1|0,this._next_0=E(null),this._state_0=rt(B),this.array_0=yt(this.capacity_0),!(this.mask_0<=1073741823))throw S("Check failed.".toString());if(0!=(this.capacity_0&this.mask_0))throw S("Check failed.".toString())}function jo(t){this.index=t}function Fo(){Qo=this,this.INITIAL_CAPACITY=8,this.CAPACITY_BITS=30,this.MAX_CAPACITY_MASK=1073741823,this.HEAD_SHIFT=0,this.HEAD_MASK=Et,this.TAIL_SHIFT=30,this.TAIL_MASK=_t,this.FROZEN_SHIFT=60,this.FROZEN_MASK=mt,this.CLOSED_SHIFT=61,this.CLOSED_MASK=ft,this.MIN_ADD_SPIN_CAPACITY=1024,this.REMOVE_FROZEN=new rr("REMOVE_FROZEN"),this.ADD_SUCCESS=0,this.ADD_FROZEN=1,this.ADD_CLOSED=2}Ji.$metadata$={kind:I,simpleName:"Channel",interfaces:[zi,wi]},ao.$metadata$={kind:c,simpleName:"ClosedSendChannelException",interfaces:[Y]},so.$metadata$={kind:c,simpleName:"ClosedReceiveChannelException",interfaces:[ct]},R("kotlinx-coroutines-core.kotlinx.coroutines.channels.consumeEach_fsi0yh$",C((function(){var n=e.kotlin.Unit,i=Error,o=t.kotlinx.coroutines.channels.cancelConsumed_v57n85$;return function(t,r,a){var s=null;try{var c;for(c=t.iterator();e.suspendCall(c.hasNext(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());)r(c.next())}catch(t){throw e.isType(t,i)?(s=t,t):t}finally{o(t,s)}return n}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.channels.consumeEach_ur1qrk$",C((function(){var t=e.kotlin.Unit;return function(n,i,o){var r=n.openSubscription();try{var a;for(a=r.iterator();e.suspendCall(a.hasNext(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());)i(a.next())}finally{r.cancel_x5z25k$()}return t}}))),Object.defineProperty(po.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!1}}),Object.defineProperty(po.prototype,"isBufferEmpty",{configurable:!0,get:function(){return this.value_0===Hn}}),Object.defineProperty(po.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(po.prototype,"isBufferFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(po.prototype,"isEmpty",{configurable:!0,get:function(){return this.isEmptyImpl_0}}),po.prototype.offerInternal_11rb$=function(t){var n={v:null};t:do{var i,o,r;if(null!=(i=this.closedForSend_0))return i;if(this.value_0===Hn)for(;null!=(o=this.takeFirstReceiveOrPeekClosed());){if(n.v=o,e.isType(n.v,Li))return H(n.v);if(null!=H(n.v).tryResumeReceive_j43gjz$(t,null))break t}if(null!=(r=this.updateValueLocked_0(t)))throw r;return Vn}while(0);return H(n.v).completeResumeReceive_11rb$(t),H(n.v).offerResult},po.prototype.offerSelectInternal_ys5ufj$=function(t,n){var i={v:null};t:do{var o,r;if(null!=(o=this.closedForSend_0))return o;if(this.value_0===Hn)e:for(;;){var a=this.describeTryOffer_0(t),s=n.performAtomicTrySelect_6q0pxr$(a);if(null==s){i.v=a.result;break t}if(s===Kn)break e;if(s!==to){if(s===Wo||e.isType(s,Li))return s;throw S(("performAtomicTrySelect(describeTryOffer) returned "+b(s)).toString())}}if(!n.trySelect())return Wo;if(null!=(r=this.updateValueLocked_0(t)))throw r;return Vn}while(0);return H(i.v).completeResumeReceive_11rb$(t),H(i.v).offerResult},po.prototype.pollInternal=function(){var t,e={v:null};return this.value_0===Hn?null!=(t=this.closedForSend_0)?t:Jn:(e.v=this.value_0,this.value_0=Hn,e.v)},po.prototype.pollSelectInternal_y5yyj0$=function(t){var e,n={v:null};return this.value_0===Hn?null!=(e=this.closedForSend_0)?e:Jn:t.trySelect()?(n.v=this.value_0,this.value_0=Hn,n.v):Wo},po.prototype.onCancelIdempotent_6taknv$=function(t){var e,n={v:null};if(n.v=this.updateValueLocked_0(Hn),di.prototype.onCancelIdempotent_6taknv$.call(this,t),null!=(e=n.v))throw e},po.prototype.updateValueLocked_0=function(t){var n,i,o,r,c=this.value_0;c===Hn?r=null:(o=this.onUndeliveredElement_0,i=null==(n=c)||e.isType(n,a)?n:s(),r=null!=o?tr(o,i):null);var l=r;return this.value_0=t,l},po.prototype.enqueueReceiveInternal_i292ax$=function(t){return di.prototype.enqueueReceiveInternal_i292ax$.call(this,t)},Object.defineProperty(po.prototype,"bufferDebugString",{configurable:!0,get:function(){return"(value="+b(this.value_0)+")"}}),po.$metadata$={kind:c,simpleName:"ConflatedChannel",interfaces:[di]},Object.defineProperty(uo.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(uo.prototype,"isBufferEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(uo.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(uo.prototype,"isBufferFull",{configurable:!0,get:function(){return!1}}),uo.prototype.offerInternal_11rb$=function(t){for(;;){var n=di.prototype.offerInternal_11rb$.call(this,t);if(n===Vn)return Vn;if(n!==Kn){if(e.isType(n,Li))return n;throw S(("Invalid offerInternal result "+n.toString()).toString())}var i=this.sendBuffered_0(t);if(null==i)return Vn;if(e.isType(i,Li))return i}},uo.prototype.offerSelectInternal_ys5ufj$=function(t,n){for(var i;;){var o=this.hasReceiveOrClosed_0?di.prototype.offerSelectInternal_ys5ufj$.call(this,t,n):null!=(i=n.performAtomicTrySelect_6q0pxr$(this.describeSendBuffered_0(t)))?i:Vn;if(o===Wo)return Wo;if(o===Vn)return Vn;if(o!==Kn&&o!==to){if(e.isType(o,Li))return o;throw S(("Invalid result "+o.toString()).toString())}}},uo.prototype.onCancelIdempotentList_kji3ae$=function(t,n){var i,o,r,c,l={v:null};if(null!=(o=t.holder_0))if(e.isType(o,Z))for(var p=e.isType(c=t.holder_0,Z)?c:s(),u=p.size-1|0;u>=0;u--){var d,h,E,_,m=p.get_za3lpa$(u);e.isType(m,ui)?(_=this.onUndeliveredElement_0,h=null==(d=m.element)||e.isType(d,a)?d:s(),E=l.v,l.v=null!=_?tr(_,h,E):null):m.resumeSendClosed_1zqbm$(n)}else{var f,y,T,$,N=null==(r=t.holder_0)||e.isType(r,a)?r:s();e.isType(N,ui)?($=this.onUndeliveredElement_0,y=null==(f=N.element)||e.isType(f,a)?f:s(),T=l.v,l.v=null!=$?tr($,y,T):null):N.resumeSendClosed_1zqbm$(n)}if(null!=(i=l.v))throw i},uo.$metadata$={kind:c,simpleName:"LinkedListChannel",interfaces:[di]},Object.defineProperty(Eo.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(Eo.prototype,"isBufferEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(Eo.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!0}}),Object.defineProperty(Eo.prototype,"isBufferFull",{configurable:!0,get:function(){return!0}}),Eo.$metadata$={kind:c,simpleName:"RendezvousChannel",interfaces:[di]},_o.$metadata$={kind:I,simpleName:"Flow",interfaces:[]},mo.prototype.emit_11rb$=function(t,e){return this.function$(t,e)},mo.$metadata$={kind:I,simpleName:"FlowCollector",interfaces:[]},R("kotlinx-coroutines-core.kotlinx.coroutines.flow.collectWhile_rysrwq$",C((function(){var n=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,i=e.kotlin.coroutines.CoroutineImpl,o=t.kotlinx.coroutines.flow.internal.AbortFlowException,r=e.Kind.CLASS,a=t.kotlinx.coroutines.flow.FlowCollector,s=t.kotlinx.coroutines.flow.internal.checkOwnership_ygf9h9$;function c(t){this.closure$predicate=t}function l(t,e,n){i.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$value=e}return l.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[i]},l.prototype=Object.create(i.prototype),l.prototype.constructor=l,l.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.closure$predicate(this.local$value,this),this.result_0===n)return n;continue;case 1:throw this.exception_0;case 2:if(!this.result_0)throw new o(this.$this);return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},c.prototype.emit_11rb$=function(t,e,n){var i=new l(this,t,e);return n?i:i.doResume(null)},c.$metadata$={kind:r,interfaces:[a]},function(t,n,i){var r=new c(n);try{e.suspendCall(t.collect_42ocv1$(r,e.coroutineReceiver()))}catch(t){if(!e.isType(t,o))throw t;s(t,r)}}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.flow.toList_qzmi91$",C((function(){var n=t.kotlinx.coroutines.flow.Flow,i=e.throwCCE,o=t.kotlinx.coroutines.flow.toList_7a0s5y$;return function(t,r){var a;return e.suspendCall(o(e.isType(a=t,n)?a:i(),void 0,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.flow.toSet_qzmi91$",C((function(){var n=t.kotlinx.coroutines.flow.Flow,i=e.throwCCE,o=t.kotlinx.coroutines.flow.toSet_a3q90u$;return function(t,r){var a;return e.suspendCall(o(e.isType(a=t,n)?a:i(),void 0,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.flow.count_qzmi91$",C((function(){var n=t.kotlinx.coroutines.flow.Flow,i=e.throwCCE,o=t.kotlinx.coroutines.flow.count_x2ftfk$;return function(t,r){var a;return e.suspendCall(o(e.isType(a=t,n)?a:i(),e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.flow.collectIndexed_57beod$",C((function(){var n=e.Kind.CLASS,i=t.kotlinx.coroutines.flow.FlowCollector,o=e.kotlin.ArithmeticException;function r(t){this.closure$action=t,this.index_0=0}return r.prototype.emit_11rb$=function(t,e){var n,i;i=this.closure$action;var r=(n=this.index_0,this.index_0=n+1|0,n);if(r<0)throw new o("Index overflow has happened");return i(r,t,e)},r.$metadata$={kind:n,interfaces:[i]},function(t,n,i){return e.suspendCall(t.collect_42ocv1$(new r(n),e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.flow.collect_706ovd$",C((function(){var n=e.Kind.CLASS,i=t.kotlinx.coroutines.flow.FlowCollector;function o(t){this.closure$action=t}return o.prototype.emit_11rb$=function(t,e){return this.closure$action(t,e)},o.$metadata$={kind:n,interfaces:[i]},function(t,n,i){return e.suspendCall(t.collect_42ocv1$(new o(n),e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),fo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[u]},fo.prototype=Object.create(u.prototype),fo.prototype.constructor=fo,fo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:return this.local$closure$destination.add_11rb$(this.local$value);case 1:throw this.exception_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},To.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[u]},To.prototype=Object.create(u.prototype),To.prototype.constructor=To,To.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.collect_42ocv1$(new mo(yo(this.local$destination)),this),this.result_0===p)return p;continue;case 1:throw this.exception_0;case 2:return this.local$destination;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},No.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[u]},No.prototype=Object.create(u.prototype),No.prototype.constructor=No,No.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:return this.local$closure$i.v=this.local$closure$i.v+1|0,this.local$closure$i.v;case 1:throw this.exception_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ro.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[u]},Ro.prototype=Object.create(u.prototype),Ro.prototype.constructor=Ro,Ro.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$i={v:0},this.state_0=2,this.result_0=this.local$$receiver.collect_42ocv1$(new mo(go(this.local$i)),this),this.result_0===p)return p;continue;case 1:throw this.exception_0;case 2:return this.local$i.v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},R("kotlinx-coroutines-core.kotlinx.coroutines.flow.fold_usjyvu$",C((function(){var n=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,i=e.kotlin.coroutines.CoroutineImpl,o=e.kotlin.Unit,r=t.kotlinx.coroutines.flow.FlowCollector;function a(t,e,n,o){i.call(this,o),this.exceptionState_0=1,this.local$closure$operation=t,this.local$closure$accumulator=e,this.local$value=n}return a.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[i]},a.prototype=Object.create(i.prototype),a.prototype.constructor=a,a.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$closure$operation(this.local$closure$accumulator.v,this.local$value,this),this.result_0===n)return n;continue;case 1:throw this.exception_0;case 2:return this.local$closure$accumulator.v=this.result_0,o;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},function(t,n,i,o){var s,c,l={v:n};return e.suspendCall(t.collect_42ocv1$(new r((s=i,c=l,function(t,e,n){var i=new a(s,c,t,e);return n?i:i.doResume(null)})),e.coroutineReceiver())),l.v}}))),Object.defineProperty(Co.prototype,"isEmpty",{configurable:!0,get:function(){return this.head_0===this.tail_0}}),Co.prototype.addLast_trkh7z$=function(t){this.elements_0[this.tail_0]=t,this.tail_0=this.tail_0+1&this.elements_0.length-1,this.tail_0===this.head_0&&this.ensureCapacity_0()},Co.prototype.removeFirstOrNull=function(){var t;if(this.head_0===this.tail_0)return null;var n=this.elements_0[this.head_0];return this.elements_0[this.head_0]=null,this.head_0=this.head_0+1&this.elements_0.length-1,e.isType(t=n,a)?t:s()},Co.prototype.clear=function(){this.head_0=0,this.tail_0=0,this.elements_0=e.newArray(this.elements_0.length,null)},Co.prototype.ensureCapacity_0=function(){var t=this.elements_0.length,n=t<<1,i=e.newArray(n,null),o=this.elements_0;ut(o,i,0,this.head_0,o.length),ut(this.elements_0,i,this.elements_0.length-this.head_0|0,0,this.head_0),this.elements_0=i,this.head_0=0,this.tail_0=t},Co.$metadata$={kind:c,simpleName:"ArrayQueue",interfaces:[]},So.prototype.toString=function(){return Xr(this)+"@"+Wr(this)},So.prototype.isEarlierThan_bfmzsr$=function(t){var e,n;if(null==(e=this.atomicOp))return!1;var i=e;if(null==(n=t.atomicOp))return!1;var o=n;return i.opSequence.compareTo_11rb$(o.opSequence)<0},So.$metadata$={kind:c,simpleName:"OpDescriptor",interfaces:[]},Object.defineProperty(Io.prototype,"consensus",{configurable:!0,get:function(){return this._consensus_c6dvpx$_0.kotlinx$atomicfu$value}}),Object.defineProperty(Io.prototype,"isDecided",{configurable:!0,get:function(){return this._consensus_c6dvpx$_0.kotlinx$atomicfu$value!==Zi}}),Object.defineProperty(Io.prototype,"opSequence",{configurable:!0,get:function(){return B}}),Object.defineProperty(Io.prototype,"atomicOp",{configurable:!0,get:function(){return this}}),Io.prototype.decide_s8jyv4$=function(t){var e=this._consensus_c6dvpx$_0.kotlinx$atomicfu$value;return e!==Zi?e:this._consensus_c6dvpx$_0.atomicfu$compareAndSet(Zi,t)?t:this._consensus_c6dvpx$_0.kotlinx$atomicfu$value},Io.prototype.perform_s8jyv4$=function(t){var n,i,o=this._consensus_c6dvpx$_0.kotlinx$atomicfu$value;return o===Zi&&(o=this.decide_s8jyv4$(this.prepare_11rb$(null==(n=t)||e.isType(n,a)?n:s()))),this.complete_19pj23$(null==(i=t)||e.isType(i,a)?i:s(),o),o},Io.$metadata$={kind:c,simpleName:"AtomicOp",interfaces:[So]},Object.defineProperty(Lo.prototype,"atomicOp",{configurable:!0,get:function(){return null==this.atomicOp_ss7ttb$_0?h("atomicOp"):this.atomicOp_ss7ttb$_0},set:function(t){this.atomicOp_ss7ttb$_0=t}}),Lo.$metadata$={kind:c,simpleName:"AtomicDesc",interfaces:[]},Object.defineProperty(bo.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.continuation,Ua)?t:null}}),bo.prototype.getStackTraceElement=function(){return null},Object.defineProperty(bo.prototype,"reusableCancellableContinuation_0",{configurable:!0,get:function(){var t;return e.isType(t=this._reusableCancellableContinuation_0.kotlinx$atomicfu$value,Pt)?t:null}}),bo.prototype.isReusable=function(){return null!=this._reusableCancellableContinuation_0.kotlinx$atomicfu$value},bo.prototype.awaitReusability=function(){for(var t=this._reusableCancellableContinuation_0;;)if(t.kotlinx$atomicfu$value!==no)return},bo.prototype.release=function(){var t;this.awaitReusability(),null!=(t=this.reusableCancellableContinuation_0)&&t.detachChild_8be2vx$()},bo.prototype.claimReusableCancellableContinuation=function(){for(var t=this._reusableCancellableContinuation_0;;){var n,i=t.kotlinx$atomicfu$value;if(null===i)return this._reusableCancellableContinuation_0.kotlinx$atomicfu$value=no,null;if(e.isType(i,Pt)){if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(i,no))return e.isType(n=i,Pt)?n:s()}else if(i!==no&&!e.isType(i,L))throw S(("Inconsistent state "+b(i)).toString())}},bo.prototype.tryReleaseClaimedContinuation_jp3215$=function(t){for(var n=this._reusableCancellableContinuation_0;;){var i=n.kotlinx$atomicfu$value;if(i!==no){if(e.isType(i,L)){if(!this._reusableCancellableContinuation_0.atomicfu$compareAndSet(i,null))throw V("Failed requirement.".toString());return i}throw S(("Inconsistent state "+b(i)).toString())}if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(no,t))return null}},bo.prototype.postponeCancellation_tcv7n7$=function(t){for(var n=this._reusableCancellableContinuation_0;;){var i=n.kotlinx$atomicfu$value;if(g(i,no)){if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(no,t))return!0}else{if(e.isType(i,L))return!0;if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(i,null))return!1}}},bo.prototype.takeState=function(){var t=this._state_8be2vx$;return this._state_8be2vx$=eo,t},Object.defineProperty(bo.prototype,"delegate",{configurable:!0,get:function(){return this}}),bo.prototype.resumeWith_tl1gpc$=function(t){var n=this.continuation.context,i=Vt(t);if(this.dispatcher.isDispatchNeeded_1fupul$(n))this._state_8be2vx$=i,this.resumeMode=0,this.dispatcher.dispatch_5bn72i$(n,this);else{var o=we().eventLoop_8be2vx$;if(o.isUnconfinedLoopActive)this._state_8be2vx$=i,this.resumeMode=0,o.dispatchUnconfined_4avnfa$(this);else{o.incrementUseCount_6taknv$(!0);try{for(this.context,this.continuation.resumeWith_tl1gpc$(t);o.processUnconfinedEvent(););}catch(t){if(!e.isType(t,L))throw t;this.handleFatalException_pr7uss$(t,null)}finally{o.decrementUseCount_6taknv$(!0)}}}},bo.prototype.resumeCancellableWith_rdpv6h$=R("kotlinx-coroutines-core.kotlinx.coroutines.internal.DispatchedContinuation.resumeCancellableWith_rdpv6h$",C((function(){var n=t.kotlinx.coroutines.toState_fbj1ua$,i=e.kotlin.Unit,o=e.wrapFunction,r=Error,a=t.kotlinx.coroutines.Job,s=e.kotlin.Result,c=e.kotlin.createFailure_tcv7n7$;return o((function(){var n=t.kotlinx.coroutines.Job,o=e.kotlin.Result,r=e.kotlin.createFailure_tcv7n7$;return function(t,e,a){return function(){var s,c=e,l=t;t:do{var p=c.context.get_j3r2sn$(n.Key);if(null!=p&&!p.isActive){var u=p.getCancellationException();c.cancelCompletedResult_83a7kv$(l,u),c.resumeWith_tl1gpc$(new o(r(u))),s=!0;break t}s=!1}while(0);return s||e.continuation.resumeWith_tl1gpc$(a),i}}})),function(t,i){var o=n(t,i);if(this.dispatcher.isDispatchNeeded_1fupul$(this.context))this._state_8be2vx$=o,this.resumeMode=1,this.dispatcher.dispatch_5bn72i$(this.context,this);else{var l=we().eventLoop_8be2vx$;if(l.isUnconfinedLoopActive)this._state_8be2vx$=o,this.resumeMode=1,l.dispatchUnconfined_4avnfa$(this);else{l.incrementUseCount_6taknv$(!0);try{var p;t:do{var u=this.context.get_j3r2sn$(a.Key);if(null!=u&&!u.isActive){var d=u.getCancellationException();this.cancelCompletedResult_83a7kv$(o,d),this.resumeWith_tl1gpc$(new s(c(d))),p=!0;break t}p=!1}while(0);for(p||this.continuation.resumeWith_tl1gpc$(t);l.processUnconfinedEvent(););}catch(t){if(!e.isType(t,r))throw t;this.handleFatalException_pr7uss$(t,null)}finally{l.decrementUseCount_6taknv$(!0)}}}}}))),bo.prototype.cancelCompletedResult_83a7kv$=function(t,n){e.isType(t,Yt)&&t.onCancellation(n)},bo.prototype.resumeCancelled_s8jyv4$=R("kotlinx-coroutines-core.kotlinx.coroutines.internal.DispatchedContinuation.resumeCancelled_s8jyv4$",C((function(){var n=t.kotlinx.coroutines.Job,i=e.kotlin.Result,o=e.kotlin.createFailure_tcv7n7$;return function(t){var e=this.context.get_j3r2sn$(n.Key);if(null!=e&&!e.isActive){var r=e.getCancellationException();return this.cancelCompletedResult_83a7kv$(t,r),this.resumeWith_tl1gpc$(new i(o(r))),!0}return!1}}))),bo.prototype.resumeUndispatchedWith_tl1gpc$=R("kotlinx-coroutines-core.kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith_tl1gpc$",(function(t){this.continuation.resumeWith_tl1gpc$(t)})),bo.prototype.dispatchYield_6v298r$=function(t,e){this._state_8be2vx$=e,this.resumeMode=1,this.dispatcher.dispatchYield_5bn72i$(t,this)},bo.prototype.toString=function(){return"DispatchedContinuation["+this.dispatcher+", "+Gr(this.continuation)+"]"},Object.defineProperty(bo.prototype,"context",{configurable:!0,get:function(){return this.continuation.context}}),bo.$metadata$={kind:c,simpleName:"DispatchedContinuation",interfaces:[l,Ua,Do]},Do.prototype.cancelCompletedResult_83a7kv$=function(t,e){},Do.prototype.getSuccessfulResult_tpy1pm$=function(t){var n;return null==(n=t)||e.isType(n,a)?n:s()},Do.prototype.getExceptionalResult_s8jyv4$=function(t){var n,i;return null!=(i=e.isType(n=t,Qt)?n:null)?i.cause:null},Do.prototype.run=function(){var t,n=null;try{var i=(e.isType(t=this.delegate,bo)?t:s()).continuation,o=i.context,r=this.takeState(),a=this.getExceptionalResult_s8jyv4$(r),c=null==a&&Oo(this.resumeMode)?o.get_j3r2sn$(Xe()):null;if(null==c||c.isActive)if(null!=a)i.resumeWith_tl1gpc$(new y(D(a)));else{var l=this.getSuccessfulResult_tpy1pm$(r);i.resumeWith_tl1gpc$(new y(l))}else{var p=c.getCancellationException();this.cancelCompletedResult_83a7kv$(r,p),i.resumeWith_tl1gpc$(new y(D(ba(p))))}}catch(t){if(!e.isType(t,L))throw t;n=t}finally{var u;try{u=new y(d)}catch(t){if(!e.isType(t,L))throw t;u=new y(D(t))}var h=u;this.handleFatalException_pr7uss$(n,h.exceptionOrNull())}},Do.prototype.handleFatalException_pr7uss$=function(t,e){if(null!==t||null!==e){var n=new je("Fatal exception in coroutines machinery for "+this+". Please read KDoc to 'handleFatalException' method and report this incident to maintainers",H(null!=t?t:e));re(this.delegate.context,n)}},Do.$metadata$={kind:c,simpleName:"DispatchedTask",interfaces:[ma]},Po.prototype.plus_11rb$=function(t){var n,i,o,r;if(null==(n=this.holder_0))r=new Po(t);else if(e.isType(n,Z))(e.isType(i=this.holder_0,Z)?i:s()).add_11rb$(t),r=new Po(this.holder_0);else{var c=f(4);c.add_11rb$(null==(o=this.holder_0)||e.isType(o,a)?o:s()),c.add_11rb$(t),r=new Po(c)}return r},Po.prototype.forEachReversed_qlkmfe$=R("kotlinx-coroutines-core.kotlinx.coroutines.internal.InlineList.forEachReversed_qlkmfe$",C((function(){var t=Object,n=e.throwCCE,i=e.kotlin.collections.ArrayList;return function(o){var r,a,s;if(null!=(r=this.holder_0))if(e.isType(r,i))for(var c=e.isType(s=this.holder_0,i)?s:n(),l=c.size-1|0;l>=0;l--)o(c.get_za3lpa$(l));else o(null==(a=this.holder_0)||e.isType(a,t)?a:n())}}))),Po.$metadata$={kind:c,simpleName:"InlineList",interfaces:[]},Po.prototype.unbox=function(){return this.holder_0},Po.prototype.toString=function(){return"InlineList(holder="+e.toString(this.holder_0)+")"},Po.prototype.hashCode=function(){var t=0;return t=31*t+e.hashCode(this.holder_0)|0},Po.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.holder_0,t.holder_0)},xo.prototype.limitedParallelism_za3lpa$=function(t){return wo(t),t>=this.parallelism_0?this:te.prototype.limitedParallelism_za3lpa$.call(this,t)},xo.prototype.run=function(){for(var t={v:0};;){var n=this.queue_0.removeFirstOrNull();if(null==n){if(this.runningWorkers_0=this.runningWorkers_0-1|0,0===this.queue_0.size)return;this.runningWorkers_0=this.runningWorkers_0+1|0,t.v=0}else{try{n.run()}catch(t){if(!e.isType(t,L))throw t;re(T.EmptyCoroutineContext,t)}if(t.v=t.v+1|0,t.v>=16&&this.dispatcher_0.isDispatchNeeded_1fupul$(this))return void this.dispatcher_0.dispatch_5bn72i$(this,this)}}},xo.prototype.dispatch_5bn72i$=function(t,e){t:do{if(this.addAndTryDispatching_0(e))break t;if(!this.tryAllocateWorker_0())break t;this.dispatcher_0.dispatch_5bn72i$(this,this)}while(0)},xo.prototype.dispatchYield_5bn72i$=function(t,e){t:do{if(this.addAndTryDispatching_0(e))break t;if(!this.tryAllocateWorker_0())break t;this.dispatcher_0.dispatchYield_5bn72i$(this,this)}while(0)},xo.prototype.dispatchInternal_0=function(t,e){this.addAndTryDispatching_0(t)||this.tryAllocateWorker_0()&&e()},xo.prototype.tryAllocateWorker_0=function(){return!(this.runningWorkers_0>=this.parallelism_0||(this.runningWorkers_0=this.runningWorkers_0+1|0,0))},xo.prototype.addAndTryDispatching_0=function(t){return this.queue_0.addLast_trkh7z$(t),this.runningWorkers_0>=this.parallelism_0},xo.prototype.delay_s8cxhz$=function(t,e){return this.$delegate_ay9hik$_0.delay_s8cxhz$(t,e)},xo.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){return this.$delegate_ay9hik$_0.invokeOnTimeout_oczv3n$(t,e,n)},xo.prototype.scheduleResumeAfterDelay_egqmvs$=function(t,e){return this.$delegate_ay9hik$_0.scheduleResumeAfterDelay_egqmvs$(t,e)},xo.$metadata$={kind:c,simpleName:"LimitedDispatcher",interfaces:[De,_a,te]},Object.defineProperty(zo.prototype,"isEmpty",{configurable:!0,get:function(){return this._cur_0.kotlinx$atomicfu$value.isEmpty}}),Object.defineProperty(zo.prototype,"size",{configurable:!0,get:function(){return this._cur_0.kotlinx$atomicfu$value.size}}),zo.prototype.close=function(){for(var t=this._cur_0;;){var e=t.kotlinx$atomicfu$value;if(e.close())return;this._cur_0.atomicfu$compareAndSet(e,e.next())}},zo.prototype.addLast_trkh7z$=function(t){for(var e=this._cur_0;;){var n=e.kotlinx$atomicfu$value;switch(n.addLast_trkh7z$(t)){case 0:return!0;case 2:return!1;case 1:this._cur_0.atomicfu$compareAndSet(n,n.next())}}},zo.prototype.removeFirstOrNull=function(){for(var t=this._cur_0;;){var n,i=t.kotlinx$atomicfu$value,o=i.removeFirstOrNull();if(o!==Zo().REMOVE_FROZEN)return null==(n=o)||e.isType(n,a)?n:s();this._cur_0.atomicfu$compareAndSet(i,i.next())}},zo.prototype.map_m8mn37$=function(t){return this._cur_0.kotlinx$atomicfu$value.map_m8mn37$(t)},zo.prototype.isClosed=function(){return this._cur_0.kotlinx$atomicfu$value.isClosed()},zo.$metadata$={kind:c,simpleName:"LockFreeTaskQueue",interfaces:[]},Object.defineProperty(Go.prototype,"isEmpty",{configurable:!0,get:function(){var t=this._state_0.kotlinx$atomicfu$value;return t.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt()===t.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt()}}),Object.defineProperty(Go.prototype,"size",{configurable:!0,get:function(){var t=this._state_0.kotlinx$atomicfu$value,e=t.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt();return t.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt()-e&1073741823}}),Go.prototype.close=function(){var t=this._state_0;t:do{for(;;){var e=t.kotlinx$atomicfu$value;if(!g(e.and(Zo().CLOSED_MASK),B))return!0;if(!g(e.and(Zo().FROZEN_MASK),B))return!1;var n=e.or(Zo().CLOSED_MASK);if(t.atomicfu$compareAndSet(e,n))break t}}while(0);return!0},Go.prototype.addLast_trkh7z$=function(t){for(var e=this._state_0;;){var n=e.kotlinx$atomicfu$value;t:do{if(!g(n.and(ht),B))return Zo().addFailReason_mts6qi$(n);var i,o=n.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt(),r=n.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),a=this.mask_0;if((r+2&a)==(o&a))return 1;if(!this.singleConsumer_0&&null!=this.array_0.atomicfu$get(r&a).kotlinx$atomicfu$value){if(this.capacity_0<1024||(r-o&1073741823)>this.capacity_0>>1)return 1;break t}var s=r+1&1073741823;if(this._state_0.atomicfu$compareAndSet(n,Zo().updateTail_if0zpk$(n,s))){this.array_0.atomicfu$get(r&a).kotlinx$atomicfu$value=t;for(var c=this;!g(c._state_0.kotlinx$atomicfu$value.and(Zo().FROZEN_MASK),B)&&null!=(i=c.next().fillPlaceholder_0(r,t));)c=i;return 0}}while(0)}},Go.prototype.fillPlaceholder_0=function(t,n){var i=this.array_0.atomicfu$get(t&this.mask_0).kotlinx$atomicfu$value;return e.isType(i,jo)&&i.index===t?(this.array_0.atomicfu$get(t&this.mask_0).kotlinx$atomicfu$value=n,this):null},Go.prototype.removeFirstOrNull=function(){for(var t=this._state_0;;){var n=t.kotlinx$atomicfu$value;t:do{if(!g(n.and(Zo().FROZEN_MASK),B))return Zo().REMOVE_FROZEN;var i,o=n.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt();if((n.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt()&this.mask_0)==(o&this.mask_0))return null;var r=this.array_0.atomicfu$get(o&this.mask_0).kotlinx$atomicfu$value;if(null==r){if(this.singleConsumer_0)return null;break t}if(e.isType(r,jo))return null;var a=o+1&1073741823;if(this._state_0.atomicfu$compareAndSet(n,Zo().updateHead_if0zpk$(n,a)))return this.array_0.atomicfu$get(o&this.mask_0).kotlinx$atomicfu$value=null,r;if(!this.singleConsumer_0)break t;for(var s=this;;){if(null==(i=s.removeSlowPath_0(o,a)))return r;s=i}}while(0)}},Go.prototype.removeSlowPath_0=function(t,e){for(var n=this._state_0;;){var i=n.kotlinx$atomicfu$value,o=i.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt();if(i.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),!g(i.and(Zo().FROZEN_MASK),B))return this.next();if(this._state_0.atomicfu$compareAndSet(i,Zo().updateHead_if0zpk$(i,e)))return this.array_0.atomicfu$get(o&this.mask_0).kotlinx$atomicfu$value=null,null}},Go.prototype.next=function(){return this.allocateOrGetNextCopy_0(this.markFrozen_0())},Go.prototype.markFrozen_0=function(){var t,e=this._state_0;t:do{for(;;){var n=e.kotlinx$atomicfu$value;if(!g(n.and(Zo().FROZEN_MASK),B))return n;var i=n.or(Zo().FROZEN_MASK);if(e.atomicfu$compareAndSet(n,i)){t=i;break t}}}while(0);return t},Go.prototype.allocateOrGetNextCopy_0=function(t){for(var e=this._next_0;;){var n=e.kotlinx$atomicfu$value;if(null!=n)return n;this._next_0.atomicfu$compareAndSet(null,this.allocateNextCopy_0(t))}},Go.prototype.allocateNextCopy_0=function(t){for(var e,n=new Go(2*this.capacity_0|0,this.singleConsumer_0),i=t.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt(),o=t.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),r=i;(r&this.mask_0)!=(o&this.mask_0);){var a=null!=(e=this.array_0.atomicfu$get(r&this.mask_0).kotlinx$atomicfu$value)?e:new jo(r);n.array_0.atomicfu$get(r&n.mask_0).kotlinx$atomicfu$value=a,r=r+1|0}return n._state_0.kotlinx$atomicfu$value=Zo().wo_2p08ub$(t,Zo().FROZEN_MASK),n},Go.prototype.map_m8mn37$=function(t){for(var n,i=f(this.capacity_0),o=this._state_0.kotlinx$atomicfu$value,r=o.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt(),c=o.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),l=r;(l&this.mask_0)!=(c&this.mask_0);){var p=this.array_0.atomicfu$get(l&this.mask_0).kotlinx$atomicfu$value;null==p||e.isType(p,jo)||i.add_11rb$(t(e.isType(n=p,a)?n:s())),l=l+1|0}return i},Go.prototype.isClosed=function(){return!g(this._state_0.kotlinx$atomicfu$value.and(Zo().CLOSED_MASK),B)},jo.$metadata$={kind:c,simpleName:"Placeholder",interfaces:[]},Fo.prototype.wo_2p08ub$=function(t,e){return t.and(e.inv())},Fo.prototype.updateHead_if0zpk$=function(t,n){return this.wo_2p08ub$(t,this.HEAD_MASK).or(e.Long.fromInt(n).shiftLeft(0))},Fo.prototype.updateTail_if0zpk$=function(t,n){return this.wo_2p08ub$(t,this.TAIL_MASK).or(e.Long.fromInt(n).shiftLeft(30))},Fo.prototype.withState_d0ock6$=R("kotlinx-coroutines-core.kotlinx.coroutines.internal.LockFreeTaskQueueCore.Companion.withState_d0ock6$",C((function(){var t=e.Long.fromInt(1073741823),n=new e.Long(-1073741824,268435455);return function(e,i){return i(e.and(t).shiftRight(0).toInt(),e.and(n).shiftRight(30).toInt())}}))),Fo.prototype.addFailReason_mts6qi$=function(t){return g(t.and(this.CLOSED_MASK),B)?1:2},Fo.$metadata$={kind:v,simpleName:"Companion",interfaces:[]};var Mo,Wo,Xo,Bo,qo,Ho,Vo,Ko,Jo,Yo,Qo=null;function Zo(){return null===Qo&&new Fo,Qo}function tr(t,n,i){void 0===i&&(i=null);try{t(n)}catch(t){if(!e.isType(t,L))throw t;if(null==i||i.cause===t)return new ir("Exception in undelivered element handler for "+n,t)}return i}function er(t,e,n){var i;null!=(i=tr(t,e,null))&&re(n,i)}function nr(t,e,n){return i=e,o=n,r=t,function(t){return er(r,i,o),d};var i,o,r}function ir(t,e){P.call(this,t,e),this.name="UndeliveredElementException"}function or(t,e){St.call(this,t,!0,!0),this.uCont=e}function rr(t){this.symbol=t}function ar(t,n,i,o){return void 0===i&&(i=1),void 0===o&&(o=2147483647),sr(0,e.Long.fromInt(n),e.Long.fromInt(i),e.Long.fromInt(o)).toInt()}function sr(t,e,n,i){return void 0===n&&(n=X),void 0===i&&(i=W),e}function cr(t,n){try{vo(m(Tt(t,n)),new y(d))}catch(t){if(!e.isType(t,L))throw t;ur(n,t)}}function lr(t,n,i,o){void 0===o&&(o=null);try{vo(m($(t,n,i)),new y(d),o)}catch(t){if(!e.isType(t,L))throw t;ur(i,t)}}function pr(t,n){try{vo(m(t),new y(d))}catch(t){if(!e.isType(t,L))throw t;ur(n,t)}}function ur(t,e){throw t.resumeWith_tl1gpc$(new y(D(e))),e}function dr(t,n){t:do{var i,o,r=n;try{i=t(r,!1)}catch(t){if(e.isType(t,L)){var c=t;r.resumeWith_tl1gpc$(new y(D(c)));break t}throw t}if(i!==p){var l=null==(o=i)||e.isType(o,a)?o:s();r.resumeWith_tl1gpc$(new y(l))}}while(0)}function hr(t,n,i){t:do{var o,r,c=i;try{o=t(n,c,!1)}catch(t){if(e.isType(t,L)){var l=t;c.resumeWith_tl1gpc$(new y(D(l)));break t}throw t}if(o!==p){var u=null==(r=o)||e.isType(r,a)?r:s();c.resumeWith_tl1gpc$(new y(u))}}while(0)}function Er(t,n){t:do{var i,o,r=n;try{n.context,i=t(r,!1)}catch(t){if(e.isType(t,L)){var c=t;r.resumeWith_tl1gpc$(new y(D(c)));break t}throw t}if(i!==p){var l=null==(o=i)||e.isType(o,a)?o:s();r.resumeWith_tl1gpc$(new y(l))}}while(0)}function _r(t,n,i){t:do{var o,r,c=i;try{i.context,o=t(n,c,!1)}catch(t){if(e.isType(t,L)){var l=t;c.resumeWith_tl1gpc$(new y(D(l)));break t}throw t}if(o!==p){var u=null==(r=o)||e.isType(r,a)?r:s();c.resumeWith_tl1gpc$(new y(u))}}while(0)}function mr(t,n,i){var o;t:do{var r;try{r=i(n,t,!1)}catch(t){if(!e.isType(t,L))throw t;r=new Qt(t)}var a=r;if(a===p){o=p;break t}var s=t.makeCompletingOnce_8ea4ql$(a);if(s===tn){o=p;break t}if(e.isType(s,Qt))throw ba(s.cause,t.uCont);o=fn(s)}while(0);return o}function fr(t,n,i){var o;t:do{var r,a;try{r=i(n,t,!1)}catch(t){if(!e.isType(t,L))throw t;r=new Qt(t)}var s=r;if(s===p){o=p;break t}var c=t.makeCompletingOnce_8ea4ql$(s);if(c===tn){o=p;break t}if(e.isType(c,Qt)){var l=c.cause;if(!e.isType(l,jn)||l.coroutine_8be2vx$!==t)throw ba(c.cause,t.uCont);if(e.isType(s,Qt))throw ba(s.cause,t.uCont);a=s}else a=fn(c);o=a}while(0);return o}function yr(t){this.closure$block=t}function Tr(){}function $r(){}function Nr(){}function gr(){}function Rr(){}function Cr(){this.number_0=rt(X)}function Sr(t){La.call(this),this.uCont_0=t,this._state_0=E(Mo),this._result_0=E(Xo),this._parentHandle_0=E(null)}function Ir(t){this.$outer=t,On.call(this)}function Lr(t){So.call(this),this.otherOp=t}function br(t,e){Io.call(this),this.impl=t,this.desc=e,this.opSequence_oe6pw4$_0=qo.next(),this.desc.atomicOp=this}function vr(t){ga.call(this),this.handle=t}function Or(t){this.instance=new Sr(t),this.clauses=pt()}function Ur(t){this.locked=t}function Dr(){ga.call(this)}function Ar(){}function kr(t,e){g(typeof t,"function")?t(e):t.invoke(e)}function Pr(){if(function(){var t=!g(typeof navigator,Ko)&&null!=navigator&&null!=navigator.userAgent;t&&(t=!g(typeof navigator.userAgent,Ko));var e=t;return e&&(e=!g(typeof navigator.userAgent.match,Ko)),e&&navigator.userAgent.match("\\bjsdom\\b")}())return aa();var t=!g(typeof window,Ko)&&null!=window;if(t&&(t=!g(typeof window.addEventListener,Ko)),t)return ya(window);var e=g(typeof i,Ko);return e||(e=g(typeof i.nextTick,Ko)),e?la():aa()}function xr(){var t;return e.isType(t=Vr().Default,De)?t:s()}function wr(t,e){var n=t.coroutineContext.plus_1fupul$(e);return n!==Vr().Default&&null==n.get_j3r2sn$(N.Key)?n.plus_1fupul$(Vr().Default):n}function zr(t,e){return t.plus_1fupul$(e)}function Gr(t){return t.toString()}function jr(t){return null}function Fr(t,e){or.call(this,t,e)}function Mr(t,e){console.error(e)}function Wr(t){var e,n=t.__debug_counter;return"number"!=typeof n&&(n=Jo=Jo+1|0,t.__debug_counter=n),("number"==typeof(e=n)?e:s()).toString()}function Xr(t){var n;return null!=(n=e.getKClassFromExpression(t).simpleName)?n:"Unknown"}function Br(){Hr=this,this.Default=Pr(),this.Unconfined=Xn(),this.mainDispatcher_0=new Kr(this.Default,!1),this.injectedMainDispatcher_0=null}Go.$metadata$={kind:c,simpleName:"LockFreeTaskQueueCore",interfaces:[]},ir.$metadata$={kind:c,simpleName:"UndeliveredElementException",interfaces:[P]},Object.defineProperty(or.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.uCont,Ua)?t:null}}),or.prototype.getStackTraceElement=function(){return null},Object.defineProperty(or.prototype,"isScopedCoroutine",{configurable:!0,get:function(){return!0}}),Object.defineProperty(or.prototype,"parent_8be2vx$",{configurable:!0,get:function(){var t;return null!=(t=this.parentHandle_8be2vx$)?t.parent:null}}),or.prototype.afterCompletion_s8jyv4$=function(t){vo(m(this.uCont),Jt(t,this.uCont))},or.prototype.afterResume_s8jyv4$=function(t){this.uCont.resumeWith_tl1gpc$(Jt(t,this.uCont))},or.$metadata$={kind:c,simpleName:"ScopeCoroutine",interfaces:[Ua,St]},rr.prototype.toString=function(){return"<"+this.symbol+">"},rr.prototype.unbox_tpy1pm$=R("kotlinx-coroutines-core.kotlinx.coroutines.internal.Symbol.unbox_tpy1pm$",C((function(){var t=Object,n=e.throwCCE;return function(i){var o;return i===this?null:null==(o=i)||e.isType(o,t)?o:n()}}))),rr.$metadata$={kind:c,simpleName:"Symbol",interfaces:[]},yr.prototype.run=function(){this.closure$block()},yr.$metadata$={kind:c,interfaces:[_a]},Tr.prototype.invoke_en0wgx$=function(t,e){this.invoke_ha2bmj$(t,null,e)},Tr.$metadata$={kind:I,simpleName:"SelectBuilder",interfaces:[]},$r.$metadata$={kind:I,simpleName:"SelectClause0",interfaces:[]},Nr.$metadata$={kind:I,simpleName:"SelectClause1",interfaces:[]},gr.$metadata$={kind:I,simpleName:"SelectClause2",interfaces:[]},Rr.$metadata$={kind:I,simpleName:"SelectInstance",interfaces:[]},R("kotlinx-coroutines-core.kotlinx.coroutines.selects.select_wd2ujs$",C((function(){var n=t.kotlinx.coroutines.selects.SelectBuilderImpl,i=Error;return function(t,o){var r;return e.suspendCall((r=t,function(t){var o=new n(t);try{r(o)}catch(t){if(!e.isType(t,i))throw t;o.handleBuilderException_tcv7n7$(t)}return o.getResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),Cr.prototype.next=function(){return this.number_0.atomicfu$incrementAndGet$long()},Cr.$metadata$={kind:c,simpleName:"SeqNumber",interfaces:[]},Object.defineProperty(Sr.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.uCont_0,Ua)?t:null}}),Sr.prototype.getStackTraceElement=function(){return null},Object.defineProperty(Sr.prototype,"parentHandle_0",{configurable:!0,get:function(){return this._parentHandle_0.kotlinx$atomicfu$value},set:function(t){this._parentHandle_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(Sr.prototype,"context",{configurable:!0,get:function(){return this.uCont_0.context}}),Object.defineProperty(Sr.prototype,"completion",{configurable:!0,get:function(){return this}}),Sr.prototype.doResume_0=function(t,e){for(var n=this._result_0;;){var i=n.kotlinx$atomicfu$value;if(i===Xo){var o=t();if(this._result_0.atomicfu$compareAndSet(Xo,o))return}else{if(i!==p)throw S("Already resumed");if(this._result_0.atomicfu$compareAndSet(p,Bo))return void e()}}},Sr.prototype.resumeWith_tl1gpc$=function(t){t:do{for(var e=this._result_0;;){var n=e.kotlinx$atomicfu$value;if(n===Xo){var i=Vt(t);if(this._result_0.atomicfu$compareAndSet(Xo,i))break t}else{if(n!==p)throw S("Already resumed");if(this._result_0.atomicfu$compareAndSet(p,Bo)){if(t.isFailure){var o=this.uCont_0;o.resumeWith_tl1gpc$(new y(D(ba(H(t.exceptionOrNull())))))}else this.uCont_0.resumeWith_tl1gpc$(t);break t}}}}while(0)},Sr.prototype.resumeSelectWithException_tcv7n7$=function(t){t:do{for(var e=this._result_0;;){var n=e.kotlinx$atomicfu$value;if(n===Xo){var i=new Qt(ba(t,this.uCont_0));if(this._result_0.atomicfu$compareAndSet(Xo,i))break t}else{if(n!==p)throw S("Already resumed");if(this._result_0.atomicfu$compareAndSet(p,Bo)){m(this.uCont_0).resumeWith_tl1gpc$(new y(D(t)));break t}}}}while(0)},Sr.prototype.getResult=function(){this.isSelected||this.initCancellability_0();var t=this._result_0.kotlinx$atomicfu$value;if(t===Xo){if(this._result_0.atomicfu$compareAndSet(Xo,p))return p;t=this._result_0.kotlinx$atomicfu$value}if(t===Bo)throw S("Already resumed");if(e.isType(t,Qt))throw t.cause;return t},Sr.prototype.initCancellability_0=function(){var t;if(null!=(t=this.context.get_j3r2sn$(Xe()))){var e=t.invokeOnCompletion_ct2b2z$(!0,void 0,new Ir(this));this.parentHandle_0=e,this.isSelected&&e.dispose()}},Ir.prototype.invoke=function(t){this.$outer.trySelect()&&this.$outer.resumeSelectWithException_tcv7n7$(this.job.getCancellationException())},Ir.$metadata$={kind:c,simpleName:"SelectOnCancelling",interfaces:[On]},Sr.prototype.handleBuilderException_tcv7n7$=function(t){if(this.trySelect())this.resumeWith_tl1gpc$(new y(D(t)));else if(!e.isType(t,J)){var n=this.getResult();e.isType(n,Qt)&&n.cause===t||re(this.context,t)}},Object.defineProperty(Sr.prototype,"isSelected",{configurable:!0,get:function(){for(var t=this._state_0;;){var n=t.kotlinx$atomicfu$value;if(n===Mo)return!1;if(!e.isType(n,So))return!0;n.perform_s8jyv4$(this)}}}),Sr.prototype.disposeOnSelect_rvfg84$=function(t){var e=new vr(t);(this.isSelected||(this.addLast_l2j9rm$(e),this.isSelected))&&t.dispose()},Sr.prototype.doAfterSelect_0=function(){var t;null!=(t=this.parentHandle_0)&&t.dispose();for(var n=this._next;!g(n,this);)e.isType(n,vr)&&n.handle.dispose(),n=n._next},Sr.prototype.trySelect=function(){var t,e=this.trySelectOther_uc1cc4$(null);if(e===o)t=!0;else{if(null!=e)throw S(("Unexpected trySelectIdempotent result "+b(e)).toString());t=!1}return t},Sr.prototype.trySelectOther_uc1cc4$=function(t){for(var n=this._state_0;;){var i=n.kotlinx$atomicfu$value;t:do{if(i===Mo){if(null==t){if(!this._state_0.atomicfu$compareAndSet(Mo,null))break t}else{var r=new Lr(t);if(!this._state_0.atomicfu$compareAndSet(Mo,r))break t;var a=r.perform_s8jyv4$(this);if(null!==a)return a}return this.doAfterSelect_0(),o}if(!e.isType(i,So))return null==t?null:i===t.desc?o:null;if(null!=t){var s=t.atomicOp;if(e.isType(s,br)&&s.impl===this)throw S("Cannot use matching select clauses on the same object".toString());if(s.isEarlierThan_bfmzsr$(i))return to}i.perform_s8jyv4$(this)}while(0)}},Lr.prototype.perform_s8jyv4$=function(t){var n,i=e.isType(n=t,Sr)?n:s();this.otherOp.finishPrepare();var o=this.otherOp.atomicOp.decide_s8jyv4$(null),r=null==o?this.otherOp.desc:Mo;return i._state_0.atomicfu$compareAndSet(this,r),o},Object.defineProperty(Lr.prototype,"atomicOp",{configurable:!0,get:function(){return this.otherOp.atomicOp}}),Lr.$metadata$={kind:c,simpleName:"PairSelectOp",interfaces:[So]},Sr.prototype.performAtomicTrySelect_6q0pxr$=function(t){return new br(this,t).perform_s8jyv4$(null)},Sr.prototype.toString=function(){return"SelectInstance(state="+b(this._state_0.kotlinx$atomicfu$value)+", result="+b(this._result_0.kotlinx$atomicfu$value)+")"},Object.defineProperty(br.prototype,"opSequence",{configurable:!0,get:function(){return this.opSequence_oe6pw4$_0}}),br.prototype.prepare_11rb$=function(t){var n;if(null==t&&null!=(n=this.prepareSelectOp_0()))return n;try{return this.desc.prepare_4uxf5b$(this)}catch(n){throw e.isType(n,L)?(null==t&&this.undoPrepare_0(),n):n}},br.prototype.complete_19pj23$=function(t,e){this.completeSelect_0(e),this.desc.complete_ayrq83$(this,e)},br.prototype.prepareSelectOp_0=function(){for(var t=this.impl._state_0;;){var n=t.kotlinx$atomicfu$value;if(n===this)return null;if(e.isType(n,So))n.perform_s8jyv4$(this.impl);else{if(n!==Mo)return Wo;if(this.impl._state_0.atomicfu$compareAndSet(Mo,this))return null}}},br.prototype.undoPrepare_0=function(){this.impl._state_0.atomicfu$compareAndSet(this,Mo)},br.prototype.completeSelect_0=function(t){var e=null==t,n=e?null:Mo;this.impl._state_0.atomicfu$compareAndSet(this,n)&&e&&this.impl.doAfterSelect_0()},br.prototype.toString=function(){return"AtomicSelectOp(sequence="+this.opSequence.toString()+")"},br.$metadata$={kind:c,simpleName:"AtomicSelectOp",interfaces:[Io]},Sr.prototype.invoke_nd4vgy$=function(t,e){t.registerSelectClause0_s9h9qd$(this,e)},Sr.prototype.invoke_veq140$=function(t,e){t.registerSelectClause1_o3xas4$(this,e)},Sr.prototype.invoke_ha2bmj$=function(t,e,n){t.registerSelectClause2_rol3se$(this,e,n)},Sr.prototype.onTimeout_7xvrws$=function(t,e){if(t.compareTo_11rb$(B)<=0)this.trySelect()&&dr(e,this.completion);else{var n,i,o=new yr((n=this,i=e,function(){return n.trySelect()&&cr(i,n.completion),d}));this.disposeOnSelect_rvfg84$(Ae(this.context).invokeOnTimeout_oczv3n$(t,o,this.context))}},vr.$metadata$={kind:c,simpleName:"DisposeNode",interfaces:[ga]},Sr.$metadata$={kind:c,simpleName:"SelectBuilderImpl",interfaces:[Ua,l,Rr,Tr,La]},R("kotlinx-coroutines-core.kotlinx.coroutines.selects.selectUnbiased_wd2ujs$",C((function(){var n=t.kotlinx.coroutines.selects.UnbiasedSelectBuilderImpl,i=Error;return function(t,o){var r;return e.suspendCall((r=t,function(t){var o=new n(t);try{r(o)}catch(t){if(!e.isType(t,i))throw t;o.handleBuilderException_tcv7n7$(t)}return o.initSelectResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),Or.prototype.handleBuilderException_tcv7n7$=function(t){this.instance.handleBuilderException_tcv7n7$(t)},Or.prototype.initSelectResult=function(){if(!this.instance.isSelected)try{var t;for($t(this.clauses),t=this.clauses.iterator();t.hasNext();)t.next()()}catch(t){if(!e.isType(t,L))throw t;this.instance.handleBuilderException_tcv7n7$(t)}return this.instance.getResult()},Or.prototype.invoke_nd4vgy$=function(t,e){var n,i,o;this.clauses.add_11rb$((n=this,i=e,o=t,function(){return o.registerSelectClause0_s9h9qd$(n.instance,i),d}))},Or.prototype.invoke_veq140$=function(t,e){var n,i,o;this.clauses.add_11rb$((n=this,i=e,o=t,function(){return o.registerSelectClause1_o3xas4$(n.instance,i),d}))},Or.prototype.invoke_ha2bmj$=function(t,e,n){var i,o,r,a;this.clauses.add_11rb$((i=this,o=e,r=n,a=t,function(){return a.registerSelectClause2_rol3se$(i.instance,o,r),d}))},Or.prototype.onTimeout_7xvrws$=function(t,e){var n,i,o;this.clauses.add_11rb$((n=this,i=t,o=e,function(){return n.instance.onTimeout_7xvrws$(i,o),d}))},Or.$metadata$={kind:c,simpleName:"UnbiasedSelectBuilderImpl",interfaces:[Tr]},R("kotlinx-coroutines-core.kotlinx.coroutines.selects.whileSelect_vmyjlh$",C((function(){var n=t.kotlinx.coroutines.selects.SelectBuilderImpl,i=Error;function o(t){return function(o){var r=new n(o);try{t(r)}catch(t){if(!e.isType(t,i))throw t;r.handleBuilderException_tcv7n7$(t)}return r.getResult()}}return function(t,n){for(;e.suspendCall(o(t)(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver()););}}))),R("kotlinx-coroutines-core.kotlinx.coroutines.sync.withLock_8701tb$",(function(t,n,i,o){void 0===n&&(n=null),e.suspendCall(t.lock_s8jyv4$(n,e.coroutineReceiver()));try{return i()}finally{t.unlock_s8jyv4$(n)}})),Ur.prototype.toString=function(){return"Empty["+this.locked.toString()+"]"},Ur.$metadata$={kind:c,simpleName:"Empty",interfaces:[]},R("kotlinx-coroutines-core.kotlinx.coroutines.sync.withPermit_103m5a$",(function(t,n,i){e.suspendCall(t.acquire(e.coroutineReceiver()));try{return n()}finally{t.release()}})),Dr.$metadata$={kind:c,simpleName:"CompletionHandlerBase",interfaces:[ga]},Ar.$metadata$={kind:c,simpleName:"CancelHandlerBase",interfaces:[]},Fr.prototype.afterResume_s8jyv4$=function(t){this.uCont.resumeWith_tl1gpc$(Jt(t,this.uCont))},Fr.$metadata$={kind:c,simpleName:"UndispatchedCoroutine",interfaces:[or]},Object.defineProperty(Br.prototype,"Main",{configurable:!0,get:function(){var t;return null!=(t=this.injectedMainDispatcher_0)?t:this.mainDispatcher_0}}),Br.prototype.injectMain_ox7ct2$=function(t){this.injectedMainDispatcher_0=t},Br.prototype.resetInjectedMain=function(){this.injectedMainDispatcher_0=null},Br.$metadata$={kind:v,simpleName:"Dispatchers",interfaces:[]};var qr,Hr=null;function Vr(){return null===Hr&&new Br,Hr}function Kr(t,e){kn.call(this),this.delegate=t,this.invokeImmediately_0=e,this.immediate_iydbla$_0=this.invokeImmediately_0?this:new Kr(this.delegate,!0)}function Jr(){return new Yr}function Yr(){ke.call(this)}function Qr(){ke.call(this)}function Zr(){throw nt("runBlocking event loop is not supported")}function ta(t,e,n){z(t,e,this),this.job_8be2vx$=n,this.name="JobCancellationException"}function ea(t){return gt(t,B,qr).toInt()}function na(){te.call(this),this.messageQueue_8be2vx$=new ia(this)}function ia(t){var e;this.$outer=t,Ea.call(this),this.processQueue_8be2vx$=(e=this,function(){return e.process(),d})}function oa(){ra=this,na.call(this)}Object.defineProperty(Kr.prototype,"immediate",{configurable:!0,get:function(){return this.immediate_iydbla$_0}}),Kr.prototype.isDispatchNeeded_1fupul$=function(t){return!this.invokeImmediately_0},Kr.prototype.dispatch_5bn72i$=function(t,e){this.delegate.dispatch_5bn72i$(t,e)},Kr.prototype.dispatchYield_5bn72i$=function(t,e){this.delegate.dispatchYield_5bn72i$(t,e)},Kr.prototype.toString=function(){var t;return null!=(t=this.toStringInternalImpl())?t:this.delegate.toString()},Kr.$metadata$={kind:c,simpleName:"JsMainDispatcher",interfaces:[kn]},Yr.prototype.dispatch_5bn72i$=function(t,e){Zr()},Yr.$metadata$={kind:c,simpleName:"UnconfinedEventLoop",interfaces:[ke]},Qr.prototype.unpark_0=function(){Zr()},Qr.prototype.reschedule_0=function(t,e){Zr()},Qr.$metadata$={kind:c,simpleName:"EventLoopImplPlatform",interfaces:[ke]},ta.prototype.toString=function(){return J.prototype.toString.call(this)+"; job="+this.job_8be2vx$},ta.prototype.equals=function(t){return t===this||e.isType(t,ta)&&g(t.message,this.message)&&g(t.job_8be2vx$,this.job_8be2vx$)&&g(t.cause,this.cause)},ta.prototype.hashCode=function(){var t,e;return(31*((31*lt(H(this.message))|0)+lt(this.job_8be2vx$)|0)|0)+(null!=(e=null!=(t=this.cause)?lt(t):null)?e:0)|0},ta.$metadata$={kind:c,simpleName:"JobCancellationException",interfaces:[J]},ia.prototype.schedule=function(){this.$outer.scheduleQueueProcessing()},ia.prototype.reschedule=function(){setTimeout(this.processQueue_8be2vx$,0)},ia.$metadata$={kind:c,simpleName:"ScheduledMessageQueue",interfaces:[Ea]},na.prototype.limitedParallelism_za3lpa$=function(t){return wo(t),this},na.prototype.dispatch_5bn72i$=function(t,e){this.messageQueue_8be2vx$.enqueue_771g0p$(e)},na.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){var i;return new pa(setTimeout((i=e,function(){return i.run(),d}),ea(t)))},na.prototype.scheduleResumeAfterDelay_egqmvs$=function(t,e){var n,i,o=setTimeout((n=e,i=this,function(){return n.resumeUndispatched_hyuxa3$(i,d),d}),ea(t));e.invokeOnCancellation_f05bi3$(new pa(o))},na.$metadata$={kind:c,simpleName:"SetTimeoutBasedDispatcher",interfaces:[De,te]},oa.prototype.scheduleQueueProcessing=function(){i.nextTick(this.messageQueue_8be2vx$.processQueue_8be2vx$)},oa.$metadata$={kind:v,simpleName:"NodeDispatcher",interfaces:[na]};var ra=null;function aa(){return null===ra&&new oa,ra}function sa(){ca=this,na.call(this)}sa.prototype.scheduleQueueProcessing=function(){setTimeout(this.messageQueue_8be2vx$.processQueue_8be2vx$,0)},sa.$metadata$={kind:v,simpleName:"SetTimeoutDispatcher",interfaces:[na]};var ca=null;function la(){return null===ca&&new sa,ca}function pa(t){jt.call(this),this.handle_0=t}function ua(t){te.call(this),this.window_0=t,this.queue_0=new ha(this.window_0)}function da(t,e){this.this$WindowDispatcher=t,this.closure$handle=e}function ha(t){var e;Ea.call(this),this.window_0=t,this.messageName_0="dispatchCoroutine",this.window_0.addEventListener("message",(e=this,function(t){return t.source==e.window_0&&t.data==e.messageName_0&&(t.stopPropagation(),e.process()),d}),!0)}function Ea(){Co.call(this),this.yieldEvery=16,this.scheduled_0=!1}function _a(){}function ma(){}function fa(t){}function ya(t){var e,n;if(null!=(e=t.coroutineDispatcher))n=e;else{var i=new ua(t);t.coroutineDispatcher=i,n=i}return n}function Ta(t){U("Flow was aborted, no more elements needed",this),this.owner=t,this.name="AbortFlowException"}function $a(){}function Na(t){return Rt(t)}function ga(){this._next=this,this._prev=this,this._removed=!1}function Ra(t,e){Sa.call(this),this.queue=t,this.node=e}function Ca(t){Sa.call(this),this.queue=t,this.affectedNode_rjf1fm$_0=this.queue._next}function Sa(){Lo.call(this)}function Ia(t,e,n){So.call(this),this.affected=t,this.desc=e,this.atomicOp_khy6pf$_0=n}function La(){ga.call(this)}function ba(t,e){return t}function va(t){return t}function Oa(t){return t}function Ua(){}function Da(t,e){}function Aa(t){return null}function ka(t){return 0}function Pa(){this.value_0=null}pa.prototype.dispose=function(){clearTimeout(this.handle_0)},pa.prototype.invoke=function(t){this.dispose()},pa.prototype.toString=function(){return"ClearTimeout["+this.handle_0+"]"},pa.$metadata$={kind:c,simpleName:"ClearTimeout",interfaces:[Be,jt]},ua.prototype.dispatch_5bn72i$=function(t,e){this.queue_0.enqueue_771g0p$(e)},ua.prototype.scheduleResumeAfterDelay_egqmvs$=function(t,e){var n,i;this.window_0.setTimeout((n=e,i=this,function(){return n.resumeUndispatched_hyuxa3$(i,d),d}),ea(t))},da.prototype.dispose=function(){this.this$WindowDispatcher.window_0.clearTimeout(this.closure$handle)},da.$metadata$={kind:c,interfaces:[Be]},ua.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){var i;return new da(this,this.window_0.setTimeout((i=e,function(){return i.run(),d}),ea(t)))},ua.$metadata$={kind:c,simpleName:"WindowDispatcher",interfaces:[De,te]},ha.prototype.schedule=function(){var t;Promise.resolve(d).then((t=this,function(e){return t.process(),d}))},ha.prototype.reschedule=function(){this.window_0.postMessage(this.messageName_0,"*")},ha.$metadata$={kind:c,simpleName:"WindowMessageQueue",interfaces:[Ea]},Ea.prototype.enqueue_771g0p$=function(t){this.addLast_trkh7z$(t),this.scheduled_0||(this.scheduled_0=!0,this.schedule())},Ea.prototype.process=function(){try{for(var t=this.yieldEvery,e=0;e=i)){var a=po(o,1,null);try{for(var s;;){var c=sn(t,e,r.v,i,a);if(!(c>=0))throw S("Check failed.".toString());if(r.v=r.v+c|0,(s=r.v>=i?0:0===c?8:1)<=0)break;a=po(o,s,a)}}finally{o.afterHeadWrite()}pn(0,o)}}function rn(t,n,i){void 0===i&&(i=2147483647);var o=e.Long.fromInt(i),r=ln(n),a=X((o.compareTo_11rb$(r)<=0?o:r).toInt());return pr(t,n,a,i),a.toString()}function an(t){Tr.call(this,t),this.name="TooLongLineException"}function sn(t,e,n,i,o){var r=i-n|0;return or(t,new ki(e,n,r),0,r,o)}function cn(t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=n.length);var r={v:i};if(r.v>=o)return Fi;var a=Wi().Pool.borrow();try{var s,c=or(t,n,r.v,o,a);if(r.v=r.v+c|0,r.v===o){var l,p,u=new Int8Array(a.writePosition-a.readPosition|0);return l=u.length-0|0,Gn(e.isType(p=a,dn)?p:m(),u,0,l),u}var d=new Hn;try{d.appendSingleChunk_pvnryh$(a.duplicate()),un(t,d,n,r.v,o),s=d.build()}catch(t){throw e.isType(t,A)?(d.release(),t):t}return bi(s)}finally{a.release_2bs5fo$(Wi().Pool)}}function ln(t){if(e.isType(t,Vn))return t.remaining;var n=t.remaining,i=W;return n.compareTo_11rb$(i)>=0?n:i}function pn(t,e){var n={v:1},i={v:0},o=po(e,1,null);try{for(;;){var r=o,a=r.limit-r.writePosition|0;if(n.v=0,i.v=i.v+(a-(r.limit-r.writePosition|0))|0,!(n.v>0))break;o=po(e,1,o)}}finally{e.afterHeadWrite()}return i.v}function un(t,e,n,i,o){var r={v:i};if(r.v>=o)return 0;var a={v:0},s=po(e,1,null);try{for(var c;;){var l=s,p=l.limit-l.writePosition|0,u=or(t,n,r.v,o,l);if(!(u>=0))throw S("Check failed.".toString());if(r.v=r.v+u|0,a.v=a.v+(p-(l.limit-l.writePosition|0))|0,(c=r.v>=o?0:0===u?8:1)<=0)break;s=po(e,c,s)}}finally{e.afterHeadWrite()}return a.v=a.v+pn(0,e)|0,a.v}function dn(t){mn(),this.memory=t,this.readPosition_osecaz$_0=0,this.writePosition_oj9ite$_0=0,this.startGap_cakrhy$_0=0,this.limit_uf38zz$_0=this.memory.view.byteLength,this.capacity=this.memory.view.byteLength}function hn(){_n=this,this.ReservedSize=8}De.prototype=Object.create(D.prototype),De.prototype.constructor=De,Tr.prototype=Object.create(A.prototype),Tr.prototype.constructor=Tr,an.prototype=Object.create(Tr.prototype),an.prototype.constructor=an,In.prototype=Object.create(H.prototype),In.prototype.constructor=In,On.prototype=Object.create(Zr.prototype),On.prototype.constructor=On,Hn.prototype=Object.create(mi.prototype),Hn.prototype.constructor=Hn,Vn.prototype=Object.create(Zn.prototype),Vn.prototype.constructor=Vn,Gi.prototype=Object.create($o.prototype),Gi.prototype.constructor=Gi,ji.prototype=Object.create($o.prototype),ji.prototype.constructor=ji,Pi.prototype=Object.create(dn.prototype),Pi.prototype.constructor=Pi,ro.prototype=Object.create(H.prototype),ro.prototype.constructor=ro,yo.prototype=Object.create(Zr.prototype),yo.prototype.constructor=yo,So.prototype=Object.create(St.prototype),So.prototype.constructor=So,er.prototype=Object.create(tr.prototype),er.prototype.constructor=er,cr.prototype=Object.create(sr.prototype),cr.prototype.constructor=cr,yr.prototype=Object.create(Ko.prototype),yr.prototype.constructor=yr,Lr.prototype=Object.create(yt.prototype),Lr.prototype.constructor=Lr,Wr.prototype=Object.create(H.prototype),Wr.prototype.constructor=Wr,Br.prototype=Object.create(Wr.prototype),Br.prototype.constructor=Br,Ct.$metadata$={kind:s,simpleName:"ByteChannel",interfaces:[ko,vo]},Object.defineProperty(St.prototype,"autoFlush",{get:function(){return this.autoFlush_tqevpj$_0}}),Object.defineProperty(St.prototype,"isCancelled_e0fq87$_0",{configurable:!0,get:function(){var t;return null!=(null!=(t=this._closed_l8h0oz$_0.kotlinx$atomicfu$value)?t.cause:null)}}),Object.defineProperty(St.prototype,"closed",{configurable:!0,get:function(){return null!=this._closed_l8h0oz$_0.kotlinx$atomicfu$value},set:function(t){throw S("Setting is not allowed for closed".toString())}}),Object.defineProperty(St.prototype,"lastReadAvailable_1j890x$_0",{configurable:!0,get:function(){return this.lastReadAvailable_1j890x$_fakn2m$_0.kotlinx$atomicfu$value},set:function(t){this.lastReadAvailable_1j890x$_fakn2m$_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(St.prototype,"lastReadView_92ta1h$_0",{configurable:!0,get:function(){return this.lastReadView_92ta1h$_nlevyr$_0.kotlinx$atomicfu$value},set:function(t){this.lastReadView_92ta1h$_nlevyr$_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(St.prototype,"availableForRead",{configurable:!0,get:function(){return this._availableForRead_c8qrsp$_0.kotlinx$atomicfu$value}}),Object.defineProperty(St.prototype,"availableForWrite",{configurable:!0,get:function(){var t=4088-this.channelSize_gcvxze$_0.kotlinx$atomicfu$value|0;return I.max(0,t)}}),Object.defineProperty(St.prototype,"isClosedForRead",{configurable:!0,get:function(){return this.isCancelled_e0fq87$_0||this.closed&&0===this.channelSize_gcvxze$_0.kotlinx$atomicfu$value}}),Object.defineProperty(St.prototype,"isClosedForWrite",{configurable:!0,get:function(){return this.closed}}),Object.defineProperty(St.prototype,"totalBytesRead",{configurable:!0,get:function(){return this._totalBytesRead_mx8dwu$_0.kotlinx$atomicfu$value}}),Object.defineProperty(St.prototype,"totalBytesWritten",{configurable:!0,get:function(){return this._totalBytesWritten_s86f3f$_0.kotlinx$atomicfu$value}}),Object.defineProperty(St.prototype,"closedCause",{configurable:!0,get:function(){var t;return null!=(t=this._closed_l8h0oz$_0.kotlinx$atomicfu$value)?t.cause:null},set:function(t){throw S("Closed cause shouldn't be changed directly".toString())}}),Lt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Lt.prototype=Object.create(p.prototype),Lt.prototype.constructor=Lt,Lt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.$this.availableForWrite>=this.local$count||this.$this.closed){this.state_0=5;continue}if(this.$this.flushImpl_t0lzva$_0()){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.slot_2l2jew$_0.sleep_u332lz$(It(this.$this,this.local$count),this),this.result_0===l)return l;continue;case 3:this.state_0=4;continue;case 4:this.state_0=2;continue;case 5:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.awaitAtLeastNBytesAvailableForWrite_kcn2v3$=function(t,e,n){var i=new Lt(this,t,e);return n?i:i.doResume(null)},vt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},vt.prototype=Object.create(p.prototype),vt.prototype.constructor=vt,vt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.$this.availableForRead>=this.local$count||this.$this.isClosedForRead){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.slot_2l2jew$_0.sleep_u332lz$(bt(this.$this,this.local$count),this),this.result_0===l)return l;continue;case 3:this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.awaitAtLeastNBytesAvailableForRead_kcn2v3$=function(t,e,n){var i=new vt(this,t,e);return n?i:i.doResume(null)},St.prototype.flush=function(){this.flushImpl_t0lzva$_0()},St.prototype.flushImpl_t0lzva$_0=function(){return this.writable.isEmpty?(this.slot_2l2jew$_0.resume(),!1):(this.flushWrittenBytes_2bgxqi$_0(),this.slot_2l2jew$_0.resume(),!0)},St.prototype.flushWrittenBytes_2bgxqi$_0=function(){var t=this.writable.size,e=u(this.writable.stealAll_8be2vx$());this.flushBuffer_1r7aq2$_0.writeChunkBuffer_pvnryh$(e),this._availableForRead_c8qrsp$_0.atomicfu$addAndGet(t)},St.prototype.prepareFlushedBytes=function(){ao(this.readable,this.flushBuffer_1r7aq2$_0)},St.prototype.ensureNotClosed_ozgwi5$_0=function(){var t;if(this.closed)throw null!=(t=this.closedCause)?t:new De("Channel "+this+" is already closed")},St.prototype.ensureNotFailed_7bddlw$_0=function(){var t;if(null!=(t=this.closedCause))throw t},St.prototype.ensureNotFailed_2bmfsh$_0=function(t){var e;if(null!=(e=this.closedCause))throw t.release(),e},Ot.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ot.prototype=Object.create(p.prototype),Ot.prototype.constructor=Ot,Ot.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return this.$this.writable.writeByte_s8j3t7$(this.local$b),void this.$this.afterWrite_za3lpa$(1);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeByte_s8j3t7$=function(t,e,n){var i=new Ot(this,t,e);return n?i:i.doResume(null)},Ut.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ut.prototype=Object.create(p.prototype),Ut.prototype.constructor=Ut,Ut.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(2,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return Ni(this.$this.writable,this.local$s),void this.$this.afterWrite_za3lpa$(2);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeShort_mq22fl$=function(t,e,n){var i=new Ut(this,t,e);return n?i:i.doResume(null)},Dt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Dt.prototype=Object.create(p.prototype),Dt.prototype.constructor=Dt,Dt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(4,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return gi(this.$this.writable,this.local$i),void this.$this.afterWrite_za3lpa$(4);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeInt_za3lpa$=function(t,e,n){var i=new Dt(this,t,e);return n?i:i.doResume(null)},At.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},At.prototype=Object.create(p.prototype),At.prototype.constructor=At,At.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(8,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return Ci(this.$this.writable,this.local$l),void this.$this.afterWrite_za3lpa$(8);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeLong_s8cxhz$=function(t,e,n){var i=new At(this,t,e);return n?i:i.doResume(null)},kt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},kt.prototype=Object.create(p.prototype),kt.prototype.constructor=kt,kt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(4,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return Ii(this.$this.writable,this.local$f),void this.$this.afterWrite_za3lpa$(4);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeFloat_mx4ult$=function(t,e,n){var i=new kt(this,t,e);return n?i:i.doResume(null)},Pt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Pt.prototype=Object.create(p.prototype),Pt.prototype.constructor=Pt,Pt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(8,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return Li(this.$this.writable,this.local$d),void this.$this.afterWrite_za3lpa$(8);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeDouble_14dthe$=function(t,e,n){var i=new Pt(this,t,e);return n?i:i.doResume(null)},xt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},xt.prototype=Object.create(p.prototype),xt.prototype.constructor=xt,xt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:var t=this.local$packet.remaining.toInt();return this.$this.writable.writePacket_3uq2w4$(this.local$packet),void this.$this.afterWrite_za3lpa$(t);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writePacket_3uq2w4$=function(t,e,n){var i=new xt(this,t,e);return n?i:i.doResume(null)},wt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},wt.prototype=Object.create(p.prototype),wt.prototype.constructor=wt,wt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:var t=this.local$src.writePosition-this.local$src.readPosition|0;return yi(this.$this.writable,this.local$src),void this.$this.afterWrite_za3lpa$(t);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeFully_b4g5fm$=function(t,e,n){var i=new wt(this,t,e);return n?i:i.doResume(null)},zt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},zt.prototype=Object.create(p.prototype),zt.prototype.constructor=zt,zt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$currentIndex=this.local$offset,this.local$endIndex=this.local$offset+this.local$length|0,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$currentIndex>=this.local$endIndex){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 3:var t=this.$this.availableForWrite,e=this.local$endIndex-this.local$currentIndex|0,n=I.min(t,e);fi(this.$this.writable,this.local$src,this.local$currentIndex,n),this.local$currentIndex=this.local$currentIndex+n|0,this.$this.afterWrite_za3lpa$(n),this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeFully_mj6st8$=function(t,e,n,i,o){var r=new zt(this,t,e,n,i);return o?r:r.doResume(null)},Gt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Gt.prototype=Object.create(p.prototype),Gt.prototype.constructor=Gt,Gt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$currentIndex=this.local$startIndex,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$currentIndex>=this.local$endIndex){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 3:var t=this.$this.availableForWrite,e=this.local$endIndex-this.local$currentIndex|0,n=I.min(t,e);Ti(this.$this.writable,this.local$memory,this.local$currentIndex,n),this.local$currentIndex=this.local$currentIndex+n|0,this.$this.afterWrite_za3lpa$(n),this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeFully_9etqdk$=function(t,e,n,i,o){var r=new Gt(this,t,e,n,i);return o?r:r.doResume(null)},jt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},jt.prototype=Object.create(p.prototype),jt.prototype.constructor=jt,jt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$srcRemaining=this.local$src.writePosition-this.local$src.readPosition|0,0===this.local$srcRemaining)return 0;this.state_0=2;continue;case 1:throw this.exception_0;case 2:var t=this.$this.availableForWrite,e=I.min(this.local$srcRemaining,t);if(0===e){if(this.state_0=3,this.result_0=this.$this.writeAvailableSuspend_2ppiy2$_0(this.local$src,this),this.result_0===l)return l;continue}yi(this.$this.writable,this.local$src,e),this.$this.afterWrite_za3lpa$(e),this.local$tmp$=e,this.state_0=4;continue;case 3:this.local$tmp$=this.result_0,this.state_0=4;continue;case 4:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeAvailable_j2u0py$=function(t,e,n){var i=new jt(this,t,e);return n?i:i.doResume(null)},Ft.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ft.prototype=Object.create(p.prototype),Ft.prototype.constructor=Ft,Ft.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(0===this.local$length)return 0;this.state_0=2;continue;case 1:throw this.exception_0;case 2:var t=this.$this.availableForWrite,e=I.min(this.local$length,t);if(0===e){if(this.state_0=3,this.result_0=this.$this.writeAvailableSuspend_1zn44g$_0(this.local$src,this.local$offset,this.local$length,this),this.result_0===l)return l;continue}fi(this.$this.writable,this.local$src,this.local$offset,e),this.$this.afterWrite_za3lpa$(e),this.local$tmp$=e,this.state_0=4;continue;case 3:this.local$tmp$=this.result_0,this.state_0=4;continue;case 4:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeAvailable_mj6st8$=function(t,e,n,i,o){var r=new Ft(this,t,e,n,i);return o?r:r.doResume(null)},Mt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Mt.prototype=Object.create(p.prototype),Mt.prototype.constructor=Mt,Mt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t=this.$this.beginWriteSession();if(this.state_0=2,this.result_0=this.local$visitor(t,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeSuspendSession_8dv01$=function(t,e,n){var i=new Mt(this,t,e);return n?i:i.doResume(null)},Wt.prototype.request_za3lpa$=function(t){return 0===this.this$ByteChannelSequentialBase.availableForWrite?null:this.this$ByteChannelSequentialBase.writable.prepareWriteHead_za3lpa$(t)},Wt.prototype.written_za3lpa$=function(t){this.this$ByteChannelSequentialBase.writable.afterHeadWrite(),this.this$ByteChannelSequentialBase.afterWrite_za3lpa$(t)},Wt.prototype.flush=function(){this.this$ByteChannelSequentialBase.flush()},Xt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Xt.prototype=Object.create(p.prototype),Xt.prototype.constructor=Xt,Xt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.this$ByteChannelSequentialBase.availableForWrite=this.local$limit.toNumber()){this.state_0=5;continue}var t=this.local$limit.subtract(e.Long.fromInt(this.local$builder.size)),n=this.$this.readable.remaining,i=t.compareTo_11rb$(n)<=0?t:n;if(this.local$builder.writePacket_pi0yjl$(this.$this.readable,i),this.$this.afterRead_za3lpa$(i.toInt()),this.$this.ensureNotFailed_2bmfsh$_0(this.local$builder),this.$this.isClosedForRead||this.local$builder.size===this.local$limit.toInt()){this.state_0=5;continue}this.state_0=3;continue;case 3:if(this.state_0=4,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===l)return l;continue;case 4:this.state_0=2;continue;case 5:return this.$this.ensureNotFailed_2bmfsh$_0(this.local$builder),this.local$builder.build();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readRemainingSuspend_gfhva8$_0=function(t,e,n,i){var o=new oe(this,t,e,n);return i?o:o.doResume(null)},re.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},re.prototype=Object.create(p.prototype),re.prototype.constructor=re,re.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.$this.checkClosed_e67qpq$_0(this.local$size);var t=new Hn,n=this.local$size,i=e.Long.fromInt(n),o=this.$this.readable.remaining,r=(i.compareTo_11rb$(o)<=0?i:o).toInt();if(n=n-r|0,t.writePacket_f7stg6$(this.$this.readable,r),this.$this.afterRead_za3lpa$(r),this.$this.checkClosed_e67qpq$_0(n,t),n>0){if(this.state_0=2,this.result_0=this.$this.readPacketSuspend_2ns5o1$_0(t,n,this),this.result_0===l)return l;continue}this.local$tmp$=t.build(),this.state_0=3;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readPacket_za3lpa$=function(t,e,n){var i=new re(this,t,e);return n?i:i.doResume(null)},ae.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ae.prototype=Object.create(p.prototype),ae.prototype.constructor=ae,ae.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$remaining=this.local$size,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$remaining<=0){this.state_0=5;continue}var t=e.Long.fromInt(this.local$remaining),n=this.$this.readable.remaining,i=(t.compareTo_11rb$(n)<=0?t:n).toInt();if(this.local$remaining=this.local$remaining-i|0,this.local$builder.writePacket_f7stg6$(this.$this.readable,i),this.$this.afterRead_za3lpa$(i),this.$this.checkClosed_e67qpq$_0(this.local$remaining,this.local$builder),this.local$remaining>0){if(this.state_0=3,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===l)return l;continue}this.state_0=4;continue;case 3:this.state_0=4;continue;case 4:this.state_0=2;continue;case 5:return this.$this.checkClosed_e67qpq$_0(this.local$remaining,this.local$builder),this.local$builder.build();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readPacketSuspend_2ns5o1$_0=function(t,e,n,i){var o=new ae(this,t,e,n);return i?o:o.doResume(null)},St.prototype.readAvailableClosed=function(){var t;if(null!=(t=this.closedCause))throw t;return this.availableForRead>0&&this.prepareFlushedBytes(),-1},St.prototype.readAvailable_j2u0py$=function(t,n){var i;return this.readAvailable_lh221x$(e.isType(i=t,dn)?i:m(),n)},se.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},se.prototype=Object.create(p.prototype),se.prototype.constructor=se,se.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(null!=(t=this.$this.closedCause))throw t;if(this.$this.closed&&0===this.$this.availableForRead)return-1;this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(0==(this.local$dst.limit-this.local$dst.writePosition|0))return 0;this.state_0=3;continue;case 3:if(0===this.$this.availableForRead){if(this.state_0=4,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===l)return l;continue}this.state_0=5;continue;case 4:this.state_0=5;continue;case 5:this.$this.readable.canRead()||this.$this.prepareFlushedBytes();var n=e.Long.fromInt(this.local$dst.limit-this.local$dst.writePosition|0),i=this.$this.readable.remaining,o=(n.compareTo_11rb$(i)<=0?n:i).toInt();return ri(this.$this.readable,this.local$dst,o),this.$this.afterRead_za3lpa$(o),o;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readAvailable_lh221x$=function(t,e,n){var i=new se(this,t,e);return n?i:i.doResume(null)},ce.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ce.prototype=Object.create(p.prototype),ce.prototype.constructor=ce,ce.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.state_0=2,this.result_0=this.$this.readFully_bkznnu$_0(e.isType(t=this.local$dst,dn)?t:m(),this.local$n,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readFully_a396d0$=function(t,e,n,i){var o=new ce(this,t,e,n);return i?o:o.doResume(null)},le.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},le.prototype=Object.create(p.prototype),le.prototype.constructor=le,le.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(!(this.local$n<=(this.local$dst.limit-this.local$dst.writePosition|0))){var t="Not enough space in the destination buffer to write "+this.local$n+" bytes";throw L(t.toString())}if(!(this.local$n>=0))throw L("n shouldn't be negative".toString());if(null!=this.$this.closedCause)throw u(this.$this.closedCause);if(this.$this.readable.remaining.toNumber()>=this.local$n){var e=(ri(this.$this.readable,this.local$dst,this.local$n),h);this.$this.afterRead_za3lpa$(this.local$n),this.local$tmp$=e,this.state_0=4;continue}if(this.$this.closed)throw new Br("Channel is closed and not enough bytes available: required "+this.local$n+" but "+this.$this.availableForRead+" available");if(this.state_0=2,this.result_0=this.$this.readFullySuspend_8xotw2$_0(this.local$dst,this.local$n,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:this.state_0=4;continue;case 4:this.state_0=5;continue;case 5:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readFully_bkznnu$_0=function(t,e,n,i){var o=new le(this,t,e,n);return i?o:o.doResume(null)},pe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},pe.prototype=Object.create(p.prototype),pe.prototype.constructor=pe,pe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitSuspend_za3lpa$(this.local$n,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.readFully_bkznnu$_0(this.local$dst,this.local$n,this),this.result_0===l)return l;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readFullySuspend_8xotw2$_0=function(t,e,n,i){var o=new pe(this,t,e,n);return i?o:o.doResume(null)},ue.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ue.prototype=Object.create(p.prototype),ue.prototype.constructor=ue,ue.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(null!=(t=this.$this.closedCause))throw t;if(this.$this.closed&&0===this.$this.availableForRead)return-1;this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(0===this.local$length)return 0;this.state_0=3;continue;case 3:if(0===this.$this.availableForRead){if(this.state_0=4,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===l)return l;continue}this.state_0=5;continue;case 4:this.state_0=5;continue;case 5:this.$this.readable.canRead()||this.$this.prepareFlushedBytes();var n=e.Long.fromInt(this.local$length),i=this.$this.readable.remaining,o=(n.compareTo_11rb$(i)<=0?n:i).toInt();return oi(this.$this.readable,this.local$dst,this.local$offset,o),this.$this.afterRead_za3lpa$(o),o;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readAvailable_mj6st8$=function(t,e,n,i,o){var r=new ue(this,t,e,n,i);return o?r:r.doResume(null)},de.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},de.prototype=Object.create(p.prototype),de.prototype.constructor=de,de.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.readAvailable_mj6st8$(this.local$dst,this.local$offset,this.local$length,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.local$rc=this.result_0,this.local$rc===this.local$length)return;this.state_0=3;continue;case 3:if(-1===this.local$rc)throw new Br("Unexpected end of stream");if(this.state_0=4,this.result_0=this.$this.readFullySuspend_ayq7by$_0(this.local$dst,this.local$offset+this.local$rc|0,this.local$length-this.local$rc|0,this),this.result_0===l)return l;continue;case 4:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readFully_mj6st8$=function(t,e,n,i,o){var r=new de(this,t,e,n,i);return o?r:r.doResume(null)},he.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},he.prototype=Object.create(p.prototype),he.prototype.constructor=he,he.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$written=0,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$written>=this.local$length){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.readAvailable_mj6st8$(this.local$dst,this.local$offset+this.local$written|0,this.local$length-this.local$written|0,this),this.result_0===l)return l;continue;case 3:var t=this.result_0;if(-1===t)throw new Br("Unexpected end of stream");this.local$written=this.local$written+t|0,this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readFullySuspend_ayq7by$_0=function(t,e,n,i,o){var r=new he(this,t,e,n,i);return o?r:r.doResume(null)},Ee.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ee.prototype=Object.create(p.prototype),Ee.prototype.constructor=Ee,Ee.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.readable.canRead()){var t=this.$this.readable.readByte()===f(1);this.$this.afterRead_za3lpa$(1),this.local$tmp$=t,this.state_0=3;continue}if(this.state_0=2,this.result_0=this.$this.readBooleanSlow_cbbszf$_0(this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readBoolean=function(t,e){var n=new Ee(this,t);return e?n:n.doResume(null)},_e.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},_e.prototype=Object.create(p.prototype),_e.prototype.constructor=_e,_e.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.$this.checkClosed_e67qpq$_0(1),this.state_0=3,this.result_0=this.$this.readBoolean(this),this.result_0===l)return l;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readBooleanSlow_cbbszf$_0=function(t,e){var n=new _e(this,t);return e?n:n.doResume(null)},St.prototype.completeReading_um9rnf$_0=function(){var t=this.lastReadView_92ta1h$_0,e=t.writePosition-t.readPosition|0,n=this.lastReadAvailable_1j890x$_0-e|0;this.lastReadView_92ta1h$_0!==mn().Empty&&co(this.readable,this.lastReadView_92ta1h$_0),n>0&&this.afterRead_za3lpa$(n),this.lastReadAvailable_1j890x$_0=0,this.lastReadView_92ta1h$_0=Wi().Empty},St.prototype.await_za3lpa$$default=function(t,e){if(!(t>=0))throw L(("atLeast parameter shouldn't be negative: "+t).toString());if(!(t<=o.toNumber())){var n="atLeast parameter shouldn't be larger than max buffer size of "+o.toString()+": "+t;throw L(n.toString())}return this.completeReading_um9rnf$_0(),0===t?!this.isClosedForRead:this.readable.remaining.toNumber()>=t||this.awaitSuspend_za3lpa$(t,e)},me.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},me.prototype=Object.create(p.prototype),me.prototype.constructor=me,me.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.readable.endOfInput){if(this.state_0=2,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===l)return l;continue}return!0;case 1:throw this.exception_0;case 2:return this.result_0;case 3:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.awaitInternalAtLeast1_8be2vx$=function(t,e){var n=new me(this,t);return e?n:n.doResume(null)},fe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},fe.prototype=Object.create(p.prototype),fe.prototype.constructor=fe,fe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(!(this.local$atLeast>=0))throw L("Failed requirement.".toString());if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForRead_kcn2v3$(this.local$atLeast,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.$this.prepareFlushedBytes(),null!=(t=this.$this.closedCause))throw t;return!this.$this.isClosedForRead&&this.$this.availableForRead>=this.local$atLeast;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.awaitSuspend_za3lpa$=function(t,e,n){var i=new fe(this,t,e);return n?i:i.doResume(null)},St.prototype.discard_za3lpa$=function(t){var e;if(null!=(e=this.closedCause))throw e;if(0===t)return 0;var n=this.readable.discard_za3lpa$(t);return this.afterRead_za3lpa$(t),this.requestNextView_id8q5z$_0(1),n},St.prototype.request_za3lpa$$default=function(t){var e;if(null!=(e=this.closedCause))throw e;return this.completeReading_um9rnf$_0(),this.requestNextView_id8q5z$_0(t)},St.prototype.requestNextView_id8q5z$_0=function(t){this.readable.endOfInput&&this.prepareFlushedBytes();var e=this.readable.prepareReadHead_kcn2v3$(t);return null==e?(this.lastReadView_92ta1h$_0=Wi().Empty,this.lastReadAvailable_1j890x$_0=0):(this.lastReadView_92ta1h$_0=e,this.lastReadAvailable_1j890x$_0=e.writePosition-e.readPosition|0),e},ye.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ye.prototype=Object.create(p.prototype),ye.prototype.constructor=ye,ye.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t=this.$this.readable.discard_s8cxhz$(this.local$max);if(this.$this.afterRead_za3lpa$(t.toInt()),_(t,this.local$max)||this.$this.isClosedForRead)return this.$this.ensureNotFailed_7bddlw$_0(),t;if(this.state_0=2,this.result_0=this.$this.discardSuspend_7c0j1e$_0(this.local$max,t,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.discard_s8cxhz$=function(t,e,n){var i=new ye(this,t,e);return n?i:i.doResume(null)},Te.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Te.prototype=Object.create(p.prototype),Te.prototype.constructor=Te,Te.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$discarded=this.local$discarded0,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.await_za3lpa$(1,this),this.result_0===l)return l;continue;case 3:if(this.result_0){this.state_0=4;continue}this.state_0=5;continue;case 4:var t=this.$this.readable.discard_s8cxhz$(this.local$max.subtract(this.local$discarded));if(this.$this.afterRead_za3lpa$(t.toInt()),this.local$discarded=this.local$discarded.add(t),this.local$discarded.compareTo_11rb$(this.local$max)>=0||this.$this.isClosedForRead){this.state_0=5;continue}this.state_0=2;continue;case 5:return this.$this.ensureNotFailed_7bddlw$_0(),this.local$discarded;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.discardSuspend_7c0j1e$_0=function(t,e,n,i){var o=new Te(this,t,e,n);return i?o:o.doResume(null)},St.prototype.readSession_m70re0$=function(t){try{t(this)}finally{this.completeReading_um9rnf$_0()}},St.prototype.startReadSession=function(){return this},St.prototype.endReadSession=function(){this.completeReading_um9rnf$_0()},$e.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},$e.prototype=Object.create(p.prototype),$e.prototype.constructor=$e,$e.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=3,this.state_0=1,this.result_0=this.local$consumer(this.$this,this),this.result_0===l)return l;continue;case 1:this.exceptionState_0=5,this.finallyPath_0=[2],this.state_0=4;continue;case 2:return;case 3:this.finallyPath_0=[5],this.state_0=4;continue;case 4:this.exceptionState_0=5,this.$this.completeReading_um9rnf$_0(),this.state_0=this.finallyPath_0.shift();continue;case 5:throw this.exception_0;default:throw this.state_0=5,new Error("State Machine Unreachable execution")}}catch(t){if(5===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readSuspendableSession_kiqllg$=function(t,e,n){var i=new $e(this,t,e);return n?i:i.doResume(null)},Ne.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ne.prototype=Object.create(p.prototype),Ne.prototype.constructor=Ne,Ne.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$this$ByteChannelSequentialBase.await_za3lpa$(this.local$size,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return this.result_0?this.local$this$ByteChannelSequentialBase.readable:null;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readUTF8LineTo_yhx0yw$=function(t,e,n){if(this.isClosedForRead){var i=this.closedCause;if(null!=i)throw i;return!1}return Ki(t,e,(r=this,function(t,e,n){var i=new Ne(r,t,e);return n?i:i.doResume(null)}),(o=this,function(t){return o.afterRead_za3lpa$(t),h}),n);var o,r},ge.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ge.prototype=Object.create(p.prototype),ge.prototype.constructor=ge,ge.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$builder=y(),this.state_0=2,this.result_0=this.$this.readUTF8LineTo_yhx0yw$(this.local$builder,this.local$limit,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.result_0){this.state_0=3;continue}return null;case 3:return this.local$builder.toString();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.readUTF8Line_za3lpa$=function(t,e,n){var i=new ge(this,t,e);return n?i:i.doResume(null)},St.prototype.cancel_dbl4no$=function(t){return null==this.closedCause&&!this.closed&&this.close_dbl4no$(null!=t?t:T("Channel cancelled"))},St.prototype.close_dbl4no$=function(t){var e=null==t?r:new Ae(t);return!!this._closed_l8h0oz$_0.atomicfu$compareAndSet(null,e)&&(null!=t?(this.readable.release(),this.writable.release(),this.flushBuffer_1r7aq2$_0.release()):this.flush(),this.slot_2l2jew$_0.cancel_dbl4no$(t),!0)},St.prototype.transferTo_pxvbjg$=function(t,e){var n,i=this.readable.remaining;return i.compareTo_11rb$(e)<=0?(t.writable.writePacket_3uq2w4$(this.readable),t.afterWrite_za3lpa$(i.toInt()),this.afterRead_za3lpa$(i.toInt()),n=i):n=E,n},Re.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Re.prototype=Object.create(p.prototype),Re.prototype.constructor=Re,Re.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.writeAvailable_j2u0py$(this.local$src,this),this.result_0===l)return l;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeAvailableSuspend_2ppiy2$_0=function(t,e,n){var i=new Re(this,t,e);return n?i:i.doResume(null)},Ce.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ce.prototype=Object.create(p.prototype),Ce.prototype.constructor=Ce,Ce.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.writeAvailable_mj6st8$(this.local$src,this.local$offset,this.local$length,this),this.result_0===l)return l;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.writeAvailableSuspend_1zn44g$_0=function(t,e,n,i,o){var r=new Ce(this,t,e,n,i);return o?r:r.doResume(null)},St.prototype.afterWrite_za3lpa$=function(t){this.addBytesWritten_9dtw3h$_0(t),this.closed&&(this.writable.release(),this.ensureNotClosed_ozgwi5$_0()),(this.autoFlush||0===this.availableForWrite)&&this.flush()},Se.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Se.prototype=Object.create(p.prototype),Se.prototype.constructor=Se,Se.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.flush(),this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return void this.$this.ensureNotClosed_ozgwi5$_0();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.awaitFreeSpace=function(t,e){var n=new Se(this,t);return e?n:n.doResume(null)},Ie.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ie.prototype=Object.create(p.prototype),Ie.prototype.constructor=Ie,Ie.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.await_za3lpa$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.awaitContent=function(t,e){var n=new Ie(this,t);return e?n:n.doResume(null)},Le.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Le.prototype=Object.create(p.prototype),Le.prototype.constructor=Le,Le.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t,n=$(this.local$closure$min.add(this.local$closure$offset),o).toInt();if(this.state_0=2,this.result_0=this.local$$receiver.await_za3lpa$(n,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:var i=null!=(t=this.local$$receiver.request_za3lpa$(1))?t:Wi().Empty;if((i.writePosition-i.readPosition|0)>this.local$closure$offset.toNumber()){var r=this.local$closure$bytesCopied,a=e.Long.fromInt(i.writePosition-i.readPosition|0).subtract(this.local$closure$offset),s=this.local$closure$max,c=e.Long.fromInt(this.local$closure$destination.view.byteLength).subtract(this.local$closure$destinationOffset),p=s.compareTo_11rb$(c)<=0?s:c;return r.v=a.compareTo_11rb$(p)<=0?a:p,i.memory.copyTo_q2ka7j$(this.local$closure$destination,this.local$closure$offset,this.local$closure$bytesCopied.v,this.local$closure$destinationOffset),h}this.state_0=3;continue;case 3:return h;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ve.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ve.prototype=Object.create(p.prototype),ve.prototype.constructor=ve,ve.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$bytesCopied={v:E},this.state_0=2,this.result_0=this.$this.readSuspendableSession_kiqllg$(be(this.local$min,this.local$offset,this.local$max,this.local$destination,this.local$destinationOffset,this.local$bytesCopied),this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return this.local$bytesCopied.v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},St.prototype.peekTo_afjyek$$default=function(t,e,n,i,o,r,a){var s=new ve(this,t,e,n,i,o,r);return a?s:s.doResume(null)},St.prototype.addBytesRead_w6zh0o$_0=function(t){if(!(t>=0))throw L(("Can't read negative amount of bytes: "+t).toString());if(this.channelSize_gcvxze$_0.atomicfu$getAndAdd(0|-t),this._totalBytesRead_mx8dwu$_0.atomicfu$addAndGet$long(e.Long.fromInt(t)),this._availableForRead_c8qrsp$_0.atomicfu$getAndAdd(0|-t),!(this.channelSize_gcvxze$_0.kotlinx$atomicfu$value>=0)){var n="Readable bytes count is negative: "+this.availableForRead+", "+t+" in "+this;throw S(n.toString())}if(!(this.availableForRead>=0)){var i="Readable bytes count is negative: "+this.availableForRead+", "+t+" in "+this;throw S(i.toString())}},St.prototype.addBytesWritten_9dtw3h$_0=function(t){if(!(t>=0))throw L(("Can't write negative amount of bytes: "+t).toString());if(this.channelSize_gcvxze$_0.atomicfu$getAndAdd(t),this._totalBytesWritten_s86f3f$_0.atomicfu$addAndGet$long(e.Long.fromInt(t)),!(this.channelSize_gcvxze$_0.kotlinx$atomicfu$value>=0)){var n="Readable bytes count is negative: "+this.channelSize_gcvxze$_0.kotlinx$atomicfu$value+", "+t+" in "+this;throw S(n.toString())}},St.$metadata$={kind:d,simpleName:"ByteChannelSequentialBase",interfaces:[Qe,Ke,We,Ct,ko,vo]},v("ktor-ktor-io-js-legacy.io.ktor.utils.io.discardExact_b56lbm$",O((function(){var n=e.equals,i=t.io.ktor.utils.io.errors.EOFException;return function(t,o,r){if(e.suspendCall(t.discard_s8cxhz$(o,e.coroutineReceiver())),!n(e.coroutineResult(e.coroutineReceiver()),o))throw new i("Unable to discard "+o.toString()+" bytes")}}))),Oe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Oe.prototype=Object.create(p.prototype),Oe.prototype.constructor=Oe,Oe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(void 0===this.local$limit&&(this.local$limit=b),this.state_0=2,this.result_0=Co(this.local$$receiver,this.local$dst,this.local$limit,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:var t=this.result_0;return Ue(this.local$dst),t;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},v("ktor-ktor-io-js-legacy.io.ktor.utils.io.writePacket_4qjh7u$",O((function(){var n=t.io.ktor.utils.io.core.BytePacketBuilder,i=Error;return function(t,o,r){var a,s=new n;try{o(s),a=s.build()}catch(t){throw e.isType(t,i)?(s.release(),t):t}return e.suspendCall(t.writePacket_3uq2w4$(a,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),De.$metadata$={kind:d,simpleName:"ClosedWriteChannelException",interfaces:[D]},v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readShort_e2pdtf$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_5vcgdc$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readShort(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readInt_e2pdtf$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_s8ev3n$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readInt(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readLong_e2pdtf$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_mts6qi$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readLong(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readFloat_e2pdtf$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_81szk$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readFloat(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readDouble_e2pdtf$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_yrwdxr$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readDouble(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readShortLittleEndian_3dmw3p$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_5vcgdc$;return function(t,i){return e.suspendCall(t.readShort(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readIntLittleEndian_3dmw3p$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_s8ev3n$;return function(t,i){return e.suspendCall(t.readInt(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readLongLittleEndian_3dmw3p$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_mts6qi$;return function(t,i){return e.suspendCall(t.readLong(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readFloatLittleEndian_3dmw3p$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_81szk$;return function(t,i){return e.suspendCall(t.readFloat(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),v("ktor-ktor-io-js-legacy.io.ktor.utils.io.readDoubleLittleEndian_3dmw3p$",O((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_yrwdxr$;return function(t,i){return e.suspendCall(t.readDouble(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),Ae.$metadata$={kind:d,simpleName:"CloseElement",interfaces:[]},ke.$metadata$={kind:s,simpleName:"ReaderJob",interfaces:[k]},Pe.$metadata$={kind:s,simpleName:"WriterJob",interfaces:[k]},xe.$metadata$={kind:s,simpleName:"ReaderScope",interfaces:[P]},we.$metadata$={kind:s,simpleName:"WriterScope",interfaces:[P]},ze.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ze.prototype=Object.create(p.prototype),ze.prototype.constructor=ze,ze.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;this.local$closure$attachJob&&this.local$closure$channel.attachJob_dqr1mp$(u(this.local$$receiver.coroutineContext.get_j3r2sn$(k.Key)));var n=e.isType(t=new Ge(this.local$$receiver,this.local$closure$channel),P)?t:m();if(this.exceptionState_0=2,this.state_0=1,this.result_0=this.local$closure$block(n,this),this.result_0===l)return l;continue;case 1:return this.result_0;case 2:this.exceptionState_0=5;var i=this.exception_0;if(e.isType(i,A)){if(!_(this.local$closure$dispatcher,w.Dispatchers.Unconfined)&&null!=this.local$closure$dispatcher)throw i;return this.local$closure$channel.cancel_dbl4no$(i)}throw i;case 3:this.state_0=4;continue;case 4:return;case 5:throw this.exception_0;default:throw this.state_0=5,new Error("State Machine Unreachable execution")}}catch(t){if(5===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(Ge.prototype,"channel",{get:function(){return this.channel_79cwt9$_0}}),Object.defineProperty(Ge.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_h3p63m$_0.coroutineContext}}),Ge.$metadata$={kind:d,simpleName:"ChannelScope",interfaces:[we,xe,P]},Object.defineProperty(je.prototype,"channel",{get:function(){return this.channel_zg1n2y$_0}}),je.prototype.toString=function(){return"ChannelJob["+this.delegate_0+"]"},Object.defineProperty(je.prototype,"children",{configurable:!0,get:function(){return this.delegate_0.children}}),Object.defineProperty(je.prototype,"isActive",{configurable:!0,get:function(){return this.delegate_0.isActive}}),Object.defineProperty(je.prototype,"isCancelled",{configurable:!0,get:function(){return this.delegate_0.isCancelled}}),Object.defineProperty(je.prototype,"isCompleted",{configurable:!0,get:function(){return this.delegate_0.isCompleted}}),Object.defineProperty(je.prototype,"key",{configurable:!0,get:function(){return this.delegate_0.key}}),Object.defineProperty(je.prototype,"onJoin",{configurable:!0,get:function(){return this.delegate_0.onJoin}}),je.prototype.attachChild_kx8v25$=function(t){return this.delegate_0.attachChild_kx8v25$(t)},je.prototype.cancel=function(){return this.delegate_0.cancel()},je.prototype.cancel_dbl4no$$default=function(t){return this.delegate_0.cancel_dbl4no$$default(t)},je.prototype.cancel_x5z25k$$default=function(t){return this.delegate_0.cancel_x5z25k$$default(t)},je.prototype.fold_3cc69b$=function(t,e){return this.delegate_0.fold_3cc69b$(t,e)},je.prototype.get_j3r2sn$=function(t){return this.delegate_0.get_j3r2sn$(t)},je.prototype.getCancellationException=function(){return this.delegate_0.getCancellationException()},je.prototype.invokeOnCompletion_ct2b2z$$default=function(t,e,n){return this.delegate_0.invokeOnCompletion_ct2b2z$$default(t,e,n)},je.prototype.invokeOnCompletion_f05bi3$=function(t){return this.delegate_0.invokeOnCompletion_f05bi3$(t)},je.prototype.join=function(t){return this.delegate_0.join(t)},je.prototype.minusKey_yeqjby$=function(t){return this.delegate_0.minusKey_yeqjby$(t)},je.prototype.plus_1fupul$=function(t){return this.delegate_0.plus_1fupul$(t)},je.prototype.plus_dqr1mp$=function(t){return this.delegate_0.plus_dqr1mp$(t)},je.prototype.start=function(){return this.delegate_0.start()},je.$metadata$={kind:d,simpleName:"ChannelJob",interfaces:[Pe,ke,k]},v("ktor-ktor-io-js-legacy.io.ktor.utils.io.read_ons6h$",O((function(){var n=t.io.ktor.utils.io.requestBuffer_78elpf$,i=t.io.ktor.utils.io.core.Buffer,o=t.io.ktor.utils.io.completeReadingFromBuffer_6msh3s$,r=Error;return function(t,a,s,c){var l;void 0===a&&(a=1),e.suspendCall(n(t,a,e.coroutineReceiver()));var p=null!=(l=e.coroutineResult(e.coroutineReceiver()))?l:i.Companion.Empty;try{var u=s(p.memory,e.Long.fromInt(p.readPosition),e.Long.fromInt(p.writePosition));return e.suspendCall(o(t,p,u,e.coroutineReceiver())),u}catch(n){throw e.isType(n,r)?(e.suspendCall(o(t,p,0,e.coroutineReceiver())),n):n}}}))),Me.prototype.request_za3lpa$=function(t,e){return void 0===t&&(t=1),e?e(t):this.request_za3lpa$$default(t)},Me.$metadata$={kind:s,simpleName:"ReadSession",interfaces:[]},We.prototype.await_za3lpa$=function(t,e,n){return void 0===t&&(t=1),n?n(t,e):this.await_za3lpa$$default(t,e)},We.$metadata$={kind:s,simpleName:"SuspendableReadSession",interfaces:[Me]},Xe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Xe.prototype=Object.create(p.prototype),Xe.prototype.constructor=Xe,Xe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(t=e.isType(this.local$$receiver,We)?this.local$$receiver:e.isType(this.local$$receiver,Ke)?this.local$$receiver.startReadSession():null,this.local$readSession=t,null!=this.local$readSession){var n=this.local$readSession.request_za3lpa$(j(this.local$desiredSize,8));if(null!=n)return n;this.state_0=2;continue}this.state_0=4;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=(i=this.local$readSession,o=this.local$desiredSize,r=void 0,a=void 0,a=new qe(i,o,this),r?a:a.doResume(null)),this.result_0===l)return l;continue;case 3:return this.result_0;case 4:if(this.state_0=5,this.result_0=Ve(this.local$$receiver,this.local$desiredSize,this),this.result_0===l)return l;continue;case 5:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var i,o,r,a},Be.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Be.prototype=Object.create(p.prototype),Be.prototype.constructor=Be,Be.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(!(this.local$bytesRead>=0)){var t="bytesRead shouldn't be negative: "+this.local$bytesRead;throw S(t.toString())}var n;if(null!=(n=e.isType(this.local$$receiver,Ke)?this.local$$receiver.startReadSession():null))return n.discard_za3lpa$(this.local$bytesRead),void(e.isType(this.local$$receiver,Ke)&&this.local$$receiver.endReadSession());this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(e.isType(this.local$buffer,Pi)&&this.local$buffer!==Wi().Empty){if(this.local$buffer.release_2bs5fo$(Wi().Pool),this.state_0=3,this.result_0=this.local$$receiver.discard_s8cxhz$(e.Long.fromInt(this.local$bytesRead),this),this.result_0===l)return l;continue}this.state_0=4;continue;case 3:this.state_0=4;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},qe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},qe.prototype=Object.create(p.prototype),qe.prototype.constructor=qe,qe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.await_za3lpa$(this.local$desiredSize,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return this.local$$receiver.request_za3lpa$(1);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},He.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},He.prototype=Object.create(p.prototype),He.prototype.constructor=He,He.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$chunk=Wi().Pool.borrow(),this.state_0=2,this.result_0=this.local$$receiver.peekTo_afjyek$(this.local$chunk.memory,e.Long.fromInt(this.local$chunk.writePosition),E,e.Long.fromInt(this.local$desiredSize),e.Long.fromInt(this.local$chunk.limit-this.local$chunk.writePosition|0),this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:var t=this.result_0;return this.local$chunk.commitWritten_za3lpa$(t.toInt()),this.local$chunk;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ke.$metadata$={kind:s,simpleName:"HasReadSession",interfaces:[]},v("ktor-ktor-io-js-legacy.io.ktor.utils.io.write_k0oolq$",O((function(){var n=t.io.ktor.utils.io.requestWriteBuffer_9tm6dw$,i=t.io.ktor.utils.io.core.Buffer,o=t.io.ktor.utils.io.completeWriting_oczduq$;return function(t,r,a,s){var c;void 0===r&&(r=1),e.suspendCall(n(t,r,e.coroutineReceiver()));var l=null!=(c=e.coroutineResult(e.coroutineReceiver()))?c:i.Companion.Empty,p=0;try{return p=a(l.memory,e.Long.fromInt(l.writePosition),e.Long.fromInt(l.limit)),l.commitWritten_za3lpa$(p),p}finally{e.suspendCall(o(t,l,p,e.coroutineReceiver()))}}}))),Je.$metadata$={kind:s,simpleName:"WriterSession",interfaces:[]},Ye.$metadata$={kind:s,simpleName:"WriterSuspendSession",interfaces:[Je]},Qe.$metadata$={kind:s,simpleName:"HasWriteSession",interfaces:[]},Ze.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Ze.prototype=Object.create(p.prototype),Ze.prototype.constructor=Ze,Ze.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(t=e.isType(this.local$$receiver,Qe)?this.local$$receiver.beginWriteSession():null,this.local$session=t,null!=this.local$session){var n=this.local$session.request_za3lpa$(this.local$desiredSpace);if(null!=n)return n;this.state_0=2;continue}this.state_0=4;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=(o=this.local$session,r=this.local$desiredSpace,a=void 0,s=void 0,s=new en(o,r,this),a?s:s.doResume(null)),this.result_0===l)return l;continue;case 3:return this.result_0;case 4:return i=void 0,(i=Wi().Pool.borrow()).resetForWrite(),i.reserveEndGap_za3lpa$(8),i;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var i,o,r,a,s},tn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},tn.prototype=Object.create(p.prototype),tn.prototype.constructor=tn,tn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(e.isType(this.local$buffer,Pi)){if(this.state_0=2,this.result_0=this.local$$receiver.writeFully_b4g5fm$(this.local$buffer,this),this.result_0===l)return l;continue}this.state_0=3;continue;case 1:throw this.exception_0;case 2:return void this.local$buffer.release_2bs5fo$(Wi().Pool);case 3:throw F("Only ChunkBuffer instance is supported.");default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},en.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},en.prototype=Object.create(p.prototype),en.prototype.constructor=en,en.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.state_0=2,this.result_0=this.local$session.tryAwait_za3lpa$(this.local$desiredSpace,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:return null!=(t=this.local$session.request_za3lpa$(this.local$desiredSpace))?t:this.local$session.request_za3lpa$(1);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},nn.$metadata$={kind:s,simpleName:"Allocator",interfaces:[]},an.$metadata$={kind:d,simpleName:"TooLongLineException",interfaces:[Tr]},Object.defineProperty(dn.prototype,"readPosition",{configurable:!0,get:function(){return this.readPosition_osecaz$_0},set:function(t){this.readPosition_osecaz$_0=t}}),Object.defineProperty(dn.prototype,"writePosition",{configurable:!0,get:function(){return this.writePosition_oj9ite$_0},set:function(t){this.writePosition_oj9ite$_0=t}}),Object.defineProperty(dn.prototype,"startGap",{configurable:!0,get:function(){return this.startGap_cakrhy$_0},set:function(t){this.startGap_cakrhy$_0=t}}),Object.defineProperty(dn.prototype,"limit",{configurable:!0,get:function(){return this.limit_uf38zz$_0},set:function(t){this.limit_uf38zz$_0=t}}),Object.defineProperty(dn.prototype,"endGap",{configurable:!0,get:v("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Buffer.get_endGap",(function(){return this.capacity-this.limit|0}))}),Object.defineProperty(dn.prototype,"readRemaining",{configurable:!0,get:v("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Buffer.get_readRemaining",(function(){return this.writePosition-this.readPosition|0}))}),Object.defineProperty(dn.prototype,"writeRemaining",{configurable:!0,get:v("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Buffer.get_writeRemaining",(function(){return this.limit-this.writePosition|0}))}),dn.prototype.discardExact_za3lpa$=function(t){if(void 0===t&&(t=this.writePosition-this.readPosition|0),0!==t){var e=this.readPosition+t|0;(t<0||e>this.writePosition)&&fn(t,this.writePosition-this.readPosition|0),this.readPosition=e}},dn.prototype.commitWritten_za3lpa$=function(t){var e=this.writePosition+t|0;(t<0||e>this.limit)&&yn(t,this.limit-this.writePosition|0),this.writePosition=e},dn.prototype.commitWrittenUntilIndex_za3lpa$=function(t){var e=this.limit;if(t=e){if(t===e)return this.writePosition=t,!1;yn(t-this.writePosition|0,this.limit-this.writePosition|0)}return this.writePosition=t,!0},dn.prototype.discardUntilIndex_kcn2v3$=function(t){(t<0||t>this.writePosition)&&fn(t-this.readPosition|0,this.writePosition-this.readPosition|0),this.readPosition!==t&&(this.readPosition=t)},dn.prototype.rewind_za3lpa$=function(t){void 0===t&&(t=this.readPosition-this.startGap|0);var e=this.readPosition-t|0;e=0))throw L(("startGap shouldn't be negative: "+t).toString());if(!(this.readPosition>=t))return this.readPosition===this.writePosition?(t>this.limit&&$n(this,t),this.writePosition=t,this.readPosition=t,void(this.startGap=t)):void Nn(this,t);this.startGap=t},dn.prototype.reserveEndGap_za3lpa$=function(t){if(!(t>=0))throw L(("endGap shouldn't be negative: "+t).toString());var e=this.capacity-t|0;if(e>=this.writePosition)this.limit=e;else{if(e<0&&gn(this,t),e=0))throw L(("newReadPosition shouldn't be negative: "+t).toString());if(!(t<=this.readPosition)){var e="newReadPosition shouldn't be ahead of the read position: "+t+" > "+this.readPosition;throw L(e.toString())}this.readPosition=t,this.startGap>t&&(this.startGap=t)},dn.prototype.duplicateTo_b4g5fm$=function(t){t.limit=this.limit,t.startGap=this.startGap,t.readPosition=this.readPosition,t.writePosition=this.writePosition},dn.prototype.duplicate=function(){var t=new dn(this.memory);return t.duplicateTo_b4g5fm$(t),t},dn.prototype.tryPeekByte=function(){var t=this.readPosition;return t===this.writePosition?-1:255&this.memory.view.getInt8(t)},dn.prototype.tryReadByte=function(){var t=this.readPosition;return t===this.writePosition?-1:(this.readPosition=t+1|0,255&this.memory.view.getInt8(t))},dn.prototype.readByte=function(){var t=this.readPosition;if(t===this.writePosition)throw new Br("No readable bytes available.");return this.readPosition=t+1|0,this.memory.view.getInt8(t)},dn.prototype.writeByte_s8j3t7$=function(t){var e=this.writePosition;if(e===this.limit)throw new In("No free space in the buffer to write a byte");this.memory.view.setInt8(e,t),this.writePosition=e+1|0},dn.prototype.reset=function(){this.releaseGaps_8be2vx$(),this.resetForWrite()},dn.prototype.toString=function(){return"Buffer("+(this.writePosition-this.readPosition|0)+" used, "+(this.limit-this.writePosition|0)+" free, "+(this.startGap+(this.capacity-this.limit|0)|0)+" reserved of "+this.capacity+")"},Object.defineProperty(hn.prototype,"Empty",{configurable:!0,get:function(){return Wi().Empty}}),hn.$metadata$={kind:B,simpleName:"Companion",interfaces:[]};var En,_n=null;function mn(){return null===_n&&new hn,_n}function fn(t,e){throw new Br("Unable to discard "+t+" bytes: only "+e+" available for reading")}function yn(t,e){throw new Br("Unable to discard "+t+" bytes: only "+e+" available for writing")}function Tn(t,e){throw L("Unable to rewind "+t+" bytes: only "+e+" could be rewinded")}function $n(t,e){if(e>t.capacity)throw L("Start gap "+e+" is bigger than the capacity "+t.capacity);throw S("Unable to reserve "+e+" start gap: there are already "+(t.capacity-t.limit|0)+" bytes reserved in the end")}function Nn(t,e){throw S("Unable to reserve "+e+" start gap: there are already "+(t.writePosition-t.readPosition|0)+" content bytes starting at offset "+t.readPosition)}function gn(t,e){throw L("End gap "+e+" is too big: capacity is "+t.capacity)}function Rn(t,e){throw L("End gap "+e+" is too big: there are already "+t.startGap+" bytes reserved in the beginning")}function Cn(t,e){throw L("Unable to reserve end gap "+e+": there are already "+(t.writePosition-t.readPosition|0)+" content bytes at offset "+t.readPosition)}function Sn(t,e){t.releaseStartGap_kcn2v3$(t.readPosition-e|0)}function In(t){void 0===t&&(t="Not enough free space"),q(t,this),this.name="InsufficientSpaceException"}function Ln(t,e,n,i){return i=i||Object.create(In.prototype),In.call(i,"Not enough free space to write "+t+" of "+e+" bytes, available "+n+" bytes."),i}function bn(t,e,n){var i=e.writePosition-e.readPosition|0,o=I.min(i,n);(t.limit-t.writePosition|0)<=o&&function(t,e){if(((t.limit-t.writePosition|0)+(t.capacity-t.limit|0)|0)0&&t.releaseEndGap_8be2vx$()}(t,o),e.memory.copyTo_ubllm2$(t.memory,e.readPosition,o,t.writePosition);var r=o;e.discardExact_za3lpa$(r);var a=r;return t.commitWritten_za3lpa$(a),a}function vn(t,e){var n=e.writePosition-e.readPosition|0,i=t.readPosition;if(i=0))throw L("Failed requirement.".toString());if(!(n<=(e.limit-e.writePosition|0)))throw L("Failed requirement.".toString());var i={v:null},o=t.memory,r=t.readPosition;if((t.writePosition-r|0)=0))throw L(("length shouldn't be negative: "+n).toString());if(!(n<=(e.writePosition-e.readPosition|0))){var i="length shouldn't be greater than the source read remaining: "+n+" > "+(e.writePosition-e.readPosition|0);throw L(i.toString())}if(!(n<=(t.limit-t.writePosition|0))){var o="length shouldn't be greater than the destination write remaining space: "+n+" > "+(t.limit-t.writePosition|0);throw L(o.toString())}var r=t.memory,a=t.writePosition,s=t.limit-a|0;if(s0}}),Object.defineProperty(Hn.prototype,"_pool",{configurable:!0,get:function(){return this.pool}}),Hn.prototype.closeDestination=function(){},Hn.prototype.flush_9etqdk$=function(t,e,n){},Hn.prototype.append_s8itvh$=function(t){var n;return e.isType(n=mi.prototype.append_s8itvh$.call(this,t),Hn)?n:m()},Hn.prototype.append_gw00v9$=function(t){var n;return e.isType(n=mi.prototype.append_gw00v9$.call(this,t),Hn)?n:m()},Hn.prototype.append_ezbsdh$=function(t,n,i){var o;return e.isType(o=mi.prototype.append_ezbsdh$.call(this,t,n,i),Hn)?o:m()},Hn.prototype.build=function(){var t=this.size,n=this.stealAll_8be2vx$();return null==n?Yn().Empty:new Vn(n,e.Long.fromInt(t),this.pool)},Hn.prototype.toString=function(){return"BytePacketBuilder("+this.size+" bytes written)"},Hn.$metadata$={kind:d,simpleName:"BytePacketBuilder",interfaces:[mi]},Vn.prototype.copy=function(){return new Vn(Xn(this.head),this.remaining,this.pool)},Vn.prototype.fill=function(){return null},Vn.prototype.fill_9etqdk$=function(t,e,n){return 0},Vn.prototype.closeSource=function(){},Vn.prototype.toString=function(){return"ByteReadPacket("+this.remaining.toString()+" bytes remaining)"},Kn.$metadata$={kind:B,simpleName:"Companion",interfaces:[]};var Jn=null;function Yn(){return null===Jn&&new Kn,Jn}function Qn(t,e,n){return n=n||Object.create(Vn.prototype),Vn.call(n,t,qn(t),e),n}function Zn(t,n,i){ii(),void 0===t&&(t=Wi().Empty),void 0===n&&(n=qn(t)),void 0===i&&(i=Wi().Pool),this.pool=i,this._head_g6i1fh$_vyxu5r$_0=t,this.headMemory=t.memory,this.headPosition=t.readPosition,this.headEndExclusive=t.writePosition,this.tailRemaining_kvq7my$_0=n.subtract(e.Long.fromInt(this.headEndExclusive-this.headPosition|0)),this.noMoreChunksAvailable_qul5an$_0=!1}function ti(t,e){this.closure$destination=t,this.idx_0=e}function ei(){ni=this}Vn.$metadata$={kind:d,simpleName:"ByteReadPacket",interfaces:[Zn]},Object.defineProperty(Zn.prototype,"endOfInput",{configurable:!0,get:function(){return 0==(this.headEndExclusive-this.headPosition|0)&&_(this.tailRemaining,E)&&(this.noMoreChunksAvailable_qul5an$_0||null==this.doFill_9l192i$_0())}}),Object.defineProperty(Zn.prototype,"_head_g6i1fh$_0",{configurable:!0,get:function(){return this._head_g6i1fh$_vyxu5r$_0},set:function(t){this._head_g6i1fh$_vyxu5r$_0=t,this.headMemory=t.memory,this.headPosition=t.readPosition,this.headEndExclusive=t.writePosition}}),Object.defineProperty(Zn.prototype,"head",{configurable:!0,get:function(){var t=this._head_g6i1fh$_0;return t.discardUntilIndex_kcn2v3$(this.headPosition),t}}),Object.defineProperty(Zn.prototype,"tailRemaining",{configurable:!0,get:function(){return this.tailRemaining_kvq7my$_0},set:function(t){if(!(t.toNumber()>=0)){var e="tailRemaining shouldn't be negative: "+t.toString();throw L(e.toString())}this.tailRemaining_kvq7my$_0=t}}),Object.defineProperty(Zn.prototype,"headRemaining",{configurable:!0,get:v("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Input.get_headRemaining",(function(){return this.headEndExclusive-this.headPosition|0}))}),Zn.prototype.prefetch_8e33dg$=function(t){if(t.toNumber()<=0)return!0;var n=this.headEndExclusive-this.headPosition|0;return n>=t.toNumber()||e.Long.fromInt(n).add(this.tailRemaining).compareTo_11rb$(t)>=0||this.doPrefetch_pddalv$_0(t)},Zn.prototype.peekTo_afjyek$=function(t,n,i,o,r){var a;void 0===i&&(i=E),void 0===o&&(o=K),void 0===r&&(r=b),this.prefetch_8e33dg$(o.add(i));for(var s=this.head,c=E,l=i,p=n,u=e.Long.fromInt(t.view.byteLength).subtract(n),d=r.compareTo_11rb$(u)<=0?r:u;c.compareTo_11rb$(o)<0&&c.compareTo_11rb$(d)<0;){var h=s,_=h.writePosition-h.readPosition|0;if(_>l.toNumber()){var m=e.Long.fromInt(_).subtract(l),f=d.subtract(c),y=m.compareTo_11rb$(f)<=0?m:f;s.memory.copyTo_q2ka7j$(t,e.Long.fromInt(s.readPosition).add(l),y,p),l=E,c=c.add(y),p=p.add(y)}else l=l.subtract(e.Long.fromInt(_));if(null==(a=s.next))break;s=a}return c},Zn.prototype.doPrefetch_pddalv$_0=function(t){var n=Bn(this._head_g6i1fh$_0),i=e.Long.fromInt(this.headEndExclusive-this.headPosition|0).add(this.tailRemaining);do{var o=this.fill();if(null==o)return this.noMoreChunksAvailable_qul5an$_0=!0,!1;var r=o.writePosition-o.readPosition|0;n===Wi().Empty?(this._head_g6i1fh$_0=o,n=o):(n.next=o,this.tailRemaining=this.tailRemaining.add(e.Long.fromInt(r))),i=i.add(e.Long.fromInt(r))}while(i.compareTo_11rb$(t)<0);return!0},Object.defineProperty(Zn.prototype,"remaining",{configurable:!0,get:function(){return e.Long.fromInt(this.headEndExclusive-this.headPosition|0).add(this.tailRemaining)}}),Zn.prototype.canRead=function(){return this.headPosition!==this.headEndExclusive||!_(this.tailRemaining,E)},Zn.prototype.hasBytes_za3lpa$=function(t){return e.Long.fromInt(this.headEndExclusive-this.headPosition|0).add(this.tailRemaining).toNumber()>=t},Zn.prototype.release=function(){var t=this.head,e=Wi().Empty;t!==e&&(this._head_g6i1fh$_0=e,this.tailRemaining=E,Wn(t,this.pool))},Zn.prototype.close=function(){this.release(),this.noMoreChunksAvailable_qul5an$_0||(this.noMoreChunksAvailable_qul5an$_0=!0),this.closeSource()},Zn.prototype.stealAll_8be2vx$=function(){var t=this.head,e=Wi().Empty;return t===e?null:(this._head_g6i1fh$_0=e,this.tailRemaining=E,t)},Zn.prototype.steal_8be2vx$=function(){var t=this.head,n=t.next,i=Wi().Empty;return t===i?null:(null==n?(this._head_g6i1fh$_0=i,this.tailRemaining=E):(this._head_g6i1fh$_0=n,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(n.writePosition-n.readPosition|0))),t.next=null,t)},Zn.prototype.append_pvnryh$=function(t){if(t!==Wi().Empty){var n=qn(t);this._head_g6i1fh$_0===Wi().Empty?(this._head_g6i1fh$_0=t,this.tailRemaining=n.subtract(e.Long.fromInt(this.headEndExclusive-this.headPosition|0))):(Bn(this._head_g6i1fh$_0).next=t,this.tailRemaining=this.tailRemaining.add(n))}},Zn.prototype.tryWriteAppend_pvnryh$=function(t){var n=Bn(this.head),i=t.writePosition-t.readPosition|0,o=0===i;return o||(o=(n.limit-n.writePosition|0)=0))throw L(("Negative discard is not allowed: "+t).toString());return this.discardAsMuchAsPossible_ulotxs$_0(t,0)},Zn.prototype.discardExact_za3lpa$=function(t){if(this.discard_za3lpa$(t)!==t)throw new Br("Unable to discard "+t+" bytes due to end of packet")},Zn.prototype.tryPeek=function(){var t,e,n=this.head;return(this.headEndExclusive-this.headPosition|0)>0?n.tryPeekByte():_(this.tailRemaining,E)&&this.noMoreChunksAvailable_qul5an$_0?-1:null!=(e=null!=(t=this.prepareReadLoop_yg4yvd$_0(1,n))?t.tryPeekByte():null)?e:-1},Zn.prototype.peekTo_j2u0py$=function(t){var n,i;if(null==(n=this.prepareReadHead_kcn2v3$(1)))return-1;var o=n,r=t.limit-t.writePosition|0,a=o.writePosition-o.readPosition|0,s=I.min(r,a);return Mn(e.isType(i=t,dn)?i:m(),o,s),s},Zn.prototype.discard_s8cxhz$=function(t){return t.toNumber()<=0?E:this.discardAsMuchAsPossible_3oo2wm$_0(t,E)},ti.prototype.append_s8itvh$=function(t){var e;return this.closure$destination[(e=this.idx_0,this.idx_0=e+1|0,e)]=t,this},ti.prototype.append_gw00v9$=function(t){var e,n;if("string"==typeof t)Mr(t,this.closure$destination,this.idx_0),this.idx_0=this.idx_0+t.length|0;else if(null!=t){e=t.length;for(var i=0;i=0){var o=vi(this,this.remaining.toInt());return t.append_gw00v9$(o),o.length}return this.readASCII_lsba8n$_0(t,n,i)},Zn.prototype.readTextExact_a5kscm$=function(t,e){this.readText_5dvtqg$(t,e,e)},Zn.prototype.readText_vux9f0$=function(t,n){if(void 0===t&&(t=0),void 0===n&&(n=2147483647),0===t&&(0===n||this.endOfInput))return"";var i=this.remaining;if(i.toNumber()>0&&e.Long.fromInt(n).compareTo_11rb$(i)>=0)return vi(this,i.toInt());var o=X(j(Q(t,16),n));return this.readASCII_lsba8n$_0(o,t,n),o.toString()},Zn.prototype.readTextExact_za3lpa$=function(t){return this.readText_vux9f0$(t,t)},Zn.prototype.readASCII_lsba8n$_0=function(t,e,n){if(0===n&&0===e)return 0;if(this.endOfInput){if(0===e)return 0;this.atLeastMinCharactersRequire_wmluvz$_0(e)}else n=c)try{var d,h=s;n:do{for(var E={v:0},_={v:0},m={v:0},f=h.memory,y=h.readPosition,T=h.writePosition,$=y;$>=1,E.v=E.v+1|0;if(m.v=E.v,E.v=E.v-1|0,m.v>(T-$|0)){h.discardExact_za3lpa$($-y|0),d=m.v;break n}}else if(_.v=_.v<<6|127&N,E.v=E.v-1|0,0===E.v){if(to(_.v)){var I,L=et(tt(_.v));if(i.v===n?I=!1:(t.append_s8itvh$(Z(L)),i.v=i.v+1|0,I=!0),!I){h.discardExact_za3lpa$($-y-m.v+1|0),d=-1;break n}}else if(eo(_.v)){var b,v=et(tt(io(_.v)));i.v===n?b=!1:(t.append_s8itvh$(Z(v)),i.v=i.v+1|0,b=!0);var O=!b;if(!O){var U,D=et(tt(no(_.v)));i.v===n?U=!1:(t.append_s8itvh$(Z(D)),i.v=i.v+1|0,U=!0),O=!U}if(O){h.discardExact_za3lpa$($-y-m.v+1|0),d=-1;break n}}else Zi(_.v);_.v=0}}var A=T-y|0;h.discardExact_za3lpa$(A),d=0}while(0);c=0===d?1:d>0?d:0}finally{var k=s;l=k.writePosition-k.readPosition|0}else l=u;if(a=!1,0===l)r=lo(this,s);else{var P=l0)}finally{a&&co(this,s)}}while(0);return i.va?(t.releaseEndGap_8be2vx$(),this.headEndExclusive=t.writePosition,this.tailRemaining=this.tailRemaining.add(e.Long.fromInt(a))):(this._head_g6i1fh$_0=i,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt((i.writePosition-i.readPosition|0)-a|0)),t.cleanNext(),t.release_2bs5fo$(this.pool))},Zn.prototype.fixGapAfterReadFallback_dfsyd9$_0=function(t){if(this.noMoreChunksAvailable_qul5an$_0&&null==t.next)return this.headPosition=t.readPosition,this.headEndExclusive=t.writePosition,void(this.tailRemaining=E);var e=t.writePosition-t.readPosition|0,n=8-(t.capacity-t.limit|0)|0,i=I.min(e,n);if(e>i)this.fixGapAfterReadFallbackUnreserved_cwr1c2$_0(t,e,i);else{var o=this.pool.borrow();o.reserveEndGap_za3lpa$(8),o.next=t.cleanNext(),bn(o,t,e),this._head_g6i1fh$_0=o}t.release_2bs5fo$(this.pool)},Zn.prototype.fixGapAfterReadFallbackUnreserved_cwr1c2$_0=function(t,e,n){var i=this.pool.borrow(),o=this.pool.borrow();i.reserveEndGap_za3lpa$(8),o.reserveEndGap_za3lpa$(8),i.next=o,o.next=t.cleanNext(),bn(i,t,e-n|0),bn(o,t,n),this._head_g6i1fh$_0=i,this.tailRemaining=qn(o)},Zn.prototype.ensureNext_1iqd97$_0=function(t,n){var i;if(t===n)return this.doFill_9l192i$_0();var o=t.cleanNext();return t.release_2bs5fo$(this.pool),null==o?(this._head_g6i1fh$_0=n,this.tailRemaining=E,i=this.ensureNext_1iqd97$_0(n,n)):o.writePosition>o.readPosition?(this._head_g6i1fh$_0=o,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(o.writePosition-o.readPosition|0)),i=o):i=this.ensureNext_1iqd97$_0(o,n),i},Zn.prototype.fill=function(){var t=this.pool.borrow();try{t.reserveEndGap_za3lpa$(8);var n=this.fill_9etqdk$(t.memory,t.writePosition,t.limit-t.writePosition|0);return 0!==n||(this.noMoreChunksAvailable_qul5an$_0=!0,t.writePosition>t.readPosition)?(t.commitWritten_za3lpa$(n),t):(t.release_2bs5fo$(this.pool),null)}catch(n){throw e.isType(n,A)?(t.release_2bs5fo$(this.pool),n):n}},Zn.prototype.markNoMoreChunksAvailable=function(){this.noMoreChunksAvailable_qul5an$_0||(this.noMoreChunksAvailable_qul5an$_0=!0)},Zn.prototype.doFill_9l192i$_0=function(){if(this.noMoreChunksAvailable_qul5an$_0)return null;var t=this.fill();return null==t?(this.noMoreChunksAvailable_qul5an$_0=!0,null):(this.appendView_eeywmr$_0(t),t)},Zn.prototype.appendView_eeywmr$_0=function(t){var e,n,i=Bn(this._head_g6i1fh$_0);if(i===Wi().Empty){if(this._head_g6i1fh$_0=t,!_(this.tailRemaining,E))throw S("It should be no tail remaining bytes if current tail is EmptyBuffer");this.tailRemaining=null!=(n=null!=(e=t.next)?qn(e):null)?n:E}else i.next=t,this.tailRemaining=this.tailRemaining.add(qn(t))},Zn.prototype.prepareRead_za3lpa$=function(t){var e=this.head;return(this.headEndExclusive-this.headPosition|0)>=t?e:this.prepareReadLoop_yg4yvd$_0(t,e)},Zn.prototype.prepareRead_cvuqs$=function(t,e){return(this.headEndExclusive-this.headPosition|0)>=t?e:this.prepareReadLoop_yg4yvd$_0(t,e)},Zn.prototype.prepareReadLoop_yg4yvd$_0=function(t,n){var i,o,r=this.headEndExclusive-this.headPosition|0;if(r>=t)return n;if(null==(o=null!=(i=n.next)?i:this.doFill_9l192i$_0()))return null;var a=o;if(0===r)return n!==Wi().Empty&&this.releaseHead_pvnryh$(n),this.prepareReadLoop_yg4yvd$_0(t,a);var s=bn(n,a,t-r|0);return this.headEndExclusive=n.writePosition,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(s)),a.writePosition>a.readPosition?a.reserveStartGap_za3lpa$(s):(n.next=null,n.next=a.cleanNext(),a.release_2bs5fo$(this.pool)),(n.writePosition-n.readPosition|0)>=t?n:(t>8&&this.minSizeIsTooBig_w2md11$_0(t),this.prepareReadLoop_yg4yvd$_0(t,n))},Zn.prototype.minSizeIsTooBig_w2md11$_0=function(t){throw S("minSize of "+t+" is too big (should be less than 8)")},Zn.prototype.afterRead_ssg6l8$_0=function(t){0==(t.writePosition-t.readPosition|0)&&this.releaseHead_pvnryh$(t)},Zn.prototype.releaseHead_pvnryh$=function(t){var n,i=null!=(n=t.cleanNext())?n:Wi().Empty;return this._head_g6i1fh$_0=i,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(i.writePosition-i.readPosition|0)),t.release_2bs5fo$(this.pool),i},ei.$metadata$={kind:B,simpleName:"Companion",interfaces:[]};var ni=null;function ii(){return null===ni&&new ei,ni}function oi(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length-n|0);var o={v:i},r={v:n};t:do{var a,s,c=!0;if(null==(a=so(t,1)))break t;var l=a;try{for(;;){var p=l,u=o.v,d=p.writePosition-p.readPosition|0,h=I.min(u,d);if(Gn(p,e,r.v,h),o.v=o.v-h|0,r.v=r.v+h|0,!(o.v>0))break;if(c=!1,null==(s=lo(t,l)))break;l=s,c=!0}}finally{c&&co(t,l)}}while(0);var E=o.v;E>0&&Ai(E)}function ri(t,e,n){void 0===n&&(n=e.limit-e.writePosition|0);var i={v:n},o={v:0};t:do{var r,a,s=!0;if(null==(r=so(t,1)))break t;var c=r;try{for(;;){var l=c,p=i.v,u=l.writePosition-l.readPosition|0,d=I.min(p,u);if(Fn(l,e,d),i.v=i.v-d|0,o.v=o.v+d|0,!(i.v>0))break;if(s=!1,null==(a=lo(t,c)))break;c=a,s=!0}}finally{s&&co(t,c)}}while(0);var h=i.v;h>0&&Ai(h)}function ai(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>2){var n=t.headPosition;t.headPosition=n+2|0,e=t.headMemory.view.getInt16(n,!1);break t}e=si(t)}while(0);return e}function si(t){var e,n=null!=(e=so(t,2))?e:Ai(2),i=Un(n);return co(t,n),i}function ci(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>4){var n=t.headPosition;t.headPosition=n+4|0,e=t.headMemory.view.getInt32(n,!1);break t}e=li(t)}while(0);return e}function li(t){var e,n=null!=(e=so(t,4))?e:Ai(4),i=Dn(n);return co(t,n),i}function pi(t){var n;t:do{if((t.headEndExclusive-t.headPosition|0)>8){var i=t.headPosition;t.headPosition=i+8|0;var o=t.headMemory;n=e.Long.fromInt(o.view.getUint32(i,!1)).shiftLeft(32).or(e.Long.fromInt(o.view.getUint32(i+4|0,!1)));break t}n=ui(t)}while(0);return n}function ui(t){var e,n=null!=(e=so(t,8))?e:Ai(8),i=An(n);return co(t,n),i}function di(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>4){var n=t.headPosition;t.headPosition=n+4|0,e=t.headMemory.view.getFloat32(n,!1);break t}e=hi(t)}while(0);return e}function hi(t){var e,n=null!=(e=so(t,4))?e:Ai(4),i=kn(n);return co(t,n),i}function Ei(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>8){var n=t.headPosition;t.headPosition=n+8|0,e=t.headMemory.view.getFloat64(n,!1);break t}e=_i(t)}while(0);return e}function _i(t){var e,n=null!=(e=so(t,8))?e:Ai(8),i=Pn(n);return co(t,n),i}function mi(t){this.pool=t,this._head_fdtp0q$_0=null,this._tail_fkcube$_0=null,this.tailMemory_8be2vx$=Xo().Empty,this.tailPosition_8be2vx$=0,this.tailEndExclusive_8be2vx$=0,this.tailInitialPosition_9teb5g$_0=0,this.chainedSize_k37a08$_0=0}function fi(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length-n|0);var o={v:n},r={v:i},a=po(t,1,null);try{for(;;){var s=a,c=r.v,l=s.limit-s.writePosition|0,p=I.min(c,l);if(jn(s,e,o.v,p),o.v=o.v+p|0,r.v=r.v-p|0,!(r.v>0))break;a=po(t,1,a)}}finally{t.afterHeadWrite()}}function yi(t,e,n){void 0===n&&(n=e.writePosition-e.readPosition|0);var i={v:0},o={v:n},r=po(t,1,null);try{for(;;){var a=r,s=o.v,c=a.limit-a.writePosition|0,l=I.min(s,c);if(Mn(a,e,l),i.v=i.v+l|0,o.v=o.v-l|0,!(o.v>0))break;r=po(t,1,r)}}finally{t.afterHeadWrite()}}function Ti(t,n,i,o){$i(t,n,e.Long.fromInt(i),e.Long.fromInt(o))}function $i(t,n,i,o){var r={v:i},a={v:o},s=po(t,1,null);try{for(;;){var c=s,l=a.v,p=e.Long.fromInt(c.limit-c.writePosition|0),u=l.compareTo_11rb$(p)<=0?l:p;if(n.copyTo_q2ka7j$(c.memory,r.v,u,e.Long.fromInt(c.writePosition)),c.commitWritten_za3lpa$(u.toInt()),r.v=r.v.add(u),a.v=a.v.subtract(u),!(a.v.toNumber()>0))break;s=po(t,1,s)}}finally{t.afterHeadWrite()}}function Ni(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>2){t.tailPosition_8be2vx$=i+2|0,t.tailMemory_8be2vx$.view.setInt16(i,e,!1),n=!0;break t}n=!1}while(0);n||function(t,e){xn(t.prepareWriteHead_za3lpa$(2),e),t.afterHeadWrite()}(t,e)}function gi(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>4){t.tailPosition_8be2vx$=i+4|0,t.tailMemory_8be2vx$.view.setInt32(i,e,!1),n=!0;break t}n=!1}while(0);n||Ri(t,e)}function Ri(t,e){wn(t.prepareWriteHead_za3lpa$(4),e),t.afterHeadWrite()}function Ci(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>8){t.tailPosition_8be2vx$=i+8|0;var o=t.tailMemory_8be2vx$;o.view.setInt32(i,e.shiftRight(32).toInt(),!1),o.view.setInt32(i+4|0,e.and(V).toInt(),!1),n=!0;break t}n=!1}while(0);n||Si(t,e)}function Si(t,e){zn(t.prepareWriteHead_za3lpa$(8),e),t.afterHeadWrite()}function Ii(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>4){t.tailPosition_8be2vx$=i+4|0,t.tailMemory_8be2vx$.view.setFloat32(i,e,!1),n=!0;break t}n=!1}while(0);n||Ri(t,it(e))}function Li(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>8){t.tailPosition_8be2vx$=i+8|0,t.tailMemory_8be2vx$.view.setFloat64(i,e,!1),n=!0;break t}n=!1}while(0);n||Si(t,ot(e))}function bi(t,e){if(void 0===e){var n=t.remaining;if(n.compareTo_11rb$(rt)>0)throw L("Unable to convert to a ByteArray: packet is too big");e=n.toInt()}if(0!==e){var i=new Int8Array(e);return oi(t,i,0,e),i}return Fi}function vi(t,e,n){return void 0===n&&(n=fr().UTF_8),ur(n.newDecoder(),t,e)}function Oi(t,e,n,i,o){if(void 0===n&&(n=0),void 0===i&&(i=e.length),void 0===o&&(o=fr().UTF_8),o===fr().UTF_8)return Di(t,e,n,i);un(o.newEncoder(),t,e,n,i)}function Ui(t,e,n,i,o){if(void 0===n&&(n=0),void 0===i&&(i=e.length),void 0===o&&(o=fr().UTF_8),o===fr().UTF_8)return Di(t,new ki(e,0,e.length),n,i);on(o.newEncoder(),e,n,i,t)}function Di(t,e,n,i){var o={v:n},r=po(t,1,null);try{for(var a;;){var s=r,c=s.memory,l=s.writePosition,p=s.limit,u=Yi(c,e,o.v,i,l,p),d=u.component1(),h=u.component2();if(o.v=o.v+(65535&d.data)|0,s.commitWritten_za3lpa$(65535&h.data),(a=0==(65535&d.data)&&o.v=2147483647&&Hi(i,"total size increase");var o=i.toInt();this.appendChainImpl_wtmh6s$_0(t,n,o)},mi.prototype.appendNewChunk_bwe9h8$_0=function(){var t=this.pool.borrow();return t.reserveEndGap_za3lpa$(8),this.appendSingleChunk_pvnryh$(t),t},mi.prototype.appendChainImpl_wtmh6s$_0=function(t,e,n){var i=this._tail_fkcube$_0;if(null==i)this._head_fdtp0q$_0=t,this.chainedSize_k37a08$_0=0;else{i.next=t;var o=this.tailPosition_8be2vx$;i.commitWrittenUntilIndex_za3lpa$(o),this.chainedSize_k37a08$_0=this.chainedSize_k37a08$_0+(o-this.tailInitialPosition_9teb5g$_0)|0}this._tail_fkcube$_0=e,this.chainedSize_k37a08$_0=this.chainedSize_k37a08$_0+n|0,this.tailMemory_8be2vx$=e.memory,this.tailPosition_8be2vx$=e.writePosition,this.tailInitialPosition_9teb5g$_0=e.readPosition,this.tailEndExclusive_8be2vx$=e.limit},mi.prototype.writeByte_s8j3t7$=function(t){var e=this.tailPosition_8be2vx$;return e=3){var n,i=this.tailMemory_8be2vx$,o=0|t;o>=0&&o<=127?(i.view.setInt8(e,f(o)),n=1):o>=128&&o<=2047?(i.view.setInt8(e,f(192|o>>6&31)),i.view.setInt8(e+1|0,f(128|63&o)),n=2):o>=2048&&o<=65535?(i.view.setInt8(e,f(224|o>>12&15)),i.view.setInt8(e+1|0,f(128|o>>6&63)),i.view.setInt8(e+2|0,f(128|63&o)),n=3):o>=65536&&o<=1114111?(i.view.setInt8(e,f(240|o>>18&7)),i.view.setInt8(e+1|0,f(128|o>>12&63)),i.view.setInt8(e+2|0,f(128|o>>6&63)),i.view.setInt8(e+3|0,f(128|63&o)),n=4):n=Zi(o);var r=n;return this.tailPosition_8be2vx$=e+r|0,this}return this.appendCharFallback_wm9vyu$_0(t),this},mi.prototype.appendCharFallback_wm9vyu$_0=function(t){var e=this.prepareWriteHead_za3lpa$(3);try{var n,i=e.memory,o=e.writePosition,r=0|t;r>=0&&r<=127?(i.view.setInt8(o,f(r)),n=1):r>=128&&r<=2047?(i.view.setInt8(o,f(192|r>>6&31)),i.view.setInt8(o+1|0,f(128|63&r)),n=2):r>=2048&&r<=65535?(i.view.setInt8(o,f(224|r>>12&15)),i.view.setInt8(o+1|0,f(128|r>>6&63)),i.view.setInt8(o+2|0,f(128|63&r)),n=3):r>=65536&&r<=1114111?(i.view.setInt8(o,f(240|r>>18&7)),i.view.setInt8(o+1|0,f(128|r>>12&63)),i.view.setInt8(o+2|0,f(128|r>>6&63)),i.view.setInt8(o+3|0,f(128|63&r)),n=4):n=Zi(r);var a=n;if(e.commitWritten_za3lpa$(a),!(a>=0))throw S("The returned value shouldn't be negative".toString())}finally{this.afterHeadWrite()}},mi.prototype.append_gw00v9$=function(t){return null==t?this.append_ezbsdh$("null",0,4):this.append_ezbsdh$(t,0,t.length),this},mi.prototype.append_ezbsdh$=function(t,e,n){return null==t?this.append_ezbsdh$("null",e,n):(Oi(this,t,e,n,fr().UTF_8),this)},mi.prototype.writePacket_3uq2w4$=function(t){var e=t.stealAll_8be2vx$();if(null!=e){var n=this._tail_fkcube$_0;null!=n?this.writePacketMerging_3vyrdt$_0(n,e,t.pool):this.appendChain_pvnryh$(e)}else t.release()},mi.prototype.writeChunkBuffer_pvnryh$=function(t){var e=this._tail_fkcube$_0;null!=e?this.writePacketMerging_3vyrdt$_0(e,t,this.pool):this.appendChain_pvnryh$(t)},mi.prototype.writePacketMerging_3vyrdt$_0=function(t,e,n){var i;t.commitWrittenUntilIndex_za3lpa$(this.tailPosition_8be2vx$);var o=t.writePosition-t.readPosition|0,r=e.writePosition-e.readPosition|0,a=Dr,s=r0;){var o=t.headEndExclusive-t.headPosition|0;if(!(o<=i.v)){var r,a=null!=(r=t.prepareRead_za3lpa$(1))?r:Ai(1),s=a.readPosition;try{yi(this,a,i.v)}finally{var c=a.readPosition;if(c0;){var r=e.Long.fromInt(t.headEndExclusive-t.headPosition|0);if(!(r.compareTo_11rb$(o.v)<=0)){var a,s=null!=(a=t.prepareRead_za3lpa$(1))?a:Ai(1),c=s.readPosition;try{yi(this,s,o.v.toInt())}finally{var l=s.readPosition;if(l=t&&null!=(e=this._tail_fkcube$_0)?(e.commitWrittenUntilIndex_za3lpa$(this.tailPosition_8be2vx$),e):this.appendNewChunk_bwe9h8$_0()},mi.prototype.afterHeadWrite=function(){var t;null!=(t=this._tail_fkcube$_0)&&(this.tailPosition_8be2vx$=t.writePosition)},mi.prototype.write_rtdvbs$=v("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Output.write_rtdvbs$",O((function(){var t=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n){var i=this.prepareWriteHead_za3lpa$(e);try{var o=n(i);if(!(o>=0))throw t("The returned value shouldn't be negative".toString());return o}finally{this.afterHeadWrite()}}}))),mi.prototype.last_j2u0py$=function(t){this.appendSingleChunk_pvnryh$(t)},mi.prototype.afterBytesStolen_8be2vx$=function(){var t=this.head_8be2vx$;if(t!==Wi().Empty){if(null!=t.next)throw S("Check failed.".toString());t.resetForWrite(),t.reserveEndGap_za3lpa$(8),this.tailPosition_8be2vx$=t.writePosition,this.tailInitialPosition_9teb5g$_0=this.tailPosition_8be2vx$,this.tailEndExclusive_8be2vx$=t.limit}},mi.$metadata$={kind:d,simpleName:"Output",interfaces:[zr,Y]},Object.defineProperty(ki.prototype,"length",{get:function(){return this.length_xy9hzd$_0}}),ki.prototype.charCodeAt=function(t){return t>=this.length&&this.indexOutOfBounds_0(t),this.array_0[t+this.offset_0|0]},ki.prototype.subSequence_vux9f0$=function(t,e){if(!(t>=0))throw L(("startIndex shouldn't be negative: "+t).toString());if(!(t<=this.length)){var n="startIndex is too large: "+t+" > "+this.length;throw L(n.toString())}if(!((t+e|0)<=this.length)){var i="endIndex is too large: "+e+" > "+this.length;throw L(i.toString())}if(!(e>=t))throw L(("endIndex should be greater or equal to startIndex: "+t+" > "+e).toString());return new ki(this.array_0,this.offset_0+t|0,e-t|0)},ki.prototype.indexOutOfBounds_0=function(t){throw new at("String index out of bounds: "+t+" > "+this.length)},ki.$metadata$={kind:d,simpleName:"CharArraySequence",interfaces:[st]},Object.defineProperty(Pi.prototype,"origin",{configurable:!0,get:function(){return this.origin_dlah8g$_0},set:function(t){this.origin_dlah8g$_0=t}}),Object.defineProperty(Pi.prototype,"next",{configurable:!0,get:function(){return this.nextRef_43oo9e$_0.kotlinx$atomicfu$value},set:function(t){null==t?this.cleanNext():this.appendNext_v1qrlf$_0(t)}}),Object.defineProperty(Pi.prototype,"referenceCount",{configurable:!0,get:function(){return this.refCount_yk3bl6$_0.kotlinx$atomicfu$value}}),Pi.prototype.appendNext_v1qrlf$_0=function(t){if(!this.nextRef_43oo9e$_0.atomicfu$compareAndSet(null,t))throw S("This chunk has already a next chunk.")},Pi.prototype.cleanNext=function(){return this.nextRef_43oo9e$_0.atomicfu$getAndSet(null)},Pi.prototype.duplicate=function(){var t,e=null!=(t=this.origin)?t:this;e.acquire_8be2vx$();var n=new Pi(this.memory,e,this.parentPool_8be2vx$);return this.duplicateTo_b4g5fm$(n),n},Pi.prototype.release_2bs5fo$=function(t){var e;if(this.release_8be2vx$()){var n=this.origin;null!=n?(this.unlink_8be2vx$(),n.release_2bs5fo$(t)):(null!=(e=this.parentPool_8be2vx$)?e:t).recycle_trkh7z$(this)}},Pi.prototype.unlink_8be2vx$=function(){if(!this.refCount_yk3bl6$_0.atomicfu$compareAndSet(0,-1))throw S("Unable to unlink: buffer is in use.");this.cleanNext(),this.origin=null},Pi.prototype.acquire_8be2vx$=function(){var t=this.refCount_yk3bl6$_0;t:do{for(;;){var e=t.kotlinx$atomicfu$value;if(e<=0)throw S("Unable to acquire chunk: it is already released.");var n=e+1|0;if(t.atomicfu$compareAndSet(e,n))break t}}while(0)},Pi.prototype.unpark_8be2vx$=function(){var t=this.refCount_yk3bl6$_0;t:do{for(;;){var e=t.kotlinx$atomicfu$value;if(e<0)throw S("This instance is already disposed and couldn't be borrowed.");if(e>0)throw S("This instance is already in use but somehow appeared in the pool.");if(t.atomicfu$compareAndSet(e,1))break t}}while(0)},Pi.prototype.release_8be2vx$=function(){var t,e=this.refCount_yk3bl6$_0;t:do{for(;;){var n=e.kotlinx$atomicfu$value;if(n<=0)throw S("Unable to release: it is already released.");var i=n-1|0;if(e.atomicfu$compareAndSet(n,i)){t=i;break t}}}while(0);return 0===t},Pi.prototype.reset=function(){if(null!=this.origin)throw L("Unable to reset buffer with origin".toString());dn.prototype.reset.call(this),this.nextRef_43oo9e$_0.kotlinx$atomicfu$value=null},Object.defineProperty(wi.prototype,"capacity",{configurable:!0,get:function(){return En.capacity}}),wi.prototype.borrow=function(){return En.borrow()},wi.prototype.recycle_trkh7z$=function(t){En.recycle_trkh7z$(t)},wi.prototype.dispose=function(){En.dispose()},wi.$metadata$={kind:d,interfaces:[To]},Object.defineProperty(zi.prototype,"capacity",{configurable:!0,get:function(){return 1}}),zi.prototype.borrow=function(){return Wi().Empty},zi.prototype.recycle_trkh7z$=function(t){if(t!==Wi().Empty)throw L("Only ChunkBuffer.Empty instance could be recycled.".toString())},zi.prototype.dispose=function(){},zi.$metadata$={kind:d,interfaces:[To]},Gi.prototype.borrow=function(){return new Pi(jo().alloc_za3lpa$(4096),null,this)},Gi.prototype.recycle_trkh7z$=function(t){jo().free_vn6nzs$(t.memory)},Gi.$metadata$={kind:d,interfaces:[$o]},ji.prototype.borrow=function(){throw F("This pool doesn't support borrow")},ji.prototype.recycle_trkh7z$=function(t){},ji.$metadata$={kind:d,interfaces:[$o]},xi.$metadata$={kind:B,simpleName:"Companion",interfaces:[]};var Fi,Mi=null;function Wi(){return null===Mi&&new xi,Mi}function Xi(t){return 1===t.referenceCount}function Bi(t){this.value=t}function qi(t,e,n){return n=n||Object.create(Bi.prototype),Bi.call(n,(65535&t.data)<<16|65535&e.data),n}function Hi(t,e){throw L("Long value "+t.toString()+" of "+e+" doesn't fit into 32-bit integer")}function Vi(t,e,n,i,o){p.call(this,o),this.exceptionState_0=1,this.local$tmp$=void 0,this.local$decoded=void 0,this.local$size=void 0,this.local$cr=void 0,this.local$end=void 0,this.local$out=t,this.local$limit=e,this.local$nextChunk=n,this.local$afterRead=i}function Ki(t,e,n,i,o,r){var a=new Vi(t,e,n,i,o);return r?a:a.doResume(null)}function Ji(t){throw new Br("Premature end of stream: expected "+t+" bytes to decode UTF-8 char")}function Yi(t,e,n,i,o,r){for(var a,s,c=n+(65535&M.Companion.MAX_VALUE.data)|0,l=I.min(i,c),p=j(r,65535&M.Companion.MAX_VALUE.data),u=o,d=n;;){if(u>=p||d>=l)return qi(new M(U(d-n|0)),new M(U(u-o|0)));var h=65535&(0|e.charCodeAt((d=(a=d)+1|0,a)));if(0!=(65408&h))break;t.view.setInt8((u=(s=u)+1|0,s),f(h))}return function(t,e,n,i,o,r,a,s){for(var c,l,p=n,u=r,d=a-3|0;!((d-u|0)<=0||p>=i);){var h,E=e.charCodeAt((p=(c=p)+1|0,c)),_=lt(E)?p!==i&&ct(e.charCodeAt(p))?oo(E,e.charCodeAt((p=(l=p)+1|0,l))):63:0|E,m=u;_>=0&&_<=127?(t.view.setInt8(m,f(_)),h=1):_>=128&&_<=2047?(t.view.setInt8(m,f(192|_>>6&31)),t.view.setInt8(m+1|0,f(128|63&_)),h=2):_>=2048&&_<=65535?(t.view.setInt8(m,f(224|_>>12&15)),t.view.setInt8(m+1|0,f(128|_>>6&63)),t.view.setInt8(m+2|0,f(128|63&_)),h=3):_>=65536&&_<=1114111?(t.view.setInt8(m,f(240|_>>18&7)),t.view.setInt8(m+1|0,f(128|_>>12&63)),t.view.setInt8(m+2|0,f(128|_>>6&63)),t.view.setInt8(m+3|0,f(128|63&_)),h=4):h=Zi(_),u=u+h|0}return u===d?function(t,e,n,i,o,r,a,s){for(var c,l,p=n,u=r;;){var d=a-u|0;if(d<=0||p>=i)break;var h=e.charCodeAt((p=(c=p)+1|0,c)),E=lt(h)?p!==i&&ct(e.charCodeAt(p))?oo(h,e.charCodeAt((p=(l=p)+1|0,l))):63:0|h;if((E>=1&&E<=127?1:E>=128&&E<=2047?2:E>=2048&&E<=65535?3:E>=65536&&E<=1114111?4:Zi(E))>d){p=p-1|0;break}var _,m=u;E>=0&&E<=127?(t.view.setInt8(m,f(E)),_=1):E>=128&&E<=2047?(t.view.setInt8(m,f(192|E>>6&31)),t.view.setInt8(m+1|0,f(128|63&E)),_=2):E>=2048&&E<=65535?(t.view.setInt8(m,f(224|E>>12&15)),t.view.setInt8(m+1|0,f(128|E>>6&63)),t.view.setInt8(m+2|0,f(128|63&E)),_=3):E>=65536&&E<=1114111?(t.view.setInt8(m,f(240|E>>18&7)),t.view.setInt8(m+1|0,f(128|E>>12&63)),t.view.setInt8(m+2|0,f(128|E>>6&63)),t.view.setInt8(m+3|0,f(128|63&E)),_=4):_=Zi(E),u=u+_|0}return qi(new M(U(p-o|0)),new M(U(u-s|0)))}(t,e,p,i,o,u,a,s):qi(new M(U(p-o|0)),new M(U(u-s|0)))}(t,e,d=d-1|0,l,n,u,p,o)}function Qi(t){throw new ro("Expected "+t+" more character bytes")}function Zi(t){throw L("Malformed code-point "+t+" found")}function to(t){return t>>>16==0}function eo(t){return t<=1114111}function no(t){return 56320+(1023&t)|0}function io(t){return 55232+(t>>>10)|0}function oo(t,e){return((0|t)-55232|0)<<10|(0|e)-56320|0}function ro(t){q(t,this),this.name="MalformedUTF8InputException"}function ao(t,e){var n,i=e.size;if(null==(n=e.stealAll_8be2vx$()))return 0;var o=n;return i<=Dr&&null==o.next&&t.tryWriteAppend_pvnryh$(o)?(e.afterBytesStolen_8be2vx$(),i):(t.append_pvnryh$(o),i)}function so(t,e){return t.prepareReadHead_kcn2v3$(e)}function co(t,e){e!==t&&(e.writePosition>e.readPosition?(e.capacity-e.limit|0)<8?t.fixGapAfterRead_pvnryh$(e):t.headPosition=e.readPosition:t.ensureNext_j2u0py$(e))}function lo(t,e){return e===t?t.canRead()?t:null:t.ensureNextHead_pvnryh$(e)}function po(t,e,n){return null!=n&&t.afterHeadWrite(),t.prepareWriteHead_za3lpa$(e)}function uo(){this.suspension_0=N(null)}function ho(t,e,n){p.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$sleepCondition=e}function Eo(t,e,n){p.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$suspended=void 0,this.local$sleepCondition=e}function _o(t,e,n,i){p.call(this,i),this.exceptionState_0=1,this.local$tmp$=void 0,this.local$remainingLimit=void 0,this.local$transferred=void 0,this.local$tail=void 0,this.local$$receiver=t,this.local$dst=e,this.local$limit=n}function mo(t,e,n,i,o){var r=new _o(t,e,n,i);return o?r:r.doResume(null)}function fo(t,e,n,i){p.call(this,i),this.exceptionState_0=9,this.local$lastPiece=void 0,this.local$rc=void 0,this.local$$receiver=t,this.local$dst=e,this.local$limit=n}function yo(t){Zr.call(this,t)}function To(){}function $o(){}function No(){this.borrowed_m1d2y6$_0=R(0),this.disposed_rxrbhb$_0=ut(!1),this.instance_vlsx8v$_0=N(null)}function go(t){return void 0===t&&(t=!1),new So(Wi().Empty,t)}function Ro(t,n,i){var o;if(0===t.length)return Ao().Empty;for(var r=Wi().Pool.borrow(),a=r,s=n,c=s+i|0;;){a.reserveEndGap_za3lpa$(8);var l=c-s|0,p=a,u=p.limit-p.writePosition|0,d=I.min(l,u);if(jn(e.isType(o=a,dn)?o:m(),t,s,d),(s=s+d|0)===c)break;var h=a;a=Wi().Pool.borrow(),h.next=a}var E=new So(r,!1);return Ue(E),E}function Co(t,n,i,o){var r,a;return mo(e.isType(r=t,St)?r:m(),e.isType(a=n,St)?a:m(),i,o)}function So(t,e){St.call(this,t,e),this.attachedJob_0=null}function Io(t,e,n,i,o){p.call(this,o),this.exceptionState_0=1,this.$this=t,this.local$dst=e,this.local$offset=n,this.local$length=i}function Lo(t,e,n,i,o){p.call(this,o),this.exceptionState_0=1,this.$this=t,this.local$dst=e,this.local$offset=n,this.local$length=i}function bo(t,e,n,i,o){p.call(this,o),this.exceptionState_0=1,this.$this=t,this.local$start=void 0,this.local$end=void 0,this.local$remaining=void 0,this.local$dst=e,this.local$offset=n,this.local$length=i}function vo(){Ao()}function Oo(){Do=this,this.Empty_wsx8uv$_0=Et(Uo)}function Uo(){var t=new So(Wi().Empty,!1);return t.close_dbl4no$(null),t}Pi.$metadata$={kind:d,simpleName:"ChunkBuffer",interfaces:[dn]},Object.defineProperty(Bi.prototype,"characters",{configurable:!0,get:function(){return new M(U(this.value>>>16))}}),Object.defineProperty(Bi.prototype,"bytes",{configurable:!0,get:function(){return new M(U(65535&this.value))}}),Bi.prototype.component1=function(){return this.characters},Bi.prototype.component2=function(){return this.bytes},Bi.$metadata$={kind:d,simpleName:"EncodeResult",interfaces:[]},Bi.prototype.unbox=function(){return this.value},Bi.prototype.toString=function(){return"EncodeResult(value="+e.toString(this.value)+")"},Bi.prototype.hashCode=function(){var t=0;return t=31*t+e.hashCode(this.value)|0},Bi.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.value,t.value)},Vi.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Vi.prototype=Object.create(p.prototype),Vi.prototype.constructor=Vi,Vi.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$decoded={v:0},this.local$size={v:1},this.local$cr={v:!1},this.local$end={v:!1},this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$end.v||0===this.local$size.v){this.state_0=5;continue}if(this.state_0=3,this.result_0=this.local$nextChunk(this.local$size.v,this),this.result_0===l)return l;continue;case 3:if(this.local$tmp$=this.result_0,null==this.local$tmp$){this.state_0=5;continue}this.state_0=4;continue;case 4:var t=this.local$tmp$,e=t.remaining;t:do{var n,i,o=!0;if(null==(n=so(t,1)))break t;var r=n,a=1;try{e:do{var s,c=r,p=c.writePosition-c.readPosition|0;if(p>=a)try{var u,d=r,h={v:0};n:do{for(var E={v:0},_={v:0},m={v:0},f=d.memory,y=d.readPosition,T=d.writePosition,$=y;$>=1,E.v=E.v+1|0;if(m.v=E.v,E.v=E.v-1|0,m.v>(T-$|0)){d.discardExact_za3lpa$($-y|0),u=m.v;break n}}else if(_.v=_.v<<6|127&N,E.v=E.v-1|0,0===E.v){if(to(_.v)){var I,L=et(tt(_.v));i:do{switch(Z(L)){case 13:if(this.local$cr.v){this.local$end.v=!0,I=!1;break i}this.local$cr.v=!0,I=!0;break i;case 10:this.local$end.v=!0,h.v=1,I=!1;break i;default:if(this.local$cr.v){this.local$end.v=!0,I=!1;break i}if(this.local$decoded.v===this.local$limit)throw new an("Too many characters in line: limit "+this.local$limit+" exceeded");this.local$decoded.v=this.local$decoded.v+1|0,this.local$out.append_s8itvh$(Z(L)),I=!0;break i}}while(0);if(!I){d.discardExact_za3lpa$($-y-m.v+1|0),u=-1;break n}}else if(eo(_.v)){var b,v=et(tt(io(_.v)));i:do{switch(Z(v)){case 13:if(this.local$cr.v){this.local$end.v=!0,b=!1;break i}this.local$cr.v=!0,b=!0;break i;case 10:this.local$end.v=!0,h.v=1,b=!1;break i;default:if(this.local$cr.v){this.local$end.v=!0,b=!1;break i}if(this.local$decoded.v===this.local$limit)throw new an("Too many characters in line: limit "+this.local$limit+" exceeded");this.local$decoded.v=this.local$decoded.v+1|0,this.local$out.append_s8itvh$(Z(v)),b=!0;break i}}while(0);var O=!b;if(!O){var U,D=et(tt(no(_.v)));i:do{switch(Z(D)){case 13:if(this.local$cr.v){this.local$end.v=!0,U=!1;break i}this.local$cr.v=!0,U=!0;break i;case 10:this.local$end.v=!0,h.v=1,U=!1;break i;default:if(this.local$cr.v){this.local$end.v=!0,U=!1;break i}if(this.local$decoded.v===this.local$limit)throw new an("Too many characters in line: limit "+this.local$limit+" exceeded");this.local$decoded.v=this.local$decoded.v+1|0,this.local$out.append_s8itvh$(Z(D)),U=!0;break i}}while(0);O=!U}if(O){d.discardExact_za3lpa$($-y-m.v+1|0),u=-1;break n}}else Zi(_.v);_.v=0}}var A=T-y|0;d.discardExact_za3lpa$(A),u=0}while(0);this.local$size.v=u,h.v>0&&d.discardExact_za3lpa$(h.v),this.local$size.v=this.local$end.v?0:Q(this.local$size.v,1),a=this.local$size.v}finally{var k=r;s=k.writePosition-k.readPosition|0}else s=p;if(o=!1,0===s)i=lo(t,r);else{var P=s0)}finally{o&&co(t,r)}}while(0);this.local$afterRead(e.subtract(t.remaining).toInt()),this.state_0=2;continue;case 5:return this.local$size.v>1&&Ji(this.local$size.v),this.local$cr.v&&(this.local$end.v=!0),this.local$decoded.v>0||this.local$end.v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ro.$metadata$={kind:d,simpleName:"MalformedUTF8InputException",interfaces:[H]},ho.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},ho.prototype=Object.create(p.prototype),ho.prototype.constructor=ho,ho.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.trySuspend_0(this.local$sleepCondition,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.result_0)return;this.state_0=3;continue;case 3:return void this.$this.resume();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},uo.prototype.sleep_u332lz$=function(t,e,n){var i=new ho(this,t,e);return n?i:i.doResume(null)},uo.prototype.resume=function(){var t;null!=(t=this.suspension_0.atomicfu$getAndSet(null))&&t.complete()},uo.prototype.cancel_dbl4no$=function(t){var e;if(null!=(e=this.suspension_0.atomicfu$getAndSet(null))){var n=e;null!=t?n.completeExceptionally_tcv7n7$(t):n.complete()}},Eo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Eo.prototype=Object.create(p.prototype),Eo.prototype.constructor=Eo,Eo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$suspended=!1;var t=pt();if(this.$this.suspension_0.atomicfu$compareAndSet(null,t)&&this.local$sleepCondition()){if(this.local$suspended=!0,this.state_0=2,this.result_0=t.join(this),this.result_0===l)return l;continue}this.state_0=3;continue;case 1:throw this.exception_0;case 2:this.state_0=3;continue;case 3:return this.local$suspended;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},uo.prototype.trySuspend_0=function(t,e,n){var i=new Eo(this,t,e);return n?i:i.doResume(null)},uo.$metadata$={kind:d,simpleName:"AwaitingSlot",interfaces:[]},_o.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},_o.prototype=Object.create(p.prototype),_o.prototype.constructor=_o,_o.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$$receiver===this.local$dst)throw L("Failed requirement.".toString());if(null!=this.local$$receiver.closedCause)return this.local$dst.close_dbl4no$(this.local$$receiver.closedCause),E;this.state_0=2;continue;case 1:throw this.exception_0;case 2:this.local$remainingLimit=this.local$limit,this.state_0=3;continue;case 3:if(this.local$remainingLimit.toNumber()<=0){this.state_0=11;continue}if(this.state_0=4,this.result_0=this.local$$receiver.awaitInternalAtLeast1_8be2vx$(this),this.result_0===l)return l;continue;case 4:if(this.result_0){this.state_0=5;continue}this.state_0=11;continue;case 5:if(this.local$transferred=this.local$$receiver.transferTo_pxvbjg$(this.local$dst,this.local$remainingLimit),_(this.local$transferred,E)){if(this.state_0=8,this.result_0=(e=this.local$$receiver,n=this.local$dst,i=this.local$remainingLimit,o=void 0,r=void 0,r=new fo(e,n,i,this),o?r:r.doResume(null)),this.result_0===l)return l;continue}if(0===this.local$dst.availableForWrite){if(this.state_0=6,this.result_0=this.local$dst.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===l)return l;continue}this.state_0=7;continue;case 6:this.state_0=7;continue;case 7:this.local$tmp$=this.local$transferred,this.state_0=10;continue;case 8:if(this.local$tail=this.result_0,_(this.local$tail,E)){this.state_0=11;continue}this.state_0=9;continue;case 9:this.local$tmp$=this.local$tail,this.state_0=10;continue;case 10:var t=this.local$tmp$;this.local$remainingLimit=this.local$remainingLimit.subtract(t),t.toNumber()>0&&this.local$dst.flush(),this.state_0=3;continue;case 11:return this.local$limit.subtract(this.local$remainingLimit);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var e,n,i,o,r},fo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},fo.prototype=Object.create(p.prototype),fo.prototype.constructor=fo,fo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$lastPiece=Wi().Pool.borrow(),this.exceptionState_0=7,this.local$lastPiece.resetForWrite_za3lpa$($(this.local$limit,e.Long.fromInt(this.local$lastPiece.capacity)).toInt()),this.state_0=1,this.result_0=this.local$$receiver.readAvailable_j2u0py$(this.local$lastPiece,this),this.result_0===l)return l;continue;case 1:if(this.local$rc=this.result_0,-1===this.local$rc){this.local$lastPiece.release_2bs5fo$(Wi().Pool),this.exceptionState_0=9,this.finallyPath_0=[2],this.state_0=8,this.$returnValue=E;continue}this.state_0=3;continue;case 2:return this.$returnValue;case 3:if(this.state_0=4,this.result_0=this.local$dst.writeFully_b4g5fm$(this.local$lastPiece,this),this.result_0===l)return l;continue;case 4:this.exceptionState_0=9,this.finallyPath_0=[5],this.state_0=8,this.$returnValue=e.Long.fromInt(this.local$rc);continue;case 5:return this.$returnValue;case 6:return;case 7:this.finallyPath_0=[9],this.state_0=8;continue;case 8:this.exceptionState_0=9,this.local$lastPiece.release_2bs5fo$(Wi().Pool),this.state_0=this.finallyPath_0.shift();continue;case 9:throw this.exception_0;default:throw this.state_0=9,new Error("State Machine Unreachable execution")}}catch(t){if(9===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},yo.prototype.produceInstance=function(){return new Int8Array(4096)},yo.$metadata$={kind:d,interfaces:[Zr]},To.prototype.close=function(){this.dispose()},To.$metadata$={kind:s,simpleName:"ObjectPool",interfaces:[zr]},Object.defineProperty($o.prototype,"capacity",{configurable:!0,get:function(){return 0}}),$o.prototype.recycle_trkh7z$=function(t){},$o.prototype.dispose=function(){},$o.$metadata$={kind:d,simpleName:"NoPoolImpl",interfaces:[To]},So.prototype.attachJob_dqr1mp$=function(t){var e,n;null!=(e=this.attachedJob_0)&&e.cancel_x5z25k$(),this.attachedJob_0=t,t.invokeOnCompletion_ct2b2z$(!0,void 0,(n=this,function(t){return n.attachedJob_0=null,null!=t&&n.cancel_dbl4no$(Fe(t)),h}))},Io.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Io.prototype=Object.create(p.prototype),Io.prototype.constructor=Io,Io.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.$this.readable.endOfInput){if(this.state_0=2,this.result_0=this.$this.readAvailableSuspend_0(this.local$dst,this.local$offset,this.local$length,this),this.result_0===l)return l;continue}if(null!=(t=this.$this.closedCause))throw t;var e=jr(this.$this.readable,this.local$dst,this.local$offset,this.local$length);return this.$this.afterRead_za3lpa$(e),e;case 1:throw this.exception_0;case 2:return this.result_0;case 3:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},So.prototype.readAvailable_qmgm5g$=function(t,e,n,i,o){var r=new Io(this,t,e,n,i);return o?r:r.doResume(null)},Lo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},Lo.prototype=Object.create(p.prototype),Lo.prototype.constructor=Lo,Lo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.await_za3lpa$(1,this),this.result_0===l)return l;continue;case 1:throw this.exception_0;case 2:if(this.result_0){this.state_0=3;continue}return-1;case 3:if(this.state_0=4,this.result_0=this.$this.readAvailable_qmgm5g$(this.local$dst,this.local$offset,this.local$length,this),this.result_0===l)return l;continue;case 4:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},So.prototype.readAvailableSuspend_0=function(t,e,n,i,o){var r=new Lo(this,t,e,n,i);return o?r:r.doResume(null)},So.prototype.readFully_qmgm5g$=function(t,e,n,i){var o;if(this.availableForRead>=n){if(null!=(o=this.closedCause))throw o;return Gr(this.readable,t,e,n),void this.afterRead_za3lpa$(n-e|0)}return this.readFullySuspend_0(t,e,n,i)},bo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[p]},bo.prototype=Object.create(p.prototype),bo.prototype.constructor=bo,bo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$start=this.local$offset,this.local$end=this.local$offset+this.local$length|0,this.local$remaining=this.local$length,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$start>=this.local$end){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.readAvailable_qmgm5g$(this.local$dst,this.local$start,this.local$remaining,this),this.result_0===l)return l;continue;case 3:var t=this.result_0;if(-1===t)throw new Br("Premature end of stream: required "+this.local$remaining+" more bytes");this.local$start=this.local$start+t|0,this.local$remaining=this.local$remaining-t|0,this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},So.prototype.readFullySuspend_0=function(t,e,n,i,o){var r=new bo(this,t,e,n,i);return o?r:r.doResume(null)},So.prototype.toString=function(){return"ByteChannel["+dt(this.attachedJob_0)+", "+ht(this)+"]"},So.$metadata$={kind:d,simpleName:"ByteChannelJS",interfaces:[St]},vo.prototype.readRemaining_s8cxhz$=function(t,e,n){return void 0===t&&(t=b),n?n(t,e):this.readRemaining_s8cxhz$$default(t,e)},vo.prototype.peekTo_afjyek$=function(t,e,n,i,o,r,a){return void 0===n&&(n=E),void 0===i&&(i=K),void 0===o&&(o=b),a?a(t,e,n,i,o,r):this.peekTo_afjyek$$default(t,e,n,i,o,r)},Object.defineProperty(Oo.prototype,"Empty",{configurable:!0,get:function(){return this.Empty_wsx8uv$_0.value}}),Oo.$metadata$={kind:B,simpleName:"Companion",interfaces:[]};var Do=null;function Ao(){return null===Do&&new Oo,Do}function ko(){}function Po(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length-n|0);var o=e;return wo(Xo(),o,n,i)}function xo(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.byteLength-n|0),new Fo(new DataView(e,n,i))}function wo(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.byteLength),xo(Xo(),e.buffer,e.byteOffset+n|0,i)}function zo(){Go=this}vo.$metadata$={kind:s,simpleName:"ByteReadChannel",interfaces:[]},ko.$metadata$={kind:s,simpleName:"ByteWriteChannel",interfaces:[]},zo.prototype.alloc_za3lpa$=function(t){return new Fo(new DataView(new ArrayBuffer(t)))},zo.prototype.alloc_s8cxhz$=function(t){return t.toNumber()>=2147483647&&Hi(t,"size"),new Fo(new DataView(new ArrayBuffer(t.toInt())))},zo.prototype.free_vn6nzs$=function(t){},zo.$metadata$={kind:B,simpleName:"DefaultAllocator",interfaces:[nn]};var Go=null;function jo(){return null===Go&&new zo,Go}function Fo(t){Xo(),this.view=t}function Mo(){Wo=this,this.Empty=new Fo(new DataView(new ArrayBuffer(0)))}Object.defineProperty(Fo.prototype,"size",{configurable:!0,get:v("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.get_size",(function(){return e.Long.fromInt(this.view.byteLength)}))}),Object.defineProperty(Fo.prototype,"size32",{configurable:!0,get:v("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.get_size32",(function(){return this.view.byteLength}))}),Fo.prototype.loadAt_za3lpa$=v("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.loadAt_za3lpa$",(function(t){return this.view.getInt8(t)})),Fo.prototype.loadAt_s8cxhz$=v("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.loadAt_s8cxhz$",O((function(){var e=t.io.ktor.utils.io.core.internal.failLongToIntConversion_a4hdmt$;return function(t){var n=this.view;return t.toNumber()>=2147483647&&e(t,"index"),n.getInt8(t.toInt())}}))),Fo.prototype.storeAt_6t1wet$=v("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.storeAt_6t1wet$",(function(t,e){this.view.setInt8(t,e)})),Fo.prototype.storeAt_3pq026$=v("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.storeAt_3pq026$",O((function(){var e=t.io.ktor.utils.io.core.internal.failLongToIntConversion_a4hdmt$;return function(t,n){var i=this.view;t.toNumber()>=2147483647&&e(t,"index"),i.setInt8(t.toInt(),n)}}))),Fo.prototype.slice_vux9f0$=function(t,n){if(!(t>=0))throw L(("offset shouldn't be negative: "+t).toString());if(!(n>=0))throw L(("length shouldn't be negative: "+n).toString());if((t+n|0)>e.Long.fromInt(this.view.byteLength).toNumber())throw new at("offset + length > size: "+t+" + "+n+" > "+e.Long.fromInt(this.view.byteLength).toString());return new Fo(new DataView(this.view.buffer,this.view.byteOffset+t|0,n))},Fo.prototype.slice_3pjtqy$=function(t,e){t.toNumber()>=2147483647&&Hi(t,"offset");var n=t.toInt();return e.toNumber()>=2147483647&&Hi(e,"length"),this.slice_vux9f0$(n,e.toInt())},Fo.prototype.copyTo_ubllm2$=function(t,e,n,i){var o=new Int8Array(this.view.buffer,this.view.byteOffset+e|0,n);new Int8Array(t.view.buffer,t.view.byteOffset+i|0,n).set(o)},Fo.prototype.copyTo_q2ka7j$=function(t,e,n,i){e.toNumber()>=2147483647&&Hi(e,"offset");var o=e.toInt();n.toNumber()>=2147483647&&Hi(n,"length");var r=n.toInt();i.toNumber()>=2147483647&&Hi(i,"destinationOffset"),this.copyTo_ubllm2$(t,o,r,i.toInt())},Mo.$metadata$={kind:B,simpleName:"Companion",interfaces:[]};var Wo=null;function Xo(){return null===Wo&&new Mo,Wo}function Bo(t,e,n,i,o){var r=e,a=new Int8Array(t.view.buffer,t.view.byteOffset+n|0,i);r.set(a,o)}function qo(t,e,n,i,o){var r=new Int8Array(e,o,i),a=new Int8Array(t.view.buffer,t.view.byteOffset+n|0,i);r.set(a,0)}function Ho(t,e,n,i,o){var r=new Int8Array(t,n,i);new Int8Array(e.view.buffer,e.view.byteOffset+o|0,i).set(r,0)}function Vo(t,e,n,i,o){Ho(t.buffer,e,n+t.byteOffset|0,i,o)}function Ko(t){Qo(),this._name_8be2vx$=t}function Jo(){Yo=this}Fo.$metadata$={kind:d,simpleName:"Memory",interfaces:[]},Ko.prototype.equals=function(t){return this===t||!(null==t||!_(_t(e.getKClassFromExpression(this)),_t(e.getKClassFromExpression(t))))&&(e.isType(t,Ko)||m(),!!_(this._name_8be2vx$,t._name_8be2vx$))},Ko.prototype.hashCode=function(){return ht(this._name_8be2vx$)},Ko.prototype.toString=function(){return this._name_8be2vx$},Jo.prototype.forName_61zpoe$=function(t){if(_(t,"UTF-8")||_(t,"utf-8")||_(t,"UTF8")||_(t,"utf8"))return fr().UTF_8;var e=_(t,"ISO-8859-1")||_(t,"iso-8859-1");if(!e){var n=mt(t,95,45),i=_(n,"iso-8859-1");i||(i=_(n.toLowerCase(),"iso-8859-1")),e=i}if(e||_(t,"latin1")||_(t,"Latin1"))return fr().ISO_8859_1;throw L("Charset "+t+" is not supported")},Jo.prototype.isSupported_61zpoe$=function(t){if(_(t,"UTF-8")||_(t,"utf-8")||_(t,"UTF8")||_(t,"utf8"))return!0;var e=_(t,"ISO-8859-1")||_(t,"iso-8859-1");if(!e){var n=mt(t,95,45),i=_(n,"iso-8859-1");i||(i=_(n.toLowerCase(),"iso-8859-1")),e=i}return!(!e&&!_(t,"latin1"))},Jo.$metadata$={kind:B,simpleName:"Companion",interfaces:[]};var Yo=null;function Qo(){return null===Yo&&new Jo,Yo}function Zo(t){return t._name_8be2vx$}function tr(t){this._charset_8be2vx$=t}function er(t){tr.call(this,t),this.charset_0=t}function nr(t){return t._charset_8be2vx$}function ir(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.length),cn(t,e,n,i)}function or(t,n,i,o,r){var a;if(!(i<=o))throw L("Failed requirement.".toString());if(null!=(a=nr(t))&&a.equals(fr().ISO_8859_1))return gr(n,i,o,r);if(nr(t)!==fr().UTF_8)throw L("Only UTF-8 encoding is supported in JS".toString());for(var s=new TextEncoder,c=i,l=r.limit-r.writePosition|0;c0;){var p=o-c|0,u=l/6|0,d=Q(I.min(p,u),1),h=lt(n.charCodeAt(c+d-1|0)),E=h&&1===d?c+2|0:h?c+d-1|0:c+d|0,_=c,m=s.encode(e.subSequence(n,_,E).toString());if(m.length>l)break;Ir(r,m),c=E,l=l-m.length|0}return c-i|0}function rr(t,e,n){if(nr(t)!==fr().UTF_8)throw L("Failed requirement.".toString());n.writePacket_3uq2w4$(e)}function ar(t,e){return!0}function sr(t){this._charset_8be2vx$=t}function cr(t){sr.call(this,t),this.charset_0=t}function lr(t){return t._charset_8be2vx$}function pr(t,n,i,o){var r=qr(Zo(lr(t)),!0),a={v:0};t:do{var s,c,l=!0;if(null==(s=so(n,1)))break t;var p=s,u=1;try{e:do{var d,h=p,E=h.writePosition-h.readPosition|0;if(E>=u)try{var _,m=p;n:do{var f,y=o-a.v|0,T=m.writePosition-m.readPosition|0;if(y0&&m.rewind_za3lpa$(T),_=0}else _=a.v0)}finally{l&&co(n,p)}}while(0);if(a.v=z)try{var M=w,W=M.memory,X=M.readPosition,B=M.writePosition,q=Nr(new ft(W.view.buffer,W.view.byteOffset+X|0,B-X|0),r,o-a.v|0);i.append_gw00v9$(q.charactersDecoded),a.v=a.v+q.charactersDecoded.length|0;var H=q.bytesConsumed;M.discardExact_za3lpa$(H),H>0?D.v=1:8===D.v?D.v=0:D.v=D.v+1|0,z=D.v}finally{var V=w;G=V.writePosition-V.readPosition|0}else G=F;if(x=!1,0===G)P=lo(n,w);else{var K=G0)}finally{x&&co(n,w)}}while(0)}return a.v}function ur(t,n,i){if(0===i)return"";if((n.headEndExclusive-n.headPosition|0)>=i){var o,r,a=qr(lr(t)._name_8be2vx$,!0),s=n.head,c=n.headMemory.view;try{var l=0===s.readPosition&&i===c.byteLength?c:new DataView(c.buffer,c.byteOffset+s.readPosition|0,i);o=a.decode_c2mund$(l)}catch(t){throw e.isType(t,A)?new Tr("Failed to decode bytes: "+(null!=(r=t.message)?r:"no cause provided")):t}var p=o;return n.discardExact_za3lpa$(i),p}return function(t,n,i){var o,r=qr(Zo(lr(t)),!0),a={v:i},s=X(i);try{t:do{var c,l,p=!0;if(null==(c=so(n,6)))break t;var u=c,d=6;try{do{var h,E=u,_=E.writePosition-E.readPosition|0;if(_>=d)try{var m,f=u,y=f.writePosition-f.readPosition|0,T=a.v,$=I.min(y,T);if(0===f.readPosition&&f.memory.view.byteLength===$){var N,g,R=f.memory.view;try{N=r.decode_g2l45e$(R,Vr(!0))}catch(t){throw e.isType(t,A)?new Tr("Failed to decode bytes: "+(null!=(g=t.message)?g:"no cause provided")):t}m=N}else{var C,S,L=new Int8Array(f.memory.view.buffer,f.memory.view.byteOffset+f.readPosition|0,$);try{C=r.decode_g2l45e$(L,Vr(!0))}catch(t){throw e.isType(t,A)?new Tr("Failed to decode bytes: "+(null!=(S=t.message)?S:"no cause provided")):t}m=C}var b=m;s.append_pdl1vj$(b),f.discardExact_za3lpa$($),a.v=a.v-$|0,d=a.v>0?6:0}finally{var v=u;h=v.writePosition-v.readPosition|0}else h=_;if(p=!1,0===h)l=lo(n,u);else{var O=h0)}finally{p&&co(n,u)}}while(0);if(a.v>0)t:do{var D,k,P=!0;if(null==(D=so(n,1)))break t;var x=D;try{for(;;){var w,z=x,G=z.writePosition-z.readPosition|0,j=a.v,F=I.min(G,j);if(0===z.readPosition&&z.memory.view.byteLength===F)w=r.decode_c2mund$(z.memory.view);else{var M,W,B=new Int8Array(z.memory.view.buffer,z.memory.view.byteOffset+z.readPosition|0,F);try{M=r.decode_g2l45e$(B,Vr(!0))}catch(t){throw e.isType(t,A)?new Tr("Failed to decode bytes: "+(null!=(W=t.message)?W:"no cause provided")):t}w=M}var q=w;if(s.append_pdl1vj$(q),z.discardExact_za3lpa$(F),a.v=a.v-F|0,P=!1,null==(k=lo(n,x)))break;x=k,P=!0}}finally{P&&co(n,x)}}while(0);s.append_pdl1vj$(r.decode())}catch(t){throw e.isType(t,A)?new Tr("Failed to decode bytes: "+(null!=(o=t.message)?o:"no cause provided")):t}if(a.v>0)throw new Br("Not enough bytes available: had only "+(i-a.v|0)+" instead of "+i);return s.toString()}(t,n,i)}function dr(){mr=this,this.UTF_8=new yr("UTF-8"),this.ISO_8859_1=new yr("ISO-8859-1")}Ko.$metadata$={kind:d,simpleName:"Charset",interfaces:[]},tr.$metadata$={kind:d,simpleName:"CharsetEncoder",interfaces:[]},er.$metadata$={kind:d,simpleName:"CharsetEncoderImpl",interfaces:[tr]},er.prototype.component1_0=function(){return this.charset_0},er.prototype.copy_6ypavq$=function(t){return new er(void 0===t?this.charset_0:t)},er.prototype.toString=function(){return"CharsetEncoderImpl(charset="+e.toString(this.charset_0)+")"},er.prototype.hashCode=function(){var t=0;return t=31*t+e.hashCode(this.charset_0)|0},er.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.charset_0,t.charset_0)},sr.$metadata$={kind:d,simpleName:"CharsetDecoder",interfaces:[]},cr.$metadata$={kind:d,simpleName:"CharsetDecoderImpl",interfaces:[sr]},cr.prototype.component1_0=function(){return this.charset_0},cr.prototype.copy_6ypavq$=function(t){return new cr(void 0===t?this.charset_0:t)},cr.prototype.toString=function(){return"CharsetDecoderImpl(charset="+e.toString(this.charset_0)+")"},cr.prototype.hashCode=function(){var t=0;return t=31*t+e.hashCode(this.charset_0)|0},cr.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.charset_0,t.charset_0)},dr.$metadata$={kind:B,simpleName:"Charsets",interfaces:[]};var hr,Er,_r,mr=null;function fr(){return null===mr&&new dr,mr}function yr(t){Ko.call(this,t),this.name=t}function Tr(t){A.call(this),this.message_dl21pz$_0=t,this.cause_5de4tn$_0=null,e.captureStack(A,this),this.name="MalformedInputException"}function $r(t,e){this.charactersDecoded=t,this.bytesConsumed=e}function Nr(t,n,i){if(0===i)return new $r("",0);try{var o=j(i,t.byteLength),r=n.decode_c2mund$(t.subarray(0,o));if(r.length<=i)return new $r(r,o)}catch(t){}return function(t,n,i){for(var o,r=j(i>=268435455?2147483647:8*i|0,t.byteLength);r>8;){try{var a=n.decode_c2mund$(t.subarray(0,r));if(a.length<=i)return new $r(a,r)}catch(t){}r=r/2|0}for(r=8;r>0;){try{var s=n.decode_c2mund$(t.subarray(0,r));if(s.length<=i)return new $r(s,r)}catch(t){}r=r-1|0}try{n.decode_c2mund$(t)}catch(t){throw e.isType(t,A)?new Tr("Failed to decode bytes: "+(null!=(o=t.message)?o:"no cause provided")):t}throw new Tr("Unable to decode buffer")}(t,n,i)}function gr(t,e,n,i){if(e>=n)return 0;for(var o,r=i.writePosition,a=i.memory.slice_vux9f0$(r,i.limit-r|0).view,s=new Int8Array(a.buffer,a.byteOffset,a.byteLength),c=0,l=e;l255&&Rr(p),s[(o=c,c=o+1|0,o)]=f(p)}var u=c;return i.commitWritten_za3lpa$(u),n-e|0}function Rr(t){throw new Tr("The character with unicode point "+t+" couldn't be mapped to ISO-8859-1 character")}function Cr(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.byteLength-n|0);var o=t.memory,r=t.readPosition;if((t.writePosition-r|0)t.readPosition))return-1;var o=t.writePosition-t.readPosition|0,r=I.min(i,o);return Cr(t,e,n,r),r}function Ir(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.byteLength-n|0);var o=t.memory,r=t.writePosition;if((t.limit-r|0)0&&(o.v=o.v+l|0),!(o.v=0))throw new at("offset ("+t+") shouldn't be negative");if(!(e>=0))throw new at("length ("+e+") shouldn't be negative");if(!((t+e|0)<=n.length))throw new at("offset ("+t+") + length ("+e+") > bytes.size ("+n.length+")");throw $t()}function Mr(t,e,n){var i,o=t.length;if(!((n+o|0)<=e.length))throw L("Failed requirement.".toString());for(var r=n,a=0;a255&&o.writeByte_s8j3t7$(f(p>>8)),o.writeByte_s8j3t7$(f(255&p))}n=o.build()}catch(t){throw e.isType(t,A)?(o.release(),t):t}return gt(bi(n))},Qr.prototype.decode_g2l45e$=function(t,e){return this.decode_c2mund$(t)},Qr.$metadata$={kind:d,simpleName:"TextDecoderFallback",interfaces:[Hr]},Object.defineProperty(Zr.prototype,"capacity",{get:function(){return this.capacity_7nvyry$_0}}),Zr.prototype.disposeInstance_trkh7z$=function(t){},Zr.prototype.clearInstance_trkh7z$=function(t){return t},Zr.prototype.validateInstance_trkh7z$=function(t){},Zr.prototype.borrow=function(){var t;if(0===this.size_p9jgx3$_0)return this.produceInstance();var n=(this.size_p9jgx3$_0=this.size_p9jgx3$_0-1|0,this.size_p9jgx3$_0),i=e.isType(t=this.instances_j5hzgy$_0[n],C)?t:m();return this.instances_j5hzgy$_0[n]=null,this.clearInstance_trkh7z$(i)},Zr.prototype.recycle_trkh7z$=function(t){var e;this.validateInstance_trkh7z$(t),this.size_p9jgx3$_0===this.capacity?this.disposeInstance_trkh7z$(t):this.instances_j5hzgy$_0[(e=this.size_p9jgx3$_0,this.size_p9jgx3$_0=e+1|0,e)]=t},Zr.prototype.dispose=function(){var t,n;t=this.size_p9jgx3$_0;for(var i=0;i>>8)},ra.reverseByteOrder_s8ev3n$=function(t){var e=U(65535&t),n=U((255&e)<<8|(65535&e)>>>8)<<16,i=U(t>>>16);return n|65535&U((255&i)<<8|(65535&i)>>>8)},ra.reverseByteOrder_mts6qi$=function(t){var n=t.and(V).toInt(),i=U(65535&n),o=U((255&i)<<8|(65535&i)>>>8)<<16,r=U(n>>>16),a=e.Long.fromInt(o|65535&U((255&r)<<8|(65535&r)>>>8)).shiftLeft(32),s=t.shiftRightUnsigned(32).toInt(),c=U(65535&s),l=U((255&c)<<8|(65535&c)>>>8)<<16,p=U(s>>>16);return a.or(e.Long.fromInt(l|65535&U((255&p)<<8|(65535&p)>>>8)).and(V))},ra.reverseByteOrder_81szk$=function(t){var n=it(t),i=U(65535&n),o=U((255&i)<<8|(65535&i)>>>8)<<16,r=U(n>>>16),a=o|65535&U((255&r)<<8|(65535&r)>>>8);return e.floatFromBits(a)},ra.reverseByteOrder_yrwdxr$=function(t){var n=ot(t),i=n.and(V).toInt(),o=U(65535&i),r=U((255&o)<<8|(65535&o)>>>8)<<16,a=U(i>>>16),s=e.Long.fromInt(r|65535&U((255&a)<<8|(65535&a)>>>8)).shiftLeft(32),c=n.shiftRightUnsigned(32).toInt(),l=U(65535&c),p=U((255&l)<<8|(65535&l)>>>8)<<16,u=U(c>>>16),d=s.or(e.Long.fromInt(p|65535&U((255&u)<<8|(65535&u)>>>8)).and(V));return e.doubleFromBits(d)},oa.ByteOrder=Lr,ia.CloseElement=Ae,ia.ReaderJob=ke,ia.WriterJob=Pe,ia.ReaderScope=xe,ia.WriterScope=we,ia.writer_x9a1ni$=function(t,e,n,i){return void 0===e&&(e=x.EmptyCoroutineContext),void 0===n&&(n=!1),function(t,e,n,i,o){var r,a,s,c,l,p=t.coroutineContext.get_j3r2sn$(z.Key),u=G(t,e,void 0,(r=i,a=n,s=o,c=p,function(t,e,n){var i=new ze(r,a,s,c,t,this,e);return n?i:i.doResume(null)}));return u.invokeOnCompletion_f05bi3$((l=n,function(t){return l.close_dbl4no$(t),h})),new je(u,n)}(t,e,go(n),!0,i)},ia.unwrapCancellationException_fg6mcf$=Fe,ia.requestBuffer_78elpf$=function(t,e,n,i){var o=new Xe(t,e,n);return i?o:o.doResume(null)},oa.Buffer=dn,ia.completeReadingFromBuffer_6msh3s$=function(t,e,n,i,o){var r=new Be(t,e,n,i);return o?r:r.doResume(null)},ia.ReadSession=Me,ia.SuspendableReadSession=We,ia.HasReadSession=Ke,ia.requestWriteBuffer_9tm6dw$=function(t,e,n,i){var o=new Ze(t,e,n);return i?o:o.doResume(null)},ia.completeWriting_oczduq$=function(t,n,i,o){var r,a;if(!e.isType(t,Qe))return a=new tn(t,n,o),r?a:a.doResume(null);t.endWriteSession_za3lpa$(i)},ia.WriterSession=Je,ia.WriterSuspendSession=Ye,ia.HasWriteSession=Qe,ra.Allocator=nn,ra.copyTo_tiw1kd$=Bo;var aa=ia.charsets||(ia.charsets={});aa.encode_6xuvjk$=function(t,e,n,i,o){un(t,o,e,n,i)},aa.encodeToByteArrayImpl_fj4osb$=function(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.length),ir(t,e,n,i)},aa.encode_fj4osb$=function(t,n,i,o){var r;void 0===i&&(i=0),void 0===o&&(o=n.length);var a=new Hn;try{un(t,a,n,i,o),r=a.build()}catch(t){throw e.isType(t,A)?(a.release(),t):t}return r},aa.encodeUTF8_45773h$=function(t,n){var i,o=new Hn;try{rr(t,n,o),i=o.build()}catch(t){throw e.isType(t,A)?(o.release(),t):t}return i},aa.encode_ufq2gc$=on,aa.decode_lb8wo3$=rn,aa.TooLongLineException=an,aa.encodeArrayImpl_bptnt4$=sn,aa.encodeToByteArrayImpl1_5lnu54$=cn,aa.sizeEstimate_i9ek5c$=ln,aa.encodeToImpl_nctdml$=un,Object.defineProperty(dn,"Companion",{get:mn}),oa.discardFailed_6xvm5r$=fn,oa.commitWrittenFailed_6xvm5r$=yn,oa.rewindFailed_6xvm5r$=Tn,oa.startGapReservationFailedDueToLimit_g087h2$=$n,oa.startGapReservationFailed_g087h2$=Nn,oa.endGapReservationFailedDueToCapacity_g087h2$=gn,oa.endGapReservationFailedDueToStartGap_g087h2$=Rn,oa.endGapReservationFailedDueToContent_g087h2$=Cn,oa.restoreStartGap_g087h2$=Sn,oa.InsufficientSpaceException_init_3m52m6$=Ln,oa.InsufficientSpaceException=In,oa.writeBufferAppend_eajdjw$=bn,oa.writeBufferPrepend_tfs7w2$=vn,oa.DefaultBufferPool=On,oa.readShort_abnlgx$=Un,oa.readInt_abnlgx$=Dn,oa.readLong_abnlgx$=An,oa.readFloat_abnlgx$=kn,oa.readDouble_abnlgx$=Pn,oa.writeShort_cx5lgg$=xn,oa.writeInt_cni1rh$=wn,oa.writeLong_xy6qu0$=zn,oa.readFully_7ntqvp$=Gn,oa.writeFully_7ntqvp$=jn,oa.readFully_i3yunz$=Fn,oa.writeFully_i3yunz$=Mn,oa.releaseAll_dgux4l$=Wn,oa.copyAll_kx8gx4$=Xn,oa.findTail_kx8gx4$=Bn,oa.remainingAll_kx8gx4$=qn,oa.BytePacketBuilder=Hn,Object.defineProperty(Vn,"Companion",{get:Yn}),oa.ByteReadPacket_init_mfe2hi$=Qn,oa.ByteReadPacket=Vn,oa.addSuppressedInternal_oh0dqn$=function(t,e){},Object.defineProperty(Zn,"Companion",{get:ii}),oa.Input=Zn;var sa=oa.internal||(oa.internal={});sa.prepareReadFirstHead_j319xh$=so,sa.prepareReadNextHead_x2nit9$=lo,sa.completeReadHead_x2nit9$=co,oa.readFully_ja303r$=oi,oa.readFully_n4diq5$=ri,oa.readAvailable_czhrh1$=function(t,n,i,o){var r={v:o},a={v:i};t:do{var s,c,l=!0;if(null==(s=so(t,1)))break t;var p=s;try{for(;;){var u=p,d=r.v,h=e.Long.fromInt(u.writePosition-u.readPosition|0),m=(d.compareTo_11rb$(h)<=0?d:h).toInt(),f=u.memory,y=e.Long.fromInt(u.readPosition),T=a.v;if(f.copyTo_q2ka7j$(n,y,e.Long.fromInt(m),T),u.discardExact_za3lpa$(m),r.v=r.v.subtract(e.Long.fromInt(m)),a.v=a.v.add(e.Long.fromInt(m)),!(r.v.toNumber()>0))break;if(l=!1,null==(c=lo(t,p)))break;p=c,l=!0}}finally{l&&co(t,p)}}while(0);var $=r.v,N=o.subtract($);return _(N,E)&&t.endOfInput?nt:N},oa.readShort_7wsnj1$=ai,oa.readInt_7wsnj1$=ci,oa.readLong_7wsnj1$=pi,oa.readFloat_7wsnj1$=di,oa.readFloatFallback_7wsnj1$=hi,oa.readDouble_7wsnj1$=Ei,oa.readDoubleFallback_7wsnj1$=_i,oa.Output=mi,oa.writeFully_i6snlg$=fi,oa.writeFully_apj91c$=yi,oa.writeFully_35rta0$=Ti,oa.writeFully_bch96q$=$i,sa.prepareWriteHead_uoax3m$=po,oa.writeShort_9kfkzl$=Ni,oa.writeInt_qu9kum$=gi,oa.writeLong_kb5mzd$=Ci,oa.writeFloat_9rid5t$=Ii,oa.writeDouble_jgp4k2$=Li,oa.prematureEndOfStream_za3lpa$=Ai,aa.encodeToByteArray_fj4osb$=ir,oa.readBytes_xc9h3n$=bi,oa.readTextExactBytes_yqne27$=vi,oa.writeText_t153jy$=Oi,oa.writeText_t7k8z4$=Ui,sa.CharArraySequence=ki,Object.defineProperty(Pi,"Companion",{get:Wi}),sa.ChunkBuffer=Pi,sa.isExclusivelyOwned_kx8gx4$=Xi,sa.EncodeResult_init_2ahd1g$=qi,sa.EncodeResult=Bi,sa.failLongToIntConversion_a4hdmt$=Hi,sa.decodeUTF8LineLoopSuspend_dsomrf$=Ki,sa.malformedByteCount_za3lpa$=Qi,sa.isBmpCodePoint_za3lpa$=to,sa.isValidCodePoint_za3lpa$=eo,sa.malformedCodePoint_za3lpa$=Zi,sa.highSurrogate_za3lpa$=io,sa.lowSurrogate_za3lpa$=no,sa.encodeUTF8_yjoz4m$=Yi,sa.codePoint_fdkhi5$=oo,sa.MalformedUTF8InputException=ro,sa.unsafeAppend_z83jwh$=ao;var ca=ia.internal||(ia.internal={});ca.AwaitingSlot=uo,ca.copyToSequentialImpl_6ii227$=mo;var la=ia.pool||(ia.pool={});la.ObjectPool=To,la.NoPoolImpl=$o,la.SingleInstancePool=No,ia.ByteChannel_6taknv$=go,ia.ByteReadChannel_mj6st8$=Ro,ia.copyTo_47ygvz$=Co,ia.ByteChannelJS=So,Object.defineProperty(vo,"Companion",{get:Ao}),ia.ByteReadChannel=vo,ia.ByteWriteChannel=ko,ra.Memory=Fo,ra.of_2z595v$=Po,ra.of_3qjk6t$=xo,ra.of_d2rc7k$=wo,Object.defineProperty(ra,"DefaultAllocator",{get:jo}),Object.defineProperty(Fo,"Companion",{get:Xo}),ra.copyTo_1uvjz5$=qo,ra.copyTo_3wm8wl$=Ho,ra.copyTo_vnj7g0$=Vo,Object.defineProperty(Ko,"Companion",{get:Qo}),aa.Charset=Ko,aa.get_name_2sg7fd$=Zo,aa.CharsetEncoder=tr,aa.get_charset_x4isqx$=nr,aa.encodeImpl_edsj0y$=or,aa.encodeUTF8_sbvn4u$=rr,aa.encodeComplete_5txte2$=ar,aa.CharsetDecoder=sr,aa.get_charset_e9jvmp$=lr,aa.decodeBuffer_eccjnr$=function(t,e,n,i,o){if(void 0===o&&(o=2147483647),0===o)return 0;var r=qr(Zo(lr(t))),a={v:null},s=e.memory,c=e.readPosition,l=e.writePosition,p=Nr(new ft(s.view.buffer,s.view.byteOffset+c|0,l-c|0),r,o);n.append_gw00v9$(p.charactersDecoded),a.v=p.bytesConsumed;var u=p.bytesConsumed;return e.discardExact_za3lpa$(u),a.v},aa.decode_eyhcpn$=pr,aa.decodeExactBytes_lb8wo3$=ur,Object.defineProperty(aa,"Charsets",{get:fr}),aa.MalformedInputException=Tr,Object.defineProperty(aa,"MAX_CHARACTERS_SIZE_IN_BYTES_8be2vx$",{get:function(){return hr}}),aa.DecodeBufferResult=$r,aa.decodeBufferImpl_g8dwr5$=Nr,aa.encodeISO88591_4e1bz1$=gr,oa.readFully_xbe0h9$=Cr,oa.readAvailable_xbe0h9$=Sr,oa.writeFully_agdgmg$=Ir,Object.defineProperty(Lr,"BIG_ENDIAN",{get:vr}),Object.defineProperty(Lr,"LITTLE_ENDIAN",{get:Or}),Object.defineProperty(Lr,"Companion",{get:wr}),oa.Closeable=zr,oa.readFully_7dohgh$=Gr,oa.readAvailable_7dohgh$=jr,oa.String_xge8xe$=function(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===i&&(i=fr().UTF_8),(e<0||n<0||(e+n|0)>t.length)&&Fr(e,n,t);var o=t,r=o.byteOffset+e|0,a=o.buffer.slice(r,r+n|0),s=new Pi(xo(Xo(),a),null,Wi().NoPool_8be2vx$);s.resetForRead();var c=Qn(s,Wi().NoPoolManuallyManaged_8be2vx$);return rn(i.newDecoder(),c,2147483647)},oa.checkIndices_khgzz8$=Fr,oa.getCharsInternal_8t7fl6$=Mr;var pa=ia.errors||(ia.errors={});pa.IOException_init_61zpoe$=Xr,pa.IOException=Wr,pa.EOFException=Br;var ua=ia.js||(ia.js={});return ua.Decoder_t8jjq2$=qr,ua.Decoder=Hr,ua.decodeOptions_vft4zs$=Vr,ua.toKtor_y2kull$=Jr,ua.textDecoderOptions_vft4zs$=Yr,ua.TextDecoderFallback=Qr,la.DefaultPool=Zr,Ct.prototype.readRemaining_s8cxhz$=vo.prototype.readRemaining_s8cxhz$,Ct.prototype.peekTo_afjyek$=vo.prototype.peekTo_afjyek$,We.prototype.request_za3lpa$=Me.prototype.request_za3lpa$,St.prototype.readRemaining_s8cxhz$=Ct.prototype.readRemaining_s8cxhz$,St.prototype.await_za3lpa$=We.prototype.await_za3lpa$,St.prototype.request_za3lpa$=We.prototype.request_za3lpa$,St.prototype.peekTo_afjyek$=Ct.prototype.peekTo_afjyek$,ke.prototype.cancel=k.prototype.cancel,ke.prototype.fold_3cc69b$=k.prototype.fold_3cc69b$,ke.prototype.get_j3r2sn$=k.prototype.get_j3r2sn$,ke.prototype.minusKey_yeqjby$=k.prototype.minusKey_yeqjby$,ke.prototype.plus_dqr1mp$=k.prototype.plus_dqr1mp$,ke.prototype.plus_1fupul$=k.prototype.plus_1fupul$,ke.prototype.cancel_dbl4no$=k.prototype.cancel_dbl4no$,ke.prototype.cancel_x5z25k$=k.prototype.cancel_x5z25k$,ke.prototype.invokeOnCompletion_ct2b2z$=k.prototype.invokeOnCompletion_ct2b2z$,Pe.prototype.cancel=k.prototype.cancel,Pe.prototype.fold_3cc69b$=k.prototype.fold_3cc69b$,Pe.prototype.get_j3r2sn$=k.prototype.get_j3r2sn$,Pe.prototype.minusKey_yeqjby$=k.prototype.minusKey_yeqjby$,Pe.prototype.plus_dqr1mp$=k.prototype.plus_dqr1mp$,Pe.prototype.plus_1fupul$=k.prototype.plus_1fupul$,Pe.prototype.cancel_dbl4no$=k.prototype.cancel_dbl4no$,Pe.prototype.cancel_x5z25k$=k.prototype.cancel_x5z25k$,Pe.prototype.invokeOnCompletion_ct2b2z$=k.prototype.invokeOnCompletion_ct2b2z$,je.prototype.cancel_dbl4no$=ke.prototype.cancel_dbl4no$,je.prototype.cancel_x5z25k$=ke.prototype.cancel_x5z25k$,je.prototype.invokeOnCompletion_ct2b2z$=ke.prototype.invokeOnCompletion_ct2b2z$,Zr.prototype.close=To.prototype.close,wi.prototype.close=To.prototype.close,zi.prototype.close=To.prototype.close,$o.prototype.close=To.prototype.close,No.prototype.close=To.prototype.close,o=c,r=new Ae(null),En=new On,Fi=new Int8Array(0),new yo(128),wr().nativeOrder(),Or(),hr=8,Dr=200,Ar=Nt(["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"]),kr=new Int8Array([f(239),f(191),f(189)]),Pr=new Int32Array([8364,-1,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,-1,381,-1,-1,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,-1,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]),t})?i.apply(e,o):i)||(t.exports=r)},function(module,exports,__webpack_require__){(function(process){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,factory;factory=function(_,Kotlin,$module$ktor_ktor_io_js_legacy,$module$kotlinx_coroutines_core,$module$kotlinx_atomicfu){"use strict";var $$importsForInline$$=_.$$importsForInline$$||(_.$$importsForInline$$={}),Kind_CLASS=Kotlin.Kind.CLASS,Annotation=Kotlin.kotlin.Annotation,throwCCE=Kotlin.throwCCE,equals=Kotlin.equals,hashCode=Kotlin.hashCode,IllegalStateException_init=Kotlin.kotlin.IllegalStateException_init_pdl1vj$,Kind_INTERFACE=Kotlin.Kind.INTERFACE,toChar=Kotlin.toChar,indexOf=Kotlin.kotlin.text.indexOf_8eortd$,writeText=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.writeText_t153jy$,concatToString=Kotlin.kotlin.text.concatToString_wlitf7$,readBytes=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.readBytes_xc9h3n$,charsets=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.charsets,String_0=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.String_xge8xe$,unboxChar=Kotlin.unboxChar,toByte=Kotlin.toByte,defineInlineFunction=Kotlin.defineInlineFunction,wrapFunction=Kotlin.wrapFunction,BytePacketBuilder_init=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.BytePacketBuilder,Throwable=Error,get_lastIndex=Kotlin.kotlin.text.get_lastIndex_gw00vp$,toBoxedChar=Kotlin.toBoxedChar,L4096=Kotlin.Long.fromInt(4096),ByteChannel=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.ByteChannel_6taknv$,Unit=Kotlin.kotlin.Unit,COROUTINE_SUSPENDED=Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,CoroutineImpl=Kotlin.kotlin.coroutines.CoroutineImpl,listOf=Kotlin.kotlin.collections.listOf_i5x0yv$,close=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.close_x5qia6$,launch=$module$kotlinx_coroutines_core.kotlinx.coroutines.launch_s496o7$,to=Kotlin.kotlin.to_ujzrz7$,coroutines=$module$kotlinx_coroutines_core.kotlinx.coroutines,ByteChannel_0=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.ByteChannel,addSuppressedInternal=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.addSuppressedInternal_oh0dqn$,toShort=Kotlin.toShort,MutableMap=Kotlin.kotlin.collections.MutableMap,ensureNotNull=Kotlin.ensureNotNull,Map$Entry=Kotlin.kotlin.collections.Map.Entry,MutableMap$MutableEntry=Kotlin.kotlin.collections.MutableMap.MutableEntry,LinkedHashMap_init=Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$,MutableSet=Kotlin.kotlin.collections.MutableSet,addAll=Kotlin.kotlin.collections.addAll_ipc267$,Map=Kotlin.kotlin.collections.Map,charArray=Kotlin.charArray,toString=Kotlin.toString,SupervisorJob=$module$kotlinx_coroutines_core.kotlinx.coroutines.SupervisorJob_5dx9e$,AbstractCoroutineContextElement=Kotlin.kotlin.coroutines.AbstractCoroutineContextElement,CoroutineExceptionHandler=$module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineExceptionHandler,concatToString_0=Kotlin.kotlin.text.concatToString_355ntz$,encodeToByteArray=Kotlin.kotlin.text.encodeToByteArray_pdl1vz$,encodeToByteArray_0=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$,MutableIterator=Kotlin.kotlin.collections.MutableIterator,Set=Kotlin.kotlin.collections.Set,collectionSizeOrDefault=Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$,ArrayList_init=Kotlin.kotlin.collections.ArrayList_init_ww73n8$,Kind_OBJECT=Kotlin.Kind.OBJECT,toList=Kotlin.kotlin.collections.toList_us0mfu$,fill=Kotlin.kotlin.collections.fill_6mk3ue$,L0=Kotlin.Long.ZERO,fill_0=Kotlin.kotlin.collections.fill_tpuxuu$,arrayCopy=Kotlin.kotlin.collections.arrayCopy,UnsupportedOperationException_init=Kotlin.kotlin.UnsupportedOperationException_init_pdl1vj$,firstOrNull=Kotlin.kotlin.collections.firstOrNull_2p1efm$,equals_0=Kotlin.kotlin.text.equals_igcy3c$,setOf=Kotlin.kotlin.collections.setOf_mh5how$,emptyMap=Kotlin.kotlin.collections.emptyMap_q3lmfv$,toSet=Kotlin.kotlin.collections.toSet_7wnvza$,emptySet=Kotlin.kotlin.collections.emptySet_287e2$,LinkedHashMap_init_0=Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$,asList=Kotlin.kotlin.collections.asList_us0mfu$,toMap=Kotlin.kotlin.collections.toMap_6hr0sd$,listOf_0=Kotlin.kotlin.collections.listOf_mh5how$,single=Kotlin.kotlin.collections.single_7wnvza$,toList_0=Kotlin.kotlin.collections.toList_7wnvza$,ArrayList_init_0=Kotlin.kotlin.collections.ArrayList_init_287e2$,CharRange=Kotlin.kotlin.ranges.CharRange,StringBuilder_init=Kotlin.kotlin.text.StringBuilder_init_za3lpa$,get_indices=Kotlin.kotlin.text.get_indices_gw00vp$,IOException=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.errors.IOException,mutableListOf=Kotlin.kotlin.collections.mutableListOf_i5x0yv$,Collection=Kotlin.kotlin.collections.Collection,LinkedHashSet_init=Kotlin.kotlin.collections.LinkedHashSet_init_287e2$,HashMap_init=Kotlin.kotlin.collections.HashMap_init_73mtqc$,atomic=$module$kotlinx_atomicfu.kotlinx.atomicfu.atomic$ref$1,emptyList=Kotlin.kotlin.collections.emptyList_287e2$,Iterable=Kotlin.kotlin.collections.Iterable,PrimitiveClasses$intClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.intClass,PrimitiveClasses$floatClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.floatClass,PrimitiveClasses$doubleClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.doubleClass,getKClass=Kotlin.getKClass,Long=Kotlin.Long,PrimitiveClasses$shortClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.shortClass,Char=Kotlin.BoxedChar,PrimitiveClasses$booleanClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.booleanClass,PrimitiveClasses$stringClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.stringClass,List=Kotlin.kotlin.collections.List,MutableList=Kotlin.kotlin.collections.MutableList,single_0=Kotlin.kotlin.collections.single_2p1efm$,KClass=Kotlin.kotlin.reflect.KClass,toInt_0=Kotlin.kotlin.text.toInt_pdl1vz$,toDouble=Kotlin.kotlin.text.toDouble_pdl1vz$,toLong=Kotlin.kotlin.text.toLong_pdl1vz$,Exception_init=Kotlin.kotlin.Exception_init_pdl1vj$,Exception=Kotlin.kotlin.Exception,Enum=Kotlin.kotlin.Enum,throwISE=Kotlin.throwISE,Comparable=Kotlin.kotlin.Comparable,throwUPAE=Kotlin.throwUPAE,IllegalStateException=Kotlin.kotlin.IllegalStateException,iterator=Kotlin.kotlin.text.iterator_gw00vp$,withContext=$module$kotlinx_coroutines_core.kotlinx.coroutines.withContext_i5cbzn$,CoroutineContext$Key=Kotlin.kotlin.coroutines.CoroutineContext.Key,joinToString=Kotlin.kotlin.collections.joinToString_fmv235$,Any=Object,UnsupportedOperationException_init_0=Kotlin.kotlin.UnsupportedOperationException_init,SuspendFunction2=Function,ArrayList=Kotlin.kotlin.collections.ArrayList,get_lastIndex_0=Kotlin.kotlin.collections.get_lastIndex_55thoc$,toMutableList=Kotlin.kotlin.collections.toMutableList_4c7yge$,last=Kotlin.kotlin.collections.last_2p1efm$,CoroutineScope=$module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineScope,recoverStackTrace=$module$kotlinx_coroutines_core.kotlinx.coroutines.internal.recoverStackTrace_ak2v6d$,coroutines_0=Kotlin.kotlin.coroutines,Continuation=Kotlin.kotlin.coroutines.Continuation,Result=Kotlin.kotlin.Result,createFailure=Kotlin.kotlin.createFailure_tcv7n7$,lazy=Kotlin.kotlin.lazy_klfg04$,isNaN_0=Kotlin.kotlin.isNaN_yrwdxr$,IllegalArgumentException_init=Kotlin.kotlin.IllegalArgumentException_init,IllegalArgumentException=Kotlin.kotlin.IllegalArgumentException,BASE64_ALPHABET,BASE64_MASK,BASE64_MASK_INT,BASE64_PAD,BASE64_INVERSE_ALPHABET,CHUNK_BUFFER_SIZE,digits,NONCE_SIZE_IN_BYTES;function AttributeKey(t){if(this.name=t,0===this.name.length)throw IllegalStateException_init("Name can't be blank")}function Attributes(){}function putAll(t,e){var n;for(n=e.allKeys.iterator();n.hasNext();){var i,o=n.next();t.put_uuntuo$(Kotlin.isType(i=o,AttributeKey)?i:throwCCE(),e.get_yzaw86$(o))}}function encodeBase64_0(t){for(var e,n,i=t,o=0,r={v:0},a=Kotlin.charArray(3+((8*t.length|0)/6|0)|0);(o+3|0)<=i.length;){var s=i[o],c=i[o+1|0],l=i[o+2|0];o=o+3|0;for(var p=(255&s)<<16|(255&c)<<8|255&l,u=3;u>=0;u--){var d=p>>(6*u|0)&63;a[(e=r.v,r.v=e+1|0,e)]=BASE64_ALPHABET.charCodeAt(d)}}var h=i.length-o|0;if(0===h)return concatToString(a,0,r.v);for(var E=1===h?0|(255&i[o])<<16:(255&i[o])<<16|(255&i[o+1|0])<<8|0,_=(8*(3-h|0)|0)/6|0,m=3;m>=_;m--){var f=E>>(6*m|0)&63;a[(n=r.v,r.v=n+1|0,n)]=BASE64_ALPHABET.charCodeAt(f)}for(var y=0;y<_;y++){var T;a[(T=r.v,r.v=T+1|0,T)]=BASE64_PAD}return concatToString(a,0,r.v)}function CaseInsensitiveMap(){this.delegate_0=LinkedHashMap_init()}function CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda(t){return t.content}function CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda_0(t){return caseInsensitive(t)}function CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda(t){return new Entry(t.key.content,t.value)}function CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda_0(t){return new Entry(caseInsensitive(t.key),t.value)}function Entry(t,e){this.key_3iz5qv$_0=t,this.value_p1xw47$_0=e}function isLowerCase(t){return String.fromCharCode(t).toLowerCase().charCodeAt(0)===t}function toCharArray(t){var e,n=charArray(t.length,null);e=n.length-1|0;for(var i=0;i<=e;i++){var o=unboxChar(toBoxedChar(t.charCodeAt(i)));n[i]=o}return n}function caseInsensitiveMap(){return new CaseInsensitiveMap}function hex(t){for(var e,n,i=Kotlin.charArray(2*t.length|0),o=0,r=digits,a=0;a>4],i[(n=o,o=n+1|0,n)]=r[15&s]}return concatToString_0(i)}function generateNonce(t){var e,n=new BytePacketBuilder_init;try{for(;n.size>>32-e}function Sha1(){this.messageLength_0=L0,this.unprocessed_0=new Int8Array(64),this.unprocessedLimit_0=0,this.words_0=new Int32Array(80),this.h0_0=1732584193,this.h1_0=-271733879,this.h2_0=-1732584194,this.h3_0=271733878,this.h4_0=-1009589776}HashFunction.prototype.update_mj6st8$=function(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=t.length),i?i(t,e,n):this.update_mj6st8$$default(t,e,n)},HashFunction.$metadata$={kind:Kind_INTERFACE,simpleName:"HashFunction",interfaces:[]},Sha1.prototype.update_mj6st8$$default=function(t,e,n){this.messageLength_0=this.messageLength_0.add(Kotlin.Long.fromInt(n));var i=e,o=i+n|0,r=this.unprocessed_0,a=this.unprocessedLimit_0;if(a>0){if((a+n|0)<64)return arrayCopy(t,r,a,i,o),void(this.unprocessedLimit_0=a+n|0);var s=64-a|0;arrayCopy(t,r,a,i,i+s|0),this.processChunk_0(r,0),this.unprocessedLimit_0=0,i=i+s|0}for(;io)return arrayCopy(t,r,0,i,o),void(this.unprocessedLimit_0=o-i|0);this.processChunk_0(t,i),i=c}},Sha1.prototype.processChunk_0=function(t,e){for(var n,i,o,r,a,s=this.words_0,c=e,l=0;l<16;l++)s[l]=(255&t[(n=c,c=n+1|0,n)])<<24|(255&t[(i=c,c=i+1|0,i)])<<16|(255&t[(o=c,c=o+1|0,o)])<<8|255&t[(r=c,c=r+1|0,r)];for(var p=16;p<80;p++)s[p]=leftRotate(s[p-3|0]^s[p-8|0]^s[p-14|0]^s[p-16|0],1);for(var u=this.h0_0,d=this.h1_0,h=this.h2_0,E=this.h3_0,_=this.h4_0,m=0;m<80;m++){if(m<20){var f=E^d&(h^E);a=leftRotate(u,5)+f+_+1518500249+s[m]|0}else if(m<40){var y=d^h^E;a=leftRotate(u,5)+y+_+1859775393+s[m]|0}else if(m<60){var T=d&h|d&E|h&E;a=leftRotate(u,5)+T+_+-1894007588+s[m]|0}else{var $=d^h^E;a=leftRotate(u,5)+$+_+-899497514+s[m]|0}var N=a;_=E,E=h,h=leftRotate(d,30),d=u,u=N}this.h0_0=this.h0_0+u|0,this.h1_0=this.h1_0+d|0,this.h2_0=this.h2_0+h|0,this.h3_0=this.h3_0+E|0,this.h4_0=this.h4_0+_|0},Sha1.prototype.digest=function(){var t,e=this.unprocessed_0,n=this.unprocessedLimit_0,i=this.messageLength_0.multiply(Kotlin.Long.fromInt(8));e[(t=n,n=t+1|0,t)]=toByte(128),n>56?(fill(e,0,n,64),this.processChunk_0(e,0),fill(e,0,0,n)):fill(e,0,n,56),e[56]=toByte(i.shiftRightUnsigned(56).toInt()),e[57]=toByte(i.shiftRightUnsigned(48).toInt()),e[58]=toByte(i.shiftRightUnsigned(40).toInt()),e[59]=toByte(i.shiftRightUnsigned(32).toInt()),e[60]=toByte(i.shiftRightUnsigned(24).toInt()),e[61]=toByte(i.shiftRightUnsigned(16).toInt()),e[62]=toByte(i.shiftRightUnsigned(8).toInt()),e[63]=toByte(i.toInt()),this.processChunk_0(e,0);var o=this.h0_0,r=this.h1_0,a=this.h2_0,s=this.h3_0,c=this.h4_0;return this.reset_0(),new Int8Array([toByte(o>>24),toByte(o>>16),toByte(o>>8),toByte(o),toByte(r>>24),toByte(r>>16),toByte(r>>8),toByte(r),toByte(a>>24),toByte(a>>16),toByte(a>>8),toByte(a),toByte(s>>24),toByte(s>>16),toByte(s>>8),toByte(s),toByte(c>>24),toByte(c>>16),toByte(c>>8),toByte(c)])},Sha1.prototype.reset_0=function(){this.messageLength_0=L0,fill(this.unprocessed_0,0),this.unprocessedLimit_0=0,fill_0(this.words_0,0),this.h0_0=1732584193,this.h1_0=-271733879,this.h2_0=-1732584194,this.h3_0=271733878,this.h4_0=-1009589776},Sha1.$metadata$={kind:Kind_CLASS,simpleName:"Sha1",interfaces:[HashFunction]};var GenerateOnlyNonceManager_instance=null,AlwaysFailNonceManager_instance=null;function StringValues(){StringValues$Companion_getInstance()}function StringValues$Companion(){StringValues$Companion_instance=this,this.Empty=new StringValuesImpl}StringValues$Companion.prototype.build_o7hlrk$=defineInlineFunction("ktor-ktor-utils-js-legacy.io.ktor.util.StringValues.Companion.build_o7hlrk$",wrapFunction((function(){var t=_.io.ktor.util.StringValuesBuilderImpl;return function(e,n){void 0===e&&(e=!1);var i=new t(e);return n(i),i.build()}}))),StringValues$Companion.$metadata$={kind:Kind_OBJECT,simpleName:"Companion",interfaces:[]};var StringValues$Companion_instance=null,INITIAL_CAPACITY;function StringValues$Companion_getInstance(){return null===StringValues$Companion_instance&&new StringValues$Companion,StringValues$Companion_instance}function StringValuesBuilder(){}function StringValuesImpl(t,e){void 0===t&&(t=!1),void 0===e&&(e=emptyMap()),this.caseInsensitiveName_w2tiaf$_0=t,this.values=null;var n,i=this.caseInsensitiveName?caseInsensitiveMap():LinkedHashMap_init();for(n=e.entries.iterator();n.hasNext();){for(var o=n.next(),r=o.key,a=o.value,s=a.size,c=ArrayList_init(s),l=0;l0))throw IllegalStateException_init("Date parser pattern shouldn't be empty.".toString())}function GMTDateParser$Companion(){GMTDateParser$Companion_instance=this,this.SECONDS=toBoxedChar(115),this.MINUTES=toBoxedChar(109),this.HOURS=toBoxedChar(104),this.DAY_OF_MONTH=toBoxedChar(100),this.MONTH=toBoxedChar(77),this.YEAR=toBoxedChar(89),this.ZONE=toBoxedChar(122),this.ANY=toBoxedChar(42)}GMTDate.$metadata$={kind:Kind_CLASS,simpleName:"GMTDate",interfaces:[Comparable]},GMTDate.prototype.component1=function(){return this.seconds},GMTDate.prototype.component2=function(){return this.minutes},GMTDate.prototype.component3=function(){return this.hours},GMTDate.prototype.component4=function(){return this.dayOfWeek},GMTDate.prototype.component5=function(){return this.dayOfMonth},GMTDate.prototype.component6=function(){return this.dayOfYear},GMTDate.prototype.component7=function(){return this.month},GMTDate.prototype.component8=function(){return this.year},GMTDate.prototype.component9=function(){return this.timestamp},GMTDate.prototype.copy_j9f46j$=function(t,e,n,i,o,r,a,s,c){return new GMTDate(void 0===t?this.seconds:t,void 0===e?this.minutes:e,void 0===n?this.hours:n,void 0===i?this.dayOfWeek:i,void 0===o?this.dayOfMonth:o,void 0===r?this.dayOfYear:r,void 0===a?this.month:a,void 0===s?this.year:s,void 0===c?this.timestamp:c)},GMTDate.prototype.toString=function(){return"GMTDate(seconds="+Kotlin.toString(this.seconds)+", minutes="+Kotlin.toString(this.minutes)+", hours="+Kotlin.toString(this.hours)+", dayOfWeek="+Kotlin.toString(this.dayOfWeek)+", dayOfMonth="+Kotlin.toString(this.dayOfMonth)+", dayOfYear="+Kotlin.toString(this.dayOfYear)+", month="+Kotlin.toString(this.month)+", year="+Kotlin.toString(this.year)+", timestamp="+Kotlin.toString(this.timestamp)+")"},GMTDate.prototype.hashCode=function(){var t=0;return t=31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*t+Kotlin.hashCode(this.seconds)|0)+Kotlin.hashCode(this.minutes)|0)+Kotlin.hashCode(this.hours)|0)+Kotlin.hashCode(this.dayOfWeek)|0)+Kotlin.hashCode(this.dayOfMonth)|0)+Kotlin.hashCode(this.dayOfYear)|0)+Kotlin.hashCode(this.month)|0)+Kotlin.hashCode(this.year)|0)+Kotlin.hashCode(this.timestamp)|0},GMTDate.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&Kotlin.equals(this.seconds,t.seconds)&&Kotlin.equals(this.minutes,t.minutes)&&Kotlin.equals(this.hours,t.hours)&&Kotlin.equals(this.dayOfWeek,t.dayOfWeek)&&Kotlin.equals(this.dayOfMonth,t.dayOfMonth)&&Kotlin.equals(this.dayOfYear,t.dayOfYear)&&Kotlin.equals(this.month,t.month)&&Kotlin.equals(this.year,t.year)&&Kotlin.equals(this.timestamp,t.timestamp)},GMTDateParser.prototype.parse_61zpoe$=function(t){var e=new GMTDateBuilder,n=0,i=this.pattern_0.charCodeAt(n),o=0,r=1;try{for(;r1)for(var n=1;n",vn(),[])),e.annotations=t._annotations_0,p}}(e)),e.baseClass)}))}function Ne(t,e,n){var i;return null!=(i=t.findPolymorphicSerializerOrNull_ca6uye$(e,n))?i:Ci(n,t.baseClass)}function ge(t,n,i){var o;return null!=(o=t.findPolymorphicSerializerOrNull_kjsxpj$(n,i))?o:Si(e.getKClassFromExpression(i),t.baseClass)}function Re(){this.name="SerializationException"}function Ce(t,e){return e=e||Object.create(Re.prototype),m(t,e),Re.call(e),e}function Se(t,e){var n;return null!=(n=Le(t,e,!0))?n:va(Eo(e))}function Ie(t,e){return Le(t,e,!1)}function Le(t,n,i){var o,r,a,s,c,l,p=Eo(n),u=n.isMarkedNullable,d=n.arguments,h=j(G(d,10));for(l=d.iterator();l.hasNext();){var E,_=l.next(),f=h.add_11rb$,y=_.type;if(null==y)throw m(("Star projections in type arguments are not allowed, but had "+n).toString());E=y,f.call(h,E)}var T=h;if(T.isEmpty())o=Ue(p,u);else{var $=De(p,T,u);if(i){var g;o=$.isFailure?null:null==(g=$.value)||e.isType(g,F)?g:N()}else{var R;if(null!=$.exceptionOrNull())return null;o=null==(R=$.value)||e.isType(R,F)?R:N()}}if(null!=o)return o;if(T.isEmpty())s=t.getContextual_2n2k9f$(p);else{if(null==(r=be(t,T,i)))return null;var C=r;s=null!=(a=Oe(p,T,C))?a:t.getContextual_2n2k9f$(p,C)}var S,I,L=s;return S=null!=L?e.isType(I=L,fe)?I:N():null,null!=(c=S)?function(t,n){var i;return n?Ae(t):e.isType(i=t,fe)?i:N()}(c,u):null}function be(t,e,n){var i;if(n){var o,r=j(G(e,10));for(o=e.iterator();o.hasNext();){var a=o.next();r.add_11rb$(Se(t,a))}i=r}else{var s,c=j(G(e,10));for(s=e.iterator();s.hasNext();){var l,p=s.next(),u=c.add_11rb$;if(null==(l=Ie(t,p)))return null;u.call(c,l)}i=c}return i}function ve(t){var e;return null!=(e=ga(t))?e:fr(t)}function Oe(t,n,i){var o;return null!=(o=function(t,n,i){var o;return C(t,a(R))||C(t,a(S))||C(t,a(I))||C(t,a(L))?new to(i.get_za3lpa$(0)):C(t,a(b))?new no(i.get_za3lpa$(0)):C(t,a(v))||C(t,a(O))||C(t,a(U))?new eo(i.get_za3lpa$(0)):C(t,a(D))?new oo(i.get_za3lpa$(0),i.get_za3lpa$(1)):C(t,a($))||C(t,a(A))||C(t,a(k))?new io(i.get_za3lpa$(0),i.get_za3lpa$(1)):C(t,a(P))?Pe(i.get_za3lpa$(0),i.get_za3lpa$(1)):C(t,a(x))?ke(i.get_za3lpa$(0),i.get_za3lpa$(1)):C(t,a(w))?xe(i.get_za3lpa$(0),i.get_za3lpa$(1),i.get_za3lpa$(2)):Ua(t)?an(e.isType(o=n.get_za3lpa$(0).classifier,z)?o:N(),i.get_za3lpa$(0)):null}(t,n,i))?o:function(t,e){return Oa(t,M(e).slice())}(t,i)}function Ue(t,o){var r,a,s,c;o?a=i.get_suhcqa$(t):(s=null!=(r=n.get_suhcqa$(t))?e.isType(c=r,fe)?c:N():null,a=s);return a}function De(t,n,i){var a;return i?r.get_rhihk2$(t,n):e.isType(a=o.get_rhihk2$(t,n),X)?a:N()}function Ae(t){var n;return t.descriptor.isNullable?e.isType(n=t,fe)?n:N():new co(t)}function ke(t,e){return new Qr(t,e)}function Pe(t,e){return new Jr(t,e)}function xe(t,e,n){return new Zr(t,e,n)}function we(t){return Xr()}function ze(){return Ho()}function Ge(t){return Ir()}function je(){return Ro()}function Fe(){return er()}function Me(t){return vr()}function We(){return Lo()}function Xe(){return rr()}function Be(t){return Dr()}function qe(){return Uo()}function He(){return lr()}function Ve(t){return Pr()}function Ke(){return Po()}function Je(){return Er()}function Ye(t){return zr()}function Qe(){return Go()}function Ze(t){return Fr()}function tn(){return Wo()}function en(t){return Rr()}function nn(){return Yo()}function on(t){return $r()}function rn(t){return Vr()}function an(t,e){return new Qi(t,e)}function sn(t){return na()}function cn(t){return ra()}function ln(t){return ca()}function pn(t){return da()}function un(t){return xi()}function dn(t,e){return new hn(t,e)}function hn(t,e){this.original_0=t,this.kClass=e,this.serialName_nfhor0$_0=this.original_0.serialName+"<"+E(this.kClass.simpleName)+">"}function En(t){this.closure$iterator=t}function _n(){}function mn(t){this.this$elementDescriptors=t,this.elementsLeft_0=t.elementsCount}function fn(t){return new En((e=t,function(){return new mn(e)}));var e}function yn(t){return p}function Tn(t,e,n){if(void 0===n&&(n=yn),at(t))throw m("Blank serial names are prohibited".toString());var i=new gn(t);return n(i),new Rn(t,si(),i.elementNames_8be2vx$.size,K(e),i)}function $n(t){return p}function Nn(t,e,n,i){if(void 0===i&&(i=$n),at(t))throw m("Blank serial names are prohibited".toString());if(C(e,si()))throw m("For StructureKind.CLASS please use 'buildClassSerialDescriptor' instead".toString());var o=new gn(t);return i(o),new Rn(t,e,o.elementNames_8be2vx$.size,K(n),o)}function gn(t){this.serialName=t,this.isNullable=!1,this.annotations=u(),this.elementNames_8be2vx$=J(),this.uniqueNames_0=Y(),this.elementDescriptors_8be2vx$=J(),this.elementAnnotations_8be2vx$=J(),this.elementOptionality_8be2vx$=J()}function Rn(t,e,n,i,o){this.serialName_btmdyn$_0=t,this.kind_589tly$_0=e,this.elementsCount_wewqc2$_0=n,this.annotations_efqcf6$_0=o.annotations,this.serialNames_bcpscy$_0=et(o.elementNames_8be2vx$),this.elementNames_0=M(o.elementNames_8be2vx$),this.elementDescriptors_0=ho(o.elementDescriptors_8be2vx$),this.elementAnnotations_0=M(o.elementAnnotations_8be2vx$),this.elementOptionality_0=nt(o.elementOptionality_8be2vx$);var r,a,s=it(this.elementNames_0),c=j(G(s,10));for(r=s.iterator();r.hasNext();){var l=r.next();c.add_11rb$(ot(l.value,l.index))}this.name2Index_0=f(c),this.typeParametersDescriptors_0=ho(i),this._hashCode_6e2cwc$_0=rt((a=this,function(){return yo(a,a.typeParametersDescriptors_0)}))}function Cn(){}function Sn(){In=this,Cn.call(this)}$e.prototype=Object.create(Ri.prototype),$e.prototype.constructor=$e,Re.prototype=Object.create(g.prototype),Re.prototype.constructor=Re,Sn.prototype=Object.create(Cn.prototype),Sn.prototype.constructor=Sn,Ln.prototype=Object.create(Cn.prototype),Ln.prototype.constructor=Ln,On.prototype=Object.create(Cn.prototype),On.prototype.constructor=On,Un.prototype=Object.create(On.prototype),Un.prototype.constructor=Un,kn.prototype=Object.create(On.prototype),kn.prototype.constructor=kn,wn.prototype=Object.create(On.prototype),wn.prototype.constructor=wn,jn.prototype=Object.create(On.prototype),jn.prototype.constructor=jn,Wn.prototype=Object.create(On.prototype),Wn.prototype.constructor=Wn,qn.prototype=Object.create(On.prototype),qn.prototype.constructor=qn,Kn.prototype=Object.create(On.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(On.prototype),Qn.prototype.constructor=Qn,ei.prototype=Object.create(On.prototype),ei.prototype.constructor=ei,oi.prototype=Object.create(Cn.prototype),oi.prototype.constructor=oi,ri.prototype=Object.create(oi.prototype),ri.prototype.constructor=ri,ci.prototype=Object.create(oi.prototype),ci.prototype.constructor=ci,ui.prototype=Object.create(oi.prototype),ui.prototype.constructor=ui,Ei.prototype=Object.create(oi.prototype),Ei.prototype.constructor=Ei,fi.prototype=Object.create(Cn.prototype),fi.prototype.constructor=fi,yi.prototype=Object.create(fi.prototype),yi.prototype.constructor=yi,$i.prototype=Object.create(fi.prototype),$i.prototype.constructor=$i,ji.prototype=Object.create(zi.prototype),ji.prototype.constructor=ji,Fi.prototype=Object.create(zi.prototype),Fi.prototype.constructor=Fi,Mi.prototype=Object.create(zi.prototype),Mi.prototype.constructor=Mi,Wi.prototype=Object.create(zi.prototype),Wi.prototype.constructor=Wi,Xi.prototype=Object.create(zi.prototype),Xi.prototype.constructor=Xi,Bi.prototype=Object.create(Gi.prototype),Bi.prototype.constructor=Bi,qi.prototype=Object.create(Gi.prototype),qi.prototype.constructor=qi,Vi.prototype=Object.create(Hi.prototype),Vi.prototype.constructor=Vi,Ki.prototype=Object.create(Hi.prototype),Ki.prototype.constructor=Ki,Yi.prototype=Object.create(Vi.prototype),Yi.prototype.constructor=Yi,Qi.prototype=Object.create(Vi.prototype),Qi.prototype.constructor=Qi,Zi.prototype=Object.create(Vi.prototype),Zi.prototype.constructor=Zi,to.prototype=Object.create(Zi.prototype),to.prototype.constructor=to,eo.prototype=Object.create(Zi.prototype),eo.prototype.constructor=eo,no.prototype=Object.create(Zi.prototype),no.prototype.constructor=no,io.prototype=Object.create(Ki.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Ki.prototype),oo.prototype.constructor=oo,ro.prototype=Object.create(fo.prototype),ro.prototype.constructor=ro,No.prototype=Object.create(Yi.prototype),No.prototype.constructor=No,Co.prototype=Object.create(Ji.prototype),Co.prototype.constructor=Co,So.prototype=Object.create(Yi.prototype),So.prototype.constructor=So,bo.prototype=Object.create(Ji.prototype),bo.prototype.constructor=bo,vo.prototype=Object.create(Yi.prototype),vo.prototype.constructor=vo,Do.prototype=Object.create(Ji.prototype),Do.prototype.constructor=Do,Ao.prototype=Object.create(Yi.prototype),Ao.prototype.constructor=Ao,xo.prototype=Object.create(Ji.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Yi.prototype),wo.prototype.constructor=wo,jo.prototype=Object.create(Ji.prototype),jo.prototype.constructor=jo,Fo.prototype=Object.create(Yi.prototype),Fo.prototype.constructor=Fo,Xo.prototype=Object.create(Ji.prototype),Xo.prototype.constructor=Xo,Bo.prototype=Object.create(Yi.prototype),Bo.prototype.constructor=Bo,Vo.prototype=Object.create(Ji.prototype),Vo.prototype.constructor=Vo,Ko.prototype=Object.create(Yi.prototype),Ko.prototype.constructor=Ko,Qo.prototype=Object.create(Ji.prototype),Qo.prototype.constructor=Qo,Zo.prototype=Object.create(Yi.prototype),Zo.prototype.constructor=Zo,nr.prototype=Object.create(Ji.prototype),nr.prototype.constructor=nr,ir.prototype=Object.create(Yi.prototype),ir.prototype.constructor=ir,ar.prototype=Object.create(Ji.prototype),ar.prototype.constructor=ar,sr.prototype=Object.create(Yi.prototype),sr.prototype.constructor=sr,pr.prototype=Object.create(Ji.prototype),pr.prototype.constructor=pr,ur.prototype=Object.create(Yi.prototype),ur.prototype.constructor=ur,_r.prototype=Object.create(Ji.prototype),_r.prototype.constructor=_r,Jr.prototype=Object.create(Kr.prototype),Jr.prototype.constructor=Jr,Qr.prototype=Object.create(Kr.prototype),Qr.prototype.constructor=Qr,Ea.prototype=Object.create(ha.prototype),Ea.prototype.constructor=Ea,ma.prototype=Object.create(_a.prototype),ma.prototype.constructor=ma,fa.prototype=Object.create(_a.prototype),fa.prototype.constructor=fa,fe.$metadata$={kind:d,simpleName:"KSerializer",interfaces:[Te,ye]},ye.$metadata$={kind:d,simpleName:"SerializationStrategy",interfaces:[]},Te.$metadata$={kind:d,simpleName:"DeserializationStrategy",interfaces:[]},Object.defineProperty($e.prototype,"baseClass",{get:function(){return this.baseClass_x5jvam$_0}}),Object.defineProperty($e.prototype,"descriptor",{configurable:!0,get:function(){return this.descriptor_nog3ww$_0.value}}),$e.prototype.toString=function(){return"kotlinx.serialization.PolymorphicSerializer(baseClass: "+this.baseClass+")"},$e.$metadata$={kind:s,simpleName:"PolymorphicSerializer",interfaces:[Ri]},Re.$metadata$={kind:s,simpleName:"SerializationException",interfaces:[g]},Object.defineProperty(hn.prototype,"serialName",{configurable:!0,get:function(){return this.serialName_nfhor0$_0}}),hn.prototype.equals=function(t){var n,i,o;if(null==(i=e.isType(n=t,hn)?n:null))return!1;var r=i;return C(this.original_0,r.original_0)&&(null!=(o=r.kClass)?o.equals(this.kClass):null)},hn.prototype.hashCode=function(){var t=this.kClass.hashCode();return t=(31*t|0)+q(this.serialName)|0},hn.prototype.toString=function(){return"ContextDescriptor(kClass: "+this.kClass+", original: "+this.original_0+")"},Object.defineProperty(hn.prototype,"annotations",{configurable:!0,get:function(){return this.original_0.annotations}}),Object.defineProperty(hn.prototype,"elementsCount",{configurable:!0,get:function(){return this.original_0.elementsCount}}),Object.defineProperty(hn.prototype,"isInline",{configurable:!0,get:function(){return this.original_0.isInline}}),Object.defineProperty(hn.prototype,"isNullable",{configurable:!0,get:function(){return this.original_0.isNullable}}),Object.defineProperty(hn.prototype,"kind",{configurable:!0,get:function(){return this.original_0.kind}}),hn.prototype.getElementAnnotations_za3lpa$=function(t){return this.original_0.getElementAnnotations_za3lpa$(t)},hn.prototype.getElementDescriptor_za3lpa$=function(t){return this.original_0.getElementDescriptor_za3lpa$(t)},hn.prototype.getElementIndex_61zpoe$=function(t){return this.original_0.getElementIndex_61zpoe$(t)},hn.prototype.getElementName_za3lpa$=function(t){return this.original_0.getElementName_za3lpa$(t)},hn.prototype.isElementOptional_za3lpa$=function(t){return this.original_0.isElementOptional_za3lpa$(t)},hn.$metadata$={kind:s,simpleName:"ContextDescriptor",interfaces:[_n]},En.prototype.iterator=function(){return this.closure$iterator()},En.$metadata$={kind:s,interfaces:[V]},Object.defineProperty(_n.prototype,"isNullable",{configurable:!0,get:function(){return!1}}),Object.defineProperty(_n.prototype,"isInline",{configurable:!0,get:function(){return!1}}),Object.defineProperty(_n.prototype,"annotations",{configurable:!0,get:function(){return u()}}),_n.$metadata$={kind:d,simpleName:"SerialDescriptor",interfaces:[]},mn.prototype.hasNext=function(){return this.elementsLeft_0>0},mn.prototype.next=function(){var t,e,n;return n=this.this$elementDescriptors.elementsCount,t=this.elementsLeft_0,this.elementsLeft_0=t-1|0,e=t,this.this$elementDescriptors.getElementDescriptor_za3lpa$(n-e|0)},mn.$metadata$={kind:s,interfaces:[H]},gn.prototype.element_vxrguq$=function(t,e,n,i){if(void 0===n&&(n=u()),void 0===i&&(i=!1),!this.uniqueNames_0.add_11rb$(t))throw m(("Element with name '"+t+"' is already registered").toString());this.elementNames_8be2vx$.add_11rb$(t),this.elementDescriptors_8be2vx$.add_11rb$(e),this.elementAnnotations_8be2vx$.add_11rb$(n),this.elementOptionality_8be2vx$.add_11rb$(i)},gn.$metadata$={kind:s,simpleName:"ClassSerialDescriptorBuilder",interfaces:[]},Object.defineProperty(Rn.prototype,"serialName",{get:function(){return this.serialName_btmdyn$_0}}),Object.defineProperty(Rn.prototype,"kind",{get:function(){return this.kind_589tly$_0}}),Object.defineProperty(Rn.prototype,"elementsCount",{get:function(){return this.elementsCount_wewqc2$_0}}),Object.defineProperty(Rn.prototype,"annotations",{configurable:!0,get:function(){return this.annotations_efqcf6$_0}}),Object.defineProperty(Rn.prototype,"serialNames",{configurable:!0,get:function(){return this.serialNames_bcpscy$_0}}),Object.defineProperty(Rn.prototype,"_hashCode_0",{configurable:!0,get:function(){return this._hashCode_6e2cwc$_0.value}}),Rn.prototype.getElementName_za3lpa$=function(t){return $a(this.elementNames_0,t)},Rn.prototype.getElementIndex_61zpoe$=function(t){var e;return null!=(e=this.name2Index_0.get_11rb$(t))?e:-3},Rn.prototype.getElementAnnotations_za3lpa$=function(t){return $a(this.elementAnnotations_0,t)},Rn.prototype.getElementDescriptor_za3lpa$=function(t){return $a(this.elementDescriptors_0,t)},Rn.prototype.isElementOptional_za3lpa$=function(t){return Na(this.elementOptionality_0,t)},Rn.prototype.equals=function(t){var n;t:do{var i;if(this===t){n=!0;break t}if(!e.isType(t,Rn)){n=!1;break t}if(!C(this.serialName,t.serialName)){n=!1;break t}if(!Q(this.typeParametersDescriptors_0,t.typeParametersDescriptors_0)){n=!1;break t}if(this.elementsCount!==t.elementsCount){n=!1;break t}i=this.elementsCount;for(var o=0;o=0)){var e="Illegal index "+t+", "+this.serialName+" expects only non-negative indices";throw m(e.toString())}return!1},zi.prototype.getElementAnnotations_za3lpa$=function(t){if(!(t>=0)){var e="Illegal index "+t+", "+this.serialName+" expects only non-negative indices";throw m(e.toString())}return u()},zi.prototype.getElementDescriptor_za3lpa$=function(t){if(!(t>=0)){var e="Illegal index "+t+", "+this.serialName+" expects only non-negative indices";throw m(e.toString())}return this.elementDescriptor},zi.prototype.equals=function(t){return this===t||!!e.isType(t,zi)&&!(!C(this.elementDescriptor,t.elementDescriptor)||!C(this.serialName,t.serialName))},zi.prototype.hashCode=function(){return(31*q(this.elementDescriptor)|0)+q(this.serialName)|0},zi.prototype.toString=function(){return this.serialName+"("+this.elementDescriptor+")"},zi.$metadata$={kind:s,simpleName:"ListLikeDescriptor",interfaces:[_n]},Object.defineProperty(Gi.prototype,"serialName",{get:function(){return this.serialName_ra35nx$_0}}),Object.defineProperty(Gi.prototype,"kind",{configurable:!0,get:function(){return hi()}}),Object.defineProperty(Gi.prototype,"elementsCount",{configurable:!0,get:function(){return this.elementsCount_qp2ocq$_0}}),Gi.prototype.getElementName_za3lpa$=function(t){return t.toString()},Gi.prototype.getElementIndex_61zpoe$=function(t){var e;if(null==(e=ct(t)))throw m(t+" is not a valid map index");return e},Gi.prototype.isElementOptional_za3lpa$=function(t){if(!(t>=0)){var e="Illegal index "+t+", "+this.serialName+" expects only non-negative indices";throw m(e.toString())}return!1},Gi.prototype.getElementAnnotations_za3lpa$=function(t){if(!(t>=0)){var e="Illegal index "+t+", "+this.serialName+" expects only non-negative indices";throw m(e.toString())}return u()},Gi.prototype.getElementDescriptor_za3lpa$=function(t){var e;if(!(t>=0)){var n="Illegal index "+t+", "+this.serialName+" expects only non-negative indices";throw m(n.toString())}switch(t%2|0){case 0:e=this.keyDescriptor;break;case 1:e=this.valueDescriptor;break;default:throw T("Unreached".toString())}return e},Gi.prototype.equals=function(t){return this===t||!!e.isType(t,Gi)&&!!C(this.serialName,t.serialName)&&!!C(this.keyDescriptor,t.keyDescriptor)&&!!C(this.valueDescriptor,t.valueDescriptor)},Gi.prototype.hashCode=function(){var t=q(this.serialName);return t=(31*(t=(31*t|0)+q(this.keyDescriptor)|0)|0)+q(this.valueDescriptor)|0},Gi.prototype.toString=function(){return this.serialName+"("+this.keyDescriptor+", "+this.valueDescriptor+")"},Gi.$metadata$={kind:s,simpleName:"MapLikeDescriptor",interfaces:[_n]},Object.defineProperty(ji.prototype,"serialName",{configurable:!0,get:function(){return this.serialName_reprdi$_0}}),ji.$metadata$={kind:s,simpleName:"PrimitiveArrayDescriptor",interfaces:[zi]},Object.defineProperty(Fi.prototype,"serialName",{configurable:!0,get:function(){return Li}}),Fi.$metadata$={kind:s,simpleName:"ArrayClassDesc",interfaces:[zi]},Object.defineProperty(Mi.prototype,"serialName",{configurable:!0,get:function(){return bi}}),Mi.$metadata$={kind:s,simpleName:"ArrayListClassDesc",interfaces:[zi]},Object.defineProperty(Wi.prototype,"serialName",{configurable:!0,get:function(){return vi}}),Wi.$metadata$={kind:s,simpleName:"LinkedHashSetClassDesc",interfaces:[zi]},Object.defineProperty(Xi.prototype,"serialName",{configurable:!0,get:function(){return Oi}}),Xi.$metadata$={kind:s,simpleName:"HashSetClassDesc",interfaces:[zi]},Bi.$metadata$={kind:s,simpleName:"LinkedHashMapClassDesc",interfaces:[Gi]},qi.$metadata$={kind:s,simpleName:"HashMapClassDesc",interfaces:[Gi]},Hi.prototype.merge_h7kg3q$=function(t,e){var n,i=null!=(n=null!=e?this.toBuilder_wikn$(e):null)?n:this.builder(),o=this.builderSize_wili$(i),r=t.beginStructure_24f42q$(this.descriptor);if(r.decodeSequentially())this.readAll_8oyp34$(r,i,o,this.readSize_bl0yv7$_0(r,i));else for(;;){var a=r.decodeElementIndex_24f42q$(this.descriptor);if(-1===a)break;this.readElement_8pvye7$(r,o+a|0,i)}return r.endStructure_24f42q$(this.descriptor),this.toResult_wili$(i)},Hi.prototype.deserialize_bq71mq$=function(t){return this.merge_h7kg3q$(t,null)},Hi.prototype.readSize_bl0yv7$_0=function(t,e){var n=t.decodeCollectionSize_24f42q$(this.descriptor);return this.checkCapacity_rk7bw8$(e,n),n},Hi.prototype.readElement_8pvye7$=function(t,e,n,i,o){void 0===i&&(i=!0),o?o(t,e,n,i):this.readElement_8pvye7$$default(t,e,n,i)},Hi.$metadata$={kind:s,simpleName:"AbstractCollectionSerializer",interfaces:[fe]},Vi.prototype.serialize_55azsf$=function(t,e){var n,i,o,r=this.collectionSize_wikn$(e),a=this.descriptor,s=t.beginCollection_szpzho$(a,r);(n=e,i=this,o=r,function(t){var e,r=i.collectionIterator_wikn$(n);e=o;for(var a=0;a=0))throw m("Size must be known in advance when using READ_ALL".toString());for(var o=0;o=0))throw m("Size must be known in advance when using READ_ALL".toString());o=2*i|0;for(var r=0;r>4),h[(s=E,E=s+1|0,s)]=Je(15&f)}}return x(h)}function Me(t){return je(t,!0)}function We(t,e,n,i,o){return void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===i&&(i=!1),void 0===o&&(o=U.Charsets.UTF_8),Be(t,e,n,i,o)}function Xe(t,e,n,i){return void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===i&&(i=U.Charsets.UTF_8),Be(t,e,n,!1,i)}function Be(t,e,n,i,o){for(var r=e;r255?c/3|0:c);o>n&&l.append_ezbsdh$(t,n,o);for(var p=o,u=null;p=i){var E,_=p;throw E=t.length,new He("Incomplete trailing HEX escape: "+e.subSequence(t,_,E).toString()+", in "+t+" at "+p)}var m=Ke(t.charCodeAt(p+1|0)),f=Ke(t.charCodeAt(p+2|0));if(-1===m||-1===f)throw new He("Wrong HEX escape: %"+String.fromCharCode(t.charCodeAt(p+1|0))+String.fromCharCode(t.charCodeAt(p+2|0))+", in "+t+", at "+p);u[(s=h,h=s+1|0,s)]=S((16*m|0)+f|0),p=p+3|0}l.append_pdl1vj$(z(u,0,h,a))}else l.append_s8itvh$(d),p=p+1|0}return l.toString()}function He(t){G(t,this),this.name="URLDecodeException"}function Ve(t){var n=255&t,i=e.charArray(3);return i[0]=37,i[1]=Je(n>>4),i[2]=Je(15&n),x(i)}function Ke(t){return new N(48,57).contains_mef7kx$(t)?t-48:new N(65,70).contains_mef7kx$(t)?t-65+10|0:new N(97,102).contains_mef7kx$(t)?t-97+10|0:-1}function Je(t){return A(t>=0&&t<=9?48+t:A(65+t)-10)}function Ye(t,e){t:do{var n,i,o=!0;if(null==(n=W(t,1)))break t;var r=n;try{for(;;){for(var a=r;a.writePosition>a.readPosition;)e(a.readByte());if(o=!1,null==(i=X(t,r)))break;r=i,o=!0}}finally{o&&B(t,r)}}while(0)}function Qe(t,e){en(),void 0===e&&(e=K()),Pn.call(this,t,e)}function Ze(){tn=this,this.File=new Qe("file"),this.Mixed=new Qe("mixed"),this.Attachment=new Qe("attachment"),this.Inline=new Qe("inline")}He.prototype=Object.create(j.prototype),He.prototype.constructor=He,Qe.prototype=Object.create(Pn.prototype),Qe.prototype.constructor=Qe,an.prototype=Object.create(Pn.prototype),an.prototype.constructor=an,Ln.prototype=Object.create(j.prototype),Ln.prototype.constructor=Ln,Bn.prototype=Object.create(Mt.prototype),Bn.prototype.constructor=Bn,Kn.prototype=Object.create(qt.prototype),Kn.prototype.constructor=Kn,Ei.prototype=Object.create(rt.prototype),Ei.prototype.constructor=Ei,_i.prototype=Object.create(rt.prototype),_i.prototype.constructor=_i,Wi.prototype=Object.create(Mt.prototype),Wi.prototype.constructor=Wi,Xi.prototype=Object.create(qt.prototype),Xi.prototype.constructor=Xi,co.prototype=Object.create(It.prototype),co.prototype.constructor=co,ir.prototype=Object.create(Qo.prototype),ir.prototype.constructor=ir,Uo.prototype=Object.create(ir.prototype),Uo.prototype.constructor=Uo,nr.prototype=Object.create(Qo.prototype),nr.prototype.constructor=nr,Ao.prototype=Object.create(nr.prototype),Ao.prototype.constructor=Ao,xo.prototype=Object.create(Po.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Po.prototype),wo.prototype.constructor=wo,zo.prototype=Object.create(Po.prototype),zo.prototype.constructor=zo,Go.prototype=Object.create(Po.prototype),Go.prototype.constructor=Go,Zo.prototype=Object.create(Qo.prototype),Zo.prototype.constructor=Zo,tr.prototype=Object.create(Qo.prototype),tr.prototype.constructor=tr,or.prototype=Object.create(Qo.prototype),or.prototype.constructor=or,rr.prototype=Object.create(ir.prototype),rr.prototype.constructor=rr,sr.prototype=Object.create(h.prototype),sr.prototype.constructor=sr,Rr.prototype=Object.create($r.prototype),Rr.prototype.constructor=Rr,Cr.prototype=Object.create($r.prototype),Cr.prototype.constructor=Cr,Sr.prototype=Object.create($r.prototype),Sr.prototype.constructor=Sr,Ir.prototype=Object.create($r.prototype),Ir.prototype.constructor=Ir,Lr.prototype=Object.create($r.prototype),Lr.prototype.constructor=Lr,br.prototype=Object.create($r.prototype),br.prototype.constructor=br,vr.prototype=Object.create($r.prototype),vr.prototype.constructor=vr,Or.prototype=Object.create($r.prototype),Or.prototype.constructor=Or,Ur.prototype=Object.create($r.prototype),Ur.prototype.constructor=Ur,Dr.prototype=Object.create($r.prototype),Dr.prototype.constructor=Dr,He.$metadata$={kind:E,simpleName:"URLDecodeException",interfaces:[j]},Object.defineProperty(Qe.prototype,"disposition",{configurable:!0,get:function(){return this.content}}),Object.defineProperty(Qe.prototype,"name",{configurable:!0,get:function(){return this.parameter_61zpoe$(rn().Name)}}),Qe.prototype.withParameter_qz9155$=function(t,e,n){void 0===n&&(n=!0);var i=n?function(t,e){if(!m(t,rn().FileNameAsterisk))return e;if(J(e,"utf-8''",!0))return e;var n;t:do{var i;for(i=M(e);i.hasNext();){var o=C(i.next());if(!p.contains_11rb$(L(o))){n=!1;break t}}n=!0}while(0);return n?e:"utf-8''"+Fe(e,p)}(t,e):e;return new Qe(this.disposition,H(this.parameters,Qn(t,i)))},Qe.prototype.withParameters_1wyvw$=function(t){return new Qe(this.disposition,R(this.parameters,t))},Qe.prototype.equals=function(t){return e.isType(t,Qe)&&m(this.disposition,t.disposition)&&m(this.parameters,t.parameters)},Qe.prototype.hashCode=function(){return(31*$(this.disposition)|0)+$(this.parameters)|0},Ze.prototype.parse_61zpoe$=function(t){var e=Y(ei(t));return new Qe(e.value,e.params)},Ze.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var tn=null;function en(){return null===tn&&new Ze,tn}function nn(){on=this,this.FileName="filename",this.FileNameAsterisk="filename*",this.Name="name",this.CreationDate="creation-date",this.ModificationDate="modification-date",this.ReadDate="read-date",this.Size="size",this.Handling="handling"}nn.$metadata$={kind:V,simpleName:"Parameters",interfaces:[]};var on=null;function rn(){return null===on&&new nn,on}function an(t,e,n,i){ln(),void 0===i&&(i=K()),Pn.call(this,n,i),this.contentType=t,this.contentSubtype=e}function sn(){cn=this,this.Any=In("*","*")}Qe.$metadata$={kind:E,simpleName:"ContentDisposition",interfaces:[Pn]},an.prototype.withParameter_puj7f4$=function(t,e){return this.hasParameter_0(t,e)?this:new an(this.contentType,this.contentSubtype,this.content,H(this.parameters,Qn(t,e)))},an.prototype.hasParameter_0=function(t,n){switch(this.parameters.size){case 0:return!1;case 1:var i=this.parameters.get_za3lpa$(0);return Z(i.name,t,!0)&&Z(i.value,n,!0);default:var o,r=this.parameters;t:do{var a;if(e.isType(r,at)&&r.isEmpty()){o=!1;break t}for(a=r.iterator();a.hasNext();){var s=a.next();if(Z(s.name,t,!0)&&Z(s.value,n,!0)){o=!0;break t}}o=!1}while(0);return o}},an.prototype.withoutParameters=function(){return this.parameters.isEmpty()?this:In(this.contentType,this.contentSubtype)},an.prototype.match_9v5yzd$=function(t){var n,i;if(!m(t.contentType,"*")&&!Z(t.contentType,this.contentType,!0))return!1;if(!m(t.contentSubtype,"*")&&!Z(t.contentSubtype,this.contentSubtype,!0))return!1;for(n=t.parameters.iterator();n.hasNext();){var o=n.next(),r=o.component1(),a=o.component2();if(m(r,"*"))if(m(a,"*"))i=!0;else{var s,c=this.parameters;t:do{var l;if(e.isType(c,at)&&c.isEmpty()){s=!1;break t}for(l=c.iterator();l.hasNext();){var p=l.next();if(Z(p.value,a,!0)){s=!0;break t}}s=!1}while(0);i=s}else{var u=this.parameter_61zpoe$(r);i=m(a,"*")?null!=u:Z(u,a,!0)}if(!i)return!1}return!0},an.prototype.match_61zpoe$=function(t){return this.match_9v5yzd$(ln().parse_61zpoe$(t))},an.prototype.equals=function(t){return e.isType(t,an)&&Z(this.contentType,t.contentType,!0)&&Z(this.contentSubtype,t.contentSubtype,!0)&&m(this.parameters,t.parameters)},an.prototype.hashCode=function(){var t=$(this.contentType.toLowerCase());return t=(t=t+((31*t|0)+$(this.contentSubtype.toLowerCase()))|0)+(31*$(this.parameters)|0)|0},sn.prototype.parse_61zpoe$=function(t){if(tt(t))return this.Any;var n=Y(ei(t)),i=n.value,o=n.params,r=et(i,47);if(-1===r){var a;if(m(ct(e.isCharSequence(a=i)?a:st()).toString(),"*"))return this.Any;throw new Ln(t)}var s,c=i.substring(0,r),l=ct(e.isCharSequence(s=c)?s:st()).toString();if(0===l.length)throw new Ln(t);var p,u=r+1|0,d=i.substring(u),h=ct(e.isCharSequence(p=d)?p:st()).toString();if(nt(l,32)||nt(h,32))throw new Ln(t);if(0===h.length||nt(h,47))throw new Ln(t);return In(l,h,o)},sn.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var cn=null;function ln(){return null===cn&&new sn,cn}function pn(){un=this,this.Any=In("application","*"),this.Atom=In("application","atom+xml"),this.Cbor=In("application","cbor"),this.Json=In("application","json"),this.HalJson=In("application","hal+json"),this.JavaScript=In("application","javascript"),this.OctetStream=In("application","octet-stream"),this.FontWoff=In("application","font-woff"),this.Rss=In("application","rss+xml"),this.Xml=In("application","xml"),this.Xml_Dtd=In("application","xml-dtd"),this.Zip=In("application","zip"),this.GZip=In("application","gzip"),this.FormUrlEncoded=In("application","x-www-form-urlencoded"),this.Pdf=In("application","pdf"),this.Xlsx=In("application","vnd.openxmlformats-officedocument.spreadsheetml.sheet"),this.Docx=In("application","vnd.openxmlformats-officedocument.wordprocessingml.document"),this.Pptx=In("application","vnd.openxmlformats-officedocument.presentationml.presentation"),this.ProtoBuf=In("application","protobuf"),this.Wasm=In("application","wasm"),this.ProblemJson=In("application","problem+json"),this.ProblemXml=In("application","problem+xml")}pn.$metadata$={kind:V,simpleName:"Application",interfaces:[]};var un=null;function dn(){hn=this,this.Any=In("audio","*"),this.MP4=In("audio","mp4"),this.MPEG=In("audio","mpeg"),this.OGG=In("audio","ogg")}dn.$metadata$={kind:V,simpleName:"Audio",interfaces:[]};var hn=null;function En(){_n=this,this.Any=In("image","*"),this.GIF=In("image","gif"),this.JPEG=In("image","jpeg"),this.PNG=In("image","png"),this.SVG=In("image","svg+xml"),this.XIcon=In("image","x-icon")}En.$metadata$={kind:V,simpleName:"Image",interfaces:[]};var _n=null;function mn(){fn=this,this.Any=In("message","*"),this.Http=In("message","http")}mn.$metadata$={kind:V,simpleName:"Message",interfaces:[]};var fn=null;function yn(){Tn=this,this.Any=In("multipart","*"),this.Mixed=In("multipart","mixed"),this.Alternative=In("multipart","alternative"),this.Related=In("multipart","related"),this.FormData=In("multipart","form-data"),this.Signed=In("multipart","signed"),this.Encrypted=In("multipart","encrypted"),this.ByteRanges=In("multipart","byteranges")}yn.$metadata$={kind:V,simpleName:"MultiPart",interfaces:[]};var Tn=null;function $n(){Nn=this,this.Any=In("text","*"),this.Plain=In("text","plain"),this.CSS=In("text","css"),this.CSV=In("text","csv"),this.Html=In("text","html"),this.JavaScript=In("text","javascript"),this.VCard=In("text","vcard"),this.Xml=In("text","xml"),this.EventStream=In("text","event-stream")}$n.$metadata$={kind:V,simpleName:"Text",interfaces:[]};var Nn=null;function gn(){Sn=this,this.Any=In("video","*"),this.MPEG=In("video","mpeg"),this.MP4=In("video","mp4"),this.OGG=In("video","ogg"),this.QuickTime=In("video","quicktime")}gn.$metadata$={kind:V,simpleName:"Video",interfaces:[]};var Rn,Cn,Sn=null;function In(t,e,n,i){return void 0===n&&(n=K()),i=i||Object.create(an.prototype),an.call(i,t,e,t+"/"+e,n),i}function Ln(t){G("Bad Content-Type format: "+t,this),this.name="BadContentTypeFormatException"}function bn(t){var n,i;if(null!=(n=t.parameter_61zpoe$("charset"))){var o;t:do{try{o=ot.Companion.forName_61zpoe$(n)}catch(t){if(e.isType(t,rt)){o=null;break t}throw t}}while(0);i=o}else i=null;return i}function vn(t){var n,i,o=ct(e.isCharSequence(n=t)?n:st()).toString();for(i=Rn.iterator();i.hasNext();){var r=i.next();try{return new Lt(r).parse_61zpoe$(t)}catch(t){if(!e.isType(t,bt))throw t}}throw St(("Failed to parse date: "+o).toString())}function On(t){var e=F();return e.append_pdl1vj$(t.dayOfWeek.value+", "),e.append_pdl1vj$(Un(t.dayOfMonth,2)+" "),e.append_pdl1vj$(t.month.value+" "),e.append_pdl1vj$(Un(t.year,4)),e.append_pdl1vj$(" "+Un(t.hours,2)+":"+Un(t.minutes,2)+":"+Un(t.seconds,2)+" "),e.append_pdl1vj$("GMT"),e.toString()}function Un(t,e){return vt(t.toString(),e,48)}function Dn(t){var e=t.component1(),n=t.component2();return ut(n,e)}function An(t){var e,n=yt();for(e=t.iterator();e.hasNext();){var i,o=e.next(),r=o.first,a=n.get_11rb$(r);if(null==a){var s=Tt();n.put_xwzc9p$(r,s),i=s}else i=a;i.add_11rb$(o)}var c,l=mt(_t(n.size));for(c=n.entries.iterator();c.hasNext();){var p,u=c.next(),d=l.put_xwzc9p$,h=u.key,E=u.value,_=f(q(E,10));for(p=E.iterator();p.hasNext();){var m=p.next();_.add_11rb$(m.second)}d.call(l,h,_)}return l}function kn(t){try{return ln().parse_61zpoe$(t)}catch(n){throw e.isType(n,xt)?new rt("Failed to parse "+t,n):n}}function Pn(t,e){zn(),void 0===e&&(e=K()),this.content=t,this.parameters=e}function xn(){wn=this}an.$metadata$={kind:E,simpleName:"ContentType",interfaces:[Pn]},Ln.$metadata$={kind:E,simpleName:"BadContentTypeFormatException",interfaces:[j]},Pn.prototype.parameter_61zpoe$=function(t){var e;e=wt(this.parameters);for(var n=0;n<=e;n++){var i=this.parameters.get_za3lpa$(n);if(Z(i.name,t,!0))return i.value}return null},Pn.prototype.toString=function(){if(this.parameters.isEmpty())return this.content;var t,e=this.content.length,n=0;for(t=this.parameters.iterator();t.hasNext();){var i=t.next();n=n+(i.name.length+i.value.length+3|0)|0}var o,r=w(e+n|0);r.append_pdl1vj$(this.content),o=wt(this.parameters);for(var a=0;a<=o;a++){var s=this.parameters.get_za3lpa$(a);r.append_pdl1vj$("; "),r.append_pdl1vj$(s.name),r.append_pdl1vj$("=");var c=s.value;Gn(c)?r.append_pdl1vj$(jn(c)):r.append_pdl1vj$(c)}return r.toString()},xn.prototype.parse_g5gu5m$=Nt("ktor-ktor-http-js-legacy.io.ktor.http.HeaderValueWithParameters.Companion.parse_g5gu5m$",gt((function(){var n=t.io.ktor.http.parseHeaderValue_pdl1vj$,i=e.kotlin.collections.last_2p1efm$;return function(t,e){var o=i(n(t));return e(o.value,o.params)}}))),xn.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var wn=null;function zn(){return null===wn&&new xn,wn}function Gn(t){var e;if(0===t.length)return!0;if(function(t){if(t.length<2)return!1;if(34!==zt(t)||34!==Gt(t))return!1;var e=1;do{var n=et(t,34,e);if(n===jt(t))break;for(var i=0,o=n-1|0;92===t.charCodeAt(o);)i=i+1|0,o=o-1|0;if(i%2==0)return!1;e=n+1|0}while(e?@[\\]{}',t)}function fi(){}function yi(){}function Ti(t){gi(),this.value=t}function $i(){Ni=this,this.Get=new Ti("GET"),this.Post=new Ti("POST"),this.Put=new Ti("PUT"),this.Patch=new Ti("PATCH"),this.Delete=new Ti("DELETE"),this.Head=new Ti("HEAD"),this.Options=new Ti("OPTIONS"),this.DefaultMethods=O([this.Get,this.Post,this.Put,this.Patch,this.Delete,this.Head,this.Options])}Ei.$metadata$={kind:E,simpleName:"IllegalHeaderNameException",interfaces:[rt]},_i.$metadata$={kind:E,simpleName:"IllegalHeaderValueException",interfaces:[rt]},fi.$metadata$={kind:Q,simpleName:"HttpMessage",interfaces:[]},yi.$metadata$={kind:Q,simpleName:"HttpMessageBuilder",interfaces:[]},$i.prototype.parse_61zpoe$=function(t){return m(t,this.Get.value)?this.Get:m(t,this.Post.value)?this.Post:m(t,this.Put.value)?this.Put:m(t,this.Patch.value)?this.Patch:m(t,this.Delete.value)?this.Delete:m(t,this.Head.value)?this.Head:m(t,this.Options.value)?this.Options:new Ti(t)},$i.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var Ni=null;function gi(){return null===Ni&&new $i,Ni}function Ri(t,e){vi(),this.value=t,this.description=e}function Ci(){bi=this,this.Continue=new Ri(100,"Continue"),this.SwitchingProtocols=new Ri(101,"Switching Protocols"),this.Processing=new Ri(102,"Processing"),this.OK=new Ri(200,"OK"),this.Created=new Ri(201,"Created"),this.Accepted=new Ri(202,"Accepted"),this.NonAuthoritativeInformation=new Ri(203,"Non-Authoritative Information"),this.NoContent=new Ri(204,"No Content"),this.ResetContent=new Ri(205,"Reset Content"),this.PartialContent=new Ri(206,"Partial Content"),this.MultiStatus=new Ri(207,"Multi-Status"),this.MultipleChoices=new Ri(300,"Multiple Choices"),this.MovedPermanently=new Ri(301,"Moved Permanently"),this.Found=new Ri(302,"Found"),this.SeeOther=new Ri(303,"See Other"),this.NotModified=new Ri(304,"Not Modified"),this.UseProxy=new Ri(305,"Use Proxy"),this.SwitchProxy=new Ri(306,"Switch Proxy"),this.TemporaryRedirect=new Ri(307,"Temporary Redirect"),this.PermanentRedirect=new Ri(308,"Permanent Redirect"),this.BadRequest=new Ri(400,"Bad Request"),this.Unauthorized=new Ri(401,"Unauthorized"),this.PaymentRequired=new Ri(402,"Payment Required"),this.Forbidden=new Ri(403,"Forbidden"),this.NotFound=new Ri(404,"Not Found"),this.MethodNotAllowed=new Ri(405,"Method Not Allowed"),this.NotAcceptable=new Ri(406,"Not Acceptable"),this.ProxyAuthenticationRequired=new Ri(407,"Proxy Authentication Required"),this.RequestTimeout=new Ri(408,"Request Timeout"),this.Conflict=new Ri(409,"Conflict"),this.Gone=new Ri(410,"Gone"),this.LengthRequired=new Ri(411,"Length Required"),this.PreconditionFailed=new Ri(412,"Precondition Failed"),this.PayloadTooLarge=new Ri(413,"Payload Too Large"),this.RequestURITooLong=new Ri(414,"Request-URI Too Long"),this.UnsupportedMediaType=new Ri(415,"Unsupported Media Type"),this.RequestedRangeNotSatisfiable=new Ri(416,"Requested Range Not Satisfiable"),this.ExpectationFailed=new Ri(417,"Expectation Failed"),this.UnprocessableEntity=new Ri(422,"Unprocessable Entity"),this.Locked=new Ri(423,"Locked"),this.FailedDependency=new Ri(424,"Failed Dependency"),this.UpgradeRequired=new Ri(426,"Upgrade Required"),this.TooManyRequests=new Ri(429,"Too Many Requests"),this.RequestHeaderFieldTooLarge=new Ri(431,"Request Header Fields Too Large"),this.InternalServerError=new Ri(500,"Internal Server Error"),this.NotImplemented=new Ri(501,"Not Implemented"),this.BadGateway=new Ri(502,"Bad Gateway"),this.ServiceUnavailable=new Ri(503,"Service Unavailable"),this.GatewayTimeout=new Ri(504,"Gateway Timeout"),this.VersionNotSupported=new Ri(505,"HTTP Version Not Supported"),this.VariantAlsoNegotiates=new Ri(506,"Variant Also Negotiates"),this.InsufficientStorage=new Ri(507,"Insufficient Storage"),this.allStatusCodes=Oi();var t,e=this.allStatusCodes,n=te(_t(q(e,10)),16),i=mt(n);for(t=e.iterator();t.hasNext();){var o=t.next();i.put_xwzc9p$(o.value,o)}this.statusCodesMap_0=i}Ti.$metadata$={kind:E,simpleName:"HttpMethod",interfaces:[]},Ti.prototype.component1=function(){return this.value},Ti.prototype.copy_61zpoe$=function(t){return new Ti(void 0===t?this.value:t)},Ti.prototype.toString=function(){return"HttpMethod(value="+e.toString(this.value)+")"},Ti.prototype.hashCode=function(){var t=0;return t=31*t+e.hashCode(this.value)|0},Ti.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.value,t.value)},Ri.prototype.toString=function(){return this.value.toString()+" "+this.description},Ri.prototype.equals=function(t){return e.isType(t,Ri)&&t.value===this.value},Ri.prototype.hashCode=function(){return $(this.value)},Ri.prototype.description_61zpoe$=function(t){return this.copy_19mbxw$(void 0,t)},Ci.prototype.fromValue_za3lpa$=function(t){var e;return null!=(e=this.statusCodesMap_0.get_11rb$(t))?e:new Ri(t,"Unknown Status Code")},Ci.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var Si,Ii,Li,bi=null;function vi(){return null===bi&&new Ci,bi}function Oi(){return O([vi().Continue,vi().SwitchingProtocols,vi().Processing,vi().OK,vi().Created,vi().Accepted,vi().NonAuthoritativeInformation,vi().NoContent,vi().ResetContent,vi().PartialContent,vi().MultiStatus,vi().MultipleChoices,vi().MovedPermanently,vi().Found,vi().SeeOther,vi().NotModified,vi().UseProxy,vi().SwitchProxy,vi().TemporaryRedirect,vi().PermanentRedirect,vi().BadRequest,vi().Unauthorized,vi().PaymentRequired,vi().Forbidden,vi().NotFound,vi().MethodNotAllowed,vi().NotAcceptable,vi().ProxyAuthenticationRequired,vi().RequestTimeout,vi().Conflict,vi().Gone,vi().LengthRequired,vi().PreconditionFailed,vi().PayloadTooLarge,vi().RequestURITooLong,vi().UnsupportedMediaType,vi().RequestedRangeNotSatisfiable,vi().ExpectationFailed,vi().UnprocessableEntity,vi().Locked,vi().FailedDependency,vi().UpgradeRequired,vi().TooManyRequests,vi().RequestHeaderFieldTooLarge,vi().InternalServerError,vi().NotImplemented,vi().BadGateway,vi().ServiceUnavailable,vi().GatewayTimeout,vi().VersionNotSupported,vi().VariantAlsoNegotiates,vi().InsufficientStorage])}function Ui(t){var e=F();return Ai(t,e),e.toString()}function Di(t){var e=je(t.first,!0);return null==t.second?e:e+"="+Me(y(t.second))}function Ai(t,e){ee(t,e,"&",void 0,void 0,void 0,void 0,Di)}function ki(t){var n,i=ct(e.isCharSequence(n=t)?n:st()).toString();if(0===i.length)return null;var o=et(i,44),r=i.substring(0,o),a=o+1|0,s=i.substring(a);return ut(pt(Ut(r,".")),kn(s))}function Pi(){return oe(ie(ne("\n.123,application/vnd.lotus-1-2-3\n.3dmf,x-world/x-3dmf\n.3dml,text/vnd.in3d.3dml\n.3dm,x-world/x-3dmf\n.3g2,video/3gpp2\n.3gp,video/3gpp\n.7z,application/x-7z-compressed\n.aab,application/x-authorware-bin\n.aac,audio/aac\n.aam,application/x-authorware-map\n.a,application/octet-stream\n.aas,application/x-authorware-seg\n.abc,text/vnd.abc\n.abw,application/x-abiword\n.ac,application/pkix-attr-cert\n.acc,application/vnd.americandynamics.acc\n.ace,application/x-ace-compressed\n.acgi,text/html\n.acu,application/vnd.acucobol\n.adp,audio/adpcm\n.aep,application/vnd.audiograph\n.afl,video/animaflex\n.afp,application/vnd.ibm.modcap\n.ahead,application/vnd.ahead.space\n.ai,application/postscript\n.aif,audio/aiff\n.aifc,audio/aiff\n.aiff,audio/aiff\n.aim,application/x-aim\n.aip,text/x-audiosoft-intra\n.air,application/vnd.adobe.air-application-installer-package+zip\n.ait,application/vnd.dvb.ait\n.ami,application/vnd.amiga.ami\n.ani,application/x-navi-animation\n.aos,application/x-nokia-9000-communicator-add-on-software\n.apk,application/vnd.android.package-archive\n.application,application/x-ms-application\n,application/pgp-encrypted\n.apr,application/vnd.lotus-approach\n.aps,application/mime\n.arc,application/octet-stream\n.arj,application/arj\n.arj,application/octet-stream\n.art,image/x-jg\n.asf,video/x-ms-asf\n.asm,text/x-asm\n.aso,application/vnd.accpac.simply.aso\n.asp,text/asp\n.asx,application/x-mplayer2\n.asx,video/x-ms-asf\n.asx,video/x-ms-asf-plugin\n.atc,application/vnd.acucorp\n.atomcat,application/atomcat+xml\n.atomsvc,application/atomsvc+xml\n.atom,application/atom+xml\n.atx,application/vnd.antix.game-component\n.au,audio/basic\n.au,audio/x-au\n.avi,video/avi\n.avi,video/msvideo\n.avi,video/x-msvideo\n.avs,video/avs-video\n.aw,application/applixware\n.azf,application/vnd.airzip.filesecure.azf\n.azs,application/vnd.airzip.filesecure.azs\n.azw,application/vnd.amazon.ebook\n.bcpio,application/x-bcpio\n.bdf,application/x-font-bdf\n.bdm,application/vnd.syncml.dm+wbxml\n.bed,application/vnd.realvnc.bed\n.bh2,application/vnd.fujitsu.oasysprs\n.bin,application/macbinary\n.bin,application/mac-binary\n.bin,application/octet-stream\n.bin,application/x-binary\n.bin,application/x-macbinary\n.bmi,application/vnd.bmi\n.bm,image/bmp\n.bmp,image/bmp\n.bmp,image/x-windows-bmp\n.boo,application/book\n.book,application/book\n.box,application/vnd.previewsystems.box\n.boz,application/x-bzip2\n.bsh,application/x-bsh\n.btif,image/prs.btif\n.bz2,application/x-bzip2\n.bz,application/x-bzip\n.c11amc,application/vnd.cluetrust.cartomobile-config\n.c11amz,application/vnd.cluetrust.cartomobile-config-pkg\n.c4g,application/vnd.clonk.c4group\n.cab,application/vnd.ms-cab-compressed\n.car,application/vnd.curl.car\n.cat,application/vnd.ms-pki.seccat\n.ccad,application/clariscad\n.cco,application/x-cocoa\n.cc,text/plain\n.cc,text/x-c\n.ccxml,application/ccxml+xml,\n.cdbcmsg,application/vnd.contact.cmsg\n.cdf,application/cdf\n.cdf,application/x-cdf\n.cdf,application/x-netcdf\n.cdkey,application/vnd.mediastation.cdkey\n.cdmia,application/cdmi-capability\n.cdmic,application/cdmi-container\n.cdmid,application/cdmi-domain\n.cdmio,application/cdmi-object\n.cdmiq,application/cdmi-queue\n.cdx,chemical/x-cdx\n.cdxml,application/vnd.chemdraw+xml\n.cdy,application/vnd.cinderella\n.cer,application/pkix-cert\n.cgm,image/cgm\n.cha,application/x-chat\n.chat,application/x-chat\n.chm,application/vnd.ms-htmlhelp\n.chrt,application/vnd.kde.kchart\n.cif,chemical/x-cif\n.cii,application/vnd.anser-web-certificate-issue-initiation\n.cil,application/vnd.ms-artgalry\n.cla,application/vnd.claymore\n.class,application/java\n.class,application/java-byte-code\n.class,application/java-vm\n.class,application/x-java-class\n.clkk,application/vnd.crick.clicker.keyboard\n.clkp,application/vnd.crick.clicker.palette\n.clkt,application/vnd.crick.clicker.template\n.clkw,application/vnd.crick.clicker.wordbank\n.clkx,application/vnd.crick.clicker\n.clp,application/x-msclip\n.cmc,application/vnd.cosmocaller\n.cmdf,chemical/x-cmdf\n.cml,chemical/x-cml\n.cmp,application/vnd.yellowriver-custom-menu\n.cmx,image/x-cmx\n.cod,application/vnd.rim.cod\n.com,application/octet-stream\n.com,text/plain\n.conf,text/plain\n.cpio,application/x-cpio\n.cpp,text/x-c\n.cpt,application/mac-compactpro\n.cpt,application/x-compactpro\n.cpt,application/x-cpt\n.crd,application/x-mscardfile\n.crl,application/pkcs-crl\n.crl,application/pkix-crl\n.crt,application/pkix-cert\n.crt,application/x-x509-ca-cert\n.crt,application/x-x509-user-cert\n.cryptonote,application/vnd.rig.cryptonote\n.csh,application/x-csh\n.csh,text/x-script.csh\n.csml,chemical/x-csml\n.csp,application/vnd.commonspace\n.css,text/css\n.csv,text/csv\n.c,text/plain\n.c++,text/plain\n.c,text/x-c\n.cu,application/cu-seeme\n.curl,text/vnd.curl\n.cww,application/prs.cww\n.cxx,text/plain\n.dat,binary/octet-stream\n.dae,model/vnd.collada+xml\n.daf,application/vnd.mobius.daf\n.davmount,application/davmount+xml\n.dcr,application/x-director\n.dcurl,text/vnd.curl.dcurl\n.dd2,application/vnd.oma.dd2+xml\n.ddd,application/vnd.fujixerox.ddd\n.deb,application/x-debian-package\n.deepv,application/x-deepv\n.def,text/plain\n.der,application/x-x509-ca-cert\n.dfac,application/vnd.dreamfactory\n.dif,video/x-dv\n.dir,application/x-director\n.dis,application/vnd.mobius.dis\n.djvu,image/vnd.djvu\n.dl,video/dl\n.dl,video/x-dl\n.dna,application/vnd.dna\n.doc,application/msword\n.docm,application/vnd.ms-word.document.macroenabled.12\n.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document\n.dot,application/msword\n.dotm,application/vnd.ms-word.template.macroenabled.12\n.dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template\n.dp,application/commonground\n.dp,application/vnd.osgi.dp\n.dpg,application/vnd.dpgraph\n.dra,audio/vnd.dra\n.drw,application/drafting\n.dsc,text/prs.lines.tag\n.dssc,application/dssc+der\n.dtb,application/x-dtbook+xml\n.dtd,application/xml-dtd\n.dts,audio/vnd.dts\n.dtshd,audio/vnd.dts.hd\n.dump,application/octet-stream\n.dvi,application/x-dvi\n.dv,video/x-dv\n.dwf,model/vnd.dwf\n.dwg,application/acad\n.dwg,image/vnd.dwg\n.dwg,image/x-dwg\n.dxf,application/dxf\n.dxf,image/vnd.dwg\n.dxf,image/vnd.dxf\n.dxf,image/x-dwg\n.dxp,application/vnd.spotfire.dxp\n.dxr,application/x-director\n.ecelp4800,audio/vnd.nuera.ecelp4800\n.ecelp7470,audio/vnd.nuera.ecelp7470\n.ecelp9600,audio/vnd.nuera.ecelp9600\n.edm,application/vnd.novadigm.edm\n.edx,application/vnd.novadigm.edx\n.efif,application/vnd.picsel\n.ei6,application/vnd.pg.osasli\n.elc,application/x-elc\n.el,text/x-script.elisp\n.eml,message/rfc822\n.emma,application/emma+xml\n.env,application/x-envoy\n.eol,audio/vnd.digital-winds\n.eot,application/vnd.ms-fontobject\n.eps,application/postscript\n.epub,application/epub+zip\n.es3,application/vnd.eszigno3+xml\n.es,application/ecmascript\n.es,application/x-esrehber\n.esf,application/vnd.epson.esf\n.etx,text/x-setext\n.evy,application/envoy\n.evy,application/x-envoy\n.exe,application/octet-stream\n.exe,application/x-msdownload\n.exi,application/exi\n.ext,application/vnd.novadigm.ext\n.ez2,application/vnd.ezpix-album\n.ez3,application/vnd.ezpix-package\n.f4v,video/x-f4v\n.f77,text/x-fortran\n.f90,text/plain\n.f90,text/x-fortran\n.fbs,image/vnd.fastbidsheet\n.fcs,application/vnd.isac.fcs\n.fdf,application/vnd.fdf\n.fe_launch,application/vnd.denovo.fcselayout-link\n.fg5,application/vnd.fujitsu.oasysgp\n.fh,image/x-freehand\n.fif,application/fractals\n.fif,image/fif\n.fig,application/x-xfig\n.fli,video/fli\n.fli,video/x-fli\n.flo,application/vnd.micrografx.flo\n.flo,image/florian\n.flv,video/x-flv\n.flw,application/vnd.kde.kivio\n.flx,text/vnd.fmi.flexstor\n.fly,text/vnd.fly\n.fm,application/vnd.framemaker\n.fmf,video/x-atomic3d-feature\n.fnc,application/vnd.frogans.fnc\n.for,text/plain\n.for,text/x-fortran\n.fpx,image/vnd.fpx\n.fpx,image/vnd.net-fpx\n.frl,application/freeloader\n.fsc,application/vnd.fsc.weblaunch\n.fst,image/vnd.fst\n.ftc,application/vnd.fluxtime.clip\n.f,text/plain\n.f,text/x-fortran\n.fti,application/vnd.anser-web-funds-transfer-initiation\n.funk,audio/make\n.fvt,video/vnd.fvt\n.fxp,application/vnd.adobe.fxp\n.fzs,application/vnd.fuzzysheet\n.g2w,application/vnd.geoplan\n.g3,image/g3fax\n.g3w,application/vnd.geospace\n.gac,application/vnd.groove-account\n.gdl,model/vnd.gdl\n.geo,application/vnd.dynageo\n.gex,application/vnd.geometry-explorer\n.ggb,application/vnd.geogebra.file\n.ggt,application/vnd.geogebra.tool\n.ghf,application/vnd.groove-help\n.gif,image/gif\n.gim,application/vnd.groove-identity-message\n.gl,video/gl\n.gl,video/x-gl\n.gmx,application/vnd.gmx\n.gnumeric,application/x-gnumeric\n.gph,application/vnd.flographit\n.gqf,application/vnd.grafeq\n.gram,application/srgs\n.grv,application/vnd.groove-injector\n.grxml,application/srgs+xml\n.gsd,audio/x-gsm\n.gsf,application/x-font-ghostscript\n.gsm,audio/x-gsm\n.gsp,application/x-gsp\n.gss,application/x-gss\n.gtar,application/x-gtar\n.g,text/plain\n.gtm,application/vnd.groove-tool-message\n.gtw,model/vnd.gtw\n.gv,text/vnd.graphviz\n.gxt,application/vnd.geonext\n.gz,application/x-compressed\n.gz,application/x-gzip\n.gzip,application/x-gzip\n.gzip,multipart/x-gzip\n.h261,video/h261\n.h263,video/h263\n.h264,video/h264\n.hal,application/vnd.hal+xml\n.hbci,application/vnd.hbci\n.hdf,application/x-hdf\n.help,application/x-helpfile\n.hgl,application/vnd.hp-hpgl\n.hh,text/plain\n.hh,text/x-h\n.hlb,text/x-script\n.hlp,application/hlp\n.hlp,application/winhlp\n.hlp,application/x-helpfile\n.hlp,application/x-winhelp\n.hpg,application/vnd.hp-hpgl\n.hpgl,application/vnd.hp-hpgl\n.hpid,application/vnd.hp-hpid\n.hps,application/vnd.hp-hps\n.hqx,application/binhex\n.hqx,application/binhex4\n.hqx,application/mac-binhex\n.hqx,application/mac-binhex40\n.hqx,application/x-binhex40\n.hqx,application/x-mac-binhex40\n.hta,application/hta\n.htc,text/x-component\n.h,text/plain\n.h,text/x-h\n.htke,application/vnd.kenameaapp\n.htmls,text/html\n.html,text/html\n.htm,text/html\n.htt,text/webviewhtml\n.htx,text/html\n.hvd,application/vnd.yamaha.hv-dic\n.hvp,application/vnd.yamaha.hv-voice\n.hvs,application/vnd.yamaha.hv-script\n.i2g,application/vnd.intergeo\n.icc,application/vnd.iccprofile\n.ice,x-conference/x-cooltalk\n.ico,image/x-icon\n.ics,text/calendar\n.idc,text/plain\n.ief,image/ief\n.iefs,image/ief\n.iff,application/iff\n.ifm,application/vnd.shana.informed.formdata\n.iges,application/iges\n.iges,model/iges\n.igl,application/vnd.igloader\n.igm,application/vnd.insors.igm\n.igs,application/iges\n.igs,model/iges\n.igx,application/vnd.micrografx.igx\n.iif,application/vnd.shana.informed.interchange\n.ima,application/x-ima\n.imap,application/x-httpd-imap\n.imp,application/vnd.accpac.simply.imp\n.ims,application/vnd.ms-ims\n.inf,application/inf\n.ins,application/x-internett-signup\n.ip,application/x-ip2\n.ipfix,application/ipfix\n.ipk,application/vnd.shana.informed.package\n.irm,application/vnd.ibm.rights-management\n.irp,application/vnd.irepository.package+xml\n.isu,video/x-isvideo\n.it,audio/it\n.itp,application/vnd.shana.informed.formtemplate\n.iv,application/x-inventor\n.ivp,application/vnd.immervision-ivp\n.ivr,i-world/i-vrml\n.ivu,application/vnd.immervision-ivu\n.ivy,application/x-livescreen\n.jad,text/vnd.sun.j2me.app-descriptor\n.jam,application/vnd.jam\n.jam,audio/x-jam\n.jar,application/java-archive\n.java,text/plain\n.java,text/x-java-source\n.jav,text/plain\n.jav,text/x-java-source\n.jcm,application/x-java-commerce\n.jfif,image/jpeg\n.jfif,image/pjpeg\n.jfif-tbnl,image/jpeg\n.jisp,application/vnd.jisp\n.jlt,application/vnd.hp-jlyt\n.jnlp,application/x-java-jnlp-file\n.joda,application/vnd.joost.joda-archive\n.jpeg,image/jpeg\n.jpe,image/jpeg\n.jpg,image/jpeg\n.jpgv,video/jpeg\n.jpm,video/jpm\n.jps,image/x-jps\n.js,application/javascript\n.json,application/json\n.jut,image/jutvision\n.kar,audio/midi\n.karbon,application/vnd.kde.karbon\n.kar,music/x-karaoke\n.key,application/pgp-keys\n.keychain,application/octet-stream\n.kfo,application/vnd.kde.kformula\n.kia,application/vnd.kidspiration\n.kml,application/vnd.google-earth.kml+xml\n.kmz,application/vnd.google-earth.kmz\n.kne,application/vnd.kinar\n.kon,application/vnd.kde.kontour\n.kpr,application/vnd.kde.kpresenter\n.ksh,application/x-ksh\n.ksh,text/x-script.ksh\n.ksp,application/vnd.kde.kspread\n.ktx,image/ktx\n.ktz,application/vnd.kahootz\n.kwd,application/vnd.kde.kword\n.la,audio/nspaudio\n.la,audio/x-nspaudio\n.lam,audio/x-liveaudio\n.lasxml,application/vnd.las.las+xml\n.latex,application/x-latex\n.lbd,application/vnd.llamagraphics.life-balance.desktop\n.lbe,application/vnd.llamagraphics.life-balance.exchange+xml\n.les,application/vnd.hhe.lesson-player\n.lha,application/lha\n.lha,application/x-lha\n.link66,application/vnd.route66.link66+xml\n.list,text/plain\n.lma,audio/nspaudio\n.lma,audio/x-nspaudio\n.log,text/plain\n.lrm,application/vnd.ms-lrm\n.lsp,application/x-lisp\n.lsp,text/x-script.lisp\n.lst,text/plain\n.lsx,text/x-la-asf\n.ltf,application/vnd.frogans.ltf\n.ltx,application/x-latex\n.lvp,audio/vnd.lucent.voice\n.lwp,application/vnd.lotus-wordpro\n.lzh,application/octet-stream\n.lzh,application/x-lzh\n.lzx,application/lzx\n.lzx,application/octet-stream\n.lzx,application/x-lzx\n.m1v,video/mpeg\n.m21,application/mp21\n.m2a,audio/mpeg\n.m2v,video/mpeg\n.m3u8,application/vnd.apple.mpegurl\n.m3u,audio/x-mpegurl\n.m4a,audio/mp4\n.m4v,video/mp4\n.ma,application/mathematica\n.mads,application/mads+xml\n.mag,application/vnd.ecowin.chart\n.man,application/x-troff-man\n.map,application/x-navimap\n.mar,text/plain\n.mathml,application/mathml+xml\n.mbd,application/mbedlet\n.mbk,application/vnd.mobius.mbk\n.mbox,application/mbox\n.mc1,application/vnd.medcalcdata\n.mc$,application/x-magic-cap-package-1.0\n.mcd,application/mcad\n.mcd,application/vnd.mcd\n.mcd,application/x-mathcad\n.mcf,image/vasa\n.mcf,text/mcf\n.mcp,application/netmc\n.mcurl,text/vnd.curl.mcurl\n.mdb,application/x-msaccess\n.mdi,image/vnd.ms-modi\n.me,application/x-troff-me\n.meta4,application/metalink4+xml\n.mets,application/mets+xml\n.mfm,application/vnd.mfmp\n.mgp,application/vnd.osgeo.mapguide.package\n.mgz,application/vnd.proteus.magazine\n.mht,message/rfc822\n.mhtml,message/rfc822\n.mid,application/x-midi\n.mid,audio/midi\n.mid,audio/x-mid\n.midi,application/x-midi\n.midi,audio/midi\n.midi,audio/x-mid\n.midi,audio/x-midi\n.midi,music/crescendo\n.midi,x-music/x-midi\n.mid,music/crescendo\n.mid,x-music/x-midi\n.mif,application/vnd.mif\n.mif,application/x-frame\n.mif,application/x-mif\n.mime,message/rfc822\n.mime,www/mime\n.mj2,video/mj2\n.mjf,audio/x-vnd.audioexplosion.mjuicemediafile\n.mjpg,video/x-motion-jpeg\n.mkv,video/x-matroska\n.mkv,audio/x-matroska\n.mlp,application/vnd.dolby.mlp\n.mm,application/base64\n.mm,application/x-meme\n.mmd,application/vnd.chipnuts.karaoke-mmd\n.mme,application/base64\n.mmf,application/vnd.smaf\n.mmr,image/vnd.fujixerox.edmics-mmr\n.mny,application/x-msmoney\n.mod,audio/mod\n.mod,audio/x-mod\n.mods,application/mods+xml\n.moov,video/quicktime\n.movie,video/x-sgi-movie\n.mov,video/quicktime\n.mp2,audio/mpeg\n.mp2,audio/x-mpeg\n.mp2,video/mpeg\n.mp2,video/x-mpeg\n.mp2,video/x-mpeq2a\n.mp3,audio/mpeg\n.mp3,audio/mpeg3\n.mp4a,audio/mp4\n.mp4,video/mp4\n.mp4,application/mp4\n.mpa,audio/mpeg\n.mpc,application/vnd.mophun.certificate\n.mpc,application/x-project\n.mpeg,video/mpeg\n.mpe,video/mpeg\n.mpga,audio/mpeg\n.mpg,video/mpeg\n.mpg,audio/mpeg\n.mpkg,application/vnd.apple.installer+xml\n.mpm,application/vnd.blueice.multipass\n.mpn,application/vnd.mophun.application\n.mpp,application/vnd.ms-project\n.mpt,application/x-project\n.mpv,application/x-project\n.mpx,application/x-project\n.mpy,application/vnd.ibm.minipay\n.mqy,application/vnd.mobius.mqy\n.mrc,application/marc\n.mrcx,application/marcxml+xml\n.ms,application/x-troff-ms\n.mscml,application/mediaservercontrol+xml\n.mseq,application/vnd.mseq\n.msf,application/vnd.epson.msf\n.msg,application/vnd.ms-outlook\n.msh,model/mesh\n.msl,application/vnd.mobius.msl\n.msty,application/vnd.muvee.style\n.m,text/plain\n.m,text/x-m\n.mts,model/vnd.mts\n.mus,application/vnd.musician\n.musicxml,application/vnd.recordare.musicxml+xml\n.mvb,application/x-msmediaview\n.mv,video/x-sgi-movie\n.mwf,application/vnd.mfer\n.mxf,application/mxf\n.mxl,application/vnd.recordare.musicxml\n.mxml,application/xv+xml\n.mxs,application/vnd.triscape.mxs\n.mxu,video/vnd.mpegurl\n.my,audio/make\n.mzz,application/x-vnd.audioexplosion.mzz\n.n3,text/n3\nN/A,application/andrew-inset\n.nap,image/naplps\n.naplps,image/naplps\n.nbp,application/vnd.wolfram.player\n.nc,application/x-netcdf\n.ncm,application/vnd.nokia.configuration-message\n.ncx,application/x-dtbncx+xml\n.n-gage,application/vnd.nokia.n-gage.symbian.install\n.ngdat,application/vnd.nokia.n-gage.data\n.niff,image/x-niff\n.nif,image/x-niff\n.nix,application/x-mix-transfer\n.nlu,application/vnd.neurolanguage.nlu\n.nml,application/vnd.enliven\n.nnd,application/vnd.noblenet-directory\n.nns,application/vnd.noblenet-sealer\n.nnw,application/vnd.noblenet-web\n.npx,image/vnd.net-fpx\n.nsc,application/x-conference\n.nsf,application/vnd.lotus-notes\n.nvd,application/x-navidoc\n.oa2,application/vnd.fujitsu.oasys2\n.oa3,application/vnd.fujitsu.oasys3\n.o,application/octet-stream\n.oas,application/vnd.fujitsu.oasys\n.obd,application/x-msbinder\n.oda,application/oda\n.odb,application/vnd.oasis.opendocument.database\n.odc,application/vnd.oasis.opendocument.chart\n.odf,application/vnd.oasis.opendocument.formula\n.odft,application/vnd.oasis.opendocument.formula-template\n.odg,application/vnd.oasis.opendocument.graphics\n.odi,application/vnd.oasis.opendocument.image\n.odm,application/vnd.oasis.opendocument.text-master\n.odp,application/vnd.oasis.opendocument.presentation\n.ods,application/vnd.oasis.opendocument.spreadsheet\n.odt,application/vnd.oasis.opendocument.text\n.oga,audio/ogg\n.ogg,audio/ogg\n.ogv,video/ogg\n.ogx,application/ogg\n.omc,application/x-omc\n.omcd,application/x-omcdatamaker\n.omcr,application/x-omcregerator\n.onetoc,application/onenote\n.opf,application/oebps-package+xml\n.org,application/vnd.lotus-organizer\n.osf,application/vnd.yamaha.openscoreformat\n.osfpvg,application/vnd.yamaha.openscoreformat.osfpvg+xml\n.otc,application/vnd.oasis.opendocument.chart-template\n.otf,application/x-font-otf\n.otg,application/vnd.oasis.opendocument.graphics-template\n.oth,application/vnd.oasis.opendocument.text-web\n.oti,application/vnd.oasis.opendocument.image-template\n.otp,application/vnd.oasis.opendocument.presentation-template\n.ots,application/vnd.oasis.opendocument.spreadsheet-template\n.ott,application/vnd.oasis.opendocument.text-template\n.oxt,application/vnd.openofficeorg.extension\n.p10,application/pkcs10\n.p12,application/pkcs-12\n.p7a,application/x-pkcs7-signature\n.p7b,application/x-pkcs7-certificates\n.p7c,application/pkcs7-mime\n.p7m,application/pkcs7-mime\n.p7r,application/x-pkcs7-certreqresp\n.p7s,application/pkcs7-signature\n.p8,application/pkcs8\n.pages,application/vnd.apple.pages\n.part,application/pro_eng\n.par,text/plain-bas\n.pas,text/pascal\n.paw,application/vnd.pawaafile\n.pbd,application/vnd.powerbuilder6\n.pbm,image/x-portable-bitmap\n.pcf,application/x-font-pcf\n.pcl,application/vnd.hp-pcl\n.pcl,application/x-pcl\n.pclxl,application/vnd.hp-pclxl\n.pct,image/x-pict\n.pcurl,application/vnd.curl.pcurl\n.pcx,image/x-pcx\n.pdb,application/vnd.palm\n.pdb,chemical/x-pdb\n.pdf,application/pdf\n.pem,application/x-pem-file\n.pfa,application/x-font-type1\n.pfr,application/font-tdpfr\n.pfunk,audio/make\n.pfunk,audio/make.my.funk\n.pfx,application/x-pkcs12\n.pgm,image/x-portable-graymap\n.pgn,application/x-chess-pgn\n.pgp,application/pgp-signature\n.pic,image/pict\n.pict,image/pict\n.pkg,application/x-newton-compatible-pkg\n.pki,application/pkixcmp\n.pkipath,application/pkix-pkipath\n.pko,application/vnd.ms-pki.pko\n.plb,application/vnd.3gpp.pic-bw-large\n.plc,application/vnd.mobius.plc\n.plf,application/vnd.pocketlearn\n.pls,application/pls+xml\n.pl,text/plain\n.pl,text/x-script.perl\n.plx,application/x-pixclscript\n.pm4,application/x-pagemaker\n.pm5,application/x-pagemaker\n.pm,image/x-xpixmap\n.pml,application/vnd.ctc-posml\n.pm,text/x-script.perl-module\n.png,image/png\n.pnm,application/x-portable-anymap\n.pnm,image/x-portable-anymap\n.portpkg,application/vnd.macports.portpkg\n.pot,application/mspowerpoint\n.pot,application/vnd.ms-powerpoint\n.potm,application/vnd.ms-powerpoint.template.macroenabled.12\n.potx,application/vnd.openxmlformats-officedocument.presentationml.template\n.pov,model/x-pov\n.ppa,application/vnd.ms-powerpoint\n.ppam,application/vnd.ms-powerpoint.addin.macroenabled.12\n.ppd,application/vnd.cups-ppd\n.ppm,image/x-portable-pixmap\n.pps,application/mspowerpoint\n.pps,application/vnd.ms-powerpoint\n.ppsm,application/vnd.ms-powerpoint.slideshow.macroenabled.12\n.ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow\n.ppt,application/mspowerpoint\n.ppt,application/powerpoint\n.ppt,application/vnd.ms-powerpoint\n.ppt,application/x-mspowerpoint\n.pptm,application/vnd.ms-powerpoint.presentation.macroenabled.12\n.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation\n.ppz,application/mspowerpoint\n.prc,application/x-mobipocket-ebook\n.pre,application/vnd.lotus-freelance\n.pre,application/x-freelance\n.prf,application/pics-rules\n.prt,application/pro_eng\n.ps,application/postscript\n.psb,application/vnd.3gpp.pic-bw-small\n.psd,application/octet-stream\n.psd,image/vnd.adobe.photoshop\n.psf,application/x-font-linux-psf\n.pskcxml,application/pskc+xml\n.p,text/x-pascal\n.ptid,application/vnd.pvi.ptid1\n.pub,application/x-mspublisher\n.pvb,application/vnd.3gpp.pic-bw-var\n.pvu,paleovu/x-pv\n.pwn,application/vnd.3m.post-it-notes\n.pwz,application/vnd.ms-powerpoint\n.pya,audio/vnd.ms-playready.media.pya\n.pyc,application/x-bytecode.python\n.py,text/x-script.python\n.pyv,video/vnd.ms-playready.media.pyv\n.qam,application/vnd.epson.quickanime\n.qbo,application/vnd.intu.qbo\n.qcp,audio/vnd.qcelp\n.qd3d,x-world/x-3dmf\n.qd3,x-world/x-3dmf\n.qfx,application/vnd.intu.qfx\n.qif,image/x-quicktime\n.qps,application/vnd.publishare-delta-tree\n.qtc,video/x-qtc\n.qtif,image/x-quicktime\n.qti,image/x-quicktime\n.qt,video/quicktime\n.qxd,application/vnd.quark.quarkxpress\n.ra,audio/x-pn-realaudio\n.ra,audio/x-pn-realaudio-plugin\n.ra,audio/x-realaudio\n.ram,audio/x-pn-realaudio\n.rar,application/x-rar-compressed\n.ras,application/x-cmu-raster\n.ras,image/cmu-raster\n.ras,image/x-cmu-raster\n.rast,image/cmu-raster\n.rcprofile,application/vnd.ipunplugged.rcprofile\n.rdf,application/rdf+xml\n.rdz,application/vnd.data-vision.rdz\n.rep,application/vnd.businessobjects\n.res,application/x-dtbresource+xml\n.rexx,text/x-script.rexx\n.rf,image/vnd.rn-realflash\n.rgb,image/x-rgb\n.rif,application/reginfo+xml\n.rip,audio/vnd.rip\n.rl,application/resource-lists+xml\n.rlc,image/vnd.fujixerox.edmics-rlc\n.rld,application/resource-lists-diff+xml\n.rm,application/vnd.rn-realmedia\n.rm,audio/x-pn-realaudio\n.rmi,audio/mid\n.rmm,audio/x-pn-realaudio\n.rmp,audio/x-pn-realaudio\n.rmp,audio/x-pn-realaudio-plugin\n.rms,application/vnd.jcp.javame.midlet-rms\n.rnc,application/relax-ng-compact-syntax\n.rng,application/ringing-tones\n.rng,application/vnd.nokia.ringing-tone\n.rnx,application/vnd.rn-realplayer\n.roff,application/x-troff\n.rp9,application/vnd.cloanto.rp9\n.rp,image/vnd.rn-realpix\n.rpm,audio/x-pn-realaudio-plugin\n.rpm,application/x-rpm\n.rpss,application/vnd.nokia.radio-presets\n.rpst,application/vnd.nokia.radio-preset\n.rq,application/sparql-query\n.rs,application/rls-services+xml\n.rsd,application/rsd+xml\n.rss,application/rss+xml\n.rtf,application/rtf\n.rtf,text/rtf\n.rt,text/richtext\n.rt,text/vnd.rn-realtext\n.rtx,application/rtf\n.rtx,text/richtext\n.rv,video/vnd.rn-realvideo\n.s3m,audio/s3m\n.saf,application/vnd.yamaha.smaf-audio\n.saveme,application/octet-stream\n.sbk,application/x-tbook\n.sbml,application/sbml+xml\n.sc,application/vnd.ibm.secure-container\n.scd,application/x-msschedule\n.scm,application/vnd.lotus-screencam\n.scm,application/x-lotusscreencam\n.scm,text/x-script.guile\n.scm,text/x-script.scheme\n.scm,video/x-scm\n.scq,application/scvp-cv-request\n.scs,application/scvp-cv-response\n.scurl,text/vnd.curl.scurl\n.sda,application/vnd.stardivision.draw\n.sdc,application/vnd.stardivision.calc\n.sdd,application/vnd.stardivision.impress\n.sdf,application/octet-stream\n.sdkm,application/vnd.solent.sdkm+xml\n.sdml,text/plain\n.sdp,application/sdp\n.sdp,application/x-sdp\n.sdr,application/sounder\n.sdw,application/vnd.stardivision.writer\n.sea,application/sea\n.sea,application/x-sea\n.see,application/vnd.seemail\n.seed,application/vnd.fdsn.seed\n.sema,application/vnd.sema\n.semd,application/vnd.semd\n.semf,application/vnd.semf\n.ser,application/java-serialized-object\n.set,application/set\n.setpay,application/set-payment-initiation\n.setreg,application/set-registration-initiation\n.sfd-hdstx,application/vnd.hydrostatix.sof-data\n.sfs,application/vnd.spotfire.sfs\n.sgl,application/vnd.stardivision.writer-global\n.sgml,text/sgml\n.sgml,text/x-sgml\n.sgm,text/sgml\n.sgm,text/x-sgml\n.sh,application/x-bsh\n.sh,application/x-sh\n.sh,application/x-shar\n.shar,application/x-bsh\n.shar,application/x-shar\n.shf,application/shf+xml\n.sh,text/x-script.sh\n.shtml,text/html\n.shtml,text/x-server-parsed-html\n.sid,audio/x-psid\n.sis,application/vnd.symbian.install\n.sit,application/x-sit\n.sit,application/x-stuffit\n.sitx,application/x-stuffitx\n.skd,application/x-koan\n.skm,application/x-koan\n.skp,application/vnd.koan\n.skp,application/x-koan\n.skt,application/x-koan\n.sl,application/x-seelogo\n.sldm,application/vnd.ms-powerpoint.slide.macroenabled.12\n.sldx,application/vnd.openxmlformats-officedocument.presentationml.slide\n.slt,application/vnd.epson.salt\n.sm,application/vnd.stepmania.stepchart\n.smf,application/vnd.stardivision.math\n.smi,application/smil\n.smi,application/smil+xml\n.smil,application/smil\n.snd,audio/basic\n.snd,audio/x-adpcm\n.snf,application/x-font-snf\n.sol,application/solids\n.spc,application/x-pkcs7-certificates\n.spc,text/x-speech\n.spf,application/vnd.yamaha.smaf-phrase\n.spl,application/futuresplash\n.spl,application/x-futuresplash\n.spot,text/vnd.in3d.spot\n.spp,application/scvp-vp-response\n.spq,application/scvp-vp-request\n.spr,application/x-sprite\n.sprite,application/x-sprite\n.src,application/x-wais-source\n.srt,text/srt\n.sru,application/sru+xml\n.srx,application/sparql-results+xml\n.sse,application/vnd.kodak-descriptor\n.ssf,application/vnd.epson.ssf\n.ssi,text/x-server-parsed-html\n.ssm,application/streamingmedia\n.ssml,application/ssml+xml\n.sst,application/vnd.ms-pki.certstore\n.st,application/vnd.sailingtracker.track\n.stc,application/vnd.sun.xml.calc.template\n.std,application/vnd.sun.xml.draw.template\n.step,application/step\n.s,text/x-asm\n.stf,application/vnd.wt.stf\n.sti,application/vnd.sun.xml.impress.template\n.stk,application/hyperstudio\n.stl,application/sla\n.stl,application/vnd.ms-pki.stl\n.stl,application/x-navistyle\n.stp,application/step\n.str,application/vnd.pg.format\n.stw,application/vnd.sun.xml.writer.template\n.sub,image/vnd.dvb.subtitle\n.sus,application/vnd.sus-calendar\n.sv4cpio,application/x-sv4cpio\n.sv4crc,application/x-sv4crc\n.svc,application/vnd.dvb.service\n.svd,application/vnd.svd\n.svf,image/vnd.dwg\n.svf,image/x-dwg\n.svg,image/svg+xml\n.svr,application/x-world\n.svr,x-world/x-svr\n.swf,application/x-shockwave-flash\n.swi,application/vnd.aristanetworks.swi\n.sxc,application/vnd.sun.xml.calc\n.sxd,application/vnd.sun.xml.draw\n.sxg,application/vnd.sun.xml.writer.global\n.sxi,application/vnd.sun.xml.impress\n.sxm,application/vnd.sun.xml.math\n.sxw,application/vnd.sun.xml.writer\n.talk,text/x-speech\n.tao,application/vnd.tao.intent-module-archive\n.t,application/x-troff\n.tar,application/x-tar\n.tbk,application/toolbook\n.tbk,application/x-tbook\n.tcap,application/vnd.3gpp2.tcap\n.tcl,application/x-tcl\n.tcl,text/x-script.tcl\n.tcsh,text/x-script.tcsh\n.teacher,application/vnd.smart.teacher\n.tei,application/tei+xml\n.tex,application/x-tex\n.texi,application/x-texinfo\n.texinfo,application/x-texinfo\n.text,text/plain\n.tfi,application/thraud+xml\n.tfm,application/x-tex-tfm\n.tgz,application/gnutar\n.tgz,application/x-compressed\n.thmx,application/vnd.ms-officetheme\n.tiff,image/tiff\n.tif,image/tiff\n.tmo,application/vnd.tmobile-livetv\n.torrent,application/x-bittorrent\n.tpl,application/vnd.groove-tool-template\n.tpt,application/vnd.trid.tpt\n.tra,application/vnd.trueapp\n.tr,application/x-troff\n.trm,application/x-msterminal\n.tsd,application/timestamped-data\n.tsi,audio/tsp-audio\n.tsp,application/dsptype\n.tsp,audio/tsplayer\n.tsv,text/tab-separated-values\n.t,text/troff\n.ttf,application/x-font-ttf\n.ttl,text/turtle\n.turbot,image/florian\n.twd,application/vnd.simtech-mindmapper\n.txd,application/vnd.genomatix.tuxedo\n.txf,application/vnd.mobius.txf\n.txt,text/plain\n.ufd,application/vnd.ufdl\n.uil,text/x-uil\n.umj,application/vnd.umajin\n.unis,text/uri-list\n.uni,text/uri-list\n.unityweb,application/vnd.unity\n.unv,application/i-deas\n.uoml,application/vnd.uoml+xml\n.uris,text/uri-list\n.uri,text/uri-list\n.ustar,application/x-ustar\n.ustar,multipart/x-ustar\n.utz,application/vnd.uiq.theme\n.uu,application/octet-stream\n.uue,text/x-uuencode\n.uu,text/x-uuencode\n.uva,audio/vnd.dece.audio\n.uvh,video/vnd.dece.hd\n.uvi,image/vnd.dece.graphic\n.uvm,video/vnd.dece.mobile\n.uvp,video/vnd.dece.pd\n.uvs,video/vnd.dece.sd\n.uvu,video/vnd.uvvu.mp4\n.uvv,video/vnd.dece.video\n.vcd,application/x-cdlink\n.vcf,text/x-vcard\n.vcg,application/vnd.groove-vcard\n.vcs,text/x-vcalendar\n.vcx,application/vnd.vcx\n.vda,application/vda\n.vdo,video/vdo\n.vew,application/groupwise\n.vis,application/vnd.visionary\n.vivo,video/vivo\n.vivo,video/vnd.vivo\n.viv,video/vivo\n.viv,video/vnd.vivo\n.vmd,application/vocaltec-media-desc\n.vmf,application/vocaltec-media-file\n.vob,video/dvd\n.voc,audio/voc\n.voc,audio/x-voc\n.vos,video/vosaic\n.vox,audio/voxware\n.vqe,audio/x-twinvq-plugin\n.vqf,audio/x-twinvq\n.vql,audio/x-twinvq-plugin\n.vrml,application/x-vrml\n.vrml,model/vrml\n.vrml,x-world/x-vrml\n.vrt,x-world/x-vrt\n.vsd,application/vnd.visio\n.vsd,application/x-visio\n.vsf,application/vnd.vsf\n.vst,application/x-visio\n.vsw,application/x-visio\n.vtt,text/vtt\n.vtu,model/vnd.vtu\n.vxml,application/voicexml+xml\n.w60,application/wordperfect6.0\n.w61,application/wordperfect6.1\n.w6w,application/msword\n.wad,application/x-doom\n.war,application/zip\n.wasm,application/wasm\n.wav,audio/wav\n.wax,audio/x-ms-wax\n.wb1,application/x-qpro\n.wbmp,image/vnd.wap.wbmp\n.wbs,application/vnd.criticaltools.wbs+xml\n.wbxml,application/vnd.wap.wbxml\n.weba,audio/webm\n.web,application/vnd.xara\n.webm,video/webm\n.webp,image/webp\n.wg,application/vnd.pmi.widget\n.wgt,application/widget\n.wiz,application/msword\n.wk1,application/x-123\n.wma,audio/x-ms-wma\n.wmd,application/x-ms-wmd\n.wmf,application/x-msmetafile\n.wmf,windows/metafile\n.wmlc,application/vnd.wap.wmlc\n.wmlsc,application/vnd.wap.wmlscriptc\n.wmls,text/vnd.wap.wmlscript\n.wml,text/vnd.wap.wml\n.wm,video/x-ms-wm\n.wmv,video/x-ms-wmv\n.wmx,video/x-ms-wmx\n.wmz,application/x-ms-wmz\n.woff,application/x-font-woff\n.word,application/msword\n.wp5,application/wordperfect\n.wp5,application/wordperfect6.0\n.wp6,application/wordperfect\n.wp,application/wordperfect\n.wpd,application/vnd.wordperfect\n.wpd,application/wordperfect\n.wpd,application/x-wpwin\n.wpl,application/vnd.ms-wpl\n.wps,application/vnd.ms-works\n.wq1,application/x-lotus\n.wqd,application/vnd.wqd\n.wri,application/mswrite\n.wri,application/x-mswrite\n.wri,application/x-wri\n.wrl,application/x-world\n.wrl,model/vrml\n.wrl,x-world/x-vrml\n.wrz,model/vrml\n.wrz,x-world/x-vrml\n.wsc,text/scriplet\n.wsdl,application/wsdl+xml\n.wspolicy,application/wspolicy+xml\n.wsrc,application/x-wais-source\n.wtb,application/vnd.webturbo\n.wtk,application/x-wintalk\n.wvx,video/x-ms-wvx\n.x3d,application/vnd.hzn-3d-crossword\n.xap,application/x-silverlight-app\n.xar,application/vnd.xara\n.xbap,application/x-ms-xbap\n.xbd,application/vnd.fujixerox.docuworks.binder\n.xbm,image/xbm\n.xbm,image/x-xbitmap\n.xbm,image/x-xbm\n.xdf,application/xcap-diff+xml\n.xdm,application/vnd.syncml.dm+xml\n.xdp,application/vnd.adobe.xdp+xml\n.xdr,video/x-amt-demorun\n.xdssc,application/dssc+xml\n.xdw,application/vnd.fujixerox.docuworks\n.xenc,application/xenc+xml\n.xer,application/patch-ops-error+xml\n.xfdf,application/vnd.adobe.xfdf\n.xfdl,application/vnd.xfdl\n.xgz,xgl/drawing\n.xhtml,application/xhtml+xml\n.xif,image/vnd.xiff\n.xla,application/excel\n.xla,application/x-excel\n.xla,application/x-msexcel\n.xlam,application/vnd.ms-excel.addin.macroenabled.12\n.xl,application/excel\n.xlb,application/excel\n.xlb,application/vnd.ms-excel\n.xlb,application/x-excel\n.xlc,application/excel\n.xlc,application/vnd.ms-excel\n.xlc,application/x-excel\n.xld,application/excel\n.xld,application/x-excel\n.xlk,application/excel\n.xlk,application/x-excel\n.xll,application/excel\n.xll,application/vnd.ms-excel\n.xll,application/x-excel\n.xlm,application/excel\n.xlm,application/vnd.ms-excel\n.xlm,application/x-excel\n.xls,application/excel\n.xls,application/vnd.ms-excel\n.xls,application/x-excel\n.xls,application/x-msexcel\n.xlsb,application/vnd.ms-excel.sheet.binary.macroenabled.12\n.xlsm,application/vnd.ms-excel.sheet.macroenabled.12\n.xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\n.xlt,application/excel\n.xlt,application/x-excel\n.xltm,application/vnd.ms-excel.template.macroenabled.12\n.xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template\n.xlv,application/excel\n.xlv,application/x-excel\n.xlw,application/excel\n.xlw,application/vnd.ms-excel\n.xlw,application/x-excel\n.xlw,application/x-msexcel\n.xm,audio/xm\n.xml,application/xml\n.xml,text/xml\n.xmz,xgl/movie\n.xo,application/vnd.olpc-sugar\n.xop,application/xop+xml\n.xpi,application/x-xpinstall\n.xpix,application/x-vnd.ls-xpix\n.xpm,image/xpm\n.xpm,image/x-xpixmap\n.x-png,image/png\n.xpr,application/vnd.is-xpr\n.xps,application/vnd.ms-xpsdocument\n.xpw,application/vnd.intercon.formnet\n.xslt,application/xslt+xml\n.xsm,application/vnd.syncml+xml\n.xspf,application/xspf+xml\n.xsr,video/x-amt-showrun\n.xul,application/vnd.mozilla.xul+xml\n.xwd,image/x-xwd\n.xwd,image/x-xwindowdump\n.xyz,chemical/x-pdb\n.xyz,chemical/x-xyz\n.xz,application/x-xz\n.yaml,text/yaml\n.yang,application/yang\n.yin,application/yin+xml\n.z,application/x-compress\n.z,application/x-compressed\n.zaz,application/vnd.zzazz.deck+xml\n.zip,application/zip\n.zip,application/x-compressed\n.zip,application/x-zip-compressed\n.zip,multipart/x-zip\n.zir,application/vnd.zul\n.zmm,application/vnd.handheld-entertainment+xml\n.zoo,application/octet-stream\n.zsh,text/x-script.zsh\n"),ki))}function xi(){return Li.value}function wi(){ji()}function zi(){Gi=this,this.Empty=Hi()}Ri.$metadata$={kind:E,simpleName:"HttpStatusCode",interfaces:[]},Ri.prototype.component1=function(){return this.value},Ri.prototype.component2=function(){return this.description},Ri.prototype.copy_19mbxw$=function(t,e){return new Ri(void 0===t?this.value:t,void 0===e?this.description:e)},zi.prototype.build_itqcaa$=Nt("ktor-ktor-http-js-legacy.io.ktor.http.Parameters.Companion.build_itqcaa$",gt((function(){var e=t.io.ktor.http.ParametersBuilder_za3lpa$;return function(t){var n=e();return t(n),n.build()}}))),zi.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var Gi=null;function ji(){return null===Gi&&new zi,Gi}function Fi(){}function Mi(t){return void 0===t&&(t=8),new Wi(t)}function Wi(t){void 0===t&&(t=8),Mt.call(this,!0,t)}function Xi(t){void 0===t&&(t=lt()),qt.call(this,!0,t)}function Bi(){qi=this}wi.$metadata$={kind:Q,simpleName:"Parameters",interfaces:[Ft]},Fi.$metadata$={kind:Q,simpleName:"ParametersBuilder",interfaces:[re]},Wi.prototype.build=function(){return new Xi(this.values)},Wi.$metadata$={kind:E,simpleName:"ParametersBuilderImpl",interfaces:[Fi,Mt]},Xi.prototype.toString=function(){return"Parameters "+this.entries()},Xi.$metadata$={kind:E,simpleName:"ParametersImpl",interfaces:[qt,wi]},Object.defineProperty(Bi.prototype,"caseInsensitiveName",{configurable:!0,get:function(){return!0}}),Bi.prototype.getAll_61zpoe$=function(t){return null},Bi.prototype.names=function(){return Wt()},Bi.prototype.entries=function(){return Wt()},Bi.prototype.isEmpty=function(){return!0},Bi.prototype.toString=function(){return"Parameters "+this.entries()},Bi.prototype.equals=function(t){return e.isType(t,wi)&&t.isEmpty()},Bi.$metadata$={kind:V,simpleName:"EmptyParameters",interfaces:[wi]};var qi=null;function Hi(){return null===qi&&new Bi,qi}function Vi(t,e,n,i){var o;if(void 0===e&&(e=0),void 0===n&&(n=1e3),void 0===i&&(i=!0),e>jt(t))o=ji().Empty;else{var r=Mi();!function(t,e,n,i,o){var r,a=0,s=n,c=-1;r=jt(e);for(var l=n;l<=r;l++){if(a===i)return;switch(e.charCodeAt(l)){case 38:Ki(t,e,s,c,l,o),s=l+1|0,c=-1,a=a+1|0;break;case 61:-1===c&&(c=l)}}a!==i&&Ki(t,e,s,c,e.length,o)}(r,t,e,n,i),o=r.build()}return o}function Ki(t,e,n,i,o,r){if(-1!==i){var a=Yi(n,i,e),s=Ji(a,i,e);if(s>a){var c=r?We(e,a,s):e.substring(a,s),l=Yi(i+1|0,o,e),p=Ji(l,o,e),u=r?We(e,l,p,!0):e.substring(l,p);t.append_puj7f4$(c,u)}}else{var d=Yi(n,o,e),h=Ji(d,o,e);if(h>d){var E=r?We(e,d,h):e.substring(d,h);t.appendAll_poujtz$(E,K())}}}function Ji(t,e,n){for(var i=e;i>t&&Et(n.charCodeAt(i-1|0));)i=i-1|0;return i}function Yi(t,e,n){for(var i=t;i0&&(e.append_s8itvh$(35),e.append_gw00v9$(t.encodedFragment)),e}(this,w(256)).toString()},Qi.prototype.build=function(){return this.applyOrigin_0(),new go(this.protocol,this.host,this.port,this.pathSegments,this.parameters.build(),this.fragment,this.user,this.password,this.trailingQuery,this.buildString())},Qi.prototype.applyOrigin_0=function(){var t;this.host.length>0||m(this.protocol.name,"file")||(this.host=no().originUrl_0.host,null!=(t=this.protocol)&&t.equals(mo().HTTP)&&(this.protocol=no().originUrl_0.protocol),0===this.port&&(this.port=no().originUrl_0.specifiedPort))},Zi.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var to,eo=null;function no(){return null===eo&&new Zi,eo}function io(t){var e=F();return No(e,t.encodedUser,t.encodedPassword),e.toString()}function oo(t){var e=F();return e.append_pdl1vj$(io(t)),e.append_pdl1vj$(t.host),0!==t.port&&t.port!==t.protocol.defaultPort&&(e.append_pdl1vj$(":"),e.append_pdl1vj$(t.port.toString())),e.toString()}function ro(t){return function(t){return t.isEmpty()?"":1===t.size?0===le(t).length?"/":le(t):T(t,"/")}(t.encodedPathSegments)}function ao(t,n){var i;i=tt(n)?K():m(n,"/")?to:ue(ae(n,e.charArrayOf(47))),t.encodedPathSegments=i}function so(t,n){var i;if(tt(n))return t;try{i=lo(t,n)}catch(t){throw e.isType(t,xt)?new co(n,t):t}return i}function co(t,e){It.call(this,"Fail to parse url: "+t,e),this.name="URLParserException"}function lo(t,n){var i,o,r,a,s;t:do{var c,l,p,u;l=(c=he(n)).first,p=c.last,u=c.step;for(var d=l;d<=p;d+=u)if(!Et(C(L(n.charCodeAt(d))))){s=d;break t}s=-1}while(0);var h,E=s;t:do{var _;for(_=Ee(he(n)).iterator();_.hasNext();){var f=_.next();if(!Et(C(L(n.charCodeAt(f))))){h=f;break t}}h=-1}while(0);var y=h+1|0,T=function(t,e,n){var i=e,o=-1,r=t.charCodeAt(i);for(new N(97,122).contains_mef7kx$(r)||new N(65,90).contains_mef7kx$(r)||(o=i);i0){var $=E,g=E+T|0,S=n.substring($,g);t.protocol=mo().createOrDefault_61zpoe$(S),E=E+(T+1)|0}var I=function(t,e,n,i){for(var o=0;(e+o|0)=2)t:for(;;){var b=de(n,Ot("@/\\?#"),E),v=null!=(i=b>0?b:null)?i:y;if(!(v=y)return t.encodedPathSegments=47===n.charCodeAt(y-1|0)?to:K(),t;o=0===I?pe(t.encodedPathSegments,1):K(),t.encodedPathSegments=o;var P=de(n,Ot("?#"),E),x=null!=(r=P>0?P:null)?r:y;if(x>E){var w=E,z=n.substring(w,x),G=1===t.encodedPathSegments.size;G&&(G=0===le(t.encodedPathSegments).length);var j=G?K():t.encodedPathSegments,F=m(z,"/")?to:ae(z,e.charArrayOf(47));a=1===I?to:K();var M=R(a,F);t.encodedPathSegments=R(j,M),E=x}return E0?a:null)?o:i,c=n+1|0;return Vi(e.substring(c,s),void 0,void 0,!1).forEach_ubvtmq$((r=t,function(t,e){return r.encodedParameters.appendAll_poujtz$(t,e),k})),s}(t,n,E,y)),function(t,e,n,i){if(n0?r:null)?o:i;if(t.host=e.substring(n,a),(a+1|0)0){n=!0;break t}}n=!1}while(0);return n},dr.prototype.ifUnmodifiedSince_iwdcyr$=function(t){var n;t:do{var i;if(e.isType(t,at)&&t.isEmpty()){n=!0;break t}for(i=t.iterator();i.hasNext();){var o=i.next();if(!(this.truncatedModificationDate_0.compareTo_11rb$(o)<=0)){n=!1;break t}}n=!0}while(0);return n},dr.prototype.appendHeadersTo_ewccyn$=function(t){t.set_puj7f4$(hi().LastModified,On(this.lastModified))},dr.prototype.parseDates_0=function(t){var n,i=Tt();for(n=t.iterator();n.hasNext();){var o=n.next();tt(o)||i.add_11rb$(o)}var r,a=Tt();for(r=i.iterator();r.hasNext();){var s,c,l=r.next();t:do{try{c=vn(l)}catch(t){if(e.isType(t,xt)){c=null;break t}throw t}}while(0);null!=(s=c)&&a.add_11rb$(s)}return a.isEmpty()?null:a},dr.$metadata$={kind:E,simpleName:"LastModifiedVersion",interfaces:[ar]},dr.prototype.component1=function(){return this.lastModified},dr.prototype.copy_ou65wy$=function(t){return new dr(void 0===t?this.lastModified:t)},dr.prototype.toString=function(){return"LastModifiedVersion(lastModified="+e.toString(this.lastModified)+")"},dr.prototype.hashCode=function(){var t=0;return t=31*t+e.hashCode(this.lastModified)|0},dr.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.lastModified,t.lastModified)},hr.prototype.check_fkh4uy$=function(t){var e,n,i,o;if(null!=(n=null!=(e=t.get_61zpoe$(hi().IfNoneMatch))?fr().parse_61zpoe$(e):null)){var r=this.noneMatch_qetvw1$(n);if(r!==lr())return r}if(null!=(o=null!=(i=t.get_61zpoe$(hi().IfMatch))?fr().parse_61zpoe$(i):null)){var a=this.match_qetvw1$(o);if(a!==lr())return a}return lr()},hr.prototype.match_4cvlr2$=function(t){return!!(null!=this&&this.equals(fr().STAR)||null!=t&&t.equals(fr().STAR))||m(this.normalized_0,t.normalized_0)},hr.prototype.noneMatch_qetvw1$=function(t){if(t.contains_11rb$(fr().STAR))return lr();var n;t:do{var i;if(e.isType(t,at)&&t.isEmpty()){n=!1;break t}for(i=t.iterator();i.hasNext();){var o=i.next();if(this.match_4cvlr2$(o)){n=!0;break t}}n=!1}while(0);return n?pr():lr()},hr.prototype.match_qetvw1$=function(t){var e;if(t.isEmpty())return lr();if(t.contains_11rb$(fr().STAR))return lr();for(e=t.iterator();e.hasNext();){var n=e.next();if(this.match_4cvlr2$(n))return lr()}return ur()},hr.prototype.appendHeadersTo_ewccyn$=function(t){Pe(t,this.normalized_0)},Er.prototype.parse_61zpoe$=function(t){var e,n=ei(t),i=f(q(n,10));for(e=n.iterator();e.hasNext();){var o=e.next(),r=i.add_11rb$;if(1!==o.quality){var a="entity-tag quality parameter is not allowed: "+o.quality+".";throw St(a.toString())}if(!o.params.isEmpty()){var s="entity-tag parameters are not allowed: "+o.params+".";throw St(s.toString())}r.call(i,this.parseSingle_61zpoe$(o.value))}return i},Er.prototype.parseSingle_61zpoe$=function(t){var e,n;return m(t,"*")?this.STAR:(J(t,"W/")?(e=!0,n=Oe(t,2)):(e=!1,n=t),new hr(J(n,'"')?n:jn(n),e))},Er.$metadata$={kind:V,simpleName:"Companion",interfaces:[]};var _r,mr=null;function fr(){return null===mr&&new Er,mr}function yr(){}function Tr(t){this.mapping_0=t}function $r(){}function Nr(){}function gr(){}function Rr(t){$r.call(this),this.value=t}function Cr(t){$r.call(this),this.value=t}function Sr(t,e){$r.call(this),this.from=L(t),this.to=L(e)}function Ir(t){$r.call(this),this.value=t}function Lr(t,e){$r.call(this),this.name=t,this.grammar=e}function br(t){$r.call(this),this.grammar_j1kz5k$_0=t}function vr(t){$r.call(this),this.grammar_misagz$_0=t}function Or(t){$r.call(this),this.grammar_8xmxwn$_0=t}function Ur(t){$r.call(this);var n,i=Tt();for(n=t.iterator();n.hasNext();){var o=n.next();e.isType(o,Ur)?Zt(i,o.grammars):i.add_11rb$(o)}this.grammars_78ca78$_0=i}function Dr(t){$r.call(this);var n,i=Tt();for(n=t.iterator();n.hasNext();){var o=n.next();e.isType(o,Dr)?Zt(i,o.grammars):i.add_11rb$(o)}this.grammars_nbkzju$_0=i}function Ar(t,e){return kr(new Rr(t),e)}function kr(t,e){return new Ur(O([t,e]))}function Pr(t,e){return kr(t,new Rr(e))}function xr(t,e){return new Dr(O([t,e]))}function wr(t,e){return xr(t,new Rr(e))}function zr(t){return new Or(t)}function Gr(t,e){return new Sr(t,e)}function jr(){return new Ir("\\d")}function Fr(){return xr(xr(jr(),Gr(65,70)),Gr(97,102))}function Mr(){return zr(jr())}function Wr(t,e){this.expression_0=t,this.indexes_0=e}function Xr(t){var n=yt(),i=function t(n,i,o,r){var a;if(void 0===o&&(o=1),void 0===r&&(r=!1),e.isType(n,Rr))return new Br(Ue.Companion.escape_61zpoe$(n.value));if(e.isType(n,Ir))return new Br(n.value);if(e.isType(n,Lr)){var s=t(n.grammar,i,o+1|0);return function(t,n,i){var o;if(!(e.isType(o=t,ft)?o:st()).containsKey_11rb$(n)){var r=Tt();t.put_xwzc9p$(n,r)}Ct(t.get_11rb$(n)).add_11rb$(i)}(i,n.name,o),new Br(s.regex,s.groupsCount,!0)}if(e.isType(n,Nr)){var c,l,p=F(),u={v:r?o+1|0:o},d=0;for(c=n.grammars.iterator();c.hasNext();){var h=c.next(),E=De((d=(l=d)+1|0,l)),_=t(h,i,u.v,!0);0!==E&&e.isType(n,Dr)&&p.append_pdl1vj$("|"),p.append_pdl1vj$(_.regex),u.v=u.v+_.groupsCount|0}var m=r?u.v-o-1|0:u.v-o|0;return new Br(p.toString(),m,r)}if(e.isType(n,gr)){if(e.isType(n,br))a=63;else if(e.isType(n,vr))a=42;else{if(!e.isType(n,Or))throw St(("Unsupported simple grammar element: "+n).toString());a=43}var f=a,y=t(n.grammar,i,o,!0);return new Br(y.regex+String.fromCharCode(f),y.groupsCount)}if(e.isType(n,Cr))return new Br("["+Ue.Companion.escape_61zpoe$(n.value)+"]");if(e.isType(n,Sr))return new Br("["+String.fromCharCode(C(n.from))+"-"+String.fromCharCode(C(n.to))+"]");throw St(("Unsupported grammar element: "+n).toString())}(t,n).regex;return new Wr($t(i),n)}function Br(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1),this.regex=n?"("+t+")":t,this.groupsCount=n?e+1|0:e}function qr(t){var e,n;return fe.PlatformUtils.IS_BROWSER?("boolean"==typeof(e="undefined"!=typeof window)?e:st())?window.location.origin:"string"==typeof(n=self.location.origin)?n:st():"http://localhost"}hr.$metadata$={kind:E,simpleName:"EntityTagVersion",interfaces:[ar]},hr.prototype.component1=function(){return this.etag},hr.prototype.component2=function(){return this.weak},hr.prototype.copy_ivxn3r$=function(t,e){return new hr(void 0===t?this.etag:t,void 0===e?this.weak:e)},hr.prototype.toString=function(){return"EntityTagVersion(etag="+e.toString(this.etag)+", weak="+e.toString(this.weak)+")"},hr.prototype.hashCode=function(){var t=0;return t=31*(t=31*t+e.hashCode(this.etag)|0)+e.hashCode(this.weak)|0},hr.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.etag,t.etag)&&e.equals(this.weak,t.weak)},yr.$metadata$={kind:Q,simpleName:"Parser",interfaces:[]},Tr.prototype.get_61zpoe$=function(t){var e;return null!=(e=this.mapping_0.get_11rb$(t))?Pt(e):null},Tr.prototype.getAll_61zpoe$=function(t){var e;return null!=(e=this.mapping_0.get_11rb$(t))?e:K()},Tr.prototype.contains_61zpoe$=function(t){var n,i=this.mapping_0;return(e.isType(n=i,ft)?n:st()).containsKey_11rb$(t)},Tr.$metadata$={kind:E,simpleName:"ParseResult",interfaces:[]},$r.$metadata$={kind:E,simpleName:"Grammar",interfaces:[]},Nr.$metadata$={kind:Q,simpleName:"ComplexGrammar",interfaces:[]},gr.$metadata$={kind:Q,simpleName:"SimpleGrammar",interfaces:[]},Rr.$metadata$={kind:E,simpleName:"StringGrammar",interfaces:[$r]},Cr.$metadata$={kind:E,simpleName:"AnyOfGrammar",interfaces:[$r]},Sr.$metadata$={kind:E,simpleName:"RangeGrammar",interfaces:[$r]},Ir.$metadata$={kind:E,simpleName:"RawGrammar",interfaces:[$r]},Lr.$metadata$={kind:E,simpleName:"NamedGrammar",interfaces:[$r]},Object.defineProperty(br.prototype,"grammar",{get:function(){return this.grammar_j1kz5k$_0}}),br.$metadata$={kind:E,simpleName:"MaybeGrammar",interfaces:[gr,$r]},Object.defineProperty(vr.prototype,"grammar",{get:function(){return this.grammar_misagz$_0}}),vr.$metadata$={kind:E,simpleName:"ManyGrammar",interfaces:[gr,$r]},Object.defineProperty(Or.prototype,"grammar",{get:function(){return this.grammar_8xmxwn$_0}}),Or.$metadata$={kind:E,simpleName:"AtLeastOne",interfaces:[gr,$r]},Object.defineProperty(Ur.prototype,"grammars",{configurable:!0,get:function(){return this.grammars_78ca78$_0}}),Ur.$metadata$={kind:E,simpleName:"SequenceGrammar",interfaces:[Nr,$r]},Object.defineProperty(Dr.prototype,"grammars",{configurable:!0,get:function(){return this.grammars_nbkzju$_0}}),Dr.$metadata$={kind:E,simpleName:"OrGrammar",interfaces:[Nr,$r]},Wr.prototype.parse_61zpoe$=function(t){var e=this.expression_0.matchEntire_6bul2c$(t);if(null==e||e.value.length!==t.length)return null;var n,i=yt();for(n=this.indexes_0.entries.iterator();n.hasNext();){var o,r=n.next(),a=r.key;for(o=r.value.iterator();o.hasNext();){var s,c=o.next(),l=Tt();if(null!=(s=e.groups.get_za3lpa$(c))){var p=s.value;l.add_11rb$(p)}l.isEmpty()||i.put_xwzc9p$(a,l)}}return new Tr(i)},Wr.prototype.match_61zpoe$=function(t){return this.expression_0.matches_6bul2c$(t)},Wr.$metadata$={kind:E,simpleName:"RegexParser",interfaces:[yr]},Br.$metadata$={kind:E,simpleName:"GrammarRegex",interfaces:[]};var Hr=t.io||(t.io={}),Vr=Hr.ktor||(Hr.ktor={}),Kr=Vr.http||(Vr.http={});Kr.etag_srqufk$=Pe,Kr.encodeURLQueryComponent_x6vyl7$=xe,Kr.encodeURLPathPart_pdl1vz$=we,Kr.encodeURLPath_pgzefr$=Ge,Kr.encodeURLParameter_f4dhtg$=je,Kr.percentEncode_8bc624$=Fe,Kr.encodeURLParameterValue_7efafi$=Me,Kr.decodeURLQueryComponent_5bhe4q$=We,Kr.decodeURLPart_99zovv$=Xe,Kr.URLDecodeException=He,d["ktor-ktor-io-js-legacy"]=n,Object.defineProperty(Qe,"Companion",{get:en}),Object.defineProperty(Qe,"Parameters",{get:rn}),Kr.ContentDisposition=Qe,Object.defineProperty(an,"Companion",{get:ln}),Object.defineProperty(an,"Application",{get:function(){return null===un&&new pn,un}}),Object.defineProperty(an,"Audio",{get:function(){return null===hn&&new dn,hn}}),Object.defineProperty(an,"Image",{get:function(){return null===_n&&new En,_n}}),Object.defineProperty(an,"Message",{get:function(){return null===fn&&new mn,fn}}),Object.defineProperty(an,"MultiPart",{get:function(){return null===Tn&&new yn,Tn}}),Object.defineProperty(an,"Text",{get:function(){return null===Nn&&new $n,Nn}}),Object.defineProperty(an,"Video",{get:function(){return null===Sn&&new gn,Sn}}),Kr.ContentType_init_bo4f5s$=In,Kr.ContentType=an,Kr.BadContentTypeFormatException=Ln,Kr.withCharset_73qf4i$=function(t,e){return t.withParameter_puj7f4$("charset",it(e))},Kr.charset_10ldo9$=bn,d["ktor-ktor-utils-js-legacy"]=i,Kr.fromHttpToGmtDate_pdl1vz$=vn,Kr.toHttpDate_bcxie9$=On,Kr.groupByPairs_oo4ux4$=An,Kr.toContentType_7efafi$=kn,Kr.parseHeaderValue_pdl1vj$=ei,Object.defineProperty(Pn,"Companion",{get:zn}),Kr.HeaderValueWithParameters=Pn,Kr.quote_pdl1vz$=jn,Object.defineProperty(Fn,"Companion",{get:Xn}),Kr.Headers=Fn,Kr.HeadersBuilder=Bn,Object.defineProperty(Kr,"EmptyHeaders",{get:Vn}),Kr.HeadersImpl=Kn,Kr.HeaderValueParam_init_puj7f4$=Qn,Kr.HeaderValueParam=Yn,Kr.HeaderValue=Zn,Kr.parseAndSortHeader_pdl1vj$=function(t){return Kt(ei(t),new Qt(Jn(ti)))},Kr.parseHeaderValue_4mavae$=ii,Object.defineProperty(Kr,"HttpHeaders",{get:hi}),Kr.IllegalHeaderNameException=Ei,Kr.IllegalHeaderValueException=_i,Kr.HttpMessage=fi,Kr.HttpMessageBuilder=yi,Object.defineProperty(Ti,"Companion",{get:gi}),Kr.HttpMethod=Ti,Object.defineProperty(Ri,"Companion",{get:vi}),Kr.HttpStatusCode=Ri,Kr.allStatusCodes_8be2vx$=Oi,Kr.formUrlEncode_nyru4$=Ui,Kr.formUrlEncodeTo_oiqysc$=Ai,Kr.formUrlEncode_invt95$=function(t){var e,n=t.entries(),i=Tt();for(e=n.iterator();e.hasNext();){var o,r=e.next(),a=r.value,s=f(q(a,10));for(o=a.iterator();o.hasNext();){var c=o.next();s.add_11rb$(ut(r.key,c))}Zt(i,s)}return Ui(i)},Kr.loadMimes_8be2vx$=Pi,Object.defineProperty(Kr,"mimes_8be2vx$",{get:xi}),Kr.ParametersBuilder_za3lpa$=Mi,Object.defineProperty(wi,"Companion",{get:ji}),Kr.Parameters=wi,Kr.ParametersBuilder=Fi,Kr.ParametersBuilderImpl=Wi,Kr.ParametersImpl=Xi,Object.defineProperty(Kr,"EmptyParameters",{get:Hi}),Kr.parseQueryString_yib5kn$=Vi,Object.defineProperty(Qi,"Companion",{get:no}),Kr.URLBuilder=Qi,Kr.get_encodedUserAndPassword_a0yvw4$=io,Kr.get_authority_3q1sfd$=oo,Kr.get_encodedPath_3q1sfd$=ro,Kr.set_encodedPath_jl1sg7$=ao,Kr.takeFrom_jl1sg7$=so,Kr.URLParserException=co,Kr.takeFromUnsafe_9pkbii$=lo,Object.defineProperty(ho,"Companion",{get:mo}),Kr.URLProtocol=ho,Kr.isWebsocket_v5fpbg$=function(t){return m(t.name,"ws")||m(t.name,"wss")},Kr.Url_61zpoe$=fo,Kr.URLBuilder_61zpoe$=yo,Kr.takeFrom_rs9g2p$=function(t,e){t.protocol=e.protocol,t.host=e.host,t.port=e.port,t.encodedPathSegments=e.encodedPathSegments,t.encodedUser=e.encodedUser,t.encodedPassword=e.encodedPassword;var n=Mi();return me(n,e.encodedParameters),t.encodedParameters=n,t.encodedFragment=e.encodedFragment,t.trailingQuery=e.trailingQuery,t},Kr.takeFrom_wol2ee$=function(t,e){t.protocol=e.protocol,t.host=e.host,t.port=e.port,ao(t,e.encodedPath),t.encodedUser=e.encodedUser,t.encodedPassword=e.encodedPassword;var n=Mi();return n.appendAll_hb0ubp$(Vi(e.encodedQuery,void 0,void 0,!1)),t.encodedParameters=n,t.encodedFragment=e.encodedFragment,t.trailingQuery=e.trailingQuery,t},Kr.appendUrlFullPath_jjjp4j$=$o,Kr.appendUserAndPassword_g1wfna$=No,Object.defineProperty(go,"Companion",{get:Io}),Kr.Url=go,Kr.UrlDecodedParametersBuilder=Lo,Kr.decodeParameters_7g7dkj$=bo,Kr.encodeParameters_hdxgco$=vo;var Jr=Kr.content||(Kr.content={});Jr.ByteArrayContent=Uo,Jr.CachingOptions=Do,Object.defineProperty(Jr,"CachingProperty",{get:function(){return Co}}),Jr.get_caching_eu3mal$=function(t){return t.getProperty_yzaw86$(Co)},Jr.set_caching_sc47we$=function(t,e){t.setProperty_uuntuo$(Co,e)},Jr.ChannelWriterContent=Ao,Po.FormItem=xo,Po.FileItem=wo,Po.BinaryItem=zo,Po.BinaryChannelItem=Go,Jr.PartData=Po,Object.defineProperty(Fo,"Empty",{get:function(){return null===Wo&&new Mo,Wo}}),Jr.MultiPartData=Fo,Jr.forEachPart_la3alz$=function(t,e,n,i){var o=new Xo(t,e,n);return i?o:o.doResume(null)},Jr.readAllParts_4xn7mu$=function(t,e,n){var i=new Bo(t,e);return n?i:i.doResume(null)},Object.defineProperty(Jr,"NullBody",{get:function(){return null===Yo&&new qo,Yo}}),Qo.NoContent=Zo,Qo.ReadChannelContent=tr,Qo.WriteChannelContent=nr,Qo.ByteArrayContent=ir,Qo.ProtocolUpgrade=or,Jr.OutgoingContent=Qo,Jr.TextContent=rr,Object.defineProperty(Jr,"VersionListProperty",{get:function(){return Ho}}),Jr.get_versions_eu3mal$=function(t){var e;return null!=(e=t.getProperty_yzaw86$(Ho))?e:K()},Jr.set_versions_fbvemh$=function(t,e){t.setProperty_uuntuo$(Ho,e)},Jr.Version=ar,Object.defineProperty(sr,"OK",{get:lr}),Object.defineProperty(sr,"NOT_MODIFIED",{get:pr}),Object.defineProperty(sr,"PRECONDITION_FAILED",{get:ur}),Jr.VersionCheckResult=sr,Jr.LastModifiedVersion=dr,Jr.EntityTagVersion_61zpoe$=function(t){return fr().parseSingle_61zpoe$(t)},Object.defineProperty(hr,"Companion",{get:fr}),Jr.EntityTagVersion=hr;var Yr=Kr.parsing||(Kr.parsing={});Yr.Parser=yr,Yr.ParseResult=Tr,Yr.Grammar=$r,Yr.ComplexGrammar=Nr,Yr.SimpleGrammar=gr,Yr.StringGrammar=Rr,Yr.AnyOfGrammar=Cr,Yr.RangeGrammar=Sr,Yr.RawGrammar=Ir,Yr.NamedGrammar=Lr,Yr.MaybeGrammar=br,Yr.ManyGrammar=vr,Yr.AtLeastOne=Or,Yr.SequenceGrammar=Ur,Yr.OrGrammar=Dr,Yr.then_um0xbp$=Ar,Yr.then_f2q84u$=kr,Yr.then_98g7gp$=Pr,Yr.or_f2q84u$=xr,Yr.or_98g7gp$=wr,Yr.atLeastOne_aknn8a$=zr,Yr.to_ls4k3e$=Gr,Object.defineProperty(Yr,"digit_8be2vx$",{get:jr}),Object.defineProperty(Yr,"hex_8be2vx$",{get:Fr}),Object.defineProperty(Yr,"digits_8be2vx$",{get:Mr});var Qr=Yr.regex||(Yr.regex={});Qr.RegexParser=Wr,Qr.buildRegexParser_rd79pn$=Xr,(Kr.websocket||(Kr.websocket={})).websocketServerAccept_61zpoe$=function(t){var n,i,o=ct(e.isCharSequence(n=t)?n:st()).toString()+_r,r=U.Charsets.ISO_8859_1;t:do{if(null!=r&&r.equals(U.Charsets.UTF_8)){i=Le(o);break t}i=be(r.newEncoder(),o,0,o.length)}while(0);return ke(Ae(i))},Kr.get_origin_i4hgrd$=qr,Fn.prototype.contains_61zpoe$=Ft.prototype.contains_61zpoe$,Fn.prototype.contains_puj7f4$=Ft.prototype.contains_puj7f4$,Fn.prototype.forEach_ubvtmq$=Ft.prototype.forEach_ubvtmq$,Fn.prototype.get_61zpoe$=Ft.prototype.get_61zpoe$,qn.prototype.contains_61zpoe$=Fn.prototype.contains_61zpoe$,qn.prototype.contains_puj7f4$=Fn.prototype.contains_puj7f4$,qn.prototype.forEach_ubvtmq$=Fn.prototype.forEach_ubvtmq$,qn.prototype.get_61zpoe$=Fn.prototype.get_61zpoe$,wi.prototype.contains_61zpoe$=Ft.prototype.contains_61zpoe$,wi.prototype.contains_puj7f4$=Ft.prototype.contains_puj7f4$,wi.prototype.forEach_ubvtmq$=Ft.prototype.forEach_ubvtmq$,wi.prototype.get_61zpoe$=Ft.prototype.get_61zpoe$,Bi.prototype.contains_61zpoe$=wi.prototype.contains_61zpoe$,Bi.prototype.contains_puj7f4$=wi.prototype.contains_puj7f4$,Bi.prototype.forEach_ubvtmq$=wi.prototype.forEach_ubvtmq$,Bi.prototype.get_61zpoe$=wi.prototype.get_61zpoe$;var Zr,ta=R(g(new N(97,122),new N(65,90)),new N(48,57)),ea=f(q(ta,10));for(Zr=ta.iterator();Zr.hasNext();){var na=Zr.next();ea.add_11rb$(S(0|C(na)))}r=I(ea),a=I(R(g(new N(97,122),new N(65,90)),new N(48,57))),s=I(R(g(new N(97,102),new N(65,70)),new N(48,57)));var ia,oa=b([L(58),L(47),L(63),L(35),L(91),L(93),L(64),L(33),L(36),L(38),L(39),L(40),L(41),L(42),L(44),L(59),L(61),L(45),L(46),L(95),L(126),L(43)]),ra=f(q(oa,10));for(ia=oa.iterator();ia.hasNext();){var aa=ia.next();ra.add_11rb$(S(0|C(aa)))}c=ra,l=b([L(58),L(64),L(33),L(36),L(38),L(39),L(40),L(41),L(42),L(43),L(44),L(59),L(61),L(45),L(46),L(95),L(126)]),p=v(a,b([L(33),L(35),L(36),L(38),L(43),L(45),L(46),L(94),L(95),L(96),L(124),L(126)]));var sa,ca=O([L(45),L(46),L(95),L(126)]),la=f(q(ca,10));for(sa=ca.iterator();sa.hasNext();){var pa=sa.next();la.add_11rb$(S(0|C(pa)))}return u=la,b(["max-age","expires","domain","path","secure","httponly","$x-enc"]),$t('(^|;)\\s*([^;=\\{\\}\\s]+)\\s*(=\\s*("[^"]*"|[^;]*))?'),b([L(59),L(44),L(34)]),Rn=O(["***, dd MMM YYYY hh:mm:ss zzz","****, dd-MMM-YYYY hh:mm:ss zzz","*** MMM d hh:mm:ss YYYY","***, dd-MMM-YYYY hh:mm:ss zzz","***, dd-MMM-YYYY hh-mm-ss zzz","***, dd MMM YYYY hh:mm:ss zzz","*** dd-MMM-YYYY hh:mm:ss zzz","*** dd MMM YYYY hh:mm:ss zzz","*** dd-MMM-YYYY hh-mm-ss zzz","***,dd-MMM-YYYY hh:mm:ss zzz","*** MMM d YYYY hh:mm:ss zzz"]),kt((function(){var t=Dt();return t.putAll_a2k3zr$(An(At(xi()))),t})),kt((function(){return An(dt(At(xi()),Dn))})),Cn=b([L(40),L(41),L(60),L(62),L(64),L(44),L(59),L(58),L(92),L(34),L(47),L(91),L(93),L(63),L(61),L(123),L(125),L(32),L(9),L(10),L(13)]),Si=kr(Pr(kr(Pr(kr(Pr(Mr(),"."),Mr()),"."),Mr()),"."),Mr()),Ii=Pr(Ar("[",zr(wr(Fr(),":"))),"]"),Xr(xr(Si,Ii)),Li=kt((function(){return Pi()})),to=Xt(""),b([L(33),L(35),L(36),L(37),L(38),L(39),L(42),L(43),L(45),L(46),L(94),L(95),L(96),L(124),L(126)]),b([L(45),L(46),L(95),L(126),L(43),L(47)]),$t("[a-zA-Z0-9\\-._~+/]+=*"),$t("\\\\."),Co=new ye("Caching"),Ho=new ye("VersionList"),_r="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0),n(1),n(9),n(2),n(6),n(13),n(7),n(14),n(18),n(3)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r,a,s,c,l,p){"use strict";var u=t.$$importsForInline$$||(t.$$importsForInline$$={}),d=(n.kotlinx.coroutines,e.kotlin.Unit,e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,e.kotlin.coroutines.CoroutineImpl,n.kotlinx.coroutines.launch_s496o7$,e.Kind.CLASS),h=(e.kotlin.collections.copyToArray,e.Kind.INTERFACE),E=(e.kotlin.Exception,e.throwCCE,e.Long.ZERO,e.kotlin.collections.toList_7wnvza$,e.kotlin.collections.ArrayList_init_287e2$,e.kotlin.text.indexOf_8eortd$,e.kotlin.IllegalStateException_init_pdl1vj$,e.kotlin.text.StringBuilder_init_za3lpa$,e.Kind.OBJECT),_=(e.kotlin.collections.LinkedHashMap_init_q3lmfv$,Math,e.kotlin.collections.List,e.kotlin.collections.first_2p1efm$,e.kotlin.IllegalArgumentException_init_pdl1vj$,e.getKClass,e.Long,e.kotlin.to_ujzrz7$,e.kotlin.reflect.js.internal.PrimitiveClasses.intClass,e.kotlin.reflect.js.internal.PrimitiveClasses.shortClass,e.kotlin.reflect.js.internal.PrimitiveClasses.booleanClass,e.kotlin.reflect.js.internal.PrimitiveClasses.floatClass,e.kotlin.reflect.js.internal.PrimitiveClasses.doubleClass,e.kotlin.reflect.js.internal.PrimitiveClasses.stringClass,e.kotlin.collections.mapOf_qfcya0$,e.kotlin.NotImplementedError,e.kotlin.collections.Map,e.kotlin.collections.asList_us0mfu$,e.kotlin.collections.Collection,e.kotlin.Pair,o.kotlinx.atomicfu.atomic$ref$1,e.kotlin.collections.listOf_mh5how$,e.kotlin.collections.listOf_i5x0yv$,e.kotlin.collections.plus_mydzjv$,e.kotlin.collections.toList_us0mfu$,e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,e.kotlin.collections.ArrayList_init_ww73n8$,e.kotlin.collections.checkIndexOverflow_za3lpa$,e.kotlin.coroutines.CoroutineContext.Element),m=(n.kotlinx.coroutines.withContext_i5cbzn$,e.kotlin.collections.toSet_7wnvza$,e.kotlin.collections.joinToString_fmv235$,Error,e.kotlin.coroutines.CoroutineContext.Key,o.kotlinx.atomicfu.atomic$int$1),f=(e.kotlin.collections.toMap_6hr0sd$,e.Long.fromInt(2147483647),n.kotlinx.coroutines.delay_s8cxhz$,o.kotlinx.atomicfu.atomic$long$1,e.ensureNotNull,e.numberToInt,e.kotlin.LazyThreadSafetyMode),y=e.kotlin.lazy_kls4a0$,T=(e.kotlin.RuntimeException,n.kotlinx.coroutines.CompletableDeferred_xptg6w$,e.kotlin.Exception_init_pdl1vj$,o.kotlinx.atomicfu.atomic$boolean$1,r.kotlinx.serialization.internal.PluginGeneratedSerialDescriptor,e.equals,r.kotlinx.serialization.internal,r.kotlinx.serialization.internal.GeneratedSerializer),$=(e.kotlin.collections.emptyList_287e2$,e.kotlin.Annotation,e.kotlin.Enum,e.throwISE,e.toString,e.kotlin.text.padStart_vrc1nu$,e.kotlin.UByte,n.kotlinx.coroutines.TimeoutCancellationException,e.kotlin.NoSuchElementException,s.io.ktor.http.HttpStatusCode,e.defineInlineFunction),N=e.wrapFunction,g=(e.getReifiedTypeParameterKType,e.markKTypeNullable,c.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,c.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c.io.ktor.client.request.HttpRequestBuilder,c.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,c.io.ktor.client.statement.HttpStatement,c.io.ktor.client.request.header_rpxout$),R=(a.kotlinx.serialization.json,e.toShort,e.kotlin.ranges.IntRange,e.toByte,e.kotlin.text.Regex_init_61zpoe$),C=(e.kotlin.text.removePrefix_gsj5wt$,e.kotlin.text.RegexOption),S=e.kotlin.text.Regex_init_sb3q2$;function I(t,e,n,i,o){RoomDatabaseJdbcImplHelperCommon$Key_getInstance(),void 0===o&&(o=1),this.dataSource=t,this.db=e,this.tableNames_oqfu6p$_0=n,this.invalidationTracker=i,this.dbType=o,this.transactionIdAtomic_cspjfd$_0=m(0),this.openTransactions_s0q1ue$_0=concurrentSafeMapOf([]),this.sqliteMutex=Mutex()}function L(t,e,n){void 0===n&&(n=0),this.key_rlbeu2$_0=t,this.connection=e,this.transactionId=n}function b(){v=this,this.MIME_TYPE_PLAIN="text/plain",this.MIME_TYPE_JSON="application/json",this.HEADER_DBVERSION="door-dbversion",this.HEADER_NODE="door-node",this.DBINFO_TABLENAME="_doorwayinfo"}e.kotlin.NullPointerException,e.kotlin.collections.firstOrNull_2p1efm$,s.io.ktor.http.takeFrom_jl1sg7$,s.io.ktor.http.get_encodedPath_3q1sfd$,s.io.ktor.http.set_encodedPath_jl1sg7$,c.io.ktor.client.request.parameter_xadl6p$,s.io.ktor.http.ContentType,s.io.ktor.http.content.TextContent,e.createKType,c.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,c.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,e.kotlin.ranges.until_dqglrj$,e.Long.fromInt(200),e.kotlin.lazy_klfg04$,e.Long.fromInt(1e3),e.kotlin.text.toLong_pdl1vz$,e.kotlin.text.split_ip8yn$,e.kotlin.text.toIntOrNull_pdl1vz$,n.kotlinx.coroutines.channels.Channel_lsve6m$,e.kotlin.text.trim_gw00vp$,e.kotlin.text.split_o64adg$,e.kotlin.text.trimMargin_rjktp$,e.kotlin.text.startsWith_7epoxm$,e.kotlin.js.get_js_1yb8b7$,e.kotlin.collections.putAll_5gv49o$,e.kotlin.text.Regex,e.kotlin.text.toInt_pdl1vz$,e.kotlin.ranges.ClosedRange,e.kotlin.text.toDouble_pdl1vz$,e.kotlin.collections.indexOf_mjy6jw$,p.io.ktor.utils.io.charsets,e.kotlin.text.encodeToByteArray_pdl1vz$,p.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$,e.kotlin.random.Random,w.prototype=Object.create(x.prototype),w.prototype.constructor=w,z.prototype=Object.create(x.prototype),z.prototype.constructor=z,b.$metadata$={kind:E,simpleName:"DoorConstants",interfaces:[]};var v=null;function O(){return null===v&&new b,v}function U(){k()}function D(){A=this,this.STATUS_CONNECTED=1,this.STATUS_DISCONNECTED=2,this.DOOR_ATTACHMENT_URI_SCHEME="door-attachment",this.DOOR_ATTACHMENT_URI_PREFIX="door-attachment://",this.PATH_REPLICATION="replication",this.ENDPOINT_SUBSCRIBE_SSE="subscribe",this.ENDPOINT_CHECK_PENDING_REPLICATION_TRACKERS="checkPendingReplicationTrackers",this.ENDPOINT_RECEIVE_ENTITIES="receive",this.ENDPOINT_CHECK_FOR_ENTITIES_ALREADY_RECEIVED="checkForEntitiesAlreadyReceived",this.ENDPOINT_FIND_PENDING_REPLICATION_TRACKERS="findPendingReplicationTrackers",this.ENDPOINT_FIND_PENDING_REPLICATIONS="findPendingReplication",this.ENDPOINT_MARK_REPLICATE_TRACKERS_AS_PROCESSED="markReplicateTrackersAsProcessed"}D.$metadata$={kind:E,simpleName:"Companion",interfaces:[]};var A=null;function k(){return null===A&&new D,A}function P(t){this.key_2xd1kz$_0=t}function x(){}function w(t,e,n){x.call(this),this.startVersion_s1nxoj$_0=t,this.endVersion_vre3y4$_0=e,this.migrateStmts=n}function z(t,e,n){x.call(this),this.startVersion_9cyntb$_0=t,this.endVersion_lo3yju$_0=e,this.migrateFn=n}function G(t){return t.dbVersion}U.$metadata$={kind:h,simpleName:"DoorDatabaseRepository",interfaces:[]},$("door-door-runtime-js-legacy.com.ustadmobile.door.ext.receiveOrNull_n40086$",N((function(){var n=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,i=e.kotlin.coroutines.CoroutineImpl,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpStatusCode,r=e.getReifiedTypeParameterKType,a=e.markKTypeNullable,s=(0,e.wrapFunction)((function(){var s=e.throwCCE,c=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=e.getKClass,p=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,u=Error;function d(t,e,n,o){i.call(this,o),this.exceptionState_0=1,this.local$typeClosure$T=t,this.local$isT=e,this.local$isT_0=void 0,this.local$it=n}return d.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[i]},d.prototype=Object.create(i.prototype),d.prototype.constructor=d,d.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(null!=(t=this.local$it.status)&&t.equals(o.Companion.NoContent))return null;var i,d=this.local$typeClosure$T;this.local$isT_0=this.local$isT;var h,E=this.local$it.call,_=c.JsType,m=l(d);t:do{try{h=a(r(this.local$typeClosure$T))}catch(t){if(e.isType(t,u)){h=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=E.bodyNullable_qi9ur9$(p(_,m,h),this),this.result_0===n)return n;continue;case 1:throw this.exception_0;case 2:return this.result_0=this.local$isT_0(i=this.result_0)?i:s(),this.result_0;case 3:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},function(t,e){return function(n,i,o){var r=new d(t,e,n,i);return o?r:r.doResume(null)}}}));return function(t,n,i,o){return e.suspendCall(i.execute_2rh6on$(s(t,n),e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),$("door-door-runtime-js-legacy.com.ustadmobile.door.ext.bodyOrNull_5sqbag$",N((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpStatusCode,i=e.getReifiedTypeParameterKType,o=e.markKTypeNullable,r=e.throwCCE,a=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,s=e.getKClass,c=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,l=Error;return function(t,p,u,d){var h,E;if(null!=(h=u.status)&&h.equals(n.Companion.NoContent))E=null;else{var _,m,f=u.call,y=a.JsType,T=s(t);t:do{try{m=o(i(t))}catch(t){if(e.isType(t,l)){m=null;break t}throw t}}while(0);e.suspendCall(f.bodyNullable_qi9ur9$(c(y,T,m),e.coroutineReceiver())),e.setCoroutineResult(p(_=e.coroutineResult(e.coroutineReceiver()))?_:r(),e.coroutineReceiver()),E=e.coroutineResult(e.coroutineReceiver())}return E}}))),$("door-door-runtime-js-legacy.com.ustadmobile.door.ext.getOrNull_g0tv8i$",N((function(){var n=e.kotlin.Unit,i=e.getReifiedTypeParameterKType,o=e.markKTypeNullable,r=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].io.ktor.client.request.HttpRequestBuilder,a=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,s=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].io.ktor.client.statement.HttpStatement,c=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpStatusCode,l=e.throwCCE,p=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,u=e.getKClass,d=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,h=Error;function E(t){return n}return function(t,n,_,m,f){void 0===m&&(m=E);var y=new r;m(y),y.method=a.Companion.Get,e.suspendCall(new s(y,_).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());var T,$,N=e.coroutineResult(e.coroutineReceiver());if(null!=(T=N.status)&&T.equals(c.Companion.NoContent))$=null;else{var g,R,C=N.call,S=p.JsType,I=u(t);t:do{try{R=o(o(i(t)))}catch(t){if(e.isType(t,h)){R=null;break t}throw t}}while(0);e.suspendCall(C.bodyNullable_qi9ur9$(d(S,I,R),e.coroutineReceiver())),e.setCoroutineResult(n(g=e.coroutineResult(e.coroutineReceiver()))?g:l(),e.coroutineReceiver()),$=e.coroutineResult(e.coroutineReceiver())}return e.setCoroutineResult($,e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),$("door-door-runtime-js-legacy.com.ustadmobile.door.ext.postOrNull_g0tv8i$",N((function(){var n=e.kotlin.Unit,i=e.getReifiedTypeParameterKType,o=e.markKTypeNullable,r=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].io.ktor.client.request.HttpRequestBuilder,a=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,s=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].io.ktor.client.statement.HttpStatement,c=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpStatusCode,l=e.throwCCE,p=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,u=e.getKClass,d=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,h=Error;function E(t){return n}return function(t,n,_,m,f){void 0===m&&(m=E);var y=new r;m(y),y.method=a.Companion.Post,e.suspendCall(new s(y,_).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());var T,$,N=e.coroutineResult(e.coroutineReceiver());if(null!=(T=N.status)&&T.equals(c.Companion.NoContent))$=null;else{var g,R,C=N.call,S=p.JsType,I=u(t);t:do{try{R=o(o(i(t)))}catch(t){if(e.isType(t,h)){R=null;break t}throw t}}while(0);e.suspendCall(C.bodyNullable_qi9ur9$(d(S,I,R),e.coroutineReceiver())),e.setCoroutineResult(n(g=e.coroutineResult(e.coroutineReceiver()))?g:l(),e.coroutineReceiver()),$=e.coroutineResult(e.coroutineReceiver())}return e.setCoroutineResult($,e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),$("door-door-runtime-js-legacy.com.ustadmobile.door.jdbc.ext.useStatementAsync_t2coud$",N((function(){var t=e.kotlin.Exception;return function(n,i,o){try{return e.suspendCall(i(n,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}catch(n){throw e.isType(n,t),n}finally{n.close()}}}))),x.$metadata$={kind:d,simpleName:"DoorMigration",interfaces:[]},Object.defineProperty(w.prototype,"startVersion",{get:function(){return this.startVersion_s1nxoj$_0}}),Object.defineProperty(w.prototype,"endVersion",{get:function(){return this.endVersion_vre3y4$_0}}),w.$metadata$={kind:d,simpleName:"DoorMigrationStatementList",interfaces:[x]},Object.defineProperty(z.prototype,"startVersion",{get:function(){return this.startVersion_9cyntb$_0}}),Object.defineProperty(z.prototype,"endVersion",{get:function(){return this.endVersion_lo3yju$_0}}),z.$metadata$={kind:d,simpleName:"DoorMigrationSync",interfaces:[x]},$("door-door-runtime-js-legacy.com.ustadmobile.door.replication.put_y8m9xx$",N((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_jl1sg7$,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.get_encodedPath_3q1sfd$,r=t.com.ustadmobile.door.DoorDatabaseRepository,a=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.set_encodedPath_jl1sg7$,s=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].io.ktor.client.request.parameter_xadl6p$,c=t.com.ustadmobile.door.ext.doorNodeIdHeader_rq8txc$,l=t.com.ustadmobile.door.ext.dbVersionHeader_f7kw1w$,p=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].io.ktor.client.request.HttpRequestBuilder,u=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,d=t.$$importsForInline$$["ktor-ktor-client-core-js-legacy"].io.ktor.client.statement.HttpStatement;function h(t){return n}return function(t,E,_,m,f){void 0===m&&(m=h);var y,T,$=t.config.httpClient,N=new p;N.url_6yzzjr$((y=t,T=E,function(t,e){return i(t,y.config.endpoint),a(t,o(t)+r.Companion.PATH_REPLICATION+"/"+T),n})),s(N,"tableId",_),c(N,t),l(N,t.db),m(N),N.method=u.Companion.Put,e.suspendCall(new d(N,$).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}})));var j=t.com||(t.com={}),F=j.ustadmobile||(j.ustadmobile={}),M=F.door||(F.door={}),W=M.ext||(M.ext={}),X=M.room||(M.room={});I.TransactionElement=L,u["kotlinx-coroutines-core"]=n,X.RoomDatabaseJdbcImplHelperCommon=I,Object.defineProperty(M,"DoorConstants",{get:O}),Object.defineProperty(U,"Companion",{get:k}),M.DoorDatabaseRepository=U,u["kotlinx-atomicfu"]=o,u["ktor-ktor-http-js-legacy"]=s,u["ktor-ktor-client-core-js-legacy"]=c,W.dbVersionHeader_f7kw1w$=function(t,e){g(t,O().HEADER_DBVERSION,G(e))},W.doorNodeIdHeader_rq8txc$=function(t,e){g(t,O().HEADER_NODE,e.config.nodeId.toString()+"/"+e.config.auth)},W.ReentrantMutexContextElement=P;var B=M.migration||(M.migration={});B.DoorMigration=x,B.DoorMigrationStatementList=w,B.DoorMigrationSync=z;var q=M.util||(M.util={});return W.dbSchemaVersion_jv9r7q$=G,W.dbType_omobsc$=function(t){return 1},W.execSqlBatch_3112hw$=function(t,e){t.execSQLBatch_kand9s$(e)},u["ktor-ktor-io-js-legacy"]=p,q.systemTimeInMillis=function(){return e.Long.fromNumber((new Date).getTime())},L.prototype.fold_3cc69b$=_.prototype.fold_3cc69b$,L.prototype.get_j3r2sn$=_.prototype.get_j3r2sn$,L.prototype.minusKey_yeqjby$=_.prototype.minusKey_yeqjby$,L.prototype.plus_1fupul$=_.prototype.plus_1fupul$,T.prototype.typeParametersSerializers,P.prototype.fold_3cc69b$=_.prototype.fold_3cc69b$,P.prototype.get_j3r2sn$=_.prototype.get_j3r2sn$,P.prototype.minusKey_yeqjby$=_.prototype.minusKey_yeqjby$,P.prototype.plus_1fupul$=_.prototype.plus_1fupul$,y(f.NONE,(function(){return R("\\s\\s+")})),y(f.NONE,(function(){return R("\\W")})),S("IN(\\s*)\\((\\s*)\\?(\\s*)\\)",C.IGNORE_CASE),t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0)],void 0===(r="function"==typeof(i=function(t,e){"use strict";return e.Kind.CLASS,e.kotlin.Enum,e.throwISE,e.Kind.OBJECT,e.kotlin.collections.Collection,e.kotlin.Unit,e.kotlin.collections.ArrayList_init_ww73n8$,e.kotlin.collections.AbstractList,e.kotlin.collections.emptyList_287e2$,e.toString,t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0),n(3),n(7),n(1),n(4)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a=t.$$importsForInline$$||(t.$$importsForInline$$={}),s=e.kotlin.Exception,c=e.Kind.CLASS,l=(e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,e.kotlin.coroutines.CoroutineImpl,e.ensureNotNull,e.Kind.INTERFACE,n.io.ktor.utils.io.charsets),p=i.io.ktor.http,u=i.io.ktor.http.parseAndSortHeader_pdl1vj$,d=e.equals,h=n.io.ktor.utils.io.charsets.Charset,E=(e.kotlin.Unit,i.io.ktor.http.content,o.kotlinx.coroutines.flow.FlowCollector,o.kotlinx.coroutines.flow.Flow,e.defineInlineFunction),_=e.wrapFunction;function m(t,e){void 0===e&&(e=null),s.call(this,t,e),this.name="ContentConvertException"}function f(t,e){void 0===e&&(e=null),m.call(this,t,e),this.name="WebsocketContentConvertException"}function y(t,e){void 0===e&&(e=null),f.call(this,t,e),this.name="WebsocketConverterNotFoundException"}function T(t,e,n){void 0===e&&(e=null),f.call(this,t,e),this.frame=n,this.name="WebsocketDeserializeException"}function $(t,e){var n;for(void 0===e&&(e=l.Charsets.UTF_8),n=u(t.get_61zpoe$(p.HttpHeaders.AcceptCharset)).iterator();n.hasNext();){var i=n.next().component1();if(d(i,"*"))return e;if(h.Companion.isSupported_61zpoe$(i))return h.Companion.forName_61zpoe$(i)}return null}e.getReifiedTypeParameterKType,r.io.ktor.util.reflect,e.getKClass,r.io.ktor.util.reflect.typeInfoImpl_1lvkm8$,Error,e.throwCCE,m.prototype=Object.create(s.prototype),m.prototype.constructor=m,f.prototype=Object.create(m.prototype),f.prototype.constructor=f,y.prototype=Object.create(f.prototype),y.prototype.constructor=y,T.prototype=Object.create(f.prototype),T.prototype.constructor=T,m.$metadata$={kind:c,simpleName:"ContentConvertException",interfaces:[s]},f.$metadata$={kind:c,simpleName:"WebsocketContentConvertException",interfaces:[m]},y.$metadata$={kind:c,simpleName:"WebsocketConverterNotFoundException",interfaces:[f]},T.$metadata$={kind:c,simpleName:"WebsocketDeserializeException",interfaces:[f]},E("ktor-ktor-serialization-js-legacy.io.ktor.serialization.serialize_du9chr$",_((function(){var n=t.$$importsForInline$$["ktor-ktor-io-js-legacy"].io.ktor.utils.io.charsets,i=e.getReifiedTypeParameterKType,o=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,r=e.getKClass,a=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,s=Error;return function(t,c,l,p,u,d){void 0===u&&(u=n.Charsets.UTF_8);var h,E=o.JsType,_=r(t);t:do{try{h=i(t)}catch(t){if(e.isType(t,s)){h=null;break t}throw t}}while(0);return e.suspendCall(l.serializeNullable_rh40qx$(u,a(E,_,h),p,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),E("ktor-ktor-serialization-js-legacy.io.ktor.serialization.deserialize_v41121$",_((function(){var n=t.$$importsForInline$$["ktor-ktor-io-js-legacy"].io.ktor.utils.io.charsets,i=e.getReifiedTypeParameterKType,o=e.throwCCE,r=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,a=e.getKClass,s=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(t,l,p,u,d,h){var E;void 0===d&&(d=n.Charsets.UTF_8);var _,m=r.JsType,f=a(t);t:do{try{_=i(t)}catch(t){if(e.isType(t,c)){_=null;break t}throw t}}while(0);return e.suspendCall(p.deserialize_v0czzf$(d,s(m,f,_),u,e.coroutineReceiver())),l(E=e.coroutineResult(e.coroutineReceiver()))?E:o()}})));var N=t.io||(t.io={}),g=N.ktor||(N.ktor={}),R=g.serialization||(g.serialization={});return R.ContentConvertException=m,R.WebsocketContentConvertException=f,R.WebsocketConverterNotFoundException=y,R.WebsocketDeserializeException=T,R.suitableCharset_4q0pk1$=function(t,e){var n;return void 0===e&&(e=l.Charsets.UTF_8),null!=(n=$(t,e))?n:e},R.suitableCharsetOrNull_4q0pk1$=$,a["kotlinx-coroutines-core"]=o,a["ktor-ktor-io-js-legacy"]=n,a["ktor-ktor-utils-js-legacy"]=r,t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){t.exports=n(12)},function(t,e,n){var i,o,r;o=[e,n(0),n(8),n(1),n(9),n(19),n(6)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r,a){"use strict";e.Kind.CLASS,e.getKClass,e.Kind.OBJECT;var s=e.kotlin.collections.listOf_i5x0yv$,c=(e.kotlin.LazyThreadSafetyMode,e.kotlin.to_ujzrz7$,e.kotlin.collections.mapOf_qfcya0$,e.kotlin.lazy_kls4a0$,e.kotlin.collections.emptyMap_q3lmfv$,e.kotlin.text.trimMargin_rjktp$),l=(e.kotlin.IllegalStateException_init_pdl1vj$,e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,e.kotlin.coroutines.CoroutineImpl,e.equals,i.kotlinx.coroutines,e.kotlin.lazy_klfg04$,e.kotlin.collections.copyToArray),p=e.kotlin.collections.ArrayList_init_287e2$,u=(e.kotlin.collections.setOf_mh5how$,e.kotlin.Unit),d=(e.Long.ZERO,n.com.ustadmobile.door.util.systemTimeInMillis),h=(e.toString,e.kotlin.collections.setOf_i5x0yv$,e.kotlin.collections.LinkedHashSet_init_287e2$,n.com.ustadmobile.door.DoorDatabaseRepository,e.kotlin.collections.listOf_mh5how$),E=(e.defineInlineFunction,e.wrapFunction,n.com.ustadmobile.door.ext.dbType_omobsc$),_=(e.kotlin.collections.toList_us0mfu$,e.kotlin.collections.emptyList_287e2$),m=n.com.ustadmobile.door.ext.execSqlBatch_3112hw$,f=n.com.ustadmobile.door.migration.DoorMigrationSync,y=(e.Kind.INTERFACE,i.kotlinx.coroutines.launch_s496o7$,e.kotlin.collections.toList_7wnvza$,e.kotlin.collections.collectionSizeOrDefault_ba2ldo$),T=e.kotlin.collections.ArrayList_init_ww73n8$,$=(e.kotlin.collections.addAll_ipc267$,e.kotlin.collections.LinkedHashMap_init_q3lmfv$,new e.Long(-1875767296,0),n.com.ustadmobile.door.migration.DoorMigrationStatementList),N=r.com.ustadmobile.lib.util.ext.fixTincan_omobsc$,g=e.kotlin.collections.plus_mydzjv$,R=(a.kotlinx.serialization.internal.NullableSerializer,a.kotlinx.serialization.internal.PluginGeneratedSerialDescriptor,a.kotlinx.serialization.internal,a.kotlinx.serialization.internal.GeneratedSerializer);e.Long.MAX_VALUE,e.throwCCE,e.hashCode,e.Long.ONE,e.Long.fromInt(4),e.Long.fromInt(8),e.Long.fromInt(25966),e.Long.fromInt(13),a.kotlinx.serialization.internal.ArrayListSerializer,a.kotlinx.serialization.internal.LinkedHashMapSerializer,e.ensureNotNull,e.Long.fromInt(1e4),e.Long.fromInt(10001),e.Long.fromInt(10002),e.Long.fromInt(10003),e.Long.fromInt(10004),e.Long.fromInt(10005),e.Long.fromInt(10006),e.Long.fromInt(10007),e.Long.fromInt(10008),e.Long.fromInt(10009),e.Long.fromInt(1e5),e.Long.fromInt(100001),e.Long.fromInt(100002),e.Long.fromInt(100003),e.Long.fromInt(100004),e.Long.fromInt(100005),e.Long.fromInt(2),e.Long.fromInt(16),e.Long.fromInt(32),e.Long.fromInt(64),e.Long.fromInt(128),e.Long.fromInt(256),e.Long.fromInt(512),e.Long.fromInt(1024),e.Long.fromInt(2048),e.Long.fromInt(4096),e.Long.fromInt(8192),e.Long.fromInt(16384),e.Long.fromInt(32768),e.Long.fromInt(65536),e.Long.fromInt(131072),e.Long.fromInt(262144),e.Long.fromInt(524288),e.Long.fromInt(1048576),e.Long.fromInt(2097152),e.Long.fromInt(4194304),e.Long.fromInt(8388608),e.Long.fromInt(16777216),e.Long.fromInt(33554432),e.Long.fromInt(67108864),e.Long.fromInt(134217728),e.Long.fromInt(268435456),e.Long.fromInt(536870912),e.Long.fromInt(1073741824),new e.Long(-2147483648,0),new e.Long(0,1),new e.Long(0,2),new e.Long(0,4),new e.Long(0,8),new e.Long(0,16),new e.Long(0,32),new e.Long(0,64),new e.Long(0,128),new e.Long(0,256),new e.Long(0,512),new e.Long(0,1024),new e.Long(0,2048),new e.Long(0,4096),new e.Long(0,8192),new e.Long(0,16384),new e.Long(0,32768),new e.Long(0,65536),new e.Long(0,131072),new e.Long(0,262144),new e.Long(25198046,3970),new e.Long(8388674,1026),new e.Long(545279430,66),new e.Long(-33554434,127),new e.Long(1048640,20624),new e.Long(8388674,2),e.Long.fromInt(-2),e.toByte,i.kotlinx.coroutines.CompletableDeferred_xptg6w$,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,R.prototype.typeParametersSerializers,new f(91,92,(function(t){var e;return t.execSQL_61zpoe$("ALTER TABLE DoorNode ADD COLUMN rel INTEGER NOT NULL DEFAULT 2"),t.execSQL_61zpoe$("ALTER TABLE Person ADD COLUMN personType INTEGER NOT NULL DEFAULT 0"),t.execSQL_61zpoe$("DROP TABLE ChangeLog"),t.execSQL_61zpoe$("DROP TABLE SyncResult"),t.execSQL_61zpoe$("DROP TABLE TableSyncStatus"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ClazzLog_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ClazzLogAttendanceRecord_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Schedule_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS DateRange_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS HolidayCalendar_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Holiday_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ScheduledCheck_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS AuditLog_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS CustomField_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS CustomFieldValue_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS CustomFieldValueOption_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Person_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Clazz_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ClazzEnrolment_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS LeavingReason_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS PersonCustomFieldValue_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ContentEntry_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ContentEntryContentCategoryJoin_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ContentEntryParentChildJoin_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ContentEntryRelatedEntryJoin_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ContentCategorySchema_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ContentCategory_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Language_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS LanguageVariant_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Role_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS EntityRole_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS PersonGroup_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS PersonGroupMember_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS PersonPicture_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Container_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS VerbEntity_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS XObjectEntity_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS StatementEntity_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ContextXObjectStatementJoin_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS AgentEntity_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS StateEntity_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS StateContentEntity_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS XLangMapEntry_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS School_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS SchoolMember_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Comments_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Report_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS Site_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS LearnerGroup_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS LearnerGroupMember_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS GroupLearningSession_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS SiteTerms_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ClazzContentJoin_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS PersonParentJoin_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ScopedGrant_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ErrorReport_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ClazzAssignment_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS ClazzAssignmentContentJoin_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS PersonAuth2_trk"),t.execSQL_61zpoe$("DROP TABLE IF EXISTS UserSession_trk"),1===E(t)?(function(t){var e=t;e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_14"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_14"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_14"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_14"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_15"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_15"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_15"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_15"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_21"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_21"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_21"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_21"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_17"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_17"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_17"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_17"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_28"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_28"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_28"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_28"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_99"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_99"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_99"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_99"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_173"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_173"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_173"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_173"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_53"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_53"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_53"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_53"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_56"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_56"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_56"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_56"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_57"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_57"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_57"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_57"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_55"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_55"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_55"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_55"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_9"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_9"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_9"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_9"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_6"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_6"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_6"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_6"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_65"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_65"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_65"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_65"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_410"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_410"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_410"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_410"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_178"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_178"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_178"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_178"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_42"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_42"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_42"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_42"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_3"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_3"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_3"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_3"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_7"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_7"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_7"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_7"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_8"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_8"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_8"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_8"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_2"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_2"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_2"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_2"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_1"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_1"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_1"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_1"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_13"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_13"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_13"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_13"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_10"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_10"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_10"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_10"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_45"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_45"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_45"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_45"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_47"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_47"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_47"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_47"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_43"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_43"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_43"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_43"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_44"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_44"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_44"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_44"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_50"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_50"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_50"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_50"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_51"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_51"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_51"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_51"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_62"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_62"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_62"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_62"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_64"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_64"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_64"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_64"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_60"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_60"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_60"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_60"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_66"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_66"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_66"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_66"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_68"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_68"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_68"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_68"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_70"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_70"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_70"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_70"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_72"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_72"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_72"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_72"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_74"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_74"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_74"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_74"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_164"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_164"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_164"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_164"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_200"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_200"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_200"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_200"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_208"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_208"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_208"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_208"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_101"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_101"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_101"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_101"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_189"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_189"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_189"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_189"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_301"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_301"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_301"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_301"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_300"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_300"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_300"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_300"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_302"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_302"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_302"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_302"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_272"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_272"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_272"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_272"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_134"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_134"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_134"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_134"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_512"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_512"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_512"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_512"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_48"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_48"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_48"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_48"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_419"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_419"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_419"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_419"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_520"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_520"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_520"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_520"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_521"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_521"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_521"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_521"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_678"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_678"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_678"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_678"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_LOC_679"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS INS_PRI_679"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_LOC_679"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS UPD_PRI_679")}(t),t.execSQL_61zpoe$("CREATE TABLE IF NOT EXISTS ReplicationStatus ( tableId INTEGER NOT NULL , priority INTEGER NOT NULL , nodeId INTEGER NOT NULL , lastRemoteChangeTime INTEGER NOT NULL , lastFetchReplicationCompleteTime INTEGER NOT NULL , lastLocalChangeTime INTEGER NOT NULL , lastSendReplicationCompleteTime INTEGER NOT NULL , repStatusId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),t.execSQL_61zpoe$("CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)"),t.execSQL_61zpoe$("CREATE TABLE IF NOT EXISTS ChangeLog ( chTableId INTEGER NOT NULL , chEntityPk INTEGER NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )")):(function(t){var e=t;e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_14_trig ON clazzlog"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_15_trig ON clazzlogattendancerecord"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_15_trig ON clazzlogattendancerecord"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_21_trig ON schedule"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_21_trig ON schedule"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_17_trig ON daterange"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_17_trig ON daterange"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_28_trig ON holidaycalendar"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_28_trig ON holidaycalendar"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_99_trig ON holiday"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_99_trig ON holiday"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_173_trig ON scheduledcheck"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_173_trig ON scheduledcheck"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_53_trig ON auditlog"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_53_trig ON auditlog"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_56_trig ON customfield"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_56_trig ON customfield"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_57_trig ON customfieldvalue"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_57_trig ON customfieldvalue"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_55_trig ON customfieldvalueoption"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_55_trig ON customfieldvalueoption"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_9_trig ON person"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_9_trig ON person"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_6_trig ON clazz"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_6_trig ON clazz"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_65_trig ON clazzenrolment"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_65_trig ON clazzenrolment"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_410_trig ON leavingreason"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_410_trig ON leavingreason"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_178_trig ON personcustomfieldvalue"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_178_trig ON personcustomfieldvalue"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_42_trig ON contententry"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_42_trig ON contententry"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_3_trig ON contententrycontentcategoryjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_3_trig ON contententrycontentcategoryjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_7_trig ON contententryparentchildjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_7_trig ON contententryparentchildjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_8_trig ON contententryrelatedentryjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_8_trig ON contententryrelatedentryjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_2_trig ON contentcategoryschema"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_2_trig ON contentcategoryschema"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_1_trig ON contentcategory"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_1_trig ON contentcategory"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_13_trig ON language"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_13_trig ON language"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_10_trig ON languagevariant"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_10_trig ON languagevariant"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_45_trig ON role"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_45_trig ON role"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_47_trig ON entityrole"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_47_trig ON entityrole"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_43_trig ON persongroup"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_43_trig ON persongroup"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_44_trig ON persongroupmember"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_44_trig ON persongroupmember"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_50_trig ON personpicture"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_50_trig ON personpicture"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_51_trig ON container"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_51_trig ON container"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_62_trig ON verbentity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_62_trig ON verbentity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_64_trig ON xobjectentity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_64_trig ON xobjectentity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_60_trig ON statemententity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_60_trig ON statemententity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_66_trig ON contextxobjectstatementjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_66_trig ON contextxobjectstatementjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_68_trig ON agententity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_68_trig ON agententity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_70_trig ON stateentity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_70_trig ON stateentity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_72_trig ON statecontententity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_72_trig ON statecontententity"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_74_trig ON xlangmapentry"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_74_trig ON xlangmapentry"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_164_trig ON school"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_164_trig ON school"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_200_trig ON schoolmember"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_200_trig ON schoolmember"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_208_trig ON comments"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_208_trig ON comments"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_101_trig ON report"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_101_trig ON report"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_189_trig ON site"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_189_trig ON site"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_301_trig ON learnergroup"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_301_trig ON learnergroup"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_300_trig ON learnergroupmember"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_300_trig ON learnergroupmember"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_302_trig ON grouplearningsession"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_302_trig ON grouplearningsession"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_272_trig ON siteterms"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_272_trig ON siteterms"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_134_trig ON clazzcontentjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_134_trig ON clazzcontentjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_512_trig ON personparentjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_512_trig ON personparentjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_48_trig ON scopedgrant"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_48_trig ON scopedgrant"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_419_trig ON errorreport"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_419_trig ON errorreport"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_520_trig ON clazzassignment"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_520_trig ON clazzassignment"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_521_trig ON clazzassignmentcontentjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_521_trig ON clazzassignmentcontentjoin"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_678_trig ON personauth2"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_678_trig ON personauth2"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_679_trig ON usersession"),e.execSQL_61zpoe$("DROP TRIGGER IF EXISTS inccsn_679_trig ON usersession")}(t),(e=t).execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_101_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_10_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_134_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_13_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_14_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_15_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_164_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_173_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_178_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_17_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_189_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_1_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_200_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_208_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_21_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_272_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_28_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_2_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_300_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_301_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_302_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_3_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_410_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_419_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_42_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_43_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_44_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_45_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_47_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_48_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_50_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_512_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_51_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_520_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_521_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_53_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_55_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_56_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_57_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_60_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_62_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_64_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_65_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_66_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_678_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_679_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_68_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_6_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_70_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_72_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_74_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_7_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_8_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_99_fn"),e.execSQL_61zpoe$("DROP FUNCTION IF EXISTS inccsn_9_fn"),t.execSQL_61zpoe$("CREATE TABLE IF NOT EXISTS ChangeLog ( chTableId INTEGER NOT NULL , chEntityPk BIGINT NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )"),t.execSQL_61zpoe$("CREATE TABLE IF NOT EXISTS ReplicationStatus ( tableId INTEGER NOT NULL , priority INTEGER NOT NULL , nodeId BIGINT NOT NULL , lastRemoteChangeTime BIGINT NOT NULL , lastFetchReplicationCompleteTime BIGINT NOT NULL , lastLocalChangeTime BIGINT NOT NULL , lastSendReplicationCompleteTime BIGINT NOT NULL , repStatusId SERIAL PRIMARY KEY NOT NULL )"),t.execSQL_61zpoe$("CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)"),t.execSQL_61zpoe$("ALTER TABLE DoorNode ALTER COLUMN nodeId TYPE BIGINT"),t.execSQL_61zpoe$("ALTER TABLE SyncNode ALTER COLUMN nodeClientId TYPE BIGINT"),t.execSQL_61zpoe$("ALTER TABLE UserSession ALTER COLUMN usClientNodeId TYPE BIGINT")),function(t){var e=p();e.add_11rb$("DROP TABLE IF EXISTS PersonCustomFieldValue");var n=t;if(1===E(n))e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk INTEGER NOT NULL, clVersionId INTEGER NOT NULL DEFAULT 0, clDestination INTEGER NOT NULL, clPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (clPk, clDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_14 AFTER INSERT ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_14 AFTER UPDATE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_14 AFTER DELETE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, OLD.clazzLogUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = OLD.clazzLogUid); END "),e.add_11rb$("CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid "),e.add_11rb$(" CREATE TRIGGER clazzlog_remote_insert_ins INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) /*psql ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk INTEGER NOT NULL, clarVersionId INTEGER NOT NULL DEFAULT 0, clarDestination INTEGER NOT NULL, clarPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (clarPk, clarDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_15 AFTER INSERT ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_15 AFTER UPDATE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_15 AFTER DELETE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, OLD.clazzLogAttendanceRecordUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = OLD.clazzLogAttendanceRecordUid); END "),e.add_11rb$("CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid "),e.add_11rb$(" CREATE TRIGGER clazzlogattendancerecord_remote_insert_ins INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) /*psql ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk INTEGER NOT NULL, scheduleVersionId INTEGER NOT NULL DEFAULT 0, scheduleDestination INTEGER NOT NULL, schedulePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (schedulePk, scheduleDestination)) "),e.add_11rb$(" CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId) "),e.add_11rb$(" CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_21 AFTER INSERT ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_21 AFTER UPDATE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_21 AFTER DELETE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, OLD.scheduleUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = OLD.scheduleUid); END "),e.add_11rb$("CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid "),e.add_11rb$(" CREATE TRIGGER schedule_remote_insert_ins INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) /*psql ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk INTEGER NOT NULL, hcVersionId INTEGER NOT NULL DEFAULT 0, hcDestination INTEGER NOT NULL, hcPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (hcPk, hcDestination)) "),e.add_11rb$(" CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId) "),e.add_11rb$(" CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_28 AFTER INSERT ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_28 AFTER UPDATE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_28 AFTER DELETE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, OLD.umCalendarUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = OLD.umCalendarUid); END "),e.add_11rb$("CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid "),e.add_11rb$(" CREATE TRIGGER holidaycalendar_remote_insert_ins INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW BEGIN REPLACE INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) /*psql ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk INTEGER NOT NULL, holidayVersionId INTEGER NOT NULL DEFAULT 0, holidayDestination INTEGER NOT NULL, holidayPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (holidayPk, holidayDestination)) "),e.add_11rb$(" CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId) "),e.add_11rb$(" CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_99 AFTER INSERT ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_99 AFTER UPDATE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_99 AFTER DELETE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, OLD.holUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = OLD.holUid); END "),e.add_11rb$("CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid "),e.add_11rb$(" CREATE TRIGGER holiday_remote_insert_ins INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) /*psql ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk INTEGER NOT NULL, personVersionId INTEGER NOT NULL DEFAULT 0, personDestination INTEGER NOT NULL, personPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (personPk, personDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_9 AFTER INSERT ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_9 AFTER UPDATE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_9 AFTER DELETE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, OLD.personUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = OLD.personUid); END "),e.add_11rb$("CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid "),e.add_11rb$(" CREATE TRIGGER person_remote_insert_ins INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) /*psql ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk INTEGER NOT NULL, clazzVersionId INTEGER NOT NULL DEFAULT 0, clazzDestination INTEGER NOT NULL, clazzPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (clazzPk, clazzDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_6 AFTER INSERT ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_6 AFTER UPDATE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_6 AFTER DELETE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, OLD.clazzUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = OLD.clazzUid); END "),e.add_11rb$("CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid "),e.add_11rb$(" CREATE TRIGGER clazz_remote_insert_ins INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) /*psql ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk INTEGER NOT NULL, ceVersionId INTEGER NOT NULL DEFAULT 0, ceDestination INTEGER NOT NULL, cePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cePk, ceDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_65 AFTER INSERT ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_65 AFTER UPDATE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_65 AFTER DELETE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, OLD.clazzEnrolmentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = OLD.clazzEnrolmentUid); END "),e.add_11rb$("CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid "),e.add_11rb$(" CREATE TRIGGER clazzenrolment_remote_insert_ins INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) /*psql ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk INTEGER NOT NULL, lrVersionId INTEGER NOT NULL DEFAULT 0, lrDestination INTEGER NOT NULL, lrPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lrPk, lrDestination)) "),e.add_11rb$(" CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId) "),e.add_11rb$(" CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_410 AFTER INSERT ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_410 AFTER UPDATE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_410 AFTER DELETE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, OLD.leavingReasonUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = OLD.leavingReasonUid); END "),e.add_11rb$("CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid "),e.add_11rb$(" CREATE TRIGGER leavingreason_remote_insert_ins INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) /*psql ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk INTEGER NOT NULL, ceVersionId INTEGER NOT NULL DEFAULT 0, ceDestination INTEGER NOT NULL, cePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cePk, ceDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_42 AFTER INSERT ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_42 AFTER UPDATE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_42 AFTER DELETE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, OLD.contentEntryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = OLD.contentEntryUid); END "),e.add_11rb$("CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid "),e.add_11rb$(" CREATE TRIGGER contententry_remote_insert_ins INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) /*psql ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct*/; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk INTEGER NOT NULL, ceccjVersionId INTEGER NOT NULL DEFAULT 0, ceccjDestination INTEGER NOT NULL, ceccjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ceccjPk, ceccjDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_3 AFTER INSERT ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_3 AFTER UPDATE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_3 AFTER DELETE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, OLD.ceccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = OLD.ceccjUid); END "),e.add_11rb$("CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid "),e.add_11rb$(" CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) /*psql ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk INTEGER NOT NULL, cepcjVersionId INTEGER NOT NULL DEFAULT 0, cepcjDestination INTEGER NOT NULL, cepcjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cepcjPk, cepcjDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_7 AFTER INSERT ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_7 AFTER UPDATE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_7 AFTER DELETE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, OLD.cepcjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = OLD.cepcjUid); END "),e.add_11rb$("CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid "),e.add_11rb$(" CREATE TRIGGER contententryparentchildjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) /*psql ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk INTEGER NOT NULL, cerejVersionId INTEGER NOT NULL DEFAULT 0, cerejDestination INTEGER NOT NULL, cerejPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cerejPk, cerejDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_8 AFTER INSERT ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_8 AFTER UPDATE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_8 AFTER DELETE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, OLD.cerejUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = OLD.cerejUid); END "),e.add_11rb$("CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid "),e.add_11rb$(" CREATE TRIGGER contententryrelatedentryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) /*psql ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk INTEGER NOT NULL, ccsVersionId INTEGER NOT NULL DEFAULT 0, ccsDestination INTEGER NOT NULL, ccsPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ccsPk, ccsDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_2 AFTER INSERT ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_2 AFTER UPDATE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_2 AFTER DELETE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, OLD.contentCategorySchemaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = OLD.contentCategorySchemaUid); END "),e.add_11rb$("CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid "),e.add_11rb$(" CREATE TRIGGER contentcategoryschema_remote_insert_ins INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) /*psql ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk INTEGER NOT NULL, ccVersionId INTEGER NOT NULL DEFAULT 0, ccDestination INTEGER NOT NULL, ccPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ccPk, ccDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_1 AFTER INSERT ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_1 AFTER UPDATE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_1 AFTER DELETE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, OLD.contentCategoryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = OLD.contentCategoryUid); END "),e.add_11rb$("CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid "),e.add_11rb$(" CREATE TRIGGER contentcategory_remote_insert_ins INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) /*psql ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk INTEGER NOT NULL, languageVersionId INTEGER NOT NULL DEFAULT 0, languageDestination INTEGER NOT NULL, languagePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (languagePk, languageDestination)) "),e.add_11rb$(" CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId) "),e.add_11rb$(" CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_13 AFTER INSERT ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_13 AFTER UPDATE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_13 AFTER DELETE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, OLD.langUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = OLD.langUid); END "),e.add_11rb$("CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid "),e.add_11rb$(" CREATE TRIGGER language_remote_insert_ins INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) /*psql ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk INTEGER NOT NULL, lvVersionId INTEGER NOT NULL DEFAULT 0, lvDestination INTEGER NOT NULL, lvPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lvPk, lvDestination)) "),e.add_11rb$(" CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId) "),e.add_11rb$(" CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_10 AFTER INSERT ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_10 AFTER UPDATE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_10 AFTER DELETE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, OLD.langVariantUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = OLD.langVariantUid); END "),e.add_11rb$("CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid "),e.add_11rb$(" CREATE TRIGGER languagevariant_remote_insert_ins INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) /*psql ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk INTEGER NOT NULL, pgVersionId INTEGER NOT NULL DEFAULT 0, pgDestination INTEGER NOT NULL, pgPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (pgPk, pgDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_43 AFTER INSERT ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_43 AFTER UPDATE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_43 AFTER DELETE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, OLD.groupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = OLD.groupUid); END "),e.add_11rb$("CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid "),e.add_11rb$(" CREATE TRIGGER persongroup_remote_insert_ins INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) /*psql ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk INTEGER NOT NULL, pgmVersionId INTEGER NOT NULL DEFAULT 0, pgmDestination INTEGER NOT NULL, pgmPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (pgmPk, pgmDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_44 AFTER INSERT ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_44 AFTER UPDATE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_44 AFTER DELETE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, OLD.groupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = OLD.groupMemberUid); END "),e.add_11rb$("CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid "),e.add_11rb$(" CREATE TRIGGER persongroupmember_remote_insert_ins INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) /*psql ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk INTEGER NOT NULL, ppVersionId INTEGER NOT NULL DEFAULT 0, ppDestination INTEGER NOT NULL, ppPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ppPk, ppDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_50 AFTER INSERT ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_50 AFTER UPDATE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_50 AFTER DELETE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, OLD.personPictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = OLD.personPictureUid); END "),e.add_11rb$("CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid "),e.add_11rb$(" CREATE TRIGGER personpicture_remote_insert_ins INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) /*psql ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk INTEGER NOT NULL, containerVersionId INTEGER NOT NULL DEFAULT 0, containerDestination INTEGER NOT NULL, containerPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (containerPk, containerDestination)) "),e.add_11rb$(" CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId) "),e.add_11rb$(" CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_51 AFTER INSERT ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_51 AFTER UPDATE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_51 AFTER DELETE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, OLD.containerUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = OLD.containerUid); END "),e.add_11rb$("CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid "),e.add_11rb$(" CREATE TRIGGER container_remote_insert_ins INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES (NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries) /*psql ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk INTEGER NOT NULL, veVersionId INTEGER NOT NULL DEFAULT 0, veDestination INTEGER NOT NULL, vePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (vePk, veDestination)) "),e.add_11rb$(" CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId) "),e.add_11rb$(" CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_62 AFTER INSERT ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_62 AFTER UPDATE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_62 AFTER DELETE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, OLD.verbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = OLD.verbUid); END "),e.add_11rb$("CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid "),e.add_11rb$(" CREATE TRIGGER verbentity_remote_insert_ins INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) /*psql ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk INTEGER NOT NULL, xoeVersionId INTEGER NOT NULL DEFAULT 0, xoeDestination INTEGER NOT NULL, xoePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (xoePk, xoeDestination)) "),e.add_11rb$(" CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId) "),e.add_11rb$(" CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_64 AFTER INSERT ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_64 AFTER UPDATE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_64 AFTER DELETE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, OLD.xObjectUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = OLD.xObjectUid); END "),e.add_11rb$("CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid "),e.add_11rb$(" CREATE TRIGGER xobjectentity_remote_insert_ins INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) /*psql ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk INTEGER NOT NULL, seVersionId INTEGER NOT NULL DEFAULT 0, seDestination INTEGER NOT NULL, sePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sePk, seDestination)) "),e.add_11rb$(" CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId) "),e.add_11rb$(" CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_60 AFTER INSERT ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_60 AFTER UPDATE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_60 AFTER DELETE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, OLD.statementUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = OLD.statementUid); END "),e.add_11rb$("CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid "),e.add_11rb$(" CREATE TRIGGER statemententity_remote_insert_ins INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) /*psql ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk INTEGER NOT NULL, cxosjVersionId INTEGER NOT NULL DEFAULT 0, cxosjDestination INTEGER NOT NULL, cxosjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cxosjPk, cxosjDestination)) "),e.add_11rb$(" CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId) "),e.add_11rb$(" CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_66 AFTER INSERT ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_66 AFTER UPDATE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_66 AFTER DELETE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, OLD.contextXObjectStatementJoinUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = OLD.contextXObjectStatementJoinUid); END "),e.add_11rb$("CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid "),e.add_11rb$(" CREATE TRIGGER contextxobjectstatementjoin_remote_insert_ins INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) /*psql ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk INTEGER NOT NULL, aeVersionId INTEGER NOT NULL DEFAULT 0, aeDestination INTEGER NOT NULL, aePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (aePk, aeDestination)) "),e.add_11rb$(" CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId) "),e.add_11rb$(" CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_68 AFTER INSERT ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_68 AFTER UPDATE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_68 AFTER DELETE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, OLD.agentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = OLD.agentUid); END "),e.add_11rb$("CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid "),e.add_11rb$(" CREATE TRIGGER agententity_remote_insert_ins INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) /*psql ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct*/; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk INTEGER NOT NULL, seVersionId INTEGER NOT NULL DEFAULT 0, seDestination INTEGER NOT NULL, sePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sePk, seDestination)) "),e.add_11rb$(" CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId) "),e.add_11rb$(" CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_70 AFTER INSERT ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_70 AFTER UPDATE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_70 AFTER DELETE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, OLD.stateUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = OLD.stateUid); END "),e.add_11rb$("CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid "),e.add_11rb$(" CREATE TRIGGER stateentity_remote_insert_ins INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) /*psql ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk INTEGER NOT NULL, sceVersionId INTEGER NOT NULL DEFAULT 0, sceDestination INTEGER NOT NULL, scePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (scePk, sceDestination)) "),e.add_11rb$(" CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId) "),e.add_11rb$(" CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_72 AFTER INSERT ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_72 AFTER UPDATE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_72 AFTER DELETE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, OLD.stateContentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = OLD.stateContentUid); END "),e.add_11rb$("CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid "),e.add_11rb$(" CREATE TRIGGER statecontententity_remote_insert_ins INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) /*psql ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk INTEGER NOT NULL, xlmeVersionId INTEGER NOT NULL DEFAULT 0, xlmeDestination INTEGER NOT NULL, xlmePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (xlmePk, xlmeDestination)) "),e.add_11rb$(" CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId) "),e.add_11rb$(" CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_74 AFTER INSERT ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_74 AFTER UPDATE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_74 AFTER DELETE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, OLD.statementLangMapUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = OLD.statementLangMapUid); END "),e.add_11rb$("CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid "),e.add_11rb$(" CREATE TRIGGER xlangmapentry_remote_insert_ins INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) /*psql ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk INTEGER NOT NULL, schoolVersionId INTEGER NOT NULL DEFAULT 0, schoolDestination INTEGER NOT NULL, schoolPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (schoolPk, schoolDestination)) "),e.add_11rb$(" CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId) "),e.add_11rb$(" CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_164 AFTER INSERT ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_164 AFTER UPDATE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_164 AFTER DELETE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, OLD.schoolUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = OLD.schoolUid); END "),e.add_11rb$("CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid "),e.add_11rb$(" CREATE TRIGGER school_remote_insert_ins INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW BEGIN REPLACE INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) /*psql ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk INTEGER NOT NULL, smVersionId INTEGER NOT NULL DEFAULT 0, smDestination INTEGER NOT NULL, smPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (smPk, smDestination)) "),e.add_11rb$(" CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId) "),e.add_11rb$(" CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_200 AFTER INSERT ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_200 AFTER UPDATE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_200 AFTER DELETE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, OLD.schoolMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = OLD.schoolMemberUid); END "),e.add_11rb$("CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid "),e.add_11rb$(" CREATE TRIGGER schoolmember_remote_insert_ins INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) /*psql ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk INTEGER NOT NULL, commentsVersionId INTEGER NOT NULL DEFAULT 0, commentsDestination INTEGER NOT NULL, commentsPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (commentsPk, commentsDestination)) "),e.add_11rb$(" CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId) "),e.add_11rb$(" CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_208 AFTER INSERT ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_208 AFTER UPDATE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_208 AFTER DELETE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, OLD.commentsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = OLD.commentsUid); END "),e.add_11rb$("CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid "),e.add_11rb$(" CREATE TRIGGER comments_remote_insert_ins INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) /*psql ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk INTEGER NOT NULL, reportVersionId INTEGER NOT NULL DEFAULT 0, reportDestination INTEGER NOT NULL, reportPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (reportPk, reportDestination)) "),e.add_11rb$(" CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId) "),e.add_11rb$(" CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_101 AFTER INSERT ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_101 AFTER UPDATE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_101 AFTER DELETE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, OLD.reportUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = OLD.reportUid); END "),e.add_11rb$("CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid "),e.add_11rb$(" CREATE TRIGGER report_remote_insert_ins INSTEAD OF INSERT ON Report_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Report(reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES (NEW.reportUid, NEW.reportOwnerUid, NEW.xAxis, NEW.reportDateRangeSelection, NEW.fromDate, NEW.fromRelTo, NEW.fromRelOffSet, NEW.fromRelUnit, NEW.toDate, NEW.toRelTo, NEW.toRelOffSet, NEW.toRelUnit, NEW.reportTitle, NEW.reportDescription, NEW.reportSeries, NEW.reportInactive, NEW.isTemplate, NEW.priority, NEW.reportTitleId, NEW.reportDescId, NEW.reportMasterChangeSeqNum, NEW.reportLocalChangeSeqNum, NEW.reportLastChangedBy, NEW.reportLct) /*psql ON CONFLICT (reportUid) DO UPDATE SET reportOwnerUid = EXCLUDED.reportOwnerUid, xAxis = EXCLUDED.xAxis, reportDateRangeSelection = EXCLUDED.reportDateRangeSelection, fromDate = EXCLUDED.fromDate, fromRelTo = EXCLUDED.fromRelTo, fromRelOffSet = EXCLUDED.fromRelOffSet, fromRelUnit = EXCLUDED.fromRelUnit, toDate = EXCLUDED.toDate, toRelTo = EXCLUDED.toRelTo, toRelOffSet = EXCLUDED.toRelOffSet, toRelUnit = EXCLUDED.toRelUnit, reportTitle = EXCLUDED.reportTitle, reportDescription = EXCLUDED.reportDescription, reportSeries = EXCLUDED.reportSeries, reportInactive = EXCLUDED.reportInactive, isTemplate = EXCLUDED.isTemplate, priority = EXCLUDED.priority, reportTitleId = EXCLUDED.reportTitleId, reportDescId = EXCLUDED.reportDescId, reportMasterChangeSeqNum = EXCLUDED.reportMasterChangeSeqNum, reportLocalChangeSeqNum = EXCLUDED.reportLocalChangeSeqNum, reportLastChangedBy = EXCLUDED.reportLastChangedBy, reportLct = EXCLUDED.reportLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk INTEGER NOT NULL, siteVersionId INTEGER NOT NULL DEFAULT 0, siteDestination INTEGER NOT NULL, sitePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sitePk, siteDestination)) "),e.add_11rb$(" CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId) "),e.add_11rb$(" CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_189 AFTER INSERT ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_189 AFTER UPDATE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_189 AFTER DELETE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, OLD.siteUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = OLD.siteUid); END "),e.add_11rb$("CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid "),e.add_11rb$(" CREATE TRIGGER site_remote_insert_ins INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) /*psql ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt*/; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk INTEGER NOT NULL, lgVersionId INTEGER NOT NULL DEFAULT 0, lgDestination INTEGER NOT NULL, lgPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lgPk, lgDestination)) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_301 AFTER INSERT ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_301 AFTER UPDATE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_301 AFTER DELETE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, OLD.learnerGroupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = OLD.learnerGroupUid); END "),e.add_11rb$("CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid "),e.add_11rb$(" CREATE TRIGGER learnergroup_remote_insert_ins INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) /*psql ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk INTEGER NOT NULL, lgmVersionId INTEGER NOT NULL DEFAULT 0, lgmDestination INTEGER NOT NULL, lgmPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lgmPk, lgmDestination)) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_300 AFTER INSERT ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_300 AFTER UPDATE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_300 AFTER DELETE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, OLD.learnerGroupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = OLD.learnerGroupMemberUid); END "),e.add_11rb$("CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid "),e.add_11rb$(" CREATE TRIGGER learnergroupmember_remote_insert_ins INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) /*psql ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk INTEGER NOT NULL, glsVersionId INTEGER NOT NULL DEFAULT 0, glsDestination INTEGER NOT NULL, glsPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (glsPk, glsDestination)) "),e.add_11rb$(" CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId) "),e.add_11rb$(" CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_302 AFTER INSERT ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_302 AFTER UPDATE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_302 AFTER DELETE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, OLD.groupLearningSessionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = OLD.groupLearningSessionUid); END "),e.add_11rb$("CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid "),e.add_11rb$(" CREATE TRIGGER grouplearningsession_remote_insert_ins INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) /*psql ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk INTEGER NOT NULL, stVersionId INTEGER NOT NULL DEFAULT 0, stDestination INTEGER NOT NULL, stPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (stPk, stDestination)) "),e.add_11rb$(" CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId) "),e.add_11rb$(" CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_272 AFTER INSERT ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_272 AFTER UPDATE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_272 AFTER DELETE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, OLD.sTermsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = OLD.sTermsUid); END "),e.add_11rb$("CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid "),e.add_11rb$(" CREATE TRIGGER siteterms_remote_insert_ins INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) /*psql ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk INTEGER NOT NULL, ccjVersionId INTEGER NOT NULL DEFAULT 0, ccjDestination INTEGER NOT NULL, ccjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ccjPk, ccjDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_134 AFTER INSERT ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_134 AFTER UPDATE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_134 AFTER DELETE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, OLD.ccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = OLD.ccjUid); END "),e.add_11rb$("CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid "),e.add_11rb$(" CREATE TRIGGER clazzcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) /*psql ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk INTEGER NOT NULL, ppjVersionId INTEGER NOT NULL DEFAULT 0, ppjDestination INTEGER NOT NULL, ppjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ppjPk, ppjDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_512 AFTER INSERT ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_512 AFTER UPDATE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_512 AFTER DELETE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, OLD.ppjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = OLD.ppjUid); END "),e.add_11rb$("CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid "),e.add_11rb$(" CREATE TRIGGER personparentjoin_remote_insert_ins INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) /*psql ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk INTEGER NOT NULL, sgVersionId INTEGER NOT NULL DEFAULT 0, sgDestination INTEGER NOT NULL, sgPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sgPk, sgDestination)) "),e.add_11rb$(" CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId) "),e.add_11rb$(" CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_48 AFTER INSERT ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_48 AFTER UPDATE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_48 AFTER DELETE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, OLD.sgUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = OLD.sgUid); END "),e.add_11rb$("CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid "),e.add_11rb$(" CREATE TRIGGER sg_remote_insert_ins INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) /*psql ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions */ ; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk INTEGER NOT NULL, erVersionId INTEGER NOT NULL DEFAULT 0, erDestination INTEGER NOT NULL, erPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (erPk, erDestination)) "),e.add_11rb$(" CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId) "),e.add_11rb$(" CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_419 AFTER INSERT ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_419 AFTER UPDATE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_419 AFTER DELETE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, OLD.errUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = OLD.errUid); END "),e.add_11rb$("CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid "),e.add_11rb$(" CREATE TRIGGER errorreport_remote_insert_ins INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) /*psql ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk INTEGER NOT NULL, caVersionId INTEGER NOT NULL DEFAULT 0, caDestination INTEGER NOT NULL, caPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (caPk, caDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_520 AFTER INSERT ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_520 AFTER UPDATE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_520 AFTER DELETE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, OLD.caUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = OLD.caUid); END "),e.add_11rb$("CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid "),e.add_11rb$(" CREATE TRIGGER clazzassignment_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignment(caUid, caTitle, caDescription, caDeadlineDate, caStartDate, caLateSubmissionType, caLateSubmissionPenalty, caGracePeriodDate, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caDeadlineDate, NEW.caStartDate, NEW.caLateSubmissionType, NEW.caLateSubmissionPenalty, NEW.caGracePeriodDate, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) /*psql ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caDeadlineDate = EXCLUDED.caDeadlineDate, caStartDate = EXCLUDED.caStartDate, caLateSubmissionType = EXCLUDED.caLateSubmissionType, caLateSubmissionPenalty = EXCLUDED.caLateSubmissionPenalty, caGracePeriodDate = EXCLUDED.caGracePeriodDate, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk INTEGER NOT NULL, cacjVersionId INTEGER NOT NULL DEFAULT 0, cacjDestination INTEGER NOT NULL, cacjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cacjPk, cacjDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_521 AFTER INSERT ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_521 AFTER UPDATE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_521 AFTER DELETE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, OLD.cacjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = OLD.cacjUid); END "),e.add_11rb$("CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid "),e.add_11rb$(" CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) /*psql ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk INTEGER NOT NULL, paVersionId INTEGER NOT NULL DEFAULT 0, paDestination INTEGER NOT NULL, paPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (paPk, paDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_678 AFTER INSERT ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_678 AFTER UPDATE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_678 AFTER DELETE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, OLD.pauthUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = OLD.pauthUid); END "),e.add_11rb$("CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid "),e.add_11rb$(" CREATE TRIGGER personauth2_remote_insert_ins INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) /*psql ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct */; END "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk INTEGER NOT NULL, usVersionId INTEGER NOT NULL DEFAULT 0, usDestination INTEGER NOT NULL, usPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (usPk, usDestination)) "),e.add_11rb$(" CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId) "),e.add_11rb$(" CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending) "),e.add_11rb$(" CREATE TRIGGER ch_ins_679 AFTER INSERT ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_679 AFTER UPDATE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_679 AFTER DELETE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, OLD.usUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = OLD.usUid); END "),e.add_11rb$("CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid "),e.add_11rb$(" CREATE TRIGGER usersession_remote_ins_ins INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) /*postgres ON CONFLICT (usUid) DO UPDATE SET usStatus = EXCLUDED.usStatus, usEndTime = EXCLUDED.usEndTime, usReason = EXCLUDED.usReason */ ; END ");else{var i="UPDATE ClazzLog SET clazzLogLastChangedTime = "+d().toString()+" WHERE clazzLogLastChangedTime = 0";e.add_11rb$(i);var o="UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordLastChangedTime = "+d().toString()+" WHERE clazzLogAttendanceRecordLastChangedTime = 0";e.add_11rb$(o);var r="UPDATE Schedule SET scheduleLastChangedTime = "+d().toString()+" WHERE scheduleLastChangedTime = 0";e.add_11rb$(r);var a="UPDATE HolidayCalendar SET umCalendarLct = "+d().toString()+" WHERE umCalendarLct = 0";e.add_11rb$(a);var s="UPDATE Holiday SET holLct = "+d().toString()+" WHERE holLct = 0";e.add_11rb$(s);var c="UPDATE Person SET personLct = "+d().toString()+" WHERE personLct = 0";e.add_11rb$(c);var u="UPDATE Clazz SET clazzLct = "+d().toString()+" WHERE clazzLct = 0";e.add_11rb$(u);var h="UPDATE ClazzEnrolment SET clazzEnrolmentLct = "+d().toString()+" WHERE clazzEnrolmentLct = 0";e.add_11rb$(h);var _="UPDATE LeavingReason SET leavingReasonLct = "+d().toString()+" WHERE leavingReasonLct = 0";e.add_11rb$(_);var f="UPDATE ContentEntry SET contentEntryLct = "+d().toString()+" WHERE contentEntryLct = 0";e.add_11rb$(f);var y="UPDATE ContentEntryContentCategoryJoin SET ceccjLct = "+d().toString()+" WHERE ceccjLct = 0";e.add_11rb$(y);var T="UPDATE ContentEntryParentChildJoin SET cepcjLct = "+d().toString()+" WHERE cepcjLct = 0";e.add_11rb$(T);var $="UPDATE ContentEntryRelatedEntryJoin SET cerejLct = "+d().toString()+" WHERE cerejLct = 0";e.add_11rb$($);var N="UPDATE ContentCategorySchema SET contentCategorySchemaLct = "+d().toString()+" WHERE contentCategorySchemaLct = 0";e.add_11rb$(N);var g="UPDATE ContentCategory SET contentCategoryLct = "+d().toString()+" WHERE contentCategoryLct = 0";e.add_11rb$(g);var R="UPDATE Language SET langLct = "+d().toString()+" WHERE langLct = 0";e.add_11rb$(R);var C="UPDATE LanguageVariant SET langVariantLct = "+d().toString()+" WHERE langVariantLct = 0";e.add_11rb$(C);var S="UPDATE PersonGroup SET groupLct = "+d().toString()+" WHERE groupLct = 0";e.add_11rb$(S);var I="UPDATE PersonGroupMember SET groupMemberLct = "+d().toString()+" WHERE groupMemberLct = 0";e.add_11rb$(I);var L="UPDATE PersonPicture SET personPictureLct = "+d().toString()+" WHERE personPictureLct = 0";e.add_11rb$(L);var b="UPDATE Container SET cntLct = "+d().toString()+" WHERE cntLct = 0";e.add_11rb$(b);var v="UPDATE VerbEntity SET verbLct = "+d().toString()+" WHERE verbLct = 0";e.add_11rb$(v);var O="UPDATE XObjectEntity SET xObjectLct = "+d().toString()+" WHERE xObjectLct = 0";e.add_11rb$(O);var U="UPDATE StatementEntity SET statementLct = "+d().toString()+" WHERE statementLct = 0";e.add_11rb$(U);var D="UPDATE ContextXObjectStatementJoin SET contextXObjectLct = "+d().toString()+" WHERE contextXObjectLct = 0";e.add_11rb$(D);var A="UPDATE AgentEntity SET agentLct = "+d().toString()+" WHERE agentLct = 0";e.add_11rb$(A);var k="UPDATE StateEntity SET stateLct = "+d().toString()+" WHERE stateLct = 0";e.add_11rb$(k);var P="UPDATE StateContentEntity SET stateContentLct = "+d().toString()+" WHERE stateContentLct = 0";e.add_11rb$(P);var x="UPDATE XLangMapEntry SET statementLangMapLct = "+d().toString()+" WHERE statementLangMapLct = 0";e.add_11rb$(x);var w="UPDATE School SET schoolLct = "+d().toString()+" WHERE schoolLct = 0";e.add_11rb$(w);var z="UPDATE SchoolMember SET schoolMemberLct = "+d().toString()+" WHERE schoolMemberLct = 0";e.add_11rb$(z);var G="UPDATE Comments SET commentsLct = "+d().toString()+" WHERE commentsLct = 0";e.add_11rb$(G);var j="UPDATE Report SET reportLct = "+d().toString()+" WHERE reportLct = 0";e.add_11rb$(j);var F="UPDATE Site SET siteLct = "+d().toString()+" WHERE siteLct = 0";e.add_11rb$(F);var M="UPDATE LearnerGroup SET learnerGroupLct = "+d().toString()+" WHERE learnerGroupLct = 0";e.add_11rb$(M);var W="UPDATE LearnerGroupMember SET learnerGroupMemberLct = "+d().toString()+" WHERE learnerGroupMemberLct = 0";e.add_11rb$(W);var X="UPDATE GroupLearningSession SET groupLearningSessionLct = "+d().toString()+" WHERE groupLearningSessionLct = 0";e.add_11rb$(X);var B="UPDATE SiteTerms SET sTermsLct = "+d().toString()+" WHERE sTermsLct = 0";e.add_11rb$(B);var q="UPDATE ClazzContentJoin SET ccjLct = "+d().toString()+" WHERE ccjLct = 0";e.add_11rb$(q);var H="UPDATE PersonParentJoin SET ppjLct = "+d().toString()+" WHERE ppjLct = 0";e.add_11rb$(H);var V="UPDATE ScopedGrant SET sgLct = "+d().toString()+" WHERE sgLct = 0";e.add_11rb$(V);var K="UPDATE ErrorReport SET errLct = "+d().toString()+" WHERE errLct = 0";e.add_11rb$(K);var J="UPDATE ClazzAssignment SET caLct = "+d().toString()+" WHERE caLct = 0";e.add_11rb$(J);var Y="UPDATE ClazzAssignmentContentJoin SET cacjLct = "+d().toString()+" WHERE cacjLct = 0";e.add_11rb$(Y);var Q="UPDATE PersonAuth2 SET pauthLct = "+d().toString()+" WHERE pauthLct = 0";e.add_11rb$(Q);var Z="UPDATE UserSession SET usLct = "+d().toString()+" WHERE usLct = 0";e.add_11rb$(Z),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk BIGINT NOT NULL, clVersionId BIGINT NOT NULL DEFAULT 0, clDestination BIGINT NOT NULL, clPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clPk, clDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, NEW.clazzLogUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_14_trig AFTER UPDATE OR INSERT ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_upd_14_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, OLD.clazzLogUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_14_trig AFTER DELETE ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_del_14_fn(); "),e.add_11rb$("CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzlog_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzlog_remote_insert_trig INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlog_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk BIGINT NOT NULL, clarVersionId BIGINT NOT NULL DEFAULT 0, clarDestination BIGINT NOT NULL, clarPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clarPk, clarDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, NEW.clazzLogAttendanceRecordUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_15_trig AFTER UPDATE OR INSERT ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_upd_15_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, OLD.clazzLogAttendanceRecordUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_15_trig AFTER DELETE ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_del_15_fn(); "),e.add_11rb$("CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzlogattendancerecord_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzlogattendancerecord_remote_insert_trig INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlogattendancerecord_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk BIGINT NOT NULL, scheduleVersionId BIGINT NOT NULL DEFAULT 0, scheduleDestination BIGINT NOT NULL, schedulePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schedulePk, scheduleDestination)) "),e.add_11rb$(" CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId) "),e.add_11rb$(" CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, NEW.scheduleUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_21_trig AFTER UPDATE OR INSERT ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_upd_21_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, OLD.scheduleUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_21_trig AFTER DELETE ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_del_21_fn(); "),e.add_11rb$("CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION schedule_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER schedule_remote_insert_trig INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schedule_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk BIGINT NOT NULL, hcVersionId BIGINT NOT NULL DEFAULT 0, hcDestination BIGINT NOT NULL, hcPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (hcPk, hcDestination)) "),e.add_11rb$(" CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId) "),e.add_11rb$(" CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, NEW.umCalendarUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_28_trig AFTER UPDATE OR INSERT ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_upd_28_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, OLD.umCalendarUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_28_trig AFTER DELETE ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_del_28_fn(); "),e.add_11rb$("CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION holidaycalendar_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER holidaycalendar_remote_insert_trig INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holidaycalendar_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk BIGINT NOT NULL, holidayVersionId BIGINT NOT NULL DEFAULT 0, holidayDestination BIGINT NOT NULL, holidayPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (holidayPk, holidayDestination)) "),e.add_11rb$(" CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId) "),e.add_11rb$(" CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, NEW.holUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_99_trig AFTER UPDATE OR INSERT ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_upd_99_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, OLD.holUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_99_trig AFTER DELETE ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_del_99_fn(); "),e.add_11rb$("CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION holiday_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER holiday_remote_insert_trig INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holiday_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk BIGINT NOT NULL, personVersionId BIGINT NOT NULL DEFAULT 0, personDestination BIGINT NOT NULL, personPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (personPk, personDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, NEW.personUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_9_trig AFTER UPDATE OR INSERT ON Person FOR EACH ROW EXECUTE PROCEDURE ch_upd_9_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, OLD.personUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_9_trig AFTER DELETE ON Person FOR EACH ROW EXECUTE PROCEDURE ch_del_9_fn(); "),e.add_11rb$("CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION person_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER person_remote_insert_trig INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW EXECUTE PROCEDURE person_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk BIGINT NOT NULL, clazzVersionId BIGINT NOT NULL DEFAULT 0, clazzDestination BIGINT NOT NULL, clazzPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clazzPk, clazzDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, NEW.clazzUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_6_trig AFTER UPDATE OR INSERT ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_upd_6_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, OLD.clazzUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_6_trig AFTER DELETE ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_del_6_fn(); "),e.add_11rb$("CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazz_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazz_remote_insert_trig INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazz_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk BIGINT NOT NULL, ceVersionId BIGINT NOT NULL DEFAULT 0, ceDestination BIGINT NOT NULL, cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, NEW.clazzEnrolmentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_65_trig AFTER UPDATE OR INSERT ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_upd_65_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, OLD.clazzEnrolmentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_65_trig AFTER DELETE ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_del_65_fn(); "),e.add_11rb$("CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzenrolment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzenrolment_remote_insert_trig INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzenrolment_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk BIGINT NOT NULL, lrVersionId BIGINT NOT NULL DEFAULT 0, lrDestination BIGINT NOT NULL, lrPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lrPk, lrDestination)) "),e.add_11rb$(" CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId) "),e.add_11rb$(" CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, NEW.leavingReasonUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_410_trig AFTER UPDATE OR INSERT ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_upd_410_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, OLD.leavingReasonUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_410_trig AFTER DELETE ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_del_410_fn(); "),e.add_11rb$("CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION leavingreason_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER leavingreason_remote_insert_trig INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW EXECUTE PROCEDURE leavingreason_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk BIGINT NOT NULL, ceVersionId BIGINT NOT NULL DEFAULT 0, ceDestination BIGINT NOT NULL, cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, NEW.contentEntryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_42_trig AFTER UPDATE OR INSERT ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_42_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, OLD.contentEntryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_42_trig AFTER DELETE ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_42_fn(); "),e.add_11rb$("CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION contententry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER contententry_remote_insert_trig INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententry_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk BIGINT NOT NULL, ceccjVersionId BIGINT NOT NULL DEFAULT 0, ceccjDestination BIGINT NOT NULL, ceccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ceccjPk, ceccjDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, NEW.ceccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_3_trig AFTER UPDATE OR INSERT ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_3_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, OLD.ceccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_3_trig AFTER DELETE ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_3_fn(); "),e.add_11rb$("CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION contententrycontentcategoryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententrycontentcategoryjoin_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk BIGINT NOT NULL, cepcjVersionId BIGINT NOT NULL DEFAULT 0, cepcjDestination BIGINT NOT NULL, cepcjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepcjPk, cepcjDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, NEW.cepcjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_7_trig AFTER UPDATE OR INSERT ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_7_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, OLD.cepcjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_7_trig AFTER DELETE ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_7_fn(); "),e.add_11rb$("CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION contententryparentchildjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER contententryparentchildjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryparentchildjoin_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk BIGINT NOT NULL, cerejVersionId BIGINT NOT NULL DEFAULT 0, cerejDestination BIGINT NOT NULL, cerejPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cerejPk, cerejDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, NEW.cerejUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_8_trig AFTER UPDATE OR INSERT ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_8_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, OLD.cerejUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_8_trig AFTER DELETE ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_8_fn(); "),e.add_11rb$("CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION contententryrelatedentryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER contententryrelatedentryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryrelatedentryjoin_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk BIGINT NOT NULL, ccsVersionId BIGINT NOT NULL DEFAULT 0, ccsDestination BIGINT NOT NULL, ccsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccsPk, ccsDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, NEW.contentCategorySchemaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_2_trig AFTER UPDATE OR INSERT ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_upd_2_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, OLD.contentCategorySchemaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_2_trig AFTER DELETE ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_del_2_fn(); "),e.add_11rb$("CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION contentcategoryschema_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER contentcategoryschema_remote_insert_trig INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategoryschema_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk BIGINT NOT NULL, ccVersionId BIGINT NOT NULL DEFAULT 0, ccDestination BIGINT NOT NULL, ccPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccPk, ccDestination)) "),e.add_11rb$(" CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId) "),e.add_11rb$(" CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, NEW.contentCategoryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_1_trig AFTER UPDATE OR INSERT ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_upd_1_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, OLD.contentCategoryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_1_trig AFTER DELETE ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_del_1_fn(); "),e.add_11rb$("CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION contentcategory_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER contentcategory_remote_insert_trig INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategory_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk BIGINT NOT NULL, languageVersionId BIGINT NOT NULL DEFAULT 0, languageDestination BIGINT NOT NULL, languagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (languagePk, languageDestination)) "),e.add_11rb$(" CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId) "),e.add_11rb$(" CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, NEW.langUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_13_trig AFTER UPDATE OR INSERT ON Language FOR EACH ROW EXECUTE PROCEDURE ch_upd_13_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, OLD.langUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_13_trig AFTER DELETE ON Language FOR EACH ROW EXECUTE PROCEDURE ch_del_13_fn(); "),e.add_11rb$("CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION language_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER language_remote_insert_trig INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW EXECUTE PROCEDURE language_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk BIGINT NOT NULL, lvVersionId BIGINT NOT NULL DEFAULT 0, lvDestination BIGINT NOT NULL, lvPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lvPk, lvDestination)) "),e.add_11rb$(" CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId) "),e.add_11rb$(" CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, NEW.langVariantUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_10_trig AFTER UPDATE OR INSERT ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_upd_10_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, OLD.langVariantUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_10_trig AFTER DELETE ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_del_10_fn(); "),e.add_11rb$("CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION languagevariant_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER languagevariant_remote_insert_trig INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE languagevariant_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk BIGINT NOT NULL, pgVersionId BIGINT NOT NULL DEFAULT 0, pgDestination BIGINT NOT NULL, pgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgPk, pgDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, NEW.groupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_43_trig AFTER UPDATE OR INSERT ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_43_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, OLD.groupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_43_trig AFTER DELETE ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_43_fn(); "),e.add_11rb$("CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION persongroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER persongroup_remote_insert_trig INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroup_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk BIGINT NOT NULL, pgmVersionId BIGINT NOT NULL DEFAULT 0, pgmDestination BIGINT NOT NULL, pgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgmPk, pgmDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, NEW.groupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_44_trig AFTER UPDATE OR INSERT ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_44_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, OLD.groupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_44_trig AFTER DELETE ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_44_fn(); "),e.add_11rb$("CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION persongroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER persongroupmember_remote_insert_trig INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroupmember_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk BIGINT NOT NULL, ppVersionId BIGINT NOT NULL DEFAULT 0, ppDestination BIGINT NOT NULL, ppPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppPk, ppDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, NEW.personPictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_50_trig AFTER UPDATE OR INSERT ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_50_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, OLD.personPictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_50_trig AFTER DELETE ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_50_fn(); "),e.add_11rb$("CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION personpicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER personpicture_remote_insert_trig INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personpicture_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk BIGINT NOT NULL, containerVersionId BIGINT NOT NULL DEFAULT 0, containerDestination BIGINT NOT NULL, containerPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (containerPk, containerDestination)) "),e.add_11rb$(" CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId) "),e.add_11rb$(" CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, NEW.containerUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_51_trig AFTER UPDATE OR INSERT ON Container FOR EACH ROW EXECUTE PROCEDURE ch_upd_51_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, OLD.containerUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_51_trig AFTER DELETE ON Container FOR EACH ROW EXECUTE PROCEDURE ch_del_51_fn(); "),e.add_11rb$("CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION container_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES (NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries) ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER container_remote_insert_trig INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW EXECUTE PROCEDURE container_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk BIGINT NOT NULL, veVersionId BIGINT NOT NULL DEFAULT 0, veDestination BIGINT NOT NULL, vePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (vePk, veDestination)) "),e.add_11rb$(" CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId) "),e.add_11rb$(" CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, NEW.verbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_62_trig AFTER UPDATE OR INSERT ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_62_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, OLD.verbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_62_trig AFTER DELETE ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_62_fn(); "),e.add_11rb$("CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION verbentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER verbentity_remote_insert_trig INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE verbentity_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk BIGINT NOT NULL, xoeVersionId BIGINT NOT NULL DEFAULT 0, xoeDestination BIGINT NOT NULL, xoePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xoePk, xoeDestination)) "),e.add_11rb$(" CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId) "),e.add_11rb$(" CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, NEW.xObjectUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_64_trig AFTER UPDATE OR INSERT ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_64_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, OLD.xObjectUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_64_trig AFTER DELETE ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_64_fn(); "),e.add_11rb$("CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION xobjectentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER xobjectentity_remote_insert_trig INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xobjectentity_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk BIGINT NOT NULL, seVersionId BIGINT NOT NULL DEFAULT 0, seDestination BIGINT NOT NULL, sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination)) "),e.add_11rb$(" CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId) "),e.add_11rb$(" CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, NEW.statementUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_60_trig AFTER UPDATE OR INSERT ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_60_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, OLD.statementUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_60_trig AFTER DELETE ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_60_fn(); "),e.add_11rb$("CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION statemententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER statemententity_remote_insert_trig INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statemententity_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk BIGINT NOT NULL, cxosjVersionId BIGINT NOT NULL DEFAULT 0, cxosjDestination BIGINT NOT NULL, cxosjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cxosjPk, cxosjDestination)) "),e.add_11rb$(" CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId) "),e.add_11rb$(" CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, NEW.contextXObjectStatementJoinUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_66_trig AFTER UPDATE OR INSERT ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_66_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, OLD.contextXObjectStatementJoinUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_66_trig AFTER DELETE ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_66_fn(); "),e.add_11rb$("CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION contextxobjectstatementjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER contextxobjectstatementjoin_remote_insert_trig INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contextxobjectstatementjoin_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk BIGINT NOT NULL, aeVersionId BIGINT NOT NULL DEFAULT 0, aeDestination BIGINT NOT NULL, aePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (aePk, aeDestination)) "),e.add_11rb$(" CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId) "),e.add_11rb$(" CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, NEW.agentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_68_trig AFTER UPDATE OR INSERT ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_68_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, OLD.agentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_68_trig AFTER DELETE ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_68_fn(); "),e.add_11rb$("CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION agententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER agententity_remote_insert_trig INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE agententity_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk BIGINT NOT NULL, seVersionId BIGINT NOT NULL DEFAULT 0, seDestination BIGINT NOT NULL, sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination)) "),e.add_11rb$(" CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId) "),e.add_11rb$(" CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, NEW.stateUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_70_trig AFTER UPDATE OR INSERT ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_70_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, OLD.stateUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_70_trig AFTER DELETE ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_70_fn(); "),e.add_11rb$("CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION stateentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER stateentity_remote_insert_trig INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE stateentity_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk BIGINT NOT NULL, sceVersionId BIGINT NOT NULL DEFAULT 0, sceDestination BIGINT NOT NULL, scePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (scePk, sceDestination)) "),e.add_11rb$(" CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId) "),e.add_11rb$(" CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, NEW.stateContentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_72_trig AFTER UPDATE OR INSERT ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_72_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, OLD.stateContentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_72_trig AFTER DELETE ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_72_fn(); "),e.add_11rb$("CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION statecontententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER statecontententity_remote_insert_trig INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statecontententity_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk BIGINT NOT NULL, xlmeVersionId BIGINT NOT NULL DEFAULT 0, xlmeDestination BIGINT NOT NULL, xlmePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xlmePk, xlmeDestination)) "),e.add_11rb$(" CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId) "),e.add_11rb$(" CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, NEW.statementLangMapUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_74_trig AFTER UPDATE OR INSERT ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_74_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, OLD.statementLangMapUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_74_trig AFTER DELETE ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_74_fn(); "),e.add_11rb$("CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION xlangmapentry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER xlangmapentry_remote_insert_trig INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xlangmapentry_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk BIGINT NOT NULL, schoolVersionId BIGINT NOT NULL DEFAULT 0, schoolDestination BIGINT NOT NULL, schoolPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schoolPk, schoolDestination)) "),e.add_11rb$(" CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId) "),e.add_11rb$(" CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, NEW.schoolUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_164_trig AFTER UPDATE OR INSERT ON School FOR EACH ROW EXECUTE PROCEDURE ch_upd_164_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, OLD.schoolUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_164_trig AFTER DELETE ON School FOR EACH ROW EXECUTE PROCEDURE ch_del_164_fn(); "),e.add_11rb$("CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION school_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER school_remote_insert_trig INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW EXECUTE PROCEDURE school_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk BIGINT NOT NULL, smVersionId BIGINT NOT NULL DEFAULT 0, smDestination BIGINT NOT NULL, smPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (smPk, smDestination)) "),e.add_11rb$(" CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId) "),e.add_11rb$(" CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, NEW.schoolMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_200_trig AFTER UPDATE OR INSERT ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_200_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, OLD.schoolMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_200_trig AFTER DELETE ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_del_200_fn(); "),e.add_11rb$("CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION schoolmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER schoolmember_remote_insert_trig INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schoolmember_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk BIGINT NOT NULL, commentsVersionId BIGINT NOT NULL DEFAULT 0, commentsDestination BIGINT NOT NULL, commentsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (commentsPk, commentsDestination)) "),e.add_11rb$(" CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId) "),e.add_11rb$(" CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, NEW.commentsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_208_trig AFTER UPDATE OR INSERT ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_upd_208_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, OLD.commentsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_208_trig AFTER DELETE ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_del_208_fn(); "),e.add_11rb$("CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION comments_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER comments_remote_insert_trig INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW EXECUTE PROCEDURE comments_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk BIGINT NOT NULL, reportVersionId BIGINT NOT NULL DEFAULT 0, reportDestination BIGINT NOT NULL, reportPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (reportPk, reportDestination)) "),e.add_11rb$(" CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId) "),e.add_11rb$(" CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, NEW.reportUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_101_trig AFTER UPDATE OR INSERT ON Report FOR EACH ROW EXECUTE PROCEDURE ch_upd_101_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, OLD.reportUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_101_trig AFTER DELETE ON Report FOR EACH ROW EXECUTE PROCEDURE ch_del_101_fn(); "),e.add_11rb$("CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk BIGINT NOT NULL, siteVersionId BIGINT NOT NULL DEFAULT 0, siteDestination BIGINT NOT NULL, sitePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sitePk, siteDestination)) "),e.add_11rb$(" CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId) "),e.add_11rb$(" CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, NEW.siteUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_189_trig AFTER UPDATE OR INSERT ON Site FOR EACH ROW EXECUTE PROCEDURE ch_upd_189_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, OLD.siteUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_189_trig AFTER DELETE ON Site FOR EACH ROW EXECUTE PROCEDURE ch_del_189_fn(); "),e.add_11rb$("CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION site_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER site_remote_insert_trig INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW EXECUTE PROCEDURE site_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk BIGINT NOT NULL, lgVersionId BIGINT NOT NULL DEFAULT 0, lgDestination BIGINT NOT NULL, lgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgPk, lgDestination)) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, NEW.learnerGroupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_301_trig AFTER UPDATE OR INSERT ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_301_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, OLD.learnerGroupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_301_trig AFTER DELETE ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_301_fn(); "),e.add_11rb$("CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION learnergroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER learnergroup_remote_insert_trig INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroup_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk BIGINT NOT NULL, lgmVersionId BIGINT NOT NULL DEFAULT 0, lgmDestination BIGINT NOT NULL, lgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgmPk, lgmDestination)) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId) "),e.add_11rb$(" CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, NEW.learnerGroupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_300_trig AFTER UPDATE OR INSERT ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_300_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, OLD.learnerGroupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_300_trig AFTER DELETE ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_300_fn(); "),e.add_11rb$("CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION learnergroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER learnergroupmember_remote_insert_trig INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroupmember_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk BIGINT NOT NULL, glsVersionId BIGINT NOT NULL DEFAULT 0, glsDestination BIGINT NOT NULL, glsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (glsPk, glsDestination)) "),e.add_11rb$(" CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId) "),e.add_11rb$(" CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, NEW.groupLearningSessionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_302_trig AFTER UPDATE OR INSERT ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_302_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, OLD.groupLearningSessionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_302_trig AFTER DELETE ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_del_302_fn(); "),e.add_11rb$("CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION grouplearningsession_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER grouplearningsession_remote_insert_trig INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE grouplearningsession_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk BIGINT NOT NULL, stVersionId BIGINT NOT NULL DEFAULT 0, stDestination BIGINT NOT NULL, stPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (stPk, stDestination)) "),e.add_11rb$(" CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId) "),e.add_11rb$(" CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, NEW.sTermsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_272_trig AFTER UPDATE OR INSERT ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_upd_272_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, OLD.sTermsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_272_trig AFTER DELETE ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_del_272_fn(); "),e.add_11rb$("CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION siteterms_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER siteterms_remote_insert_trig INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW EXECUTE PROCEDURE siteterms_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk BIGINT NOT NULL, ccjVersionId BIGINT NOT NULL DEFAULT 0, ccjDestination BIGINT NOT NULL, ccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccjPk, ccjDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, NEW.ccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_134_trig AFTER UPDATE OR INSERT ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_134_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, OLD.ccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_134_trig AFTER DELETE ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_134_fn(); "),e.add_11rb$("CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzcontentjoin_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk BIGINT NOT NULL, ppjVersionId BIGINT NOT NULL DEFAULT 0, ppjDestination BIGINT NOT NULL, ppjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppjPk, ppjDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, NEW.ppjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_512_trig AFTER UPDATE OR INSERT ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_512_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, OLD.ppjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_512_trig AFTER DELETE ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_512_fn(); "),e.add_11rb$("CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION personparentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER personparentjoin_remote_insert_trig INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personparentjoin_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk BIGINT NOT NULL, sgVersionId BIGINT NOT NULL DEFAULT 0, sgDestination BIGINT NOT NULL, sgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sgPk, sgDestination)) "),e.add_11rb$(" CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId) "),e.add_11rb$(" CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, NEW.sgUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_48_trig AFTER UPDATE OR INSERT ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_upd_48_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, OLD.sgUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_48_trig AFTER DELETE ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_del_48_fn(); "),e.add_11rb$("CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION sg_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER sg_remote_insert_trig INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE sg_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk BIGINT NOT NULL, erVersionId BIGINT NOT NULL DEFAULT 0, erDestination BIGINT NOT NULL, erPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (erPk, erDestination)) "),e.add_11rb$(" CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId) "),e.add_11rb$(" CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, NEW.errUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_419_trig AFTER UPDATE OR INSERT ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_upd_419_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, OLD.errUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_419_trig AFTER DELETE ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_del_419_fn(); "),e.add_11rb$("CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION errorreport_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER errorreport_remote_insert_trig INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW EXECUTE PROCEDURE errorreport_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk BIGINT NOT NULL, caVersionId BIGINT NOT NULL DEFAULT 0, caDestination BIGINT NOT NULL, caPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (caPk, caDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, NEW.caUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_520_trig AFTER UPDATE OR INSERT ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_upd_520_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, OLD.caUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_520_trig AFTER DELETE ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_del_520_fn(); "),e.add_11rb$("CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzassignment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignment(caUid, caTitle, caDescription, caDeadlineDate, caStartDate, caLateSubmissionType, caLateSubmissionPenalty, caGracePeriodDate, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caDeadlineDate, NEW.caStartDate, NEW.caLateSubmissionType, NEW.caLateSubmissionPenalty, NEW.caGracePeriodDate, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caDeadlineDate = EXCLUDED.caDeadlineDate, caStartDate = EXCLUDED.caStartDate, caLateSubmissionType = EXCLUDED.caLateSubmissionType, caLateSubmissionPenalty = EXCLUDED.caLateSubmissionPenalty, caGracePeriodDate = EXCLUDED.caGracePeriodDate, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzassignment_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignment_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk BIGINT NOT NULL, cacjVersionId BIGINT NOT NULL DEFAULT 0, cacjDestination BIGINT NOT NULL, cacjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cacjPk, cacjDestination)) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId) "),e.add_11rb$(" CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, NEW.cacjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_521_trig AFTER UPDATE OR INSERT ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_521_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, OLD.cacjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_521_trig AFTER DELETE ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_521_fn(); "),e.add_11rb$("CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzassignmentcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignmentcontentjoin_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk BIGINT NOT NULL, paVersionId BIGINT NOT NULL DEFAULT 0, paDestination BIGINT NOT NULL, paPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (paPk, paDestination)) "),e.add_11rb$(" CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId) "),e.add_11rb$(" CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, NEW.pauthUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_678_trig AFTER UPDATE OR INSERT ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_upd_678_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, OLD.pauthUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_678_trig AFTER DELETE ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_del_678_fn(); "),e.add_11rb$("CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION personauth2_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER personauth2_remote_insert_trig INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personauth2_remote_insert_fn() "),e.add_11rb$(" CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk BIGINT NOT NULL, usVersionId BIGINT NOT NULL DEFAULT 0, usDestination BIGINT NOT NULL, usPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (usPk, usDestination)) "),e.add_11rb$(" CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId) "),e.add_11rb$(" CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending) "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, NEW.usUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_679_trig AFTER UPDATE OR INSERT ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_679_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, OLD.usUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_679_trig AFTER DELETE ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_del_679_fn(); "),e.add_11rb$("CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION usersession_remote_ins_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) /*postgres ON CONFLICT (usUid) DO UPDATE SET usStatus = EXCLUDED.usStatus, usEndTime = EXCLUDED.usEndTime, usReason = EXCLUDED.usReason */ ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER usersession_remote_ins_trig INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE usersession_remote_ins_fn() ")}m(n,l(e))}(t),u})),new $(92,93,(function(t){return 1===E(t)?s(["ALTER TABLE SyncNode RENAME to SyncNode_OLD","CREATE TABLE IF NOT EXISTS SyncNode ( nodeClientId INTEGER PRIMARY KEY NOT NULL)","INSERT INTO SyncNode (nodeClientId) SELECT nodeClientId FROM SyncNode_OLD","DROP TABLE SyncNode_OLD"]):h("ALTER TABLE SyncNode DROP COLUMN master")})),new $(93,94,(function(t){return 1===E(t)?s(["CREATE VIEW IF NOT EXISTS ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ","DROP TRIGGER IF EXISTS clazzlogattendancerecord_remote_insert_ins","CREATE TRIGGER clazzlogattendancerecord_remote_insert_ins INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) /*psql ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime */; END"]):s(["CREATE OR REPLACE FUNCTION clazzlogattendancerecord_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql","DROP TRIGGER IF EXISTS clazzlogattendancerecord_remote_insert_trig ON ClazzLogAttendanceRecord_ReceiveView"," CREATE TRIGGER clazzlogattendancerecord_remote_insert_trig INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlogattendancerecord_remote_insert_fn() "])})),new $(94,95,(function(t){return 1===E(t)?s(["DROP TRIGGER IF EXISTS ATTUPD_PersonPicture","DROP TABLE IF EXISTS ZombieAttachmentData","CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaTableId INTEGER NOT NULL , zaPrimaryKey INTEGER NOT NULL , zaMd5 TEXT , zaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )",c("\n |\n | CREATE TRIGGER ATTUPD_PersonPicture\n | AFTER UPDATE ON PersonPicture FOR EACH ROW WHEN\n | OLD.personPictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaTableId, zaPrimaryKey, zaMd5) \n | SELECT 50 AS zaTableId, OLD.personPictureUid AS zaPrimaryKey, OLD.personPictureMd5 AS zaMd5\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n | ; \n | END\n | \n ")]):s(["DROP TRIGGER IF EXISTS attach_PersonPicture_trig ON PersonPicture","DROP TABLE IF EXISTS ZombieAttachmentData","CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaTableId INTEGER NOT NULL , zaPrimaryKey BIGINT NOT NULL , zaMd5 TEXT , zaUid BIGSERIAL PRIMARY KEY NOT NULL )",c("\n | CREATE OR REPLACE FUNCTION attach_PersonPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaTableId, zaPrimaryKey, zaMd5) \n | SELECT 50 AS zaTableId, OLD.personPictureUid AS zaPrimaryKey, OLD.personPictureMd5 AS zaMd5\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n "),c("\n |CREATE TRIGGER attach_PersonPicture_trig\n |AFTER UPDATE ON PersonPicture\n |FOR EACH ROW WHEN (OLD.personPictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_PersonPicture_fn();\n ")])})),new $(95,96,(function(t){return 2===E(t)?s(["DROP VIEW PersonAuth2_receiveview","ALTER TABLE PersonAuth2 ALTER COLUMN pauthLcb TYPE BIGINT","CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid","CREATE OR REPLACE FUNCTION personauth2_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql","CREATE TRIGGER personauth2_remote_insert_trig INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personauth2_remote_insert_fn()"]):_()})),new $(96,97,(function(t){return 1===E(t)?s(["DROP TABLE ZombieAttachmentData","CREATE TABLE ZombieAttachmentData ( zaUri TEXT , zaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )","DROP TRIGGER IF EXISTS ATTUPD_PersonPicture",c("\n |\n | CREATE TRIGGER ATTUPD_PersonPicture\n | AFTER UPDATE ON PersonPicture FOR EACH ROW WHEN\n | OLD.personPictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n | ; \n | END\n | \n ")]):s(["DROP TABLE IF EXISTS ZombieAttachmentData","CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaUri TEXT , zaUid SERIAL PRIMARY KEY NOT NULL )",c("\n | CREATE OR REPLACE FUNCTION attach_PersonPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n ")])})),new $(97,98,(function(t){return 2===E(t)?(N(t),_()):_()})),new $(98,99,(function(t){return 2===E(t)?h("ALTER TABLE ContentJobItem ALTER COLUMN cjiFinishTime TYPE BIGINT"):_()})),new $(99,100,(function(t){return s(["\n UPDATE ContainerEntry\n SET ceCefUid = \n (SELECT CefOuter.cefUid\n FROM ContainerEntryFile CefOuter\n WHERE CefOuter.cefMd5 = \n\t\t (SELECT CefInner.cefMd5\n\t\t\t\t FROM ContainerEntryFile CefInner\n\t\t\t\t WHERE CefInner.cefUid = ContainerEntry.ceCefUid)\n\t\tORDER BY CefOuter.cefUid\n LIMIT 1)\n ","\nDELETE FROM ContainerEntryFile \n WHERE ContainerEntryFile.cefUid != \n (SELECT CefInner.cefUid \n FROM ContainerEntryFile CefInner\n WHERE CefInner.cefMd5 = ContainerEntryFile.cefMd5\n ORDER BY CefInner.cefUid\n LIMIT 1)\n "])})),new $(100,101,(function(t){return 1===E(t)?s(["CREATE VIEW IF NOT EXISTS Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid ","DROP TRIGGER IF EXISTS container_remote_insert_ins","CREATE TRIGGER container_remote_insert_ins INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) /*psql ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries */; END "]):h("CREATE OR REPLACE FUNCTION container_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql")})),new $(101,102,(function(t){if(1===E(t)){var e,n=s(["ContentJobItem_InsertTrigger","ContentJobItem_UpdateRecursiveTotals","ContentJobItem_UpdateRecursiveStatus","ContentJobItem_UpdateParents","ContentJobItem_UpdateStatusParent"]),i=T(y(n,10));for(e=n.iterator();e.hasNext();){var o=e.next();i.add_11rb$("DROP TRIGGER IF EXISTS "+o)}return g(i,s([" CREATE TRIGGER ContentJobItem_InsertTrigger AFTER INSERT ON ContentJobItem BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = NEW.cjiItemProgress, cjiRecursiveTotal = NEW.cjiItemTotal WHERE ContentJobItem.cjiUid = NEW.cjiUid; END; "," CREATE TRIGGER ContentJobItem_UpdateRecursiveTotals AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN ( NEW.cjiItemProgress != OLD.cjiItemProgress OR NEW.cjiItemTotal != OLD.cjiItemTotal) BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiItemProgress - OLD.cjiItemProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiItemTotal - OLD.cjiItemTotal)) WHERE ContentJobItem.cjiUid = NEW.cjiUid; END; "," CREATE TRIGGER ContentJobItem_UpdateRecursiveStatus AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN (NEW.cjiStatus != OLD.cjiStatus) BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE contentJobItem.cjiUid = NEW.cjiUid; END; "," CREATE TRIGGER ContentJobItem_UpdateParents AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN ( NEW.cjiParentCjiUid != 0 AND (NEW.cjiRecursiveProgress != OLD.cjiRecursiveProgress OR NEW.cjiRecursiveTotal != OLD.cjiRecursiveTotal)) BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiRecursiveProgress - OLD.cjiRecursiveProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiRecursiveTotal - OLD.cjiRecursiveTotal)) WHERE ContentJobItem.cjiUid = NEW.cjiParentCjiUid; END; "," CREATE TRIGGER ContentJobItem_UpdateStatusParent AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN ( NEW.cjiParentCjiUid != 0 AND (New.cjiRecursiveStatus != OLD.cjiRecursiveStatus)) BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE ContentJobItem.cjiUid = NEW.cjiParentCjiUid; END; "]))}var r,a=s(["contentjobiteminsert_trig","contentjobitem_updaterecursivetotals_trig","contentjobitem_updateparents_trig","contentjobitem_updatestatus_trig","contentjobitem_updatestatusparents_trig"]),c=T(y(a,10));for(r=a.iterator();r.hasNext();){var l=r.next();c.add_11rb$("DROP TRIGGER IF EXISTS "+l+" ON ContentJobItem")}return g(c,s([" CREATE OR REPLACE FUNCTION contentjobiteminsert_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = NEW.cjiItemProgress, cjiRecursiveTotal = NEW.cjiItemTotal WHERE ContentJobItem.cjiUid = NEW.cjiUid; RETURN NEW; END $$ LANGUAGE plpgsql "," CREATE TRIGGER contentjobiteminsert_trig AFTER INSERT ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobiteminsert_fn() "," CREATE OR REPLACE FUNCTION contentjobitem_updaterecursivetotals_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiItemProgress - OLD.cjiItemProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiItemTotal - OLD.cjiItemTotal)) WHERE (NEW.cjiItemProgress != OLD.cjiItemProgress OR NEW.cjiItemTotal != OLD.cjiItemTotal) AND ContentJobItem.cjiUid = NEW.cjiUid; RETURN NEW; END $$ LANGUAGE plpgsql "," CREATE TRIGGER contentjobitem_updaterecursivetotals_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updaterecursivetotals_fn(); "," CREATE OR REPLACE FUNCTION contentjobitem_updateparents_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiRecursiveProgress - OLD.cjiRecursiveProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiRecursiveTotal - OLD.cjiRecursiveTotal)) WHERE (NEW.cjiRecursiveProgress != OLD.cjiRecursiveProgress OR NEW.cjiRecursiveTotal != OLD.cjiRecursiveTotal) AND ContentJobItem.cjiUid = NEW.cjiParentCjiUid AND NEW.cjiParentCjiUid != 0; RETURN NEW; END $$ LANGUAGE plpgsql "," CREATE TRIGGER contentjobitem_updateparents_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updateparents_fn(); "," CREATE OR REPLACE FUNCTION contentjobitem_updatestatus_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE contentJobItem.cjiUid = NEW.cjiUid AND NEW.cjiStatus != OLD.cjiStatus; RETURN NEW; END $$ LANGUAGE plpgsql "," CREATE TRIGGER contentjobitem_updatestatus_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updatestatus_fn(); "," CREATE OR REPLACE FUNCTION contentjobitem_updatestatusparents_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE NEW.cjiParentCjiUid != 0 AND NEW.cjiRecursiveStatus != OLD.cjiRecursiveStatus AND ContentJobItem.cjiUid = NEW.cjiParentCjiUid; RETURN NEW; END $$ LANGUAGE plpgsql "," CREATE TRIGGER contentjobitem_updatestatusparents_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updatestatusparents_fn(); "]))})),new $(102,103,(function(t){var e=p();if(1===E(t)){e.add_11rb$("CREATE TABLE IF NOT EXISTS Chat ( chatStartDate INTEGER NOT NULL , chatTitle TEXT , chatGroup INTEGER NOT NULL , chatLct INTEGER NOT NULL , chatUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk INTEGER NOT NULL , chatVersionId INTEGER NOT NULL DEFAULT 0 , chatDestination INTEGER NOT NULL , chatPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatPk, chatDestination) )"),e.add_11rb$("CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)"),e.add_11rb$("CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid INTEGER NOT NULL , chatMemberPersonUid INTEGER NOT NULL , chatMemberJoinedDate INTEGER NOT NULL , chatMemberLeftDate INTEGER NOT NULL , chatMemberLct INTEGER NOT NULL , chatMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk INTEGER NOT NULL , chatMemberVersionId INTEGER NOT NULL DEFAULT 0 , chatMemberDestination INTEGER NOT NULL , chatMemberPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatMemberPk, chatMemberDestination) )"),e.add_11rb$("CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)"),e.add_11rb$("CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid INTEGER NOT NULL , camSubmitterUid INTEGER NOT NULL , camMark REAL NOT NULL , camPenalty INTEGER NOT NULL , camLct INTEGER NOT NULL , camUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk INTEGER NOT NULL , camVersionId INTEGER NOT NULL DEFAULT 0 , camDestination INTEGER NOT NULL , camPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (camPk, camDestination) )"),e.add_11rb$("CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)"),e.add_11rb$("CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid INTEGER NOT NULL , casSubmitterUid INTEGER NOT NULL , casSubmitterPersonUid INTEGER NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp INTEGER NOT NULL , casUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid INTEGER NOT NULL , casaMimeType TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp INTEGER NOT NULL , casaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk INTEGER NOT NULL , casaVersionId INTEGER NOT NULL DEFAULT 0 , casaDestination INTEGER NOT NULL , casaPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casaPk, casaDestination) )"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk INTEGER NOT NULL , casVersionId INTEGER NOT NULL DEFAULT 0 , casDestination INTEGER NOT NULL , casPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casPk, casDestination) )"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid INTEGER NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate INTEGER NOT NULL , cbDeadlineDate INTEGER NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate INTEGER NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid INTEGER NOT NULL , cbActive INTEGER NOT NULL , cbHidden INTEGER NOT NULL , cbEntityUid INTEGER NOT NULL , cbLct INTEGER NOT NULL , cbUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE INDEX index_CourseBlock_cbClazzUid ON CourseBlock (cbClazzUid)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk INTEGER NOT NULL , cbVersionId INTEGER NOT NULL DEFAULT 0 , cbDestination INTEGER NOT NULL , cbPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cbPk, cbDestination) )"),e.add_11rb$("CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)"),e.add_11rb$("CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid INTEGER NOT NULL , courseDiscussionActive INTEGER NOT NULL , courseDiscussionLct INTEGER NOT NULL , courseDiscussionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk INTEGER NOT NULL , courseDiscussionVersionId INTEGER NOT NULL DEFAULT 0 , courseDiscussionDestination INTEGER NOT NULL , courseDiscussionPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )"),e.add_11rb$("CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)"),e.add_11rb$("CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid INTEGER NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid INTEGER NOT NULL , cgmLct INTEGER NOT NULL , cgmUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk INTEGER NOT NULL , cgmVersionId INTEGER NOT NULL DEFAULT 0 , cgmDestination INTEGER NOT NULL , cgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgmPk, cgmDestination) )"),e.add_11rb$("CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)"),e.add_11rb$("CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive INTEGER NOT NULL , cgsClazzUid INTEGER NOT NULL , cgsLct INTEGER NOT NULL , cgsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE INDEX index_CourseGroupSet_cgsClazzUid ON CourseGroupSet (cgsClazzUid)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk INTEGER NOT NULL , cgsVersionId INTEGER NOT NULL DEFAULT 0 , cgsDestination INTEGER NOT NULL , cgsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgsPk, cgsDestination) )"),e.add_11rb$("CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)"),e.add_11rb$("CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid INTEGER NOT NULL , coursePictureMasterCsn INTEGER NOT NULL , coursePictureLocalCsn INTEGER NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct INTEGER NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp INTEGER NOT NULL , coursePictureMimeType TEXT , coursePictureActive INTEGER NOT NULL , coursePictureUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk INTEGER NOT NULL , cpVersionId INTEGER NOT NULL DEFAULT 0 , cpDestination INTEGER NOT NULL , cpPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cpPk, cpDestination) )"),e.add_11rb$("CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)"),e.add_11rb$("CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct INTEGER NOT NULL , ctUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk INTEGER NOT NULL , ctVersionId INTEGER NOT NULL DEFAULT 0 , ctDestination INTEGER NOT NULL , ctPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ctPk, ctDestination) )"),e.add_11rb$("CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)"),e.add_11rb$("CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate INTEGER NOT NULL , discussionPostDiscussionTopicUid INTEGER NOT NULL , discussionPostVisible INTEGER NOT NULL , discussionPostArchive INTEGER NOT NULL , discussionPostStartedPersonUid INTEGER NOT NULL , discussionPostClazzUid INTEGER NOT NULL , discussionPostLct INTEGER NOT NULL , discussionPostUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk INTEGER NOT NULL , discussionPostVersionId INTEGER NOT NULL DEFAULT 0 , discussionPostDestination INTEGER NOT NULL , discussionPostPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionPostPk, discussionPostDestination) )"),e.add_11rb$("CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)"),e.add_11rb$("CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate INTEGER NOT NULL , discussionTopicCourseDiscussionUid INTEGER NOT NULL , discussionTopicVisible INTEGER NOT NULL , discussionTopicArchive INTEGER NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid INTEGER NOT NULL , discussionTopicLct INTEGER NOT NULL , discussionTopicUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk INTEGER NOT NULL , discussionTopicVersionId INTEGER NOT NULL DEFAULT 0 , discussionTopicDestination INTEGER NOT NULL , discussionTopicPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )"),e.add_11rb$("CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)"),e.add_11rb$("CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid INTEGER NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid INTEGER NOT NULL , messageText TEXT , messageTimestamp INTEGER NOT NULL , messageClazzUid INTEGER NOT NULL , messageLct INTEGER NOT NULL , messageUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid INTEGER NOT NULL , messageReadMessageUid INTEGER NOT NULL , messageReadEntityUid INTEGER NOT NULL , messageReadLct INTEGER NOT NULL , messageReadUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk INTEGER NOT NULL , messageReadVersionId INTEGER NOT NULL DEFAULT 0 , messageReadDestination INTEGER NOT NULL , messageReadPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messageReadPk, messageReadDestination) )"),e.add_11rb$("CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)"),e.add_11rb$("CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk INTEGER NOT NULL , messageVersionId INTEGER NOT NULL DEFAULT 0 , messageDestination INTEGER NOT NULL , messagePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messagePk, messageDestination) )"),e.add_11rb$("CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)"),e.add_11rb$("CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)"),e.add_11rb$("DROP TABLE ClazzAssignment"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid INTEGER NOT NULL DEFAULT 0 , caActive INTEGER NOT NULL , caClassCommentEnabled INTEGER NOT NULL , caPrivateCommentsEnabled INTEGER NOT NULL DEFAULT 1 , caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission INTEGER NOT NULL DEFAULT 1 , caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission INTEGER NOT NULL DEFAULT 1 , caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid INTEGER NOT NULL DEFAULT 0 , caClazzUid INTEGER NOT NULL , caLocalChangeSeqNum INTEGER NOT NULL , caMasterChangeSeqNum INTEGER NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct INTEGER NOT NULL , caUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE INDEX index_ClazzAssignment_caClazzUid ON ClazzAssignment (caClazzUid)"),e.add_11rb$("DROP TABLE ClazzAssignmentContentJoin"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid INTEGER NOT NULL , cacjAssignmentUid INTEGER NOT NULL , cacjActive INTEGER NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN INTEGER NOT NULL , cacjLCSN INTEGER NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct INTEGER NOT NULL , cacjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("DROP TABLE ClazzAssignmentRollUp"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid INTEGER NOT NULL , cacheContentEntryUid INTEGER NOT NULL , cacheClazzAssignmentUid INTEGER NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty REAL NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete INTEGER NOT NULL , cacheSuccess INTEGER NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked INTEGER NOT NULL , cacheUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)"),e.add_11rb$("DROP TABLE Comments"),e.add_11rb$("CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid INTEGER NOT NULL , commentsPublic INTEGER NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid INTEGER NOT NULL , commentsToPersonUid INTEGER NOT NULL , commentSubmitterUid INTEGER NOT NULL , commentsFlagged INTEGER NOT NULL , commentsInActive INTEGER NOT NULL , commentsDateTimeAdded INTEGER NOT NULL , commentsDateTimeUpdated INTEGER NOT NULL , commentsMCSN INTEGER NOT NULL , commentsLCSN INTEGER NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct INTEGER NOT NULL , commentsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )"),e.add_11rb$("ALTER TABLE Clazz ADD COLUMN clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 "),e.add_11rb$("ALTER TABLE Clazz ADD COLUMN clazzTerminologyUid INTEGER NOT NULL DEFAULT 25966"),e.add_11rb$("ALTER TABLE XObjectEntity ADD COLUMN objectStatementRefUid INTEGER NOT NULL DEFAULT 0"),e.add_11rb$(" CREATE TRIGGER ch_ins_127 AFTER INSERT ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_127 AFTER UPDATE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_127 AFTER DELETE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, OLD.chatUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = OLD.chatUid); END "),e.add_11rb$("CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid "),e.add_11rb$(" CREATE TRIGGER chat_remote_insert_ins INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) /*psql ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct */ ; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_128 AFTER INSERT ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_128 AFTER UPDATE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_128 AFTER DELETE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, OLD.chatMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = OLD.chatMemberUid); END "),e.add_11rb$("CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid "),e.add_11rb$(" CREATE TRIGGER chatmember_remote_insert_ins INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) /*psql ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct */ ; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_523 AFTER INSERT ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_523 AFTER UPDATE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_523 AFTER DELETE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, OLD.camUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = OLD.camUid); END "),e.add_11rb$("CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid "),e.add_11rb$(" CREATE TRIGGER courseassignmentmark_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) /*psql ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_522 AFTER INSERT ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_522 AFTER UPDATE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_522 AFTER DELETE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, OLD.casUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = OLD.casUid); END "),e.add_11rb$("CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid "),e.add_11rb$(" CREATE TRIGGER courseassignmentsubmission_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) /*psql ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_90 AFTER INSERT ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_90 AFTER UPDATE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_90 AFTER DELETE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, OLD.casaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = OLD.casaUid); END "),e.add_11rb$("CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid "),e.add_11rb$(" CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) /*psql ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp */; END ");var n=c("\n |\n | CREATE TRIGGER ATTUPD_CourseAssignmentSubmissionAttachment\n | AFTER UPDATE ON CourseAssignmentSubmissionAttachment FOR EACH ROW WHEN\n | OLD.casaMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n | ; \n | END\n | \n ");e.add_11rb$(n),e.add_11rb$(" CREATE TRIGGER ch_ins_124 AFTER INSERT ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_124 AFTER UPDATE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_124 AFTER DELETE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, OLD.cbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = OLD.cbUid); END "),e.add_11rb$("CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid "),e.add_11rb$(" CREATE TRIGGER courseblock_remote_insert_ins INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) /*psql ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_130 AFTER INSERT ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_130 AFTER UPDATE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_130 AFTER DELETE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, OLD.courseDiscussionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = OLD.courseDiscussionUid); END "),e.add_11rb$("CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid "),e.add_11rb$(" CREATE TRIGGER coursediscussion_remote_insert_ins INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) /*psql ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct */ ; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_243 AFTER INSERT ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_243 AFTER UPDATE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_243 AFTER DELETE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, OLD.cgmUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = OLD.cgmUid); END "),e.add_11rb$("CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid "),e.add_11rb$(" CREATE TRIGGER coursegroupmember_remote_insert_ins INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) /*psql ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_242 AFTER INSERT ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_242 AFTER UPDATE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_242 AFTER DELETE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, OLD.cgsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = OLD.cgsUid); END "),e.add_11rb$("CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid "),e.add_11rb$(" CREATE TRIGGER coursegroupset_remote_insert_ins INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) /*psql ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_125 AFTER INSERT ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_125 AFTER UPDATE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_125 AFTER DELETE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, OLD.coursePictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = OLD.coursePictureUid); END "),e.add_11rb$("CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid "),e.add_11rb$(" CREATE TRIGGER coursepicture_remote_insert_ins INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) /*psql ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive */; END ");var i=c("\n |\n | CREATE TRIGGER ATTUPD_CoursePicture\n | AFTER UPDATE ON CoursePicture FOR EACH ROW WHEN\n | OLD.coursePictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n | ; \n | END\n | \n ");e.add_11rb$(i),e.add_11rb$(" CREATE TRIGGER ch_ins_450 AFTER INSERT ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_450 AFTER UPDATE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_450 AFTER DELETE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, OLD.ctUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = OLD.ctUid); END "),e.add_11rb$("CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid "),e.add_11rb$(" CREATE TRIGGER courseterminology_remote_insert_ins INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) /*psql ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_132 AFTER INSERT ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_132 AFTER UPDATE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_132 AFTER DELETE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, OLD.discussionPostUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = OLD.discussionPostUid); END "),e.add_11rb$("CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid "),e.add_11rb$(" CREATE TRIGGER discussionpost_remote_insert_ins INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) /*psql ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct */ ; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_131 AFTER INSERT ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_131 AFTER UPDATE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_131 AFTER DELETE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, OLD.discussionTopicUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = OLD.discussionTopicUid); END "),e.add_11rb$("CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid "),e.add_11rb$(" CREATE TRIGGER discussiontopic_remote_insert_ins INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) /*psql ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct */ ; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_126 AFTER INSERT ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_126 AFTER UPDATE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_126 AFTER DELETE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, OLD.messageUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = OLD.messageUid); END "),e.add_11rb$("CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid "),e.add_11rb$(" CREATE TRIGGER message_remote_insert_ins INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) /*psql ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct */ ; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_129 AFTER INSERT ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_129 AFTER UPDATE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_129 AFTER DELETE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, OLD.messageReadUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = OLD.messageReadUid); END "),e.add_11rb$("CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid "),e.add_11rb$(" CREATE TRIGGER messageread_remote_insert_ins INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW BEGIN REPLACE INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) /*psql ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct */ ; END "),e.add_11rb$("DROP VIEW IF EXISTS ClazzAssignment_ReceiveView"),e.add_11rb$("DROP TRIGGER IF EXISTS clazzassignment_remote_insert_ins"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_ins_521"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_upd_521"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_del_521"),e.add_11rb$("CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid "),e.add_11rb$(" CREATE TRIGGER clazzassignment_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) /*psql ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_521 AFTER INSERT ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_521 AFTER UPDATE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_521 AFTER DELETE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, OLD.cacjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = OLD.cacjUid); END "),e.add_11rb$("DROP VIEW IF EXISTS ClazzAssignmentContentJoin_ReceiveView"),e.add_11rb$("DROP TRIGGER IF EXISTS clazzassignmentcontentjoin_remote_insert_ins"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_ins_522"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_upd_522"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_del_522"),e.add_11rb$("DROP VIEW IF EXISTS Comments_ReceiveView"),e.add_11rb$("DROP TRIGGER IF EXISTS comments_remote_insert_ins"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_ins_101"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_upd_101"),e.add_11rb$("DROP TRIGGER IF EXISTS ch_del_101"),e.add_11rb$("CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid "),e.add_11rb$(" CREATE TRIGGER comments_remote_insert_ins INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) /*psql ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct */; END "),e.add_11rb$(" CREATE TRIGGER ch_ins_101 AFTER INSERT ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_101 AFTER UPDATE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_101 AFTER DELETE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, OLD.reportUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = OLD.reportUid); END ")}else{e.add_11rb$("CREATE TABLE IF NOT EXISTS Chat ( chatStartDate BIGINT NOT NULL , chatTitle TEXT , chatGroup BOOL NOT NULL , chatLct BIGINT NOT NULL , chatUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid BIGINT NOT NULL , chatMemberPersonUid BIGINT NOT NULL , chatMemberJoinedDate BIGINT NOT NULL , chatMemberLeftDate BIGINT NOT NULL , chatMemberLct BIGINT NOT NULL , chatMemberUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk BIGINT NOT NULL , chatVersionId BIGINT NOT NULL DEFAULT 0 , chatDestination BIGINT NOT NULL , chatPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatPk, chatDestination) )"),e.add_11rb$("CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)"),e.add_11rb$("CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk BIGINT NOT NULL , chatMemberVersionId BIGINT NOT NULL DEFAULT 0 , chatMemberDestination BIGINT NOT NULL , chatMemberPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatMemberPk, chatMemberDestination) )"),e.add_11rb$("CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)"),e.add_11rb$("CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid BIGINT NOT NULL , camSubmitterUid BIGINT NOT NULL , camMark FLOAT NOT NULL , camPenalty INTEGER NOT NULL , camLct BIGINT NOT NULL , camUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk BIGINT NOT NULL , camVersionId BIGINT NOT NULL DEFAULT 0 , camDestination BIGINT NOT NULL , camPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (camPk, camDestination) )"),e.add_11rb$("CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)"),e.add_11rb$("CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid BIGINT NOT NULL , casSubmitterUid BIGINT NOT NULL , casSubmitterPersonUid BIGINT NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp BIGINT NOT NULL , casUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid BIGINT NOT NULL , casaMimeType TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp BIGINT NOT NULL , casaUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk BIGINT NOT NULL , casaVersionId BIGINT NOT NULL DEFAULT 0 , casaDestination BIGINT NOT NULL , casaPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casaPk, casaDestination) )"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk BIGINT NOT NULL , casVersionId BIGINT NOT NULL DEFAULT 0 , casDestination BIGINT NOT NULL , casPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casPk, casDestination) )"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)"),e.add_11rb$("CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid BIGINT NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate BIGINT NOT NULL , cbDeadlineDate BIGINT NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate BIGINT NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid BIGINT NOT NULL , cbActive BOOL NOT NULL , cbHidden BOOL NOT NULL , cbEntityUid BIGINT NOT NULL , cbLct BIGINT NOT NULL , cbUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE INDEX index_CourseBlock_cbClazzUid ON CourseBlock (cbClazzUid)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk BIGINT NOT NULL , cbVersionId BIGINT NOT NULL DEFAULT 0 , cbDestination BIGINT NOT NULL , cbPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cbPk, cbDestination) )"),e.add_11rb$("CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)"),e.add_11rb$("CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid BIGINT NOT NULL , courseDiscussionActive BOOL NOT NULL , courseDiscussionLct BIGINT NOT NULL , courseDiscussionUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk BIGINT NOT NULL , courseDiscussionVersionId BIGINT NOT NULL DEFAULT 0 , courseDiscussionDestination BIGINT NOT NULL , courseDiscussionPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )"),e.add_11rb$("CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)"),e.add_11rb$("CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid BIGINT NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid BIGINT NOT NULL , cgmLct BIGINT NOT NULL , cgmUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk BIGINT NOT NULL , cgmVersionId BIGINT NOT NULL DEFAULT 0 , cgmDestination BIGINT NOT NULL , cgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgmPk, cgmDestination) )"),e.add_11rb$("CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)"),e.add_11rb$("CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive BOOL NOT NULL , cgsClazzUid BIGINT NOT NULL , cgsLct BIGINT NOT NULL , cgsUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE INDEX index_CourseGroupSet_cgsClazzUid ON CourseGroupSet (cgsClazzUid)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk BIGINT NOT NULL , cgsVersionId BIGINT NOT NULL DEFAULT 0 , cgsDestination BIGINT NOT NULL , cgsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgsPk, cgsDestination) )"),e.add_11rb$("CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)"),e.add_11rb$("CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid BIGINT NOT NULL , coursePictureMasterCsn BIGINT NOT NULL , coursePictureLocalCsn BIGINT NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct BIGINT NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp BIGINT NOT NULL , coursePictureMimeType TEXT , coursePictureActive BOOL NOT NULL , coursePictureUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk BIGINT NOT NULL , cpVersionId BIGINT NOT NULL DEFAULT 0 , cpDestination BIGINT NOT NULL , cpPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cpPk, cpDestination) )"),e.add_11rb$("CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)"),e.add_11rb$("CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct BIGINT NOT NULL , ctUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk BIGINT NOT NULL , ctVersionId BIGINT NOT NULL DEFAULT 0 , ctDestination BIGINT NOT NULL , ctPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ctPk, ctDestination) )"),e.add_11rb$("CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)"),e.add_11rb$("CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate BIGINT NOT NULL , discussionPostDiscussionTopicUid BIGINT NOT NULL , discussionPostVisible BOOL NOT NULL , discussionPostArchive BOOL NOT NULL , discussionPostStartedPersonUid BIGINT NOT NULL , discussionPostClazzUid BIGINT NOT NULL , discussionPostLct BIGINT NOT NULL , discussionPostUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk BIGINT NOT NULL , discussionPostVersionId BIGINT NOT NULL DEFAULT 0 , discussionPostDestination BIGINT NOT NULL , discussionPostPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionPostPk, discussionPostDestination) )"),e.add_11rb$("CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)"),e.add_11rb$("CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate BIGINT NOT NULL , discussionTopicCourseDiscussionUid BIGINT NOT NULL , discussionTopicVisible BOOL NOT NULL , discussionTopicArchive BOOL NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid BIGINT NOT NULL , discussionTopicLct BIGINT NOT NULL , discussionTopicUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk BIGINT NOT NULL , discussionTopicVersionId BIGINT NOT NULL DEFAULT 0 , discussionTopicDestination BIGINT NOT NULL , discussionTopicPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )"),e.add_11rb$("CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)"),e.add_11rb$("CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid BIGINT NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid BIGINT NOT NULL , messageText TEXT , messageTimestamp BIGINT NOT NULL , messageClazzUid BIGINT NOT NULL , messageLct BIGINT NOT NULL , messageUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid BIGINT NOT NULL , messageReadMessageUid BIGINT NOT NULL , messageReadEntityUid BIGINT NOT NULL , messageReadLct BIGINT NOT NULL , messageReadUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk BIGINT NOT NULL , messageReadVersionId BIGINT NOT NULL DEFAULT 0 , messageReadDestination BIGINT NOT NULL , messageReadPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messageReadPk, messageReadDestination) )"),e.add_11rb$("CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)"),e.add_11rb$("CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk BIGINT NOT NULL , messageVersionId BIGINT NOT NULL DEFAULT 0 , messageDestination BIGINT NOT NULL , messagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messagePk, messageDestination) )"),e.add_11rb$("CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)"),e.add_11rb$("CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)"),e.add_11rb$("DROP VIEW ClazzAssignment_ReceiveView"),e.add_11rb$("DROP TABLE ClazzAssignment"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid BIGINT NOT NULL DEFAULT 0 , caActive BOOL NOT NULL , caClassCommentEnabled BOOL NOT NULL , caPrivateCommentsEnabled BOOL NOT NULL DEFAULT true, caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission BOOL NOT NULL DEFAULT true, caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission BOOL NOT NULL DEFAULT true, caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid BIGINT NOT NULL DEFAULT 0 , caClazzUid BIGINT NOT NULL , caLocalChangeSeqNum BIGINT NOT NULL , caMasterChangeSeqNum BIGINT NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct BIGINT NOT NULL , caUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE INDEX index_ClazzAssignment_caClazzUid ON ClazzAssignment (caClazzUid)"),e.add_11rb$("DROP VIEW ClazzAssignmentContentJoin_ReceiveView"),e.add_11rb$("DROP TABLE ClazzAssignmentContentJoin"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid BIGINT NOT NULL , cacjAssignmentUid BIGINT NOT NULL , cacjActive BOOL NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN BIGINT NOT NULL , cacjLCSN BIGINT NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct BIGINT NOT NULL , cacjUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("DROP TABLE ClazzAssignmentRollUp"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid BIGINT NOT NULL , cacheContentEntryUid BIGINT NOT NULL , cacheClazzAssignmentUid BIGINT NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty FLOAT NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete BOOL NOT NULL , cacheSuccess SMALLINT NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked BIGINT NOT NULL , cacheUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)"),e.add_11rb$("DROP VIEW Comments_ReceiveView"),e.add_11rb$("CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid BIGINT NOT NULL , commentsPublic BOOL NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid BIGINT NOT NULL , commentsToPersonUid BIGINT NOT NULL , commentSubmitterUid BIGINT NOT NULL , commentsFlagged BOOL NOT NULL , commentsInActive BOOL NOT NULL , commentsDateTimeAdded BIGINT NOT NULL , commentsDateTimeUpdated BIGINT NOT NULL , commentsMCSN BIGINT NOT NULL , commentsLCSN BIGINT NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct BIGINT NOT NULL , commentsUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("ALTER TABLE Clazz ADD COLUMN clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 "),e.add_11rb$("ALTER TABLE Clazz ADD COLUMN clazzTerminologyUid BIGINT NOT NULL DEFAULT 25966"),e.add_11rb$("ALTER TABLE XObjectEntity ADD COLUMN objectStatementRefUid INTEGER NOT NULL DEFAULT 0"),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, NEW.chatUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_127_trig AFTER UPDATE OR INSERT ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_upd_127_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, OLD.chatUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_127_trig AFTER DELETE ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_del_127_fn(); "),e.add_11rb$("CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION chat_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER chat_remote_insert_trig INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chat_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, NEW.chatMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_128_trig AFTER UPDATE OR INSERT ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_128_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, OLD.chatMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_128_trig AFTER DELETE ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_del_128_fn(); "),e.add_11rb$("CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION chatmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER chatmember_remote_insert_trig INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chatmember_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, NEW.camUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_523_trig AFTER UPDATE OR INSERT ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_upd_523_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, OLD.camUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_523_trig AFTER DELETE ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_del_523_fn(); "),e.add_11rb$("CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION courseassignmentmark_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER courseassignmentmark_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentmark_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, NEW.casUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_522_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_upd_522_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, OLD.casUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_522_trig AFTER DELETE ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_del_522_fn(); "),e.add_11rb$("CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION courseassignmentsubmission_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER courseassignmentsubmission_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmission_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, NEW.casaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_90_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_upd_90_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, OLD.casaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_90_trig AFTER DELETE ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_del_90_fn(); "),e.add_11rb$("CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION courseassignmentsubmissionattachment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmissionattachment_remote_insert_fn() ");var o=c("\n | CREATE OR REPLACE FUNCTION attach_CourseAssignmentSubmissionAttachment_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n ");e.add_11rb$(o);var r=c("\n |CREATE TRIGGER attach_CourseAssignmentSubmissionAttachment_trig\n |AFTER UPDATE ON CourseAssignmentSubmissionAttachment\n |FOR EACH ROW WHEN (OLD.casaMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CourseAssignmentSubmissionAttachment_fn();\n ");e.add_11rb$(r),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, NEW.cbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_124_trig AFTER UPDATE OR INSERT ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_upd_124_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, OLD.cbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_124_trig AFTER DELETE ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_del_124_fn(); "),e.add_11rb$("CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION courseblock_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER courseblock_remote_insert_trig INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseblock_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, NEW.courseDiscussionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_130_trig AFTER UPDATE OR INSERT ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_upd_130_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, OLD.courseDiscussionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_130_trig AFTER DELETE ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_del_130_fn(); "),e.add_11rb$("CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION coursediscussion_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER coursediscussion_remote_insert_trig INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursediscussion_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, NEW.cgmUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_243_trig AFTER UPDATE OR INSERT ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_243_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, OLD.cgmUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_243_trig AFTER DELETE ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_243_fn(); "),e.add_11rb$("CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION coursegroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER coursegroupmember_remote_insert_trig INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupmember_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, NEW.cgsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_242_trig AFTER UPDATE OR INSERT ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_upd_242_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, OLD.cgsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_242_trig AFTER DELETE ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_del_242_fn(); "),e.add_11rb$("CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION coursegroupset_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER coursegroupset_remote_insert_trig INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupset_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, NEW.coursePictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_125_trig AFTER UPDATE OR INSERT ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_125_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, OLD.coursePictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_125_trig AFTER DELETE ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_del_125_fn(); "),e.add_11rb$("CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION coursepicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER coursepicture_remote_insert_trig INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursepicture_remote_insert_fn() ");var a=c("\n | CREATE OR REPLACE FUNCTION attach_CoursePicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n ");e.add_11rb$(a);var s=c("\n |CREATE TRIGGER attach_CoursePicture_trig\n |AFTER UPDATE ON CoursePicture\n |FOR EACH ROW WHEN (OLD.coursePictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CoursePicture_fn();\n ");e.add_11rb$(s),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, NEW.ctUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_450_trig AFTER UPDATE OR INSERT ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_upd_450_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, OLD.ctUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_450_trig AFTER DELETE ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_del_450_fn(); "),e.add_11rb$("CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION courseterminology_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER courseterminology_remote_insert_trig INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseterminology_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, NEW.discussionPostUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_132_trig AFTER UPDATE OR INSERT ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_upd_132_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, OLD.discussionPostUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_132_trig AFTER DELETE ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_del_132_fn(); "),e.add_11rb$("CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION discussionpost_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER discussionpost_remote_insert_trig INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussionpost_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, NEW.discussionTopicUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_131_trig AFTER UPDATE OR INSERT ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_upd_131_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, OLD.discussionTopicUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_131_trig AFTER DELETE ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_del_131_fn(); "),e.add_11rb$("CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION discussiontopic_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER discussiontopic_remote_insert_trig INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussiontopic_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, NEW.messageUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_126_trig AFTER UPDATE OR INSERT ON Message FOR EACH ROW EXECUTE PROCEDURE ch_upd_126_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, OLD.messageUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_126_trig AFTER DELETE ON Message FOR EACH ROW EXECUTE PROCEDURE ch_del_126_fn(); "),e.add_11rb$("CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION message_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER message_remote_insert_trig INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW EXECUTE PROCEDURE message_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, NEW.messageReadUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_129_trig AFTER UPDATE OR INSERT ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_upd_129_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, OLD.messageReadUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_129_trig AFTER DELETE ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_del_129_fn(); "),e.add_11rb$("CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION messageread_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER messageread_remote_insert_trig INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW EXECUTE PROCEDURE messageread_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, NEW.caUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_520_trig AFTER UPDATE OR INSERT ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_upd_520_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, OLD.caUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_520_trig AFTER DELETE ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_del_520_fn(); "),e.add_11rb$("CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzassignment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzassignment_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignment_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, NEW.cacjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_521_trig AFTER UPDATE OR INSERT ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_521_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, OLD.cacjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_521_trig AFTER DELETE ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_521_fn(); "),e.add_11rb$("CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazzassignmentcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive,cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjWeight, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjWeight = EXCLUDED.cacjWeight, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignmentcontentjoin_remote_insert_fn() "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, NEW.commentsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$("DROP TRIGGER IF EXISTS ch_upd_208_trig ON Comments"),e.add_11rb$(" CREATE TRIGGER ch_upd_208_trig AFTER UPDATE OR INSERT ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_upd_208_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, OLD.commentsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$("DROP TRIGGER IF EXISTS ch_del_208_trig ON Comments"),e.add_11rb$(" CREATE TRIGGER ch_del_208_trig AFTER DELETE ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_del_208_fn(); "),e.add_11rb$("CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION comments_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$("DROP TRIGGER IF EXISTS comments_remote_insert_trig ON Comments_ReceiveView"),e.add_11rb$(" CREATE TRIGGER comments_remote_insert_trig INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW EXECUTE PROCEDURE comments_remote_insert_fn() ")}return e})),new $(103,104,(function(t){var e=p();return 1===E(t)?(e.add_11rb$("DROP VIEW IF EXISTS Clazz_ReceiveView"),e.add_11rb$("DROP TRIGGER IF EXISTS clazz_remote_insert_ins"),e.add_11rb$("CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid "),e.add_11rb$(" CREATE TRIGGER clazz_remote_insert_ins INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) /*psql ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode */; END "),e.add_11rb$("DROP VIEW IF EXISTS XObjectEntity_ReceiveView"),e.add_11rb$("DROP TRIGGER IF EXISTS xobjectentity_remote_insert_ins"),e.add_11rb$("CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid "),e.add_11rb$(" CREATE TRIGGER xobjectentity_remote_insert_ins INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) /*psql ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct */; END ")):(e.add_11rb$("DROP TRIGGER IF EXISTS clazz_remote_insert_trig ON Clazz_ReceiveView"),e.add_11rb$("DROP VIEW IF EXISTS Clazz_ReceiveView"),e.add_11rb$("CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION clazz_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER clazz_remote_insert_trig INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazz_remote_insert_fn() "),e.add_11rb$("DROP TRIGGER IF EXISTS xobjectentity_remote_insert_trig ON XObjectEntity_ReceiveView"),e.add_11rb$("DROP VIEW IF EXISTS XObjectEntity_ReceiveView"),e.add_11rb$("CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION xobjectentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER xobjectentity_remote_insert_trig INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xobjectentity_remote_insert_fn() ")),e})),new $(104,105,(function(t){var e=p();if(1===E(t)){e.add_11rb$("CREATE TABLE IF NOT EXISTS ContentEntryPicture (`cepUid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `cepContentEntryUid` INTEGER NOT NULL, `cepUri` TEXT, `cepMd5` TEXT, `cepFileSize` INTEGER NOT NULL, `cepTimestamp` INTEGER NOT NULL, `cepMimeType` TEXT, `cepActive` INTEGER NOT NULL)"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate (`cepPk` INTEGER NOT NULL, `cepVersionId` INTEGER NOT NULL DEFAULT 0, `cepDestination` INTEGER NOT NULL, `cepPending` INTEGER NOT NULL DEFAULT 1, PRIMARY KEY(`cepPk`, `cepDestination`))"),e.add_11rb$("CREATE INDEX IF NOT EXISTS `index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId` ON ContentEntryPictureReplicate (`cepPk`, `cepDestination`, `cepVersionId`)"),e.add_11rb$("CREATE INDEX IF NOT EXISTS `index_ContentEntryPictureReplicate_cepDestination_cepPending` ON ContentEntryPictureReplicate (`cepDestination`, `cepPending`)"),e.add_11rb$(" CREATE TRIGGER ch_ins_138 AFTER INSERT ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END "),e.add_11rb$(" CREATE TRIGGER ch_upd_138 AFTER UPDATE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END "),e.add_11rb$(" CREATE TRIGGER ch_del_138 AFTER DELETE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, OLD.cepUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = OLD.cepUid); END "),e.add_11rb$("CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid "),e.add_11rb$(" CREATE TRIGGER ceppicture_remote_insert_ins INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) /*psql ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive */; END ");var n=c("\n |\n | CREATE TRIGGER ATTUPD_ContentEntryPicture\n | AFTER UPDATE ON ContentEntryPicture FOR EACH ROW WHEN\n | OLD.cepMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n | ; \n | END\n | \n ");e.add_11rb$(n)}else{e.add_11rb$("CREATE TABLE IF NOT EXISTS ContentEntryPicture ( cepContentEntryUid BIGINT NOT NULL , cepUri TEXT , cepMd5 TEXT , cepFileSize INTEGER NOT NULL , cepTimestamp BIGINT NOT NULL , cepMimeType TEXT , cepActive BOOL NOT NULL , cepUid BIGSERIAL PRIMARY KEY NOT NULL )"),e.add_11rb$("CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate ( cepPk BIGINT NOT NULL , cepVersionId BIGINT NOT NULL DEFAULT 0 , cepDestination BIGINT NOT NULL , cepPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepPk, cepDestination) )"),e.add_11rb$("CREATE INDEX index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId ON ContentEntryPictureReplicate (cepPk, cepDestination, cepVersionId)"),e.add_11rb$("CREATE INDEX index_ContentEntryPictureReplicate_cepDestination_cepPending ON ContentEntryPictureReplicate (cepDestination, cepPending)"),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_upd_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, NEW.cepUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_upd_138_trig AFTER UPDATE OR INSERT ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_138_fn(); "),e.add_11rb$(" CREATE OR REPLACE FUNCTION ch_del_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, OLD.cepUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql "),e.add_11rb$(" CREATE TRIGGER ch_del_138_trig AFTER DELETE ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_138_fn(); "),e.add_11rb$("CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid "),e.add_11rb$("CREATE OR REPLACE FUNCTION ceppicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"),e.add_11rb$(" CREATE TRIGGER ceppicture_remote_insert_trig INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE ceppicture_remote_insert_fn() ");var i=c("\n | CREATE OR REPLACE FUNCTION attach_ContentEntryPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n ");e.add_11rb$(i);var o=c("\n |CREATE TRIGGER attach_ContentEntryPicture_trig\n |AFTER UPDATE ON ContentEntryPicture\n |FOR EACH ROW WHEN (OLD.cepMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_ContentEntryPicture_fn();\n ");e.add_11rb$(o)}return e})),new $(105,106,(function(t){var e=p();return e.add_11rb$("ALTER TABLE CourseAssignmentSubmissionAttachment ADD COLUMN casaFileName TEXT"),e})),new $(106,107,(function(t){var e=p();return e.add_11rb$("DROP TABLE IF EXISTS SqliteChangeSeqNums"),e.add_11rb$("DROP TABLE IF EXISTS UpdateNotification"),e}))})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0),n(6)],void 0===(r="function"==typeof(i=function(t,e,n){"use strict";var i=t.$$importsForInline$$||(t.$$importsForInline$$={}),o=(n.kotlinx.serialization.modules.EmptySerializersModule,e.Kind.OBJECT,e.Kind.CLASS),r=(e.kotlin.Enum,e.throwISE,e.defineInlineFunction,e.wrapFunction,e.equals,e.unboxChar,e.kotlin.IllegalArgumentException_init_pdl1vj$,e.kotlin.text.iterator_gw00vp$,e.toBoxedChar,e.kotlin.Annotation,n.kotlinx.serialization.serializerOrNull_1yb8b7$,n.kotlinx.serialization.KSerializer,e.throwCCE,e.toString,n.kotlinx.serialization.SerializationException_init_pdl1vj$,n.kotlinx.serialization.descriptors.PolymorphicKind,n.kotlinx.serialization.descriptors.buildSerialDescriptor_2yu4m$,e.Kind.INTERFACE,e.hashCode,n.kotlinx.serialization.internal.SerializerFactory,e.kotlin.collections.joinToString_fmv235$,e.kotlin.collections.Map,e.kotlin.collections.List,e.kotlin.text.toInt_pdl1vz$,e.kotlin.text.toIntOrNull_pdl1vz$,e.kotlin.text.toLong_pdl1vz$,e.kotlin.text.toLongOrNull_pdl1vz$,e.kotlin.text.toDouble_pdl1vz$,e.kotlin.text.toDoubleOrNull_pdl1vz$,e.kotlin.IllegalStateException_init_pdl1vj$,e.kotlin.text.StringBuilder_init,e.kotlin.collections.LinkedHashMap_init_q3lmfv$,e.kotlin.collections.ArrayList_init_287e2$,e.kotlin.Unit,n.kotlinx.serialization.descriptors.PrimitiveKind,n.kotlinx.serialization.descriptors.SerialKind,e.kotlin.ULong),a=n.kotlinx.serialization.builtins.serializer_de2ylp$,s=(e.kotlin.js.internal.StringCompanionObject,n.kotlinx.serialization.builtins.serializer_6eet4j$,n.kotlinx.serialization.descriptors.SerialDescriptor),c=e.kotlin.lazy_klfg04$,l=e.kotlin.UInt,p=e.kotlin.UByte,u=e.kotlin.UShort,d=(n.kotlinx.serialization.SerializationException,e.kotlin.ranges.coerceAtLeast_dqglrj$,e.kotlin.ranges.coerceAtMost_dqglrj$,e.kotlin.collections.Iterator,e.kotlin.collections.getValue_t9ocha$,e.ensureNotNull,e.kotlin.collections.emptyMap_q3lmfv$,n.kotlinx.serialization.descriptors.StructureKind,e.kotlin.collections.copyOf_c03ot6$,e.kotlin.sequences.Sequence,e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,e.kotlin.coroutines.CoroutineImpl,n.kotlinx.serialization.internal.AbstractPolymorphicSerializer,e.getKClass,n.kotlinx.serialization.DeserializationStrategy,e.toByte),h=(e.toShort,e.kotlin.isFinite_yrwdxr$,e.kotlin.IllegalArgumentException,n.kotlinx.serialization.builtins.serializer_wxu9yi$),E=n.kotlinx.serialization.builtins.serializer_28ajz5$,_=n.kotlinx.serialization.builtins.serializer_wdte4j$,m=e.kotlin.collections.setOf_i5x0yv$,f=(n.kotlinx.serialization.findPolymorphicSerializer_dz33bw$,e.toChar),y=(e.kotlin.text.get_indices_gw00vp$,e.kotlin.text.equals_igcy3c$,e.kotlin.IllegalArgumentException_init,e.kotlin.js.internal.ByteCompanionObject),T=(e.kotlin.ranges.IntRange,e.kotlin.js.internal.ShortCompanionObject,e.kotlin.collections.plus_khz7k3$,e.kotlin.collections.toList_7wnvza$,e.kotlin.collections.emptySet_287e2$,e.throwUPAE,e.kotlin.text.indexOf_8eortd$,e.kotlin.ranges.CharRange,e.kotlin.collections.last_2p1efm$,e.kotlin.text.lastIndexOf_l5u8uk$,e.Long.ZERO,e.Long.MIN_VALUE,e.kotlin.text.concatToString_wlitf7$,e.kotlin.CharSequence,Math,e.kotlin.collections.arrayCopy,new e.Long(-1,2097151));function $(t){this.original_yfx7kf$_0=c(t)}function N(){this.map_0=createMapForCache(1)}function g(){}function R(t){var e=15&t;return f(e<10?e+48|0:e-10+97|0)}e.kotlin.text.StringBuilder_init_za3lpa$,e.kotlin.collections.HashMap_init_bwtc7$,g.$metadata$={kind:o,simpleName:"Key",interfaces:[]};var C=t.kotlinx||(t.kotlinx={}),S=C.serialization||(C.serialization={}),I=S.json||(S.json={});i["kotlinx-serialization-kotlinx-serialization-core-js-legacy"]=n;var L=I.internal||(I.internal={});N.Key=g,L.DescriptorSchemaCache=N,Object.defineProperty($.prototype,"annotations",Object.getOwnPropertyDescriptor(s.prototype,"annotations")),Object.defineProperty($.prototype,"isInline",Object.getOwnPropertyDescriptor(s.prototype,"isInline")),Object.defineProperty($.prototype,"isNullable",Object.getOwnPropertyDescriptor(s.prototype,"isNullable")),new g,m([h(l.Companion).descriptor,a(r.Companion).descriptor,E(p.Companion).descriptor,_(u.Companion).descriptor]);for(var b=e.newArray(93,null),v=0;v<=31;v++){var O=R(v>>12),U=R(v>>8),D=R(v>>4),A=R(v);b[v]="\\u"+String.fromCharCode(O)+String.fromCharCode(U)+String.fromCharCode(D)+String.fromCharCode(A)}b[34]='\\"',b[92]="\\\\",b[9]="\\t",b[8]="\\b",b[10]="\\n",b[13]="\\r",b[12]="\\f";for(var k=new Int8Array(93),P=0;P<=31;P++)k[P]=d(1);return k[34]=d(34),k[92]=d(92),k[9]=d(116),k[8]=d(98),k[10]=d(110),k[13]=d(114),k[12]=d(102),f(0),y.MAX_VALUE,T.toNumber(),t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0),n(1),n(4),n(3),n(2),n(15),n(7),n(16),n(10),n(17)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r,a,s,c,l,p){"use strict";var u=t.$$importsForInline$$||(t.$$importsForInline$$={}),d=e.kotlin.Unit,h=n.kotlinx.coroutines.Job,E=e.ensureNotNull,_=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,m=e.kotlin.coroutines.CoroutineImpl,f=e.throwCCE,y=i.io.ktor.util.AttributeKey,T=(o.io.ktor.utils.io.core.Closeable,r.kotlinx.atomicfu.atomic$boolean$1),$=n.kotlinx.coroutines.Job_5dx9e$,N=i.io.ktor.util.AttributesJsFn,g=(n.kotlinx.coroutines.cancel_q2ti5d$,Error),R=e.Kind.CLASS,C=n.kotlinx.coroutines.CoroutineScope,S=e.kotlin.IllegalStateException_init_pdl1vj$,I=Object,L=(i.io.ktor.util,e.kotlin.collections.LinkedHashMap_init_q3lmfv$),b=e.defineInlineFunction,v=e.wrapFunction,O=e.throwUPAE,U=i.io.ktor.util.reflect.instanceOf_lgjw4r$,D=s.io.ktor.http.content,A=e.equals,k=n.kotlinx.coroutines.cancel_n4wjt3$,P=e.Kind.OBJECT,x=(o.io.ktor.utils.io.ByteReadChannel,e.kotlin.IllegalStateException_init),w=e.kotlin.IllegalStateException,z=e.kotlin.UnsupportedOperationException_init,G=i.io.ktor.util.flattenEntries_vr6bp2$,j=e.kotlin.collections.joinToString_fmv235$,F=e.kotlin.text.trimMargin_rjktp$,M=e.kotlin.UnsupportedOperationException,W=e.getReifiedTypeParameterKType,X=i.io.ktor.util.reflect,B=e.getKClass,q=i.io.ktor.util.reflect.typeInfoImpl_1lvkm8$,H=o.io.ktor.utils.io.ByteReadChannel_fqrh44$,V=o.io.ktor.utils.io.core.readBytes_xc9h3n$,K=e.kotlin.IllegalArgumentException_init_pdl1vj$,J=(e.kotlin.IllegalArgumentException,s.io.ktor.http.content.OutgoingContent.ReadChannelContent,s.io.ktor.http.content.OutgoingContent.ByteArrayContent),Y=(s.io.ktor.http.content.OutgoingContent.ProtocolUpgrade,s.io.ktor.http.content.OutgoingContent.NoContent),Q=(n.kotlinx.coroutines,o.io.ktor.utils.io.writer_x9a1ni$,s.io.ktor.http.content.OutgoingContent.WriteChannelContent),Z=n.kotlinx.coroutines.CoroutineName,tt=e.kotlin.collections.emptySet_287e2$,et=(e.kotlin.reflect.js.internal.PrimitiveClasses.anyClass,e.createKType,e.Kind.INTERFACE),nt=s.io.ktor.http,it=s.io.ktor.http.content.OutgoingContent,ot=(e.kotlin.coroutines.cancellation.CancellationException_init_pdl1vj$,e.kotlin.collections.ArrayList_init_287e2$),rt=n.kotlinx.coroutines.CompletableJob,at=e.kotlin.lazy_klfg04$,st=e.kotlin.collections.setOf_mh5how$,ct=(e.kotlin.Enum,e.throwISE,s.io.ktor.http.Url_61zpoe$,e.kotlin.collections.setOf_i5x0yv$),lt=(e.kotlin.coroutines.CoroutineContext.Key,e.kotlin.coroutines.CoroutineContext.Element),pt=o.io.ktor.utils.io.copyAndClose_47ygvz$,ut=i.io.ktor.util.pipeline.PipelinePhase,dt=i.io.ktor.util.appendAll_k10e8h$,ht=(s.io.ktor.http.URLProtocol,s.io.ktor.http.ParametersBuilder_za3lpa$,s.io.ktor.http.takeFrom_rs9g2p$),Et=(e.kotlin.collections.first_2p1efm$,s.io.ktor.http.takeFrom_jl1sg7$),_t=s.io.ktor.http.HeadersBuilder,mt=s.io.ktor.http.URLBuilder,ft=s.io.ktor.http.HttpMessageBuilder,yt=e.kotlin.collections.ArrayList_init_ww73n8$,Tt=(o.io.ktor.utils.io.charsets.MalformedInputException,s.io.ktor.http.ContentType),$t=(s.io.ktor.http.content.TextContent,e.kotlin.text.toLong_pdl1vz$),Nt=o.io.ktor.utils.io.cancel_3dmw3p$,gt=(e.kotlin,e.kotlin.text.toInt_pdl1vz$,e.kotlin.reflect.js.internal.PrimitiveClasses.intClass,o.io.ktor.utils.io.core.ByteReadPacket),Rt=(o.io.ktor.utils.io.core.Input,e.toString,e.kotlin.reflect.js.internal.PrimitiveClasses.byteArrayClass,e.Long.MAX_VALUE),Ct=(o.io.ktor.utils.io.copyTo_47ygvz$,e.kotlin.coroutines.cancellation.CancellationException),St=(s.io.ktor.http.HttpStatusCode,e.kotlin.ranges.rangeTo_38ydlf$,o.io.ktor.utils.io.charsets),It=(e.kotlin.reflect.js.internal.PrimitiveClasses.stringClass,s.io.ktor.http.charset_10ldo9$,s.io.ktor.http.withCharset_73qf4i$),Lt=(o.io.ktor.utils.io.charsets.get_name_2sg7fd$,e.kotlin.collections.firstOrNull_2p1efm$,e.kotlin.collections.sortedWith_eknfly$,e.kotlin.Comparator,e.kotlin.text.StringBuilder_init),bt=(e.kotlin.math.roundToInt_yrwdxr$,e.kotlin.collections.LinkedHashSet_init_287e2$,s.io.ktor.http.HttpMethod),vt=(s.io.ktor.http.get_authority_3q1sfd$,a.io.ktor.events.EventDefinition),Ot=n.kotlinx.coroutines.cancel_6dgle8$,Ut=(e.kotlin.text.toLongOrNull_pdl1vz$,e.Long.ZERO),Dt=(e.Long.fromInt(1e3),e.Long.fromInt(6e4),e.kotlin.random.Random),At=n.kotlinx.coroutines.delay_s8cxhz$,kt=n.kotlinx.coroutines.launch_s496o7$,Pt=(Math,e.kotlin.collections.get_lastIndex_55thoc$,e.kotlin.ranges.downTo_dqglrj$,e.hashCode),xt=s.io.ktor.http.isWebsocket_v5fpbg$,wt=o.io.ktor.utils.io.errors.IOException_init_61zpoe$,zt=o.io.ktor.utils.io.errors.IOException,Gt=(s.io.ktor.http.HeaderValue,s.io.ktor.http.parseHeaderValue_pdl1vj$,s.io.ktor.http.Headers,i.io.ktor.util.date.GMTDate_mts6q2$,e.kotlin.collections.plus_khz7k3$,e.kotlin.collections.emptyList_287e2$),jt=(e.kotlin.collections.emptyMap_q3lmfv$,e.kotlin.text.startsWith_7epoxm$,e.kotlin.text.split_ip8yn$,e.kotlin.text.isBlank_gw00vp$,s.io.ktor.http.fromHttpToGmtDate_pdl1vz$,e.kotlin.text.toIntOrNull_pdl1vz$,i.io.ktor.util.date.getTimeMillis,e.kotlin.collections.removeAll_qafx1e$,r.kotlinx.atomicfu.atomic$long$1,e.kotlin.collections.toList_7wnvza$,i.io.ktor.util.toLowerCasePreservingASCIIRules_pdl1vz$,e.kotlin.text.trimStart_wqw3xr$,e.kotlin.text.endsWith_sgbm27$,c.io.ktor.websocket.WebSocketSession),Ft=c.io.ktor.websocket.DefaultWebSocketSession,Mt=(l.io.ktor.serialization.WebsocketConverterNotFoundException,l.io.ktor.serialization.suitableCharset_4q0pk1$,p.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,p.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketDeserializeException,s.io.ktor.http.websocket.websocketServerAccept_61zpoe$),Wt=i.io.ktor.util.generateNonce_za3lpa$,Xt=i.io.ktor.util.encodeBase64_964n91$,Bt=c.io.ktor.websocket.parseWebSocketExtensions_61zpoe$,qt=c.io.ktor.websocket.DefaultWebSocketSession_f6qnbq$,Ht=c.io.ktor.websocket.WebSocketExtensionsConfig,Vt=e.Long.NEG_ONE,Kt=e.Long.fromInt(2147483647),Jt=e.kotlin.collections.addAll_ipc267$,Yt=n.kotlinx.coroutines.CompletableDeferred_xptg6w$,Qt=(c.io.ktor.websocket.close_d9la3o$,o.io.ktor.utils.io.ByteChannel_6taknv$),Zt=s.io.ktor.http.HttpMessage,te=i.io.ktor.util.putAll_orn3b7$,ee=n.kotlinx.coroutines.SupervisorJob_5dx9e$,ne=s.io.ktor.http.takeFrom_wol2ee$,ie=s.io.ktor.http.formUrlEncode_invt95$,oe=o.io.ktor.utils.io.writeFully_4scpqu$,re=o.io.ktor.utils.io.copyTo_7gmipu$,ae=o.io.ktor.utils.io.close_x5qia6$,se=o.io.ktor.utils.io.core.BytePacketBuilder,ce=o.io.ktor.utils.io.core.writeText_t153jy$,le=o.io.ktor.utils.io.core.writeFully_i6snlg$,pe=s.io.ktor.http.content.PartData.FileItem,ue=s.io.ktor.http.content.PartData.BinaryItem,de=s.io.ktor.http.content.PartData.FormItem,he=s.io.ktor.http.content.PartData.BinaryChannelItem,Ee=e.kotlin.text.toString_dqglrj$,_e=e.kotlin.text.take_6ic1pp$,me=o.io.ktor.utils.io.core.readAvailable_czhrh1$,fe=e.kotlin.text.encodeToByteArray_pdl1vz$,ye=o.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$,Te=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,$e=o.io.ktor.utils.io.core.addSuppressedInternal_oh0dqn$,Ne=o.io.ktor.utils.io.requestWriteBuffer_9tm6dw$,ge=o.io.ktor.utils.io.core.Buffer,Re=o.io.ktor.utils.io.completeWriting_oczduq$,Ce=(s.io.ktor.http.Parameters,e.kotlin.collections.copyToArray,o.io.ktor.utils.io.charsets.decode_lb8wo3$,o.io.ktor.utils.io.pool,e.kotlin.coroutines.cancellation.CancellationException_init_wspj0f$,e.kotlin.Result,e.kotlin.createFailure_tcv7n7$,e.kotlin.coroutines.intrinsics.intercepted_f9mg25$,n.kotlinx.coroutines.CancellableContinuationImpl,e.kotlin.Error,e.kotlin.Error_init_pdl1vj$,n.kotlinx.coroutines.channels.Channel_lsve6m$);function Se(t){De(),this.client=t,this.received_8b75r7$_0=T(!1),this.request_vta333$_0=this.request_vta333$_0,this.response_zcvbsz$_0=this.response_zcvbsz$_0,this.allowDoubleReceive_c2ese3$_0=!1}function Ie(t,e,n){m.call(this,n),this.exceptionState_0=9,this.$this=t,this.local$tmp$=void 0,this.local$info=e}function Le(t,e,n){m.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$info=e}function be(){Ue=this,this.CustomResponse=new y("CustomResponse")}e.kotlin.coroutines,c.io.ktor.websocket.CloseReason.Codes,c.io.ktor.websocket.Frame.Binary_init_3eyok5$,c.io.ktor.websocket.Frame.Text_init_61zpoe$,c.io.ktor.websocket.CloseReason,c.io.ktor.websocket.Frame.Close_init_becdtx$,o.io.ktor.utils.io.core.String_xge8xe$,o.io.ktor.utils.io.core.readShort_7wsnj1$,n.kotlinx.coroutines.channels.cancelConsumed_v57n85$,Ae.prototype=Object.create(w.prototype),Ae.prototype.constructor=Ae,ke.prototype=Object.create(M.prototype),ke.prototype.constructor=ke,xe.prototype=Object.create(Se.prototype),xe.prototype.constructor=xe,ze.prototype=Object.create(Qn.prototype),ze.prototype.constructor=ze,cn.prototype=Object.create(zt.prototype),cn.prototype.constructor=cn,Ln.prototype=Object.create(Y.prototype),Ln.prototype.constructor=Ln,hn.prototype=Object.create(Ln.prototype),hn.prototype.constructor=hn,Wn.prototype=Object.create(J.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Q.prototype),Xn.prototype.constructor=Xn,Vn.prototype=Object.create(Hn.prototype),Vn.prototype.constructor=Vn,Kn.prototype=Object.create(Hn.prototype),Kn.prototype.constructor=Kn,Ei.prototype=Object.create(Y.prototype),Ei.prototype.constructor=Ei,b("ktor-ktor-client-core-js-legacy.io.ktor.client.call.receive_8ov3cv$",v((function(){var t=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n,i,o){throw t("Use `body` method instead".toString())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.call.receive_5sqbag$",v((function(){var t=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n,i,o){throw t("Use `body` method instead".toString())}}))),Object.defineProperty(Se.prototype,"coroutineContext",{configurable:!0,get:function(){return this.response.coroutineContext}}),Object.defineProperty(Se.prototype,"attributes",{configurable:!0,get:function(){return this.request.attributes}}),Object.defineProperty(Se.prototype,"request",{configurable:!0,get:function(){return null==this.request_vta333$_0?O("request"):this.request_vta333$_0},set:function(t){this.request_vta333$_0=t}}),Object.defineProperty(Se.prototype,"response",{configurable:!0,get:function(){return null==this.response_zcvbsz$_0?O("response"):this.response_zcvbsz$_0},set:function(t){this.response_zcvbsz$_0=t}}),Object.defineProperty(Se.prototype,"allowDoubleReceive",{configurable:!0,get:function(){return this.allowDoubleReceive_c2ese3$_0}}),Se.prototype.getResponseContent=function(t){return this.response.content},Ie.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Ie.prototype=Object.create(m.prototype),Ie.prototype.constructor=Ie,Ie.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=1,U(this.$this.response,this.local$info.type)){this.exceptionState_0=9,this.finallyPath_0=[2],this.state_0=8,this.$returnValue=this.$this.response;continue}this.state_0=3;continue;case 1:this.finallyPath_0=[9],this.exceptionState_0=8;var t=this.exception_0;throw e.isType(t,g)?(k(this.$this.response,"Receive failed",t),t):t;case 2:return this.$returnValue;case 3:if(!this.$this.allowDoubleReceive&&!this.$this.received_8b75r7$_0.atomicfu$compareAndSet(!1,!0))throw new Ae(this.$this);if(this.local$tmp$=this.$this.attributes.getOrNull_yzaw86$(De().CustomResponse),null==this.local$tmp$){if(this.state_0=4,this.result_0=this.$this.getResponseContent(this),this.result_0===_)return _;continue}this.state_0=5;continue;case 4:this.local$tmp$=this.result_0,this.state_0=5;continue;case 5:var n=this.local$tmp$,i=new ri(this.local$info,n);if(this.state_0=6,this.result_0=this.$this.client.responsePipeline.execute_8pmvt0$(this.$this,i,this),this.result_0===_)return _;continue;case 6:var o=this.result_0.response,r=A(o,D.NullBody)?null:o;if(null!=r&&!U(r,this.local$info.type)){var a=e.getKClassFromExpression(r),s=this.local$info.type;throw new ke(this.$this.response,a,s)}this.exceptionState_0=9,this.finallyPath_0=[7],this.state_0=8,this.$returnValue=r;continue;case 7:return this.$returnValue;case 8:this.exceptionState_0=9,ti(this.$this.response),this.state_0=this.finallyPath_0.shift();continue;case 9:throw this.exception_0;case 10:return;default:throw this.state_0=9,new Error("State Machine Unreachable execution")}}catch(t){if(9===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Se.prototype.bodyNullable_qi9ur9$=function(t,e,n){var i=new Ie(this,t,e);return n?i:i.doResume(null)},Le.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Le.prototype=Object.create(m.prototype),Le.prototype.constructor=Le,Le.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.bodyNullable_qi9ur9$(this.local$info,this),this.result_0===_)return _;continue;case 1:throw this.exception_0;case 2:return E(this.result_0);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Se.prototype.body_qi9ur9$=function(t,e,n){var i=new Le(this,t,e);return n?i:i.doResume(null)},Se.prototype.toString=function(){return"HttpClientCall["+this.request.url+", "+this.response.status+"]"},Se.prototype.setResponse_5mhyb0$=function(t){this.response=t},Se.prototype.setRequest_mosvwc$=function(t){this.request=t},be.$metadata$={kind:P,simpleName:"Companion",interfaces:[]};var ve,Oe,Ue=null;function De(){return null===Ue&&new be,Ue}function Ae(t){x(this),this.name="DoubleReceiveException",this.message_eo7lbx$_0="Response already received: "+t}function ke(t,e,n){z(this),this.name="NoTransformationFoundException",this.message_gd84kd$_0=F("No transformation found: "+e+" -> "+n+"\n |with response from "+Zn(t).url+":\n |status: "+t.status+"\n |response headers: \n |"+j(G(t.headers),void 0,void 0,void 0,void 0,void 0,Pe)+"\n ")}function Pe(t){return t.component1()+": "+t.component2()+"\n"}function xe(t,e,n,i){Se.call(this,t),this.responseBody_0=i,this.request=new we(this,e),this.response=new ze(this,this.responseBody_0,n),this.allowDoubleReceive_je4pft$_0=!0}function we(t,e){this.call_k7cxor$_0=t,this.$delegate_k8mkjd$_0=e}function ze(t,e,n){Qn.call(this),this.call_tbj7t5$_0=t,this.context_0=$(),this.status_i2dvkt$_0=n.status,this.version_ol3l9j$_0=n.version,this.requestTime_3msfjx$_0=n.requestTime,this.responseTime_xhbsdj$_0=n.responseTime,this.headers_w25qx3$_0=n.headers,this.coroutineContext_pwmz9e$_0=n.coroutineContext.plus_1fupul$(this.context_0),this.content_mzxkbe$_0=H(e)}function Ge(t,e){m.call(this,e),this.exceptionState_0=1,this.local$$receiver=t}function je(t,e,n){var i=new Ge(t,e);return n?i:i.doResume(null)}function Fe(){}function Me(t){KtorCallContextElement$Companion_getInstance(),this.callContext=t}function We(){}function Xe(t){return d}function Be(t,e){var n;return null!=(n=t.attributes.getOrNull_yzaw86$(Oe))?n.getOrNull_yzaw86$(e.key):null}function qe(t,e,n){sn(),this.requestTimeoutMillis_0=t,this.connectTimeoutMillis_0=e,this.socketTimeoutMillis_0=n}function He(){Je(),this._requestTimeoutMillis_0=Ut,this._connectTimeoutMillis_0=Ut,this._socketTimeoutMillis_0=Ut}function Ve(){Ke=this,this.key=new y("TimeoutConfiguration")}Se.$metadata$={kind:R,simpleName:"HttpClientCall",interfaces:[C]},b("ktor-ktor-client-core-js-legacy.io.ktor.client.call.body_8ov3cv$",v((function(){var n=e.getReifiedTypeParameterKType,i=e.throwCCE,o=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,r=e.getKClass,a=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,s=Error;return function(t,c,l,p){var u,d,h=o.JsType,E=r(t);t:do{try{d=n(t)}catch(t){if(e.isType(t,s)){d=null;break t}throw t}}while(0);return e.suspendCall(l.bodyNullable_qi9ur9$(a(h,E,d),e.coroutineReceiver())),c(u=e.coroutineResult(e.coroutineReceiver()))?u:i()}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.call.body_5sqbag$",v((function(){var n=e.getReifiedTypeParameterKType,i=e.throwCCE,o=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,r=e.getKClass,a=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,s=Error;return function(t,c,l,p){var u,d,h=l.call,E=o.JsType,_=r(t);t:do{try{d=n(t)}catch(t){if(e.isType(t,s)){d=null;break t}throw t}}while(0);return e.suspendCall(h.bodyNullable_qi9ur9$(a(E,_,d),e.coroutineReceiver())),c(u=e.coroutineResult(e.coroutineReceiver()))?u:i()}}))),Object.defineProperty(Ae.prototype,"message",{configurable:!0,get:function(){return this.message_eo7lbx$_0}}),Ae.$metadata$={kind:R,simpleName:"DoubleReceiveException",interfaces:[w]},Object.defineProperty(ke.prototype,"message",{configurable:!0,get:function(){return this.message_gd84kd$_0}}),ke.$metadata$={kind:R,simpleName:"NoTransformationFoundException",interfaces:[M]},xe.prototype.getResponseContent=function(t){return H(this.responseBody_0)},Object.defineProperty(xe.prototype,"allowDoubleReceive",{configurable:!0,get:function(){return this.allowDoubleReceive_je4pft$_0}}),xe.$metadata$={kind:R,simpleName:"SavedHttpCall",interfaces:[Se]},Object.defineProperty(we.prototype,"call",{get:function(){return this.call_k7cxor$_0}}),Object.defineProperty(we.prototype,"attributes",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.attributes}}),Object.defineProperty(we.prototype,"content",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.content}}),Object.defineProperty(we.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.coroutineContext}}),Object.defineProperty(we.prototype,"headers",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.headers}}),Object.defineProperty(we.prototype,"method",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.method}}),Object.defineProperty(we.prototype,"url",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.url}}),we.$metadata$={kind:R,simpleName:"SavedHttpRequest",interfaces:[On]},Object.defineProperty(ze.prototype,"call",{get:function(){return this.call_tbj7t5$_0}}),Object.defineProperty(ze.prototype,"status",{configurable:!0,get:function(){return this.status_i2dvkt$_0}}),Object.defineProperty(ze.prototype,"version",{configurable:!0,get:function(){return this.version_ol3l9j$_0}}),Object.defineProperty(ze.prototype,"requestTime",{configurable:!0,get:function(){return this.requestTime_3msfjx$_0}}),Object.defineProperty(ze.prototype,"responseTime",{configurable:!0,get:function(){return this.responseTime_xhbsdj$_0}}),Object.defineProperty(ze.prototype,"headers",{configurable:!0,get:function(){return this.headers_w25qx3$_0}}),Object.defineProperty(ze.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_pwmz9e$_0}}),Object.defineProperty(ze.prototype,"content",{configurable:!0,get:function(){return this.content_mzxkbe$_0}}),ze.$metadata$={kind:R,simpleName:"SavedHttpResponse",interfaces:[Qn]},Ge.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Ge.prototype=Object.create(m.prototype),Ge.prototype.constructor=Ge,Ge.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.response.content.readRemaining_s8cxhz$(void 0,this),this.result_0===_)return _;continue;case 1:throw this.exception_0;case 2:var t=V(this.result_0);return new xe(this.local$$receiver.client,this.local$$receiver.request,this.local$$receiver.response,t);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Fe.$metadata$={kind:et,simpleName:"HttpClientEngineCapability",interfaces:[]},b("ktor-ktor-client-core-js-legacy.io.ktor.client.engine.attachToUserJob_mmkme6$",v((function(){var n=t.$$importsForInline$$["kotlinx-coroutines-core"].kotlinx.coroutines.Job,i=e.kotlin.coroutines.cancellation.CancellationException_init_pdl1vj$,o=e.kotlin.Unit;return function(t,r){var a;if(null!=(a=e.coroutineReceiver().context.get_j3r2sn$(n.Key))){var s,c,l=a.invokeOnCompletion_ct2b2z$(!0,void 0,(s=t,function(t){if(null!=t)return s.cancel_x5z25k$(i(t.message)),o}));t.invokeOnCompletion_f05bi3$((c=l,function(t){return c.dispose(),o}))}}}))),We.prototype.prepare_oh3mgy$=function(t,e){return void 0===t&&(t=Xe),e?e(t):this.prepare_oh3mgy$$default(t)},We.$metadata$={kind:et,simpleName:"HttpClientPlugin",interfaces:[]},Object.defineProperty(He.prototype,"requestTimeoutMillis",{configurable:!0,get:function(){return this._requestTimeoutMillis_0},set:function(t){this._requestTimeoutMillis_0=this.checkTimeoutValue_0(t)}}),Object.defineProperty(He.prototype,"connectTimeoutMillis",{configurable:!0,get:function(){return this._connectTimeoutMillis_0},set:function(t){this._connectTimeoutMillis_0=this.checkTimeoutValue_0(t)}}),Object.defineProperty(He.prototype,"socketTimeoutMillis",{configurable:!0,get:function(){return this._socketTimeoutMillis_0},set:function(t){this._socketTimeoutMillis_0=this.checkTimeoutValue_0(t)}}),He.prototype.build_8be2vx$=function(){return new qe(this.requestTimeoutMillis,this.connectTimeoutMillis,this.socketTimeoutMillis)},He.prototype.checkTimeoutValue_0=function(t){if(!(null==t||t.toNumber()>0))throw K("Only positive timeout values are allowed, for infinite timeout use HttpTimeout.INFINITE_TIMEOUT_MS".toString());return t},He.prototype.equals=function(t){var n;return!!(this===t||null!=t&&null!=(n=e.getKClassFromExpression(this))&&n.equals(e.getKClassFromExpression(t))&&(e.isType(t,He)||f(),A(this._requestTimeoutMillis_0,t._requestTimeoutMillis_0)&&A(this._connectTimeoutMillis_0,t._connectTimeoutMillis_0)&&A(this._socketTimeoutMillis_0,t._socketTimeoutMillis_0)))},He.prototype.hashCode=function(){var t,e,n,i,o,r,a=null!=(e=null!=(t=this._requestTimeoutMillis_0)?Pt(t):null)?e:0;return a=(31*(a=(31*a|0)+(null!=(i=null!=(n=this._connectTimeoutMillis_0)?Pt(n):null)?i:0)|0)|0)+(null!=(r=null!=(o=this._socketTimeoutMillis_0)?Pt(o):null)?r:0)|0},Ve.$metadata$={kind:P,simpleName:"Companion",interfaces:[]};var Ke=null;function Je(){return null===Ke&&new Ve,Ke}function Ye(t,e,n,i){return void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),i=i||Object.create(He.prototype),He.call(i),i.requestTimeoutMillis=t,i.connectTimeoutMillis=e,i.socketTimeoutMillis=n,i}function Qe(){an=this,this.key_9he6wm$_0=new y("TimeoutPlugin"),this.INFINITE_TIMEOUT_MS=Rt}function Ze(t,e,n,i,o,r){m.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$requestTimeout=t,this.local$closure$context=e,this.local$closure$executionContext=n}function tn(t,e,n){return function(i,o,r){var a=new Ze(t,e,n,i,this,o);return r?a:a.doResume(null)}}function en(t){return function(e){return t.cancel_x5z25k$(),d}}function nn(t,e,n,i,o,r,a){m.call(this,a),this.$controller=r,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$this$HttpTimeout$=e,this.local$closure$scope=n,this.local$$receiver=i}He.$metadata$={kind:R,simpleName:"HttpTimeoutCapabilityConfiguration",interfaces:[]},qe.prototype.hasNotNullTimeouts_0=function(){return null!=this.requestTimeoutMillis_0||null!=this.connectTimeoutMillis_0||null!=this.socketTimeoutMillis_0},Object.defineProperty(Qe.prototype,"key",{configurable:!0,get:function(){return this.key_9he6wm$_0}}),Qe.prototype.prepare_oh3mgy$$default=function(t){var e=Ye();return t(e),e.build_8be2vx$()},Ze.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Ze.prototype=Object.create(m.prototype),Ze.prototype.constructor=Ze,Ze.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=At(this.local$closure$requestTimeout,this),this.result_0===_)return _;continue;case 1:throw this.exception_0;case 2:var t=ln(this.local$closure$context);return Ot(this.local$closure$executionContext,E(t.message),t),d;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},nn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},nn.prototype=Object.create(m.prototype),nn.prototype.constructor=nn,nn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(xt(this.local$$receiver.context.url.protocol)||e.isType(this.local$$receiver.context.body,Ln))return;var t,n=this.local$$receiver.context.getCapabilityOrNull_i25mbv$(sn());if(null==n&&this.local$closure$plugin.hasNotNullTimeouts_0()&&(n=Ye(),this.local$$receiver.context.setCapability_wfl2px$(sn(),n)),null!=n){var i=n,o=this.local$closure$plugin,r=this.local$this$HttpTimeout$,a=this.local$closure$scope;t:do{var s,c,l,p,u=this.local$$receiver.context;i.connectTimeoutMillis=null!=(s=i.connectTimeoutMillis)?s:o.connectTimeoutMillis_0,i.socketTimeoutMillis=null!=(c=i.socketTimeoutMillis)?c:o.socketTimeoutMillis_0,i.requestTimeoutMillis=null!=(l=i.requestTimeoutMillis)?l:o.requestTimeoutMillis_0;var d=null!=(p=i.requestTimeoutMillis)?p:o.requestTimeoutMillis_0;if(null==d||A(d,r.INFINITE_TIMEOUT_MS))break t;var h=u.executionContext,E=kt(a,void 0,void 0,tn(d,u,h));u.executionContext.invokeOnCompletion_f05bi3$(en(E))}while(0);t=i}else t=null;return t;case 1:throw this.exception_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Qe.prototype.install_wojrb5$=function(t,e){var n,i,o;e.requestPipeline.intercept_h71y74$(Mn().Before,(n=t,i=this,o=e,function(t,e,r,a){var s=new nn(n,i,o,t,e,this,r);return a?s:s.doResume(null)}))},Qe.$metadata$={kind:P,simpleName:"Plugin",interfaces:[Fe,We]};var on,rn,an=null;function sn(){return null===an&&new Qe,an}function cn(t,e){wt("Request timeout has expired [url="+t+", request_timeout="+(null!=e?e:"unknown").toString()+" ms]",this),this.name="HttpRequestTimeoutException"}function ln(t,e){var n;return e=e||Object.create(cn.prototype),cn.call(e,t.url.buildString(),null!=(n=t.getCapabilityOrNull_i25mbv$(sn()))?n.requestTimeoutMillis:null),e}function pn(){}function un(t,e){this.call_isp37v$_0=t,this.$delegate_qgt999$_0=e}function dn(t,e){this.call_763etk$_0=t,this.$delegate_m50m56$_0=e}function hn(){Ln.call(this);var t=Lt(),e=Wt(16);t.append_pdl1vj$(Xt(e)),this.nonce_0=t.toString();var n=new _t;n.append_puj7f4$(nt.HttpHeaders.Upgrade,"websocket"),n.append_puj7f4$(nt.HttpHeaders.Connection,"upgrade"),n.append_puj7f4$(nt.HttpHeaders.SecWebSocketKey,this.nonce_0),n.append_puj7f4$(nt.HttpHeaders.SecWebSocketVersion,on),this.headers_81bwsu$_0=n.build()}function En(){_n=this}qe.$metadata$={kind:R,simpleName:"HttpTimeout",interfaces:[]},cn.$metadata$={kind:R,simpleName:"HttpRequestTimeoutException",interfaces:[zt]},pn.$metadata$={kind:et,simpleName:"ClientWebSocketSession",interfaces:[jt]},Object.defineProperty(un.prototype,"call",{get:function(){return this.call_isp37v$_0}}),Object.defineProperty(un.prototype,"closeReason",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.closeReason}}),Object.defineProperty(un.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.coroutineContext}}),Object.defineProperty(un.prototype,"extensions",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.extensions}}),Object.defineProperty(un.prototype,"incoming",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.incoming}}),Object.defineProperty(un.prototype,"masking",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.masking},set:function(t){this.$delegate_qgt999$_0.masking=t}}),Object.defineProperty(un.prototype,"maxFrameSize",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.maxFrameSize},set:function(t){this.$delegate_qgt999$_0.maxFrameSize=t}}),Object.defineProperty(un.prototype,"outgoing",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.outgoing}}),Object.defineProperty(un.prototype,"pingIntervalMillis",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.pingIntervalMillis},set:function(t){this.$delegate_qgt999$_0.pingIntervalMillis=t}}),Object.defineProperty(un.prototype,"timeoutMillis",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.timeoutMillis},set:function(t){this.$delegate_qgt999$_0.timeoutMillis=t}}),un.prototype.flush=function(t){return this.$delegate_qgt999$_0.flush(t)},un.prototype.send_q1ubw4$=function(t,e){return this.$delegate_qgt999$_0.send_q1ubw4$(t,e)},un.prototype.start_wwqcjq$$default=function(t){return this.$delegate_qgt999$_0.start_wwqcjq$$default(t)},un.prototype.terminate=function(){return this.$delegate_qgt999$_0.terminate()},un.$metadata$={kind:R,simpleName:"DefaultClientWebSocketSession",interfaces:[Ft,pn]},Object.defineProperty(dn.prototype,"call",{get:function(){return this.call_763etk$_0}}),Object.defineProperty(dn.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.coroutineContext}}),Object.defineProperty(dn.prototype,"extensions",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.extensions}}),Object.defineProperty(dn.prototype,"incoming",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.incoming}}),Object.defineProperty(dn.prototype,"masking",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.masking},set:function(t){this.$delegate_m50m56$_0.masking=t}}),Object.defineProperty(dn.prototype,"maxFrameSize",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.maxFrameSize},set:function(t){this.$delegate_m50m56$_0.maxFrameSize=t}}),Object.defineProperty(dn.prototype,"outgoing",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.outgoing}}),dn.prototype.flush=function(t){return this.$delegate_m50m56$_0.flush(t)},dn.prototype.send_q1ubw4$=function(t,e){return this.$delegate_m50m56$_0.send_q1ubw4$(t,e)},dn.prototype.terminate=function(){return this.$delegate_m50m56$_0.terminate()},dn.$metadata$={kind:R,simpleName:"DelegatingClientWebSocketSession",interfaces:[pn,jt]},b("ktor-ktor-client-core-js-legacy.io.ktor.client.plugins.websocket.sendSerialized_6ltcma$",v((function(){var n=t.io.ktor.client.plugins.websocket.get_converter_vw5opa$,i=t.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketConverterNotFoundException,o=t.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.suitableCharset_4q0pk1$,r=e.getReifiedTypeParameterKType,a=t.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,s=e.getKClass,c=t.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,l=Error;return function(t,p,u,d,h){var E;if(null==(E=n(u)))throw new i("No converter was found for websocket");var _,m=E,f=o(u.call.request.headers),y=a.JsType,T=s(t);t:do{try{_=r(t)}catch(t){if(e.isType(t,l)){_=null;break t}throw t}}while(0);e.suspendCall(m.serializeNullable_rh40qx$(f,c(y,T,_),d,e.coroutineReceiver()));var $=e.coroutineResult(e.coroutineReceiver());e.suspendCall(u.outgoing.send_11rb$($,e.coroutineReceiver()))}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.plugins.websocket.receiveDeserialized_8j5n8k$",v((function(){var n=t.io.ktor.client.plugins.websocket.get_converter_vw5opa$,i=t.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketConverterNotFoundException,o=t.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.suitableCharset_4q0pk1$,r=e.getReifiedTypeParameterKType,a=e.throwCCE,s=t.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketDeserializeException,c=e.getKClass,l=e.toString,p=t.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,u=t.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;return function(t,h,E,_){var m,f;if(null==(m=n(E)))throw new i("No converter was found for websocket");var y=m,T=o(E.call.request.headers);t:do{var $;e.suspendCall(E.incoming.receive(e.coroutineReceiver()));var N=e.coroutineResult(e.coroutineReceiver());if(!y.isApplicable_q1ubw4$(N))throw new s("Converter doesn't support frame type "+N.frameType.name,void 0,N);var g,R=p.JsType,C=c(t);e:do{try{g=r(t)}catch(t){if(e.isType(t,d)){g=null;break e}throw t}}while(0);var S=u(R,C,g);e.suspendCall(y.deserialize_v0czzf$(T,S,N,e.coroutineReceiver()));var I=e.coroutineResult(e.coroutineReceiver());if(h(I)){e.setCoroutineResult(I,e.coroutineReceiver());break t}if(null==I){if(!0===(null!=($=S.kotlinType)?$.isMarkedNullable:null)){e.setCoroutineResult(null,e.coroutineReceiver());break t}throw new s("Frame has null content",void 0,N)}throw new s("Can't deserialize value : expected value of type "+l(c(t).simpleName)+", got "+l(e.getKClassFromExpression(I).simpleName),void 0,N)}while(0);return h(f=e.coroutineResult(e.coroutineReceiver()))?f:a()}}))),Object.defineProperty(hn.prototype,"headers",{configurable:!0,get:function(){return this.headers_81bwsu$_0}}),hn.prototype.verify_fkh4uy$=function(t){var e;if(null==(e=t.get_61zpoe$(nt.HttpHeaders.SecWebSocketAccept)))throw S("Server should specify header Sec-WebSocket-Accept".toString());var n=e,i=Mt(this.nonce_0);if(!A(i,n))throw S(("Failed to verify server accept header. Expected: "+i+", received: "+n).toString())},hn.prototype.toString=function(){return"WebSocketContent"},hn.$metadata$={kind:R,simpleName:"WebSocketContent",interfaces:[Ln]},En.prototype.toString=function(){return"WebSocketCapability"},En.$metadata$={kind:P,simpleName:"WebSocketCapability",interfaces:[Fe]};var _n=null;function mn(){return null===_n&&new En,_n}function fn(){yn=this}fn.prototype.toString=function(){return"WebSocketExtensionsCapability"},fn.$metadata$={kind:P,simpleName:"WebSocketExtensionsCapability",interfaces:[Fe]};var yn=null;function Tn(){return null===yn&&new fn,yn}function $n(t,e,n,i){In(),void 0===i&&(i=null),this.pingInterval=t,this.maxFrameSize=e,this.extensionsConfig_0=n,this.contentConverter=i}function Nn(){this.extensionsConfig_8be2vx$=new Ht,this.pingInterval=Vt,this.maxFrameSize=Kt,this.contentConverter=null}function gn(){Sn=this,this.key_duloku$_0=new y("Websocket")}function Rn(t,e,n,i,o,r){m.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$extensionsSupported=t,this.local$closure$plugin=e,this.local$$receiver=n}function Cn(t,e,n,i,o,r){m.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$closure$extensionsSupported=e,this.local$info=void 0,this.local$session=void 0,this.local$$receiver=n,this.local$f=i}$n.prototype.installExtensions_0=function(t){var e=this.extensionsConfig_0.build();t.attributes.put_uuntuo$(rn,e);var n,i=ot();for(n=e.iterator();n.hasNext();){var o=n.next().protocols;Jt(i,o)}var r=i;this.addNegotiatedProtocols_0(t,r)},$n.prototype.completeNegotiation_0=function(t){var e,n,i,o=null!=(n=null!=(e=t.response.headers.get_61zpoe$(nt.HttpHeaders.SecWebSocketExtensions))?Bt(e):null)?n:Gt(),r=t.attributes.get_yzaw86$(rn),a=ot();for(i=r.iterator();i.hasNext();){var s=i.next();s.clientNegotiation_wklug5$(o)&&a.add_11rb$(s)}return a},$n.prototype.addNegotiatedProtocols_0=function(t,e){if(!e.isEmpty()){var n=j(e,";");Yn(t,nt.HttpHeaders.SecWebSocketExtensions,n)}},$n.prototype.convertSessionToDefault_7ikcz7$=function(t){if(e.isType(t,Ft))return t;var n=qt(t,this.pingInterval,this.pingInterval.multiply(e.Long.fromInt(2)));return n.maxFrameSize=this.maxFrameSize,n},Nn.prototype.extensions_rm8exh$=function(t){t(this.extensionsConfig_8be2vx$)},Nn.$metadata$={kind:R,simpleName:"Config",interfaces:[]},Object.defineProperty(gn.prototype,"key",{configurable:!0,get:function(){return this.key_duloku$_0}}),gn.prototype.prepare_oh3mgy$$default=function(t){var e=new Nn;t(e);var n=e;return new $n(n.pingInterval,n.maxFrameSize,n.extensionsConfig_8be2vx$,n.contentConverter)},Rn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Rn.prototype=Object.create(m.prototype),Rn.prototype.constructor=Rn,Rn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(xt(this.local$$receiver.context.url.protocol)){this.state_0=2;continue}return;case 1:throw this.exception_0;case 2:if(this.local$$receiver.context.setCapability_wfl2px$(mn(),d),this.local$closure$extensionsSupported&&this.local$closure$plugin.installExtensions_0(this.local$$receiver.context),this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new hn,this),this.result_0===_)return _;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Cn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Cn.prototype=Object.create(m.prototype),Cn.prototype.constructor=Cn,Cn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.local$info=this.local$f.component1(),this.local$session=this.local$f.component2(),e.isType(this.local$session,jt)){this.state_0=2;continue}return;case 1:throw this.exception_0;case 2:if(A(this.local$info.type,B(un))){var n=this.local$closure$plugin.convertSessionToDefault_7ikcz7$(this.local$session),i=new un(this.local$$receiver.context,n),o=this.local$closure$extensionsSupported?this.local$closure$plugin.completeNegotiation_0(this.local$$receiver.context):Gt();i.start_wwqcjq$(o),t=i}else t=new dn(this.local$$receiver.context,this.local$session);var r=t,a=new ri(this.local$info,r);if(this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(a,this),this.result_0===_)return _;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},gn.prototype.install_wojrb5$=function(t,e){var n,i,o=e.engine.supportedCapabilities.contains_11rb$(Tn());e.requestPipeline.intercept_h71y74$(Mn().Render,(n=o,i=t,function(t,e,o,r){var a=new Rn(n,i,t,e,this,o);return r?a:a.doResume(null)})),e.responsePipeline.intercept_h71y74$(oi().Transform,function(t,e){return function(n,i,o,r){var a=new Cn(t,e,n,i,this,o);return r?a:a.doResume(null)}}(t,o))},gn.$metadata$={kind:P,simpleName:"Plugin",interfaces:[We]};var Sn=null;function In(){return null===Sn&&new gn,Sn}function Ln(){Y.call(this),this.content_1mwwgv$_xt2h6t$_0=at(vn)}function bn(t,e,n){m.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$output=e}function vn(){return Qt()}function On(){}function Un(){Pn(),this.url=new mt,this.method=bt.Companion.Get,this.headers_nor9ye$_0=new _t,this.body_ts5xt2$_0=mi(),this.executionContext_h6ms6p$_0=ee(),this.attributes=N(!0)}function Dn(){return L()}function An(){kn=this}$n.$metadata$={kind:R,simpleName:"WebSockets",interfaces:[]},Object.defineProperty(Ln.prototype,"content_1mwwgv$_0",{configurable:!0,get:function(){return this.content_1mwwgv$_xt2h6t$_0.value}}),Object.defineProperty(Ln.prototype,"output",{configurable:!0,get:function(){return this.content_1mwwgv$_0}}),bn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},bn.prototype=Object.create(m.prototype),bn.prototype.constructor=bn,bn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=pt(this.$this.content_1mwwgv$_0,this.local$output,void 0,this),this.result_0===_)return _;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ln.prototype.pipeTo_h3x4ir$=function(t,e,n){var i=new bn(this,t,e);return n?i:i.doResume(null)},Ln.$metadata$={kind:R,simpleName:"ClientUpgradeContent",interfaces:[Y]},Object.defineProperty(On.prototype,"coroutineContext",{configurable:!0,get:function(){return this.call.coroutineContext}}),On.$metadata$={kind:et,simpleName:"HttpRequest",interfaces:[C,Zt]},Object.defineProperty(Un.prototype,"headers",{configurable:!0,get:function(){return this.headers_nor9ye$_0}}),Object.defineProperty(Un.prototype,"body",{configurable:!0,get:function(){return this.body_ts5xt2$_0},set:function(t){this.body_ts5xt2$_0=t}}),Object.defineProperty(Un.prototype,"bodyType",{configurable:!0,get:function(){return this.attributes.getOrNull_yzaw86$(Gn)},set:function(t){null!=t?this.attributes.put_uuntuo$(Gn,t):this.attributes.remove_yzaw86$(Gn)}}),Object.defineProperty(Un.prototype,"executionContext",{configurable:!0,get:function(){return this.executionContext_h6ms6p$_0},set:function(t){this.executionContext_h6ms6p$_0=t}}),Un.prototype.url_6yzzjr$=function(t){t(this.url,this.url)},Un.prototype.build=function(){var t,n,i,o,r;if(t=this.url.build(),n=this.method,i=this.headers.build(),null==(r=e.isType(o=this.body,it)?o:null))throw S(("No request transformation found: "+this.body.toString()).toString());return new xn(t,n,i,r,this.executionContext,this.attributes)},Un.prototype.setAttributes_yhh5ns$=function(t){t(this.attributes)},Un.prototype.takeFromWithExecutionContext_s9rlw$=function(t){return this.executionContext=t.executionContext,this.takeFrom_s9rlw$(t)},Un.prototype.takeFrom_s9rlw$=function(t){return this.method=t.method,this.body=t.body,this.bodyType=t.bodyType,ht(this.url,t.url),this.url.encodedPathSegments=this.url.encodedPathSegments,dt(this.headers,t.headers),te(this.attributes,t.attributes),this},Un.prototype.setCapability_wfl2px$=function(t,e){this.attributes.computeIfAbsent_u4q9l2$(ve,Dn).put_xwzc9p$(t,e)},Un.prototype.getCapabilityOrNull_i25mbv$=function(t){var n,i;return null==(i=null!=(n=this.attributes.getOrNull_yzaw86$(ve))?n.get_11rb$(t):null)||e.isType(i,I)?i:f()},An.$metadata$={kind:P,simpleName:"Companion",interfaces:[]};var kn=null;function Pn(){return null===kn&&new An,kn}function xn(t,e,n,i,o,r){var a,s;this.url=t,this.method=e,this.headers=n,this.body=i,this.executionContext=o,this.attributes=r,this.requiredCapabilities_8be2vx$=null!=(s=null!=(a=this.attributes.getOrNull_yzaw86$(ve))?a.keys:null)?s:tt()}function wn(t){Mn(),void 0===t&&(t=!1),Pipeline.call(this,[Mn().Before,Mn().State,Mn().Transform,Mn().Render,Mn().Send]),this.developmentMode_dglch5$_0=t}function zn(){Fn=this,this.Before=new ut("Before"),this.State=new ut("State"),this.Transform=new ut("Transform"),this.Render=new ut("Render"),this.Send=new ut("Send")}Un.$metadata$={kind:R,simpleName:"HttpRequestBuilder",interfaces:[ft]},xn.prototype.getCapabilityOrNull_1sr7de$=function(t){var n,i;return null==(i=null!=(n=this.attributes.getOrNull_yzaw86$(ve))?n.get_11rb$(t):null)||e.isType(i,I)?i:f()},xn.prototype.toString=function(){return"HttpRequestData(url="+this.url+", method="+this.method+")"},xn.$metadata$={kind:R,simpleName:"HttpRequestData",interfaces:[]},zn.$metadata$={kind:P,simpleName:"Phases",interfaces:[]};var Gn,jn,Fn=null;function Mn(){return null===Fn&&new zn,Fn}function Wn(t){J.call(this),this.formData=t;var n,i,o=ie(this.formData);t:do{if(null!=(n=St.Charsets.UTF_8)&&n.equals(St.Charsets.UTF_8)){i=fe(o);break t}i=ye(n.newEncoder(),o,0,o.length)}while(0);this.content_0=i,this.contentLength_f2tvnf$_0=e.Long.fromInt(this.content_0.length),this.contentType_gyve29$_0=It(Tt.Application.FormUrlEncoded,St.Charsets.UTF_8)}function Xn(t,n,i){void 0===n&&(n=function(){for(var t=Lt(),e=0;e<32;e++)t.append_pdl1vj$(Ee(Dt.Default.nextInt(),16));return _e(t.toString(),70)}()),void 0===i&&(i=Tt.MultiPart.FormData.withParameter_puj7f4$("boundary",n)),Q.call(this),this.boundary=n,this.contentType_azd2en$_0=i;var o,r,a="--"+this.boundary+"\r\n";t:do{if(null!=(o=St.Charsets.UTF_8)&&o.equals(St.Charsets.UTF_8)){r=fe(a);break t}r=ye(o.newEncoder(),a,0,a.length)}while(0);this.BOUNDARY_BYTES_0=r;var s,c,l="--"+this.boundary+"--\r\n";t:do{if(null!=(s=St.Charsets.UTF_8)&&s.equals(St.Charsets.UTF_8)){c=fe(l);break t}c=ye(s.newEncoder(),l,0,l.length)}while(0);this.LAST_BOUNDARY_BYTES_0=c,this.BODY_OVERHEAD_SIZE_0=this.LAST_BOUNDARY_BYTES_0.length,this.PART_OVERHEAD_SIZE_0=(2*jn.length|0)+this.BOUNDARY_BYTES_0.length|0;var p,u,d=yt(Te(t,10));for(p=t.iterator();p.hasNext();){var h,E,_,m,f,y,T=p.next(),$=d.add_11rb$,N=new se;for(E=T.headers.entries().iterator();E.hasNext();){var R=E.next(),C=R.key,S=R.value;ce(N,C+": "+j(S,"; ")),le(N,jn)}var I=null!=(_=T.headers.get_61zpoe$(nt.HttpHeaders.ContentLength))?$t(_):null;if(e.isType(T,pe)){var L=V(N.build()),b=null!=(m=null!=I?I.add(e.Long.fromInt(this.PART_OVERHEAD_SIZE_0)):null)?m.add(e.Long.fromInt(L.length)):null;h=new Vn(L,T.provider,b)}else if(e.isType(T,ue)){var v=V(N.build()),O=null!=(f=null!=I?I.add(e.Long.fromInt(this.PART_OVERHEAD_SIZE_0)):null)?f.add(e.Long.fromInt(v.length)):null;h=new Vn(v,T.provider,O)}else if(e.isType(T,de)){var U,D=new se;try{ce(D,T.value),U=D.build()}catch(t){throw e.isType(t,g)?(D.release(),t):t}var A=V(U),k=qn(A);null==I&&(ce(N,nt.HttpHeaders.ContentLength+": "+A.length),le(N,jn));var P=V(N.build()),x=A.length+this.PART_OVERHEAD_SIZE_0+P.length|0;h=new Vn(P,k,e.Long.fromInt(x))}else if(e.isType(T,he)){var w=V(N.build()),z=null!=(y=null!=I?I.add(e.Long.fromInt(this.PART_OVERHEAD_SIZE_0)):null)?y.add(e.Long.fromInt(w.length)):null;h=new Kn(w,T.provider,z)}else h=e.noWhenBranchMatched();$.call(d,h)}this.rawParts_0=d,this.contentLength_egukxp$_0=null;var G=Ut;for(u=this.rawParts_0.iterator();u.hasNext();){var F=u.next().size;if(null==F){G=null;break}G=null!=G?G.add(F):null}null!=G&&(G=G.add(e.Long.fromInt(this.BODY_OVERHEAD_SIZE_0))),this.contentLength_egukxp$_0=G}function Bn(t,e,n){m.call(this,n),this.exceptionState_0=18,this.$this=t,this.local$tmp$=void 0,this.local$part=void 0,this.local$$receiver=void 0,this.local$closed=void 0,this.local$channel=e}function qn(t){return function(){var n,i=new se;try{le(i,t),n=i.build()}catch(t){throw e.isType(t,g)?(i.release(),t):t}return n}}function Hn(t,e){this.headers=t,this.size=e}function Vn(t,e,n){Hn.call(this,t,n),this.provider=e}function Kn(t,e,n){Hn.call(this,t,n),this.provider=e}function Jn(t,e,n){m.call(this,n),this.exceptionState_0=8,this.local$buffer=void 0,this.local$bytesWritten=void 0,this.local$$receiver=t,this.local$channel=e}function Yn(t,e,n){null!=n&&t.headers.append_puj7f4$(e,n.toString())}function Qn(){}function Zn(t){return t.call.request}function ti(t){var n;(e.isType(n=E(t.coroutineContext.get_j3r2sn$(h.Key)),rt)?n:f()).complete()}function ei(t){oi(),void 0===t&&(t=!1),Pipeline.call(this,[oi().Receive,oi().Parse,oi().Transform,oi().State,oi().After]),this.developmentMode_368lah$_0=t}function ni(){ii=this,this.Receive=new ut("Receive"),this.Parse=new ut("Parse"),this.Transform=new ut("Transform"),this.State=new ut("State"),this.After=new ut("After")}b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_30bfl5$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return void 0===o&&(o=new n),e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_30bfl5$",v((function(){var e=t.io.ktor.client.request.HttpRequestBuilder,n=t.io.ktor.client.statement.HttpStatement;return function(t,i,o){return void 0===i&&(i=new e),new n(i,t)}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){var a=new n;return o(a),e.suspendCall(new i(a,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){var a=new n;return o(a),e.setCoroutineResult(new i(a,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.io.ktor.client.statement.HttpStatement;function a(t){return n}return function(t,n,s,c){void 0===s&&(s=a);var l=new o;return i(l,n),s(l),e.suspendCall(new r(l,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.io.ktor.client.statement.HttpStatement;function a(t){return n}return function(t,n,s,c){void 0===s&&(s=a);var l=new o;return i(l,n),s(l),e.setCoroutineResult(new r(l,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_qpqkqe$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.io.ktor.client.statement.HttpStatement;function a(t){return n}return function(t,n,s,c){void 0===s&&(s=a);var l=new o;return i(l,n),s(l),e.suspendCall(new r(l,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_qpqkqe$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.io.ktor.client.statement.HttpStatement;function a(t){return n}return function(t,n,s,c){void 0===s&&(s=a);var l=new o;return i(l,n),s(l),e.setCoroutineResult(new r(l,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Get,e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Post,e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Put,e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Delete,e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Options,e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Patch,e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Head,e.suspendCall(new i(o,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Get,e.setCoroutineResult(new i(o,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Post,e.setCoroutineResult(new i(o,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Put,e.setCoroutineResult(new i(o,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Delete,e.setCoroutineResult(new i(o,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Options,e.setCoroutineResult(new i(o,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Patch,e.setCoroutineResult(new i(o,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_30bfl5$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=t.io.ktor.client.statement.HttpStatement;return function(t,o,r){return o.method=n.Companion.Head,e.setCoroutineResult(new i(o,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Get,e.suspendCall(new o(s,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Post,e.suspendCall(new o(s,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Put,e.suspendCall(new o(s,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Delete,e.suspendCall(new o(s,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Options,e.suspendCall(new o(s,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Patch,e.suspendCall(new o(s,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Head,e.suspendCall(new o(s,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Get,e.setCoroutineResult(new o(s,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Post,e.setCoroutineResult(new o(s,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Put,e.setCoroutineResult(new o(s,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Delete,e.setCoroutineResult(new o(s,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Options,e.setCoroutineResult(new o(s,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Patch,e.setCoroutineResult(new o(s,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_uxii9k$",v((function(){var n=t.io.ktor.client.request.HttpRequestBuilder,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=t.io.ktor.client.statement.HttpStatement;return function(t,r,a){var s=new n;return r(s),s.method=i.Companion.Head,e.setCoroutineResult(new o(s,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Get,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Post,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Put,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Delete,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Options,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Patch,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Head,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Get,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Post,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Put,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Delete,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Options,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Patch,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_7cz7zq$",v((function(){var n=e.kotlin.Unit,i=t.io.ktor.client.request.url_g8iu3v$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p,n),c(p),p.method=r.Companion.Head,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Get,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Get,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Post,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Post,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Put,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Put,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Patch,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Patch,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Options,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Options,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Head,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Head,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Delete,e.suspendCall(new a(p,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_9weqol$",v((function(){var n=e.kotlin.Unit,i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,o=t.io.ktor.client.request.HttpRequestBuilder,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.statement.HttpStatement;function s(t){return n}return function(t,n,c,l){void 0===c&&(c=s);var p=new o;return i(p.url,n),c(p),p.method=r.Companion.Delete,e.setCoroutineResult(new a(p,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),Object.defineProperty(Wn.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_f2tvnf$_0}}),Object.defineProperty(Wn.prototype,"contentType",{configurable:!0,get:function(){return this.contentType_gyve29$_0}}),Wn.prototype.bytes=function(){return this.content_0},Wn.$metadata$={kind:R,simpleName:"FormDataContent",interfaces:[J]},Object.defineProperty(Xn.prototype,"contentType",{get:function(){return this.contentType_azd2en$_0}}),Object.defineProperty(Xn.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_egukxp$_0}}),Bn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Bn.prototype=Object.create(m.prototype),Bn.prototype.constructor=Bn,Bn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.exceptionState_0=15,this.local$tmp$=this.$this.rawParts_0.iterator(),this.state_0=1;continue;case 1:if(!this.local$tmp$.hasNext()){this.state_0=13;continue}if(this.local$part=this.local$tmp$.next(),this.state_0=2,this.result_0=oe(this.local$channel,this.$this.BOUNDARY_BYTES_0,this),this.result_0===_)return _;continue;case 2:if(this.state_0=3,this.result_0=oe(this.local$channel,this.local$part.headers,this),this.result_0===_)return _;continue;case 3:if(this.state_0=4,this.result_0=oe(this.local$channel,jn,this),this.result_0===_)return _;continue;case 4:if(e.isType(this.local$part,Vn)){if(this.local$$receiver=this.local$part.provider(),this.local$closed=!1,this.exceptionState_0=8,this.state_0=7,this.result_0=(i=this.local$$receiver,o=this.local$channel,r=void 0,a=void 0,a=new Jn(i,o,this),r?a:a.doResume(null)),this.result_0===_)return _;continue}if(e.isType(this.local$part,Kn)){if(this.state_0=5,this.result_0=re(this.local$part.provider(),this.local$channel,this),this.result_0===_)return _;continue}e.noWhenBranchMatched(),this.state_0=6;continue;case 5:this.state_0=6;continue;case 6:this.state_0=11;continue;case 7:this.exceptionState_0=15,this.finallyPath_0=[10],this.state_0=9;continue;case 8:this.finallyPath_0=[15],this.exceptionState_0=9;var t=this.exception_0;if(e.isType(t,g)){try{this.local$closed=!0,this.local$$receiver.close()}catch(n){if(!e.isType(n,g))throw n;$e(t,n)}throw t}throw t;case 9:this.exceptionState_0=15,this.local$closed||this.local$$receiver.close(),this.state_0=this.finallyPath_0.shift();continue;case 10:this.state_0=11;continue;case 11:if(this.state_0=12,this.result_0=oe(this.local$channel,jn,this),this.result_0===_)return _;continue;case 12:this.state_0=1;continue;case 13:if(this.state_0=14,this.result_0=oe(this.local$channel,this.$this.LAST_BOUNDARY_BYTES_0,this),this.result_0===_)return _;continue;case 14:this.exceptionState_0=18,this.finallyPath_0=[17],this.state_0=16;continue;case 15:this.finallyPath_0=[18],this.exceptionState_0=16;var n=this.exception_0;if(!e.isType(n,g))throw n;this.local$channel.close_dbl4no$(n),this.finallyPath_0=[17],this.state_0=16;continue;case 16:this.exceptionState_0=18,ae(this.local$channel),this.state_0=this.finallyPath_0.shift();continue;case 17:return;case 18:throw this.exception_0;default:throw this.state_0=18,new Error("State Machine Unreachable execution")}}catch(t){if(18===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var i,o,r,a},Xn.prototype.writeTo_h3x4ir$=function(t,e,n){var i=new Bn(this,t,e);return n?i:i.doResume(null)},Xn.$metadata$={kind:R,simpleName:"MultiPartFormDataContent",interfaces:[Q]},Vn.$metadata$={kind:R,simpleName:"InputPart",interfaces:[Hn]},Kn.$metadata$={kind:R,simpleName:"ChannelPart",interfaces:[Hn]},Hn.$metadata$={kind:R,simpleName:"PreparedPart",interfaces:[]},Jn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},Jn.prototype=Object.create(m.prototype),Jn.prototype.constructor=Jn,Jn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(e.isType(this.local$$receiver,gt)){if(this.state_0=1,this.result_0=this.local$channel.writePacket_3uq2w4$(this.local$$receiver,this),this.result_0===_)return _;continue}this.state_0=2;continue;case 1:return;case 2:this.state_0=3;continue;case 3:if(this.local$$receiver.endOfInput){this.state_0=10;continue}var t;if(this.state_0=4,this.result_0=Ne(this.local$channel,1,this),this.result_0===_)return _;continue;case 4:this.local$buffer=null!=(t=this.result_0)?t:ge.Companion.Empty,this.local$bytesWritten=0,this.exceptionState_0=5;var n=this.local$buffer.memory,i=e.Long.fromInt(this.local$buffer.writePosition);this.local$bytesWritten=me(this.local$$receiver,n,i,e.Long.fromInt(this.local$buffer.limit).subtract(i)).toInt(),this.local$buffer.commitWritten_za3lpa$(this.local$bytesWritten),this.result_0=this.local$bytesWritten,this.exceptionState_0=8,this.finallyPath_0=[9],this.state_0=6;continue;case 5:this.finallyPath_0=[8],this.state_0=6;continue;case 6:if(this.exceptionState_0=8,this.state_0=7,this.result_0=Re(this.local$channel,this.local$buffer,this.local$bytesWritten,this),this.result_0===_)return _;continue;case 7:this.state_0=this.finallyPath_0.shift();continue;case 8:throw this.exception_0;case 9:this.state_0=3;continue;case 10:return;default:throw this.state_0=8,new Error("State Machine Unreachable execution")}}catch(t){if(8===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.submitForm_9i20zh$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.Parameters,i=e.kotlin.Unit,o=e.wrapFunction,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.request.forms.FormDataContent,s=e.getKClass,c=e.createKType,l=t.io.ktor.client.request.HttpRequestBuilder,p=t.io.ktor.client.statement.HttpStatement,u=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,d=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,h=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,E=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,_=Error;function m(t){return i}return o((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,l=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=e.getKClass,u=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;return function(t,h,E){return function(_){if(t)_.method=r.Companion.Get,_.url.parameters.appendAll_hb0ubp$(h);else{_.method=r.Companion.Post;var m=new a(h);if(null==m){_.body=n.NullBody;var f,y=l.JsType,T=p(a);t:do{try{f=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){f=null;break t}throw t}}while(0);_.bodyType=u(y,T,f)}else if(e.isType(m,o))_.body=m,_.bodyType=null;else{_.body=m;var $,N=l.JsType,g=p(a);t:do{try{$=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){$=null;break t}throw t}}while(0);_.bodyType=u(N,g,$)}}return E(_),i}}})),function(t,i,o,f,y){void 0===i&&(i=n.Companion.Empty),void 0===o&&(o=!1),void 0===f&&(f=m);var T=new l;if(o)T.method=r.Companion.Get,T.url.parameters.appendAll_hb0ubp$(i);else{T.method=r.Companion.Post;var $=new a(i);if(null==$){T.body=u.NullBody;var N,g=h.JsType,R=s(a);t:do{try{N=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){N=null;break t}throw t}}while(0);T.bodyType=E(g,R,N)}else if(e.isType($,d))T.body=$,T.bodyType=null;else{T.body=$;var C,S=h.JsType,I=s(a);t:do{try{C=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){C=null;break t}throw t}}while(0);T.bodyType=E(S,I,C)}}return f(T),e.suspendCall(new p(T,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.submitFormWithBinaryData_ln1qgv$",v((function(){var n=e.kotlin.Unit,i=e.wrapFunction,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,r=t.io.ktor.client.request.forms.MultiPartFormDataContent,a=e.getKClass,s=e.createKType,c=t.io.ktor.client.request.HttpRequestBuilder,l=t.io.ktor.client.statement.HttpStatement,p=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,u=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,d=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,h=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,E=Error;function _(t){return n}return i((function(){var i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,c=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,l=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=e.getKClass,u=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;return function(t,h){return function(E){E.method=o.Companion.Post;var _=new r(t);if(null==_){E.body=i.NullBody;var m,f=l.JsType,y=p(r);t:do{try{m=s(a(r),[],!1)}catch(t){if(e.isType(t,d)){m=null;break t}throw t}}while(0);E.bodyType=u(f,y,m)}else if(e.isType(_,c))E.body=_,E.bodyType=null;else{E.body=_;var T,$=l.JsType,N=p(r);t:do{try{T=s(a(r),[],!1)}catch(t){if(e.isType(t,d)){T=null;break t}throw t}}while(0);E.bodyType=u($,N,T)}return h(E),n}}})),function(t,n,i,m){void 0===i&&(i=_);var f=new c;f.method=o.Companion.Post;var y=new r(n);if(null==y){f.body=p.NullBody;var T,$=d.JsType,N=a(r);t:do{try{T=s(a(r),[],!1)}catch(t){if(e.isType(t,E)){T=null;break t}throw t}}while(0);f.bodyType=h($,N,T)}else if(e.isType(y,u))f.body=y,f.bodyType=null;else{f.body=y;var g,R=d.JsType,C=a(r);t:do{try{g=s(a(r),[],!1)}catch(t){if(e.isType(t,E)){g=null;break t}throw t}}while(0);f.bodyType=h(R,C,g)}return i(f),e.suspendCall(new l(f,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.submitFormWithBinaryData_rrwb9t$",v((function(){var n=e.kotlin.Unit,i=e.wrapFunction,o=t.io.ktor.client.request.url_g8iu3v$,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.request.forms.MultiPartFormDataContent,s=e.getKClass,c=e.createKType,l=t.io.ktor.client.request.HttpRequestBuilder,p=t.io.ktor.client.statement.HttpStatement,u=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,d=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,h=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,E=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,_=Error;function m(t){return n}return i((function(){var i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,l=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=e.getKClass,u=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;return function(t,h){return function(E){E.method=r.Companion.Post;var _=new a(t);if(null==_){E.body=i.NullBody;var m,f=l.JsType,y=p(a);t:do{try{m=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){m=null;break t}throw t}}while(0);E.bodyType=u(f,y,m)}else if(e.isType(_,o))E.body=_,E.bodyType=null;else{E.body=_;var T,$=l.JsType,N=p(a);t:do{try{T=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){T=null;break t}throw t}}while(0);E.bodyType=u($,N,T)}return h(E),n}}})),function(t,n,i,f,y){void 0===f&&(f=m);var T=new l;T.method=r.Companion.Post;var $=new a(i);if(null==$){T.body=u.NullBody;var N,g=h.JsType,R=s(a);t:do{try{N=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){N=null;break t}throw t}}while(0);T.bodyType=E(g,R,N)}else if(e.isType($,d))T.body=$,T.bodyType=null;else{T.body=$;var C,S=h.JsType,I=s(a);t:do{try{C=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){C=null;break t}throw t}}while(0);T.bodyType=E(S,I,C)}return o(T,n),f(T),e.suspendCall(new p(T,t).execute(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.prepareForm_9i20zh$",v((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.Parameters,i=e.kotlin.Unit,o=e.wrapFunction,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.request.forms.FormDataContent,s=e.getKClass,c=e.createKType,l=t.io.ktor.client.request.HttpRequestBuilder,p=t.io.ktor.client.statement.HttpStatement,u=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,d=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,h=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,E=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,_=Error;function m(t){return i}return o((function(){var n=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,l=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=e.getKClass,u=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;return function(t,h,E){return function(_){if(t)_.method=r.Companion.Get,_.url.parameters.appendAll_hb0ubp$(h);else{_.method=r.Companion.Post;var m=new a(h);if(null==m){_.body=n.NullBody;var f,y=l.JsType,T=p(a);t:do{try{f=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){f=null;break t}throw t}}while(0);_.bodyType=u(y,T,f)}else if(e.isType(m,o))_.body=m,_.bodyType=null;else{_.body=m;var $,N=l.JsType,g=p(a);t:do{try{$=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){$=null;break t}throw t}}while(0);_.bodyType=u(N,g,$)}}return E(_),i}}})),function(t,i,o,f,y){void 0===i&&(i=n.Companion.Empty),void 0===o&&(o=!1),void 0===f&&(f=m);var T=new l;if(o)T.method=r.Companion.Get,T.url.parameters.appendAll_hb0ubp$(i);else{T.method=r.Companion.Post;var $=new a(i);if(null==$){T.body=u.NullBody;var N,g=h.JsType,R=s(a);t:do{try{N=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){N=null;break t}throw t}}while(0);T.bodyType=E(g,R,N)}else if(e.isType($,d))T.body=$,T.bodyType=null;else{T.body=$;var C,S=h.JsType,I=s(a);t:do{try{C=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){C=null;break t}throw t}}while(0);T.bodyType=E(S,I,C)}}return f(T),e.setCoroutineResult(new p(T,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.prepareFormWithBinaryData_ln1qgv$",v((function(){var n=e.kotlin.Unit,i=e.wrapFunction,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,r=t.io.ktor.client.request.forms.MultiPartFormDataContent,a=e.getKClass,s=e.createKType,c=t.io.ktor.client.request.HttpRequestBuilder,l=t.io.ktor.client.statement.HttpStatement,p=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,u=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,d=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,h=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,E=Error;function _(t){return n}return i((function(){var i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,c=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,l=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=e.getKClass,u=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;return function(t,h){return function(E){E.method=o.Companion.Post;var _=new r(t);if(null==_){E.body=i.NullBody;var m,f=l.JsType,y=p(r);t:do{try{m=s(a(r),[],!1)}catch(t){if(e.isType(t,d)){m=null;break t}throw t}}while(0);E.bodyType=u(f,y,m)}else if(e.isType(_,c))E.body=_,E.bodyType=null;else{E.body=_;var T,$=l.JsType,N=p(r);t:do{try{T=s(a(r),[],!1)}catch(t){if(e.isType(t,d)){T=null;break t}throw t}}while(0);E.bodyType=u($,N,T)}return h(E),n}}})),function(t,n,i,m){void 0===i&&(i=_);var f=new c;f.method=o.Companion.Post;var y=new r(n);if(null==y){f.body=p.NullBody;var T,$=d.JsType,N=a(r);t:do{try{T=s(a(r),[],!1)}catch(t){if(e.isType(t,E)){T=null;break t}throw t}}while(0);f.bodyType=h($,N,T)}else if(e.isType(y,u))f.body=y,f.bodyType=null;else{f.body=y;var g,R=d.JsType,C=a(r);t:do{try{g=s(a(r),[],!1)}catch(t){if(e.isType(t,E)){g=null;break t}throw t}}while(0);f.bodyType=h(R,C,g)}return i(f),e.setCoroutineResult(new l(f,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.prepareFormWithBinaryData_rrwb9t$",v((function(){var n=e.kotlin.Unit,i=e.wrapFunction,o=t.io.ktor.client.request.url_g8iu3v$,r=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,a=t.io.ktor.client.request.forms.MultiPartFormDataContent,s=e.getKClass,c=e.createKType,l=t.io.ktor.client.request.HttpRequestBuilder,p=t.io.ktor.client.statement.HttpStatement,u=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,d=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,h=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,E=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,_=Error;function m(t){return n}function f(t,e){return function(i){return o(i,t),e(i),n}}return i((function(){var i=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,o=t.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,l=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=e.getKClass,u=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;return function(t,h){return function(E){E.method=r.Companion.Post;var _=new a(t);if(null==_){E.body=i.NullBody;var m,f=l.JsType,y=p(a);t:do{try{m=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){m=null;break t}throw t}}while(0);E.bodyType=u(f,y,m)}else if(e.isType(_,o))E.body=_,E.bodyType=null;else{E.body=_;var T,$=l.JsType,N=p(a);t:do{try{T=c(s(a),[],!1)}catch(t){if(e.isType(t,d)){T=null;break t}throw t}}while(0);E.bodyType=u($,N,T)}return h(E),n}}})),function(t,n,i,o,y){void 0===o&&(o=m);var T=new l;T.method=r.Companion.Post;var $=new a(i);if(null==$){T.body=u.NullBody;var N,g=h.JsType,R=s(a);t:do{try{N=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){N=null;break t}throw t}}while(0);T.bodyType=E(g,R,N)}else if(e.isType($,d))T.body=$,T.bodyType=null;else{T.body=$;var C,S=h.JsType,I=s(a);t:do{try{C=c(s(a),[],!1)}catch(t){if(e.isType(t,_)){C=null;break t}throw t}}while(0);T.bodyType=E(S,I,C)}return f(n,o)(T),e.setCoroutineResult(new p(T,t),e.coroutineReceiver()),e.coroutineResult(e.coroutineReceiver())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.receive_n40086$",v((function(){var t=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n,i,o){throw t("Use `body` method instead".toString())}}))),b("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.receive_wkua8a$",v((function(){var t=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n,i,o,r){throw t("Use `body` method instead".toString())}}))),Qn.prototype.toString=function(){return"HttpResponse["+Zn(this).url+", "+this.status+"]"},Qn.$metadata$={kind:R,simpleName:"HttpResponse",interfaces:[C,Zt]},ni.$metadata$={kind:P,simpleName:"Phases",interfaces:[]};var ii=null;function oi(){return null===ii&&new ni,ii}function ri(t,e){this.expectedType=t,this.response=e}function ai(t,e){this.builder_0=t,this.client=e,this.checkCapabilities_0()}function si(t,e,n){m.call(this,n),this.exceptionState_0=10,this.$this=t,this.local$response=void 0,this.local$block=e}function ci(t,e){m.call(this,e),this.exceptionState_0=1,this.local$it=t}function li(t,e,n){var i=new ci(t,e);return n?i:i.doResume(null)}function pi(t,e,n,i){m.call(this,i),this.exceptionState_0=8,this.$this=t,this.local$tmp$=void 0,this.local$response=void 0,this.local$T_0=e,this.local$isT=n}function ui(t,e,n,i,o){m.call(this,o),this.exceptionState_0=11,this.$this=t,this.local$response=void 0,this.local$T_0=e,this.local$isT=n,this.local$block=i}function di(t,e){m.call(this,e),this.exceptionState_0=4,this.$this=t}function hi(t,e,n){m.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$$receiver=e}function Ei(){_i=this,Y.call(this),this.contentLength_89rfwp$_0=Ut}ri.$metadata$={kind:R,simpleName:"HttpResponseContainer",interfaces:[]},ri.prototype.component1=function(){return this.expectedType},ri.prototype.component2=function(){return this.response},ri.prototype.copy_487ue8$=function(t,e){return new ri(void 0===t?this.expectedType:t,void 0===e?this.response:e)},ri.prototype.toString=function(){return"HttpResponseContainer(expectedType="+e.toString(this.expectedType)+", response="+e.toString(this.response)+")"},ri.prototype.hashCode=function(){var t=0;return t=31*(t=31*t+e.hashCode(this.expectedType)|0)+e.hashCode(this.response)|0},ri.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.expectedType,t.expectedType)&&e.equals(this.response,t.response)},si.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},si.prototype=Object.create(m.prototype),si.prototype.constructor=si,si.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=8,this.state_0=1,this.result_0=this.$this.executeUnsafe(this),this.result_0===_)return _;continue;case 1:if(this.local$response=this.result_0,this.exceptionState_0=5,this.state_0=2,this.result_0=this.local$block(this.local$response,this),this.result_0===_)return _;continue;case 2:this.exceptionState_0=10,this.finallyPath_0=[3],this.state_0=6,this.$returnValue=this.result_0;continue;case 3:return this.$returnValue;case 4:this.exceptionState_0=10,this.state_0=9;continue;case 5:this.finallyPath_0=[8],this.state_0=6;continue;case 6:if(this.exceptionState_0=8,this.state_0=7,this.result_0=this.$this.cleanup_abn2de$(this.local$response,this),this.result_0===_)return _;continue;case 7:this.state_0=this.finallyPath_0.shift();continue;case 8:this.exceptionState_0=10;var t=this.exception_0;throw e.isType(t,Ct),t;case 9:return;case 10:throw this.exception_0;default:throw this.state_0=10,new Error("State Machine Unreachable execution")}}catch(t){if(10===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ai.prototype.execute_2rh6on$=function(t,e,n){var i=new si(this,t,e);return n?i:i.doResume(null)},ci.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},ci.prototype=Object.create(m.prototype),ci.prototype.constructor=ci,ci.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=je(this.local$it.call,this),this.result_0===_)return _;continue;case 1:throw this.exception_0;case 2:return this.result_0.response;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ai.prototype.execute=function(t){return this.execute_2rh6on$(li,t)},pi.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},pi.prototype=Object.create(m.prototype),pi.prototype.constructor=pi,pi.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=6,this.state_0=1,this.result_0=this.$this.executeUnsafe(this),this.result_0===_)return _;continue;case 1:var t;this.local$response=this.result_0,this.exceptionState_0=4;var n,i=this.local$response.call,o=X.JsType,r=B(this.local$T_0);t:do{try{n=W(this.local$T_0)}catch(t){if(e.isType(t,g)){n=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=i.bodyNullable_qi9ur9$(q(o,r,n),this),this.result_0===_)return _;continue;case 2:this.result_0=this.local$isT(t=this.result_0)?t:f(),this.local$tmp$=this.result_0,this.exceptionState_0=6,this.finallyPath_0=[3],this.state_0=5;continue;case 3:return this.local$tmp$;case 4:this.finallyPath_0=[6],this.state_0=5;continue;case 5:this.exceptionState_0=6,ti(this.local$response),this.state_0=this.finallyPath_0.shift();continue;case 6:this.exceptionState_0=8;var a=this.exception_0;throw e.isType(a,Ct),a;case 7:return;case 8:throw this.exception_0;default:throw this.state_0=8,new Error("State Machine Unreachable execution")}}catch(t){if(8===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ai.prototype.body_287e2$=function(t,e,n,i){var o=new pi(this,t,e,n);return i?o:o.doResume(null)},b("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.HttpStatement.body_287e2$",v((function(){var n=e.getReifiedTypeParameterKType,i=t.io.ktor.client.statement.complete_abn2de$,o=e.wrapFunction,r=t.io.ktor.client.utils.unwrapCancellationException_dbl4o4$,a=e.kotlin.coroutines.cancellation.CancellationException,s=e.throwCCE,c=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=e.getKClass,p=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,u=Error;return o((function(){var o=e.throwCCE,r=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,a=e.getKClass,s=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(t,l,p,u){return function(){var d;l.executeUnsafe(t);var h=t.$$coroutineResult$$;try{var E,_,m=p,f=u,y=h.call,T=r.JsType,$=a(m);t:do{try{_=n(p)}catch(t){if(e.isType(t,c)){_=null;break t}throw t}}while(0);y.bodyNullable_qi9ur9$(s(T,$,_),$this$),$this$.$$coroutineResult$$=f(E=$this$.$$coroutineResult$$)?E:o(),d=t.$$coroutineResult$$}finally{i(h)}return d}}})),function(t,o,d){try{var h;e.suspendCall(this.executeUnsafe(e.coroutineReceiver()));var E=e.coroutineResult(e.coroutineReceiver());try{var _,m,f=E.call,y=c.JsType,T=l(t);t:do{try{m=n(t)}catch(t){if(e.isType(t,u)){m=null;break t}throw t}}while(0);e.suspendCall(f.bodyNullable_qi9ur9$(p(y,T,m),e.coroutineReceiver())),e.setCoroutineResult(o(_=e.coroutineResult(e.coroutineReceiver()))?_:s(),e.coroutineReceiver()),h=e.coroutineResult(e.coroutineReceiver())}finally{i(E)}return h}catch(t){throw e.isType(t,a)?r(t):t}}}))),ui.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},ui.prototype=Object.create(m.prototype),ui.prototype.constructor=ui,ui.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=9,this.state_0=1,this.result_0=this.$this.executeUnsafe(this),this.result_0===_)return _;continue;case 1:var t;this.local$response=this.result_0,this.exceptionState_0=6;var n,i=this.local$response.call,o=X.JsType,r=B(this.local$T_0);t:do{try{n=W(this.local$T_0)}catch(t){if(e.isType(t,g)){n=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=i.bodyNullable_qi9ur9$(q(o,r,n),this),this.result_0===_)return _;continue;case 2:this.result_0=this.local$isT(t=this.result_0)?t:f();var a=this.result_0;if(this.state_0=3,this.result_0=this.local$block(a,this),this.result_0===_)return _;continue;case 3:this.exceptionState_0=11,this.finallyPath_0=[4],this.state_0=7,this.$returnValue=this.result_0;continue;case 4:return this.$returnValue;case 5:this.exceptionState_0=11,this.state_0=10;continue;case 6:this.finallyPath_0=[9],this.state_0=7;continue;case 7:if(this.exceptionState_0=9,this.state_0=8,this.result_0=this.$this.cleanup_abn2de$(this.local$response,this),this.result_0===_)return _;continue;case 8:this.state_0=this.finallyPath_0.shift();continue;case 9:this.exceptionState_0=11;var s=this.exception_0;throw e.isType(s,Ct),s;case 10:return;case 11:throw this.exception_0;default:throw this.state_0=11,new Error("State Machine Unreachable execution")}}catch(t){if(11===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ai.prototype.body_yswr0a$=function(t,e,n,i,o){var r=new ui(this,t,e,n,i);return o?r:r.doResume(null)},b("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.HttpStatement.body_yswr0a$",v((function(){var n=e.getReifiedTypeParameterKType,i=e.wrapFunction,o=t.io.ktor.client.utils.unwrapCancellationException_dbl4o4$,r=e.kotlin.coroutines.cancellation.CancellationException,a=e.throwCCE,s=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,c=e.getKClass,l=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,p=Error;return i((function(){var i=e.throwCCE,o=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,r=e.getKClass,a=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,s=Error;return function(t,c,l,p,u){return function(){c.executeUnsafe(t);var d=t.$$coroutineResult$$;try{var h,E,_=l,m=p,f=d.call,y=o.JsType,T=r(_);t:do{try{E=n(l)}catch(t){if(e.isType(t,s)){E=null;break t}throw t}}while(0);f.bodyNullable_qi9ur9$(a(y,T,E),$this$),$this$.$$coroutineResult$$=m(h=$this$.$$coroutineResult$$)?h:i();var $=t.$$coroutineResult$$;return u($,t),t.$$coroutineResult$$}finally{c.cleanup_abn2de$(d,t)}}}})),function(t,i,u,d){try{e.suspendCall(this.executeUnsafe(e.coroutineReceiver()));var h=e.coroutineResult(e.coroutineReceiver());try{var E,_,m=h.call,f=s.JsType,y=c(t);t:do{try{_=n(t)}catch(t){if(e.isType(t,p)){_=null;break t}throw t}}while(0);e.suspendCall(m.bodyNullable_qi9ur9$(l(f,y,_),e.coroutineReceiver())),e.setCoroutineResult(i(E=e.coroutineResult(e.coroutineReceiver()))?E:a(),e.coroutineReceiver());var T=e.coroutineResult(e.coroutineReceiver());return e.suspendCall(u(T,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}finally{e.suspendCall(this.cleanup_abn2de$(h,e.coroutineReceiver()))}}catch(t){throw e.isType(t,r)?o(t):t}}}))),di.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},di.prototype=Object.create(m.prototype),di.prototype.constructor=di,di.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.exceptionState_0=2;var t=(new Un).takeFromWithExecutionContext_s9rlw$(this.$this.builder_0);if(this.state_0=1,this.result_0=this.$this.client.execute_jc2hdt$(t,this),this.result_0===_)return _;continue;case 1:return this.result_0.response;case 2:this.exceptionState_0=4;var n=this.exception_0;throw e.isType(n,Ct),n;case 3:return;case 4:throw this.exception_0;default:throw this.state_0=4,new Error("State Machine Unreachable execution")}}catch(t){if(4===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ai.prototype.executeUnsafe=function(t,e){var n=new di(this,t);return e?n:n.doResume(null)},hi.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[m]},hi.prototype=Object.create(m.prototype),hi.prototype.constructor=hi,hi.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t,n=e.isType(t=E(this.local$$receiver.coroutineContext.get_j3r2sn$(h.Key)),rt)?t:f();n.complete();try{Nt(this.local$$receiver.content)}catch(t){if(!e.isType(t,g))throw t}if(this.state_0=2,this.result_0=n.join(this),this.result_0===_)return _;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ai.prototype.cleanup_abn2de$=function(t,e,n){var i=new hi(this,t,e);return n?i:i.doResume(null)},ai.prototype.checkCapabilities_0=function(){var t,n,i,o,r;if(null!=(n=null!=(t=this.builder_0.attributes.getOrNull_yzaw86$(ve))?t.keys:null)){var a,s=ot();for(a=n.iterator();a.hasNext();){var c=a.next();e.isType(c,We)&&s.add_11rb$(c)}o=s}else o=null;if(null!=(i=o))for(r=i.iterator();r.hasNext();){var l=r.next();if(null==Be(this.client,l))throw K(("Consider installing "+l+" plugin because the request requires it to be installed").toString())}},ai.prototype.toString=function(){return"HttpStatement["+this.builder_0.url.buildString()+"]"},ai.$metadata$={kind:R,simpleName:"HttpStatement",interfaces:[]},Object.defineProperty(Ei.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_89rfwp$_0}}),Ei.prototype.toString=function(){return"EmptyContent"},Ei.$metadata$={kind:P,simpleName:"EmptyContent",interfaces:[Y]};var _i=null;function mi(){return null===_i&&new Ei,_i}function fi(t,e){var n;this.coroutineContext_rv3h91$_0=t,this.websocket_0=e,this._closeReason_0=Yt(),this._incoming_0=Ce(2147483647),this._outgoing_0=Ce(2147483647),this.incoming_z0xtng$_0=this._incoming_0,this.outgoing_j2o89i$_0=this._outgoing_0,this.closeReason_qo69t6$_0=this._closeReason_0,this.websocket_0.binaryType="arraybuffer",this.websocket_0.addEventListener("message",JsWebSocketSession_init$lambda(this)),this.websocket_0.addEventListener("error",JsWebSocketSession_init$lambda_0(this)),this.websocket_0.addEventListener("close",JsWebSocketSession_init$lambda_1(this)),kt(this,void 0,void 0,JsWebSocketSession_init$lambda_2(this)),null!=(n=this.coroutineContext.get_j3r2sn$(h.Key))&&n.invokeOnCompletion_f05bi3$(JsWebSocketSession_init$lambda_3(this))}function yi(t){return t}var Ti=t.io||(t.io={}),$i=Ti.ktor||(Ti.ktor={}),Ni=$i.client||($i.client={}),gi=Ni.call||(Ni.call={});Object.defineProperty(Se,"Companion",{get:De}),gi.HttpClientCall=Se,u["ktor-ktor-utils-js-legacy"]=i,gi.DoubleReceiveException=Ae,gi.NoTransformationFoundException=ke,gi.SavedHttpCall=xe,gi.SavedHttpRequest=we,gi.SavedHttpResponse=ze,gi.save_iicrl5$=je;var Ri=Ni.engine||(Ni.engine={});Ri.HttpClientEngineCapability=Fe,Ri.KtorCallContextElement=Me,u["kotlinx-coroutines-core"]=n;var Ci=Ni.plugins||(Ni.plugins={});Ci.HttpClientPlugin=We,Ci.pluginOrNull_dd3wyz$=Be,Object.defineProperty(He,"Companion",{get:Je}),qe.HttpTimeoutCapabilityConfiguration_init_oq4a4q$=Ye,qe.HttpTimeoutCapabilityConfiguration=He,Object.defineProperty(qe,"Plugin",{get:sn}),Ci.HttpTimeout=qe,Ci.HttpRequestTimeoutException_init_s9rlw$=ln,Ci.HttpRequestTimeoutException=cn;var Si=Ni.utils||(Ni.utils={});Si.unwrapCancellationException_dbl4o4$=yi,u["ktor-ktor-http-js-legacy"]=s;var Ii=Ci.websocket||(Ci.websocket={});Ii.ClientWebSocketSession=pn,Ii.DefaultClientWebSocketSession=un,Ii.DelegatingClientWebSocketSession=dn,Ii.get_converter_vw5opa$=function(t){var e;return null!=(e=Be(t.call.client,In()))?e.contentConverter:null},u["ktor-ktor-serialization-js-legacy"]=l,u["ktor-ktor-websocket-serialization-js-legacy"]=p,Ii.WebSocketContent=hn,Object.defineProperty(Ii,"WebSocketCapability",{get:mn}),Object.defineProperty(Ii,"WebSocketExtensionsCapability",{get:Tn}),$n.Config=Nn,Object.defineProperty($n,"Plugin",{get:In}),Ii.WebSockets=$n;var Li=Ni.request||(Ni.request={});Li.ClientUpgradeContent=Ln,Li.HttpRequest=On,Object.defineProperty(Un,"Companion",{get:Pn}),Li.HttpRequestBuilder=Un,Li.HttpRequestData=xn,Li.url_g8iu3v$=function(t,e){Et(t.url,e)},Object.defineProperty(wn,"Phases",{get:Mn}),Li.HttpRequestPipeline=wn,Li.url_qpqkqe$=function(t,e){ne(t.url,e)},u["ktor-ktor-io-js-legacy"]=o;var bi=Li.forms||(Li.forms={});bi.FormDataContent=Wn,bi.MultiPartFormDataContent=Xn,Li.header_rpxout$=Yn,Li.parameter_xadl6p$=function(t,e,n){null!=n&&t.url.parameters.append_puj7f4$(e,n.toString())};var vi,Oi,Ui=Ni.statement||(Ni.statement={});Ui.HttpResponse=Qn,Ui.get_request_abn2de$=Zn,Ui.complete_abn2de$=ti,Object.defineProperty(ei,"Phases",{get:oi}),Ui.HttpResponsePipeline=ei,Ui.HttpResponseContainer=ri,Ui.HttpStatement=ai,Object.defineProperty(Si,"EmptyContent",{get:mi}),Ii.JsWebSocketSession=fi,Me.prototype.fold_3cc69b$=lt.prototype.fold_3cc69b$,Me.prototype.get_j3r2sn$=lt.prototype.get_j3r2sn$,Me.prototype.minusKey_yeqjby$=lt.prototype.minusKey_yeqjby$,Me.prototype.plus_1fupul$=lt.prototype.plus_1fupul$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,Object.defineProperty(function(t){this.closure$builder=t,this.method_wo5b7y$_0=t.method,this.url_okq4sy$_0=t.url.build(),this.attributes_qewzi4$_0=t.attributes,this.headers_th47hh$_0=t.headers.build()}.prototype,"coroutineContext",Object.getOwnPropertyDescriptor(On.prototype,"coroutineContext")),We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,Qe.prototype.prepare_oh3mgy$=We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,We.prototype.prepare_oh3mgy$,pn.prototype.send_q1ubw4$=jt.prototype.send_q1ubw4$,un.prototype.start_wwqcjq$=Ft.prototype.start_wwqcjq$,gn.prototype.prepare_oh3mgy$=We.prototype.prepare_oh3mgy$,fi.prototype.send_q1ubw4$=Ft.prototype.send_q1ubw4$,fi.prototype.start_wwqcjq$=Ft.prototype.start_wwqcjq$,new Z("call-context"),new y("client-config"),ve=new y("EngineCapabilities"),st(sn()),ct([nt.HttpHeaders.Date,nt.HttpHeaders.Expires,nt.HttpHeaders.LastModified,nt.HttpHeaders.IfModifiedSince,nt.HttpHeaders.IfUnmodifiedSince]),new y("UploadProgressListenerAttributeKey"),new y("DownloadProgressListenerAttributeKey"),new y("ValidateMark"),new y("ExpectSuccessAttributeKey"),Oe=new y("ApplicationPluginRegistry"),ct([bt.Companion.Get,bt.Companion.Head]),new y("MaxRetriesPerRequestAttributeKey"),new y("ShouldRetryPerRequestAttributeKey"),new y("ShouldRetryOnExceptionPerRequestAttributeKey"),new y("ModifyRequestPerRequestAttributeKey"),new y("RetryDelayPerRequestAttributeKey"),on="13",rn=new y("Websocket extensions"),Gn=new y("BodyTypeAttributeKey");t:do{if(null!=(vi=St.Charsets.UTF_8)&&vi.equals(St.Charsets.UTF_8)){Oi=fe("\r\n");break t}Oi=ye(vi.newEncoder(),"\r\n",0,"\r\n".length)}while(0);return jn=Oi,new vt,new vt,new vt,new vt,new vt,t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0),n(1),n(4)],void 0===(r="function"==typeof(i=function(t,e,n,i){"use strict";var o=t.$$importsForInline$$||(t.$$importsForInline$$={}),r=(n.kotlinx.coroutines.internal.LinkedListHead,e.equals,e.kotlin.Unit,e.throwCCE,e.kotlin.addSuppressed_oh0dqn$,Error,n.kotlinx.coroutines.internal.LinkedListNode,e.Kind.CLASS);function a(){}n.kotlinx.coroutines.DisposableHandle,a.$metadata$={kind:r,simpleName:"EventDefinition",interfaces:[]},o["kotlinx-coroutines-core"]=n;var s=t.io||(t.io={}),c=s.ktor||(s.ktor={});return(c.events||(c.events={})).EventDefinition=a,t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0),n(1),n(3),n(4),n(2)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a,s,c,l,p,u,d,h,E,_,m,f,y=t.$$importsForInline$$||(t.$$importsForInline$$={}),T=e.Kind.OBJECT,$=e.kotlin.Enum,N=e.Kind.CLASS,g=e.throwISE,R=e.kotlin.collections.mapCapacity_za3lpa$,C=e.kotlin.ranges.coerceAtLeast_dqglrj$,S=e.kotlin.collections.LinkedHashMap_init_bwtc7$,I=e.kotlin.collections.emptyList_287e2$,L=e.Kind.INTERFACE,b=e.Long.NEG_ONE,v=e.Long.fromInt(15e3),O=n.kotlinx.coroutines.CoroutineName,U=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,D=e.kotlin.coroutines.CoroutineImpl,A=n.kotlinx.coroutines.cancel_q2ti5d$,k=n.kotlinx.coroutines,P=e.kotlin.Unit,x=i.io.ktor.utils.io.core.BytePacketBuilder,w=e.ensureNotNull,z=i.io.ktor.utils.io.core.writeFully_i6snlg$,G=i.io.ktor.utils.io.core.readBytes_xc9h3n$,j=n.kotlinx.coroutines.channels.ClosedSendChannelException,F=Error,M=n.kotlinx.coroutines.launch_s496o7$,W=n.kotlinx.coroutines.CoroutineStart,X=n.kotlinx.coroutines.channels.ClosedReceiveChannelException,B=e.kotlin.coroutines.cancellation.CancellationException,q=o.io.ktor.util.cio.ChannelIOException,H=e.kotlin.coroutines.cancellation.CancellationException_init_wspj0f$,V=e.Long.ZERO,K=r.kotlinx.atomicfu.atomic$ref$1,J=n.kotlinx.coroutines.CompletableDeferred_xptg6w$,Y=n.kotlinx.coroutines.channels.Channel_lsve6m$,Q=r.kotlinx.atomicfu.atomic$boolean$1,Z=n.kotlinx.coroutines.Job,tt=n.kotlinx.coroutines.Job_5dx9e$,et=e.kotlin.IllegalArgumentException_init_pdl1vj$,nt=e.kotlin.collections.ArrayList_init_287e2$,it=e.kotlin.IllegalStateException_init_pdl1vj$,ot=n.kotlinx.coroutines.channels.cancelConsumed_v57n85$,rt=i.io.ktor.utils.io.charsets,at=(i.io.ktor.utils.io.charsets.decode_lb8wo3$,i.io.ktor.utils.io.core.readShort_7wsnj1$),st=n.kotlinx.coroutines.DisposableHandle,ct=o.io.ktor.util.internal.initCauseBridge_oh0dqn$,lt=e.kotlin.Exception_init,pt=e.kotlin.Exception,ut=n.kotlinx.coroutines.CopyableThrowable,dt=e.kotlin.collections.get_lastIndex_m7z4lg$,ht=Array,Et=o.io.ktor.util.date.getTimeMillis,_t=e.kotlin.random.Random_s8cxhz$,mt=n.kotlinx.coroutines.withTimeoutOrNull_ms3uf5$,ft=o.io.ktor.util.hex_fqrh44$,yt=i.io.ktor.utils.io.core.String_xge8xe$,Tt=e.equals,$t=e.kotlin.text.encodeToByteArray_pdl1vz$,Nt=i.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$,gt=e.Long.fromInt(2147483647),Rt=(i.io.ktor.utils.io.close_x5qia6$,i.io.ktor.utils.io.errors.EOFException,e.toByte,e.toShort,e.kotlin.random.Random,e.Long.fromInt(65535),i.io.ktor.utils.io.bits,e.defineInlineFunction,e.wrapFunction,e.kotlin.collections.collectionSizeOrDefault_ba2ldo$),Ct=e.kotlin.collections.ArrayList_init_ww73n8$,St=e.kotlin.collections.asSequence_7wnvza$,It=e.kotlin.text.indexOf_8eortd$,Lt=e.kotlin.to_ujzrz7$,bt=e.kotlin.ranges.until_dqglrj$,vt=e.kotlin.text.substring_fc3b62$,Ot=e.kotlin.sequences.map_z5avom$,Ut=e.kotlin.collections.joinToString_fmv235$,Dt=e.kotlin.text.split_ip8yn$,At=e.kotlin.collections.first_2p1efm$,kt=e.kotlin.collections.drop_ba2ldo$,Pt=e.throwCCE,xt=e.kotlin.text.trim_gw00vp$,wt=n.kotlinx.coroutines.CoroutineScope,zt=i.io.ktor.utils.io.core.writeShort_9kfkzl$,Gt=i.io.ktor.utils.io.core.writeText_t153jy$;function jt(t,e){this.code=t,this.message=e}function Ft(t,e,n){$.call(this),this.code=n,this.name$=t,this.ordinal$=e}function Mt(){Mt=function(){},a=new Ft("NORMAL",0,1e3),s=new Ft("GOING_AWAY",1,1001),c=new Ft("PROTOCOL_ERROR",2,1002),l=new Ft("CANNOT_ACCEPT",3,1003),p=new Ft("CLOSED_ABNORMALLY",4,1006),u=new Ft("NOT_CONSISTENT",5,1007),d=new Ft("VIOLATED_POLICY",6,1008),h=new Ft("TOO_BIG",7,1009),E=new Ft("NO_EXTENSION",8,1010),_=new Ft("INTERNAL_ERROR",9,1011),m=new Ft("SERVICE_RESTART",10,1012),f=new Ft("TRY_AGAIN_LATER",11,1013),ae()}function Wt(){return Mt(),a}function Xt(){return Mt(),s}function Bt(){return Mt(),c}function qt(){return Mt(),l}function Ht(){return Mt(),p}function Vt(){return Mt(),u}function Kt(){return Mt(),d}function Jt(){return Mt(),h}function Yt(){return Mt(),E}function Qt(){return Mt(),_}function Zt(){return Mt(),m}function te(){return Mt(),f}function ee(){re=this;var t,e=se(),n=C(R(e.length),16),i=S(n);for(t=0;t!==e.length;++t){var o=e[t];i.put_xwzc9p$(o.code,o)}this.byCodeMap_0=i,this.UNEXPECTED_CONDITION=Qt()}Ft.prototype=Object.create($.prototype),Ft.prototype.constructor=Ft,Oe.prototype=Object.create(pt.prototype),Oe.prototype.constructor=Oe,Ue.prototype=Object.create($.prototype),Ue.prototype.constructor=Ue,un.prototype=Object.create(pn.prototype),un.prototype.constructor=un,hn.prototype=Object.create(pn.prototype),hn.prototype.constructor=hn,_n.prototype=Object.create(pn.prototype),_n.prototype.constructor=_n,yn.prototype=Object.create(pn.prototype),yn.prototype.constructor=yn,Tn.prototype=Object.create(pn.prototype),Tn.prototype.constructor=Tn,Object.defineProperty(jt.prototype,"knownReason",{configurable:!0,get:function(){return ae().byCode_mq22fl$(this.code)}}),jt.prototype.toString=function(){var t;return"CloseReason(reason="+(null!=(t=this.knownReason)?t:this.code).toString()+", message="+this.message+")"},ee.prototype.byCode_mq22fl$=function(t){return this.byCodeMap_0.get_11rb$(t)},ee.$metadata$={kind:T,simpleName:"Companion",interfaces:[]};var ne,ie,oe,re=null;function ae(){return Mt(),null===re&&new ee,re}function se(){return[Wt(),Xt(),Bt(),qt(),Ht(),Vt(),Kt(),Jt(),Yt(),Qt(),Zt(),te()]}function ce(t,e,n){return n=n||Object.create(jt.prototype),jt.call(n,t.code,e),n}function le(){}function pe(t,e,n){$e(),this.raw_0=t,this.pinger_0=K(null),this.closeReasonRef_0=J(),this.filtered_0=Y(8),this.outgoingToBeProcessed_0=Y(8),this.closed_0=Q(!1),this.context_0=tt(this.raw_0.coroutineContext.get_j3r2sn$(Z.Key)),this._extensions_0=nt(),this.started_0=Q(!1),this.coroutineContext_e1jcv0$_0=this.raw_0.coroutineContext.plus_1fupul$(this.context_0).plus_1fupul$(new O("ws-default")),this.pingIntervalMillis_3oq8ke$_0=e,this.timeoutMillis_jqpwcu$_0=n,this.closeReason_rkke7x$_0=this.closeReasonRef_0}function ue(t,e,n){D.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$message=e}function de(t,e){D.call(this,e),this.exceptionState_0=1,this.$this=t}function he(t,e,n,i,o){D.call(this,o),this.$controller=i,this.exceptionState_0=32,this.local$this$DefaultWebSocketSessionImpl=t,this.local$closure$ponger=e,this.local$last=void 0,this.local$closeFramePresented=void 0,this.local$$receiver=void 0,this.local$cause=void 0,this.local$tmp$=void 0,this.local$e=void 0,this.local$this$DefaultWebSocketSessionImpl_0=void 0,this.local$closure$ponger_0=void 0}function Ee(t,e,n,i){D.call(this,i),this.$controller=n,this.exceptionState_0=18,this.local$this$DefaultWebSocketSessionImpl=t}function _e(t,e){D.call(this,e),this.exceptionState_0=1,this.$this=t,this.local$tmp$=void 0,this.local$tmp$_0=void 0}function me(t,e,n){D.call(this,n),this.exceptionState_0=7,this.$this=t,this.local$reasonToSend=void 0,this.local$reason=e}function fe(t,e,n,i){D.call(this,i),this.exceptionState_0=1,this.$this=t,this.local$size=void 0,this.local$packet=e,this.local$frame=n}function ye(){Te=this,this.EmptyPong_0=new Tn(new Int8Array(0),ve())}Ft.$metadata$={kind:N,simpleName:"Codes",interfaces:[$]},Ft.values=se,Ft.valueOf_61zpoe$=function(t){switch(t){case"NORMAL":return Wt();case"GOING_AWAY":return Xt();case"PROTOCOL_ERROR":return Bt();case"CANNOT_ACCEPT":return qt();case"CLOSED_ABNORMALLY":return Ht();case"NOT_CONSISTENT":return Vt();case"VIOLATED_POLICY":return Kt();case"TOO_BIG":return Jt();case"NO_EXTENSION":return Yt();case"INTERNAL_ERROR":return Qt();case"SERVICE_RESTART":return Zt();case"TRY_AGAIN_LATER":return te();default:g("No enum constant io.ktor.websocket.CloseReason.Codes."+t)}},jt.$metadata$={kind:N,simpleName:"CloseReason",interfaces:[]},jt.prototype.component1=function(){return this.code},jt.prototype.component2=function(){return this.message},jt.prototype.copy_qid81t$=function(t,e){return new jt(void 0===t?this.code:t,void 0===e?this.message:e)},jt.prototype.hashCode=function(){var t=0;return t=31*(t=31*t+e.hashCode(this.code)|0)+e.hashCode(this.message)|0},jt.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.code,t.code)&&e.equals(this.message,t.message)},le.prototype.start_wwqcjq$=function(t,e){void 0===t&&(t=I()),e?e(t):this.start_wwqcjq$$default(t)},le.$metadata$={kind:L,simpleName:"DefaultWebSocketSession",interfaces:[on]},Object.defineProperty(pe.prototype,"incoming",{configurable:!0,get:function(){return this.filtered_0}}),Object.defineProperty(pe.prototype,"outgoing",{configurable:!0,get:function(){return this.outgoingToBeProcessed_0}}),Object.defineProperty(pe.prototype,"extensions",{configurable:!0,get:function(){return this._extensions_0}}),Object.defineProperty(pe.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_e1jcv0$_0}}),Object.defineProperty(pe.prototype,"masking",{configurable:!0,get:function(){return this.raw_0.masking},set:function(t){this.raw_0.masking=t}}),Object.defineProperty(pe.prototype,"maxFrameSize",{configurable:!0,get:function(){return this.raw_0.maxFrameSize},set:function(t){this.raw_0.maxFrameSize=t}}),Object.defineProperty(pe.prototype,"pingIntervalMillis",{configurable:!0,get:function(){return this.pingIntervalMillis_3oq8ke$_0},set:function(t){this.pingIntervalMillis_3oq8ke$_0=t,this.runOrCancelPinger_0()}}),Object.defineProperty(pe.prototype,"timeoutMillis",{configurable:!0,get:function(){return this.timeoutMillis_jqpwcu$_0},set:function(t){this.timeoutMillis_jqpwcu$_0=t,this.runOrCancelPinger_0()}}),Object.defineProperty(pe.prototype,"closeReason",{configurable:!0,get:function(){return this.closeReason_rkke7x$_0}}),pe.prototype.start_wwqcjq$$default=function(t){if(!this.started_0.atomicfu$compareAndSet(!1,!0))throw it("WebSocket session is already started.".toString());this._extensions_0.addAll_brywnq$(t),this.runOrCancelPinger_0(),this.runIncomingProcessor_0(Be(this,this.outgoing)),this.runOutgoingProcessor_0()},ue.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[D]},ue.prototype=Object.create(D.prototype),ue.prototype.constructor=ue,ue.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(void 0===this.local$message&&(this.local$message="Server is going down"),this.state_0=2,this.result_0=this.$this.sendCloseSequence_0(ce(Xt(),this.local$message),this),this.result_0===U)return U;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},pe.prototype.goingAway_61zpoe$=function(t,e,n){var i=new ue(this,t,e);return n?i:i.doResume(null)},de.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[D]},de.prototype=Object.create(D.prototype),de.prototype.constructor=de,de.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.raw_0.flush(this),this.result_0===U)return U;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},pe.prototype.flush=function(t,e){var n=new de(this,t);return e?n:n.doResume(null)},pe.prototype.terminate=function(){this.context_0.cancel_x5z25k$(),A(this.raw_0)},he.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[D]},he.prototype=Object.create(D.prototype),he.prototype.constructor=he,he.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;this.local$last={v:null},this.local$closeFramePresented={v:!1},this.exceptionState_0=2,this.local$$receiver=this.local$this$DefaultWebSocketSessionImpl.raw_0.incoming,this.local$cause=null,this.exceptionState_0=1,this.local$tmp$=this.local$$receiver.iterator(),this.state_0=11;continue;case 1:this.finallyPath_0=[2],this.exceptionState_0=26;var n=this.exception_0;throw e.isType(n,F)?(this.local$cause=n,n):n;case 2:this.finallyPath_0=[32],this.exceptionState_0=7;var i=this.exception_0;if(e.isType(i,j)){this.exceptionState_0=32,this.finallyPath_0=[5],this.state_0=7,this.$returnValue=P;continue}if(e.isType(i,F)){var o=i;this.local$closure$ponger.close_dbl4no$(),this.exceptionState_0=32,this.finallyPath_0=[3],this.state_0=7,this.$returnValue=this.local$this$DefaultWebSocketSessionImpl.filtered_0.close_dbl4no$(o);continue}throw i;case 3:return this.$returnValue;case 4:this.state_0=6;continue;case 5:return this.$returnValue;case 6:this.finallyPath_0=[31],this.state_0=7;continue;case 7:if(this.exceptionState_0=32,this.local$closure$ponger.close_dbl4no$(),null!=(t=this.local$last.v)&&t.release(),this.local$this$DefaultWebSocketSessionImpl.filtered_0.close_dbl4no$(),this.local$closeFramePresented.v){this.state_0=30;continue}if(this.state_0=29,this.result_0=sn(this.local$this$DefaultWebSocketSessionImpl,ce(Ht(),"Connection was closed without close frame"),this),this.result_0===U)return U;continue;case 8:return;case 9:this.state_0=10;continue;case 10:this.state_0=11;continue;case 11:if(this.state_0=12,this.result_0=this.local$tmp$.hasNext(this),this.result_0===U)return U;continue;case 12:if(this.result_0){this.state_0=13;continue}this.state_0=25;continue;case 13:this.local$e=this.local$tmp$.next(),this.local$this$DefaultWebSocketSessionImpl_0=this.local$this$DefaultWebSocketSessionImpl,this.local$closure$ponger_0=this.local$closure$ponger,this.state_0=14;continue;case 14:var r,a,s,c;if(e.isType(this.local$e,_n)){if(this.local$this$DefaultWebSocketSessionImpl_0.outgoing.isClosedForSend){this.state_0=24;continue}if(this.state_0=23,this.result_0=this.local$this$DefaultWebSocketSessionImpl_0.outgoing.send_11rb$(mn(null!=(r=Ne(this.local$e))?r:oe),this),this.result_0===U)return U;continue}if(e.isType(this.local$e,Tn)){if(null!=(a=this.local$this$DefaultWebSocketSessionImpl_0.pinger_0.kotlinx$atomicfu$value)){if(this.state_0=20,this.result_0=a.send_11rb$(this.local$e,this),this.result_0===U)return U;continue}this.result_0=null,this.state_0=21;continue}if(e.isType(this.local$e,yn)){if(this.state_0=18,this.result_0=this.local$closure$ponger_0.send_11rb$(this.local$e,this),this.result_0===U)return U;continue}if(this.state_0=15,this.result_0=this.local$this$DefaultWebSocketSessionImpl_0.checkMaxFrameSize_0(this.local$last.v,this.local$e,this),this.result_0===U)return U;continue;case 15:if(this.local$e.fin){this.state_0=16;continue}null==this.local$last.v&&(this.local$last.v=new x),z(w(this.local$last.v),this.local$e.data),this.state_0=10;continue;case 16:var l;null!=(s=this.local$last.v)?(z(s,this.local$e.data),l=gn().byType_da1xm4$(!0,this.local$e.frameType,G(s.build()),this.local$e.rsv1,this.local$e.rsv2,this.local$e.rsv3)):l=null;var p=null!=(c=l)?c:this.local$e;if(this.local$last.v=null,this.state_0=17,this.result_0=this.local$this$DefaultWebSocketSessionImpl_0.filtered_0.send_11rb$(this.local$this$DefaultWebSocketSessionImpl_0.processIncomingExtensions_0(p),this),this.result_0===U)return U;continue;case 17:case 18:this.state_0=19;continue;case 19:this.state_0=22;continue;case 20:this.result_0=P,this.state_0=21;continue;case 21:this.state_0=22;continue;case 22:this.state_0=9;continue;case 23:this.state_0=24;continue;case 24:this.local$closeFramePresented.v=!0,this.exceptionState_0=32,this.finallyPath_0=[7,8],this.state_0=26;continue;case 25:this.exceptionState_0=2,this.finallyPath_0=[27],this.state_0=26;continue;case 26:this.exceptionState_0=2,ot(this.local$$receiver,this.local$cause),this.state_0=this.finallyPath_0.shift();continue;case 27:this.result_0=P,this.exceptionState_0=32,this.finallyPath_0=[28],this.state_0=7,this.$returnValue=this.result_0;continue;case 28:return this.$returnValue;case 29:this.state_0=30;continue;case 30:this.state_0=this.finallyPath_0.shift();continue;case 31:return;case 32:throw this.exception_0;default:throw this.state_0=32,new Error("State Machine Unreachable execution")}}catch(t){if(32===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},pe.prototype.runIncomingProcessor_0=function(t){return M(this,ne.plus_1fupul$(k.Dispatchers.Unconfined),void 0,(e=this,n=t,function(t,i,o){var r=new he(e,n,t,this,i);return o?r:r.doResume(null)}));var e,n},Ee.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[D]},Ee.prototype=Object.create(D.prototype),Ee.prototype.constructor=Ee,Ee.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=3,this.state_0=1,this.result_0=this.local$this$DefaultWebSocketSessionImpl.outgoingProcessorLoop_0(this),this.result_0===U)return U;continue;case 1:this.exceptionState_0=18,this.finallyPath_0=[2],this.state_0=15,this.$returnValue=this.result_0;continue;case 2:return this.$returnValue;case 3:this.finallyPath_0=[18],this.exceptionState_0=15;var t=this.exception_0;if(e.isType(t,j)){this.exceptionState_0=18,this.finallyPath_0=[13],this.state_0=15,this.$returnValue=P;continue}if(e.isType(t,X)){this.exceptionState_0=18,this.finallyPath_0=[11],this.state_0=15,this.$returnValue=P;continue}if(e.isType(t,B)){this.exceptionState_0=18,this.finallyPath_0=[9],this.state_0=15,this.$returnValue=P;continue}if(e.isType(t,q)){this.exceptionState_0=18,this.finallyPath_0=[7],this.state_0=15,this.$returnValue=P;continue}if(e.isType(t,F)){var n=t;if(this.local$this$DefaultWebSocketSessionImpl.outgoingToBeProcessed_0.cancel_x5z25k$(H("Failed to send frame",n)),this.state_0=4,this.result_0=ln(this.local$this$DefaultWebSocketSessionImpl.raw_0,n,this),this.result_0===U)return U;continue}throw t;case 4:this.exceptionState_0=18,this.finallyPath_0=[5],this.state_0=15,this.$returnValue=this.result_0;continue;case 5:return this.$returnValue;case 6:this.state_0=8;continue;case 7:return this.$returnValue;case 8:this.state_0=10;continue;case 9:return this.$returnValue;case 10:this.state_0=12;continue;case 11:return this.$returnValue;case 12:this.state_0=14;continue;case 13:return this.$returnValue;case 14:this.finallyPath_0=[17],this.state_0=15;continue;case 15:if(this.exceptionState_0=18,this.local$this$DefaultWebSocketSessionImpl.outgoingToBeProcessed_0.cancel_x5z25k$(),this.state_0=16,this.result_0=sn(this.local$this$DefaultWebSocketSessionImpl.raw_0,void 0,this),this.result_0===U)return U;continue;case 16:this.state_0=this.finallyPath_0.shift();continue;case 17:return;case 18:throw this.exception_0;default:throw this.state_0=18,new Error("State Machine Unreachable execution")}}catch(t){if(18===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},pe.prototype.runOutgoingProcessor_0=function(){return M(this,ie.plus_1fupul$(k.Dispatchers.Unconfined),W.UNDISPATCHED,(t=this,function(e,n,i){var o=new Ee(t,e,this,n);return i?o:o.doResume(null)}));var t},_e.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[D]},_e.prototype=Object.create(D.prototype),_e.prototype.constructor=_e,_e.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$tmp$=this.$this.outgoingToBeProcessed_0.iterator(),this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.local$tmp$.hasNext(this),this.result_0===U)return U;continue;case 3:if(this.result_0){this.state_0=4;continue}this.state_0=8;continue;case 4:var t=this.local$tmp$.next();if(e.isType(t,_n)){if(this.state_0=5,this.result_0=this.$this.sendCloseSequence_0(Ne(t),this),this.result_0===U)return U;continue}e.isType(t,hn)||e.isType(t,un)?this.local$tmp$_0=this.$this.processOutgoingExtensions_0(t):this.local$tmp$_0=t,this.state_0=6;continue;case 5:this.state_0=8;continue;case 6:var n=this.local$tmp$_0;if(this.state_0=7,this.result_0=this.$this.raw_0.outgoing.send_11rb$(n,this),this.result_0===U)return U;continue;case 7:this.state_0=2;continue;case 8:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},pe.prototype.outgoingProcessorLoop_0=function(t,e){var n=new _e(this,t);return e?n:n.doResume(null)},me.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[D]},me.prototype=Object.create(D.prototype),me.prototype.constructor=me,me.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.tryClose_0()){this.state_0=1;continue}return;case 1:if(this.$this.context_0.complete(),this.local$reasonToSend=null!=this.local$reason?this.local$reason:ce(Wt(),""),this.exceptionState_0=5,this.$this.runOrCancelPinger_0(),this.local$reasonToSend.code!==Ht().code){if(this.state_0=2,this.result_0=this.$this.raw_0.outgoing.send_11rb$(mn(this.local$reasonToSend),this),this.result_0===U)return U;continue}this.state_0=3;continue;case 2:this.state_0=3;continue;case 3:this.exceptionState_0=7,this.finallyPath_0=[4],this.state_0=6;continue;case 4:return;case 5:this.finallyPath_0=[7],this.state_0=6;continue;case 6:this.exceptionState_0=7,this.$this.closeReasonRef_0.complete_11rb$(this.local$reasonToSend),this.state_0=this.finallyPath_0.shift();continue;case 7:throw this.exception_0;default:throw this.state_0=7,new Error("State Machine Unreachable execution")}}catch(t){if(7===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},pe.prototype.sendCloseSequence_0=function(t,e,n){var i=new me(this,t,e);return n?i:i.doResume(null)},pe.prototype.tryClose_0=function(){return this.closed_0.atomicfu$compareAndSet(!1,!0)},pe.prototype.runOrCancelPinger_0=function(){var t,e,n=this.pingIntervalMillis,i=this.closed_0.kotlinx$atomicfu$value?null:n.compareTo_11rb$(V)>0?Ye(this,this.raw_0.outgoing,n,this.timeoutMillis):null;null!=(t=this.pinger_0.atomicfu$getAndSet(i))&&t.close_dbl4no$(),null!=(e=null!=i?i.trySend_11rb$($e().EmptyPong_0):null)&&e.isSuccess,this.closed_0.kotlinx$atomicfu$value&&null!=i&&this.runOrCancelPinger_0()},fe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[D]},fe.prototype=Object.create(D.prototype),fe.prototype.constructor=fe,fe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.local$size=this.local$frame.data.length+(null!=(t=null!=this.local$packet?this.local$packet.size:null)?t:0)|0,this.local$size>this.$this.maxFrameSize.toNumber()){if(null!=this.local$packet&&this.local$packet.release(),this.state_0=2,this.result_0=sn(this.$this,ce(Jt(),"Frame is too big: "+this.local$size+". Max size is "+this.$this.maxFrameSize.toString()),this),this.result_0===U)return U;continue}this.state_0=3;continue;case 1:throw this.exception_0;case 2:throw new Oe(e.Long.fromInt(this.local$size));case 3:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},pe.prototype.checkMaxFrameSize_0=function(t,e,n,i){var o=new fe(this,t,e,n);return i?o:o.doResume(null)},pe.prototype.processIncomingExtensions_0=function(t){var e,n=t;for(e=this.extensions.iterator();e.hasNext();)n=e.next().processIncomingFrame_q1ubw4$(n);return n},pe.prototype.processOutgoingExtensions_0=function(t){var e,n=t;for(e=this.extensions.iterator();e.hasNext();)n=e.next().processOutgoingFrame_q1ubw4$(n);return n},ye.$metadata$={kind:T,simpleName:"Companion",interfaces:[]};var Te=null;function $e(){return null===Te&&new ye,Te}function Ne(t){if(t.data.length<2)return null;var n,i=new x;try{z(i,t.data),n=i.build()}catch(t){throw e.isType(t,F)?(i.release(),t):t}var o=n;return new jt(at(o),o.readText_vux9f0$())}function ge(){be=this}pe.$metadata$={kind:N,simpleName:"DefaultWebSocketSessionImpl",interfaces:[le,on]},ge.prototype.dispose=function(){},ge.prototype.toString=function(){return"NonDisposableHandle"},ge.$metadata$={kind:T,simpleName:"NonDisposableHandle",interfaces:[st]};var Re,Ce,Se,Ie,Le,be=null;function ve(){return null===be&&new ge,be}function Oe(t){lt(this),this.frameSize=t,this.name="FrameTooBigException"}function Ue(t,e,n,i){$.call(this),this.controlFrame=n,this.opcode=i,this.name$=t,this.ordinal$=e}function De(){De=function(){},Re=new Ue("TEXT",0,!1,1),Ce=new Ue("BINARY",1,!1,2),Se=new Ue("CLOSE",2,!0,8),Ie=new Ue("PING",3,!0,9),Le=new Ue("PONG",4,!0,10),Me()}function Ae(){return De(),Re}function ke(){return De(),Ce}function Pe(){return De(),Se}function xe(){return De(),Ie}function we(){return De(),Le}function ze(){Fe=this;var t,n=We();t:do{if(0===n.length){t=null;break t}var i=n[0],o=dt(n);if(0===o){t=i;break t}for(var r=i.opcode,a=1;a<=o;a++){var s=n[a],c=s.opcode;e.compareTo(r,c)<0&&(i=s,r=c)}t=i}while(0);this.maxOpcode_0=w(t).opcode;var l,p=ht(this.maxOpcode_0+1|0);l=p.length-1|0;for(var u=0;u<=l;u++){var d,h=We();t:do{var E,_=null,m=!1;for(E=0;E!==h.length;++E){var f=h[E];if(f.opcode===u){if(m){d=null;break t}_=f,m=!0}}if(!m){d=null;break t}d=_}while(0);p[u]=d}this.byOpcodeArray_0=p}Object.defineProperty(Oe.prototype,"message",{configurable:!0,get:function(){return"Frame is too big: "+this.frameSize.toString()}}),Oe.prototype.createCopy=function(){var t=new Oe(this.frameSize);return ct(t,this),t},Oe.$metadata$={kind:N,simpleName:"FrameTooBigException",interfaces:[ut,pt]},ze.prototype.get_za3lpa$=function(t){var e;return e=this.maxOpcode_0,0<=t&&t<=e?this.byOpcodeArray_0[t]:null},ze.$metadata$={kind:T,simpleName:"Companion",interfaces:[]};var Ge,je,Fe=null;function Me(){return De(),null===Fe&&new ze,Fe}function We(){return[Ae(),ke(),Pe(),xe(),we()]}function Xe(t,e,n,i,o){D.call(this,o),this.$controller=i,this.exceptionState_0=12,this.local$closure$channel=t,this.local$closure$outgoing=e,this.local$$receiver=void 0,this.local$cause=void 0,this.local$tmp$=void 0}function Be(t,e){var n,i,o=Y(5);return M(t,Ge,void 0,(n=o,i=e,function(t,e,o){var r=new Xe(n,i,t,this,e);return o?r:r.doResume(null)})),o}function qe(t,e,n,i){D.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$closure$channel=t}function He(t){return function(e,n,i){var o=new qe(t,e,this,n);return i?o:o.doResume(null)}}function Ve(t,e,n,i,o,r){D.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$outgoing=t,this.local$closure$pingMessage=e,this.local$closure$channel=n}function Ke(t,e,n){return function(i,o,r){var a=new Ve(t,e,n,i,this,o);return r?a:a.doResume(null)}}function Je(t,e,n,i,o,r,a){D.call(this,a),this.$controller=r,this.exceptionState_0=12,this.local$closure$periodMillis=t,this.local$closure$channel=e,this.local$closure$timeoutMillis=n,this.local$closure$outgoing=i,this.local$random=void 0,this.local$pingIdBytes=void 0}function Ye(t,e,n,i){var o,r,a,s,c,l=tt(),p=Y(2147483647);return M(t,l.plus_1fupul$(je),void 0,(o=n,r=p,a=i,s=e,function(t,e,n){var i=new Je(o,r,a,s,t,this,e);return n?i:i.doResume(null)})),w(t.coroutineContext.get_j3r2sn$(Z.Key)).invokeOnCompletion_f05bi3$((c=l,function(t){return c.cancel_x5z25k$(),P})),p}function Qe(t,e,n,i,o){void 0===n&&(n=gt),void 0===i&&(i=!1),this.input_0=t,this.output_0=e,this.maxFrameSize_bk9yz7$_0=n,this.masking_w8hg6f$_0=i,this.socketJob_0=tt(o.get_j3r2sn$(Z.Key)),this._incoming_0=Y(8),this._outgoing_0=Y(8),this.lastOpcode_0=0,this.coroutineContext_2cg00w$_0=o.plus_1fupul$(this.socketJob_0).plus_1fupul$(new O("raw-ws")),this.writerJob_0=M(this,new O("ws-writer"),W.ATOMIC,RawWebSocketCommon$writerJob$lambda(this)),this.readerJob_0=M(this,new O("ws-reader"),W.ATOMIC,RawWebSocketCommon$readerJob$lambda(this)),this.socketJob_0.complete()}function Ze(){this.installers_0=nt(),this.rcv_0=[!1,!1,!1]}function tn(t){return P}function en(t,e){this.name=t,this.parameters=e}function nn(t){var e=It(t,61);if(e<0)return Lt(t,"");var n,i=vt(t,bt(0,e));if((e+1|0)>>25)+i|0)&i|~n&o)+e[1]-389564586|0)<<12|r>>>20)+n|0)&n|~r&i)+e[2]+606105819|0)<<17|o>>>15)+r|0)&r|~o&n)+e[3]-1044525330|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&o|~i&r)+e[4]-176418897|0)<<7|n>>>25)+i|0)&i|~n&o)+e[5]+1200080426|0)<<12|r>>>20)+n|0)&n|~r&i)+e[6]-1473231341|0)<<17|o>>>15)+r|0)&r|~o&n)+e[7]-45705983|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&o|~i&r)+e[8]+1770035416|0)<<7|n>>>25)+i|0)&i|~n&o)+e[9]-1958414417|0)<<12|r>>>20)+n|0)&n|~r&i)+e[10]-42063|0)<<17|o>>>15)+r|0)&r|~o&n)+e[11]-1990404162|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&o|~i&r)+e[12]+1804603682|0)<<7|n>>>25)+i|0)&i|~n&o)+e[13]-40341101|0)<<12|r>>>20)+n|0)&n|~r&i)+e[14]-1502002290|0)<<17|o>>>15)+r|0)&r|~o&n)+e[15]+1236535329|0)<<22|i>>>10)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+e[1]-165796510|0)<<5|n>>>27)+i|0)&o|i&~o)+e[6]-1069501632|0)<<9|r>>>23)+n|0)&i|n&~i)+e[11]+643717713|0)<<14|o>>>18)+r|0)&n|r&~n)+e[0]-373897302|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+e[5]-701558691|0)<<5|n>>>27)+i|0)&o|i&~o)+e[10]+38016083|0)<<9|r>>>23)+n|0)&i|n&~i)+e[15]-660478335|0)<<14|o>>>18)+r|0)&n|r&~n)+e[4]-405537848|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+e[9]+568446438|0)<<5|n>>>27)+i|0)&o|i&~o)+e[14]-1019803690|0)<<9|r>>>23)+n|0)&i|n&~i)+e[3]-187363961|0)<<14|o>>>18)+r|0)&n|r&~n)+e[8]+1163531501|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i&r|o&~r)+e[13]-1444681467|0)<<5|n>>>27)+i|0)&o|i&~o)+e[2]-51403784|0)<<9|r>>>23)+n|0)&i|n&~i)+e[7]+1735328473|0)<<14|o>>>18)+r|0)&n|r&~n)+e[12]-1926607734|0)<<20|i>>>12)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+e[5]-378558|0)<<4|n>>>28)+i|0)^i^o)+e[8]-2022574463|0)<<11|r>>>21)+n|0)^n^i)+e[11]+1839030562|0)<<16|o>>>16)+r|0)^r^n)+e[14]-35309556|0)<<23|i>>>9)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+e[1]-1530992060|0)<<4|n>>>28)+i|0)^i^o)+e[4]+1272893353|0)<<11|r>>>21)+n|0)^n^i)+e[7]-155497632|0)<<16|o>>>16)+r|0)^r^n)+e[10]-1094730640|0)<<23|i>>>9)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+e[13]+681279174|0)<<4|n>>>28)+i|0)^i^o)+e[0]-358537222|0)<<11|r>>>21)+n|0)^n^i)+e[3]-722521979|0)<<16|o>>>16)+r|0)^r^n)+e[6]+76029189|0)<<23|i>>>9)+o|0,i=((i+=((o=((o+=((r=((r+=((n=((n+=(i^o^r)+e[9]-640364487|0)<<4|n>>>28)+i|0)^i^o)+e[12]-421815835|0)<<11|r>>>21)+n|0)^n^i)+e[15]+530742520|0)<<16|o>>>16)+r|0)^r^n)+e[2]-995338651|0)<<23|i>>>9)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+e[0]-198630844|0)<<6|n>>>26)+i|0)|~o))+e[7]+1126891415|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+e[14]-1416354905|0)<<15|o>>>17)+r|0)|~n))+e[5]-57434055|0)<<21|i>>>11)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+e[12]+1700485571|0)<<6|n>>>26)+i|0)|~o))+e[3]-1894986606|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+e[10]-1051523|0)<<15|o>>>17)+r|0)|~n))+e[1]-2054922799|0)<<21|i>>>11)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+e[8]+1873313359|0)<<6|n>>>26)+i|0)|~o))+e[15]-30611744|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+e[6]-1560198380|0)<<15|o>>>17)+r|0)|~n))+e[13]+1309151649|0)<<21|i>>>11)+o|0,i=((i+=((r=((r+=(i^((n=((n+=(o^(i|~r))+e[4]-145523070|0)<<6|n>>>26)+i|0)|~o))+e[11]-1120210379|0)<<10|r>>>22)+n|0)^((o=((o+=(n^(r|~i))+e[2]+718787259|0)<<15|o>>>17)+r|0)|~n))+e[9]-343485551|0)<<21|i>>>11)+o|0,t[0]=n+t[0]|0,t[1]=i+t[1]|0,t[2]=o+t[2]|0,t[3]=r+t[3]|0}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function o(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function r(t){var e,o,r,a,s,c,l=t.length,p=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=l;e+=64)n(p,i(t.substring(e-64,e)));for(o=(t=t.substring(e-64)).length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e>2]|=t.charCodeAt(e)<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(n(p,r),e=0;e<16;e+=1)r[e]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,r[14]=s,r[15]=c,n(p,r),p}function a(t){var n,i="";for(n=0;n<4;n+=1)i+=e[t>>8*n+4&15]+e[t>>8*n&15];return i}function s(t){var e;for(e=0;ep?new ArrayBuffer(0):(o=p-l,r=new ArrayBuffer(o),a=new Uint8Array(r),s=new Uint8Array(this,l,o),a.set(s),r)}}(),p.prototype.append=function(t){return this.appendBinary(c(t)),this},p.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,o=this._buff.length;for(e=64;e<=o;e+=64)n(this._hash,i(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},p.prototype.end=function(t){var e,n,i=this._buff,o=i.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=i.charCodeAt(e)<<(e%4<<3);return this._finish(r,o),n=s(this._hash),t&&(n=l(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(t,e){var i,o,r,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,t),a=0;a<16;a+=1)t[a]=0;i=(i=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),r=parseInt(i[1],16)||0,t[14]=o,t[15]=r,n(this._hash,t)},p.hash=function(t,e){return p.hashBinary(c(t),e)},p.hashBinary=function(t,e){var n=s(r(t));return e?l(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(t){var e,i,r,a,s,c=(i=this._buff.buffer,r=t,a=!0,(s=new Uint8Array(i.byteLength+r.byteLength)).set(new Uint8Array(i)),s.set(new Uint8Array(r),i.byteLength),a?s:s.buffer),l=c.length;for(this._length+=t.byteLength,e=64;e<=l;e+=64)n(this._hash,o(c.subarray(e-64,e)));return this._buff=e-64>2]|=i[e]<<(e%4<<3);return this._finish(r,o),n=s(this._hash),t&&(n=l(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var t,e=p.prototype.getState.call(this);return e.buff=(t=e.buff,String.fromCharCode.apply(null,new Uint8Array(t))),e},p.ArrayBuffer.prototype.setState=function(t){return t.buff=function(t,e){var n,i=t.length,o=new ArrayBuffer(i),r=new Uint8Array(o);for(n=0;n>2]|=t[e]<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(n(p,r),e=0;e<16;e+=1)r[e]=0;return a=(a=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),c=parseInt(a[1],16)||0,r[14]=s,r[15]=c,n(p,r),p}(new Uint8Array(t)));return e?l(i):i},p}()},function(t,e,n){var i,o,r;o=[e,n(0),n(1),n(8),n(20)],void 0===(r="function"==typeof(i=function(t,e,n,i,o){"use strict";e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,e.kotlin.coroutines.CoroutineImpl,n.kotlinx.coroutines.channels.Channel_lsve6m$,e.kotlin.Unit,n.kotlinx.coroutines.withTimeoutOrNull_ms3uf5$,e.Long.fromInt(5e3),n.kotlinx.coroutines.CompletableDeferred_xptg6w$,e.Kind.INTERFACE,e.Kind.CLASS,e.Kind.OBJECT,e.kotlin.text.split_ip8yn$,e.kotlin.to_ujzrz7$,e.kotlin.collections.toMap_6hr0sd$,e.throwCCE,e.kotlin.text.trim_gw00vp$,e.kotlin.text.toDouble_pdl1vz$,e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,e.kotlin.collections.ArrayList_init_ww73n8$,e.defineInlineFunction,e.wrapFunction,e.kotlin.ranges.IntRange,e.kotlin.random.Random,e.toBoxedChar,e.kotlin.collections.joinToString_fmv235$,e.Long.NEG_ONE,e.kotlin.collections.emptyMap_q3lmfv$,e.Long.ZERO,e.kotlin.text.indexOf_8eortd$,e.kotlin.text.toLong_pdl1vz$,e.equals,e.kotlin.collections.mapOf_qfcya0$,e.kotlin.Exception,e.kotlin.collections.ArrayList_init_287e2$;var r=e.kotlin.text.Regex_init_61zpoe$;e.kotlin.text.removePrefix_gsj5wt$,e.toString,e.kotlin.collections.contains_mjy6jw$,e.kotlin.NotImplementedError,e.kotlin.collections.mutableListOf_i5x0yv$;var a=t.com||(t.com={}),s=a.ustadmobile||(a.ustadmobile={}),c=s.lib||(s.lib={}),l=c.util||(c.util={});return(l.ext||(l.ext={})).fixTincan_omobsc$=function(t){},r("\\W"),t})?i.apply(e,o):i)||(t.exports=r)},function(t,e,n){var i,o,r;o=[e,n(0)],void 0===(r="function"==typeof(i=function(t,e){"use strict";return e.Kind.OBJECT,e.Kind.CLASS,e.Kind.INTERFACE,e.kotlin.Exception_init_pdl1vj$,e.kotlin.Exception,e.kotlin.IllegalStateException_init_pdl1vj$,e.kotlin.collections.LinkedHashMap_init_q3lmfv$,e.throwUPAE,e.kotlin.text.startsWith_7epoxm$,e.equals,e.kotlin.collections.last_2p1efm$,e.kotlin.IndexOutOfBoundsException_init,e.kotlin.text.isBlank_gw00vp$,e.kotlin.collections.ArrayList_init_287e2$,e.kotlin.collections.emptyList_287e2$,e.kotlin.collections.LinkedHashSet_init_287e2$,t})?i.apply(e,o):i)||(t.exports=r)}])})); //# sourceMappingURL=lib-database.js.map