var VPASSDK=function(t){var e={};function i(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(o,s,function(e){return t[e]}.bind(null,s));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=39)}([function(t,e,i){var o=t.exports,s=i(17);o.LongBits=i(11),o.Long=i(32),o.pool=i(33),o.float=i(34),o.asPromise=i(35),o.EventEmitter=i(36),o.path=i(37),o.base64=i(18),o.utf8=i(8),o.compareFieldsById=function(t,e){return t.id-e.id},o.toArray=function(t){if(t){for(var e=Object.keys(t),i=new Array(e.length),o=0;o-1;--i)if(1===e[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}},o.oneOfSetter=function(t){return function(e){for(var i=0;i=65536&&i<=1114111?(o.push(i>>18&7|240),o.push(i>>12&63|128),o.push(i>>6&63|128),o.push(63&i|128)):i>=2048&&i<=65535?(o.push(i>>12&15|224),o.push(i>>6&63|128),o.push(63&i|128)):i>=128&&i<=2047?(o.push(i>>6&31|192),o.push(63&i|128)):o.push(255&i);return o},o.byteToString=function(t){if("string"==typeof t)return t;for(var e="",i=t,o=0;o-1;--i)if(1===e[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}}}(this._oneofsArray[i].oneof);o[s]={get:r.getter,set:r.setter}}i&&Object.defineProperties(t.prototype,o)}}}),v.generateConstructor=function(t){return function(e){for(var i,o=0;o=e)return!0;return!1},c.isReservedName=function(t,e){if(t)for(var i=0;i0;){var o=t.shift();if(i.nested&&i.nested[o]){if(!((i=i.nested[o])instanceof c))throw Error("path conflicts with non-namespace objects")}else i.add(i=new c(o))}return e&&i.addJSON(e),i},c.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e-1)return o}else if(o instanceof c&&(o=o.lookup(t.slice(1),e,!0)))return o}else for(var s=0;s-1&&this.oneof.splice(e,1),t.partOf=null,this},r.prototype.onAdd=function(t){n.prototype.onAdd.call(this,t);for(var e=0;e191&&o<224?n[r++]=(31&o)<<6|63&t[e++]:o>239&&o<365?(o=((7&o)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,n[r++]=55296+(o>>10),n[r++]=56320+(1023&o)):n[r++]=(15&o)<<12|(63&t[e++])<<6|63&t[e++],r>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),r=0);return s?(r&&s.push(String.fromCharCode.apply(String,n.slice(0,r))),s.join("")):String.fromCharCode.apply(String,n.slice(0,r))},o.write=function(t,e,i){for(var o,s,n=i,r=0;r>6|192,e[i++]=63&o|128):55296==(64512&o)&&56320==(64512&(s=t.charCodeAt(r+1)))?(o=65536+((1023&o)<<10)+(1023&s),++r,e[i++]=o>>18|240,e[i++]=o>>12&63|128,e[i++]=o>>6&63|128,e[i++]=63&o|128):(e[i++]=o>>12|224,e[i++]=o>>6&63|128,e[i++]=63&o|128);return i-n}},function(t,e,i){t.exports=d;var o=i(6);((d.prototype=Object.create(o.prototype)).constructor=d).className="Root";var s,n,r,a=i(2),l=i(1),h=i(7),c=i(0);function d(t){o.call(this,"",t),this.deferred=[],this.files=[],this.names=[]}function f(){}d.fromJSON=function(t,e){return t="string"==typeof t?JSON.parse(t):t,e||(e=new d),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},d.prototype.resolvePath=c.path.resolve,d.prototype.parseFromPbString=function t(e,i,o){"function"==typeof i&&(o=i,i=void 0);var s=this;if(!o)return c.asPromise(t,s,e,i);var a=null;if("string"==typeof e)a=JSON.parse(e);else{if("object"!=typeof e)return void console.log("pb格式转化失败");a=e}function l(t,e){if(o){var i=o;o=null,i(t,e)}}function h(t,e){try{if(c.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),c.isString(e)){n.filename=t;var o,r=n(e,s,i),a=0;if(r.imports)for(;a-1||(s.names.push(t),t in r&&h(t,r[t]))}h(a.name,a.pbJsonStr)},d.prototype.load=function t(e,i,o){"function"==typeof i&&(o=i,i=void 0);var s=this;if(!o)return c.asPromise(t,s,e,i);var a=o===f;function l(t,e){if(o){var i=o;if(o=null,a)throw t;i(t,e)}}function h(t,e){try{if(c.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),c.isString(e)){n.filename=t;var o,r=n(e,s,i),h=0;if(r.imports)for(;h-1){var n=t.substring(i);n in r&&(t=n)}if(!(s.files.indexOf(t)>-1))if(s.files.push(t),t in r)a?h(t,r[t]):(++u,setTimeout((function(){--u,h(t,r[t])})));else if(a){var d;try{d=c.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||l(t))}h(t,d)}else++u,c.fetch(t,(function(i,n){--u,o&&(i?e?u||l(null,s):l(i):h(t,n))}))}var u=0;c.isString(e)&&(e=[e]);for(var p,y=0;y-1&&this.deferred.splice(e,1)}}else if(t instanceof l)u.test(t.name)&&delete t.parent[t.name];else if(t instanceof o){for(var i=0;i>>0,this.hi=e>>>0}t.exports=i;var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var s=t>>>0,n=(t-s)/4294967296>>>0;return e&&(n=~n>>>0,s=~s>>>0,++s>4294967295&&(s=0,++n>4294967295&&(n=0))),new i(s,n)},i.from=function(t){return"number"==typeof t?i.fromNumber(t):"string"==typeof t||t instanceof String?i.fromNumber(parseInt(t,10)):t.low||t.high?new i(t.low>>>0,t.high>>>0):o},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,i=~this.hi>>>0;return e||(i=i+1>>>0),-(e+4294967296*i)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(t){return{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var n=String.prototype.charCodeAt;i.fromHash=function(t){return t===s?o:new i((n.call(t,0)|n.call(t,1)<<8|n.call(t,2)<<16|n.call(t,3)<<24)>>>0,(n.call(t,4)|n.call(t,5)<<8|n.call(t,6)<<16|n.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:i<128?9:10}},function(t,e,i){t.exports=r;var o,s,n=i(2);function r(t,e,i,o,r,a){if(n.call(this,t,e,o,void 0,void 0,r,a),!s.isString(i))throw TypeError("keyType must be a string");this.keyType=i,this.resolvedKeyType=null,this.map=!0}((r.prototype=Object.create(n.prototype)).constructor=r).className="MapField",r.fromJSON=function(t,e){return new r(t,e.id,e.keyType,e.type,e.options,e.comment)},r.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return s.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},r.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},r.d=function(t,e,i){return"function"==typeof i?i=s.decorateType(i).name:i&&"object"==typeof i&&(i=s.decorateEnum(i).name),function(o,n){s.decorateType(o.constructor).add(new r(n,t,e,i))}},r._configure=function(){o=i(5),s=i(0)}},function(t,e,i){"use strict";t.exports=n;var o,s=i(4);function n(t,e,i,n,r,a,l,h){if(o.isObject(r)?(l=r,r=a=void 0):o.isObject(a)&&(l=a,a=void 0),void 0!==e&&!o.isString(e))throw TypeError("type must be a string");if(!o.isString(i))throw TypeError("requestType must be a string");if(!o.isString(n))throw TypeError("responseType must be a string");s.call(this,t,l),this.type=e||"rpc",this.requestType=i,this.requestStream=!!r||void 0,this.responseType=n,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=h}((n.prototype=Object.create(s.prototype)).constructor=n).className="Method",n.fromJSON=function(t,e){return new n(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options,e.comment)},n.prototype.toJSON=function(t){var e=!!t&&Boolean(t.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:void 0])},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),s.prototype.resolve.call(this))},n._configure=function(){o=i(0)}},function(t,e,i){"use strict";var o;function s(t){if(t)for(var e=Object.keys(t),i=0;i>16)+(e>>16)+(i>>16)<<16|65535&i}function r(t,e,i,o,s,r){return n((a=n(n(e,t),n(o,r)))<<(l=s)|a>>>32-l,i);var a,l}function a(t,e,i,o,s,n,a){return r(e&i|~e&o,t,e,s,n,a)}function l(t,e,i,o,s,n,a){return r(e&o|i&~o,t,e,s,n,a)}function h(t,e,i,o,s,n,a){return r(e^i^o,t,e,s,n,a)}function c(t,e,i,o,s,n,a){return r(i^(e|~o),t,e,s,n,a)}function d(t,e){var i,o,s,r,d;t[e>>5]|=128<>>9<<4)]=e;var f=1732584193,u=-271733879,p=-1732584194,y=271733878;for(i=0;i>5]>>>e%32&255);return i}function u(t){var e,i=[];for(i[(t.length>>2)-1]=void 0,e=0;e>5]|=(255&t.charCodeAt(e/8))<>>4&15)+"0123456789abcdef".charAt(15&e);return o}function y(t){return unescape(encodeURIComponent(t))}function m(t){return function(t){return f(d(u(t),8*t.length))}(y(t))}function g(t,e){return function(t,e){var i,o,s=u(t),n=[],r=[];for(n[15]=r[15]=void 0,s.length>16&&(s=d(s,8*t.length)),i=0;i<16;i+=1)n[i]=909522486^s[i],r[i]=1549556828^s[i];return o=d(n.concat(u(e)),512+8*e.length),f(d(r.concat(o),640))}(y(t),y(e))}function v(t,e,i){return e?i?g(e,t):p(g(e,t)):i?m(t):p(m(t))}void 0===(o=function(){return v}.call(e,i,e,t))||(t.exports=o)}()},function(t,e,i){t.exports=h;var o,s=i(0),n=i(8);function r(t,e,i){this.fn=t,this.len=e,this.next=void 0,this.val=i}function a(){}function l(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function h(){this.len=0,this.head=new r(a,0,0),this.tail=this.head,this.states=null}function c(t,e,i){e[i]=255&t}function d(t,e){this.len=t,this.next=void 0,this.val=e}function f(t,e,i){for(;t.hi;)e[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[i++]=127&t.lo|128,t.lo=t.lo>>>7;e[i++]=t.lo}function u(t,e,i){e[i]=255&t,e[i+1]=t>>>8&255,e[i+2]=t>>>16&255,e[i+3]=t>>>24}h.create=s.Buffer?function(){return(h.create=function(){return new(void 0)})()}:function(){return new h},h.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(h.alloc=s.pool(h.alloc,s.Array.prototype.subarray)),h.prototype._push=function(t,e,i){return this.tail=this.tail.next=new r(t,e,i),this.len+=e,this},d.prototype=Object.create(r.prototype),d.prototype.fn=function(t,e,i){for(;t>127;)e[i++]=127&t|128,t>>>=7;e[i]=t},h.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new d((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},h.prototype.int32=function(t){return t<0?this._push(f,10,o.fromNumber(t)):this.uint32(t)},h.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},h.prototype.uint64=function(t){var e=o.from(t);return this._push(f,e.length(),e)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(f,e.length(),e)},h.prototype.bool=function(t){return this._push(c,1,t?1:0)},h.prototype.fixed32=function(t){return this._push(u,4,t>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(t){var e=o.from(t);return this._push(u,4,e.lo)._push(u,4,e.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},h.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var p=s.Array.prototype.set?function(t,e,i){e.set(t,i)}:function(t,e,i){for(var o=0;o>>0;if(!e)return this._push(c,1,0);if(s.isString(t)){var i=h.alloc(e=n.length(t));n.write(t,i,0),t=i}return this.uint32(e)._push(p,e,t)},h.prototype.string=function(t){var e=n.length(t);return e?this.uint32(e)._push(n.write,e,t):this._push(c,1,0)},h.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new r(a,0,0),this.len=0,this},h.prototype.reset=function(){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 r(a,0,0),this.len=0),this},h.prototype.ldelim=function(){var t=this.head,e=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=e,this.len+=i),this},h.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,e,i),i+=t.len,t=t.next;return e},h._configure=function(){o=i(11),i(18),n=i(8)}},function(t,e){t.exports={}},function(t,e,i){"use strict";var o=t.exports;o.length=function(t){var e=t.length;if(!e)return 0;for(var i=0;--e%4>1&&"="===t.charAt(e);)++i;return Math.ceil(3*t.length)/4-i};for(var s=new Array(64),n=new Array(123),r=0;r<64;)n[s[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;o.encode=function(t,e,i){for(var o,n=null,r=[],a=0,l=0;e>2],o=(3&h)<<4,l=1;break;case 1:r[a++]=s[o|h>>4],o=(15&h)<<2,l=2;break;case 2:r[a++]=s[o|h>>6],r[a++]=s[63&h],l=0}a>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,r)),a=0)}return l&&(r[a++]=s[o],r[a++]=61,1===l&&(r[a++]=61)),n?(a&&n.push(String.fromCharCode.apply(String,r.slice(0,a))),n.join("")):String.fromCharCode.apply(String,r.slice(0,a))};o.decode=function(t,e,i){for(var o,s=i,r=0,a=0;a1)break;if(void 0===(l=n[l]))throw Error("invalid encoding");switch(r){case 0:o=l,r=1;break;case 1:e[i++]=o<<2|(48&l)>>4,o=l,r=2;break;case 2:e[i++]=(15&o)<<4|(60&l)>>2,o=l,r=3;break;case 3:e[i++]=(3&o)<<6|l,r=0}}if(1===r)throw Error("invalid encoding");return i-s},o.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},function(t,e,i){"use strict";var o,s,n,r,a,l,h,c,d,f,u;t.exports=T,T.filename=null,T.defaults={keepCase:!1};var p=/^[1-9][0-9]*$/,y=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,v=/^0[0-7]+$/,w=/^-?0[0-7]+$/,b=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,_=/^[a-zA-Z_][a-zA-Z_0-9]*$/,x=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,P=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/;function T(t,e,i){e instanceof s||(i=e,e=new s),i||(i=T.defaults);var A,M,C,S,E,O=o(t,i.alternateCommentMode||!1),I=O.next,k=O.push,R=O.peek,D=O.skip,L=O.cmnt,N=!0,V=!1,F=e,B=i.keepCase?function(t){return t}:u.camelCase;function j(t,e,i){var o=T.filename;return i||(T.filename=null),Error("illegal "+(e||"token")+" '"+t+"' ("+(o?o+", ":"")+"line "+O.line+")")}function W(){var t,e=[];do{if('"'!==(t=I())&&"'"!==t)throw j(t);e.push(I()),D(t),t=R()}while('"'===t||"'"===t);return e.join("")}function z(t){var e=I();switch(e){case"'":case'"':return k(e),W();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(t,e){var i=1;"-"===t.charAt(0)&&(i=-1,t=t.substring(1));switch(t){case"inf":case"INF":case"Inf":return i*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(p.test(t))return i*parseInt(t,10);if(m.test(t))return i*parseInt(t,16);if(v.test(t))return i*parseInt(t,8);if(b.test(t))return i*parseFloat(t);throw j(t,"number",e)}(e,!0)}catch(i){if(t&&x.test(e))return e;throw j(e,"value")}}function U(t,e){var i,o;do{!e||'"'!==(i=R())&&"'"!==i?t.push([o=H(I()),D("to",!0)?H(I()):o]):t.push(W())}while(D(",",!0));D(";")}function H(t,e){switch(t){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!e&&"-"===t.charAt(0))throw j(t,"id");if(y.test(t))return parseInt(t,10);if(g.test(t))return parseInt(t,16);if(w.test(t))return parseInt(t,8);throw j(t,"id")}function q(){if(void 0!==A)throw j("package");if(A=I(),!x.test(A))throw j(A,"name");F=F.define(A),D(";")}function J(){var t,e=R();switch(e){case"weak":t=C||(C=[]),I();break;case"public":I();default:t=M||(M=[])}e=W(),D(";"),t.push(e)}function X(){if(D("="),S=W(),!(V="proto3"===S)&&"proto2"!==S)throw j(S,"syntax");D(";")}function $(t,e){switch(e){case"option":return Y(t,e),D(";"),!0;case"message":return function(t,e){if(!_.test(e=I()))throw j(e,"type name");var i=new n(e);Z(i,(function(t){if(!$(i,t))switch(t){case"map":!function(t){D("<");var e=I();if(void 0===f.mapKey[e])throw j(e,"type");D(",");var i=I();if(!x.test(i))throw j(i,"type");D(">");var o=I();if(!_.test(o))throw j(o,"name");D("=");var s=new a(B(o),H(I()),e,i);Z(s,(function(t){if("option"!==t)throw j(t);Y(s,t),D(";")}),(function(){tt(s)})),t.add(s)}(i);break;case"required":case"optional":case"repeated":G(i,t);break;case"oneof":!function(t,e){if(!_.test(e=I()))throw j(e,"name");var i=new l(B(e));Z(i,(function(t){"option"===t?(Y(i,t),D(";")):(k(t),G(i,"optional"))})),t.add(i)}(i,t);break;case"extensions":U(i.extensions||(i.extensions=[]));break;case"reserved":U(i.reserved||(i.reserved=[]),!0);break;default:if(!V||!x.test(t))throw j(t);k(t),G(i,"optional")}})),t.add(i)}(t,e),!0;case"enum":return function(t,e){if(!_.test(e=I()))throw j(e,"name");var i=new h(e);Z(i,(function(t){switch(t){case"option":Y(i,t),D(";");break;case"reserved":U(i.reserved||(i.reserved=[]),!0);break;default:!function(t,e){if(!_.test(e))throw j(e,"name");D("=");var i=H(I(),!0),o={};Z(o,(function(t){if("option"!==t)throw j(t);Y(o,t),D(";")}),(function(){tt(o)})),t.add(e,i,o.comment)}(i,t)}})),t.add(i)}(t,e),!0;case"service":return function(t,e){if(!_.test(e=I()))throw j(e,"service name");var i=new c(e);Z(i,(function(t){if(!$(i,t)){if("rpc"!==t)throw j(t);!function(t,e){var i=e;if(!_.test(e=I()))throw j(e,"name");var o,s,n,r,a=e;D("("),D("stream",!0)&&(s=!0);if(!x.test(e=I()))throw j(e);o=e,D(")"),D("returns"),D("("),D("stream",!0)&&(r=!0);if(!x.test(e=I()))throw j(e);n=e,D(")");var l=new d(a,i,o,n,s,r);Z(l,(function(t){if("option"!==t)throw j(t);Y(l,t),D(";")})),t.add(l)}(i,t)}})),t.add(i)}(t,e),!0;case"extend":return function(t,e){if(!x.test(e=I()))throw j(e,"reference");var i=e;Z(null,(function(e){switch(e){case"required":case"repeated":case"optional":G(t,e,i);break;default:if(!V||!x.test(e))throw j(e);k(e),G(t,"optional",i)}}))}(t,e),!0}return!1}function Z(t,e,i){var o=O.line;if(t&&(t.comment=L(),t.filename=T.filename),D("{",!0)){for(var s;"}"!==(s=I());)e(s);D(";",!0)}else i&&i(),D(";"),t&&"string"!=typeof t.comment&&(t.comment=L(o))}function G(t,e,i){var o=I();if("group"!==o){if(!x.test(o))throw j(o,"type");var s=I();if(!_.test(s))throw j(s,"name");s=B(s),D("=");var a=new r(s,H(I()),o,e,i);Z(a,(function(t){if("option"!==t)throw j(t);Y(a,t),D(";")}),(function(){tt(a)})),t.add(a),V||!a.repeated||void 0===f.packed[o]&&void 0!==f.basic[o]||a.setOption("packed",!1,!0)}else!function(t,e){var i=I();if(!_.test(i))throw j(i,"name");var o=u.lcFirst(i);i===o&&(i=u.ucFirst(i));D("=");var s=H(I()),a=new n(i);a.group=!0;var l=new r(o,s,i,e);l.filename=T.filename,Z(a,(function(t){switch(t){case"option":Y(a,t),D(";");break;case"required":case"optional":case"repeated":G(a,t);break;default:throw j(t)}})),t.add(a).add(l)}(t,e)}function Y(t,e){var i=D("(",!0);if(!x.test(e=I()))throw j(e,"name");var o=e;i&&(D(")"),o="("+o+")",e=R(),P.test(e)&&(o+=e,I())),D("="),K(t,o)}function K(t,e){if(D("{",!0))do{if(!_.test(E=I()))throw j(E,"name");"{"===R()?K(t,e+"."+E):(D(":"),"{"===R()?K(t,e+"."+E):Q(t,e+"."+E,z(!0)))}while(!D("}",!0));else Q(t,e,z(!0))}function Q(t,e,i){t.setOption&&t.setOption(e,i)}function tt(t){if(D("[",!0)){do{Y(t,"option")}while(D(",",!0));D("]")}return t}for(;null!==(E=I());)switch(E){case"package":if(!N)throw j(E);q();break;case"import":if(!N)throw j(E);J();break;case"syntax":if(!N)throw j(E);X();break;case"option":if(!N)throw j(E);Y(F,E),D(";");break;default:if($(F,E)){N=!1;continue}throw j(E)}return T.filename=null,{package:A,imports:M,weakImports:C,syntax:S,root:e}}T._configure=function(){o=i(20),s=i(9),n=i(3),r=i(2),a=i(12),l=i(7),h=i(1),c=i(10),d=i(13),f=i(5),u=i(0)}},function(t,e){t.exports=f;var i=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,s=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,n=/^ *[*/]+ */,r=/^\s*\*?\/*/,a=/\n/g,l=/\s/,h=/\\(.?)/g,c={0:"\0",r:"\r",n:"\n",t:"\t"};function d(t){return t.replace(h,(function(t,e){switch(e){case"\\":case"":return e;default:return c[e]||""}}))}function f(t,e){t=t.toString();var h=0,c=t.length,f=1,u=null,p=null,y=0,m=!1,g=[],v=null;function w(t){return Error("illegal "+t+" (line "+f+")")}function b(e){return t.charAt(e)}function _(i,o){u=t.charAt(i++),y=f,m=!1;var s,l=i-(e?2:3);do{if(--l<0||"\n"===(s=t.charAt(l))){m=!0;break}}while(" "===s||"\t"===s);for(var h=t.substring(i,o).split(a),c=0;c0)return g.shift();if(v)return function(){var e="'"===v?s:o;e.lastIndex=h-1;var i=e.exec(t);if(!i)throw w("string");return h=e.lastIndex,A(v),v=null,d(i[1])}();var n,r,a,u,p;do{if(h===c)return null;for(n=!1;l.test(a=b(h));)if("\n"===a&&++f,++h===c)return null;if("/"===b(h)){if(++h===c)throw w("comment");if("/"===b(h))if(e){if(u=h,p=!1,x(h)){p=!0;do{if((h=P(h))===c)break;h++}while(x(h))}else h=Math.min(c,P(h)+1);p&&_(u,h),f++,n=!0}else{for(p="/"===b(u=h+1);"\n"!==b(++h);)if(h===c)return null;++h,p&&_(u,h-1),++f,n=!0}else{if("*"!==(a=b(h)))return"/";u=h+1,p=e||"*"===b(u);do{if("\n"===a&&++f,++h===c)throw w("comment");r=a,a=b(h)}while("*"!==r||"/"!==a);++h,p&&_(u,h-2),n=!0}}}while(n);var y=h;if(i.lastIndex=0,!i.test(b(y++)))for(;y "+t.len)}function a(t){this.buf=t,this.pos=0,this.len=t.length}var l,h="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new a(t);if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer)return new a(new Uint8Array(t));throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new a(t);throw Error("illegal buffer")};function c(){var t=new o(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw r(this,8);return new o(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}a.create=n.Buffer?function(t){return(a.create=function(t){return n.Buffer.isBuffer(t)?new(void 0)(t):h(t)})(t)}:h,a.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,a.prototype.uint32=(l=4294967295,function(){if(l=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return l;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return l}),a.prototype.int32=function(){return 0|this.uint32()},a.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},a.prototype.bool=function(){return 0!==this.uint32()},a.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return d(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw r(this,4);return 0|d(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},a.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},a.prototype.bytes=function(){var t=this.uint32(),e=this.pos,i=this.pos+t;if(i>this.len)throw r(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,i):e===i?new this.buf.constructor(0):this._slice.call(this.buf,e,i)},a.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},a.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw r(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw r(this)}while(128&this.buf[this.pos++]);return this},a.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(;;){if(4==(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},a._configure=function(){o=i(11),s=i(8);var t=n.Long?"toLong":"toNumber";n.merge(a.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},function(t,e,i){var o,s;function n(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function r(t,e,i,r){var a=r.types;if(t.resolvedType)if(t.resolvedType instanceof o){if(Object.keys(t.resolvedType.values).indexOf(i)<0)return n(t,"enum value")}else{var l=a[e].verify(i);if(l)return t.name+"."+l}else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(!s.isInteger(i))return n(t,"integer");break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(!(s.isInteger(i)||i&&s.isInteger(i.low)&&s.isInteger(i.high)))return n(t,"integer|Long");break;case"float":case"double":if("number"!=typeof i)return n(t,"number");break;case"bool":if("boolean"!=typeof i)return n(t,"boolean");break;case"string":if(!s.isString(i))return n(t,"string");break;case"bytes":if(!(i&&"number"==typeof i.length||s.isString(i)))return n(t,"buffer")}}function a(t,e){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(!s.key32Re.test(e))return n(t,"integer key");break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(!s.key64Re.test(e))return n(t,"integer|Long key");break;case"bool":if(!s.key2Re.test(e))return n(t,"boolean key")}}function l(t){return function(e){return function(i){var o;if("object"!=typeof i||null===i)return"object expected";var l,h={};t.oneofsArray.length&&(l={});for(var c=0;c>>0).fork().uint32(8|s.mapKey[c.keyType])[c.keyType](y[m]),void 0===u?n[d].encode(p[y[m]],a.uint32(18).fork()).ldelim().ldelim():a.uint32(16|u)[f](p[y[m]]).ldelim()}else if(c.repeated){if(p&&p.length)if(c.packed&&void 0!==s.packed[f]){a.uint32((c.id<<3|2)>>>0).fork();for(var g=0;g>>0)).uint32((c.id<<3|4)>>>0):n[d].encode(p[v],a.uint32((c.id<<3|2)>>>0).fork()).ldelim():a.uint32((c.id<<3|u)>>>0)[f](p[v])}else(!c.optional||null!=p&&e.hasOwnProperty(c.name))&&(c.optional||null!=p&&e.hasOwnProperty(c.name)||console.warn("注意啦!!!很大概率会报错 类型:",e.$type?e.$type.name:"不晓得","没有设置对应的属性:",c.name,"检查是不是proto文件属性设置为了required"),void 0===u?c.resolvedType.group?n[d].encode(p,a.uint32((c.id<<3|3)>>>0)).uint32((c.id<<3|4)>>>0):n[d].encode(p,a.uint32((c.id<<3|2)>>>0).fork()).ldelim():a.uint32((c.id<<3|u)>>>0)[f](p))}return a}}}t.exports=n,n._configure=function(){o=i(1),s=i(5)}},function(t,e,i){var o,s,n;function r(t){return"missing required '"+t.name+"'"}function a(t){return function(e){var i=e.Reader,a=e.types,l=e.util;return function(e,h){e instanceof i||(e=i.create(e));for(var c,d=void 0===h?e.len:e.pos+h,f=new this.ctor;e.pos>>3,y=0,m=!1;y>>0:r[i]=a[i]>>>0;break;case"int32":case"sint32":case"sfixed32":c?r[i][h]=0|a[i][h]:r[i]=0|a[i];break;case"uint64":y=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":s.Long?c?r[i][h]=s.Long.fromValue(a[i][h]).unsigned=y:r[i]=s.Long.fromValue(a[i]).unsigned=y:"string"==typeof(c?a[i][h]:a[i])?c?r[i][h]=parseInt(a[i][h],10):r[i]=parseInt(a[i],10):"number"==typeof(c?a[i][h]:a[i])?c?r[i][h]=a[i][h]:r[i]=a[i]:"object"==typeof(c?a[i][h]:a[i])&&(c?r[i][h]=new s.LongBits(a[i][h].low>>>0,a[i][h].high>>>0).toNumber(y):r[i]=new s.LongBits(a[i].low>>>0,a[i].high>>>0).toNumber(y));break;case"bytes":"string"==typeof(c?a[i][h]:a[i])?c?s.base64.decode(a[i][h],r[i][h]=s.newBuffer(s.base64.length(a[i][h])),0):s.base64.decode(a[i],r[i]=s.newBuffer(s.base64.length(a[i])),0):(c?a[i][h]:a[i]).length&&(c?r[i][h]=a[i][h]:r[i]=a[i]);break;case"string":c?r[i][h]=String(a[i][h]):r[i]=String(a[i]);break;case"bool":c?r[i][h]=Boolean(a[i][h]):r[i]=Boolean(a[i])}}}function a(t,e,i,n){var r=n.m,a=n.d,l=n.types,h=n.ksi,c=n.o,d=void 0!==h;if(t.resolvedType)t.resolvedType instanceof o?d?a[i][h]=c.enums===String?l[e].values[r[i][h]]:r[i][h]:a[i]=c.enums===String?l[e].values[r[i]]:r[i]:d?a[i][h]=l[e].toObject(r[i][h],c):a[i]=l[e].toObject(r[i],c);else{var f=!1;switch(t.type){case"double":case"float":d?a[i][h]=c.json&&!isFinite(r[i][h])?String(r[i][h]):r[i][h]:a[i]=c.json&&!isFinite(r[i])?String(r[i]):r[i];break;case"uint64":f=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":"number"==typeof r[i][h]?d?a[i][h]=c.longs===String?String(r[i][h]):r[i][h]:a[i]=c.longs===String?String(r[i]):r[i]:d?a[i][h]=c.longs===String?s.Long.prototype.toString.call(r[i][h]):c.longs===Number?new s.LongBits(r[i][h].low>>>0,r[i][h].high>>>0).toNumber(f):r[i][h]:a[i]=c.longs===String?s.Long.prototype.toString.call(r[i]):c.longs===Number?new s.LongBits(r[i].low>>>0,r[i].high>>>0).toNumber(f):r[i];break;case"bytes":d?a[i][h]=c.bytes===String?s.base64.encode(r[i][h],0,r[i][h].length):c.bytes===Array?Array.prototype.slice.call(r[i][h]):r[i][h]:a[i]=c.bytes===String?s.base64.encode(r[i],0,r[i].length):c.bytes===Array?Array.prototype.slice.call(r[i]):r[i];break;default:d?a[i][h]=r[i][h]:a[i]=r[i]}}}n._configure=function(){o=i(1),s=i(0)},n.fromObject=function(t){var e=t.fieldsArray;return function(t){return function(i){if(i instanceof this.ctor)return i;if(!e.length)return new this.ctor;for(var n=new this.ctor,a=0;a255)return!1;return!0}return{toBytes:function(i){var o=[],s=0;for(i=encodeURI(i);s>>7==0?(e+=String.fromCharCode(t[i]),i+=1):252==(252&o)?(s=(3&t[i])<<30,s|=(63&t[i+1])<<24,s|=(63&t[i+2])<<18,s|=(63&t[i+3])<<12,s|=(63&t[i+4])<<6,s|=63&t[i+5],e+=String.fromCodePoint(s),i+=6):248==(248&o)?(s=(7&t[i])<<24,s|=(63&t[i+1])<<18,s|=(63&t[i+2])<<12,s|=(63&t[i+3])<<6,s|=63&t[i+4],e+=String.fromCodePoint(s),i+=5):240==(240&o)?(s=(15&t[i])<<18,s|=(63&t[i+1])<<12,s|=(63&t[i+2])<<6,s|=63&t[i+3],e+=String.fromCodePoint(s),i+=4):224==(224&o)?(s=(31&t[i])<<12,s|=(63&t[i+1])<<6,s|=63&t[i+2],e+=String.fromCharCode(s),i+=3):192==(192&o)?(s=(63&t[i])<<6,s|=63&t[i+1],e+=String.fromCharCode(s),i+=2):(e+=String.fromCharCode(t[i]),i+=1)}return e}}}();t.exports=i},function(t,e){var i=function(){const t={width:720,height:1280,intrinstics:[1110.828383,0,360,0,1111.21832,640,0,0,1],undistorts:[1e-5,0,0,0,0]},e={width:720,height:960,intrinstics:[720,0,360,0,720,480,0,0,1],undistorts:[0,0,0,0,0]},i={width:288,height:352,intrinstics:[594.25994,0,237.531106,0,594.825983,313.414084,0,0,1],undistorts:[.184825,-.433983,-.003168,-.010542,0]};function o(t,e){const i=[],o=[];for(var s=0;sn?(e=1200*s/1280,i=e):(e=1200*n/1280,i=e),o=s/2,r=n/2,c.intrinstics=[e,0,o,0,i,r,0,0,1],c.undistorts=t.undistorts,c}return{intrinstics:[],undistorts:[]}}}}();t.exports=i},function(t,e,i){t.exports=function(){var t={};function e(e,i,o){return"function"==typeof i?(o=i,i=new t.Root):i||(i=new t.Root),i.load(e,o)}function o(e,i){return i||(i=new t.Root),i.loadSync(e)}function s(e,i,o){return"function"==typeof i?(o=i,i=new t.Root):i||(i=new t.Root),i.parseFromPbString(e,o)}function n(){t.converter._configure(),t.decoder._configure(),t.encoder._configure(),t.Field._configure(),t.MapField._configure(),t.Message._configure(),t.Namespace._configure(),t.Method._configure(),t.ReflectionObject._configure(),t.OneOf._configure(),t.parse._configure(),t.Reader._configure(),t.Root._configure(),t.Service._configure(),t.verifier._configure(),t.Type._configure(),t.types._configure(),t.wrappers._configure(),t.Writer._configure()}if(t.build="minimal",t.Writer=i(16),t.encoder=i(25),t.Reader=i(23),t.util=i(0),t.rpc=i(21),t.roots=i(17),t.verifier=i(24),t.tokenize=i(20),t.parse=i(19),t.common=i(22),t.ReflectionObject=i(4),t.Namespace=i(6),t.Root=i(9),t.Enum=i(1),t.Type=i(3),t.Field=i(2),t.OneOf=i(7),t.MapField=i(12),t.Service=i(10),t.Method=i(13),t.converter=i(28),t.decoder=i(26),t.Message=i(14),t.wrappers=i(27),t.types=i(5),t.util=i(0),t.configure=n,t.load=e,t.loadSync=o,t.parseFromPbString=s,n(),arguments&&arguments.length)for(var r=0;r>>=0)&&t<256)&&(o=r[t])?o:(i=h(t,(0|t)<0?-1:0,!0),s&&(r[t]=i),i):(s=-128<=(t|=0)&&t<128)&&(o=n[t])?o:(i=h(t,t<0?-1:0,!1),s&&(n[t]=i),i)}function l(t,e){if(isNaN(t))return e?v:g;if(e){if(t<0)return v;if(t>=p)return P}else{if(t<=-y)return T;if(t+1>=y)return x}return t<0?l(-t,e).neg():h(t%u|0,t/u|0,e)}function h(t,e,i){return new o(t,e,i)}o.fromInt=a,o.fromNumber=l,o.fromBits=h;var c=Math.pow;function d(t,e,i){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return g;if("number"==typeof e?(i=e,e=!1):e=!!e,(i=i||10)<2||360)throw Error("interior hyphen");if(0===o)return d(t.substring(1),e,i).neg();for(var s=l(c(i,8)),n=g,r=0;r>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*u+(this.low>>>0):this.high*u+(this.low>>>0)},A.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((n=a).isZero())return h+r;for(;h.length<6;)h="0"+h;r=""+h+r}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(T)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},A.isOdd=function(){return 1==(1&this.low)},A.isEven=function(){return 0==(1&this.low)},A.equals=function(t){return s(t)||(t=f(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},A.eq=A.equals,A.notEquals=function(t){return!this.eq(t)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(t){return this.comp(t)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(t){return this.comp(t)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(t){return this.comp(t)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(t){return this.comp(t)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(t){if(s(t)||(t=f(t)),this.eq(t))return 0;var e=this.isNegative(),i=t.isNegative();return e&&!i?-1:!e&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(T)?T:this.not().add(w)},A.neg=A.negate,A.add=function(t){s(t)||(t=f(t));var e=this.high>>>16,i=65535&this.high,o=this.low>>>16,n=65535&this.low,r=t.high>>>16,a=65535&t.high,l=t.low>>>16,c=0,d=0,u=0,p=0;return u+=(p+=n+(65535&t.low))>>>16,d+=(u+=o+l)>>>16,c+=(d+=i+a)>>>16,c+=e+r,h((u&=65535)<<16|(p&=65535),(c&=65535)<<16|(d&=65535),this.unsigned)},A.subtract=function(t){return s(t)||(t=f(t)),this.add(t.neg())},A.sub=A.subtract,A.multiply=function(t){if(this.isZero())return g;if(s(t)||(t=f(t)),i)return h(i.mul(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned);if(t.isZero())return g;if(this.eq(T))return t.isOdd()?T:g;if(t.eq(T))return this.isOdd()?T:g;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(m)&&t.lt(m))return l(this.toNumber()*t.toNumber(),this.unsigned);var e=this.high>>>16,o=65535&this.high,n=this.low>>>16,r=65535&this.low,a=t.high>>>16,c=65535&t.high,d=t.low>>>16,u=65535&t.low,p=0,y=0,v=0,w=0;return v+=(w+=r*u)>>>16,y+=(v+=n*u)>>>16,v&=65535,y+=(v+=r*d)>>>16,p+=(y+=o*u)>>>16,y&=65535,p+=(y+=n*d)>>>16,y&=65535,p+=(y+=r*c)>>>16,p+=e*u+o*d+n*c+r*a,h((v&=65535)<<16|(w&=65535),(p&=65535)<<16|(y&=65535),this.unsigned)},A.mul=A.multiply,A.divide=function(t){if(s(t)||(t=f(t)),t.isZero())throw Error("division by zero");var e,o,n;if(i)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?h((this.unsigned?i.div_u:i.div_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?v:g;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return b;n=v}else{if(this.eq(T))return t.eq(w)||t.eq(_)?T:t.eq(T)?w:(e=this.shr(1).div(t).shl(1)).eq(g)?t.isNegative()?w:_:(o=this.sub(t.mul(e)),n=e.add(o.div(t)));if(t.eq(T))return this.unsigned?v:g;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();n=g}for(o=this;o.gte(t);){e=Math.max(1,Math.floor(o.toNumber()/t.toNumber()));for(var r=Math.ceil(Math.log(e)/Math.LN2),a=r<=48?1:c(2,r-48),d=l(e),u=d.mul(t);u.isNegative()||u.gt(o);)u=(d=l(e-=a,this.unsigned)).mul(t);d.isZero()&&(d=w),n=n.add(d),o=o.sub(u)}return n},A.div=A.divide,A.modulo=function(t){return s(t)||(t=f(t)),i?h((this.unsigned?i.rem_u:i.rem_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return h(~this.low,~this.high,this.unsigned)},A.and=function(t){return s(t)||(t=f(t)),h(this.low&t.low,this.high&t.high,this.unsigned)},A.or=function(t){return s(t)||(t=f(t)),h(this.low|t.low,this.high|t.high,this.unsigned)},A.xor=function(t){return s(t)||(t=f(t)),h(this.low^t.low,this.high^t.high,this.unsigned)},A.shiftLeft=function(t){return s(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?h(this.low<>>32-t,this.unsigned):h(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):h(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(t){if(s(t)&&(t=t.toInt()),0===(t&=63))return this;var e=this.high;return t<32?h(this.low>>>t|e<<32-t,e>>>t,this.unsigned):h(32===t?e:e>>>t-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.toSigned=function(){return this.unsigned?h(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:h(this.low,this.high,!0)},A.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},A.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},A.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},o.fromBytes=function(t,e,i){return i?o.fromBytesLE(t,e):o.fromBytesBE(t,e)},o.fromBytesLE=function(t,e){return new o(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},o.fromBytesBE=function(t,e){return new o(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},function(t,e){t.exports=function(t,e,i){var o=i||8192,s=o>>>1,n=null,r=o;return function(i){if(i<1||i>s)return t(i);r+i>o&&(n=t(o),r=0);var a=e.call(n,r,r+=i);return 7&r&&(r=1+(7|r)),a}}},function(t,e){function i(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),i=new Uint8Array(e.buffer),o=128===i[3];function s(t,o,s){e[0]=t,o[s]=i[0],o[s+1]=i[1],o[s+2]=i[2],o[s+3]=i[3]}function n(t,o,s){e[0]=t,o[s]=i[3],o[s+1]=i[2],o[s+2]=i[1],o[s+3]=i[0]}function r(t,o){return i[0]=t[o],i[1]=t[o+1],i[2]=t[o+2],i[3]=t[o+3],e[0]}function a(t,o){return i[3]=t[o],i[2]=t[o+1],i[1]=t[o+2],i[0]=t[o+3],e[0]}t.writeFloatLE=o?s:n,t.writeFloatBE=o?n:s,t.readFloatLE=o?r:a,t.readFloatBE=o?a:r}():function(){function e(t,e,i,o){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,i,o);else if(isNaN(e))t(2143289344,i,o);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,i,o);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,i,o);else{var n=Math.floor(Math.log(e)/Math.LN2);t((s<<31|n+127<<23|8388607&Math.round(e*Math.pow(2,-n)*8388608))>>>0,i,o)}}function i(t,e,i){var o=t(e,i),s=2*(o>>31)+1,n=o>>>23&255,r=8388607&o;return 255===n?r?NaN:s*(1/0):0===n?1401298464324817e-60*s*r:s*Math.pow(2,n-150)*(r+8388608)}t.writeFloatLE=e.bind(null,o),t.writeFloatBE=e.bind(null,s),t.readFloatLE=i.bind(null,n),t.readFloatBE=i.bind(null,r)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),i=new Uint8Array(e.buffer),o=128===i[7];function s(t,o,s){e[0]=t,o[s]=i[0],o[s+1]=i[1],o[s+2]=i[2],o[s+3]=i[3],o[s+4]=i[4],o[s+5]=i[5],o[s+6]=i[6],o[s+7]=i[7]}function n(t,o,s){e[0]=t,o[s]=i[7],o[s+1]=i[6],o[s+2]=i[5],o[s+3]=i[4],o[s+4]=i[3],o[s+5]=i[2],o[s+6]=i[1],o[s+7]=i[0]}function r(t,o){return i[0]=t[o],i[1]=t[o+1],i[2]=t[o+2],i[3]=t[o+3],i[4]=t[o+4],i[5]=t[o+5],i[6]=t[o+6],i[7]=t[o+7],e[0]}function a(t,o){return i[7]=t[o],i[6]=t[o+1],i[5]=t[o+2],i[4]=t[o+3],i[3]=t[o+4],i[2]=t[o+5],i[1]=t[o+6],i[0]=t[o+7],e[0]}t.writeDoubleLE=o?s:n,t.writeDoubleBE=o?n:s,t.readDoubleLE=o?r:a,t.readDoubleBE=o?a:r}():function(){function e(t,e,i,o,s,n){var r=o<0?1:0;if(r&&(o=-o),0===o)t(0,s,n+e),t(1/o>0?0:2147483648,s,n+i);else if(isNaN(o))t(0,s,n+e),t(2146959360,s,n+i);else if(o>17976931348623157e292)t(0,s,n+e),t((r<<31|2146435072)>>>0,s,n+i);else{var a;if(o<22250738585072014e-324)t((a=o/5e-324)>>>0,s,n+e),t((r<<31|a/4294967296)>>>0,s,n+i);else{var l=Math.floor(Math.log(o)/Math.LN2);1024===l&&(l=1023),t(4503599627370496*(a=o*Math.pow(2,-l))>>>0,s,n+e),t((r<<31|l+1023<<20|1048576*a&1048575)>>>0,s,n+i)}}}function i(t,e,i,o,s){var n=t(o,s+e),r=t(o,s+i),a=2*(r>>31)+1,l=r>>>20&2047,h=4294967296*(1048575&r)+n;return 2047===l?h?NaN:a*(1/0):0===l?5e-324*a*h:a*Math.pow(2,l-1075)*(h+4503599627370496)}t.writeDoubleLE=e.bind(null,o,0,4),t.writeDoubleBE=e.bind(null,s,4,0),t.readDoubleLE=i.bind(null,n,0,4),t.readDoubleBE=i.bind(null,r,4,0)}(),t}function o(t,e,i){e[i]=255&t,e[i+1]=t>>>8&255,e[i+2]=t>>>16&255,e[i+3]=t>>>24}function s(t,e,i){e[i]=t>>>24,e[i+1]=t>>>16&255,e[i+2]=t>>>8&255,e[i+3]=255&t}function n(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function r(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=i(i)},function(t,e,i){"use strict";t.exports=function(t,e){var i=new Array(arguments.length-1),o=0,s=2,n=!0;for(;s0&&".."!==e[n-1]?e.splice(--n,2):i?e.splice(n,1):++n:"."===e[n]?e.splice(n,1):++n;return s+e.join("/")};i.resolve=function(t,e,i){return i||(e=s(e)),o(e)?e:(i||(t=s(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?s(t+"/"+e):e)}},function(t,e){t.exports={nested:{bdarvps:{nested:{BdarVector12f:{fields:{f1:{type:"float",id:1},f2:{type:"float",id:2},f3:{type:"float",id:3},f4:{type:"float",id:4},f5:{type:"float",id:5},f6:{type:"float",id:6},f7:{type:"float",id:7},f8:{type:"float",id:8},f9:{type:"float",id:9},f10:{type:"float",id:10},f11:{type:"float",id:11},f12:{type:"float",id:12}}},BdarVector9f:{fields:{f1:{type:"float",id:1},f2:{type:"float",id:2},f3:{type:"float",id:3},f4:{type:"float",id:4},f5:{type:"float",id:5},f6:{type:"float",id:6},f7:{type:"float",id:7},f8:{type:"float",id:8},f9:{type:"float",id:9}}},BdarVector5f:{fields:{f1:{type:"float",id:1},f2:{type:"float",id:2},f3:{type:"float",id:3},f4:{type:"float",id:4},f5:{type:"float",id:5}}},BdarVector4f:{fields:{f1:{type:"float",id:1},f2:{type:"float",id:2},f3:{type:"float",id:3},f4:{type:"float",id:4}}},BdarVector3f:{fields:{x:{type:"float",id:1},y:{type:"float",id:2},z:{type:"float",id:3}}},BdarVector2f:{fields:{x:{type:"float",id:1},y:{type:"float",id:2}}},BdarVector2d:{fields:{x:{type:"double",id:1},y:{type:"double",id:2}}},BdarVector3d:{fields:{x:{type:"double",id:1},y:{type:"double",id:2},z:{type:"double",id:3}}},BdarTrackerData:{fields:{pose:{type:"BdarVector12f",id:1},poseOrig:{type:"BdarVector12f",id:2},timestamp:{type:"bytes",id:3},frameId:{type:"int32",id:4},status:{type:"int32",id:5},magnet:{rule:"repeated",type:"double",id:6}}},BdarLocalizerData:{fields:{pose:{type:"BdarVector12f",id:1},timestamp:{type:"bytes",id:2},frameId:{type:"int32",id:3},consistent:{type:"int32",id:4}}},BdarTrackerOptimizeData:{fields:{sampleRate:{type:"int32",id:1},trackerData:{rule:"repeated",type:"BdarTrackerData",id:2},localizerData:{rule:"repeated",type:"BdarLocalizerData",id:3}}},BdarPosePrior:{fields:{type:{type:"int32",id:1},prior:{type:"BdarVector12f",id:2},priorAccuracy:{type:"float",id:3},priorConfidence:{type:"float",id:4}}},BdarOCRPrior:{fields:{status:{type:"bytes",id:1},roiCoordinate:{type:"BdarVector4f",id:2}}},BdarVPSRequestData:{fields:{methodType:{type:"int32",id:1},trackerType:{type:"int32",id:2},phoneType:{type:"bytes",id:3},userId:{type:"bytes",id:4},frameId:{type:"int32",id:5},timestamp:{type:"bytes",id:6},trackerStatus:{type:"bool",id:7},trackerPose:{type:"BdarVector12f",id:8},pointIndices:{rule:"repeated",type:"int32",id:9},points_2d:{rule:"repeated",type:"BdarVector2f",id:10},points_3d:{rule:"repeated",type:"BdarVector3f",id:11},cameraIntrinsics:{type:"BdarVector9f",id:12},cameraDistort:{type:"BdarVector5f",id:13},gps:{type:"BdarVector3d",id:14},gravityDirection:{type:"BdarVector3f",id:15},imu:{type:"BdarVector12f",id:16},frame:{type:"bytes",id:17},frameWidth:{type:"int32",id:18},frameHeight:{type:"int32",id:19},frameChannels:{type:"int32",id:20},frameCompressType:{type:"int32",id:21},requestCorrespondence:{type:"bool",id:22},sessionId:{type:"bytes",id:23},version:{type:"bytes",id:24},sceneType:{type:"int32",id:25},trackerOptimizeData:{type:"BdarTrackerOptimizeData",id:26},posePriors:{rule:"repeated",type:"BdarPosePrior",id:27},floorId:{type:"bytes",id:28},bdarOCRPrior:{type:"BdarOCRPrior",id:29}}},BdarMapInfo:{fields:{mapTag:{type:"bytes",id:1},mapQueryConfidence:{type:"float",id:2}}},BdarClientResult:{fields:{buildingId:{type:"bytes",id:1},floorId:{type:"bytes",id:2},locationPoint:{type:"BdarVector2d",id:3},locationTransform:{type:"BdarVector12f",id:4}}},BdarCoupledPose:{fields:{pose:{type:"BdarVector12f",id:1},trackerPose:{type:"BdarVector12f",id:2},timestamp:{type:"bytes",id:3},frameId:{type:"int32",id:4}}},BdarCoupleResult:{fields:{status:{type:"int32",id:1},coupledPose:{rule:"repeated",type:"BdarCoupledPose",id:2},scale:{type:"float",id:3},transform:{type:"BdarVector12f",id:4}}},BdarVPSResponseData:{fields:{userId:{type:"bytes",id:1},frameId:{type:"int32",id:2},timestamp:{type:"bytes",id:3},trackerPose:{type:"BdarVector12f",id:4},imu:{type:"BdarVector12f",id:5},vpsStatus:{type:"bool",id:6},vpsPose:{type:"BdarVector12f",id:7},scale:{type:"float",id:8},points_2d:{rule:"repeated",type:"BdarVector2f",id:9},points_3d:{rule:"repeated",type:"BdarVector3f",id:10},vpsPosition:{type:"BdarVector3d",id:11},version:{type:"bytes",id:12},vpsPoseAccuracy:{type:"float",id:13},vpsPoseConfidence:{type:"float",id:14},sceneType:{type:"int32",id:15},trackerType:{type:"int32",id:16},mapInfo:{type:"BdarMapInfo",id:17},clientResult:{type:"BdarClientResult",id:18},session:{type:"bytes",id:19},trackerOptimizeData:{type:"BdarTrackerOptimizeData",id:20},coupleResult:{type:"BdarCoupleResult",id:21},vpsStatusMsg:{type:"int32",id:22}}},BdarVPSResponseDataList:{fields:{data:{rule:"repeated",type:"BdarVPSResponseData",id:1}}},LocationResponse:{fields:{errCode:{type:"int32",id:1},errMsg:{type:"string",id:2},data:{type:"bytes",id:3}}},SubBdarVPSRequestData:{fields:{sessionId:{type:"bytes",id:23}}},TrackFrameResp:{fields:{errCode:{type:"int32",id:1},errMsg:{type:"string",id:2},data:{type:"bytes",id:3}}},TrackFrameResp2:{fields:{errCode:{type:"int32",id:1},errMsg:{type:"string",id:2},data:{type:"string",id:3}}}}}}}},function(t,e,i){"use strict";function o(t){return{data:function(t){const e=new t.constructor(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),e}(t.data),width:t.width,height:t.height}}i.r(e),i.d(e,"SDKWrapper",(function(){return Pt}));const s=i(29),n=i(15);function r(t){return s.toBytes(t)}function a(t){for(var e={},i=0,o=t.length;i{e.floor_id===t.floor_id&&(i=e)}),this.baseURL=this._configData.interface.baseURL,console.log("createSession-this.baseURL",this.baseURL),{task:new Promise((t,s)=>{e=wx.request({url:this.baseURL+this._configData.interface.sessionInterface,method:"POST",data:{app_id:i.app_id,poi_id:i.poi_id,map_id:i.map_id,timestamp:o,sign:h({app_id:i.app_id,poi_id:i.poi_id,map_id:i.map_id,timestamp:o})},headers:{"Content-Type":"application/json; charset=UTF-8",Connection:"keep-alive"},success:e=>{0===e.data.err_code&&(console.log("createSssion",e),k=!1,p=e.data.data.session_id,t(e))},fail(t){s({msg:"创建session请求失败",data:t})}})}),taskController:e}}sendTrackframe(t){let e;return this.baseURL=this._configData.interface.baseURL,{trackframe:new Promise((i,o)=>{e=wx.request({url:this.baseURL+this._configData.interface.trackFrameInterface,method:"POST",data:t,headers:{"Content-Type":"multipart/protobuf",Connection:"keep-alive"},dataType:"protobuf",responseType:"arraybuffer",success:t=>{let e=function(t,e,i){let o=M.decode(t.data);if(0===o.errCode&&o.data){return A.decode(o.data)}i||e.onError({type:10004,msg:o.errMsg+" err_code:"+o.errCode})}(t,u,k);if(void 0===e)return{undefined:void 0,undefined:void 0};let o={};e.data.map(t=>{t.clientResult&&(o.floor=t.clientResult.floorId?l(t.clientResult.floorId):"",o.buildingId=t.clientResult.buildingId?l(t.clientResult.buildingId):"",o.locPoint=t.clientResult.locationPoint),t.session&&(o.session=l(t.session)),t.mapInfo&&t.mapInfo.mapTag&&(o.mapTag=l(t.mapInfo.mapTag)),o.vpsStatusMsg=t.vpsStatusMsg,!0===t.vpsStatus?(o.vpsStatus=t.vpsStatus,o.vpsPose=t.vpsPose,o.trackerPose=t.trackerPose,i(o)):(o.vpsStatus=!1,i(o))})},fail:t=>{o(t),console.log(t)}})}),trackframeController:e}}destroylocatesession(){this.baseURL=this._configData.interface.baseURL,console.log("destroylocatesession-this.baseURL",this.baseURL);let t,e=(new Date).getTime();if(void 0!==p){return{destroy:new Promise((i,o)=>{t=wx.request({url:this.baseURL+this._configData.interface.destroySessionInterface,method:"POST",data:{session_id:p,timestamp:e,app_id:0,sign:h({session_id:p,timestamp:e,app_id:0})},headers:{"Content-Type":"application/json; charset=UTF-8",Connection:"keep-alive"},success:t=>{console.log("destroylocatesession",t.data),0!==t.data.err_code?(u.onError({type:10006,msg:t.data.err_msg}),console.log(t.data.err_msg)):i(t.data),p=void 0},fail:t=>{o({msg:"销毁session请求失败",data:t}),p=void 0}})}),destroyController:t}}}getMapPoi(t){let e,i=((new Date).getTime()/1e3).toFixed();return{getPoi:new Promise((o,s)=>{e=wx.request({url:this._configData.interface.getMapPoiBaseUrl+this._configData.interface.getMapPoiInterface,method:"POST",data:{case_id:t,timestamp:Number(i),sign:c({case_id:t,timestamp:Number(i)})},headers:{"Content-Type":"application/json; charset=UTF-8",Connection:"keep-alive"},success:t=>{o(t)},fail(t){s({msg:"获取poi数据失败",data:t})}})}),getPoiController:e}}}function D(t,e){let i=e.x-t.x,o=e.y-t.y;return 0===i&&0===o?0:Math.atan2(o,i)-Math.PI/2}function L(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}let N,V,F=null,B=0,j=!1,W=!1,z=!1,U=!1,H=!1,q=null,J=0,X="",$={f1:0,f2:0,f3:0,f4:0},Z=[],G=0,Y=0,K=0,Q=0;const tt=i(15);class et{constructor(t,e,i,o,s){this.renderer=e,this._configData=t,this.option=i,void 0===I&&this.initWXwasm(),this.cContex=wx.createCameraContext(),this.initSystemInfo(),this.initGyroscope(),console.log("use_ekf_fusion >>>",!0),this.initDevice(),this.initAccelerometer(),this.allSuccessProxy=o,this.initCamera(o,s),this.algorithm=new d,this.severInterface=new R(this._configData),this.isPark=!1,this.hasIndoorLoc=!1,this.ak="",this.minTimeQueryServer=1e3,this.haveReceiveSessionMsg=!0,this.haveTrackFrame=!1,this.minDistanceToFinalThreshold=this._configData.minTriggerDistance.final,this.minDistanceToTransferThreshold=this._configData.minTriggerDistance.transfer,this.btDataPath=null,this.startTime=0,this.geo_map_transform_matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.with_bt_but_not_work=!1,this.userId="default_user"}forEachMap(){let t=this;t._configData.map.forEach(e=>{e.floor_id===t.locationOption.floor_id&&(console.log("item.ak =",e.ak),""===e.ak||void 0===e.ak?t.locationOption.onBluetoothAndScanStatus({type:100,msg:"只开启ocr扫描"}):(t.ak=e.ak,console.log("需要打开蓝牙 ak = ",t.ak),wx.getSetting({success(e){e.authSetting["scope.bluetooth"]?(wx.openBluetoothAdapter({success:e=>{t.locationOption.onBluetoothAndScanStatus({type:1,msg:"蓝牙已打开"}),t.getWxBtLocation()},fail:e=>{console.log("打开蓝牙错误:",e),t.locationOption.onBluetoothAndScanStatus({type:99,msg:"提示打开蓝牙"})}}),wx.onBluetoothAdapterStateChange((function(e){t.locationOption.onBluetoothAndScanStatus({type:e.available,msg:"打开蓝牙"})}))):wx.authorize({scope:"scope.bluetooth",success(){wx.openBluetoothAdapter({success:e=>{t.locationOption.onBluetoothAndScanStatus({type:1,msg:"蓝牙已打开"}),t.getWxBtLocation()},fail:e=>{console.log("打开蓝牙错误:",e),t.locationOption.onBluetoothAndScanStatus({type:99,msg:"提示打开蓝牙"})}}),wx.onBluetoothAdapterStateChange((function(e){t.locationOption.onBluetoothAndScanStatus({type:e.available,msg:"打开蓝牙"})}))}})}})))})}initSystemInfo(){let t;wx.getSystemInfo({success:e=>{this.phonetype=e.system,console.log("phonetype = ",this.phonetype),t=e.platform}}),"ios"===t&&(B=1),function(t){let e=t.getAccountInfoSync().miniProgram.appId;e=tt(e+"*-#-$--%%%=216").toUpperCase();for(let t=0;t{I=e.instance.exports;{let t=I.constructor();console.log("WXWebAssembly-初始化成功","use_ekf_fusion",t)}t.setAlgoParam(),console.log("WXWebAssembly-初始化成功");I.add_test()},t=>{console.log("WXWebAssembly-初始化失败",t)})}initGyroscope(){wx.startGyroscope({interval:"game"}),wx.onGyroscopeChange(t=>{let e=1e6*(new Date).getTime();void 0!==I&&I.process_gyro(t.x,t.y,t.z,e)})}stopGyroscope(){wx.stopGyroscope({success:t=>{},fail:t=>{}})}initAccelerometer(){wx.startAccelerometer({interval:"game"}),wx.onAccelerometerChange(t=>{{let e=1e6*(new Date).getTime();void 0!==I&&I.process_acc(9.8*t.x,9.8*t.y,9.8*t.z,e)}let e=this.algorithm.stepFunc(t.x,t.y,t.z,I);e.acc=[(9.8*t.x).toFixed(2),(9.8*t.y).toFixed(2),(9.8*t.z).toFixed(2)],void 0!==this.orientation?e.orientation=[this.orientation[0].toFixed(2),this.orientation[1].toFixed(2),this.orientation[2].toFixed(2)]:e.orientation=[0,0,0],this.acc=[9.8*t.x,9.8*t.y,9.8*t.z],this.locationOption.onStep(e),void 0!==this.locationOption.onSaveAcc&&this.locationOption.onSaveAcc(this.acc)})}stopAccelerometer(){wx.stopAccelerometer({success:t=>{console.log("success = ",t)},fail:t=>{console.log("fail = ",t)}})}initDevice(){wx.startDeviceMotionListening({interval:"game"}),wx.onDeviceMotionChange(t=>{{let t=1e6*(new Date).getTime();F=this.algorithm.odometryFusionFunc(t,I)}this.orientation=[t.alpha,t.beta,t.gamma],Math.abs(t.beta)<45&&this.allSuccessProxy.firstTrackFrameSuccess&&void 0!==this.locationOption&&this.locationOption.onError({type:10010,msg:"手机姿态异常"})})}stopDevice(){wx.stopDeviceMotionListening({success:t=>{console.log("success = ",t)},fail:t=>{console.log("fail = ",t)}})}setLoactionData(t,e){this.locationOption=t,e.map.forEach(e=>{if(e.floor_id===t.floor_id){if(this.ak=e.ak,this.algorithm.set_map_transform(e.transform_matrix,e.scale),void 0!==e.geo_map_transform_matrix&&(this.geo_map_transform_matrix=e.geo_map_transform_matrix,this.algorithm.set_geo_map_transform(e.geo_map_transform_matrix)),void 0!==I)for(let t=0;t<12;t++)I.set_geo_to_vpas_transform_matrix(1,this.geo_map_transform_matrix[t],t);0===e.is_park||void 0===e.is_park?(this.isPark=!1,X=""):(this.isPark=!0,X=e.is_ocr)}}),this.startLocation=!0}setCanvasData(t){this._canvas=t}setGlCanvas(t){this.gl_canvas=t}initCamera(t,e){let i,s;V=(new Date).getTime(),N=V;let n=!1,r=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],l=[-1,-1,0],h=3;i=this.cContex.onCameraFrame(t=>{if(n||void 0!==this._canvas&&(this._canvas.width=t.width,this._canvas.height=t.height,n=!0),n){let i=o(t);if(0===$.f1&&0===$.f2&&0===$.f3&&0===$.f4&&this.isPark){console.log("canvas size = ",this.gl_canvas.width/3,this.gl_canvas.height/3,i.width,i.height);let t=this.gl_canvas.width/3*4/5,e=this.gl_canvas.height/3*1/10,o=(this.gl_canvas.height/3-e)/2,s=(this.gl_canvas.width/3-t)/2;$=function(t,e,i,o,s,n,r,a){let l=t-(s-r)/2,h=e-(n-a)/2;return[l,h,i+l,o+h]}(s,o,t,e,this.gl_canvas.width/3,this.gl_canvas.height/3,i.width,i.height)}if(null!==F&&!0===this.startLocation&&void 0!==this._canvas){null===q&&this.haveReceiveSessionMsg&&(this.severInterface.createSession(this.locationOption).task.then(t=>{0===t.data.err_code?q=t.data.data.session_id:(this.locationOption.onError({type:10003,msg:t.data.msg}),console.log(t.data.msg)),this.haveReceiveSessionMsg=!0}),this.haveReceiveSessionMsg=!1);let t=(new Date).getTime(),o=t-V,n=t-N;if(null!==q&&this.haveReceiveSessionMsg){let t={};if(o>this.minTimeQueryServer&&!H&&!this.haveTrackFrame&&void 0!==this.acc){if(this.haveTrackFrame=!0,""!==this.ak&&void 0!==this.ak){if(I.get_vpas_translation_from_geo)for(let t=0;t<3;t++)l[t]=I.get_vpas_translation_from_geo(t);if(-1!==l[0]&&-1!==l[1]&&l[0]!==Number.NaN&&l[1]!==Number.NaN&&""!==l[0]&&""!==l[1]){r[0]=l[0],r[1]=l[1],h=1;let t={type:h,prior:null,priorAccuracy:10,priorConfidence:0},e=a(r),i=1;t.prior=e,t.priorConfidence=i,Z[0]=t,this.with_bt_but_not_work=!1}else this.with_bt_but_not_work=!0,this.haveTrackFrame=!1}if(void 0!==this.renderer.priorCrossFloor&&!this.allSuccessProxy.firstTrackFrameSuccess){I.transform_map_coodinate_to_translation(this.renderer.priorCrossFloor[0],this.renderer.priorCrossFloor[1]);let t=[];for(let e=0;e<2;e++)t[e]=I.get_transform_vpas_translation(e);r[0]=t[0],r[1]=t[1],h=1;let e={type:h,prior:null,priorAccuracy:10,priorConfidence:0},i=a(r),o=1;e.prior=i,e.priorConfidence=o,Z[0]=e}s={pixels:i.data,pixelWidth:i.width,pixelHeight:i.height,phonetype:this.phonetype,lng:void 0,lat:void 0,posePriors:Z,odometry:F,ocrStatus:X,ocrCoordinate:$,acc:this.acc,deviceOrientation:this.orientation,floorId:this.locationOption.floor_id};let o=O(q,this._canvas,s,0,this.locationOption,this.userId);if(o!=={}&&!this.with_bt_but_not_work){let i=this.severInterface.sendTrackframe(o).trackframe;if(void 0===i)return void(this.haveTrackFrame=!1);V=(new Date).getTime(),Q+=1,i.then(i=>{if(this.haveTrackFrame=!1,!0===i.vpsStatus&&this.startLocation){X="",t.vpsStatus=i.vpsStatus,t.vpsPose=i.vpsPose,t.trackerPose=i.trackerPose;let o=this.algorithm.locationSuccessEvery(I,t);if(null===o)j=!1;else{N=(new Date).getTime(),j=!0,i.locX=o.locX,i.locY=o.locY,i.vpasX=o.vpasX,i.vpasY=o.vpasY,G=o.vpasX,Y=o.vpasY,this.allSuccessProxy.firstTrackFrameSuccess||(Object.assign(e,i,{wasmFunction:I}),this.allSuccessProxy.firstTrackFrameSuccess=!0,this.minTimeQueryServer=this._configData.minTimeQueryServer),K+=1;let t={locStatus:!0,locX:o.locX,locY:o.locY};this.locationOption.onLocateEvent(t)}}else{let t={locStatus:!1};this.locationOption.onLocateEvent(t)}-1===i.vpsStatusMsg&&(console.log("无效的车位号"),this.locationOption.onError({type:10009,msg:"无效的车位号"})),(!1===i.vpsStatus&&!1===this.allSuccessProxy.firstTrackFrameSuccess||!1===j)&&(n>5e3&&!1===W&&(this.locationOption.onError({type:10005,msg:"首帧定位超时5s"}),W=!0),n>8e3&&!1===z&&(this.locationOption.onError({type:10007,msg:"首帧定位超时8s"}),z=!0))}),this.haveTrackFrame=!1}}}}if(U&&this.allSuccessProxy.firstTrackFrameSuccess&&!H){let t=this.algorithm.locationOnceSuccessFun(I,this.renderer);if(null===t)return;let e={type:t.priorType,prior:null,priorAccuracy:10,priorConfidence:0};e.prior=t.posePriors,e.priorConfidence=t.priorConfidence,Z[0]=e,t.vpasX=G,t.vpasY=Y,this.locationOption.distanceOfNextPoint(t.distanceToNextPoint),this.locationOption.onEverySuccess(t),7===t.type?t.distance=s){let r=n.add(this.segments[i].direction().multiplyScalar(s));e.push(r),n=r.clone(),o+=s,s=t}else s-=a,n=this.segments[i].ep.clone(),i+=1,o=0;i>=this.segments.length&&(r=!0)}return e}}class st{constructor(t,e,i,o,s,n){this.THREE=t,this.scene=e,this.camera=i,this.onResLoaded=o,this.onScreenModelInfo=s.onScreenArrow,this.onScreenModel=void 0,this.loadArrowModel(n),this.position=new t.Vector3(0,-.05,-.25)}loadArrowModel(t){let e=this.THREE,i=this.onScreenModelInfo.arrowURL.split("/"),o=i[i.length-1],s=this.onScreenModelInfo.arrowURL.replace(o,""),n=this.onScreenModelInfo.arrowPosition,r=this.onScreenModelInfo.arrowRotation,a=this.onScreenModelInfo.arrowScale;const l=(new e.GLTFLoader).setPath(s);let h=this;l.load(o,(function(e){h.onScreenModel=e.scene,h.onScreenModel.position.set(n[0],n[1],n[2]),h.onScreenModel.scale.set(a[0],a[1],a[2]),h.onScreenModel.visible=!1,h.onScreenModel.rotateX(r[0]),h.onResLoaded(),console.log("Arrow on screen (3 dof) has loaded"),h.camera.add(h.onScreenModel),t.hasOnScreenArrowLoaded=!0}))}setScreenArrowPosition(t){this.position=t}reset(t){void 0!==this.onScreenModel&&(this.onScreenModel.visible=!1,t&&(this.camera.remove(this.onScreenModel),this.onScreenModel=void 0))}release(){void 0!==this.onScreenModel&&(this.onScreenModel.visible=!1,this.camera.remove(this.onScreenModel),this.onScreenModel=void 0)}hide(){void 0!==this.onScreenModel&&(this.onScreenModel.visible=!1)}update(t){void 0!==this.onScreenModel?(this.onScreenModel.visible=!0,this.onScreenModel.position.set(this.position.x,this.position.y,this.position.z),this.onScreenModel.quaternion.x=t.x,this.onScreenModel.quaternion.y=t.y,this.onScreenModel.quaternion.z=t.z,this.onScreenModel.quaternion.w=t.w,this.onScreenModel.rotateZ(Math.PI)):console.log("this.onScreenModel === undefined")}}class nt{constructor(t,e,i,o,s,n){this.THREE=t,this.scene=e,this.camera=i,this.onResLoaded=o,this.arrowRenderMode=2,this.arrowInfo=s.arrow,this.finalInfo=s.final,this.onScreenArrowCtrl=new st(t,e,i,o,s,n),this.arrows=[],this.allFinalWayPointsModel=[],this.loadArrowModel(n),this.loadFinalModel(0,0,0),this.inited=!1,this.oneMaterial=new t.MeshStandardMaterial({color:350973}),this.twoMaterial=new t.MeshStandardMaterial({color:41120}),this.allModels=[],this.allModelsStatus=[1,1,1,1,1,1],this.frameCount=0,this.intervalCount=15,this.showArrowCount=6,this.lastWayPointPosition=void 0,this.speed=s.arrow.arrowMoveSpeed,this.time=[],this.localWayPoints=[],this.destination=[],this.positionKF=null,this.mixer=null,this.clipAction=null,this.clip=null,this.clock=new t.Clock,this.moveArrow=null,this.localNextPoint=[30,0,0],this.localNextNextPoint=[0,20,0],this.localNextNextNextPoint=[0,0,0],this.newLocalNextPoint=[0,0,0],this.newLocalNextNextPoint=[0,0,0],this.cameraPosition=[0,0,0],this.moveStart=!0,this.totalTime=0,this.totalCountTime=0,this.moveArrowRenderMode=!0,this.moveArrowShowDistance=s.arrow.showDistance,this.finalShowDistance=s.final.showDistance,this.startTime=0,this.intervalTime=0,this.lastRadians=0,this.lostUpdateTime=0,this.segmentNum=2,this.locationOption=null,this.timeOut=this.arrowInfo.downloadTimeout}setScreenArrowPosition(t){void 0!==this.onScreenArrowCtrl&&this.onScreenArrowCtrl.setScreenArrowPosition(t)}loadFinalModel(t,e,i){let o=this.THREE,s=this.finalInfo.URL.split("/"),n=s[s.length-1],r=this.finalInfo.URL.replace(n,""),a=this.finalInfo.rotation,l=this.finalInfo.scale;const h=(new o.GLTFLoader).setPath(r);let c=this;h.load(n,(function(o){let s=o.scene;s.position.set(t,e,i),s.scale.set(l[0],l[1],l[2]),s.rotateX(a[0]),s.visible=!1,c.allFinalWayPointsModel.push(s),c.scene.add(s)}))}loadArrowModel(t){let e=this.THREE,i=this.arrowInfo.arrowURL.split("/"),o=i[i.length-1],s=this.arrowInfo.arrowURL.replace(o,""),n=this.arrowInfo.arrowPosition,r=this.arrowInfo.arrowRotation,a=(new e.GLTFLoader).setPath(s),l=this;a.load(o,(function(e){l.arrow_prototype=e.scene,l.arrow_prototype.position.set(n[0],n[1],n[2]),l.arrow_prototype.visible=!1,l.arrow_prototype.rotateX(r[0]),l.onResLoaded(),t.hasNavigationArrowLoaded=!0,console.log("Moving arrow has loaded")}))}setMoveArrow(){if(void 0===this.arrow_prototype)return;let t=this.arrow_prototype.clone();t.scale.set(100,100,100),t.rotateZ(Math.PI/2),t.rotateX(-Math.PI/2),t.visible=!1,this.moveArrow=t.clone(),this.moveArrow.position.set(0,0,0),1!==this.arrowRenderMode&&this.scene.add(this.moveArrow)}setArrow(t){let e=this.arrow_prototype.clone();e.position.set(t.x,t.y,t.z),e.scale.set(this.arrowInfo.arrowScale[0],this.arrowInfo.arrowScale[1],this.arrowInfo.arrowScale[2]),e.rotateZ(this.arrowInfo.arrowRotation[2]),e.rotateX(this.arrowInfo.arrowRotation[0]),e.rotateY(this.arrowInfo.arrowRotation[1]),e.visible=!1,this.arrows.push(e),this.moveArrow=e.clone(),this.moveArrow.position.set(this.arrowInfo.arrowPosition),1!==this.arrowRenderMode&&(this.scene.add(e),this.scene.add(this.moveArrow))}setArrowRenderMode(t){this.arrowRenderMode=t,console.log("this.arrowRenderMode = ",this.arrowRenderMode),0===this.arrowRenderMode&&void 0!==this.onScreenArrowCtrl&&this.onScreenArrowCtrl.reset()}updateRoute(t,e,i){this.lastWayPointPosition=t[t.length-1].clone(),t.push(e),this.locationOption=i;let o=(new Date).getTime(),s=0;for(;void 0===this.arrow_prototype;){if(this.locationOption.onResourceLoaded({status:-1}),(new Date).getTime()-o>=this.timeOut&&(this.loadArrowModel(),o=(new Date).getTime(),s+=1),2===s)return this.locationOption.onResourceLoaded({status:-2}),void console.log("load arrow model time is out")}this.locationOption.onResourceLoaded({status:0}),void 0!==this.allFinalWayPointsModel[0]&&(this.allFinalWayPointsModel[0].position.set(e.x,e.y,e.z-0),this.scene.add(this.allFinalWayPointsModel[0]));let n=new ot(t).sampling(1);this.arrows.length=0;for(let t=0;t=t*this.intervalCount&&this.frameCount<(t+1)*this.intervalCount)for(let e=0;e1&&(r=1),Math.acos(r)}getFootOfPerpendicular(t,e,i){let o=this.THREE;const s=e[0]-i[0],n=e[1]-i[1],r=e[2]-i[2];if(Math.abs(s)<1e-8&&Math.abs(n)<1e-8&&Math.abs(r)<1e-8)return e;let a=(t.x-e[0])*(e[0]-i[0])+(t.y-e[1])*(e[1]-i[1])+(t.z-e[2])*(e[2]-i[2]);return a/=Math.pow(s,2)+Math.pow(n,2)+Math.pow(r,2),new o.Vector3(e[0]+a*s,e[1]+a*n,e[2]+a*r)}decidePointBetweenTwo(t,e,i){if(void 0===t||void 0===e||void 0===i)return!1;let o=this.getFootOfPerpendicular(t,e,i),s=new this.THREE.Vector3(e[0],e[1],e[2]),n=new this.THREE.Vector3(i[0],i[1],i[2]);this.distanceCameraToFootPoint=L(o,t),this.segmentLength=L(s,n),this.footPointToFirstPointDistance=L(s,o);let r=new this.THREE.Vector3;r.subVectors(s,o);let a=new this.THREE.Vector3;a.subVectors(n,o);let l=r.dot(a)/(r.length()*a.length());l>1&&(l=1),l<-1&&(l=-1);let h=180*Math.acos(l)/Math.PI;return!(h>=0&&h<90)}update(t,e,i,o,s,n,r,a){if(0===s.length)return console.error("Error:::remainingWayPoints length is 0!"),[void 0,void 0,void 0,void 0];n||r||(this.isAlmostArrive=3===o||4===o||5===o||6===o||7===o||8===o||9===o),0===this.startTime||(this.intervalTime=(new Date).getTime()-this.startTime),this.startTime=(new Date).getTime();let l=this.THREE;if(!this.inited)return[0,void 0,void 0,void 0];if(this.moveArrowRenderMode){if(null!==this.moveArrow&&this.moveStart&&void 0!==this.clock){this.totalCountTime=0,this.moveArrow.visible=!0,this.time=[0],this.localWayPoints=[];let e=Math.sqrt(Math.pow(t.x-s[0][0],2)+Math.pow(t.y-s[0][1],2)),i=0,o=0,n=0,r=0;if(this.localWayPoints.push([t.x,t.y,0]),e>this.moveArrowShowDistance){let e=s[0][0]-t.x,i=s[0][1]-t.y,o=Math.sqrt(e*e+i*i);this.localWayPoints.push([t.x+this.moveArrowShowDistance*e/o,t.y+this.moveArrowShowDistance*i/o,0]),this.time.push(this.moveArrowShowDistance/this.speed),this.totalTime=this.time[1]}else{for(r=1,o=e,this.localWayPoints.push(s[0]),this.time.push(e/this.speed),this.totalTime=this.time[1];os.length-1);)i=Math.sqrt(Math.pow(s[r][0]-s[r-1][0],2)+Math.pow(s[r][1]-s[r-1][1],2)),o+=i,this.localWayPoints.push(s[r]),this.time.push(this.time[r]+i/this.speed),r++;if(o>=this.moveArrowShowDistance){n=this.moveArrowShowDistance-o+i;let t=s[r-1][0]-s[r-2][0],e=s[r-1][1]-s[r-2][1],a=Math.sqrt(t*t+e*e);this.localWayPoints[r][0]=this.localWayPoints[r-1][0]+n*t/a,this.localWayPoints[r][1]=this.localWayPoints[r-1][1]+n*e/a,this.time[r]=this.time[r-1]+n/this.speed,this.totalTime=this.time[r]}else r>1&&(this.localWayPoints.push(s[r-1]),i=Math.sqrt(Math.pow(s[r-1][0]-s[r-2][0],2)+Math.pow(s[r-1][1]-s[r-2][1],2)),this.time.push(this.time[r-1]+i/this.speed),this.totalTime=this.time[r])}let a=[];for(let t=0;t=this.totalTime&&(this.clipAction.stop(),this.mixer.uncacheAction(this.clipAction,this.moveArrow),this.positionKF,this.clip=null,this.moveArrow.position.set(this.camera.position),this.moveStart=!0,this.localWayPoints[1][0]+=1e-7,this.localWayPoints[1][2]=0,t.fromArray(this.localWayPoints),this.moveArrow.lookAt(t),this.moveArrow.rotateX(this.arrowInfo.arrowRotation[0]),this.moveArrow.rotateY(this.arrowInfo.arrowRotation[1]),this.moveArrow.rotateZ(this.arrowInfo.arrowRotation[2])),this.totalCountTime>=this.time[this.time.length-2]&&this.totalCountTime3)for(let e=1;e=this.time[e]&&this.totalCountTime1&&(p.x=this.localWayPoints[this.localWayPoints.length-1][0],p.y=this.localWayPoints[this.localWayPoints.length-1][1]);let y=this.calculateNaviArrowOrientation(t,p,c);f=y[1],u=y[0];let m=new l.Euler(Math.PI/2,u,0,"XYZ"),g=new l.Matrix4,v=new l.Matrix4;v.makeRotationFromEuler(m),g=(new l.Matrix4).getInverse(e),g.multiply(v);let w=new l.Euler;if(w.setFromRotationMatrix(g),0!==this.arrowRenderMode){let t=new l.Quaternion;t.setFromRotationMatrix(g),this.onScreenArrowCtrl.update(t)}if(!this.moveArrowRenderMode&&(fthis.finalShowDistance||7!==o)){for(let t=0;t{t.isMesh&&(t.material=s)}),i.panel=o}))}loadTextFont(){let t=this.THREE,e=this;(new t.FontLoader).load("https://ar-fm.cdn.bcebos.com/home_3d_model/vpas_applet/font/PingFang_SC_Regular_Regular.json",(function(t){e.font=t}))}reset(t){void 0!==this.textMesh&&(this.scene.remove(this.textMesh),t&&(this.textMesh=void 0)),void 0!==this.panel&&(this.scene.remove(this.panel),t&&(this.panel=void 0)),void 0!==this.font&&t&&(this.font=void 0)}createText(t,e,i){let o=this.THREE;if(void 0!==this.panel&&(this.panel.visible=!0),t!==this.last_message){void 0!==this.textMesh&&(this.scene.remove(this.textMesh),this.textMesh.geometry.dispose(),this.textMesh.material.dispose(),this.textMesh=void 0);let e=new o.MeshBasicMaterial({color:this.textColor,transparent:!0,opacity:1,side:o.DoubleSide}),i=this.font.generateShapes(t+"米",.15),s=new o.ShapeBufferGeometry(i);s.computeBoundingBox(),this.textMesh=new o.Mesh(s,e),this.textMesh.rotation.x=-Math.PI/2,this.textMesh.rotation.y=0,this.textMesh.add(this.panel),this.scene.add(this.textMesh),this.last_message=t,s.center()}this.textMesh.position.set(e.x,e.y,e.z-1.7),void 0!==this.textMesh&&void 0!==this.panel&&(this.textMesh.rotation.y=-D(this.textMesh.position,i),this.panel.rotation.x=-1*Math.PI/180,this.panel.position.set(0,0,-.1))}loadTextModel(t,e,i){void 0!==this.font&&this.createText(t,e,i)}hideTextModel(){void 0!==this.textMesh&&(this.textMesh.visible=!1),void 0!==this.panel&&(this.panel.visible=!1)}setVisible(t){void 0!==this.textMesh&&(this.textMesh.visible=t)}}class at{constructor(t,e,i,o,s,n,r,a){this.THREE=t,this.scene=e,this.configInfo=r,this.isShow=a,this.turnLeftAngleThreshold=this.configInfo.turnLeft.angleThreshold,this.turnRightAngleThreshold=this.configInfo.turnRight.angleThreshold,this.showDistance=15,n?(this.location=new t.Vector3(s.x,s.y,s.z),this.postLocation=new t.Vector3(i.x,i.y,i.z),this.preLocation=new t.Vector3(o.x,o.y,o.z)):(this.location=new t.Vector3(i.x,i.y,i.z),this.postLocation=new t.Vector3(s.x,s.y,s.z),this.preLocation=new t.Vector3(o.x,o.y,o.z)),this.isAppended=n,this.isLeftArrow=!1,this.model=void 0,this.angle=0,this.angleThreshold=15,this.isAppended&&(this.angleThreshold=10),this.isNormalArrow=!1,this.isLeft()?this.angle>this.turnLeftAngleThreshold?(this.loadModelLeft(),this.isLeftArrow=!0):this.isNormalArrow=!0:this.angle>this.turnRightAngleThreshold?(this.loadModelRight(),this.isLeftArrow=!1):this.isNormalArrow=!0,this.arTextCtrl=new rt(t,e,r),this.distance=Number.MAX_VALUE}reset(t){void 0!==this.model&&(this.scene.remove(this.model),t&&(this.model=void 0)),void 0!==this.arTextCtrl&&(this.arTextCtrl.reset(),t&&(this.arTextCtrl=void 0))}loadModelLeft(){let t=this.THREE;this.showDistance=this.configInfo.turnLeft.showDistance;let e=this.configInfo.turnLeft.URL,i=e.split("/"),o=i[i.length-1],s=e.replace(o,""),n=this.configInfo.turnLeft.scale,r=this.configInfo.turnLeft.rotation;const a=(new t.GLTFLoader).setPath(s);let l=this;a.load(o,(function(e){console.log("zuo.gltf loaded");let i=e.scene;i.scale.set(n[0],n[1],n[2]),i.visible=!0,i.rotateX(r[0]),i.rotateY(r[1]),i.rotateZ(r[2]),l.m_model=i;let o=new t.Object3D;o.add(i),l.model=o,l.model.position.set(l.location.x,l.location.y,-1.5),l.scene.add(l.model),l.model.visible=!1}))}loadModelRight(){let t=this.THREE;this.showDistance=this.configInfo.turnRight.showDistance;let e=this.configInfo.turnRight.URL,i=e.split("/"),o=i[i.length-1],s=e.replace(o,""),n=this.configInfo.turnRight.scale,r=this.configInfo.turnRight.rotation;const a=(new t.GLTFLoader).setPath(s);let l=this;a.load(o,(function(e){console.log("you.gltf loaded");let i=e.scene;i.scale.set(n[0],n[1],n[2]),i.visible=!0,i.rotateZ(r[2]),i.rotateX(r[0]),i.rotateY(r[1]),l.m_model=i;let o=new t.Object3D;o.add(i),l.model=o,l.model.position.set(l.location.x,l.location.y,-1.5),l.scene.add(l.model),l.model.visible=!1}))}isLeft(){let t=this.THREE,e=new t.Vector3,i=new t.Vector3;this.isAppended?(e.subVectors(this.location,this.preLocation),i.subVectors(this.postLocation,this.preLocation)):(e.subVectors(this.location,this.preLocation),i.subVectors(this.postLocation,this.location)),e.normalize(),i.normalize();let o=new t.Vector3;o.crossVectors(e,i);let s=e.dot(i)/(e.length()*i.length());s>1?s=1:s<-1&&(s=-1),this.angle=180*Math.acos(s)/Math.PI;let n=!1;return n=this.isAppended?o.z>0:o.z<0,n}setVisible(t){void 0!==this.model&&(t&&this.distancethis.showDistance)this.model.visible=!1,this.arTextCtrl.hideTextModel();else{this.model.visible=!0;let e=Math.round(this.distance);this.arTextCtrl.loadTextModel(e,this.location,t)}return this.model.position.set(this.location.x,this.location.y,-1.5),this.model.rotation.z=D(this.model.position,t),e=null,[this.distance,this.isLeftArrow,this.location]}}class lt{constructor(t,e,i,o,s){this.THREE=t,this.scene=e,this.isUp=o,this.configInfo=s,this.showDistance=15,this.location=new t.Vector3(i.x,i.y,i.z),this.model=null,this.isUp?this.loadModelUp():this.loadModelDown(),console.log("Load EscalatorCtrl"),this.arTextCtrl=new rt(t,e,s),this.distance=Number.MAX_VALUE}reset(t){null!==this.model&&(this.scene.remove(this.model),t&&(this.model=null)),void 0!==this.arTextCtrl&&(this.arTextCtrl.reset(),t&&(this.arTextCtrl=void 0))}setVisible(t){null!==this.model&&(t&&this.distancethis.showDistance)this.model.visible=!1,this.arTextCtrl.hideTextModel();else{this.model.visible=!0;let e=Math.round(this.distance);this.arTextCtrl.loadTextModel(e,this.location,t)}return this.model.position.set(this.location.x,this.location.y,-1.5),this.model.rotation.z=D(this.model.position,t),e=null,[this.distance,this.isUp,this.location]}}class ht{constructor(t,e,i,o,s){this.THREE=t,this.scene=e,this.isUp=o,this.configInfo=s,this.showDistance=15,this.location=new t.Vector3(i.x,i.y,i.z),this.model=null,this.isUp?this.loadModelUp():this.loadModelDown(),console.log("Load ElevatorCtrl"),this.arTextCtrl=new rt(t,e,s),this.distance=Number.MAX_VALUE}reset(t){null!==this.model&&(this.scene.remove(this.model),t&&(this.model=null)),void 0!==this.arTextCtrl&&(this.arTextCtrl.reset(),t&&(this.arTextCtrl=void 0))}setVisible(t){null!==this.model&&(t&&this.distancethis.showDistance)this.model.visible=!1,this.arTextCtrl.hideTextModel();else{this.model.visible=!0;let e=Math.round(this.distance);this.arTextCtrl.loadTextModel(e,this.location,t)}return this.model.position.set(this.location.x,this.location.y,-1.5),this.model.rotation.z=D(this.model.position,t),e=null,[this.distance,this.isUp,this.location]}}let ct=1,dt=1;class ft{constructor(t,e,i,o,s){this.THREE=t,this.scene=e,this.camera=i,this.name=null,this.res_type=0,this.res_url=null,this.position=[0,0,0],this.orientation=[0,0,0],this.scale=1,this.event_type=0,this.event_url=null,this.showing=1,this.rotate_type=1,this.poiModel=null,this.box=null,this.eventCallBack=o,this.configInfo=s,this.rayCaster=new t.Raycaster,this.touchPoint=[0,0]}updateData(t,e,i,o,s,n,r,a,l,h){this.THREE;this.name=t,this.res_type="img"===e?0:1,this.res_url=i,console.log("this.res_type = ",this.res_type),this.position=JSON.parse(o),this.orientation=""===s?[0,0,0]:JSON.parse(s),this.event_type=r,this.event_url=a,this.showing=l,this.rotate_type=h,this.scale=n;let c=this,d=this.res_url.split("://");"http"===d[0]&&(this.res_url=d[0]+"s://"+d[1]),0===this.res_type?wx.getImageInfo({src:this.res_url,success(t){ct=t.width,dt=t.height,c.createPoiContent(c.poiModel)}}):c.createPoiContent(c.poiModel)}createPoiContent(t){let e=this.THREE;switch(this.res_type){case 0:let t=(new e.TextureLoader).load(this.res_url),i=(new e.TextureLoader).load(this.res_url);i.center=new e.Vector2(.5,.5),i.rotation=Math.PI,i.flipY=!1;let o=[new e.MeshBasicMaterial({map:t,side:e.FrontSide}),new e.MeshBasicMaterial({map:i,side:e.BackSide})],s=new e.PlaneGeometry(1,dt/ct);for(let t=0,e=s.faces.length;t0){if(this.intersected=e[0].object,this.intersected.name==="poi"+this.name){let t={};t.poiName=this.name,t.eventType=this.event_type,t.eventUrl=this.event_url,this.eventCallBack.onPoiEvent(t)}}else this.intersected=null}update(){if(null===this.poiModel)return;if(!this.showing&&null!==this.poiModel)return this.poiModel.visible=!1,void(null!==this.box&&(this.box.visible=!1));if(L(this.poiModel.position,this.camera.position)>this.configInfo.mapPoi.showDistance)return this.poiModel.visible=!1,void(null!==this.box&&(this.box.visible=!1));switch(this.poiModel.visible=!0,null!==this.box&&(this.box.visible=!0),this.rotate_type){case 1:this.poiModel.rotateY(.1);break;case 2:this.poiModel.rotation.y=-D(this.poiModel.position,this.camera.position),null!==this.box&&(this.box.rotation.y=-D(this.box.position,this.camera.position))}}}class ut{constructor(t,e,i,o,s){this.THREE=t,this.scene=e,this.isParkToMall=o,this.configInfo=s,this.showDistance=15,this.location=new t.Vector3(i.x,i.y,i.z),this.model=null,this.isParkToMall?this.loadPark():this.loadMall(),this.arTextCtrl=new rt(t,e,s),this.distance=Number.MAX_VALUE}reset(t){null!==this.model&&(this.scene.remove(this.model),t&&(this.model=null)),void 0!==this.arTextCtrl&&(this.arTextCtrl.reset(),t&&(this.arTextCtrl=void 0))}setVisible(t){null!==this.model&&(t&&this.distancethis.showDistance)this.model.visible=!1,this.arTextCtrl.hideTextModel();else{this.model.visible=!0;let e=Math.round(this.distance);this.arTextCtrl.loadTextModel(e,this.location,t)}return this.model.position.set(this.location.x,this.location.y,-1.5),this.model.rotation.z=D(this.model.position,t),[this.distance,this.isParkToMall,this.location]}}class pt{constructor(t,e,i,o,s){this.THREE=t,this.scene=e,this.isStepLadderUp=o,this.configInfo=s,this.showDistance=15,this.location=new t.Vector3(i.x,i.y,i.z),this.model=null,this.isStepLadderUp?this.loadStepLadderUp():this.loadStepLadderDown(),this.arTextCtrl=new rt(t,e,s),this.distance=Number.MAX_VALUE}reset(t){null!==this.model&&(this.scene.remove(this.model),t&&(this.model=null)),void 0!==this.arTextCtrl&&(this.arTextCtrl.reset(),t&&(this.arTextCtrl=void 0))}setVisible(t){null!==this.model&&(t&&this.distancethis.showDistance)this.model.visible=!1,this.arTextCtrl.hideTextModel();else{this.model.visible=!0;let e=Math.round(this.distance);this.arTextCtrl.loadTextModel(e,this.location,t)}return this.model.position.set(this.location.x,this.location.y,-1.5),this.model.rotation.z=D(this.model.position,t),[this.distance,this.isStepLadderUp,this.location]}}class yt{constructor(t,e,i){this.THREE=t,this.scene=e,this.location=new t.Vector3(i.x,i.y,i.z),this.distance=Number.MAX_VALUE}reset(){}setVisible(){}update(t){let e=new this.THREE.Vector3;return e.subVectors(this.location,t),e.z=0,this.distance=e.length(),[this.distance,0,this.location]}}let mt,gt,vt,wt;class bt{constructor(t,e,i,o,s){this.THREE=t,this.canvas=e,this.onResLoaded=i,this.configInfo=o,this.minCoverPointDistance=this.configInfo.interaction.minCoverPointDistance,this.renderer=null,this.camera=null,this.scene=null,this.initScene(this.THREE,this.canvas),this.arrowCtrl=new nt(t,this.scene,this.camera,i,this.configInfo,s),this.textCtrl=new rt(t,this.scene,this.configInfo,this.camera,i),this.wayPointCtrls=[],this.wayPointCtrlsClone=[],this.wayPointCtrlsStatus=[],this.driftAwayDistanceThreshold=5,this.driftAwayAngleThreshold=60,this.driftAwayAngle=0,this.nextLocation=void 0,this.nextNextLocation=void 0,this.final=void 0,this.finalClone=void 0,this.type=-1,this.way_point_index=0,this.min_distance=Number.MAX_VALUE,this.next_point_distance=Number.MAX_VALUE,this.allMapPois=[],this.touchPoint=[0,0],this.rayCaster=new t.Raycaster,this.naviData=void 0,this.haveFoundNextPoint=!1,this.cameraToLstFootPointDistance=Number.MAX_VALUE,this.distanceCameraToFootPoint=0,this.segmentLength=0,this.footPointToFirstPointDistance=0,this.nextPointIsFinal=!1,this.threshold_to_next_point=5,this.wayPointIndex=[],this.wayPointindexClone=[],this.nextIsFinal=!1,this.nextIsTransfer=!1,this.lastNextPoint=[0,0,0],this.lostUpdateTime=0,this.testLastNextPoint=void 0,this.newLocalWayPoints=[],this.localWayPoints=[],this.isInited=!1}screenCoordinate(t){if(this.touchPoint[0]=t.x/(this.canvas.width/2)*2-1,this.touchPoint[1]=-t.y/(this.canvas.height/2)*2+1,this.THREE){let t=new this.THREE.Vector3(this.touchPoint[0],this.touchPoint[1],.5).unproject(this.camera);this.rayCaster.set(this.camera.position,t.sub(this.camera.position).normalize());for(let t=0;t{console.log(t.data),e(t.data)},fail:t=>{console.log("error message = ",t.data)}})}generateOtherRoute(t,e,i,o,s,n){this.THREE;for(let r=s;r3))break;this.generateOtherRoute(t,e,i,o,s,n)}}}updateOnScreenArrowPosition(t){this.arrowCtrl.setScreenArrowPosition(t)}drawRoute(t,e,i,o,s){let n=this.THREE;this.naviData=t,this.arrowCtrl.setArrowRenderMode(o.ArrowRenderMode.mode);let r=o.ThreeDofArrowPosition.position;this.arrowCtrl.setScreenArrowPosition(new n.Vector3(r[0],r[1],r[2])),this.final=new n.Vector3(0,0,0),1===o.InputCoordinateMode.mode?(this.final=e,this.finalClone=new n.Vector3(this.final.x,this.final.y,this.final.z)):(i.transform_map_coodinate_to_translation(e.x,e.y),this.final.x=i.get_transform_vpas_translation(0),this.final.y=i.get_transform_vpas_translation(1),this.finalClone=new n.Vector3(this.final.x,this.final.y,this.final.z));let a=[],l=[];for(let e=0;e0){let s,a=null,h=null,c=t[e-1];if(s=e===t.length-1?this.final:t[e+1],1===o.InputCoordinateMode.mode)a=new n.Vector3(c.x,c.y,0),h=new n.Vector3(s.x,s.y,0);else{i.transform_map_coodinate_to_translation(c.x,c.y);for(let t=0;t<2;t++)l[t]=i.get_transform_vpas_translation(t);if(a=new n.Vector3(l[0],l[1],0),e===t.length-1)h=new n.Vector3(s.x,s.y,0);else{i.transform_map_coodinate_to_translation(s.x,s.y);for(let t=0;t<2;t++)l[t]=i.get_transform_vpas_translation(t);h=new n.Vector3(l[0],l[1],0)}}let d=new at(this.THREE,this.scene,r,a,h,!1,this.configInfo),f=new at(this.THREE,this.scene,r,a,h,!1,this.configInfo);if(d.isNormalArrow){let t=new yt(this.THREE,this.scene,r),e=new yt(this.THREE,this.scene,r);this.wayPointCtrls.push(t),this.wayPointCtrlsClone.push(e)}else this.wayPointCtrls.push(d),this.wayPointCtrlsClone.push(f),this.wayPointIndex.push(this.wayPointCtrls.length-1),this.wayPointindexClone.push(e)}let a,h,c=!0,d=!0;switch(s.pointType){case 4:c=!0,a=new lt(this.THREE,this.scene,r,c,this.configInfo),h=new lt(this.THREE,this.scene,r,c,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1);break;case 5:c=!1,a=new lt(this.THREE,this.scene,r,c,this.configInfo),h=new lt(this.THREE,this.scene,r,c,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1);break;case 2:c=!0,a=new ht(this.THREE,this.scene,r,c,this.configInfo),h=new ht(this.THREE,this.scene,r,c,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1);break;case 3:c=!1,a=new ht(this.THREE,this.scene,r,c,this.configInfo),h=new ht(this.THREE,this.scene,r,c,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1);break;case 7:d=!1,a=new ut(this.THREE,this.scene,r,d,this.configInfo),h=new ut(this.THREE,this.scene,r,d,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1);break;case 8:d=!0,a=new ut(this.THREE,this.scene,r,d,this.configInfo),h=new ut(this.THREE,this.scene,r,d,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1);break;case 9:c=!0,a=new pt(this.THREE,this.scene,r,c,this.configInfo),h=new pt(this.THREE,this.scene,r,c,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1);break;case 10:c=!1,a=new pt(this.THREE,this.scene,r,c,this.configInfo),h=new pt(this.THREE,this.scene,r,c,this.configInfo),this.wayPointCtrls.push(a),this.wayPointCtrlsClone.push(h),this.wayPointIndex.push(this.wayPointCtrls.length-1)}}for(let t=0;tthis.driftAwayAngleThreshold&&n>this.driftAwayDistanceThreshold){let t=new o.Vector3;if(t.crossVectors(r,a),t.z<0){return 0}return 1}return 2}getFootOfPerpendicular(t,e,i){let o=this.THREE;const s=e.x-i.x,n=e.y-i.y,r=e.z-i.z;if(Math.abs(s)<1e-8&&Math.abs(n)<1e-8&&Math.abs(r)<1e-8)return e;let a=(t.x-e.x)*(e.x-i.x)+(t.y-e.y)*(e.y-i.y)+(t.z-e.z)*(e.z-i.z);return a/=Math.pow(s,2)+Math.pow(n,2)+Math.pow(r,2),new o.Vector3(e.x+a*s,e.y+a*n,e.z+a*r)}decidePointBetweenTwo(t,e,i){if(void 0===t||void 0===e||void 0===i)return[!1,[0,0,0]];let o=this.getFootOfPerpendicular(t,e,i);this.distanceCameraToFootPoint=L(o,t),this.segmentLength=L(e,i),this.footPointToFirstPointDistance=L(e,o);let s=new this.THREE.Vector3;s.subVectors(e,o);let n=new this.THREE.Vector3;n.subVectors(i,o);let r=s.dot(n)/(s.length()*n.length());r>1&&(r=1),r<-1&&(r=-1);let a=180*Math.acos(r)/Math.PI;return a>=0&&a<90?[!1,o]:[!0,o]}updateNewLocalWayPoints(t,e,i){let o,s=this.THREE,n=[0,0,0];if(o=0===this.way_point_index?this.decidePointBetweenTwo(this.camera.position,new s.Vector3(t[0][0],t[0][1],t[0][2]),new s.Vector3(t[1][0],t[1][1],t[1][2])):this.decidePointBetweenTwo(this.camera.position,this.wayPointCtrls[this.way_point_index-1].location,this.wayPointCtrls[this.way_point_index].location),n=o[1],!i){for(let i=0;i0&&this.wayPointIndex.length>1){for(let t=0;tthis.min_distance&&(this.min_distance=p,this.next_point_distance=p),this.min_distance===Number.MAX_VALUE||this.next_point_distance===Number.MAX_VALUE)return this.type=-1,[u,c,this.next_point_distance,this.type,2,this.newLocalWayPoints]}let y=[0,0,0],m=[0,0,0],g=0;if(this.localWayPoints=[],this.wayPointCtrls.length>0){for(let t=this.way_point_index;t1){y=this.updateNewLocalWayPoints(this.localWayPoints,this.newLocalWayPoints,this.isInited),this.isInited=!0;let t=this.localWayPoints[0][0]-y.x,e=this.localWayPoints[0][1]-y.y,i=Math.sqrt(t*t+e*e),o=Math.sqrt(Math.pow(y.x-this.localWayPoints[0][0],2)+Math.pow(y.y-this.localWayPoints[0][1],2));if(m[0]=this.camera.position.x+o*t/i,m[1]=this.camera.position.y+o*e/i,g=Math.sqrt(Math.pow(this.camera.position.x-m[0],2)+Math.pow(this.camera.position.y-m[1],2)),this.min_distance=g,this.min_distancethis.wayPointIndex[this.wayPointIndex.length-1]||this.nextIsFinal)&&(Math.abs(this.final.x-this.wayPointCtrls[this.wayPointCtrls.length-1].location.x)<1e-7&&Math.abs(this.final.y-this.wayPointCtrls[this.wayPointCtrls.length-1].location.y)<1e-7?(this.arrowCtrl.hideFinalModel(),this.arrowCtrl.hideMoveArrowModel()):(this.next_point_distance=u,this.type=7,this.way_point_index===this.wayPointCtrls.length-1&&(this.min_distance=u,this.nextLocation=this.finalClone),void 0!==this.wayPointCtrls[this.way_point_index]&&this.wayPointCtrls[this.way_point_index].setVisible(!1),void 0!==this.wayPointCtrlsClone[this.way_point_index]&&this.wayPointCtrlsClone[this.way_point_index].setVisible(!1)));let v=this.arrowCtrl.update(this.camera.position,a,u,this.type,this.localWayPoints,this.nextIsFinal,this.nextIsTransfer,this.final);v[0];if(void 0!==v[1]){let t=(new s.Matrix4).getInverse(v[1]);h.multiply(t),c.setFromRotationMatrix(h,"XYZ")}let w=0,b=v[2];w=Math.abs(b)>20&&b<0?1:Math.abs(b)>20&&b>0?0:2;for(let t=0;t{this.updateRenderer()}),this.renderer.renderWebGL()}requestVPASLocation(t){this.locationOption=t,function(t){wx.getNetworkType({success(e){t.onNetWork({type:e.networkType,msg:"获取网络类型"})},fail(e){t.onError({type:10008,msg:"监听网络信号失败"})}}),wx.onNetworkStatusChange((function(e){e.isConnected?t.onNetWork({type:e.networkType,msg:"监听到网络状态发生变化"}):t.onError({type:10008,msg:"监听网络信号失败"})}))}(t),this.platform.setLoactionData(t,this._configData),this.resetARNavigationAgain(),this.requestGetPOi(t)}updateBluetoothLocation(t,e){this.platform.updateBluetoothLocation(t,e)}setUserId(t){this.platform.setUserId(t)}get2DPosition(){}getScreenCoordinate(t){this.renderer.screenCoordinate(t)}requestGetPOi(t){this._configData.map.forEach(e=>{if(e.floor_id===t.floor_id&&void 0!==e.case_id&&""!==e.case_id){this.severInterface.getMapPoi(Number(e.case_id)).getPoi.then(e=>{this.renderer.setPoiList(e.data.data.pois,t)})}})}setNavigationData(t,e,i,o){this.renderer.drawRoute(t,e,i,this._configData,o)}startARNavigation(){_t=!0,this.platform.startARTrue(_t)}resetARNavigationAgain(){xt=!1,this.platform.resetARTrue(xt)}resetRender(){this.renderer.reset(),void 0!==this.intervalId&&clearInterval(this.intervalId)}releaseRender(){this.renderer&&this.renderer.dispose()}finishARNavigation(t){_t=!1,xt=!0,void 0!==this.platform&&(this.platform.stopARTrue(xt),this.platform.release(t)),void 0!==this.severInterface&&this.severInterface.destroylocatesession(),void 0!==this.renderer&&this.renderer.reset(t)}}function Tt(){}function At(t){wx.createSelectorQuery().select(t).fields({node:!0}).exec(t=>{const e=t[0].node;vt=e,wt.setCanvasData(vt)})}function Mt(){let t=this;return new Proxy({firstTrackFrameSuccess:!1,hasNavigationArrowLoaded:!1,hasOnScreenArrowLoaded:!1},{set:function(e,i,o,s){return(!0===e.firstTrackFrameSuccess&&!0===e.hasOnScreenArrowLoaded&&"hasNavigationArrowLoaded"===i&&!0===o||!0===e.hasNavigationArrowLoaded&&!0===e.hasOnScreenArrowLoaded&&"firstTrackFrameSuccess"===i&&!0===o||!0===e.hasNavigationArrowLoaded&&!0===e.hasOnScreenArrowLoaded&&"hasOnScreenArrowLoaded"===i&&!0===o)&&t.locationOption.onFirstSuccess(t.firstTrackFrameSuccessResponseData),Reflect.set(e,i,o,s)}})}}]);void 0===VPASSDK&&console.error("esm-webpack-plugin: nothing exported!");const _VPASSDK$SDKWrapper=VPASSDK.SDKWrapper;export{_VPASSDK$SDKWrapper as SDKWrapper};