index.js 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150
  1. /*
  2. Copyright The Closure Library Authors.
  3. SPDX-License-Identifier: Apache-2.0
  4. */
  5. var n;
  6. function aa(a) {
  7. var b = 0;
  8. return function() {
  9. return b < a.length ? {
  10. done: !1,
  11. value: a[b++]
  12. } : {
  13. done: !0
  14. }
  15. }
  16. }
  17. var ba = "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, b, c) {
  18. a != Array.prototype && a != Object.prototype && (a[b] = c.value)
  19. };
  20. function ca(a) {
  21. a = ["object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global, a];
  22. for (var b = 0; b < a.length; ++b) {
  23. var c = a[b];
  24. if (c && c.Math == Math) return c
  25. }
  26. throw Error("Cannot find global object");
  27. }
  28. var r = ca(this);
  29. function t() {
  30. t = function() {};
  31. r.Symbol || (r.Symbol = da)
  32. }
  33. function ea(a, b) {
  34. this.a = a;
  35. ba(this, "description", {
  36. configurable: !0,
  37. writable: !0,
  38. value: b
  39. })
  40. }
  41. ea.prototype.toString = function() {
  42. return this.a
  43. };
  44. var da = function() {
  45. function a(c) {
  46. if (this instanceof a) throw new TypeError("Symbol is not a constructor");
  47. return new ea("jscomp_symbol_" + (c || "") + "_" + b++, c)
  48. }
  49. var b = 0;
  50. return a
  51. }();
  52. function u() {
  53. t();
  54. var a = r.Symbol.iterator;
  55. a || (a = r.Symbol.iterator = r.Symbol("Symbol.iterator"));
  56. "function" != typeof Array.prototype[a] && ba(Array.prototype, a, {
  57. configurable: !0,
  58. writable: !0,
  59. value: function() {
  60. return fa(aa(this))
  61. }
  62. });
  63. u = function() {}
  64. }
  65. function fa(a) {
  66. u();
  67. a = {
  68. next: a
  69. };
  70. a[r.Symbol.iterator] = function() {
  71. return this
  72. };
  73. return a
  74. }
  75. function ha(a) {
  76. var b = "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator];
  77. return b ? b.call(a) : {
  78. next: aa(a)
  79. }
  80. }
  81. var ia = "function" == typeof Object.create ? Object.create : function(a) {
  82. function b() {}
  83. b.prototype = a;
  84. return new b
  85. },
  86. ja;
  87. if ("function" == typeof Object.setPrototypeOf) ja = Object.setPrototypeOf;
  88. else {
  89. var ka;
  90. a: {
  91. var la = {
  92. V: !0
  93. },
  94. ma = {};
  95. try {
  96. ma.__proto__ = la;
  97. ka = ma.V;
  98. break a
  99. } catch (a) {}
  100. ka = !1
  101. }
  102. ja = ka ? function(a, b) {
  103. a.__proto__ = b;
  104. if (a.__proto__ !== b) throw new TypeError(a + " is not extensible");
  105. return a
  106. } : null
  107. }
  108. var na = ja;
  109. function oa(a, b) {
  110. a.prototype = ia(b.prototype);
  111. a.prototype.constructor = a;
  112. if (na) na(a, b);
  113. else
  114. for (var c in b)
  115. if ("prototype" != c)
  116. if (Object.defineProperties) {
  117. var d = Object.getOwnPropertyDescriptor(b, c);
  118. d && Object.defineProperty(a, c, d)
  119. } else a[c] = b[c];
  120. a.O = b.prototype
  121. }
  122. function pa(a, b) {
  123. u();
  124. a instanceof String && (a += "");
  125. var c = 0,
  126. d = {
  127. next: function() {
  128. if (c < a.length) {
  129. var f = c++;
  130. return {
  131. value: b(f, a[f]),
  132. done: !1
  133. }
  134. }
  135. d.next = function() {
  136. return {
  137. done: !0,
  138. value: void 0
  139. }
  140. };
  141. return d.next()
  142. }
  143. };
  144. d[Symbol.iterator] = function() {
  145. return d
  146. };
  147. return d
  148. }
  149. function v(a, b) {
  150. if (b) {
  151. var c = r;
  152. a = a.split(".");
  153. for (var d = 0; d < a.length - 1; d++) {
  154. var f = a[d];
  155. f in c || (c[f] = {});
  156. c = c[f]
  157. }
  158. a = a[a.length - 1];
  159. d = c[a];
  160. b = b(d);
  161. b != d && null != b && ba(c, a, {
  162. configurable: !0,
  163. writable: !0,
  164. value: b
  165. })
  166. }
  167. }
  168. v("Array.prototype.keys", function(a) {
  169. return a ? a : function() {
  170. return pa(this, function(b) {
  171. return b
  172. })
  173. }
  174. });
  175. v("Array.prototype.find", function(a) {
  176. return a ? a : function(b, c) {
  177. a: {
  178. var d = this;d instanceof String && (d = String(d));
  179. for (var f = d.length, g = 0; g < f; g++) {
  180. var e = d[g];
  181. if (b.call(c, e, g, d)) {
  182. b = e;
  183. break a
  184. }
  185. }
  186. b = void 0
  187. }
  188. return b
  189. }
  190. });
  191. v("Object.is", function(a) {
  192. return a ? a : function(b, c) {
  193. return b === c ? 0 !== b || 1 / b === 1 / c : b !== b && c !== c
  194. }
  195. });
  196. v("Array.prototype.includes", function(a) {
  197. return a ? a : function(b, c) {
  198. var d = this;
  199. d instanceof String && (d = String(d));
  200. var f = d.length;
  201. c = c || 0;
  202. for (0 > c && (c = Math.max(c + f, 0)); c < f; c++) {
  203. var g = d[c];
  204. if (g === b || Object.is(g, b)) return !0
  205. }
  206. return !1
  207. }
  208. });
  209. v("Promise", function(a) {
  210. function b(e) {
  211. this.b = 0;
  212. this.c = void 0;
  213. this.a = [];
  214. var h = this.f();
  215. try {
  216. e(h.resolve, h.reject)
  217. } catch (k) {
  218. h.reject(k)
  219. }
  220. }
  221. function c() {
  222. this.a = null
  223. }
  224. function d(e) {
  225. return e instanceof b ? e : new b(function(h) {
  226. h(e)
  227. })
  228. }
  229. if (a) return a;
  230. c.prototype.b = function(e) {
  231. if (null == this.a) {
  232. this.a = [];
  233. var h = this;
  234. this.c(function() {
  235. h.g()
  236. })
  237. }
  238. this.a.push(e)
  239. };
  240. var f = r.setTimeout;
  241. c.prototype.c = function(e) {
  242. f(e, 0)
  243. };
  244. c.prototype.g = function() {
  245. for (; this.a && this.a.length;) {
  246. var e = this.a;
  247. this.a = [];
  248. for (var h = 0; h < e.length; ++h) {
  249. var k =
  250. e[h];
  251. e[h] = null;
  252. try {
  253. k()
  254. } catch (l) {
  255. this.f(l)
  256. }
  257. }
  258. }
  259. this.a = null
  260. };
  261. c.prototype.f = function(e) {
  262. this.c(function() {
  263. throw e;
  264. })
  265. };
  266. b.prototype.f = function() {
  267. function e(l) {
  268. return function(m) {
  269. k || (k = !0, l.call(h, m))
  270. }
  271. }
  272. var h = this,
  273. k = !1;
  274. return {
  275. resolve: e(this.s),
  276. reject: e(this.g)
  277. }
  278. };
  279. b.prototype.s = function(e) {
  280. if (e === this) this.g(new TypeError("A Promise cannot resolve to itself"));
  281. else if (e instanceof b) this.v(e);
  282. else {
  283. a: switch (typeof e) {
  284. case "object":
  285. var h = null != e;
  286. break a;
  287. case "function":
  288. h = !0;
  289. break a;
  290. default:
  291. h = !1
  292. }
  293. h ? this.m(e) : this.h(e)
  294. }
  295. };
  296. b.prototype.m = function(e) {
  297. var h = void 0;
  298. try {
  299. h = e.then
  300. } catch (k) {
  301. this.g(k);
  302. return
  303. }
  304. "function" == typeof h ? this.w(h, e) : this.h(e)
  305. };
  306. b.prototype.g = function(e) {
  307. this.i(2, e)
  308. };
  309. b.prototype.h = function(e) {
  310. this.i(1, e)
  311. };
  312. b.prototype.i = function(e, h) {
  313. if (0 != this.b) throw Error("Cannot settle(" + e + ", " + h +
  314. "): Promise already settled in state" + this.b);
  315. this.b = e;
  316. this.c = h;
  317. this.l()
  318. };
  319. b.prototype.l = function() {
  320. if (null != this.a) {
  321. for (var e = 0; e < this.a.length; ++e) g.b(this.a[e]);
  322. this.a = null
  323. }
  324. };
  325. var g = new c;
  326. b.prototype.v = function(e) {
  327. var h = this.f();
  328. e.F(h.resolve, h.reject)
  329. };
  330. b.prototype.w = function(e, h) {
  331. var k = this.f();
  332. try {
  333. e.call(h, k.resolve, k.reject)
  334. } catch (l) {
  335. k.reject(l)
  336. }
  337. };
  338. b.prototype.then = function(e, h) {
  339. function k(q, w) {
  340. return "function" == typeof q ? function(z) {
  341. try {
  342. l(q(z))
  343. } catch (M) {
  344. m(M)
  345. }
  346. } : w
  347. }
  348. var l, m, p = new b(function(q, w) {
  349. l = q;
  350. m = w
  351. });
  352. this.F(k(e, l), k(h, m));
  353. return p
  354. };
  355. b.prototype.catch = function(e) {
  356. return this.then(void 0, e)
  357. };
  358. b.prototype.F = function(e, h) {
  359. function k() {
  360. switch (l.b) {
  361. case 1:
  362. e(l.c);
  363. break;
  364. case 2:
  365. h(l.c);
  366. break;
  367. default:
  368. throw Error("Unexpected state: " +
  369. l.b);
  370. }
  371. }
  372. var l = this;
  373. null == this.a ? g.b(k) : this.a.push(k)
  374. };
  375. b.resolve = d;
  376. b.reject = function(e) {
  377. return new b(function(h, k) {
  378. k(e)
  379. })
  380. };
  381. b.race = function(e) {
  382. return new b(function(h, k) {
  383. for (var l = ha(e), m = l.next(); !m.done; m = l.next()) d(m.value).F(h, k)
  384. })
  385. };
  386. b.all = function(e) {
  387. var h = ha(e),
  388. k = h.next();
  389. return k.done ? d([]) : new b(function(l, m) {
  390. function p(z) {
  391. return function(M) {
  392. q[z] = M;
  393. w--;
  394. 0 == w && l(q)
  395. }
  396. }
  397. var q = [],
  398. w = 0;
  399. do q.push(void 0), w++, d(k.value).F(p(q.length - 1), m), k = h.next(); while (!k.done)
  400. })
  401. };
  402. return b
  403. });
  404. var qa = qa || {},
  405. x = this || self;
  406. function y(a, b) {
  407. a = a.split(".");
  408. b = b || x;
  409. for (var c = 0; c < a.length; c++)
  410. if (b = b[a[c]], null == b) return null;
  411. return b
  412. }
  413. function ra() {}
  414. function sa(a) {
  415. var b = typeof a;
  416. return "object" == b && null != a || "function" == b
  417. }
  418. var ta = "closure_uid_" + (1E9 * Math.random() >>> 0),
  419. ua = 0;
  420. function va(a, b, c) {
  421. return a.call.apply(a.bind, arguments)
  422. }
  423. function wa(a, b, c) {
  424. if (!a) throw Error();
  425. if (2 < arguments.length) {
  426. var d = Array.prototype.slice.call(arguments, 2);
  427. return function() {
  428. var f = Array.prototype.slice.call(arguments);
  429. Array.prototype.unshift.apply(f, d);
  430. return a.apply(b, f)
  431. }
  432. }
  433. return function() {
  434. return a.apply(b, arguments)
  435. }
  436. }
  437. function A(a, b, c) {
  438. Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? A = va : A = wa;
  439. return A.apply(null, arguments)
  440. }
  441. function B(a, b) {
  442. function c() {}
  443. c.prototype = b.prototype;
  444. a.O = b.prototype;
  445. a.prototype = new c;
  446. a.prototype.constructor = a
  447. };
  448. function xa(a) {
  449. this.a = a || {}
  450. }
  451. xa.prototype.get = function(a) {
  452. return this.a[a]
  453. };
  454. xa.prototype.G = function() {
  455. return Object.keys(this.a)
  456. };
  457. function C(a, b, c, d) {
  458. this.f = a;
  459. this.c = b;
  460. this.b = c;
  461. this.a = d
  462. }
  463. C.prototype.getRequestMessage = function() {
  464. return this.f
  465. };
  466. C.prototype.getMethodDescriptor = function() {
  467. return this.c
  468. };
  469. C.prototype.getMetadata = function() {
  470. return this.b
  471. };
  472. C.prototype.getCallOptions = function() {
  473. return this.a
  474. };
  475. function D(a, b, c, d) {
  476. c = void 0 === c ? {} : c;
  477. this.c = a;
  478. this.a = c;
  479. this.b = b;
  480. this.f = void 0 === d ? null : d
  481. }
  482. D.prototype.getResponseMessage = function() {
  483. return this.c
  484. };
  485. D.prototype.getMetadata = function() {
  486. return this.a
  487. };
  488. D.prototype.getMethodDescriptor = function() {
  489. return this.b
  490. };
  491. D.prototype.getStatus = function() {
  492. return this.f
  493. };
  494. function ya(a, b, c, d, f, g) {
  495. this.name = a;
  496. this.a = f;
  497. this.b = g
  498. }
  499. function za(a, b, c) {
  500. c = void 0 === c ? {} : c;
  501. var d = void 0 === d ? new xa : d;
  502. return new C(b, a, c, d)
  503. }
  504. ya.prototype.getName = function() {
  505. return this.name
  506. };
  507. ya.prototype.getName = ya.prototype.getName;
  508. function Aa(a) {
  509. switch (a) {
  510. case 200:
  511. return 0;
  512. case 400:
  513. return 3;
  514. case 401:
  515. return 16;
  516. case 403:
  517. return 7;
  518. case 404:
  519. return 5;
  520. case 409:
  521. return 10;
  522. case 412:
  523. return 9;
  524. case 429:
  525. return 8;
  526. case 499:
  527. return 1;
  528. case 500:
  529. return 2;
  530. case 501:
  531. return 12;
  532. case 503:
  533. return 14;
  534. case 504:
  535. return 4;
  536. default:
  537. return 2
  538. }
  539. };
  540. function E(a, b, c) {
  541. c = void 0 === c ? {} : c;
  542. b = Error.call(this, b);
  543. this.message = b.message;
  544. "stack" in b && (this.stack = b.stack);
  545. this.code = a;
  546. this.metadata = c
  547. }
  548. oa(E, Error);
  549. E.prototype.name = "RpcError";
  550. function Ba(a) {
  551. this.a = a
  552. }
  553. Ba.prototype.on = function(a, b) {
  554. return "data" == a || "error" == a ? this : this.a.on(a, b)
  555. };
  556. Ba.prototype.removeListener = function(a, b) {
  557. return this.a.removeListener(a, b)
  558. };
  559. Ba.prototype.cancel = function() {
  560. this.a.cancel()
  561. };
  562. function Ca(a) {
  563. switch (a) {
  564. case 0:
  565. return "No Error";
  566. case 1:
  567. return "Access denied to content document";
  568. case 2:
  569. return "File not found";
  570. case 3:
  571. return "Firefox silently errored";
  572. case 4:
  573. return "Application custom error";
  574. case 5:
  575. return "An exception occurred";
  576. case 6:
  577. return "Http response at 400 or 500 level";
  578. case 7:
  579. return "Request was aborted";
  580. case 8:
  581. return "Request timed out";
  582. case 9:
  583. return "The resource is not available offline";
  584. default:
  585. return "Unrecognized error code"
  586. }
  587. };
  588. function F(a) {
  589. if (Error.captureStackTrace) Error.captureStackTrace(this, F);
  590. else {
  591. var b = Error().stack;
  592. b && (this.stack = b)
  593. }
  594. a && (this.message = String(a))
  595. }
  596. B(F, Error);
  597. F.prototype.name = "CustomError";
  598. function Da(a, b) {
  599. a = a.split("%s");
  600. for (var c = "", d = a.length - 1, f = 0; f < d; f++) c += a[f] + (f < b.length ? b[f] : "%s");
  601. F.call(this, c + a[d])
  602. }
  603. B(Da, F);
  604. Da.prototype.name = "AssertionError";
  605. function Ea(a, b) {
  606. throw new Da("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1));
  607. };
  608. function Fa() {
  609. this.l = null;
  610. this.i = [];
  611. this.m = 0;
  612. this.b = Ga;
  613. this.f = this.a = this.h = 0;
  614. this.c = null;
  615. this.g = 0
  616. }
  617. function Ha(a, b) {
  618. function c(l) {
  619. l == Ia ? e.h = l : l == G ? e.h = l : Ja(e, h, k, "invalid frame byte");
  620. e.b = Ka;
  621. e.a = 0;
  622. e.f = 0
  623. }
  624. function d(l) {
  625. e.f++;
  626. e.a = (e.a << 8) + l;
  627. 4 == e.f && (e.b = La, e.g = 0, "undefined" !== typeof Uint8Array ? e.c = new Uint8Array(e.a) : e.c = Array(e
  628. .a), 0 == e.a && g())
  629. }
  630. function f(l) {
  631. e.c[e.g++] = l;
  632. e.g == e.a && g()
  633. }
  634. function g() {
  635. var l = {};
  636. l[e.h] = e.c;
  637. e.i.push(l);
  638. e.b = Ga
  639. }
  640. var e = a,
  641. h, k = 0;
  642. for (b instanceof Uint8Array || b instanceof Array ? h = b : h = new Uint8Array(b); k < h.length;) {
  643. switch (e.b) {
  644. case Ma:
  645. Ja(e, h, k, "stream already broken");
  646. break;
  647. case Ga:
  648. c(h[k]);
  649. break;
  650. case Ka:
  651. d(h[k]);
  652. break;
  653. case La:
  654. f(h[k]);
  655. break;
  656. default:
  657. throw Error("unexpected parser state: " + e.b);
  658. }
  659. e.m++;
  660. k++
  661. }
  662. a = e.i;
  663. e.i = [];
  664. return 0 < a.length ? a : null
  665. }
  666. var Ga = 0,
  667. Ka = 1,
  668. La = 2,
  669. Ma = 3,
  670. Ia = 0,
  671. G = 128;
  672. function Ja(a, b, c, d) {
  673. a.b = Ma;
  674. a.l = "The stream is broken @" + a.m + "/" + c + ". Error: " + d + ". With input:\n" + b;
  675. throw Error(a.l);
  676. };
  677. var Na = Array.prototype.indexOf ? function(a, b) {
  678. return Array.prototype.indexOf.call(a, b, void 0)
  679. } : function(a, b) {
  680. if ("string" === typeof a) return "string" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, 0);
  681. for (var c = 0; c < a.length; c++)
  682. if (c in a && a[c] === b) return c;
  683. return -1
  684. };
  685. var Oa = String.prototype.trim ? function(a) {
  686. return a.trim()
  687. } : function(a) {
  688. return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]
  689. };
  690. function H(a, b) {
  691. return -1 != a.indexOf(b)
  692. }
  693. function Pa(a, b) {
  694. return a < b ? -1 : a > b ? 1 : 0
  695. };
  696. var I;
  697. a: {
  698. var Qa = x.navigator;
  699. if (Qa) {
  700. var Ra = Qa.userAgent;
  701. if (Ra) {
  702. I = Ra;
  703. break a
  704. }
  705. }
  706. I = ""
  707. };
  708. function Sa(a, b) {
  709. for (var c in a) b.call(void 0, a[c], c, a)
  710. }
  711. function Ta(a, b) {
  712. var c = {},
  713. d;
  714. for (d in a) c[d] = b.call(void 0, a[d], d, a);
  715. return c
  716. }
  717. var Ua = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
  718. function Va(a, b) {
  719. for (var c, d, f = 1; f < arguments.length; f++) {
  720. d = arguments[f];
  721. for (c in d) a[c] = d[c];
  722. for (var g = 0; g < Ua.length; g++) c = Ua[g], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c])
  723. }
  724. };
  725. function Wa(a) {
  726. var b = 1;
  727. a = a.split(":");
  728. for (var c = []; 0 < b && a.length;) c.push(a.shift()), b--;
  729. a.length && c.push(a.join(":"));
  730. return c
  731. };
  732. function Xa(a) {
  733. Xa[" "](a);
  734. return a
  735. }
  736. Xa[" "] = ra;
  737. function Ya(a) {
  738. var b = Za;
  739. return Object.prototype.hasOwnProperty.call(b, 9) ? b[9] : b[9] = a(9)
  740. };
  741. var $a = H(I, "Opera"),
  742. ab = H(I, "Trident") || H(I, "MSIE"),
  743. bb = H(I, "Edge"),
  744. cb = H(I, "Gecko") && !(H(I.toLowerCase(), "webkit") && !H(I, "Edge")) && !(H(I, "Trident") || H(I, "MSIE")) && !H(
  745. I, "Edge"),
  746. db = H(I.toLowerCase(), "webkit") && !H(I, "Edge"),
  747. eb;
  748. a: {
  749. var fb = "",
  750. gb = function() {
  751. var a = I;
  752. if (cb) return /rv:([^\);]+)(\)|;)/.exec(a);
  753. if (bb) return /Edge\/([\d\.]+)/.exec(a);
  754. if (ab) return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);
  755. if (db) return /WebKit\/(\S+)/.exec(a);
  756. if ($a) return /(?:Version)[ \/]?(\S+)/.exec(a)
  757. }();gb && (fb = gb ? gb[1] : "");
  758. if (ab) {
  759. var hb, ib = x.document;
  760. hb = ib ? ib.documentMode : void 0;
  761. if (null != hb && hb > parseFloat(fb)) {
  762. eb = String(hb);
  763. break a
  764. }
  765. }
  766. eb = fb
  767. }
  768. var Za = {};
  769. function jb() {
  770. return Ya(function() {
  771. for (var a = 0, b = Oa(String(eb)).split("."), c = Oa("9").split("."), d = Math.max(b.length, c.length),
  772. f = 0; 0 == a && f < d; f++) {
  773. var g = b[f] || "",
  774. e = c[f] || "";
  775. do {
  776. g = /(\d*)(\D*)(.*)/.exec(g) || ["", "", "", ""];
  777. e = /(\d*)(\D*)(.*)/.exec(e) || ["", "", "", ""];
  778. if (0 == g[0].length && 0 == e[0].length) break;
  779. a = Pa(0 == g[1].length ? 0 : parseInt(g[1], 10), 0 == e[1].length ? 0 : parseInt(e[1], 10)) ||
  780. Pa(0 == g[2].length, 0 == e[2].length) || Pa(g[2], e[2]);
  781. g = g[3];
  782. e = e[3]
  783. } while (0 == a)
  784. }
  785. return 0 <= a
  786. })
  787. };
  788. function kb() {
  789. 0 != lb && (Object.prototype.hasOwnProperty.call(this, ta) && this[ta] || (this[ta] = ++ua));
  790. this.K = this.K
  791. }
  792. var lb = 0;
  793. kb.prototype.K = !1;
  794. var mb = Object.freeze || function(a) {
  795. return a
  796. };
  797. function J(a, b) {
  798. this.type = a;
  799. this.a = this.target = b;
  800. this.defaultPrevented = !1
  801. }
  802. J.prototype.b = function() {
  803. this.defaultPrevented = !0
  804. };
  805. var nb = function() {
  806. if (!x.addEventListener || !Object.defineProperty) return !1;
  807. var a = !1,
  808. b = Object.defineProperty({}, "passive", {
  809. get: function() {
  810. a = !0
  811. }
  812. });
  813. try {
  814. x.addEventListener("test", ra, b), x.removeEventListener("test", ra, b)
  815. } catch (c) {}
  816. return a
  817. }();
  818. function K(a, b) {
  819. J.call(this, a ? a.type : "");
  820. this.relatedTarget = this.a = this.target = null;
  821. this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0;
  822. this.key = "";
  823. this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1;
  824. this.pointerId = 0;
  825. this.pointerType = "";
  826. this.c = null;
  827. if (a) {
  828. var c = this.type = a.type,
  829. d = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : null;
  830. this.target = a.target || a.srcElement;
  831. this.a = b;
  832. if (b = a.relatedTarget) {
  833. if (cb) {
  834. a: {
  835. try {
  836. Xa(b.nodeName);
  837. var f = !0;
  838. break a
  839. } catch (g) {}
  840. f = !1
  841. }
  842. f || (b = null)
  843. }
  844. } else "mouseover" ==
  845. c ? b = a.fromElement : "mouseout" == c && (b = a.toElement);
  846. this.relatedTarget = b;
  847. d ? (this.clientX = void 0 !== d.clientX ? d.clientX : d.pageX, this.clientY = void 0 !== d.clientY ? d
  848. .clientY : d.pageY, this.screenX = d.screenX || 0, this.screenY = d.screenY || 0) : (this.clientX =
  849. void 0 !== a.clientX ? a.clientX : a.pageX, this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY,
  850. this.screenX = a.screenX || 0, this.screenY = a.screenY || 0);
  851. this.button = a.button;
  852. this.key = a.key || "";
  853. this.ctrlKey = a.ctrlKey;
  854. this.altKey = a.altKey;
  855. this.shiftKey = a.shiftKey;
  856. this.metaKey =
  857. a.metaKey;
  858. this.pointerId = a.pointerId || 0;
  859. this.pointerType = "string" === typeof a.pointerType ? a.pointerType : ob[a.pointerType] || "";
  860. this.c = a;
  861. a.defaultPrevented && K.O.b.call(this)
  862. }
  863. }
  864. B(K, J);
  865. var ob = mb({
  866. 2: "touch",
  867. 3: "pen",
  868. 4: "mouse"
  869. });
  870. K.prototype.b = function() {
  871. K.O.b.call(this);
  872. var a = this.c;
  873. a.preventDefault ? a.preventDefault() : a.returnValue = !1
  874. };
  875. var L = "closure_listenable_" + (1E6 * Math.random() | 0);
  876. var pb = 0;
  877. function qb(a, b, c, d, f) {
  878. this.listener = a;
  879. this.proxy = null;
  880. this.src = b;
  881. this.type = c;
  882. this.capture = !!d;
  883. this.H = f;
  884. this.key = ++pb;
  885. this.A = this.D = !1
  886. }
  887. function rb(a) {
  888. a.A = !0;
  889. a.listener = null;
  890. a.proxy = null;
  891. a.src = null;
  892. a.H = null
  893. };
  894. function sb(a) {
  895. this.src = a;
  896. this.a = {};
  897. this.b = 0
  898. }
  899. sb.prototype.add = function(a, b, c, d, f) {
  900. var g = a.toString();
  901. a = this.a[g];
  902. a || (a = this.a[g] = [], this.b++);
  903. var e = tb(a, b, d, f); - 1 < e ? (b = a[e], c || (b.D = !1)) : (b = new qb(b, this.src, g, !!d, f), b.D = c, a
  904. .push(b));
  905. return b
  906. };
  907. sb.prototype.remove = function(a, b, c, d) {
  908. a = a.toString();
  909. if (!(a in this.a)) return !1;
  910. var f = this.a[a];
  911. b = tb(f, b, c, d);
  912. return -1 < b ? (rb(f[b]), Array.prototype.splice.call(f, b, 1), 0 == f.length && (delete this.a[a], this.b--),
  913. !0) : !1
  914. };
  915. function ub(a, b) {
  916. var c = b.type;
  917. if (c in a.a) {
  918. var d = a.a[c],
  919. f = Na(d, b),
  920. g;
  921. (g = 0 <= f) && Array.prototype.splice.call(d, f, 1);
  922. g && (rb(b), 0 == a.a[c].length && (delete a.a[c], a.b--))
  923. }
  924. }
  925. function tb(a, b, c, d) {
  926. for (var f = 0; f < a.length; ++f) {
  927. var g = a[f];
  928. if (!g.A && g.listener == b && g.capture == !!c && g.H == d) return f
  929. }
  930. return -1
  931. };
  932. var vb = "closure_lm_" + (1E6 * Math.random() | 0),
  933. wb = {},
  934. xb = 0;
  935. function yb(a, b, c, d, f) {
  936. if (d && d.once) zb(a, b, c, d, f);
  937. else if (Array.isArray(b))
  938. for (var g = 0; g < b.length; g++) yb(a, b[g], c, d, f);
  939. else c = Ab(c), a && a[L] ? a.f.add(String(b), c, !1, sa(d) ? !!d.capture : !!d, f) : Bb(a, b, c, !1, d, f)
  940. }
  941. function Bb(a, b, c, d, f, g) {
  942. if (!b) throw Error("Invalid event type");
  943. var e = sa(f) ? !!f.capture : !!f,
  944. h = Cb(a);
  945. h || (a[vb] = h = new sb(a));
  946. c = h.add(b, c, d, e, g);
  947. if (!c.proxy) {
  948. d = Db();
  949. c.proxy = d;
  950. d.src = a;
  951. d.listener = c;
  952. if (a.addEventListener) nb || (f = e), void 0 === f && (f = !1), a.addEventListener(b.toString(), d, f);
  953. else if (a.attachEvent) a.attachEvent(Eb(b.toString()), d);
  954. else if (a.addListener && a.removeListener) a.addListener(d);
  955. else throw Error("addEventListener and attachEvent are unavailable.");
  956. xb++
  957. }
  958. }
  959. function Db() {
  960. function a(c) {
  961. return b.call(a.src, a.listener, c)
  962. }
  963. var b = Fb;
  964. return a
  965. }
  966. function zb(a, b, c, d, f) {
  967. if (Array.isArray(b))
  968. for (var g = 0; g < b.length; g++) zb(a, b[g], c, d, f);
  969. else c = Ab(c), a && a[L] ? a.f.add(String(b), c, !0, sa(d) ? !!d.capture : !!d, f) : Bb(a, b, c, !0, d, f)
  970. }
  971. function Gb(a, b, c, d, f) {
  972. if (Array.isArray(b))
  973. for (var g = 0; g < b.length; g++) Gb(a, b[g], c, d, f);
  974. else(d = sa(d) ? !!d.capture : !!d, c = Ab(c), a && a[L]) ? a.f.remove(String(b), c, d, f) : a && (a = Cb(a)) && (
  975. b = a.a[b.toString()], a = -1, b && (a = tb(b, c, d, f)), (c = -1 < a ? b[a] : null) && Hb(c))
  976. }
  977. function Hb(a) {
  978. if ("number" !== typeof a && a && !a.A) {
  979. var b = a.src;
  980. if (b && b[L]) ub(b.f, a);
  981. else {
  982. var c = a.type,
  983. d = a.proxy;
  984. b.removeEventListener ? b.removeEventListener(c, d, a.capture) : b.detachEvent ? b.detachEvent(Eb(c), d) : b
  985. .addListener && b.removeListener && b.removeListener(d);
  986. xb--;
  987. (c = Cb(b)) ? (ub(c, a), 0 == c.b && (c.src = null, b[vb] = null)) : rb(a)
  988. }
  989. }
  990. }
  991. function Eb(a) {
  992. return a in wb ? wb[a] : wb[a] = "on" + a
  993. }
  994. function Fb(a, b) {
  995. if (a.A) a = !0;
  996. else {
  997. b = new K(b, this);
  998. var c = a.listener,
  999. d = a.H || a.src;
  1000. a.D && Hb(a);
  1001. a = c.call(d, b)
  1002. }
  1003. return a
  1004. }
  1005. function Cb(a) {
  1006. a = a[vb];
  1007. return a instanceof sb ? a : null
  1008. }
  1009. var Ib = "__closure_events_fn_" + (1E9 * Math.random() >>> 0);
  1010. function Ab(a) {
  1011. if ("function" === typeof a) return a;
  1012. a[Ib] || (a[Ib] = function(b) {
  1013. return a.handleEvent(b)
  1014. });
  1015. return a[Ib]
  1016. };
  1017. function N() {
  1018. kb.call(this);
  1019. this.f = new sb(this);
  1020. this.U = this
  1021. }
  1022. B(N, kb);
  1023. N.prototype[L] = !0;
  1024. N.prototype.addEventListener = function(a, b, c, d) {
  1025. yb(this, a, b, c, d)
  1026. };
  1027. N.prototype.removeEventListener = function(a, b, c, d) {
  1028. Gb(this, a, b, c, d)
  1029. };
  1030. function O(a, b) {
  1031. a = a.U;
  1032. var c = b.type || b;
  1033. if ("string" === typeof b) b = new J(b, a);
  1034. else if (b instanceof J) b.target = b.target || a;
  1035. else {
  1036. var d = b;
  1037. b = new J(c, a);
  1038. Va(b, d)
  1039. }
  1040. a = b.a = a;
  1041. Jb(a, c, !0, b);
  1042. Jb(a, c, !1, b)
  1043. }
  1044. function Jb(a, b, c, d) {
  1045. if (b = a.f.a[String(b)]) {
  1046. b = b.concat();
  1047. for (var f = !0, g = 0; g < b.length; ++g) {
  1048. var e = b[g];
  1049. if (e && !e.A && e.capture == c) {
  1050. var h = e.listener,
  1051. k = e.H || e.src;
  1052. e.D && ub(a.f, e);
  1053. f = !1 !== h.call(k, d) && f
  1054. }
  1055. }
  1056. }
  1057. };
  1058. var Kb = x;
  1059. function Lb(a, b, c) {
  1060. if ("function" === typeof a) c && (a = A(a, c));
  1061. else if (a && "function" == typeof a.handleEvent) a = A(a.handleEvent, a);
  1062. else throw Error("Invalid listener argument");
  1063. return 2147483647 < Number(b) ? -1 : Kb.setTimeout(a, b || 0)
  1064. };
  1065. function Mb(a, b) {
  1066. this.name = a;
  1067. this.value = b
  1068. }
  1069. Mb.prototype.toString = function() {
  1070. return this.name
  1071. };
  1072. var Nb = new Mb("OFF", Infinity),
  1073. Ob = new Mb("SEVERE", 1E3),
  1074. Pb = new Mb("CONFIG", 700),
  1075. Qb = new Mb("FINE", 500);
  1076. function Rb() {
  1077. this.clear()
  1078. }
  1079. var Sb;
  1080. Rb.prototype.clear = function() {};
  1081. function Ub(a, b, c) {
  1082. this.reset(a || Nb, b, c, void 0, void 0)
  1083. }
  1084. Ub.prototype.reset = function() {};
  1085. function Vb(a, b) {
  1086. this.a = null;
  1087. this.f = [];
  1088. this.b = (void 0 === b ? null : b) || null;
  1089. this.c = [];
  1090. this.g = {
  1091. getName: function() {
  1092. return a
  1093. }
  1094. }
  1095. }
  1096. function Wb(a) {
  1097. if (a.a) return a.a;
  1098. if (a.b) return Wb(a.b);
  1099. Ea("Root logger has no level set.");
  1100. return Nb
  1101. }
  1102. function Xb(a, b) {
  1103. for (; a;) a.f.forEach(function(c) {
  1104. c(b)
  1105. }), a = a.b
  1106. }
  1107. function Yb() {
  1108. this.entries = {};
  1109. var a = new Vb("");
  1110. a.a = Pb;
  1111. this.entries[""] = a
  1112. }
  1113. var Zb;
  1114. function $b(a, b, c) {
  1115. var d = a.entries[b];
  1116. if (d) return void 0 !== c && (d.a = c), d;
  1117. d = $b(a, b.substr(0, b.lastIndexOf(".")));
  1118. var f = new Vb(b, d);
  1119. a.entries[b] = f;
  1120. d.c.push(f);
  1121. void 0 !== c && (f.a = c);
  1122. return f
  1123. }
  1124. function ac() {
  1125. Zb || (Zb = new Yb);
  1126. return Zb
  1127. }
  1128. function bc(a, b, c) {
  1129. var d;
  1130. if (d = a)
  1131. if (d = a && b) {
  1132. d = b.value;
  1133. var f = a ? Wb($b(ac(), a.getName())) : Nb;
  1134. d = d >= f.value
  1135. } d && (b = b || Nb, d = $b(ac(), a.getName()), "function" === typeof c && (c = c()), Sb || (Sb = new Rb), a = a
  1136. .getName(), a = new Ub(b, c, a), Xb(d, a))
  1137. }
  1138. function P(a, b) {
  1139. a && bc(a, Qb, b)
  1140. };
  1141. function cc() {}
  1142. cc.prototype.a = null;
  1143. function dc(a) {
  1144. var b;
  1145. (b = a.a) || (b = {}, ec(a) && (b[0] = !0, b[1] = !0), b = a.a = b);
  1146. return b
  1147. };
  1148. var fc;
  1149. function gc() {}
  1150. B(gc, cc);
  1151. function hc(a) {
  1152. // 解决兼容APP端跨域的问题,app端必须使用H5+中的plus.net.XMLHttpRequest【APP端不兼容标准HTML中的XMLHttpRequest】
  1153. // #ifdef APP-PLUS
  1154. return (a = ec(a)) ? new ActiveXObject(a) : new plus.net.XMLHttpRequest
  1155. // #endif
  1156. // #ifdef H5
  1157. return (a = ec(a)) ? new ActiveXObject(a) : new XMLHttpRequest
  1158. // #endif
  1159. // return (a = ec(a)) ? new ActiveXObject(a) : new XMLHttpRequest
  1160. }
  1161. function ec(a) {
  1162. if (!a.b && "undefined" == typeof XMLHttpRequest && "undefined" != typeof ActiveXObject) {
  1163. for (var b = ["MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], c = 0; c < b
  1164. .length; c++) {
  1165. var d = b[c];
  1166. try {
  1167. return new ActiveXObject(d), a.b = d
  1168. } catch (f) {}
  1169. }
  1170. throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");
  1171. }
  1172. return a.b
  1173. }
  1174. fc = new gc;
  1175. t();
  1176. u();
  1177. function ic(a, b) {
  1178. this.b = a[x.Symbol.iterator]();
  1179. this.c = b;
  1180. this.f = 0
  1181. }
  1182. ic.prototype[Symbol.iterator] = function() {
  1183. return this
  1184. };
  1185. ic.prototype.next = function() {
  1186. var a = this.b.next();
  1187. return {
  1188. value: a.done ? void 0 : this.c.call(void 0, a.value, this.f++),
  1189. done: a.done
  1190. }
  1191. };
  1192. function jc(a, b) {
  1193. return new ic(a, b)
  1194. }
  1195. t();
  1196. u();
  1197. t();
  1198. u();
  1199. var kc = "StopIteration" in x ? x.StopIteration : {
  1200. message: "StopIteration",
  1201. stack: ""
  1202. };
  1203. function Q() {}
  1204. Q.prototype.next = function() {
  1205. return Q.prototype.a.call(this)
  1206. };
  1207. Q.prototype.a = function() {
  1208. throw kc;
  1209. };
  1210. Q.prototype.u = function() {
  1211. return this
  1212. };
  1213. function lc(a) {
  1214. if (a instanceof R || a instanceof S || a instanceof T) return a;
  1215. if ("function" == typeof a.next) return new R(function() {
  1216. return mc(a)
  1217. });
  1218. t();
  1219. u();
  1220. if ("function" == typeof a[Symbol.iterator]) return t(), u(), new R(function() {
  1221. return a[Symbol.iterator]()
  1222. });
  1223. if ("function" == typeof a.u) return new R(function() {
  1224. return mc(a.u())
  1225. });
  1226. throw Error("Not an iterator or iterable.");
  1227. }
  1228. function mc(a) {
  1229. if (!(a instanceof Q)) return a;
  1230. var b = !1;
  1231. return {
  1232. next: function() {
  1233. for (var c; !b;) try {
  1234. c = a.a();
  1235. break
  1236. } catch (d) {
  1237. if (d !== kc) throw d;
  1238. b = !0
  1239. }
  1240. return {
  1241. value: c,
  1242. done: b
  1243. }
  1244. }
  1245. }
  1246. }
  1247. t();
  1248. u();
  1249. function R(a) {
  1250. this.b = a
  1251. }
  1252. R.prototype.u = function() {
  1253. return new S(this.b())
  1254. };
  1255. R.prototype[Symbol.iterator] = function() {
  1256. return new T(this.b())
  1257. };
  1258. R.prototype.c = function() {
  1259. return new T(this.b())
  1260. };
  1261. t();
  1262. u();
  1263. function S(a) {
  1264. this.b = a
  1265. }
  1266. oa(S, Q);
  1267. S.prototype.a = function() {
  1268. var a = this.b.next();
  1269. if (a.done) throw kc;
  1270. return a.value
  1271. };
  1272. S.prototype.next = function() {
  1273. return S.prototype.a.call(this)
  1274. };
  1275. S.prototype[Symbol.iterator] = function() {
  1276. return new T(this.b)
  1277. };
  1278. S.prototype.c = function() {
  1279. return new T(this.b)
  1280. };
  1281. function T(a) {
  1282. R.call(this, function() {
  1283. return a
  1284. });
  1285. this.f = a
  1286. }
  1287. oa(T, R);
  1288. T.prototype.next = function() {
  1289. return this.f.next()
  1290. };
  1291. function nc(a, b) {
  1292. this.o = {};
  1293. this.j = [];
  1294. this.B = this.size = 0;
  1295. var c = arguments.length;
  1296. if (1 < c) {
  1297. if (c % 2) throw Error("Uneven number of arguments");
  1298. for (var d = 0; d < c; d += 2) this.set(arguments[d], arguments[d + 1])
  1299. } else a && this.addAll(a)
  1300. }
  1301. n = nc.prototype;
  1302. n.G = function() {
  1303. oc(this);
  1304. return this.j.concat()
  1305. };
  1306. n.has = function(a) {
  1307. return U(this.o, a)
  1308. };
  1309. n.clear = function() {
  1310. this.o = {};
  1311. this.B = this.size = this.j.length = 0
  1312. };
  1313. n.remove = function(a) {
  1314. return this.delete(a)
  1315. };
  1316. n.delete = function(a) {
  1317. return U(this.o, a) ? (delete this.o[a], --this.size, this.B++, this.j.length > 2 * this.size && oc(this), !0) :
  1318. !1
  1319. };
  1320. function oc(a) {
  1321. if (a.size != a.j.length) {
  1322. for (var b = 0, c = 0; b < a.j.length;) {
  1323. var d = a.j[b];
  1324. U(a.o, d) && (a.j[c++] = d);
  1325. b++
  1326. }
  1327. a.j.length = c
  1328. }
  1329. if (a.size != a.j.length) {
  1330. var f = {};
  1331. for (c = b = 0; b < a.j.length;) d = a.j[b], U(f, d) || (a.j[c++] = d, f[d] = 1), b++;
  1332. a.j.length = c
  1333. }
  1334. }
  1335. n.get = function(a, b) {
  1336. return U(this.o, a) ? this.o[a] : b
  1337. };
  1338. n.set = function(a, b) {
  1339. U(this.o, a) || (this.size += 1, this.j.push(a), this.B++);
  1340. this.o[a] = b
  1341. };
  1342. n.addAll = function(a) {
  1343. if (a instanceof nc)
  1344. for (var b = a.G(), c = 0; c < b.length; c++) this.set(b[c], a.get(b[c]));
  1345. else
  1346. for (b in a) this.set(b, a[b])
  1347. };
  1348. n.forEach = function(a, b) {
  1349. for (var c = this.G(), d = 0; d < c.length; d++) {
  1350. var f = c[d],
  1351. g = this.get(f);
  1352. a.call(b, g, f, this)
  1353. }
  1354. };
  1355. n.clone = function() {
  1356. return new nc(this)
  1357. };
  1358. n.keys = function() {
  1359. return lc(this.u(!0)).c()
  1360. };
  1361. n.values = function() {
  1362. return lc(this.u(!1)).c()
  1363. };
  1364. n.entries = function() {
  1365. var a = this;
  1366. return jc(this.keys(), function(b) {
  1367. return [b, a.get(b)]
  1368. })
  1369. };
  1370. n.u = function(a) {
  1371. oc(this);
  1372. var b = 0,
  1373. c = this.B,
  1374. d = this,
  1375. f = new Q;
  1376. f.a = function() {
  1377. if (c != d.B) throw Error("The map has changed since the iterator was created");
  1378. if (b >= d.j.length) throw kc;
  1379. var g = d.j[b++];
  1380. return a ? g : d.o[g]
  1381. };
  1382. f.next = f.a.bind(f);
  1383. return f
  1384. };
  1385. function U(a, b) {
  1386. return Object.prototype.hasOwnProperty.call(a, b)
  1387. };
  1388. var pc =
  1389. /^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;
  1390. function qc(a) {
  1391. N.call(this);
  1392. this.headers = new nc;
  1393. this.C = a || null;
  1394. this.c = !1;
  1395. this.J = this.a = null;
  1396. this.P = this.v = "";
  1397. this.g = 0;
  1398. this.l = "";
  1399. this.i = this.N = this.s = this.L = !1;
  1400. this.h = 0;
  1401. this.w = null;
  1402. this.m = rc;
  1403. this.I = this.M = !1
  1404. }
  1405. B(qc, N);
  1406. var rc = "";
  1407. qc.prototype.b = $b(ac(), "goog.net.XhrIo", void 0).g;
  1408. var sc = /^https?$/i,
  1409. tc = ["POST", "PUT"];
  1410. function uc(a, b, c) {
  1411. if (a.a) throw Error("[goog.net.XhrIo] Object is active with another request=" + a.v + "; newUri=" + b);
  1412. a.v = b;
  1413. a.l = "";
  1414. a.g = 0;
  1415. a.P = "POST";
  1416. a.L = !1;
  1417. a.c = !0;
  1418. a.a = a.C ? hc(a.C) : hc(fc);
  1419. a.J = a.C ? dc(a.C) : dc(fc);
  1420. a.a.onreadystatechange = A(a.R, a);
  1421. try {
  1422. P(a.b, V(a, "Opening Xhr")), a.N = !0, a.a.open("POST", String(b), !0), a.N = !1
  1423. } catch (g) {
  1424. P(a.b, V(a, "Error opening Xhr: " + g.message));
  1425. vc(a, g);
  1426. return
  1427. }
  1428. b = c || "";
  1429. c = a.headers.clone();
  1430. var d = c.G().find(function(g) {
  1431. return "content-type" == g.toLowerCase()
  1432. }),
  1433. f = x.FormData && b instanceof
  1434. x.FormData;
  1435. !(0 <= Na(tc, "POST")) || d || f || c.set("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
  1436. c.forEach(function(g, e) {
  1437. this.a.setRequestHeader(e, g)
  1438. }, a);
  1439. a.m && (a.a.responseType = a.m);
  1440. "withCredentials" in a.a && a.a.withCredentials !== a.M && (a.a.withCredentials = a.M);
  1441. try {
  1442. wc(a), 0 < a.h && (a.I = xc(a.a), P(a.b, V(a, "Will abort after " + a.h + "ms if incomplete, xhr2 " + a.I)), a
  1443. .I ? (a.a.timeout = a.h, a.a.ontimeout = A(a.T, a)) : a.w = Lb(a.T, a.h, a)), P(a.b, V(a,
  1444. "Sending request")), a.s = !0, a.a.send(b), a.s = !1
  1445. } catch (g) {
  1446. P(a.b,
  1447. V(a, "Send error: " + g.message)), vc(a, g)
  1448. }
  1449. }
  1450. function xc(a) {
  1451. return ab && jb() && "number" === typeof a.timeout && void 0 !== a.ontimeout
  1452. }
  1453. n = qc.prototype;
  1454. n.T = function() {
  1455. "undefined" != typeof qa && this.a && (this.l = "Timed out after " + this.h + "ms, aborting", this.g = 8, P(this
  1456. .b, V(this, this.l)), O(this, "timeout"), this.abort(8))
  1457. };
  1458. function vc(a, b) {
  1459. a.c = !1;
  1460. a.a && (a.i = !0, a.a.abort(), a.i = !1);
  1461. a.l = b;
  1462. a.g = 5;
  1463. yc(a);
  1464. zc(a)
  1465. }
  1466. function yc(a) {
  1467. a.L || (a.L = !0, O(a, "complete"), O(a, "error"))
  1468. }
  1469. n.abort = function(a) {
  1470. this.a && this.c && (P(this.b, V(this, "Aborting")), this.c = !1, this.i = !0, this.a.abort(), this.i = !1, this
  1471. .g = a || 7, O(this, "complete"), O(this, "abort"), zc(this))
  1472. };
  1473. n.R = function() {
  1474. this.K || (this.N || this.s || this.i ? Ac(this) : this.W())
  1475. };
  1476. n.W = function() {
  1477. Ac(this)
  1478. };
  1479. function Ac(a) {
  1480. if (a.c && "undefined" != typeof qa)
  1481. if (a.J[1] && 4 == W(a) && 2 == a.getStatus()) P(a.b, V(a, "Local request error detected and ignored"));
  1482. else if (a.s && 4 == W(a)) Lb(a.R, 0, a);
  1483. else if (O(a, "readystatechange"), 4 == W(a)) {
  1484. P(a.b, V(a, "Request complete"));
  1485. a.c = !1;
  1486. try {
  1487. var b = a.getStatus();
  1488. a: switch (b) {
  1489. case 200:
  1490. case 201:
  1491. case 202:
  1492. case 204:
  1493. case 206:
  1494. case 304:
  1495. case 1223:
  1496. var c = !0;
  1497. break a;
  1498. default:
  1499. c = !1
  1500. }
  1501. var d;
  1502. if (!(d = c)) {
  1503. var f;
  1504. if (f = 0 === b) {
  1505. var g = String(a.v).match(pc)[1] || null;
  1506. if (!g && x.self && x.self.location) {
  1507. var e = x.self.location.protocol;
  1508. g = e.substr(0, e.length - 1)
  1509. }
  1510. f = !sc.test(g ? g.toLowerCase() : "")
  1511. }
  1512. d = f
  1513. }
  1514. if (d) O(a, "complete"), O(a, "success");
  1515. else {
  1516. a.g = 6;
  1517. try {
  1518. var h = 2 < W(a) ? a.a.statusText : ""
  1519. } catch (k) {
  1520. P(a.b, "Can not get status: " + k.message), h = ""
  1521. }
  1522. a.l = h + " [" + a.getStatus() + "]";
  1523. yc(a)
  1524. }
  1525. } finally {
  1526. zc(a)
  1527. }
  1528. }
  1529. }
  1530. function zc(a) {
  1531. if (a.a) {
  1532. wc(a);
  1533. var b = a.a,
  1534. c = a.J[0] ? ra : null;
  1535. a.a = null;
  1536. a.J = null;
  1537. O(a, "ready");
  1538. try {
  1539. b.onreadystatechange = c
  1540. } catch (d) {
  1541. (a = a.b) && bc(a, Ob, "Problem encountered resetting onreadystatechange: " + d.message)
  1542. }
  1543. }
  1544. }
  1545. function wc(a) {
  1546. a.a && a.I && (a.a.ontimeout = null);
  1547. a.w && (Kb.clearTimeout(a.w), a.w = null)
  1548. }
  1549. function W(a) {
  1550. return a.a ? a.a.readyState : 0
  1551. }
  1552. n.getStatus = function() {
  1553. try {
  1554. return 2 < W(this) ? this.a.status : -1
  1555. } catch (a) {
  1556. return -1
  1557. }
  1558. };
  1559. function Bc(a) {
  1560. try {
  1561. if (!a.a) return null;
  1562. if ("response" in a.a) return a.a.response;
  1563. switch (a.m) {
  1564. case rc:
  1565. case "text":
  1566. return a.a.responseText;
  1567. case "arraybuffer":
  1568. if ("mozResponseArrayBuffer" in a.a) return a.a.mozResponseArrayBuffer
  1569. }
  1570. var b = a.b;
  1571. b && bc(b, Ob, "Response type " + a.m + " is not supported on this browser");
  1572. return null
  1573. } catch (c) {
  1574. return P(a.b, "Can not get response: " + c.message), null
  1575. }
  1576. }
  1577. function Cc(a, b) {
  1578. if (a.a && 4 == W(a)) return a = a.a.getResponseHeader(b), null === a ? void 0 : a
  1579. }
  1580. function Dc(a) {
  1581. var b = {};
  1582. a = (a.a && 4 == W(a) ? a.a.getAllResponseHeaders() || "" : "").split("\r\n");
  1583. for (var c = 0; c < a.length; c++)
  1584. if (!/^[\s\xa0]*$/.test(a[c])) {
  1585. var d = Wa(a[c]),
  1586. f = d[0];
  1587. d = d[1];
  1588. if ("string" === typeof d) {
  1589. d = d.trim();
  1590. var g = b[f] || [];
  1591. b[f] = g;
  1592. g.push(d)
  1593. }
  1594. } return Ta(b, function(e) {
  1595. return e.join(", ")
  1596. })
  1597. }
  1598. function V(a, b) {
  1599. return b + " [" + a.P + " " + a.v + " " + a.getStatus() + "]"
  1600. };
  1601. var Ec = {},
  1602. Fc = null;
  1603. function Gc(a) {
  1604. var b = a.length,
  1605. c = 3 * b / 4;
  1606. c % 3 ? c = Math.floor(c) : H("=.", a[b - 1]) && (c = H("=.", a[b - 2]) ? c - 2 : c - 1);
  1607. var d = new Uint8Array(c),
  1608. f = 0;
  1609. Hc(a, function(g) {
  1610. d[f++] = g
  1611. });
  1612. return d.subarray(0, f)
  1613. }
  1614. function Hc(a, b) {
  1615. function c(k) {
  1616. for (; d < a.length;) {
  1617. var l = a.charAt(d++),
  1618. m = Fc[l];
  1619. if (null != m) return m;
  1620. if (!/^[\s\xa0]*$/.test(l)) throw Error("Unknown base64 encoding at char: " + l);
  1621. }
  1622. return k
  1623. }
  1624. Ic();
  1625. for (var d = 0;;) {
  1626. var f = c(-1),
  1627. g = c(0),
  1628. e = c(64),
  1629. h = c(64);
  1630. if (64 === h && -1 === f) break;
  1631. b(f << 2 | g >> 4);
  1632. 64 != e && (b(g << 4 & 240 | e >> 2), 64 != h && b(e << 6 & 192 | h))
  1633. }
  1634. }
  1635. function Ic() {
  1636. if (!Fc) {
  1637. Fc = {};
  1638. for (var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), b = ["+/=", "+/",
  1639. "-_=", "-_.", "-_"
  1640. ], c = 0; 5 > c; c++) {
  1641. var d = a.concat(b[c].split(""));
  1642. Ec[c] = d;
  1643. for (var f = 0; f < d.length; f++) {
  1644. var g = d[f];
  1645. void 0 === Fc[g] && (Fc[g] = f)
  1646. }
  1647. }
  1648. }
  1649. };
  1650. var Jc = ["content-type", "grpc-status", "grpc-message"];
  1651. function X(a) {
  1652. // console.log('X run')
  1653. this.a = a.Z;
  1654. this.m = null;
  1655. this.b = [];
  1656. this.h = [];
  1657. this.g = [];
  1658. this.f = [];
  1659. this.c = [];
  1660. this.l = !1;
  1661. this.i = 0;
  1662. this.s = new Fa;
  1663. var b = this;
  1664. yb(this.a, "readystatechange", function() {
  1665. // console.log('readystatechange')
  1666. // console.log(a)
  1667. var c = b.a;
  1668. // console.log(c)
  1669. if (c = c.a ? c.a.getResponseHeader("Content-Type") : null) {
  1670. // console.log('X ok 1')
  1671. // console.log('c: ' + c)
  1672. c = c.toLowerCase();
  1673. if (0 == c.lastIndexOf("application/grpc-web-text", 0)) {
  1674. c = b.a;
  1675. // console.log('(c = b.a) c: ' + JSON.stringify(c.a))
  1676. try {
  1677. var d = c.a ? c.a.responseText : ""
  1678. } catch (k) {
  1679. // console.log("Can not get responseText: " + k.message)
  1680. P(c.b, "Can not get responseText: " + k.message), d = ""
  1681. }
  1682. c = d || "";
  1683. // console.log('(c = d || "") c: ' + c)
  1684. // add by wzx
  1685. if (c == '200 OK') c = ""
  1686. d = c.length - c.length % 4;
  1687. c = c.substr(b.i, d - b.i);
  1688. if (0 == c.length) return;
  1689. // console.log('X ok 3')
  1690. b.i = d;
  1691. c = Gc(c)
  1692. } else if (0 ==
  1693. c.lastIndexOf("application/grpc", 0)) c = new Uint8Array(Bc(b.a));
  1694. else {
  1695. // console.log('Unknown Content-type received.')
  1696. Y(b, new E(2, "Unknown Content-type received."));
  1697. return
  1698. }
  1699. d = null;
  1700. try {
  1701. // console.log(b.s)
  1702. // console.log(c)
  1703. d = Ha(b.s, c)
  1704. } catch (k) {
  1705. console.log(k)
  1706. Y(b, new E(2, "Error in parsing response body"))
  1707. }
  1708. if (d)
  1709. for (c = 0; c < d.length; c++) {
  1710. if (Ia in d[c]) {
  1711. var f = d[c][Ia];
  1712. if (f) {
  1713. var g = !1,
  1714. e = void 0;
  1715. try {
  1716. e = b.m(f), g = !0
  1717. } catch (k) {
  1718. Y(b, new E(13, "Error when deserializing response data; error: " + k + (
  1719. ", response: " + e)))
  1720. }
  1721. if (g)
  1722. for (f = e, g = 0; g < b.b.length; g++) b.b[g](f)
  1723. }
  1724. }
  1725. if (G in d[c] && 0 < d[c][G].length) {
  1726. f = "";
  1727. for (g = 0; g < d[c][G].length; g++) f +=
  1728. String.fromCharCode(d[c][G][g]);
  1729. f = f.trim().split("\r\n");
  1730. g = {};
  1731. for (e = 0; e < f.length; e++) {
  1732. var h = f[e].indexOf(":");
  1733. g[f[e].substring(0, h).trim()] = f[e].substring(h + 1).trim()
  1734. }
  1735. f = g;
  1736. g = 0;
  1737. e = "";
  1738. "grpc-status" in f && (g = Number(f["grpc-status"]), delete f["grpc-status"]);
  1739. "grpc-message" in f && (e = f["grpc-message"], delete f["grpc-message"]);
  1740. Y(b, new E(g, e, f))
  1741. }
  1742. }
  1743. }
  1744. });
  1745. yb(this.a, "complete", function() {
  1746. var c = b.a.g,
  1747. d = 2,
  1748. f = "",
  1749. g = {},
  1750. e = Dc(b.a);
  1751. Object.keys(e).forEach(function(k) {
  1752. Jc.includes(k) || (g[k] = e[k])
  1753. });
  1754. Kc(b, g);
  1755. var h = -1;
  1756. if (0 != c) {
  1757. switch (c) {
  1758. case 7:
  1759. d =
  1760. 10;
  1761. break;
  1762. case 8:
  1763. d = 4;
  1764. break;
  1765. case 6:
  1766. h = b.a.getStatus();
  1767. d = Aa(h);
  1768. break;
  1769. default:
  1770. d = 14
  1771. }
  1772. 10 == d && b.l || (f = Ca(c), -1 != h && (f += ", http status code: " + h), Y(b, new E(d, f)))
  1773. } else h = !1, "grpc-status" in e && (d = Number(Cc(b.a, "grpc-status")), "grpc-message" in e && (f =
  1774. Cc(b.a, "grpc-message")), 0 != d && (Y(b, new E(d, f || "", e)), h = !0)), h || Lc(b)
  1775. })
  1776. }
  1777. X.prototype.on = function(a, b) {
  1778. "data" == a ? this.b.push(b) : "status" == a ? this.h.push(b) : "metadata" == a ? this.g.push(b) : "end" == a ?
  1779. this.c.push(b) : "error" == a && this.f.push(b);
  1780. return this
  1781. };
  1782. function Mc(a, b) {
  1783. b = a.indexOf(b); - 1 < b && a.splice(b, 1)
  1784. }
  1785. X.prototype.removeListener = function(a, b) {
  1786. "data" == a ? Mc(this.b, b) : "status" == a ? Mc(this.h, b) : "metadata" == a ? Mc(this.g, b) : "end" == a ? Mc(
  1787. this.c, b) : "error" == a && Mc(this.f, b);
  1788. return this
  1789. };
  1790. X.prototype.cancel = function() {
  1791. this.l = !0;
  1792. this.a.abort()
  1793. };
  1794. function Y(a, b) {
  1795. if (0 != b.code)
  1796. for (var c = new E(b.code, decodeURIComponent(b.message || ""), b.metadata), d = 0; d < a.f.length; d++) a.f[d](
  1797. c);
  1798. b = {
  1799. code: b.code,
  1800. details: decodeURIComponent(b.message || ""),
  1801. metadata: b.metadata
  1802. };
  1803. for (c = 0; c < a.h.length; c++) a.h[c](b)
  1804. }
  1805. function Kc(a, b) {
  1806. for (var c = 0; c < a.g.length; c++) a.g[c](b)
  1807. }
  1808. function Lc(a) {
  1809. for (var b = 0; b < a.c.length; b++) a.c[b]()
  1810. }
  1811. X.prototype.cancel = X.prototype.cancel;
  1812. X.prototype.removeListener = X.prototype.removeListener;
  1813. X.prototype.on = X.prototype.on;
  1814. function Nc(a) {
  1815. var b = "";
  1816. Sa(a, function(c, d) {
  1817. b += d;
  1818. b += ":";
  1819. b += c;
  1820. b += "\r\n"
  1821. });
  1822. return b
  1823. };
  1824. function Z(a, b) {
  1825. a = void 0 === a ? {} : a;
  1826. this.a = a.format || y("format", a) || "text";
  1827. this.g = a.aa || y("suppressCorsPreflight", a) || !1;
  1828. this.f = a.withCredentials || y("withCredentials", a) || !1;
  1829. this.b = a.$ || y("streamInterceptors", a) || [];
  1830. this.h = a.ba || y("unaryInterceptors", a) || [];
  1831. this.c = b || null
  1832. }
  1833. Z.prototype.X = function(a, b, c, d, f) {
  1834. var g = this,
  1835. e = a.substr(0, a.length - d.name.length);
  1836. a = Oc(function(h) {
  1837. return Pc(g, h, e)
  1838. }, this.b).call(this, za(d, b, c));
  1839. Qc(a, f, !1);
  1840. return new Ba(a)
  1841. };
  1842. Z.prototype.S = function(a, b, c, d) {
  1843. var f = this,
  1844. g = a.substr(0, a.length - d.name.length);
  1845. return Oc(function(e) {
  1846. return new Promise(function(h, k) {
  1847. var l = Pc(f, e, g),
  1848. m, p, q;
  1849. Qc(l, function(w, z, M, Tb, Rc) {
  1850. w ? k(w) : Rc ? q = z : M ? p = M : Tb ? m = Tb : (w = e
  1851. .getMethodDescriptor(), z = m, z = void 0 === z ? {} : z, h(new D(q,
  1852. w, z, void 0 === p ? null : p)))
  1853. }, !0)
  1854. })
  1855. }, this.h).call(this, za(d, b, c)).then(function(e) {
  1856. return e.getResponseMessage()
  1857. })
  1858. };
  1859. Z.prototype.unaryCall = function(a, b, c, d) {
  1860. return this.S(a, b, c, d)
  1861. };
  1862. Z.prototype.Y = function(a, b, c, d) {
  1863. var f = this,
  1864. g = a.substr(0, a.length - d.name.length);
  1865. return Oc(function(e) {
  1866. return Pc(f, e, g)
  1867. }, this.b).call(this, za(d, b, c))
  1868. };
  1869. function Pc(a, b, c) {
  1870. var d = b.getMethodDescriptor(),
  1871. f = c + d.getName();
  1872. c = a.c ? a.c : new qc;
  1873. c.M = a.f;
  1874. var g = new X({
  1875. Z: c
  1876. });
  1877. g.m = d.b;
  1878. var e = b.getMetadata();
  1879. for (h in e) c.headers.set(h, e[h]);
  1880. "text" == a.a ? (c.headers.set("Content-Type", "application/grpc-web-text"), c.headers.set("Accept",
  1881. "application/grpc-web-text")) : c.headers.set("Content-Type", "application/grpc-web+proto");
  1882. c.headers.set("X-User-Agent", "grpc-web-javascript/0.1");
  1883. c.headers.set("X-Grpc-Web", "1");
  1884. if (c.headers.has("deadline")) {
  1885. var h = Number(c.headers.get("deadline"));
  1886. h = Math.ceil(h - (new Date).getTime());
  1887. c.headers.delete("deadline");
  1888. Infinity === h && (h = 0);
  1889. 0 < h && (c.headers.set("grpc-timeout", h + "m"), c.h = Math.max(0, Math.max(1E3, Math.ceil(1.1 * h))))
  1890. }
  1891. if (a.g) {
  1892. e = c.headers;
  1893. h = {};
  1894. for (var k = ha(e.keys()), l = k.next(); !l.done; l = k.next()) l = l.value, h[l] = e.get(l);
  1895. c.headers.clear();
  1896. b: {
  1897. for (m in h) {
  1898. var m = !1;
  1899. break b
  1900. }
  1901. m = !0
  1902. }
  1903. if (!m)
  1904. if (h = Nc(h), "string" === typeof f) {
  1905. if (m = encodeURIComponent("$httpHeaders"), h = null != h ? "=" + encodeURIComponent(String(h)) : "",
  1906. m += h) h = f.indexOf("#"), 0 > h && (h = f.length), e = f.indexOf("?"),
  1907. 0 > e || e > h ? (e = h, k = "") : k = f.substring(e + 1, h), f = [f.substr(0, e), k, f.substr(h)],
  1908. h = f[1], f[1] = m ? h ? h + "&" + m : m : h, f = f[0] + (f[1] ? "?" + f[1] : "") + f[2]
  1909. } else f.a("$httpHeaders", h)
  1910. }
  1911. b = (0, d.a)(b.getRequestMessage());
  1912. d = b.length;
  1913. m = [0, 0, 0, 0];
  1914. h = new Uint8Array(5 + d);
  1915. for (e = 3; 0 <= e; e--) m[e] = d % 256, d >>>= 8;
  1916. h.set(new Uint8Array(m), 1);
  1917. h.set(b, 5);
  1918. b = h;
  1919. if ("text" == a.a) {
  1920. a = b;
  1921. var p;
  1922. void 0 === p && (p = 0);
  1923. Ic();
  1924. p = Ec[p];
  1925. b = Array(Math.floor(a.length / 3));
  1926. d = p[64] || "";
  1927. for (m = h = 0; h < a.length - 2; h += 3) {
  1928. l = a[h];
  1929. var q = a[h + 1];
  1930. k = a[h + 2];
  1931. e = p[l >> 2];
  1932. l = p[(l & 3) << 4 | q >> 4];
  1933. q = p[(q & 15) << 2 | k >> 6];
  1934. k = p[k & 63];
  1935. b[m++] = e + l + q + k
  1936. }
  1937. e = 0;
  1938. k = d;
  1939. switch (a.length - h) {
  1940. case 2:
  1941. e = a[h + 1], k = p[(e & 15) << 2] || d;
  1942. case 1:
  1943. a = a[h], b[m] = p[a >> 2] + p[(a & 3) << 4 | e >> 4] + k + d
  1944. }
  1945. b = b.join("")
  1946. } else "binary" == a.a && (c.m = "arraybuffer");
  1947. uc(c, f, b);
  1948. return g
  1949. }
  1950. function Qc(a, b, c) {
  1951. var d = !1,
  1952. f = null,
  1953. g = !1;
  1954. a.on("data", function(e) {
  1955. d = !0;
  1956. f = e
  1957. });
  1958. a.on("error", function(e) {
  1959. 0 == e.code || g || (g = !0, b(e, null))
  1960. });
  1961. a.on("status", function(e) {
  1962. 0 == e.code || g ? c && b(null, null, e) : (g = !0, b({
  1963. code: e.code,
  1964. message: e.details,
  1965. metadata: e.metadata
  1966. }, null))
  1967. });
  1968. if (c) a.on("metadata", function(e) {
  1969. b(null, null, null, e)
  1970. });
  1971. a.on("end", function() {
  1972. g || (d ? c ? b(null, f, null, null, !0) : b(null, f) : b({
  1973. code: 2,
  1974. message: "Incomplete response"
  1975. }));
  1976. c && b(null, null)
  1977. })
  1978. }
  1979. function Oc(a, b) {
  1980. var c = a;
  1981. b.forEach(function(d) {
  1982. var f = c;
  1983. c = function(g) {
  1984. return d.intercept(g, f)
  1985. }
  1986. });
  1987. return c
  1988. }
  1989. Z.prototype.serverStreaming = Z.prototype.Y;
  1990. Z.prototype.unaryCall = Z.prototype.unaryCall;
  1991. Z.prototype.thenableCall = Z.prototype.S;
  1992. Z.prototype.rpcCall = Z.prototype.X;
  1993. module.exports.CallOptions = xa;
  1994. module.exports.MethodDescriptor = ya;
  1995. module.exports.GrpcWebClientBase = Z;
  1996. module.exports.RpcError = E;
  1997. module.exports.StatusCode = {
  1998. OK: 0,
  1999. CANCELLED: 1,
  2000. UNKNOWN: 2,
  2001. INVALID_ARGUMENT: 3,
  2002. DEADLINE_EXCEEDED: 4,
  2003. NOT_FOUND: 5,
  2004. ALREADY_EXISTS: 6,
  2005. PERMISSION_DENIED: 7,
  2006. UNAUTHENTICATED: 16,
  2007. RESOURCE_EXHAUSTED: 8,
  2008. FAILED_PRECONDITION: 9,
  2009. ABORTED: 10,
  2010. OUT_OF_RANGE: 11,
  2011. UNIMPLEMENTED: 12,
  2012. INTERNAL: 13,
  2013. UNAVAILABLE: 14,
  2014. DATA_LOSS: 15
  2015. };
  2016. module.exports.MethodType = {
  2017. UNARY: "unary",
  2018. SERVER_STREAMING: "server_streaming",
  2019. BIDI_STREAMING: "bidi_streaming"
  2020. };
  2021. Kb = "undefined" !== typeof globalThis && globalThis || self;