AI智能考试答题

💯【不限平台不限知识】🔍AI智能答题,不限平台不限知识💻自动联网搜索知识答题📝截图识别答题✅可选择模型规模🏆用于各类问答,网课问题,竞赛问题,专业术语,业务名称,情景问题,在线作业等。🥇操作简单🥇无需配置安装即可使用。🏆解除各类功能限制,解除字体加密。支持但不限于以下平台:支持【超星学习通】【智慧树】【职教云系列】【雨课堂】【考试星】【168网校】【u校园】【大学MOOC】【云班课】【优慕课】【继续教育类】【绎通云课堂】【九江系列】【柠檬文才】【亿学宝云】【优课学堂】【小鹅通】【安徽继续教育】【上海开放大学】【华侨大学自考网络助学平台】【良师在线】【和学在线】【人卫慕课】【国家开放大学】【山财培训网(继续教育)】【浙江省高等学校在线开放课程共享平台】【国地质大学远程与继续教育学院】【重庆大学网络教育学院】【浙江省高等教育自学考试网络助学平台】【湖南高等学历继续教育】【优学院】【学起系列】【青书学堂】【学堂在线】【英华学堂】【广开网络教学平台】【中国大学mooc】【新国开】【知到】【蓝墨云】【智慧职教】【云班课精品课】【山东专技】【西财在线绎通云】

安装此脚本?
作者推荐脚本

您可能也喜欢全平台网课智能考试答题

安装此脚本
  1. // ==UserScript==
  2. // @name AI智能考试答题
  3. // @version 0.9.0
  4. // @namespace AI智能考试答题
  5. // @description 💯【不限平台不限知识】🔍AI智能答题,不限平台不限知识💻自动联网搜索知识答题📝截图识别答题✅可选择模型规模🏆用于各类问答,网课问题,竞赛问题,专业术语,业务名称,情景问题,在线作业等。🥇操作简单🥇无需配置安装即可使用。🏆解除各类功能限制,解除字体加密。支持但不限于以下平台:支持【超星学习通】【智慧树】【职教云系列】【雨课堂】【考试星】【168网校】【u校园】【大学MOOC】【云班课】【优慕课】【继续教育类】【绎通云课堂】【九江系列】【柠檬文才】【亿学宝云】【优课学堂】【小鹅通】【安徽继续教育】【上海开放大学】【华侨大学自考网络助学平台】【良师在线】【和学在线】【人卫慕课】【国家开放大学】【山财培训网(继续教育)】【浙江省高等学校在线开放课程共享平台】【国地质大学远程与继续教育学院】【重庆大学网络教育学院】【浙江省高等教育自学考试网络助学平台】【湖南高等学历继续教育】【优学院】【学起系列】【青书学堂】【学堂在线】【英华学堂】【广开网络教学平台】【中国大学mooc】【新国开】【知到】【蓝墨云】【智慧职教】【云班课精品课】【山东专技】【西财在线绎通云】
  6. // @author 智能考试答题
  7. // @license GNU GPLv3
  8. // @match *://*/*
  9. // @grant GM_getResourceText
  10. // @grant GM_info
  11. // @grant unsafeWindow
  12. // @grant GM_xmlhttpRequest
  13. // @grant GM_addStyle
  14. // @grant GM_registerMenuCommand
  15. // @grant GM_setValue
  16. // @grant GM_getValue
  17. // @grant GM_deleteValue
  18. // @grant GM_setClipboard
  19. // @grant GM_cookie
  20. // @run-at document-end
  21. // @connect baidu.com
  22. // @connect siliconflow.cn
  23. // @connect api.xunhupay.com
  24. // @connect toolchest.cn
  25. // @connect localhost
  26. // @resource Vue http://lib.baomitu.com/vue/2.6.0/vue.min.js
  27. // @resource JQ361JS https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js
  28. // @resource jqueryweui https://cdn.bootcdn.net/ajax/libs/jquery-weui/1.2.1/js/jquery-weui.min.js
  29. // @resource weuiCss https://cdn.bootcdn.net/ajax/libs/weui/2.5.12/style/weui.min.css
  30. // @resource questionCss https://www.toolchest.cn/static/css/question_search.css
  31. // @resource bootstrap https://cdn.staticfile.net/twitter-bootstrap/4.3.1/css/bootstrap.min.css
  32. // @resource Table https://www.forestpolice.org/ttf/2.0/table.json
  33. // @require https://lib.baomitu.com/cryptico/0.0.1343522940/hash.min.js
  34. // @require https://lib.baomitu.com/jquery/3.6.0/jquery.min.js
  35. // @require https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js
  36. // @icon data:image/jpeg;base64,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
  37. // ==/UserScript==
  38.  
  39. (function () {
  40. 'use strict';
  41.  
  42. (function($) {
  43. var tips = [];
  44. function handleWindowResize() {
  45. $.each(tips, function() {
  46. this.refresh(true);
  47. });
  48. }
  49. $(window).resize(handleWindowResize);
  50.  
  51. $.JPopBox = function(elm, options) {
  52. this.$elm = $(elm);
  53. this.opts = this.getOptions(options);
  54. var popBoxHtml=[];
  55. popBoxHtml.push('<div class="'+this.opts.className+'">');
  56. if(this.opts.title!=""){
  57. popBoxHtml.push('<div class="JPopBox-tip-title">'+this.opts.title+'</div>');
  58. }
  59. if(this.opts.isShowArrow){
  60. popBoxHtml.push('<div class="JPopBox-tip-arrow JPopBox-tip-arrow-top JPopBox-tip-arrow-right JPopBox-tip-arrow-bottom JPopBox-tip-arrow-left" style="visibility:inherit"></div>');
  61. }
  62. popBoxHtml.push('<div class="JPopBox-tip-content"></div>'),
  63. popBoxHtml.push('</div>');
  64. this.$tip = $(popBoxHtml.join('')).appendTo(document.body);
  65. this.$arrow = this.$tip.find('div.JPopBox-tip-arrow');
  66. this.$inner = this.$tip.find('div.JPopBox-tip-content');
  67. this.disabled = false;
  68. this.content = null;
  69. this.init();
  70. };
  71.  
  72. $.JPopBox.hideAll = function() {
  73. $.each(tips, function() {
  74. this.hide();
  75. });
  76. };
  77.  
  78. $.JPopBox.prototype = {
  79. getOptions:function(options){
  80. options = $.extend({}, $.fn.jPopBox.defaults, options);
  81. if (options.delay && typeof options.delay == 'number') {
  82. options.delay = {
  83. show: options.delay,
  84. hide: options.delay
  85. };
  86. }
  87. if (typeof options.offset == 'number') {
  88. options.offset = {
  89. X: options.offset,
  90. Y: options.offset
  91. };
  92. }
  93. return options
  94. },
  95. init: function() {
  96. tips.push(this);
  97. this.$elm.data('jPopBox', this);
  98. if (this.opts.trigger != 'none') {
  99. this.opts.trigger!="click" && this.$elm.on({
  100. 'mouseenter.jPopBox': $.proxy(this.mouseenter, this),
  101. 'mouseleave.jPopBox': $.proxy(this.mouseleave, this)
  102. });
  103. switch (this.opts.trigger) {
  104. case 'click':
  105. this.$elm.on('click.jPopBox', $.proxy(this.toggle, this));
  106. break;
  107. case 'hover':
  108. if (this.opts.isTipHover)
  109. this.$tip.hover($.proxy(this.clearTimeouts, this), $.proxy(this.mouseleave, this));
  110. break;
  111. case 'focus':
  112. this.$elm.on({
  113. 'focus.jPopBox': $.proxy(this.showDelayed, this),
  114. 'blur.jPopBox': $.proxy(this.hideDelayed, this)
  115. });
  116. break;
  117. }
  118. }
  119. },
  120. toggle:function(){
  121. var active=this.$tip.data('active');
  122. if(!active)
  123. this.showDelayed();
  124. else
  125. this.hideDelayed();
  126. },
  127. mouseenter: function(e) {
  128. if (this.disabled)
  129. return true;
  130. this.updateCursorPos(e);
  131. this.$elm.attr('title', '');
  132. if (this.opts.trigger == 'focus')
  133. return true;
  134. this.showDelayed();
  135. },
  136. mouseleave: function(e) {
  137. if (this.disabled || this.asyncAnimating && (this.$tip[0] === e.relatedTarget || jQuery.contains(this.$tip[0], e.relatedTarget)))
  138. return true;
  139. if (this.opts.trigger == 'focus')
  140. return true;
  141. this.hideDelayed();
  142. },
  143. mousemove: function(e) {
  144. if (this.disabled)
  145. return true;
  146. this.updateCursorPos(e);
  147. if (this.opts.isFollowCursor && this.$tip.data('active')) {
  148. this.calcPos();
  149. this.$tip.css({left: this.pos.l, top: this.pos.t});
  150. }
  151. },
  152. show: function() {
  153. this.$elm.trigger($.Event('show.jPopBox'));
  154. if (this.disabled || this.$tip.data('active'))
  155. return;
  156. this.reset();
  157. this.update();
  158. if (!this.content)
  159. return;
  160. this.display();
  161. this.$elm.trigger($.Event('shown.jPopBox'));
  162. },
  163. showDelayed: function(timeout) {
  164. this.clearTimeouts();
  165. this.showTimeout = setTimeout($.proxy(this.show, this), typeof timeout == 'number' ? timeout:this.opts.delay.show);
  166. },
  167. hide: function() {
  168. this.$elm.trigger($.Event('hide.jPopBox'));
  169. if (this.disabled || !this.$tip.data('active'))
  170. return;
  171. this.display(true);
  172. this.$elm.trigger($.Event('hidden.jPopBox'));
  173. },
  174. hideDelayed: function(timeout) {
  175. this.clearTimeouts();
  176. this.hideTimeout = setTimeout($.proxy(this.hide, this),typeof timeout == 'number' ? timeout :this.opts.delay.hide);
  177. },
  178. reset: function() {
  179. this.$tip.queue([]).detach().css('visibility', 'hidden').data('active', false);
  180. this.$inner.find('*').jPopBox('hide');
  181. this.$arrow.length && (this.$arrow[0].className = 'JPopBox-tip-arrow JPopBox-tip-arrow-top JPopBox-tip-arrow-right JPopBox-tip-arrow-bottom JPopBox-tip-arrow-left');
  182. this.asyncAnimating = false;
  183. },
  184. update: function(content, dontOverwriteOption) {
  185. if (this.disabled)
  186. return;
  187.  
  188. var async = content !== undefined;
  189. if (async) {
  190. if (!dontOverwriteOption)
  191. this.opts.content = content;
  192. if (!this.$tip.data('active'))
  193. return;
  194. } else {
  195. content = this.opts.content;
  196. }
  197.  
  198. // update content only if it has been changed since last time
  199. var self = this,
  200. newContent = typeof content == 'function' ?
  201. content.call(this.$elm[0], function(newContent) {
  202. self.update(newContent);
  203. }) : content;
  204. if (this.content !== newContent) {
  205. this.$inner.empty().append(newContent);
  206. this.content = newContent;
  207. }
  208. this.refresh(async);
  209. },
  210. refresh: function(async) {
  211. if (this.disabled)
  212. return;
  213. if (async) {
  214. if (!this.$tip.data('active'))
  215. return;
  216. }
  217. this.$tip.css({left: 0, top: 0}).appendTo(document.body);
  218. if (this.opacity === undefined)
  219. this.opacity = this.$tip.css('opacity');
  220. this.calcPos();
  221. this.$tip.css({left: this.pos.l, top: this.pos.t});
  222. },
  223. display: function(hide) {
  224. var active = this.$tip.data('active');
  225. if (active && !hide || !active && hide)
  226. return;
  227.  
  228. this.$tip.stop();
  229. var from = {}, to = {};
  230. from.opacity = hide ? this.$tip.css('opacity') : 0;
  231. to.opacity = hide ? 0 : this.opacity;
  232. this.$tip.css(from).animate(to, 300);
  233.  
  234. hide ? this.$tip.queue($.proxy(this.reset, this)) : this.$tip.css('visibility', 'inherit');
  235. this.$tip.data('active', !active);
  236. },
  237. disable: function() {
  238. this.reset();
  239. this.disabled = true;
  240. },
  241. enable: function() {
  242. this.disabled = false;
  243. },
  244. destroy: function() {
  245. this.reset();
  246. this.$tip.remove();
  247. delete this.$tip;
  248. this.content = null;
  249. this.$elm.off('.jPopBox').removeData('jPopBox');
  250. tips.splice($.inArray(this, tips), 1);
  251. },
  252. clearTimeouts: function() {
  253. if (this.showTimeout) {
  254. clearTimeout(this.showTimeout);
  255. this.showTimeout = 0;
  256. }
  257. if (this.hideTimeout) {
  258. clearTimeout(this.hideTimeout);
  259. this.hideTimeout = 0;
  260. }
  261. },
  262. updateCursorPos: function(e) {
  263. this.eventX = e.pageX;
  264. this.eventY = e.pageY;
  265. },
  266. calcPos: function() {
  267. this.tipOuterW = this.$tip.outerWidth();
  268. this.tipOuterH = this.$tip.outerHeight();
  269. var pos = {l: 0, t: 0, arrow: ''},
  270. $win = $(window),
  271. win = {
  272. l: $win.scrollLeft(),
  273. t: $win.scrollTop(),
  274. w: $win.width(),
  275. h: $win.height()
  276. }, xL, xC, xR, yT, yC, yB,arrowOuterWH,placement,isAuto=false;
  277. var elmOffset = this.$elm.offset(),
  278. elm = {
  279. l: elmOffset.left,
  280. t: elmOffset.top,
  281. w: this.$elm.outerWidth(),
  282. h: this.$elm.outerHeight()
  283. };
  284. xL = elm.l; // left
  285. xC = xL + Math.floor(elm.w / 2); // h center
  286. xR = xL + elm.w; // right
  287. yT = elm.t; // top
  288. yC = yT + Math.floor(elm.h / 2); // v center
  289. yB = yT +elm.h; // bottom
  290. placement=this.opts.placement;
  291. var autoReg=/\s?auto?\s?/i;
  292. isAuto=autoReg.test(placement);
  293. if (isAuto) placement = placement.replace(autoReg, '') || 'top';
  294. //calc left position
  295. switch (placement) {
  296. case "top":
  297. case "bottom":
  298. pos.l = xC - Math.floor(this.tipOuterW / 2)-this.opts.offset.X;
  299. {
  300. if (pos.l + this.tipOuterW > win.l + win.w)
  301. pos.l = win.l + win.w - this.tipOuterW;
  302. else if (pos.l < win.l)
  303. pos.l = win.l;
  304. }
  305. break;
  306. case "right":
  307. arrowOuterWH=this.setArrowAndGetWH(placement);
  308. pos.l = xR + this.opts.offset.X+arrowOuterWH.W;
  309. if (isAuto && pos.l + this.tipOuterW > win.l + win.w){
  310. arrowOuterWH=this.setArrowAndGetWH("left");
  311. pos.l =xL - this.tipOuterW - this.opts.offset.X-arrowOuterWH.W;
  312. }
  313. break;
  314. case "left":
  315. arrowOuterWH=this.setArrowAndGetWH(placement);
  316. pos.l = xL - this.tipOuterW- this.opts.offset.X-arrowOuterWH.W;
  317. if (isAuto && pos.l < win.l){
  318. arrowOuterWH=this.setArrowAndGetWH("right");
  319. pos.l =xR + this.opts.offset.X+arrowOuterWH.W;
  320. }
  321. break;
  322. }
  323. //calc top position
  324. switch (placement) {
  325. case "top":
  326. arrowOuterWH=this.setArrowAndGetWH(placement);
  327. pos.t = yT - this.tipOuterH - this.opts.offset.Y-arrowOuterWH.H;
  328. if (isAuto && pos.t < win.t) {
  329. arrowOuterWH=this.setArrowAndGetWH("bottom");
  330. pos.t = yB + this.opts.offset.Y+arrowOuterWH.H;
  331. }
  332. break;
  333. case "bottom":
  334. arrowOuterWH=this.setArrowAndGetWH(placement);
  335. pos.t = yB+ this.opts.offset.Y +arrowOuterWH.H;
  336. if (isAuto && pos.t + this.tipOuterH > win.t + win.h) {
  337. arrowOuterWH=this.setArrowAndGetWH("top");
  338. pos.t = yT - this.tipOuterH - this.opts.offset.Y-arrowOuterWH.H;
  339. }
  340. break;
  341. case "right":
  342. case "left":
  343. pos.t = yC - Math.floor(this.tipOuterH / 2)-this.opts.offset.Y;
  344. {
  345. if (pos.t + this.tipOuterH > win.t + win.h){
  346. pos.t = win.t + win.h - this.tipOuterH;
  347. }
  348. else if (pos.t < win.t)
  349. pos.t = win.t;
  350. }
  351. break;
  352. }
  353. this.pos = pos;
  354. },
  355. setArrowAndGetWH:function(placement){
  356. var arrowOuteWH={};
  357. var W=0,H=0;
  358. if(this.$arrow.length){
  359. this.$arrow.attr("class", "JPopBox-tip-arrow JPopBox-tip-arrow-" + placement);
  360. W = this.$arrow.outerWidth();
  361. H = this.$arrow.outerHeight();
  362. }
  363. arrowOuteWH.W=W;
  364. arrowOuteWH.H=H;
  365. return arrowOuteWH;
  366. }
  367. };
  368. $.fn.jPopBox = function(options) {
  369. if (typeof options == 'string') {
  370. var args = arguments,
  371. method = options;
  372. Array.prototype.shift.call(args);
  373. if (method == 'destroy') {
  374. this.die ?
  375. this.die('mouseenter.jPopBox').die('focus.jPopBox') :
  376. $(document).undelegate(this.selector, 'mouseenter.jPopBox').undelegate(this.selector, 'focus.jPopBox');
  377. }
  378. return this.each(function() {
  379. var jPopBox = $(this).data('jPopBox');
  380. if (jPopBox && jPopBox[method])
  381. jPopBox[method].apply(jPopBox, args);
  382. });
  383. }
  384.  
  385. var opts = $.extend({}, $.fn.jPopBox.defaults, options);
  386. if (!$('#jPopBox-css-' + opts.className)[0])
  387. $(['<style id="jPopBox-css-',opts.className,'" type="text/css">',
  388. 'div.',opts.className,'{visibility:hidden;position:absolute;top:0;left:0;}',
  389. 'div.',opts.className,' div.JPopBox-tip-arrow{visibility:hidden;position:absolute;font:1px/1px sans-serif;}',
  390. '</style>'].join('')).appendTo('head');
  391.  
  392. return this.each(function() {
  393. new $.JPopBox(this, opts);
  394. });
  395. };
  396.  
  397. // default settings
  398. $.fn.jPopBox.defaults = {
  399. title:'', // 标题
  400. content:'', // 弹出框内容 ('string', element, function(updateCallback){...})
  401. className:'JPopBox-tip-white', // class名称
  402. placement:'top', // 如何定位弹出框 (top|bottom|left|right|auto)。当指定为 auto 时,会动态调整弹出框。例如,如果 placement 是 "auto left",弹出框将会尽可能显示在左边,在情况不允许的情况下它才会显示在右边
  403. delay:100, // 延迟显示和隐藏弹出框的毫秒数,对 trigger:none 手动触发类型不适用。如果提供的是一个数字,那么延迟将会应用于显示和隐藏。如果提供的是一个对象{ show: 500, hide: 100 },那么延迟将会分别应用于显示和隐藏
  404. trigger:'hover', // 如何触发弹出框 ('click',hover', 'focus', 'none'),none为手动触发
  405. offset:0, // 方向偏移量,值为负数时,将会反向偏移。如果提供的是一个数字,那么偏移量将会应用于X轴和Y轴。如果提供的是一个对象{ X:200, Y: 100 },那么偏移量将会分别应用于X轴和Y轴
  406. isShowArrow:true, // 是否显示指向箭头
  407. isTipHover:true // 是否允许在弹出框上移动,而不自动隐藏。只对trigger:hover有效。
  408. };
  409. })(jQuery);
  410.  
  411. /**
  412. * 字符串模板格式化
  413. * @param {string} formatStr - 字符串模板
  414. * @returns {string} 格式化后的字符串
  415. * @example
  416. * StringFormat("ab{0}c{1}ed",1,"q") output "ab1cqed"
  417. */
  418.  
  419.  
  420. function StringFormat(formatStr) {
  421. var args = arguments;
  422. return formatStr.replace(/\{(\d+)\}/g, function (m, i) {
  423. i = parseInt(i);
  424. return args[i + 1];
  425. });
  426. }
  427.  
  428. /**
  429. * 日期格式化
  430. * @param {Date} date - 日期
  431. * @param {string} formatStr - 格式化模板
  432. * @returns {string} 格式化日期后的字符串
  433. * @example
  434. * DateFormat(new Date(),"yyyy-MM-dd") output "2020-03-23"
  435. * @example
  436. * DateFormat(new Date(),"yyyy/MM/dd hh:mm:ss") output "2020/03/23 10:30:05"
  437. */
  438. function DateFormat(date, formatStr) {
  439. var o = {
  440. "M+": date.getMonth() + 1, //月份
  441. "d+": date.getDate(), //日
  442. "h+": date.getHours(), //小时
  443. "m+": date.getMinutes(), //分
  444. "s+": date.getSeconds(), //秒
  445. "q+": Math.floor((date.getMonth() + 3) / 3), //季度
  446. "S": date.getMilliseconds() //毫秒
  447. };
  448. if (/(y+)/.test(formatStr)) {
  449. formatStr = formatStr.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
  450. }
  451. for (var k in o) {
  452. if (new RegExp("(" + k + ")").test(formatStr)) {
  453. formatStr = formatStr.replace(
  454. RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  455. }
  456. }
  457. return formatStr;
  458. }
  459.  
  460. /**
  461. * 清除dom元素默认事件
  462. * @param {object} e - dom元素
  463. */
  464. function ClearBubble(e) {
  465. if (e.stopPropagation) {
  466. e.stopPropagation();
  467. } else {
  468. e.cancelBubble = true;
  469. }
  470. if (e.preventDefault) {
  471. e.preventDefault();
  472. } else {
  473. e.returnValue = false;
  474. }
  475. }
  476.  
  477. /**
  478. * 寻找最外层doc
  479. * @param _self
  480. * @param top
  481. * @returns {*|string|boolean|number|string|Window}
  482. */
  483. function searchOutDocument(_self, top) {
  484. try {
  485. while (top !== _self.top) {
  486. top = top.parent.document ? top.parent : _self.top;
  487. if (top.location.pathname === '/mycourse/studentstudy') break;
  488. }
  489. } catch (err) {
  490. top = _self;
  491. }
  492. return top;
  493. }
  494.  
  495. function imgOcrBase64(base64) {
  496. return new Promise((resolve, reject) => {
  497. GM_xmlhttpRequest({
  498. url: "https://appwk.baidu.com/naapi/api/totxt",
  499. method: "POST",
  500. headers:{
  501. 'Content-type':'application/x-www-form-urlencoded'
  502. },
  503. responseType: 'json',
  504. data: 'image='+encodeURIComponent(base64),
  505. onload: function (r) {
  506. try {
  507. const res = r.response.words_result.map(item => {
  508. return item.words
  509. }).join('');
  510. resolve(res);
  511. } catch (err) {
  512. resolve('');
  513. }
  514. }
  515. });
  516. })
  517. }
  518.  
  519. //面板
  520. var Panel={
  521. popBoxEl:{},
  522. randomCode:"",
  523. Create:function(title,placement,isShowArrow,content,shownFn){
  524. var self=this;
  525. $(self.popBoxEl).jPopBox({
  526. title: title,
  527. className: 'JPopBox-tip-white',
  528. placement: placement,
  529. trigger: 'none',
  530. isTipHover: true,
  531. isShowArrow: isShowArrow,
  532. content: function(){
  533. return StringFormat('<div id="panelBody{0}">{1}</div>',self.randomCode,content);
  534. }
  535. });
  536. $(self.popBoxEl).on("shown.jPopBox",function(){
  537. var $panel=$("div.JPopBox-tip-white");
  538. typeof shownFn === 'function' && shownFn($panel);
  539. });
  540. $(self.popBoxEl).jPopBox('show');
  541. },
  542. Update:function(Fn){
  543. var $panel=$("div.JPopBox-tip-white");
  544. Fn($panel);
  545. },
  546. Destroy:function(){
  547. //$(this.popBoxEl).jPopBox("hideDelayed");
  548. $(this.popBoxEl).jPopBox("destroy");
  549. },
  550. CreateStyle:function(){
  551. var s="";
  552. s+=StringFormat("#panelBody{0}>div input,#panelBody{0}>div select{padding: 3px; margin: 0; background: #fff; font-size: 14px; border: 1px solid #a9a9a9; color:black;width: auto;min-height: auto; }",this.randomCode);
  553. s+=StringFormat("#panelBody{0}>div:first-child{padding-bottom: 5px;height:30px}",this.randomCode);
  554. s+=StringFormat("#panelBody{0}>div:last-child hr{border: 1px inset #eeeeee;background: none;height: 0px;margin: 0px;}",this.randomCode);
  555. return s;
  556. }
  557. };
  558.  
  559. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  560.  
  561. function getDefaultExportFromCjs (x) {
  562. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  563. }
  564.  
  565. var sso_pb = {};
  566.  
  567. var googleProtobuf = {};
  568.  
  569. /*
  570.  
  571. Copyright The Closure Library Authors.
  572. SPDX-License-Identifier: Apache-2.0
  573. */
  574.  
  575. (function (exports) {
  576. var $jscomp = $jscomp || {};
  577. $jscomp.scope = {};
  578. $jscomp.findInternal = function (a, b, c) {
  579. a instanceof String && (a = String(a));
  580. for (var d = a.length, e = 0; e < d; e++) {
  581. var f = a[e];
  582. if (b.call(c, f, e, a)) return {i: e, v: f}
  583. }
  584. return {i: -1, v: void 0}
  585. };
  586. $jscomp.ASSUME_ES5 = !1;
  587. $jscomp.ASSUME_NO_NATIVE_MAP = !1;
  588. $jscomp.ASSUME_NO_NATIVE_SET = !1;
  589. $jscomp.SIMPLE_FROUND_POLYFILL = !1;
  590. $jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty : function (a, b, c) {
  591. a != Array.prototype && a != Object.prototype && (a[b] = c.value);
  592. };
  593. $jscomp.getGlobal = function (a) {
  594. return "undefined" != typeof window && window === a ? a : "undefined" != typeof commonjsGlobal && null != commonjsGlobal ? commonjsGlobal : a
  595. };
  596. $jscomp.global = $jscomp.getGlobal(commonjsGlobal);
  597. $jscomp.polyfill = function (a, b, c, d) {
  598. if (b) {
  599. c = $jscomp.global;
  600. a = a.split(".");
  601. for (d = 0; d < a.length - 1; d++) {
  602. var e = a[d];
  603. e in c || (c[e] = {});
  604. c = c[e];
  605. }
  606. a = a[a.length - 1];
  607. d = c[a];
  608. b = b(d);
  609. b != d && null != b && $jscomp.defineProperty(c, a, {configurable: !0, writable: !0, value: b});
  610. }
  611. };
  612. $jscomp.polyfill("Array.prototype.findIndex", function (a) {
  613. return a ? a : function (a, c) {
  614. return $jscomp.findInternal(this, a, c).i
  615. }
  616. }, "es6", "es3");
  617. $jscomp.checkStringArgs = function (a, b, c) {
  618. if (null == a) throw new TypeError("The 'this' value for String.prototype." + c + " must not be null or undefined");
  619. if (b instanceof RegExp) throw new TypeError("First argument to String.prototype." + c + " must not be a regular expression");
  620. return a + ""
  621. };
  622. $jscomp.polyfill("String.prototype.endsWith", function (a) {
  623. return a ? a : function (a, c) {
  624. var b = $jscomp.checkStringArgs(this, a, "endsWith");
  625. a += "";
  626. void 0 === c && (c = b.length);
  627. c = Math.max(0, Math.min(c | 0, b.length));
  628. for (var e = a.length; 0 < e && 0 < c;) if (b[--c] != a[--e]) return !1;
  629. return 0 >= e
  630. }
  631. }, "es6", "es3");
  632. $jscomp.polyfill("Array.prototype.find", function (a) {
  633. return a ? a : function (a, c) {
  634. return $jscomp.findInternal(this, a, c).v
  635. }
  636. }, "es6", "es3");
  637. $jscomp.polyfill("String.prototype.startsWith", function (a) {
  638. return a ? a : function (a, c) {
  639. var b = $jscomp.checkStringArgs(this, a, "startsWith");
  640. a += "";
  641. var e = b.length, f = a.length;
  642. c = Math.max(0, Math.min(c | 0, b.length));
  643. for (var g = 0; g < f && c < e;) if (b[c++] != a[g++]) return !1;
  644. return g >= f
  645. }
  646. }, "es6", "es3");
  647. $jscomp.polyfill("String.prototype.repeat", function (a) {
  648. return a ? a : function (a) {
  649. var b = $jscomp.checkStringArgs(this, null, "repeat");
  650. if (0 > a || 1342177279 < a) throw new RangeError("Invalid count value");
  651. a |= 0;
  652. for (var d = ""; a;) if (a & 1 && (d += b), a >>>= 1) b += b;
  653. return d
  654. }
  655. }, "es6", "es3");
  656. var COMPILED = !0, goog = goog || {};
  657. goog.global = commonjsGlobal || self;
  658. goog.exportPath_ = function (a, b, c) {
  659. a = a.split(".");
  660. c = c || goog.global;
  661. a[0] in c || "undefined" == typeof c.execScript || c.execScript("var " + a[0]);
  662. for (var d; a.length && (d = a.shift());) a.length || void 0 === b ? c = c[d] && c[d] !== Object.prototype[d] ? c[d] : c[d] = {} : c[d] = b;
  663. };
  664. goog.define = function (a, b) {
  665. return b
  666. };
  667. goog.FEATURESET_YEAR = 2012;
  668. goog.DEBUG = !0;
  669. goog.LOCALE = "en";
  670. goog.TRUSTED_SITE = !0;
  671. goog.STRICT_MODE_COMPATIBLE = !1;
  672. goog.DISALLOW_TEST_ONLY_CODE = !goog.DEBUG;
  673. goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1;
  674. goog.provide = function (a) {
  675. if (goog.isInModuleLoader_()) throw Error("goog.provide cannot be used within a module.");
  676. goog.constructNamespace_(a);
  677. };
  678. goog.constructNamespace_ = function (a, b) {
  679. goog.exportPath_(a, b);
  680. };
  681. goog.getScriptNonce = function (a) {
  682. if (a && a != goog.global) return goog.getScriptNonce_(a.document);
  683. null === goog.cspNonce_ && (goog.cspNonce_ = goog.getScriptNonce_(goog.global.document));
  684. return goog.cspNonce_
  685. };
  686. goog.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/;
  687. goog.cspNonce_ = null;
  688. goog.getScriptNonce_ = function (a) {
  689. return (a = a.querySelector && a.querySelector("script[nonce]")) && (a = a.nonce || a.getAttribute("nonce")) && goog.NONCE_PATTERN_.test(a) ? a : ""
  690. };
  691. goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
  692. goog.module = function (a) {
  693. if ("string" !== typeof a || !a || -1 == a.search(goog.VALID_MODULE_RE_)) throw Error("Invalid module identifier");
  694. if (!goog.isInGoogModuleLoader_()) throw Error("Module " + a + " has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");
  695. if (goog.moduleLoaderState_.moduleName) throw Error("goog.module may only be called once per module.");
  696. goog.moduleLoaderState_.moduleName = a;
  697. };
  698. goog.module.get = function (a) {
  699. return goog.module.getInternal_(a)
  700. };
  701. goog.module.getInternal_ = function (a) {
  702. return null
  703. };
  704. goog.ModuleType = {ES6: "es6", GOOG: "goog"};
  705. goog.moduleLoaderState_ = null;
  706. goog.isInModuleLoader_ = function () {
  707. return goog.isInGoogModuleLoader_() || goog.isInEs6ModuleLoader_()
  708. };
  709. goog.isInGoogModuleLoader_ = function () {
  710. return !!goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.GOOG
  711. };
  712. goog.isInEs6ModuleLoader_ = function () {
  713. if (goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.ES6) return !0;
  714. var a = goog.global.$jscomp;
  715. return a ? "function" != typeof a.getCurrentModulePath ? !1 : !!a.getCurrentModulePath() : !1
  716. };
  717. goog.module.declareLegacyNamespace = function () {
  718. goog.moduleLoaderState_.declareLegacyNamespace = !0;
  719. };
  720. goog.declareModuleId = function (a) {
  721. if (goog.moduleLoaderState_) goog.moduleLoaderState_.moduleName = a; else {
  722. var b = goog.global.$jscomp;
  723. if (!b || "function" != typeof b.getCurrentModulePath) throw Error('Module with namespace "' +
  724. a + '" has been loaded incorrectly.');
  725. b = b.require(b.getCurrentModulePath());
  726. goog.loadedModules_[a] = {exports: b, type: goog.ModuleType.ES6, moduleId: a};
  727. }
  728. };
  729. goog.setTestOnly = function (a) {
  730. if (goog.DISALLOW_TEST_ONLY_CODE) throw a = a || "", Error("Importing test-only code into non-debug environment" + (a ? ": " + a : "."));
  731. };
  732. goog.forwardDeclare = function (a) {
  733. };
  734. goog.getObjectByName = function (a, b) {
  735. a = a.split(".");
  736. b = b || goog.global;
  737. for (var c = 0; c < a.length; c++) if (b = b[a[c]], null == b) return null;
  738. return b
  739. };
  740. goog.globalize = function (a, b) {
  741. b = b || goog.global;
  742. for (var c in a) b[c] = a[c];
  743. };
  744. goog.addDependency = function (a, b, c, d) {
  745. };
  746. goog.ENABLE_DEBUG_LOADER = !0;
  747. goog.logToConsole_ = function (a) {
  748. goog.global.console && goog.global.console.error(a);
  749. };
  750. goog.require = function (a) {
  751. };
  752. goog.requireType = function (a) {
  753. return {}
  754. };
  755. goog.basePath = "";
  756. goog.nullFunction = function () {
  757. };
  758. goog.abstractMethod = function () {
  759. throw Error("unimplemented abstract method");
  760. };
  761. goog.addSingletonGetter = function (a) {
  762. a.instance_ = void 0;
  763. a.getInstance = function () {
  764. if (a.instance_) return a.instance_;
  765. goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a);
  766. return a.instance_ = new a
  767. };
  768. };
  769. goog.instantiatedSingletons_ = [];
  770. goog.LOAD_MODULE_USING_EVAL = !0;
  771. goog.SEAL_MODULE_EXPORTS = goog.DEBUG;
  772. goog.loadedModules_ = {};
  773. goog.DEPENDENCIES_ENABLED = !COMPILED ;
  774. goog.TRANSPILE = "detect";
  775. goog.ASSUME_ES_MODULES_TRANSPILED = !1;
  776. goog.TRANSPILE_TO_LANGUAGE = "";
  777. goog.TRANSPILER = "transpile.js";
  778. goog.hasBadLetScoping = null;
  779. goog.useSafari10Workaround = function () {
  780. if (null == goog.hasBadLetScoping) {
  781. try {
  782. var a = !eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";');
  783. } catch (b) {
  784. a = !1;
  785. }
  786. goog.hasBadLetScoping = a;
  787. }
  788. return goog.hasBadLetScoping
  789. };
  790. goog.workaroundSafari10EvalBug = function (a) {
  791. return "(function(){" + a + "\n;})();\n"
  792. };
  793. goog.loadModule = function (a) {
  794. var b = goog.moduleLoaderState_;
  795. try {
  796. goog.moduleLoaderState_ = {moduleName: "", declareLegacyNamespace: !1, type: goog.ModuleType.GOOG};
  797. if (goog.isFunction(a)) var c = a.call(void 0, {}); else if ("string" === typeof a) goog.useSafari10Workaround() && (a = goog.workaroundSafari10EvalBug(a)), c = goog.loadModuleFromSource_.call(void 0, a); else throw Error("Invalid module definition");
  798. var d = goog.moduleLoaderState_.moduleName;
  799. if ("string" === typeof d && d) goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(d,
  800. c) : goog.SEAL_MODULE_EXPORTS && Object.seal && "object" == typeof c && null != c && Object.seal(c), goog.loadedModules_[d] = {
  801. exports: c,
  802. type: goog.ModuleType.GOOG,
  803. moduleId: goog.moduleLoaderState_.moduleName
  804. }; else throw Error('Invalid module name "' + d + '"');
  805. } finally {
  806. goog.moduleLoaderState_ = b;
  807. }
  808. };
  809. goog.loadModuleFromSource_ = function (a) {
  810. eval(a);
  811. return {}
  812. };
  813. goog.normalizePath_ = function (a) {
  814. a = a.split("/");
  815. for (var b = 0; b < a.length;) "." == a[b] ? a.splice(b, 1) : b && ".." == a[b] && a[b - 1] && ".." != a[b - 1] ? a.splice(--b, 2) : b++;
  816. return a.join("/")
  817. };
  818. goog.loadFileSync_ = function (a) {
  819. if (goog.global.CLOSURE_LOAD_FILE_SYNC) return goog.global.CLOSURE_LOAD_FILE_SYNC(a);
  820. try {
  821. var b = new goog.global.XMLHttpRequest;
  822. b.open("get", a, !1);
  823. b.send();
  824. return 0 == b.status || 200 == b.status ? b.responseText : null
  825. } catch (c) {
  826. return null
  827. }
  828. };
  829. goog.transpile_ = function (a, b, c) {
  830. var d = goog.global.$jscomp;
  831. d || (goog.global.$jscomp = d = {});
  832. var e = d.transpile;
  833. if (!e) {
  834. var f = goog.basePath + goog.TRANSPILER, g = goog.loadFileSync_(f);
  835. if (g) {
  836. (function () {
  837. (0, eval)(g + "\n//# sourceURL=" + f);
  838. }).call(goog.global);
  839. if (goog.global.$gwtExport && goog.global.$gwtExport.$jscomp && !goog.global.$gwtExport.$jscomp.transpile) throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: ' + JSON.stringify(goog.global.$gwtExport));
  840. goog.global.$jscomp.transpile =
  841. goog.global.$gwtExport.$jscomp.transpile;
  842. d = goog.global.$jscomp;
  843. e = d.transpile;
  844. }
  845. }
  846. e || (e = d.transpile = function (a, b) {
  847. goog.logToConsole_(b + " requires transpilation but no transpiler was found.");
  848. return a
  849. });
  850. return e(a, b, c)
  851. };
  852. goog.typeOf = function (a) {
  853. var b = typeof a;
  854. if ("object" == b) if (a) {
  855. if (a instanceof Array) return "array";
  856. if (a instanceof Object) return b;
  857. var c = Object.prototype.toString.call(a);
  858. if ("[object Window]" == c) return "object";
  859. if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) return "array";
  860. if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) return "function"
  861. } else return "null";
  862. else if ("function" == b && "undefined" == typeof a.call) return "object";
  863. return b
  864. };
  865. goog.isArray = function (a) {
  866. return "array" == goog.typeOf(a)
  867. };
  868. goog.isArrayLike = function (a) {
  869. var b = goog.typeOf(a);
  870. return "array" == b || "object" == b && "number" == typeof a.length
  871. };
  872. goog.isDateLike = function (a) {
  873. return goog.isObject(a) && "function" == typeof a.getFullYear
  874. };
  875. goog.isFunction = function (a) {
  876. return "function" == goog.typeOf(a)
  877. };
  878. goog.isObject = function (a) {
  879. var b = typeof a;
  880. return "object" == b && null != a || "function" == b
  881. };
  882. goog.getUid = function (a) {
  883. return Object.prototype.hasOwnProperty.call(a, goog.UID_PROPERTY_) && a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_)
  884. };
  885. goog.hasUid = function (a) {
  886. return !!a[goog.UID_PROPERTY_]
  887. };
  888. goog.removeUid = function (a) {
  889. null !== a && "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
  890. try {
  891. delete a[goog.UID_PROPERTY_];
  892. } catch (b) {
  893. }
  894. };
  895. goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0);
  896. goog.uidCounter_ = 0;
  897. goog.getHashCode = goog.getUid;
  898. goog.removeHashCode = goog.removeUid;
  899. goog.cloneObject = function (a) {
  900. var b = goog.typeOf(a);
  901. if ("object" == b || "array" == b) {
  902. if ("function" === typeof a.clone) return a.clone();
  903. b = "array" == b ? [] : {};
  904. for (var c in a) b[c] = goog.cloneObject(a[c]);
  905. return b
  906. }
  907. return a
  908. };
  909. goog.bindNative_ = function (a, b, c) {
  910. return a.call.apply(a.bind, arguments)
  911. };
  912. goog.bindJs_ = function (a, b, c) {
  913. if (!a) throw Error();
  914. if (2 < arguments.length) {
  915. var d = Array.prototype.slice.call(arguments, 2);
  916. return function () {
  917. var c = Array.prototype.slice.call(arguments);
  918. Array.prototype.unshift.apply(c, d);
  919. return a.apply(b, c)
  920. }
  921. }
  922. return function () {
  923. return a.apply(b, arguments)
  924. }
  925. };
  926. goog.bind = function (a, b, c) {
  927. Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bind = goog.bindNative_ : goog.bind = goog.bindJs_;
  928. return goog.bind.apply(null, arguments)
  929. };
  930. goog.partial = function (a, b) {
  931. var c = Array.prototype.slice.call(arguments, 1);
  932. return function () {
  933. var b = c.slice();
  934. b.push.apply(b, arguments);
  935. return a.apply(this, b)
  936. }
  937. };
  938. goog.mixin = function (a, b) {
  939. for (var c in b) a[c] = b[c];
  940. };
  941. goog.now = goog.TRUSTED_SITE && Date.now || function () {
  942. return +new Date
  943. };
  944. goog.globalEval = function (a) {
  945. if (goog.global.execScript) goog.global.execScript(a, "JavaScript"); else if (goog.global.eval) {
  946. if (null == goog.evalWorksForGlobals_) {
  947. try {
  948. goog.global.eval("var _evalTest_ = 1;");
  949. } catch (d) {
  950. }
  951. if ("undefined" != typeof goog.global._evalTest_) {
  952. try {
  953. delete goog.global._evalTest_;
  954. } catch (d) {
  955. }
  956. goog.evalWorksForGlobals_ = !0;
  957. } else goog.evalWorksForGlobals_ = !1;
  958. }
  959. if (goog.evalWorksForGlobals_) goog.global.eval(a); else {
  960. var b = goog.global.document, c = b.createElement("script");
  961. c.type = "text/javascript";
  962. c.defer =
  963. !1;
  964. c.appendChild(b.createTextNode(a));
  965. b.head.appendChild(c);
  966. b.head.removeChild(c);
  967. }
  968. } else throw Error("goog.globalEval not available");
  969. };
  970. goog.evalWorksForGlobals_ = null;
  971. goog.getCssName = function (a, b) {
  972. if ("." == String(a).charAt(0)) throw Error('className passed in goog.getCssName must not start with ".". You passed: ' + a);
  973. var c = function (a) {
  974. return goog.cssNameMapping_[a] || a
  975. }, d = function (a) {
  976. a = a.split("-");
  977. for (var b = [], d = 0; d < a.length; d++) b.push(c(a[d]));
  978. return b.join("-")
  979. };
  980. d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function (a) {
  981. return a
  982. };
  983. a = b ? a + "-" + d(b) : d(a);
  984. return goog.global.CLOSURE_CSS_NAME_MAP_FN ? goog.global.CLOSURE_CSS_NAME_MAP_FN(a) : a
  985. };
  986. goog.setCssNameMapping = function (a, b) {
  987. goog.cssNameMapping_ = a;
  988. goog.cssNameMappingStyle_ = b;
  989. };
  990. goog.getMsg = function (a, b, c) {
  991. c && c.html && (a = a.replace(/</g, "&lt;"));
  992. b && (a = a.replace(/\{\$([^}]+)}/g, function (a, c) {
  993. return null != b && c in b ? b[c] : a
  994. }));
  995. return a
  996. };
  997. goog.getMsgWithFallback = function (a, b) {
  998. return a
  999. };
  1000. goog.exportSymbol = function (a, b, c) {
  1001. goog.exportPath_(a, b, c);
  1002. };
  1003. goog.exportProperty = function (a, b, c) {
  1004. a[b] = c;
  1005. };
  1006. goog.inherits = function (a, b) {
  1007. function c() {
  1008. }
  1009.  
  1010. c.prototype = b.prototype;
  1011. a.superClass_ = b.prototype;
  1012. a.prototype = new c;
  1013. a.prototype.constructor = a;
  1014. a.base = function (a, c, f) {
  1015. for (var d = Array(arguments.length - 2), e = 2; e < arguments.length; e++) d[e - 2] = arguments[e];
  1016. return b.prototype[c].apply(a, d)
  1017. };
  1018. };
  1019. goog.scope = function (a) {
  1020. if (goog.isInModuleLoader_()) throw Error("goog.scope is not supported within a module.");
  1021. a.call(goog.global);
  1022. };
  1023. goog.defineClass = function (a, b) {
  1024. var c = b.constructor, d = b.statics;
  1025. c && c != Object.prototype.constructor || (c = function () {
  1026. throw Error("cannot instantiate an interface (no constructor defined).");
  1027. });
  1028. c = goog.defineClass.createSealingConstructor_(c, a);
  1029. a && goog.inherits(c, a);
  1030. delete b.constructor;
  1031. delete b.statics;
  1032. goog.defineClass.applyProperties_(c.prototype, b);
  1033. null != d && (d instanceof Function ? d(c) : goog.defineClass.applyProperties_(c, d));
  1034. return c
  1035. };
  1036. goog.defineClass.SEAL_CLASS_INSTANCES = goog.DEBUG;
  1037. goog.defineClass.createSealingConstructor_ = function (a, b) {
  1038. if (!goog.defineClass.SEAL_CLASS_INSTANCES) return a;
  1039. var c = !goog.defineClass.isUnsealable_(b), d = function () {
  1040. var b = a.apply(this, arguments) || this;
  1041. b[goog.UID_PROPERTY_] = b[goog.UID_PROPERTY_];
  1042. this.constructor === d && c && Object.seal instanceof Function && Object.seal(b);
  1043. return b
  1044. };
  1045. return d
  1046. };
  1047. goog.defineClass.isUnsealable_ = function (a) {
  1048. return a && a.prototype && a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]
  1049. };
  1050. goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
  1051. goog.defineClass.applyProperties_ = function (a, b) {
  1052. for (var c in b) Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]);
  1053. for (var d = 0; d < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; d++) c = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[d], Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]);
  1054. };
  1055. goog.tagUnsealableClass = function (a) {
  1056. };
  1057. goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = "goog_defineClass_legacy_unsealable";
  1058. goog.TRUSTED_TYPES_POLICY_NAME = "";
  1059. goog.identity_ = function (a) {
  1060. return a
  1061. };
  1062. goog.createTrustedTypesPolicy = function (a) {
  1063. var b = null, c = goog.global.trustedTypes || goog.global.TrustedTypes;
  1064. if (!c || !c.createPolicy) return b;
  1065. try {
  1066. b = c.createPolicy(a, {
  1067. createHTML: goog.identity_,
  1068. createScript: goog.identity_,
  1069. createScriptURL: goog.identity_,
  1070. createURL: goog.identity_
  1071. });
  1072. } catch (d) {
  1073. goog.logToConsole_(d.message);
  1074. }
  1075. return b
  1076. };
  1077. goog.TRUSTED_TYPES_POLICY_ = goog.TRUSTED_TYPES_POLICY_NAME ? goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME + "#base") : null;
  1078. goog.object = {};
  1079. goog.object.is = function (a, b) {
  1080. return a === b ? 0 !== a || 1 / a === 1 / b : a !== a && b !== b
  1081. };
  1082. goog.object.forEach = function (a, b, c) {
  1083. for (var d in a) b.call(c, a[d], d, a);
  1084. };
  1085. goog.object.filter = function (a, b, c) {
  1086. var d = {}, e;
  1087. for (e in a) b.call(c, a[e], e, a) && (d[e] = a[e]);
  1088. return d
  1089. };
  1090. goog.object.map = function (a, b, c) {
  1091. var d = {}, e;
  1092. for (e in a) d[e] = b.call(c, a[e], e, a);
  1093. return d
  1094. };
  1095. goog.object.some = function (a, b, c) {
  1096. for (var d in a) if (b.call(c, a[d], d, a)) return !0;
  1097. return !1
  1098. };
  1099. goog.object.every = function (a, b, c) {
  1100. for (var d in a) if (!b.call(c, a[d], d, a)) return !1;
  1101. return !0
  1102. };
  1103. goog.object.getCount = function (a) {
  1104. var b = 0, c;
  1105. for (c in a) b++;
  1106. return b
  1107. };
  1108. goog.object.getAnyKey = function (a) {
  1109. for (var b in a) return b
  1110. };
  1111. goog.object.getAnyValue = function (a) {
  1112. for (var b in a) return a[b]
  1113. };
  1114. goog.object.contains = function (a, b) {
  1115. return goog.object.containsValue(a, b)
  1116. };
  1117. goog.object.getValues = function (a) {
  1118. var b = [], c = 0, d;
  1119. for (d in a) b[c++] = a[d];
  1120. return b
  1121. };
  1122. goog.object.getKeys = function (a) {
  1123. var b = [], c = 0, d;
  1124. for (d in a) b[c++] = d;
  1125. return b
  1126. };
  1127. goog.object.getValueByKeys = function (a, b) {
  1128. var c = goog.isArrayLike(b), d = c ? b : arguments;
  1129. for (c = c ? 0 : 1; c < d.length; c++) {
  1130. if (null == a) return;
  1131. a = a[d[c]];
  1132. }
  1133. return a
  1134. };
  1135. goog.object.containsKey = function (a, b) {
  1136. return null !== a && b in a
  1137. };
  1138. goog.object.containsValue = function (a, b) {
  1139. for (var c in a) if (a[c] == b) return !0;
  1140. return !1
  1141. };
  1142. goog.object.findKey = function (a, b, c) {
  1143. for (var d in a) if (b.call(c, a[d], d, a)) return d
  1144. };
  1145. goog.object.findValue = function (a, b, c) {
  1146. return (b = goog.object.findKey(a, b, c)) && a[b]
  1147. };
  1148. goog.object.isEmpty = function (a) {
  1149. for (var b in a) return !1;
  1150. return !0
  1151. };
  1152. goog.object.clear = function (a) {
  1153. for (var b in a) delete a[b];
  1154. };
  1155. goog.object.remove = function (a, b) {
  1156. var c;
  1157. (c = b in a) && delete a[b];
  1158. return c
  1159. };
  1160. goog.object.add = function (a, b, c) {
  1161. if (null !== a && b in a) throw Error('The object already contains the key "' + b + '"');
  1162. goog.object.set(a, b, c);
  1163. };
  1164. goog.object.get = function (a, b, c) {
  1165. return null !== a && b in a ? a[b] : c
  1166. };
  1167. goog.object.set = function (a, b, c) {
  1168. a[b] = c;
  1169. };
  1170. goog.object.setIfUndefined = function (a, b, c) {
  1171. return b in a ? a[b] : a[b] = c
  1172. };
  1173. goog.object.setWithReturnValueIfNotSet = function (a, b, c) {
  1174. if (b in a) return a[b];
  1175. c = c();
  1176. return a[b] = c
  1177. };
  1178. goog.object.equals = function (a, b) {
  1179. for (var c in a) if (!(c in b) || a[c] !== b[c]) return !1;
  1180. for (var d in b) if (!(d in a)) return !1;
  1181. return !0
  1182. };
  1183. goog.object.clone = function (a) {
  1184. var b = {}, c;
  1185. for (c in a) b[c] = a[c];
  1186. return b
  1187. };
  1188. goog.object.unsafeClone = function (a) {
  1189. var b = goog.typeOf(a);
  1190. if ("object" == b || "array" == b) {
  1191. if (goog.isFunction(a.clone)) return a.clone();
  1192. b = "array" == b ? [] : {};
  1193. for (var c in a) b[c] = goog.object.unsafeClone(a[c]);
  1194. return b
  1195. }
  1196. return a
  1197. };
  1198. goog.object.transpose = function (a) {
  1199. var b = {}, c;
  1200. for (c in a) b[a[c]] = c;
  1201. return b
  1202. };
  1203. goog.object.PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
  1204. goog.object.extend = function (a, b) {
  1205. for (var c, d, e = 1; e < arguments.length; e++) {
  1206. d = arguments[e];
  1207. for (c in d) a[c] = d[c];
  1208. for (var f = 0; f < goog.object.PROTOTYPE_FIELDS_.length; f++) c = goog.object.PROTOTYPE_FIELDS_[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]);
  1209. }
  1210. };
  1211. goog.object.create = function (a) {
  1212. var b = arguments.length;
  1213. if (1 == b && Array.isArray(arguments[0])) return goog.object.create.apply(null, arguments[0]);
  1214. if (b % 2) throw Error("Uneven number of arguments");
  1215. for (var c = {}, d = 0; d < b; d += 2) c[arguments[d]] = arguments[d + 1];
  1216. return c
  1217. };
  1218. goog.object.createSet = function (a) {
  1219. var b = arguments.length;
  1220. if (1 == b && Array.isArray(arguments[0])) return goog.object.createSet.apply(null, arguments[0]);
  1221. for (var c = {}, d = 0; d < b; d++) c[arguments[d]] = !0;
  1222. return c
  1223. };
  1224. goog.object.createImmutableView = function (a) {
  1225. var b = a;
  1226. Object.isFrozen && !Object.isFrozen(a) && (b = Object.create(a), Object.freeze(b));
  1227. return b
  1228. };
  1229. goog.object.isImmutableView = function (a) {
  1230. return !!Object.isFrozen && Object.isFrozen(a)
  1231. };
  1232. goog.object.getAllPropertyNames = function (a, b, c) {
  1233. if (!a) return [];
  1234. if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) return goog.object.getKeys(a);
  1235. for (var d = {}; a && (a !== Object.prototype || b) && (a !== Function.prototype || c);) {
  1236. for (var e = Object.getOwnPropertyNames(a), f = 0; f < e.length; f++) d[e[f]] = !0;
  1237. a = Object.getPrototypeOf(a);
  1238. }
  1239. return goog.object.getKeys(d)
  1240. };
  1241. goog.object.getSuperClass = function (a) {
  1242. return (a = Object.getPrototypeOf(a.prototype)) && a.constructor
  1243. };
  1244. var jspb = {asserts: {}};
  1245. jspb.asserts.doAssertFailure = function (a, b, c, d) {
  1246. var e = "Assertion failed";
  1247. if (c) {
  1248. e += ": " + c;
  1249. var f = d;
  1250. } else a && (e += ": " + a, f = b);
  1251. throw Error("" + e, f || []);
  1252. };
  1253. jspb.asserts.assert = function (a, b, c) {
  1254. for (var d = [], e = 2; e < arguments.length; ++e) d[e - 2] = arguments[e];
  1255. a || jspb.asserts.doAssertFailure("", null, b, d);
  1256. return a
  1257. };
  1258. jspb.asserts.assertString = function (a, b, c) {
  1259. for (var d = [], e = 2; e < arguments.length; ++e) d[e - 2] = arguments[e];
  1260. "string" !== typeof a && jspb.asserts.doAssertFailure("Expected string but got %s: %s.", [goog.typeOf(a), a], b, d);
  1261. return a
  1262. };
  1263. jspb.asserts.assertArray = function (a, b, c) {
  1264. for (var d = [], e = 2; e < arguments.length; ++e) d[e - 2] = arguments[e];
  1265. Array.isArray(a) || jspb.asserts.doAssertFailure("Expected array but got %s: %s.", [goog.typeOf(a), a], b, d);
  1266. return a
  1267. };
  1268. jspb.asserts.fail = function (a, b) {
  1269. for (var c = [], d = 1; d < arguments.length; ++d) c[d - 1] = arguments[d];
  1270. throw Error("Failure" + (a ? ": " + a : ""), c);
  1271. };
  1272. jspb.asserts.assertInstanceof = function (a, b, c, d) {
  1273. for (var e = [], f = 3; f < arguments.length; ++f) e[f - 3] = arguments[f];
  1274. a instanceof b || jspb.asserts.doAssertFailure("Expected instanceof %s but got %s.", [jspb.asserts.getType(b), jspb.asserts.getType(a)], c, e);
  1275. return a
  1276. };
  1277. jspb.asserts.getType = function (a) {
  1278. return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" : typeof a
  1279. };
  1280. jspb.BinaryConstants = {};
  1281. jspb.ConstBinaryMessage = function () {
  1282. };
  1283. jspb.BinaryMessage = function () {
  1284. };
  1285. jspb.BinaryConstants.FieldType = {
  1286. INVALID: -1,
  1287. DOUBLE: 1,
  1288. FLOAT: 2,
  1289. INT64: 3,
  1290. UINT64: 4,
  1291. INT32: 5,
  1292. FIXED64: 6,
  1293. FIXED32: 7,
  1294. BOOL: 8,
  1295. STRING: 9,
  1296. GROUP: 10,
  1297. MESSAGE: 11,
  1298. BYTES: 12,
  1299. UINT32: 13,
  1300. ENUM: 14,
  1301. SFIXED32: 15,
  1302. SFIXED64: 16,
  1303. SINT32: 17,
  1304. SINT64: 18,
  1305. FHASH64: 30,
  1306. VHASH64: 31
  1307. };
  1308. jspb.BinaryConstants.WireType = {
  1309. INVALID: -1,
  1310. VARINT: 0,
  1311. FIXED64: 1,
  1312. DELIMITED: 2,
  1313. START_GROUP: 3,
  1314. END_GROUP: 4,
  1315. FIXED32: 5
  1316. };
  1317. jspb.BinaryConstants.FieldTypeToWireType = function (a) {
  1318. var b = jspb.BinaryConstants.FieldType, c = jspb.BinaryConstants.WireType;
  1319. switch (a) {
  1320. case b.INT32:
  1321. case b.INT64:
  1322. case b.UINT32:
  1323. case b.UINT64:
  1324. case b.SINT32:
  1325. case b.SINT64:
  1326. case b.BOOL:
  1327. case b.ENUM:
  1328. case b.VHASH64:
  1329. return c.VARINT;
  1330. case b.DOUBLE:
  1331. case b.FIXED64:
  1332. case b.SFIXED64:
  1333. case b.FHASH64:
  1334. return c.FIXED64;
  1335. case b.STRING:
  1336. case b.MESSAGE:
  1337. case b.BYTES:
  1338. return c.DELIMITED;
  1339. case b.FLOAT:
  1340. case b.FIXED32:
  1341. case b.SFIXED32:
  1342. return c.FIXED32;
  1343. default:
  1344. return c.INVALID
  1345. }
  1346. };
  1347. jspb.BinaryConstants.INVALID_FIELD_NUMBER = -1;
  1348. jspb.BinaryConstants.FLOAT32_EPS = 1.401298464324817E-45;
  1349. jspb.BinaryConstants.FLOAT32_MIN = 1.1754943508222875E-38;
  1350. jspb.BinaryConstants.FLOAT32_MAX = 3.4028234663852886E38;
  1351. jspb.BinaryConstants.FLOAT64_EPS = 4.9E-324;
  1352. jspb.BinaryConstants.FLOAT64_MIN = 2.2250738585072014E-308;
  1353. jspb.BinaryConstants.FLOAT64_MAX = 1.7976931348623157E308;
  1354. jspb.BinaryConstants.TWO_TO_20 = 1048576;
  1355. jspb.BinaryConstants.TWO_TO_23 = 8388608;
  1356. jspb.BinaryConstants.TWO_TO_31 = 2147483648;
  1357. jspb.BinaryConstants.TWO_TO_32 = 4294967296;
  1358. jspb.BinaryConstants.TWO_TO_52 = 4503599627370496;
  1359. jspb.BinaryConstants.TWO_TO_63 = 0x7fffffffffffffff;
  1360. jspb.BinaryConstants.TWO_TO_64 = 1.8446744073709552E19;
  1361. jspb.BinaryConstants.ZERO_HASH = "\x00\x00\x00\x00\x00\x00\x00\x00";
  1362. goog.debug = {};
  1363. goog.debug.Error = function (a) {
  1364. if (Error.captureStackTrace) Error.captureStackTrace(this, goog.debug.Error); else {
  1365. var b = Error().stack;
  1366. b && (this.stack = b);
  1367. }
  1368. a && (this.message = String(a));
  1369. this.reportErrorToServer = !0;
  1370. };
  1371. goog.inherits(goog.debug.Error, Error);
  1372. goog.debug.Error.prototype.name = "CustomError";
  1373. goog.dom = {};
  1374. goog.dom.NodeType = {
  1375. ELEMENT: 1,
  1376. ATTRIBUTE: 2,
  1377. TEXT: 3,
  1378. CDATA_SECTION: 4,
  1379. ENTITY_REFERENCE: 5,
  1380. ENTITY: 6,
  1381. PROCESSING_INSTRUCTION: 7,
  1382. COMMENT: 8,
  1383. DOCUMENT: 9,
  1384. DOCUMENT_TYPE: 10,
  1385. DOCUMENT_FRAGMENT: 11,
  1386. NOTATION: 12
  1387. };
  1388. goog.asserts = {};
  1389. goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
  1390. goog.asserts.AssertionError = function (a, b) {
  1391. goog.debug.Error.call(this, goog.asserts.subs_(a, b));
  1392. this.messagePattern = a;
  1393. };
  1394. goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
  1395. goog.asserts.AssertionError.prototype.name = "AssertionError";
  1396. goog.asserts.DEFAULT_ERROR_HANDLER = function (a) {
  1397. throw a;
  1398. };
  1399. goog.asserts.errorHandler_ = goog.asserts.DEFAULT_ERROR_HANDLER;
  1400. goog.asserts.subs_ = function (a, b) {
  1401. a = a.split("%s");
  1402. for (var c = "", d = a.length - 1, e = 0; e < d; e++) c += a[e] + (e < b.length ? b[e] : "%s");
  1403. return c + a[d]
  1404. };
  1405. goog.asserts.doAssertFailure_ = function (a, b, c, d) {
  1406. var e = "Assertion failed";
  1407. if (c) {
  1408. e += ": " + c;
  1409. var f = d;
  1410. } else a && (e += ": " + a, f = b);
  1411. a = new goog.asserts.AssertionError("" + e, f || []);
  1412. goog.asserts.errorHandler_(a);
  1413. };
  1414. goog.asserts.setErrorHandler = function (a) {
  1415. goog.asserts.ENABLE_ASSERTS && (goog.asserts.errorHandler_ = a);
  1416. };
  1417. goog.asserts.assert = function (a, b, c) {
  1418. goog.asserts.ENABLE_ASSERTS && !a && goog.asserts.doAssertFailure_("", null, b, Array.prototype.slice.call(arguments, 2));
  1419. return a
  1420. };
  1421. goog.asserts.assertExists = function (a, b, c) {
  1422. goog.asserts.ENABLE_ASSERTS && null == a && goog.asserts.doAssertFailure_("Expected to exist: %s.", [a], b, Array.prototype.slice.call(arguments, 2));
  1423. return a
  1424. };
  1425. goog.asserts.fail = function (a, b) {
  1426. goog.asserts.ENABLE_ASSERTS && goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1)));
  1427. };
  1428. goog.asserts.assertNumber = function (a, b, c) {
  1429. goog.asserts.ENABLE_ASSERTS && "number" !== typeof a && goog.asserts.doAssertFailure_("Expected number but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1430. return a
  1431. };
  1432. goog.asserts.assertString = function (a, b, c) {
  1433. goog.asserts.ENABLE_ASSERTS && "string" !== typeof a && goog.asserts.doAssertFailure_("Expected string but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1434. return a
  1435. };
  1436. goog.asserts.assertFunction = function (a, b, c) {
  1437. goog.asserts.ENABLE_ASSERTS && !goog.isFunction(a) && goog.asserts.doAssertFailure_("Expected function but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1438. return a
  1439. };
  1440. goog.asserts.assertObject = function (a, b, c) {
  1441. goog.asserts.ENABLE_ASSERTS && !goog.isObject(a) && goog.asserts.doAssertFailure_("Expected object but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1442. return a
  1443. };
  1444. goog.asserts.assertArray = function (a, b, c) {
  1445. goog.asserts.ENABLE_ASSERTS && !Array.isArray(a) && goog.asserts.doAssertFailure_("Expected array but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1446. return a
  1447. };
  1448. goog.asserts.assertBoolean = function (a, b, c) {
  1449. goog.asserts.ENABLE_ASSERTS && "boolean" !== typeof a && goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1450. return a
  1451. };
  1452. goog.asserts.assertElement = function (a, b, c) {
  1453. !goog.asserts.ENABLE_ASSERTS || goog.isObject(a) && a.nodeType == goog.dom.NodeType.ELEMENT || goog.asserts.doAssertFailure_("Expected Element but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  1454. return a
  1455. };
  1456. goog.asserts.assertInstanceof = function (a, b, c, d) {
  1457. !goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.", [goog.asserts.getType_(b), goog.asserts.getType_(a)], c, Array.prototype.slice.call(arguments, 3));
  1458. return a
  1459. };
  1460. goog.asserts.assertFinite = function (a, b, c) {
  1461. !goog.asserts.ENABLE_ASSERTS || "number" == typeof a && isFinite(a) || goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.", [a], b, Array.prototype.slice.call(arguments, 2));
  1462. return a
  1463. };
  1464. goog.asserts.assertObjectPrototypeIsIntact = function () {
  1465. for (var a in Object.prototype) goog.asserts.fail(a + " should not be enumerable in Object.prototype.");
  1466. };
  1467. goog.asserts.getType_ = function (a) {
  1468. return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" : typeof a
  1469. };
  1470. goog.array = {};
  1471. goog.NATIVE_ARRAY_PROTOTYPES = goog.TRUSTED_SITE;
  1472. goog.array.ASSUME_NATIVE_FUNCTIONS = 2012 < goog.FEATURESET_YEAR;
  1473. goog.array.peek = function (a) {
  1474. return a[a.length - 1]
  1475. };
  1476. goog.array.last = goog.array.peek;
  1477. goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.indexOf) ? function (a, b, c) {
  1478. goog.asserts.assert(null != a.length);
  1479. return Array.prototype.indexOf.call(a, b, c)
  1480. } : function (a, b, c) {
  1481. c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
  1482. if ("string" === typeof a) return "string" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, c);
  1483. for (; c < a.length; c++) if (c in a && a[c] === b) return c;
  1484. return -1
  1485. };
  1486. goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.lastIndexOf) ? function (a, b, c) {
  1487. goog.asserts.assert(null != a.length);
  1488. return Array.prototype.lastIndexOf.call(a, b, null == c ? a.length - 1 : c)
  1489. } : function (a, b, c) {
  1490. c = null == c ? a.length - 1 : c;
  1491. 0 > c && (c = Math.max(0, a.length + c));
  1492. if ("string" === typeof a) return "string" !== typeof b || 1 != b.length ? -1 : a.lastIndexOf(b, c);
  1493. for (; 0 <= c; c--) if (c in a && a[c] === b) return c;
  1494. return -1
  1495. };
  1496. goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.forEach) ? function (a, b, c) {
  1497. goog.asserts.assert(null != a.length);
  1498. Array.prototype.forEach.call(a, b, c);
  1499. } : function (a, b, c) {
  1500. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++) f in e && b.call(c, e[f], f, a);
  1501. };
  1502. goog.array.forEachRight = function (a, b, c) {
  1503. var d = a.length, e = "string" === typeof a ? a.split("") : a;
  1504. for (--d; 0 <= d; --d) d in e && b.call(c, e[d], d, a);
  1505. };
  1506. goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.filter) ? function (a, b, c) {
  1507. goog.asserts.assert(null != a.length);
  1508. return Array.prototype.filter.call(a, b, c)
  1509. } : function (a, b, c) {
  1510. for (var d = a.length, e = [], f = 0, g = "string" === typeof a ? a.split("") : a, h = 0; h < d; h++) if (h in g) {
  1511. var k = g[h];
  1512. b.call(c, k, h, a) && (e[f++] = k);
  1513. }
  1514. return e
  1515. };
  1516. goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.map) ? function (a, b, c) {
  1517. goog.asserts.assert(null != a.length);
  1518. return Array.prototype.map.call(a, b, c)
  1519. } : function (a, b, c) {
  1520. for (var d = a.length, e = Array(d), f = "string" === typeof a ? a.split("") : a, g = 0; g < d; g++) g in f && (e[g] = b.call(c, f[g], g, a));
  1521. return e
  1522. };
  1523. goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function (a, b, c, d) {
  1524. goog.asserts.assert(null != a.length);
  1525. d && (b = goog.bind(b, d));
  1526. return Array.prototype.reduce.call(a, b, c)
  1527. } : function (a, b, c, d) {
  1528. var e = c;
  1529. goog.array.forEach(a, function (c, g) {
  1530. e = b.call(d, e, c, g, a);
  1531. });
  1532. return e
  1533. };
  1534. goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduceRight) ? function (a, b, c, d) {
  1535. goog.asserts.assert(null != a.length);
  1536. goog.asserts.assert(null != b);
  1537. d && (b = goog.bind(b, d));
  1538. return Array.prototype.reduceRight.call(a, b, c)
  1539. } : function (a, b, c, d) {
  1540. var e = c;
  1541. goog.array.forEachRight(a, function (c, g) {
  1542. e = b.call(d, e, c, g, a);
  1543. });
  1544. return e
  1545. };
  1546. goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.some) ? function (a, b, c) {
  1547. goog.asserts.assert(null != a.length);
  1548. return Array.prototype.some.call(a, b, c)
  1549. } : function (a, b, c) {
  1550. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++) if (f in e && b.call(c, e[f], f, a)) return !0;
  1551. return !1
  1552. };
  1553. goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.every) ? function (a, b, c) {
  1554. goog.asserts.assert(null != a.length);
  1555. return Array.prototype.every.call(a, b, c)
  1556. } : function (a, b, c) {
  1557. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++) if (f in e && !b.call(c, e[f], f, a)) return !1;
  1558. return !0
  1559. };
  1560. goog.array.count = function (a, b, c) {
  1561. var d = 0;
  1562. goog.array.forEach(a, function (a, f, g) {
  1563. b.call(c, a, f, g) && ++d;
  1564. }, c);
  1565. return d
  1566. };
  1567. goog.array.find = function (a, b, c) {
  1568. b = goog.array.findIndex(a, b, c);
  1569. return 0 > b ? null : "string" === typeof a ? a.charAt(b) : a[b]
  1570. };
  1571. goog.array.findIndex = function (a, b, c) {
  1572. for (var d = a.length, e = "string" === typeof a ? a.split("") : a, f = 0; f < d; f++) if (f in e && b.call(c, e[f], f, a)) return f;
  1573. return -1
  1574. };
  1575. goog.array.findRight = function (a, b, c) {
  1576. b = goog.array.findIndexRight(a, b, c);
  1577. return 0 > b ? null : "string" === typeof a ? a.charAt(b) : a[b]
  1578. };
  1579. goog.array.findIndexRight = function (a, b, c) {
  1580. var d = a.length, e = "string" === typeof a ? a.split("") : a;
  1581. for (--d; 0 <= d; d--) if (d in e && b.call(c, e[d], d, a)) return d;
  1582. return -1
  1583. };
  1584. goog.array.contains = function (a, b) {
  1585. return 0 <= goog.array.indexOf(a, b)
  1586. };
  1587. goog.array.isEmpty = function (a) {
  1588. return 0 == a.length
  1589. };
  1590. goog.array.clear = function (a) {
  1591. if (!Array.isArray(a)) for (var b = a.length - 1; 0 <= b; b--) delete a[b];
  1592. a.length = 0;
  1593. };
  1594. goog.array.insert = function (a, b) {
  1595. goog.array.contains(a, b) || a.push(b);
  1596. };
  1597. goog.array.insertAt = function (a, b, c) {
  1598. goog.array.splice(a, c, 0, b);
  1599. };
  1600. goog.array.insertArrayAt = function (a, b, c) {
  1601. goog.partial(goog.array.splice, a, c, 0).apply(null, b);
  1602. };
  1603. goog.array.insertBefore = function (a, b, c) {
  1604. var d;
  1605. 2 == arguments.length || 0 > (d = goog.array.indexOf(a, c)) ? a.push(b) : goog.array.insertAt(a, b, d);
  1606. };
  1607. goog.array.remove = function (a, b) {
  1608. b = goog.array.indexOf(a, b);
  1609. var c;
  1610. (c = 0 <= b) && goog.array.removeAt(a, b);
  1611. return c
  1612. };
  1613. goog.array.removeLast = function (a, b) {
  1614. b = goog.array.lastIndexOf(a, b);
  1615. return 0 <= b ? (goog.array.removeAt(a, b), !0) : !1
  1616. };
  1617. goog.array.removeAt = function (a, b) {
  1618. goog.asserts.assert(null != a.length);
  1619. return 1 == Array.prototype.splice.call(a, b, 1).length
  1620. };
  1621. goog.array.removeIf = function (a, b, c) {
  1622. b = goog.array.findIndex(a, b, c);
  1623. return 0 <= b ? (goog.array.removeAt(a, b), !0) : !1
  1624. };
  1625. goog.array.removeAllIf = function (a, b, c) {
  1626. var d = 0;
  1627. goog.array.forEachRight(a, function (e, f) {
  1628. b.call(c, e, f, a) && goog.array.removeAt(a, f) && d++;
  1629. });
  1630. return d
  1631. };
  1632. goog.array.concat = function (a) {
  1633. return Array.prototype.concat.apply([], arguments)
  1634. };
  1635. goog.array.join = function (a) {
  1636. return Array.prototype.concat.apply([], arguments)
  1637. };
  1638. goog.array.toArray = function (a) {
  1639. var b = a.length;
  1640. if (0 < b) {
  1641. for (var c = Array(b), d = 0; d < b; d++) c[d] = a[d];
  1642. return c
  1643. }
  1644. return []
  1645. };
  1646. goog.array.clone = goog.array.toArray;
  1647. goog.array.extend = function (a, b) {
  1648. for (var c = 1; c < arguments.length; c++) {
  1649. var d = arguments[c];
  1650. if (goog.isArrayLike(d)) {
  1651. var e = a.length || 0, f = d.length || 0;
  1652. a.length = e + f;
  1653. for (var g = 0; g < f; g++) a[e + g] = d[g];
  1654. } else a.push(d);
  1655. }
  1656. };
  1657. goog.array.splice = function (a, b, c, d) {
  1658. goog.asserts.assert(null != a.length);
  1659. return Array.prototype.splice.apply(a, goog.array.slice(arguments, 1))
  1660. };
  1661. goog.array.slice = function (a, b, c) {
  1662. goog.asserts.assert(null != a.length);
  1663. return 2 >= arguments.length ? Array.prototype.slice.call(a, b) : Array.prototype.slice.call(a, b, c)
  1664. };
  1665. goog.array.removeDuplicates = function (a, b, c) {
  1666. b = b || a;
  1667. var d = function (a) {
  1668. return goog.isObject(a) ? "o" + goog.getUid(a) : (typeof a).charAt(0) + a
  1669. };
  1670. c = c || d;
  1671. d = {};
  1672. for (var e = 0, f = 0; f < a.length;) {
  1673. var g = a[f++], h = c(g);
  1674. Object.prototype.hasOwnProperty.call(d, h) || (d[h] = !0, b[e++] = g);
  1675. }
  1676. b.length = e;
  1677. };
  1678. goog.array.binarySearch = function (a, b, c) {
  1679. return goog.array.binarySearch_(a, c || goog.array.defaultCompare, !1, b)
  1680. };
  1681. goog.array.binarySelect = function (a, b, c) {
  1682. return goog.array.binarySearch_(a, b, !0, void 0, c)
  1683. };
  1684. goog.array.binarySearch_ = function (a, b, c, d, e) {
  1685. for (var f = 0, g = a.length, h; f < g;) {
  1686. var k = f + (g - f >>> 1);
  1687. var l = c ? b.call(e, a[k], k, a) : b(d, a[k]);
  1688. 0 < l ? f = k + 1 : (g = k, h = !l);
  1689. }
  1690. return h ? f : -f - 1
  1691. };
  1692. goog.array.sort = function (a, b) {
  1693. a.sort(b || goog.array.defaultCompare);
  1694. };
  1695. goog.array.stableSort = function (a, b) {
  1696. for (var c = Array(a.length), d = 0; d < a.length; d++) c[d] = {index: d, value: a[d]};
  1697. var e = b || goog.array.defaultCompare;
  1698. goog.array.sort(c, function (a, b) {
  1699. return e(a.value, b.value) || a.index - b.index
  1700. });
  1701. for (d = 0; d < a.length; d++) a[d] = c[d].value;
  1702. };
  1703. goog.array.sortByKey = function (a, b, c) {
  1704. var d = c || goog.array.defaultCompare;
  1705. goog.array.sort(a, function (a, c) {
  1706. return d(b(a), b(c))
  1707. });
  1708. };
  1709. goog.array.sortObjectsByKey = function (a, b, c) {
  1710. goog.array.sortByKey(a, function (a) {
  1711. return a[b]
  1712. }, c);
  1713. };
  1714. goog.array.isSorted = function (a, b, c) {
  1715. b = b || goog.array.defaultCompare;
  1716. for (var d = 1; d < a.length; d++) {
  1717. var e = b(a[d - 1], a[d]);
  1718. if (0 < e || 0 == e && c) return !1
  1719. }
  1720. return !0
  1721. };
  1722. goog.array.equals = function (a, b, c) {
  1723. if (!goog.isArrayLike(a) || !goog.isArrayLike(b) || a.length != b.length) return !1;
  1724. var d = a.length;
  1725. c = c || goog.array.defaultCompareEquality;
  1726. for (var e = 0; e < d; e++) if (!c(a[e], b[e])) return !1;
  1727. return !0
  1728. };
  1729. goog.array.compare3 = function (a, b, c) {
  1730. c = c || goog.array.defaultCompare;
  1731. for (var d = Math.min(a.length, b.length), e = 0; e < d; e++) {
  1732. var f = c(a[e], b[e]);
  1733. if (0 != f) return f
  1734. }
  1735. return goog.array.defaultCompare(a.length, b.length)
  1736. };
  1737. goog.array.defaultCompare = function (a, b) {
  1738. return a > b ? 1 : a < b ? -1 : 0
  1739. };
  1740. goog.array.inverseDefaultCompare = function (a, b) {
  1741. return -goog.array.defaultCompare(a, b)
  1742. };
  1743. goog.array.defaultCompareEquality = function (a, b) {
  1744. return a === b
  1745. };
  1746. goog.array.binaryInsert = function (a, b, c) {
  1747. c = goog.array.binarySearch(a, b, c);
  1748. return 0 > c ? (goog.array.insertAt(a, b, -(c + 1)), !0) : !1
  1749. };
  1750. goog.array.binaryRemove = function (a, b, c) {
  1751. b = goog.array.binarySearch(a, b, c);
  1752. return 0 <= b ? goog.array.removeAt(a, b) : !1
  1753. };
  1754. goog.array.bucket = function (a, b, c) {
  1755. for (var d = {}, e = 0; e < a.length; e++) {
  1756. var f = a[e], g = b.call(c, f, e, a);
  1757. void 0 !== g && (d[g] || (d[g] = [])).push(f);
  1758. }
  1759. return d
  1760. };
  1761. goog.array.toObject = function (a, b, c) {
  1762. var d = {};
  1763. goog.array.forEach(a, function (e, f) {
  1764. d[b.call(c, e, f, a)] = e;
  1765. });
  1766. return d
  1767. };
  1768. goog.array.range = function (a, b, c) {
  1769. var d = [], e = 0, f = a;
  1770. c = c || 1;
  1771. void 0 !== b && (e = a, f = b);
  1772. if (0 > c * (f - e)) return [];
  1773. if (0 < c) for (a = e; a < f; a += c) d.push(a); else for (a = e; a > f; a += c) d.push(a);
  1774. return d
  1775. };
  1776. goog.array.repeat = function (a, b) {
  1777. for (var c = [], d = 0; d < b; d++) c[d] = a;
  1778. return c
  1779. };
  1780. goog.array.flatten = function (a) {
  1781. for (var b = [], c = 0; c < arguments.length; c++) {
  1782. var d = arguments[c];
  1783. if (Array.isArray(d)) for (var e = 0; e < d.length; e += 8192) {
  1784. var f = goog.array.slice(d, e, e + 8192);
  1785. f = goog.array.flatten.apply(null, f);
  1786. for (var g = 0; g < f.length; g++) b.push(f[g]);
  1787. } else b.push(d);
  1788. }
  1789. return b
  1790. };
  1791. goog.array.rotate = function (a, b) {
  1792. goog.asserts.assert(null != a.length);
  1793. a.length && (b %= a.length, 0 < b ? Array.prototype.unshift.apply(a, a.splice(-b, b)) : 0 > b && Array.prototype.push.apply(a, a.splice(0, -b)));
  1794. return a
  1795. };
  1796. goog.array.moveItem = function (a, b, c) {
  1797. goog.asserts.assert(0 <= b && b < a.length);
  1798. goog.asserts.assert(0 <= c && c < a.length);
  1799. b = Array.prototype.splice.call(a, b, 1);
  1800. Array.prototype.splice.call(a, c, 0, b[0]);
  1801. };
  1802. goog.array.zip = function (a) {
  1803. if (!arguments.length) return [];
  1804. for (var b = [], c = arguments[0].length, d = 1; d < arguments.length; d++) arguments[d].length < c && (c = arguments[d].length);
  1805. for (d = 0; d < c; d++) {
  1806. for (var e = [], f = 0; f < arguments.length; f++) e.push(arguments[f][d]);
  1807. b.push(e);
  1808. }
  1809. return b
  1810. };
  1811. goog.array.shuffle = function (a, b) {
  1812. b = b || Math.random;
  1813. for (var c = a.length - 1; 0 < c; c--) {
  1814. var d = Math.floor(b() * (c + 1)), e = a[c];
  1815. a[c] = a[d];
  1816. a[d] = e;
  1817. }
  1818. };
  1819. goog.array.copyByIndex = function (a, b) {
  1820. var c = [];
  1821. goog.array.forEach(b, function (b) {
  1822. c.push(a[b]);
  1823. });
  1824. return c
  1825. };
  1826. goog.array.concatMap = function (a, b, c) {
  1827. return goog.array.concat.apply([], goog.array.map(a, b, c))
  1828. };
  1829. goog.crypt = {};
  1830. goog.crypt.stringToByteArray = function (a) {
  1831. for (var b = [], c = 0, d = 0; d < a.length; d++) {
  1832. var e = a.charCodeAt(d);
  1833. 255 < e && (b[c++] = e & 255, e >>= 8);
  1834. b[c++] = e;
  1835. }
  1836. return b
  1837. };
  1838. goog.crypt.byteArrayToString = function (a) {
  1839. if (8192 >= a.length) return String.fromCharCode.apply(null, a);
  1840. for (var b = "", c = 0; c < a.length; c += 8192) {
  1841. var d = goog.array.slice(a, c, c + 8192);
  1842. b += String.fromCharCode.apply(null, d);
  1843. }
  1844. return b
  1845. };
  1846. goog.crypt.byteArrayToHex = function (a, b) {
  1847. return goog.array.map(a, function (a) {
  1848. a = a.toString(16);
  1849. return 1 < a.length ? a : "0" + a
  1850. }).join(b || "")
  1851. };
  1852. goog.crypt.hexToByteArray = function (a) {
  1853. goog.asserts.assert(0 == a.length % 2, "Key string length must be multiple of 2");
  1854. for (var b = [], c = 0; c < a.length; c += 2) b.push(parseInt(a.substring(c, c + 2), 16));
  1855. return b
  1856. };
  1857. goog.crypt.stringToUtf8ByteArray = function (a) {
  1858. for (var b = [], c = 0, d = 0; d < a.length; d++) {
  1859. var e = a.charCodeAt(d);
  1860. 128 > e ? b[c++] = e : (2048 > e ? b[c++] = e >> 6 | 192 : (55296 == (e & 64512) && d + 1 < a.length && 56320 == (a.charCodeAt(d + 1) & 64512) ? (e = 65536 + ((e & 1023) << 10) + (a.charCodeAt(++d) & 1023), b[c++] = e >> 18 | 240, b[c++] = e >> 12 & 63 | 128) : b[c++] = e >> 12 | 224, b[c++] = e >> 6 & 63 | 128), b[c++] = e & 63 | 128);
  1861. }
  1862. return b
  1863. };
  1864. goog.crypt.utf8ByteArrayToString = function (a) {
  1865. for (var b = [], c = 0, d = 0; c < a.length;) {
  1866. var e = a[c++];
  1867. if (128 > e) b[d++] = String.fromCharCode(e); else if (191 < e && 224 > e) {
  1868. var f = a[c++];
  1869. b[d++] = String.fromCharCode((e & 31) << 6 | f & 63);
  1870. } else if (239 < e && 365 > e) {
  1871. f = a[c++];
  1872. var g = a[c++], h = a[c++];
  1873. e = ((e & 7) << 18 | (f & 63) << 12 | (g & 63) << 6 | h & 63) - 65536;
  1874. b[d++] = String.fromCharCode(55296 + (e >> 10));
  1875. b[d++] = String.fromCharCode(56320 + (e & 1023));
  1876. } else f = a[c++], g = a[c++], b[d++] = String.fromCharCode((e & 15) << 12 | (f & 63) << 6 | g & 63);
  1877. }
  1878. return b.join("")
  1879. };
  1880. goog.crypt.xorByteArray = function (a, b) {
  1881. goog.asserts.assert(a.length == b.length, "XOR array lengths must match");
  1882. for (var c = [], d = 0; d < a.length; d++) c.push(a[d] ^ b[d]);
  1883. return c
  1884. };
  1885. goog.dom.asserts = {};
  1886. goog.dom.asserts.assertIsLocation = function (a) {
  1887. if (goog.asserts.ENABLE_ASSERTS) {
  1888. var b = goog.dom.asserts.getWindow_(a);
  1889. b && (!a || !(a instanceof b.Location) && a instanceof b.Element) && goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s", goog.dom.asserts.debugStringForType_(a));
  1890. }
  1891. return a
  1892. };
  1893. goog.dom.asserts.assertIsElementType_ = function (a, b) {
  1894. if (goog.asserts.ENABLE_ASSERTS) {
  1895. var c = goog.dom.asserts.getWindow_(a);
  1896. c && "undefined" != typeof c[b] && (a && (a instanceof c[b] || !(a instanceof c.Location || a instanceof c.Element)) || goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s", b, goog.dom.asserts.debugStringForType_(a)));
  1897. }
  1898. return a
  1899. };
  1900. goog.dom.asserts.assertIsHTMLAnchorElement = function (a) {
  1901. return goog.dom.asserts.assertIsElementType_(a, "HTMLAnchorElement")
  1902. };
  1903. goog.dom.asserts.assertIsHTMLButtonElement = function (a) {
  1904. return goog.dom.asserts.assertIsElementType_(a, "HTMLButtonElement")
  1905. };
  1906. goog.dom.asserts.assertIsHTMLLinkElement = function (a) {
  1907. return goog.dom.asserts.assertIsElementType_(a, "HTMLLinkElement")
  1908. };
  1909. goog.dom.asserts.assertIsHTMLImageElement = function (a) {
  1910. return goog.dom.asserts.assertIsElementType_(a, "HTMLImageElement")
  1911. };
  1912. goog.dom.asserts.assertIsHTMLAudioElement = function (a) {
  1913. return goog.dom.asserts.assertIsElementType_(a, "HTMLAudioElement")
  1914. };
  1915. goog.dom.asserts.assertIsHTMLVideoElement = function (a) {
  1916. return goog.dom.asserts.assertIsElementType_(a, "HTMLVideoElement")
  1917. };
  1918. goog.dom.asserts.assertIsHTMLInputElement = function (a) {
  1919. return goog.dom.asserts.assertIsElementType_(a, "HTMLInputElement")
  1920. };
  1921. goog.dom.asserts.assertIsHTMLTextAreaElement = function (a) {
  1922. return goog.dom.asserts.assertIsElementType_(a, "HTMLTextAreaElement")
  1923. };
  1924. goog.dom.asserts.assertIsHTMLCanvasElement = function (a) {
  1925. return goog.dom.asserts.assertIsElementType_(a, "HTMLCanvasElement")
  1926. };
  1927. goog.dom.asserts.assertIsHTMLEmbedElement = function (a) {
  1928. return goog.dom.asserts.assertIsElementType_(a, "HTMLEmbedElement")
  1929. };
  1930. goog.dom.asserts.assertIsHTMLFormElement = function (a) {
  1931. return goog.dom.asserts.assertIsElementType_(a, "HTMLFormElement")
  1932. };
  1933. goog.dom.asserts.assertIsHTMLFrameElement = function (a) {
  1934. return goog.dom.asserts.assertIsElementType_(a, "HTMLFrameElement")
  1935. };
  1936. goog.dom.asserts.assertIsHTMLIFrameElement = function (a) {
  1937. return goog.dom.asserts.assertIsElementType_(a, "HTMLIFrameElement")
  1938. };
  1939. goog.dom.asserts.assertIsHTMLObjectElement = function (a) {
  1940. return goog.dom.asserts.assertIsElementType_(a, "HTMLObjectElement")
  1941. };
  1942. goog.dom.asserts.assertIsHTMLScriptElement = function (a) {
  1943. return goog.dom.asserts.assertIsElementType_(a, "HTMLScriptElement")
  1944. };
  1945. goog.dom.asserts.debugStringForType_ = function (a) {
  1946. if (goog.isObject(a)) try {
  1947. return a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a)
  1948. } catch (b) {
  1949. return "<object could not be stringified>"
  1950. } else return void 0 === a ? "undefined" : null === a ? "null" : typeof a
  1951. };
  1952. goog.dom.asserts.getWindow_ = function (a) {
  1953. try {
  1954. var b = a && a.ownerDocument, c = b && (b.defaultView || b.parentWindow);
  1955. c = c || goog.global;
  1956. if (c.Element && c.Location) return c
  1957. } catch (d) {
  1958. }
  1959. return null
  1960. };
  1961. goog.functions = {};
  1962. goog.functions.constant = function (a) {
  1963. return function () {
  1964. return a
  1965. }
  1966. };
  1967. goog.functions.FALSE = function () {
  1968. return !1
  1969. };
  1970. goog.functions.TRUE = function () {
  1971. return !0
  1972. };
  1973. goog.functions.NULL = function () {
  1974. return null
  1975. };
  1976. goog.functions.identity = function (a, b) {
  1977. return a
  1978. };
  1979. goog.functions.error = function (a) {
  1980. return function () {
  1981. throw Error(a);
  1982. }
  1983. };
  1984. goog.functions.fail = function (a) {
  1985. return function () {
  1986. throw a;
  1987. }
  1988. };
  1989. goog.functions.lock = function (a, b) {
  1990. b = b || 0;
  1991. return function () {
  1992. return a.apply(this, Array.prototype.slice.call(arguments, 0, b))
  1993. }
  1994. };
  1995. goog.functions.nth = function (a) {
  1996. return function () {
  1997. return arguments[a]
  1998. }
  1999. };
  2000. goog.functions.partialRight = function (a, b) {
  2001. var c = Array.prototype.slice.call(arguments, 1);
  2002. return function () {
  2003. var b = Array.prototype.slice.call(arguments);
  2004. b.push.apply(b, c);
  2005. return a.apply(this, b)
  2006. }
  2007. };
  2008. goog.functions.withReturnValue = function (a, b) {
  2009. return goog.functions.sequence(a, goog.functions.constant(b))
  2010. };
  2011. goog.functions.equalTo = function (a, b) {
  2012. return function (c) {
  2013. return b ? a == c : a === c
  2014. }
  2015. };
  2016. goog.functions.compose = function (a, b) {
  2017. var c = arguments, d = c.length;
  2018. return function () {
  2019. var a;
  2020. d && (a = c[d - 1].apply(this, arguments));
  2021. for (var b = d - 2; 0 <= b; b--) a = c[b].call(this, a);
  2022. return a
  2023. }
  2024. };
  2025. goog.functions.sequence = function (a) {
  2026. var b = arguments, c = b.length;
  2027. return function () {
  2028. for (var a, e = 0; e < c; e++) a = b[e].apply(this, arguments);
  2029. return a
  2030. }
  2031. };
  2032. goog.functions.and = function (a) {
  2033. var b = arguments, c = b.length;
  2034. return function () {
  2035. for (var a = 0; a < c; a++) if (!b[a].apply(this, arguments)) return !1;
  2036. return !0
  2037. }
  2038. };
  2039. goog.functions.or = function (a) {
  2040. var b = arguments, c = b.length;
  2041. return function () {
  2042. for (var a = 0; a < c; a++) if (b[a].apply(this, arguments)) return !0;
  2043. return !1
  2044. }
  2045. };
  2046. goog.functions.not = function (a) {
  2047. return function () {
  2048. return !a.apply(this, arguments)
  2049. }
  2050. };
  2051. goog.functions.create = function (a, b) {
  2052. var c = function () {
  2053. };
  2054. c.prototype = a.prototype;
  2055. c = new c;
  2056. a.apply(c, Array.prototype.slice.call(arguments, 1));
  2057. return c
  2058. };
  2059. goog.functions.CACHE_RETURN_VALUE = !0;
  2060. goog.functions.cacheReturnValue = function (a) {
  2061. var b = !1, c;
  2062. return function () {
  2063. if (!goog.functions.CACHE_RETURN_VALUE) return a();
  2064. b || (c = a(), b = !0);
  2065. return c
  2066. }
  2067. };
  2068. goog.functions.once = function (a) {
  2069. var b = a;
  2070. return function () {
  2071. if (b) {
  2072. var a = b;
  2073. b = null;
  2074. a();
  2075. }
  2076. }
  2077. };
  2078. goog.functions.debounce = function (a, b, c) {
  2079. var d = 0;
  2080. return function (e) {
  2081. goog.global.clearTimeout(d);
  2082. var f = arguments;
  2083. d = goog.global.setTimeout(function () {
  2084. a.apply(c, f);
  2085. }, b);
  2086. }
  2087. };
  2088. goog.functions.throttle = function (a, b, c) {
  2089. var d = 0, e = !1, f = [], g = function () {
  2090. d = 0;
  2091. e && (e = !1, h());
  2092. }, h = function () {
  2093. d = goog.global.setTimeout(g, b);
  2094. a.apply(c, f);
  2095. };
  2096. return function (a) {
  2097. f = arguments;
  2098. d ? e = !0 : h();
  2099. }
  2100. };
  2101. goog.functions.rateLimit = function (a, b, c) {
  2102. var d = 0, e = function () {
  2103. d = 0;
  2104. };
  2105. return function (f) {
  2106. d || (d = goog.global.setTimeout(e, b), a.apply(c, arguments));
  2107. }
  2108. };
  2109. goog.dom.HtmlElement = function () {
  2110. };
  2111. goog.dom.TagName = function (a) {
  2112. this.tagName_ = a;
  2113. };
  2114. goog.dom.TagName.prototype.toString = function () {
  2115. return this.tagName_
  2116. };
  2117. goog.dom.TagName.A = new goog.dom.TagName("A");
  2118. goog.dom.TagName.ABBR = new goog.dom.TagName("ABBR");
  2119. goog.dom.TagName.ACRONYM = new goog.dom.TagName("ACRONYM");
  2120. goog.dom.TagName.ADDRESS = new goog.dom.TagName("ADDRESS");
  2121. goog.dom.TagName.APPLET = new goog.dom.TagName("APPLET");
  2122. goog.dom.TagName.AREA = new goog.dom.TagName("AREA");
  2123. goog.dom.TagName.ARTICLE = new goog.dom.TagName("ARTICLE");
  2124. goog.dom.TagName.ASIDE = new goog.dom.TagName("ASIDE");
  2125. goog.dom.TagName.AUDIO = new goog.dom.TagName("AUDIO");
  2126. goog.dom.TagName.B = new goog.dom.TagName("B");
  2127. goog.dom.TagName.BASE = new goog.dom.TagName("BASE");
  2128. goog.dom.TagName.BASEFONT = new goog.dom.TagName("BASEFONT");
  2129. goog.dom.TagName.BDI = new goog.dom.TagName("BDI");
  2130. goog.dom.TagName.BDO = new goog.dom.TagName("BDO");
  2131. goog.dom.TagName.BIG = new goog.dom.TagName("BIG");
  2132. goog.dom.TagName.BLOCKQUOTE = new goog.dom.TagName("BLOCKQUOTE");
  2133. goog.dom.TagName.BODY = new goog.dom.TagName("BODY");
  2134. goog.dom.TagName.BR = new goog.dom.TagName("BR");
  2135. goog.dom.TagName.BUTTON = new goog.dom.TagName("BUTTON");
  2136. goog.dom.TagName.CANVAS = new goog.dom.TagName("CANVAS");
  2137. goog.dom.TagName.CAPTION = new goog.dom.TagName("CAPTION");
  2138. goog.dom.TagName.CENTER = new goog.dom.TagName("CENTER");
  2139. goog.dom.TagName.CITE = new goog.dom.TagName("CITE");
  2140. goog.dom.TagName.CODE = new goog.dom.TagName("CODE");
  2141. goog.dom.TagName.COL = new goog.dom.TagName("COL");
  2142. goog.dom.TagName.COLGROUP = new goog.dom.TagName("COLGROUP");
  2143. goog.dom.TagName.COMMAND = new goog.dom.TagName("COMMAND");
  2144. goog.dom.TagName.DATA = new goog.dom.TagName("DATA");
  2145. goog.dom.TagName.DATALIST = new goog.dom.TagName("DATALIST");
  2146. goog.dom.TagName.DD = new goog.dom.TagName("DD");
  2147. goog.dom.TagName.DEL = new goog.dom.TagName("DEL");
  2148. goog.dom.TagName.DETAILS = new goog.dom.TagName("DETAILS");
  2149. goog.dom.TagName.DFN = new goog.dom.TagName("DFN");
  2150. goog.dom.TagName.DIALOG = new goog.dom.TagName("DIALOG");
  2151. goog.dom.TagName.DIR = new goog.dom.TagName("DIR");
  2152. goog.dom.TagName.DIV = new goog.dom.TagName("DIV");
  2153. goog.dom.TagName.DL = new goog.dom.TagName("DL");
  2154. goog.dom.TagName.DT = new goog.dom.TagName("DT");
  2155. goog.dom.TagName.EM = new goog.dom.TagName("EM");
  2156. goog.dom.TagName.EMBED = new goog.dom.TagName("EMBED");
  2157. goog.dom.TagName.FIELDSET = new goog.dom.TagName("FIELDSET");
  2158. goog.dom.TagName.FIGCAPTION = new goog.dom.TagName("FIGCAPTION");
  2159. goog.dom.TagName.FIGURE = new goog.dom.TagName("FIGURE");
  2160. goog.dom.TagName.FONT = new goog.dom.TagName("FONT");
  2161. goog.dom.TagName.FOOTER = new goog.dom.TagName("FOOTER");
  2162. goog.dom.TagName.FORM = new goog.dom.TagName("FORM");
  2163. goog.dom.TagName.FRAME = new goog.dom.TagName("FRAME");
  2164. goog.dom.TagName.FRAMESET = new goog.dom.TagName("FRAMESET");
  2165. goog.dom.TagName.H1 = new goog.dom.TagName("H1");
  2166. goog.dom.TagName.H2 = new goog.dom.TagName("H2");
  2167. goog.dom.TagName.H3 = new goog.dom.TagName("H3");
  2168. goog.dom.TagName.H4 = new goog.dom.TagName("H4");
  2169. goog.dom.TagName.H5 = new goog.dom.TagName("H5");
  2170. goog.dom.TagName.H6 = new goog.dom.TagName("H6");
  2171. goog.dom.TagName.HEAD = new goog.dom.TagName("HEAD");
  2172. goog.dom.TagName.HEADER = new goog.dom.TagName("HEADER");
  2173. goog.dom.TagName.HGROUP = new goog.dom.TagName("HGROUP");
  2174. goog.dom.TagName.HR = new goog.dom.TagName("HR");
  2175. goog.dom.TagName.HTML = new goog.dom.TagName("HTML");
  2176. goog.dom.TagName.I = new goog.dom.TagName("I");
  2177. goog.dom.TagName.IFRAME = new goog.dom.TagName("IFRAME");
  2178. goog.dom.TagName.IMG = new goog.dom.TagName("IMG");
  2179. goog.dom.TagName.INPUT = new goog.dom.TagName("INPUT");
  2180. goog.dom.TagName.INS = new goog.dom.TagName("INS");
  2181. goog.dom.TagName.ISINDEX = new goog.dom.TagName("ISINDEX");
  2182. goog.dom.TagName.KBD = new goog.dom.TagName("KBD");
  2183. goog.dom.TagName.KEYGEN = new goog.dom.TagName("KEYGEN");
  2184. goog.dom.TagName.LABEL = new goog.dom.TagName("LABEL");
  2185. goog.dom.TagName.LEGEND = new goog.dom.TagName("LEGEND");
  2186. goog.dom.TagName.LI = new goog.dom.TagName("LI");
  2187. goog.dom.TagName.LINK = new goog.dom.TagName("LINK");
  2188. goog.dom.TagName.MAIN = new goog.dom.TagName("MAIN");
  2189. goog.dom.TagName.MAP = new goog.dom.TagName("MAP");
  2190. goog.dom.TagName.MARK = new goog.dom.TagName("MARK");
  2191. goog.dom.TagName.MATH = new goog.dom.TagName("MATH");
  2192. goog.dom.TagName.MENU = new goog.dom.TagName("MENU");
  2193. goog.dom.TagName.MENUITEM = new goog.dom.TagName("MENUITEM");
  2194. goog.dom.TagName.META = new goog.dom.TagName("META");
  2195. goog.dom.TagName.METER = new goog.dom.TagName("METER");
  2196. goog.dom.TagName.NAV = new goog.dom.TagName("NAV");
  2197. goog.dom.TagName.NOFRAMES = new goog.dom.TagName("NOFRAMES");
  2198. goog.dom.TagName.NOSCRIPT = new goog.dom.TagName("NOSCRIPT");
  2199. goog.dom.TagName.OBJECT = new goog.dom.TagName("OBJECT");
  2200. goog.dom.TagName.OL = new goog.dom.TagName("OL");
  2201. goog.dom.TagName.OPTGROUP = new goog.dom.TagName("OPTGROUP");
  2202. goog.dom.TagName.OPTION = new goog.dom.TagName("OPTION");
  2203. goog.dom.TagName.OUTPUT = new goog.dom.TagName("OUTPUT");
  2204. goog.dom.TagName.P = new goog.dom.TagName("P");
  2205. goog.dom.TagName.PARAM = new goog.dom.TagName("PARAM");
  2206. goog.dom.TagName.PICTURE = new goog.dom.TagName("PICTURE");
  2207. goog.dom.TagName.PRE = new goog.dom.TagName("PRE");
  2208. goog.dom.TagName.PROGRESS = new goog.dom.TagName("PROGRESS");
  2209. goog.dom.TagName.Q = new goog.dom.TagName("Q");
  2210. goog.dom.TagName.RP = new goog.dom.TagName("RP");
  2211. goog.dom.TagName.RT = new goog.dom.TagName("RT");
  2212. goog.dom.TagName.RTC = new goog.dom.TagName("RTC");
  2213. goog.dom.TagName.RUBY = new goog.dom.TagName("RUBY");
  2214. goog.dom.TagName.S = new goog.dom.TagName("S");
  2215. goog.dom.TagName.SAMP = new goog.dom.TagName("SAMP");
  2216. goog.dom.TagName.SCRIPT = new goog.dom.TagName("SCRIPT");
  2217. goog.dom.TagName.SECTION = new goog.dom.TagName("SECTION");
  2218. goog.dom.TagName.SELECT = new goog.dom.TagName("SELECT");
  2219. goog.dom.TagName.SMALL = new goog.dom.TagName("SMALL");
  2220. goog.dom.TagName.SOURCE = new goog.dom.TagName("SOURCE");
  2221. goog.dom.TagName.SPAN = new goog.dom.TagName("SPAN");
  2222. goog.dom.TagName.STRIKE = new goog.dom.TagName("STRIKE");
  2223. goog.dom.TagName.STRONG = new goog.dom.TagName("STRONG");
  2224. goog.dom.TagName.STYLE = new goog.dom.TagName("STYLE");
  2225. goog.dom.TagName.SUB = new goog.dom.TagName("SUB");
  2226. goog.dom.TagName.SUMMARY = new goog.dom.TagName("SUMMARY");
  2227. goog.dom.TagName.SUP = new goog.dom.TagName("SUP");
  2228. goog.dom.TagName.SVG = new goog.dom.TagName("SVG");
  2229. goog.dom.TagName.TABLE = new goog.dom.TagName("TABLE");
  2230. goog.dom.TagName.TBODY = new goog.dom.TagName("TBODY");
  2231. goog.dom.TagName.TD = new goog.dom.TagName("TD");
  2232. goog.dom.TagName.TEMPLATE = new goog.dom.TagName("TEMPLATE");
  2233. goog.dom.TagName.TEXTAREA = new goog.dom.TagName("TEXTAREA");
  2234. goog.dom.TagName.TFOOT = new goog.dom.TagName("TFOOT");
  2235. goog.dom.TagName.TH = new goog.dom.TagName("TH");
  2236. goog.dom.TagName.THEAD = new goog.dom.TagName("THEAD");
  2237. goog.dom.TagName.TIME = new goog.dom.TagName("TIME");
  2238. goog.dom.TagName.TITLE = new goog.dom.TagName("TITLE");
  2239. goog.dom.TagName.TR = new goog.dom.TagName("TR");
  2240. goog.dom.TagName.TRACK = new goog.dom.TagName("TRACK");
  2241. goog.dom.TagName.TT = new goog.dom.TagName("TT");
  2242. goog.dom.TagName.U = new goog.dom.TagName("U");
  2243. goog.dom.TagName.UL = new goog.dom.TagName("UL");
  2244. goog.dom.TagName.VAR = new goog.dom.TagName("VAR");
  2245. goog.dom.TagName.VIDEO = new goog.dom.TagName("VIDEO");
  2246. goog.dom.TagName.WBR = new goog.dom.TagName("WBR");
  2247. goog.dom.tags = {};
  2248. goog.dom.tags.VOID_TAGS_ = {
  2249. area: !0,
  2250. base: !0,
  2251. br: !0,
  2252. col: !0,
  2253. command: !0,
  2254. embed: !0,
  2255. hr: !0,
  2256. img: !0,
  2257. input: !0,
  2258. keygen: !0,
  2259. link: !0,
  2260. meta: !0,
  2261. param: !0,
  2262. source: !0,
  2263. track: !0,
  2264. wbr: !0
  2265. };
  2266. goog.dom.tags.isVoidTag = function (a) {
  2267. return !0 === goog.dom.tags.VOID_TAGS_[a]
  2268. };
  2269. goog.html = {};
  2270. goog.html.trustedtypes = {};
  2271. goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY = goog.TRUSTED_TYPES_POLICY_NAME ? goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME + "#html") : null;
  2272. goog.string = {};
  2273. goog.string.TypedString = function () {
  2274. };
  2275. goog.string.Const = function (a, b) {
  2276. this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = a === goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_ && b || "";
  2277. this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ = goog.string.Const.TYPE_MARKER_;
  2278. };
  2279. goog.string.Const.prototype.implementsGoogStringTypedString = !0;
  2280. goog.string.Const.prototype.getTypedStringValue = function () {
  2281. return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_
  2282. };
  2283. goog.DEBUG && (goog.string.Const.prototype.toString = function () {
  2284. return "Const{" + this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ + "}"
  2285. });
  2286. goog.string.Const.unwrap = function (a) {
  2287. if (a instanceof goog.string.Const && a.constructor === goog.string.Const && a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
  2288. goog.asserts.fail("expected object of type Const, got '" + a + "'");
  2289. return "type_error:Const"
  2290. };
  2291. goog.string.Const.from = function (a) {
  2292. return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_, a)
  2293. };
  2294. goog.string.Const.TYPE_MARKER_ = {};
  2295. goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_ = {};
  2296. goog.string.Const.EMPTY = goog.string.Const.from("");
  2297. goog.html.SafeScript = function () {
  2298. this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
  2299. this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  2300. };
  2301. goog.html.SafeScript.prototype.implementsGoogStringTypedString = !0;
  2302. goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2303. goog.html.SafeScript.fromConstant = function (a) {
  2304. a = goog.string.Const.unwrap(a);
  2305. return 0 === a.length ? goog.html.SafeScript.EMPTY : goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(a)
  2306. };
  2307. goog.html.SafeScript.fromConstantAndArgs = function (a, b) {
  2308. for (var c = [], d = 1; d < arguments.length; d++) c.push(goog.html.SafeScript.stringify_(arguments[d]));
  2309. return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("(" + goog.string.Const.unwrap(a) + ")(" + c.join(", ") + ");")
  2310. };
  2311. goog.html.SafeScript.fromJson = function (a) {
  2312. return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(a))
  2313. };
  2314. goog.html.SafeScript.prototype.getTypedStringValue = function () {
  2315. return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()
  2316. };
  2317. goog.DEBUG && (goog.html.SafeScript.prototype.toString = function () {
  2318. return "SafeScript{" + this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + "}"
  2319. });
  2320. goog.html.SafeScript.unwrap = function (a) {
  2321. return goog.html.SafeScript.unwrapTrustedScript(a).toString()
  2322. };
  2323. goog.html.SafeScript.unwrapTrustedScript = function (a) {
  2324. if (a instanceof goog.html.SafeScript && a.constructor === goog.html.SafeScript && a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;
  2325. goog.asserts.fail("expected object of type SafeScript, got '" + a + "' of type " + goog.typeOf(a));
  2326. return "type_error:SafeScript"
  2327. };
  2328. goog.html.SafeScript.stringify_ = function (a) {
  2329. return JSON.stringify(a).replace(/</g, "\\x3c")
  2330. };
  2331. goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function (a) {
  2332. return (new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(a)
  2333. };
  2334. goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a) {
  2335. this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ? goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScript(a) : a;
  2336. return this
  2337. };
  2338. goog.html.SafeScript.EMPTY = goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");
  2339. goog.fs = {};
  2340. goog.fs.url = {};
  2341. goog.fs.url.createObjectUrl = function (a) {
  2342. return goog.fs.url.getUrlObject_().createObjectURL(a)
  2343. };
  2344. goog.fs.url.revokeObjectUrl = function (a) {
  2345. goog.fs.url.getUrlObject_().revokeObjectURL(a);
  2346. };
  2347. goog.fs.url.UrlObject_ = function () {
  2348. };
  2349. goog.fs.url.UrlObject_.prototype.createObjectURL = function (a) {
  2350. };
  2351. goog.fs.url.UrlObject_.prototype.revokeObjectURL = function (a) {
  2352. };
  2353. goog.fs.url.getUrlObject_ = function () {
  2354. var a = goog.fs.url.findUrlObject_();
  2355. if (null != a) return a;
  2356. throw Error("This browser doesn't seem to support blob URLs");
  2357. };
  2358. goog.fs.url.findUrlObject_ = function () {
  2359. return void 0 !== goog.global.URL && void 0 !== goog.global.URL.createObjectURL ? goog.global.URL : void 0 !== goog.global.webkitURL && void 0 !== goog.global.webkitURL.createObjectURL ? goog.global.webkitURL : void 0 !== goog.global.createObjectURL ? goog.global : null
  2360. };
  2361. goog.fs.url.browserSupportsObjectUrls = function () {
  2362. return null != goog.fs.url.findUrlObject_()
  2363. };
  2364. goog.fs.blob = {};
  2365. goog.fs.blob.getBlob = function (a) {
  2366. var b = goog.global.BlobBuilder || goog.global.WebKitBlobBuilder;
  2367. if (void 0 !== b) {
  2368. b = new b;
  2369. for (var c = 0; c < arguments.length; c++) b.append(arguments[c]);
  2370. return b.getBlob()
  2371. }
  2372. return goog.fs.blob.getBlobWithProperties(goog.array.toArray(arguments))
  2373. };
  2374. goog.fs.blob.getBlobWithProperties = function (a, b, c) {
  2375. var d = goog.global.BlobBuilder || goog.global.WebKitBlobBuilder;
  2376. if (void 0 !== d) {
  2377. d = new d;
  2378. for (var e = 0; e < a.length; e++) d.append(a[e], c);
  2379. return d.getBlob(b)
  2380. }
  2381. if (void 0 !== goog.global.Blob) return d = {}, b && (d.type = b), c && (d.endings = c), new Blob(a, d);
  2382. throw Error("This browser doesn't seem to support creating Blobs");
  2383. };
  2384. goog.i18n = {};
  2385. goog.i18n.bidi = {};
  2386. goog.i18n.bidi.FORCE_RTL = !1;
  2387. goog.i18n.bidi.IS_RTL = goog.i18n.bidi.FORCE_RTL || ("ar" == goog.LOCALE.substring(0, 2).toLowerCase() || "fa" == goog.LOCALE.substring(0, 2).toLowerCase() || "he" == goog.LOCALE.substring(0, 2).toLowerCase() || "iw" == goog.LOCALE.substring(0, 2).toLowerCase() || "ps" == goog.LOCALE.substring(0, 2).toLowerCase() || "sd" == goog.LOCALE.substring(0, 2).toLowerCase() || "ug" == goog.LOCALE.substring(0, 2).toLowerCase() || "ur" == goog.LOCALE.substring(0, 2).toLowerCase() || "yi" == goog.LOCALE.substring(0, 2).toLowerCase()) && (2 == goog.LOCALE.length ||
  2388. "-" == goog.LOCALE.substring(2, 3) || "_" == goog.LOCALE.substring(2, 3)) || 3 <= goog.LOCALE.length && "ckb" == goog.LOCALE.substring(0, 3).toLowerCase() && (3 == goog.LOCALE.length || "-" == goog.LOCALE.substring(3, 4) || "_" == goog.LOCALE.substring(3, 4)) || 7 <= goog.LOCALE.length && ("-" == goog.LOCALE.substring(2, 3) || "_" == goog.LOCALE.substring(2, 3)) && ("adlm" == goog.LOCALE.substring(3, 7).toLowerCase() || "arab" == goog.LOCALE.substring(3, 7).toLowerCase() || "hebr" == goog.LOCALE.substring(3, 7).toLowerCase() || "nkoo" == goog.LOCALE.substring(3,
  2389. 7).toLowerCase() || "rohg" == goog.LOCALE.substring(3, 7).toLowerCase() || "thaa" == goog.LOCALE.substring(3, 7).toLowerCase()) || 8 <= goog.LOCALE.length && ("-" == goog.LOCALE.substring(3, 4) || "_" == goog.LOCALE.substring(3, 4)) && ("adlm" == goog.LOCALE.substring(4, 8).toLowerCase() || "arab" == goog.LOCALE.substring(4, 8).toLowerCase() || "hebr" == goog.LOCALE.substring(4, 8).toLowerCase() || "nkoo" == goog.LOCALE.substring(4, 8).toLowerCase() || "rohg" == goog.LOCALE.substring(4, 8).toLowerCase() || "thaa" == goog.LOCALE.substring(4, 8).toLowerCase());
  2390. goog.i18n.bidi.Format = {LRE: "\u202a", RLE: "\u202b", PDF: "\u202c", LRM: "\u200e", RLM: "\u200f"};
  2391. goog.i18n.bidi.Dir = {LTR: 1, RTL: -1, NEUTRAL: 0};
  2392. goog.i18n.bidi.RIGHT = "right";
  2393. goog.i18n.bidi.LEFT = "left";
  2394. goog.i18n.bidi.I18N_RIGHT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.LEFT : goog.i18n.bidi.RIGHT;
  2395. goog.i18n.bidi.I18N_LEFT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
  2396. goog.i18n.bidi.toDir = function (a, b) {
  2397. return "number" == typeof a ? 0 < a ? goog.i18n.bidi.Dir.LTR : 0 > a ? goog.i18n.bidi.Dir.RTL : b ? null : goog.i18n.bidi.Dir.NEUTRAL : null == a ? null : a ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR
  2398. };
  2399. goog.i18n.bidi.ltrChars_ = "A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";
  2400. goog.i18n.bidi.rtlChars_ = "\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc";
  2401. goog.i18n.bidi.htmlSkipReg_ = /<[^>]*>|&[^;]+;/g;
  2402. goog.i18n.bidi.stripHtmlIfNeeded_ = function (a, b) {
  2403. return b ? a.replace(goog.i18n.bidi.htmlSkipReg_, "") : a
  2404. };
  2405. goog.i18n.bidi.rtlCharReg_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "]");
  2406. goog.i18n.bidi.ltrCharReg_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "]");
  2407. goog.i18n.bidi.hasAnyRtl = function (a, b) {
  2408. return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2409. };
  2410. goog.i18n.bidi.hasRtlChar = goog.i18n.bidi.hasAnyRtl;
  2411. goog.i18n.bidi.hasAnyLtr = function (a, b) {
  2412. return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2413. };
  2414. goog.i18n.bidi.ltrRe_ = new RegExp("^[" + goog.i18n.bidi.ltrChars_ + "]");
  2415. goog.i18n.bidi.rtlRe_ = new RegExp("^[" + goog.i18n.bidi.rtlChars_ + "]");
  2416. goog.i18n.bidi.isRtlChar = function (a) {
  2417. return goog.i18n.bidi.rtlRe_.test(a)
  2418. };
  2419. goog.i18n.bidi.isLtrChar = function (a) {
  2420. return goog.i18n.bidi.ltrRe_.test(a)
  2421. };
  2422. goog.i18n.bidi.isNeutralChar = function (a) {
  2423. return !goog.i18n.bidi.isLtrChar(a) && !goog.i18n.bidi.isRtlChar(a)
  2424. };
  2425. goog.i18n.bidi.ltrDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.rtlChars_ + "]*[" + goog.i18n.bidi.ltrChars_ + "]");
  2426. goog.i18n.bidi.rtlDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.ltrChars_ + "]*[" + goog.i18n.bidi.rtlChars_ + "]");
  2427. goog.i18n.bidi.startsWithRtl = function (a, b) {
  2428. return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2429. };
  2430. goog.i18n.bidi.isRtlText = goog.i18n.bidi.startsWithRtl;
  2431. goog.i18n.bidi.startsWithLtr = function (a, b) {
  2432. return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2433. };
  2434. goog.i18n.bidi.isLtrText = goog.i18n.bidi.startsWithLtr;
  2435. goog.i18n.bidi.isRequiredLtrRe_ = /^http:\/\/.*/;
  2436. goog.i18n.bidi.isNeutralText = function (a, b) {
  2437. a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b);
  2438. return goog.i18n.bidi.isRequiredLtrRe_.test(a) || !goog.i18n.bidi.hasAnyLtr(a) && !goog.i18n.bidi.hasAnyRtl(a)
  2439. };
  2440. goog.i18n.bidi.ltrExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "][^" + goog.i18n.bidi.rtlChars_ + "]*$");
  2441. goog.i18n.bidi.rtlExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "][^" + goog.i18n.bidi.ltrChars_ + "]*$");
  2442. goog.i18n.bidi.endsWithLtr = function (a, b) {
  2443. return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2444. };
  2445. goog.i18n.bidi.isLtrExitText = goog.i18n.bidi.endsWithLtr;
  2446. goog.i18n.bidi.endsWithRtl = function (a, b) {
  2447. return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
  2448. };
  2449. goog.i18n.bidi.isRtlExitText = goog.i18n.bidi.endsWithRtl;
  2450. goog.i18n.bidi.rtlLocalesRe_ = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
  2451. goog.i18n.bidi.isRtlLanguage = function (a) {
  2452. return goog.i18n.bidi.rtlLocalesRe_.test(a)
  2453. };
  2454. goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
  2455. goog.i18n.bidi.guardBracketInText = function (a, b) {
  2456. b = (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
  2457. return a.replace(goog.i18n.bidi.bracketGuardTextRe_, b + "$&" + b)
  2458. };
  2459. goog.i18n.bidi.enforceRtlInHtml = function (a) {
  2460. return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=rtl") : "\n<span dir=rtl>" + a + "</span>"
  2461. };
  2462. goog.i18n.bidi.enforceRtlInText = function (a) {
  2463. return goog.i18n.bidi.Format.RLE + a + goog.i18n.bidi.Format.PDF
  2464. };
  2465. goog.i18n.bidi.enforceLtrInHtml = function (a) {
  2466. return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=ltr") : "\n<span dir=ltr>" + a + "</span>"
  2467. };
  2468. goog.i18n.bidi.enforceLtrInText = function (a) {
  2469. return goog.i18n.bidi.Format.LRE + a + goog.i18n.bidi.Format.PDF
  2470. };
  2471. goog.i18n.bidi.dimensionsRe_ = /:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;
  2472. goog.i18n.bidi.leftRe_ = /left/gi;
  2473. goog.i18n.bidi.rightRe_ = /right/gi;
  2474. goog.i18n.bidi.tempRe_ = /%%%%/g;
  2475. goog.i18n.bidi.mirrorCSS = function (a) {
  2476. return a.replace(goog.i18n.bidi.dimensionsRe_, ":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_, "%%%%").replace(goog.i18n.bidi.rightRe_, goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_, goog.i18n.bidi.RIGHT)
  2477. };
  2478. goog.i18n.bidi.doubleQuoteSubstituteRe_ = /([\u0591-\u05f2])"/g;
  2479. goog.i18n.bidi.singleQuoteSubstituteRe_ = /([\u0591-\u05f2])'/g;
  2480. goog.i18n.bidi.normalizeHebrewQuote = function (a) {
  2481. return a.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_, "$1\u05f4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_, "$1\u05f3")
  2482. };
  2483. goog.i18n.bidi.wordSeparatorRe_ = /\s+/;
  2484. goog.i18n.bidi.hasNumeralsRe_ = /[\d\u06f0-\u06f9]/;
  2485. goog.i18n.bidi.rtlDetectionThreshold_ = .4;
  2486. goog.i18n.bidi.estimateDirection = function (a, b) {
  2487. var c = 0, d = 0, e = !1;
  2488. a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b).split(goog.i18n.bidi.wordSeparatorRe_);
  2489. for (b = 0; b < a.length; b++) {
  2490. var f = a[b];
  2491. goog.i18n.bidi.startsWithRtl(f) ? (c++, d++) : goog.i18n.bidi.isRequiredLtrRe_.test(f) ? e = !0 : goog.i18n.bidi.hasAnyLtr(f) ? d++ : goog.i18n.bidi.hasNumeralsRe_.test(f) && (e = !0);
  2492. }
  2493. return 0 == d ? e ? goog.i18n.bidi.Dir.LTR : goog.i18n.bidi.Dir.NEUTRAL : c / d > goog.i18n.bidi.rtlDetectionThreshold_ ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR
  2494. };
  2495. goog.i18n.bidi.detectRtlDirectionality = function (a, b) {
  2496. return goog.i18n.bidi.estimateDirection(a, b) == goog.i18n.bidi.Dir.RTL
  2497. };
  2498. goog.i18n.bidi.setElementDirAndAlign = function (a, b) {
  2499. a && (b = goog.i18n.bidi.toDir(b)) && (a.style.textAlign = b == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT, a.dir = b == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr");
  2500. };
  2501. goog.i18n.bidi.setElementDirByTextDirectionality = function (a, b) {
  2502. switch (goog.i18n.bidi.estimateDirection(b)) {
  2503. case goog.i18n.bidi.Dir.LTR:
  2504. a.dir = "ltr";
  2505. break;
  2506. case goog.i18n.bidi.Dir.RTL:
  2507. a.dir = "rtl";
  2508. break;
  2509. default:
  2510. a.removeAttribute("dir");
  2511. }
  2512. };
  2513. goog.i18n.bidi.DirectionalString = function () {
  2514. };
  2515. goog.html.TrustedResourceUrl = function (a, b) {
  2516. this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = a === goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ && b || "";
  2517. this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  2518. };
  2519. goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = !0;
  2520. goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function () {
  2521. return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()
  2522. };
  2523. goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
  2524. goog.html.TrustedResourceUrl.prototype.getDirection = function () {
  2525. return goog.i18n.bidi.Dir.LTR
  2526. };
  2527. goog.html.TrustedResourceUrl.prototype.cloneWithParams = function (a, b) {
  2528. var c = goog.html.TrustedResourceUrl.unwrap(this);
  2529. c = goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(c);
  2530. var d = c[3] || "";
  2531. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c[1] + goog.html.TrustedResourceUrl.stringifyParams_("?", c[2] || "", a) + goog.html.TrustedResourceUrl.stringifyParams_("#", d, b))
  2532. };
  2533. goog.DEBUG && (goog.html.TrustedResourceUrl.prototype.toString = function () {
  2534. return "TrustedResourceUrl{" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "}"
  2535. });
  2536. goog.html.TrustedResourceUrl.unwrap = function (a) {
  2537. return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(a).toString()
  2538. };
  2539. goog.html.TrustedResourceUrl.unwrapTrustedScriptURL = function (a) {
  2540. if (a instanceof goog.html.TrustedResourceUrl && a.constructor === goog.html.TrustedResourceUrl && a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
  2541. goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "' of type " + goog.typeOf(a));
  2542. return "type_error:TrustedResourceUrl"
  2543. };
  2544. goog.html.TrustedResourceUrl.format = function (a, b) {
  2545. var c = goog.string.Const.unwrap(a);
  2546. if (!goog.html.TrustedResourceUrl.BASE_URL_.test(c)) throw Error("Invalid TrustedResourceUrl format: " + c);
  2547. a = c.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_, function (a, e) {
  2548. if (!Object.prototype.hasOwnProperty.call(b, e)) throw Error('Found marker, "' + e + '", in format string, "' + c + '", but no valid label mapping found in args: ' + JSON.stringify(b));
  2549. a = b[e];
  2550. return a instanceof goog.string.Const ? goog.string.Const.unwrap(a) :
  2551. encodeURIComponent(String(a))
  2552. });
  2553. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)
  2554. };
  2555. goog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\w+)}/g;
  2556. goog.html.TrustedResourceUrl.BASE_URL_ = /^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i;
  2557. goog.html.TrustedResourceUrl.URL_PARAM_PARSER_ = /^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/;
  2558. goog.html.TrustedResourceUrl.formatWithParams = function (a, b, c, d) {
  2559. return goog.html.TrustedResourceUrl.format(a, b).cloneWithParams(c, d)
  2560. };
  2561. goog.html.TrustedResourceUrl.fromConstant = function (a) {
  2562. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a))
  2563. };
  2564. goog.html.TrustedResourceUrl.fromConstants = function (a) {
  2565. for (var b = "", c = 0; c < a.length; c++) b += goog.string.Const.unwrap(a[c]);
  2566. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)
  2567. };
  2568. goog.html.TrustedResourceUrl.fromSafeScript = function (a) {
  2569. a = goog.fs.blob.getBlobWithProperties([goog.html.SafeScript.unwrap(a)], "text/javascript");
  2570. a = goog.fs.url.createObjectUrl(a);
  2571. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)
  2572. };
  2573. goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2574. goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function (a) {
  2575. a = goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ? goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(a) : a;
  2576. return new goog.html.TrustedResourceUrl(goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_, a)
  2577. };
  2578. goog.html.TrustedResourceUrl.stringifyParams_ = function (a, b, c) {
  2579. if (null == c) return b;
  2580. if ("string" === typeof c) return c ? a + encodeURIComponent(c) : "";
  2581. for (var d in c) {
  2582. var e = c[d];
  2583. e = Array.isArray(e) ? e : [e];
  2584. for (var f = 0; f < e.length; f++) {
  2585. var g = e[f];
  2586. null != g && (b || (b = a), b += (b.length > a.length ? "&" : "") + encodeURIComponent(d) + "=" + encodeURIComponent(String(g)));
  2587. }
  2588. }
  2589. return b
  2590. };
  2591. goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};
  2592. goog.string.internal = {};
  2593. goog.string.internal.startsWith = function (a, b) {
  2594. return 0 == a.lastIndexOf(b, 0)
  2595. };
  2596. goog.string.internal.endsWith = function (a, b) {
  2597. var c = a.length - b.length;
  2598. return 0 <= c && a.indexOf(b, c) == c
  2599. };
  2600. goog.string.internal.caseInsensitiveStartsWith = function (a, b) {
  2601. return 0 == goog.string.internal.caseInsensitiveCompare(b, a.substr(0, b.length))
  2602. };
  2603. goog.string.internal.caseInsensitiveEndsWith = function (a, b) {
  2604. return 0 == goog.string.internal.caseInsensitiveCompare(b, a.substr(a.length - b.length, b.length))
  2605. };
  2606. goog.string.internal.caseInsensitiveEquals = function (a, b) {
  2607. return a.toLowerCase() == b.toLowerCase()
  2608. };
  2609. goog.string.internal.isEmptyOrWhitespace = function (a) {
  2610. return /^[\s\xa0]*$/.test(a)
  2611. };
  2612. goog.string.internal.trim = goog.TRUSTED_SITE && String.prototype.trim ? function (a) {
  2613. return a.trim()
  2614. } : function (a) {
  2615. return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]
  2616. };
  2617. goog.string.internal.caseInsensitiveCompare = function (a, b) {
  2618. a = String(a).toLowerCase();
  2619. b = String(b).toLowerCase();
  2620. return a < b ? -1 : a == b ? 0 : 1
  2621. };
  2622. goog.string.internal.newLineToBr = function (a, b) {
  2623. return a.replace(/(\r\n|\r|\n)/g, b ? "<br />" : "<br>")
  2624. };
  2625. goog.string.internal.htmlEscape = function (a, b) {
  2626. if (b) a = a.replace(goog.string.internal.AMP_RE_, "&amp;").replace(goog.string.internal.LT_RE_, "&lt;").replace(goog.string.internal.GT_RE_, "&gt;").replace(goog.string.internal.QUOT_RE_, "&quot;").replace(goog.string.internal.SINGLE_QUOTE_RE_, "&#39;").replace(goog.string.internal.NULL_RE_, "&#0;"); else {
  2627. if (!goog.string.internal.ALL_RE_.test(a)) return a;
  2628. -1 != a.indexOf("&") && (a = a.replace(goog.string.internal.AMP_RE_, "&amp;"));
  2629. -1 != a.indexOf("<") && (a = a.replace(goog.string.internal.LT_RE_,
  2630. "&lt;"));
  2631. -1 != a.indexOf(">") && (a = a.replace(goog.string.internal.GT_RE_, "&gt;"));
  2632. -1 != a.indexOf('"') && (a = a.replace(goog.string.internal.QUOT_RE_, "&quot;"));
  2633. -1 != a.indexOf("'") && (a = a.replace(goog.string.internal.SINGLE_QUOTE_RE_, "&#39;"));
  2634. -1 != a.indexOf("\x00") && (a = a.replace(goog.string.internal.NULL_RE_, "&#0;"));
  2635. }
  2636. return a
  2637. };
  2638. goog.string.internal.AMP_RE_ = /&/g;
  2639. goog.string.internal.LT_RE_ = /</g;
  2640. goog.string.internal.GT_RE_ = />/g;
  2641. goog.string.internal.QUOT_RE_ = /"/g;
  2642. goog.string.internal.SINGLE_QUOTE_RE_ = /'/g;
  2643. goog.string.internal.NULL_RE_ = /\x00/g;
  2644. goog.string.internal.ALL_RE_ = /[\x00&<>"']/;
  2645. goog.string.internal.whitespaceEscape = function (a, b) {
  2646. return goog.string.internal.newLineToBr(a.replace(/ /g, " &#160;"), b)
  2647. };
  2648. goog.string.internal.contains = function (a, b) {
  2649. return -1 != a.indexOf(b)
  2650. };
  2651. goog.string.internal.caseInsensitiveContains = function (a, b) {
  2652. return goog.string.internal.contains(a.toLowerCase(), b.toLowerCase())
  2653. };
  2654. goog.string.internal.compareVersions = function (a, b) {
  2655. var c = 0;
  2656. a = goog.string.internal.trim(String(a)).split(".");
  2657. b = goog.string.internal.trim(String(b)).split(".");
  2658. for (var d = Math.max(a.length, b.length), e = 0; 0 == c && e < d; e++) {
  2659. var f = a[e] || "", g = b[e] || "";
  2660. do {
  2661. f = /(\d*)(\D*)(.*)/.exec(f) || ["", "", "", ""];
  2662. g = /(\d*)(\D*)(.*)/.exec(g) || ["", "", "", ""];
  2663. if (0 == f[0].length && 0 == g[0].length) break;
  2664. c = 0 == f[1].length ? 0 : parseInt(f[1], 10);
  2665. var h = 0 == g[1].length ? 0 : parseInt(g[1], 10);
  2666. c = goog.string.internal.compareElements_(c, h) || goog.string.internal.compareElements_(0 ==
  2667. f[2].length, 0 == g[2].length) || goog.string.internal.compareElements_(f[2], g[2]);
  2668. f = f[3];
  2669. g = g[3];
  2670. } while (0 == c)
  2671. }
  2672. return c
  2673. };
  2674. goog.string.internal.compareElements_ = function (a, b) {
  2675. return a < b ? -1 : a > b ? 1 : 0
  2676. };
  2677. goog.html.SafeUrl = function (a, b) {
  2678. this.privateDoNotAccessOrElseSafeUrlWrappedValue_ = a === goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_ && b || "";
  2679. this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  2680. };
  2681. goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez";
  2682. goog.html.SafeUrl.prototype.implementsGoogStringTypedString = !0;
  2683. goog.html.SafeUrl.prototype.getTypedStringValue = function () {
  2684. return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()
  2685. };
  2686. goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
  2687. goog.html.SafeUrl.prototype.getDirection = function () {
  2688. return goog.i18n.bidi.Dir.LTR
  2689. };
  2690. goog.DEBUG && (goog.html.SafeUrl.prototype.toString = function () {
  2691. return "SafeUrl{" + this.privateDoNotAccessOrElseSafeUrlWrappedValue_ + "}"
  2692. });
  2693. goog.html.SafeUrl.unwrap = function (a) {
  2694. if (a instanceof goog.html.SafeUrl && a.constructor === goog.html.SafeUrl && a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeUrlWrappedValue_;
  2695. goog.asserts.fail("expected object of type SafeUrl, got '" + a + "' of type " + goog.typeOf(a));
  2696. return "type_error:SafeUrl"
  2697. };
  2698. goog.html.SafeUrl.fromConstant = function (a) {
  2699. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a))
  2700. };
  2701. goog.html.SAFE_MIME_TYPE_PATTERN_ = /^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i;
  2702. goog.html.SafeUrl.isSafeMimeType = function (a) {
  2703. return goog.html.SAFE_MIME_TYPE_PATTERN_.test(a)
  2704. };
  2705. goog.html.SafeUrl.fromBlob = function (a) {
  2706. a = goog.html.SafeUrl.isSafeMimeType(a.type) ? goog.fs.url.createObjectUrl(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
  2707. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2708. };
  2709. goog.html.SafeUrl.fromMediaSource = function (a) {
  2710. goog.asserts.assert("MediaSource" in goog.global, "No support for MediaSource");
  2711. a = a instanceof MediaSource ? goog.fs.url.createObjectUrl(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
  2712. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2713. };
  2714. goog.html.DATA_URL_PATTERN_ = /^data:(.*);base64,[a-z0-9+\/]+=*$/i;
  2715. goog.html.SafeUrl.fromDataUrl = function (a) {
  2716. a = a.replace(/(%0A|%0D)/g, "");
  2717. var b = a.match(goog.html.DATA_URL_PATTERN_);
  2718. b = b && goog.html.SafeUrl.isSafeMimeType(b[1]);
  2719. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b ? a : goog.html.SafeUrl.INNOCUOUS_STRING)
  2720. };
  2721. goog.html.SafeUrl.fromTelUrl = function (a) {
  2722. goog.string.internal.caseInsensitiveStartsWith(a, "tel:") || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2723. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2724. };
  2725. goog.html.SIP_URL_PATTERN_ = /^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i;
  2726. goog.html.SafeUrl.fromSipUrl = function (a) {
  2727. goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(a)) || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2728. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2729. };
  2730. goog.html.SafeUrl.fromFacebookMessengerUrl = function (a) {
  2731. goog.string.internal.caseInsensitiveStartsWith(a, "fb-messenger://share") || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2732. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2733. };
  2734. goog.html.SafeUrl.fromWhatsAppUrl = function (a) {
  2735. goog.string.internal.caseInsensitiveStartsWith(a, "whatsapp://send") || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2736. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2737. };
  2738. goog.html.SafeUrl.fromSmsUrl = function (a) {
  2739. goog.string.internal.caseInsensitiveStartsWith(a, "sms:") && goog.html.SafeUrl.isSmsUrlBodyValid_(a) || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2740. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2741. };
  2742. goog.html.SafeUrl.isSmsUrlBodyValid_ = function (a) {
  2743. var b = a.indexOf("#");
  2744. 0 < b && (a = a.substring(0, b));
  2745. b = a.match(/[?&]body=/gi);
  2746. if (!b) return !0;
  2747. if (1 < b.length) return !1;
  2748. a = a.match(/[?&]body=([^&]*)/)[1];
  2749. if (!a) return !0;
  2750. try {
  2751. decodeURIComponent(a);
  2752. } catch (c) {
  2753. return !1
  2754. }
  2755. return /^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(a)
  2756. };
  2757. goog.html.SafeUrl.fromSshUrl = function (a) {
  2758. goog.string.internal.caseInsensitiveStartsWith(a, "ssh://") || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2759. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2760. };
  2761. goog.html.SafeUrl.sanitizeChromeExtensionUrl = function (a, b) {
  2762. return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//, a, b)
  2763. };
  2764. goog.html.SafeUrl.sanitizeFirefoxExtensionUrl = function (a, b) {
  2765. return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//, a, b)
  2766. };
  2767. goog.html.SafeUrl.sanitizeEdgeExtensionUrl = function (a, b) {
  2768. return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//, a, b)
  2769. };
  2770. goog.html.SafeUrl.sanitizeExtensionUrl_ = function (a, b, c) {
  2771. (a = a.exec(b)) ? (a = a[1], -1 == (c instanceof goog.string.Const ? [goog.string.Const.unwrap(c)] : c.map(function (a) {
  2772. return goog.string.Const.unwrap(a)
  2773. })).indexOf(a) && (b = goog.html.SafeUrl.INNOCUOUS_STRING)) : b = goog.html.SafeUrl.INNOCUOUS_STRING;
  2774. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)
  2775. };
  2776. goog.html.SafeUrl.fromTrustedResourceUrl = function (a) {
  2777. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(a))
  2778. };
  2779. goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;
  2780. goog.html.SafeUrl.SAFE_URL_PATTERN = goog.html.SAFE_URL_PATTERN_;
  2781. goog.html.SafeUrl.sanitize = function (a) {
  2782. if (a instanceof goog.html.SafeUrl) return a;
  2783. a = "object" == typeof a && a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
  2784. goog.html.SAFE_URL_PATTERN_.test(a) || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2785. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2786. };
  2787. goog.html.SafeUrl.sanitizeAssertUnchanged = function (a, b) {
  2788. if (a instanceof goog.html.SafeUrl) return a;
  2789. a = "object" == typeof a && a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
  2790. if (b && /^data:/i.test(a) && (b = goog.html.SafeUrl.fromDataUrl(a), b.getTypedStringValue() == a)) return b;
  2791. goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(a), "%s does not match the safe URL pattern", a) || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
  2792. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
  2793. };
  2794. goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2795. goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function (a) {
  2796. return new goog.html.SafeUrl(goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_, a)
  2797. };
  2798. goog.html.SafeUrl.ABOUT_BLANK = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");
  2799. goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};
  2800. goog.html.SafeStyle = function () {
  2801. this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = "";
  2802. this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  2803. };
  2804. goog.html.SafeStyle.prototype.implementsGoogStringTypedString = !0;
  2805. goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2806. goog.html.SafeStyle.fromConstant = function (a) {
  2807. a = goog.string.Const.unwrap(a);
  2808. if (0 === a.length) return goog.html.SafeStyle.EMPTY;
  2809. goog.asserts.assert(goog.string.internal.endsWith(a, ";"), "Last character of style string is not ';': " + a);
  2810. goog.asserts.assert(goog.string.internal.contains(a, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + a);
  2811. return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)
  2812. };
  2813. goog.html.SafeStyle.prototype.getTypedStringValue = function () {
  2814. return this.privateDoNotAccessOrElseSafeStyleWrappedValue_
  2815. };
  2816. goog.DEBUG && (goog.html.SafeStyle.prototype.toString = function () {
  2817. return "SafeStyle{" + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ + "}"
  2818. });
  2819. goog.html.SafeStyle.unwrap = function (a) {
  2820. if (a instanceof goog.html.SafeStyle && a.constructor === goog.html.SafeStyle && a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;
  2821. goog.asserts.fail("expected object of type SafeStyle, got '" + a + "' of type " + goog.typeOf(a));
  2822. return "type_error:SafeStyle"
  2823. };
  2824. goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function (a) {
  2825. return (new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(a)
  2826. };
  2827. goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a) {
  2828. this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = a;
  2829. return this
  2830. };
  2831. goog.html.SafeStyle.EMPTY = goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");
  2832. goog.html.SafeStyle.INNOCUOUS_STRING = "zClosurez";
  2833. goog.html.SafeStyle.create = function (a) {
  2834. var b = "", c;
  2835. for (c in a) {
  2836. if (!/^[-_a-zA-Z0-9]+$/.test(c)) throw Error("Name allows only [-_a-zA-Z0-9], got: " + c);
  2837. var d = a[c];
  2838. null != d && (d = Array.isArray(d) ? goog.array.map(d, goog.html.SafeStyle.sanitizePropertyValue_).join(" ") : goog.html.SafeStyle.sanitizePropertyValue_(d), b += c + ":" + d + ";");
  2839. }
  2840. return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY
  2841. };
  2842. goog.html.SafeStyle.sanitizePropertyValue_ = function (a) {
  2843. if (a instanceof goog.html.SafeUrl) return 'url("' + goog.html.SafeUrl.unwrap(a).replace(/</g, "%3c").replace(/[\\"]/g, "\\$&") + '")';
  2844. a = a instanceof goog.string.Const ? goog.string.Const.unwrap(a) : goog.html.SafeStyle.sanitizePropertyValueString_(String(a));
  2845. if (/[{;}]/.test(a)) throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.", [a]);
  2846. return a
  2847. };
  2848. goog.html.SafeStyle.sanitizePropertyValueString_ = function (a) {
  2849. var b = a.replace(goog.html.SafeStyle.FUNCTIONS_RE_, "$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_, "$1").replace(goog.html.SafeStyle.URL_RE_, "url");
  2850. if (goog.html.SafeStyle.VALUE_RE_.test(b)) {
  2851. if (goog.html.SafeStyle.COMMENT_RE_.test(a)) return goog.asserts.fail("String value disallows comments, got: " + a), goog.html.SafeStyle.INNOCUOUS_STRING;
  2852. if (!goog.html.SafeStyle.hasBalancedQuotes_(a)) return goog.asserts.fail("String value requires balanced quotes, got: " +
  2853. a), goog.html.SafeStyle.INNOCUOUS_STRING;
  2854. if (!goog.html.SafeStyle.hasBalancedSquareBrackets_(a)) return goog.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: " + a), goog.html.SafeStyle.INNOCUOUS_STRING
  2855. } else return goog.asserts.fail("String value allows only " + goog.html.SafeStyle.VALUE_ALLOWED_CHARS_ + " and simple functions, got: " + a), goog.html.SafeStyle.INNOCUOUS_STRING;
  2856. return goog.html.SafeStyle.sanitizeUrl_(a)
  2857. };
  2858. goog.html.SafeStyle.hasBalancedQuotes_ = function (a) {
  2859. for (var b = !0, c = !0, d = 0; d < a.length; d++) {
  2860. var e = a.charAt(d);
  2861. "'" == e && c ? b = !b : '"' == e && b && (c = !c);
  2862. }
  2863. return b && c
  2864. };
  2865. goog.html.SafeStyle.hasBalancedSquareBrackets_ = function (a) {
  2866. for (var b = !0, c = /^[-_a-zA-Z0-9]$/, d = 0; d < a.length; d++) {
  2867. var e = a.charAt(d);
  2868. if ("]" == e) {
  2869. if (b) return !1;
  2870. b = !0;
  2871. } else if ("[" == e) {
  2872. if (!b) return !1;
  2873. b = !1;
  2874. } else if (!b && !c.test(e)) return !1
  2875. }
  2876. return b
  2877. };
  2878. goog.html.SafeStyle.VALUE_ALLOWED_CHARS_ = "[-,.\"'%_!# a-zA-Z0-9\\[\\]]";
  2879. goog.html.SafeStyle.VALUE_RE_ = new RegExp("^" + goog.html.SafeStyle.VALUE_ALLOWED_CHARS_ + "+$");
  2880. goog.html.SafeStyle.URL_RE_ = /\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g;
  2881. goog.html.SafeStyle.ALLOWED_FUNCTIONS_ = "calc cubic-bezier fit-content hsl hsla linear-gradient matrix minmax repeat rgb rgba (rotate|scale|translate)(X|Y|Z|3d)?".split(" ");
  2882. goog.html.SafeStyle.FUNCTIONS_RE_ = new RegExp("\\b(" + goog.html.SafeStyle.ALLOWED_FUNCTIONS_.join("|") + ")\\([-+*/0-9a-z.%\\[\\], ]+\\)", "g");
  2883. goog.html.SafeStyle.COMMENT_RE_ = /\/\*/;
  2884. goog.html.SafeStyle.sanitizeUrl_ = function (a) {
  2885. return a.replace(goog.html.SafeStyle.URL_RE_, function (a, c, d, e) {
  2886. var b = "";
  2887. d = d.replace(/^(['"])(.*)\1$/, function (a, c, d) {
  2888. b = c;
  2889. return d
  2890. });
  2891. a = goog.html.SafeUrl.sanitize(d).getTypedStringValue();
  2892. return c + b + a + b + e
  2893. })
  2894. };
  2895. goog.html.SafeStyle.concat = function (a) {
  2896. var b = "", c = function (a) {
  2897. Array.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyle.unwrap(a);
  2898. };
  2899. goog.array.forEach(arguments, c);
  2900. return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY
  2901. };
  2902. goog.html.SafeStyleSheet = function () {
  2903. this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = "";
  2904. this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  2905. };
  2906. goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString = !0;
  2907. goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  2908. goog.html.SafeStyleSheet.createRule = function (a, b) {
  2909. if (goog.string.internal.contains(a, "<")) throw Error("Selector does not allow '<', got: " + a);
  2910. var c = a.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g, "");
  2911. if (!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(c)) throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: " + a);
  2912. if (!goog.html.SafeStyleSheet.hasBalancedBrackets_(c)) throw Error("() and [] in selector must be balanced, got: " + a);
  2913. b instanceof goog.html.SafeStyle || (b = goog.html.SafeStyle.create(b));
  2914. a = a + "{" + goog.html.SafeStyle.unwrap(b).replace(/</g, "\\3C ") + "}";
  2915. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)
  2916. };
  2917. goog.html.SafeStyleSheet.hasBalancedBrackets_ = function (a) {
  2918. for (var b = {"(": ")", "[": "]"}, c = [], d = 0; d < a.length; d++) {
  2919. var e = a[d];
  2920. if (b[e]) c.push(b[e]); else if (goog.object.contains(b, e) && c.pop() != e) return !1
  2921. }
  2922. return 0 == c.length
  2923. };
  2924. goog.html.SafeStyleSheet.concat = function (a) {
  2925. var b = "", c = function (a) {
  2926. Array.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyleSheet.unwrap(a);
  2927. };
  2928. goog.array.forEach(arguments, c);
  2929. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)
  2930. };
  2931. goog.html.SafeStyleSheet.fromConstant = function (a) {
  2932. a = goog.string.Const.unwrap(a);
  2933. if (0 === a.length) return goog.html.SafeStyleSheet.EMPTY;
  2934. goog.asserts.assert(!goog.string.internal.contains(a, "<"), "Forbidden '<' character in style sheet string: " + a);
  2935. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)
  2936. };
  2937. goog.html.SafeStyleSheet.prototype.getTypedStringValue = function () {
  2938. return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_
  2939. };
  2940. goog.DEBUG && (goog.html.SafeStyleSheet.prototype.toString = function () {
  2941. return "SafeStyleSheet{" + this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ + "}"
  2942. });
  2943. goog.html.SafeStyleSheet.unwrap = function (a) {
  2944. if (a instanceof goog.html.SafeStyleSheet && a.constructor === goog.html.SafeStyleSheet && a.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
  2945. goog.asserts.fail("expected object of type SafeStyleSheet, got '" + a + "' of type " + goog.typeOf(a));
  2946. return "type_error:SafeStyleSheet"
  2947. };
  2948. goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse = function (a) {
  2949. return (new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(a)
  2950. };
  2951. goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a) {
  2952. this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = a;
  2953. return this
  2954. };
  2955. goog.html.SafeStyleSheet.EMPTY = goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");
  2956. goog.labs = {};
  2957. goog.labs.userAgent = {};
  2958. goog.labs.userAgent.util = {};
  2959. goog.labs.userAgent.util.getNativeUserAgentString_ = function () {
  2960. var a = goog.labs.userAgent.util.getNavigator_();
  2961. return a && (a = a.userAgent) ? a : ""
  2962. };
  2963. goog.labs.userAgent.util.getNavigator_ = function () {
  2964. return goog.global.navigator
  2965. };
  2966. goog.labs.userAgent.util.userAgent_ = goog.labs.userAgent.util.getNativeUserAgentString_();
  2967. goog.labs.userAgent.util.setUserAgent = function (a) {
  2968. goog.labs.userAgent.util.userAgent_ = a || goog.labs.userAgent.util.getNativeUserAgentString_();
  2969. };
  2970. goog.labs.userAgent.util.getUserAgent = function () {
  2971. return goog.labs.userAgent.util.userAgent_
  2972. };
  2973. goog.labs.userAgent.util.matchUserAgent = function (a) {
  2974. var b = goog.labs.userAgent.util.getUserAgent();
  2975. return goog.string.internal.contains(b, a)
  2976. };
  2977. goog.labs.userAgent.util.matchUserAgentIgnoreCase = function (a) {
  2978. var b = goog.labs.userAgent.util.getUserAgent();
  2979. return goog.string.internal.caseInsensitiveContains(b, a)
  2980. };
  2981. goog.labs.userAgent.util.extractVersionTuples = function (a) {
  2982. for (var b = /(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g, c = [], d; d = b.exec(a);) c.push([d[1], d[2], d[3] || void 0]);
  2983. return c
  2984. };
  2985. goog.labs.userAgent.browser = {};
  2986. goog.labs.userAgent.browser.matchOpera_ = function () {
  2987. return goog.labs.userAgent.util.matchUserAgent("Opera")
  2988. };
  2989. goog.labs.userAgent.browser.matchIE_ = function () {
  2990. return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE")
  2991. };
  2992. goog.labs.userAgent.browser.matchEdgeHtml_ = function () {
  2993. return goog.labs.userAgent.util.matchUserAgent("Edge")
  2994. };
  2995. goog.labs.userAgent.browser.matchEdgeChromium_ = function () {
  2996. return goog.labs.userAgent.util.matchUserAgent("Edg/")
  2997. };
  2998. goog.labs.userAgent.browser.matchOperaChromium_ = function () {
  2999. return goog.labs.userAgent.util.matchUserAgent("OPR")
  3000. };
  3001. goog.labs.userAgent.browser.matchFirefox_ = function () {
  3002. return goog.labs.userAgent.util.matchUserAgent("Firefox") || goog.labs.userAgent.util.matchUserAgent("FxiOS")
  3003. };
  3004. goog.labs.userAgent.browser.matchSafari_ = function () {
  3005. return goog.labs.userAgent.util.matchUserAgent("Safari") && !(goog.labs.userAgent.browser.matchChrome_() || goog.labs.userAgent.browser.matchCoast_() || goog.labs.userAgent.browser.matchOpera_() || goog.labs.userAgent.browser.matchEdgeHtml_() || goog.labs.userAgent.browser.matchEdgeChromium_() || goog.labs.userAgent.browser.matchOperaChromium_() || goog.labs.userAgent.browser.matchFirefox_() || goog.labs.userAgent.browser.isSilk() || goog.labs.userAgent.util.matchUserAgent("Android"))
  3006. };
  3007. goog.labs.userAgent.browser.matchCoast_ = function () {
  3008. return goog.labs.userAgent.util.matchUserAgent("Coast")
  3009. };
  3010. goog.labs.userAgent.browser.matchIosWebview_ = function () {
  3011. return (goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && !goog.labs.userAgent.browser.matchFirefox_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit")
  3012. };
  3013. goog.labs.userAgent.browser.matchChrome_ = function () {
  3014. return (goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS")) && !goog.labs.userAgent.browser.matchEdgeHtml_()
  3015. };
  3016. goog.labs.userAgent.browser.matchAndroidBrowser_ = function () {
  3017. return goog.labs.userAgent.util.matchUserAgent("Android") && !(goog.labs.userAgent.browser.isChrome() || goog.labs.userAgent.browser.isFirefox() || goog.labs.userAgent.browser.isOpera() || goog.labs.userAgent.browser.isSilk())
  3018. };
  3019. goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
  3020. goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
  3021. goog.labs.userAgent.browser.isEdge = goog.labs.userAgent.browser.matchEdgeHtml_;
  3022. goog.labs.userAgent.browser.isEdgeChromium = goog.labs.userAgent.browser.matchEdgeChromium_;
  3023. goog.labs.userAgent.browser.isOperaChromium = goog.labs.userAgent.browser.matchOperaChromium_;
  3024. goog.labs.userAgent.browser.isFirefox = goog.labs.userAgent.browser.matchFirefox_;
  3025. goog.labs.userAgent.browser.isSafari = goog.labs.userAgent.browser.matchSafari_;
  3026. goog.labs.userAgent.browser.isCoast = goog.labs.userAgent.browser.matchCoast_;
  3027. goog.labs.userAgent.browser.isIosWebview = goog.labs.userAgent.browser.matchIosWebview_;
  3028. goog.labs.userAgent.browser.isChrome = goog.labs.userAgent.browser.matchChrome_;
  3029. goog.labs.userAgent.browser.isAndroidBrowser = goog.labs.userAgent.browser.matchAndroidBrowser_;
  3030. goog.labs.userAgent.browser.isSilk = function () {
  3031. return goog.labs.userAgent.util.matchUserAgent("Silk")
  3032. };
  3033. goog.labs.userAgent.browser.getVersion = function () {
  3034. function a(a) {
  3035. a = goog.array.find(a, d);
  3036. return c[a] || ""
  3037. }
  3038.  
  3039. var b = goog.labs.userAgent.util.getUserAgent();
  3040. if (goog.labs.userAgent.browser.isIE()) return goog.labs.userAgent.browser.getIEVersion_(b);
  3041. b = goog.labs.userAgent.util.extractVersionTuples(b);
  3042. var c = {};
  3043. goog.array.forEach(b, function (a) {
  3044. c[a[0]] = a[1];
  3045. });
  3046. var d = goog.partial(goog.object.containsKey, c);
  3047. return goog.labs.userAgent.browser.isOpera() ? a(["Version", "Opera"]) : goog.labs.userAgent.browser.isEdge() ? a(["Edge"]) :
  3048. goog.labs.userAgent.browser.isEdgeChromium() ? a(["Edg"]) : goog.labs.userAgent.browser.isChrome() ? a(["Chrome", "CriOS", "HeadlessChrome"]) : (b = b[2]) && b[1] || ""
  3049. };
  3050. goog.labs.userAgent.browser.isVersionOrHigher = function (a) {
  3051. return 0 <= goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(), a)
  3052. };
  3053. goog.labs.userAgent.browser.getIEVersion_ = function (a) {
  3054. var b = /rv: *([\d\.]*)/.exec(a);
  3055. if (b && b[1]) return b[1];
  3056. b = "";
  3057. var c = /MSIE +([\d\.]+)/.exec(a);
  3058. if (c && c[1]) if (a = /Trident\/(\d.\d)/.exec(a), "7.0" == c[1]) if (a && a[1]) switch (a[1]) {
  3059. case "4.0":
  3060. b = "8.0";
  3061. break;
  3062. case "5.0":
  3063. b = "9.0";
  3064. break;
  3065. case "6.0":
  3066. b = "10.0";
  3067. break;
  3068. case "7.0":
  3069. b = "11.0";
  3070. } else b = "7.0"; else b = c[1];
  3071. return b
  3072. };
  3073. goog.html.SafeHtml = function () {
  3074. this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
  3075. this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
  3076. this.dir_ = null;
  3077. };
  3078. goog.html.SafeHtml.ENABLE_ERROR_MESSAGES = goog.DEBUG;
  3079. goog.html.SafeHtml.SUPPORT_STYLE_ATTRIBUTE = !0;
  3080. goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString = !0;
  3081. goog.html.SafeHtml.prototype.getDirection = function () {
  3082. return this.dir_
  3083. };
  3084. goog.html.SafeHtml.prototype.implementsGoogStringTypedString = !0;
  3085. goog.html.SafeHtml.prototype.getTypedStringValue = function () {
  3086. return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()
  3087. };
  3088. goog.DEBUG && (goog.html.SafeHtml.prototype.toString = function () {
  3089. return "SafeHtml{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}"
  3090. });
  3091. goog.html.SafeHtml.unwrap = function (a) {
  3092. return goog.html.SafeHtml.unwrapTrustedHTML(a).toString()
  3093. };
  3094. goog.html.SafeHtml.unwrapTrustedHTML = function (a) {
  3095. if (a instanceof goog.html.SafeHtml && a.constructor === goog.html.SafeHtml && a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
  3096. goog.asserts.fail("expected object of type SafeHtml, got '" + a + "' of type " + goog.typeOf(a));
  3097. return "type_error:SafeHtml"
  3098. };
  3099. goog.html.SafeHtml.htmlEscape = function (a) {
  3100. if (a instanceof goog.html.SafeHtml) return a;
  3101. var b = "object" == typeof a, c = null;
  3102. b && a.implementsGoogI18nBidiDirectionalString && (c = a.getDirection());
  3103. a = b && a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
  3104. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(a), c)
  3105. };
  3106. goog.html.SafeHtml.htmlEscapePreservingNewlines = function (a) {
  3107. if (a instanceof goog.html.SafeHtml) return a;
  3108. a = goog.html.SafeHtml.htmlEscape(a);
  3109. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog.html.SafeHtml.unwrap(a)), a.getDirection())
  3110. };
  3111. goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function (a) {
  3112. if (a instanceof goog.html.SafeHtml) return a;
  3113. a = goog.html.SafeHtml.htmlEscape(a);
  3114. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(goog.html.SafeHtml.unwrap(a)), a.getDirection())
  3115. };
  3116. goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
  3117. goog.html.SafeHtml.comment = function (a) {
  3118. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("\x3c!--" + goog.string.internal.htmlEscape(a) + "--\x3e", null)
  3119. };
  3120. goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
  3121. goog.html.SafeHtml.URL_ATTRIBUTES_ = {
  3122. action: !0,
  3123. cite: !0,
  3124. data: !0,
  3125. formaction: !0,
  3126. href: !0,
  3127. manifest: !0,
  3128. poster: !0,
  3129. src: !0
  3130. };
  3131. goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = {
  3132. APPLET: !0,
  3133. BASE: !0,
  3134. EMBED: !0,
  3135. IFRAME: !0,
  3136. LINK: !0,
  3137. MATH: !0,
  3138. META: !0,
  3139. OBJECT: !0,
  3140. SCRIPT: !0,
  3141. STYLE: !0,
  3142. SVG: !0,
  3143. TEMPLATE: !0
  3144. };
  3145. goog.html.SafeHtml.create = function (a, b, c) {
  3146. goog.html.SafeHtml.verifyTagName(String(a));
  3147. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(a), b, c)
  3148. };
  3149. goog.html.SafeHtml.verifyTagName = function (a) {
  3150. if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a)) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? "Invalid tag name <" + a + ">." : "");
  3151. if (a.toUpperCase() in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? "Tag name <" + a + "> is not allowed for SafeHtml." : "");
  3152. };
  3153. goog.html.SafeHtml.createIframe = function (a, b, c, d) {
  3154. a && goog.html.TrustedResourceUrl.unwrap(a);
  3155. var e = {};
  3156. e.src = a || null;
  3157. e.srcdoc = b && goog.html.SafeHtml.unwrap(b);
  3158. a = goog.html.SafeHtml.combineAttributes(e, {sandbox: ""}, c);
  3159. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", a, d)
  3160. };
  3161. goog.html.SafeHtml.createSandboxIframe = function (a, b, c, d) {
  3162. if (!goog.html.SafeHtml.canUseSandboxIframe()) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? "The browser does not support sandboxed iframes." : "");
  3163. var e = {};
  3164. e.src = a ? goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a)) : null;
  3165. e.srcdoc = b || null;
  3166. e.sandbox = "";
  3167. a = goog.html.SafeHtml.combineAttributes(e, {}, c);
  3168. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", a, d)
  3169. };
  3170. goog.html.SafeHtml.canUseSandboxIframe = function () {
  3171. return goog.global.HTMLIFrameElement && "sandbox" in goog.global.HTMLIFrameElement.prototype
  3172. };
  3173. goog.html.SafeHtml.createScriptSrc = function (a, b) {
  3174. goog.html.TrustedResourceUrl.unwrap(a);
  3175. a = goog.html.SafeHtml.combineAttributes({src: a}, {}, b);
  3176. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", a)
  3177. };
  3178. goog.html.SafeHtml.createScript = function (a, b) {
  3179. for (var c in b) {
  3180. var d = c.toLowerCase();
  3181. if ("language" == d || "src" == d || "text" == d || "type" == d) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Cannot set "' + d + '" attribute' : "");
  3182. }
  3183. c = "";
  3184. a = goog.array.concat(a);
  3185. for (d = 0; d < a.length; d++) c += goog.html.SafeScript.unwrap(a[d]);
  3186. a = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, goog.i18n.bidi.Dir.NEUTRAL);
  3187. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", b, a)
  3188. };
  3189. goog.html.SafeHtml.createStyle = function (a, b) {
  3190. b = goog.html.SafeHtml.combineAttributes({type: "text/css"}, {}, b);
  3191. var c = "";
  3192. a = goog.array.concat(a);
  3193. for (var d = 0; d < a.length; d++) c += goog.html.SafeStyleSheet.unwrap(a[d]);
  3194. a = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, goog.i18n.bidi.Dir.NEUTRAL);
  3195. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", b, a)
  3196. };
  3197. goog.html.SafeHtml.createMetaRefresh = function (a, b) {
  3198. a = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a));
  3199. (goog.labs.userAgent.browser.isIE() || goog.labs.userAgent.browser.isEdge()) && goog.string.internal.contains(a, ";") && (a = "'" + a.replace(/'/g, "%27") + "'");
  3200. return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {
  3201. "http-equiv": "refresh",
  3202. content: (b || 0) + "; url=" + a
  3203. })
  3204. };
  3205. goog.html.SafeHtml.getAttrNameAndValue_ = function (a, b, c) {
  3206. if (c instanceof goog.string.Const) c = goog.string.Const.unwrap(c); else if ("style" == b.toLowerCase()) if (goog.html.SafeHtml.SUPPORT_STYLE_ATTRIBUTE) c = goog.html.SafeHtml.getStyleValue_(c); else throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "style" not supported.' : ""); else {
  3207. if (/^on/i.test(b)) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + b + '" requires goog.string.Const value, "' + c + '" given.' : "");
  3208. if (b.toLowerCase() in
  3209. goog.html.SafeHtml.URL_ATTRIBUTES_) if (c instanceof goog.html.TrustedResourceUrl) c = goog.html.TrustedResourceUrl.unwrap(c); else if (c instanceof goog.html.SafeUrl) c = goog.html.SafeUrl.unwrap(c); else if ("string" === typeof c) c = goog.html.SafeUrl.sanitize(c).getTypedStringValue(); else throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Attribute "' + b + '" on tag "' + a + '" requires goog.html.SafeUrl, goog.string.Const, or string, value "' + c + '" given.' : "");
  3210. }
  3211. c.implementsGoogStringTypedString && (c = c.getTypedStringValue());
  3212. goog.asserts.assert("string" === typeof c || "number" === typeof c, "String or number value expected, got " + typeof c + " with value: " + c);
  3213. return b + '="' + goog.string.internal.htmlEscape(String(c)) + '"'
  3214. };
  3215. goog.html.SafeHtml.getStyleValue_ = function (a) {
  3216. if (!goog.isObject(a)) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof a + " given: " + a : "");
  3217. a instanceof goog.html.SafeStyle || (a = goog.html.SafeStyle.create(a));
  3218. return goog.html.SafeStyle.unwrap(a)
  3219. };
  3220. goog.html.SafeHtml.createWithDir = function (a, b, c, d) {
  3221. b = goog.html.SafeHtml.create(b, c, d);
  3222. b.dir_ = a;
  3223. return b
  3224. };
  3225. goog.html.SafeHtml.join = function (a, b) {
  3226. a = goog.html.SafeHtml.htmlEscape(a);
  3227. var c = a.getDirection(), d = [], e = function (a) {
  3228. Array.isArray(a) ? goog.array.forEach(a, e) : (a = goog.html.SafeHtml.htmlEscape(a), d.push(goog.html.SafeHtml.unwrap(a)), a = a.getDirection(), c == goog.i18n.bidi.Dir.NEUTRAL ? c = a : a != goog.i18n.bidi.Dir.NEUTRAL && c != a && (c = null));
  3229. };
  3230. goog.array.forEach(b, e);
  3231. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d.join(goog.html.SafeHtml.unwrap(a)), c)
  3232. };
  3233. goog.html.SafeHtml.concat = function (a) {
  3234. return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY, Array.prototype.slice.call(arguments))
  3235. };
  3236. goog.html.SafeHtml.concatWithDir = function (a, b) {
  3237. var c = goog.html.SafeHtml.concat(goog.array.slice(arguments, 1));
  3238. c.dir_ = a;
  3239. return c
  3240. };
  3241. goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
  3242. goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function (a, b) {
  3243. return (new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(a, b)
  3244. };
  3245. goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a, b) {
  3246. this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ? goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createHTML(a) : a;
  3247. this.dir_ = b;
  3248. return this
  3249. };
  3250. goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function (a, b, c) {
  3251. var d = null;
  3252. var e = "<" + a + goog.html.SafeHtml.stringifyAttributes(a, b);
  3253. null == c ? c = [] : Array.isArray(c) || (c = [c]);
  3254. goog.dom.tags.isVoidTag(a.toLowerCase()) ? (goog.asserts.assert(!c.length, "Void tag <" + a + "> does not allow content."), e += ">") : (d = goog.html.SafeHtml.concat(c), e += ">" + goog.html.SafeHtml.unwrap(d) + "</" + a + ">", d = d.getDirection());
  3255. (a = b && b.dir) && (d = /^(ltr|rtl|auto)$/i.test(a) ? goog.i18n.bidi.Dir.NEUTRAL : null);
  3256. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e,
  3257. d)
  3258. };
  3259. goog.html.SafeHtml.stringifyAttributes = function (a, b) {
  3260. var c = "";
  3261. if (b) for (var d in b) {
  3262. if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(d)) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Invalid attribute name "' + d + '".' : "");
  3263. var e = b[d];
  3264. null != e && (c += " " + goog.html.SafeHtml.getAttrNameAndValue_(a, d, e));
  3265. }
  3266. return c
  3267. };
  3268. goog.html.SafeHtml.combineAttributes = function (a, b, c) {
  3269. var d = {}, e;
  3270. for (e in a) goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = a[e];
  3271. for (e in b) goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = b[e];
  3272. if (c) for (e in c) {
  3273. var f = e.toLowerCase();
  3274. if (f in a) throw Error(goog.html.SafeHtml.ENABLE_ERROR_MESSAGES ? 'Cannot override "' + f + '" attribute, got "' + e + '" with value "' + c[e] + '"' : "");
  3275. f in b && delete d[f];
  3276. d[e] = c[e];
  3277. }
  3278. return d
  3279. };
  3280. goog.html.SafeHtml.DOCTYPE_HTML = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>", goog.i18n.bidi.Dir.NEUTRAL);
  3281. goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
  3282. goog.html.SafeHtml.BR = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>", goog.i18n.bidi.Dir.NEUTRAL);
  3283. goog.html.uncheckedconversions = {};
  3284. goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function (a, b, c) {
  3285. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3286. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
  3287. return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b, c || null)
  3288. };
  3289. goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function (a, b) {
  3290. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3291. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
  3292. return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)
  3293. };
  3294. goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function (a, b) {
  3295. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3296. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
  3297. return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)
  3298. };
  3299. goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function (a, b) {
  3300. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3301. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
  3302. return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)
  3303. };
  3304. goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function (a, b) {
  3305. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3306. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
  3307. return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)
  3308. };
  3309. goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function (a, b) {
  3310. goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
  3311. goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
  3312. return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)
  3313. };
  3314. goog.dom.safe = {};
  3315. goog.dom.safe.InsertAdjacentHtmlPosition = {
  3316. AFTERBEGIN: "afterbegin",
  3317. AFTEREND: "afterend",
  3318. BEFOREBEGIN: "beforebegin",
  3319. BEFOREEND: "beforeend"
  3320. };
  3321. goog.dom.safe.insertAdjacentHtml = function (a, b, c) {
  3322. a.insertAdjacentHTML(b, goog.html.SafeHtml.unwrapTrustedHTML(c));
  3323. };
  3324. goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_ = {MATH: !0, SCRIPT: !0, STYLE: !0, SVG: !0, TEMPLATE: !0};
  3325. goog.dom.safe.isInnerHtmlCleanupRecursive_ = goog.functions.cacheReturnValue(function () {
  3326. if (goog.DEBUG && "undefined" === typeof document) return !1;
  3327. var a = document.createElement("div"), b = document.createElement("div");
  3328. b.appendChild(document.createElement("div"));
  3329. a.appendChild(b);
  3330. if (goog.DEBUG && !a.firstChild) return !1;
  3331. b = a.firstChild.firstChild;
  3332. a.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY);
  3333. return !b.parentElement
  3334. });
  3335. goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse = function (a, b) {
  3336. if (goog.dom.safe.isInnerHtmlCleanupRecursive_()) for (; a.lastChild;) a.removeChild(a.lastChild);
  3337. a.innerHTML = goog.html.SafeHtml.unwrapTrustedHTML(b);
  3338. };
  3339. goog.dom.safe.setInnerHtml = function (a, b) {
  3340. if (goog.asserts.ENABLE_ASSERTS) {
  3341. var c = a.tagName.toUpperCase();
  3342. if (goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[c]) throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of " + a.tagName + ".");
  3343. }
  3344. goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(a, b);
  3345. };
  3346. goog.dom.safe.setOuterHtml = function (a, b) {
  3347. a.outerHTML = goog.html.SafeHtml.unwrapTrustedHTML(b);
  3348. };
  3349. goog.dom.safe.setFormElementAction = function (a, b) {
  3350. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3351. goog.dom.asserts.assertIsHTMLFormElement(a).action = goog.html.SafeUrl.unwrap(b);
  3352. };
  3353. goog.dom.safe.setButtonFormAction = function (a, b) {
  3354. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3355. goog.dom.asserts.assertIsHTMLButtonElement(a).formAction = goog.html.SafeUrl.unwrap(b);
  3356. };
  3357. goog.dom.safe.setInputFormAction = function (a, b) {
  3358. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3359. goog.dom.asserts.assertIsHTMLInputElement(a).formAction = goog.html.SafeUrl.unwrap(b);
  3360. };
  3361. goog.dom.safe.setStyle = function (a, b) {
  3362. a.style.cssText = goog.html.SafeStyle.unwrap(b);
  3363. };
  3364. goog.dom.safe.documentWrite = function (a, b) {
  3365. a.write(goog.html.SafeHtml.unwrapTrustedHTML(b));
  3366. };
  3367. goog.dom.safe.setAnchorHref = function (a, b) {
  3368. goog.dom.asserts.assertIsHTMLAnchorElement(a);
  3369. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3370. a.href = goog.html.SafeUrl.unwrap(b);
  3371. };
  3372. goog.dom.safe.setImageSrc = function (a, b) {
  3373. goog.dom.asserts.assertIsHTMLImageElement(a);
  3374. if (!(b instanceof goog.html.SafeUrl)) {
  3375. var c = /^data:image\//i.test(b);
  3376. b = goog.html.SafeUrl.sanitizeAssertUnchanged(b, c);
  3377. }
  3378. a.src = goog.html.SafeUrl.unwrap(b);
  3379. };
  3380. goog.dom.safe.setAudioSrc = function (a, b) {
  3381. goog.dom.asserts.assertIsHTMLAudioElement(a);
  3382. if (!(b instanceof goog.html.SafeUrl)) {
  3383. var c = /^data:audio\//i.test(b);
  3384. b = goog.html.SafeUrl.sanitizeAssertUnchanged(b, c);
  3385. }
  3386. a.src = goog.html.SafeUrl.unwrap(b);
  3387. };
  3388. goog.dom.safe.setVideoSrc = function (a, b) {
  3389. goog.dom.asserts.assertIsHTMLVideoElement(a);
  3390. if (!(b instanceof goog.html.SafeUrl)) {
  3391. var c = /^data:video\//i.test(b);
  3392. b = goog.html.SafeUrl.sanitizeAssertUnchanged(b, c);
  3393. }
  3394. a.src = goog.html.SafeUrl.unwrap(b);
  3395. };
  3396. goog.dom.safe.setEmbedSrc = function (a, b) {
  3397. goog.dom.asserts.assertIsHTMLEmbedElement(a);
  3398. a.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b);
  3399. };
  3400. goog.dom.safe.setFrameSrc = function (a, b) {
  3401. goog.dom.asserts.assertIsHTMLFrameElement(a);
  3402. a.src = goog.html.TrustedResourceUrl.unwrap(b);
  3403. };
  3404. goog.dom.safe.setIframeSrc = function (a, b) {
  3405. goog.dom.asserts.assertIsHTMLIFrameElement(a);
  3406. a.src = goog.html.TrustedResourceUrl.unwrap(b);
  3407. };
  3408. goog.dom.safe.setIframeSrcdoc = function (a, b) {
  3409. goog.dom.asserts.assertIsHTMLIFrameElement(a);
  3410. a.srcdoc = goog.html.SafeHtml.unwrapTrustedHTML(b);
  3411. };
  3412. goog.dom.safe.setLinkHrefAndRel = function (a, b, c) {
  3413. goog.dom.asserts.assertIsHTMLLinkElement(a);
  3414. a.rel = c;
  3415. goog.string.internal.caseInsensitiveContains(c, "stylesheet") ? (goog.asserts.assert(b instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'), a.href = goog.html.TrustedResourceUrl.unwrap(b)) : a.href = b instanceof goog.html.TrustedResourceUrl ? goog.html.TrustedResourceUrl.unwrap(b) : b instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(b) : goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitizeAssertUnchanged(b));
  3416. };
  3417. goog.dom.safe.setObjectData = function (a, b) {
  3418. goog.dom.asserts.assertIsHTMLObjectElement(a);
  3419. a.data = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b);
  3420. };
  3421. goog.dom.safe.setScriptSrc = function (a, b) {
  3422. goog.dom.asserts.assertIsHTMLScriptElement(a);
  3423. a.src = goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b);
  3424. (b = goog.getScriptNonce()) && a.setAttribute("nonce", b);
  3425. };
  3426. goog.dom.safe.setScriptContent = function (a, b) {
  3427. goog.dom.asserts.assertIsHTMLScriptElement(a);
  3428. a.text = goog.html.SafeScript.unwrapTrustedScript(b);
  3429. (b = goog.getScriptNonce()) && a.setAttribute("nonce", b);
  3430. };
  3431. goog.dom.safe.setLocationHref = function (a, b) {
  3432. goog.dom.asserts.assertIsLocation(a);
  3433. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3434. a.href = goog.html.SafeUrl.unwrap(b);
  3435. };
  3436. goog.dom.safe.assignLocation = function (a, b) {
  3437. goog.dom.asserts.assertIsLocation(a);
  3438. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3439. a.assign(goog.html.SafeUrl.unwrap(b));
  3440. };
  3441. goog.dom.safe.replaceLocation = function (a, b) {
  3442. b = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitizeAssertUnchanged(b);
  3443. a.replace(goog.html.SafeUrl.unwrap(b));
  3444. };
  3445. goog.dom.safe.openInWindow = function (a, b, c, d, e) {
  3446. a = a instanceof goog.html.SafeUrl ? a : goog.html.SafeUrl.sanitizeAssertUnchanged(a);
  3447. b = b || goog.global;
  3448. c = c instanceof goog.string.Const ? goog.string.Const.unwrap(c) : c || "";
  3449. return b.open(goog.html.SafeUrl.unwrap(a), c, d, e)
  3450. };
  3451. goog.dom.safe.parseFromStringHtml = function (a, b) {
  3452. return goog.dom.safe.parseFromString(a, b, "text/html")
  3453. };
  3454. goog.dom.safe.parseFromString = function (a, b, c) {
  3455. return a.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(b), c)
  3456. };
  3457. goog.dom.safe.createImageFromBlob = function (a) {
  3458. if (!/^image\/.*/g.test(a.type)) throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");
  3459. var b = goog.global.URL.createObjectURL(a);
  3460. a = new goog.global.Image;
  3461. a.onload = function () {
  3462. goog.global.URL.revokeObjectURL(b);
  3463. };
  3464. goog.dom.safe.setImageSrc(a, goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Image blob URL."), b));
  3465. return a
  3466. };
  3467. goog.string.DETECT_DOUBLE_ESCAPING = !1;
  3468. goog.string.FORCE_NON_DOM_HTML_UNESCAPING = !1;
  3469. goog.string.Unicode = {NBSP: "\u00a0"};
  3470. goog.string.startsWith = goog.string.internal.startsWith;
  3471. goog.string.endsWith = goog.string.internal.endsWith;
  3472. goog.string.caseInsensitiveStartsWith = goog.string.internal.caseInsensitiveStartsWith;
  3473. goog.string.caseInsensitiveEndsWith = goog.string.internal.caseInsensitiveEndsWith;
  3474. goog.string.caseInsensitiveEquals = goog.string.internal.caseInsensitiveEquals;
  3475. goog.string.subs = function (a, b) {
  3476. for (var c = a.split("%s"), d = "", e = Array.prototype.slice.call(arguments, 1); e.length && 1 < c.length;) d += c.shift() + e.shift();
  3477. return d + c.join("%s")
  3478. };
  3479. goog.string.collapseWhitespace = function (a) {
  3480. return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "")
  3481. };
  3482. goog.string.isEmptyOrWhitespace = goog.string.internal.isEmptyOrWhitespace;
  3483. goog.string.isEmptyString = function (a) {
  3484. return 0 == a.length
  3485. };
  3486. goog.string.isEmpty = goog.string.isEmptyOrWhitespace;
  3487. goog.string.isEmptyOrWhitespaceSafe = function (a) {
  3488. return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(a))
  3489. };
  3490. goog.string.isEmptySafe = goog.string.isEmptyOrWhitespaceSafe;
  3491. goog.string.isBreakingWhitespace = function (a) {
  3492. return !/[^\t\n\r ]/.test(a)
  3493. };
  3494. goog.string.isAlpha = function (a) {
  3495. return !/[^a-zA-Z]/.test(a)
  3496. };
  3497. goog.string.isNumeric = function (a) {
  3498. return !/[^0-9]/.test(a)
  3499. };
  3500. goog.string.isAlphaNumeric = function (a) {
  3501. return !/[^a-zA-Z0-9]/.test(a)
  3502. };
  3503. goog.string.isSpace = function (a) {
  3504. return " " == a
  3505. };
  3506. goog.string.isUnicodeChar = function (a) {
  3507. return 1 == a.length && " " <= a && "~" >= a || "\u0080" <= a && "\ufffd" >= a
  3508. };
  3509. goog.string.stripNewlines = function (a) {
  3510. return a.replace(/(\r\n|\r|\n)+/g, " ")
  3511. };
  3512. goog.string.canonicalizeNewlines = function (a) {
  3513. return a.replace(/(\r\n|\r|\n)/g, "\n")
  3514. };
  3515. goog.string.normalizeWhitespace = function (a) {
  3516. return a.replace(/\xa0|\s/g, " ")
  3517. };
  3518. goog.string.normalizeSpaces = function (a) {
  3519. return a.replace(/\xa0|[ \t]+/g, " ")
  3520. };
  3521. goog.string.collapseBreakingSpaces = function (a) {
  3522. return a.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "")
  3523. };
  3524. goog.string.trim = goog.string.internal.trim;
  3525. goog.string.trimLeft = function (a) {
  3526. return a.replace(/^[\s\xa0]+/, "")
  3527. };
  3528. goog.string.trimRight = function (a) {
  3529. return a.replace(/[\s\xa0]+$/, "")
  3530. };
  3531. goog.string.caseInsensitiveCompare = goog.string.internal.caseInsensitiveCompare;
  3532. goog.string.numberAwareCompare_ = function (a, b, c) {
  3533. if (a == b) return 0;
  3534. if (!a) return -1;
  3535. if (!b) return 1;
  3536. for (var d = a.toLowerCase().match(c), e = b.toLowerCase().match(c), f = Math.min(d.length, e.length), g = 0; g < f; g++) {
  3537. c = d[g];
  3538. var h = e[g];
  3539. if (c != h) return a = parseInt(c, 10), !isNaN(a) && (b = parseInt(h, 10), !isNaN(b) && a - b) ? a - b : c < h ? -1 : 1
  3540. }
  3541. return d.length != e.length ? d.length - e.length : a < b ? -1 : 1
  3542. };
  3543. goog.string.intAwareCompare = function (a, b) {
  3544. return goog.string.numberAwareCompare_(a, b, /\d+|\D+/g)
  3545. };
  3546. goog.string.floatAwareCompare = function (a, b) {
  3547. return goog.string.numberAwareCompare_(a, b, /\d+|\.\d+|\D+/g)
  3548. };
  3549. goog.string.numerateCompare = goog.string.floatAwareCompare;
  3550. goog.string.urlEncode = function (a) {
  3551. return encodeURIComponent(String(a))
  3552. };
  3553. goog.string.urlDecode = function (a) {
  3554. return decodeURIComponent(a.replace(/\+/g, " "))
  3555. };
  3556. goog.string.newLineToBr = goog.string.internal.newLineToBr;
  3557. goog.string.htmlEscape = function (a, b) {
  3558. a = goog.string.internal.htmlEscape(a, b);
  3559. goog.string.DETECT_DOUBLE_ESCAPING && (a = a.replace(goog.string.E_RE_, "&#101;"));
  3560. return a
  3561. };
  3562. goog.string.E_RE_ = /e/g;
  3563. goog.string.unescapeEntities = function (a) {
  3564. return goog.string.contains(a, "&") ? !goog.string.FORCE_NON_DOM_HTML_UNESCAPING && "document" in goog.global ? goog.string.unescapeEntitiesUsingDom_(a) : goog.string.unescapePureXmlEntities_(a) : a
  3565. };
  3566. goog.string.unescapeEntitiesWithDocument = function (a, b) {
  3567. return goog.string.contains(a, "&") ? goog.string.unescapeEntitiesUsingDom_(a, b) : a
  3568. };
  3569. goog.string.unescapeEntitiesUsingDom_ = function (a, b) {
  3570. var c = {"&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"'};
  3571. var d = b ? b.createElement("div") : goog.global.document.createElement("div");
  3572. return a.replace(goog.string.HTML_ENTITY_PATTERN_, function (a, b) {
  3573. var e = c[a];
  3574. if (e) return e;
  3575. "#" == b.charAt(0) && (b = Number("0" + b.substr(1)), isNaN(b) || (e = String.fromCharCode(b)));
  3576. e || (goog.dom.safe.setInnerHtml(d, goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),
  3577. a + " ")), e = d.firstChild.nodeValue.slice(0, -1));
  3578. return c[a] = e
  3579. })
  3580. };
  3581. goog.string.unescapePureXmlEntities_ = function (a) {
  3582. return a.replace(/&([^;]+);/g, function (a, c) {
  3583. switch (c) {
  3584. case "amp":
  3585. return "&";
  3586. case "lt":
  3587. return "<";
  3588. case "gt":
  3589. return ">";
  3590. case "quot":
  3591. return '"';
  3592. default:
  3593. return "#" != c.charAt(0) || (c = Number("0" + c.substr(1)), isNaN(c)) ? a : String.fromCharCode(c)
  3594. }
  3595. })
  3596. };
  3597. goog.string.HTML_ENTITY_PATTERN_ = /&([^;\s<&]+);?/g;
  3598. goog.string.whitespaceEscape = function (a, b) {
  3599. return goog.string.newLineToBr(a.replace(/ /g, " &#160;"), b)
  3600. };
  3601. goog.string.preserveSpaces = function (a) {
  3602. return a.replace(/(^|[\n ]) /g, "$1" + goog.string.Unicode.NBSP)
  3603. };
  3604. goog.string.stripQuotes = function (a, b) {
  3605. for (var c = b.length, d = 0; d < c; d++) {
  3606. var e = 1 == c ? b : b.charAt(d);
  3607. if (a.charAt(0) == e && a.charAt(a.length - 1) == e) return a.substring(1, a.length - 1)
  3608. }
  3609. return a
  3610. };
  3611. goog.string.truncate = function (a, b, c) {
  3612. c && (a = goog.string.unescapeEntities(a));
  3613. a.length > b && (a = a.substring(0, b - 3) + "...");
  3614. c && (a = goog.string.htmlEscape(a));
  3615. return a
  3616. };
  3617. goog.string.truncateMiddle = function (a, b, c, d) {
  3618. c && (a = goog.string.unescapeEntities(a));
  3619. if (d && a.length > b) {
  3620. d > b && (d = b);
  3621. var e = a.length - d;
  3622. a = a.substring(0, b - d) + "..." + a.substring(e);
  3623. } else a.length > b && (d = Math.floor(b / 2), e = a.length - d, a = a.substring(0, d + b % 2) + "..." + a.substring(e));
  3624. c && (a = goog.string.htmlEscape(a));
  3625. return a
  3626. };
  3627. goog.string.specialEscapeChars_ = {
  3628. "\x00": "\\0",
  3629. "\b": "\\b",
  3630. "\f": "\\f",
  3631. "\n": "\\n",
  3632. "\r": "\\r",
  3633. "\t": "\\t",
  3634. "\x0B": "\\x0B",
  3635. '"': '\\"',
  3636. "\\": "\\\\",
  3637. "<": "\\u003C"
  3638. };
  3639. goog.string.jsEscapeCache_ = {"'": "\\'"};
  3640. goog.string.quote = function (a) {
  3641. a = String(a);
  3642. for (var b = ['"'], c = 0; c < a.length; c++) {
  3643. var d = a.charAt(c), e = d.charCodeAt(0);
  3644. b[c + 1] = goog.string.specialEscapeChars_[d] || (31 < e && 127 > e ? d : goog.string.escapeChar(d));
  3645. }
  3646. b.push('"');
  3647. return b.join("")
  3648. };
  3649. goog.string.escapeString = function (a) {
  3650. for (var b = [], c = 0; c < a.length; c++) b[c] = goog.string.escapeChar(a.charAt(c));
  3651. return b.join("")
  3652. };
  3653. goog.string.escapeChar = function (a) {
  3654. if (a in goog.string.jsEscapeCache_) return goog.string.jsEscapeCache_[a];
  3655. if (a in goog.string.specialEscapeChars_) return goog.string.jsEscapeCache_[a] = goog.string.specialEscapeChars_[a];
  3656. var b = a.charCodeAt(0);
  3657. if (31 < b && 127 > b) var c = a; else {
  3658. if (256 > b) {
  3659. if (c = "\\x", 16 > b || 256 < b) c += "0";
  3660. } else c = "\\u", 4096 > b && (c += "0");
  3661. c += b.toString(16).toUpperCase();
  3662. }
  3663. return goog.string.jsEscapeCache_[a] = c
  3664. };
  3665. goog.string.contains = goog.string.internal.contains;
  3666. goog.string.caseInsensitiveContains = goog.string.internal.caseInsensitiveContains;
  3667. goog.string.countOf = function (a, b) {
  3668. return a && b ? a.split(b).length - 1 : 0
  3669. };
  3670. goog.string.removeAt = function (a, b, c) {
  3671. var d = a;
  3672. 0 <= b && b < a.length && 0 < c && (d = a.substr(0, b) + a.substr(b + c, a.length - b - c));
  3673. return d
  3674. };
  3675. goog.string.remove = function (a, b) {
  3676. return a.replace(b, "")
  3677. };
  3678. goog.string.removeAll = function (a, b) {
  3679. b = new RegExp(goog.string.regExpEscape(b), "g");
  3680. return a.replace(b, "")
  3681. };
  3682. goog.string.replaceAll = function (a, b, c) {
  3683. b = new RegExp(goog.string.regExpEscape(b), "g");
  3684. return a.replace(b, c.replace(/\$/g, "$$$$"))
  3685. };
  3686. goog.string.regExpEscape = function (a) {
  3687. return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08")
  3688. };
  3689. goog.string.repeat = String.prototype.repeat ? function (a, b) {
  3690. return a.repeat(b)
  3691. } : function (a, b) {
  3692. return Array(b + 1).join(a)
  3693. };
  3694. goog.string.padNumber = function (a, b, c) {
  3695. a = void 0 !== c ? a.toFixed(c) : String(a);
  3696. c = a.indexOf(".");
  3697. -1 == c && (c = a.length);
  3698. return goog.string.repeat("0", Math.max(0, b - c)) + a
  3699. };
  3700. goog.string.makeSafe = function (a) {
  3701. return null == a ? "" : String(a)
  3702. };
  3703. goog.string.buildString = function (a) {
  3704. return Array.prototype.join.call(arguments, "")
  3705. };
  3706. goog.string.getRandomString = function () {
  3707. return Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ goog.now()).toString(36)
  3708. };
  3709. goog.string.compareVersions = goog.string.internal.compareVersions;
  3710. goog.string.hashCode = function (a) {
  3711. for (var b = 0, c = 0; c < a.length; ++c) b = 31 * b + a.charCodeAt(c) >>> 0;
  3712. return b
  3713. };
  3714. goog.string.uniqueStringCounter_ = 2147483648 * Math.random() | 0;
  3715. goog.string.createUniqueString = function () {
  3716. return "goog_" + goog.string.uniqueStringCounter_++
  3717. };
  3718. goog.string.toNumber = function (a) {
  3719. var b = Number(a);
  3720. return 0 == b && goog.string.isEmptyOrWhitespace(a) ? NaN : b
  3721. };
  3722. goog.string.isLowerCamelCase = function (a) {
  3723. return /^[a-z]+([A-Z][a-z]*)*$/.test(a)
  3724. };
  3725. goog.string.isUpperCamelCase = function (a) {
  3726. return /^([A-Z][a-z]*)+$/.test(a)
  3727. };
  3728. goog.string.toCamelCase = function (a) {
  3729. return String(a).replace(/\-([a-z])/g, function (a, c) {
  3730. return c.toUpperCase()
  3731. })
  3732. };
  3733. goog.string.toSelectorCase = function (a) {
  3734. return String(a).replace(/([A-Z])/g, "-$1").toLowerCase()
  3735. };
  3736. goog.string.toTitleCase = function (a, b) {
  3737. b = "string" === typeof b ? goog.string.regExpEscape(b) : "\\s";
  3738. return a.replace(new RegExp("(^" + (b ? "|[" + b + "]+" : "") + ")([a-z])", "g"), function (a, b, e) {
  3739. return b + e.toUpperCase()
  3740. })
  3741. };
  3742. goog.string.capitalize = function (a) {
  3743. return String(a.charAt(0)).toUpperCase() + String(a.substr(1)).toLowerCase()
  3744. };
  3745. goog.string.parseInt = function (a) {
  3746. isFinite(a) && (a = String(a));
  3747. return "string" === typeof a ? /^\s*-?0x/i.test(a) ? parseInt(a, 16) : parseInt(a, 10) : NaN
  3748. };
  3749. goog.string.splitLimit = function (a, b, c) {
  3750. a = a.split(b);
  3751. for (var d = []; 0 < c && a.length;) d.push(a.shift()), c--;
  3752. a.length && d.push(a.join(b));
  3753. return d
  3754. };
  3755. goog.string.lastComponent = function (a, b) {
  3756. if (b) "string" == typeof b && (b = [b]); else return a;
  3757. for (var c = -1, d = 0; d < b.length; d++) if ("" != b[d]) {
  3758. var e = a.lastIndexOf(b[d]);
  3759. e > c && (c = e);
  3760. }
  3761. return -1 == c ? a : a.slice(c + 1)
  3762. };
  3763. goog.string.editDistance = function (a, b) {
  3764. var c = [], d = [];
  3765. if (a == b) return 0;
  3766. if (!a.length || !b.length) return Math.max(a.length, b.length);
  3767. for (var e = 0; e < b.length + 1; e++) c[e] = e;
  3768. for (e = 0; e < a.length; e++) {
  3769. d[0] = e + 1;
  3770. for (var f = 0; f < b.length; f++) d[f + 1] = Math.min(d[f] + 1, c[f + 1] + 1, c[f] + Number(a[e] != b[f]));
  3771. for (f = 0; f < c.length; f++) c[f] = d[f];
  3772. }
  3773. return d[b.length]
  3774. };
  3775. goog.labs.userAgent.engine = {};
  3776. goog.labs.userAgent.engine.isPresto = function () {
  3777. return goog.labs.userAgent.util.matchUserAgent("Presto")
  3778. };
  3779. goog.labs.userAgent.engine.isTrident = function () {
  3780. return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE")
  3781. };
  3782. goog.labs.userAgent.engine.isEdge = function () {
  3783. return goog.labs.userAgent.util.matchUserAgent("Edge")
  3784. };
  3785. goog.labs.userAgent.engine.isWebKit = function () {
  3786. return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit") && !goog.labs.userAgent.engine.isEdge()
  3787. };
  3788. goog.labs.userAgent.engine.isGecko = function () {
  3789. return goog.labs.userAgent.util.matchUserAgent("Gecko") && !goog.labs.userAgent.engine.isWebKit() && !goog.labs.userAgent.engine.isTrident() && !goog.labs.userAgent.engine.isEdge()
  3790. };
  3791. goog.labs.userAgent.engine.getVersion = function () {
  3792. var a = goog.labs.userAgent.util.getUserAgent();
  3793. if (a) {
  3794. a = goog.labs.userAgent.util.extractVersionTuples(a);
  3795. var b = goog.labs.userAgent.engine.getEngineTuple_(a);
  3796. if (b) return "Gecko" == b[0] ? goog.labs.userAgent.engine.getVersionForKey_(a, "Firefox") : b[1];
  3797. a = a[0];
  3798. var c;
  3799. if (a && (c = a[2]) && (c = /Trident\/([^\s;]+)/.exec(c))) return c[1]
  3800. }
  3801. return ""
  3802. };
  3803. goog.labs.userAgent.engine.getEngineTuple_ = function (a) {
  3804. if (!goog.labs.userAgent.engine.isEdge()) return a[1];
  3805. for (var b = 0; b < a.length; b++) {
  3806. var c = a[b];
  3807. if ("Edge" == c[0]) return c
  3808. }
  3809. };
  3810. goog.labs.userAgent.engine.isVersionOrHigher = function (a) {
  3811. return 0 <= goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(), a)
  3812. };
  3813. goog.labs.userAgent.engine.getVersionForKey_ = function (a, b) {
  3814. return (a = goog.array.find(a, function (a) {
  3815. return b == a[0]
  3816. })) && a[1] || ""
  3817. };
  3818. goog.labs.userAgent.platform = {};
  3819. goog.labs.userAgent.platform.isAndroid = function () {
  3820. return goog.labs.userAgent.util.matchUserAgent("Android")
  3821. };
  3822. goog.labs.userAgent.platform.isIpod = function () {
  3823. return goog.labs.userAgent.util.matchUserAgent("iPod")
  3824. };
  3825. goog.labs.userAgent.platform.isIphone = function () {
  3826. return goog.labs.userAgent.util.matchUserAgent("iPhone") && !goog.labs.userAgent.util.matchUserAgent("iPod") && !goog.labs.userAgent.util.matchUserAgent("iPad")
  3827. };
  3828. goog.labs.userAgent.platform.isIpad = function () {
  3829. return goog.labs.userAgent.util.matchUserAgent("iPad")
  3830. };
  3831. goog.labs.userAgent.platform.isIos = function () {
  3832. return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpad() || goog.labs.userAgent.platform.isIpod()
  3833. };
  3834. goog.labs.userAgent.platform.isMacintosh = function () {
  3835. return goog.labs.userAgent.util.matchUserAgent("Macintosh")
  3836. };
  3837. goog.labs.userAgent.platform.isLinux = function () {
  3838. return goog.labs.userAgent.util.matchUserAgent("Linux")
  3839. };
  3840. goog.labs.userAgent.platform.isWindows = function () {
  3841. return goog.labs.userAgent.util.matchUserAgent("Windows")
  3842. };
  3843. goog.labs.userAgent.platform.isChromeOS = function () {
  3844. return goog.labs.userAgent.util.matchUserAgent("CrOS")
  3845. };
  3846. goog.labs.userAgent.platform.isChromecast = function () {
  3847. return goog.labs.userAgent.util.matchUserAgent("CrKey")
  3848. };
  3849. goog.labs.userAgent.platform.isKaiOS = function () {
  3850. return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")
  3851. };
  3852. goog.labs.userAgent.platform.getVersion = function () {
  3853. var a = goog.labs.userAgent.util.getUserAgent(), b = "";
  3854. goog.labs.userAgent.platform.isWindows() ? (b = /Windows (?:NT|Phone) ([0-9.]+)/, b = (a = b.exec(a)) ? a[1] : "0.0") : goog.labs.userAgent.platform.isIos() ? (b = /(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/, b = (a = b.exec(a)) && a[1].replace(/_/g, ".")) : goog.labs.userAgent.platform.isMacintosh() ? (b = /Mac OS X ([0-9_.]+)/, b = (a = b.exec(a)) ? a[1].replace(/_/g, ".") : "10") : goog.labs.userAgent.platform.isKaiOS() ? (b = /(?:KaiOS)\/(\S+)/i,
  3855. b = (a = b.exec(a)) && a[1]) : goog.labs.userAgent.platform.isAndroid() ? (b = /Android\s+([^\);]+)(\)|;)/, b = (a = b.exec(a)) && a[1]) : goog.labs.userAgent.platform.isChromeOS() && (b = /(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/, b = (a = b.exec(a)) && a[1]);
  3856. return b || ""
  3857. };
  3858. goog.labs.userAgent.platform.isVersionOrHigher = function (a) {
  3859. return 0 <= goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(), a)
  3860. };
  3861. goog.reflect = {};
  3862. goog.reflect.object = function (a, b) {
  3863. return b
  3864. };
  3865. goog.reflect.objectProperty = function (a, b) {
  3866. return a
  3867. };
  3868. goog.reflect.sinkValue = function (a) {
  3869. goog.reflect.sinkValue[" "](a);
  3870. return a
  3871. };
  3872. goog.reflect.sinkValue[" "] = goog.nullFunction;
  3873. goog.reflect.canAccessProperty = function (a, b) {
  3874. try {
  3875. return goog.reflect.sinkValue(a[b]), !0
  3876. } catch (c) {
  3877. }
  3878. return !1
  3879. };
  3880. goog.reflect.cache = function (a, b, c, d) {
  3881. d = d ? d(b) : b;
  3882. return Object.prototype.hasOwnProperty.call(a, d) ? a[d] : a[d] = c(b)
  3883. };
  3884. goog.userAgent = {};
  3885. goog.userAgent.ASSUME_IE = !1;
  3886. goog.userAgent.ASSUME_EDGE = !1;
  3887. goog.userAgent.ASSUME_GECKO = !1;
  3888. goog.userAgent.ASSUME_WEBKIT = !1;
  3889. goog.userAgent.ASSUME_MOBILE_WEBKIT = !1;
  3890. goog.userAgent.ASSUME_OPERA = !1;
  3891. goog.userAgent.ASSUME_ANY_VERSION = !1;
  3892. goog.userAgent.BROWSER_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_GECKO || goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_OPERA;
  3893. goog.userAgent.getUserAgentString = function () {
  3894. return goog.labs.userAgent.util.getUserAgent()
  3895. };
  3896. goog.userAgent.getNavigatorTyped = function () {
  3897. return goog.global.navigator || null
  3898. };
  3899. goog.userAgent.getNavigator = function () {
  3900. return goog.userAgent.getNavigatorTyped()
  3901. };
  3902. goog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_OPERA : goog.labs.userAgent.browser.isOpera();
  3903. goog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_IE : goog.labs.userAgent.browser.isIE();
  3904. goog.userAgent.EDGE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_EDGE : goog.labs.userAgent.engine.isEdge();
  3905. goog.userAgent.EDGE_OR_IE = goog.userAgent.EDGE || goog.userAgent.IE;
  3906. goog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_GECKO : goog.labs.userAgent.engine.isGecko();
  3907. goog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_MOBILE_WEBKIT : goog.labs.userAgent.engine.isWebKit();
  3908. goog.userAgent.isMobile_ = function () {
  3909. return goog.userAgent.WEBKIT && goog.labs.userAgent.util.matchUserAgent("Mobile")
  3910. };
  3911. goog.userAgent.MOBILE = goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.isMobile_();
  3912. goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
  3913. goog.userAgent.determinePlatform_ = function () {
  3914. var a = goog.userAgent.getNavigatorTyped();
  3915. return a && a.platform || ""
  3916. };
  3917. goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
  3918. goog.userAgent.ASSUME_MAC = !1;
  3919. goog.userAgent.ASSUME_WINDOWS = !1;
  3920. goog.userAgent.ASSUME_LINUX = !1;
  3921. goog.userAgent.ASSUME_X11 = !1;
  3922. goog.userAgent.ASSUME_ANDROID = !1;
  3923. goog.userAgent.ASSUME_IPHONE = !1;
  3924. goog.userAgent.ASSUME_IPAD = !1;
  3925. goog.userAgent.ASSUME_IPOD = !1;
  3926. goog.userAgent.ASSUME_KAIOS = !1;
  3927. goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11 || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD || goog.userAgent.ASSUME_IPOD;
  3928. goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.labs.userAgent.platform.isMacintosh();
  3929. goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.labs.userAgent.platform.isWindows();
  3930. goog.userAgent.isLegacyLinux_ = function () {
  3931. return goog.labs.userAgent.platform.isLinux() || goog.labs.userAgent.platform.isChromeOS()
  3932. };
  3933. goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.isLegacyLinux_();
  3934. goog.userAgent.isX11_ = function () {
  3935. var a = goog.userAgent.getNavigatorTyped();
  3936. return !!a && goog.string.contains(a.appVersion || "", "X11")
  3937. };
  3938. goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.isX11_();
  3939. goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.labs.userAgent.platform.isAndroid();
  3940. goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.labs.userAgent.platform.isIphone();
  3941. goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
  3942. goog.userAgent.IPOD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPOD : goog.labs.userAgent.platform.isIpod();
  3943. goog.userAgent.IOS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD || goog.userAgent.ASSUME_IPOD : goog.labs.userAgent.platform.isIos();
  3944. goog.userAgent.KAIOS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_KAIOS : goog.labs.userAgent.platform.isKaiOS();
  3945. goog.userAgent.determineVersion_ = function () {
  3946. var a = "", b = goog.userAgent.getVersionRegexResult_();
  3947. b && (a = b ? b[1] : "");
  3948. return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), null != b && b > parseFloat(a)) ? String(b) : a
  3949. };
  3950. goog.userAgent.getVersionRegexResult_ = function () {
  3951. var a = goog.userAgent.getUserAgentString();
  3952. if (goog.userAgent.GECKO) return /rv:([^\);]+)(\)|;)/.exec(a);
  3953. if (goog.userAgent.EDGE) return /Edge\/([\d\.]+)/.exec(a);
  3954. if (goog.userAgent.IE) return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);
  3955. if (goog.userAgent.WEBKIT) return /WebKit\/(\S+)/.exec(a);
  3956. if (goog.userAgent.OPERA) return /(?:Version)[ \/]?(\S+)/.exec(a)
  3957. };
  3958. goog.userAgent.getDocumentMode_ = function () {
  3959. var a = goog.global.document;
  3960. return a ? a.documentMode : void 0
  3961. };
  3962. goog.userAgent.VERSION = goog.userAgent.determineVersion_();
  3963. goog.userAgent.compare = function (a, b) {
  3964. return goog.string.compareVersions(a, b)
  3965. };
  3966. goog.userAgent.isVersionOrHigherCache_ = {};
  3967. goog.userAgent.isVersionOrHigher = function (a) {
  3968. return goog.userAgent.ASSUME_ANY_VERSION || goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_, a, function () {
  3969. return 0 <= goog.string.compareVersions(goog.userAgent.VERSION, a)
  3970. })
  3971. };
  3972. goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher;
  3973. goog.userAgent.isDocumentModeOrHigher = function (a) {
  3974. return Number(goog.userAgent.DOCUMENT_MODE) >= a
  3975. };
  3976. goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher;
  3977. goog.userAgent.DOCUMENT_MODE = function () {
  3978. if (goog.global.document && goog.userAgent.IE) {
  3979. var a = goog.userAgent.getDocumentMode_();
  3980. return a ? a : parseInt(goog.userAgent.VERSION, 10) || void 0
  3981. }
  3982. }();
  3983. goog.userAgent.product = {};
  3984. goog.userAgent.product.ASSUME_FIREFOX = !1;
  3985. goog.userAgent.product.ASSUME_IPHONE = !1;
  3986. goog.userAgent.product.ASSUME_IPAD = !1;
  3987. goog.userAgent.product.ASSUME_ANDROID = !1;
  3988. goog.userAgent.product.ASSUME_CHROME = !1;
  3989. goog.userAgent.product.ASSUME_SAFARI = !1;
  3990. goog.userAgent.product.PRODUCT_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_OPERA || goog.userAgent.product.ASSUME_FIREFOX || goog.userAgent.product.ASSUME_IPHONE || goog.userAgent.product.ASSUME_IPAD || goog.userAgent.product.ASSUME_ANDROID || goog.userAgent.product.ASSUME_CHROME || goog.userAgent.product.ASSUME_SAFARI;
  3991. goog.userAgent.product.OPERA = goog.userAgent.OPERA;
  3992. goog.userAgent.product.IE = goog.userAgent.IE;
  3993. goog.userAgent.product.EDGE = goog.userAgent.EDGE;
  3994. goog.userAgent.product.FIREFOX = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_FIREFOX : goog.labs.userAgent.browser.isFirefox();
  3995. goog.userAgent.product.isIphoneOrIpod_ = function () {
  3996. return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpod()
  3997. };
  3998. goog.userAgent.product.IPHONE = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPHONE : goog.userAgent.product.isIphoneOrIpod_();
  3999. goog.userAgent.product.IPAD = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
  4000. goog.userAgent.product.ANDROID = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_ANDROID : goog.labs.userAgent.browser.isAndroidBrowser();
  4001. goog.userAgent.product.CHROME = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CHROME : goog.labs.userAgent.browser.isChrome();
  4002. goog.userAgent.product.isSafariDesktop_ = function () {
  4003. return goog.labs.userAgent.browser.isSafari() && !goog.labs.userAgent.platform.isIos()
  4004. };
  4005. goog.userAgent.product.SAFARI = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_SAFARI : goog.userAgent.product.isSafariDesktop_();
  4006. goog.crypt.base64 = {};
  4007. goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  4008. goog.crypt.base64.ENCODED_VALS = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "+/=";
  4009. goog.crypt.base64.ENCODED_VALS_WEBSAFE = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "-_.";
  4010. goog.crypt.base64.Alphabet = {DEFAULT: 0, NO_PADDING: 1, WEBSAFE: 2, WEBSAFE_DOT_PADDING: 3, WEBSAFE_NO_PADDING: 4};
  4011. goog.crypt.base64.paddingChars_ = "=.";
  4012. goog.crypt.base64.isPadding_ = function (a) {
  4013. return goog.string.contains(goog.crypt.base64.paddingChars_, a)
  4014. };
  4015. goog.crypt.base64.byteToCharMaps_ = {};
  4016. goog.crypt.base64.charToByteMap_ = null;
  4017. goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ = goog.userAgent.GECKO || goog.userAgent.WEBKIT && !goog.userAgent.product.SAFARI || goog.userAgent.OPERA;
  4018. goog.crypt.base64.HAS_NATIVE_ENCODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || "function" == typeof goog.global.btoa;
  4019. goog.crypt.base64.HAS_NATIVE_DECODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || !goog.userAgent.product.SAFARI && !goog.userAgent.IE && "function" == typeof goog.global.atob;
  4020. goog.crypt.base64.encodeByteArray = function (a, b) {
  4021. goog.asserts.assert(goog.isArrayLike(a), "encodeByteArray takes an array as a parameter");
  4022. void 0 === b && (b = goog.crypt.base64.Alphabet.DEFAULT);
  4023. goog.crypt.base64.init_();
  4024. b = goog.crypt.base64.byteToCharMaps_[b];
  4025. for (var c = [], d = 0; d < a.length; d += 3) {
  4026. var e = a[d], f = d + 1 < a.length, g = f ? a[d + 1] : 0, h = d + 2 < a.length, k = h ? a[d + 2] : 0,
  4027. l = e >> 2;
  4028. e = (e & 3) << 4 | g >> 4;
  4029. g = (g & 15) << 2 | k >> 6;
  4030. k &= 63;
  4031. h || (k = 64, f || (g = 64));
  4032. c.push(b[l], b[e], b[g] || "", b[k] || "");
  4033. }
  4034. return c.join("")
  4035. };
  4036. goog.crypt.base64.encodeString = function (a, b) {
  4037. return goog.crypt.base64.HAS_NATIVE_ENCODE_ && !b ? goog.global.btoa(a) : goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(a), b)
  4038. };
  4039. goog.crypt.base64.decodeString = function (a, b) {
  4040. if (goog.crypt.base64.HAS_NATIVE_DECODE_ && !b) return goog.global.atob(a);
  4041. var c = "";
  4042. goog.crypt.base64.decodeStringInternal_(a, function (a) {
  4043. c += String.fromCharCode(a);
  4044. });
  4045. return c
  4046. };
  4047. goog.crypt.base64.decodeStringToByteArray = function (a, b) {
  4048. var c = [];
  4049. goog.crypt.base64.decodeStringInternal_(a, function (a) {
  4050. c.push(a);
  4051. });
  4052. return c
  4053. };
  4054. goog.crypt.base64.decodeStringToUint8Array = function (a) {
  4055. goog.asserts.assert(!goog.userAgent.IE || goog.userAgent.isVersionOrHigher("10"), "Browser does not support typed arrays");
  4056. var b = a.length, c = 3 * b / 4;
  4057. c % 3 ? c = Math.floor(c) : goog.crypt.base64.isPadding_(a[b - 1]) && (c = goog.crypt.base64.isPadding_(a[b - 2]) ? c - 2 : c - 1);
  4058. var d = new Uint8Array(c), e = 0;
  4059. goog.crypt.base64.decodeStringInternal_(a, function (a) {
  4060. d[e++] = a;
  4061. });
  4062. return d.subarray(0, e)
  4063. };
  4064. goog.crypt.base64.decodeStringInternal_ = function (a, b) {
  4065. function c(b) {
  4066. for (; d < a.length;) {
  4067. var c = a.charAt(d++), e = goog.crypt.base64.charToByteMap_[c];
  4068. if (null != e) return e;
  4069. if (!goog.string.isEmptyOrWhitespace(c)) throw Error("Unknown base64 encoding at char: " + c);
  4070. }
  4071. return b
  4072. }
  4073.  
  4074. goog.crypt.base64.init_();
  4075. for (var d = 0; ;) {
  4076. var e = c(-1), f = c(0), g = c(64), h = c(64);
  4077. if (64 === h && -1 === e) break;
  4078. b(e << 2 | f >> 4);
  4079. 64 != g && (b(f << 4 & 240 | g >> 2), 64 != h && b(g << 6 & 192 | h));
  4080. }
  4081. };
  4082. goog.crypt.base64.init_ = function () {
  4083. if (!goog.crypt.base64.charToByteMap_) {
  4084. goog.crypt.base64.charToByteMap_ = {};
  4085. for (var a = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""), b = ["+/=", "+/", "-_=", "-_.", "-_"], c = 0; 5 > c; c++) {
  4086. var d = a.concat(b[c].split(""));
  4087. goog.crypt.base64.byteToCharMaps_[c] = d;
  4088. for (var e = 0; e < d.length; e++) {
  4089. var f = d[e], g = goog.crypt.base64.charToByteMap_[f];
  4090. void 0 === g ? goog.crypt.base64.charToByteMap_[f] = e : goog.asserts.assert(g === e);
  4091. }
  4092. }
  4093. }
  4094. };
  4095. jspb.utils = {};
  4096. jspb.utils.split64Low = 0;
  4097. jspb.utils.split64High = 0;
  4098. jspb.utils.splitUint64 = function (a) {
  4099. var b = a >>> 0;
  4100. a = Math.floor((a - b) / jspb.BinaryConstants.TWO_TO_32) >>> 0;
  4101. jspb.utils.split64Low = b;
  4102. jspb.utils.split64High = a;
  4103. };
  4104. jspb.utils.splitInt64 = function (a) {
  4105. var b = 0 > a;
  4106. a = Math.abs(a);
  4107. var c = a >>> 0;
  4108. a = Math.floor((a - c) / jspb.BinaryConstants.TWO_TO_32);
  4109. a >>>= 0;
  4110. b && (a = ~a >>> 0, c = (~c >>> 0) + 1, 4294967295 < c && (c = 0, a++, 4294967295 < a && (a = 0)));
  4111. jspb.utils.split64Low = c;
  4112. jspb.utils.split64High = a;
  4113. };
  4114. jspb.utils.splitZigzag64 = function (a) {
  4115. var b = 0 > a;
  4116. a = 2 * Math.abs(a);
  4117. jspb.utils.splitUint64(a);
  4118. a = jspb.utils.split64Low;
  4119. var c = jspb.utils.split64High;
  4120. b && (0 == a ? 0 == c ? c = a = 4294967295 : (c--, a = 4294967295) : a--);
  4121. jspb.utils.split64Low = a;
  4122. jspb.utils.split64High = c;
  4123. };
  4124. jspb.utils.splitFloat32 = function (a) {
  4125. var b = 0 > a ? 1 : 0;
  4126. a = b ? -a : a;
  4127. if (0 === a) 0 < 1 / a ? (jspb.utils.split64High = 0, jspb.utils.split64Low = 0) : (jspb.utils.split64High = 0, jspb.utils.split64Low = 2147483648); else if (isNaN(a)) jspb.utils.split64High = 0, jspb.utils.split64Low = 2147483647; else if (a > jspb.BinaryConstants.FLOAT32_MAX) jspb.utils.split64High = 0, jspb.utils.split64Low = (b << 31 | 2139095040) >>> 0; else if (a < jspb.BinaryConstants.FLOAT32_MIN) a = Math.round(a / Math.pow(2, -149)), jspb.utils.split64High = 0, jspb.utils.split64Low = (b << 31 |
  4128. a) >>> 0; else {
  4129. var c = Math.floor(Math.log(a) / Math.LN2);
  4130. a *= Math.pow(2, -c);
  4131. a = Math.round(a * jspb.BinaryConstants.TWO_TO_23);
  4132. 16777216 <= a && ++c;
  4133. jspb.utils.split64High = 0;
  4134. jspb.utils.split64Low = (b << 31 | c + 127 << 23 | a & 8388607) >>> 0;
  4135. }
  4136. };
  4137. jspb.utils.splitFloat64 = function (a) {
  4138. var b = 0 > a ? 1 : 0;
  4139. a = b ? -a : a;
  4140. if (0 === a) jspb.utils.split64High = 0 < 1 / a ? 0 : 2147483648, jspb.utils.split64Low = 0; else if (isNaN(a)) jspb.utils.split64High = 2147483647, jspb.utils.split64Low = 4294967295; else if (a > jspb.BinaryConstants.FLOAT64_MAX) jspb.utils.split64High = (b << 31 | 2146435072) >>> 0, jspb.utils.split64Low = 0; else if (a < jspb.BinaryConstants.FLOAT64_MIN) {
  4141. var c = a / Math.pow(2, -1074);
  4142. a = c / jspb.BinaryConstants.TWO_TO_32;
  4143. jspb.utils.split64High = (b << 31 | a) >>> 0;
  4144. jspb.utils.split64Low = c >>> 0;
  4145. } else {
  4146. c =
  4147. a;
  4148. var d = 0;
  4149. if (2 <= c) for (; 2 <= c && 1023 > d;) d++, c /= 2; else for (; 1 > c && -1022 < d;) c *= 2, d--;
  4150. c = a * Math.pow(2, -d);
  4151. a = c * jspb.BinaryConstants.TWO_TO_20 & 1048575;
  4152. c = c * jspb.BinaryConstants.TWO_TO_52 >>> 0;
  4153. jspb.utils.split64High = (b << 31 | d + 1023 << 20 | a) >>> 0;
  4154. jspb.utils.split64Low = c;
  4155. }
  4156. };
  4157. jspb.utils.splitHash64 = function (a) {
  4158. var b = a.charCodeAt(0), c = a.charCodeAt(1), d = a.charCodeAt(2), e = a.charCodeAt(3), f = a.charCodeAt(4),
  4159. g = a.charCodeAt(5), h = a.charCodeAt(6);
  4160. a = a.charCodeAt(7);
  4161. jspb.utils.split64Low = b + (c << 8) + (d << 16) + (e << 24) >>> 0;
  4162. jspb.utils.split64High = f + (g << 8) + (h << 16) + (a << 24) >>> 0;
  4163. };
  4164. jspb.utils.joinUint64 = function (a, b) {
  4165. return b * jspb.BinaryConstants.TWO_TO_32 + (a >>> 0)
  4166. };
  4167. jspb.utils.joinInt64 = function (a, b) {
  4168. var c = b & 2147483648;
  4169. c && (a = ~a + 1 >>> 0, b = ~b >>> 0, 0 == a && (b = b + 1 >>> 0));
  4170. a = jspb.utils.joinUint64(a, b);
  4171. return c ? -a : a
  4172. };
  4173. jspb.utils.toZigzag64 = function (a, b, c) {
  4174. var d = b >> 31;
  4175. return c(a << 1 ^ d, (b << 1 | a >>> 31) ^ d)
  4176. };
  4177. jspb.utils.joinZigzag64 = function (a, b) {
  4178. return jspb.utils.fromZigzag64(a, b, jspb.utils.joinInt64)
  4179. };
  4180. jspb.utils.fromZigzag64 = function (a, b, c) {
  4181. var d = -(a & 1);
  4182. return c((a >>> 1 | b << 31) ^ d, b >>> 1 ^ d)
  4183. };
  4184. jspb.utils.joinFloat32 = function (a, b) {
  4185. b = 2 * (a >> 31) + 1;
  4186. var c = a >>> 23 & 255;
  4187. a &= 8388607;
  4188. return 255 == c ? a ? NaN : Infinity * b : 0 == c ? b * Math.pow(2, -149) * a : b * Math.pow(2, c - 150) * (a + Math.pow(2, 23))
  4189. };
  4190. jspb.utils.joinFloat64 = function (a, b) {
  4191. var c = 2 * (b >> 31) + 1, d = b >>> 20 & 2047;
  4192. a = jspb.BinaryConstants.TWO_TO_32 * (b & 1048575) + a;
  4193. return 2047 == d ? a ? NaN : Infinity * c : 0 == d ? c * Math.pow(2, -1074) * a : c * Math.pow(2, d - 1075) * (a + jspb.BinaryConstants.TWO_TO_52)
  4194. };
  4195. jspb.utils.joinHash64 = function (a, b) {
  4196. return String.fromCharCode(a >>> 0 & 255, a >>> 8 & 255, a >>> 16 & 255, a >>> 24 & 255, b >>> 0 & 255, b >>> 8 & 255, b >>> 16 & 255, b >>> 24 & 255)
  4197. };
  4198. jspb.utils.DIGITS = "0123456789abcdef".split("");
  4199. jspb.utils.ZERO_CHAR_CODE_ = 48;
  4200. jspb.utils.A_CHAR_CODE_ = 97;
  4201. jspb.utils.joinUnsignedDecimalString = function (a, b) {
  4202. function c(a, b) {
  4203. a = a ? String(a) : "";
  4204. return b ? "0000000".slice(a.length) + a : a
  4205. }
  4206.  
  4207. if (2097151 >= b) return "" + jspb.utils.joinUint64(a, b);
  4208. var d = (a >>> 24 | b << 8) >>> 0 & 16777215;
  4209. b = b >> 16 & 65535;
  4210. a = (a & 16777215) + 6777216 * d + 6710656 * b;
  4211. d += 8147497 * b;
  4212. b *= 2;
  4213. 1E7 <= a && (d += Math.floor(a / 1E7), a %= 1E7);
  4214. 1E7 <= d && (b += Math.floor(d / 1E7), d %= 1E7);
  4215. return c(b, 0) + c(d, b) + c(a, 1)
  4216. };
  4217. jspb.utils.joinSignedDecimalString = function (a, b) {
  4218. var c = b & 2147483648;
  4219. c && (a = ~a + 1 >>> 0, b = ~b + (0 == a ? 1 : 0) >>> 0);
  4220. a = jspb.utils.joinUnsignedDecimalString(a, b);
  4221. return c ? "-" + a : a
  4222. };
  4223. jspb.utils.hash64ToDecimalString = function (a, b) {
  4224. jspb.utils.splitHash64(a);
  4225. a = jspb.utils.split64Low;
  4226. var c = jspb.utils.split64High;
  4227. return b ? jspb.utils.joinSignedDecimalString(a, c) : jspb.utils.joinUnsignedDecimalString(a, c)
  4228. };
  4229. jspb.utils.hash64ArrayToDecimalStrings = function (a, b) {
  4230. for (var c = Array(a.length), d = 0; d < a.length; d++) c[d] = jspb.utils.hash64ToDecimalString(a[d], b);
  4231. return c
  4232. };
  4233. jspb.utils.decimalStringToHash64 = function (a) {
  4234. function b(a, b) {
  4235. for (var c = 0; 8 > c && (1 !== a || 0 < b); c++) b = a * e[c] + b, e[c] = b & 255, b >>>= 8;
  4236. }
  4237.  
  4238. function c() {
  4239. for (var a = 0; 8 > a; a++) e[a] = ~e[a] & 255;
  4240. }
  4241.  
  4242. jspb.asserts.assert(0 < a.length);
  4243. var d = !1;
  4244. "-" === a[0] && (d = !0, a = a.slice(1));
  4245. for (var e = [0, 0, 0, 0, 0, 0, 0, 0], f = 0; f < a.length; f++) b(10, a.charCodeAt(f) - jspb.utils.ZERO_CHAR_CODE_);
  4246. d && (c(), b(1, 1));
  4247. return goog.crypt.byteArrayToString(e)
  4248. };
  4249. jspb.utils.splitDecimalString = function (a) {
  4250. jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(a));
  4251. };
  4252. jspb.utils.toHexDigit_ = function (a) {
  4253. return String.fromCharCode(10 > a ? jspb.utils.ZERO_CHAR_CODE_ + a : jspb.utils.A_CHAR_CODE_ - 10 + a)
  4254. };
  4255. jspb.utils.fromHexCharCode_ = function (a) {
  4256. return a >= jspb.utils.A_CHAR_CODE_ ? a - jspb.utils.A_CHAR_CODE_ + 10 : a - jspb.utils.ZERO_CHAR_CODE_
  4257. };
  4258. jspb.utils.hash64ToHexString = function (a) {
  4259. var b = Array(18);
  4260. b[0] = "0";
  4261. b[1] = "x";
  4262. for (var c = 0; 8 > c; c++) {
  4263. var d = a.charCodeAt(7 - c);
  4264. b[2 * c + 2] = jspb.utils.toHexDigit_(d >> 4);
  4265. b[2 * c + 3] = jspb.utils.toHexDigit_(d & 15);
  4266. }
  4267. return b.join("")
  4268. };
  4269. jspb.utils.hexStringToHash64 = function (a) {
  4270. a = a.toLowerCase();
  4271. jspb.asserts.assert(18 == a.length);
  4272. jspb.asserts.assert("0" == a[0]);
  4273. jspb.asserts.assert("x" == a[1]);
  4274. for (var b = "", c = 0; 8 > c; c++) {
  4275. var d = jspb.utils.fromHexCharCode_(a.charCodeAt(2 * c + 2)),
  4276. e = jspb.utils.fromHexCharCode_(a.charCodeAt(2 * c + 3));
  4277. b = String.fromCharCode(16 * d + e) + b;
  4278. }
  4279. return b
  4280. };
  4281. jspb.utils.hash64ToNumber = function (a, b) {
  4282. jspb.utils.splitHash64(a);
  4283. a = jspb.utils.split64Low;
  4284. var c = jspb.utils.split64High;
  4285. return b ? jspb.utils.joinInt64(a, c) : jspb.utils.joinUint64(a, c)
  4286. };
  4287. jspb.utils.numberToHash64 = function (a) {
  4288. jspb.utils.splitInt64(a);
  4289. return jspb.utils.joinHash64(jspb.utils.split64Low, jspb.utils.split64High)
  4290. };
  4291. jspb.utils.countVarints = function (a, b, c) {
  4292. for (var d = 0, e = b; e < c; e++) d += a[e] >> 7;
  4293. return c - b - d
  4294. };
  4295. jspb.utils.countVarintFields = function (a, b, c, d) {
  4296. var e = 0;
  4297. d = 8 * d + jspb.BinaryConstants.WireType.VARINT;
  4298. if (128 > d) for (; b < c && a[b++] == d;) for (e++; ;) {
  4299. var f = a[b++];
  4300. if (0 == (f & 128)) break
  4301. } else for (; b < c;) {
  4302. for (f = d; 128 < f;) {
  4303. if (a[b] != (f & 127 | 128)) return e;
  4304. b++;
  4305. f >>= 7;
  4306. }
  4307. if (a[b++] != f) break;
  4308. for (e++; f = a[b++], 0 != (f & 128);) ;
  4309. }
  4310. return e
  4311. };
  4312. jspb.utils.countFixedFields_ = function (a, b, c, d, e) {
  4313. var f = 0;
  4314. if (128 > d) for (; b < c && a[b++] == d;) f++, b += e; else for (; b < c;) {
  4315. for (var g = d; 128 < g;) {
  4316. if (a[b++] != (g & 127 | 128)) return f;
  4317. g >>= 7;
  4318. }
  4319. if (a[b++] != g) break;
  4320. f++;
  4321. b += e;
  4322. }
  4323. return f
  4324. };
  4325. jspb.utils.countFixed32Fields = function (a, b, c, d) {
  4326. return jspb.utils.countFixedFields_(a, b, c, 8 * d + jspb.BinaryConstants.WireType.FIXED32, 4)
  4327. };
  4328. jspb.utils.countFixed64Fields = function (a, b, c, d) {
  4329. return jspb.utils.countFixedFields_(a, b, c, 8 * d + jspb.BinaryConstants.WireType.FIXED64, 8)
  4330. };
  4331. jspb.utils.countDelimitedFields = function (a, b, c, d) {
  4332. var e = 0;
  4333. for (d = 8 * d + jspb.BinaryConstants.WireType.DELIMITED; b < c;) {
  4334. for (var f = d; 128 < f;) {
  4335. if (a[b++] != (f & 127 | 128)) return e;
  4336. f >>= 7;
  4337. }
  4338. if (a[b++] != f) break;
  4339. e++;
  4340. for (var g = 0, h = 1; f = a[b++], g += (f & 127) * h, h *= 128, 0 != (f & 128);) ;
  4341. b += g;
  4342. }
  4343. return e
  4344. };
  4345. jspb.utils.debugBytesToTextFormat = function (a) {
  4346. var b = '"';
  4347. if (a) {
  4348. a = jspb.utils.byteSourceToUint8Array(a);
  4349. for (var c = 0; c < a.length; c++) b += "\\x", 16 > a[c] && (b += "0"), b += a[c].toString(16);
  4350. }
  4351. return b + '"'
  4352. };
  4353. jspb.utils.debugScalarToTextFormat = function (a) {
  4354. return "string" === typeof a ? goog.string.quote(a) : a.toString()
  4355. };
  4356. jspb.utils.stringToByteArray = function (a) {
  4357. for (var b = new Uint8Array(a.length), c = 0; c < a.length; c++) {
  4358. var d = a.charCodeAt(c);
  4359. if (255 < d) throw Error("Conversion error: string contains codepoint outside of byte range");
  4360. b[c] = d;
  4361. }
  4362. return b
  4363. };
  4364. jspb.utils.byteSourceToUint8Array = function (a) {
  4365. if (a.constructor === Uint8Array) return a;
  4366. if (a.constructor === ArrayBuffer || a.constructor === Array) return new Uint8Array(a);
  4367. if (a.constructor === String) return goog.crypt.base64.decodeStringToUint8Array(a);
  4368. if (a instanceof Uint8Array) return new Uint8Array(a.buffer, a.byteOffset, a.byteLength);
  4369. jspb.asserts.fail("Type not convertible to Uint8Array.");
  4370. return new Uint8Array(0)
  4371. };
  4372. jspb.BinaryDecoder = function (a, b, c) {
  4373. this.bytes_ = null;
  4374. this.cursor_ = this.end_ = this.start_ = 0;
  4375. this.error_ = !1;
  4376. a && this.setBlock(a, b, c);
  4377. };
  4378. jspb.BinaryDecoder.instanceCache_ = [];
  4379. jspb.BinaryDecoder.alloc = function (a, b, c) {
  4380. if (jspb.BinaryDecoder.instanceCache_.length) {
  4381. var d = jspb.BinaryDecoder.instanceCache_.pop();
  4382. a && d.setBlock(a, b, c);
  4383. return d
  4384. }
  4385. return new jspb.BinaryDecoder(a, b, c)
  4386. };
  4387. jspb.BinaryDecoder.prototype.free = function () {
  4388. this.clear();
  4389. 100 > jspb.BinaryDecoder.instanceCache_.length && jspb.BinaryDecoder.instanceCache_.push(this);
  4390. };
  4391. jspb.BinaryDecoder.prototype.clone = function () {
  4392. return jspb.BinaryDecoder.alloc(this.bytes_, this.start_, this.end_ - this.start_)
  4393. };
  4394. jspb.BinaryDecoder.prototype.clear = function () {
  4395. this.bytes_ = null;
  4396. this.cursor_ = this.end_ = this.start_ = 0;
  4397. this.error_ = !1;
  4398. };
  4399. jspb.BinaryDecoder.prototype.getBuffer = function () {
  4400. return this.bytes_
  4401. };
  4402. jspb.BinaryDecoder.prototype.setBlock = function (a, b, c) {
  4403. this.bytes_ = jspb.utils.byteSourceToUint8Array(a);
  4404. this.start_ = void 0 !== b ? b : 0;
  4405. this.end_ = void 0 !== c ? this.start_ + c : this.bytes_.length;
  4406. this.cursor_ = this.start_;
  4407. };
  4408. jspb.BinaryDecoder.prototype.getEnd = function () {
  4409. return this.end_
  4410. };
  4411. jspb.BinaryDecoder.prototype.setEnd = function (a) {
  4412. this.end_ = a;
  4413. };
  4414. jspb.BinaryDecoder.prototype.reset = function () {
  4415. this.cursor_ = this.start_;
  4416. };
  4417. jspb.BinaryDecoder.prototype.getCursor = function () {
  4418. return this.cursor_
  4419. };
  4420. jspb.BinaryDecoder.prototype.setCursor = function (a) {
  4421. this.cursor_ = a;
  4422. };
  4423. jspb.BinaryDecoder.prototype.advance = function (a) {
  4424. this.cursor_ += a;
  4425. jspb.asserts.assert(this.cursor_ <= this.end_);
  4426. };
  4427. jspb.BinaryDecoder.prototype.atEnd = function () {
  4428. return this.cursor_ == this.end_
  4429. };
  4430. jspb.BinaryDecoder.prototype.pastEnd = function () {
  4431. return this.cursor_ > this.end_
  4432. };
  4433. jspb.BinaryDecoder.prototype.getError = function () {
  4434. return this.error_ || 0 > this.cursor_ || this.cursor_ > this.end_
  4435. };
  4436. jspb.BinaryDecoder.prototype.readSplitVarint64 = function (a) {
  4437. for (var b = 128, c = 0, d = 0, e = 0; 4 > e && 128 <= b; e++) b = this.bytes_[this.cursor_++], c |= (b & 127) << 7 * e;
  4438. 128 <= b && (b = this.bytes_[this.cursor_++], c |= (b & 127) << 28, d |= (b & 127) >> 4);
  4439. if (128 <= b) for (e = 0; 5 > e && 128 <= b; e++) b = this.bytes_[this.cursor_++], d |= (b & 127) << 7 * e + 3;
  4440. if (128 > b) return a(c >>> 0, d >>> 0);
  4441. jspb.asserts.fail("Failed to read varint, encoding is invalid.");
  4442. this.error_ = !0;
  4443. };
  4444. jspb.BinaryDecoder.prototype.readSplitZigzagVarint64 = function (a) {
  4445. return this.readSplitVarint64(function (b, c) {
  4446. return jspb.utils.fromZigzag64(b, c, a)
  4447. })
  4448. };
  4449. jspb.BinaryDecoder.prototype.readSplitFixed64 = function (a) {
  4450. var b = this.bytes_, c = this.cursor_;
  4451. this.cursor_ += 8;
  4452. for (var d = 0, e = 0, f = c + 7; f >= c; f--) d = d << 8 | b[f], e = e << 8 | b[f + 4];
  4453. return a(d, e)
  4454. };
  4455. jspb.BinaryDecoder.prototype.skipVarint = function () {
  4456. for (; this.bytes_[this.cursor_] & 128;) this.cursor_++;
  4457. this.cursor_++;
  4458. };
  4459. jspb.BinaryDecoder.prototype.unskipVarint = function (a) {
  4460. for (; 128 < a;) this.cursor_--, a >>>= 7;
  4461. this.cursor_--;
  4462. };
  4463. jspb.BinaryDecoder.prototype.readUnsignedVarint32 = function () {
  4464. var a = this.bytes_;
  4465. var b = a[this.cursor_ + 0];
  4466. var c = b & 127;
  4467. if (128 > b) return this.cursor_ += 1, jspb.asserts.assert(this.cursor_ <= this.end_), c;
  4468. b = a[this.cursor_ + 1];
  4469. c |= (b & 127) << 7;
  4470. if (128 > b) return this.cursor_ += 2, jspb.asserts.assert(this.cursor_ <= this.end_), c;
  4471. b = a[this.cursor_ + 2];
  4472. c |= (b & 127) << 14;
  4473. if (128 > b) return this.cursor_ += 3, jspb.asserts.assert(this.cursor_ <= this.end_), c;
  4474. b = a[this.cursor_ + 3];
  4475. c |= (b & 127) << 21;
  4476. if (128 > b) return this.cursor_ += 4, jspb.asserts.assert(this.cursor_ <=
  4477. this.end_), c;
  4478. b = a[this.cursor_ + 4];
  4479. c |= (b & 15) << 28;
  4480. if (128 > b) return this.cursor_ += 5, jspb.asserts.assert(this.cursor_ <= this.end_), c >>> 0;
  4481. this.cursor_ += 5;
  4482. 128 <= a[this.cursor_++] && 128 <= a[this.cursor_++] && 128 <= a[this.cursor_++] && 128 <= a[this.cursor_++] && 128 <= a[this.cursor_++] && jspb.asserts.assert(!1);
  4483. jspb.asserts.assert(this.cursor_ <= this.end_);
  4484. return c
  4485. };
  4486. jspb.BinaryDecoder.prototype.readSignedVarint32 = function () {
  4487. return ~~this.readUnsignedVarint32()
  4488. };
  4489. jspb.BinaryDecoder.prototype.readUnsignedVarint32String = function () {
  4490. return this.readUnsignedVarint32().toString()
  4491. };
  4492. jspb.BinaryDecoder.prototype.readSignedVarint32String = function () {
  4493. return this.readSignedVarint32().toString()
  4494. };
  4495. jspb.BinaryDecoder.prototype.readZigzagVarint32 = function () {
  4496. var a = this.readUnsignedVarint32();
  4497. return a >>> 1 ^ -(a & 1)
  4498. };
  4499. jspb.BinaryDecoder.prototype.readUnsignedVarint64 = function () {
  4500. return this.readSplitVarint64(jspb.utils.joinUint64)
  4501. };
  4502. jspb.BinaryDecoder.prototype.readUnsignedVarint64String = function () {
  4503. return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)
  4504. };
  4505. jspb.BinaryDecoder.prototype.readSignedVarint64 = function () {
  4506. return this.readSplitVarint64(jspb.utils.joinInt64)
  4507. };
  4508. jspb.BinaryDecoder.prototype.readSignedVarint64String = function () {
  4509. return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)
  4510. };
  4511. jspb.BinaryDecoder.prototype.readZigzagVarint64 = function () {
  4512. return this.readSplitVarint64(jspb.utils.joinZigzag64)
  4513. };
  4514. jspb.BinaryDecoder.prototype.readZigzagVarintHash64 = function () {
  4515. return this.readSplitZigzagVarint64(jspb.utils.joinHash64)
  4516. };
  4517. jspb.BinaryDecoder.prototype.readZigzagVarint64String = function () {
  4518. return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)
  4519. };
  4520. jspb.BinaryDecoder.prototype.readUint8 = function () {
  4521. var a = this.bytes_[this.cursor_ + 0];
  4522. this.cursor_ += 1;
  4523. jspb.asserts.assert(this.cursor_ <= this.end_);
  4524. return a
  4525. };
  4526. jspb.BinaryDecoder.prototype.readUint16 = function () {
  4527. var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1];
  4528. this.cursor_ += 2;
  4529. jspb.asserts.assert(this.cursor_ <= this.end_);
  4530. return a << 0 | b << 8
  4531. };
  4532. jspb.BinaryDecoder.prototype.readUint32 = function () {
  4533. var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1], c = this.bytes_[this.cursor_ + 2],
  4534. d = this.bytes_[this.cursor_ + 3];
  4535. this.cursor_ += 4;
  4536. jspb.asserts.assert(this.cursor_ <= this.end_);
  4537. return (a << 0 | b << 8 | c << 16 | d << 24) >>> 0
  4538. };
  4539. jspb.BinaryDecoder.prototype.readUint64 = function () {
  4540. var a = this.readUint32(), b = this.readUint32();
  4541. return jspb.utils.joinUint64(a, b)
  4542. };
  4543. jspb.BinaryDecoder.prototype.readUint64String = function () {
  4544. var a = this.readUint32(), b = this.readUint32();
  4545. return jspb.utils.joinUnsignedDecimalString(a, b)
  4546. };
  4547. jspb.BinaryDecoder.prototype.readInt8 = function () {
  4548. var a = this.bytes_[this.cursor_ + 0];
  4549. this.cursor_ += 1;
  4550. jspb.asserts.assert(this.cursor_ <= this.end_);
  4551. return a << 24 >> 24
  4552. };
  4553. jspb.BinaryDecoder.prototype.readInt16 = function () {
  4554. var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1];
  4555. this.cursor_ += 2;
  4556. jspb.asserts.assert(this.cursor_ <= this.end_);
  4557. return (a << 0 | b << 8) << 16 >> 16
  4558. };
  4559. jspb.BinaryDecoder.prototype.readInt32 = function () {
  4560. var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1], c = this.bytes_[this.cursor_ + 2],
  4561. d = this.bytes_[this.cursor_ + 3];
  4562. this.cursor_ += 4;
  4563. jspb.asserts.assert(this.cursor_ <= this.end_);
  4564. return a << 0 | b << 8 | c << 16 | d << 24
  4565. };
  4566. jspb.BinaryDecoder.prototype.readInt64 = function () {
  4567. var a = this.readUint32(), b = this.readUint32();
  4568. return jspb.utils.joinInt64(a, b)
  4569. };
  4570. jspb.BinaryDecoder.prototype.readInt64String = function () {
  4571. var a = this.readUint32(), b = this.readUint32();
  4572. return jspb.utils.joinSignedDecimalString(a, b)
  4573. };
  4574. jspb.BinaryDecoder.prototype.readFloat = function () {
  4575. var a = this.readUint32();
  4576. return jspb.utils.joinFloat32(a, 0)
  4577. };
  4578. jspb.BinaryDecoder.prototype.readDouble = function () {
  4579. var a = this.readUint32(), b = this.readUint32();
  4580. return jspb.utils.joinFloat64(a, b)
  4581. };
  4582. jspb.BinaryDecoder.prototype.readBool = function () {
  4583. return !!this.bytes_[this.cursor_++]
  4584. };
  4585. jspb.BinaryDecoder.prototype.readEnum = function () {
  4586. return this.readSignedVarint32()
  4587. };
  4588. jspb.BinaryDecoder.prototype.readString = function (a) {
  4589. var b = this.bytes_, c = this.cursor_;
  4590. a = c + a;
  4591. for (var d = [], e = ""; c < a;) {
  4592. var f = b[c++];
  4593. if (128 > f) d.push(f); else if (192 > f) continue; else if (224 > f) {
  4594. var g = b[c++];
  4595. d.push((f & 31) << 6 | g & 63);
  4596. } else if (240 > f) {
  4597. g = b[c++];
  4598. var h = b[c++];
  4599. d.push((f & 15) << 12 | (g & 63) << 6 | h & 63);
  4600. } else if (248 > f) {
  4601. g = b[c++];
  4602. h = b[c++];
  4603. var k = b[c++];
  4604. f = (f & 7) << 18 | (g & 63) << 12 | (h & 63) << 6 | k & 63;
  4605. f -= 65536;
  4606. d.push((f >> 10 & 1023) + 55296, (f & 1023) + 56320);
  4607. }
  4608. 8192 <= d.length && (e += String.fromCharCode.apply(null, d), d.length = 0);
  4609. }
  4610. e += goog.crypt.byteArrayToString(d);
  4611. this.cursor_ = c;
  4612. return e
  4613. };
  4614. jspb.BinaryDecoder.prototype.readStringWithLength = function () {
  4615. var a = this.readUnsignedVarint32();
  4616. return this.readString(a)
  4617. };
  4618. jspb.BinaryDecoder.prototype.readBytes = function (a) {
  4619. if (0 > a || this.cursor_ + a > this.bytes_.length) return this.error_ = !0, jspb.asserts.fail("Invalid byte length!"), new Uint8Array(0);
  4620. var b = this.bytes_.subarray(this.cursor_, this.cursor_ + a);
  4621. this.cursor_ += a;
  4622. jspb.asserts.assert(this.cursor_ <= this.end_);
  4623. return b
  4624. };
  4625. jspb.BinaryDecoder.prototype.readVarintHash64 = function () {
  4626. return this.readSplitVarint64(jspb.utils.joinHash64)
  4627. };
  4628. jspb.BinaryDecoder.prototype.readFixedHash64 = function () {
  4629. var a = this.bytes_, b = this.cursor_, c = a[b + 0], d = a[b + 1], e = a[b + 2], f = a[b + 3], g = a[b + 4],
  4630. h = a[b + 5], k = a[b + 6];
  4631. a = a[b + 7];
  4632. this.cursor_ += 8;
  4633. return String.fromCharCode(c, d, e, f, g, h, k, a)
  4634. };
  4635. jspb.BinaryReader = function (a, b, c) {
  4636. this.decoder_ = jspb.BinaryDecoder.alloc(a, b, c);
  4637. this.fieldCursor_ = this.decoder_.getCursor();
  4638. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  4639. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID;
  4640. this.error_ = !1;
  4641. this.readCallbacks_ = null;
  4642. };
  4643. jspb.BinaryReader.instanceCache_ = [];
  4644. jspb.BinaryReader.alloc = function (a, b, c) {
  4645. if (jspb.BinaryReader.instanceCache_.length) {
  4646. var d = jspb.BinaryReader.instanceCache_.pop();
  4647. a && d.decoder_.setBlock(a, b, c);
  4648. return d
  4649. }
  4650. return new jspb.BinaryReader(a, b, c)
  4651. };
  4652. jspb.BinaryReader.prototype.alloc = jspb.BinaryReader.alloc;
  4653. jspb.BinaryReader.prototype.free = function () {
  4654. this.decoder_.clear();
  4655. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  4656. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID;
  4657. this.error_ = !1;
  4658. this.readCallbacks_ = null;
  4659. 100 > jspb.BinaryReader.instanceCache_.length && jspb.BinaryReader.instanceCache_.push(this);
  4660. };
  4661. jspb.BinaryReader.prototype.getFieldCursor = function () {
  4662. return this.fieldCursor_
  4663. };
  4664. jspb.BinaryReader.prototype.getCursor = function () {
  4665. return this.decoder_.getCursor()
  4666. };
  4667. jspb.BinaryReader.prototype.getBuffer = function () {
  4668. return this.decoder_.getBuffer()
  4669. };
  4670. jspb.BinaryReader.prototype.getFieldNumber = function () {
  4671. return this.nextField_
  4672. };
  4673. goog.exportProperty(jspb.BinaryReader.prototype, "getFieldNumber", jspb.BinaryReader.prototype.getFieldNumber);
  4674. jspb.BinaryReader.prototype.getWireType = function () {
  4675. return this.nextWireType_
  4676. };
  4677. jspb.BinaryReader.prototype.isDelimited = function () {
  4678. return this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED
  4679. };
  4680. goog.exportProperty(jspb.BinaryReader.prototype, "isDelimited", jspb.BinaryReader.prototype.isDelimited);
  4681. jspb.BinaryReader.prototype.isEndGroup = function () {
  4682. return this.nextWireType_ == jspb.BinaryConstants.WireType.END_GROUP
  4683. };
  4684. goog.exportProperty(jspb.BinaryReader.prototype, "isEndGroup", jspb.BinaryReader.prototype.isEndGroup);
  4685. jspb.BinaryReader.prototype.getError = function () {
  4686. return this.error_ || this.decoder_.getError()
  4687. };
  4688. jspb.BinaryReader.prototype.setBlock = function (a, b, c) {
  4689. this.decoder_.setBlock(a, b, c);
  4690. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  4691. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID;
  4692. };
  4693. jspb.BinaryReader.prototype.reset = function () {
  4694. this.decoder_.reset();
  4695. this.nextField_ = jspb.BinaryConstants.INVALID_FIELD_NUMBER;
  4696. this.nextWireType_ = jspb.BinaryConstants.WireType.INVALID;
  4697. };
  4698. jspb.BinaryReader.prototype.advance = function (a) {
  4699. this.decoder_.advance(a);
  4700. };
  4701. jspb.BinaryReader.prototype.nextField = function () {
  4702. if (this.decoder_.atEnd()) return !1;
  4703. if (this.getError()) return jspb.asserts.fail("Decoder hit an error"), !1;
  4704. this.fieldCursor_ = this.decoder_.getCursor();
  4705. var a = this.decoder_.readUnsignedVarint32(), b = a >>> 3;
  4706. a &= 7;
  4707. if (a != jspb.BinaryConstants.WireType.VARINT && a != jspb.BinaryConstants.WireType.FIXED32 && a != jspb.BinaryConstants.WireType.FIXED64 && a != jspb.BinaryConstants.WireType.DELIMITED && a != jspb.BinaryConstants.WireType.START_GROUP && a != jspb.BinaryConstants.WireType.END_GROUP) return jspb.asserts.fail("Invalid wire type: %s (at position %s)",
  4708. a, this.fieldCursor_), this.error_ = !0, !1;
  4709. this.nextField_ = b;
  4710. this.nextWireType_ = a;
  4711. return !0
  4712. };
  4713. goog.exportProperty(jspb.BinaryReader.prototype, "nextField", jspb.BinaryReader.prototype.nextField);
  4714. jspb.BinaryReader.prototype.unskipHeader = function () {
  4715. this.decoder_.unskipVarint(this.nextField_ << 3 | this.nextWireType_);
  4716. };
  4717. jspb.BinaryReader.prototype.skipMatchingFields = function () {
  4718. var a = this.nextField_;
  4719. for (this.unskipHeader(); this.nextField() && this.getFieldNumber() == a;) this.skipField();
  4720. this.decoder_.atEnd() || this.unskipHeader();
  4721. };
  4722. jspb.BinaryReader.prototype.skipVarintField = function () {
  4723. this.nextWireType_ != jspb.BinaryConstants.WireType.VARINT ? (jspb.asserts.fail("Invalid wire type for skipVarintField"), this.skipField()) : this.decoder_.skipVarint();
  4724. };
  4725. jspb.BinaryReader.prototype.skipDelimitedField = function () {
  4726. if (this.nextWireType_ != jspb.BinaryConstants.WireType.DELIMITED) jspb.asserts.fail("Invalid wire type for skipDelimitedField"), this.skipField(); else {
  4727. var a = this.decoder_.readUnsignedVarint32();
  4728. this.decoder_.advance(a);
  4729. }
  4730. };
  4731. jspb.BinaryReader.prototype.skipFixed32Field = function () {
  4732. this.nextWireType_ != jspb.BinaryConstants.WireType.FIXED32 ? (jspb.asserts.fail("Invalid wire type for skipFixed32Field"), this.skipField()) : this.decoder_.advance(4);
  4733. };
  4734. jspb.BinaryReader.prototype.skipFixed64Field = function () {
  4735. this.nextWireType_ != jspb.BinaryConstants.WireType.FIXED64 ? (jspb.asserts.fail("Invalid wire type for skipFixed64Field"), this.skipField()) : this.decoder_.advance(8);
  4736. };
  4737. jspb.BinaryReader.prototype.skipGroup = function () {
  4738. var a = this.nextField_;
  4739. do {
  4740. if (!this.nextField()) {
  4741. jspb.asserts.fail("Unmatched start-group tag: stream EOF");
  4742. this.error_ = !0;
  4743. break
  4744. }
  4745. if (this.nextWireType_ == jspb.BinaryConstants.WireType.END_GROUP) {
  4746. this.nextField_ != a && (jspb.asserts.fail("Unmatched end-group tag"), this.error_ = !0);
  4747. break
  4748. }
  4749. this.skipField();
  4750. } while (1)
  4751. };
  4752. jspb.BinaryReader.prototype.skipField = function () {
  4753. switch (this.nextWireType_) {
  4754. case jspb.BinaryConstants.WireType.VARINT:
  4755. this.skipVarintField();
  4756. break;
  4757. case jspb.BinaryConstants.WireType.FIXED64:
  4758. this.skipFixed64Field();
  4759. break;
  4760. case jspb.BinaryConstants.WireType.DELIMITED:
  4761. this.skipDelimitedField();
  4762. break;
  4763. case jspb.BinaryConstants.WireType.FIXED32:
  4764. this.skipFixed32Field();
  4765. break;
  4766. case jspb.BinaryConstants.WireType.START_GROUP:
  4767. this.skipGroup();
  4768. break;
  4769. default:
  4770. jspb.asserts.fail("Invalid wire encoding for field.");
  4771. }
  4772. };
  4773. jspb.BinaryReader.prototype.registerReadCallback = function (a, b) {
  4774. null === this.readCallbacks_ && (this.readCallbacks_ = {});
  4775. jspb.asserts.assert(!this.readCallbacks_[a]);
  4776. this.readCallbacks_[a] = b;
  4777. };
  4778. jspb.BinaryReader.prototype.runReadCallback = function (a) {
  4779. jspb.asserts.assert(null !== this.readCallbacks_);
  4780. a = this.readCallbacks_[a];
  4781. jspb.asserts.assert(a);
  4782. return a(this)
  4783. };
  4784. jspb.BinaryReader.prototype.readAny = function (a) {
  4785. this.nextWireType_ = jspb.BinaryConstants.FieldTypeToWireType(a);
  4786. var b = jspb.BinaryConstants.FieldType;
  4787. switch (a) {
  4788. case b.DOUBLE:
  4789. return this.readDouble();
  4790. case b.FLOAT:
  4791. return this.readFloat();
  4792. case b.INT64:
  4793. return this.readInt64();
  4794. case b.UINT64:
  4795. return this.readUint64();
  4796. case b.INT32:
  4797. return this.readInt32();
  4798. case b.FIXED64:
  4799. return this.readFixed64();
  4800. case b.FIXED32:
  4801. return this.readFixed32();
  4802. case b.BOOL:
  4803. return this.readBool();
  4804. case b.STRING:
  4805. return this.readString();
  4806. case b.GROUP:
  4807. jspb.asserts.fail("Group field type not supported in readAny()");
  4808. case b.MESSAGE:
  4809. jspb.asserts.fail("Message field type not supported in readAny()");
  4810. case b.BYTES:
  4811. return this.readBytes();
  4812. case b.UINT32:
  4813. return this.readUint32();
  4814. case b.ENUM:
  4815. return this.readEnum();
  4816. case b.SFIXED32:
  4817. return this.readSfixed32();
  4818. case b.SFIXED64:
  4819. return this.readSfixed64();
  4820. case b.SINT32:
  4821. return this.readSint32();
  4822. case b.SINT64:
  4823. return this.readSint64();
  4824. case b.FHASH64:
  4825. return this.readFixedHash64();
  4826. case b.VHASH64:
  4827. return this.readVarintHash64();
  4828. default:
  4829. jspb.asserts.fail("Invalid field type in readAny()");
  4830. }
  4831. return 0
  4832. };
  4833. jspb.BinaryReader.prototype.readMessage = function (a, b) {
  4834. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  4835. var c = this.decoder_.getEnd(), d = this.decoder_.readUnsignedVarint32();
  4836. d = this.decoder_.getCursor() + d;
  4837. this.decoder_.setEnd(d);
  4838. b(a, this);
  4839. this.decoder_.setCursor(d);
  4840. this.decoder_.setEnd(c);
  4841. };
  4842. goog.exportProperty(jspb.BinaryReader.prototype, "readMessage", jspb.BinaryReader.prototype.readMessage);
  4843. jspb.BinaryReader.prototype.readGroup = function (a, b, c) {
  4844. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.START_GROUP);
  4845. jspb.asserts.assert(this.nextField_ == a);
  4846. c(b, this);
  4847. this.error_ || this.nextWireType_ == jspb.BinaryConstants.WireType.END_GROUP || (jspb.asserts.fail("Group submessage did not end with an END_GROUP tag"), this.error_ = !0);
  4848. };
  4849. goog.exportProperty(jspb.BinaryReader.prototype, "readGroup", jspb.BinaryReader.prototype.readGroup);
  4850. jspb.BinaryReader.prototype.getFieldDecoder = function () {
  4851. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  4852. var a = this.decoder_.readUnsignedVarint32(), b = this.decoder_.getCursor(), c = b + a;
  4853. a = jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(), b, a);
  4854. this.decoder_.setCursor(c);
  4855. return a
  4856. };
  4857. jspb.BinaryReader.prototype.readInt32 = function () {
  4858. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4859. return this.decoder_.readSignedVarint32()
  4860. };
  4861. goog.exportProperty(jspb.BinaryReader.prototype, "readInt32", jspb.BinaryReader.prototype.readInt32);
  4862. jspb.BinaryReader.prototype.readInt32String = function () {
  4863. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4864. return this.decoder_.readSignedVarint32String()
  4865. };
  4866. jspb.BinaryReader.prototype.readInt64 = function () {
  4867. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4868. return this.decoder_.readSignedVarint64()
  4869. };
  4870. goog.exportProperty(jspb.BinaryReader.prototype, "readInt64", jspb.BinaryReader.prototype.readInt64);
  4871. jspb.BinaryReader.prototype.readInt64String = function () {
  4872. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4873. return this.decoder_.readSignedVarint64String()
  4874. };
  4875. jspb.BinaryReader.prototype.readUint32 = function () {
  4876. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4877. return this.decoder_.readUnsignedVarint32()
  4878. };
  4879. goog.exportProperty(jspb.BinaryReader.prototype, "readUint32", jspb.BinaryReader.prototype.readUint32);
  4880. jspb.BinaryReader.prototype.readUint32String = function () {
  4881. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4882. return this.decoder_.readUnsignedVarint32String()
  4883. };
  4884. jspb.BinaryReader.prototype.readUint64 = function () {
  4885. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4886. return this.decoder_.readUnsignedVarint64()
  4887. };
  4888. goog.exportProperty(jspb.BinaryReader.prototype, "readUint64", jspb.BinaryReader.prototype.readUint64);
  4889. jspb.BinaryReader.prototype.readUint64String = function () {
  4890. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4891. return this.decoder_.readUnsignedVarint64String()
  4892. };
  4893. jspb.BinaryReader.prototype.readSint32 = function () {
  4894. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4895. return this.decoder_.readZigzagVarint32()
  4896. };
  4897. goog.exportProperty(jspb.BinaryReader.prototype, "readSint32", jspb.BinaryReader.prototype.readSint32);
  4898. jspb.BinaryReader.prototype.readSint64 = function () {
  4899. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4900. return this.decoder_.readZigzagVarint64()
  4901. };
  4902. goog.exportProperty(jspb.BinaryReader.prototype, "readSint64", jspb.BinaryReader.prototype.readSint64);
  4903. jspb.BinaryReader.prototype.readSint64String = function () {
  4904. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4905. return this.decoder_.readZigzagVarint64String()
  4906. };
  4907. jspb.BinaryReader.prototype.readFixed32 = function () {
  4908. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  4909. return this.decoder_.readUint32()
  4910. };
  4911. goog.exportProperty(jspb.BinaryReader.prototype, "readFixed32", jspb.BinaryReader.prototype.readFixed32);
  4912. jspb.BinaryReader.prototype.readFixed64 = function () {
  4913. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  4914. return this.decoder_.readUint64()
  4915. };
  4916. goog.exportProperty(jspb.BinaryReader.prototype, "readFixed64", jspb.BinaryReader.prototype.readFixed64);
  4917. jspb.BinaryReader.prototype.readFixed64String = function () {
  4918. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  4919. return this.decoder_.readUint64String()
  4920. };
  4921. jspb.BinaryReader.prototype.readSfixed32 = function () {
  4922. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  4923. return this.decoder_.readInt32()
  4924. };
  4925. goog.exportProperty(jspb.BinaryReader.prototype, "readSfixed32", jspb.BinaryReader.prototype.readSfixed32);
  4926. jspb.BinaryReader.prototype.readSfixed32String = function () {
  4927. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  4928. return this.decoder_.readInt32().toString()
  4929. };
  4930. jspb.BinaryReader.prototype.readSfixed64 = function () {
  4931. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  4932. return this.decoder_.readInt64()
  4933. };
  4934. goog.exportProperty(jspb.BinaryReader.prototype, "readSfixed64", jspb.BinaryReader.prototype.readSfixed64);
  4935. jspb.BinaryReader.prototype.readSfixed64String = function () {
  4936. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  4937. return this.decoder_.readInt64String()
  4938. };
  4939. jspb.BinaryReader.prototype.readFloat = function () {
  4940. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED32);
  4941. return this.decoder_.readFloat()
  4942. };
  4943. goog.exportProperty(jspb.BinaryReader.prototype, "readFloat", jspb.BinaryReader.prototype.readFloat);
  4944. jspb.BinaryReader.prototype.readDouble = function () {
  4945. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  4946. return this.decoder_.readDouble()
  4947. };
  4948. goog.exportProperty(jspb.BinaryReader.prototype, "readDouble", jspb.BinaryReader.prototype.readDouble);
  4949. jspb.BinaryReader.prototype.readBool = function () {
  4950. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4951. return !!this.decoder_.readUnsignedVarint32()
  4952. };
  4953. goog.exportProperty(jspb.BinaryReader.prototype, "readBool", jspb.BinaryReader.prototype.readBool);
  4954. jspb.BinaryReader.prototype.readEnum = function () {
  4955. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4956. return this.decoder_.readSignedVarint64()
  4957. };
  4958. goog.exportProperty(jspb.BinaryReader.prototype, "readEnum", jspb.BinaryReader.prototype.readEnum);
  4959. jspb.BinaryReader.prototype.readString = function () {
  4960. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  4961. var a = this.decoder_.readUnsignedVarint32();
  4962. return this.decoder_.readString(a)
  4963. };
  4964. goog.exportProperty(jspb.BinaryReader.prototype, "readString", jspb.BinaryReader.prototype.readString);
  4965. jspb.BinaryReader.prototype.readBytes = function () {
  4966. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  4967. var a = this.decoder_.readUnsignedVarint32();
  4968. return this.decoder_.readBytes(a)
  4969. };
  4970. goog.exportProperty(jspb.BinaryReader.prototype, "readBytes", jspb.BinaryReader.prototype.readBytes);
  4971. jspb.BinaryReader.prototype.readVarintHash64 = function () {
  4972. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4973. return this.decoder_.readVarintHash64()
  4974. };
  4975. jspb.BinaryReader.prototype.readSintHash64 = function () {
  4976. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4977. return this.decoder_.readZigzagVarintHash64()
  4978. };
  4979. jspb.BinaryReader.prototype.readSplitVarint64 = function (a) {
  4980. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4981. return this.decoder_.readSplitVarint64(a)
  4982. };
  4983. jspb.BinaryReader.prototype.readSplitZigzagVarint64 = function (a) {
  4984. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.VARINT);
  4985. return this.decoder_.readSplitVarint64(function (b, c) {
  4986. return jspb.utils.fromZigzag64(b, c, a)
  4987. })
  4988. };
  4989. jspb.BinaryReader.prototype.readFixedHash64 = function () {
  4990. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  4991. return this.decoder_.readFixedHash64()
  4992. };
  4993. jspb.BinaryReader.prototype.readSplitFixed64 = function (a) {
  4994. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.FIXED64);
  4995. return this.decoder_.readSplitFixed64(a)
  4996. };
  4997. jspb.BinaryReader.prototype.readPackedField_ = function (a) {
  4998. jspb.asserts.assert(this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED);
  4999. var b = this.decoder_.readUnsignedVarint32();
  5000. b = this.decoder_.getCursor() + b;
  5001. for (var c = []; this.decoder_.getCursor() < b;) c.push(a.call(this.decoder_));
  5002. return c
  5003. };
  5004. jspb.BinaryReader.prototype.readPackedInt32 = function () {
  5005. return this.readPackedField_(this.decoder_.readSignedVarint32)
  5006. };
  5007. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedInt32", jspb.BinaryReader.prototype.readPackedInt32);
  5008. jspb.BinaryReader.prototype.readPackedInt32String = function () {
  5009. return this.readPackedField_(this.decoder_.readSignedVarint32String)
  5010. };
  5011. jspb.BinaryReader.prototype.readPackedInt64 = function () {
  5012. return this.readPackedField_(this.decoder_.readSignedVarint64)
  5013. };
  5014. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedInt64", jspb.BinaryReader.prototype.readPackedInt64);
  5015. jspb.BinaryReader.prototype.readPackedInt64String = function () {
  5016. return this.readPackedField_(this.decoder_.readSignedVarint64String)
  5017. };
  5018. jspb.BinaryReader.prototype.readPackedUint32 = function () {
  5019. return this.readPackedField_(this.decoder_.readUnsignedVarint32)
  5020. };
  5021. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedUint32", jspb.BinaryReader.prototype.readPackedUint32);
  5022. jspb.BinaryReader.prototype.readPackedUint32String = function () {
  5023. return this.readPackedField_(this.decoder_.readUnsignedVarint32String)
  5024. };
  5025. jspb.BinaryReader.prototype.readPackedUint64 = function () {
  5026. return this.readPackedField_(this.decoder_.readUnsignedVarint64)
  5027. };
  5028. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedUint64", jspb.BinaryReader.prototype.readPackedUint64);
  5029. jspb.BinaryReader.prototype.readPackedUint64String = function () {
  5030. return this.readPackedField_(this.decoder_.readUnsignedVarint64String)
  5031. };
  5032. jspb.BinaryReader.prototype.readPackedSint32 = function () {
  5033. return this.readPackedField_(this.decoder_.readZigzagVarint32)
  5034. };
  5035. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSint32", jspb.BinaryReader.prototype.readPackedSint32);
  5036. jspb.BinaryReader.prototype.readPackedSint64 = function () {
  5037. return this.readPackedField_(this.decoder_.readZigzagVarint64)
  5038. };
  5039. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSint64", jspb.BinaryReader.prototype.readPackedSint64);
  5040. jspb.BinaryReader.prototype.readPackedSint64String = function () {
  5041. return this.readPackedField_(this.decoder_.readZigzagVarint64String)
  5042. };
  5043. jspb.BinaryReader.prototype.readPackedFixed32 = function () {
  5044. return this.readPackedField_(this.decoder_.readUint32)
  5045. };
  5046. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedFixed32", jspb.BinaryReader.prototype.readPackedFixed32);
  5047. jspb.BinaryReader.prototype.readPackedFixed64 = function () {
  5048. return this.readPackedField_(this.decoder_.readUint64)
  5049. };
  5050. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedFixed64", jspb.BinaryReader.prototype.readPackedFixed64);
  5051. jspb.BinaryReader.prototype.readPackedFixed64String = function () {
  5052. return this.readPackedField_(this.decoder_.readUint64String)
  5053. };
  5054. jspb.BinaryReader.prototype.readPackedSfixed32 = function () {
  5055. return this.readPackedField_(this.decoder_.readInt32)
  5056. };
  5057. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSfixed32", jspb.BinaryReader.prototype.readPackedSfixed32);
  5058. jspb.BinaryReader.prototype.readPackedSfixed64 = function () {
  5059. return this.readPackedField_(this.decoder_.readInt64)
  5060. };
  5061. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedSfixed64", jspb.BinaryReader.prototype.readPackedSfixed64);
  5062. jspb.BinaryReader.prototype.readPackedSfixed64String = function () {
  5063. return this.readPackedField_(this.decoder_.readInt64String)
  5064. };
  5065. jspb.BinaryReader.prototype.readPackedFloat = function () {
  5066. return this.readPackedField_(this.decoder_.readFloat)
  5067. };
  5068. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedFloat", jspb.BinaryReader.prototype.readPackedFloat);
  5069. jspb.BinaryReader.prototype.readPackedDouble = function () {
  5070. return this.readPackedField_(this.decoder_.readDouble)
  5071. };
  5072. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedDouble", jspb.BinaryReader.prototype.readPackedDouble);
  5073. jspb.BinaryReader.prototype.readPackedBool = function () {
  5074. return this.readPackedField_(this.decoder_.readBool)
  5075. };
  5076. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedBool", jspb.BinaryReader.prototype.readPackedBool);
  5077. jspb.BinaryReader.prototype.readPackedEnum = function () {
  5078. return this.readPackedField_(this.decoder_.readEnum)
  5079. };
  5080. goog.exportProperty(jspb.BinaryReader.prototype, "readPackedEnum", jspb.BinaryReader.prototype.readPackedEnum);
  5081. jspb.BinaryReader.prototype.readPackedVarintHash64 = function () {
  5082. return this.readPackedField_(this.decoder_.readVarintHash64)
  5083. };
  5084. jspb.BinaryReader.prototype.readPackedFixedHash64 = function () {
  5085. return this.readPackedField_(this.decoder_.readFixedHash64)
  5086. };
  5087. jspb.BinaryEncoder = function () {
  5088. this.buffer_ = [];
  5089. };
  5090. jspb.BinaryEncoder.prototype.length = function () {
  5091. return this.buffer_.length
  5092. };
  5093. jspb.BinaryEncoder.prototype.end = function () {
  5094. var a = this.buffer_;
  5095. this.buffer_ = [];
  5096. return a
  5097. };
  5098. jspb.BinaryEncoder.prototype.writeSplitVarint64 = function (a, b) {
  5099. jspb.asserts.assert(a == Math.floor(a));
  5100. jspb.asserts.assert(b == Math.floor(b));
  5101. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32);
  5102. for (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32); 0 < b || 127 < a;) this.buffer_.push(a & 127 | 128), a = (a >>> 7 | b << 25) >>> 0, b >>>= 7;
  5103. this.buffer_.push(a);
  5104. };
  5105. jspb.BinaryEncoder.prototype.writeSplitFixed64 = function (a, b) {
  5106. jspb.asserts.assert(a == Math.floor(a));
  5107. jspb.asserts.assert(b == Math.floor(b));
  5108. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32);
  5109. jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32);
  5110. this.writeUint32(a);
  5111. this.writeUint32(b);
  5112. };
  5113. jspb.BinaryEncoder.prototype.writeUnsignedVarint32 = function (a) {
  5114. jspb.asserts.assert(a == Math.floor(a));
  5115. for (jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32); 127 < a;) this.buffer_.push(a & 127 | 128), a >>>= 7;
  5116. this.buffer_.push(a);
  5117. };
  5118. jspb.BinaryEncoder.prototype.writeSignedVarint32 = function (a) {
  5119. jspb.asserts.assert(a == Math.floor(a));
  5120. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5121. if (0 <= a) this.writeUnsignedVarint32(a); else {
  5122. for (var b = 0; 9 > b; b++) this.buffer_.push(a & 127 | 128), a >>= 7;
  5123. this.buffer_.push(1);
  5124. }
  5125. };
  5126. jspb.BinaryEncoder.prototype.writeUnsignedVarint64 = function (a) {
  5127. jspb.asserts.assert(a == Math.floor(a));
  5128. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_64);
  5129. jspb.utils.splitInt64(a);
  5130. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High);
  5131. };
  5132. jspb.BinaryEncoder.prototype.writeSignedVarint64 = function (a) {
  5133. jspb.asserts.assert(a == Math.floor(a));
  5134. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_63 && a < jspb.BinaryConstants.TWO_TO_63);
  5135. jspb.utils.splitInt64(a);
  5136. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High);
  5137. };
  5138. jspb.BinaryEncoder.prototype.writeZigzagVarint32 = function (a) {
  5139. jspb.asserts.assert(a == Math.floor(a));
  5140. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5141. this.writeUnsignedVarint32((a << 1 ^ a >> 31) >>> 0);
  5142. };
  5143. jspb.BinaryEncoder.prototype.writeZigzagVarint64 = function (a) {
  5144. jspb.asserts.assert(a == Math.floor(a));
  5145. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_63 && a < jspb.BinaryConstants.TWO_TO_63);
  5146. jspb.utils.splitZigzag64(a);
  5147. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High);
  5148. };
  5149. jspb.BinaryEncoder.prototype.writeZigzagVarint64String = function (a) {
  5150. this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(a));
  5151. };
  5152. jspb.BinaryEncoder.prototype.writeZigzagVarintHash64 = function (a) {
  5153. var b = this;
  5154. jspb.utils.splitHash64(a);
  5155. jspb.utils.toZigzag64(jspb.utils.split64Low, jspb.utils.split64High, function (a, d) {
  5156. b.writeSplitVarint64(a >>> 0, d >>> 0);
  5157. });
  5158. };
  5159. jspb.BinaryEncoder.prototype.writeUint8 = function (a) {
  5160. jspb.asserts.assert(a == Math.floor(a));
  5161. jspb.asserts.assert(0 <= a && 256 > a);
  5162. this.buffer_.push(a >>> 0 & 255);
  5163. };
  5164. jspb.BinaryEncoder.prototype.writeUint16 = function (a) {
  5165. jspb.asserts.assert(a == Math.floor(a));
  5166. jspb.asserts.assert(0 <= a && 65536 > a);
  5167. this.buffer_.push(a >>> 0 & 255);
  5168. this.buffer_.push(a >>> 8 & 255);
  5169. };
  5170. jspb.BinaryEncoder.prototype.writeUint32 = function (a) {
  5171. jspb.asserts.assert(a == Math.floor(a));
  5172. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_32);
  5173. this.buffer_.push(a >>> 0 & 255);
  5174. this.buffer_.push(a >>> 8 & 255);
  5175. this.buffer_.push(a >>> 16 & 255);
  5176. this.buffer_.push(a >>> 24 & 255);
  5177. };
  5178. jspb.BinaryEncoder.prototype.writeUint64 = function (a) {
  5179. jspb.asserts.assert(a == Math.floor(a));
  5180. jspb.asserts.assert(0 <= a && a < jspb.BinaryConstants.TWO_TO_64);
  5181. jspb.utils.splitUint64(a);
  5182. this.writeUint32(jspb.utils.split64Low);
  5183. this.writeUint32(jspb.utils.split64High);
  5184. };
  5185. jspb.BinaryEncoder.prototype.writeInt8 = function (a) {
  5186. jspb.asserts.assert(a == Math.floor(a));
  5187. jspb.asserts.assert(-128 <= a && 128 > a);
  5188. this.buffer_.push(a >>> 0 & 255);
  5189. };
  5190. jspb.BinaryEncoder.prototype.writeInt16 = function (a) {
  5191. jspb.asserts.assert(a == Math.floor(a));
  5192. jspb.asserts.assert(-32768 <= a && 32768 > a);
  5193. this.buffer_.push(a >>> 0 & 255);
  5194. this.buffer_.push(a >>> 8 & 255);
  5195. };
  5196. jspb.BinaryEncoder.prototype.writeInt32 = function (a) {
  5197. jspb.asserts.assert(a == Math.floor(a));
  5198. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5199. this.buffer_.push(a >>> 0 & 255);
  5200. this.buffer_.push(a >>> 8 & 255);
  5201. this.buffer_.push(a >>> 16 & 255);
  5202. this.buffer_.push(a >>> 24 & 255);
  5203. };
  5204. jspb.BinaryEncoder.prototype.writeInt64 = function (a) {
  5205. jspb.asserts.assert(a == Math.floor(a));
  5206. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_63 && a < jspb.BinaryConstants.TWO_TO_63);
  5207. jspb.utils.splitInt64(a);
  5208. this.writeSplitFixed64(jspb.utils.split64Low, jspb.utils.split64High);
  5209. };
  5210. jspb.BinaryEncoder.prototype.writeInt64String = function (a) {
  5211. jspb.asserts.assert(a == Math.floor(a));
  5212. jspb.asserts.assert(+a >= -jspb.BinaryConstants.TWO_TO_63 && +a < jspb.BinaryConstants.TWO_TO_63);
  5213. jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(a));
  5214. this.writeSplitFixed64(jspb.utils.split64Low, jspb.utils.split64High);
  5215. };
  5216. jspb.BinaryEncoder.prototype.writeFloat = function (a) {
  5217. jspb.asserts.assert(Infinity === a || -Infinity === a || isNaN(a) || a >= -jspb.BinaryConstants.FLOAT32_MAX && a <= jspb.BinaryConstants.FLOAT32_MAX);
  5218. jspb.utils.splitFloat32(a);
  5219. this.writeUint32(jspb.utils.split64Low);
  5220. };
  5221. jspb.BinaryEncoder.prototype.writeDouble = function (a) {
  5222. jspb.asserts.assert(Infinity === a || -Infinity === a || isNaN(a) || a >= -jspb.BinaryConstants.FLOAT64_MAX && a <= jspb.BinaryConstants.FLOAT64_MAX);
  5223. jspb.utils.splitFloat64(a);
  5224. this.writeUint32(jspb.utils.split64Low);
  5225. this.writeUint32(jspb.utils.split64High);
  5226. };
  5227. jspb.BinaryEncoder.prototype.writeBool = function (a) {
  5228. jspb.asserts.assert("boolean" === typeof a || "number" === typeof a);
  5229. this.buffer_.push(a ? 1 : 0);
  5230. };
  5231. jspb.BinaryEncoder.prototype.writeEnum = function (a) {
  5232. jspb.asserts.assert(a == Math.floor(a));
  5233. jspb.asserts.assert(a >= -jspb.BinaryConstants.TWO_TO_31 && a < jspb.BinaryConstants.TWO_TO_31);
  5234. this.writeSignedVarint32(a);
  5235. };
  5236. jspb.BinaryEncoder.prototype.writeBytes = function (a) {
  5237. this.buffer_.push.apply(this.buffer_, a);
  5238. };
  5239. jspb.BinaryEncoder.prototype.writeVarintHash64 = function (a) {
  5240. jspb.utils.splitHash64(a);
  5241. this.writeSplitVarint64(jspb.utils.split64Low, jspb.utils.split64High);
  5242. };
  5243. jspb.BinaryEncoder.prototype.writeFixedHash64 = function (a) {
  5244. jspb.utils.splitHash64(a);
  5245. this.writeUint32(jspb.utils.split64Low);
  5246. this.writeUint32(jspb.utils.split64High);
  5247. };
  5248. jspb.BinaryEncoder.prototype.writeString = function (a) {
  5249. var b = this.buffer_.length;
  5250. jspb.asserts.assertString(a);
  5251. for (var c = 0; c < a.length; c++) {
  5252. var d = a.charCodeAt(c);
  5253. if (128 > d) this.buffer_.push(d); else if (2048 > d) this.buffer_.push(d >> 6 | 192), this.buffer_.push(d & 63 | 128); else if (65536 > d) if (55296 <= d && 56319 >= d && c + 1 < a.length) {
  5254. var e = a.charCodeAt(c + 1);
  5255. 56320 <= e && 57343 >= e && (d = 1024 * (d - 55296) + e - 56320 + 65536, this.buffer_.push(d >> 18 | 240), this.buffer_.push(d >> 12 & 63 | 128), this.buffer_.push(d >> 6 & 63 | 128), this.buffer_.push(d & 63 |
  5256. 128), c++);
  5257. } else this.buffer_.push(d >> 12 | 224), this.buffer_.push(d >> 6 & 63 | 128), this.buffer_.push(d & 63 | 128);
  5258. }
  5259. return this.buffer_.length - b
  5260. };
  5261. jspb.arith = {};
  5262. jspb.arith.UInt64 = function (a, b) {
  5263. this.lo = a;
  5264. this.hi = b;
  5265. };
  5266. jspb.arith.UInt64.prototype.cmp = function (a) {
  5267. return this.hi < a.hi || this.hi == a.hi && this.lo < a.lo ? -1 : this.hi == a.hi && this.lo == a.lo ? 0 : 1
  5268. };
  5269. jspb.arith.UInt64.prototype.rightShift = function () {
  5270. return new jspb.arith.UInt64((this.lo >>> 1 | (this.hi & 1) << 31) >>> 0, this.hi >>> 1 >>> 0)
  5271. };
  5272. jspb.arith.UInt64.prototype.leftShift = function () {
  5273. return new jspb.arith.UInt64(this.lo << 1 >>> 0, (this.hi << 1 | this.lo >>> 31) >>> 0)
  5274. };
  5275. jspb.arith.UInt64.prototype.msb = function () {
  5276. return !!(this.hi & 2147483648)
  5277. };
  5278. jspb.arith.UInt64.prototype.lsb = function () {
  5279. return !!(this.lo & 1)
  5280. };
  5281. jspb.arith.UInt64.prototype.zero = function () {
  5282. return 0 == this.lo && 0 == this.hi
  5283. };
  5284. jspb.arith.UInt64.prototype.add = function (a) {
  5285. return new jspb.arith.UInt64((this.lo + a.lo & 4294967295) >>> 0 >>> 0, ((this.hi + a.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + a.lo ? 1 : 0) >>> 0)
  5286. };
  5287. jspb.arith.UInt64.prototype.sub = function (a) {
  5288. return new jspb.arith.UInt64((this.lo - a.lo & 4294967295) >>> 0 >>> 0, ((this.hi - a.hi & 4294967295) >>> 0) - (0 > this.lo - a.lo ? 1 : 0) >>> 0)
  5289. };
  5290. jspb.arith.UInt64.mul32x32 = function (a, b) {
  5291. var c = a & 65535;
  5292. a >>>= 16;
  5293. var d = b & 65535, e = b >>> 16;
  5294. b = c * d + 65536 * (c * e & 65535) + 65536 * (a * d & 65535);
  5295. for (c = a * e + (c * e >>> 16) + (a * d >>> 16); 4294967296 <= b;) b -= 4294967296, c += 1;
  5296. return new jspb.arith.UInt64(b >>> 0, c >>> 0)
  5297. };
  5298. jspb.arith.UInt64.prototype.mul = function (a) {
  5299. var b = jspb.arith.UInt64.mul32x32(this.lo, a);
  5300. a = jspb.arith.UInt64.mul32x32(this.hi, a);
  5301. a.hi = a.lo;
  5302. a.lo = 0;
  5303. return b.add(a)
  5304. };
  5305. jspb.arith.UInt64.prototype.div = function (a) {
  5306. if (0 == a) return [];
  5307. var b = new jspb.arith.UInt64(0, 0), c = new jspb.arith.UInt64(this.lo, this.hi);
  5308. a = new jspb.arith.UInt64(a, 0);
  5309. for (var d = new jspb.arith.UInt64(1, 0); !a.msb();) a = a.leftShift(), d = d.leftShift();
  5310. for (; !d.zero();) 0 >= a.cmp(c) && (b = b.add(d), c = c.sub(a)), a = a.rightShift(), d = d.rightShift();
  5311. return [b, c]
  5312. };
  5313. jspb.arith.UInt64.prototype.toString = function () {
  5314. for (var a = "", b = this; !b.zero();) {
  5315. b = b.div(10);
  5316. var c = b[0];
  5317. a = b[1].lo + a;
  5318. b = c;
  5319. }
  5320. "" == a && (a = "0");
  5321. return a
  5322. };
  5323. jspb.arith.UInt64.fromString = function (a) {
  5324. for (var b = new jspb.arith.UInt64(0, 0), c = new jspb.arith.UInt64(0, 0), d = 0; d < a.length; d++) {
  5325. if ("0" > a[d] || "9" < a[d]) return null;
  5326. var e = parseInt(a[d], 10);
  5327. c.lo = e;
  5328. b = b.mul(10).add(c);
  5329. }
  5330. return b
  5331. };
  5332. jspb.arith.UInt64.prototype.clone = function () {
  5333. return new jspb.arith.UInt64(this.lo, this.hi)
  5334. };
  5335. jspb.arith.Int64 = function (a, b) {
  5336. this.lo = a;
  5337. this.hi = b;
  5338. };
  5339. jspb.arith.Int64.prototype.add = function (a) {
  5340. return new jspb.arith.Int64((this.lo + a.lo & 4294967295) >>> 0 >>> 0, ((this.hi + a.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + a.lo ? 1 : 0) >>> 0)
  5341. };
  5342. jspb.arith.Int64.prototype.sub = function (a) {
  5343. return new jspb.arith.Int64((this.lo - a.lo & 4294967295) >>> 0 >>> 0, ((this.hi - a.hi & 4294967295) >>> 0) - (0 > this.lo - a.lo ? 1 : 0) >>> 0)
  5344. };
  5345. jspb.arith.Int64.prototype.clone = function () {
  5346. return new jspb.arith.Int64(this.lo, this.hi)
  5347. };
  5348. jspb.arith.Int64.prototype.toString = function () {
  5349. var a = 0 != (this.hi & 2147483648), b = new jspb.arith.UInt64(this.lo, this.hi);
  5350. a && (b = (new jspb.arith.UInt64(0, 0)).sub(b));
  5351. return (a ? "-" : "") + b.toString()
  5352. };
  5353. jspb.arith.Int64.fromString = function (a) {
  5354. var b = 0 < a.length && "-" == a[0];
  5355. b && (a = a.substring(1));
  5356. a = jspb.arith.UInt64.fromString(a);
  5357. if (null === a) return null;
  5358. b && (a = (new jspb.arith.UInt64(0, 0)).sub(a));
  5359. return new jspb.arith.Int64(a.lo, a.hi)
  5360. };
  5361. jspb.BinaryWriter = function () {
  5362. this.blocks_ = [];
  5363. this.totalLength_ = 0;
  5364. this.encoder_ = new jspb.BinaryEncoder;
  5365. this.bookmarks_ = [];
  5366. };
  5367. jspb.BinaryWriter.prototype.appendUint8Array_ = function (a) {
  5368. var b = this.encoder_.end();
  5369. this.blocks_.push(b);
  5370. this.blocks_.push(a);
  5371. this.totalLength_ += b.length + a.length;
  5372. };
  5373. jspb.BinaryWriter.prototype.beginDelimited_ = function (a) {
  5374. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED);
  5375. a = this.encoder_.end();
  5376. this.blocks_.push(a);
  5377. this.totalLength_ += a.length;
  5378. a.push(this.totalLength_);
  5379. return a
  5380. };
  5381. jspb.BinaryWriter.prototype.endDelimited_ = function (a) {
  5382. var b = a.pop();
  5383. b = this.totalLength_ + this.encoder_.length() - b;
  5384. for (jspb.asserts.assert(0 <= b); 127 < b;) a.push(b & 127 | 128), b >>>= 7, this.totalLength_++;
  5385. a.push(b);
  5386. this.totalLength_++;
  5387. };
  5388. jspb.BinaryWriter.prototype.writeSerializedMessage = function (a, b, c) {
  5389. this.appendUint8Array_(a.subarray(b, c));
  5390. };
  5391. jspb.BinaryWriter.prototype.maybeWriteSerializedMessage = function (a, b, c) {
  5392. null != a && null != b && null != c && this.writeSerializedMessage(a, b, c);
  5393. };
  5394. jspb.BinaryWriter.prototype.reset = function () {
  5395. this.blocks_ = [];
  5396. this.encoder_.end();
  5397. this.totalLength_ = 0;
  5398. this.bookmarks_ = [];
  5399. };
  5400. jspb.BinaryWriter.prototype.getResultBuffer = function () {
  5401. jspb.asserts.assert(0 == this.bookmarks_.length);
  5402. for (var a = new Uint8Array(this.totalLength_ + this.encoder_.length()), b = this.blocks_, c = b.length, d = 0, e = 0; e < c; e++) {
  5403. var f = b[e];
  5404. a.set(f, d);
  5405. d += f.length;
  5406. }
  5407. b = this.encoder_.end();
  5408. a.set(b, d);
  5409. d += b.length;
  5410. jspb.asserts.assert(d == a.length);
  5411. this.blocks_ = [a];
  5412. return a
  5413. };
  5414. goog.exportProperty(jspb.BinaryWriter.prototype, "getResultBuffer", jspb.BinaryWriter.prototype.getResultBuffer);
  5415. jspb.BinaryWriter.prototype.getResultBase64String = function (a) {
  5416. return goog.crypt.base64.encodeByteArray(this.getResultBuffer(), a)
  5417. };
  5418. jspb.BinaryWriter.prototype.beginSubMessage = function (a) {
  5419. this.bookmarks_.push(this.beginDelimited_(a));
  5420. };
  5421. jspb.BinaryWriter.prototype.endSubMessage = function () {
  5422. jspb.asserts.assert(0 <= this.bookmarks_.length);
  5423. this.endDelimited_(this.bookmarks_.pop());
  5424. };
  5425. jspb.BinaryWriter.prototype.writeFieldHeader_ = function (a, b) {
  5426. jspb.asserts.assert(1 <= a && a == Math.floor(a));
  5427. this.encoder_.writeUnsignedVarint32(8 * a + b);
  5428. };
  5429. jspb.BinaryWriter.prototype.writeAny = function (a, b, c) {
  5430. var d = jspb.BinaryConstants.FieldType;
  5431. switch (a) {
  5432. case d.DOUBLE:
  5433. this.writeDouble(b, c);
  5434. break;
  5435. case d.FLOAT:
  5436. this.writeFloat(b, c);
  5437. break;
  5438. case d.INT64:
  5439. this.writeInt64(b, c);
  5440. break;
  5441. case d.UINT64:
  5442. this.writeUint64(b, c);
  5443. break;
  5444. case d.INT32:
  5445. this.writeInt32(b, c);
  5446. break;
  5447. case d.FIXED64:
  5448. this.writeFixed64(b, c);
  5449. break;
  5450. case d.FIXED32:
  5451. this.writeFixed32(b, c);
  5452. break;
  5453. case d.BOOL:
  5454. this.writeBool(b, c);
  5455. break;
  5456. case d.STRING:
  5457. this.writeString(b, c);
  5458. break;
  5459. case d.GROUP:
  5460. jspb.asserts.fail("Group field type not supported in writeAny()");
  5461. break;
  5462. case d.MESSAGE:
  5463. jspb.asserts.fail("Message field type not supported in writeAny()");
  5464. break;
  5465. case d.BYTES:
  5466. this.writeBytes(b, c);
  5467. break;
  5468. case d.UINT32:
  5469. this.writeUint32(b, c);
  5470. break;
  5471. case d.ENUM:
  5472. this.writeEnum(b, c);
  5473. break;
  5474. case d.SFIXED32:
  5475. this.writeSfixed32(b, c);
  5476. break;
  5477. case d.SFIXED64:
  5478. this.writeSfixed64(b, c);
  5479. break;
  5480. case d.SINT32:
  5481. this.writeSint32(b, c);
  5482. break;
  5483. case d.SINT64:
  5484. this.writeSint64(b, c);
  5485. break;
  5486. case d.FHASH64:
  5487. this.writeFixedHash64(b, c);
  5488. break;
  5489. case d.VHASH64:
  5490. this.writeVarintHash64(b, c);
  5491. break;
  5492. default:
  5493. jspb.asserts.fail("Invalid field type in writeAny()");
  5494. }
  5495. };
  5496. jspb.BinaryWriter.prototype.writeUnsignedVarint32_ = function (a, b) {
  5497. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeUnsignedVarint32(b));
  5498. };
  5499. jspb.BinaryWriter.prototype.writeSignedVarint32_ = function (a, b) {
  5500. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSignedVarint32(b));
  5501. };
  5502. jspb.BinaryWriter.prototype.writeUnsignedVarint64_ = function (a, b) {
  5503. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeUnsignedVarint64(b));
  5504. };
  5505. jspb.BinaryWriter.prototype.writeSignedVarint64_ = function (a, b) {
  5506. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSignedVarint64(b));
  5507. };
  5508. jspb.BinaryWriter.prototype.writeZigzagVarint32_ = function (a, b) {
  5509. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeZigzagVarint32(b));
  5510. };
  5511. jspb.BinaryWriter.prototype.writeZigzagVarint64_ = function (a, b) {
  5512. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeZigzagVarint64(b));
  5513. };
  5514. jspb.BinaryWriter.prototype.writeZigzagVarint64String_ = function (a, b) {
  5515. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeZigzagVarint64String(b));
  5516. };
  5517. jspb.BinaryWriter.prototype.writeZigzagVarintHash64_ = function (a, b) {
  5518. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeZigzagVarintHash64(b));
  5519. };
  5520. jspb.BinaryWriter.prototype.writeInt32 = function (a, b) {
  5521. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31), this.writeSignedVarint32_(a, b));
  5522. };
  5523. goog.exportProperty(jspb.BinaryWriter.prototype, "writeInt32", jspb.BinaryWriter.prototype.writeInt32);
  5524. jspb.BinaryWriter.prototype.writeInt32String = function (a, b) {
  5525. null != b && (b = parseInt(b, 10), jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31), this.writeSignedVarint32_(a, b));
  5526. };
  5527. jspb.BinaryWriter.prototype.writeInt64 = function (a, b) {
  5528. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_63 && b < jspb.BinaryConstants.TWO_TO_63), this.writeSignedVarint64_(a, b));
  5529. };
  5530. goog.exportProperty(jspb.BinaryWriter.prototype, "writeInt64", jspb.BinaryWriter.prototype.writeInt64);
  5531. jspb.BinaryWriter.prototype.writeInt64String = function (a, b) {
  5532. null != b && (b = jspb.arith.Int64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSplitVarint64(b.lo, b.hi));
  5533. };
  5534. jspb.BinaryWriter.prototype.writeUint32 = function (a, b) {
  5535. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32), this.writeUnsignedVarint32_(a, b));
  5536. };
  5537. goog.exportProperty(jspb.BinaryWriter.prototype, "writeUint32", jspb.BinaryWriter.prototype.writeUint32);
  5538. jspb.BinaryWriter.prototype.writeUint32String = function (a, b) {
  5539. null != b && (b = parseInt(b, 10), jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32), this.writeUnsignedVarint32_(a, b));
  5540. };
  5541. jspb.BinaryWriter.prototype.writeUint64 = function (a, b) {
  5542. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_64), this.writeUnsignedVarint64_(a, b));
  5543. };
  5544. goog.exportProperty(jspb.BinaryWriter.prototype, "writeUint64", jspb.BinaryWriter.prototype.writeUint64);
  5545. jspb.BinaryWriter.prototype.writeUint64String = function (a, b) {
  5546. null != b && (b = jspb.arith.UInt64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSplitVarint64(b.lo, b.hi));
  5547. };
  5548. jspb.BinaryWriter.prototype.writeSint32 = function (a, b) {
  5549. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31), this.writeZigzagVarint32_(a, b));
  5550. };
  5551. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSint32", jspb.BinaryWriter.prototype.writeSint32);
  5552. jspb.BinaryWriter.prototype.writeSint64 = function (a, b) {
  5553. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_63 && b < jspb.BinaryConstants.TWO_TO_63), this.writeZigzagVarint64_(a, b));
  5554. };
  5555. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSint64", jspb.BinaryWriter.prototype.writeSint64);
  5556. jspb.BinaryWriter.prototype.writeSintHash64 = function (a, b) {
  5557. null != b && this.writeZigzagVarintHash64_(a, b);
  5558. };
  5559. jspb.BinaryWriter.prototype.writeSint64String = function (a, b) {
  5560. null != b && this.writeZigzagVarint64String_(a, b);
  5561. };
  5562. jspb.BinaryWriter.prototype.writeFixed32 = function (a, b) {
  5563. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_32), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED32), this.encoder_.writeUint32(b));
  5564. };
  5565. goog.exportProperty(jspb.BinaryWriter.prototype, "writeFixed32", jspb.BinaryWriter.prototype.writeFixed32);
  5566. jspb.BinaryWriter.prototype.writeFixed64 = function (a, b) {
  5567. null != b && (jspb.asserts.assert(0 <= b && b < jspb.BinaryConstants.TWO_TO_64), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeUint64(b));
  5568. };
  5569. goog.exportProperty(jspb.BinaryWriter.prototype, "writeFixed64", jspb.BinaryWriter.prototype.writeFixed64);
  5570. jspb.BinaryWriter.prototype.writeFixed64String = function (a, b) {
  5571. null != b && (b = jspb.arith.UInt64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeSplitFixed64(b.lo, b.hi));
  5572. };
  5573. jspb.BinaryWriter.prototype.writeSfixed32 = function (a, b) {
  5574. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED32), this.encoder_.writeInt32(b));
  5575. };
  5576. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSfixed32", jspb.BinaryWriter.prototype.writeSfixed32);
  5577. jspb.BinaryWriter.prototype.writeSfixed64 = function (a, b) {
  5578. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_63 && b < jspb.BinaryConstants.TWO_TO_63), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeInt64(b));
  5579. };
  5580. goog.exportProperty(jspb.BinaryWriter.prototype, "writeSfixed64", jspb.BinaryWriter.prototype.writeSfixed64);
  5581. jspb.BinaryWriter.prototype.writeSfixed64String = function (a, b) {
  5582. null != b && (b = jspb.arith.Int64.fromString(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeSplitFixed64(b.lo, b.hi));
  5583. };
  5584. jspb.BinaryWriter.prototype.writeFloat = function (a, b) {
  5585. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED32), this.encoder_.writeFloat(b));
  5586. };
  5587. goog.exportProperty(jspb.BinaryWriter.prototype, "writeFloat", jspb.BinaryWriter.prototype.writeFloat);
  5588. jspb.BinaryWriter.prototype.writeDouble = function (a, b) {
  5589. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeDouble(b));
  5590. };
  5591. goog.exportProperty(jspb.BinaryWriter.prototype, "writeDouble", jspb.BinaryWriter.prototype.writeDouble);
  5592. jspb.BinaryWriter.prototype.writeBool = function (a, b) {
  5593. null != b && (jspb.asserts.assert("boolean" === typeof b || "number" === typeof b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeBool(b));
  5594. };
  5595. goog.exportProperty(jspb.BinaryWriter.prototype, "writeBool", jspb.BinaryWriter.prototype.writeBool);
  5596. jspb.BinaryWriter.prototype.writeEnum = function (a, b) {
  5597. null != b && (jspb.asserts.assert(b >= -jspb.BinaryConstants.TWO_TO_31 && b < jspb.BinaryConstants.TWO_TO_31), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSignedVarint32(b));
  5598. };
  5599. goog.exportProperty(jspb.BinaryWriter.prototype, "writeEnum", jspb.BinaryWriter.prototype.writeEnum);
  5600. jspb.BinaryWriter.prototype.writeString = function (a, b) {
  5601. null != b && (a = this.beginDelimited_(a), this.encoder_.writeString(b), this.endDelimited_(a));
  5602. };
  5603. goog.exportProperty(jspb.BinaryWriter.prototype, "writeString", jspb.BinaryWriter.prototype.writeString);
  5604. jspb.BinaryWriter.prototype.writeBytes = function (a, b) {
  5605. null != b && (b = jspb.utils.byteSourceToUint8Array(b), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(b.length), this.appendUint8Array_(b));
  5606. };
  5607. goog.exportProperty(jspb.BinaryWriter.prototype, "writeBytes", jspb.BinaryWriter.prototype.writeBytes);
  5608. jspb.BinaryWriter.prototype.writeMessage = function (a, b, c) {
  5609. null != b && (a = this.beginDelimited_(a), c(b, this), this.endDelimited_(a));
  5610. };
  5611. goog.exportProperty(jspb.BinaryWriter.prototype, "writeMessage", jspb.BinaryWriter.prototype.writeMessage);
  5612. jspb.BinaryWriter.prototype.writeMessageSet = function (a, b, c) {
  5613. null != b && (this.writeFieldHeader_(1, jspb.BinaryConstants.WireType.START_GROUP), this.writeFieldHeader_(2, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeSignedVarint32(a), a = this.beginDelimited_(3), c(b, this), this.endDelimited_(a), this.writeFieldHeader_(1, jspb.BinaryConstants.WireType.END_GROUP));
  5614. };
  5615. jspb.BinaryWriter.prototype.writeGroup = function (a, b, c) {
  5616. null != b && (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.START_GROUP), c(b, this), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.END_GROUP));
  5617. };
  5618. goog.exportProperty(jspb.BinaryWriter.prototype, "writeGroup", jspb.BinaryWriter.prototype.writeGroup);
  5619. jspb.BinaryWriter.prototype.writeFixedHash64 = function (a, b) {
  5620. null != b && (jspb.asserts.assert(8 == b.length), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64), this.encoder_.writeFixedHash64(b));
  5621. };
  5622. jspb.BinaryWriter.prototype.writeVarintHash64 = function (a, b) {
  5623. null != b && (jspb.asserts.assert(8 == b.length), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT), this.encoder_.writeVarintHash64(b));
  5624. };
  5625. jspb.BinaryWriter.prototype.writeSplitFixed64 = function (a, b, c) {
  5626. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.FIXED64);
  5627. this.encoder_.writeSplitFixed64(b, c);
  5628. };
  5629. jspb.BinaryWriter.prototype.writeSplitVarint64 = function (a, b, c) {
  5630. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT);
  5631. this.encoder_.writeSplitVarint64(b, c);
  5632. };
  5633. jspb.BinaryWriter.prototype.writeSplitZigzagVarint64 = function (a, b, c) {
  5634. this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.VARINT);
  5635. var d = this.encoder_;
  5636. jspb.utils.toZigzag64(b, c, function (a, b) {
  5637. d.writeSplitVarint64(a >>> 0, b >>> 0);
  5638. });
  5639. };
  5640. jspb.BinaryWriter.prototype.writeRepeatedInt32 = function (a, b) {
  5641. if (null != b) for (var c = 0; c < b.length; c++) this.writeSignedVarint32_(a, b[c]);
  5642. };
  5643. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedInt32", jspb.BinaryWriter.prototype.writeRepeatedInt32);
  5644. jspb.BinaryWriter.prototype.writeRepeatedInt32String = function (a, b) {
  5645. if (null != b) for (var c = 0; c < b.length; c++) this.writeInt32String(a, b[c]);
  5646. };
  5647. jspb.BinaryWriter.prototype.writeRepeatedInt64 = function (a, b) {
  5648. if (null != b) for (var c = 0; c < b.length; c++) this.writeSignedVarint64_(a, b[c]);
  5649. };
  5650. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedInt64", jspb.BinaryWriter.prototype.writeRepeatedInt64);
  5651. jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64 = function (a, b, c, d) {
  5652. if (null != b) for (var e = 0; e < b.length; e++) this.writeSplitFixed64(a, c(b[e]), d(b[e]));
  5653. };
  5654. jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64 = function (a, b, c, d) {
  5655. if (null != b) for (var e = 0; e < b.length; e++) this.writeSplitVarint64(a, c(b[e]), d(b[e]));
  5656. };
  5657. jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64 = function (a, b, c, d) {
  5658. if (null != b) for (var e = 0; e < b.length; e++) this.writeSplitZigzagVarint64(a, c(b[e]), d(b[e]));
  5659. };
  5660. jspb.BinaryWriter.prototype.writeRepeatedInt64String = function (a, b) {
  5661. if (null != b) for (var c = 0; c < b.length; c++) this.writeInt64String(a, b[c]);
  5662. };
  5663. jspb.BinaryWriter.prototype.writeRepeatedUint32 = function (a, b) {
  5664. if (null != b) for (var c = 0; c < b.length; c++) this.writeUnsignedVarint32_(a, b[c]);
  5665. };
  5666. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedUint32", jspb.BinaryWriter.prototype.writeRepeatedUint32);
  5667. jspb.BinaryWriter.prototype.writeRepeatedUint32String = function (a, b) {
  5668. if (null != b) for (var c = 0; c < b.length; c++) this.writeUint32String(a, b[c]);
  5669. };
  5670. jspb.BinaryWriter.prototype.writeRepeatedUint64 = function (a, b) {
  5671. if (null != b) for (var c = 0; c < b.length; c++) this.writeUnsignedVarint64_(a, b[c]);
  5672. };
  5673. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedUint64", jspb.BinaryWriter.prototype.writeRepeatedUint64);
  5674. jspb.BinaryWriter.prototype.writeRepeatedUint64String = function (a, b) {
  5675. if (null != b) for (var c = 0; c < b.length; c++) this.writeUint64String(a, b[c]);
  5676. };
  5677. jspb.BinaryWriter.prototype.writeRepeatedSint32 = function (a, b) {
  5678. if (null != b) for (var c = 0; c < b.length; c++) this.writeZigzagVarint32_(a, b[c]);
  5679. };
  5680. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSint32", jspb.BinaryWriter.prototype.writeRepeatedSint32);
  5681. jspb.BinaryWriter.prototype.writeRepeatedSint64 = function (a, b) {
  5682. if (null != b) for (var c = 0; c < b.length; c++) this.writeZigzagVarint64_(a, b[c]);
  5683. };
  5684. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSint64", jspb.BinaryWriter.prototype.writeRepeatedSint64);
  5685. jspb.BinaryWriter.prototype.writeRepeatedSint64String = function (a, b) {
  5686. if (null != b) for (var c = 0; c < b.length; c++) this.writeZigzagVarint64String_(a, b[c]);
  5687. };
  5688. jspb.BinaryWriter.prototype.writeRepeatedSintHash64 = function (a, b) {
  5689. if (null != b) for (var c = 0; c < b.length; c++) this.writeZigzagVarintHash64_(a, b[c]);
  5690. };
  5691. jspb.BinaryWriter.prototype.writeRepeatedFixed32 = function (a, b) {
  5692. if (null != b) for (var c = 0; c < b.length; c++) this.writeFixed32(a, b[c]);
  5693. };
  5694. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFixed32", jspb.BinaryWriter.prototype.writeRepeatedFixed32);
  5695. jspb.BinaryWriter.prototype.writeRepeatedFixed64 = function (a, b) {
  5696. if (null != b) for (var c = 0; c < b.length; c++) this.writeFixed64(a, b[c]);
  5697. };
  5698. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFixed64", jspb.BinaryWriter.prototype.writeRepeatedFixed64);
  5699. jspb.BinaryWriter.prototype.writeRepeatedFixed64String = function (a, b) {
  5700. if (null != b) for (var c = 0; c < b.length; c++) this.writeFixed64String(a, b[c]);
  5701. };
  5702. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFixed64String", jspb.BinaryWriter.prototype.writeRepeatedFixed64String);
  5703. jspb.BinaryWriter.prototype.writeRepeatedSfixed32 = function (a, b) {
  5704. if (null != b) for (var c = 0; c < b.length; c++) this.writeSfixed32(a, b[c]);
  5705. };
  5706. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSfixed32", jspb.BinaryWriter.prototype.writeRepeatedSfixed32);
  5707. jspb.BinaryWriter.prototype.writeRepeatedSfixed64 = function (a, b) {
  5708. if (null != b) for (var c = 0; c < b.length; c++) this.writeSfixed64(a, b[c]);
  5709. };
  5710. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedSfixed64", jspb.BinaryWriter.prototype.writeRepeatedSfixed64);
  5711. jspb.BinaryWriter.prototype.writeRepeatedSfixed64String = function (a, b) {
  5712. if (null != b) for (var c = 0; c < b.length; c++) this.writeSfixed64String(a, b[c]);
  5713. };
  5714. jspb.BinaryWriter.prototype.writeRepeatedFloat = function (a, b) {
  5715. if (null != b) for (var c = 0; c < b.length; c++) this.writeFloat(a, b[c]);
  5716. };
  5717. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedFloat", jspb.BinaryWriter.prototype.writeRepeatedFloat);
  5718. jspb.BinaryWriter.prototype.writeRepeatedDouble = function (a, b) {
  5719. if (null != b) for (var c = 0; c < b.length; c++) this.writeDouble(a, b[c]);
  5720. };
  5721. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedDouble", jspb.BinaryWriter.prototype.writeRepeatedDouble);
  5722. jspb.BinaryWriter.prototype.writeRepeatedBool = function (a, b) {
  5723. if (null != b) for (var c = 0; c < b.length; c++) this.writeBool(a, b[c]);
  5724. };
  5725. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedBool", jspb.BinaryWriter.prototype.writeRepeatedBool);
  5726. jspb.BinaryWriter.prototype.writeRepeatedEnum = function (a, b) {
  5727. if (null != b) for (var c = 0; c < b.length; c++) this.writeEnum(a, b[c]);
  5728. };
  5729. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedEnum", jspb.BinaryWriter.prototype.writeRepeatedEnum);
  5730. jspb.BinaryWriter.prototype.writeRepeatedString = function (a, b) {
  5731. if (null != b) for (var c = 0; c < b.length; c++) this.writeString(a, b[c]);
  5732. };
  5733. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedString", jspb.BinaryWriter.prototype.writeRepeatedString);
  5734. jspb.BinaryWriter.prototype.writeRepeatedBytes = function (a, b) {
  5735. if (null != b) for (var c = 0; c < b.length; c++) this.writeBytes(a, b[c]);
  5736. };
  5737. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedBytes", jspb.BinaryWriter.prototype.writeRepeatedBytes);
  5738. jspb.BinaryWriter.prototype.writeRepeatedMessage = function (a, b, c) {
  5739. if (null != b) for (var d = 0; d < b.length; d++) {
  5740. var e = this.beginDelimited_(a);
  5741. c(b[d], this);
  5742. this.endDelimited_(e);
  5743. }
  5744. };
  5745. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedMessage", jspb.BinaryWriter.prototype.writeRepeatedMessage);
  5746. jspb.BinaryWriter.prototype.writeRepeatedGroup = function (a, b, c) {
  5747. if (null != b) for (var d = 0; d < b.length; d++) this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.START_GROUP), c(b[d], this), this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.END_GROUP);
  5748. };
  5749. goog.exportProperty(jspb.BinaryWriter.prototype, "writeRepeatedGroup", jspb.BinaryWriter.prototype.writeRepeatedGroup);
  5750. jspb.BinaryWriter.prototype.writeRepeatedFixedHash64 = function (a, b) {
  5751. if (null != b) for (var c = 0; c < b.length; c++) this.writeFixedHash64(a, b[c]);
  5752. };
  5753. jspb.BinaryWriter.prototype.writeRepeatedVarintHash64 = function (a, b) {
  5754. if (null != b) for (var c = 0; c < b.length; c++) this.writeVarintHash64(a, b[c]);
  5755. };
  5756. jspb.BinaryWriter.prototype.writePackedInt32 = function (a, b) {
  5757. if (null != b && b.length) {
  5758. a = this.beginDelimited_(a);
  5759. for (var c = 0; c < b.length; c++) this.encoder_.writeSignedVarint32(b[c]);
  5760. this.endDelimited_(a);
  5761. }
  5762. };
  5763. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedInt32", jspb.BinaryWriter.prototype.writePackedInt32);
  5764. jspb.BinaryWriter.prototype.writePackedInt32String = function (a, b) {
  5765. if (null != b && b.length) {
  5766. a = this.beginDelimited_(a);
  5767. for (var c = 0; c < b.length; c++) this.encoder_.writeSignedVarint32(parseInt(b[c], 10));
  5768. this.endDelimited_(a);
  5769. }
  5770. };
  5771. jspb.BinaryWriter.prototype.writePackedInt64 = function (a, b) {
  5772. if (null != b && b.length) {
  5773. a = this.beginDelimited_(a);
  5774. for (var c = 0; c < b.length; c++) this.encoder_.writeSignedVarint64(b[c]);
  5775. this.endDelimited_(a);
  5776. }
  5777. };
  5778. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedInt64", jspb.BinaryWriter.prototype.writePackedInt64);
  5779. jspb.BinaryWriter.prototype.writePackedSplitFixed64 = function (a, b, c, d) {
  5780. if (null != b) {
  5781. a = this.beginDelimited_(a);
  5782. for (var e = 0; e < b.length; e++) this.encoder_.writeSplitFixed64(c(b[e]), d(b[e]));
  5783. this.endDelimited_(a);
  5784. }
  5785. };
  5786. jspb.BinaryWriter.prototype.writePackedSplitVarint64 = function (a, b, c, d) {
  5787. if (null != b) {
  5788. a = this.beginDelimited_(a);
  5789. for (var e = 0; e < b.length; e++) this.encoder_.writeSplitVarint64(c(b[e]), d(b[e]));
  5790. this.endDelimited_(a);
  5791. }
  5792. };
  5793. jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64 = function (a, b, c, d) {
  5794. if (null != b) {
  5795. a = this.beginDelimited_(a);
  5796. for (var e = this.encoder_, f = 0; f < b.length; f++) jspb.utils.toZigzag64(c(b[f]), d(b[f]), function (a, b) {
  5797. e.writeSplitVarint64(a >>> 0, b >>> 0);
  5798. });
  5799. this.endDelimited_(a);
  5800. }
  5801. };
  5802. jspb.BinaryWriter.prototype.writePackedInt64String = function (a, b) {
  5803. if (null != b && b.length) {
  5804. a = this.beginDelimited_(a);
  5805. for (var c = 0; c < b.length; c++) {
  5806. var d = jspb.arith.Int64.fromString(b[c]);
  5807. this.encoder_.writeSplitVarint64(d.lo, d.hi);
  5808. }
  5809. this.endDelimited_(a);
  5810. }
  5811. };
  5812. jspb.BinaryWriter.prototype.writePackedUint32 = function (a, b) {
  5813. if (null != b && b.length) {
  5814. a = this.beginDelimited_(a);
  5815. for (var c = 0; c < b.length; c++) this.encoder_.writeUnsignedVarint32(b[c]);
  5816. this.endDelimited_(a);
  5817. }
  5818. };
  5819. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedUint32", jspb.BinaryWriter.prototype.writePackedUint32);
  5820. jspb.BinaryWriter.prototype.writePackedUint32String = function (a, b) {
  5821. if (null != b && b.length) {
  5822. a = this.beginDelimited_(a);
  5823. for (var c = 0; c < b.length; c++) this.encoder_.writeUnsignedVarint32(parseInt(b[c], 10));
  5824. this.endDelimited_(a);
  5825. }
  5826. };
  5827. jspb.BinaryWriter.prototype.writePackedUint64 = function (a, b) {
  5828. if (null != b && b.length) {
  5829. a = this.beginDelimited_(a);
  5830. for (var c = 0; c < b.length; c++) this.encoder_.writeUnsignedVarint64(b[c]);
  5831. this.endDelimited_(a);
  5832. }
  5833. };
  5834. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedUint64", jspb.BinaryWriter.prototype.writePackedUint64);
  5835. jspb.BinaryWriter.prototype.writePackedUint64String = function (a, b) {
  5836. if (null != b && b.length) {
  5837. a = this.beginDelimited_(a);
  5838. for (var c = 0; c < b.length; c++) {
  5839. var d = jspb.arith.UInt64.fromString(b[c]);
  5840. this.encoder_.writeSplitVarint64(d.lo, d.hi);
  5841. }
  5842. this.endDelimited_(a);
  5843. }
  5844. };
  5845. jspb.BinaryWriter.prototype.writePackedSint32 = function (a, b) {
  5846. if (null != b && b.length) {
  5847. a = this.beginDelimited_(a);
  5848. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarint32(b[c]);
  5849. this.endDelimited_(a);
  5850. }
  5851. };
  5852. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSint32", jspb.BinaryWriter.prototype.writePackedSint32);
  5853. jspb.BinaryWriter.prototype.writePackedSint64 = function (a, b) {
  5854. if (null != b && b.length) {
  5855. a = this.beginDelimited_(a);
  5856. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarint64(b[c]);
  5857. this.endDelimited_(a);
  5858. }
  5859. };
  5860. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSint64", jspb.BinaryWriter.prototype.writePackedSint64);
  5861. jspb.BinaryWriter.prototype.writePackedSint64String = function (a, b) {
  5862. if (null != b && b.length) {
  5863. a = this.beginDelimited_(a);
  5864. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(b[c]));
  5865. this.endDelimited_(a);
  5866. }
  5867. };
  5868. jspb.BinaryWriter.prototype.writePackedSintHash64 = function (a, b) {
  5869. if (null != b && b.length) {
  5870. a = this.beginDelimited_(a);
  5871. for (var c = 0; c < b.length; c++) this.encoder_.writeZigzagVarintHash64(b[c]);
  5872. this.endDelimited_(a);
  5873. }
  5874. };
  5875. jspb.BinaryWriter.prototype.writePackedFixed32 = function (a, b) {
  5876. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(4 * b.length), a = 0; a < b.length; a++) this.encoder_.writeUint32(b[a]);
  5877. };
  5878. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedFixed32", jspb.BinaryWriter.prototype.writePackedFixed32);
  5879. jspb.BinaryWriter.prototype.writePackedFixed64 = function (a, b) {
  5880. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeUint64(b[a]);
  5881. };
  5882. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedFixed64", jspb.BinaryWriter.prototype.writePackedFixed64);
  5883. jspb.BinaryWriter.prototype.writePackedFixed64String = function (a, b) {
  5884. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) {
  5885. var c = jspb.arith.UInt64.fromString(b[a]);
  5886. this.encoder_.writeSplitFixed64(c.lo, c.hi);
  5887. }
  5888. };
  5889. jspb.BinaryWriter.prototype.writePackedSfixed32 = function (a, b) {
  5890. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(4 * b.length), a = 0; a < b.length; a++) this.encoder_.writeInt32(b[a]);
  5891. };
  5892. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSfixed32", jspb.BinaryWriter.prototype.writePackedSfixed32);
  5893. jspb.BinaryWriter.prototype.writePackedSfixed64 = function (a, b) {
  5894. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeInt64(b[a]);
  5895. };
  5896. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedSfixed64", jspb.BinaryWriter.prototype.writePackedSfixed64);
  5897. jspb.BinaryWriter.prototype.writePackedSfixed64String = function (a, b) {
  5898. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeInt64String(b[a]);
  5899. };
  5900. jspb.BinaryWriter.prototype.writePackedFloat = function (a, b) {
  5901. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(4 * b.length), a = 0; a < b.length; a++) this.encoder_.writeFloat(b[a]);
  5902. };
  5903. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedFloat", jspb.BinaryWriter.prototype.writePackedFloat);
  5904. jspb.BinaryWriter.prototype.writePackedDouble = function (a, b) {
  5905. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeDouble(b[a]);
  5906. };
  5907. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedDouble", jspb.BinaryWriter.prototype.writePackedDouble);
  5908. jspb.BinaryWriter.prototype.writePackedBool = function (a, b) {
  5909. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(b.length), a = 0; a < b.length; a++) this.encoder_.writeBool(b[a]);
  5910. };
  5911. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedBool", jspb.BinaryWriter.prototype.writePackedBool);
  5912. jspb.BinaryWriter.prototype.writePackedEnum = function (a, b) {
  5913. if (null != b && b.length) {
  5914. a = this.beginDelimited_(a);
  5915. for (var c = 0; c < b.length; c++) this.encoder_.writeEnum(b[c]);
  5916. this.endDelimited_(a);
  5917. }
  5918. };
  5919. goog.exportProperty(jspb.BinaryWriter.prototype, "writePackedEnum", jspb.BinaryWriter.prototype.writePackedEnum);
  5920. jspb.BinaryWriter.prototype.writePackedFixedHash64 = function (a, b) {
  5921. if (null != b && b.length) for (this.writeFieldHeader_(a, jspb.BinaryConstants.WireType.DELIMITED), this.encoder_.writeUnsignedVarint32(8 * b.length), a = 0; a < b.length; a++) this.encoder_.writeFixedHash64(b[a]);
  5922. };
  5923. jspb.BinaryWriter.prototype.writePackedVarintHash64 = function (a, b) {
  5924. if (null != b && b.length) {
  5925. a = this.beginDelimited_(a);
  5926. for (var c = 0; c < b.length; c++) this.encoder_.writeVarintHash64(b[c]);
  5927. this.endDelimited_(a);
  5928. }
  5929. };
  5930. jspb.Map = function (a, b) {
  5931. this.arr_ = a;
  5932. this.valueCtor_ = b;
  5933. this.map_ = {};
  5934. this.arrClean = !0;
  5935. 0 < this.arr_.length && this.loadFromArray_();
  5936. };
  5937. goog.exportSymbol("jspb.Map", jspb.Map);
  5938. jspb.Map.prototype.loadFromArray_ = function () {
  5939. for (var a = 0; a < this.arr_.length; a++) {
  5940. var b = this.arr_[a], c = b[0];
  5941. this.map_[c.toString()] = new jspb.Map.Entry_(c, b[1]);
  5942. }
  5943. this.arrClean = !0;
  5944. };
  5945. jspb.Map.prototype.toArray = function () {
  5946. if (this.arrClean) {
  5947. if (this.valueCtor_) {
  5948. var a = this.map_, b;
  5949. for (b in a) if (Object.prototype.hasOwnProperty.call(a, b)) {
  5950. var c = a[b].valueWrapper;
  5951. c && c.toArray();
  5952. }
  5953. }
  5954. } else {
  5955. this.arr_.length = 0;
  5956. a = this.stringKeys_();
  5957. a.sort();
  5958. for (b = 0; b < a.length; b++) {
  5959. var d = this.map_[a[b]];
  5960. (c = d.valueWrapper) && c.toArray();
  5961. this.arr_.push([d.key, d.value]);
  5962. }
  5963. this.arrClean = !0;
  5964. }
  5965. return this.arr_
  5966. };
  5967. goog.exportProperty(jspb.Map.prototype, "toArray", jspb.Map.prototype.toArray);
  5968. jspb.Map.prototype.toObject = function (a, b) {
  5969. for (var c = this.toArray(), d = [], e = 0; e < c.length; e++) {
  5970. var f = this.map_[c[e][0].toString()];
  5971. this.wrapEntry_(f);
  5972. var g = f.valueWrapper;
  5973. g ? (jspb.asserts.assert(b), d.push([f.key, b(a, g)])) : d.push([f.key, f.value]);
  5974. }
  5975. return d
  5976. };
  5977. goog.exportProperty(jspb.Map.prototype, "toObject", jspb.Map.prototype.toObject);
  5978. jspb.Map.fromObject = function (a, b, c) {
  5979. b = new jspb.Map([], b);
  5980. for (var d = 0; d < a.length; d++) {
  5981. var e = a[d][0], f = c(a[d][1]);
  5982. b.set(e, f);
  5983. }
  5984. return b
  5985. };
  5986. goog.exportProperty(jspb.Map, "fromObject", jspb.Map.fromObject);
  5987. jspb.Map.ArrayIteratorIterable_ = function (a) {
  5988. this.idx_ = 0;
  5989. this.arr_ = a;
  5990. };
  5991. jspb.Map.ArrayIteratorIterable_.prototype.next = function () {
  5992. return this.idx_ < this.arr_.length ? {done: !1, value: this.arr_[this.idx_++]} : {done: !0, value: void 0}
  5993. };
  5994. "undefined" != typeof Symbol && (jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator] = function () {
  5995. return this
  5996. });
  5997. jspb.Map.prototype.getLength = function () {
  5998. return this.stringKeys_().length
  5999. };
  6000. goog.exportProperty(jspb.Map.prototype, "getLength", jspb.Map.prototype.getLength);
  6001. jspb.Map.prototype.clear = function () {
  6002. this.map_ = {};
  6003. this.arrClean = !1;
  6004. };
  6005. goog.exportProperty(jspb.Map.prototype, "clear", jspb.Map.prototype.clear);
  6006. jspb.Map.prototype.del = function (a) {
  6007. a = a.toString();
  6008. var b = this.map_.hasOwnProperty(a);
  6009. delete this.map_[a];
  6010. this.arrClean = !1;
  6011. return b
  6012. };
  6013. goog.exportProperty(jspb.Map.prototype, "del", jspb.Map.prototype.del);
  6014. jspb.Map.prototype.getEntryList = function () {
  6015. var a = [], b = this.stringKeys_();
  6016. b.sort();
  6017. for (var c = 0; c < b.length; c++) {
  6018. var d = this.map_[b[c]];
  6019. a.push([d.key, d.value]);
  6020. }
  6021. return a
  6022. };
  6023. goog.exportProperty(jspb.Map.prototype, "getEntryList", jspb.Map.prototype.getEntryList);
  6024. jspb.Map.prototype.entries = function () {
  6025. var a = [], b = this.stringKeys_();
  6026. b.sort();
  6027. for (var c = 0; c < b.length; c++) {
  6028. var d = this.map_[b[c]];
  6029. a.push([d.key, this.wrapEntry_(d)]);
  6030. }
  6031. return new jspb.Map.ArrayIteratorIterable_(a)
  6032. };
  6033. goog.exportProperty(jspb.Map.prototype, "entries", jspb.Map.prototype.entries);
  6034. jspb.Map.prototype.keys = function () {
  6035. var a = [], b = this.stringKeys_();
  6036. b.sort();
  6037. for (var c = 0; c < b.length; c++) a.push(this.map_[b[c]].key);
  6038. return new jspb.Map.ArrayIteratorIterable_(a)
  6039. };
  6040. goog.exportProperty(jspb.Map.prototype, "keys", jspb.Map.prototype.keys);
  6041. jspb.Map.prototype.values = function () {
  6042. var a = [], b = this.stringKeys_();
  6043. b.sort();
  6044. for (var c = 0; c < b.length; c++) a.push(this.wrapEntry_(this.map_[b[c]]));
  6045. return new jspb.Map.ArrayIteratorIterable_(a)
  6046. };
  6047. goog.exportProperty(jspb.Map.prototype, "values", jspb.Map.prototype.values);
  6048. jspb.Map.prototype.forEach = function (a, b) {
  6049. var c = this.stringKeys_();
  6050. c.sort();
  6051. for (var d = 0; d < c.length; d++) {
  6052. var e = this.map_[c[d]];
  6053. a.call(b, this.wrapEntry_(e), e.key, this);
  6054. }
  6055. };
  6056. goog.exportProperty(jspb.Map.prototype, "forEach", jspb.Map.prototype.forEach);
  6057. jspb.Map.prototype.set = function (a, b) {
  6058. var c = new jspb.Map.Entry_(a);
  6059. this.valueCtor_ ? (c.valueWrapper = b, c.value = b.toArray()) : c.value = b;
  6060. this.map_[a.toString()] = c;
  6061. this.arrClean = !1;
  6062. return this
  6063. };
  6064. goog.exportProperty(jspb.Map.prototype, "set", jspb.Map.prototype.set);
  6065. jspb.Map.prototype.wrapEntry_ = function (a) {
  6066. return this.valueCtor_ ? (a.valueWrapper || (a.valueWrapper = new this.valueCtor_(a.value)), a.valueWrapper) : a.value
  6067. };
  6068. jspb.Map.prototype.get = function (a) {
  6069. if (a = this.map_[a.toString()]) return this.wrapEntry_(a)
  6070. };
  6071. goog.exportProperty(jspb.Map.prototype, "get", jspb.Map.prototype.get);
  6072. jspb.Map.prototype.has = function (a) {
  6073. return a.toString() in this.map_
  6074. };
  6075. goog.exportProperty(jspb.Map.prototype, "has", jspb.Map.prototype.has);
  6076. jspb.Map.prototype.serializeBinary = function (a, b, c, d, e) {
  6077. var f = this.stringKeys_();
  6078. f.sort();
  6079. for (var g = 0; g < f.length; g++) {
  6080. var h = this.map_[f[g]];
  6081. b.beginSubMessage(a);
  6082. c.call(b, 1, h.key);
  6083. this.valueCtor_ ? d.call(b, 2, this.wrapEntry_(h), e) : d.call(b, 2, h.value);
  6084. b.endSubMessage();
  6085. }
  6086. };
  6087. goog.exportProperty(jspb.Map.prototype, "serializeBinary", jspb.Map.prototype.serializeBinary);
  6088. jspb.Map.deserializeBinary = function (a, b, c, d, e, f, g) {
  6089. for (; b.nextField() && !b.isEndGroup();) {
  6090. var h = b.getFieldNumber();
  6091. 1 == h ? f = c.call(b) : 2 == h && (a.valueCtor_ ? (jspb.asserts.assert(e), g || (g = new a.valueCtor_), d.call(b, g, e)) : g = d.call(b));
  6092. }
  6093. jspb.asserts.assert(void 0 != f);
  6094. jspb.asserts.assert(void 0 != g);
  6095. a.set(f, g);
  6096. };
  6097. goog.exportProperty(jspb.Map, "deserializeBinary", jspb.Map.deserializeBinary);
  6098. jspb.Map.prototype.stringKeys_ = function () {
  6099. var a = this.map_, b = [], c;
  6100. for (c in a) Object.prototype.hasOwnProperty.call(a, c) && b.push(c);
  6101. return b
  6102. };
  6103. jspb.Map.Entry_ = function (a, b) {
  6104. this.key = a;
  6105. this.value = b;
  6106. this.valueWrapper = void 0;
  6107. };
  6108. jspb.ExtensionFieldInfo = function (a, b, c, d, e) {
  6109. this.fieldIndex = a;
  6110. this.fieldName = b;
  6111. this.ctor = c;
  6112. this.toObjectFn = d;
  6113. this.isRepeated = e;
  6114. };
  6115. goog.exportSymbol("jspb.ExtensionFieldInfo", jspb.ExtensionFieldInfo);
  6116. jspb.ExtensionFieldBinaryInfo = function (a, b, c, d, e, f) {
  6117. this.fieldInfo = a;
  6118. this.binaryReaderFn = b;
  6119. this.binaryWriterFn = c;
  6120. this.binaryMessageSerializeFn = d;
  6121. this.binaryMessageDeserializeFn = e;
  6122. this.isPacked = f;
  6123. };
  6124. goog.exportSymbol("jspb.ExtensionFieldBinaryInfo", jspb.ExtensionFieldBinaryInfo);
  6125. jspb.ExtensionFieldInfo.prototype.isMessageType = function () {
  6126. return !!this.ctor
  6127. };
  6128. goog.exportProperty(jspb.ExtensionFieldInfo.prototype, "isMessageType", jspb.ExtensionFieldInfo.prototype.isMessageType);
  6129. jspb.Message = function () {
  6130. };
  6131. goog.exportSymbol("jspb.Message", jspb.Message);
  6132. jspb.Message.GENERATE_TO_OBJECT = !0;
  6133. goog.exportProperty(jspb.Message, "GENERATE_TO_OBJECT", jspb.Message.GENERATE_TO_OBJECT);
  6134. jspb.Message.GENERATE_FROM_OBJECT = !goog.DISALLOW_TEST_ONLY_CODE;
  6135. goog.exportProperty(jspb.Message, "GENERATE_FROM_OBJECT", jspb.Message.GENERATE_FROM_OBJECT);
  6136. jspb.Message.GENERATE_TO_STRING = !0;
  6137. jspb.Message.ASSUME_LOCAL_ARRAYS = !1;
  6138. jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS = !0;
  6139. jspb.Message.SUPPORTS_UINT8ARRAY_ = "function" == typeof Uint8Array;
  6140. jspb.Message.prototype.getJsPbMessageId = function () {
  6141. return this.messageId_
  6142. };
  6143. goog.exportProperty(jspb.Message.prototype, "getJsPbMessageId", jspb.Message.prototype.getJsPbMessageId);
  6144. jspb.Message.getIndex_ = function (a, b) {
  6145. return b + a.arrayIndexOffset_
  6146. };
  6147. jspb.Message.hiddenES6Property_ = function () {
  6148. };
  6149. jspb.Message.getFieldNumber_ = function (a, b) {
  6150. return b - a.arrayIndexOffset_
  6151. };
  6152. jspb.Message.initialize = function (a, b, c, d, e, f) {
  6153. a.wrappers_ = null;
  6154. b || (b = c ? [c] : []);
  6155. a.messageId_ = c ? String(c) : void 0;
  6156. a.arrayIndexOffset_ = 0 === c ? -1 : 0;
  6157. a.array = b;
  6158. jspb.Message.initPivotAndExtensionObject_(a, d);
  6159. a.convertedPrimitiveFields_ = {};
  6160. jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS || (a.repeatedFields = e);
  6161. if (e) for (b = 0; b < e.length; b++) c = e[b], c < a.pivot_ ? (c = jspb.Message.getIndex_(a, c), a.array[c] = a.array[c] || jspb.Message.EMPTY_LIST_SENTINEL_) : (jspb.Message.maybeInitEmptyExtensionObject_(a), a.extensionObject_[c] =
  6162. a.extensionObject_[c] || jspb.Message.EMPTY_LIST_SENTINEL_);
  6163. if (f && f.length) for (b = 0; b < f.length; b++) jspb.Message.computeOneofCase(a, f[b]);
  6164. };
  6165. goog.exportProperty(jspb.Message, "initialize", jspb.Message.initialize);
  6166. jspb.Message.EMPTY_LIST_SENTINEL_ = goog.DEBUG && Object.freeze ? Object.freeze([]) : [];
  6167. jspb.Message.isArray_ = function (a) {
  6168. return jspb.Message.ASSUME_LOCAL_ARRAYS ? a instanceof Array : Array.isArray(a)
  6169. };
  6170. jspb.Message.isExtensionObject_ = function (a) {
  6171. return null !== a && "object" == typeof a && !jspb.Message.isArray_(a) && !(jspb.Message.SUPPORTS_UINT8ARRAY_ && a instanceof Uint8Array)
  6172. };
  6173. jspb.Message.initPivotAndExtensionObject_ = function (a, b) {
  6174. var c = a.array.length, d = -1;
  6175. if (c && (d = c - 1, c = a.array[d], jspb.Message.isExtensionObject_(c))) {
  6176. a.pivot_ = jspb.Message.getFieldNumber_(a, d);
  6177. a.extensionObject_ = c;
  6178. return
  6179. }
  6180. -1 < b ? (a.pivot_ = Math.max(b, jspb.Message.getFieldNumber_(a, d + 1)), a.extensionObject_ = null) : a.pivot_ = Number.MAX_VALUE;
  6181. };
  6182. jspb.Message.maybeInitEmptyExtensionObject_ = function (a) {
  6183. var b = jspb.Message.getIndex_(a, a.pivot_);
  6184. a.array[b] || (a.extensionObject_ = a.array[b] = {});
  6185. };
  6186. jspb.Message.toObjectList = function (a, b, c) {
  6187. for (var d = [], e = 0; e < a.length; e++) d[e] = b.call(a[e], c, a[e]);
  6188. return d
  6189. };
  6190. goog.exportProperty(jspb.Message, "toObjectList", jspb.Message.toObjectList);
  6191. jspb.Message.toObjectExtension = function (a, b, c, d, e) {
  6192. for (var f in c) {
  6193. var g = c[f], h = d.call(a, g);
  6194. if (null != h) {
  6195. for (var k in g.fieldName) if (g.fieldName.hasOwnProperty(k)) break;
  6196. b[k] = g.toObjectFn ? g.isRepeated ? jspb.Message.toObjectList(h, g.toObjectFn, e) : g.toObjectFn(e, h) : h;
  6197. }
  6198. }
  6199. };
  6200. goog.exportProperty(jspb.Message, "toObjectExtension", jspb.Message.toObjectExtension);
  6201. jspb.Message.serializeBinaryExtensions = function (a, b, c, d) {
  6202. for (var e in c) {
  6203. var f = c[e], g = f.fieldInfo;
  6204. if (!f.binaryWriterFn) throw Error("Message extension present that was generated without binary serialization support");
  6205. var h = d.call(a, g);
  6206. if (null != h) if (g.isMessageType()) if (f.binaryMessageSerializeFn) f.binaryWriterFn.call(b, g.fieldIndex, h, f.binaryMessageSerializeFn); else throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");
  6207. else f.binaryWriterFn.call(b, g.fieldIndex, h);
  6208. }
  6209. };
  6210. goog.exportProperty(jspb.Message, "serializeBinaryExtensions", jspb.Message.serializeBinaryExtensions);
  6211. jspb.Message.readBinaryExtension = function (a, b, c, d, e) {
  6212. var f = c[b.getFieldNumber()];
  6213. if (f) {
  6214. c = f.fieldInfo;
  6215. if (!f.binaryReaderFn) throw Error("Deserializing extension whose generated code does not support binary format");
  6216. if (c.isMessageType()) {
  6217. var g = new c.ctor;
  6218. f.binaryReaderFn.call(b, g, f.binaryMessageDeserializeFn);
  6219. } else g = f.binaryReaderFn.call(b);
  6220. c.isRepeated && !f.isPacked ? (b = d.call(a, c)) ? b.push(g) : e.call(a, c, [g]) : e.call(a, c, g);
  6221. } else b.skipField();
  6222. };
  6223. goog.exportProperty(jspb.Message, "readBinaryExtension", jspb.Message.readBinaryExtension);
  6224. jspb.Message.getField = function (a, b) {
  6225. if (b < a.pivot_) {
  6226. b = jspb.Message.getIndex_(a, b);
  6227. var c = a.array[b];
  6228. return c === jspb.Message.EMPTY_LIST_SENTINEL_ ? a.array[b] = [] : c
  6229. }
  6230. if (a.extensionObject_) return c = a.extensionObject_[b], c === jspb.Message.EMPTY_LIST_SENTINEL_ ? a.extensionObject_[b] = [] : c
  6231. };
  6232. goog.exportProperty(jspb.Message, "getField", jspb.Message.getField);
  6233. jspb.Message.getRepeatedField = function (a, b) {
  6234. return jspb.Message.getField(a, b)
  6235. };
  6236. goog.exportProperty(jspb.Message, "getRepeatedField", jspb.Message.getRepeatedField);
  6237. jspb.Message.getOptionalFloatingPointField = function (a, b) {
  6238. a = jspb.Message.getField(a, b);
  6239. return null == a ? a : +a
  6240. };
  6241. goog.exportProperty(jspb.Message, "getOptionalFloatingPointField", jspb.Message.getOptionalFloatingPointField);
  6242. jspb.Message.getBooleanField = function (a, b) {
  6243. a = jspb.Message.getField(a, b);
  6244. return null == a ? a : !!a
  6245. };
  6246. goog.exportProperty(jspb.Message, "getBooleanField", jspb.Message.getBooleanField);
  6247. jspb.Message.getRepeatedFloatingPointField = function (a, b) {
  6248. var c = jspb.Message.getRepeatedField(a, b);
  6249. a.convertedPrimitiveFields_ || (a.convertedPrimitiveFields_ = {});
  6250. if (!a.convertedPrimitiveFields_[b]) {
  6251. for (var d = 0; d < c.length; d++) c[d] = +c[d];
  6252. a.convertedPrimitiveFields_[b] = !0;
  6253. }
  6254. return c
  6255. };
  6256. goog.exportProperty(jspb.Message, "getRepeatedFloatingPointField", jspb.Message.getRepeatedFloatingPointField);
  6257. jspb.Message.getRepeatedBooleanField = function (a, b) {
  6258. var c = jspb.Message.getRepeatedField(a, b);
  6259. a.convertedPrimitiveFields_ || (a.convertedPrimitiveFields_ = {});
  6260. if (!a.convertedPrimitiveFields_[b]) {
  6261. for (var d = 0; d < c.length; d++) c[d] = !!c[d];
  6262. a.convertedPrimitiveFields_[b] = !0;
  6263. }
  6264. return c
  6265. };
  6266. goog.exportProperty(jspb.Message, "getRepeatedBooleanField", jspb.Message.getRepeatedBooleanField);
  6267. jspb.Message.bytesAsB64 = function (a) {
  6268. if (null == a || "string" === typeof a) return a;
  6269. if (jspb.Message.SUPPORTS_UINT8ARRAY_ && a instanceof Uint8Array) return goog.crypt.base64.encodeByteArray(a);
  6270. jspb.asserts.fail("Cannot coerce to b64 string: " + goog.typeOf(a));
  6271. return null
  6272. };
  6273. goog.exportProperty(jspb.Message, "bytesAsB64", jspb.Message.bytesAsB64);
  6274. jspb.Message.bytesAsU8 = function (a) {
  6275. if (null == a || a instanceof Uint8Array) return a;
  6276. if ("string" === typeof a) return goog.crypt.base64.decodeStringToUint8Array(a);
  6277. jspb.asserts.fail("Cannot coerce to Uint8Array: " + goog.typeOf(a));
  6278. return null
  6279. };
  6280. goog.exportProperty(jspb.Message, "bytesAsU8", jspb.Message.bytesAsU8);
  6281. jspb.Message.bytesListAsB64 = function (a) {
  6282. jspb.Message.assertConsistentTypes_(a);
  6283. return a.length && "string" !== typeof a[0] ? goog.array.map(a, jspb.Message.bytesAsB64) : a
  6284. };
  6285. goog.exportProperty(jspb.Message, "bytesListAsB64", jspb.Message.bytesListAsB64);
  6286. jspb.Message.bytesListAsU8 = function (a) {
  6287. jspb.Message.assertConsistentTypes_(a);
  6288. return !a.length || a[0] instanceof Uint8Array ? a : goog.array.map(a, jspb.Message.bytesAsU8)
  6289. };
  6290. goog.exportProperty(jspb.Message, "bytesListAsU8", jspb.Message.bytesListAsU8);
  6291. jspb.Message.assertConsistentTypes_ = function (a) {
  6292. if (goog.DEBUG && a && 1 < a.length) {
  6293. var b = goog.typeOf(a[0]);
  6294. goog.array.forEach(a, function (a) {
  6295. goog.typeOf(a) != b && jspb.asserts.fail("Inconsistent type in JSPB repeated field array. Got " + goog.typeOf(a) + " expected " + b);
  6296. });
  6297. }
  6298. };
  6299. jspb.Message.getFieldWithDefault = function (a, b, c) {
  6300. a = jspb.Message.getField(a, b);
  6301. return null == a ? c : a
  6302. };
  6303. goog.exportProperty(jspb.Message, "getFieldWithDefault", jspb.Message.getFieldWithDefault);
  6304. jspb.Message.getBooleanFieldWithDefault = function (a, b, c) {
  6305. a = jspb.Message.getBooleanField(a, b);
  6306. return null == a ? c : a
  6307. };
  6308. goog.exportProperty(jspb.Message, "getBooleanFieldWithDefault", jspb.Message.getBooleanFieldWithDefault);
  6309. jspb.Message.getFloatingPointFieldWithDefault = function (a, b, c) {
  6310. a = jspb.Message.getOptionalFloatingPointField(a, b);
  6311. return null == a ? c : a
  6312. };
  6313. goog.exportProperty(jspb.Message, "getFloatingPointFieldWithDefault", jspb.Message.getFloatingPointFieldWithDefault);
  6314. jspb.Message.getFieldProto3 = jspb.Message.getFieldWithDefault;
  6315. goog.exportProperty(jspb.Message, "getFieldProto3", jspb.Message.getFieldProto3);
  6316. jspb.Message.getMapField = function (a, b, c, d) {
  6317. a.wrappers_ || (a.wrappers_ = {});
  6318. if (b in a.wrappers_) return a.wrappers_[b];
  6319. var e = jspb.Message.getField(a, b);
  6320. if (!e) {
  6321. if (c) return;
  6322. e = [];
  6323. jspb.Message.setField(a, b, e);
  6324. }
  6325. return a.wrappers_[b] = new jspb.Map(e, d)
  6326. };
  6327. goog.exportProperty(jspb.Message, "getMapField", jspb.Message.getMapField);
  6328. jspb.Message.setField = function (a, b, c) {
  6329. jspb.asserts.assertInstanceof(a, jspb.Message);
  6330. b < a.pivot_ ? a.array[jspb.Message.getIndex_(a, b)] = c : (jspb.Message.maybeInitEmptyExtensionObject_(a), a.extensionObject_[b] = c);
  6331. return a
  6332. };
  6333. goog.exportProperty(jspb.Message, "setField", jspb.Message.setField);
  6334. jspb.Message.setProto3IntField = function (a, b, c) {
  6335. return jspb.Message.setFieldIgnoringDefault_(a, b, c, 0)
  6336. };
  6337. goog.exportProperty(jspb.Message, "setProto3IntField", jspb.Message.setProto3IntField);
  6338. jspb.Message.setProto3FloatField = function (a, b, c) {
  6339. return jspb.Message.setFieldIgnoringDefault_(a, b, c, 0)
  6340. };
  6341. goog.exportProperty(jspb.Message, "setProto3FloatField", jspb.Message.setProto3FloatField);
  6342. jspb.Message.setProto3BooleanField = function (a, b, c) {
  6343. return jspb.Message.setFieldIgnoringDefault_(a, b, c, !1)
  6344. };
  6345. goog.exportProperty(jspb.Message, "setProto3BooleanField", jspb.Message.setProto3BooleanField);
  6346. jspb.Message.setProto3StringField = function (a, b, c) {
  6347. return jspb.Message.setFieldIgnoringDefault_(a, b, c, "")
  6348. };
  6349. goog.exportProperty(jspb.Message, "setProto3StringField", jspb.Message.setProto3StringField);
  6350. jspb.Message.setProto3BytesField = function (a, b, c) {
  6351. return jspb.Message.setFieldIgnoringDefault_(a, b, c, "")
  6352. };
  6353. goog.exportProperty(jspb.Message, "setProto3BytesField", jspb.Message.setProto3BytesField);
  6354. jspb.Message.setProto3EnumField = function (a, b, c) {
  6355. return jspb.Message.setFieldIgnoringDefault_(a, b, c, 0)
  6356. };
  6357. goog.exportProperty(jspb.Message, "setProto3EnumField", jspb.Message.setProto3EnumField);
  6358. jspb.Message.setProto3StringIntField = function (a, b, c) {
  6359. return jspb.Message.setFieldIgnoringDefault_(a, b, c, "0")
  6360. };
  6361. goog.exportProperty(jspb.Message, "setProto3StringIntField", jspb.Message.setProto3StringIntField);
  6362. jspb.Message.setFieldIgnoringDefault_ = function (a, b, c, d) {
  6363. jspb.asserts.assertInstanceof(a, jspb.Message);
  6364. c !== d ? jspb.Message.setField(a, b, c) : b < a.pivot_ ? a.array[jspb.Message.getIndex_(a, b)] = null : (jspb.Message.maybeInitEmptyExtensionObject_(a), delete a.extensionObject_[b]);
  6365. return a
  6366. };
  6367. jspb.Message.addToRepeatedField = function (a, b, c, d) {
  6368. jspb.asserts.assertInstanceof(a, jspb.Message);
  6369. b = jspb.Message.getRepeatedField(a, b);
  6370. void 0 != d ? b.splice(d, 0, c) : b.push(c);
  6371. return a
  6372. };
  6373. goog.exportProperty(jspb.Message, "addToRepeatedField", jspb.Message.addToRepeatedField);
  6374. jspb.Message.setOneofField = function (a, b, c, d) {
  6375. jspb.asserts.assertInstanceof(a, jspb.Message);
  6376. (c = jspb.Message.computeOneofCase(a, c)) && c !== b && void 0 !== d && (a.wrappers_ && c in a.wrappers_ && (a.wrappers_[c] = void 0), jspb.Message.setField(a, c, void 0));
  6377. return jspb.Message.setField(a, b, d)
  6378. };
  6379. goog.exportProperty(jspb.Message, "setOneofField", jspb.Message.setOneofField);
  6380. jspb.Message.computeOneofCase = function (a, b) {
  6381. for (var c, d, e = 0; e < b.length; e++) {
  6382. var f = b[e], g = jspb.Message.getField(a, f);
  6383. null != g && (c = f, d = g, jspb.Message.setField(a, f, void 0));
  6384. }
  6385. return c ? (jspb.Message.setField(a, c, d), c) : 0
  6386. };
  6387. goog.exportProperty(jspb.Message, "computeOneofCase", jspb.Message.computeOneofCase);
  6388. jspb.Message.getWrapperField = function (a, b, c, d) {
  6389. a.wrappers_ || (a.wrappers_ = {});
  6390. if (!a.wrappers_[c]) {
  6391. var e = jspb.Message.getField(a, c);
  6392. if (d || e) a.wrappers_[c] = new b(e);
  6393. }
  6394. return a.wrappers_[c]
  6395. };
  6396. goog.exportProperty(jspb.Message, "getWrapperField", jspb.Message.getWrapperField);
  6397. jspb.Message.getRepeatedWrapperField = function (a, b, c) {
  6398. jspb.Message.wrapRepeatedField_(a, b, c);
  6399. b = a.wrappers_[c];
  6400. b == jspb.Message.EMPTY_LIST_SENTINEL_ && (b = a.wrappers_[c] = []);
  6401. return b
  6402. };
  6403. goog.exportProperty(jspb.Message, "getRepeatedWrapperField", jspb.Message.getRepeatedWrapperField);
  6404. jspb.Message.wrapRepeatedField_ = function (a, b, c) {
  6405. a.wrappers_ || (a.wrappers_ = {});
  6406. if (!a.wrappers_[c]) {
  6407. for (var d = jspb.Message.getRepeatedField(a, c), e = [], f = 0; f < d.length; f++) e[f] = new b(d[f]);
  6408. a.wrappers_[c] = e;
  6409. }
  6410. };
  6411. jspb.Message.setWrapperField = function (a, b, c) {
  6412. jspb.asserts.assertInstanceof(a, jspb.Message);
  6413. a.wrappers_ || (a.wrappers_ = {});
  6414. var d = c ? c.toArray() : c;
  6415. a.wrappers_[b] = c;
  6416. return jspb.Message.setField(a, b, d)
  6417. };
  6418. goog.exportProperty(jspb.Message, "setWrapperField", jspb.Message.setWrapperField);
  6419. jspb.Message.setOneofWrapperField = function (a, b, c, d) {
  6420. jspb.asserts.assertInstanceof(a, jspb.Message);
  6421. a.wrappers_ || (a.wrappers_ = {});
  6422. var e = d ? d.toArray() : d;
  6423. a.wrappers_[b] = d;
  6424. return jspb.Message.setOneofField(a, b, c, e)
  6425. };
  6426. goog.exportProperty(jspb.Message, "setOneofWrapperField", jspb.Message.setOneofWrapperField);
  6427. jspb.Message.setRepeatedWrapperField = function (a, b, c) {
  6428. jspb.asserts.assertInstanceof(a, jspb.Message);
  6429. a.wrappers_ || (a.wrappers_ = {});
  6430. c = c || [];
  6431. for (var d = [], e = 0; e < c.length; e++) d[e] = c[e].toArray();
  6432. a.wrappers_[b] = c;
  6433. return jspb.Message.setField(a, b, d)
  6434. };
  6435. goog.exportProperty(jspb.Message, "setRepeatedWrapperField", jspb.Message.setRepeatedWrapperField);
  6436. jspb.Message.addToRepeatedWrapperField = function (a, b, c, d, e) {
  6437. jspb.Message.wrapRepeatedField_(a, d, b);
  6438. var f = a.wrappers_[b];
  6439. f || (f = a.wrappers_[b] = []);
  6440. c = c ? c : new d;
  6441. a = jspb.Message.getRepeatedField(a, b);
  6442. void 0 != e ? (f.splice(e, 0, c), a.splice(e, 0, c.toArray())) : (f.push(c), a.push(c.toArray()));
  6443. return c
  6444. };
  6445. goog.exportProperty(jspb.Message, "addToRepeatedWrapperField", jspb.Message.addToRepeatedWrapperField);
  6446. jspb.Message.toMap = function (a, b, c, d) {
  6447. for (var e = {}, f = 0; f < a.length; f++) e[b.call(a[f])] = c ? c.call(a[f], d, a[f]) : a[f];
  6448. return e
  6449. };
  6450. goog.exportProperty(jspb.Message, "toMap", jspb.Message.toMap);
  6451. jspb.Message.prototype.syncMapFields_ = function () {
  6452. if (this.wrappers_) for (var a in this.wrappers_) {
  6453. var b = this.wrappers_[a];
  6454. if (Array.isArray(b)) for (var c = 0; c < b.length; c++) b[c] && b[c].toArray(); else b && b.toArray();
  6455. }
  6456. };
  6457. jspb.Message.prototype.toArray = function () {
  6458. this.syncMapFields_();
  6459. return this.array
  6460. };
  6461. goog.exportProperty(jspb.Message.prototype, "toArray", jspb.Message.prototype.toArray);
  6462. jspb.Message.GENERATE_TO_STRING && (jspb.Message.prototype.toString = function () {
  6463. this.syncMapFields_();
  6464. return this.array.toString()
  6465. });
  6466. jspb.Message.prototype.getExtension = function (a) {
  6467. if (this.extensionObject_) {
  6468. this.wrappers_ || (this.wrappers_ = {});
  6469. var b = a.fieldIndex;
  6470. if (a.isRepeated) {
  6471. if (a.isMessageType()) return this.wrappers_[b] || (this.wrappers_[b] = goog.array.map(this.extensionObject_[b] || [], function (b) {
  6472. return new a.ctor(b)
  6473. })), this.wrappers_[b]
  6474. } else if (a.isMessageType()) return !this.wrappers_[b] && this.extensionObject_[b] && (this.wrappers_[b] = new a.ctor(this.extensionObject_[b])), this.wrappers_[b];
  6475. return this.extensionObject_[b]
  6476. }
  6477. };
  6478. goog.exportProperty(jspb.Message.prototype, "getExtension", jspb.Message.prototype.getExtension);
  6479. jspb.Message.prototype.setExtension = function (a, b) {
  6480. this.wrappers_ || (this.wrappers_ = {});
  6481. jspb.Message.maybeInitEmptyExtensionObject_(this);
  6482. var c = a.fieldIndex;
  6483. a.isRepeated ? (b = b || [], a.isMessageType() ? (this.wrappers_[c] = b, this.extensionObject_[c] = goog.array.map(b, function (a) {
  6484. return a.toArray()
  6485. })) : this.extensionObject_[c] = b) : a.isMessageType() ? (this.wrappers_[c] = b, this.extensionObject_[c] = b ? b.toArray() : b) : this.extensionObject_[c] = b;
  6486. return this
  6487. };
  6488. goog.exportProperty(jspb.Message.prototype, "setExtension", jspb.Message.prototype.setExtension);
  6489. jspb.Message.difference = function (a, b) {
  6490. if (!(a instanceof b.constructor)) throw Error("Messages have different types.");
  6491. var c = a.toArray();
  6492. b = b.toArray();
  6493. var d = [], e = 0, f = c.length > b.length ? c.length : b.length;
  6494. a.getJsPbMessageId() && (d[0] = a.getJsPbMessageId(), e = 1);
  6495. for (; e < f; e++) jspb.Message.compareFields(c[e], b[e]) || (d[e] = b[e]);
  6496. return new a.constructor(d)
  6497. };
  6498. goog.exportProperty(jspb.Message, "difference", jspb.Message.difference);
  6499. jspb.Message.equals = function (a, b) {
  6500. return a == b || !(!a || !b) && a instanceof b.constructor && jspb.Message.compareFields(a.toArray(), b.toArray())
  6501. };
  6502. goog.exportProperty(jspb.Message, "equals", jspb.Message.equals);
  6503. jspb.Message.compareExtensions = function (a, b) {
  6504. a = a || {};
  6505. b = b || {};
  6506. var c = {}, d;
  6507. for (d in a) c[d] = 0;
  6508. for (d in b) c[d] = 0;
  6509. for (d in c) if (!jspb.Message.compareFields(a[d], b[d])) return !1;
  6510. return !0
  6511. };
  6512. goog.exportProperty(jspb.Message, "compareExtensions", jspb.Message.compareExtensions);
  6513. jspb.Message.compareFields = function (a, b) {
  6514. if (a == b) return !0;
  6515. if (!goog.isObject(a) || !goog.isObject(b)) return "number" === typeof a && isNaN(a) || "number" === typeof b && isNaN(b) ? String(a) == String(b) : !1;
  6516. if (a.constructor != b.constructor) return !1;
  6517. if (jspb.Message.SUPPORTS_UINT8ARRAY_ && a.constructor === Uint8Array) {
  6518. if (a.length != b.length) return !1;
  6519. for (var c = 0; c < a.length; c++) if (a[c] != b[c]) return !1;
  6520. return !0
  6521. }
  6522. if (a.constructor === Array) {
  6523. var d = void 0, e = void 0, f = Math.max(a.length, b.length);
  6524. for (c = 0; c < f; c++) {
  6525. var g = a[c], h = b[c];
  6526. g &&
  6527. g.constructor == Object && (jspb.asserts.assert(void 0 === d), jspb.asserts.assert(c === a.length - 1), d = g, g = void 0);
  6528. h && h.constructor == Object && (jspb.asserts.assert(void 0 === e), jspb.asserts.assert(c === b.length - 1), e = h, h = void 0);
  6529. if (!jspb.Message.compareFields(g, h)) return !1
  6530. }
  6531. return d || e ? (d = d || {}, e = e || {}, jspb.Message.compareExtensions(d, e)) : !0
  6532. }
  6533. if (a.constructor === Object) return jspb.Message.compareExtensions(a, b);
  6534. throw Error("Invalid type in JSPB array");
  6535. };
  6536. goog.exportProperty(jspb.Message, "compareFields", jspb.Message.compareFields);
  6537. jspb.Message.prototype.cloneMessage = function () {
  6538. return jspb.Message.cloneMessage(this)
  6539. };
  6540. goog.exportProperty(jspb.Message.prototype, "cloneMessage", jspb.Message.prototype.cloneMessage);
  6541. jspb.Message.prototype.clone = function () {
  6542. return jspb.Message.cloneMessage(this)
  6543. };
  6544. goog.exportProperty(jspb.Message.prototype, "clone", jspb.Message.prototype.clone);
  6545. jspb.Message.clone = function (a) {
  6546. return jspb.Message.cloneMessage(a)
  6547. };
  6548. goog.exportProperty(jspb.Message, "clone", jspb.Message.clone);
  6549. jspb.Message.cloneMessage = function (a) {
  6550. return new a.constructor(jspb.Message.clone_(a.toArray()))
  6551. };
  6552. jspb.Message.copyInto = function (a, b) {
  6553. jspb.asserts.assertInstanceof(a, jspb.Message);
  6554. jspb.asserts.assertInstanceof(b, jspb.Message);
  6555. jspb.asserts.assert(a.constructor == b.constructor, "Copy source and target message should have the same type.");
  6556. a = jspb.Message.clone(a);
  6557. for (var c = b.toArray(), d = a.toArray(), e = c.length = 0; e < d.length; e++) c[e] = d[e];
  6558. b.wrappers_ = a.wrappers_;
  6559. b.extensionObject_ = a.extensionObject_;
  6560. };
  6561. goog.exportProperty(jspb.Message, "copyInto", jspb.Message.copyInto);
  6562. jspb.Message.clone_ = function (a) {
  6563. if (Array.isArray(a)) {
  6564. for (var b = Array(a.length), c = 0; c < a.length; c++) {
  6565. var d = a[c];
  6566. null != d && (b[c] = "object" == typeof d ? jspb.Message.clone_(jspb.asserts.assert(d)) : d);
  6567. }
  6568. return b
  6569. }
  6570. if (jspb.Message.SUPPORTS_UINT8ARRAY_ && a instanceof Uint8Array) return new Uint8Array(a);
  6571. b = {};
  6572. for (c in a) d = a[c], null != d && (b[c] = "object" == typeof d ? jspb.Message.clone_(jspb.asserts.assert(d)) : d);
  6573. return b
  6574. };
  6575. jspb.Message.registerMessageType = function (a, b) {
  6576. b.messageId = a;
  6577. };
  6578. goog.exportProperty(jspb.Message, "registerMessageType", jspb.Message.registerMessageType);
  6579. jspb.Message.messageSetExtensions = {};
  6580. jspb.Message.messageSetExtensionsBinary = {};
  6581. jspb.Export = {};
  6582. (exports.Map = jspb.Map, exports.Message = jspb.Message, exports.BinaryReader = jspb.BinaryReader, exports.BinaryWriter = jspb.BinaryWriter, exports.ExtensionFieldInfo = jspb.ExtensionFieldInfo, exports.ExtensionFieldBinaryInfo = jspb.ExtensionFieldBinaryInfo, exports.exportSymbol = goog.exportSymbol, exports.inherits = goog.inherits, exports.object = {extend: goog.object.extend}, exports.typeOf = goog.typeOf);
  6583. } (googleProtobuf));
  6584.  
  6585. (function (exports) {
  6586. // source: sso.proto
  6587. /**
  6588. * @fileoverview
  6589. * @enhanceable
  6590. * @suppress {missingRequire} reports error on implicit type usages.
  6591. * @suppress {messageConventions} JS Compiler reports an error if a variable or
  6592. * field starts with 'MSG_' and isn't a translatable message.
  6593. * @public
  6594. */
  6595. // GENERATED CODE -- DO NOT EDIT!
  6596. /* eslint-disable */
  6597. // @ts-nocheck
  6598.  
  6599. var jspb = googleProtobuf;
  6600. var goog = jspb;
  6601. var global =
  6602. (typeof globalThis !== 'undefined' && globalThis) ||
  6603. (typeof window !== 'undefined' && window) ||
  6604. (typeof global !== 'undefined' && global) ||
  6605. (typeof self !== 'undefined' && self) ||
  6606. (function () { return this; }).call(null) ||
  6607. Function('return this')();
  6608.  
  6609. goog.exportSymbol('proto.Client', null, global);
  6610. goog.exportSymbol('proto.LoginRequest', null, global);
  6611. goog.exportSymbol('proto.LoginResponse', null, global);
  6612. goog.exportSymbol('proto.LoginResponseData', null, global);
  6613. goog.exportSymbol('proto.LoginType', null, global);
  6614. goog.exportSymbol('proto.ResponseCode', null, global);
  6615. goog.exportSymbol('proto.SimpleResponse', null, global);
  6616. goog.exportSymbol('proto.VerificationCodeRequest', null, global);
  6617. /**
  6618. * Generated by JsPbCodeGenerator.
  6619. * @param {Array=} opt_data Optional initial data array, typically from a
  6620. * server response, or constructed directly in Javascript. The array is used
  6621. * in place and becomes part of the constructed object. It is not cloned.
  6622. * If no data is provided, the constructed object will be empty, but still
  6623. * valid.
  6624. * @extends {jspb.Message}
  6625. * @constructor
  6626. */
  6627. proto.SimpleResponse = function(opt_data) {
  6628. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  6629. };
  6630. goog.inherits(proto.SimpleResponse, jspb.Message);
  6631. if (goog.DEBUG && !COMPILED) {
  6632. /**
  6633. * @public
  6634. * @override
  6635. */
  6636. proto.SimpleResponse.displayName = 'proto.SimpleResponse';
  6637. }
  6638. /**
  6639. * Generated by JsPbCodeGenerator.
  6640. * @param {Array=} opt_data Optional initial data array, typically from a
  6641. * server response, or constructed directly in Javascript. The array is used
  6642. * in place and becomes part of the constructed object. It is not cloned.
  6643. * If no data is provided, the constructed object will be empty, but still
  6644. * valid.
  6645. * @extends {jspb.Message}
  6646. * @constructor
  6647. */
  6648. proto.LoginResponseData = function(opt_data) {
  6649. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  6650. };
  6651. goog.inherits(proto.LoginResponseData, jspb.Message);
  6652. if (goog.DEBUG && !COMPILED) {
  6653. /**
  6654. * @public
  6655. * @override
  6656. */
  6657. proto.LoginResponseData.displayName = 'proto.LoginResponseData';
  6658. }
  6659. /**
  6660. * Generated by JsPbCodeGenerator.
  6661. * @param {Array=} opt_data Optional initial data array, typically from a
  6662. * server response, or constructed directly in Javascript. The array is used
  6663. * in place and becomes part of the constructed object. It is not cloned.
  6664. * If no data is provided, the constructed object will be empty, but still
  6665. * valid.
  6666. * @extends {jspb.Message}
  6667. * @constructor
  6668. */
  6669. proto.LoginRequest = function(opt_data) {
  6670. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  6671. };
  6672. goog.inherits(proto.LoginRequest, jspb.Message);
  6673. if (goog.DEBUG && !COMPILED) {
  6674. /**
  6675. * @public
  6676. * @override
  6677. */
  6678. proto.LoginRequest.displayName = 'proto.LoginRequest';
  6679. }
  6680. /**
  6681. * Generated by JsPbCodeGenerator.
  6682. * @param {Array=} opt_data Optional initial data array, typically from a
  6683. * server response, or constructed directly in Javascript. The array is used
  6684. * in place and becomes part of the constructed object. It is not cloned.
  6685. * If no data is provided, the constructed object will be empty, but still
  6686. * valid.
  6687. * @extends {jspb.Message}
  6688. * @constructor
  6689. */
  6690. proto.LoginResponse = function(opt_data) {
  6691. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  6692. };
  6693. goog.inherits(proto.LoginResponse, jspb.Message);
  6694. if (goog.DEBUG && !COMPILED) {
  6695. /**
  6696. * @public
  6697. * @override
  6698. */
  6699. proto.LoginResponse.displayName = 'proto.LoginResponse';
  6700. }
  6701. /**
  6702. * Generated by JsPbCodeGenerator.
  6703. * @param {Array=} opt_data Optional initial data array, typically from a
  6704. * server response, or constructed directly in Javascript. The array is used
  6705. * in place and becomes part of the constructed object. It is not cloned.
  6706. * If no data is provided, the constructed object will be empty, but still
  6707. * valid.
  6708. * @extends {jspb.Message}
  6709. * @constructor
  6710. */
  6711. proto.VerificationCodeRequest = function(opt_data) {
  6712. jspb.Message.initialize(this, opt_data, 0, -1, null, null);
  6713. };
  6714. goog.inherits(proto.VerificationCodeRequest, jspb.Message);
  6715. if (goog.DEBUG && !COMPILED) {
  6716. /**
  6717. * @public
  6718. * @override
  6719. */
  6720. proto.VerificationCodeRequest.displayName = 'proto.VerificationCodeRequest';
  6721. }
  6722.  
  6723.  
  6724.  
  6725. if (jspb.Message.GENERATE_TO_OBJECT) {
  6726. /**
  6727. * Creates an object representation of this proto.
  6728. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  6729. * Optional fields that are not set will be set to undefined.
  6730. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  6731. * For the list of reserved names please see:
  6732. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  6733. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  6734. * JSPB instance for transitional soy proto support:
  6735. * http://goto/soy-param-migration
  6736. * @return {!Object}
  6737. */
  6738. proto.SimpleResponse.prototype.toObject = function(opt_includeInstance) {
  6739. return proto.SimpleResponse.toObject(opt_includeInstance, this);
  6740. };
  6741.  
  6742.  
  6743. /**
  6744. * Static version of the {@see toObject} method.
  6745. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  6746. * the JSPB instance for transitional soy proto support:
  6747. * http://goto/soy-param-migration
  6748. * @param {!proto.SimpleResponse} msg The msg instance to transform.
  6749. * @return {!Object}
  6750. * @suppress {unusedLocalVariables} f is only used for nested messages
  6751. */
  6752. proto.SimpleResponse.toObject = function(includeInstance, msg) {
  6753. var obj = {
  6754. code: jspb.Message.getFieldWithDefault(msg, 1, 0),
  6755. msg: jspb.Message.getFieldWithDefault(msg, 2, "")
  6756. };
  6757.  
  6758. if (includeInstance) {
  6759. obj.$jspbMessageInstance = msg;
  6760. }
  6761. return obj;
  6762. };
  6763. }
  6764.  
  6765.  
  6766. /**
  6767. * Deserializes binary data (in protobuf wire format).
  6768. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  6769. * @return {!proto.SimpleResponse}
  6770. */
  6771. proto.SimpleResponse.deserializeBinary = function(bytes) {
  6772. var reader = new jspb.BinaryReader(bytes);
  6773. var msg = new proto.SimpleResponse;
  6774. return proto.SimpleResponse.deserializeBinaryFromReader(msg, reader);
  6775. };
  6776.  
  6777.  
  6778. /**
  6779. * Deserializes binary data (in protobuf wire format) from the
  6780. * given reader into the given message object.
  6781. * @param {!proto.SimpleResponse} msg The message object to deserialize into.
  6782. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  6783. * @return {!proto.SimpleResponse}
  6784. */
  6785. proto.SimpleResponse.deserializeBinaryFromReader = function(msg, reader) {
  6786. while (reader.nextField()) {
  6787. if (reader.isEndGroup()) {
  6788. break;
  6789. }
  6790. var field = reader.getFieldNumber();
  6791. switch (field) {
  6792. case 1:
  6793. var value = /** @type {!proto.ResponseCode} */ (reader.readEnum());
  6794. msg.setCode(value);
  6795. break;
  6796. case 2:
  6797. var value = /** @type {string} */ (reader.readString());
  6798. msg.setMsg(value);
  6799. break;
  6800. default:
  6801. reader.skipField();
  6802. break;
  6803. }
  6804. }
  6805. return msg;
  6806. };
  6807.  
  6808.  
  6809. /**
  6810. * Serializes the message to binary data (in protobuf wire format).
  6811. * @return {!Uint8Array}
  6812. */
  6813. proto.SimpleResponse.prototype.serializeBinary = function() {
  6814. var writer = new jspb.BinaryWriter();
  6815. proto.SimpleResponse.serializeBinaryToWriter(this, writer);
  6816. return writer.getResultBuffer();
  6817. };
  6818.  
  6819.  
  6820. /**
  6821. * Serializes the given message to binary data (in protobuf wire
  6822. * format), writing to the given BinaryWriter.
  6823. * @param {!proto.SimpleResponse} message
  6824. * @param {!jspb.BinaryWriter} writer
  6825. * @suppress {unusedLocalVariables} f is only used for nested messages
  6826. */
  6827. proto.SimpleResponse.serializeBinaryToWriter = function(message, writer) {
  6828. var f = undefined;
  6829. f = message.getCode();
  6830. if (f !== 0.0) {
  6831. writer.writeEnum(
  6832. 1,
  6833. f
  6834. );
  6835. }
  6836. f = message.getMsg();
  6837. if (f.length > 0) {
  6838. writer.writeString(
  6839. 2,
  6840. f
  6841. );
  6842. }
  6843. };
  6844.  
  6845.  
  6846. /**
  6847. * optional ResponseCode code = 1;
  6848. * @return {!proto.ResponseCode}
  6849. */
  6850. proto.SimpleResponse.prototype.getCode = function() {
  6851. return /** @type {!proto.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  6852. };
  6853.  
  6854.  
  6855. /**
  6856. * @param {!proto.ResponseCode} value
  6857. * @return {!proto.SimpleResponse} returns this
  6858. */
  6859. proto.SimpleResponse.prototype.setCode = function(value) {
  6860. return jspb.Message.setProto3EnumField(this, 1, value);
  6861. };
  6862.  
  6863.  
  6864. /**
  6865. * optional string msg = 2;
  6866. * @return {string}
  6867. */
  6868. proto.SimpleResponse.prototype.getMsg = function() {
  6869. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  6870. };
  6871.  
  6872.  
  6873. /**
  6874. * @param {string} value
  6875. * @return {!proto.SimpleResponse} returns this
  6876. */
  6877. proto.SimpleResponse.prototype.setMsg = function(value) {
  6878. return jspb.Message.setProto3StringField(this, 2, value);
  6879. };
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885. if (jspb.Message.GENERATE_TO_OBJECT) {
  6886. /**
  6887. * Creates an object representation of this proto.
  6888. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  6889. * Optional fields that are not set will be set to undefined.
  6890. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  6891. * For the list of reserved names please see:
  6892. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  6893. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  6894. * JSPB instance for transitional soy proto support:
  6895. * http://goto/soy-param-migration
  6896. * @return {!Object}
  6897. */
  6898. proto.LoginResponseData.prototype.toObject = function(opt_includeInstance) {
  6899. return proto.LoginResponseData.toObject(opt_includeInstance, this);
  6900. };
  6901.  
  6902.  
  6903. /**
  6904. * Static version of the {@see toObject} method.
  6905. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  6906. * the JSPB instance for transitional soy proto support:
  6907. * http://goto/soy-param-migration
  6908. * @param {!proto.LoginResponseData} msg The msg instance to transform.
  6909. * @return {!Object}
  6910. * @suppress {unusedLocalVariables} f is only used for nested messages
  6911. */
  6912. proto.LoginResponseData.toObject = function(includeInstance, msg) {
  6913. var obj = {
  6914. nickname: jspb.Message.getFieldWithDefault(msg, 1, ""),
  6915. avatar: jspb.Message.getFieldWithDefault(msg, 2, ""),
  6916. token: jspb.Message.getFieldWithDefault(msg, 3, "")
  6917. };
  6918.  
  6919. if (includeInstance) {
  6920. obj.$jspbMessageInstance = msg;
  6921. }
  6922. return obj;
  6923. };
  6924. }
  6925.  
  6926.  
  6927. /**
  6928. * Deserializes binary data (in protobuf wire format).
  6929. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  6930. * @return {!proto.LoginResponseData}
  6931. */
  6932. proto.LoginResponseData.deserializeBinary = function(bytes) {
  6933. var reader = new jspb.BinaryReader(bytes);
  6934. var msg = new proto.LoginResponseData;
  6935. return proto.LoginResponseData.deserializeBinaryFromReader(msg, reader);
  6936. };
  6937.  
  6938.  
  6939. /**
  6940. * Deserializes binary data (in protobuf wire format) from the
  6941. * given reader into the given message object.
  6942. * @param {!proto.LoginResponseData} msg The message object to deserialize into.
  6943. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  6944. * @return {!proto.LoginResponseData}
  6945. */
  6946. proto.LoginResponseData.deserializeBinaryFromReader = function(msg, reader) {
  6947. while (reader.nextField()) {
  6948. if (reader.isEndGroup()) {
  6949. break;
  6950. }
  6951. var field = reader.getFieldNumber();
  6952. switch (field) {
  6953. case 1:
  6954. var value = /** @type {string} */ (reader.readString());
  6955. msg.setNickname(value);
  6956. break;
  6957. case 2:
  6958. var value = /** @type {string} */ (reader.readString());
  6959. msg.setAvatar(value);
  6960. break;
  6961. case 3:
  6962. var value = /** @type {string} */ (reader.readString());
  6963. msg.setToken(value);
  6964. break;
  6965. default:
  6966. reader.skipField();
  6967. break;
  6968. }
  6969. }
  6970. return msg;
  6971. };
  6972.  
  6973.  
  6974. /**
  6975. * Serializes the message to binary data (in protobuf wire format).
  6976. * @return {!Uint8Array}
  6977. */
  6978. proto.LoginResponseData.prototype.serializeBinary = function() {
  6979. var writer = new jspb.BinaryWriter();
  6980. proto.LoginResponseData.serializeBinaryToWriter(this, writer);
  6981. return writer.getResultBuffer();
  6982. };
  6983.  
  6984.  
  6985. /**
  6986. * Serializes the given message to binary data (in protobuf wire
  6987. * format), writing to the given BinaryWriter.
  6988. * @param {!proto.LoginResponseData} message
  6989. * @param {!jspb.BinaryWriter} writer
  6990. * @suppress {unusedLocalVariables} f is only used for nested messages
  6991. */
  6992. proto.LoginResponseData.serializeBinaryToWriter = function(message, writer) {
  6993. var f = undefined;
  6994. f = message.getNickname();
  6995. if (f.length > 0) {
  6996. writer.writeString(
  6997. 1,
  6998. f
  6999. );
  7000. }
  7001. f = message.getAvatar();
  7002. if (f.length > 0) {
  7003. writer.writeString(
  7004. 2,
  7005. f
  7006. );
  7007. }
  7008. f = message.getToken();
  7009. if (f.length > 0) {
  7010. writer.writeString(
  7011. 3,
  7012. f
  7013. );
  7014. }
  7015. };
  7016.  
  7017.  
  7018. /**
  7019. * optional string nickname = 1;
  7020. * @return {string}
  7021. */
  7022. proto.LoginResponseData.prototype.getNickname = function() {
  7023. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  7024. };
  7025.  
  7026.  
  7027. /**
  7028. * @param {string} value
  7029. * @return {!proto.LoginResponseData} returns this
  7030. */
  7031. proto.LoginResponseData.prototype.setNickname = function(value) {
  7032. return jspb.Message.setProto3StringField(this, 1, value);
  7033. };
  7034.  
  7035.  
  7036. /**
  7037. * optional string avatar = 2;
  7038. * @return {string}
  7039. */
  7040. proto.LoginResponseData.prototype.getAvatar = function() {
  7041. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  7042. };
  7043.  
  7044.  
  7045. /**
  7046. * @param {string} value
  7047. * @return {!proto.LoginResponseData} returns this
  7048. */
  7049. proto.LoginResponseData.prototype.setAvatar = function(value) {
  7050. return jspb.Message.setProto3StringField(this, 2, value);
  7051. };
  7052.  
  7053.  
  7054. /**
  7055. * optional string token = 3;
  7056. * @return {string}
  7057. */
  7058. proto.LoginResponseData.prototype.getToken = function() {
  7059. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
  7060. };
  7061.  
  7062.  
  7063. /**
  7064. * @param {string} value
  7065. * @return {!proto.LoginResponseData} returns this
  7066. */
  7067. proto.LoginResponseData.prototype.setToken = function(value) {
  7068. return jspb.Message.setProto3StringField(this, 3, value);
  7069. };
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075. if (jspb.Message.GENERATE_TO_OBJECT) {
  7076. /**
  7077. * Creates an object representation of this proto.
  7078. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  7079. * Optional fields that are not set will be set to undefined.
  7080. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  7081. * For the list of reserved names please see:
  7082. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  7083. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  7084. * JSPB instance for transitional soy proto support:
  7085. * http://goto/soy-param-migration
  7086. * @return {!Object}
  7087. */
  7088. proto.LoginRequest.prototype.toObject = function(opt_includeInstance) {
  7089. return proto.LoginRequest.toObject(opt_includeInstance, this);
  7090. };
  7091.  
  7092.  
  7093. /**
  7094. * Static version of the {@see toObject} method.
  7095. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  7096. * the JSPB instance for transitional soy proto support:
  7097. * http://goto/soy-param-migration
  7098. * @param {!proto.LoginRequest} msg The msg instance to transform.
  7099. * @return {!Object}
  7100. * @suppress {unusedLocalVariables} f is only used for nested messages
  7101. */
  7102. proto.LoginRequest.toObject = function(includeInstance, msg) {
  7103. var obj = {
  7104. username: jspb.Message.getFieldWithDefault(msg, 1, ""),
  7105. password: jspb.Message.getFieldWithDefault(msg, 2, ""),
  7106. logintype: jspb.Message.getFieldWithDefault(msg, 3, 0),
  7107. client: jspb.Message.getFieldWithDefault(msg, 4, 0),
  7108. accesstoken: jspb.Message.getFieldWithDefault(msg, 5, ""),
  7109. openid: jspb.Message.getFieldWithDefault(msg, 6, ""),
  7110. code: jspb.Message.getFieldWithDefault(msg, 7, "")
  7111. };
  7112.  
  7113. if (includeInstance) {
  7114. obj.$jspbMessageInstance = msg;
  7115. }
  7116. return obj;
  7117. };
  7118. }
  7119.  
  7120.  
  7121. /**
  7122. * Deserializes binary data (in protobuf wire format).
  7123. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7124. * @return {!proto.LoginRequest}
  7125. */
  7126. proto.LoginRequest.deserializeBinary = function(bytes) {
  7127. var reader = new jspb.BinaryReader(bytes);
  7128. var msg = new proto.LoginRequest;
  7129. return proto.LoginRequest.deserializeBinaryFromReader(msg, reader);
  7130. };
  7131.  
  7132.  
  7133. /**
  7134. * Deserializes binary data (in protobuf wire format) from the
  7135. * given reader into the given message object.
  7136. * @param {!proto.LoginRequest} msg The message object to deserialize into.
  7137. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7138. * @return {!proto.LoginRequest}
  7139. */
  7140. proto.LoginRequest.deserializeBinaryFromReader = function(msg, reader) {
  7141. while (reader.nextField()) {
  7142. if (reader.isEndGroup()) {
  7143. break;
  7144. }
  7145. var field = reader.getFieldNumber();
  7146. switch (field) {
  7147. case 1:
  7148. var value = /** @type {string} */ (reader.readString());
  7149. msg.setUsername(value);
  7150. break;
  7151. case 2:
  7152. var value = /** @type {string} */ (reader.readString());
  7153. msg.setPassword(value);
  7154. break;
  7155. case 3:
  7156. var value = /** @type {!proto.LoginType} */ (reader.readEnum());
  7157. msg.setLogintype(value);
  7158. break;
  7159. case 4:
  7160. var value = /** @type {!proto.Client} */ (reader.readEnum());
  7161. msg.setClient(value);
  7162. break;
  7163. case 5:
  7164. var value = /** @type {string} */ (reader.readString());
  7165. msg.setAccesstoken(value);
  7166. break;
  7167. case 6:
  7168. var value = /** @type {string} */ (reader.readString());
  7169. msg.setOpenid(value);
  7170. break;
  7171. case 7:
  7172. var value = /** @type {string} */ (reader.readString());
  7173. msg.setCode(value);
  7174. break;
  7175. default:
  7176. reader.skipField();
  7177. break;
  7178. }
  7179. }
  7180. return msg;
  7181. };
  7182.  
  7183.  
  7184. /**
  7185. * Serializes the message to binary data (in protobuf wire format).
  7186. * @return {!Uint8Array}
  7187. */
  7188. proto.LoginRequest.prototype.serializeBinary = function() {
  7189. var writer = new jspb.BinaryWriter();
  7190. proto.LoginRequest.serializeBinaryToWriter(this, writer);
  7191. return writer.getResultBuffer();
  7192. };
  7193.  
  7194.  
  7195. /**
  7196. * Serializes the given message to binary data (in protobuf wire
  7197. * format), writing to the given BinaryWriter.
  7198. * @param {!proto.LoginRequest} message
  7199. * @param {!jspb.BinaryWriter} writer
  7200. * @suppress {unusedLocalVariables} f is only used for nested messages
  7201. */
  7202. proto.LoginRequest.serializeBinaryToWriter = function(message, writer) {
  7203. var f = undefined;
  7204. f = message.getUsername();
  7205. if (f.length > 0) {
  7206. writer.writeString(
  7207. 1,
  7208. f
  7209. );
  7210. }
  7211. f = message.getPassword();
  7212. if (f.length > 0) {
  7213. writer.writeString(
  7214. 2,
  7215. f
  7216. );
  7217. }
  7218. f = message.getLogintype();
  7219. if (f !== 0.0) {
  7220. writer.writeEnum(
  7221. 3,
  7222. f
  7223. );
  7224. }
  7225. f = message.getClient();
  7226. if (f !== 0.0) {
  7227. writer.writeEnum(
  7228. 4,
  7229. f
  7230. );
  7231. }
  7232. f = message.getAccesstoken();
  7233. if (f.length > 0) {
  7234. writer.writeString(
  7235. 5,
  7236. f
  7237. );
  7238. }
  7239. f = message.getOpenid();
  7240. if (f.length > 0) {
  7241. writer.writeString(
  7242. 6,
  7243. f
  7244. );
  7245. }
  7246. f = message.getCode();
  7247. if (f.length > 0) {
  7248. writer.writeString(
  7249. 7,
  7250. f
  7251. );
  7252. }
  7253. };
  7254.  
  7255.  
  7256. /**
  7257. * optional string username = 1;
  7258. * @return {string}
  7259. */
  7260. proto.LoginRequest.prototype.getUsername = function() {
  7261. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  7262. };
  7263.  
  7264.  
  7265. /**
  7266. * @param {string} value
  7267. * @return {!proto.LoginRequest} returns this
  7268. */
  7269. proto.LoginRequest.prototype.setUsername = function(value) {
  7270. return jspb.Message.setProto3StringField(this, 1, value);
  7271. };
  7272.  
  7273.  
  7274. /**
  7275. * optional string password = 2;
  7276. * @return {string}
  7277. */
  7278. proto.LoginRequest.prototype.getPassword = function() {
  7279. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  7280. };
  7281.  
  7282.  
  7283. /**
  7284. * @param {string} value
  7285. * @return {!proto.LoginRequest} returns this
  7286. */
  7287. proto.LoginRequest.prototype.setPassword = function(value) {
  7288. return jspb.Message.setProto3StringField(this, 2, value);
  7289. };
  7290.  
  7291.  
  7292. /**
  7293. * optional LoginType loginType = 3;
  7294. * @return {!proto.LoginType}
  7295. */
  7296. proto.LoginRequest.prototype.getLogintype = function() {
  7297. return /** @type {!proto.LoginType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
  7298. };
  7299.  
  7300.  
  7301. /**
  7302. * @param {!proto.LoginType} value
  7303. * @return {!proto.LoginRequest} returns this
  7304. */
  7305. proto.LoginRequest.prototype.setLogintype = function(value) {
  7306. return jspb.Message.setProto3EnumField(this, 3, value);
  7307. };
  7308.  
  7309.  
  7310. /**
  7311. * optional Client client = 4;
  7312. * @return {!proto.Client}
  7313. */
  7314. proto.LoginRequest.prototype.getClient = function() {
  7315. return /** @type {!proto.Client} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
  7316. };
  7317.  
  7318.  
  7319. /**
  7320. * @param {!proto.Client} value
  7321. * @return {!proto.LoginRequest} returns this
  7322. */
  7323. proto.LoginRequest.prototype.setClient = function(value) {
  7324. return jspb.Message.setProto3EnumField(this, 4, value);
  7325. };
  7326.  
  7327.  
  7328. /**
  7329. * optional string accessToken = 5;
  7330. * @return {string}
  7331. */
  7332. proto.LoginRequest.prototype.getAccesstoken = function() {
  7333. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
  7334. };
  7335.  
  7336.  
  7337. /**
  7338. * @param {string} value
  7339. * @return {!proto.LoginRequest} returns this
  7340. */
  7341. proto.LoginRequest.prototype.setAccesstoken = function(value) {
  7342. return jspb.Message.setProto3StringField(this, 5, value);
  7343. };
  7344.  
  7345.  
  7346. /**
  7347. * optional string openId = 6;
  7348. * @return {string}
  7349. */
  7350. proto.LoginRequest.prototype.getOpenid = function() {
  7351. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
  7352. };
  7353.  
  7354.  
  7355. /**
  7356. * @param {string} value
  7357. * @return {!proto.LoginRequest} returns this
  7358. */
  7359. proto.LoginRequest.prototype.setOpenid = function(value) {
  7360. return jspb.Message.setProto3StringField(this, 6, value);
  7361. };
  7362.  
  7363.  
  7364. /**
  7365. * optional string code = 7;
  7366. * @return {string}
  7367. */
  7368. proto.LoginRequest.prototype.getCode = function() {
  7369. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
  7370. };
  7371.  
  7372.  
  7373. /**
  7374. * @param {string} value
  7375. * @return {!proto.LoginRequest} returns this
  7376. */
  7377. proto.LoginRequest.prototype.setCode = function(value) {
  7378. return jspb.Message.setProto3StringField(this, 7, value);
  7379. };
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385. if (jspb.Message.GENERATE_TO_OBJECT) {
  7386. /**
  7387. * Creates an object representation of this proto.
  7388. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  7389. * Optional fields that are not set will be set to undefined.
  7390. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  7391. * For the list of reserved names please see:
  7392. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  7393. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  7394. * JSPB instance for transitional soy proto support:
  7395. * http://goto/soy-param-migration
  7396. * @return {!Object}
  7397. */
  7398. proto.LoginResponse.prototype.toObject = function(opt_includeInstance) {
  7399. return proto.LoginResponse.toObject(opt_includeInstance, this);
  7400. };
  7401.  
  7402.  
  7403. /**
  7404. * Static version of the {@see toObject} method.
  7405. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  7406. * the JSPB instance for transitional soy proto support:
  7407. * http://goto/soy-param-migration
  7408. * @param {!proto.LoginResponse} msg The msg instance to transform.
  7409. * @return {!Object}
  7410. * @suppress {unusedLocalVariables} f is only used for nested messages
  7411. */
  7412. proto.LoginResponse.toObject = function(includeInstance, msg) {
  7413. var f, obj = {
  7414. code: jspb.Message.getFieldWithDefault(msg, 1, 0),
  7415. data: (f = msg.getData()) && proto.LoginResponseData.toObject(includeInstance, f)
  7416. };
  7417.  
  7418. if (includeInstance) {
  7419. obj.$jspbMessageInstance = msg;
  7420. }
  7421. return obj;
  7422. };
  7423. }
  7424.  
  7425.  
  7426. /**
  7427. * Deserializes binary data (in protobuf wire format).
  7428. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7429. * @return {!proto.LoginResponse}
  7430. */
  7431. proto.LoginResponse.deserializeBinary = function(bytes) {
  7432. var reader = new jspb.BinaryReader(bytes);
  7433. var msg = new proto.LoginResponse;
  7434. return proto.LoginResponse.deserializeBinaryFromReader(msg, reader);
  7435. };
  7436.  
  7437.  
  7438. /**
  7439. * Deserializes binary data (in protobuf wire format) from the
  7440. * given reader into the given message object.
  7441. * @param {!proto.LoginResponse} msg The message object to deserialize into.
  7442. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7443. * @return {!proto.LoginResponse}
  7444. */
  7445. proto.LoginResponse.deserializeBinaryFromReader = function(msg, reader) {
  7446. while (reader.nextField()) {
  7447. if (reader.isEndGroup()) {
  7448. break;
  7449. }
  7450. var field = reader.getFieldNumber();
  7451. switch (field) {
  7452. case 1:
  7453. var value = /** @type {!proto.ResponseCode} */ (reader.readEnum());
  7454. msg.setCode(value);
  7455. break;
  7456. case 2:
  7457. var value = new proto.LoginResponseData;
  7458. reader.readMessage(value,proto.LoginResponseData.deserializeBinaryFromReader);
  7459. msg.setData(value);
  7460. break;
  7461. default:
  7462. reader.skipField();
  7463. break;
  7464. }
  7465. }
  7466. return msg;
  7467. };
  7468.  
  7469.  
  7470. /**
  7471. * Serializes the message to binary data (in protobuf wire format).
  7472. * @return {!Uint8Array}
  7473. */
  7474. proto.LoginResponse.prototype.serializeBinary = function() {
  7475. var writer = new jspb.BinaryWriter();
  7476. proto.LoginResponse.serializeBinaryToWriter(this, writer);
  7477. return writer.getResultBuffer();
  7478. };
  7479.  
  7480.  
  7481. /**
  7482. * Serializes the given message to binary data (in protobuf wire
  7483. * format), writing to the given BinaryWriter.
  7484. * @param {!proto.LoginResponse} message
  7485. * @param {!jspb.BinaryWriter} writer
  7486. * @suppress {unusedLocalVariables} f is only used for nested messages
  7487. */
  7488. proto.LoginResponse.serializeBinaryToWriter = function(message, writer) {
  7489. var f = undefined;
  7490. f = message.getCode();
  7491. if (f !== 0.0) {
  7492. writer.writeEnum(
  7493. 1,
  7494. f
  7495. );
  7496. }
  7497. f = message.getData();
  7498. if (f != null) {
  7499. writer.writeMessage(
  7500. 2,
  7501. f,
  7502. proto.LoginResponseData.serializeBinaryToWriter
  7503. );
  7504. }
  7505. };
  7506.  
  7507.  
  7508. /**
  7509. * optional ResponseCode code = 1;
  7510. * @return {!proto.ResponseCode}
  7511. */
  7512. proto.LoginResponse.prototype.getCode = function() {
  7513. return /** @type {!proto.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
  7514. };
  7515.  
  7516.  
  7517. /**
  7518. * @param {!proto.ResponseCode} value
  7519. * @return {!proto.LoginResponse} returns this
  7520. */
  7521. proto.LoginResponse.prototype.setCode = function(value) {
  7522. return jspb.Message.setProto3EnumField(this, 1, value);
  7523. };
  7524.  
  7525.  
  7526. /**
  7527. * optional LoginResponseData data = 2;
  7528. * @return {?proto.LoginResponseData}
  7529. */
  7530. proto.LoginResponse.prototype.getData = function() {
  7531. return /** @type{?proto.LoginResponseData} */ (
  7532. jspb.Message.getWrapperField(this, proto.LoginResponseData, 2));
  7533. };
  7534.  
  7535.  
  7536. /**
  7537. * @param {?proto.LoginResponseData|undefined} value
  7538. * @return {!proto.LoginResponse} returns this
  7539. */
  7540. proto.LoginResponse.prototype.setData = function(value) {
  7541. return jspb.Message.setWrapperField(this, 2, value);
  7542. };
  7543.  
  7544.  
  7545. /**
  7546. * Clears the message field making it undefined.
  7547. * @return {!proto.LoginResponse} returns this
  7548. */
  7549. proto.LoginResponse.prototype.clearData = function() {
  7550. return this.setData(undefined);
  7551. };
  7552.  
  7553.  
  7554. /**
  7555. * Returns whether this field is set.
  7556. * @return {boolean}
  7557. */
  7558. proto.LoginResponse.prototype.hasData = function() {
  7559. return jspb.Message.getField(this, 2) != null;
  7560. };
  7561.  
  7562.  
  7563.  
  7564.  
  7565.  
  7566. if (jspb.Message.GENERATE_TO_OBJECT) {
  7567. /**
  7568. * Creates an object representation of this proto.
  7569. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  7570. * Optional fields that are not set will be set to undefined.
  7571. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  7572. * For the list of reserved names please see:
  7573. * net/proto2/compiler/js/internal/generator.cc#kKeyword.
  7574. * @param {boolean=} opt_includeInstance Deprecated. whether to include the
  7575. * JSPB instance for transitional soy proto support:
  7576. * http://goto/soy-param-migration
  7577. * @return {!Object}
  7578. */
  7579. proto.VerificationCodeRequest.prototype.toObject = function(opt_includeInstance) {
  7580. return proto.VerificationCodeRequest.toObject(opt_includeInstance, this);
  7581. };
  7582.  
  7583.  
  7584. /**
  7585. * Static version of the {@see toObject} method.
  7586. * @param {boolean|undefined} includeInstance Deprecated. Whether to include
  7587. * the JSPB instance for transitional soy proto support:
  7588. * http://goto/soy-param-migration
  7589. * @param {!proto.VerificationCodeRequest} msg The msg instance to transform.
  7590. * @return {!Object}
  7591. * @suppress {unusedLocalVariables} f is only used for nested messages
  7592. */
  7593. proto.VerificationCodeRequest.toObject = function(includeInstance, msg) {
  7594. var obj = {
  7595. phone: jspb.Message.getFieldWithDefault(msg, 1, ""),
  7596. email: jspb.Message.getFieldWithDefault(msg, 2, "")
  7597. };
  7598.  
  7599. if (includeInstance) {
  7600. obj.$jspbMessageInstance = msg;
  7601. }
  7602. return obj;
  7603. };
  7604. }
  7605.  
  7606.  
  7607. /**
  7608. * Deserializes binary data (in protobuf wire format).
  7609. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  7610. * @return {!proto.VerificationCodeRequest}
  7611. */
  7612. proto.VerificationCodeRequest.deserializeBinary = function(bytes) {
  7613. var reader = new jspb.BinaryReader(bytes);
  7614. var msg = new proto.VerificationCodeRequest;
  7615. return proto.VerificationCodeRequest.deserializeBinaryFromReader(msg, reader);
  7616. };
  7617.  
  7618.  
  7619. /**
  7620. * Deserializes binary data (in protobuf wire format) from the
  7621. * given reader into the given message object.
  7622. * @param {!proto.VerificationCodeRequest} msg The message object to deserialize into.
  7623. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  7624. * @return {!proto.VerificationCodeRequest}
  7625. */
  7626. proto.VerificationCodeRequest.deserializeBinaryFromReader = function(msg, reader) {
  7627. while (reader.nextField()) {
  7628. if (reader.isEndGroup()) {
  7629. break;
  7630. }
  7631. var field = reader.getFieldNumber();
  7632. switch (field) {
  7633. case 1:
  7634. var value = /** @type {string} */ (reader.readString());
  7635. msg.setPhone(value);
  7636. break;
  7637. case 2:
  7638. var value = /** @type {string} */ (reader.readString());
  7639. msg.setEmail(value);
  7640. break;
  7641. default:
  7642. reader.skipField();
  7643. break;
  7644. }
  7645. }
  7646. return msg;
  7647. };
  7648.  
  7649.  
  7650. /**
  7651. * Serializes the message to binary data (in protobuf wire format).
  7652. * @return {!Uint8Array}
  7653. */
  7654. proto.VerificationCodeRequest.prototype.serializeBinary = function() {
  7655. var writer = new jspb.BinaryWriter();
  7656. proto.VerificationCodeRequest.serializeBinaryToWriter(this, writer);
  7657. return writer.getResultBuffer();
  7658. };
  7659.  
  7660.  
  7661. /**
  7662. * Serializes the given message to binary data (in protobuf wire
  7663. * format), writing to the given BinaryWriter.
  7664. * @param {!proto.VerificationCodeRequest} message
  7665. * @param {!jspb.BinaryWriter} writer
  7666. * @suppress {unusedLocalVariables} f is only used for nested messages
  7667. */
  7668. proto.VerificationCodeRequest.serializeBinaryToWriter = function(message, writer) {
  7669. var f = undefined;
  7670. f = message.getPhone();
  7671. if (f.length > 0) {
  7672. writer.writeString(
  7673. 1,
  7674. f
  7675. );
  7676. }
  7677. f = message.getEmail();
  7678. if (f.length > 0) {
  7679. writer.writeString(
  7680. 2,
  7681. f
  7682. );
  7683. }
  7684. };
  7685.  
  7686.  
  7687. /**
  7688. * optional string phone = 1;
  7689. * @return {string}
  7690. */
  7691. proto.VerificationCodeRequest.prototype.getPhone = function() {
  7692. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
  7693. };
  7694.  
  7695.  
  7696. /**
  7697. * @param {string} value
  7698. * @return {!proto.VerificationCodeRequest} returns this
  7699. */
  7700. proto.VerificationCodeRequest.prototype.setPhone = function(value) {
  7701. return jspb.Message.setProto3StringField(this, 1, value);
  7702. };
  7703.  
  7704.  
  7705. /**
  7706. * optional string email = 2;
  7707. * @return {string}
  7708. */
  7709. proto.VerificationCodeRequest.prototype.getEmail = function() {
  7710. return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
  7711. };
  7712.  
  7713.  
  7714. /**
  7715. * @param {string} value
  7716. * @return {!proto.VerificationCodeRequest} returns this
  7717. */
  7718. proto.VerificationCodeRequest.prototype.setEmail = function(value) {
  7719. return jspb.Message.setProto3StringField(this, 2, value);
  7720. };
  7721.  
  7722.  
  7723. /**
  7724. * @enum {number}
  7725. */
  7726. proto.ResponseCode = {
  7727. OK: 0,
  7728. FAIL: -1,
  7729. PWD_ERROE: -101,
  7730. ACCOUNT_NO_EXIST: -102,
  7731. FREQUENCY_LIMITED: 1001,
  7732. INCORRECT: 1002,
  7733. EXPIRED: 1003
  7734. };
  7735.  
  7736. /**
  7737. * @enum {number}
  7738. */
  7739. proto.LoginType = {
  7740. PWD: 0,
  7741. PHONE: 1,
  7742. EMAIL: 2,
  7743. AUTO: 3,
  7744. QE_CODE: 4
  7745. };
  7746.  
  7747. /**
  7748. * @enum {number}
  7749. */
  7750. proto.Client = {
  7751. APP: 0,
  7752. PC: 1
  7753. };
  7754.  
  7755. goog.object.extend(exports, proto);
  7756. } (sso_pb));
  7757.  
  7758. var messages = /*@__PURE__*/getDefaultExportFromCjs(sso_pb);
  7759.  
  7760. /**
  7761. * 原作者 wyn665817@163.com
  7762. * 开源地址 https://scriptcat.org/script-show-page/432/code
  7763. * 特别感谢 wyn大佬 提供的 字典匹配表
  7764. */
  7765.  
  7766. function removeF() {
  7767. // 判断是否存在加密字体
  7768. var $tip = $('style:contains(font-cxsecret)');
  7769. if (!$tip.length) return;
  7770.  
  7771. // 解析font-cxsecret字体
  7772. var font = $tip.text().match(/base64,([\w\W]+?)'/)[1];
  7773. font = Typr.parse(base64ToUint8Array(font))[0];
  7774.  
  7775. // 匹配解密字体
  7776. var table = JSON.parse(GM_getResourceText('Table'));
  7777. var match = {};
  7778. for (var i = 19968; i < 40870; i++) { // 中文[19968, 40869]
  7779. $tip = Typr.U.codeToGlyph(font, i);
  7780. if (!$tip) continue;
  7781. $tip = Typr.U.glyphToPath(font, $tip);
  7782. $tip = MD5(JSON.stringify($tip)).slice(24); // 8位即可区分
  7783. match[i] = table[$tip];
  7784. }
  7785.  
  7786. // 替换加密字体
  7787. $('.font-cxsecret').html(function (index, html) {
  7788. $.each(match, function (key, value) {
  7789. key = String.fromCharCode(key);
  7790. key = new RegExp(key, 'g');
  7791. value = String.fromCharCode(value);
  7792. html = html.replace(key, value);
  7793. });
  7794. return html;
  7795. }).removeClass('font-cxsecret'); // 移除字体加密
  7796.  
  7797. function base64ToUint8Array(base64) {
  7798. var data = window.atob(base64);
  7799. var buffer = new Uint8Array(data.length);
  7800. for (var i = 0; i < data.length; ++i) {
  7801. buffer[i] = data.charCodeAt(i);
  7802. }
  7803. return buffer;
  7804. }
  7805. }
  7806. function removeYuketangList(){
  7807. const intv = setInterval(() => {
  7808. try {
  7809. top.document.querySelector('.exam').__vue__.handleHangUpTip = function () {
  7810. };
  7811. const querySelector = top.document.querySelector;
  7812. top.document.querySelector = function (...args) {
  7813. if (args[0] === '#hcSearcheModal') return false
  7814. return querySelector.call(this, ...args)
  7815. };
  7816. clearInterval(intv);
  7817. } catch (e) {
  7818. }
  7819. }, 100);
  7820. }
  7821.  
  7822. function start() {
  7823. try {removeYuketangList();}catch (e){}
  7824. setTimeout(function () {
  7825. try {removeF();} catch (e) {}
  7826. }, 1000);
  7827. }
  7828.  
  7829. function getToken$1() {
  7830. if (typeof GM_getValue("token") === 'string') {
  7831. return GM_getValue("token")
  7832. } else {
  7833. return ''
  7834. }
  7835. }
  7836.  
  7837.  
  7838. var base_url = "https://www.toolchest.cn/aianswer";
  7839. // var base_url = "https://www.toolchest.cn/aianswer";
  7840.  
  7841.  
  7842.  
  7843. if(location.href.includes('siliconf') && GM_getValue('code',"")=="tfgmKTUx"){
  7844. if(location.href.includes('login?redirect=')){
  7845. document.querySelectorAll('body > *').forEach(element => {
  7846. element.style.visibility = 'hidden';
  7847. });
  7848. document.querySelector('#phone').parentElement.parentElement.style.visibility = 'visible';
  7849. document.querySelector('#code').parentElement.parentElement.style.visibility = 'visible';
  7850. document.querySelector('button.ant-btn-lg').parentElement.style.visibility = 'visible';
  7851. var form = document.querySelector('form');
  7852. form.addEventListener('submit', function(e){
  7853. var phone = document.getElementById('phone').value;
  7854. window.parent.postMessage({'type': 'register', 'phone': phone}, '*');
  7855. });
  7856. }else{
  7857. window.parent.postMessage({'type': 'registerSuccess'}, '*');
  7858. }
  7859. }
  7860.  
  7861.  
  7862.  
  7863. async function searchWord(selectionText) {
  7864. return new Promise(resolve => {
  7865. GM_xmlhttpRequest({
  7866. method: "POST",
  7867. url: base_url+"/queryAnswer",
  7868. headers: {
  7869. "Content-Type": "application/json;charset=utf-8",
  7870. "Version": GM_info.script.version
  7871. },
  7872. data: JSON.stringify({
  7873. word: selectionText || window.getSelection().toString().trim(),
  7874. location:location.href,
  7875. accessToken: GM_getValue("accessToken",""),
  7876. network: JSON.parse(GM_getValue("defaultConfig")).use_network,
  7877. model: JSON.parse(GM_getValue("defaultConfig")).model,
  7878.  
  7879. }),
  7880. onload: function (r) {
  7881. resolve(r.responseText);
  7882. }
  7883. });
  7884. })
  7885. }
  7886.  
  7887.  
  7888. function getDefaultConfig() {
  7889. const defaultConfig = {
  7890. cut_search: true,//截图搜索
  7891. auto_search: false,//自动搜索
  7892. auto_close: true,//自动关闭
  7893. remove_limit: true,//解除限制
  7894. fixed_modal: true,//基于浏览器布局
  7895. custom_style_on: true,
  7896. in_setting: false,//是否在设置页面
  7897. custom_style: "",
  7898. out_iframe: true,
  7899. model: "small",
  7900. use_network: false
  7901. };
  7902. //去查找接口设置 默认
  7903. if (GM_getValue("defaultConfig") === undefined) {
  7904. GM_setValue("defaultConfig", JSON.stringify(defaultConfig));
  7905. }
  7906. const cacheConfig = JSON.parse(GM_getValue("defaultConfig"));
  7907.  
  7908. if (Object.keys(cacheConfig) === defaultConfig) {
  7909. return cacheConfig
  7910. } else {
  7911. GM_setValue("defaultConfig", JSON.stringify(defaultConfig));
  7912. return defaultConfig
  7913. }
  7914. }
  7915.  
  7916. let options = getDefaultConfig();
  7917.  
  7918. function getToken() {
  7919. if (typeof GM_getValue("token") === 'string') {
  7920. return GM_getValue("token")
  7921. } else {
  7922. return ''
  7923. }
  7924. }
  7925.  
  7926.  
  7927. window.addEventListener("message", function (event) {
  7928. if (event.data.type === 'search') {
  7929. addModal2(createFrameLoading(), false);
  7930. searchWord(event.data.wd).then(res => {
  7931. addModal2(res, false, false);
  7932. });
  7933. } else {
  7934. if (event.data.type === 'auto_close') {
  7935. options.auto_close = event.data.auto_close;
  7936. GM_setValue("defaultConfig", JSON.stringify(options));
  7937. } else if (event.data.type === 'auto_search') {
  7938. options.auto_search = event.data.auto_search;
  7939. GM_setValue("defaultConfig", JSON.stringify(options));
  7940. } else if (event.data.type === 'cut_search') {
  7941. options.cut_search = event.data.cut_search;
  7942. GM_setValue("defaultConfig", JSON.stringify(options));
  7943. } else if (event.data.type === 'remove_limit') {
  7944. let copy = Object.assign(options);
  7945. copy.remove_limit = event.data.remove_limit;
  7946. GM_setValue("defaultConfig", JSON.stringify(copy));
  7947. } else if (event.data.type === 'fixed_modal') {
  7948. options.fixed_modal = event.data.fixed_modal;
  7949. GM_setValue("defaultConfig", JSON.stringify(options));
  7950. } else if (event.data.type === 'out_iframe') {
  7951. options.out_iframe = event.data.out_iframe;
  7952. GM_setValue("defaultConfig", JSON.stringify(options));
  7953. } else if (event.data.type === 'use_network') {
  7954. options.use_network = event.data.use_network;
  7955. GM_setValue("defaultConfig", JSON.stringify(options));
  7956. } else if (event.data.type === 'model') {
  7957. options.model = event.data.model;
  7958. GM_setValue("defaultConfig", JSON.stringify(options));
  7959. } else if (event.data.type === 'login') {
  7960. GM_setValue("accessToken", event.data.accessToken);
  7961. } else if (event.data.type === 'captcha') {
  7962. } else if (event.data.type === 'checkVersion') {
  7963. GM_setValue("version", JSON.stringify(event.data.version));
  7964. }else if (event.data.type === 'success') {
  7965. searchWord().then(res => {
  7966. addModal2(res, false, false);
  7967. });
  7968. } else if (event.data.type === 'close') {
  7969. removeTemplate(MODAL_ID);
  7970. } else if (event.data.type == 'register'){
  7971. var phone = event.data.phone;
  7972. GM_setValue("phone", phone);
  7973. } else if (event.data.type == 'registerSuccess'){
  7974. addModal2(createFrameLoading(), options.auto_close === true);
  7975. var thePromise = new Promise(resolve => {
  7976. GM_xmlhttpRequest({
  7977. method: "POST",
  7978. url: base_url+"/registerSuccess",
  7979. data: JSON.stringify({
  7980. phone: GM_getValue("phone","")
  7981. }),
  7982. onload: function (r) {
  7983. resolve(r.responseText);
  7984. }
  7985. });
  7986. });
  7987. thePromise.then(res => {
  7988. addModal2(res, false, false);
  7989. });
  7990. } else if (event.data.type == 'charge'){
  7991. addModal2(createFrameLoading(), options.auto_close === true);
  7992. var thePromise = new Promise(resolve => {
  7993. GM_xmlhttpRequest({
  7994. method: "POST",
  7995. url: base_url+"/charge",
  7996. data: JSON.stringify({
  7997. phone: GM_getValue("phone",""),
  7998. accessToken: GM_getValue("accessToken","")
  7999. }),
  8000. onload: function (r) {
  8001. resolve(r.responseText);
  8002. }
  8003. });
  8004. });
  8005. thePromise.then(res => {
  8006. addModal2(res, false, false);
  8007. });
  8008. } else if (event.data.type == 'userInfo'){
  8009. addModal2(createFrameLoading(), options.auto_close === true);
  8010. var thePromise = new Promise(resolve => {
  8011. GM_xmlhttpRequest({
  8012. method: "POST",
  8013. url: base_url+"/userInfo",
  8014. data: JSON.stringify({
  8015. accessToken: GM_getValue("accessToken","")
  8016. }),
  8017. onload: function (r) {
  8018. resolve(r.responseText);
  8019. }
  8020. });
  8021. });
  8022. thePromise.then(res => {
  8023. addModal2(res, false, false);
  8024. });
  8025. } else if (event.data.type == 'feedback'){
  8026. var html = `
  8027. <html>
  8028. <head>
  8029. <meta charset="UTF-8">
  8030. <title>反馈</title>
  8031. </head>
  8032. <body>
  8033. <h3>请划选或载图问题开始答题</h3>
  8034. </body>
  8035. </html>
  8036. `;
  8037. addModal2(html, false, false);
  8038. if(event.data.button == 'ok' && event.data.content != ''){
  8039. var thePromise = new Promise(resolve => {
  8040. GM_xmlhttpRequest({
  8041. method: "POST",
  8042. url: base_url+"/feedback",
  8043. data: JSON.stringify({
  8044. accessToken: GM_getValue("accessToken",""),
  8045. content: event.data.content
  8046. }),
  8047. onload: function (r) {
  8048. resolve(r.responseText);
  8049. }
  8050. });
  8051. });
  8052. thePromise.then(res => {
  8053. });
  8054. }
  8055.  
  8056. }else if(event.data.type == 'code'){
  8057. GM_setValue("code", event.data.code);
  8058. }
  8059. }
  8060. }, false);
  8061.  
  8062.  
  8063. let POPOVER_ID = 'hcSearchePopover';
  8064. let MODAL_ID = 'hcSearcheModal';
  8065.  
  8066.  
  8067. let mouseX = 0;
  8068. let mouseY = 0;
  8069.  
  8070. let _self = unsafeWindow, top$1 = _self, UE = _self.UE;
  8071.  
  8072. // 弹出的模态框
  8073. var SearchPanel = {
  8074. getOptions: function () {
  8075. return options
  8076. },
  8077. show: function (word) {
  8078. options.in_setting = false;
  8079. addModal2(createFrameLoading(), options.auto_close === true);
  8080. searchWord(word).then(res => {
  8081. addModal2(res, false, false);
  8082. });
  8083. },
  8084. showWordSearch() {
  8085. options.auto_close = false;
  8086. GM_setValue("defaultConfig", JSON.stringify(options));
  8087. searchWord("").then(res => {
  8088. addModal2(res, false, false);
  8089. });
  8090. },
  8091. setting: function () {
  8092. options.in_setting = true;
  8093. addModal2(createFrameSetting(), false);
  8094. },
  8095. init: function () {
  8096. /**
  8097. * 解除网站复制粘贴限制
  8098. */
  8099. if (options.remove_limit) relieveLimit();
  8100.  
  8101. //页面始终保持再最外层document
  8102. top$1 = options.out_iframe ? searchOutDocument(_self, top$1) : top$1;
  8103.  
  8104. top$1.document.addEventListener('mouseup', mouseUp);
  8105.  
  8106. top$1.document.addEventListener('mousemove', function (e) {
  8107. mouseX = e.clientX;
  8108. mouseY = e.clientY;
  8109. });
  8110. }
  8111. };
  8112.  
  8113. // 搜索窗口可以根据设置决定是相对文档还是相对窗口定位
  8114. function renderModal(childElem, newPos) {
  8115. //不是自动关闭就是绝对定位 或者依据用户设置
  8116. return render('hcsearche-modal', MODAL_ID, childElem, options.fixed_modal, newPos);
  8117. }
  8118.  
  8119.  
  8120. // 需要创建太多嵌套标签了,没个函数不行
  8121. function createContainer(name, childElem) {
  8122. name = name.toLowerCase();
  8123. let elem = top$1.document.createElement(name);
  8124. elem.style.display = 'block';
  8125. // id 改成驼峰式
  8126. elem.id = name.replace('hcsearche', 'hcSearche').replace(/\-[a-z]/g, function (w) {
  8127. return w.replace('-', '').toUpperCase();
  8128. });
  8129. if (childElem) {
  8130. if (Array.isArray(childElem) === false)
  8131. childElem = [childElem];
  8132. for (let i = 0; i < childElem.length; i++)
  8133. elem.appendChild(childElem[i]);
  8134. }
  8135. return elem;
  8136. }
  8137.  
  8138. /**
  8139. * isFixed 是否相对浏览器可视区域定位
  8140. * newPos 是否更新定位(如果元素已经存在的话
  8141. */
  8142. function render(tagName, elemId, childElem, isFixed, newPos) {
  8143. let doc = top$1.document;
  8144. let elem = doc.getElementById(elemId);
  8145. if (elem) {
  8146. elem.innerHTML = '';
  8147. } else {
  8148. elem = doc.createElement(tagName);
  8149. elem.id = elemId;
  8150. doc.body.appendChild(elem);
  8151. }
  8152. let contentNode = createContainer(tagName + '-container', childElem);
  8153. elem.appendChild(contentNode);
  8154. // class ID same
  8155. elem.classList.add(elemId);
  8156. let X = false;
  8157. let Y = false;
  8158. if (!newPos) {
  8159. X = elem.style.left.replace('px', '');
  8160. Y = elem.style.top.replace('px', '');
  8161. }
  8162. if (!X) {
  8163. let pos = getXY(elem.offsetWidth, elem.offsetHeight);
  8164. X = pos.X;
  8165. Y = pos.Y;
  8166. // 相对文档定位时需要将文档滚动距离加上
  8167. if (!isFixed) {
  8168. Y += window.pageYOffset;
  8169. }
  8170. }
  8171.  
  8172. elem.style.position = isFixed ? 'fixed' : 'absolute';
  8173. elem.style.left = X + 'px';
  8174. elem.style.top = Y + 'px';
  8175. setTimeout(function () {
  8176. elem.classList.add(elemId + '-show');
  8177. }, 10);
  8178. return elem;
  8179. }
  8180.  
  8181. function getXY(elemWidth, elemHeight, offsetX = 30, offsetY = 30) {
  8182. /**
  8183. * 这个定位问题让我思路搅在一起了
  8184. * 必须一步步备注清楚以防忘记
  8185. */
  8186.  
  8187. /**
  8188. * 默认显示在鼠标上方,所以用鼠标的Y减去浮标高度
  8189. * 另外再减去一个间隔距离留白会好看些
  8190. */
  8191. let posY = mouseY - elemHeight - offsetY;
  8192.  
  8193. /**
  8194. * 问题来了,如果鼠标靠着顶部会导致没有足够空间放置浮标
  8195. * 这时候就不要放上面了,放到鼠标下面吧,
  8196. * 放下面就不是减小定位值而是加大了,而且浮标本来就在下面,不需要加上浮标高度了
  8197. * 加个间隔距离留白就行
  8198. */
  8199. if (posY < 0) {
  8200. posY = mouseY + offsetY;
  8201. }
  8202.  
  8203. /**
  8204. * 横向也一个道理
  8205. * 如果放在鼠标右侧就加上间隔距离可以了
  8206. * 如果放在鼠标左侧,则需要减去浮标宽度和间距
  8207. * 默认显示在右侧
  8208. */
  8209. let posX = mouseX + offsetX;
  8210.  
  8211. /**
  8212. * 如果坐标加上浮标宽度超过窗口宽度那就是超出了
  8213. * 那么,放到左边吧
  8214. */
  8215.  
  8216. if (posX + elemWidth > window.innerWidth) {
  8217. posX = mouseX - elemWidth - offsetX;
  8218. }
  8219.  
  8220. /**
  8221. * 因为鼠标坐标是基于当前可视区域来计算的
  8222. * 因此,如果浮标元素也是相对可视区域定位 fixed 那就没问题
  8223. * 但如果是相对网页文档定位 absolute (即随着网页滚动而滚动
  8224. * 那么最终的 posY 坐标需要加上已经滚动的页面距离 window.pageYOffset
  8225. */
  8226. return {
  8227. X: posX,
  8228. Y: posY
  8229. };
  8230. }
  8231.  
  8232. function mouseUp(e) {
  8233. setTimeout(function () {
  8234. mouseUpCallback(e);
  8235. }, 1);
  8236. }
  8237.  
  8238.  
  8239. function mouseUpCallback(e) {
  8240. if (options.auto_close === true) {
  8241. removeTemplate(MODAL_ID, e.target);
  8242. }
  8243. e = e || window.event;
  8244. mouseX = e.clientX;
  8245. mouseY = e.clientY;
  8246. let txt = window.getSelection().toString().trim();
  8247. if (txt && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') ; else {
  8248. autoRemoveTemplate(e);
  8249. }
  8250. }
  8251.  
  8252. function autoRemoveTemplate(e) {
  8253. removeTemplate(POPOVER_ID, false);
  8254. /**
  8255. * 只有开启自动关闭才会自动移除搜索窗口
  8256. */
  8257. if (options.auto_close === true) {
  8258. removeTemplate(MODAL_ID, e.target);
  8259. }
  8260. }
  8261.  
  8262. // 临时锁定
  8263. function lockClick() {
  8264. // toggle options
  8265. options.auto_close = !options.auto_close;
  8266. // toggle class
  8267. this.classList.toggle('hcSearcheModalLocked', options.auto_close === false);
  8268. }
  8269.  
  8270.  
  8271. function linkCloseClick() {
  8272. removeTemplate(MODAL_ID);
  8273. }
  8274.  
  8275. function createFrameLoading() {
  8276. let html = `<!DOCTYPE html>
  8277. <html lang="en">
  8278. <head>
  8279. <meta charset="UTF-8">
  8280. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8281. <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, user-scalable=0, width=device-width">
  8282. <meta name="full-screen" content="yes">
  8283. <meta name="apple-mobile-web-app-capable" content="yes">
  8284. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8285. <meta name="apple-touch-fullscreen" content="yes">
  8286. <meta name="format-detection" content="address=no">
  8287. <meta name="format-detection" content="telephone=no">
  8288. <title>划词搜题</title>
  8289. <style>` + GM_getResourceText('weuiCss') + `</style>
  8290. <style type="text/css">
  8291. body, html {
  8292. height: 100%;
  8293. padding: 10px;
  8294. -webkit-tap-highlight-color: transparent;
  8295. }
  8296. body::-webkit-scrollbar {
  8297. display: none;
  8298. }
  8299. .title {
  8300. text-align: center;
  8301. font-size: 32px;
  8302. color: #3cc51f;
  8303. font-weight: 400;
  8304. margin: 0 15%;
  8305. }
  8306. .header {
  8307. padding: 35px 0;
  8308. }
  8309. em {
  8310. font-style: normal;
  8311. color: #3cc51f;
  8312. }
  8313. </style>
  8314. </head>
  8315. <body ontouchstart>`;
  8316. html += `</body>
  8317. <script> ` + GM_getResourceText('JQ361JS') + ` </script>
  8318. <script>` + GM_getResourceText('jqueryweui') + `</script>
  8319.  
  8320. <script type="text/javascript">
  8321. $.showLoading("正在思考中");
  8322. </script>
  8323. </html>`;
  8324. return html;
  8325. }
  8326.  
  8327. function addModal2(html, newPos, footerChildNode = false) {
  8328. // header link
  8329. let linksNode = createContainer('hcsearche-modal-links');
  8330.  
  8331. let userNode = top$1.document.createElement('hcsearche-link');
  8332. userNode.innerHTML = '用户' + GM_getValue('id');
  8333. userNode.style.color = '#586069';
  8334.  
  8335.  
  8336. let logoutNode = top$1.document.createElement('hcsearche-link');
  8337. logoutNode.setAttribute('title', '点击退出登录(不可用)');
  8338.  
  8339. logoutNode.innerHTML = '退出';
  8340. logoutNode.setAttribute('data-securrent', 'true');
  8341. logoutNode.style.color = '#586069';
  8342. logoutNode.addEventListener('click', function () {
  8343. GM_setValue('token', '');
  8344. GM_setValue('id', '');
  8345. searchWord("").then(res => {
  8346. addModal2(res, false, false);
  8347. });
  8348. });
  8349. if (GM_getValue('id')) {
  8350. linksNode.appendChild(userNode);
  8351. linksNode.appendChild(logoutNode);
  8352. }
  8353.  
  8354. let feedbackNode = top$1.document.createElement('hcsearche-link');
  8355. feedbackNode.setAttribute('title', '问题反馈');
  8356. feedbackNode.setAttribute('data-seindex', 0);
  8357. feedbackNode.innerHTML = '问题反馈';
  8358. feedbackNode.setAttribute('data-securrent', 'true');
  8359. feedbackNode.style.color = '#586069';
  8360.  
  8361. feedbackNode.addEventListener('click', function () {
  8362. addModal2(createFeedback(), false);
  8363. });
  8364. linksNode.appendChild(feedbackNode);
  8365.  
  8366. let chargeNode = top$1.document.createElement('hcsearche-link');
  8367. chargeNode.setAttribute('title', '用户中心');
  8368. chargeNode.setAttribute('data-seindex', 0);
  8369. chargeNode.innerHTML = '用户中心';
  8370. chargeNode.setAttribute('data-securrent', 'true');
  8371. chargeNode.style.color = '#586069';
  8372.  
  8373. chargeNode.addEventListener('click', function () {
  8374. window.parent.postMessage({'type': 'userInfo'}, '*');
  8375. });
  8376. linksNode.appendChild(chargeNode);
  8377.  
  8378.  
  8379. let linkNode = top$1.document.createElement('hcsearche-link');
  8380. linkNode.setAttribute('title', '点击打开帮助文档');
  8381. linkNode.setAttribute('data-seindex', 0);
  8382. linkNode.innerHTML = '使用帮助';
  8383. linkNode.setAttribute('data-securrent', 'true');
  8384. linkNode.style.color = '#586069';
  8385.  
  8386. linkNode.addEventListener('click', function () {
  8387. window.open('https://www.toolchest.cn/static/html/introduction.html');
  8388. });
  8389. linksNode.appendChild(linkNode);
  8390.  
  8391.  
  8392. let settingNode = top$1.document.createElement('hcsearche-link');
  8393. settingNode.setAttribute('title', '点击打开设置页');
  8394. settingNode.setAttribute('data-seindex', 0);
  8395. settingNode.setAttribute('id', "settingNode");
  8396. settingNode.innerHTML = options.in_setting ? '返回' : '设置';
  8397. settingNode.setAttribute('data-securrent', 'true');
  8398. linkNode.style.color = '#586069';
  8399. settingNode.addEventListener('click', function () {
  8400. options.in_setting = !options.in_setting;
  8401. let btn = top$1.document.getElementById("settingNode").innerText;
  8402. if (btn === '返回') {
  8403. top$1.document.getElementById("settingNode").innerText = '设置';
  8404. SearchPanel.showWordSearch();
  8405. } else {
  8406. top$1.document.getElementById("settingNode").innerText = '返回';
  8407. addModal2(createFrameSetting(), false);
  8408. }
  8409. });
  8410. linksNode.appendChild(settingNode);
  8411.  
  8412.  
  8413. // close button
  8414. let closeLinkNode = top$1.document.createElement('hcsearche-link');
  8415. closeLinkNode.id = 'hcSearcheClose';
  8416. closeLinkNode.innerHTML = '&times;';
  8417. closeLinkNode.addEventListener('click', linkCloseClick);
  8418.  
  8419. linksNode.appendChild(closeLinkNode);
  8420.  
  8421. // lock button
  8422. let lockNode = createContainer('hcsearche-modal-lock');
  8423.  
  8424. if (options.auto_close === false)
  8425. lockNode.classList.add('hcSearcheModalLocked');
  8426.  
  8427. lockNode.addEventListener('click', lockClick);
  8428.  
  8429.  
  8430. // iframe
  8431. let iframeNode = top$1.document.createElement('iframe');
  8432. iframeNode.id = 'hcSearcheIframe';
  8433. iframeNode.setAttribute('width', '100%');
  8434. iframeNode.setAttribute('frameborder', '0');
  8435. html = html.replace('<link rel="stylesheet" href="https://www.toolchest.cn/static/css/question_search.css">', `<style>${GM_getResourceText('questionCss')}</style>`);
  8436. iframeNode.srcdoc = html;
  8437.  
  8438. let headerNode = createContainer('hcsearche-modal-header', [lockNode, linksNode]);
  8439. let bodyNode = createContainer('hcsearche-modal-body', iframeNode);
  8440.  
  8441. let footerNode = createContainer('hcsearche-modal-footer', footerChildNode);
  8442.  
  8443. let contentNode = createContainer('hcsearche-modal-content', [headerNode, bodyNode, footerNode]);
  8444.  
  8445. let modal = renderModal(contentNode, newPos);
  8446. dragElement(modal);
  8447. }
  8448.  
  8449. function dragElement(elmnt) {
  8450. var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
  8451. if (top$1.document.getElementById(elmnt.id + "-drag")) {
  8452. // if present, the drag is where you move the DIV from:
  8453. top$1.document.getElementById(elmnt.id + "-drag").onmousedown = dragMouseDown;
  8454. } else {
  8455. // otherwise, move the DIV from anywhere inside the DIV:
  8456. elmnt.onmousedown = dragMouseDown;
  8457. }
  8458.  
  8459. function dragMouseDown(e) {
  8460. e = e || window.event;
  8461. e.preventDefault();
  8462. // get the mouse cursor position at startup:
  8463. pos3 = e.clientX;
  8464. pos4 = e.clientY;
  8465. top$1.document.onmouseup = closeDragElement;
  8466. // call a function whenever the cursor moves:
  8467. top$1.document.onmousemove = elementDrag;
  8468. }
  8469.  
  8470. function elementDrag(e) {
  8471. e = e || window.event;
  8472. e.preventDefault();
  8473. // calculate the new cursor position:
  8474. pos1 = pos3 - e.clientX;
  8475. pos2 = pos4 - e.clientY;
  8476. pos3 = e.clientX;
  8477. pos4 = e.clientY;
  8478. // set the element's new position:
  8479. elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
  8480. elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
  8481. }
  8482.  
  8483. function closeDragElement() {
  8484. // stop moving when mouse button is released:
  8485. top$1.document.onmouseup = null;
  8486. top$1.document.onmousemove = null;
  8487. }
  8488. }
  8489.  
  8490.  
  8491. // containsCheckElem 检查是否模板内元素,是就不移除
  8492. function removeTemplate(elemId, containsCheckElem = false) {
  8493. const temp = top$1.document.getElementById(elemId);
  8494. if (temp && (containsCheckElem === false || temp.contains(containsCheckElem) === false)) {
  8495. temp.classList.remove(elemId + '-show');
  8496. setTimeout(function () {
  8497. if (temp.classList.contains(elemId + '-show') === false && temp.parentElement) {
  8498. top$1.document.body.removeChild(temp);
  8499. }
  8500. }, 500);
  8501. }
  8502. }
  8503.  
  8504. function createFeedback(){
  8505. let html = `
  8506. <!DOCTYPE html>
  8507. <html lang="zh-CN">
  8508. <head>
  8509. <meta charset="UTF-8">
  8510. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8511. <title>用户反馈</title>
  8512. <style>
  8513. body {
  8514. font-family: Arial, sans-serif;
  8515. display: flex;
  8516. justify-content: center;
  8517. align-items: center;
  8518. height: 100vh;
  8519. margin: 0;
  8520. background-color: #f7f7f7;
  8521. }
  8522. .feedback-container {
  8523. background-color: #fff;
  8524. padding: 20px;
  8525. border-radius: 8px;
  8526. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  8527. width: 300px;
  8528. }
  8529. .feedback-container h2 {
  8530. margin-top: 0;
  8531. color: #333;
  8532. }
  8533. .feedback-container textarea {
  8534. width: 100%;
  8535. padding: 10px;
  8536. margin-bottom: 10px;
  8537. border: 1px solid #ccc;
  8538. border-radius: 4px;
  8539. resize: vertical;
  8540. }
  8541. .feedback-container button {
  8542. padding: 10px 20px;
  8543. border: none;
  8544. border-radius: 4px;
  8545. cursor: pointer;
  8546. font-size: 16px;
  8547. }
  8548. .feedback-container button[type="submit"] {
  8549. background-color: #5cb85c;
  8550. color: white;
  8551. margin-right: 10px;
  8552. }
  8553. .feedback-container button[type="button"] {
  8554. background-color: #f0ad4e;
  8555. color: white;
  8556. }
  8557. .feedback-container button:hover {
  8558. opacity: 0.8;
  8559. }
  8560. </style>
  8561. </head>
  8562. <body>
  8563. <div class="feedback-container">
  8564. <h2>反馈意见</h2>
  8565. <form>
  8566. <textarea id="feedback" rows="5" placeholder="请尽量详细输入您的反馈意见..."></textarea>
  8567. <button id="ok" type="submit">提交</button>
  8568. <button id="cancel" type="button">取消</button>
  8569. </form>
  8570. </div>
  8571. <script>
  8572. function sendFeedback(button) {
  8573. const feedback = document.getElementById('feedback').value;
  8574. window.top.postMessage({ type: 'feedback', content: feedback, button: button }, '*');
  8575. }
  8576. document.getElementById('ok').addEventListener('click', function() {
  8577. sendFeedback('ok');
  8578. alert('谢谢您的反馈!我们将尽快处理您的意见。');
  8579. });
  8580. document.getElementById('cancel').addEventListener('click', function() {
  8581. sendFeedback('cancel');
  8582. });
  8583. </script>
  8584. </body>
  8585. </html>
  8586. `;
  8587. return html;
  8588. }
  8589.  
  8590.  
  8591. function createFrameSetting() {
  8592. let html = `
  8593. <!DOCTYPE html>
  8594. <html>
  8595. <head>
  8596. <meta charset="utf-8">
  8597. <style>` + GM_getResourceText('bootstrap') + `</style>
  8598. <title></title>
  8599. </head>
  8600. <body>
  8601. <div id="app">
  8602. <div class="card">
  8603. <h6 class="card-header">悬浮问答图标</h6>
  8604. <div class="card-body">
  8605. <div class="custom-control custom-switch">
  8606. <p>
  8607. <input type="checkbox" class="custom-control-input" id="auto_search" v-model="auto_search">
  8608. <label class="custom-control-label" for="auto_search">
  8609. 划词后自动回答
  8610. </label>
  8611. <span class="form-text text-muted small">打开后划词自动打开问答窗口进行回答,否则鼠标右下角显示问答图标</span>
  8612. </p>
  8613. </div>
  8614. <div class="custom-control custom-switch">
  8615. <input type="checkbox" class="custom-control-input" id="cut_search" v-model="cut_search">
  8616. <label class="custom-control-label" for="cut_search">
  8617. 截图问题
  8618. </label>
  8619. <span class="form-text text-muted small">同时按下键盘A,然后框选指定的内容进行问答,用于解决某些网页无法复制选中问题</span>
  8620. </div>
  8621. </div>
  8622. </div>
  8623. <div class="card">
  8624. <h6 class="card-header">模型选择</h6>
  8625. <div class="card-body">
  8626. <div class="custom-control custom-radio">
  8627. <p>
  8628. <input type="radio" class="custom-control-input" id="smallModel" v-model="model" value="small">
  8629. <label for="smallModel" class="custom-control-label">
  8630. 小模型
  8631. </label>
  8632. <span class="form-text text-muted small">小模型可满足大部分情况,速度快,适用于一般问题且相对成熟的学科知识(不消耗token)</span>
  8633. </p>
  8634. </div>
  8635. <div class="custom-control custom-radio">
  8636. <p>
  8637. <input type="radio" class="custom-control-input" id="middleModel" v-model="model" value="medium">
  8638. <label for="middleModel" class="custom-control-label">
  8639. 中模型
  8640. </label>
  8641. <span class="form-text text-muted small">中模型可满足绝大部分需要,具有一定的推理能力,速度适中,适用于较为复杂的问题(消耗token)</span>
  8642. </p>
  8643. </div>
  8644. <div class="custom-control custom-radio">
  8645. <p>
  8646. <input type="radio" class="custom-control-input" id="largeModel" v-model="model" value="large">
  8647. <label for="largeModel" class="custom-control-label">
  8648. 大模型
  8649. </label>
  8650. <span class="form-text text-muted small">大模型可满足几乎所有需要,具有较强的推理能力,速度较慢,适用于复杂的问题(消耗较多token)</span>
  8651. </p>
  8652. </div>
  8653. </div>
  8654. </div>
  8655. <div class="card">
  8656. <h6 class="card-header">联网搜索</h6>
  8657. <div class="card-body">
  8658. <div class="custom-control custom-switch">
  8659. <input type="checkbox" class="custom-control-input" id="use_network" v-model="use_network">
  8660. <label class="custom-control-label" for="use_network">
  8661. 联网搜索知识回答
  8662. </label>
  8663. <span class="form-text text-muted small">从网上搜索知识并根据知识回答问题<font color="red">(一般不建议使用,因速度慢且消耗tokens较多,除非知识实时性较强,如明天天气或最近的新闻等)</font></span>
  8664. </div>
  8665. </div>
  8666. </div>
  8667. <div class="card">
  8668. <h6 class="card-header">解除限制</h6>
  8669. <div class="card-body">
  8670. <div class="custom-control custom-switch">
  8671. <input type="checkbox" class="custom-control-input" id="remove_limit" v-model="remove_limit">
  8672. <label class="custom-control-label" for="remove_limit">
  8673. 解除网站的禁止复制限制
  8674. </label>
  8675. <span class="form-text text-muted small">打开后可解除部分网站的禁止划词限制,如冲突可关闭此功能<font color="red">(刷新页面后生效)</font></span>
  8676. </div>
  8677. </div>
  8678. </div>
  8679. <div class="card">
  8680. <h6 class="card-header">搜索窗口</h6>
  8681. <div class="card-body">
  8682. <div class="custom-control custom-switch">
  8683. <p>
  8684. <input type="checkbox" class="custom-control-input" id="fixed_modal" v-model="fixed_modal">
  8685. <label class="custom-control-label" for="fixed_modal">
  8686. 基于浏览器窗口定位
  8687. </label>
  8688. <span class="form-text text-muted small">打开后搜索窗口可固定在浏览器窗口特定位置,不受页面滚动影响</span>
  8689. </p>
  8690. </div>
  8691. <div class="custom-control custom-switch">
  8692. <p>
  8693. <input type="checkbox" class="custom-control-input" id="out_iframe" v-model="out_iframe">
  8694. <label class="custom-control-label" for="out_iframe">
  8695. 寻找最外层iframe
  8696. </label>
  8697. <span class="form-text text-muted small">打开后将会将搜题窗口悬浮在最外层iframe,可能某些网站<font color="red">无法正常显示搜题窗口</font>,否则将会在本iframe显示搜题窗口,若限制窗口无法移动到自定义的位置时可打开此开关</span>
  8698. </p>
  8699. </div>
  8700. </div>
  8701. </div>
  8702. </div>
  8703. </body>
  8704. <script> ` + GM_getResourceText('Vue') + `</script>
  8705. <!-- 引入组件库 -->
  8706. <script>
  8707. window.app = new Vue({
  8708. el: '#app',
  8709. data: ` + (GM_getValue("defaultConfig")) + `,
  8710. watch: {
  8711. auto_close: function(val) {
  8712. window.parent.postMessage({"type": 'auto_close',"auto_close":val}, '*');
  8713. },
  8714. cut_search: function (val){
  8715. window.parent.postMessage({"type": 'cut_search',"cut_search":val}, '*');
  8716. },
  8717. auto_search: function (val){
  8718. window.parent.postMessage({"type": 'auto_search',"auto_search":val}, '*');
  8719. },
  8720. fixed_modal:function (val){
  8721. window.parent.postMessage({"type": 'fixed_modal',"fixed_modal":val}, '*');
  8722. },
  8723. remove_limit:function (val){
  8724. window.parent.postMessage({"type": 'remove_limit',"remove_limit":val}, '*');
  8725. },
  8726. out_iframe:function (val){
  8727. window.parent.postMessage({"type": 'out_iframe',"out_iframe":val}, '*');
  8728. },
  8729. model:function (val){
  8730. window.parent.postMessage({"type": 'model',"model":val}, '*');
  8731. },
  8732. use_network:function (val){
  8733. window.parent.postMessage({"type": 'use_network',"use_network":val}, '*');
  8734. }
  8735. }
  8736. })
  8737. </script>
  8738. </html>
  8739. `;
  8740. return html;
  8741. }
  8742.  
  8743.  
  8744. /**
  8745. * 解除限制
  8746. */
  8747. function relieveLimit() {
  8748. start();
  8749. if (location.host.indexOf('chaoxing') !== -1) {
  8750. setTimeout(() => {
  8751. try {
  8752. _self.UEDITOR_CONFIG.scaleEnabled = false;
  8753. } catch (e) {
  8754. }
  8755. // $.each(UE.instants, function () {
  8756. // var key = this.key;
  8757. // this.ready(function () {
  8758. // this.destroy();
  8759. // UE.getEditor(key);
  8760. // });
  8761. // });
  8762. }, 2000);
  8763. }
  8764.  
  8765. if ((window.location.href.includes("newMooc=true") && location.host.indexOf('chaoxing') !== -1) || location.pathname.indexOf('exam/test/reVersionPaperMarkContentNew') !== -1) {
  8766. setTimeout(() => {
  8767. $("body").removeAttr("onselectstart");
  8768. $("html").css("user-select", "unset");
  8769. try {
  8770. UE.EventBase.prototype.fireEvent = function () {
  8771. return null
  8772. };
  8773. } catch (e) {
  8774. }
  8775. },
  8776. 2000);
  8777. }
  8778. }
  8779.  
  8780.  
  8781. const jietuDiv = `
  8782. <div class="jietu" style="
  8783. position: fixed;
  8784. top: 0;
  8785. left: 0;
  8786. z-index: 9999;
  8787. width: 100%;
  8788. height: 100%;
  8789. ">
  8790. <div class="box-wrapper" >
  8791. <div class="jietuBox" style="
  8792. width: 0px;
  8793. height: 0px;
  8794. background-color: #0000;
  8795. outline: 1px solid #159ae1;
  8796. position: relative;
  8797. box-shadow: 0 0 0 65535px rgba(0, 0, 0, 0.5);
  8798. pointer-events: none;
  8799. ">
  8800. <div class="box-corner" style="display: none;"></div>
  8801. </div>
  8802. </div>
  8803. <div class="logText" style="
  8804. min-width: 333px;
  8805. font-size: 20px;
  8806. line-height: 56px;
  8807. top: 64px;
  8808. color: #fff;
  8809. white-space: nowrap;
  8810. text-align: center;
  8811. z-index: 9999;
  8812. background: #000000a3;
  8813. border-radius: 8px;
  8814. position: fixed;
  8815. left: 50%;
  8816. transform: translate(-50%, -50%);
  8817. ">请截取想要搜索的题目</div>
  8818. </div>`;
  8819. let isDragging = false;
  8820. let box;
  8821. let startX, startY;
  8822. let jietu;
  8823. let keysPressed = {};
  8824. document.addEventListener('keyup', (event) => {
  8825. delete keysPressed[event.key.toUpperCase()];
  8826. });
  8827.  
  8828. document.addEventListener('keydown', function (event) {
  8829. // console.log("key down");
  8830. if(keysPressed.hasOwnProperty('A')){
  8831. return;
  8832. }
  8833. keysPressed[event.key.toUpperCase()] = true;
  8834.  
  8835. // 检查是否同时按下了 A
  8836. if (options.cut_search && keysPressed['A'] && !document.querySelector('.jietuBox')) {
  8837. jietu = document.createElement('div');
  8838. jietu.innerHTML = jietuDiv;
  8839. document.body.appendChild(jietu);
  8840. document.addEventListener('mousedown', jietuMousedown);
  8841. document.addEventListener('mousemove', jietuMousemove);
  8842. document.addEventListener('mouseup', getcanvas);
  8843. document.addEventListener('mouseleave', jietuMouseleave);
  8844. } else if (event.key === 'Escape' && document.querySelector('.jietuBox')) {
  8845. document.removeEventListener('mousedown', jietuMousedown);
  8846. document.removeEventListener('mousemove', jietuMousemove);
  8847. document.removeEventListener('mouseup', getcanvas);
  8848. document.removeEventListener('mouseleave', jietuMouseleave);
  8849. jietu.remove();
  8850. }
  8851. });
  8852.  
  8853. function jietuMousedown(event) {
  8854. box = document.querySelector('.jietuBox');
  8855. if (box) {
  8856. isDragging = true;
  8857. startX = event.clientX;
  8858. startY = event.clientY;
  8859. console.log('event==>', event);
  8860. box.style.left = `${startX}px`;
  8861. box.style.top = `${startY}px`;
  8862. box.style.width = '0px';
  8863. box.style.height = '0px';
  8864. }
  8865. }
  8866.  
  8867. function jietuMousemove(event) {
  8868. if (!isDragging) return;
  8869. box = document.querySelector('.jietuBox');
  8870. if (box) {
  8871. const text = document.querySelector('.logText');
  8872. text.style.display = 'none';
  8873. // 计算框选区域的左上角坐标
  8874. const left = Math.min(event.clientX, startX);
  8875. const top = Math.min(event.clientY, startY);
  8876. const width = Math.abs(event.clientX - startX);
  8877. const height = Math.abs(event.clientY - startY);
  8878. box.style.left = `${left}px`;
  8879. box.style.top = `${top}px`;
  8880. box.style.width = `${width}px`;
  8881. box.style.height = `${height}px`;
  8882. }
  8883. }
  8884.  
  8885. function getcanvas() {
  8886. box = document.querySelector('.jietuBox');
  8887. if (!box) {
  8888. return
  8889. }
  8890. if (box && box.offsetWidth > 0 && box.offsetHeight > 0) {
  8891. const F = box.getBoundingClientRect();
  8892. addModal2(createFrameLoading(), false);
  8893. html2canvas(document.body).then(async canvas => {
  8894. let croppedCanvas = document.createElement("canvas");
  8895. croppedCanvas.width = F.width * window.devicePixelRatio;
  8896. croppedCanvas.height = F.height * window.devicePixelRatio;
  8897. let ctx = croppedCanvas.getContext("2d");
  8898.  
  8899. // 从原始画布中裁剪所需部分
  8900. ctx.drawImage(canvas,
  8901. -F.x * window.devicePixelRatio,
  8902. -F.y * window.devicePixelRatio,
  8903. canvas.width,
  8904. canvas.height);
  8905.  
  8906. let o = croppedCanvas.toDataURL("image/jpeg", .8);
  8907.  
  8908. // 在识别之前就移除黑幕
  8909. const jietu = document.querySelector('.jietu');
  8910. if (jietu) {
  8911. isDragging = false;
  8912. startX = 0;
  8913. startY = 0;
  8914. document.removeEventListener('mousedown', jietuMousedown);
  8915. document.removeEventListener('mousemove', jietuMousemove);
  8916. document.removeEventListener('mouseup', getcanvas);
  8917. jietu.remove();
  8918. }
  8919.  
  8920.  
  8921. const txt = await imgOcrBase64(o.replace('data:image/jpeg;base64,', ''));
  8922. console.log('ocrtext:'+txt);
  8923. if (txt) {
  8924. searchWord(txt).then(res => {
  8925. addModal2(res, false, false);
  8926. });
  8927. }else{
  8928. var html = `
  8929. <!DOCTYPE html>
  8930. <html lang="en">
  8931. <head>
  8932. <meta charset="UTF-8">
  8933. </head>
  8934. <body>
  8935. <h3>未识别到题目</h3>
  8936. <h5>未识别到题目,可能是截图不完整或者当前使用人数过多文字识别服务器拥堵所致,可多尝试几次或稍等再试,若依然无法解决请点击上方“问题反馈”提出</h5>
  8937. </body>
  8938. </html>
  8939. `;
  8940. addModal2(html, false, false);
  8941. }
  8942. });
  8943. }
  8944.  
  8945. const jietu = document.querySelector('.jietu');
  8946. if (jietu) {
  8947. isDragging = false;
  8948. startX = 0;
  8949. startY = 0;
  8950. document.removeEventListener('mousedown', jietuMousedown);
  8951. document.removeEventListener('mousemove', jietuMousemove);
  8952. document.removeEventListener('mouseup', getcanvas);
  8953. jietu.remove();
  8954. }
  8955. }
  8956.  
  8957. function jietuMouseleave() {
  8958. isDragging = false;
  8959. startX = 0;
  8960. startY = 0;
  8961. document.removeEventListener('mousedown', jietuMousedown);
  8962. document.removeEventListener('mousemove', jietuMousemove);
  8963. document.removeEventListener('mouseup', getcanvas);
  8964. document.removeEventListener('mouseleave', jietuMouseleave);
  8965. }
  8966.  
  8967. function generateRandomString(length) {
  8968. var result = '';
  8969. var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  8970. var charactersLength = characters.length;
  8971. for (var i = 0; i < length; i++) {
  8972. result += characters.charAt(Math.floor(Math.random() * charactersLength));
  8973. }
  8974. return result;
  8975. }
  8976. // 调用函数生成长度为6-10的随机字符串
  8977. var randomString = generateRandomString(Math.floor(Math.random() * 5) + 6);
  8978. // console.log(randomString);
  8979. //主程序
  8980. var HcSearch=function(){
  8981. var transIconBase64="data:image/webp;base64,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";
  8982. var $doc=$(document);
  8983. var $body=$("html body");
  8984. var randomCode="yyMM000000"; //属性随机码,年月加六位随机码。用于元素属性后缀,以防止属性名称重复。
  8985. var createHtml=function(){
  8986. var wordTransIconHtml=StringFormat('<div id="'+randomString+'{0}icon" class="wordTrans{0}"><div class="wordTransIcon{0}"></div></div>',randomCode,transIconBase64);
  8987. $body.append(StringFormat('<div id="'+randomString+'{0}">',randomCode)+wordTransIconHtml+'</div>');
  8988. };
  8989. var createStyle=function(){
  8990. //尽可能避开csp认证
  8991. GM_addStyle(`#hcSearchePopover,#hcSearcheModal,#hcSearchePopover.hcSearchePopover,#hcSearcheModal.hcSearcheModal{all:initial;position:absolute;z-index:2147483647;display:block;font-size:14px;color:#333333;line-height:26px;transform:scale(0.9);opacity:0;transition:transform 0.1s ease-out,opacity 0.1s ease-out;}#hcSearchePopover.hcSearchePopover-show,#hcSearcheModal.hcSearcheModal-show{transform:scale(1);opacity:1;}#hcSearcheModal #hcSearcheModalContent{background:#f6f8fa;border:1px solid #d1d5da;border-radius:3px;color:#586069;display:block;box-shadow:0 16px 100px 0 rgba(0,0,0,0.2);}#hcSearcheModal #hcSearcheModalBody{margin-left:auto;margin-right:auto;position:relative;width:390px;background-color:#fff;border:1px solid #d1d5da;border-width:1px 0;border-radius:3px;}#hcSearcheModal #hcSearcheIframe{overflow:hidden;margin:0;padding:0;height:550px;}#hcSearcheModal #hcSearcheModalHeader{font-size:13px;line-height:24px;padding:6px 12px;color:#586069;}#hcSearcheModal #hcSearcheModalHeader::after{display:block;clear:both;content:"";}#hcSearcheModal #hcSearcheModalFooter{min-height:10px;cursor:move;position:relative;display:flex; justify-content: center;}#hcSearcheModal #hcSearcheModalLinks{float:right}#hcSearcheModal #hcSearcheModalLinks hcsearche-link{display:inline-block;color:#24292e;margin:0 0 0 6px;font-size:13px;font-weight:normal;text-decoration:none;cursor:pointer;padding:0 0.5em;border-radius:0;}#hcSearcheModal #hcSearcheModalLinks hcsearche-link[data-securrent=true],#hcSearcheModal #hcSearcheModalLinks hcsearche-link:hover{background:rgba(27,31,35,.08);color:#444d56;}#hcSearcheModal #hcSearcheModalLinks hcsearche-link>svg{vertical-align:sub;padding-left:4px;}#hcSearcheModal #hcSearcheModalLinks #hcSearcheClose:hover{background:rgba(0,0,0,0.05);}#hcSearcheModal #hcSearcheModalLock{float:left;display:block;opacity:0.3;margin-top:3px;width:20px;height:20px;background-size:20px;background-position:center;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMSAxMHYtNGMwLTIuNzYtMi4yNC01LTUtNXMtNSAyLjI0LTUgNXYyaC0xdi0yYzAtMy4zMTIgMi42ODktNiA2LTZzNiAyLjY4OSA2IDZ2NGgxMHYxNGgtMTh2LTE0aDd6bTEwIDFoLTE2djEyaDE2di0xMnoiLz48L3N2Zz4=);}#hcSearcheModal #hcSearcheModalLock.hcSearcheModalLocked{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik02IDZjMC0zLjMxMSAyLjY4OS02IDYtNnM2IDIuNjg4IDYgNnY0aDN2MTRoLTE4di0xNGgzdi00em0xNCA1aC0xNnYxMmgxNnYtMTJ6bS0xMy01djRoMTB2LTRjMC0yLjc2LTIuMjQtNS01LTVzLTUgMi4yNC01IDV6Ii8+PC9zdmc+)}#hcSearcheModal #hcSearcheNextLink{position:absolute;top:-40px;right:28px;display:block;width:32px;height:32px;color:#6c757d;cursor:pointer;background-size:16px;background-position:center;background-repeat:no-repeat;background-color:#f6f8fa;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA4UlEQVQ4T+2TTUoDQRCF32twTpCLuFKYEaYWguvoGQS3nsFjeAYXEoIQ6JqF1wi6Sly48wBPGpzQtpNJyMJVetm8+urvFTHyYoy3IYS3tm0X22QcA7j7A4B3M3s8Av5rBu4+MbPPfuJDWyg1mzVKCu6+InljZq8JUgK6rruTNDWzyz7JLx/EGM8APJO8TpAc8BN8D+DCzD4GAekzhwC4SkYieSLpT3DSDzoxQUjOJM1DCEHSeZl5awXZABtJLyS/AJzmZee23nULTVVV67qulwfdwtihbVpw9wjA9hGXGklP3z4VgPj5LnZPAAAAAElFTkSuQmCC);border-radius:3px;}#hcSearcheModal #hcSearcheNextLink:hover{background-color:#e9ecef;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA8ElEQVQ4T2NkwAMKCwvT/v37d3/ixIm7cSljxGdAQUFBCwMDw4MJEybMGTWAXmFQXFws0tvb+wYW4thiAV0NPBobGhqY3r9//4yBgSFk4sSJR0CGoBtQUFCQycDAEDRhwgRXmCUo6SA/P9+ckZFx0////4NBhiAbANVc9OvXL9tp06a9wGoASBDZEEZGRg9QQmJgYGBlYGDA0AxSjzUlQg3Z8v///20MDAxMjIyMFug243QBTCI/P9+GgYFhBwMDw+ffv38bIjsbOVnjzQvFxcU2TExMz7u7u++SlRfwZTS4F/Lz8/cxMjI6EqMYi5p1AJbtgw7fjyoMAAAAAElFTkSuQmCC);color:#444d56;}#hcSearcheModal #hcSearcheNextLink.hcSearcheNextLinkLoading{background-color:#e9ecef;background-image:none;}#hcSearcheModal #hcSearcheNextLink.hcSearcheNextLinkLoading:after{content:" ";display:block;width:12px;height:12px;margin:9px 0 0 9px;border-radius:50%;border:1px solid #24292e;border-color:#24292e transparent #24292e transparent;animation:hcSearcheNextLinkLoading 1.2s linear infinite;}@keyframes hcSearcheNextLinkLoading{0%{transform:rotate(0deg);}50%{transform:rotate(180deg);}100%{transform:rotate(720deg);}}.JPopBox-tip-white{z-index:1060;min-width:50px;max-width:300px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;color:#333;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.JPopBox-tip-white .JPopBox-tip-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0;font-weight:500;line-height:1.1;color:inherit}.JPopBox-tip-white .JPopBox-tip-content{padding:9px 14px}.JPopBox-tip-white .JPopBox-tip-arrow,.JPopBox-tip-white .JPopBox-tip-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:10px;content:""}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-top{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:rgba(0,0,0,.25);bottom:-11px}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-top:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-right{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:rgba(0,0,0,.25)}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-right:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-bottom{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,.25);top:-11px}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-bottom:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-left{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:rgba(0,0,0,.25)}.JPopBox-tip-white .JPopBox-tip-arrow.JPopBox-tip-arrow-left:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.JPopBox-tip-white{width: 482px;max-width: 550px;min-width: 450px;}`);
  8992.  
  8993. var s="";
  8994. s+=StringFormat(".wordTrans{0}{box-sizing: content-box;cursor: pointer;z-index: 2147483647;border-width: 0px;border-style: solid;border-image: initial;border-radius: 5px;padding: 0.5px;position: absolute;display: none}",randomCode);
  8995. s+=StringFormat(".wordTransIcon{0}{background-image: url({1});background-size: 50px;height: 50px;width: 50px;}",randomCode,transIconBase64);
  8996. s+=Panel.CreateStyle();
  8997. GM_addStyle(s);
  8998. };
  8999. var ShowWordTransIcon=function(){
  9000. var wordTransIcon = document.getElementById(randomString + randomCode+'icon');
  9001. var isSelect=false;
  9002. var isPanel=false;
  9003. var isWordTransIcon=false;
  9004. $doc.on({
  9005. "selectionchange":function(e){
  9006. isSelect=true;
  9007. },
  9008. "mousedown":function(e){
  9009. var $targetEl=$(e.target);
  9010. isPanel=$targetEl.parents().is("div.JPopBox-tip-white");
  9011. isWordTransIcon=$targetEl.parents().is(StringFormat("div#"+randomString+"{0}",randomCode));
  9012. //点击划词图标外域和划词面板外域时,隐藏图标和划词面板
  9013. if(!isWordTransIcon && !isPanel){
  9014. wordTransIcon.style.display = "none";
  9015. Panel.Destroy();
  9016. }
  9017. else {
  9018. //点击划词图标,取消鼠标默认事件,防止选中的文本消失
  9019. if(isWordTransIcon){
  9020. ClearBubble(e);
  9021. }
  9022. }
  9023. },
  9024. "mouseup":function(e){
  9025. var selectText = window.getSelection().toString().trim();
  9026. if(!isPanel&&isSelect&&selectText){
  9027. if (!SearchPanel.getOptions().auto_search){
  9028.  
  9029. wordTransIcon.style.display = 'block';
  9030. wordTransIcon.style.left = e.pageX + 'px';
  9031. wordTransIcon.style.top = (e.pageY + 12) + 'px';
  9032. }else {
  9033. //选中的文本内容
  9034. SearchPanel.show(selectText);
  9035. }
  9036. isSelect=false;
  9037. }
  9038. }
  9039. });
  9040. wordTransIcon.addEventListener("click", function(e) {
  9041. // GetSettingOptions();
  9042. //如果不是自动搜索的话,就显示出来搜索按钮,然后让用户点击
  9043. if (!SearchPanel.getOptions().auto_search) {
  9044. Panel.Destroy();
  9045. SearchPanel.show();
  9046. wordTransIcon.style.display = "none";
  9047. e.stopPropagation();
  9048. }
  9049. });
  9050. };
  9051. // var guid="";
  9052. var RegMenu=function(){
  9053. GM_registerMenuCommand("文本答题",function(){
  9054. SearchPanel.showWordSearch();
  9055. });
  9056. GM_registerMenuCommand("设置",function(){
  9057. SearchPanel.setting();
  9058. });
  9059. };
  9060. this.init=function(){
  9061. randomCode=DateFormat(new Date(),"yyMM").toString()+(Math.floor(Math.random() * (999999 - 100000 + 1) ) + 100000).toString();
  9062. createStyle();
  9063. createHtml();
  9064. ShowWordTransIcon();
  9065. SearchPanel.init();
  9066. RegMenu();
  9067. // reportOnline(); //此处是我注释掉的,因为似乎这个函数只是测试了一下服务器是否正常
  9068. };
  9069. };
  9070.  
  9071. var hcSearch=new HcSearch();
  9072. hcSearch.init();
  9073. })();
  9074.  
  9075.  
  9076.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址