pages/_app/immutable/nodes/2.5235249e.js
[BOT] pages deployer c6fa2df2c1 Update pages 🚀
2023-10-18 20:08:44 +00:00

15 lines
209 KiB
JavaScript

import{s as safe_not_equal,e as empty,i as insert_hydration,d as detach,A as compute_rest_props,B as setContext,C as assign,D as exclude_internal_props,r as create_slot,f as element,g as claim_element,h as children,E as set_dynamic_element_data,F as action_destroyer,G as listen,u as update_slot_base,v as get_all_dirty_from_scope,w as get_slot_changes,H as is_function,I as add_render_callback,J as run_all,K as bubble,p as binding_callbacks,L as identity,M as getContext,a as space,c as claim_space,N as set_attributes,x as append_hydration,l as text,m as claim_text,j as attr,n as set_data,O as svg_element,P as claim_svg_element,Q as compute_slots,R as createEventDispatcher,S as add_flush_callback,y as noop$1,z as component_subscribe,k as set_style,T as destroy_each,o as onMount}from"../chunks/scheduler.c252431e.js";import{S as SvelteComponent,i as init,a as transition_in,g as group_outros,t as transition_out,c as check_outros,f as create_bidirectional_transition,b as create_component,d as claim_component,m as mount_component,e as destroy_component,h as bind,n as now,l as loop}from"../chunks/index.055e1bc1.js";import{w as writable}from"../chunks/index.0dba420f.js";function ensure_array_like(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function get_spread_update(t,e){const r={},o={},n={$$scope:1};let i=t.length;for(;i--;){const a=t[i],s=e[i];if(s){for(const l in a)l in s||(o[l]=1);for(const l in s)n[l]||(r[l]=s[l],n[l]=1);t[i]=s}else for(const l in a)n[l]=1}for(const a in o)a in r||(r[a]=void 0);return r}function get_spread_object(t){return typeof t=="object"&&t!==null?t:{}}const prerender=!1,ssr=!1,_page=Object.freeze(Object.defineProperty({__proto__:null,prerender,ssr},Symbol.toStringTag,{value:"Module"})),bluetoothState=writable("DISCONNECTED"),raceFullState=writable(),settings=writable();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},indexLight={exports:{}},indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=t;function t(e,r){for(var o=new Array(arguments.length-1),n=0,i=2,a=!0;i<arguments.length;)o[n++]=arguments[i++];return new Promise(function(l,u){o[n]=function(c){if(a)if(a=!1,c)u(c);else{for(var d=new Array(arguments.length-1),f=0;f<d.length;)d[f++]=arguments[f];l.apply(null,d)}};try{e.apply(r||null,o)}catch(h){a&&(a=!1,u(h))}})}return aspromise}var base64$1={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(t){var e=t;e.length=function(s){var l=s.length;if(!l)return 0;for(var u=0;--l%4>1&&s.charAt(l)==="=";)++u;return Math.ceil(s.length*3)/4-u};for(var r=new Array(64),o=new Array(123),n=0;n<64;)o[r[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;e.encode=function(s,l,u){for(var h=null,c=[],d=0,f=0,m;l<u;){var p=s[l++];switch(f){case 0:c[d++]=r[p>>2],m=(p&3)<<4,f=1;break;case 1:c[d++]=r[m|p>>4],m=(p&15)<<2,f=2;break;case 2:c[d++]=r[m|p>>6],c[d++]=r[p&63],f=0;break}d>8191&&((h||(h=[])).push(String.fromCharCode.apply(String,c)),d=0)}return f&&(c[d++]=r[m],c[d++]=61,f===1&&(c[d++]=61)),h?(d&&h.push(String.fromCharCode.apply(String,c.slice(0,d))),h.join("")):String.fromCharCode.apply(String,c.slice(0,d))};var i="invalid encoding";e.decode=function(s,l,u){for(var h=u,c=0,d,f=0;f<s.length;){var m=s.charCodeAt(f++);if(m===61&&c>1)break;if((m=o[m])===void 0)throw Error(i);switch(c){case 0:d=m,c=1;break;case 1:l[u++]=d<<2|(m&48)>>4,d=m,c=2;break;case 2:l[u++]=(d&15)<<4|(m&60)>>2,d=m,c=3;break;case 3:l[u++]=(d&3)<<6|m,c=0;break}}if(c===1)throw Error(i);return u-h},e.test=function(s){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s)}}(base64$1)),base64$1}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=t;function t(){this._listeners={}}return t.prototype.on=function(r,o,n){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:n||this}),this},t.prototype.off=function(r,o){if(r===void 0)this._listeners={};else if(o===void 0)this._listeners[r]=[];else for(var n=this._listeners[r],i=0;i<n.length;)n[i].fn===o?n.splice(i,1):++i;return this},t.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<o.length;)o[i].fn.apply(o[i++].ctx,n)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=t(t);function t(i){return typeof Float32Array<"u"?function(){var a=new Float32Array([-0]),s=new Uint8Array(a.buffer),l=s[3]===128;function u(f,m,p){a[0]=f,m[p]=s[0],m[p+1]=s[1],m[p+2]=s[2],m[p+3]=s[3]}function h(f,m,p){a[0]=f,m[p]=s[3],m[p+1]=s[2],m[p+2]=s[1],m[p+3]=s[0]}i.writeFloatLE=l?u:h,i.writeFloatBE=l?h:u;function c(f,m){return s[0]=f[m],s[1]=f[m+1],s[2]=f[m+2],s[3]=f[m+3],a[0]}function d(f,m){return s[3]=f[m],s[2]=f[m+1],s[1]=f[m+2],s[0]=f[m+3],a[0]}i.readFloatLE=l?c:d,i.readFloatBE=l?d:c}():function(){function a(l,u,h,c){var d=u<0?1:0;if(d&&(u=-u),u===0)l(1/u>0?0:2147483648,h,c);else if(isNaN(u))l(2143289344,h,c);else if(u>34028234663852886e22)l((d<<31|2139095040)>>>0,h,c);else if(u<11754943508222875e-54)l((d<<31|Math.round(u/1401298464324817e-60))>>>0,h,c);else{var f=Math.floor(Math.log(u)/Math.LN2),m=Math.round(u*Math.pow(2,-f)*8388608)&8388607;l((d<<31|f+127<<23|m)>>>0,h,c)}}i.writeFloatLE=a.bind(null,e),i.writeFloatBE=a.bind(null,r);function s(l,u,h){var c=l(u,h),d=(c>>31)*2+1,f=c>>>23&255,m=c&8388607;return f===255?m?NaN:d*(1/0):f===0?d*1401298464324817e-60*m:d*Math.pow(2,f-150)*(m+8388608)}i.readFloatLE=s.bind(null,o),i.readFloatBE=s.bind(null,n)}(),typeof Float64Array<"u"?function(){var a=new Float64Array([-0]),s=new Uint8Array(a.buffer),l=s[7]===128;function u(f,m,p){a[0]=f,m[p]=s[0],m[p+1]=s[1],m[p+2]=s[2],m[p+3]=s[3],m[p+4]=s[4],m[p+5]=s[5],m[p+6]=s[6],m[p+7]=s[7]}function h(f,m,p){a[0]=f,m[p]=s[7],m[p+1]=s[6],m[p+2]=s[5],m[p+3]=s[4],m[p+4]=s[3],m[p+5]=s[2],m[p+6]=s[1],m[p+7]=s[0]}i.writeDoubleLE=l?u:h,i.writeDoubleBE=l?h:u;function c(f,m){return s[0]=f[m],s[1]=f[m+1],s[2]=f[m+2],s[3]=f[m+3],s[4]=f[m+4],s[5]=f[m+5],s[6]=f[m+6],s[7]=f[m+7],a[0]}function d(f,m){return s[7]=f[m],s[6]=f[m+1],s[5]=f[m+2],s[4]=f[m+3],s[3]=f[m+4],s[2]=f[m+5],s[1]=f[m+6],s[0]=f[m+7],a[0]}i.readDoubleLE=l?c:d,i.readDoubleBE=l?d:c}():function(){function a(l,u,h,c,d,f){var m=c<0?1:0;if(m&&(c=-c),c===0)l(0,d,f+u),l(1/c>0?0:2147483648,d,f+h);else if(isNaN(c))l(0,d,f+u),l(2146959360,d,f+h);else if(c>17976931348623157e292)l(0,d,f+u),l((m<<31|2146435072)>>>0,d,f+h);else{var p;if(c<22250738585072014e-324)p=c/5e-324,l(p>>>0,d,f+u),l((m<<31|p/4294967296)>>>0,d,f+h);else{var y=Math.floor(Math.log(c)/Math.LN2);y===1024&&(y=1023),p=c*Math.pow(2,-y),l(p*4503599627370496>>>0,d,f+u),l((m<<31|y+1023<<20|p*1048576&1048575)>>>0,d,f+h)}}}i.writeDoubleLE=a.bind(null,e,0,4),i.writeDoubleBE=a.bind(null,r,4,0);function s(l,u,h,c,d){var f=l(c,d+u),m=l(c,d+h),p=(m>>31)*2+1,y=m>>>20&2047,v=4294967296*(m&1048575)+f;return y===2047?v?NaN:p*(1/0):y===0?p*5e-324*v:p*Math.pow(2,y-1075)*(v+4503599627370496)}i.readDoubleLE=s.bind(null,o,0,4),i.readDoubleBE=s.bind(null,n,4,0)}(),i}function e(i,a,s){a[s]=i&255,a[s+1]=i>>>8&255,a[s+2]=i>>>16&255,a[s+3]=i>>>24}function r(i,a,s){a[s]=i>>>24,a[s+1]=i>>>16&255,a[s+2]=i>>>8&255,a[s+3]=i&255}function o(i,a){return(i[a]|i[a+1]<<8|i[a+2]<<16|i[a+3]<<24)>>>0}function n(i,a){return(i[a]<<24|i[a+1]<<16|i[a+2]<<8|i[a+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}return inquire_1}var utf8$2={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(t){var e=t;e.length=function(o){for(var n=0,i=0,a=0;a<o.length;++a)i=o.charCodeAt(a),i<128?n+=1:i<2048?n+=2:(i&64512)===55296&&(o.charCodeAt(a+1)&64512)===56320?(++a,n+=4):n+=3;return n},e.read=function(o,n,i){var a=i-n;if(a<1)return"";for(var s=null,l=[],u=0,h;n<i;)h=o[n++],h<128?l[u++]=h:h>191&&h<224?l[u++]=(h&31)<<6|o[n++]&63:h>239&&h<365?(h=((h&7)<<18|(o[n++]&63)<<12|(o[n++]&63)<<6|o[n++]&63)-65536,l[u++]=55296+(h>>10),l[u++]=56320+(h&1023)):l[u++]=(h&15)<<12|(o[n++]&63)<<6|o[n++]&63,u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,l)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,l.slice(0,u))),s.join("")):String.fromCharCode.apply(String,l.slice(0,u))},e.write=function(o,n,i){for(var a=i,s,l,u=0;u<o.length;++u)s=o.charCodeAt(u),s<128?n[i++]=s:s<2048?(n[i++]=s>>6|192,n[i++]=s&63|128):(s&64512)===55296&&((l=o.charCodeAt(u+1))&64512)===56320?(s=65536+((s&1023)<<10)+(l&1023),++u,n[i++]=s>>18|240,n[i++]=s>>12&63|128,n[i++]=s>>6&63|128,n[i++]=s&63|128):(n[i++]=s>>12|224,n[i++]=s>>6&63|128,n[i++]=s&63|128);return i-a}}(utf8$2)),utf8$2}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=t;function t(e,r,o){var n=o||8192,i=n>>>1,a=null,s=n;return function(u){if(u<1||u>i)return e(u);s+u>n&&(a=e(n),s=0);var h=r.call(a,s,s+=u);return s&7&&(s=(s|7)+1),h}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=e;var t=requireMinimal();function e(i,a){this.lo=i>>>0,this.hi=a>>>0}var r=e.zero=new e(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var o=e.zeroHash="\0\0\0\0\0\0\0\0";e.fromNumber=function(a){if(a===0)return r;var s=a<0;s&&(a=-a);var l=a>>>0,u=(a-l)/4294967296>>>0;return s&&(u=~u>>>0,l=~l>>>0,++l>4294967295&&(l=0,++u>4294967295&&(u=0))),new e(l,u)},e.from=function(a){if(typeof a=="number")return e.fromNumber(a);if(t.isString(a))if(t.Long)a=t.Long.fromString(a);else return e.fromNumber(parseInt(a,10));return a.low||a.high?new e(a.low>>>0,a.high>>>0):r},e.prototype.toNumber=function(a){if(!a&&this.hi>>>31){var s=~this.lo+1>>>0,l=~this.hi>>>0;return s||(l=l+1>>>0),-(s+l*4294967296)}return this.lo+this.hi*4294967296},e.prototype.toLong=function(a){return t.Long?new t.Long(this.lo|0,this.hi|0,!!a):{low:this.lo|0,high:this.hi|0,unsigned:!!a}};var n=String.prototype.charCodeAt;return e.fromHash=function(a){return a===o?r:new e((n.call(a,0)|n.call(a,1)<<8|n.call(a,2)<<16|n.call(a,3)<<24)>>>0,(n.call(a,4)|n.call(a,5)<<8|n.call(a,6)<<16|n.call(a,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var a=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^a)>>>0,this.lo=(this.lo<<1^a)>>>0,this},e.prototype.zzDecode=function(){var a=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^a)>>>0,this.hi=(this.hi>>>1^a)>>>0,this},e.prototype.length=function(){var a=this.lo,s=(this.lo>>>28|this.hi<<4)>>>0,l=this.hi>>>24;return l===0?s===0?a<16384?a<128?1:2:a<2097152?3:4:s<16384?s<128?5:6:s<2097152?7:8:l<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(t){var e=t;e.asPromise=requireAspromise(),e.base64=requireBase64(),e.EventEmitter=requireEventemitter(),e.float=requireFloat(),e.inquire=requireInquire(),e.utf8=requireUtf8(),e.pool=requirePool(),e.LongBits=requireLongbits(),e.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),e.global=e.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||commonjsGlobal,e.emptyArray=Object.freeze?Object.freeze([]):[],e.emptyObject=Object.freeze?Object.freeze({}):{},e.isInteger=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i},e.isString=function(i){return typeof i=="string"||i instanceof String},e.isObject=function(i){return i&&typeof i=="object"},e.isset=e.isSet=function(i,a){var s=i[a];return s!=null&&i.hasOwnProperty(a)?typeof s!="object"||(Array.isArray(s)?s.length:Object.keys(s).length)>0:!1},e.Buffer=function(){try{var n=e.inquire("buffer").Buffer;return n.prototype.utf8Write?n:null}catch{return null}}(),e._Buffer_from=null,e._Buffer_allocUnsafe=null,e.newBuffer=function(i){return typeof i=="number"?e.Buffer?e._Buffer_allocUnsafe(i):new e.Array(i):e.Buffer?e._Buffer_from(i):typeof Uint8Array>"u"?i:new Uint8Array(i)},e.Array=typeof Uint8Array<"u"?Uint8Array:Array,e.Long=e.global.dcodeIO&&e.global.dcodeIO.Long||e.global.Long||e.inquire("long"),e.key2Re=/^true|false|0|1$/,e.key32Re=/^-?(?:0|[1-9][0-9]*)$/,e.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,e.longToHash=function(i){return i?e.LongBits.from(i).toHash():e.LongBits.zeroHash},e.longFromHash=function(i,a){var s=e.LongBits.fromHash(i);return e.Long?e.Long.fromBits(s.lo,s.hi,a):s.toNumber(!!a)};function r(n,i,a){for(var s=Object.keys(i),l=0;l<s.length;++l)(n[s[l]]===void 0||!a)&&(n[s[l]]=i[s[l]]);return n}e.merge=r,e.lcFirst=function(i){return i.charAt(0).toLowerCase()+i.substring(1)};function o(n){function i(a,s){if(!(this instanceof i))return new i(a,s);Object.defineProperty(this,"message",{get:function(){return a}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:new Error().stack||""}),s&&r(this,s)}return i.prototype=Object.create(Error.prototype,{constructor:{value:i,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return n},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),i}e.newError=o,e.ProtocolError=o("ProtocolError"),e.oneOfGetter=function(i){for(var a={},s=0;s<i.length;++s)a[i[s]]=1;return function(){for(var l=Object.keys(this),u=l.length-1;u>-1;--u)if(a[l[u]]===1&&this[l[u]]!==void 0&&this[l[u]]!==null)return l[u]}},e.oneOfSetter=function(i){return function(a){for(var s=0;s<i.length;++s)i[s]!==a&&delete this[i[s]]}},e.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},e._configure=function(){var n=e.Buffer;if(!n){e._Buffer_from=e._Buffer_allocUnsafe=null;return}e._Buffer_from=n.from!==Uint8Array.from&&n.from||function(a,s){return new n(a,s)},e._Buffer_allocUnsafe=n.allocUnsafe||function(a){return new n(a)}}}(minimal$1)),minimal$1}var writer=Writer$1,util$7=requireMinimal(),BufferWriter$1,LongBits$1=util$7.LongBits,base64=util$7.base64,utf8$1=util$7.utf8;function Op(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function noop(){}function State(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Writer$1(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create$1=function t(){return util$7.Buffer?function(){return(Writer$1.create=function(){return new BufferWriter$1})()}:function(){return new Writer$1}};Writer$1.create=create$1();Writer$1.alloc=function t(e){return new util$7.Array(e)};util$7.Array!==Array&&(Writer$1.alloc=util$7.pool(Writer$1.alloc,util$7.Array.prototype.subarray));Writer$1.prototype._push=function t(e,r,o){return this.tail=this.tail.next=new Op(e,r,o),this.len+=r,this};function writeByte(t,e,r){e[r]=t&255}function writeVarint32(t,e,r){for(;t>127;)e[r++]=t&127|128,t>>>=7;e[r]=t}function VarintOp(t,e){this.len=t,this.next=void 0,this.val=e}VarintOp.prototype=Object.create(Op.prototype);VarintOp.prototype.fn=writeVarint32;Writer$1.prototype.uint32=function t(e){return this.len+=(this.tail=this.tail.next=new VarintOp((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};Writer$1.prototype.int32=function t(e){return e<0?this._push(writeVarint64,10,LongBits$1.fromNumber(e)):this.uint32(e)};Writer$1.prototype.sint32=function t(e){return this.uint32((e<<1^e>>31)>>>0)};function writeVarint64(t,e,r){for(;t.hi;)e[r++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=t.lo&127|128,t.lo=t.lo>>>7;e[r++]=t.lo}Writer$1.prototype.uint64=function t(e){var r=LongBits$1.from(e);return this._push(writeVarint64,r.length(),r)};Writer$1.prototype.int64=Writer$1.prototype.uint64;Writer$1.prototype.sint64=function t(e){var r=LongBits$1.from(e).zzEncode();return this._push(writeVarint64,r.length(),r)};Writer$1.prototype.bool=function t(e){return this._push(writeByte,1,e?1:0)};function writeFixed32(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}Writer$1.prototype.fixed32=function t(e){return this._push(writeFixed32,4,e>>>0)};Writer$1.prototype.sfixed32=Writer$1.prototype.fixed32;Writer$1.prototype.fixed64=function t(e){var r=LongBits$1.from(e);return this._push(writeFixed32,4,r.lo)._push(writeFixed32,4,r.hi)};Writer$1.prototype.sfixed64=Writer$1.prototype.fixed64;Writer$1.prototype.float=function t(e){return this._push(util$7.float.writeFloatLE,4,e)};Writer$1.prototype.double=function t(e){return this._push(util$7.float.writeDoubleLE,8,e)};var writeBytes=util$7.Array.prototype.set?function t(e,r,o){r.set(e,o)}:function t(e,r,o){for(var n=0;n<e.length;++n)r[o+n]=e[n]};Writer$1.prototype.bytes=function t(e){var r=e.length>>>0;if(!r)return this._push(writeByte,1,0);if(util$7.isString(e)){var o=Writer$1.alloc(r=base64.length(e));base64.decode(e,o,0),e=o}return this.uint32(r)._push(writeBytes,r,e)};Writer$1.prototype.string=function t(e){var r=utf8$1.length(e);return r?this.uint32(r)._push(utf8$1.write,r,e):this._push(writeByte,1,0)};Writer$1.prototype.fork=function t(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this};Writer$1.prototype.reset=function t(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this};Writer$1.prototype.ldelim=function t(){var e=this.head,r=this.tail,o=this.len;return this.reset().uint32(o),o&&(this.tail.next=e.next,this.tail=r,this.len+=o),this};Writer$1.prototype.finish=function t(){for(var e=this.head.next,r=this.constructor.alloc(this.len),o=0;e;)e.fn(e.val,r,o),o+=e.len,e=e.next;return r};Writer$1._configure=function(t){BufferWriter$1=t,Writer$1.create=create$1(),BufferWriter$1._configure()};var writer_buffer=BufferWriter,Writer=writer;(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util$6=requireMinimal();function BufferWriter(){Writer.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=util$6._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=util$6.Buffer&&util$6.Buffer.prototype instanceof Uint8Array&&util$6.Buffer.prototype.set.name==="set"?function(e,r,o){r.set(e,o)}:function(e,r,o){if(e.copy)e.copy(r,o,0,e.length);else for(var n=0;n<e.length;)r[o++]=e[n++]}};BufferWriter.prototype.bytes=function t(e){util$6.isString(e)&&(e=util$6._Buffer_from(e,"base64"));var r=e.length>>>0;return this.uint32(r),r&&this._push(BufferWriter.writeBytesBuffer,r,e),this};function writeStringBuffer(t,e,r){t.length<40?util$6.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}BufferWriter.prototype.string=function t(e){var r=util$6.Buffer.byteLength(e);return this.uint32(r),r&&this._push(writeStringBuffer,r,e),this};BufferWriter._configure();var reader=Reader$1,util$5=requireMinimal(),BufferReader$1,LongBits=util$5.LongBits,utf8=util$5.utf8;function indexOutOfRange(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function Reader$1(t){this.buf=t,this.pos=0,this.len=t.length}var create_array=typeof Uint8Array<"u"?function t(e){if(e instanceof Uint8Array||Array.isArray(e))return new Reader$1(e);throw Error("illegal buffer")}:function t(e){if(Array.isArray(e))return new Reader$1(e);throw Error("illegal buffer")},create=function t(){return util$5.Buffer?function(r){return(Reader$1.create=function(n){return util$5.Buffer.isBuffer(n)?new BufferReader$1(n):create_array(n)})(r)}:create_array};Reader$1.create=create();Reader$1.prototype._slice=util$5.Array.prototype.subarray||util$5.Array.prototype.slice;Reader$1.prototype.uint32=function t(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return e}}();Reader$1.prototype.int32=function t(){return this.uint32()|0};Reader$1.prototype.sint32=function t(){var e=this.uint32();return e>>>1^-(e&1)|0};function readLongVarint(){var t=new LongBits(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<<e*7)>>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}Reader$1.prototype.bool=function t(){return this.uint32()!==0};function readFixed32_end(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}Reader$1.prototype.fixed32=function t(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)};Reader$1.prototype.sfixed32=function t(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)|0};function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader$1.prototype.float=function t(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var e=util$5.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};Reader$1.prototype.double=function t(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var e=util$5.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};Reader$1.prototype.bytes=function t(){var e=this.uint32(),r=this.pos,o=this.pos+e;if(o>this.len)throw indexOutOfRange(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(r,o);if(r===o){var n=util$5.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,o)};Reader$1.prototype.string=function t(){var e=this.bytes();return utf8.read(e,0,e.length)};Reader$1.prototype.skip=function t(e){if(typeof e=="number"){if(this.pos+e>this.len)throw indexOutOfRange(this,e);this.pos+=e}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(this.buf[this.pos++]&128);return this};Reader$1.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this};Reader$1._configure=function(t){BufferReader$1=t,Reader$1.create=create(),BufferReader$1._configure();var e=util$5.Long?"toLong":"toNumber";util$5.merge(Reader$1.prototype,{int64:function(){return readLongVarint.call(this)[e](!1)},uint64:function(){return readLongVarint.call(this)[e](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[e](!1)},fixed64:function(){return readFixed64.call(this)[e](!0)},sfixed64:function(){return readFixed64.call(this)[e](!1)}})};var reader_buffer=BufferReader,Reader=reader;(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util$4=requireMinimal();function BufferReader(t){Reader.call(this,t)}BufferReader._configure=function(){util$4.Buffer&&(BufferReader.prototype._slice=util$4.Buffer.prototype.slice)};BufferReader.prototype.string=function t(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))};BufferReader._configure();var rpc={},service$1=Service$1,util$3=requireMinimal();(Service$1.prototype=Object.create(util$3.EventEmitter.prototype)).constructor=Service$1;function Service$1(t,e,r){if(typeof t!="function")throw TypeError("rpcImpl must be a function");util$3.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}Service$1.prototype.rpcCall=function t(e,r,o,n,i){if(!n)throw TypeError("request must be specified");var a=this;if(!i)return util$3.asPromise(t,a,e,r,o,n);if(!a.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return a.rpcImpl(e,r[a.requestDelimited?"encodeDelimited":"encode"](n).finish(),function(l,u){if(l)return a.emit("error",l,e),i(l);if(u===null){a.end(!0);return}if(!(u instanceof o))try{u=o[a.responseDelimited?"decodeDelimited":"decode"](u)}catch(h){return a.emit("error",h,e),i(h)}return a.emit("data",u,e),i(null,u)})}catch(s){a.emit("error",s,e),setTimeout(function(){i(s)},0);return}};Service$1.prototype.end=function t(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this};(function(t){var e=t;e.Service=service$1})(rpc);var roots={};(function(t){var e=t;e.build="minimal",e.Writer=writer,e.BufferWriter=writer_buffer,e.Reader=reader,e.BufferReader=reader_buffer,e.util=requireMinimal(),e.rpc=rpc,e.roots=roots,e.configure=r;function r(){e.util._configure(),e.Writer._configure(e.BufferWriter),e.Reader._configure(e.BufferReader)}r()})(indexMinimal);var util$2={exports:{}},codegen_1=codegen;function codegen(t,e){typeof t=="string"&&(e=t,t=void 0);var r=[];function o(i){if(typeof i!="string"){var a=n();if(codegen.verbose&&console.log("codegen: "+a),a="return "+a,i){for(var s=Object.keys(i),l=new Array(s.length+1),u=new Array(s.length),h=0;h<s.length;)l[h]=s[h],u[h]=i[s[h++]];return l[h]=a,Function.apply(null,l).apply(null,u)}return Function(a)()}for(var c=new Array(arguments.length-1),d=0;d<c.length;)c[d]=arguments[++d];if(d=0,i=i.replace(/%([%dfijs])/g,function(m,p){var y=c[d++];switch(p){case"d":case"f":return String(Number(y));case"i":return String(Math.floor(y));case"j":return JSON.stringify(y);case"s":return String(y)}return"%"}),d!==c.length)throw Error("parameter count mismatch");return r.push(i),o}function n(i){return"function "+(i||e||"")+"("+(t&&t.join(",")||"")+`){
`+r.join(`
`)+`
}`}return o.toString=n,o}codegen.verbose=!1;var fetch_1=fetch,asPromise=requireAspromise(),inquire=requireInquire(),fs=inquire("fs");function fetch(t,e,r){return typeof e=="function"?(r=e,e={}):e||(e={}),r?!e.xhr&&fs&&fs.readFile?fs.readFile(t,function(n,i){return n&&typeof XMLHttpRequest<"u"?fetch.xhr(t,e,r):n?r(n):r(null,e.binary?i:i.toString("utf8"))}):fetch.xhr(t,e,r):asPromise(fetch,this,t,e)}fetch.xhr=function t(e,r,o){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===4){if(n.status!==0&&n.status!==200)return o(Error("status "+n.status));if(r.binary){var a=n.response;if(!a){a=[];for(var s=0;s<n.responseText.length;++s)a.push(n.responseText.charCodeAt(s)&255)}return o(null,typeof Uint8Array<"u"?new Uint8Array(a):a)}return o(null,n.responseText)}},r.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()};var path={};(function(t){var e=t,r=e.isAbsolute=function(i){return/^(?:\/|\w+:)/.test(i)},o=e.normalize=function(i){i=i.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var a=i.split("/"),s=r(i),l="";s&&(l=a.shift()+"/");for(var u=0;u<a.length;)a[u]===".."?u>0&&a[u-1]!==".."?a.splice(--u,2):s?a.splice(u,1):++u:a[u]==="."?a.splice(u,1):++u;return l+a.join("/")};e.resolve=function(i,a,s){return s||(a=o(a)),r(a)?a:(s||(i=o(i)),(i=i.replace(/(?:\/|^)[^/]+$/,"")).length?o(i+"/"+a):a)}})(path);var types$1={},hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(t){var e=t,r=requireUtil(),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function n(i,a){var s=0,l={};for(a|=0;s<i.length;)l[o[s+a]]=i[s++];return l}e.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),e.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",r.emptyArray,null]),e.long=n([0,0,0,1,1],7),e.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),e.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])}(types$1)),types$1}var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1,field=a;var t=requireObject();((a.prototype=Object.create(t.prototype)).constructor=a).className="Field";var e=require_enum(),r=requireTypes(),o=requireUtil(),n,i=/^required|optional|repeated$/;a.fromJSON=function(l,u){return new a(l,u.id,u.type,u.rule,u.extend,u.options,u.comment)};function a(s,l,u,h,c,d,f){if(o.isObject(h)?(f=c,d=h,h=c=void 0):o.isObject(c)&&(f=d,d=c,c=void 0),t.call(this,s,d),!o.isInteger(l)||l<0)throw TypeError("id must be a non-negative integer");if(!o.isString(u))throw TypeError("type must be a string");if(h!==void 0&&!i.test(h=h.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(c!==void 0&&!o.isString(c))throw TypeError("extend must be a string");h==="proto3_optional"&&(h="optional"),this.rule=h&&h!=="optional"?h:void 0,this.type=u,this.id=l,this.extend=c||void 0,this.required=h==="required",this.optional=!this.required,this.repeated=h==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=o.Long?r.long[u]!==void 0:!1,this.bytes=u==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=f}return Object.defineProperty(a.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}}),a.prototype.setOption=function(l,u,h){return l==="packed"&&(this._packed=null),t.prototype.setOption.call(this,l,u,h)},a.prototype.toJSON=function(l){var u=l?!!l.keepComments:!1;return o.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",u?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=r.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof e&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof e))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=o.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var l;o.base64.test(this.typeDefault)?o.base64.decode(this.typeDefault,l=o.newBuffer(o.base64.length(this.typeDefault)),0):o.utf8.write(this.typeDefault,l=o.newBuffer(o.utf8.length(this.typeDefault)),0),this.typeDefault=l}return this.map?this.defaultValue=o.emptyObject:this.repeated?this.defaultValue=o.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),t.prototype.resolve.call(this)},a.d=function(l,u,h,c){return typeof u=="function"?u=o.decorateType(u).name:u&&typeof u=="object"&&(u=o.decorateEnum(u).name),function(f,m){o.decorateType(f.constructor).add(new a(m,l,u,h,{default:c}))}},a._configure=function(l){n=l},field}var oneof,hasRequiredOneof;function requireOneof(){if(hasRequiredOneof)return oneof;hasRequiredOneof=1,oneof=o;var t=requireObject();((o.prototype=Object.create(t.prototype)).constructor=o).className="OneOf";var e=requireField(),r=requireUtil();function o(i,a,s,l){if(Array.isArray(a)||(s=a,a=void 0),t.call(this,i,s),!(a===void 0||Array.isArray(a)))throw TypeError("fieldNames must be an Array");this.oneof=a||[],this.fieldsArray=[],this.comment=l}o.fromJSON=function(a,s){return new o(a,s.oneof,s.options,s.comment)},o.prototype.toJSON=function(a){var s=a?!!a.keepComments:!1;return r.toObject(["options",this.options,"oneof",this.oneof,"comment",s?this.comment:void 0])};function n(i){if(i.parent)for(var a=0;a<i.fieldsArray.length;++a)i.fieldsArray[a].parent||i.parent.add(i.fieldsArray[a])}return o.prototype.add=function(a){if(!(a instanceof e))throw TypeError("field must be a Field");return a.parent&&a.parent!==this.parent&&a.parent.remove(a),this.oneof.push(a.name),this.fieldsArray.push(a),a.partOf=this,n(this),this},o.prototype.remove=function(a){if(!(a instanceof e))throw TypeError("field must be a Field");var s=this.fieldsArray.indexOf(a);if(s<0)throw Error(a+" is not a member of "+this);return this.fieldsArray.splice(s,1),s=this.oneof.indexOf(a.name),s>-1&&this.oneof.splice(s,1),a.partOf=null,this},o.prototype.onAdd=function(a){t.prototype.onAdd.call(this,a);for(var s=this,l=0;l<this.oneof.length;++l){var u=a.get(this.oneof[l]);u&&!u.partOf&&(u.partOf=s,s.fieldsArray.push(u))}n(this)},o.prototype.onRemove=function(a){for(var s=0,l;s<this.fieldsArray.length;++s)(l=this.fieldsArray[s]).parent&&l.parent.remove(l);t.prototype.onRemove.call(this,a)},o.d=function(){for(var a=new Array(arguments.length),s=0;s<arguments.length;)a[s]=arguments[s++];return function(u,h){r.decorateType(u.constructor).add(new o(h,a)),Object.defineProperty(u,h,{get:r.oneOfGetter(a),set:r.oneOfSetter(a)})}},oneof}var namespace,hasRequiredNamespace;function requireNamespace(){if(hasRequiredNamespace)return namespace;hasRequiredNamespace=1,namespace=l;var t=requireObject();((l.prototype=Object.create(t.prototype)).constructor=l).className="Namespace";var e=requireField(),r=requireUtil(),o=requireOneof(),n,i,a;l.fromJSON=function(c,d){return new l(c,d.options).addJSON(d.nested)};function s(h,c){if(h&&h.length){for(var d={},f=0;f<h.length;++f)d[h[f].name]=h[f].toJSON(c);return d}}l.arrayToJSON=s,l.isReservedId=function(c,d){if(c){for(var f=0;f<c.length;++f)if(typeof c[f]!="string"&&c[f][0]<=d&&c[f][1]>d)return!0}return!1},l.isReservedName=function(c,d){if(c){for(var f=0;f<c.length;++f)if(c[f]===d)return!0}return!1};function l(h,c){t.call(this,h,c),this.nested=void 0,this._nestedArray=null}function u(h){return h._nestedArray=null,h}return Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=r.toArray(this.nested))}}),l.prototype.toJSON=function(c){return r.toObject(["options",this.options,"nested",s(this.nestedArray,c)])},l.prototype.addJSON=function(c){var d=this;if(c)for(var f=Object.keys(c),m=0,p;m<f.length;++m)p=c[f[m]],d.add((p.fields!==void 0?n.fromJSON:p.values!==void 0?a.fromJSON:p.methods!==void 0?i.fromJSON:p.id!==void 0?e.fromJSON:l.fromJSON)(f[m],p));return this},l.prototype.get=function(c){return this.nested&&this.nested[c]||null},l.prototype.getEnum=function(c){if(this.nested&&this.nested[c]instanceof a)return this.nested[c].values;throw Error("no such enum: "+c)},l.prototype.add=function(c){if(!(c instanceof e&&c.extend!==void 0||c instanceof n||c instanceof o||c instanceof a||c instanceof i||c instanceof l))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var d=this.get(c.name);if(d)if(d instanceof l&&c instanceof l&&!(d instanceof n||d instanceof i)){for(var f=d.nestedArray,m=0;m<f.length;++m)c.add(f[m]);this.remove(d),this.nested||(this.nested={}),c.setOptions(d.options,!0)}else throw Error("duplicate name '"+c.name+"' in "+this)}return this.nested[c.name]=c,c.onAdd(this),u(this)},l.prototype.remove=function(c){if(!(c instanceof t))throw TypeError("object must be a ReflectionObject");if(c.parent!==this)throw Error(c+" is not a member of "+this);return delete this.nested[c.name],Object.keys(this.nested).length||(this.nested=void 0),c.onRemove(this),u(this)},l.prototype.define=function(c,d){if(r.isString(c))c=c.split(".");else if(!Array.isArray(c))throw TypeError("illegal path");if(c&&c.length&&c[0]==="")throw Error("path must be relative");for(var f=this;c.length>0;){var m=c.shift();if(f.nested&&f.nested[m]){if(f=f.nested[m],!(f instanceof l))throw Error("path conflicts with non-namespace objects")}else f.add(f=new l(m))}return d&&f.addJSON(d),f},l.prototype.resolveAll=function(){for(var c=this.nestedArray,d=0;d<c.length;)c[d]instanceof l?c[d++].resolveAll():c[d++].resolve();return this.resolve()},l.prototype.lookup=function(c,d,f){if(typeof d=="boolean"?(f=d,d=void 0):d&&!Array.isArray(d)&&(d=[d]),r.isString(c)&&c.length){if(c===".")return this.root;c=c.split(".")}else if(!c.length)return this;if(c[0]==="")return this.root.lookup(c.slice(1),d);var m=this.get(c[0]);if(m){if(c.length===1){if(!d||d.indexOf(m.constructor)>-1)return m}else if(m instanceof l&&(m=m.lookup(c.slice(1),d,!0)))return m}else for(var p=0;p<this.nestedArray.length;++p)if(this._nestedArray[p]instanceof l&&(m=this._nestedArray[p].lookup(c,d,!0)))return m;return this.parent===null||f?null:this.parent.lookup(c,d)},l.prototype.lookupType=function(c){var d=this.lookup(c,[n]);if(!d)throw Error("no such type: "+c);return d},l.prototype.lookupEnum=function(c){var d=this.lookup(c,[a]);if(!d)throw Error("no such Enum '"+c+"' in "+this);return d},l.prototype.lookupTypeOrEnum=function(c){var d=this.lookup(c,[n,a]);if(!d)throw Error("no such Type or Enum '"+c+"' in "+this);return d},l.prototype.lookupService=function(c){var d=this.lookup(c,[i]);if(!d)throw Error("no such Service '"+c+"' in "+this);return d},l._configure=function(h,c,d){n=h,i=c,a=d},namespace}var mapfield,hasRequiredMapfield;function requireMapfield(){if(hasRequiredMapfield)return mapfield;hasRequiredMapfield=1,mapfield=o;var t=requireField();((o.prototype=Object.create(t.prototype)).constructor=o).className="MapField";var e=requireTypes(),r=requireUtil();function o(n,i,a,s,l,u){if(t.call(this,n,i,s,void 0,void 0,l,u),!r.isString(a))throw TypeError("keyType must be a string");this.keyType=a,this.resolvedKeyType=null,this.map=!0}return o.fromJSON=function(i,a){return new o(i,a.id,a.keyType,a.type,a.options,a.comment)},o.prototype.toJSON=function(i){var a=i?!!i.keepComments:!1;return r.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",a?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(e.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return t.prototype.resolve.call(this)},o.d=function(i,a,s){return typeof s=="function"?s=r.decorateType(s).name:s&&typeof s=="object"&&(s=r.decorateEnum(s).name),function(u,h){r.decorateType(u.constructor).add(new o(h,i,a,s))}},mapfield}var method,hasRequiredMethod;function requireMethod(){if(hasRequiredMethod)return method;hasRequiredMethod=1,method=r;var t=requireObject();((r.prototype=Object.create(t.prototype)).constructor=r).className="Method";var e=requireUtil();function r(o,n,i,a,s,l,u,h,c){if(e.isObject(s)?(u=s,s=l=void 0):e.isObject(l)&&(u=l,l=void 0),!(n===void 0||e.isString(n)))throw TypeError("type must be a string");if(!e.isString(i))throw TypeError("requestType must be a string");if(!e.isString(a))throw TypeError("responseType must be a string");t.call(this,o,u),this.type=n||"rpc",this.requestType=i,this.requestStream=s?!0:void 0,this.responseType=a,this.responseStream=l?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=h,this.parsedOptions=c}return r.fromJSON=function(n,i){return new r(n,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},r.prototype.toJSON=function(n){var i=n?!!n.keepComments:!1;return e.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",i?this.comment:void 0,"parsedOptions",this.parsedOptions])},r.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),t.prototype.resolve.call(this))},method}var service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=n;var t=requireNamespace();((n.prototype=Object.create(t.prototype)).constructor=n).className="Service";var e=requireMethod(),r=requireUtil(),o=rpc;function n(a,s){t.call(this,a,s),this.methods={},this._methodsArray=null}n.fromJSON=function(s,l){var u=new n(s,l.options);if(l.methods)for(var h=Object.keys(l.methods),c=0;c<h.length;++c)u.add(e.fromJSON(h[c],l.methods[h[c]]));return l.nested&&u.addJSON(l.nested),u.comment=l.comment,u},n.prototype.toJSON=function(s){var l=t.prototype.toJSON.call(this,s),u=s?!!s.keepComments:!1;return r.toObject(["options",l&&l.options||void 0,"methods",t.arrayToJSON(this.methodsArray,s)||{},"nested",l&&l.nested||void 0,"comment",u?this.comment:void 0])},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=r.toArray(this.methods))}});function i(a){return a._methodsArray=null,a}return n.prototype.get=function(s){return this.methods[s]||t.prototype.get.call(this,s)},n.prototype.resolveAll=function(){for(var s=this.methodsArray,l=0;l<s.length;++l)s[l].resolve();return t.prototype.resolve.call(this)},n.prototype.add=function(s){if(this.get(s.name))throw Error("duplicate name '"+s.name+"' in "+this);return s instanceof e?(this.methods[s.name]=s,s.parent=this,i(this)):t.prototype.add.call(this,s)},n.prototype.remove=function(s){if(s instanceof e){if(this.methods[s.name]!==s)throw Error(s+" is not a member of "+this);return delete this.methods[s.name],s.parent=null,i(this)}return t.prototype.remove.call(this,s)},n.prototype.create=function(s,l,u){for(var h=new o.Service(s,l,u),c=0,d;c<this.methodsArray.length;++c){var f=r.lcFirst((d=this._methodsArray[c]).resolve().name).replace(/[^$\w_]/g,"");h[f]=r.codegen(["r","c"],r.isReserved(f)?f+"_":f)("return this.rpcCall(m,q,s,r,c)")({m:d,q:d.resolvedRequestType.ctor,s:d.resolvedResponseType.ctor})}return h},service}var message=Message,util$1=requireMinimal();function Message(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)this[e[r]]=t[e[r]]}Message.create=function t(e){return this.$type.create(e)};Message.encode=function t(e,r){return this.$type.encode(e,r)};Message.encodeDelimited=function t(e,r){return this.$type.encodeDelimited(e,r)};Message.decode=function t(e){return this.$type.decode(e)};Message.decodeDelimited=function t(e){return this.$type.decodeDelimited(e)};Message.verify=function t(e){return this.$type.verify(e)};Message.fromObject=function t(e){return this.$type.fromObject(e)};Message.toObject=function t(e,r){return this.$type.toObject(e,r)};Message.prototype.toJSON=function t(){return this.$type.toObject(this,util$1.toJSONOptions)};var decoder_1,hasRequiredDecoder;function requireDecoder(){if(hasRequiredDecoder)return decoder_1;hasRequiredDecoder=1,decoder_1=n;var t=require_enum(),e=requireTypes(),r=requireUtil();function o(i){return"missing required '"+i.name+"'"}function n(i){var a=r.codegen(["r","l"],i.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(i.fieldsArray.filter(function(d){return d.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");i.group&&a("if((t&7)===4)")("break"),a("switch(t>>>3){");for(var s=0;s<i.fieldsArray.length;++s){var l=i._fieldsArray[s].resolve(),u=l.resolvedType instanceof t?"int32":l.type,h="m"+r.safeProp(l.name);a("case %i: {",l.id),l.map?(a("if(%s===util.emptyObject)",h)("%s={}",h)("var c2 = r.uint32()+r.pos"),e.defaults[l.keyType]!==void 0?a("k=%j",e.defaults[l.keyType]):a("k=null"),e.defaults[u]!==void 0?a("value=%j",e.defaults[u]):a("value=null"),a("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",l.keyType)("case 2:"),e.basic[u]===void 0?a("value=types[%i].decode(r,r.uint32())",s):a("value=r.%s()",u),a("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),e.long[l.keyType]!==void 0?a('%s[typeof k==="object"?util.longToHash(k):k]=value',h):a("%s[k]=value",h)):l.repeated?(a("if(!(%s&&%s.length))",h,h)("%s=[]",h),e.packed[u]!==void 0&&a("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,u)("}else"),e.basic[u]===void 0?a(l.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",h,s):a("%s.push(r.%s())",h,u)):e.basic[u]===void 0?a(l.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",h,s):a("%s=r.%s()",h,u),a("break")("}")}for(a("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<i._fieldsArray.length;++s){var c=i._fieldsArray[s];c.required&&a("if(!m.hasOwnProperty(%j))",c.name)("throw util.ProtocolError(%j,{instance:m})",o(c))}return a("return m")}return decoder_1}var verifier_1,hasRequiredVerifier;function requireVerifier(){if(hasRequiredVerifier)return verifier_1;hasRequiredVerifier=1,verifier_1=i;var t=require_enum(),e=requireUtil();function r(a,s){return a.name+": "+s+(a.repeated&&s!=="array"?"[]":a.map&&s!=="object"?"{k:"+a.keyType+"}":"")+" expected"}function o(a,s,l,u){if(s.resolvedType)if(s.resolvedType instanceof t){a("switch(%s){",u)("default:")("return%j",r(s,"enum value"));for(var h=Object.keys(s.resolvedType.values),c=0;c<h.length;++c)a("case %i:",s.resolvedType.values[h[c]]);a("break")("}")}else a("{")("var e=types[%i].verify(%s);",l,u)("if(e)")("return%j+e",s.name+".")("}");else switch(s.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":a("if(!util.isInteger(%s))",u)("return%j",r(s,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":a("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",u,u,u,u)("return%j",r(s,"integer|Long"));break;case"float":case"double":a('if(typeof %s!=="number")',u)("return%j",r(s,"number"));break;case"bool":a('if(typeof %s!=="boolean")',u)("return%j",r(s,"boolean"));break;case"string":a("if(!util.isString(%s))",u)("return%j",r(s,"string"));break;case"bytes":a('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',u,u,u)("return%j",r(s,"buffer"));break}return a}function n(a,s,l){switch(s.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":a("if(!util.key32Re.test(%s))",l)("return%j",r(s,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":a("if(!util.key64Re.test(%s))",l)("return%j",r(s,"integer|Long key"));break;case"bool":a("if(!util.key2Re.test(%s))",l)("return%j",r(s,"boolean key"));break}return a}function i(a){var s=e.codegen(["m"],a.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),l=a.oneofsArray,u={};l.length&&s("var p={}");for(var h=0;h<a.fieldsArray.length;++h){var c=a._fieldsArray[h].resolve(),d="m"+e.safeProp(c.name);if(c.optional&&s("if(%s!=null&&m.hasOwnProperty(%j)){",d,c.name),c.map)s("if(!util.isObject(%s))",d)("return%j",r(c,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),n(s,c,"k[i]"),o(s,c,h,d+"[k[i]]")("}");else if(c.repeated)s("if(!Array.isArray(%s))",d)("return%j",r(c,"array"))("for(var i=0;i<%s.length;++i){",d),o(s,c,h,d+"[i]")("}");else{if(c.partOf){var f=e.safeProp(c.partOf.name);u[c.partOf.name]===1&&s("if(p%s===1)",f)("return%j",c.partOf.name+": multiple values"),u[c.partOf.name]=1,s("p%s=1",f)}o(s,c,h,d)}c.optional&&s("}")}return s("return null")}return verifier_1}var converter={},hasRequiredConverter;function requireConverter(){return hasRequiredConverter||(hasRequiredConverter=1,function(t){var e=t,r=require_enum(),o=requireUtil();function n(a,s,l,u){var h=!1;if(s.resolvedType)if(s.resolvedType instanceof r){a("switch(d%s){",u);for(var c=s.resolvedType.values,d=Object.keys(c),f=0;f<d.length;++f)c[d[f]]===s.typeDefault&&!h&&(a("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',u,u,u),s.repeated||a("break"),h=!0),a("case%j:",d[f])("case %i:",c[d[f]])("m%s=%j",u,c[d[f]])("break");a("}")}else a('if(typeof d%s!=="object")',u)("throw TypeError(%j)",s.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",u,l,u);else{var m=!1;switch(s.type){case"double":case"float":a("m%s=Number(d%s)",u,u);break;case"uint32":case"fixed32":a("m%s=d%s>>>0",u,u);break;case"int32":case"sint32":case"sfixed32":a("m%s=d%s|0",u,u);break;case"uint64":m=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":a("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",u,u,m)('else if(typeof d%s==="string")',u)("m%s=parseInt(d%s,10)",u,u)('else if(typeof d%s==="number")',u)("m%s=d%s",u,u)('else if(typeof d%s==="object")',u)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",u,u,u,m?"true":"");break;case"bytes":a('if(typeof d%s==="string")',u)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",u,u,u)("else if(d%s.length >= 0)",u)("m%s=d%s",u,u);break;case"string":a("m%s=String(d%s)",u,u);break;case"bool":a("m%s=Boolean(d%s)",u,u);break}}return a}e.fromObject=function(s){var l=s.fieldsArray,u=o.codegen(["d"],s.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!l.length)return u("return new this.ctor");u("var m=new this.ctor");for(var h=0;h<l.length;++h){var c=l[h].resolve(),d=o.safeProp(c.name);c.map?(u("if(d%s){",d)('if(typeof d%s!=="object")',d)("throw TypeError(%j)",c.fullName+": object expected")("m%s={}",d)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",d),n(u,c,h,d+"[ks[i]]")("}")("}")):c.repeated?(u("if(d%s){",d)("if(!Array.isArray(d%s))",d)("throw TypeError(%j)",c.fullName+": array expected")("m%s=[]",d)("for(var i=0;i<d%s.length;++i){",d),n(u,c,h,d+"[i]")("}")("}")):(c.resolvedType instanceof r||u("if(d%s!=null){",d),n(u,c,h,d),c.resolvedType instanceof r||u("}"))}return u("return m")};function i(a,s,l,u){if(s.resolvedType)s.resolvedType instanceof r?a("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",u,l,u,u,l,u,u):a("d%s=types[%i].toObject(m%s,o)",u,l,u);else{var h=!1;switch(s.type){case"double":case"float":a("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",u,u,u,u);break;case"uint64":h=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":a('if(typeof m%s==="number")',u)("d%s=o.longs===String?String(m%s):m%s",u,u,u)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",u,u,u,u,h?"true":"",u);break;case"bytes":a("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",u,u,u,u,u);break;default:a("d%s=m%s",u,u);break}}return a}e.toObject=function(s){var l=s.fieldsArray.slice().sort(o.compareFieldsById);if(!l.length)return o.codegen()("return {}");for(var u=o.codegen(["m","o"],s.name+"$toObject")("if(!o)")("o={}")("var d={}"),h=[],c=[],d=[],f=0;f<l.length;++f)l[f].partOf||(l[f].resolve().repeated?h:l[f].map?c:d).push(l[f]);if(h.length){for(u("if(o.arrays||o.defaults){"),f=0;f<h.length;++f)u("d%s=[]",o.safeProp(h[f].name));u("}")}if(c.length){for(u("if(o.objects||o.defaults){"),f=0;f<c.length;++f)u("d%s={}",o.safeProp(c[f].name));u("}")}if(d.length){for(u("if(o.defaults){"),f=0;f<d.length;++f){var m=d[f],p=o.safeProp(m.name);if(m.resolvedType instanceof r)u("d%s=o.enums===String?%j:%j",p,m.resolvedType.valuesById[m.typeDefault],m.typeDefault);else if(m.long)u("if(util.Long){")("var n=new util.Long(%i,%i,%j)",m.typeDefault.low,m.typeDefault.high,m.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",p)("}else")("d%s=o.longs===String?%j:%i",p,m.typeDefault.toString(),m.typeDefault.toNumber());else if(m.bytes){var y="["+Array.prototype.slice.call(m.typeDefault).join(",")+"]";u("if(o.bytes===String)d%s=%j",p,String.fromCharCode.apply(String,m.typeDefault))("else{")("d%s=%s",p,y)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",p,p)("}")}else u("d%s=%j",p,m.typeDefault)}u("}")}var v=!1;for(f=0;f<l.length;++f){var m=l[f],g=s._fieldsArray.indexOf(m),p=o.safeProp(m.name);m.map?(v||(v=!0,u("var ks2")),u("if(m%s&&(ks2=Object.keys(m%s)).length){",p,p)("d%s={}",p)("for(var j=0;j<ks2.length;++j){"),i(u,m,g,p+"[ks2[j]]")("}")):m.repeated?(u("if(m%s&&m%s.length){",p,p)("d%s=[]",p)("for(var j=0;j<m%s.length;++j){",p),i(u,m,g,p+"[j]")("}")):(u("if(m%s!=null&&m.hasOwnProperty(%j)){",p,m.name),i(u,m,g,p),m.partOf&&u("if(o.oneofs)")("d%s=%j",o.safeProp(m.partOf.name),m.name)),u("}")}return u("return d")}}(converter)),converter}var wrappers={};(function(t){var e=t,r=message;e[".google.protobuf.Any"]={fromObject:function(o){if(o&&o["@type"]){var n=o["@type"].substring(o["@type"].lastIndexOf("/")+1),i=this.lookup(n);if(i){var a=o["@type"].charAt(0)==="."?o["@type"].slice(1):o["@type"];return a.indexOf("/")===-1&&(a="/"+a),this.create({type_url:a,value:i.encode(i.fromObject(o)).finish()})}}return this.fromObject(o)},toObject:function(o,n){var i="type.googleapis.com/",a="",s="";if(n&&n.json&&o.type_url&&o.value){s=o.type_url.substring(o.type_url.lastIndexOf("/")+1),a=o.type_url.substring(0,o.type_url.lastIndexOf("/")+1);var l=this.lookup(s);l&&(o=l.decode(o.value))}if(!(o instanceof this.ctor)&&o instanceof r){var u=o.$type.toObject(o,n),h=o.$type.fullName[0]==="."?o.$type.fullName.slice(1):o.$type.fullName;return a===""&&(a=i),s=a+h,u["@type"]=s,u}return this.toObject(o,n)}}})(wrappers);var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1,type=p;var t=requireNamespace();((p.prototype=Object.create(t.prototype)).constructor=p).className="Type";var e=require_enum(),r=requireOneof(),o=requireField(),n=requireMapfield(),i=requireService(),a=message,s=reader,l=writer,u=requireUtil(),h=requireEncoder(),c=requireDecoder(),d=requireVerifier(),f=requireConverter(),m=wrappers;function p(v,g){t.call(this,v,g),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(p.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var v=Object.keys(this.fields),g=0;g<v.length;++g){var _=this.fields[v[g]],b=_.id;if(this._fieldsById[b])throw Error("duplicate id "+b+" in "+this);this._fieldsById[b]=_}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=u.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=u.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=p.generateConstructor(this)())},set:function(v){var g=v.prototype;g instanceof a||((v.prototype=new a).constructor=v,u.merge(v.prototype,g)),v.$type=v.prototype.$type=this,u.merge(v,a,!0),this._ctor=v;for(var _=0;_<this.fieldsArray.length;++_)this._fieldsArray[_].resolve();var b={};for(_=0;_<this.oneofsArray.length;++_)b[this._oneofsArray[_].resolve().name]={get:u.oneOfGetter(this._oneofsArray[_].oneof),set:u.oneOfSetter(this._oneofsArray[_].oneof)};_&&Object.defineProperties(v.prototype,b)}}}),p.generateConstructor=function(g){for(var _=u.codegen(["p"],g.name),b=0,w;b<g.fieldsArray.length;++b)(w=g._fieldsArray[b]).map?_("this%s={}",u.safeProp(w.name)):w.repeated&&_("this%s=[]",u.safeProp(w.name));return _("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function y(v){return v._fieldsById=v._fieldsArray=v._oneofsArray=null,delete v.encode,delete v.decode,delete v.verify,v}return p.fromJSON=function(g,_){var b=new p(g,_.options);b.extensions=_.extensions,b.reserved=_.reserved;for(var w=Object.keys(_.fields),k=0;k<w.length;++k)b.add((typeof _.fields[w[k]].keyType<"u"?n.fromJSON:o.fromJSON)(w[k],_.fields[w[k]]));if(_.oneofs)for(w=Object.keys(_.oneofs),k=0;k<w.length;++k)b.add(r.fromJSON(w[k],_.oneofs[w[k]]));if(_.nested)for(w=Object.keys(_.nested),k=0;k<w.length;++k){var x=_.nested[w[k]];b.add((x.id!==void 0?o.fromJSON:x.fields!==void 0?p.fromJSON:x.values!==void 0?e.fromJSON:x.methods!==void 0?i.fromJSON:t.fromJSON)(w[k],x))}return _.extensions&&_.extensions.length&&(b.extensions=_.extensions),_.reserved&&_.reserved.length&&(b.reserved=_.reserved),_.group&&(b.group=!0),_.comment&&(b.comment=_.comment),b},p.prototype.toJSON=function(g){var _=t.prototype.toJSON.call(this,g),b=g?!!g.keepComments:!1;return u.toObject(["options",_&&_.options||void 0,"oneofs",t.arrayToJSON(this.oneofsArray,g),"fields",t.arrayToJSON(this.fieldsArray.filter(function(w){return!w.declaringField}),g)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",_&&_.nested||void 0,"comment",b?this.comment:void 0])},p.prototype.resolveAll=function(){for(var g=this.fieldsArray,_=0;_<g.length;)g[_++].resolve();var b=this.oneofsArray;for(_=0;_<b.length;)b[_++].resolve();return t.prototype.resolveAll.call(this)},p.prototype.get=function(g){return this.fields[g]||this.oneofs&&this.oneofs[g]||this.nested&&this.nested[g]||null},p.prototype.add=function(g){if(this.get(g.name))throw Error("duplicate name '"+g.name+"' in "+this);if(g instanceof o&&g.extend===void 0){if(this._fieldsById?this._fieldsById[g.id]:this.fieldsById[g.id])throw Error("duplicate id "+g.id+" in "+this);if(this.isReservedId(g.id))throw Error("id "+g.id+" is reserved in "+this);if(this.isReservedName(g.name))throw Error("name '"+g.name+"' is reserved in "+this);return g.parent&&g.parent.remove(g),this.fields[g.name]=g,g.message=this,g.onAdd(this),y(this)}return g instanceof r?(this.oneofs||(this.oneofs={}),this.oneofs[g.name]=g,g.onAdd(this),y(this)):t.prototype.add.call(this,g)},p.prototype.remove=function(g){if(g instanceof o&&g.extend===void 0){if(!this.fields||this.fields[g.name]!==g)throw Error(g+" is not a member of "+this);return delete this.fields[g.name],g.parent=null,g.onRemove(this),y(this)}if(g instanceof r){if(!this.oneofs||this.oneofs[g.name]!==g)throw Error(g+" is not a member of "+this);return delete this.oneofs[g.name],g.parent=null,g.onRemove(this),y(this)}return t.prototype.remove.call(this,g)},p.prototype.isReservedId=function(g){return t.isReservedId(this.reserved,g)},p.prototype.isReservedName=function(g){return t.isReservedName(this.reserved,g)},p.prototype.create=function(g){return new this.ctor(g)},p.prototype.setup=function(){for(var g=this.fullName,_=[],b=0;b<this.fieldsArray.length;++b)_.push(this._fieldsArray[b].resolve().resolvedType);this.encode=h(this)({Writer:l,types:_,util:u}),this.decode=c(this)({Reader:s,types:_,util:u}),this.verify=d(this)({types:_,util:u}),this.fromObject=f.fromObject(this)({types:_,util:u}),this.toObject=f.toObject(this)({types:_,util:u});var w=m[g];if(w){var k=Object.create(this);k.fromObject=this.fromObject,this.fromObject=w.fromObject.bind(k),k.toObject=this.toObject,this.toObject=w.toObject.bind(k)}return this},p.prototype.encode=function(g,_){return this.setup().encode(g,_)},p.prototype.encodeDelimited=function(g,_){return this.encode(g,_&&_.len?_.fork():_).ldelim()},p.prototype.decode=function(g,_){return this.setup().decode(g,_)},p.prototype.decodeDelimited=function(g){return g instanceof s||(g=s.create(g)),this.decode(g,g.uint32())},p.prototype.verify=function(g){return this.setup().verify(g)},p.prototype.fromObject=function(g){return this.setup().fromObject(g)},p.prototype.toObject=function(g,_){return this.setup().toObject(g,_)},p.d=function(g){return function(b){u.decorateType(b,g)}},type}var root,hasRequiredRoot;function requireRoot(){if(hasRequiredRoot)return root;hasRequiredRoot=1,root=l;var t=requireNamespace();((l.prototype=Object.create(t.prototype)).constructor=l).className="Root";var e=requireField(),r=require_enum(),o=requireOneof(),n=requireUtil(),i,a,s;function l(d){t.call(this,"",d),this.deferred=[],this.files=[]}l.fromJSON=function(f,m){return m||(m=new l),f.options&&m.setOptions(f.options),m.addJSON(f.nested)},l.prototype.resolvePath=n.path.resolve,l.prototype.fetch=n.fetch;function u(){}l.prototype.load=function d(f,m,p){typeof m=="function"&&(p=m,m=void 0);var y=this;if(!p)return n.asPromise(d,y,f,m);var v=p===u;function g(I,L){if(p){var M=p;if(p=null,v)throw I;M(I,L)}}function _(I){var L=I.lastIndexOf("google/protobuf/");if(L>-1){var M=I.substring(L);if(M in s)return M}return null}function b(I,L){try{if(n.isString(L)&&L.charAt(0)==="{"&&(L=JSON.parse(L)),!n.isString(L))y.setOptions(L.options).addJSON(L.nested);else{a.filename=I;var M=a(L,y,m),N,U=0;if(M.imports)for(;U<M.imports.length;++U)(N=_(M.imports[U])||y.resolvePath(I,M.imports[U]))&&w(N);if(M.weakImports)for(U=0;U<M.weakImports.length;++U)(N=_(M.weakImports[U])||y.resolvePath(I,M.weakImports[U]))&&w(N,!0)}}catch(S){g(S)}!v&&!k&&g(null,y)}function w(I,L){if(I=_(I)||I,!(y.files.indexOf(I)>-1)){if(y.files.push(I),I in s){v?b(I,s[I]):(++k,setTimeout(function(){--k,b(I,s[I])}));return}if(v){var M;try{M=n.fs.readFileSync(I).toString("utf8")}catch(N){L||g(N);return}b(I,M)}else++k,y.fetch(I,function(N,U){if(--k,!!p){if(N){L?k||g(null,y):g(N);return}b(I,U)}})}}var k=0;n.isString(f)&&(f=[f]);for(var x=0,D;x<f.length;++x)(D=y.resolvePath("",f[x]))&&w(D);if(v)return y;k||g(null,y)},l.prototype.loadSync=function(f,m){if(!n.isNode)throw Error("not supported");return this.load(f,m,u)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(f){return"'extend "+f.extend+"' in "+f.parent.fullName}).join(", "));return t.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function c(d,f){var m=f.parent.lookup(f.extend);if(m){var p=new e(f.fullName,f.id,f.type,f.rule,void 0,f.options);return m.get(p.name)||(p.declaringField=f,f.extensionField=p,m.add(p)),!0}return!1}return l.prototype._handleAdd=function(f){if(f instanceof e)f.extend!==void 0&&!f.extensionField&&(c(this,f)||this.deferred.push(f));else if(f instanceof r)h.test(f.name)&&(f.parent[f.name]=f.values);else if(!(f instanceof o)){if(f instanceof i)for(var m=0;m<this.deferred.length;)c(this,this.deferred[m])?this.deferred.splice(m,1):++m;for(var p=0;p<f.nestedArray.length;++p)this._handleAdd(f._nestedArray[p]);h.test(f.name)&&(f.parent[f.name]=f)}},l.prototype._handleRemove=function(f){if(f instanceof e){if(f.extend!==void 0)if(f.extensionField)f.extensionField.parent.remove(f.extensionField),f.extensionField=null;else{var m=this.deferred.indexOf(f);m>-1&&this.deferred.splice(m,1)}}else if(f instanceof r)h.test(f.name)&&delete f.parent[f.name];else if(f instanceof t){for(var p=0;p<f.nestedArray.length;++p)this._handleRemove(f._nestedArray[p]);h.test(f.name)&&delete f.parent[f.name]}},l._configure=function(d,f,m){i=d,a=f,s=m},root}var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util$2.exports;hasRequiredUtil=1;var t=util$2.exports=requireMinimal(),e=roots,r,o;t.codegen=codegen_1,t.fetch=fetch_1,t.path=path,t.fs=t.inquire("fs"),t.toArray=function(u){if(u){for(var h=Object.keys(u),c=new Array(h.length),d=0;d<h.length;)c[d]=u[h[d++]];return c}return[]},t.toObject=function(u){for(var h={},c=0;c<u.length;){var d=u[c++],f=u[c++];f!==void 0&&(h[d]=f)}return h};var n=/\\/g,i=/"/g;t.isReserved=function(u){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(u)},t.safeProp=function(u){return!/^[$\w_]+$/.test(u)||t.isReserved(u)?'["'+u.replace(n,"\\\\").replace(i,'\\"')+'"]':"."+u},t.ucFirst=function(u){return u.charAt(0).toUpperCase()+u.substring(1)};var a=/_([a-z])/g;t.camelCase=function(u){return u.substring(0,1)+u.substring(1).replace(a,function(h,c){return c.toUpperCase()})},t.compareFieldsById=function(u,h){return u.id-h.id},t.decorateType=function(u,h){if(u.$type)return h&&u.$type.name!==h&&(t.decorateRoot.remove(u.$type),u.$type.name=h,t.decorateRoot.add(u.$type)),u.$type;r||(r=requireType());var c=new r(h||u.name);return t.decorateRoot.add(c),c.ctor=u,Object.defineProperty(u,"$type",{value:c,enumerable:!1}),Object.defineProperty(u.prototype,"$type",{value:c,enumerable:!1}),c};var s=0;return t.decorateEnum=function(u){if(u.$type)return u.$type;o||(o=require_enum());var h=new o("Enum"+s++,u);return t.decorateRoot.add(h),Object.defineProperty(u,"$type",{value:h,enumerable:!1}),h},t.setProperty=function(u,h,c){function d(f,m,p){var y=m.shift();if(y==="__proto__"||y==="prototype")return f;if(m.length>0)f[y]=d(f[y]||{},m,p);else{var v=f[y];v&&(p=[].concat(v).concat(p)),f[y]=p}return f}if(typeof u!="object")throw TypeError("dst must be an object");if(!h)throw TypeError("path must be specified");return h=h.split("."),d(u,h,c)},Object.defineProperty(t,"decorateRoot",{get:function(){return e.decorated||(e.decorated=new(requireRoot()))}}),util$2.exports}var object,hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1,object=r,r.className="ReflectionObject";var t=requireUtil(),e;function r(o,n){if(!t.isString(o))throw TypeError("name must be a string");if(n&&!t.isObject(n))throw TypeError("options must be an object");this.options=n,this.parsedOptions=null,this.name=o,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(r.prototype,{root:{get:function(){for(var o=this;o.parent!==null;)o=o.parent;return o}},fullName:{get:function(){for(var o=[this.name],n=this.parent;n;)o.unshift(n.name),n=n.parent;return o.join(".")}}}),r.prototype.toJSON=function(){throw Error()},r.prototype.onAdd=function(n){this.parent&&this.parent!==n&&this.parent.remove(this),this.parent=n,this.resolved=!1;var i=n.root;i instanceof e&&i._handleAdd(this)},r.prototype.onRemove=function(n){var i=n.root;i instanceof e&&i._handleRemove(this),this.parent=null,this.resolved=!1},r.prototype.resolve=function(){return this.resolved?this:(this.root instanceof e&&(this.resolved=!0),this)},r.prototype.getOption=function(n){if(this.options)return this.options[n]},r.prototype.setOption=function(n,i,a){return(!a||!this.options||this.options[n]===void 0)&&((this.options||(this.options={}))[n]=i),this},r.prototype.setParsedOption=function(n,i,a){this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(a){var l=s.find(function(c){return Object.prototype.hasOwnProperty.call(c,n)});if(l){var u=l[n];t.setProperty(u,a,i)}else l={},l[n]=t.setProperty({},a,i),s.push(l)}else{var h={};h[n]=i,s.push(h)}return this},r.prototype.setOptions=function(n,i){if(n)for(var a=Object.keys(n),s=0;s<a.length;++s)this.setOption(a[s],n[a[s]],i);return this},r.prototype.toString=function(){var n=this.constructor.className,i=this.fullName;return i.length?n+" "+i:n},r._configure=function(o){e=o},object}var _enum,hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,_enum=o;var t=requireObject();((o.prototype=Object.create(t.prototype)).constructor=o).className="Enum";var e=requireNamespace(),r=requireUtil();function o(n,i,a,s,l,u){if(t.call(this,n,a),i&&typeof i!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=s,this.comments=l||{},this.valuesOptions=u,this.reserved=void 0,i)for(var h=Object.keys(i),c=0;c<h.length;++c)typeof i[h[c]]=="number"&&(this.valuesById[this.values[h[c]]=i[h[c]]]=h[c])}return o.fromJSON=function(i,a){var s=new o(i,a.values,a.options,a.comment,a.comments);return s.reserved=a.reserved,s},o.prototype.toJSON=function(i){var a=i?!!i.keepComments:!1;return r.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",a?this.comment:void 0,"comments",a?this.comments:void 0])},o.prototype.add=function(i,a,s,l){if(!r.isString(i))throw TypeError("name must be a string");if(!r.isInteger(a))throw TypeError("id must be an integer");if(this.values[i]!==void 0)throw Error("duplicate name '"+i+"' in "+this);if(this.isReservedId(a))throw Error("id "+a+" is reserved in "+this);if(this.isReservedName(i))throw Error("name '"+i+"' is reserved in "+this);if(this.valuesById[a]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+a+" in "+this);this.values[i]=a}else this.valuesById[this.values[i]=a]=i;return l&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[i]=l||null),this.comments[i]=s||null,this},o.prototype.remove=function(i){if(!r.isString(i))throw TypeError("name must be a string");var a=this.values[i];if(a==null)throw Error("name '"+i+"' does not exist in "+this);return delete this.valuesById[a],delete this.values[i],delete this.comments[i],this.valuesOptions&&delete this.valuesOptions[i],this},o.prototype.isReservedId=function(i){return e.isReservedId(this.reserved,i)},o.prototype.isReservedName=function(i){return e.isReservedName(this.reserved,i)},_enum}var encoder_1,hasRequiredEncoder;function requireEncoder(){if(hasRequiredEncoder)return encoder_1;hasRequiredEncoder=1,encoder_1=n;var t=require_enum(),e=requireTypes(),r=requireUtil();function o(i,a,s,l){return a.resolvedType.group?i("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",s,l,(a.id<<3|3)>>>0,(a.id<<3|4)>>>0):i("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",s,l,(a.id<<3|2)>>>0)}function n(i){for(var a=r.codegen(["m","w"],i.name+"$encode")("if(!w)")("w=Writer.create()"),s,l,u=i.fieldsArray.slice().sort(r.compareFieldsById),s=0;s<u.length;++s){var h=u[s].resolve(),c=i._fieldsArray.indexOf(h),d=h.resolvedType instanceof t?"int32":h.type,f=e.basic[d];l="m"+r.safeProp(h.name),h.map?(a("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",l,h.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",l)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(h.id<<3|2)>>>0,8|e.mapKey[h.keyType],h.keyType),f===void 0?a("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",c,l):a(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,d,l),a("}")("}")):h.repeated?(a("if(%s!=null&&%s.length){",l,l),h.packed&&e.packed[d]!==void 0?a("w.uint32(%i).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",l)("w.%s(%s[i])",d,l)("w.ldelim()"):(a("for(var i=0;i<%s.length;++i)",l),f===void 0?o(a,h,c,l+"[i]"):a("w.uint32(%i).%s(%s[i])",(h.id<<3|f)>>>0,d,l)),a("}")):(h.optional&&a("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",l,h.name),f===void 0?o(a,h,c,l):a("w.uint32(%i).%s(%s)",(h.id<<3|f)>>>0,d,l))}return a("return w")}return encoder_1}var protobuf$1=indexLight.exports=indexMinimal;protobuf$1.build="light";function load(t,e,r){return typeof e=="function"?(r=e,e=new protobuf$1.Root):e||(e=new protobuf$1.Root),e.load(t,r)}protobuf$1.load=load;function loadSync(t,e){return e||(e=new protobuf$1.Root),e.loadSync(t)}protobuf$1.loadSync=loadSync;protobuf$1.encoder=requireEncoder();protobuf$1.decoder=requireDecoder();protobuf$1.verifier=requireVerifier();protobuf$1.converter=requireConverter();protobuf$1.ReflectionObject=requireObject();protobuf$1.Namespace=requireNamespace();protobuf$1.Root=requireRoot();protobuf$1.Enum=require_enum();protobuf$1.Type=requireType();protobuf$1.Field=requireField();protobuf$1.OneOf=requireOneof();protobuf$1.MapField=requireMapfield();protobuf$1.Service=requireService();protobuf$1.Method=requireMethod();protobuf$1.Message=message;protobuf$1.wrappers=wrappers;protobuf$1.types=requireTypes();protobuf$1.util=requireUtil();protobuf$1.ReflectionObject._configure(protobuf$1.Root);protobuf$1.Namespace._configure(protobuf$1.Type,protobuf$1.Service,protobuf$1.Enum);protobuf$1.Root._configure(protobuf$1.Type);protobuf$1.Field._configure(protobuf$1.Type);var indexLightExports=indexLight.exports,tokenize_1=tokenize$1,delimRe=/[\s{}=;:[\],'"()<>]/g,stringDoubleRe=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,stringSingleRe=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,setCommentRe=/^ *[*/]+ */,setCommentAltRe=/^\s*\*?\/*/,setCommentSplitRe=/\n/g,whitespaceRe=/\s/,unescapeRe=/\\(.?)/g,unescapeMap={0:"\0",r:"\r",n:`
`,t:" "};function unescape(t){return t.replace(unescapeRe,function(e,r){switch(r){case"\\":case"":return r;default:return unescapeMap[r]||""}})}tokenize$1.unescape=unescape;function tokenize$1(t,e){t=t.toString();var r=0,o=t.length,n=1,i=0,a={},s=[],l=null;function u(b){return Error("illegal "+b+" (line "+n+")")}function h(){var b=l==="'"?stringSingleRe:stringDoubleRe;b.lastIndex=r-1;var w=b.exec(t);if(!w)throw u("string");return r=b.lastIndex,y(l),l=null,unescape(w[1])}function c(b){return t.charAt(b)}function d(b,w,k){var x={type:t.charAt(b++),lineEmpty:!1,leading:k},D;e?D=2:D=3;var I=b-D,L;do if(--I<0||(L=t.charAt(I))===`
`){x.lineEmpty=!0;break}while(L===" "||L===" ");for(var M=t.substring(b,w).split(setCommentSplitRe),N=0;N<M.length;++N)M[N]=M[N].replace(e?setCommentAltRe:setCommentRe,"").trim();x.text=M.join(`
`).trim(),a[n]=x,i=n}function f(b){var w=m(b),k=t.substring(b,w),x=/^\s*\/\//.test(k);return x}function m(b){for(var w=b;w<o&&c(w)!==`
`;)w++;return w}function p(){if(s.length>0)return s.shift();if(l)return h();var b,w,k,x,D,I=r===0;do{if(r===o)return null;for(b=!1;whitespaceRe.test(k=c(r));)if(k===`
`&&(I=!0,++n),++r===o)return null;if(c(r)==="/"){if(++r===o)throw u("comment");if(c(r)==="/")if(e){if(x=r,D=!1,f(r-1)){D=!0;do if(r=m(r),r===o||(r++,!I))break;while(f(r))}else r=Math.min(o,m(r)+1);D&&(d(x,r,I),I=!0),n++,b=!0}else{for(D=c(x=r+1)==="/";c(++r)!==`
`;)if(r===o)return null;++r,D&&(d(x,r-1,I),I=!0),++n,b=!0}else if((k=c(r))==="*"){x=r+1,D=e||c(x)==="*";do{if(k===`
`&&++n,++r===o)throw u("comment");w=k,k=c(r)}while(w!=="*"||k!=="/");++r,D&&(d(x,r-2,I),I=!0),b=!0}else return"/"}}while(b);var L=r;delimRe.lastIndex=0;var M=delimRe.test(c(L++));if(!M)for(;L<o&&!delimRe.test(c(L));)++L;var N=t.substring(r,r=L);return(N==='"'||N==="'")&&(l=N),N}function y(b){s.push(b)}function v(){if(!s.length){var b=p();if(b===null)return null;y(b)}return s[0]}function g(b,w){var k=v(),x=k===b;if(x)return p(),!0;if(!w)throw u("token '"+k+"', '"+b+"' expected");return!1}function _(b){var w=null,k;return b===void 0?(k=a[n-1],delete a[n-1],k&&(e||k.type==="*"||k.lineEmpty)&&(w=k.leading?k.text:null)):(i<b&&v(),k=a[b],delete a[b],k&&!k.lineEmpty&&(e||k.type==="/")&&(w=k.leading?null:k.text)),w}return Object.defineProperty({next:p,peek:v,push:y,skip:g,cmnt:_},"line",{get:function(){return n}})}var parse_1=parse;parse.filename=null;parse.defaults={keepCase:!1};var tokenize=tokenize_1,Root=requireRoot(),Type=requireType(),Field=requireField(),MapField=requireMapfield(),OneOf=requireOneof(),Enum=require_enum(),Service=requireService(),Method=requireMethod(),types=requireTypes(),util=requireUtil(),base10Re=/^[1-9][0-9]*$/,base10NegRe=/^-?[1-9][0-9]*$/,base16Re=/^0[x][0-9a-fA-F]+$/,base16NegRe=/^-?0[x][0-9a-fA-F]+$/,base8Re=/^0[0-7]+$/,base8NegRe=/^-?0[0-7]+$/,numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,nameRe=/^[a-zA-Z_][a-zA-Z_0-9]*$/,typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,fqTypeRefRe=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function parse(t,e,r){e instanceof Root||(r=e,e=new Root),r||(r=parse.defaults);var o=r.preferTrailingComment||!1,n=tokenize(t,r.alternateCommentMode||!1),i=n.next,a=n.push,s=n.peek,l=n.skip,u=n.cmnt,h=!0,c,d,f,m,p=!1,y=e,v=r.keepCase?function(R){return R}:util.camelCase;function g(R,O,E){var T=parse.filename;return E||(parse.filename=null),Error("illegal "+(O||"token")+" '"+R+"' ("+(T?T+", ":"")+"line "+n.line+")")}function _(){var R=[],O;do{if((O=i())!=='"'&&O!=="'")throw g(O);R.push(i()),l(O),O=s()}while(O==='"'||O==="'");return R.join("")}function b(R){var O=i();switch(O){case"'":case'"':return a(O),_();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return k(O,!0)}catch{if(R&&typeRefRe.test(O))return O;throw g(O,"value")}}function w(R,O){var E,T;do O&&((E=s())==='"'||E==="'")?R.push(_()):R.push([T=x(i()),l("to",!0)?x(i()):T]);while(l(",",!0));l(";")}function k(R,O){var E=1;switch(R.charAt(0)==="-"&&(E=-1,R=R.substring(1)),R){case"inf":case"INF":case"Inf":return E*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(base10Re.test(R))return E*parseInt(R,10);if(base16Re.test(R))return E*parseInt(R,16);if(base8Re.test(R))return E*parseInt(R,8);if(numberRe.test(R))return E*parseFloat(R);throw g(R,"number",O)}function x(R,O){switch(R){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!O&&R.charAt(0)==="-")throw g(R,"id");if(base10NegRe.test(R))return parseInt(R,10);if(base16NegRe.test(R))return parseInt(R,16);if(base8NegRe.test(R))return parseInt(R,8);throw g(R,"id")}function D(){if(c!==void 0)throw g("package");if(c=i(),!typeRefRe.test(c))throw g(c,"name");y=y.define(c),l(";")}function I(){var R=s(),O;switch(R){case"weak":O=f||(f=[]),i();break;case"public":i();default:O=d||(d=[]);break}R=_(),l(";"),O.push(R)}function L(){if(l("="),m=_(),p=m==="proto3",!p&&m!=="proto2")throw g(m,"syntax");l(";")}function M(R,O){switch(O){case"option":return Y(R,O),l(";"),!0;case"message":return U(R,O),!0;case"enum":return oe(R,O),!0;case"service":return ue(R,O),!0;case"extend":return he(R,O),!0}return!1}function N(R,O,E){var T=n.line;if(R&&(typeof R.comment!="string"&&(R.comment=u()),R.filename=parse.filename),l("{",!0)){for(var C;(C=i())!=="}";)O(C);l(";",!0)}else E&&E(),l(";"),R&&(typeof R.comment!="string"||o)&&(R.comment=u(T)||R.comment)}function U(R,O){if(!nameRe.test(O=i()))throw g(O,"type name");var E=new Type(O);N(E,function(C){if(!M(E,C))switch(C){case"map":X(E);break;case"required":case"repeated":S(E,C);break;case"optional":p?S(E,"proto3_optional"):S(E,"optional");break;case"oneof":ne(E,C);break;case"extensions":w(E.extensions||(E.extensions=[]));break;case"reserved":w(E.reserved||(E.reserved=[]),!0);break;default:if(!p||!typeRefRe.test(C))throw g(C);a(C),S(E,"optional");break}}),R.add(E)}function S(R,O,E){var T=i();if(T==="group"){F(R,O);return}for(;T.endsWith(".")||s().startsWith(".");)T+=i();if(!typeRefRe.test(T))throw g(T,"type");var C=i();if(!nameRe.test(C))throw g(C,"name");C=v(C),l("=");var q=new Field(C,x(i()),T,O,E);if(N(q,function(Z){if(Z==="option")Y(q,Z),l(";");else throw g(Z)},function(){le(q)}),O==="proto3_optional"){var j=new OneOf("_"+C);q.setOption("proto3_optional",!0),j.add(q),R.add(j)}else R.add(q);!p&&q.repeated&&(types.packed[T]!==void 0||types.basic[T]===void 0)&&q.setOption("packed",!1,!0)}function F(R,O){var E=i();if(!nameRe.test(E))throw g(E,"name");var T=util.lcFirst(E);E===T&&(E=util.ucFirst(E)),l("=");var C=x(i()),q=new Type(E);q.group=!0;var j=new Field(T,C,E,O);j.filename=parse.filename,N(q,function(Z){switch(Z){case"option":Y(q,Z),l(";");break;case"required":case"repeated":S(q,Z);break;case"optional":p?S(q,"proto3_optional"):S(q,"optional");break;case"message":U(q,Z);break;case"enum":oe(q,Z);break;default:throw g(Z)}}),R.add(q).add(j)}function X(R){l("<");var O=i();if(types.mapKey[O]===void 0)throw g(O,"type");l(",");var E=i();if(!typeRefRe.test(E))throw g(E,"type");l(">");var T=i();if(!nameRe.test(T))throw g(T,"name");l("=");var C=new MapField(v(T),x(i()),O,E);N(C,function(j){if(j==="option")Y(C,j),l(";");else throw g(j)},function(){le(C)}),R.add(C)}function ne(R,O){if(!nameRe.test(O=i()))throw g(O,"name");var E=new OneOf(v(O));N(E,function(C){C==="option"?(Y(E,C),l(";")):(a(C),S(E,"optional"))}),R.add(E)}function oe(R,O){if(!nameRe.test(O=i()))throw g(O,"name");var E=new Enum(O);N(E,function(C){switch(C){case"option":Y(E,C),l(";");break;case"reserved":w(E.reserved||(E.reserved=[]),!0);break;default:$(E,C)}}),R.add(E)}function $(R,O){if(!nameRe.test(O))throw g(O,"name");l("=");var E=x(i(),!0),T={options:void 0};T.setOption=function(C,q){this.options===void 0&&(this.options={}),this.options[C]=q},N(T,function(q){if(q==="option")Y(T,q),l(";");else throw g(q)},function(){le(T)}),R.add(O,E,T.comment,T.options)}function Y(R,O){var E=l("(",!0);if(!typeRefRe.test(O=i()))throw g(O,"name");var T=O,C=T,q;E&&(l(")"),T="("+T+")",C=T,O=s(),fqTypeRefRe.test(O)&&(q=O.slice(1),T+=O,i())),l("=");var j=ee(R,T);G(R,C,j,q)}function ee(R,O){if(l("{",!0)){for(var E={};!l("}",!0);){if(!nameRe.test(H=i()))throw g(H,"name");if(H===null)throw g(H,"end of input");var T,C=H;if(l(":",!0),s()==="{")T=ee(R,O+"."+H);else if(s()==="["){T=[];var q;if(l("[",!0)){do q=b(!0),T.push(q);while(l(",",!0));l("]"),typeof q<"u"&&K(R,O+"."+H,q)}}else T=b(!0),K(R,O+"."+H,T);var j=E[C];j&&(T=[].concat(j).concat(T)),E[C]=T,l(",",!0),l(";",!0)}return E}var Q=b(!0);return K(R,O,Q),Q}function K(R,O,E){R.setOption&&R.setOption(O,E)}function G(R,O,E,T){R.setParsedOption&&R.setParsedOption(O,E,T)}function le(R){if(l("[",!0)){do Y(R,"option");while(l(",",!0));l("]")}return R}function ue(R,O){if(!nameRe.test(O=i()))throw g(O,"service name");var E=new Service(O);N(E,function(C){if(!M(E,C))if(C==="rpc")fe(E,C);else throw g(C)}),R.add(E)}function fe(R,O){var E=u(),T=O;if(!nameRe.test(O=i()))throw g(O,"name");var C=O,q,j,Q,Z;if(l("("),l("stream",!0)&&(j=!0),!typeRefRe.test(O=i())||(q=O,l(")"),l("returns"),l("("),l("stream",!0)&&(Z=!0),!typeRefRe.test(O=i())))throw g(O);Q=O,l(")");var ae=new Method(C,T,q,Q,j,Z);ae.comment=E,N(ae,function(ce){if(ce==="option")Y(ae,ce),l(";");else throw g(ce)}),R.add(ae)}function he(R,O){if(!typeRefRe.test(O=i()))throw g(O,"reference");var E=O;N(null,function(C){switch(C){case"required":case"repeated":S(R,C,E);break;case"optional":p?S(R,"proto3_optional",E):S(R,"optional",E);break;default:if(!p||!typeRefRe.test(C))throw g(C);a(C),S(R,"optional",E);break}})}for(var H;(H=i())!==null;)switch(H){case"package":if(!h)throw g(H);D();break;case"import":if(!h)throw g(H);I();break;case"syntax":if(!h)throw g(H);L();break;case"option":Y(y,H),l(";");break;default:if(M(y,H)){h=!1;continue}throw g(H)}return parse.filename=null,{package:c,imports:d,weakImports:f,syntax:m,root:e}}var common_1=common$1,commonRe=/\/|\./;function common$1(t,e){commonRe.test(t)||(t="google/protobuf/"+t+".proto",e={nested:{google:{nested:{protobuf:{nested:e}}}}}),common$1[t]=e}common$1("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var timeType;common$1("duration",{Duration:timeType={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});common$1("timestamp",{Timestamp:timeType});common$1("empty",{Empty:{fields:{}}});common$1("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});common$1("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});common$1("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});common$1.get=function t(e){return common$1[e]||null};var protobuf=indexLightExports;protobuf.build="full";protobuf.tokenize=tokenize_1;protobuf.parse=parse_1;protobuf.common=common_1;protobuf.Root._configure(protobuf.Type,protobuf.parse,protobuf.common);var minimal=indexMinimal,LaneFullState_State=(t=>(t[t.IDLE=0]="IDLE",t[t.IDLE_FOOT_DOWN=1]="IDLE_FOOT_DOWN",t[t.READY_FOOT_DOWN=2]="READY_FOOT_DOWN",t[t.RUNNING_FOOT_DOWN=3]="RUNNING_FOOT_DOWN",t[t.RUNNING=4]="RUNNING",t[t.FALSE_START=5]="FALSE_START",t[t.FALSE_START_TIE=6]="FALSE_START_TIE",t[t.WILDCARD=7]="WILDCARD",t[t.FINISHED=8]="FINISHED",t[t.FINISHED_WINNER=9]="FINISHED_WINNER",t[t.FINISHED_TIE=10]="FINISHED_TIE",t[t.FALL=11]="FALL",t[t.DISABLED=12]="DISABLED",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED",t))(LaneFullState_State||{});function laneFullState_StateFromJSON(t){switch(t){case 0:case"IDLE":return 0;case 1:case"IDLE_FOOT_DOWN":return 1;case 2:case"READY_FOOT_DOWN":return 2;case 3:case"RUNNING_FOOT_DOWN":return 3;case 4:case"RUNNING":return 4;case 5:case"FALSE_START":return 5;case 6:case"FALSE_START_TIE":return 6;case 7:case"WILDCARD":return 7;case 8:case"FINISHED":return 8;case 9:case"FINISHED_WINNER":return 9;case 10:case"FINISHED_TIE":return 10;case 11:case"FALL":return 11;case 12:case"DISABLED":return 12;case-1:case"UNRECOGNIZED":default:return-1}}function laneFullState_StateToJSON(t){switch(t){case 0:return"IDLE";case 1:return"IDLE_FOOT_DOWN";case 2:return"READY_FOOT_DOWN";case 3:return"RUNNING_FOOT_DOWN";case 4:return"RUNNING";case 5:return"FALSE_START";case 6:return"FALSE_START_TIE";case 7:return"WILDCARD";case 8:return"FINISHED";case 9:return"FINISHED_WINNER";case 10:return"FINISHED_TIE";case 11:return"FALL";case 12:return"DISABLED";case-1:default:return"UNRECOGNIZED"}}var RaceFullState_State=(t=>(t[t.IDLE=0]="IDLE",t[t.IDLE_CLEAR_TO_START=1]="IDLE_CLEAR_TO_START",t[t.STARTING=2]="STARTING",t[t.RUNNING=3]="RUNNING",t[t.FINISHED=4]="FINISHED",t[t.FINISHED_MUTED=5]="FINISHED_MUTED",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED",t))(RaceFullState_State||{});function raceFullState_StateFromJSON(t){switch(t){case 0:case"IDLE":return 0;case 1:case"IDLE_CLEAR_TO_START":return 1;case 2:case"STARTING":return 2;case 3:case"RUNNING":return 3;case 4:case"FINISHED":return 4;case 5:case"FINISHED_MUTED":return 5;case-1:case"UNRECOGNIZED":default:return-1}}function raceFullState_StateToJSON(t){switch(t){case 0:return"IDLE";case 1:return"IDLE_CLEAR_TO_START";case 2:return"STARTING";case 3:return"RUNNING";case 4:return"FINISHED";case 5:return"FINISHED_MUTED";case-1:default:return"UNRECOGNIZED"}}function createBaseLaneFullState(){return{state:0,reactionTime:0,climbingTime:0}}const LaneFullState={encode(t,e=minimal.Writer.create()){return t.state!==0&&e.uint32(8).int32(t.state),t.reactionTime!==0&&e.uint32(16).uint32(t.reactionTime),t.climbingTime!==0&&e.uint32(24).uint32(t.climbingTime),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseLaneFullState();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==8)break;n.state=r.int32();continue;case 2:if(i!==16)break;n.reactionTime=r.uint32();continue;case 3:if(i!==24)break;n.climbingTime=r.uint32();continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{state:isSet$2(t.state)?laneFullState_StateFromJSON(t.state):0,reactionTime:isSet$2(t.reactionTime)?globalThis.Number(t.reactionTime):0,climbingTime:isSet$2(t.climbingTime)?globalThis.Number(t.climbingTime):0}},toJSON(t){const e={};return t.state!==0&&(e.state=laneFullState_StateToJSON(t.state)),t.reactionTime!==0&&(e.reactionTime=Math.round(t.reactionTime)),t.climbingTime!==0&&(e.climbingTime=Math.round(t.climbingTime)),e},create(t){return LaneFullState.fromPartial(t??{})},fromPartial(t){const e=createBaseLaneFullState();return e.state=t.state??0,e.reactionTime=t.reactionTime??0,e.climbingTime=t.climbingTime??0,e}};function createBaseRaceFullState(){return{state:0,laneStates:[]}}const RaceFullState={encode(t,e=minimal.Writer.create()){t.state!==0&&e.uint32(8).int32(t.state);for(const r of t.laneStates)LaneFullState.encode(r,e.uint32(18).fork()).ldelim();return e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseRaceFullState();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==8)break;n.state=r.int32();continue;case 2:if(i!==18)break;n.laneStates.push(LaneFullState.decode(r,r.uint32()));continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{state:isSet$2(t.state)?raceFullState_StateFromJSON(t.state):0,laneStates:globalThis.Array.isArray(t==null?void 0:t.laneStates)?t.laneStates.map(e=>LaneFullState.fromJSON(e)):[]}},toJSON(t){var r;const e={};return t.state!==0&&(e.state=raceFullState_StateToJSON(t.state)),(r=t.laneStates)!=null&&r.length&&(e.laneStates=t.laneStates.map(o=>LaneFullState.toJSON(o))),e},create(t){return RaceFullState.fromPartial(t??{})},fromPartial(t){var r;const e=createBaseRaceFullState();return e.state=t.state??0,e.laneStates=((r=t.laneStates)==null?void 0:r.map(o=>LaneFullState.fromPartial(o)))||[],e}};function isSet$2(t){return t!=null}function createBaseRaceStartCommand(){return{}}const RaceStartCommand={encode(t,e=minimal.Writer.create()){return e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseRaceStartCommand();for(;r.pos<o;){const i=r.uint32();if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{}},toJSON(t){return{}},create(t){return RaceStartCommand.fromPartial(t??{})},fromPartial(t){return createBaseRaceStartCommand()}};function createBaseLaneSetDisabledCommand(){return{laneNumber:0,disabled:!1}}const LaneSetDisabledCommand={encode(t,e=minimal.Writer.create()){return t.laneNumber!==0&&e.uint32(8).uint32(t.laneNumber),t.disabled===!0&&e.uint32(16).bool(t.disabled),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseLaneSetDisabledCommand();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==8)break;n.laneNumber=r.uint32();continue;case 2:if(i!==16)break;n.disabled=r.bool();continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{laneNumber:isSet$1(t.laneNumber)?globalThis.Number(t.laneNumber):0,disabled:isSet$1(t.disabled)?globalThis.Boolean(t.disabled):!1}},toJSON(t){const e={};return t.laneNumber!==0&&(e.laneNumber=Math.round(t.laneNumber)),t.disabled===!0&&(e.disabled=t.disabled),e},create(t){return LaneSetDisabledCommand.fromPartial(t??{})},fromPartial(t){const e=createBaseLaneSetDisabledCommand();return e.laneNumber=t.laneNumber??0,e.disabled=t.disabled??!1,e}};function createBaseLaneSetFallCommand(){return{laneNumber:0}}const LaneSetFallCommand={encode(t,e=minimal.Writer.create()){return t.laneNumber!==0&&e.uint32(8).uint32(t.laneNumber),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseLaneSetFallCommand();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==8)break;n.laneNumber=r.uint32();continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{laneNumber:isSet$1(t.laneNumber)?globalThis.Number(t.laneNumber):0}},toJSON(t){const e={};return t.laneNumber!==0&&(e.laneNumber=Math.round(t.laneNumber)),e},create(t){return LaneSetFallCommand.fromPartial(t??{})},fromPartial(t){const e=createBaseLaneSetFallCommand();return e.laneNumber=t.laneNumber??0,e}};function createBaseRaceResetCommand(){return{}}const RaceResetCommand={encode(t,e=minimal.Writer.create()){return e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseRaceResetCommand();for(;r.pos<o;){const i=r.uint32();if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{}},toJSON(t){return{}},create(t){return RaceResetCommand.fromPartial(t??{})},fromPartial(t){return createBaseRaceResetCommand()}};function createBaseRebootCommand(){return{}}const RebootCommand={encode(t,e=minimal.Writer.create()){return e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseRebootCommand();for(;r.pos<o;){const i=r.uint32();if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{}},toJSON(t){return{}},create(t){return RebootCommand.fromPartial(t??{})},fromPartial(t){return createBaseRebootCommand()}};function createBaseCommand(){return{start:void 0,disable:void 0,fall:void 0,reset:void 0,reboot:void 0}}const Command={encode(t,e=minimal.Writer.create()){return t.start!==void 0&&RaceStartCommand.encode(t.start,e.uint32(10).fork()).ldelim(),t.disable!==void 0&&LaneSetDisabledCommand.encode(t.disable,e.uint32(18).fork()).ldelim(),t.fall!==void 0&&LaneSetFallCommand.encode(t.fall,e.uint32(26).fork()).ldelim(),t.reset!==void 0&&RaceResetCommand.encode(t.reset,e.uint32(34).fork()).ldelim(),t.reboot!==void 0&&RebootCommand.encode(t.reboot,e.uint32(42).fork()).ldelim(),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseCommand();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==10)break;n.start=RaceStartCommand.decode(r,r.uint32());continue;case 2:if(i!==18)break;n.disable=LaneSetDisabledCommand.decode(r,r.uint32());continue;case 3:if(i!==26)break;n.fall=LaneSetFallCommand.decode(r,r.uint32());continue;case 4:if(i!==34)break;n.reset=RaceResetCommand.decode(r,r.uint32());continue;case 5:if(i!==42)break;n.reboot=RebootCommand.decode(r,r.uint32());continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{start:isSet$1(t.start)?RaceStartCommand.fromJSON(t.start):void 0,disable:isSet$1(t.disable)?LaneSetDisabledCommand.fromJSON(t.disable):void 0,fall:isSet$1(t.fall)?LaneSetFallCommand.fromJSON(t.fall):void 0,reset:isSet$1(t.reset)?RaceResetCommand.fromJSON(t.reset):void 0,reboot:isSet$1(t.reboot)?RebootCommand.fromJSON(t.reboot):void 0}},toJSON(t){const e={};return t.start!==void 0&&(e.start=RaceStartCommand.toJSON(t.start)),t.disable!==void 0&&(e.disable=LaneSetDisabledCommand.toJSON(t.disable)),t.fall!==void 0&&(e.fall=LaneSetFallCommand.toJSON(t.fall)),t.reset!==void 0&&(e.reset=RaceResetCommand.toJSON(t.reset)),t.reboot!==void 0&&(e.reboot=RebootCommand.toJSON(t.reboot)),e},create(t){return Command.fromPartial(t??{})},fromPartial(t){const e=createBaseCommand();return e.start=t.start!==void 0&&t.start!==null?RaceStartCommand.fromPartial(t.start):void 0,e.disable=t.disable!==void 0&&t.disable!==null?LaneSetDisabledCommand.fromPartial(t.disable):void 0,e.fall=t.fall!==void 0&&t.fall!==null?LaneSetFallCommand.fromPartial(t.fall):void 0,e.reset=t.reset!==void 0&&t.reset!==null?RaceResetCommand.fromPartial(t.reset):void 0,e.reboot=t.reboot!==void 0&&t.reboot!==null?RebootCommand.fromPartial(t.reboot):void 0,e}};function isSet$1(t){return t!=null}function createBaseManualStartProcedureSettings(){return{}}const ManualStartProcedureSettings={encode(t,e=minimal.Writer.create()){return e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseManualStartProcedureSettings();for(;r.pos<o;){const i=r.uint32();if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{}},toJSON(t){return{}},create(t){return ManualStartProcedureSettings.fromPartial(t??{})},fromPartial(t){return createBaseManualStartProcedureSettings()}};function createBaseAutomatedStartProcedureSettings(){return{sayReady:!1,standstillDurationBeforeReady:0}}const AutomatedStartProcedureSettings={encode(t,e=minimal.Writer.create()){return t.sayReady===!0&&e.uint32(8).bool(t.sayReady),t.standstillDurationBeforeReady!==0&&e.uint32(16).int32(t.standstillDurationBeforeReady),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseAutomatedStartProcedureSettings();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==8)break;n.sayReady=r.bool();continue;case 2:if(i!==16)break;n.standstillDurationBeforeReady=r.int32();continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{sayReady:isSet(t.sayReady)?globalThis.Boolean(t.sayReady):!1,standstillDurationBeforeReady:isSet(t.standstillDurationBeforeReady)?globalThis.Number(t.standstillDurationBeforeReady):0}},toJSON(t){const e={};return t.sayReady===!0&&(e.sayReady=t.sayReady),t.standstillDurationBeforeReady!==0&&(e.standstillDurationBeforeReady=Math.round(t.standstillDurationBeforeReady)),e},create(t){return AutomatedStartProcedureSettings.fromPartial(t??{})},fromPartial(t){const e=createBaseAutomatedStartProcedureSettings();return e.sayReady=t.sayReady??!1,e.standstillDurationBeforeReady=t.standstillDurationBeforeReady??0,e}};function createBaseStartProcedureSettings(){return{manualStartProcedureSettings:void 0,automatedStartProcedureSettings:void 0}}const StartProcedureSettings={encode(t,e=minimal.Writer.create()){return t.manualStartProcedureSettings!==void 0&&ManualStartProcedureSettings.encode(t.manualStartProcedureSettings,e.uint32(10).fork()).ldelim(),t.automatedStartProcedureSettings!==void 0&&AutomatedStartProcedureSettings.encode(t.automatedStartProcedureSettings,e.uint32(18).fork()).ldelim(),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseStartProcedureSettings();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==10)break;n.manualStartProcedureSettings=ManualStartProcedureSettings.decode(r,r.uint32());continue;case 2:if(i!==18)break;n.automatedStartProcedureSettings=AutomatedStartProcedureSettings.decode(r,r.uint32());continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{manualStartProcedureSettings:isSet(t.manualStartProcedureSettings)?ManualStartProcedureSettings.fromJSON(t.manualStartProcedureSettings):void 0,automatedStartProcedureSettings:isSet(t.automatedStartProcedureSettings)?AutomatedStartProcedureSettings.fromJSON(t.automatedStartProcedureSettings):void 0}},toJSON(t){const e={};return t.manualStartProcedureSettings!==void 0&&(e.manualStartProcedureSettings=ManualStartProcedureSettings.toJSON(t.manualStartProcedureSettings)),t.automatedStartProcedureSettings!==void 0&&(e.automatedStartProcedureSettings=AutomatedStartProcedureSettings.toJSON(t.automatedStartProcedureSettings)),e},create(t){return StartProcedureSettings.fromPartial(t??{})},fromPartial(t){const e=createBaseStartProcedureSettings();return e.manualStartProcedureSettings=t.manualStartProcedureSettings!==void 0&&t.manualStartProcedureSettings!==null?ManualStartProcedureSettings.fromPartial(t.manualStartProcedureSettings):void 0,e.automatedStartProcedureSettings=t.automatedStartProcedureSettings!==void 0&&t.automatedStartProcedureSettings!==null?AutomatedStartProcedureSettings.fromPartial(t.automatedStartProcedureSettings):void 0,e}};function createBaseLaneSettings(){return{letter:"",disable:!1}}const LaneSettings={encode(t,e=minimal.Writer.create()){return t.letter!==""&&e.uint32(10).string(t.letter),t.disable===!0&&e.uint32(16).bool(t.disable),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseLaneSettings();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==10)break;n.letter=r.string();continue;case 2:if(i!==16)break;n.disable=r.bool();continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{letter:isSet(t.letter)?globalThis.String(t.letter):"",disable:isSet(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){const e={};return t.letter!==""&&(e.letter=t.letter),t.disable===!0&&(e.disable=t.disable),e},create(t){return LaneSettings.fromPartial(t??{})},fromPartial(t){const e=createBaseLaneSettings();return e.letter=t.letter??"",e.disable=t.disable??!1,e}};function createBaseSoundSettings(){return{volume:0}}const SoundSettings={encode(t,e=minimal.Writer.create()){return t.volume!==0&&e.uint32(8).uint32(t.volume),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseSoundSettings();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==8)break;n.volume=r.uint32();continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{volume:isSet(t.volume)?globalThis.Number(t.volume):0}},toJSON(t){const e={};return t.volume!==0&&(e.volume=Math.round(t.volume)),e},create(t){return SoundSettings.fromPartial(t??{})},fromPartial(t){const e=createBaseSoundSettings();return e.volume=t.volume??0,e}};function createBaseRaceSettings(){return{startProcedure:void 0,lanes:[]}}const RaceSettings={encode(t,e=minimal.Writer.create()){t.startProcedure!==void 0&&StartProcedureSettings.encode(t.startProcedure,e.uint32(10).fork()).ldelim();for(const r of t.lanes)LaneSettings.encode(r,e.uint32(18).fork()).ldelim();return e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseRaceSettings();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==10)break;n.startProcedure=StartProcedureSettings.decode(r,r.uint32());continue;case 2:if(i!==18)break;n.lanes.push(LaneSettings.decode(r,r.uint32()));continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{startProcedure:isSet(t.startProcedure)?StartProcedureSettings.fromJSON(t.startProcedure):void 0,lanes:globalThis.Array.isArray(t==null?void 0:t.lanes)?t.lanes.map(e=>LaneSettings.fromJSON(e)):[]}},toJSON(t){var r;const e={};return t.startProcedure!==void 0&&(e.startProcedure=StartProcedureSettings.toJSON(t.startProcedure)),(r=t.lanes)!=null&&r.length&&(e.lanes=t.lanes.map(o=>LaneSettings.toJSON(o))),e},create(t){return RaceSettings.fromPartial(t??{})},fromPartial(t){var r;const e=createBaseRaceSettings();return e.startProcedure=t.startProcedure!==void 0&&t.startProcedure!==null?StartProcedureSettings.fromPartial(t.startProcedure):void 0,e.lanes=((r=t.lanes)==null?void 0:r.map(o=>LaneSettings.fromPartial(o)))||[],e}};function createBaseSettings(){return{default:!1,race:void 0,sound:void 0}}const Settings={encode(t,e=minimal.Writer.create()){return t.default===!0&&e.uint32(8).bool(t.default),t.race!==void 0&&RaceSettings.encode(t.race,e.uint32(18).fork()).ldelim(),t.sound!==void 0&&SoundSettings.encode(t.sound,e.uint32(26).fork()).ldelim(),e},decode(t,e){const r=t instanceof minimal.Reader?t:minimal.Reader.create(t);let o=e===void 0?r.len:r.pos+e;const n=createBaseSettings();for(;r.pos<o;){const i=r.uint32();switch(i>>>3){case 1:if(i!==8)break;n.default=r.bool();continue;case 2:if(i!==18)break;n.race=RaceSettings.decode(r,r.uint32());continue;case 3:if(i!==26)break;n.sound=SoundSettings.decode(r,r.uint32());continue}if((i&7)===4||i===0)break;r.skipType(i&7)}return n},fromJSON(t){return{default:isSet(t.default)?globalThis.Boolean(t.default):!1,race:isSet(t.race)?RaceSettings.fromJSON(t.race):void 0,sound:isSet(t.sound)?SoundSettings.fromJSON(t.sound):void 0}},toJSON(t){const e={};return t.default===!0&&(e.default=t.default),t.race!==void 0&&(e.race=RaceSettings.toJSON(t.race)),t.sound!==void 0&&(e.sound=SoundSettings.toJSON(t.sound)),e},create(t){return Settings.fromPartial(t??{})},fromPartial(t){const e=createBaseSettings();return e.default=t.default??!1,e.race=t.race!==void 0&&t.race!==null?RaceSettings.fromPartial(t.race):void 0,e.sound=t.sound!==void 0&&t.sound!==null?SoundSettings.fromPartial(t.sound):void 0,e}};function isSet(t){return t!=null}const BLUETOOTH_BASE_UUID="97ed638a-690f-4ce4-bb12-d9c4e0",BLUETOOTH_TIMER_SERVICE_BASE_UUID=BLUETOOTH_BASE_UUID+"01",BLUETOOTH_TIMER_SERVICE_UUID=BLUETOOTH_TIMER_SERVICE_BASE_UUID+"0000";let bluetoothDevice,bluetoothService,bluetoothCharacteristics={raceFullState:void 0,control:void 0,settings:void 0};function checkAvailability(){return navigator.bluetooth?(bluetoothState.set("DISCONNECTED"),!0):(bluetoothState.set("UNAVAILABLE"),!1)}async function startBluetooth(){bluetoothState.set("CONNECTING");try{bluetoothDevice=await navigator.bluetooth.requestDevice({filters:[{services:[BLUETOOTH_TIMER_SERVICE_UUID]}],optionalServices:[BLUETOOTH_TIMER_SERVICE_UUID]})}catch(e){console.error(e),bluetoothState.set("DISCONNECTED");return}console.log("> Requested "+bluetoothDevice.name+" ("+bluetoothDevice.id+")");let t;try{t=await bluetoothDevice.gatt.connect()}catch{console.log("> Error connecting to "+bluetoothDevice.name+" ("+bluetoothDevice.id+")"),bluetoothState.set("DISCONNECTED");return}bluetoothDevice.addEventListener("gattserverdisconnected",onDisconnected),bluetoothService=await t.getPrimaryService(BLUETOOTH_TIMER_SERVICE_UUID),bluetoothCharacteristics.raceFullState=await bluetoothService.getCharacteristic(BLUETOOTH_TIMER_SERVICE_BASE_UUID+"0001"),handleNewState((await bluetoothCharacteristics.raceFullState.readValue()).buffer),await bluetoothCharacteristics.raceFullState.startNotifications(),bluetoothCharacteristics.raceFullState.addEventListener("characteristicvaluechanged",handleNotifications),bluetoothCharacteristics.control=await bluetoothService.getCharacteristic(BLUETOOTH_TIMER_SERVICE_BASE_UUID+"0002"),bluetoothCharacteristics.settings=await bluetoothService.getCharacteristic(BLUETOOTH_TIMER_SERVICE_BASE_UUID+"0003"),handleNewSettings((await bluetoothCharacteristics.settings.readValue()).buffer),await bluetoothCharacteristics.settings.startNotifications(),bluetoothCharacteristics.settings.addEventListener("characteristicvaluechanged",handleNotifications),bluetoothState.set("CONNECTED")}function onDisconnected(){console.log("> Bluetooth Device disconnected"),bluetoothDevice=void 0,bluetoothService=void 0,bluetoothState.set("DISCONNECTED")}function handleNotifications(t){var r,o;if(!t.target)return;const e=t.target;console.log(`${e.uuid} - VALUE CHANGED`),e.uuid==((r=bluetoothCharacteristics.raceFullState)==null?void 0:r.uuid)?handleNewState(e.value.buffer):e.uuid==((o=bluetoothCharacteristics.settings)==null?void 0:o.uuid)&&handleNewSettings(e.value.buffer)}function handleNewState(t){let e=RaceFullState.decode(new Uint8Array(t));console.log(e),raceFullState.set(e)}function handleNewSettings(t){let e=Settings.decode(new Uint8Array(t));console.log(e),settings.set(e)}async function sendCommand(t){if(bluetoothCharacteristics.control===void 0)return!1;let e=Command.encode(t).finish(),r=__createArrayBufferWithCorrectSize(e);return console.log(r.byteLength),await bluetoothCharacteristics.control.writeValueWithResponse(r),!0}async function writeSettings(t){if(bluetoothCharacteristics.settings===void 0)return!1;let e=Settings.encode(t).finish(),r=__createArrayBufferWithCorrectSize(e);return await bluetoothCharacteristics.settings.writeValueWithResponse(r),!0}function __createArrayBufferWithCorrectSize(t){const e=new Uint8Array(t.byteLength);return t.forEach((r,o)=>{e[o]=r}),e}function twJoin(){for(var t=0,e,r,o="";t<arguments.length;)(e=arguments[t++])&&(r=toValue(e))&&(o&&(o+=" "),o+=r);return o}function toValue(t){if(typeof t=="string")return t;for(var e,r="",o=0;o<t.length;o++)t[o]&&(e=toValue(t[o]))&&(r&&(r+=" "),r+=e);return r}var CLASS_PART_SEPARATOR="-";function createClassUtils(t){var e=createClassMap(t),r=t.conflictingClassGroups,o=t.conflictingClassGroupModifiers,n=o===void 0?{}:o;function i(s){var l=s.split(CLASS_PART_SEPARATOR);return l[0]===""&&l.length!==1&&l.shift(),getGroupRecursive(l,e)||getGroupIdForArbitraryProperty(s)}function a(s,l){var u=r[s]||[];return l&&n[s]?[].concat(u,n[s]):u}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function getGroupRecursive(t,e){var a;if(t.length===0)return e.classGroupId;var r=t[0],o=e.nextPart.get(r),n=o?getGroupRecursive(t.slice(1),o):void 0;if(n)return n;if(e.validators.length!==0){var i=t.join(CLASS_PART_SEPARATOR);return(a=e.validators.find(function(s){var l=s.validator;return l(i)}))==null?void 0:a.classGroupId}}var arbitraryPropertyRegex=/^\[(.+)\]$/;function getGroupIdForArbitraryProperty(t){if(arbitraryPropertyRegex.test(t)){var e=arbitraryPropertyRegex.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}}function createClassMap(t){var e=t.theme,r=t.prefix,o={nextPart:new Map,validators:[]},n=getPrefixedClassGroupEntries(Object.entries(t.classGroups),r);return n.forEach(function(i){var a=i[0],s=i[1];processClassesRecursively(s,o,a,e)}),o}function processClassesRecursively(t,e,r,o){t.forEach(function(n){if(typeof n=="string"){var i=n===""?e:getPart(e,n);i.classGroupId=r;return}if(typeof n=="function"){if(isThemeGetter(n)){processClassesRecursively(n(o),e,r,o);return}e.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(function(a){var s=a[0],l=a[1];processClassesRecursively(l,getPart(e,s),r,o)})})}function getPart(t,e){var r=t;return e.split(CLASS_PART_SEPARATOR).forEach(function(o){r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r}function isThemeGetter(t){return t.isThemeGetter}function getPrefixedClassGroupEntries(t,e){return e?t.map(function(r){var o=r[0],n=r[1],i=n.map(function(a){return typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(s){var l=s[0],u=s[1];return[e+l,u]})):a});return[o,i]}):t}function createLruCache(t){if(t<1)return{get:function(){},set:function(){}};var e=0,r=new Map,o=new Map;function n(i,a){r.set(i,a),e++,e>t&&(e=0,o=r,r=new Map)}return{get:function(a){var s=r.get(a);if(s!==void 0)return s;if((s=o.get(a))!==void 0)return n(a,s),s},set:function(a,s){r.has(a)?r.set(a,s):n(a,s)}}}var IMPORTANT_MODIFIER="!";function createSplitModifiers(t){var e=t.separator||":",r=e.length===1,o=e[0],n=e.length;return function(a){for(var s=[],l=0,u=0,h,c=0;c<a.length;c++){var d=a[c];if(l===0){if(d===o&&(r||a.slice(c,c+n)===e)){s.push(a.slice(u,c)),u=c+n;continue}if(d==="/"){h=c;continue}}d==="["?l++:d==="]"&&l--}var f=s.length===0?a:a.substring(u),m=f.startsWith(IMPORTANT_MODIFIER),p=m?f.substring(1):f,y=h&&h>u?h-u:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}}}function sortModifiers(t){if(t.length<=1)return t;var e=[],r=[];return t.forEach(function(o){var n=o[0]==="[";n?(e.push.apply(e,r.sort().concat([o])),r=[]):r.push(o)}),e.push.apply(e,r.sort()),e}function createConfigUtils(t){return{cache:createLruCache(t.cacheSize),splitModifiers:createSplitModifiers(t),...createClassUtils(t)}}var SPLIT_CLASSES_REGEX=/\s+/;function mergeClassList(t,e){var r=e.splitModifiers,o=e.getClassGroupId,n=e.getConflictingClassGroupIds,i=new Set;return t.trim().split(SPLIT_CLASSES_REGEX).map(function(a){var s=r(a),l=s.modifiers,u=s.hasImportantModifier,h=s.baseClassName,c=s.maybePostfixModifierPosition,d=o(c?h.substring(0,c):h),f=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:a};if(d=o(h),!d)return{isTailwindClass:!1,originalClassName:a};f=!1}var m=sortModifiers(l).join(":"),p=u?m+IMPORTANT_MODIFIER:m;return{isTailwindClass:!0,modifierId:p,classGroupId:d,originalClassName:a,hasPostfixModifier:f}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var s=a.modifierId,l=a.classGroupId,u=a.hasPostfixModifier,h=s+l;return i.has(h)?!1:(i.add(h),n(l,u).forEach(function(c){return i.add(s+c)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function createTailwindMerge(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var o,n,i,a=s;function s(u){var h=e[0],c=e.slice(1),d=c.reduce(function(f,m){return m(f)},h());return o=createConfigUtils(d),n=o.cache.get,i=o.cache.set,a=l,l(u)}function l(u){var h=n(u);if(h)return h;var c=mergeClassList(u,o);return i(u,c),c}return function(){return a(twJoin.apply(null,arguments))}}function fromTheme(t){var e=function(o){return o[t]||[]};return e.isThemeGetter=!0,e}var arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,shadowRegex=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function isLength(t){return isNumber(t)||stringLengths.has(t)||fractionRegex.test(t)||isArbitraryLength(t)}function isArbitraryLength(t){return getIsArbitraryValue(t,"length",isLengthOnly)}function isArbitrarySize(t){return getIsArbitraryValue(t,"size",isNever)}function isArbitraryPosition(t){return getIsArbitraryValue(t,"position",isNever)}function isArbitraryUrl(t){return getIsArbitraryValue(t,"url",isUrl)}function isArbitraryNumber(t){return getIsArbitraryValue(t,"number",isNumber)}function isNumber(t){return!Number.isNaN(Number(t))}function isPercent(t){return t.endsWith("%")&&isNumber(t.slice(0,-1))}function isInteger(t){return isIntegerOnly(t)||getIsArbitraryValue(t,"number",isIntegerOnly)}function isArbitraryValue(t){return arbitraryValueRegex.test(t)}function isAny(){return!0}function isTshirtSize(t){return tshirtUnitRegex.test(t)}function isArbitraryShadow(t){return getIsArbitraryValue(t,"",isShadow)}function getIsArbitraryValue(t,e,r){var o=arbitraryValueRegex.exec(t);return o?o[1]?o[1]===e:r(o[2]):!1}function isLengthOnly(t){return lengthUnitRegex.test(t)}function isNever(){return!1}function isUrl(t){return t.startsWith("url(")}function isIntegerOnly(t){return Number.isInteger(Number(t))}function isShadow(t){return shadowRegex.test(t)}function getDefaultConfig(){var t=fromTheme("colors"),e=fromTheme("spacing"),r=fromTheme("blur"),o=fromTheme("brightness"),n=fromTheme("borderColor"),i=fromTheme("borderRadius"),a=fromTheme("borderSpacing"),s=fromTheme("borderWidth"),l=fromTheme("contrast"),u=fromTheme("grayscale"),h=fromTheme("hueRotate"),c=fromTheme("invert"),d=fromTheme("gap"),f=fromTheme("gradientColorStops"),m=fromTheme("gradientColorStopPositions"),p=fromTheme("inset"),y=fromTheme("margin"),v=fromTheme("opacity"),g=fromTheme("padding"),_=fromTheme("saturate"),b=fromTheme("scale"),w=fromTheme("sepia"),k=fromTheme("skew"),x=fromTheme("space"),D=fromTheme("translate"),I=function(){return["auto","contain","none"]},L=function(){return["auto","hidden","clip","visible","scroll"]},M=function(){return["auto",isArbitraryValue,e]},N=function(){return[isArbitraryValue,e]},U=function(){return["",isLength]},S=function(){return["auto",isNumber,isArbitraryValue]},F=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},X=function(){return["solid","dashed","dotted","double","none"]},ne=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},oe=function(){return["start","end","center","between","around","evenly","stretch"]},$=function(){return["","0",isArbitraryValue]},Y=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ee=function(){return[isNumber,isArbitraryNumber]},K=function(){return[isNumber,isArbitraryValue]};return{cacheSize:500,theme:{colors:[isAny],spacing:[isLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:ee(),borderColor:[t],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:N(),borderWidth:U(),contrast:ee(),grayscale:$(),hueRotate:K(),invert:$(),gap:N(),gradientColorStops:[t],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:M(),margin:M(),opacity:ee(),padding:N(),saturate:ee(),scale:ee(),sepia:$(),skew:K(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(F(),[isArbitraryValue])}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",isInteger]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger]},isArbitraryValue]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger]},isArbitraryValue]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal"].concat(oe())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(oe(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(oe(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[x]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[x]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",isArbitraryValue,e]}],"min-w":[{"min-w":["min","max","fit",isArbitraryValue,isLength]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize,isArbitraryValue]}],h:[{h:[isArbitraryValue,e,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",isArbitraryValue,isLength]}],"max-h":[{"max-h":[isArbitraryValue,e,"min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isArbitraryValue,isLength]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(X(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength]}],"underline-offset":[{"underline-offset":["auto",isArbitraryValue,isLength]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(F(),[isArbitraryPosition])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryUrl]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[].concat(X(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:X()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:[""].concat(X())}],"outline-offset":[{"outline-offset":[isArbitraryValue,isLength]}],"outline-w":[{outline:[isLength]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[isLength]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":ne()}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[c]}],saturate:[{saturate:[_]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",t]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryNumber]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var twMerge=createTailwindMerge(getDefaultConfig);function create_dynamic_element$1(t){let e,r,o,n,i,a;const s=t[14].default,l=create_slot(s,t,t[13],null);let u=[t[8],{class:t[7]},{role:t[6]}],h={};for(let c=0;c<u.length;c+=1)h=assign(h,u[c]);return{c(){e=element(t[1]),l&&l.c(),this.h()},l(c){e=claim_element(c,(t[1]||"null").toUpperCase(),{class:!0,role:!0});var d=children(e);l&&l.l(d),d.forEach(detach),this.h()},h(){set_dynamic_element_data(t[1])(e,h)},m(c,d){insert_hydration(c,e,d),l&&l.m(e,null),t[20](e),n=!0,i||(a=[action_destroyer(r=t[4].call(null,e,t[5])),listen(e,"click",t[15]),listen(e,"mouseenter",t[16]),listen(e,"mouseleave",t[17]),listen(e,"focusin",t[18]),listen(e,"focusout",t[19])],i=!0)},p(c,d){t=c,l&&l.p&&(!n||d&8192)&&update_slot_base(l,s,t,t[13],n?get_slot_changes(s,t[13],d,null):get_all_dirty_from_scope(t[13]),null),set_dynamic_element_data(t[1])(e,h=get_spread_update(u,[d&256&&t[8],(!n||d&128)&&{class:t[7]},(!n||d&64)&&{role:t[6]}])),r&&is_function(r.update)&&d&32&&r.update.call(null,t[5])},i(c){n||(transition_in(l,c),c&&add_render_callback(()=>{n&&(o||(o=create_bidirectional_transition(e,t[2],t[3],!0)),o.run(1))}),n=!0)},o(c){transition_out(l,c),c&&(o||(o=create_bidirectional_transition(e,t[2],t[3],!1)),o.run(0)),n=!1},d(c){c&&detach(e),l&&l.d(c),t[20](null),c&&o&&o.end(),i=!1,run_all(a)}}}function create_fragment$b(t){let e=t[1],r,o=!1,n,i=t[1]&&create_dynamic_element$1(t);return{c(){i&&i.c(),r=empty()},l(a){i&&i.l(a),r=empty()},m(a,s){i&&i.m(a,s),insert_hydration(a,r,s),n=!0},p(a,[s]){a[1]?e?safe_not_equal(e,a[1])?(i.d(1),i=create_dynamic_element$1(a),e=a[1],i.c(),o&&(o=!1,transition_in(i)),i.m(r.parentNode,r)):(o&&(o=!1,transition_in(i)),i.p(a,s)):(i=create_dynamic_element$1(a),e=a[1],i.c(),transition_in(i),i.m(r.parentNode,r)):e&&(o=!0,group_outros(),transition_out(i,1,1,()=>{i=null,e=a[1],o=!1}),check_outros())},i(a){n||(transition_in(i,a),n=!0)},o(a){transition_out(i,a),n=!1},d(a){a&&detach(r),i&&i.d(a)}}}function instance$b(t,e,r){const o=["tag","color","rounded","border","shadow","transition","params","node","use","options","role"];let n=compute_rest_props(e,o),{$$slots:i={},$$scope:a}=e;const s=()=>({duration:0}),l=()=>{};setContext("background",!0);let{tag:u=n.href?"a":"div"}=e,{color:h="default"}=e,{rounded:c=!1}=e,{border:d=!1}=e,{shadow:f=!1}=e,{transition:m=s}=e,{params:p={}}=e,{node:y=void 0}=e,{use:v=l}=e,{options:g={}}=e,{role:_=void 0}=e;const b={gray:"bg-gray-50 dark:bg-gray-800",red:"bg-red-50 dark:bg-gray-800",yellow:"bg-yellow-50 dark:bg-gray-800 ",green:"bg-green-50 dark:bg-gray-800 ",indigo:"bg-indigo-50 dark:bg-gray-800 ",purple:"bg-purple-50 dark:bg-gray-800 ",pink:"bg-pink-50 dark:bg-gray-800 ",blue:"bg-blue-50 dark:bg-gray-800 ",light:"bg-gray-50 dark:bg-gray-700",dark:"bg-gray-50 dark:bg-gray-800",default:"bg-white dark:bg-gray-800",dropdown:"bg-white dark:bg-gray-700",navbar:"bg-white dark:bg-gray-900",navbarUl:"bg-gray-50 dark:bg-gray-800",form:"bg-gray-50 dark:bg-gray-700",primary:"bg-primary-50 dark:bg-gray-800 ",orange:"bg-orange-50 dark:bg-orange-800",none:""},w={gray:"text-gray-800 dark:text-gray-300",red:"text-red-800 dark:text-red-400",yellow:"text-yellow-800 dark:text-yellow-300",green:"text-green-800 dark:text-green-400",indigo:"text-indigo-800 dark:text-indigo-400",purple:"text-purple-800 dark:text-purple-400",pink:"text-pink-800 dark:text-pink-400",blue:"text-blue-800 dark:text-blue-400",light:"text-gray-700 dark:text-gray-300",dark:"text-gray-700 dark:text-gray-300",default:"text-gray-500 dark:text-gray-400",dropdown:"text-gray-700 dark:text-gray-200",navbar:"text-gray-700 dark:text-gray-200",navbarUl:"text-gray-700 dark:text-gray-400",form:"text-gray-900 dark:text-white",primary:"text-primary-800 dark:text-primary-400",orange:"text-orange-800 dark:text-orange-400",none:""},k={gray:"border-gray-300 dark:border-gray-800 divide-gray-300 dark:divide-gray-800",red:"border-red-300 dark:border-red-800 divide-red-300 dark:divide-red-800",yellow:"border-yellow-300 dark:border-yellow-800 divide-yellow-300 dark:divide-yellow-800",green:"border-green-300 dark:border-green-800 divide-green-300 dark:divide-green-800",indigo:"border-indigo-300 dark:border-indigo-800 divide-indigo-300 dark:divide-indigo-800",purple:"border-purple-300 dark:border-purple-800 divide-purple-300 dark:divide-purple-800",pink:"border-pink-300 dark:border-pink-800 divide-pink-300 dark:divide-pink-800",blue:"border-blue-300 dark:border-blue-800 divide-blue-300 dark:divide-blue-800",light:"border-gray-500 divide-gray-500",dark:"border-gray-500 divide-gray-500",default:"border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700",dropdown:"border-gray-100 dark:border-gray-600 divide-gray-100 dark:divide-gray-600",navbar:"border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700",navbarUl:"border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700",form:"border-gray-300 dark:border-gray-700 divide-gray-300 dark:divide-gray-700",primary:"border-primary-500 dark:border-primary-200 divide-primary-500 dark:divide-primary-200 ",orange:"border-orange-300 dark:border-orange-800 divide-orange-300 dark:divide-orange-800",none:""};let x;function D(S){bubble.call(this,t,S)}function I(S){bubble.call(this,t,S)}function L(S){bubble.call(this,t,S)}function M(S){bubble.call(this,t,S)}function N(S){bubble.call(this,t,S)}function U(S){binding_callbacks[S?"unshift":"push"](()=>{y=S,r(0,y)})}return t.$$set=S=>{r(26,e=assign(assign({},e),exclude_internal_props(S))),r(8,n=compute_rest_props(e,o)),"tag"in S&&r(1,u=S.tag),"color"in S&&r(9,h=S.color),"rounded"in S&&r(10,c=S.rounded),"border"in S&&r(11,d=S.border),"shadow"in S&&r(12,f=S.shadow),"transition"in S&&r(2,m=S.transition),"params"in S&&r(3,p=S.params),"node"in S&&r(0,y=S.node),"use"in S&&r(4,v=S.use),"options"in S&&r(5,g=S.options),"role"in S&&r(6,_=S.role),"$$scope"in S&&r(13,a=S.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&r(9,h=h??"default"),t.$$.dirty&512&&setContext("color",h),r(7,x=twMerge(b[h],w[h],c&&"rounded-lg",d&&"border",k[h],f&&"shadow-md",e.class))},e=exclude_internal_props(e),[y,u,m,p,v,g,_,x,n,h,c,d,f,a,i,D,I,L,M,N,U]}class Frame extends SvelteComponent{constructor(e){super(),init(this,e,instance$b,create_fragment$b,safe_not_equal,{tag:1,color:9,rounded:10,border:11,shadow:12,transition:2,params:3,node:0,use:4,options:5,role:6})}}function cubicOut(t){const e=t-1;return e*e*e+1}function fade(t,{delay:e=0,duration:r=400,easing:o=identity}={}){const n=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:o,css:i=>`opacity: ${i*n}`}}const get_default_slot_changes_1=t=>({svgSize:t&4}),get_default_slot_context_1=t=>({svgSize:t[5][t[2]]}),get_default_slot_changes=t=>({svgSize:t&4}),get_default_slot_context=t=>({svgSize:t[5][t[2]]});function create_else_block$5(t){let e,r,o,n,i,a,s=t[0]&&create_if_block_2$3(t);const l=t[9].default,u=create_slot(l,t,t[8],get_default_slot_context_1);let h=[{type:"button"},t[6],{class:t[4]},{"aria-label":o=t[1]??t[0]}],c={};for(let d=0;d<h.length;d+=1)c=assign(c,h[d]);return{c(){e=element("button"),s&&s.c(),r=space(),u&&u.c(),this.h()},l(d){e=claim_element(d,"BUTTON",{type:!0,class:!0,"aria-label":!0});var f=children(e);s&&s.l(f),r=claim_space(f),u&&u.l(f),f.forEach(detach),this.h()},h(){set_attributes(e,c)},m(d,f){insert_hydration(d,e,f),s&&s.m(e,null),append_hydration(e,r),u&&u.m(e,null),e.autofocus&&e.focus(),n=!0,i||(a=listen(e,"click",t[10]),i=!0)},p(d,f){d[0]?s?s.p(d,f):(s=create_if_block_2$3(d),s.c(),s.m(e,r)):s&&(s.d(1),s=null),u&&u.p&&(!n||f&260)&&update_slot_base(u,l,d,d[8],n?get_slot_changes(l,d[8],f,get_default_slot_changes_1):get_all_dirty_from_scope(d[8]),get_default_slot_context_1),set_attributes(e,c=get_spread_update(h,[{type:"button"},f&64&&d[6],(!n||f&16)&&{class:d[4]},(!n||f&3&&o!==(o=d[1]??d[0]))&&{"aria-label":o}]))},i(d){n||(transition_in(u,d),n=!0)},o(d){transition_out(u,d),n=!1},d(d){d&&detach(e),s&&s.d(),u&&u.d(d),i=!1,a()}}}function create_if_block$5(t){let e,r,o,n,i=t[0]&&create_if_block_1$4(t);const a=t[9].default,s=create_slot(a,t,t[8],get_default_slot_context);let l=[{href:t[3]},t[6],{class:t[4]},{"aria-label":o=t[1]??t[0]}],u={};for(let h=0;h<l.length;h+=1)u=assign(u,l[h]);return{c(){e=element("a"),i&&i.c(),r=space(),s&&s.c(),this.h()},l(h){e=claim_element(h,"A",{href:!0,class:!0,"aria-label":!0});var c=children(e);i&&i.l(c),r=claim_space(c),s&&s.l(c),c.forEach(detach),this.h()},h(){set_attributes(e,u)},m(h,c){insert_hydration(h,e,c),i&&i.m(e,null),append_hydration(e,r),s&&s.m(e,null),n=!0},p(h,c){h[0]?i?i.p(h,c):(i=create_if_block_1$4(h),i.c(),i.m(e,r)):i&&(i.d(1),i=null),s&&s.p&&(!n||c&260)&&update_slot_base(s,a,h,h[8],n?get_slot_changes(a,h[8],c,get_default_slot_changes):get_all_dirty_from_scope(h[8]),get_default_slot_context),set_attributes(e,u=get_spread_update(l,[(!n||c&8)&&{href:h[3]},c&64&&h[6],(!n||c&16)&&{class:h[4]},(!n||c&3&&o!==(o=h[1]??h[0]))&&{"aria-label":o}]))},i(h){n||(transition_in(s,h),n=!0)},o(h){transition_out(s,h),n=!1},d(h){h&&detach(e),i&&i.d(),s&&s.d(h)}}}function create_if_block_2$3(t){let e,r;return{c(){e=element("span"),r=text(t[0]),this.h()},l(o){e=claim_element(o,"SPAN",{class:!0});var n=children(e);r=claim_text(n,t[0]),n.forEach(detach),this.h()},h(){attr(e,"class","sr-only")},m(o,n){insert_hydration(o,e,n),append_hydration(e,r)},p(o,n){n&1&&set_data(r,o[0])},d(o){o&&detach(e)}}}function create_if_block_1$4(t){let e,r;return{c(){e=element("span"),r=text(t[0]),this.h()},l(o){e=claim_element(o,"SPAN",{class:!0});var n=children(e);r=claim_text(n,t[0]),n.forEach(detach),this.h()},h(){attr(e,"class","sr-only")},m(o,n){insert_hydration(o,e,n),append_hydration(e,r)},p(o,n){n&1&&set_data(r,o[0])},d(o){o&&detach(e)}}}function create_fragment$a(t){let e,r,o,n;const i=[create_if_block$5,create_else_block$5],a=[];function s(l,u){return l[3]?0:1}return e=s(t),r=a[e]=i[e](t),{c(){r.c(),o=empty()},l(l){r.l(l),o=empty()},m(l,u){a[e].m(l,u),insert_hydration(l,o,u),n=!0},p(l,[u]){let h=e;e=s(l),e===h?a[e].p(l,u):(group_outros(),transition_out(a[h],1,1,()=>{a[h]=null}),check_outros(),r=a[e],r?r.p(l,u):(r=a[e]=i[e](l),r.c()),transition_in(r,1),r.m(o.parentNode,o))},i(l){n||(transition_in(r),n=!0)},o(l){transition_out(r),n=!1},d(l){l&&detach(o),a[e].d(l)}}}function instance$a(t,e,r){const o=["color","name","ariaLabel","size","href"];let n=compute_rest_props(e,o),{$$slots:i={},$$scope:a}=e;const s=getContext("background");let{color:l="default"}=e,{name:u=void 0}=e,{ariaLabel:h=void 0}=e,{size:c="md"}=e,{href:d=void 0}=e;const f={dark:"text-gray-500 hover:text-gray-900 hover:bg-gray-200 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-600",gray:"text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-gray-300",red:"text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-red-800 dark:hover:text-red-300",yellow:"text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-yellow-800 dark:hover:text-yellow-300",green:"text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-green-800 dark:hover:text-green-300",indigo:"text-indigo-500 focus:ring-indigo-400 hover:bg-indigo-200 dark:hover:bg-indigo-800 dark:hover:text-indigo-300",purple:"text-purple-500 focus:ring-purple-400 hover:bg-purple-200 dark:hover:bg-purple-800 dark:hover:text-purple-300",pink:"text-pink-500 focus:ring-pink-400 hover:bg-pink-200 dark:hover:bg-pink-800 dark:hover:text-pink-300",blue:"text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800 dark:hover:text-blue-300",primary:"text-primary-500 focus:ring-primary-400 hover:bg-primary-200 dark:hover:bg-primary-800 dark:hover:text-primary-300",default:"focus:ring-gray-400"},m={xs:"m-0.5 rounded-sm focus:ring-1 p-0.5",sm:"m-0.5 rounded focus:ring-1 p-0.5",md:"m-0.5 rounded-lg focus:ring-2 p-1.5",lg:"m-0.5 rounded-lg focus:ring-2 p-2.5"};let p;const y={xs:"w-3 h-3",sm:"w-3.5 h-3.5",md:"w-5 h-5",lg:"w-5 h-5"};function v(g){bubble.call(this,t,g)}return t.$$set=g=>{r(14,e=assign(assign({},e),exclude_internal_props(g))),r(6,n=compute_rest_props(e,o)),"color"in g&&r(7,l=g.color),"name"in g&&r(0,u=g.name),"ariaLabel"in g&&r(1,h=g.ariaLabel),"size"in g&&r(2,c=g.size),"href"in g&&r(3,d=g.href),"$$scope"in g&&r(8,a=g.$$scope)},t.$$.update=()=>{r(4,p=twMerge("focus:outline-none whitespace-normal",m[c],f[l],l==="default"&&(s?"hover:bg-gray-100 dark:hover:bg-gray-600":"hover:bg-gray-100 dark:hover:bg-gray-700"),e.class))},e=exclude_internal_props(e),[u,h,c,d,p,y,n,l,a,i,v]}class ToolbarButton extends SvelteComponent{constructor(e){super(),init(this,e,instance$a,create_fragment$a,safe_not_equal,{color:7,name:0,ariaLabel:1,size:2,href:3})}}function create_default_slot$5(t){let e,r,o;return{c(){e=svg_element("svg"),r=svg_element("path"),this.h()},l(n){e=claim_svg_element(n,"svg",{class:!0,fill:!0,viewBox:!0,xmlns:!0});var i=children(e);r=claim_svg_element(i,"path",{"fill-rule":!0,d:!0,"clip-rule":!0}),children(r).forEach(detach),i.forEach(detach),this.h()},h(){attr(r,"fill-rule","evenodd"),attr(r,"d","M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"),attr(r,"clip-rule","evenodd"),attr(e,"class",o=t[4]),attr(e,"fill","currentColor"),attr(e,"viewBox","0 0 20 20"),attr(e,"xmlns","http://www.w3.org/2000/svg")},m(n,i){insert_hydration(n,e,i),append_hydration(e,r)},p(n,i){i&16&&o!==(o=n[4])&&attr(e,"class",o)},d(n){n&&detach(e)}}}function create_fragment$9(t){let e,r;const o=[{name:t[0]},t[1],{class:twMerge("ml-auto",t[2].class)}];let n={$$slots:{default:[create_default_slot$5,({svgSize:i})=>({4:i}),({svgSize:i})=>i?16:0]},$$scope:{ctx:t}};for(let i=0;i<o.length;i+=1)n=assign(n,o[i]);return e=new ToolbarButton({props:n}),e.$on("click",t[3]),{c(){create_component(e.$$.fragment)},l(i){claim_component(e.$$.fragment,i)},m(i,a){mount_component(e,i,a),r=!0},p(i,[a]){const s=a&7?get_spread_update(o,[a&1&&{name:i[0]},a&2&&get_spread_object(i[1]),a&4&&{class:twMerge("ml-auto",i[2].class)}]):{};a&48&&(s.$$scope={dirty:a,ctx:i}),e.$set(s)},i(i){r||(transition_in(e.$$.fragment,i),r=!0)},o(i){transition_out(e.$$.fragment,i),r=!1},d(i){destroy_component(e,i)}}}function instance$9(t,e,r){const o=["name"];let n=compute_rest_props(e,o),{name:i="Close"}=e;function a(s){bubble.call(this,t,s)}return t.$$set=s=>{r(2,e=assign(assign({},e),exclude_internal_props(s))),r(1,n=compute_rest_props(e,o)),"name"in s&&r(0,i=s.name)},e=exclude_internal_props(e),[i,n,e,a]}class CloseButton extends SvelteComponent{constructor(e){super(),init(this,e,instance$9,create_fragment$9,safe_not_equal,{name:0})}}const get_close_button_slot_changes=t=>({}),get_close_button_slot_context=t=>({close:t[3]}),get_icon_slot_changes=t=>({}),get_icon_slot_context=t=>({});function create_if_block$4(t){let e,r;const o=[t[4],{class:t[2]},{role:"alert"}];let n={$$slots:{default:[create_default_slot$4]},$$scope:{ctx:t}};for(let i=0;i<o.length;i+=1)n=assign(n,o[i]);return e=new Frame({props:n}),{c(){create_component(e.$$.fragment)},l(i){claim_component(e.$$.fragment,i)},m(i,a){mount_component(e,i,a),r=!0},p(i,a){const s=a&20?get_spread_update(o,[a&16&&get_spread_object(i[4]),a&4&&{class:i[2]},o[2]]):{};a&65585&&(s.$$scope={dirty:a,ctx:i}),e.$set(s)},i(i){r||(transition_in(e.$$.fragment,i),r=!0)},o(i){transition_out(e.$$.fragment,i),r=!1},d(i){destroy_component(e,i)}}}function create_if_block_3$2(t){let e;const r=t[7].icon,o=create_slot(r,t,t[16],get_icon_slot_context);return{c(){o&&o.c()},l(n){o&&o.l(n)},m(n,i){o&&o.m(n,i),e=!0},p(n,i){o&&o.p&&(!e||i&65536)&&update_slot_base(o,r,n,n[16],e?get_slot_changes(r,n[16],i,get_icon_slot_changes):get_all_dirty_from_scope(n[16]),get_icon_slot_context)},i(n){e||(transition_in(o,n),e=!0)},o(n){transition_out(o,n),e=!1},d(n){o&&o.d(n)}}}function create_else_block$4(t){let e;const r=t[7].default,o=create_slot(r,t,t[16],null);return{c(){o&&o.c()},l(n){o&&o.l(n)},m(n,i){o&&o.m(n,i),e=!0},p(n,i){o&&o.p&&(!e||i&65536)&&update_slot_base(o,r,n,n[16],e?get_slot_changes(r,n[16],i,null):get_all_dirty_from_scope(n[16]),null)},i(n){e||(transition_in(o,n),e=!0)},o(n){transition_out(o,n),e=!1},d(n){o&&o.d(n)}}}function create_if_block_2$2(t){let e,r;const o=t[7].default,n=create_slot(o,t,t[16],null);return{c(){e=element("div"),n&&n.c()},l(i){e=claim_element(i,"DIV",{});var a=children(e);n&&n.l(a),a.forEach(detach)},m(i,a){insert_hydration(i,e,a),n&&n.m(e,null),r=!0},p(i,a){n&&n.p&&(!r||a&65536)&&update_slot_base(n,o,i,i[16],r?get_slot_changes(o,i[16],a,null):get_all_dirty_from_scope(i[16]),null)},i(i){r||(transition_in(n,i),r=!0)},o(i){transition_out(n,i),r=!1},d(i){i&&detach(e),n&&n.d(i)}}}function create_if_block_1$3(t){let e;const r=t[7]["close-button"],o=create_slot(r,t,t[16],get_close_button_slot_context),n=o||fallback_block(t);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){o?o.p&&(!e||a&65536)&&update_slot_base(o,r,i,i[16],e?get_slot_changes(r,i[16],a,get_close_button_slot_changes):get_all_dirty_from_scope(i[16]),get_close_button_slot_context):n&&n.p&&(!e||a&16)&&n.p(i,e?a:-1)},i(i){e||(transition_in(n,i),e=!0)},o(i){transition_out(n,i),e=!1},d(i){n&&n.d(i)}}}function fallback_block(t){let e,r;return e=new CloseButton({props:{class:"ml-auto -mr-1.5 -my-1.5 dark:hover:bg-gray-700",color:t[4].color}}),e.$on("click",t[3]),e.$on("click",t[8]),e.$on("change",t[9]),e.$on("keydown",t[10]),e.$on("keyup",t[11]),e.$on("focus",t[12]),e.$on("blur",t[13]),e.$on("mouseenter",t[14]),e.$on("mouseleave",t[15]),{c(){create_component(e.$$.fragment)},l(o){claim_component(e.$$.fragment,o)},m(o,n){mount_component(e,o,n),r=!0},p(o,n){const i={};n&16&&(i.color=o[4].color),e.$set(i)},i(o){r||(transition_in(e.$$.fragment,o),r=!0)},o(o){transition_out(e.$$.fragment,o),r=!1},d(o){destroy_component(e,o)}}}function create_default_slot$4(t){let e,r,o,n,i,a,s=t[5].icon&&create_if_block_3$2(t);const l=[create_if_block_2$2,create_else_block$4],u=[];function h(d,f){return d[5].icon||d[0]?0:1}r=h(t),o=u[r]=l[r](t);let c=t[0]&&create_if_block_1$3(t);return{c(){s&&s.c(),e=space(),o.c(),n=space(),c&&c.c(),i=empty()},l(d){s&&s.l(d),e=claim_space(d),o.l(d),n=claim_space(d),c&&c.l(d),i=empty()},m(d,f){s&&s.m(d,f),insert_hydration(d,e,f),u[r].m(d,f),insert_hydration(d,n,f),c&&c.m(d,f),insert_hydration(d,i,f),a=!0},p(d,f){d[5].icon?s?(s.p(d,f),f&32&&transition_in(s,1)):(s=create_if_block_3$2(d),s.c(),transition_in(s,1),s.m(e.parentNode,e)):s&&(group_outros(),transition_out(s,1,1,()=>{s=null}),check_outros());let m=r;r=h(d),r===m?u[r].p(d,f):(group_outros(),transition_out(u[m],1,1,()=>{u[m]=null}),check_outros(),o=u[r],o?o.p(d,f):(o=u[r]=l[r](d),o.c()),transition_in(o,1),o.m(n.parentNode,n)),d[0]?c?(c.p(d,f),f&1&&transition_in(c,1)):(c=create_if_block_1$3(d),c.c(),transition_in(c,1),c.m(i.parentNode,i)):c&&(group_outros(),transition_out(c,1,1,()=>{c=null}),check_outros())},i(d){a||(transition_in(s),transition_in(o),transition_in(c),a=!0)},o(d){transition_out(s),transition_out(o),transition_out(c),a=!1},d(d){d&&(detach(e),detach(n),detach(i)),s&&s.d(d),u[r].d(d),c&&c.d(d)}}}function create_fragment$8(t){let e,r,o=t[1]&&create_if_block$4(t);return{c(){o&&o.c(),e=empty()},l(n){o&&o.l(n),e=empty()},m(n,i){o&&o.m(n,i),insert_hydration(n,e,i),r=!0},p(n,[i]){n[1]?o?(o.p(n,i),i&2&&transition_in(o,1)):(o=create_if_block$4(n),o.c(),transition_in(o,1),o.m(e.parentNode,e)):o&&(group_outros(),transition_out(o,1,1,()=>{o=null}),check_outros())},i(n){r||(transition_in(o),r=!0)},o(n){transition_out(o),r=!1},d(n){n&&detach(e),o&&o.d(n)}}}function instance$8(t,e,r){const o=["dismissable","defaultClass"];let n=compute_rest_props(e,o),{$$slots:i={},$$scope:a}=e;const s=compute_slots(i);let{dismissable:l=!1}=e,{defaultClass:u="p-4 gap-3 text-sm"}=e,h=!0;const c=createEventDispatcher();function d(k){k.stopPropagation(),r(1,h=!1)}let f;function m(k){bubble.call(this,t,k)}function p(k){bubble.call(this,t,k)}function y(k){bubble.call(this,t,k)}function v(k){bubble.call(this,t,k)}function g(k){bubble.call(this,t,k)}function _(k){bubble.call(this,t,k)}function b(k){bubble.call(this,t,k)}function w(k){bubble.call(this,t,k)}return t.$$set=k=>{r(18,e=assign(assign({},e),exclude_internal_props(k))),r(4,n=compute_rest_props(e,o)),"dismissable"in k&&r(0,l=k.dismissable),"defaultClass"in k&&r(6,u=k.defaultClass),"$$scope"in k&&r(16,a=k.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&c(h?"open":"close"),r(2,f=twMerge(u,(s.icon||l)&&"flex items-center",e.class)),r(4,n.color=n.color??"primary",n),r(4,n.rounded=n.rounded??!0,n),l&&r(4,n.transition=n.transition??fade,n)},e=exclude_internal_props(e),[l,h,f,d,n,s,u,i,m,p,y,v,g,_,b,w,a]}class Alert extends SvelteComponent{constructor(e){super(),init(this,e,instance$8,create_fragment$8,safe_not_equal,{dismissable:0,defaultClass:6})}}function create_dynamic_element(t){let e,r,o,n,i,a;const s=t[10].default,l=create_slot(s,t,t[9],null);let u=[{type:r=t[0]?void 0:t[1]},{href:t[0]},{role:o=t[0]?"link":"button"},t[3],{class:t[2]}],h={};for(let c=0;c<u.length;c+=1)h=assign(h,u[c]);return{c(){e=element(t[0]?"a":"button"),l&&l.c(),this.h()},l(c){e=claim_element(c,((t[0]?"a":"button")||"null").toUpperCase(),{type:!0,href:!0,role:!0,class:!0});var d=children(e);l&&l.l(d),d.forEach(detach),this.h()},h(){set_dynamic_element_data(t[0]?"a":"button")(e,h)},m(c,d){insert_hydration(c,e,d),l&&l.m(e,null),n=!0,i||(a=[listen(e,"click",t[11]),listen(e,"change",t[12]),listen(e,"keydown",t[13]),listen(e,"keyup",t[14]),listen(e,"touchstart",t[15],{passive:!0}),listen(e,"touchend",t[16]),listen(e,"touchcancel",t[17]),listen(e,"mouseenter",t[18]),listen(e,"mouseleave",t[19])],i=!0)},p(c,d){l&&l.p&&(!n||d&512)&&update_slot_base(l,s,c,c[9],n?get_slot_changes(s,c[9],d,null):get_all_dirty_from_scope(c[9]),null),set_dynamic_element_data(c[0]?"a":"button")(e,h=get_spread_update(u,[(!n||d&3&&r!==(r=c[0]?void 0:c[1]))&&{type:r},(!n||d&1)&&{href:c[0]},(!n||d&1&&o!==(o=c[0]?"link":"button"))&&{role:o},d&8&&c[3],(!n||d&4)&&{class:c[2]}]))},i(c){n||(transition_in(l,c),n=!0)},o(c){transition_out(l,c),n=!1},d(c){c&&detach(e),l&&l.d(c),i=!1,run_all(a)}}}function create_fragment$7(t){let e=t[0]?"a":"button",r,o,n=(t[0]?"a":"button")&&create_dynamic_element(t);return{c(){n&&n.c(),r=empty()},l(i){n&&n.l(i),r=empty()},m(i,a){n&&n.m(i,a),insert_hydration(i,r,a),o=!0},p(i,[a]){i[0],e?safe_not_equal(e,i[0]?"a":"button")?(n.d(1),n=create_dynamic_element(i),e=i[0]?"a":"button",n.c(),n.m(r.parentNode,r)):n.p(i,a):(n=create_dynamic_element(i),e=i[0]?"a":"button",n.c(),n.m(r.parentNode,r))},i(i){o||(transition_in(n,i),o=!0)},o(i){transition_out(n,i),o=!1},d(i){i&&detach(r),n&&n.d(i)}}}function instance$7(t,e,r){const o=["pill","outline","size","href","type","color","shadow"];let n=compute_rest_props(e,o),{$$slots:i={},$$scope:a}=e;const s=getContext("group");let{pill:l=!1}=e,{outline:u=!1}=e,{size:h=s?"sm":"md"}=e,{href:c=void 0}=e,{type:d="button"}=e,{color:f=s?u?"dark":"alternative":"primary"}=e,{shadow:m=!1}=e;const p={alternative:"text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400 hover:text-primary-700 focus:text-primary-700 dark:focus:text-white dark:hover:text-white",blue:"text-white bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700",dark:"text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700",green:"text-white bg-green-700 hover:bg-green-800 dark:bg-green-600 dark:hover:bg-green-700",light:"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600",primary:"text-white bg-primary-700 hover:bg-primary-800 dark:bg-primary-600 dark:hover:bg-primary-700",purple:"text-white bg-purple-700 hover:bg-purple-800 dark:bg-purple-600 dark:hover:bg-purple-700",red:"text-white bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700",yellow:"text-white bg-yellow-400 hover:bg-yellow-500 ",none:""},y={alternative:"focus:ring-gray-200 dark:focus:ring-gray-700",blue:"focus:ring-blue-300 dark:focus:ring-blue-800",dark:"focus:ring-gray-300 dark:focus:ring-gray-700",green:"focus:ring-green-300 dark:focus:ring-green-800",light:"focus:ring-gray-200 dark:focus:ring-gray-700",primary:"focus:ring-primary-300 dark:focus:ring-primary-800",purple:"focus:ring-purple-300 dark:focus:ring-purple-900",red:"focus:ring-red-300 dark:focus:ring-red-900",yellow:"focus:ring-yellow-300 dark:focus:ring-yellow-900",none:""},v={alternative:"shadow-gray-500/50 dark:shadow-gray-800/80",blue:"shadow-blue-500/50 dark:shadow-blue-800/80",dark:"shadow-gray-500/50 dark:shadow-gray-800/80",green:"shadow-green-500/50 dark:shadow-green-800/80",light:"shadow-gray-500/50 dark:shadow-gray-800/80",primary:"shadow-primary-500/50 dark:shadow-primary-800/80",purple:"shadow-purple-500/50 dark:shadow-purple-800/80",red:"shadow-red-500/50 dark:shadow-red-800/80 ",yellow:"shadow-yellow-500/50 dark:shadow-yellow-800/80 ",none:""},g={alternative:"text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:bg-gray-900 focus:text-white focus:ring-gray-300 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-800",blue:"text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600",dark:"text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:bg-gray-900 focus:text-white dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-600",green:"text-green-700 hover:text-white border border-green-700 hover:bg-green-800 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600",light:"text-gray-500 hover:text-gray-900 bg-white border border-gray-200 dark:border-gray-600 dark:hover:text-white dark:text-gray-400 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-600",primary:"text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-700 dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600",purple:"text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500",red:"text-red-700 hover:text-white border border-red-700 hover:bg-red-800 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600",yellow:"text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400",none:""},_={xs:"px-3 py-2 text-xs",sm:"px-4 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},b=()=>u||f==="alternative"||f==="light";let w;function k(F){bubble.call(this,t,F)}function x(F){bubble.call(this,t,F)}function D(F){bubble.call(this,t,F)}function I(F){bubble.call(this,t,F)}function L(F){bubble.call(this,t,F)}function M(F){bubble.call(this,t,F)}function N(F){bubble.call(this,t,F)}function U(F){bubble.call(this,t,F)}function S(F){bubble.call(this,t,F)}return t.$$set=F=>{r(27,e=assign(assign({},e),exclude_internal_props(F))),r(3,n=compute_rest_props(e,o)),"pill"in F&&r(4,l=F.pill),"outline"in F&&r(5,u=F.outline),"size"in F&&r(6,h=F.size),"href"in F&&r(0,c=F.href),"type"in F&&r(1,d=F.type),"color"in F&&r(7,f=F.color),"shadow"in F&&r(8,m=F.shadow),"$$scope"in F&&r(9,a=F.$$scope)},t.$$.update=()=>{r(2,w=twMerge("text-center font-medium",s?"focus:ring-2":"focus:ring-4",s&&"focus:z-10",s||"focus:outline-none","inline-flex items-center justify-center "+_[h],u?g[f]:p[f],f==="alternative"&&(s?"dark:bg-gray-700 dark:text-white dark:border-gray-700 dark:hover:border-gray-600 dark:hover:bg-gray-600":"dark:bg-transparent dark:border-gray-600 dark:hover:border-gray-700"),u&&f==="dark"&&(s?"dark:text-white dark:border-white":"dark:text-gray-400 dark:border-gray-700"),y[f],b()&&s&&"border-l-0 first:border-l",s?l&&"first:rounded-l-full last:rounded-r-full"||"first:rounded-l-lg last:rounded-r-lg":l&&"rounded-full"||"rounded-lg",m&&"shadow-lg",m&&v[f],e.disabled&&"cursor-not-allowed opacity-50",e.class))},e=exclude_internal_props(e),[c,d,w,n,l,u,h,f,m,a,i,k,x,D,I,L,M,N,U,S]}class Button extends SvelteComponent{constructor(e){super(),init(this,e,instance$7,create_fragment$7,safe_not_equal,{pill:4,outline:5,size:6,href:0,type:1,color:7,shadow:8})}}function create_else_block$3(t){let e;const r=t[7].default,o=create_slot(r,t,t[6],null);return{c(){o&&o.c()},l(n){o&&o.l(n)},m(n,i){o&&o.m(n,i),e=!0},p(n,i){o&&o.p&&(!e||i&64)&&update_slot_base(o,r,n,n[6],e?get_slot_changes(r,n[6],i,null):get_all_dirty_from_scope(n[6]),null)},i(n){e||(transition_in(o,n),e=!0)},o(n){transition_out(o,n),e=!1},d(n){o&&o.d(n)}}}function create_if_block$3(t){let e,r;const o=t[7].default,n=create_slot(o,t,t[6],null);let i=[t[3],{class:t[2]}],a={};for(let s=0;s<i.length;s+=1)a=assign(a,i[s]);return{c(){e=element("label"),n&&n.c(),this.h()},l(s){e=claim_element(s,"LABEL",{class:!0});var l=children(e);n&&n.l(l),l.forEach(detach),this.h()},h(){set_attributes(e,a)},m(s,l){insert_hydration(s,e,l),n&&n.m(e,null),t[8](e),r=!0},p(s,l){n&&n.p&&(!r||l&64)&&update_slot_base(n,o,s,s[6],r?get_slot_changes(o,s[6],l,null):get_all_dirty_from_scope(s[6]),null),set_attributes(e,a=get_spread_update(i,[l&8&&s[3],(!r||l&4)&&{class:s[2]}]))},i(s){r||(transition_in(n,s),r=!0)},o(s){transition_out(n,s),r=!1},d(s){s&&detach(e),n&&n.d(s),t[8](null)}}}function create_fragment$6(t){let e,r,o,n;const i=[create_if_block$3,create_else_block$3],a=[];function s(l,u){return l[0]?0:1}return e=s(t),r=a[e]=i[e](t),{c(){r.c(),o=empty()},l(l){r.l(l),o=empty()},m(l,u){a[e].m(l,u),insert_hydration(l,o,u),n=!0},p(l,[u]){let h=e;e=s(l),e===h?a[e].p(l,u):(group_outros(),transition_out(a[h],1,1,()=>{a[h]=null}),check_outros(),r=a[e],r?r.p(l,u):(r=a[e]=i[e](l),r.c()),transition_in(r,1),r.m(o.parentNode,o))},i(l){n||(transition_in(r),n=!0)},o(l){transition_out(r),n=!1},d(l){l&&detach(o),a[e].d(l)}}}function instance$6(t,e,r){let o;const n=["color","defaultClass","show"];let i=compute_rest_props(e,n),{$$slots:a={},$$scope:s}=e,{color:l="gray"}=e,{defaultClass:u="text-sm font-medium block"}=e,{show:h=!0}=e,c;const d={gray:"text-gray-900 dark:text-gray-300",green:"text-green-700 dark:text-green-500",red:"text-red-700 dark:text-red-500",disabled:"text-gray-400 dark:text-gray-500"};function f(m){binding_callbacks[m?"unshift":"push"](()=>{c=m,r(1,c)})}return t.$$set=m=>{r(10,e=assign(assign({},e),exclude_internal_props(m))),r(3,i=compute_rest_props(e,n)),"color"in m&&r(4,l=m.color),"defaultClass"in m&&r(5,u=m.defaultClass),"show"in m&&r(0,h=m.show),"$$scope"in m&&r(6,s=m.$$scope)},t.$$.update=()=>{if(t.$$.dirty&18){const m=c==null?void 0:c.control;r(4,l=m!=null&&m.disabled?"disabled":l)}r(2,o=twMerge(u,d[l],e.class))},e=exclude_internal_props(e),[h,c,o,i,l,u,s,a,f]}class Label extends SvelteComponent{constructor(e){super(),init(this,e,instance$6,create_fragment$6,safe_not_equal,{color:4,defaultClass:5,show:0})}}const colorClasses={primary:"text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600",secondary:"text-secondary-600 focus:ring-secondary-500 dark:focus:ring-secondary-600",red:"text-red-600 focus:ring-red-500 dark:focus:ring-red-600",green:"text-green-600 focus:ring-green-500 dark:focus:ring-green-600",purple:"text-purple-600 focus:ring-purple-500 dark:focus:ring-purple-600",teal:"text-teal-600 focus:ring-teal-500 dark:focus:ring-teal-600",yellow:"text-yellow-400 focus:ring-yellow-500 dark:focus:ring-yellow-600",orange:"text-orange-500 focus:ring-orange-500 dark:focus:ring-orange-600",blue:"text-blue-600 focus:ring-blue-500 dark:focus:ring-blue-600"},labelClass=(t,e)=>twMerge(t?"inline-flex":"flex","items-center",e);let spacing="mr-2";const inputClass=(t,e,r,o,n)=>twMerge("w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2",spacing,o?"dark:bg-gray-600 dark:border-gray-500":"dark:bg-gray-700 dark:border-gray-600",t&&"sr-only peer",r&&"rounded",colorClasses[e],n);function create_default_slot$3(t){let e,r,o,n,i,a,s,l=[{type:"checkbox"},{__value:t[5]},t[12],{class:r=twMerge(t[6],inputClass(t[3],t[2],!0,t[7],t[11].default||t[10].class))}],u={};for(let d=0;d<l.length;d+=1)u=assign(u,l[d]);const h=t[13].default,c=create_slot(h,t,t[26],null);return{c(){e=element("input"),n=space(),c&&c.c(),this.h()},l(d){e=claim_element(d,"INPUT",{type:!0,class:!0}),n=claim_space(d),c&&c.l(d),this.h()},h(){set_attributes(e,u)},m(d,f){insert_hydration(d,e,f),e.autofocus&&e.focus(),e.checked=t[1],insert_hydration(d,n,f),c&&c.m(d,f),i=!0,a||(s=[action_destroyer(o=t[8].call(null,e,t[0])),listen(e,"change",t[25]),listen(e,"keyup",t[14]),listen(e,"keydown",t[15]),listen(e,"keypress",t[16]),listen(e,"focus",t[17]),listen(e,"blur",t[18]),listen(e,"click",t[19]),listen(e,"mouseover",t[20]),listen(e,"mouseenter",t[21]),listen(e,"mouseleave",t[22]),listen(e,"paste",t[23]),listen(e,"change",t[9]),listen(e,"change",t[24])],a=!0)},p(d,f){set_attributes(e,u=get_spread_update(l,[{type:"checkbox"},(!i||f&32)&&{__value:d[5]},f&4096&&d[12],(!i||f&3148&&r!==(r=twMerge(d[6],inputClass(d[3],d[2],!0,d[7],d[11].default||d[10].class))))&&{class:r}])),o&&is_function(o.update)&&f&1&&o.update.call(null,d[0]),f&2&&(e.checked=d[1]),c&&c.p&&(!i||f&67108864)&&update_slot_base(c,h,d,d[26],i?get_slot_changes(h,d[26],f,null):get_all_dirty_from_scope(d[26]),null)},i(d){i||(transition_in(c,d),i=!0)},o(d){transition_out(c,d),i=!1},d(d){d&&(detach(e),detach(n)),c&&c.d(d),a=!1,run_all(s)}}}function create_fragment$5(t){let e,r;return e=new Label({props:{class:labelClass(t[4],t[10].class),show:t[11].default,$$slots:{default:[create_default_slot$3]},$$scope:{ctx:t}}}),{c(){create_component(e.$$.fragment)},l(o){claim_component(e.$$.fragment,o)},m(o,n){mount_component(e,o,n),r=!0},p(o,[n]){const i={};n&1040&&(i.class=labelClass(o[4],o[10].class)),n&2048&&(i.show=o[11].default),n&67116143&&(i.$$scope={dirty:n,ctx:o}),e.$set(i)},i(o){r||(transition_in(e.$$.fragment,o),r=!0)},o(o){transition_out(e.$$.fragment,o),r=!1},d(o){destroy_component(e,o)}}}function instance$5(t,e,r){const o=["color","custom","inline","group","value","checked","spacing"];let n=compute_rest_props(e,o),{$$slots:i={},$$scope:a}=e;const s=compute_slots(i);let{color:l="primary"}=e,{custom:u=!1}=e,{inline:h=!1}=e,{group:c=[]}=e,{value:d="on"}=e,{checked:f=void 0}=e,{spacing:m="mr-2"}=e,p=getContext("background");function y(S,F){return f===void 0&&r(1,f=F.includes(d)),v(),{update(X){r(1,f=X.includes(d))}}}function v(){const S=c.indexOf(d);f===void 0&&r(1,f=S>=0),f?S<0&&(c.push(d),r(0,c)):S>=0&&(c.splice(S,1),r(0,c))}function g(S){bubble.call(this,t,S)}function _(S){bubble.call(this,t,S)}function b(S){bubble.call(this,t,S)}function w(S){bubble.call(this,t,S)}function k(S){bubble.call(this,t,S)}function x(S){bubble.call(this,t,S)}function D(S){bubble.call(this,t,S)}function I(S){bubble.call(this,t,S)}function L(S){bubble.call(this,t,S)}function M(S){bubble.call(this,t,S)}function N(S){bubble.call(this,t,S)}function U(){f=this.checked,r(1,f)}return t.$$set=S=>{r(10,e=assign(assign({},e),exclude_internal_props(S))),r(12,n=compute_rest_props(e,o)),"color"in S&&r(2,l=S.color),"custom"in S&&r(3,u=S.custom),"inline"in S&&r(4,h=S.inline),"group"in S&&r(0,c=S.group),"value"in S&&r(5,d=S.value),"checked"in S&&r(1,f=S.checked),"spacing"in S&&r(6,m=S.spacing),"$$scope"in S&&r(26,a=S.$$scope)},e=exclude_internal_props(e),[c,f,l,u,h,d,m,p,y,v,e,s,n,i,g,_,b,w,k,x,D,I,L,M,N,U,a]}class Checkbox extends SvelteComponent{constructor(e){super(),init(this,e,instance$5,create_fragment$5,safe_not_equal,{color:2,custom:3,inline:4,group:0,value:5,checked:1,spacing:6})}}function create_default_slot$2(t){let e,r,o;const n=t[8].default,i=create_slot(n,t,t[13],null);return{c(){e=element("span"),r=space(),i&&i.c(),this.h()},l(a){e=claim_element(a,"SPAN",{class:!0}),children(e).forEach(detach),r=claim_space(a),i&&i.l(a),this.h()},h(){attr(e,"class",t[3])},m(a,s){insert_hydration(a,e,s),insert_hydration(a,r,s),i&&i.m(a,s),o=!0},p(a,s){(!o||s&8)&&attr(e,"class",a[3]),i&&i.p&&(!o||s&8192)&&update_slot_base(i,n,a,a[13],o?get_slot_changes(n,a[13],s,null):get_all_dirty_from_scope(a[13]),null)},i(a){o||(transition_in(i,a),o=!0)},o(a){transition_out(i,a),o=!1},d(a){a&&(detach(e),detach(r)),i&&i.d(a)}}}function create_fragment$4(t){let e,r,o,n;const i=[{custom:!0},t[5],{class:t[4].class},{value:t[2]}];function a(u){t[9](u)}function s(u){t[10](u)}let l={$$slots:{default:[create_default_slot$2]},$$scope:{ctx:t}};for(let u=0;u<i.length;u+=1)l=assign(l,i[u]);return t[1]!==void 0&&(l.checked=t[1]),t[0]!==void 0&&(l.group=t[0]),e=new Checkbox({props:l}),binding_callbacks.push(()=>bind(e,"checked",a)),binding_callbacks.push(()=>bind(e,"group",s)),e.$on("click",t[11]),e.$on("change",t[12]),{c(){create_component(e.$$.fragment)},l(u){claim_component(e.$$.fragment,u)},m(u,h){mount_component(e,u,h),n=!0},p(u,[h]){const c=h&52?get_spread_update(i,[i[0],h&32&&get_spread_object(u[5]),h&16&&{class:u[4].class},h&4&&{value:u[2]}]):{};h&8200&&(c.$$scope={dirty:h,ctx:u}),!r&&h&2&&(r=!0,c.checked=u[1],add_flush_callback(()=>r=!1)),!o&&h&1&&(o=!0,c.group=u[0],add_flush_callback(()=>o=!1)),e.$set(c)},i(u){n||(transition_in(e.$$.fragment,u),n=!0)},o(u){transition_out(e.$$.fragment,u),n=!1},d(u){destroy_component(e,u)}}}const common="mr-3 shrink-0 bg-gray-200 rounded-full peer-focus:ring-4 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all";function instance$4(t,e,r){const o=["size","group","value","checked","customSize"];let n=compute_rest_props(e,o),{$$slots:i={},$$scope:a}=e,{size:s="default"}=e,{group:l=[]}=e,{value:u=""}=e,{checked:h=void 0}=e,{customSize:c=""}=e,d=getContext("background");const f={primary:"peer-focus:ring-primary-300 dark:peer-focus:ring-primary-800 peer-checked:bg-primary-600",secondary:"peer-focus:ring-secondary-300 dark:peer-focus:ring-secondary-800 peer-checked:bg-secondary-600",red:"peer-focus:ring-red-300 dark:peer-focus:ring-red-800 peer-checked:bg-red-600",green:"peer-focus:ring-green-300 dark:peer-focus:ring-green-800 peer-checked:bg-green-600",purple:"peer-focus:ring-purple-300 dark:peer-focus:ring-purple-800 peer-checked:bg-purple-600",yellow:"peer-focus:ring-yellow-300 dark:peer-focus:ring-yellow-800 peer-checked:bg-yellow-400",teal:"peer-focus:ring-teal-300 dark:peer-focus:ring-teal-800 peer-checked:bg-teal-600",orange:"peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:bg-orange-500",blue:"peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 peer-checked:bg-blue-600"},m={small:"w-9 h-5 after:top-[2px] after:left-[2px] after:h-4 after:w-4",default:"w-11 h-6 after:top-0.5 after:left-[2px] after:h-5 after:w-5",large:"w-14 h-7 after:top-0.5 after:left-[4px] after:h-6 after:w-6",custom:c};let p;function y(b){h=b,r(1,h)}function v(b){l=b,r(0,l)}function g(b){bubble.call(this,t,b)}function _(b){bubble.call(this,t,b)}return t.$$set=b=>{r(4,e=assign(assign({},e),exclude_internal_props(b))),r(5,n=compute_rest_props(e,o)),"size"in b&&r(6,s=b.size),"group"in b&&r(0,l=b.group),"value"in b&&r(2,u=b.value),"checked"in b&&r(1,h=b.checked),"customSize"in b&&r(7,c=b.customSize),"$$scope"in b&&r(13,a=b.$$scope)},t.$$.update=()=>{r(3,p=twMerge(common,d?"dark:bg-gray-600 dark:border-gray-500":"dark:bg-gray-700 dark:border-gray-600",f[n.color??"primary"],m[s],"relative",e.classDiv))},e=exclude_internal_props(e),[l,h,u,p,e,n,s,c,i,y,v,g,_,a]}class Toggle extends SvelteComponent{constructor(e){super(),init(this,e,instance$4,create_fragment$4,safe_not_equal,{size:6,group:0,value:2,checked:1,customSize:7})}}function is_date(t){return Object.prototype.toString.call(t)==="[object Date]"}function get_interpolator(t,e){if(t===e||t!==t)return()=>t;const r=typeof t;if(r!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const o=e.map((n,i)=>get_interpolator(t[i],n));return n=>o.map(i=>i(n))}if(r==="object"){if(!t||!e)throw new Error("Object cannot be null");if(is_date(t)&&is_date(e)){t=t.getTime(),e=e.getTime();const i=e-t;return a=>new Date(t+a*i)}const o=Object.keys(e),n={};return o.forEach(i=>{n[i]=get_interpolator(t[i],e[i])}),i=>{const a={};return o.forEach(s=>{a[s]=n[s](i)}),a}}if(r==="number"){const o=e-t;return n=>t+n*o}throw new Error(`Cannot interpolate ${r} values`)}function tweened(t,e={}){const r=writable(t);let o,n=t;function i(a,s){if(t==null)return r.set(t=a),Promise.resolve();n=a;let l=o,u=!1,{delay:h=0,duration:c=400,easing:d=identity,interpolate:f=get_interpolator}=assign(assign({},e),s);if(c===0)return l&&(l.abort(),l=null),r.set(t=n),Promise.resolve();const m=now()+h;let p;return o=loop(y=>{if(y<m)return!0;u||(p=f(t,a),typeof c=="function"&&(c=c(t,a)),u=!0),l&&(l.abort(),l=null);const v=y-m;return v>c?(r.set(t=a),!1):(r.set(t=p(d(v/c))),!0)}),o.promise}return{set:i,update:(a,s)=>i(a(n,t),s),subscribe:r.subscribe}}function create_if_block_1$2(t){let e,r,o,n,i,a,s,l,u=[t[11],{class:l=twMerge("flex justify-between mb-1",t[12].classLabelOutside)}],h={};for(let c=0;c<u.length;c+=1)h=assign(h,u[c]);return{c(){e=element("div"),r=element("span"),o=text(t[4]),n=space(),i=element("span"),a=text(t[0]),s=text("%"),this.h()},l(c){e=claim_element(c,"DIV",{class:!0});var d=children(e);r=claim_element(d,"SPAN",{class:!0});var f=children(r);o=claim_text(f,t[4]),f.forEach(detach),n=claim_space(d),i=claim_element(d,"SPAN",{class:!0});var m=children(i);a=claim_text(m,t[0]),s=claim_text(m,"%"),m.forEach(detach),d.forEach(detach),this.h()},h(){attr(r,"class","text-base font-medium text-blue-700 dark:text-white"),attr(i,"class","text-sm font-medium text-blue-700 dark:text-white"),set_attributes(e,h)},m(c,d){insert_hydration(c,e,d),append_hydration(e,r),append_hydration(r,o),append_hydration(e,n),append_hydration(e,i),append_hydration(i,a),append_hydration(i,s)},p(c,d){d&16&&set_data(o,c[4]),d&1&&set_data(a,c[0]),set_attributes(e,h=get_spread_update(u,[d&2048&&c[11],d&4096&&l!==(l=twMerge("flex justify-between mb-1",c[12].classLabelOutside))&&{class:l}]))},d(c){c&&detach(e)}}}function create_else_block$2(t){let e,r;return{c(){e=element("div"),this.h()},l(o){e=claim_element(o,"DIV",{class:!0,style:!0}),children(e).forEach(detach),this.h()},h(){attr(e,"class",r=twJoin(t[10][t[5]],t[2],"rounded-full")),set_style(e,"width",t[8]+"%")},m(o,n){insert_hydration(o,e,n)},p(o,n){n&36&&r!==(r=twJoin(o[10][o[5]],o[2],"rounded-full"))&&attr(e,"class",r),n&256&&set_style(e,"width",o[8]+"%")},d(o){o&&detach(e)}}}function create_if_block$2(t){let e,r=t[8].toFixed(t[1])+"",o,n,i;return{c(){e=element("div"),o=text(r),n=text("%"),this.h()},l(a){e=claim_element(a,"DIV",{class:!0,style:!0});var s=children(e);o=claim_text(s,r),n=claim_text(s,"%"),s.forEach(detach),this.h()},h(){attr(e,"class",i=twJoin(t[6],t[10][t[5]])),set_style(e,"width",t[8]+"%")},m(a,s){insert_hydration(a,e,s),append_hydration(e,o),append_hydration(e,n)},p(a,s){s&258&&r!==(r=a[8].toFixed(a[1])+"")&&set_data(o,r),s&96&&i!==(i=twJoin(a[6],a[10][a[5]]))&&attr(e,"class",i),s&256&&set_style(e,"width",a[8]+"%")},d(a){a&&detach(e)}}}function create_fragment$3(t){let e,r,o,n=t[4]&&create_if_block_1$2(t);function i(l,u){return l[3]?create_if_block$2:create_else_block$2}let a=i(t),s=a(t);return{c(){n&&n.c(),e=space(),r=element("div"),s.c(),this.h()},l(l){n&&n.l(l),e=claim_space(l),r=claim_element(l,"DIV",{class:!0});var u=children(r);s.l(u),u.forEach(detach),this.h()},h(){attr(r,"class",o=twMerge(t[7],t[2],t[12].class))},m(l,u){n&&n.m(l,u),insert_hydration(l,e,u),insert_hydration(l,r,u),s.m(r,null)},p(l,[u]){l[4]?n?n.p(l,u):(n=create_if_block_1$2(l),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),a===(a=i(l))&&s?s.p(l,u):(s.d(1),s=a(l),s&&(s.c(),s.m(r,null))),u&4228&&o!==(o=twMerge(l[7],l[2],l[12].class))&&attr(r,"class",o)},i:noop$1,o:noop$1,d(l){l&&(detach(e),detach(r)),n&&n.d(l),s.d()}}}function instance$3(t,e,r){const o=["progress","precision","tweenDuration","animate","size","labelInside","labelOutside","easing","color","labelInsideClass","divClass"];let n=compute_rest_props(e,o),i,{progress:a="45"}=e,{precision:s=0}=e,{tweenDuration:l=400}=e,{animate:u=!1}=e,{size:h="h-2.5"}=e,{labelInside:c=!1}=e,{labelOutside:d=""}=e,{easing:f=cubicOut}=e,{color:m="primary"}=e,{labelInsideClass:p="text-primary-100 text-xs font-medium text-center p-0.5 leading-none rounded-full"}=e,{divClass:y="w-full bg-gray-200 rounded-full dark:bg-gray-700"}=e;const v=tweened(0,{duration:u?l:0,easing:f});component_subscribe(t,v,_=>r(8,i=_));const g={primary:"bg-primary-600",blue:"bg-blue-600",gray:"bg-gray-600 dark:bg-gray-300",red:"bg-red-600 dark:bg-red-500",green:"bg-green-600 dark:bg-green-500",yellow:"bg-yellow-400",purple:"bg-purple-600 dark:bg-purple-500",indigo:"bg-indigo-600 dark:bg-indigo-500"};return t.$$set=_=>{r(12,e=assign(assign({},e),exclude_internal_props(_))),r(11,n=compute_rest_props(e,o)),"progress"in _&&r(0,a=_.progress),"precision"in _&&r(1,s=_.precision),"tweenDuration"in _&&r(13,l=_.tweenDuration),"animate"in _&&r(14,u=_.animate),"size"in _&&r(2,h=_.size),"labelInside"in _&&r(3,c=_.labelInside),"labelOutside"in _&&r(4,d=_.labelOutside),"easing"in _&&r(15,f=_.easing),"color"in _&&r(5,m=_.color),"labelInsideClass"in _&&r(6,p=_.labelInsideClass),"divClass"in _&&r(7,y=_.divClass)},t.$$.update=()=>{t.$$.dirty&1&&v.set(Number(a))},e=exclude_internal_props(e),[a,s,h,c,d,m,p,y,i,v,g,n,e,l,u,f]}class Progressbar extends SvelteComponent{constructor(e){super(),init(this,e,instance$3,create_fragment$3,safe_not_equal,{progress:0,precision:1,tweenDuration:13,animate:14,size:2,labelInside:3,labelOutside:4,easing:15,color:5,labelInsideClass:6,divClass:7})}}function create_fragment$2(t){let e,r,o,n,i;const a=t[6].default,s=create_slot(a,t,t[5],null);let l=[t[3],{href:t[0]},{class:r=twMerge(t[2],t[1],t[4].class)}],u={};for(let h=0;h<l.length;h+=1)u=assign(u,l[h]);return{c(){e=element("a"),s&&s.c(),this.h()},l(h){e=claim_element(h,"A",{href:!0,class:!0});var c=children(e);s&&s.l(c),c.forEach(detach),this.h()},h(){set_attributes(e,u)},m(h,c){insert_hydration(h,e,c),s&&s.m(e,null),o=!0,n||(i=listen(e,"click",t[7]),n=!0)},p(h,[c]){s&&s.p&&(!o||c&32)&&update_slot_base(s,a,h,h[5],o?get_slot_changes(a,h[5],c,null):get_all_dirty_from_scope(h[5]),null),set_attributes(e,u=get_spread_update(l,[c&8&&h[3],(!o||c&1)&&{href:h[0]},(!o||c&22&&r!==(r=twMerge(h[2],h[1],h[4].class)))&&{class:r}]))},i(h){o||(transition_in(s,h),o=!0)},o(h){transition_out(s,h),o=!1},d(h){h&&detach(e),s&&s.d(h),n=!1,i()}}}function instance$2(t,e,r){const o=["href","color","aClass"];let n=compute_rest_props(e,o),{$$slots:i={},$$scope:a}=e,{href:s="#"}=e,{color:l="text-primary-600 dark:text-primary-500"}=e,{aClass:u="inline-flex items-center hover:underline"}=e;function h(c){bubble.call(this,t,c)}return t.$$set=c=>{r(4,e=assign(assign({},e),exclude_internal_props(c))),r(3,n=compute_rest_props(e,o)),"href"in c&&r(0,s=c.href),"color"in c&&r(1,l=c.color),"aClass"in c&&r(2,u=c.aClass),"$$scope"in c&&r(5,a=c.$$scope)},e=exclude_internal_props(e),[s,l,u,n,e,a,i,h]}class A extends SvelteComponent{constructor(e){super(),init(this,e,instance$2,create_fragment$2,safe_not_equal,{href:0,color:1,aClass:2})}}function get_each_context(t,e,r){const o=t.slice();return o[15]=e[r],o[17]=r,o}function create_else_block_1$1(t){let e=(t[15].climbingTime/1e3).toFixed(3)+"",r;return{c(){r=text(e)},l(o){r=claim_text(o,e)},m(o,n){insert_hydration(o,r,n)},p(o,n){n&1&&e!==(e=(o[15].climbingTime/1e3).toFixed(3)+"")&&set_data(r,e)},d(o){o&&detach(r)}}}function create_if_block_11(t){let e=(t[1]/1e3).toFixed(3)+"",r;return{c(){r=text(e)},l(o){r=claim_text(o,e)},m(o,n){insert_hydration(o,r,n)},p(o,n){n&2&&e!==(e=(o[1]/1e3).toFixed(3)+"")&&set_data(r,e)},d(o){o&&detach(r)}}}function create_if_block_10(t){let e;return{c(){e=text("FALL")},l(r){e=claim_text(r,"FALL")},m(r,o){insert_hydration(r,e,o)},p:noop$1,d(r){r&&detach(e)}}}function create_if_block_9(t){let e;return{c(){e=text("FALSE")},l(r){e=claim_text(r,"FALSE")},m(r,o){insert_hydration(r,e,o)},p:noop$1,d(r){r&&detach(e)}}}function create_if_block_8(t){let e,r,o,n=(t[15].reactionTime/1e3-3).toFixed(3)+"",i;return{c(){e=element("span"),r=text("reaction time: "),o=element("b"),i=text(n)},l(a){e=claim_element(a,"SPAN",{});var s=children(e);r=claim_text(s,"reaction time: "),o=claim_element(s,"B",{});var l=children(o);i=claim_text(l,n),l.forEach(detach),s.forEach(detach)},m(a,s){insert_hydration(a,e,s),append_hydration(e,r),append_hydration(e,o),append_hydration(o,i)},p(a,s){s&1&&n!==(n=(a[15].reactionTime/1e3-3).toFixed(3)+"")&&set_data(i,n)},d(a){a&&detach(e)}}}function create_if_block_7(t){let e,r;function o(){return t[12](t[17])}return e=new Button({props:{disabled:!1,class:"mt-3",color:"light",$$slots:{default:[create_default_slot_4$1]},$$scope:{ctx:t}}}),e.$on("click",o),{c(){create_component(e.$$.fragment)},l(n){claim_component(e.$$.fragment,n)},m(n,i){mount_component(e,n,i),r=!0},p(n,i){t=n;const a={};i&262144&&(a.$$scope={dirty:i,ctx:t}),e.$set(a)},i(n){r||(transition_in(e.$$.fragment,n),r=!0)},o(n){transition_out(e.$$.fragment,n),r=!1},d(n){destroy_component(e,n)}}}function create_if_block_6(t){let e;return{c(){e=text("READY")},l(r){e=claim_text(r,"READY")},m(r,o){insert_hydration(r,e,o)},p:noop$1,i:noop$1,o:noop$1,d(r){r&&detach(e)}}}function create_if_block_5(t){let e;return{c(){e=text("FOOT OK")},l(r){e=claim_text(r,"FOOT OK")},m(r,o){insert_hydration(r,e,o)},p:noop$1,i:noop$1,o:noop$1,d(r){r&&detach(e)}}}function create_if_block_4(t){let e,r;function o(){return t[11](t[17])}return e=new Button({props:{class:"mt-3",color:"light",$$slots:{default:[create_default_slot_3$1]},$$scope:{ctx:t}}}),e.$on("click",o),{c(){create_component(e.$$.fragment)},l(n){claim_component(e.$$.fragment,n)},m(n,i){mount_component(e,n,i),r=!0},p(n,i){t=n;const a={};i&262144&&(a.$$scope={dirty:i,ctx:t}),e.$set(a)},i(n){r||(transition_in(e.$$.fragment,n),r=!0)},o(n){transition_out(e.$$.fragment,n),r=!1},d(n){destroy_component(e,n)}}}function create_if_block_2$1(t){let e,r,o,n,i,a=(t[0].state===RaceFullState_State.IDLE||t[0].state===RaceFullState_State.IDLE_CLEAR_TO_START)&&create_if_block_3$1(t);return{c(){e=text("OFFLINE"),r=element("br"),o=space(),a&&a.c(),n=empty()},l(s){e=claim_text(s,"OFFLINE"),r=claim_element(s,"BR",{}),o=claim_space(s),a&&a.l(s),n=empty()},m(s,l){insert_hydration(s,e,l),insert_hydration(s,r,l),insert_hydration(s,o,l),a&&a.m(s,l),insert_hydration(s,n,l),i=!0},p(s,l){s[0].state===RaceFullState_State.IDLE||s[0].state===RaceFullState_State.IDLE_CLEAR_TO_START?a?(a.p(s,l),l&1&&transition_in(a,1)):(a=create_if_block_3$1(s),a.c(),transition_in(a,1),a.m(n.parentNode,n)):a&&(group_outros(),transition_out(a,1,1,()=>{a=null}),check_outros())},i(s){i||(transition_in(a),i=!0)},o(s){transition_out(a),i=!1},d(s){s&&(detach(e),detach(r),detach(o),detach(n)),a&&a.d(s)}}}function create_default_slot_4$1(t){let e;return{c(){e=text("disable")},l(r){e=claim_text(r,"disable")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot_3$1(t){let e;return{c(){e=text("fall")},l(r){e=claim_text(r,"fall")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_if_block_3$1(t){let e,r;function o(){return t[10](t[17])}return e=new Button({props:{class:"mt-3",color:"light",$$slots:{default:[create_default_slot_2$1]},$$scope:{ctx:t}}}),e.$on("click",o),{c(){create_component(e.$$.fragment)},l(n){claim_component(e.$$.fragment,n)},m(n,i){mount_component(e,n,i),r=!0},p(n,i){t=n;const a={};i&262144&&(a.$$scope={dirty:i,ctx:t}),e.$set(a)},i(n){r||(transition_in(e.$$.fragment,n),r=!0)},o(n){transition_out(e.$$.fragment,n),r=!1},d(n){destroy_component(e,n)}}}function create_default_slot_2$1(t){let e;return{c(){e=text("enable")},l(r){e=claim_text(r,"enable")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_each_block(t){let e,r,o,n,i,a,s,l,u,h;function c(g,_){return _&3&&(o=null),g[15].state===LaneFullState_State.FALSE_START?create_if_block_9:g[15].state===LaneFullState_State.FALL?create_if_block_10:(o==null&&(o=!!([LaneFullState_State.RUNNING_FOOT_DOWN,LaneFullState_State.RUNNING].includes(g[15].state)&&g[1]!==void 0)),o?create_if_block_11:create_else_block_1$1)}let d=c(t,-1),f=d(t),m=t[15].reactionTime>0&&create_if_block_8(t);const p=[create_if_block_2$1,create_if_block_4,create_if_block_5,create_if_block_6,create_if_block_7],y=[];function v(g,_){return g[15].state===LaneFullState_State.DISABLED?0:g[15].state===LaneFullState_State.RUNNING?1:g[15].state===LaneFullState_State.IDLE_FOOT_DOWN?2:g[15].state===LaneFullState_State.READY_FOOT_DOWN?3:g[15].state===LaneFullState_State.IDLE?4:-1}return~(s=v(t))&&(l=y[s]=p[s](t)),{c(){e=element("div"),r=element("span"),f.c(),n=space(),i=element("span"),m&&m.c(),a=space(),l&&l.c(),u=space(),this.h()},l(g){e=claim_element(g,"DIV",{class:!0});var _=children(e);r=claim_element(_,"SPAN",{class:!0,style:!0});var b=children(r);f.l(b),b.forEach(detach),n=claim_space(_),i=claim_element(_,"SPAN",{class:!0});var w=children(i);m&&m.l(w),a=claim_space(w),l&&l.l(w),w.forEach(detach),u=claim_space(_),_.forEach(detach),this.h()},h(){attr(r,"class","text-9xl font-bold"),set_style(r,"color",t[5](t[15])),attr(i,"class","text-3xl flex flex-col"),attr(e,"class","flex flex-grow flex-col items-center")},m(g,_){insert_hydration(g,e,_),append_hydration(e,r),f.m(r,null),append_hydration(e,n),append_hydration(e,i),m&&m.m(i,null),append_hydration(i,a),~s&&y[s].m(i,null),append_hydration(e,u),h=!0},p(g,_){d===(d=c(g,_))&&f?f.p(g,_):(f.d(1),f=d(g),f&&(f.c(),f.m(r,null))),(!h||_&1)&&set_style(r,"color",g[5](g[15])),g[15].reactionTime>0?m?m.p(g,_):(m=create_if_block_8(g),m.c(),m.m(i,a)):m&&(m.d(1),m=null);let b=s;s=v(g),s===b?~s&&y[s].p(g,_):(l&&(group_outros(),transition_out(y[b],1,1,()=>{y[b]=null}),check_outros()),~s?(l=y[s],l?l.p(g,_):(l=y[s]=p[s](g),l.c()),transition_in(l,1),l.m(i,null)):l=null)},i(g){h||(transition_in(l),h=!0)},o(g){transition_out(l),h=!1},d(g){g&&detach(e),f.d(),m&&m.d(),~s&&y[s].d()}}}function create_if_block_1$1(t){let e,r;return e=new Progressbar({props:{progress:t[4],animate:!0}}),{c(){create_component(e.$$.fragment)},l(o){claim_component(e.$$.fragment,o)},m(o,n){mount_component(e,o,n),r=!0},p(o,n){const i={};n&16&&(i.progress=o[4]),e.$set(i)},i(o){r||(transition_in(e.$$.fragment,o),r=!0)},o(o){transition_out(e.$$.fragment,o),r=!1},d(o){destroy_component(e,o)}}}function create_else_block$1(t){let e;return{c(){e=text("RESET")},l(r){e=claim_text(r,"RESET")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_if_block$1(t){let e;return{c(){e=text("READY")},l(r){e=claim_text(r,"READY")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot_1$1(t){let e,r;function o(a,s){return s&1&&(e=null),e==null&&(e=!![RaceFullState_State.IDLE,RaceFullState_State.IDLE_CLEAR_TO_START].includes(a[0].state)),e?create_if_block$1:create_else_block$1}let n=o(t,-1),i=n(t);return{c(){i.c(),r=empty()},l(a){i.l(a),r=empty()},m(a,s){i.m(a,s),insert_hydration(a,r,s)},p(a,s){n!==(n=o(a,s))&&(i.d(1),i=n(a),i&&(i.c(),i.m(r.parentNode,r)))},d(a){a&&detach(r),i.d(a)}}}function create_default_slot$1(t){let e;return{c(){e=text("Autostart")},l(r){e=claim_text(r,"Autostart")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_fragment$1(t){let e,r,o=t[0].state+"",n,i,a,s,l,u,h,c,d,f,m=ensure_array_like(t[0].laneStates),p=[];for(let b=0;b<m.length;b+=1)p[b]=create_each_block(get_each_context(t,m,b));const y=b=>transition_out(p[b],1,1,()=>{p[b]=null});let v=t[4]&&create_if_block_1$1(t);u=new Button({props:{size:"xl",class:"w-full py-10 mt-6",disabled:![RaceFullState_State.IDLE_CLEAR_TO_START,RaceFullState_State.RUNNING,RaceFullState_State.FINISHED,RaceFullState_State.FINISHED_MUTED].includes(t[0].state),$$slots:{default:[create_default_slot_1$1]},$$scope:{ctx:t}}}),u.$on("click",t[6]);function g(b){t[13](b)}let _={$$slots:{default:[create_default_slot$1]},$$scope:{ctx:t}};return t[3]!==void 0&&(_.checked=t[3]),c=new Toggle({props:_}),binding_callbacks.push(()=>bind(c,"checked",g)),c.$on("click",t[14]),{c(){e=element("div"),r=text("Race state: "),n=text(o),i=space(),a=element("div");for(let b=0;b<p.length;b+=1)p[b].c();s=space(),v&&v.c(),l=space(),create_component(u.$$.fragment),h=space(),create_component(c.$$.fragment),this.h()},l(b){e=claim_element(b,"DIV",{class:!0});var w=children(e);r=claim_text(w,"Race state: "),n=claim_text(w,o),i=claim_space(w),a=claim_element(w,"DIV",{class:!0});var k=children(a);for(let x=0;x<p.length;x+=1)p[x].l(k);k.forEach(detach),s=claim_space(w),v&&v.l(w),l=claim_space(w),claim_component(u.$$.fragment,w),h=claim_space(w),claim_component(c.$$.fragment,w),w.forEach(detach),this.h()},h(){attr(a,"class","w-full flex flex-row flex-wrap gap-3 justify-center"),attr(e,"class","flex flex-col items-center gap-3")},m(b,w){insert_hydration(b,e,w),append_hydration(e,r),append_hydration(e,n),append_hydration(e,i),append_hydration(e,a);for(let k=0;k<p.length;k+=1)p[k]&&p[k].m(a,null);append_hydration(e,s),v&&v.m(e,null),append_hydration(e,l),mount_component(u,e,null),append_hydration(e,h),mount_component(c,e,null),f=!0},p(b,[w]){if((!f||w&1)&&o!==(o=b[0].state+"")&&set_data(n,o),w&419){m=ensure_array_like(b[0].laneStates);let D;for(D=0;D<m.length;D+=1){const I=get_each_context(b,m,D);p[D]?(p[D].p(I,w),transition_in(p[D],1)):(p[D]=create_each_block(I),p[D].c(),transition_in(p[D],1),p[D].m(a,null))}for(group_outros(),D=m.length;D<p.length;D+=1)y(D);check_outros()}b[4]?v?(v.p(b,w),w&16&&transition_in(v,1)):(v=create_if_block_1$1(b),v.c(),transition_in(v,1),v.m(e,l)):v&&(group_outros(),transition_out(v,1,1,()=>{v=null}),check_outros());const k={};w&1&&(k.disabled=![RaceFullState_State.IDLE_CLEAR_TO_START,RaceFullState_State.RUNNING,RaceFullState_State.FINISHED,RaceFullState_State.FINISHED_MUTED].includes(b[0].state)),w&262145&&(k.$$scope={dirty:w,ctx:b}),u.$set(k);const x={};w&262144&&(x.$$scope={dirty:w,ctx:b}),!d&&w&8&&(d=!0,x.checked=b[3],add_flush_callback(()=>d=!1)),c.$set(x)},i(b){if(!f){for(let w=0;w<m.length;w+=1)transition_in(p[w]);transition_in(v),transition_in(u.$$.fragment,b),transition_in(c.$$.fragment,b),f=!0}},o(b){p=p.filter(Boolean);for(let w=0;w<p.length;w+=1)transition_out(p[w]);transition_out(v),transition_out(u.$$.fragment,b),transition_out(c.$$.fragment,b),f=!1},d(b){b&&detach(e),destroy_each(p,b),v&&v.d(),destroy_component(u),destroy_component(c)}}}function instance$1(t,e,r){let o;component_subscribe(t,settings,g=>r(2,o=g));let{raceFullState:n}=e,i,a;const s=g=>{switch(g.state){case LaneFullState_State.IDLE:return"red";case LaneFullState_State.IDLE_FOOT_DOWN:return"yellow";case LaneFullState_State.READY_FOOT_DOWN:return"yellow";case LaneFullState_State.RUNNING_FOOT_DOWN:case LaneFullState_State.RUNNING:return"red";case LaneFullState_State.FALSE_START:return"red";case LaneFullState_State.FALSE_START_TIE:return"yellow";case LaneFullState_State.WILDCARD:return"green";case LaneFullState_State.FINISHED_TIE:return"yellow";case LaneFullState_State.FALL:return"red";case LaneFullState_State.UNRECOGNIZED:return"gray";case LaneFullState_State.FINISHED:return"red";case LaneFullState_State.FINISHED_WINNER:return"green";case LaneFullState_State.DISABLED:return"gray"}};onMount(()=>{setInterval(()=>{if(i===void 0){r(1,a=void 0);return}let g=performance.now()-i;const _=n.state===RaceFullState_State.IDLE_CLEAR_TO_START?10:100;r(1,a=g-g%_)},100)});const l=()=>{n.state===RaceFullState_State.IDLE_CLEAR_TO_START?sendCommand(Command.create({start:{}})):sendCommand(Command.create({reset:{}}))},u=(g,_)=>{sendCommand(Command.create({disable:{laneNumber:g,disabled:_}}))},h=g=>{sendCommand(Command.create({fall:{laneNumber:g}}))};let c=!1,d=0;const f=g=>{u(g,!1)},m=g=>{h(g)},p=g=>{u(g,!0)};function y(g){c=g,r(3,c),r(2,o)}const v=()=>{let g=o;g.race!==void 0&&(c?g.race.startProcedure={manualStartProcedureSettings:{},automatedStartProcedureSettings:void 0}:g.race.startProcedure={manualStartProcedureSettings:void 0,automatedStartProcedureSettings:{sayReady:!0,standstillDurationBeforeReady:3e3}},console.log("Setting settings to:",g),writeSettings(g))};return t.$$set=g=>{"raceFullState"in g&&r(0,n=g.raceFullState)},t.$$.update=()=>{var g,_,b,w,k;if(t.$$.dirty&513&&(n.state===RaceFullState_State.RUNNING&&i===void 0||n.state===RaceFullState_State.IDLE_CLEAR_TO_START&&i===void 0?r(9,i=performance.now()):n.state!==RaceFullState_State.RUNNING&&n.state!==RaceFullState_State.IDLE_CLEAR_TO_START&&r(9,i=void 0)),t.$$.dirty&7)if(((_=(g=o.race)==null?void 0:g.startProcedure)==null?void 0:_.automatedStartProcedureSettings)===void 0||n.state!==RaceFullState_State.IDLE_CLEAR_TO_START)r(4,d=void 0);else{let x=(a??0)/o.race.startProcedure.automatedStartProcedureSettings.standstillDurationBeforeReady*100;r(4,d=Math.min(100,Math.max(0,x)))}t.$$.dirty&4&&r(3,c=(k=(w=(b=o.race)==null?void 0:b.startProcedure)==null?void 0:w.automatedStartProcedureSettings)==null?void 0:k.sayReady)},[n,a,o,c,d,s,l,u,h,i,f,m,p,y,v]}class Timer extends SvelteComponent{constructor(e){super(),init(this,e,instance$1,create_fragment$1,safe_not_equal,{raceFullState:0})}}var uaParser={exports:{}};(function(t,e){(function(r,o){var n="1.0.36",i="",a="?",s="function",l="undefined",u="object",h="string",c="major",d="model",f="name",m="type",p="vendor",y="version",v="architecture",g="console",_="mobile",b="tablet",w="smarttv",k="wearable",x="embedded",D=350,I="Amazon",L="Apple",M="ASUS",N="BlackBerry",U="Browser",S="Chrome",F="Edge",X="Firefox",ne="Google",oe="Huawei",$="LG",Y="Microsoft",ee="Motorola",K="Opera",G="Samsung",le="Sharp",ue="Sony",fe="Xiaomi",he="Zebra",H="Facebook",R="Chromium OS",O="Mac OS",E=function(z,W){var P={};for(var J in z)W[J]&&W[J].length%2===0?P[J]=W[J].concat(z[J]):P[J]=z[J];return P},T=function(z){for(var W={},P=0;P<z.length;P++)W[z[P].toUpperCase()]=z[P];return W},C=function(z,W){return typeof z===h?q(W).indexOf(q(z))!==-1:!1},q=function(z){return z.toLowerCase()},j=function(z){return typeof z===h?z.replace(/[^\d\.]/g,i).split(".")[0]:o},Q=function(z,W){if(typeof z===h)return z=z.replace(/^\s\s*/,i),typeof W===l?z:z.substring(0,D)},Z=function(z,W){for(var P=0,J,se,re,V,B,ie;P<W.length&&!B;){var pe=W[P],_e=W[P+1];for(J=se=0;J<pe.length&&!B&&pe[J];)if(B=pe[J++].exec(z),B)for(re=0;re<_e.length;re++)ie=B[++se],V=_e[re],typeof V===u&&V.length>0?V.length===2?typeof V[1]==s?this[V[0]]=V[1].call(this,ie):this[V[0]]=V[1]:V.length===3?typeof V[1]===s&&!(V[1].exec&&V[1].test)?this[V[0]]=ie?V[1].call(this,ie,V[2]):o:this[V[0]]=ie?ie.replace(V[1],V[2]):o:V.length===4&&(this[V[0]]=ie?V[3].call(this,ie.replace(V[1],V[2])):o):this[V]=ie||o;P+=2}},ae=function(z,W){for(var P in W)if(typeof W[P]===u&&W[P].length>0){for(var J=0;J<W[P].length;J++)if(C(W[P][J],z))return P===a?o:P}else if(C(W[P],z))return P===a?o:P;return z},ge={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ce={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},be={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,y],[/opios[\/ ]+([\w\.]+)/i],[y,[f,K+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[f,K]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[f,"UC"+U]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+U],y],[/\bfocus\/([\w\.]+)/i],[y,[f,X+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[f,K+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[f,K+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[f,"MIUI "+U]],[/fxios\/([-\w\.]+)/i],[y,[f,X]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+U]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+U],y],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,H],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[f,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,S+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[f,"Android "+U]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[y,ae,ge]],[/(webkit|khtml)\/([\w\.]+)/i],[f,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[f,X+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,y],[/(cobalt)\/([\w\.]+)/i],[f,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,q]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[v,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[v,"armhf"]],[/windows (ce|mobile); ppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[v,/ower/,i,q]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[v,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[p,G],[m,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[p,G],[m,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[p,L],[m,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[p,L],[m,b]],[/(macintosh);/i],[d,[p,L]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[p,le],[m,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[p,oe],[m,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[p,oe],[m,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[p,fe],[m,_]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[p,fe],[m,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[p,"OPPO"],[m,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[p,"Vivo"],[m,_]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[d,[p,"Realme"],[m,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[p,ee],[m,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[p,ee],[m,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[p,$],[m,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[p,$],[m,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[p,"Lenovo"],[m,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[p,"Nokia"],[m,_]],[/(pixel c)\b/i],[d,[p,ne],[m,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[p,ne],[m,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[p,ue],[m,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[p,ue],[m,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[p,"OnePlus"],[m,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[p,I],[m,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[p,I],[m,_]],[/(playbook);[-\w\),; ]+(rim)/i],[d,p,[m,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[p,N],[m,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[p,M],[m,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[p,M],[m,_]],[/(nexus 9)/i],[d,[p,"HTC"],[m,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[d,/_/g," "],[m,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[p,"Acer"],[m,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[p,"Meizu"],[m,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,d,[m,_]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,d,[m,b]],[/(surface duo)/i],[d,[p,Y],[m,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[p,"Fairphone"],[m,_]],[/(u304aa)/i],[d,[p,"AT&T"],[m,_]],[/\bsie-(\w*)/i],[d,[p,"Siemens"],[m,_]],[/\b(rct\w+) b/i],[d,[p,"RCA"],[m,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[p,"Dell"],[m,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[p,"Verizon"],[m,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[p,"Barnes & Noble"],[m,b]],[/\b(tm\d{3}\w+) b/i],[d,[p,"NuVision"],[m,b]],[/\b(k88) b/i],[d,[p,"ZTE"],[m,b]],[/\b(nx\d{3}j) b/i],[d,[p,"ZTE"],[m,_]],[/\b(gen\d{3}) b.+49h/i],[d,[p,"Swiss"],[m,_]],[/\b(zur\d{3}) b/i],[d,[p,"Swiss"],[m,b]],[/\b((zeki)?tb.*\b) b/i],[d,[p,"Zeki"],[m,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],d,[m,b]],[/\b(ns-?\w{0,9}) b/i],[d,[p,"Insignia"],[m,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[p,"NextBook"],[m,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],d,[m,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],d,[m,_]],[/\b(ph-1) /i],[d,[p,"Essential"],[m,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[p,"Envizen"],[m,b]],[/\b(trio[-\w\. ]+) b/i],[d,[p,"MachSpeed"],[m,b]],[/\btu_(1491) b/i],[d,[p,"Rotor"],[m,b]],[/(shield[\w ]+) b/i],[d,[p,"Nvidia"],[m,b]],[/(sprint) (\w+)/i],[p,d,[m,_]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[p,Y],[m,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[p,he],[m,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[p,he],[m,_]],[/smart-tv.+(samsung)/i],[p,[m,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[p,G],[m,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,$],[m,w]],[/(apple) ?tv/i],[p,[d,L+" TV"],[m,w]],[/crkey/i],[[d,S+"cast"],[p,ne],[m,w]],[/droid.+aft(\w+)( bui|\))/i],[d,[p,I],[m,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[p,le],[m,w]],[/(bravia[\w ]+)( bui|\))/i],[d,[p,ue],[m,w]],[/(mitv-\w{5}) bui/i],[d,[p,fe],[m,w]],[/Hbbtv.*(technisat) (.*);/i],[p,d,[m,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,Q],[d,Q],[m,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,d,[m,g]],[/droid.+; (shield) bui/i],[d,[p,"Nvidia"],[m,g]],[/(playstation [345portablevi]+)/i],[d,[p,ue],[m,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[p,Y],[m,g]],[/((pebble))app/i],[p,d,[m,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[p,L],[m,k]],[/droid.+; (glass) \d/i],[d,[p,ne],[m,k]],[/droid.+; (wt63?0{2,3})\)/i],[d,[p,he],[m,k]],[/(quest( 2| pro)?)/i],[d,[p,H],[m,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[m,x]],[/(aeobc)\b/i],[d,[p,I],[m,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[d,[m,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[m,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,_]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[f,F+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[y,ae,ce]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[y,ae,ce]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,O],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,y],[/\(bb(10);/i],[y,[f,N]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[f,X+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[f,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,R],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,y],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,y]]},te=function(z,W){if(typeof z===u&&(W=z,z=o),!(this instanceof te))return new te(z,W).getResult();var P=typeof r!==l&&r.navigator?r.navigator:o,J=z||(P&&P.userAgent?P.userAgent:i),se=P&&P.userAgentData?P.userAgentData:o,re=W?E(be,W):be,V=P&&P.userAgent==J;return this.getBrowser=function(){var B={};return B[f]=o,B[y]=o,Z.call(B,J,re.browser),B[c]=j(B[y]),V&&P&&P.brave&&typeof P.brave.isBrave==s&&(B[f]="Brave"),B},this.getCPU=function(){var B={};return B[v]=o,Z.call(B,J,re.cpu),B},this.getDevice=function(){var B={};return B[p]=o,B[d]=o,B[m]=o,Z.call(B,J,re.device),V&&!B[m]&&se&&se.mobile&&(B[m]=_),V&&B[d]=="Macintosh"&&P&&typeof P.standalone!==l&&P.maxTouchPoints&&P.maxTouchPoints>2&&(B[d]="iPad",B[m]=b),B},this.getEngine=function(){var B={};return B[f]=o,B[y]=o,Z.call(B,J,re.engine),B},this.getOS=function(){var B={};return B[f]=o,B[y]=o,Z.call(B,J,re.os),V&&!B[f]&&se&&se.platform!="Unknown"&&(B[f]=se.platform.replace(/chrome os/i,R).replace(/macos/i,O)),B},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return J},this.setUA=function(B){return J=typeof B===h&&B.length>D?Q(B,D):B,this},this.setUA(J),this};te.VERSION=n,te.BROWSER=T([f,y,c]),te.CPU=T([v]),te.DEVICE=T([d,p,m,g,_,w,b,k,x]),te.ENGINE=te.OS=T([f,y]),t.exports&&(e=t.exports=te),e.UAParser=te;var de=typeof r!==l&&(r.jQuery||r.Zepto);if(de&&!de.ua){var me=new te;de.ua=me.getResult(),de.ua.get=function(){return me.getUA()},de.ua.set=function(z){me.setUA(z);var W=me.getResult();for(var P in W)de.ua[P]=W[P]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const _page_svelte_svelte_type_style_lang="";function create_else_block_1(t){let e,r;return e=new Alert({props:{color:"yellow",$$slots:{default:[create_default_slot_4]},$$scope:{ctx:t}}}),{c(){create_component(e.$$.fragment)},l(o){claim_component(e.$$.fragment,o)},m(o,n){mount_component(e,o,n),r=!0},p(o,n){const i={};n&16&&(i.$$scope={dirty:n,ctx:o}),e.$set(i)},i(o){r||(transition_in(e.$$.fragment,o),r=!0)},o(o){transition_out(e.$$.fragment,o),r=!1},d(o){destroy_component(e,o)}}}function create_if_block_3(t){let e,r;return e=new Timer({props:{raceFullState:t[1]}}),{c(){create_component(e.$$.fragment)},l(o){claim_component(e.$$.fragment,o)},m(o,n){mount_component(e,o,n),r=!0},p(o,n){const i={};n&2&&(i.raceFullState=o[1]),e.$set(i)},i(o){r||(transition_in(e.$$.fragment,o),r=!0)},o(o){transition_out(e.$$.fragment,o),r=!1},d(o){destroy_component(e,o)}}}function create_if_block_1(t){let e,r,o,n,i,a,s,l,u,h,c;o=new A({props:{class:"font-bold",href:"https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API#browser_compatibility",$$slots:{default:[create_default_slot_3]},$$scope:{ctx:t}}});const d=[create_if_block_2,create_else_block],f=[];function m(p,y){return p[2].getOS().name==="iOS"?0:1}return l=m(t),u=f[l]=d[l](t),{c(){e=element("span"),r=text("Your Browser is not compatible with this website, as it does not support "),create_component(o.$$.fragment),n=text("."),i=space(),a=element("span"),s=text(`Please use a browser which supports web bluetooth, for example
`),u.c(),h=text("."),this.h()},l(p){e=claim_element(p,"SPAN",{class:!0});var y=children(e);r=claim_text(y,"Your Browser is not compatible with this website, as it does not support "),claim_component(o.$$.fragment,y),n=claim_text(y,"."),y.forEach(detach),i=claim_space(p),a=claim_element(p,"SPAN",{class:!0});var v=children(a);s=claim_text(v,`Please use a browser which supports web bluetooth, for example
`),u.l(v),h=claim_text(v,"."),v.forEach(detach),this.h()},h(){attr(e,"class","text-xl text-white rounded-md font-bold border-primary-600 border-4 border-r-4 p-3"),attr(a,"class","text-xl mt-3")},m(p,y){insert_hydration(p,e,y),append_hydration(e,r),mount_component(o,e,null),append_hydration(e,n),insert_hydration(p,i,y),insert_hydration(p,a,y),append_hydration(a,s),f[l].m(a,null),append_hydration(a,h),c=!0},p(p,y){const v={};y&16&&(v.$$scope={dirty:y,ctx:p}),o.$set(v)},i(p){c||(transition_in(o.$$.fragment,p),transition_in(u),c=!0)},o(p){transition_out(o.$$.fragment,p),transition_out(u),c=!1},d(p){p&&(detach(e),detach(i),detach(a)),destroy_component(o),f[l].d()}}}function create_if_block(t){let e,r;return e=new Button({props:{$$slots:{default:[create_default_slot]},$$scope:{ctx:t}}}),e.$on("click",t[3]),{c(){create_component(e.$$.fragment)},l(o){claim_component(e.$$.fragment,o)},m(o,n){mount_component(e,o,n),r=!0},p(o,n){const i={};n&16&&(i.$$scope={dirty:n,ctx:o}),e.$set(i)},i(o){r||(transition_in(e.$$.fragment,o),r=!0)},o(o){transition_out(e.$$.fragment,o),r=!1},d(o){destroy_component(e,o)}}}function create_default_slot_4(t){let e;return{c(){e=text("Connecting...")},l(r){e=claim_text(r,"Connecting...")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot_3(t){let e;return{c(){e=text(`web bluetooth
`)},l(r){e=claim_text(r,`web bluetooth
`)},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_else_block(t){let e,r,o;return e=new A({props:{href:"https://www.google.com/chrome/",$$slots:{default:[create_default_slot_2]},$$scope:{ctx:t}}}),{c(){create_component(e.$$.fragment),r=space()},l(n){claim_component(e.$$.fragment,n),r=claim_space(n)},m(n,i){mount_component(e,n,i),insert_hydration(n,r,i),o=!0},i(n){o||(transition_in(e.$$.fragment,n),o=!0)},o(n){transition_out(e.$$.fragment,n),o=!1},d(n){n&&detach(r),destroy_component(e,n)}}}function create_if_block_2(t){let e,r,o;return e=new A({props:{href:"https://apps.apple.com/us/app/bluefy-web-ble-browser/id1492822055",$$slots:{default:[create_default_slot_1]},$$scope:{ctx:t}}}),{c(){create_component(e.$$.fragment),r=space()},l(n){claim_component(e.$$.fragment,n),r=claim_space(n)},m(n,i){mount_component(e,n,i),insert_hydration(n,r,i),o=!0},i(n){o||(transition_in(e.$$.fragment,n),o=!0)},o(n){transition_out(e.$$.fragment,n),o=!1},d(n){n&&detach(r),destroy_component(e,n)}}}function create_default_slot_2(t){let e;return{c(){e=text("Google Chrome")},l(r){e=claim_text(r,"Google Chrome")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot_1(t){let e;return{c(){e=text("Bluefy")},l(r){e=claim_text(r,"Bluefy")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_default_slot(t){let e;return{c(){e=text("Connect")},l(r){e=claim_text(r,"Connect")},m(r,o){insert_hydration(r,e,o)},d(r){r&&detach(e)}}}function create_fragment(t){let e,r,o,n;const i=[create_if_block,create_if_block_1,create_if_block_3,create_else_block_1],a=[];function s(l,u){return l[0]=="DISCONNECTED"?0:l[0]=="UNAVAILABLE"?1:l[0]=="CONNECTED"&&l[1]?2:3}return r=s(t),o=a[r]=i[r](t),{c(){e=element("div"),o.c(),this.h()},l(l){e=claim_element(l,"DIV",{class:!0});var u=children(e);o.l(u),u.forEach(detach),this.h()},h(){attr(e,"class","p-8 flex flex-col")},m(l,u){insert_hydration(l,e,u),a[r].m(e,null),n=!0},p(l,[u]){let h=r;r=s(l),r===h?a[r].p(l,u):(group_outros(),transition_out(a[h],1,1,()=>{a[h]=null}),check_outros(),o=a[r],o?o.p(l,u):(o=a[r]=i[r](l),o.c()),transition_in(o,1),o.m(e,null))},i(l){n||(transition_in(o),n=!0)},o(l){transition_out(o),n=!1},d(l){l&&detach(e),a[r].d()}}}function instance(t,e,r){let o,n;component_subscribe(t,bluetoothState,s=>r(0,o=s)),component_subscribe(t,raceFullState,s=>r(1,n=s));const i=new uaParserExports.UAParser,a=()=>{startBluetooth()};return checkAvailability(),[o,n,i,a]}class Page extends SvelteComponent{constructor(e){super(),init(this,e,instance,create_fragment,safe_not_equal,{})}}export{Page as component,_page as universal};