PageSourceSearch

https://www.fly168.com.tw/scripts/page-layout?t=639223041939771982

js fly168.com.tw collected 2026-10-05 22:26:33 UTC 111,021 bytes, 10 lines download raw bytes

1function _extends(){return _extends=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},_extends.apply(this,arguments)}function _typeof(n){return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_typeof(n)}function serializeJson(n,t=false){var r=[],i;if(typeof HTMLFormElement=="function"&&n instanceof HTMLFormElement)for(i in n.elements)(n.elements[i]instanceof HTMLInputElement||n.elements[i]instanceof HTMLSelectElement||n.elements[i]instanceof HTMLTextAreaElement)&&r.push({name:n.elements[i].name,value:n.elements[i].value});else Array.isArray(n)&&(r=n);return r.reduce(function(n,i){var r=n,u=i.name.split(".");return u.forEach((n,f)=>{var e=n.replace(/\[[0-9]*\]$/,""),o,s;if(r.hasOwnProperty(e)||(r[e]=new RegExp("[[0-9]*]$").test(n)?[]:{}),r[e]instanceof Array){if(o=parseInt((n.match(new RegExp("([0-9]+)]$"))||[]).pop(),10),o=isNaN(o)?r[e].length:o,r[e][o]=r[e][o]||{},f===u.length-1){if(t===!0&&JSON.stringify({})!==JSON.stringify(r[e][o]))while(r[e][o]!==undefined)s=r[e][o],r[e][o]=i.value,i.value=s,o++;return r[e][o]=i.value}return r=r[e][o]}return f===u.length-1?r[e]=i.value:r=r[e]}),n},{})}function ReplaceWithPolyfill(){"use-strict";var t=this.parentNode,i=arguments.length,n;if(t)for(i||t.removeChild(this);i--;)n=arguments[i],typeof n!="object"?n=this.ownerDocument.createTextNode(n):n.parentNode&&n.parentNode.removeChild(n),i?t.insertBefore(n,this.nextSibling):t.replaceChild(n,this)}(function(n,t){(typeof exports=="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):n.LazyLoad=t()})(this,function(){"use strict";function vt(n,t){if(t)if(t.length)for(var i=0,r;r=t[i];i+=1)l(n,r);else l(n,t)}var r=typeof window!="undefined",h=r&&!("onscroll"in window)||typeof navigator!="undefined"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),ct=r&&"IntersectionObserver"in window,c=r&&"classList"in document.createElement("p"),lt={elements_selector:"img",container:h||r?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_reveal:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},at=function(n){return _extends({},lt,n)},l=function(n,t){var i,r="LazyLoad::Initialized",u=new n(t);try{i=new CustomEvent(r,{detail:{instance:u}})}catch(f){i=document.createEvent("CustomEvent");i.initCustomEvent(r,!1,!1,{instance:u})}window.dispatchEvent(i)},a="data-",v="was-processed",y="ll-timeout",p="true",n=function(n,t){return n.getAttribute(a+t)},w=function(n,t,i){var r=a+t;if(i===null){n.removeAttribute(r);return}n.setAttribute(r,i)},yt=function(n){return w(n,v,p)},b=function(t){return n(t,v)===p},k=function(n,t){return w(n,y,t)},d=function(t){return n(t,y)},pt=function(n){return n.filter(function(n){return!b(n)})},wt=function(n,t){return n.filter(function(n){return n!==t})},t=function(n,t){n&&n(t)},g=function(n,i){n._loadingCount+=i;n._elements.length===0&&n._loadingCount===0&&t(n._settings.callback_finish)},nt=function(n){for(var i=[],r=0,t;t=n.children[r];r+=1)t.tagName==="SOURCE"&&i.push(t);return i},i=function(n,t,i){i&&n.setAttribute(t,i)},tt=function(t,r){i(t,"sizes",n(t,r.data_sizes));i(t,"srcset",n(t,r.data_srcset));i(t,"src",n(t,r.data_src))},bt=function(n,t){var i=n.parentNode,r;i&&i.tagName==="PICTURE"&&(r=nt(i),r.forEach(function(n){tt(n,t)}));tt(n,t)},kt=function(t,r){i(t,"src",n(t,r.data_src))},dt=function(t,r){var u=nt(t);u.forEach(function(t){i(t,"src",n(t,r.data_src))});i(t,"src",n(t,r.data_src));t.load()},gt=function(t,i){var r=n(t,i.data_src),u=n(t,i.data_bg);r&&(t.style.backgroundImage='url("'.concat(r,'")'));u&&(t.style.backgroundImage=u)},ni={IMG:bt,IFRAME:kt,VIDEO:dt},ti=function(n,t){var i=t._settings,u=n.tagName,r=ni[u];if(r){r(n,i);g(t,1);t._elements=wt(t._elements,n);return}gt(n,i)},it=function(n,t){if(c){n.classList.add(t);return}
1n.className+=(n.className?" ":"")+t},ii=function(n,t){if(c){n.classList.remove(t);return}n.className=n.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},rt="load",ut="loadeddata",ft="error",u=function(n,t,i){n.addEventListener(t,i)},f=function(n,t,i){n.removeEventListener(t,i)},ri=function(n,t,i){u(n,rt,t);u(n,ut,t);u(n,ft,i)},et=function(n,t,i){f(n,rt,t);f(n,ut,t);f(n,ft,i)},ot=function(n,i,r){var u=r._settings,e=i?u.class_loaded:u.class_error,o=i?u.callback_loaded:u.callback_error,f=n.target;ii(f,u.class_loading);it(f,e);t(o,f);g(r,-1)},ui=function(n,t){var i=function i(u){ot(u,!0,t);et(n,i,r)},r=function r(u){ot(u,!1,t);et(n,i,r)};ri(n,i,r)},fi=["IMG","IFRAME","VIDEO"],ei=function(n,i){var r=i._settings;if(t(r.callback_enter,n),!r.load_delay){e(n,i);return}si(n,i)},e=function(n,t){var i=t._observer;o(n,t);i&&t._settings.auto_unobserve&&i.unobserve(n)},oi=function(n,i){var r=i._settings;(t(r.callback_exit,n),r.load_delay)&&st(n)},st=function(n){var t=d(n);t&&(clearTimeout(t),k(n,null))},si=function(n,t){var r=t._settings.load_delay,i=d(n);i||(i=setTimeout(function(){e(n,t);st(n)},r),k(n,i))},o=function(n,i,r){var u=i._settings;(r||!b(n))&&(fi.indexOf(n.tagName)>-1&&(ui(n,i),it(n,u.class_loading)),ti(n,i),yt(n),t(u.callback_reveal,n),t(u.callback_set,n))},hi=function(n){return n.isIntersecting||n.intersectionRatio>0},ci=function(n){return{root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}},li=function(n){return ct?(n._observer=new IntersectionObserver(function(t){t.forEach(function(t){return hi(t)?ei(t.target,n):oi(t.target,n)})},ci(n._settings)),!0):!1},ai=["IMG","IFRAME"],vi=function(n){return n.use_native&&"loading"in HTMLImageElement.prototype},yi=function(n){n._elements.forEach(function(t){ai.indexOf(t.tagName)!==-1&&(t.setAttribute("loading","lazy"),o(t,n))})},pi=function(n){return Array.prototype.slice.call(n)},wi=function(n){return n.container.querySelectorAll(n.elements_selector)},ht=function(n,t){return pt(pi(n||wi(t)))},s=function(n,t){this._settings=at(n);this._loadingCount=0;li(this);this.update(t)};return s.prototype={update:function(n){var i=this,t=this._settings;if(this._elements=ht(n,t),h||!this._observer){this.loadAll();return}vi(t)&&(yi(this),this._elements=ht(n,t));this._elements.forEach(function(n){i._observer.observe(n)})},destroy:function(){var n=this;this._observer&&(this._elements.forEach(function(t){n._observer.unobserve(t)}),this._observer=null);this._elements=null;this._settings=null},load:function(n,t){o(n,this,t)},loadAll:function(){var n=this;this._elements.forEach(function(t){e(t,n)})}},r&&vt(s,window.lazyLoadOptions),s}),function(n,t){var i,r;typeof module=="object"&&module.exports?(i=typeof window!="undefined"?window.jQuery:undefined,i||(i=require("jquery"),i.fn||(i.fn={})),r=typeof window!="undefined"?window.Mustache:undefined,r||(r=require("mustache")),module.exports=t(i,r,window)):n.memberinfo=t(n.jQuery,n.Mustache)}(this,function(n,t){var i=function(t,i,r){this.clonenode=t.cloneNode(!0);this.el=n(t);this.options=n.extend(i||{},this.el.data());let f=n("template",this.el);f.length>0&&(this.options.template=f.html());let u=this;this.options.template?n.get(this.options.url,function(n){u.render(n,r)}):i.templateUrl&&n.ajax({url:i.templateUrl,context:document.body}).done(function(t){u.options.template=t;n.get(u.options.url,function(n){u.render(n,r)})})};i.prototype={constructor:i,render:function(i,r){let u=this;i.IsAuthenticated&&(i=n.extend(this.options||{},i),this.el.html(t.render(this.options.template,i)),typeof r=="function"&&r(this,i),this.el.trigger("render"),i.Countable.NotifyCount>0&&this.el.trigger("touch-moment",[n(".icon .fa",this.el)]))}};n.fn.memberinfo=function(t,r){var u=n.extend(!0,{},t);return this.each(function(){let t=this;n(t).data("memberinfo")||n(t).data("memberinfo",new i(t,u,r))}),this};n(function(){n('[data-rel="memberinfo"]').memberinfo({url:"/member/info",templateUrl:"/member/infotemplate"});n('[data-rel="memberinfo"]').on("touch-moment.memberinfo",function(n,t){t.addClass("touch-moment");setTimeout(function(){t.removeClass("touch-moment")},2.3*1e3)})})}),function(n,t){if(typeof define=="function"&&define.amd)define(["jquery"],function(n){return n.fn||(n.fn={}),t(n)});else if(typeof module=="object"&&module.exports){var i=typeof window!="undefined"?window.jQuery:undefined;
1i||(i=require("jquery"),i.fn||(i.fn={}));module.exports=t(i)}else n.topcart=t(n.jQuery)}(this,function(n){var t=function(t,i,r){if(this.clonenode=t.cloneNode(!0),this.el=n(t),this.options=n.extend(i||{},this.el.data()),this.template)this.render(r);else if(i.templateUrl){let t=this;n.ajax({url:i.templateUrl,context:document.body}).done(function(n){t.template=n;t.render(r)})}};t.prototype={constructor:t,reloadlist:function(){let i=this,t=this.el.data("reloadListUrl");t&&n.get(t,function(n){i.htmlreplace(n)})},htmlreplace:function(t){n(".count",this.el).html(0);n(".totalPrice",this.el).html("");n(".shoppingcart-wrap.has_product ul",this.el).html("");n(this.el).addClass("empty");t.Success&&t.Items.length>0&&(n(".count",this.el).html(t.Items.length),n(this.el).removeClass("empty"),n(".shoppingcart-wrap.has_product ul",this.el).replaceWith(t.ItemsRender),n(".totalPrice",this.el).html(t.ShowTotalPrice))},loadtemplate:function(){let t=n(this.template),i=t.find("#buycart"),r=t.find("#buycart-modal");n(".cart.delete-wrap").length==0&&n(document.body).append(r.html());this.el.data("reloadListUrl",i.data("reloadListUrl"));this.el.html('<span class="icon">'+this.el.html()+'<span class="count">0<\/span><\/span>');this.el.addClass("top-cart empty");this.el.append(i.html())},eventattached:function(){this.el.on("ajax:success.topcart",".delete-item",function(t,i){t.preventDefault();let r=n(t.delegateTarget),u=r.data("topcart");u.htmlreplace(i)}).on("ajax:error.topcart",".delete-item",function(n){n.preventDefault()}).on("add.topcart",function(t,i){t.preventDefault();let r=n(t.delegateTarget),u=r.data("topcart");u.htmlreplace(i);r.addClass("show-remind");setTimeout(()=>{r.removeClass("show-remind")},u.options.remind*1e3)})},render:function(n){this.loadtemplate();this.reloadlist();this.eventattached();typeof n=="function"&&n(this);this.el.trigger("render")},remove:function(){return this.el.off(".topcart"),this.el.removeData(),this.el.replaceWith(this.clonenode),this.clonenode}};n.fn.topcart=function(i,r){var u=n.extend(!0,{remind:3},i);this.each(function(){let i=this;n(i).data("topcart")&&(i=n(i).data("topcart").remove());n(i).data("topcart",new t(i,u,r))})};n(function(){n('[data-rel="buycart"], [data-rel="topcart"]').topcart({templateUrl:"/my/cart/template"})})}),function(){"use strict";var n=function(n,t){if(n.rails===t){var i,r=n(document);
1if(n.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return n("meta[name=csrf-token]").attr("content")},csrfParam:function(){return n("meta[name=csrf-param]").attr("content")},CSRFProtection:function(n){var t=i.csrfToken();t&&n.setRequestHeader("X-CSRF-Token",t)},refreshCSRFTokens:function(){n('form input[name="'+i.csrfParam()+'"]').val(i.csrfToken())},fire:function(t,i,r){var u=n.Event(i);return t.trigger(u,r),u.result!==!1},confirm:function(n){return confirm(n)},ajax:function(t){return n.ajax(t)},href:function(n){return n[0].href},isRemote:function(n){return n.data("remote")!==t&&n.data("remote")!==!1},handleRemote:function(r){var e,f,u,s,c,o,h;return i.fire(r,"ajax:before")?(s=r.data("with-credentials")||null,c=r.data("type")||n.ajaxSettings&&n.ajaxSettings.dataType,r.is("form")?(e=r.data("ujs:submit-button-formmethod")||r.attr("method"),f=r.data("ujs:submit-button-formaction")||r.attr("action"),u=n(r[0]).serializeArray(),h=r.data("ujs:submit-button"),h&&(u.push(h),r.data("ujs:submit-button",null)),r.data("ujs:submit-button-formmethod",null),r.data("ujs:submit-button-formaction",null)):r.is(i.inputChangeSelector)?(e=r.data("method"),f=r.data("url"),u=r.serialize(),r.data("params")&&(u=u+"&"+r.data("params"))):r.is(i.buttonClickSelector)?(e=r.data("method")||"get",f=r.data("url"),u=r.serialize(),r.data("params")&&(u=u+"&"+r.data("params"))):(e=r.data("method"),f=i.href(r),u=r.data("params")||null),o={type:e||"GET",data:u,dataType:c,beforeSend:function(n,u){if(u.dataType===t&&n.setRequestHeader("accept","*/*;q=0.5, "+u.accepts.script),i.fire(r,"ajax:beforeSend",[n,u]))r.trigger("ajax:send",n);else return!1},success:function(n,t,i){r.trigger("ajax:success",[n,t,i])},complete:function(n,t){r.trigger("ajax:complete",[n,t])},error:function(n,t,i){r.trigger("ajax:error",[n,t,i])},crossDomain:i.isCrossDomain(f)},s&&(o.xhrFields={withCredentials:s}),f&&(o.url=f),i.ajax(o)):!1},isCrossDomain:function(n){var i=document.createElement("a"),t;i.href=location.href;t=document.createElement("a");try{return t.href=n,t.href=t.href,!((!t.protocol||t.protocol===":")&&!t.host||i.protocol+"//"+i.host==t.protocol+"//"+t.host)}catch(r){return!0}},handleMethod:function(r){var f=i.href(r),c=r.data("method"),e=r.attr("target"),o=i.csrfToken(),s=i.csrfParam(),u=n('<form method="post" action="'+f+'"><\/form>'),h='<input name="_method" value="'+c+'" type="hidden" />';s===t||o===t||i.isCrossDomain(f)||(h+='<input name="'+s+'" value="'+o+'" type="hidden" />');e&&u.attr("target",e);u.hide().append(h).appendTo("body");u.submit()},formElements:function(t,i){return t.is("form")?n(t[0].elements).filter(i):t.find(i)},disableFormElements:function(t){i.formElements(t,i.disableSelector).each(function(){i.disableFormElement(n(this))})},disableFormElement:function(n){var i,r;i=n.is("button")?"html":"val";r=n.data("disable-with");r!==t&&(n.data("ujs:enable-with",n[i]()),n[i](r));n.prop("disabled",!0);n.data("ujs:disabled",!0)},enableFormElements:function(t){i.formElements(t,i.enableSelector).each(function(){i.enableFormElement(n(this))})},enableFormElement:function(n){var i=n.is("button")?"html":"val";n.data("ujs:enable-with")!==t&&(n[i](n.data("ujs:enable-with")),n.removeData("ujs:enable-with"));n.prop("disabled",!1);n.removeData("ujs:disabled")}
1,allowAction:function(n){var r=n.data("confirm"),t=!1,u;if(!r)return!0;if(i.fire(n,"confirm")){try{t=i.confirm(r)}catch(f){(console.error||console.log).call(console,f.stack||f)}u=i.fire(n,"confirm:complete",[t])}return t&&u},blankInputs:function(t,i,r){var f=n(),u,o,s,e,c=i||"input,textarea",l=t.find(c),h={};return l.each(function(){u=n(this);u.is("input[type=radio]")?(e=u.attr("name"),h[e]||(t.find('input[type=radio]:checked[name="'+e+'"]').length===0&&(s=t.find('input[type=radio][name="'+e+'"]'),f=f.add(s)),h[e]=e)):(o=u.is("input[type=checkbox],input[type=radio]")?u.is(":checked"):!!u.val(),o===r&&(f=f.add(u)))}),f.length?f:!1},nonBlankInputs:function(n,t){return i.blankInputs(n,t,!0)},stopEverything:function(t){return n(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(n){var r=n.data("disable-with");r!==t&&(n.data("ujs:enable-with",n.html()),n.html(r));n.on("click.railsDisable",function(n){return i.stopEverything(n)});n.data("ujs:disabled",!0)},enableElement:function(n){n.data("ujs:enable-with")!==t&&(n.html(n.data("ujs:enable-with")),n.removeData("ujs:enable-with"));n.off("click.railsDisable");n.removeData("ujs:disabled")}},i.fire(r,"rails:attachBindings")){n.ajaxPrefilter(function(n,t,r){n.crossDomain||i.CSRFProtection(r)});n(window).on("pageshow.rails",function(){n(n.rails.enableSelector).each(function(){var t=n(this);t.data("ujs:disabled")&&n.rails.enableFormElement(t)});n(n.rails.linkDisableSelector).each(function(){var t=n(this);t.data("ujs:disabled")&&n.rails.enableElement(t)})});r.on("ajax:complete",i.linkDisableSelector,function(){i.enableElement(n(this))});r.on("ajax:complete",i.buttonDisableSelector,function(){i.enableFormElement(n(this))});r.on("click.rails",i.linkClickSelector,function(t){var r=n(this),u=r.data("method"),o=r.data("params"),e=t.metaKey||t.ctrlKey,f;return i.allowAction(r)?(!e&&r.is(i.linkDisableSelector)&&i.disableElement(r),i.isRemote(r))?e&&(!u||u==="GET")&&!o?!0:(f=i.handleRemote(r),f===!1?i.enableElement(r):f.fail(function(){i.enableElement(r)}),!1):u?(i.handleMethod(r),!1):void 0:i.stopEverything(t)});r.on("click.rails",i.buttonClickSelector,function(t){var r=n(this),u;return!i.allowAction(r)||!i.isRemote(r)?i.stopEverything(t):(r.is(i.buttonDisableSelector)&&i.disableFormElement(r),u=i.handleRemote(r),u===!1?i.enableFormElement(r):u.fail(function(){i.enableFormElement(r)}),!1)});r.on("change.rails",i.inputChangeSelector,function(t){var r=n(this);return!i.allowAction(r)||!i.isRemote(r)?i.stopEverything(t):(i.handleRemote(r),!1)});r.on("submit.rails",i.formSubmitSelector,function(r){var u=n(this),s=i.isRemote(u),f,e,o;if(!i.allowAction(u))return i.stopEverything(r);if(u.attr("novalidate")===t)if(u.data("ujs:formnovalidate-button")===t){if(f=i.blankInputs(u,i.requiredInputSelector,!1),f&&i.fire(u,"ajax:aborted:required",[f]))return i.stopEverything(r)}else u.data("ujs:formnovalidate-button",t);if(s)return(e=i.nonBlankInputs(u,i.fileInputSelector),e)?(setTimeout(function(){i.disableFormElements(u)},13),o=i.fire(u,"ajax:aborted:file",[e]),o||setTimeout(function(){i.enableFormElements(u)},13),o):(i.handleRemote(u),!1);setTimeout(function(){i.disableFormElements(u)},13)});r.on("click.rails",i.formInputClickSelector,function(t){var r=n(this);if(!i.allowAction(r))return i.stopEverything(t);var f=r.attr("name"),e=f?{name:f,value:r.val()}:null,u=r.closest("form");u.length===0&&(u=n("#"+r.attr("form")));u.data("ujs:submit-button",e);u.data("ujs:formnovalidate-button",r.attr("formnovalidate"));u.data("ujs:submit-button-formaction",r.attr("formaction"));u.data("ujs:submit-button-formmethod",r.attr("formmethod"))});r.on("ajax:send.rails",i.formSubmitSelector,function(t){this===t.target&&i.disableFormElements(n(this))});r.on("ajax:complete.rails",i.formSubmitSelector,function(t){this===t.target&&i.enableFormElements(n(this))});n(function(){i.refreshCSRFTokens()})}}};window.jQuery?n(jQuery):typeof exports=="object"&&typeof module=="object"&&(module.exports=n)}();$(function(){let t={},n=null,i=window.confirm.bind(window),r=function(){var r=window.event||window.confirm.caller.arguments[0],i=r.target||r.srcElement;if(n&&t[n]===!0)return t[n]=!1,!0;else{let f=$(i).data(),u=f.target;u||(u="#railsConfirmModal");let r=$(u).modal(),e=function(u){u.preventDefault();n=i;t[i]=!0;$(n).click();r.modal("toggle")};if(r.length==0)e();else{let n=$.extend({title:"確定是否執行?",confirm:"點選確認繼續執行",btnSubmit:"確認",btnCancel:"取消"},f);$(".modal-title",r).html(n.title);$(".modal-body",r).html(n.confirm);$("[data-dismiss]",r).html(n.btnCancel);$("[data-submit]",r).html(n.btnSubmit);r.modal("toggle");$("[data-submit]",r).off(".railsConfirm").on("click.railsConfirm",e)}}return!1};
1$(document.body).append('<div class="modal fade" id="railsConfirmModal" tabindex="-1" role="dialog" aria-labelledby="railsConfirmModalLabel" aria-hidden="true"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="railsConfirmModalLabel">Modal title<\/h5><\/div><div class="modal-body">...<\/div><div class="modal-footer"><button type="button" class="btn btn-secondary" data-dismiss="modal">Close<\/button><button type="button" class="btn btn-primary" data-submit>Save<\/button><\/div><\/div><\/div><\/div>');$(document.body).on("confirm","[data-confirm]",function(){window.confirm=r}).on("confirm:complete","[data-confirm]",function(){window.confirm=i})});$.fn.serializeObject=function(){var n={},t=this.serializeArray();return $.each(t,function(){n[this.name]?(n[this.name].push||(n[this.name]=[n[this.name]]),n[this.name].push(this.value||"")):n[this.name]=this.value||""}),n};Array.prototype.reduce||Object.defineProperty(Array.prototype,"reduce",{value:function(n){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof n!="function")throw new TypeError(n+" is not a function");var i=Object(this),u=i.length>>>0,t=0,r;if(arguments.length>=2)r=arguments[1];else{while(t<u&&!(t in i))t++;if(t>=u)throw new TypeError("Reduce of empty array with no initial value");r=i[t++]}while(t<u)t in i&&(r=n(r,i[t],t,i)),t++;return r}});typeof jQuery!="undefined"&&jQuery.fn.extend({serializeJson:function(n){return serializeJson(this.serializeArray(),n)}});typeof module!="undefined"&&(module.exports=serializeJson),function(){function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}return n}()({1:[function(n,t){function i(n,t,i){function u(n,r){if(u.count<=0)throw new Error("after called too many times");--u.count;n?(f=!0,t(n),t=i):u.count!==0||f||t(null,r)}var f=!1;return i=i||r,u.count=n,n===0?t():u}function r(){}t.exports=i},{}],2:[function(n,t){t.exports=function(n,t,i){var r=n.byteLength,o,f,u,e;if(t=t||0,i=i||r,n.slice)return n.slice(t,i);if(t<0&&(t+=r),i<0&&(i+=r),i>r&&(i=r),t>=r||t>=i||r===0)return new ArrayBuffer(0);for(o=new Uint8Array(n),f=new Uint8Array(i-t),u=t,e=0;u<i;u++,e++)f[e]=o[u];return f.buffer}},{}],3:[function(n,t){function i(n){n=n||{};this.ms=n.min||100;this.max=n.max||1e4;this.factor=n.factor||2;this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0;this.attempts=0}t.exports=i;i.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++),t,i;return this.jitter&&(t=Math.random(),i=Math.floor(t*this.jitter*n),n=(Math.floor(t*10)&1)==0?n-i:n+i),Math.min(n,this.max)|0};i.prototype.reset=function(){this.attempts=0};i.prototype.setMin=function(n){this.ms=n};i.prototype.setMax=function(n){this.max=n};i.prototype.setJitter=function(n){this.jitter=n}},{}],4:[function(n,t,i){(function(){"use strict";for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),r=0;r<n.length;r++)t[n.charCodeAt(r)]=r;i.encode=function(t){for(var u=new Uint8Array(t),f=u.length,i="",r=0;r<f;r+=3)i+=n[u[r]>>2],i+=n[(u[r]&3)<<4|u[r+1]>>4],i+=n[(u[r+1]&15)<<2|u[r+2]>>6],i+=n[u[r+2]&63];return f%3==2?i=i.substring(0,i.length-1)+"=":f%3==1&&(i=i.substring(0,i.length-2)+"=="),i};i.decode=function(n){var u=n.length*.75,l=n.length,i,f=0,h,e,o,c,s,r;for(n[n.length-1]==="="&&(u--,n[n.length-2]==="="&&u--),s=new ArrayBuffer(u),r=new Uint8Array(s),i=0;i<l;i+=4)h=t[n.charCodeAt(i)],e=t[n.charCodeAt(i+1)],o=t[n.charCodeAt(i+2)],c=t[n.charCodeAt(i+3)],r[f++]=h<<2|e>>4,r[f++]=(e&15)<<4|o>>2,r[f++]=(o&3)<<6|c&63;return s}})()},{}],5:[function(n,t,i){"use strict";function s(n){var i=n.length,t,r;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return t=n.indexOf("="),t===-1&&(t=i),r=t===i?0:4-t%4,[t,r]}function c(n){var t=s(n),r=t[0],i=t[1];
1return(r+i)*3/4-i}function l(n,t,i){return(t+i)*3/4-i}function a(n){for(var i,c=s(n),o=c[0],e=c[1],u=new h(l(n,o,e)),f=0,a=e>0?o-4:o,t=0;t<a;t+=4)i=r[n.charCodeAt(t)]<<18|r[n.charCodeAt(t+1)]<<12|r[n.charCodeAt(t+2)]<<6|r[n.charCodeAt(t+3)],u[f++]=i>>16&255,u[f++]=i>>8&255,u[f++]=i&255;return e===2&&(i=r[n.charCodeAt(t)]<<2|r[n.charCodeAt(t+1)]>>4,u[f++]=i&255),e===1&&(i=r[n.charCodeAt(t)]<<10|r[n.charCodeAt(t+1)]<<4|r[n.charCodeAt(t+2)]>>2,u[f++]=i>>8&255,u[f++]=i&255),u}function v(n){return u[n>>18&63]+u[n>>12&63]+u[n>>6&63]+u[n&63]}function y(n,t,i){for(var u,f=[],r=t;r<i;r+=3)u=(n[r]<<16&16711680)+(n[r+1]<<8&65280)+(n[r+2]&255),f.push(v(u));return f.join("")}function p(n){for(var t,i=n.length,e=i%3,f=[],o=16383,r=0,s=i-e;r<s;r+=o)f.push(y(n,r,r+o>s?s:r+o));return e===1?(t=n[i-1],f.push(u[t>>2]+u[t<<4&63]+"==")):e===2&&(t=(n[i-2]<<8)+n[i-1],f.push(u[t>>10]+u[t>>4&63]+u[t<<2&63]+"=")),f.join("")}var f,o;i.byteLength=c;i.toByteArray=a;i.fromByteArray=p;var u=[],r=[],h=typeof Uint8Array!="undefined"?Uint8Array:Array,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(f=0,o=e.length;f<o;++f)u[f]=e[f],r[e.charCodeAt(f)]=f;r["-".charCodeAt(0)]=62;r["_".charCodeAt(0)]=63},{}],6:[function(n,t){function u(n){return n.map(function(n){var t,i;return n.buffer instanceof ArrayBuffer?(t=n.buffer,n.byteLength!==t.byteLength&&(i=new Uint8Array(n.byteLength),i.set(new Uint8Array(t,n.byteOffset,n.byteLength)),t=i.buffer),t):n})}function f(n,t){t=t||{};var r=new i;return u(n).forEach(function(n){r.append(n)}),t.type?r.getBlob(t.type):r.getBlob()}function e(n,t){return new Blob(u(n),t||{})}var i=typeof i!="undefined"?i:typeof WebKitBlobBuilder!="undefined"?WebKitBlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:!1,r=function(){try{var n=new Blob(["hi"]);return n.size===2}catch(t){return!1}}(),o=r&&function(){try{var n=new Blob([new Uint8Array([1,2])]);return n.size===2}catch(t){return!1}}(),s=i&&i.prototype.append&&i.prototype.getBlob;typeof Blob!="undefined"&&(f.prototype=Blob.prototype,e.prototype=Blob.prototype);t.exports=function(){return r?o?Blob:e:s?f:undefined}()},{}],7:[function(){},{}],8:[function(n,t,i){(function(t){
2/*!
3 * The buffer module from node.js, for the browser.
4 *
5 * @author   Feross Aboukhadijeh <https://feross.org>
6 * @license  MIT
7 */
8function ht(){try{var n=new Uint8Array(1);return n.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},n.foo()===42}catch(t){return!1}}function f(n){if(n>h)throw new RangeError('The value "'+n+'" is invalid for option "size"');var i=new Uint8Array(n);return i.__proto__=t.prototype,i}function t(n,t,i){if(typeof n=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(n)}return k(n,t,i)}function k(n,i,r){var u,f;if(typeof n=="string")return lt(n,i);if(ArrayBuffer.isView(n))return v(n);if(n==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(s(n,ArrayBuffer)||n&&s(n.buffer,ArrayBuffer))return at(n,i,r);if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');if(u=n.valueOf&&n.valueOf(),u!=null&&u!==n)return t.from(u,i,r);if(f=vt(n),f)return f;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof n[Symbol.toPrimitive]=="function")return t.from(n[Symbol.toPrimitive]("string"),i,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);}function d(n){if(typeof n!="number")throw new TypeError('"size" argument must be of type number');else if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"');}function ct(n,t,i){return(d(n),n<=0)?f(n):t!==undefined?typeof i=="string"?f(n).fill(t,i):f(n).fill(t):f(n)}function a(n){return d(n),f(n<0?0:y(n)|0)}function lt(n,i){if((typeof i!="string"||i==="")&&(i="utf8"),!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var u=g(n,i)|0,r=f(u),e=r.write(n,i);return e!==u&&(r=r.slice(0,e)),r}function v(n){for(var i=n.length<0?0:y(n.length)|0,r=f(i),t=0;t<i;t+=1)r[t]=n[t]&255;return r}function at(n,i,r){if(i<0||n.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(n.byteLength<i+(r||0))throw new RangeError('"length" is outside of buffer bounds');var u;return u=i===undefined&&r===undefined?new Uint8Array(n):r===undefined?new Uint8Array(n,i):new Uint8Array(n,i,r),u.__proto__=t.prototype,u}function vt(n){if(t.isBuffer(n)){var r=y(n.length)|0,i=f(r);return i.length===0?i:(n.copy(i,0,0,r),i)}return n.length!==undefined?typeof n.length!="number"||b(n.length)?f(0):v(n):n.type==="Buffer"&&Array.isArray(n.data)?v(n.data):void 0}function y(n){if(n>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return n|0}function yt(n){return+n!=n&&(n=0),t.alloc(+n)}function g(n,i){var r,u,f;if(t.isBuffer(n))return n.length;if(ArrayBuffer.isView(n)||s(n,ArrayBuffer))return n.byteLength;
8if(typeof n!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);if(r=n.length,u=arguments.length>2&&arguments[2]===!0,!u&&r===0)return 0;for(f=!1;;)switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return w(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return st(n).length;default:if(f)return u?-1:w(n).length;i=(""+i).toLowerCase();f=!0}}function pt(n,t,i){var r=!1;if(((t===undefined||t<0)&&(t=0),t>this.length)||((i===undefined||i>this.length)&&(i=this.length),i<=0)||(i>>>=0,t>>>=0,i<=t))return"";for(n||(n="utf8");;)switch(n){case"hex":return ui(this,t,i);case"utf8":case"utf-8":return rt(this,t,i);case"ascii":return ii(this,t,i);case"latin1":case"binary":return ri(this,t,i);case"base64":return ni(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fi(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase();r=!0}}function o(n,t,i){var r=n[t];n[t]=n[i];n[i]=r}function nt(n,i,r,u,f){if(n.length===0)return-1;if(typeof r=="string"?(u=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,b(r)&&(r=f?0:n.length-1),r<0&&(r=n.length+r),r>=n.length){if(f)return-1;r=n.length-1}else if(r<0)if(f)r=0;else return-1;if(typeof i=="string"&&(i=t.from(i,u)),t.isBuffer(i))return i.length===0?-1:tt(n,i,r,u,f);if(typeof i=="number")return(i=i&255,typeof Uint8Array.prototype.indexOf=="function")?f?Uint8Array.prototype.indexOf.call(n,i,r):Uint8Array.prototype.lastIndexOf.call(n,i,r):tt(n,[i],r,u,f);throw new TypeError("val must be string, number or Buffer");}function tt(n,t,i,r,u){function l(n,t){return h===1?n[t]:n.readUInt16BE(t*h)}var h=1,c=n.length,o=t.length,f,e,a,s;if(r!==undefined&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(n.length<2||t.length<2)return-1;h=2;c/=2;o/=2;i/=2}if(u)for(e=-1,f=i;f<c;f++)if(l(n,f)===l(t,e===-1?0:f-e)){if(e===-1&&(e=f),f-e+1===o)return e*h}else e!==-1&&(f-=f-e),e=-1;else for(i+o>c&&(i=c-o),f=i;f>=0;f--){for(a=!0,s=0;s<o;s++)if(l(n,f+s)!==l(t,s)){a=!1;break}if(a)return f}return-1}function wt(n,t,i,r){var f,e,u,o;for(i=Number(i)||0,f=n.length-i,r?(r=Number(r),r>f&&(r=f)):r=f,e=t.length,r>e/2&&(r=e/2),u=0;u<r;++u){if(o=parseInt(t.substr(u*2,2),16),b(o))return u;n[i+u]=o}return u}function bt(n,t,i,r){return l(w(t,n.length-i),n,i,r)}function it(n,t,i,r){return l(si(t),n,i,r)}function kt(n,t,i,r){return it(n,t,i,r)}function dt(n,t,i,r){return l(st(t),n,i,r)}function gt(n,t,i,r){return l(hi(t,n.length-i),n,i,r)}function ni(n,t,i){return t===0&&i===n.length?c.fromByteArray(n):c.fromByteArray(n.slice(t,i))}function rt(n,t,i){var h,f,e,s,l,u;for(i=Math.min(n.length,i),h=[],f=t;f<i;){var o=n[f],r=null,c=o>239?4:o>223?3:o>191?2:1;if(f+c<=i)switch(c){case 1:o<128&&(r=o);break;case 2:e=n[f+1];(e&192)==128&&(u=(o&31)<<6|e&63,u>127&&(r=u));break;case 3:e=n[f+1];s=n[f+2];(e&192)==128&&(s&192)==128&&(u=(o&15)<<12|(e&63)<<6|s&63,u>2047&&(u<55296||u>57343)&&(r=u));break;case 4:e=n[f+1];s=n[f+2];l=n[f+3];(e&192)==128&&(s&192)==128&&(l&192)==128&&(u=(o&15)<<18|(e&63)<<12|(s&63)<<6|l&63,u>65535&&u<1114112&&(r=u))}r===null?(r=65533,c=1):r>65535&&(r-=65536,h.push(r>>>10&1023|55296),r=56320|r&1023);h.push(r);f+=c}return ti(h)}function ti(n){var r=n.length,i,t;if(r<=p)return String.fromCharCode.apply(String,n);for(i="",t=0;t<r;)i+=String.fromCharCode.apply(String,n.slice(t,t+=p));return i}function ii(n,t,i){var u="",r;for(i=Math.min(n.length,i),r=t;r<i;++r)u+=String.fromCharCode(n[r]&127);return u}function ri(n,t,i){var u="",r;for(i=Math.min(n.length,i),r=t;r<i;++r)u+=String.fromCharCode(n[r]);return u}function ui(n,t,i){var f=n.length,u,r;for((!t||t<0)&&(t=0),(!i||i<0||i>f)&&(i=f),u="",r=t;r<i;++r)u+=oi(n[r]);return u}function fi(n,t,i){for(var u=n.slice(t,i),f="",r=0;r<u.length;r+=2)f+=String.fromCharCode(u[r]+u[r+1]*256);return f}function r(n,t,i){if(n%1!=0||n<0)throw new RangeError("offset is not uint");if(n+t>i)throw new RangeError("Trying to access beyond buffer length");}function u(n,i,r,u,f,e){if(!t.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>f||i<e)throw new RangeError('"value" argument is out of bounds');if(r+u>n.length)throw new RangeError("Index out of range");}function ut(n,t,i,r){if(i+r>n.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range");}function ft(n,t,i,r,u){return t=+t,i=i>>>0,u||ut(n,t,i,4,34028234663852886e22,-34028234663852886e22),e.write(n,t,i,r,23,4),i+4}function et(n,t,i,r,u){return t=+t,i=i>>>0,u||ut(n,t,i,8,17976931348623157e292,-17976931348623157e292),e.write(n,t,i,r,52,8),i+8}function ei(n){if(n=n.split("=")[0],n=n.trim().replace(ot,""),n.length<2)return"";while(n.length%4!=0)n=n+"=";return n}function oi(n){return n<16?"0"+n.toString(16):n.toString(16)}function w(n,t){var f;t=t||Infinity;var i,e=n.length,u=null,r=[];for(f=0;f<e;++f){if(i=n.charCodeAt(f),i>55295&&i<57344){if(!u){if(i>56319){(t-=3)>
8-1&&r.push(239,191,189);continue}else if(f+1===e){(t-=3)>-1&&r.push(239,191,189);continue}u=i;continue}if(i<56320){(t-=3)>-1&&r.push(239,191,189);u=i;continue}i=(u-55296<<10|i-56320)+65536}else u&&(t-=3)>-1&&r.push(239,191,189);if(u=null,i<128){if((t-=1)<0)break;r.push(i)}else if(i<2048){if((t-=2)<0)break;r.push(i>>6|192,i&63|128)}else if(i<65536){if((t-=3)<0)break;r.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((t-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point");}return r}function si(n){for(var i=[],t=0;t<n.length;++t)i.push(n.charCodeAt(t)&255);return i}function hi(n,t){for(var i,f,e,r=[],u=0;u<n.length;++u){if((t-=2)<0)break;i=n.charCodeAt(u);f=i>>8;e=i%256;r.push(e);r.push(f)}return r}function st(n){return c.toByteArray(ei(n))}function l(n,t,i,r){for(var u=0;u<r;++u){if(u+i>=t.length||u>=n.length)break;t[u+i]=n[u]}return u}function s(n,t){return n instanceof t||n!=null&&n.constructor!=null&&n.constructor.name!=null&&n.constructor.name===t.name}function b(n){return n!==n}var c,e,h,p,ot;c=n("base64-js");e=n("ieee754");i.Buffer=t;i.SlowBuffer=yt;i.INSPECT_MAX_BYTES=50;h=2147483647;i.kMaxLength=h;t.TYPED_ARRAY_SUPPORT=ht();t.TYPED_ARRAY_SUPPORT||typeof console=="undefined"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){return t.isBuffer(this)?this.buffer:undefined}});Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){return t.isBuffer(this)?this.byteOffset:undefined}});typeof Symbol!="undefined"&&Symbol.species!=null&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1});t.poolSize=8192;t.from=function(n,t,i){return k(n,t,i)};t.prototype.__proto__=Uint8Array.prototype;t.__proto__=Uint8Array;t.alloc=function(n,t,i){return ct(n,t,i)};t.allocUnsafe=function(n){return a(n)};t.allocUnsafeSlow=function(n){return a(n)};t.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==t.prototype};t.compare=function(n,i){var u,f,r,e;if(s(n,Uint8Array)&&(n=t.from(n,n.offset,n.byteLength)),s(i,Uint8Array)&&(i=t.from(i,i.offset,i.byteLength)),!t.isBuffer(n)||!t.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===i)return 0;for(u=n.length,f=i.length,r=0,e=Math.min(u,f);r<e;++r)if(n[r]!==i[r]){u=n[r];f=i[r];break}return u<f?-1:f<u?1:0};t.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};t.concat=function(n,i){var r,f,e,u;if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return t.alloc(0);if(i===undefined)for(i=0,r=0;r<n.length;++r)i+=n[r].length;for(f=t.allocUnsafe(i),e=0,r=0;r<n.length;++r){if(u=n[r],s(u,Uint8Array)&&(u=t.from(u)),!t.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(f,e);e+=u.length}return f};t.byteLength=g;t.prototype._isBuffer=!0;t.prototype.swap16=function(){var t=this.length,n;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(n=0;n<t;n+=2)o(this,n,n+1);return this};t.prototype.swap32=function(){var t=this.length,n;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(n=0;n<t;n+=4)o(this,n,n+3),o(this,n+1,n+2);return this};t.prototype.swap64=function(){var t=this.length,n;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(n=0;n<t;
8n+=8)o(this,n,n+7),o(this,n+1,n+6),o(this,n+2,n+5),o(this,n+3,n+4);return this};t.prototype.toString=function(){var n=this.length;return n===0?"":arguments.length===0?rt(this,0,n):pt.apply(this,arguments)};t.prototype.toLocaleString=t.prototype.toString;t.prototype.equals=function(n){if(!t.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:t.compare(this,n)===0};t.prototype.inspect=function(){var n="",t=i.INSPECT_MAX_BYTES;return n=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(n+=" ... "),"<Buffer "+n+">"};t.prototype.compare=function(n,i,r,u,f){var e;if(s(n,Uint8Array)&&(n=t.from(n,n.offset,n.byteLength)),!t.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(i===undefined&&(i=0),r===undefined&&(r=n?n.length:0),u===undefined&&(u=0),f===undefined&&(f=this.length),i<0||r>n.length||u<0||f>this.length)throw new RangeError("out of range index");if(u>=f&&i>=r)return 0;if(u>=f)return-1;if(i>=r)return 1;if(i>>>=0,r>>>=0,u>>>=0,f>>>=0,this===n)return 0;var o=f-u,h=r-i,a=Math.min(o,h),c=this.slice(u,f),l=n.slice(i,r);for(e=0;e<a;++e)if(c[e]!==l[e]){o=c[e];h=l[e];break}return o<h?-1:h<o?1:0};t.prototype.includes=function(n,t,i){return this.indexOf(n,t,i)!==-1};t.prototype.indexOf=function(n,t,i){return nt(this,n,t,i,!0)};t.prototype.lastIndexOf=function(n,t,i){return nt(this,n,t,i,!1)};t.prototype.write=function(n,t,i,r){var u,f;if(t===undefined)r="utf8",i=this.length,t=0;else if(i===undefined&&typeof t=="string")r=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,r===undefined&&(r="utf8")):(r=i,i=undefined);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");if(u=this.length-t,(i===undefined||i>u)&&(i=u),n.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");for(r||(r="utf8"),f=!1;;)switch(r){case"hex":return wt(this,n,t,i);case"utf8":case"utf-8":return bt(this,n,t,i);case"ascii":return it(this,n,t,i);case"latin1":case"binary":return kt(this,n,t,i);case"base64":return dt(this,n,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,n,t,i);default:if(f)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase();f=!0}};t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};p=4096;t.prototype.slice=function(n,i){var r=this.length,u;return n=~~n,i=i===undefined?r:~~i,n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),i<0?(i+=r,i<0&&(i=0)):i>r&&(i=r),i<n&&(i=n),u=this.subarray(n,i),u.__proto__=t.prototype,u};t.prototype.readUIntLE=function(n,t,i){n=n>>>0;t=t>>>0;i||r(n,t,this.length);for(var u=this[n],f=1,e=0;++e<t&&(f*=256);)u+=this[n+e]*f;return u};t.prototype.readUIntBE=function(n,t,i){n=n>>>0;t=t>>>0;i||r(n,t,this.length);for(var u=this[n+--t],f=1;t>0&&(f*=256);)u+=this[n+--t]*f;return u};t.prototype.readUInt8=function(n,t){return n=n>>>0,t||r(n,1,this.length),this[n]};t.prototype.readUInt16LE=function(n,t){return n=n>>>0,t||r(n,2,this.length),this[n]|this[n+1]<<8};t.prototype.readUInt16BE=function(n,t){return n=n>>>0,t||r(n,2,this.length),this[n]<<8|this[n+1]};t.prototype.readUInt32LE=function(n,t){return n=n>>>0,t||r(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216};t.prototype.readUInt32BE=function(n,t){return n=n>>>0,t||r(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])};t.prototype.readIntLE=function(n,t,i){n=n>>>0;t=t>>>0;i||r(n,t,this.length);for(var u=this[n],f=1,e=0;++e<t&&(f*=256);)u+=this[n+e]*f;return f*=128,u>=f&&(u-=Math.pow(2,8*t)),u};t.prototype.readIntBE=function(n,t,i){n=n>>>0;t=t>>>0;i||r(n,t,this.length);for(var e=t,u=1,f=this[n+--e];e>0&&(u*=256);)f+=this[n+--e]*u;return u*=128,f>=u&&(f-=Math.pow(2,8*t)),f};t.prototype.readInt8=function(n,t){return(n=n>>>0,t||r(n,1,this.length),!(this[n]&128))?this[n]:(256-this[n])*-1};t.prototype.readInt16LE=function(n,t){n=n>>>0;t||r(n,2,this.length);var i=this[n]|this[n+1]<<8;return i&32768?i|4294901760:i};t.prototype.readInt16BE=function(n,t){n=n>>>0;t||r(n,2,this.length);var i=this[n+1]|this[n]<<8;return i&32768?i|4294901760:i};t.prototype.readInt32LE=function(n,t){return n=n>>>0,t||r(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24};t.prototype.readInt32BE=function(n,t){return n=n>>>0,t||r(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]};t.prototype.readFloatLE=function(n,t){return n=n>>>0,t||r(n,4,this.length),e.read(this,n,!0,23,4)};t.prototype.readFloatBE=function(n,t){return n=n>>>0,t||r(n,4,this.length),e.read(this,n,!1,23,4)};t.prototype.readDoubleLE=function(n,t){return n=n>>>0,t||r(n,8,this.length),e.read(this,n,!0,52,8)};t.prototype.readDoubleBE=function(n,t){return n=n>>>0,t||r(n,8,this.length),e.read(this,n,!1,52,8)};t.prototype.writeUIntLE=function(n,t,i,r){var o,f,e;for(n=+n,t=t>>>0,i=i>>>0,r||(o=Math.pow(2,8*i)-1,u(this,n,t,i,o,0)),f=1,e=0,this[t]=n&255;++e<i&&(f*=256);)this[t+e]=n/f&255;return t+i};t.prototype.writeUIntBE=function(n,t,i,r){var o,f,e;for(n=+n,t=t>>>0,i=i>>>0,r||(o=Math.pow(2,8*i)-1,u(this,n,t,i,o,0)),f=i-1,e=1,this[t+f]=n&255;--f>=0&&(e*=256);)this[t+f]=n/e&255;return t+i};t.prototype.writeUInt8=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,1,255,0),this[t]=n&255,t+1};t.prototype.writeUInt16LE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,2,65535,0),this[t]=n&255,this[t+1]=n>>>8,t+2};t.prototype.writeUInt16BE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,2,65535,0),this[t]=n>>>8,this[t+1]=n&255,t+2};t.prototype.writeUInt32LE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,4,4294967295,0),this[t+3]=n>>>24,this[t+2]=n>>>16,this[t+1]=n>>>8,this[t]=n&255,t+4};t.prototype.writeUInt32BE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,4,4294967295,0),this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=n&255,t+4};t.prototype.writeIntLE=function(n,t,i,r){var f;n=+n;t=t>>>0;r||(f=Math.pow(2,8*i-1),u(this,n,t,i,f-1,-f));var e=0,s=1,o=0;for(this[t]=n&255;++e<i&&(s*=256);)n<0&&o===0&&this[t+e-1]!==0&&(o=1),this[t+e]=(n/s>>0)-o&255;return t+i};t.prototype.writeIntBE=function(n,t,i,r){var e;n=+n;t=t>>>0;r||(e=Math.pow(2,8*i-1),u(this,n,t,i,e-1,-e));var f=i-1,s=1,o=0;for(this[t+f]=n&255;--f>=0&&(s*=256);)n<0&&o===0&&this[t+f+1]!==0&&(o=1),this[t+f]=(n/s>>0)-o&255;return t+i};t.prototype.writeInt8=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,1,127,-128),n<0&&(n=255+n+1),this[t]=n&255,t+1};t.prototype.writeInt16LE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,2,32767,-32768),this[t]=n&255,this[t+1]=n>>>8,t+2};t.prototype.writeInt16BE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,2,32767,-32768),this[t]=n>>>8,this[t+1]=n&255,t+2};t.prototype.writeInt32LE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,4,2147483647,-2147483648),this[t]=n&255,this[t+1]=n>>>8,this[t+2]=n>>>16,this[t+3]=n>>>24,t+4};t.prototype.writeInt32BE=function(n,t,i){return n=+n,t=t>>>0,i||u(this,n,t,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=n&255,t+4};t.prototype.writeFloatLE=function(n,t,i){return ft(this,n,t,!0,i)};t.prototype.writeFloatBE=function(n,t,i){return ft(this,n,t,!1,i)};t.prototype.writeDoubleLE=function(n,t,i){return et(this,n,t,!0,i)};t.prototype.writeDoubleBE=function(n,t,i){return et(this,n,t,!1,i)};t.prototype.copy=function(n,i,r,u){var e,f;if(!t.isBuffer(n))throw new TypeError("argument should be a Buffer");if((r||(r=0),u||u===0||(u=this.length),i>=n.length&&(i=n.length),i||(i=0),u>0&&u<r&&(u=r),u===r)||n.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("sourceEnd out of bounds");if(u>this.length&&(u=this.length),n.length-i<u-r&&(u=n.length-i+r),e=u-r,this===n&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(i,r,u);else if(this===n&&r<i&&i<u)for(f=e-1;f>=0;--f)n[f+i]=this[f+r];else Uint8Array.prototype.set.call(n,this.subarray(r,u),i);return e};t.prototype.fill=function(n,i,r,u){var e,f,o,s;if(typeof n=="string"){if(typeof i=="string"?(u=i,i=0,r=this.length):typeof r=="string"&&(u=r,r=this.length),u!==undefined&&typeof u!="string")throw new TypeError("encoding must be a string");if(typeof u=="string"&&!t.isEncoding(u))throw new TypeError("Unknown encoding: "+u);n.length===1&&(e=n.charCodeAt(0),(u==="utf8"&&e<128||u==="latin1")&&(n=e))}else typeof n=="number"&&(n=n&255);if(i<0||this.length<i||this.length<r)throw new RangeError("Out of range index");if(r<=i)return this;if(i=i>>>0,r=r===undefined?this.length:r>>>0,n||(n=0),typeof n=="number")for(f=i;f<r;++f)this[f]=n;else{if(o=t.isBuffer(n)?n:t.from(n,u),s=o.length,s===0)throw new TypeError('The value "'+n+'" is 
8invalid for argument "value"');for(f=0;f<r-i;++f)this[f+i]=o[f%s]}return this};ot=/[^+/0-9A-Za-z-_]/g}).call(this,n("buffer").Buffer)},{"base64-js":5,buffer:8,ieee754:28}],9:[function(n,t){var i=[].slice;t.exports=function(n,t){if("string"==typeof t&&(t=n[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=i.call(arguments,2);return function(){return t.apply(n,r.concat(i.call(arguments)))}}},{}],10:[function(n,t){function i(n){if(n)return r(n)}function r(n){for(var t in i.prototype)n[t]=i.prototype[t];return n}typeof t!="undefined"&&(t.exports=i);i.prototype.on=i.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};i.prototype.once=function(n,t){function i(){this.off(n,i);t.apply(this,arguments)}i.fn=t;this.on(n,i);return this};i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(n,t){var i,u,r;if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;if(i=this._callbacks["$"+n],!i)return this;if(1==arguments.length)return delete this._callbacks["$"+n],this;for(r=0;r<i.length;r++)if(u=i[r],u===t||u.fn===t){i.splice(r,1);break}return this};i.prototype.emit=function(n){var r,t,i,u;if(this._callbacks=this._callbacks||{},r=[].slice.call(arguments,1),t=this._callbacks["$"+n],t)for(t=t.slice(0),i=0,u=t.length;i<u;++i)t[i].apply(this,r);return this};i.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};i.prototype.hasListeners=function(n){return!!this.listeners(n).length}},{}],11:[function(n,t){t.exports=function(n,t){var i=function(){};i.prototype=t.prototype;n.prototype=new i;n.prototype.constructor=n}},{}],12:[function(n,t){t.exports=n("./socket");t.exports.parser=n("engine.io-parser")},{"./socket":13,"engine.io-parser":23}],13:[function(n,t){function i(n,t){if(!(this instanceof i))return new i(n,t);t=t||{};n&&"object"==typeof n&&(t=n,n=null);n?(n=f(n),t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)):t.host&&(t.hostname=f(t.host).host);this.secure=null!=t.secure?t.secure:typeof location!="undefined"&&"https:"===location.protocol;t.hostname&&!t.port&&(t.port=this.secure?"443":"80");this.agent=t.agent||!1;this.hostname=t.hostname||(typeof location!="undefined"?location.hostname:"localhost");this.port=t.port||(typeof location!="undefined"&&location.port?location.port:this.secure?443:80);this.query=t.query||{};"string"==typeof this.query&&(this.query=h.decode(this.query));this.upgrade=!1!==t.upgrade;this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/";this.forceJSONP=!!t.forceJSONP;this.jsonp=!1!==t.jsonp;this.forceBase64=!!t.forceBase64;this.enablesXDR=!!t.enablesXDR;this.timestampParam=t.timestampParam||"t";this.timestampRequests=t.timestampRequests;this.transports=t.transports||["polling","websocket"];this.transportOptions=t.transportOptions||{};this.readyState="";this.writeBuffer=[];this.prevBufferLen=0;this.policyPort=t.policyPort||843;this.rememberUpgrade=t.rememberUpgrade||!1;this.binaryType=null;this.onlyBinaryUpgrades=t.onlyBinaryUpgrades;this.perMessageDeflate=!1!==t.perMessageDeflate?t.perMessageDeflate||{}:!1;!0===this.perMessageDeflate&&(this.perMessageDeflate={});this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024);this.pfx=t.pfx||null;this.key=t.key||null;this.passphrase=t.passphrase||null;this.cert=t.cert||null;this.ca=t.ca||null;this.ciphers=t.ciphers||null;this.rejectUnauthorized=t.rejectUnauthorized===undefined?!0:t.rejectUnauthorized;this.forceNode=!!t.forceNode;this.isReactNative=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";(typeof self=="undefined"||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress));this.id=null;this.upgrades=null;this.pingInterval=null;this.pingTimeout=null;this.pingIntervalTimer=null;this.pingTimeoutTimer=null;this.open()}function c(n){var i={};for(var t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i}var e=n("./transports/index"),o=n("component-emitter"),r=n("debug")("engine.io-client:socket"),s=n("indexof"),u=n("engine.io-parser"),f=n("parseuri"),h=n("parseqs");t.exports=i;i.priorWebsocketSuccess=!1;o(i.prototype);i.protocol=u.protocol;i.Socket=i;i.Transport=n("./transport");i.transports=n("./transports/index");i.parser=n("engine.io-parser");i.prototype.createTransport=function(n){var i,t;return r('creating transport "%s"',n),i=c(this.query),i.EIO=u.protocol,i.transport=n,t=this.transportOptions[n]||{},this.id&&(i.sid=this.id),new e[n]({query:i,socket:this,agent:t.agent||this.agent,hostname:t.hostname||this.hostname,port:t.port||this.port,secure:t.secure||this.secure,path:t.path||this.path,forceJSONP:t.forceJSONP||this.forceJSONP,jsonp:t.jsonp||this.jsonp,forceBase64:t.forceBase64||this.forceBase64,enablesXDR:t.enablesXDR||this.enablesXDR,timestampRequests:t.t
8imestampRequests||this.timestampRequests,timestampParam:t.timestampParam||this.timestampParam,policyPort:t.policyPort||this.policyPort,pfx:t.pfx||this.pfx,key:t.key||this.key,passphrase:t.passphrase||this.passphrase,cert:t.cert||this.cert,ca:t.ca||this.ca,ciphers:t.ciphers||this.ciphers,rejectUnauthorized:t.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:t.perMessageDeflate||this.perMessageDeflate,extraHeaders:t.extraHeaders||this.extraHeaders,forceNode:t.forceNode||this.forceNode,localAddress:t.localAddress||this.localAddress,requestTimeout:t.requestTimeout||this.requestTimeout,protocols:t.protocols||void 0,isReactNative:this.isReactNative})};i.prototype.open=function(){var n,t;if(this.rememberUpgrade&&i.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)n="websocket";else{if(0===this.transports.length){t=this;setTimeout(function(){t.emit("error","No transports available")},0);return}n=this.transports[0]}this.readyState="opening";try{n=this.createTransport(n)}catch(r){this.transports.shift();this.open();return}n.open();this.setTransport(n)};i.prototype.setTransport=function(n){r("setting transport %s",n.name);var t=this;this.transport&&(r("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners());this.transport=n;n.on("drain",function(){t.onDrain()}).on("packet",function(n){t.onPacket(n)}).on("error",function(n){t.onError(n)}).on("close",function(){t.onClose("transport close")})};i.prototype.probe=function(n){function o(){if(u.onlyBinaryUpgrades){var e=!this.supportsBinary&&u.transport.supportsBinary;f=f||e}if(!f){r('probe transport "%s" opened',n);t.send([{type:"ping",data:"probe"}]);t.once("packet",function(e){if(!f)if("pong"===e.type&&"probe"===e.data){if(r('probe transport "%s" pong',n),u.upgrading=!0,u.emit("upgrading",t),!t)return;i.priorWebsocketSuccess="websocket"===t.name;r('pausing current transport "%s"',u.transport.name);u.transport.pause(function(){f||"closed"!==u.readyState&&(r("changing transport and sending upgrade packet"),a(),u.setTransport(t),t.send([{type:"upgrade"}]),u.emit("upgrade",t),t=null,u.upgrading=!1,u.flush())})}else{r('probe transport "%s" failed',n);var o=new Error("probe error");o.transport=t.name;u.emit("upgradeError",o)}})}}function s(){f||(f=!0,a(),t.close(),t=null)}function e(i){var f=new Error("probe error: "+i);f.transport=t.name;s();r('probe transport "%s" failed because of error: %s',n,i);u.emit("upgradeError",f)}function h(){e("transport closed")}function c(){e("socket closed")}function l(n){t&&n.name!==t.name&&(r('"%s" works - aborting "%s"',n.name,t.name),s())}function a(){t.removeListener("open",o);t.removeListener("error",e);t.removeListener("close",h);u.removeListener("close",c);u.removeListener("upgrading",l)}r('probing transport "%s"',n);var t=this.createTransport(n,{probe:1}),f=!1,u=this;i.priorWebsocketSuccess=!1;t.once("open",o);t.once("error",e);t.once("close",h);this.once("close",c);this.once("upgrading",l);t.open()};i.prototype.onOpen=function(){if(r("socket open"),this.readyState="open",i.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){r("starting upgrade probes");for(var n=0,t=this.upgrades.length;n<t;n++)this.probe(this.upgrades[n])}};i.prototype.onPacket=function(n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){r('socket receive: type "%s", data "%s"',n.type,n.data);this.emit("packet",n);this.emit("heartbeat");switch(n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"pong":this.setPing();this.emit("pong");break;case"error":var t=new Error("server error");t.code=n.data;this.onError(t);break;
8case"message":this.emit("data",n.data);this.emit("message",n.data)}}else r('packet received with socket readyState "%s"',this.readyState)};i.prototype.onHandshake=function(n){if(this.emit("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this.upgrades=this.filterUpgrades(n.upgrades),this.pingInterval=n.pingInterval,this.pingTimeout=n.pingTimeout,this.onOpen(),"closed"!==this.readyState){this.setPing();this.removeListener("heartbeat",this.onHeartbeat);this.on("heartbeat",this.onHeartbeat)}};i.prototype.onHeartbeat=function(n){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){if("closed"!==t.readyState)t.onClose("ping timeout")},n||t.pingInterval+t.pingTimeout)};i.prototype.setPing=function(){var n=this;clearTimeout(n.pingIntervalTimer);n.pingIntervalTimer=setTimeout(function(){r("writing ping packet - expecting pong within %sms",n.pingTimeout);n.ping();n.onHeartbeat(n.pingTimeout)},n.pingInterval)};i.prototype.ping=function(){var n=this;this.sendPacket("ping",function(){n.emit("ping")})};i.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;0===this.writeBuffer.length?this.emit("drain"):this.flush()};i.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(r("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))};i.prototype.write=i.prototype.send=function(n,t,i){return this.sendPacket("message",n,t,i),this};i.prototype.sendPacket=function(n,t,i,r){if("function"==typeof t&&(r=t,t=undefined),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){i=i||{};i.compress=!1!==i.compress;var u={type:n,data:t,options:i};if(this.emit("packetCreate",u),this.writeBuffer.push(u),r)this.once("flush",r);this.flush()}};i.prototype.close=function(){function i(){n.onClose("forced close");r("socket closing - telling transport to close");n.transport.close()}function t(){n.removeListener("upgrade",t);n.removeListener("upgradeError",t);i()}function u(){n.once("upgrade",t);n.once("upgradeError",t)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var n=this;if(this.writeBuffer.length)this.once("drain",function(){this.upgrading?u():i()});else this.upgrading?u():i()}return this};i.prototype.onError=function(n){r("socket error %j",n);i.priorWebsocketSuccess=!1;this.emit("error",n);this.onClose("transport error",n)};i.prototype.onClose=function(n,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){r('socket close with reason: "%s"',n);var i=this;clearTimeout(this.pingIntervalTimer);clearTimeout(this.pingTimeoutTimer);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();this.readyState="closed";this.id=null;this.emit("close",n,t);i.writeBuffer=[];i.prevBufferLen=0}};i.prototype.filterUpgrades=function(n){for(var i=[],t=0,r=n.length;t<r;t++)~s(this.transports,n[t])&&i.push(n[t]);return i}},{"./transport":14,"./transports/index":15,"component-emitter":10,debug:21,"engine.io-parser":23,indexof:29,parseqs:32,parseuri:33}],14:[function(n,t){function i(n){this.path=n.path;this.hostname=n.hostname;this.port=n.port;this.secure=n.secure;this.query=n.query;this.timestampParam=n.timestampParam;this.timestampRequests=n.timestampRequests;this.readyState="";this.agent=n.agent||!1;this.socket=n.socket;this.enablesXDR=n.enablesXDR;this.pfx=n.pfx;this.key=n.key;this.passphrase=n.passphrase;this.cert=n.cert;this.ca=n.ca;this.ciphers=n.ciphers;this.rejectUnauthorized=n.rejectUnauthorized;
8this.forceNode=n.forceNode;this.isReactNative=n.isReactNative;this.extraHeaders=n.extraHeaders;this.localAddress=n.localAddress}var r=n("engine.io-parser"),u=n("component-emitter");t.exports=i;u(i.prototype);i.prototype.onError=function(n,t){var i=new Error(n);return i.type="TransportError",i.description=t,this.emit("error",i),this};i.prototype.open=function(){return("closed"===this.readyState||""===this.readyState)&&(this.readyState="opening",this.doOpen()),this};i.prototype.close=function(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this};i.prototype.send=function(n){if("open"===this.readyState)this.write(n);else throw new Error("Transport not open");};i.prototype.onOpen=function(){this.readyState="open";this.writable=!0;this.emit("open")};i.prototype.onData=function(n){var t=r.decodePacket(n,this.socket.binaryType);this.onPacket(t)};i.prototype.onPacket=function(n){this.emit("packet",n)};i.prototype.onClose=function(){this.readyState="closed";this.emit("close")}},{"component-emitter":10,"engine.io-parser":23}],15:[function(n,t,i){function o(n){var e,o=!1,s=!1,h=!1!==n.jsonp,i,t;if(typeof location!="undefined"&&(i="https:"===location.protocol,t=location.port,t||(t=i?443:80),o=n.hostname!==location.hostname||t!==n.port,s=n.secure!==i),n.xdomain=o,n.xscheme=s,e=new r(n),"open"in e&&!n.forceJSONP)return new u(n);if(!h)throw new Error("JSONP disabled");return new f(n)}var r=n("xmlhttprequest-ssl"),u=n("./polling-xhr"),f=n("./polling-jsonp"),e=n("./websocket");i.polling=o;i.websocket=e},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,"xmlhttprequest-ssl":20}],16:[function(n,t){(function(i){function h(){}function c(){return typeof self!="undefined"?self:typeof window!="undefined"?window:typeof i!="undefined"?i:{}}function r(n){var i,t;f.call(this,n);this.query=this.query||{};u||(i=c(),u=i.___eio=i.___eio||[]);this.index=u.length;t=this;u.push(function(n){t.onData(n)});this.query.j=this.index;typeof addEventListener=="function"&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=h)},!1)}var f=n("./polling"),s=n("component-inherit"),e,o,u;t.exports=r;e=/\n/g;o=/\\n/g;s(r,f);r.prototype.supportsBinary=!1;r.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null);f.prototype.doClose.call(this)};r.prototype.doPoll=function(){var r=this,n=document.createElement("script"),t,i;this.script&&(this.script.parentNode.removeChild(this.script),this.script=null);n.async=!0;n.src=this.uri();n.onerror=function(n){r.onError("jsonp poll error",n)};t=document.getElementsByTagName("script")[0];t?t.parentNode.insertBefore(n,t):(document.head||document.body).appendChild(n);this.script=n;i="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);i&&setTimeout(function(){var n=document.createElement("iframe");document.body.appendChild(n);document.body.removeChild(n)},100)};r.prototype.doWrite=function(n,t){function s(){h();t()}function h(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(n){i.onError("jsonp polling iframe removal error",n)}try{var t='<iframe src="javascript:0" name="'+i.iframeId+'">';u=document.createElement(t)}catch(n){u=document.createElement("iframe");u.name=i.iframeId;u.src="javascript:0"}u.id=i.iframeId;i.form.appendChild(u);i.iframe=u}var i=this;if(!this.form){var r=document.createElement("form"),f=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index,u;r.className="socketio";r.style.position="absolute";r.style.top="-1000px";r.style.left="-1000px";r.target=c;r.method="POST";r.setAttribute("accept-charset","utf-8");f.name="d";r.appendChild(f);document.body.appendChild(r);this.form=r;this.area=f}this.form.action=this.uri();h();n=n.replace(o,"\\\n");this.area.value=n.replace(e,"\\n");try{this.form.submit()}catch(l){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){i.iframe.readyState==="complete"&&s()}:this.iframe.onload=s}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./polling":18,"component-inherit":11}],17:[function(n,t){function e(){}function r(n){if(f.call(this,n),this.requestTimeout=n.requestTimeout,this.extraHeaders=n.extraHeaders,typeof location!="undefined"){var i="https:"===location.protocol,t=location.port;t||(t=i?443:80);this.xd=typeof location!="undefined"&&n.hostname!==location.hostname||t!==n.port;this.xs=n.secure!==i}}function i(n){this.method=n.method||"GET";this.uri=n.uri;this.xd=!!n.xd;this.xs=!!n.xs;this.async=!1!==n.async;this.data=undefined!==n.data?n.data:null;this.agent=n.agent;this.isBinary=n.isBinary;this.supportsBinary=n.supportsBinary;this.enablesXDR=n.enablesXDR;this.requestTimeout=n.requestTimeout;this.pfx=n.pfx;this.key=n.key;this.passphrase=n.passphrase;this.cert=n.cert;
8this.ca=n.ca;this.ciphers=n.ciphers;this.rejectUnauthorized=n.rejectUnauthorized;this.extraHeaders=n.extraHeaders;this.create()}function s(){for(var n in i.requests)i.requests.hasOwnProperty(n)&&i.requests[n].abort()}var h=n("xmlhttprequest-ssl"),f=n("./polling"),c=n("component-emitter"),l=n("component-inherit"),u=n("debug")("engine.io-client:polling-xhr"),o;t.exports=r;t.exports.Request=i;l(r,f);r.prototype.supportsBinary=!0;r.prototype.request=function(n){return n=n||{},n.uri=this.uri(),n.xd=this.xd,n.xs=this.xs,n.agent=this.agent||!1,n.supportsBinary=this.supportsBinary,n.enablesXDR=this.enablesXDR,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,n.requestTimeout=this.requestTimeout,n.extraHeaders=this.extraHeaders,new i(n)};r.prototype.doWrite=function(n,t){var r=typeof n!="string"&&n!==undefined,i=this.request({method:"POST",data:n,isBinary:r}),u=this;i.on("success",t);i.on("error",function(n){u.onError("xhr post error",n)});this.sendXhr=i};r.prototype.doPoll=function(){u("xhr poll");var n=this.request(),t=this;n.on("data",function(n){t.onData(n)});n.on("error",function(n){t.onError("xhr poll error",n)});this.pollXhr=n};c(i.prototype);i.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR},n,r,f;t.pfx=this.pfx;t.key=this.key;t.passphrase=this.passphrase;t.cert=this.cert;t.ca=this.ca;t.ciphers=this.ciphers;t.rejectUnauthorized=this.rejectUnauthorized;n=this.xhr=new h(t);r=this;try{u("xhr open %s: %s",this.method,this.uri);n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(f in this.extraHeaders)this.extraHeaders.hasOwnProperty(f)&&n.setRequestHeader(f,this.extraHeaders[f])}}catch(e){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in n&&(n.withCredentials=!0);this.requestTimeout&&(n.timeout=this.requestTimeout);this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){if(n.readyState===2)try{var t=n.getResponseHeader("Content-Type");r.supportsBinary&&t==="application/octet-stream"&&(n.responseType="arraybuffer")}catch(i){}4===n.readyState&&(200===n.status||1223===n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))};u("xhr data %s",this.data);n.send(this.data)}catch(e){setTimeout(function(){r.onError(e)},0);return}typeof document!="undefined"&&(this.index=i.requestsCount++,i.requests[this.index]=this)};i.prototype.onSuccess=function(){this.emit("success");this.cleanup()};i.prototype.onData=function(n){this.emit("data",n);this.onSuccess()};i.prototype.onError=function(n){this.emit("error",n);this.cleanup(!0)};i.prototype.cleanup=function(n){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=e:this.xhr.onreadystatechange=e,n)try{this.xhr.abort()}catch(t){}typeof document!="undefined"&&delete i.requests[this.index];this.xhr=null}};i.prototype.onLoad=function(){var n,t;try{try{t=this.xhr.getResponseHeader("Content-Type")}catch(i){}n=t==="application/octet-stream"?this.xhr.response||this.xhr.responseText:this.xhr.responseText}catch(i){this.onError(i)}if(null!=n)this.onData(n)};i.prototype.hasXDR=function(){return typeof XDomainRequest!="undefined"&&!this.xs&&this.enablesXDR};i.prototype.abort=function(){this.cleanup()};i.requestsCount=0;i.requests={};typeof document!="undefined"&&(typeof attachEvent=="function"?attachEvent("onunload",s):typeof addEventListener=="function"&&(o="onpagehide"in self?"pagehide":"unload",addEventListener(o,s,!1)))},{"./polling":18,"component-emitter":10,"component-inherit":11,debug:21,"xmlhttprequest-ssl":20}],18:[function(n,t){function r(n){var t=n&&n.forceBase64;(!e||t)&&(this.supportsBinary=!1);u.call(this,n)}var u=n("../transport"),o=n("parseqs"),f=n("engine.io-parser"),s=n("component-inherit"),h=n("yeast"),i=n("debug")("engine.io-client:polling"),e;t.exports=r;e=function(){var t=n("xmlhttprequest-ssl"),i=new t({xdomain:!1});return null!=i.responseType}();s(r,u);r.prototype.name="polling";r.prototype.doOpen=function(){this.poll()};r.prototype.pause=function(n){function r(){i("paused");u.readyState="paused";n()}var u=this,t;if(this.readyState="pausing",this.polling||!this.writable){if(t=0,this.polling){i("we are currently polling - waiting to pause");t++;this.once("pollComplete",function(){i("pre-pause polling complete");--t||r()})}if(!this.writable){i("we are currently writing - waiting to pause");t++;this.once("drain",function(){i("pre-pause writing complete");--t||r()})}}else r()};r.prototype.poll=function(){i("polling");this.polling=!0;this.doPoll();
8this.emit("poll")};r.prototype.onData=function(n){var t=this,r;i("polling got data %s",n);r=function(n){if("opening"===t.readyState&&t.onOpen(),"close"===n.type)return t.onClose(),!1;t.onPacket(n)};f.decodePayload(n,this.socket.binaryType,r);"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():i('ignoring poll - transport state "%s"',this.readyState))};r.prototype.doClose=function(){function n(){i("writing close packet");t.write([{type:"close"}])}var t=this;if("open"===this.readyState)i("transport open - closing"),n();else{i("transport not open - deferring close");this.once("open",n)}};r.prototype.write=function(n){var t=this,i;this.writable=!1;i=function(){t.writable=!0;t.emit("drain")};f.encodePayload(n,this.supportsBinary,function(n){t.doWrite(n,i)})};r.prototype.uri=function(){var n=this.query||{},t=this.secure?"https":"http",i="",r;return!1!==this.timestampRequests&&(n[this.timestampParam]=h()),this.supportsBinary||n.sid||(n.b64=1),n=o.encode(n),this.port&&("https"===t&&Number(this.port)!==443||"http"===t&&Number(this.port)!==80)&&(i=":"+this.port),n.length&&(n="?"+n),r=this.hostname.indexOf(":")!==-1,t+"://"+(r?"["+this.hostname+"]":this.hostname)+i+this.path+n}},{"../transport":14,"component-inherit":11,debug:21,"engine.io-parser":23,parseqs:32,"xmlhttprequest-ssl":20,yeast:48}],19:[function(n,t){(function(i){function r(n){var t=n&&n.forceBase64;t&&(this.supportsBinary=!1);this.perMessageDeflate=n.perMessageDeflate;
8this.usingBrowserWebSocket=f&&!n.forceNode;this.protocols=n.protocols;this.usingBrowserWebSocket||(u=o);e.call(this,n)}var e=n("../transport"),s=n("engine.io-parser"),h=n("parseqs"),c=n("component-inherit"),l=n("yeast"),a=n("debug")("engine.io-client:websocket"),f,o,u;if(typeof WebSocket!="undefined")f=WebSocket;else if(typeof self!="undefined")f=self.WebSocket||self.MozWebSocket;else try{o=n("ws")}catch(v){}u=f||o;t.exports=r;c(r,e);r.prototype.name="websocket";r.prototype.supportsBinary=!0;r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),i=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx;n.key=this.key;n.passphrase=this.passphrase;n.cert=this.cert;n.ca=this.ca;n.ciphers=this.ciphers;n.rejectUnauthorized=this.rejectUnauthorized;this.extraHeaders&&(n.headers=this.extraHeaders);this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?i?new u(t,i):new u(t):new u(t,i,n)}catch(r){return this.emit("error",r)}this.ws.binaryType===undefined&&(this.supportsBinary=!1);this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer";this.addEventListeners()}};r.prototype.addEventListeners=function(){var n=this;this.ws.onopen=function(){n.onOpen()};this.ws.onclose=function(){n.onClose()};this.ws.onmessage=function(t){n.onData(t.data)};this.ws.onerror=function(t){n.onError("websocket error",t)}};r.prototype.write=function(n){function e(){t.emit("flush");setTimeout(function(){t.writable=!0;t.emit("drain")},0)}var t=this,u,r,f;for(this.writable=!1,u=n.length,r=0,f=u;r<f;r++)(function(n){s.encodePacket(n,t.supportsBinary,function(r){var f,o;t.usingBrowserWebSocket||(f={},n.options&&(f.compress=n.options.compress),t.perMessageDeflate&&(o="string"==typeof r?i.byteLength(r):r.length,o<t.perMessageDeflate.threshold&&(f.compress=!1)));try{t.usingBrowserWebSocket?t.ws.send(r):t.ws.send(r,f)}catch(s){a("websocket closed before onclose event")}--u||e()})})(n[r])};r.prototype.onClose=function(){e.prototype.onClose.call(this)};r.prototype.doClose=function(){typeof this.ws!="undefined"&&this.ws.close()};r.prototype.uri=function(){var n=this.query||{},t=this.secure?"wss":"ws",i="",r;return this.port&&("wss"===t&&Number(this.port)!==443||"ws"===t&&Number(this.port)!==80)&&(i=":"+this.port),this.timestampRequests&&(n[this.timestampParam]=l()),this.supportsBinary||(n.b64=1),n=h.encode(n),n.length&&(n="?"+n),r=this.hostname.indexOf(":")!==-1,t+"://"+(r?"["+this.hostname+"]":this.hostname)+i+this.path+n};r.prototype.check=function(){return!!u&&!("__initialize"in u&&this.name===r.prototype.name)}
8}).call(this,n("buffer").Buffer)},{"../transport":14,buffer:8,"component-inherit":11,debug:21,"engine.io-parser":23,parseqs:32,ws:7,yeast:48}],20:[function(n,t){var i=n("has-cors");t.exports=function(n){var t=n.xdomain,r=n.xscheme,u=n.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||i))return new XMLHttpRequest}catch(f){}try{if("undefined"!=typeof XDomainRequest&&!r&&u)return new XDomainRequest}catch(f){}if(!t)try{return new self[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(f){}}},{"has-cors":27}],21:[function(n,t,i){(function(r){function f(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function e(n){var t=this.useColors,r,u,f;(n[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+n[0]+(t?"%c ":" ")+"+"+i.humanize(this.diff),t)&&(r="color: "+this.color,n.splice(1,0,r,"color: inherit"),u=0,f=0,n[0].replace(/%[a-zA-Z%]/g,function(n){"%%"!==n&&(u++,"%c"===n&&(f=u))}),n.splice(f,0,r))}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(n){try{null==n?i.storage.removeItem("debug"):i.storage.debug=n}catch(t){}}function u(){var n;try{n=i.storage.debug}catch(t){}return!n&&typeof r!="undefined"&&"env"in r&&(n=r.env.DEBUG),n}function h(){try{return window.localStorage}catch(n){}}i=t.exports=n("./debug");i.log=o;i.formatArgs=e;i.save=s;i.load=u;i.useColors=f;i.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:h();i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];i.formatters.j=function(n){try{return JSON.stringify(n)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};i.enable(u())}).call(this,n("_process"))},{"./debug":22,_process:34}],22:[function(n,t,i){function u(n){var t=0;for(var r in n)t=(t<<5)-t+n.charCodeAt(r)|0;return i.colors[Math.abs(t)%i.colors.length]}function r(n){function t(){var n,f,e,s;if(t.enabled){var u=t,o=+new Date,h=o-(r||o);for(u.diff=h,u.prev=r,u.curr=o,r=o,n=new Array(arguments.length),f=0;f<n.length;f++)n[f]=arguments[f];n[0]=i.coerce(n[0]);"string"!=typeof n[0]&&n.unshift("%O");e=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,function(t,r){var f,o;return t==="%%"?t:(e++,f=i.formatters[r],"function"==typeof f&&(o=n[e],t=f.call(u,o),n.splice(e,1),e--),t)});i.formatArgs.call(u,n);s=t.log||i.log||console.log.bind(console);s.apply(u,n)}}var r;return t.namespace=n,t.enabled=i.enabled(n),t.useColors=i.useColors(),t.color=u(n),t.destroy=f,"function"==typeof i.init&&i.init(t),i.instances.push(t),t}function f(){var n=i.instances.indexOf(this);return n!==-1?(i.instances.splice(n,1),!0):!1}function e(n){var t,r,f,u;for(i.save(n),i.names=[],i.skips=[],r=(typeof n=="string"?n:"").split(/[\s,]+/),f=r.length,t=0;t<f;t++)r[t]&&(n=r[t].replace(/\*/g,".*?"),n[0]==="-"?i.skips.push(new RegExp("^"+n.substr(1)+"$")):i.names.push(new RegExp("^"+n+"$")));for(t=0;t<i.instances.length;t++)u=i.instances[t],u.enabled=i.enabled(u.namespace)}function o(){i.enable("")}
8function s(n){if(n[n.length-1]==="*")return!0;for(var t=0,r=i.skips.length;t<r;t++)if(i.skips[t].test(n))return!1;for(t=0,r=i.names.length;t<r;t++)if(i.names[t].test(n))return!0;return!1}function h(n){return n instanceof Error?n.stack||n.message:n}i=t.exports=r.debug=r["default"]=r;i.coerce=h;i.disable=o;i.enable=e;i.enabled=s;i.humanize=n("ms");i.instances=[];i.names=[];i.skips=[];i.formatters={}},{ms:31}],23:[function(n,t,i){function b(n,t){var r="b"+i.packets[n.type]+n.data.data;return t(r)}function k(n,t,r){var u;if(!t)return i.encodeBase64Packet(n,r);var e=n.data,s=new Uint8Array(e),f=new Uint8Array(1+e.byteLength);for(f[0]=o[n.type],u=0;u<s.length;u++)f[u+1]=s[u];return r(f.buffer)}function d(n,t,r){if(!t)return i.encodeBase64Packet(n,r);var u=new FileReader;return u.onload=function(){i.encodePacket({type:n.type,data:u.result},t,!0,r)},u.readAsArrayBuffer(n.data)}function g(n,t,u){var f,e;return t?l?d(n,t,u):(f=new Uint8Array(1),f[0]=o[n.type],e=new r([f.buffer,n.data]),u(e)):i.encodeBase64Packet(n,u)}function nt(n){try{n=c.decode(n,{strict:!1})}catch(t){return!1}return n}function h(n,t,i){for(var u=new Array(n.length),f=y(n.length,i),e=function(n,i,r){t(i,function(t,i){u[n]=i;r(t,u)})},r=0;r<n.length;r++)e(r,n[r],f)}var a=n("./keys"),v=n("has-binary2"),e=n("arraybuffer.slice"),y=n("after"),c=n("./utf8"),s;typeof ArrayBuffer!="undefined"&&(s=n("base64-arraybuffer"));var p=typeof navigator!="undefined"&&/Android/i.test(navigator.userAgent),w=typeof navigator!="undefined"&&/PhantomJS/i.test(navigator.userAgent),l=p||w;i.protocol=3;var o=i.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},f=a(o),u={type:"error",data:"parser error"},r=n("blob");i.encodePacket=function(n,t,i,u){var f,e;return(typeof t=="function"&&(u=t,t=!1),typeof i=="function"&&(u=i,i=null),f=n.data===undefined?undefined:n.data.buffer||n.data,typeof ArrayBuffer!="undefined"&&f instanceof ArrayBuffer)?k(n,t,u):typeof r!="undefined"&&f instanceof r?g(n,t,u):f&&f.base64?b(n,u):(e=o[n.type],undefined!==n.data&&(e+=i?c.encode(String(n.data),{strict:!1}):String(n.data)),u(""+e))};i.encodeBase64Packet=function(n,t){var o="b"+i.packets[n.type],f,s,e,h,u;if(typeof r!="undefined"&&n.data instanceof r)return f=new FileReader,f.onload=function(){var n=f.result.split(",")[1];t(o+n)},f.readAsDataURL(n.data);try{s=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(c){for(e=new Uint8Array(n.data),h=new Array(e.length),u=0;u<e.length;u++)h[u]=e[u];s=String.fromCharCode.apply(null,h)}return o+=btoa(s),t(o)};i.decodePacket=function(n,t,o){var s;if(n===undefined)return u;if(typeof n=="string")return n.charAt(0)==="b"?i.decodeBase64Packet(n.substr(1),t):o&&(n=nt(n),n===!1)?u:(s=n.charAt(0),Number(s)!=s||!f[s])?u:n.length>1?{type:f[s],data:n.substring(1)}:{type:f[s]};var c=new Uint8Array(n),s=c[0],h=e(n,1);return r&&t==="blob"&&(h=new r([h])),{type:f[s],data:h}};i.decodeBase64Packet=function(n,t){var u=f[n.charAt(0)],i;return s?(i=s.decode(n.substr(1)),t==="blob"&&r&&(i=new r([i])),{type:u,data:i}):{type:u,data:{base64:!0,data:n.substr(1)}}};i.encodePayload=function(n,t,u){function e(n){return n.length+":"+n}function o(n,r){i.encodePacket(n,f?t:!1,!1,function(n){r(null,e(n))})}typeof t=="function"&&(u=t,t=null);var f=v(n);if(t&&f)return r&&!l?i.encodePayloadAsBlob(n,u):i.encodePayloadAsArrayBuffer(n,u);if(!n.length)return u("0:");h(n,o,function(n,t){return u(t.join(""))})};i.decodePayload=function(n,t,r){var o,f,s,h,e,c,l,a;if(typeof n!="string")return i.decodePayloadAsBinary(n,t,r);if(typeof t=="function"&&(r=t,t=null),n==="")return r(u,0,1);for(f="",e=0,c=n.length;e<c;e++){if(l=n.charAt(e),l!==":"){f+=l;continue}if(f===""||f!=(s=Number(f))||(h=n.substr(e+1,s),f!=h.length))return r(u,0,1);if(h.length){if(o=i.decodePacket(h,t,!1),u.type===o.type&&u.data===o.data)return r(u,0,1);if(a=r(o,e+s,c),!1===a)return}e+=s;f=""}if(f!=="")return r(u,0,1)};i.encodePayloadAsArrayBuffer=function(n,t){function r(n,t){i.encodePacket(n,!0,!0,function(n){return t(null,n)})}if(!n.length)return t(new ArrayBuffer(0));h(n,r,function(n,i){var f=i.reduce(function(n,t){var i;return i=typeof t=="string"?t.length:t.byteLength,n+i.toString().length+i+2}
8,0),r=new Uint8Array(f),u=0;return i.forEach(function(n){var o=typeof n=="string",f=n,e,i,t;if(o){for(i=new Uint8Array(n.length),t=0;t<n.length;t++)i[t]=n.charCodeAt(t);f=i.buffer}for(r[u++]=o?0:1,e=f.byteLength.toString(),t=0;t<e.length;t++)r[u++]=parseInt(e[t]);for(r[u++]=255,i=new Uint8Array(f),t=0;t<i.length;t++)r[u++]=i[t]}),t(r.buffer)})};i.encodePayloadAsBlob=function(n,t){function u(n,t){i.encodePacket(n,!0,!0,function(n){var f=new Uint8Array(1),e,i,s;if(f[0]=1,typeof n=="string"){for(e=new Uint8Array(n.length),i=0;i<n.length;i++)e[i]=n.charCodeAt(i);n=e.buffer;f[0]=0}var h=n instanceof ArrayBuffer?n.byteLength:n.size,u=h.toString(),o=new Uint8Array(u.length+1);for(i=0;i<u.length;i++)o[i]=parseInt(u[i]);o[u.length]=255;r&&(s=new r([f.buffer,o.buffer,n]),t(null,s))})}h(n,u,function(n,i){return t(new r(i))})};i.decodePayloadAsBinary=function(n,t,r){var f,c,h,a,o,v;for(typeof t=="function"&&(r=t,t=null),f=n,c=[];f.byteLength>0;){var l=new Uint8Array(f),y=l[0]===0,s="";for(o=1;;o++){if(l[o]===255)break;if(s.length>310)return r(u,0,1);s+=l[o]}if(f=e(f,2+s.length),s=parseInt(s),h=e(f,0,s),y)try{h=String.fromCharCode.apply(null,new Uint8Array(h))}catch(p){for(a=new Uint8Array(h),h="",o=0;o<a.length;o++)h+=String.fromCharCode(a[o])}c.push(h);f=e(f,s)}v=c.length;
8c.forEach(function(n,u){r(i.decodePacket(n,t,!0),u,v)})}},{"./keys":24,"./utf8":25,after:1,"arraybuffer.slice":2,"base64-arraybuffer":4,blob:6,"has-binary2":26}],24:[function(n,t){t.exports=Object.keys||function(n){var t=[],r=Object.prototype.hasOwnProperty;for(var i in n)r.call(n,i)&&t.push(i);return t}},{}],25:[function(n,t){
9/*! https://mths.be/utf8js v2.1.2 by @mathias */
10function s(n){for(var r=[],i=0,f=n.length,t,u;i<f;)t=n.charCodeAt(i++),t>=55296&&t<=56319&&i<f?(u=n.charCodeAt(i++),(u&64512)==56320?r.push(((t&1023)<<10)+(u&1023)+65536):(r.push(t),i--)):r.push(t);return r}function c(n){for(var f=n.length,u=-1,t,r="";++u<f;)t=n[u],t>65535&&(t-=65536,r+=i(t>>>10&1023|55296),t=56320|t&1023),r+=i(t);return r}function h(n,t){if(n>=55296&&n<=57343){if(t)throw Error("Lone surrogate U+"+n.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function o(n,t){return i(n>>t&63|128)}function l(n,t){if((n&4294967168)==0)return i(n);var r="";return(n&4294965248)==0?r=i(n>>6&31|192):(n&4294901760)==0?(h(n,t)||(n=65533),r=i(n>>12&15|224)+o(n,6)):(n&4292870144)==0&&(r=i(n>>18&7|240),r+=o(n,12),r+=o(n,6)),r+i(n&63|128)}function a(n,t){t=t||{};for(var e=!1!==t.strict,i=s(n),o=i.length,r=-1,u,f="";++r<o;)u=i[r],f+=l(u,e);return f}function u(){if(r>=e)throw Error("Invalid byte index");var n=f[r]&255;if(r++,(n&192)==128)return n&63;throw Error("Invalid continuation byte");}function v(n){var i,o,s,c,t;if(r>e)throw Error("Invalid byte index");if(r==e)return!1;if(i=f[r]&255,r++,(i&128)==0)return i;if((i&224)==192){if(o=u(),t=(i&31)<<6|o,t>=128)return t;throw Error("Invalid continuation byte");}if((i&240)==224){if(o=u(),s=u(),t=(i&15)<<12|o<<6|s,t>=2048)return h(t,n)?t:65533;throw Error("Invalid continuation byte");}if((i&248)==240&&(o=u(),s=u(),c=u(),t=(i&7)<<18|o<<12|s<<6|c,t>=65536&&t<=1114111))return t;throw Error("Invalid UTF-8 detected");}function y(n,t){var u,i,o;for(t=t||{},u=!1!==t.strict,f=s(n),e=f.length,r=0,i=[];(o=v(u))!==!1;)i.push(o);return c(i)}var i=String.fromCharCode,f,e,r;t.exports={version:"2.1.2",encode:a,decode:y}},{}],26:[function(n,t){(function(i){function r(n){var t,s,u;if(!n||typeof n!="object")return!1;if(f(n)){for(t=0,s=n.length;t<s;t++)if(r(n[t]))return!0;return!1}if(typeof i=="function"&&i.isBuffer&&i.isBuffer(n)||typeof ArrayBuffer=="function"&&n instanceof ArrayBuffer||e&&n instanceof Blob||o&&n instanceof File)return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return r(n.toJSON(),!0);for(u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&r(n[u]))return!0;return!1}var f=n("isarray"),u=Object.prototype.toString,e=typeof Blob=="function"||typeof Blob!="undefined"&&u.call(Blob)==="[object BlobConstructor]",o=typeof File=="function"||typeof File!="undefined"&&u.call(File)==="[object FileConstructor]";t.exports=r}).call(this,n("buffer").Buffer)},{buffer:8,isarray:30}],27:[function(n,t){try{t.exports=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(i){t.exports=!1}},{}],28:[function(n,t,i){i.read=function(n,t,i,r,u){var f,o,l=u*8-r-1,a=(1<<l)-1,v=a>>1,e=-7,s=i?u-1:0,c=i?-1:1,h=n[t+s];for(s+=c,f=h&(1<<-e)-1,h>>=-e,e+=l;e>0;f=f*256+n[t+s],s+=c,e-=8);for(o=f&(1<<-e)-1,f>>=-e,e+=r;e>0;o=o*256+n[t+s],s+=c,e-=8);if(f===0)f=1-v;else{if(f===a)return o?NaN:(h?-1:1)*Infinity;o=o+Math.pow(2,r);f=f-v}return(h?-1:1)*o*Math.pow(2,f-r)};i.write=function(n,t,i,r,u,f){var e,o,s,l=f*8-u-1,a=(1<<l)-1,h=a>>1,y=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:f-1,v=r?1:-1,p=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(o=isNaN(t)?1:0,e=a):(e=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-e))<1&&(e--,s*=2),t+=e+h>=1?y/s:y*Math.pow(2,1-h),t*s>=2&&(e++,s/=2),e+h>=a?(o=0,e=a):e+h>=1?(o=(t*s-1)*Math.pow(2,u),e=e+h):(o=t*Math.pow(2,h-1)*Math.pow(2,u),e=0));u>=8;n[i+c]=o&255,c+=v,o/=256,u-=8);for(e=e<<u|o,l+=u;l>0;n[i+c]=e&255,c+=v,e/=256,l-=8);n[i+c-v]|=p*128}},{}],29:[function(n,t){var i=[].indexOf;t.exports=function(n,t){if(i)return n.indexOf(t);for(var r=0;r<n.length;++r)if(n[r]===t)return r;return-1}},{}],30:[function(n,t){var i={}.toString;t.exports=Array.isArray||function(n){return i.call(n)=="[object Array]"}},{}],31:[function(n,t){function s(n){var e,t,s;if((n=String(n),!(n.length>100))&&(e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n),e)){t=parseFloat(e[1]);s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return t*o;case"days":case"day":case"d":return t*f;
10case"hours":case"hour":case"hrs":case"hr":case"h":return t*u;case"minutes":case"minute":case"mins":case"min":case"m":return t*r;case"seconds":case"second":case"secs":case"sec":case"s":return t*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return undefined}}}function h(n){return n>=f?Math.round(n/f)+"d":n>=u?Math.round(n/u)+"h":n>=r?Math.round(n/r)+"m":n>=i?Math.round(n/i)+"s":n+"ms"}function c(n){return e(n,f,"day")||e(n,u,"hour")||e(n,r,"minute")||e(n,i,"second")||n+" ms"}function e(n,t,i){if(!(n<t))return n<t*1.5?Math.floor(n/t)+" "+i:Math.ceil(n/t)+" "+i+"s"}var i=1e3,r=i*60,u=r*60,f=u*24,o=f*365.25;t.exports=function(n,t){t=t||{};var i=typeof n;if(i==="string"&&n.length>0)return s(n);if(i==="number"&&isNaN(n)===!1)return t.long?c(n):h(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n));}},{}],32:[function(n,t,i){i.encode=function(n){var t="";for(var i in n)n.hasOwnProperty(i)&&(t.length&&(t+="&"),t+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return t};i.decode=function(n){for(var i,r={},u=n.split("&"),t=0,f=u.length;t<f;t++)i=u[t].split("="),r[decodeURIComponent(i[0])]=decodeURIComponent(i[1]);return r}},{}],33:[function(n,t){var i=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(n){var o=n,u=n.indexOf("["),f=n.indexOf("]");u!=-1&&f!=-1&&(n=n.substring(0,u)+n.substring(u,f).replace(/:/g,";")+n.substring(f,n.length));for(var s=i.exec(n||""),t={},e=14;e--;)t[r[e]]=s[e]||"";return u!=-1&&f!=-1&&(t.source=o,t.host=t.host.substring(1,t.host.length-1).replace(/;/g,":"),t.authority=t.authority.replace("[","").replace("]","").replace(/;/g,":"),t.ipv6uri=!0),t}},{}],34:[function(n,t){function c(){throw new Error("setTimeout has not been defined");}function l(){throw new Error("clearTimeout has not been defined");}function a(n){if(r===setTimeout)return setTimeout(n,0);if((r===c||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(t){try{return r.call(null,n,0)}catch(t){return r.call(this,n,0)}}}function p(n){if(u===clearTimeout)return clearTimeout(n);if((u===l||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(n);try{return u(n)}catch(t){try{return u.call(null,n)}catch(t){return u.call(this,n)}}}function w(){s&&o&&(s=!1,o.length?f=o.concat(f):h=-1,f.length&&v())}function v(){var t,n;if(!s){for(t=a(w),s=!0,n=f.length;n;){for(o=f,f=[];++h<n;)o&&o[h].run();h=-1;n=f.length}o=null;s=!1;p(t)}}function y(n,t){this.fun=n;this.array=t}function e(){}var i=t.exports={},r,u;(function(){try{r=typeof setTimeout=="function"?setTimeout:c}catch(n){r=c}try{u=typeof clearTimeout=="function"?clearTimeout:l}catch(n){u=l}})();var f=[],s=!1,o,h=-1;i.nextTick=function(n){var i=new Array(arguments.length-1),t;if(arguments.length>1)for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];f.push(new y(n,i));f.length!==1||s||a(v)};y.prototype.run=function(){this.fun.apply(null,this.array)};i.title="browser";i.browser=!0;i.env={};i.argv=[];i.version="";i.versions={};i.on=e;i.addListener=e;i.once=e;i.off=e;i.removeListener=e;i.removeAllListeners=e;i.emit=e;i.prependListener=e;i.prependOnceListener=e;i.listeners=function(){return[]};i.binding=function(){throw new Error("process.binding is not supported");};i.cwd=function(){return"/"};i.chdir=function(){throw new Error("process.chdir is not supported");};i.umask=function(){return 0}},{}],35:[function(n,t,i){function e(n,t){typeof n=="object"&&(t=n,n=undefined);t=t||{};var i=o(n),s=i.source,e=i.id,c=i.path,l=r[e]&&c in r[e].nsps,a=t.forceNew||t["force new connection"]||!1===t.multiplex||l,h;return a?(f("ignoring socket cache for %s",s),h=u(s,t)):(r[e]||(f("new io instance for %s",s),r[e]=u(s,t)),h=r[e]),i.query&&!t.query&&(t.query=i.query),h.socket(i.path,t)}var o=n("./url"),s=n("socket.io-parser"),u=n("./manager"),f=n("debug")("socket.io-client"),r;t.exports=i=e;r=i.managers={};i.protocol=s.protocol;i.connect=e;i.Manager=n("./manager");i.Socket=n("./socket")}
10,{"./manager":36,"./socket":38,"./url":39,debug:40,"socket.io-parser":43}],36:[function(n,t){function i(n,t){if(!(this instanceof i))return new i(n,t);n&&"object"==typeof n&&(t=n,n=undefined);t=t||{};t.path=t.path||"/socket.io";this.nsps={};this.subs=[];this.opts=t;this.reconnection(t.reconnection!==!1);this.reconnectionAttempts(t.reconnectionAttempts||Infinity);this.reconnectionDelay(t.reconnectionDelay||1e3);this.reconnectionDelayMax(t.reconnectionDelayMax||5e3);this.randomizationFactor(t.randomizationFactor||.5);this.backoff=new a({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()});this.timeout(null==t.timeout?2e4:t.timeout);this.readyState="closed";this.uri=n;this.connecting=[];this.lastPing=null;this.encoding=!1;this.packetBuffer=[];var r=t.parser||l;this.encoder=new r.Encoder;this.decoder=new r.Decoder;this.autoConnect=t.autoConnect!==!1;this.autoConnect&&this.open()}var s=n("engine.io-client"),h=n("./socket"),c=n("component-emitter"),l=n("socket.io-parser"),u=n("./on"),f=n("component-bind"),r=n("debug")("socket.io-client:manager"),e=n("indexof"),a=n("backo2"),o=Object.prototype.hasOwnProperty;t.exports=i;i.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var n in this.nsps)o.call(this.nsps,n)&&this.nsps[n].emit.apply(this.nsps[n],arguments)};i.prototype.updateSocketIds=function(){for(var n in this.nsps)o.call(this.nsps,n)&&(this.nsps[n].id=this.generateId(n))};i.prototype.generateId=function(n){return(n==="/"?"":n+"#")+this.engine.id};c(i.prototype);i.prototype.reconnection=function(n){return arguments.length?(this._reconnection=!!n,this):this._reconnection};i.prototype.reconnectionAttempts=function(n){return arguments.length?(this._reconnectionAttempts=n,this):this._reconnectionAttempts};i.prototype.reconnectionDelay=function(n){return arguments.length?(this._reconnectionDelay=n,this.backoff&&this.backoff.setMin(n),this):this._reconnectionDelay};i.prototype.randomizationFactor=function(n){return arguments.length?(this._randomizationFactor=n,this.backoff&&this.backoff.setJitter(n),this):this._randomizationFactor};i.prototype.reconnectionDelayMax=function(n){return arguments.length?(this._reconnectionDelayMax=n,this.backoff&&this.backoff.setMax(n),this):this._reconnectionDelayMax};i.prototype.timeout=function(n){return arguments.length?(this._timeout=n,this):this._timeout};i.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()};i.prototype.open=i.prototype.connect=function(n){var i,t,e,o,f,h;return(r("readyState %s",this.readyState),~this.readyState.indexOf("open"))?this:(r("opening %s",this.uri),this.engine=s(this.uri,this.opts),i=this.engine,t=this,this.readyState="opening",this.skipReconnect=!1,e=u(i,"open",function(){t.onopen();n&&n()}),o=u(i,"error",function(i){if(r("connect_error"),t.cleanup(),t.readyState="closed",t.emitAll("connect_error",i),n){var u=new Error("Connection error");u.data=i;n(u)}else t.maybeReconnectOnOpen()}),!1!==this._timeout&&(f=this._timeout,r("connect attempt will timeout after %d",f),h=setTimeout(function(){r("connect attempt timed out after %d",f);e.destroy();i.close();i.emit("error","timeout");t.emitAll("connect_timeout",f)},f),this.subs.push({destroy:function(){clearTimeout(h)}})),this.subs.push(e),this.subs.push(o),this)};i.prototype.onopen=function(){r("open");this.cleanup();this.readyState="open";this.emit("open");var n=this.engine;this.subs.push(u(n,"data",f(this,"ondata")));this.subs.push(u(n,"ping",f(this,"onping")));this.subs.push(u(n,"pong",f(this,"onpong")));this.subs.push(u(n,"error",f(this,"onerror")));this.subs.push(u(n,"close",f(this,"onclose")));this.subs.push(u(this.decoder,"decoded",f(this,"ondecoded")))};i.prototype.onping=function(){this.lastPing=new Date;this.emitAll("ping")};i.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};i.prototype.ondata=function(n){this.decoder.add(n)};i.prototype.ondecoded=function(n){this.emit("packet",n)};i.prototype.onerror=function(n){r("error",n);this.emitAll("error",n)};i.prototype.socket=function(n,t){function u(){~e(r.connecting,i)||r.connecting.push(i)}var i=this.nsps[n],r;if(!i){i=new h(this,n,t);this.nsps[n]=i;r=this;i.on("connecting",u);i.on("connect",function(){i.id=r.generateId(n)});
10this.autoConnect&&u()}return i};i.prototype.destroy=function(n){var t=e(this.connecting,n);(~t&&this.connecting.splice(t,1),this.connecting.length)||this.close()};i.prototype.packet=function(n){r("writing packet %j",n);var t=this;n.query&&n.type===0&&(n.nsp+="?"+n.query);t.encoding?t.packetBuffer.push(n):(t.encoding=!0,this.encoder.encode(n,function(i){for(var r=0;r<i.length;r++)t.engine.write(i[r],n.options);t.encoding=!1;t.processPacketQueue()}))};i.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var n=this.packetBuffer.shift();this.packet(n)}};i.prototype.cleanup=function(){var t,n,i;for(r("cleanup"),t=this.subs.length,n=0;n<t;n++)i=this.subs.shift(),i.destroy();this.packetBuffer=[];this.encoding=!1;this.lastPing=null;this.decoder.destroy()};i.prototype.close=i.prototype.disconnect=function(){r("disconnect");this.skipReconnect=!0;this.reconnecting=!1;"opening"===this.readyState&&this.cleanup();this.backoff.reset();this.readyState="closed";this.engine&&this.engine.close()};i.prototype.onclose=function(n){r("onclose");this.cleanup();this.backoff.reset();this.readyState="closed";this.emit("close",n);this._reconnection&&!this.skipReconnect&&this.reconnect()};i.prototype.reconnect=function(){var n,t,i;if(this.reconnecting||this.skipReconnect)return this;n=this;this.backoff.attempts>=this._reconnectionAttempts?(r("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1):(t=this.backoff.duration(),r("will wait %dms before reconnect attempt",t),this.reconnecting=!0,i=setTimeout(function(){n.skipReconnect||(r("attempting reconnect"),n.emitAll("reconnect_attempt",n.backoff.attempts),n.emitAll("reconnecting",n.backoff.attempts),n.skipReconnect)||n.open(function(t){t?(r("reconnect attempt error"),n.reconnecting=!1,n.reconnect(),n.emitAll("reconnect_error",t.data)):(r("reconnect success"),n.onreconnect())})},t),this.subs.push({destroy:function(){clearTimeout(i)}}))};i.prototype.onreconnect=function(){var n=this.backoff.attempts;this.reconnecting=!1;this.backoff.reset();this.updateSocketIds();this.emitAll("reconnect",n)}},{"./on":37,"./socket":38,backo2:3,"component-bind":9,"component-emitter":10,debug:40,"engine.io-client":12,indexof:29,"socket.io-parser":43}],37:[function(n,t){function i(n,t,i){n.on(t,i);return{destroy:function(){n.removeListener(t,i)}}}t.exports=i},{}],38:[function(n,t,i){function r(n,t,i){this.io=n;this.nsp=t;this.json=this;this.ids=0;this.acks={};this.receiveBuffer=[];this.sendBuffer=[];this.connected=!1;this.disconnected=!0;this.flags={};i&&i.query&&(this.query=i.query);this.io.autoConnect&&this.open()}var u=n("socket.io-parser"),c=n("component-emitter"),o=n("to-array"),s=n("./on"),h=n("component-bind"),f=n("debug")("socket.io-client:socket"),v=n("parseqs"),l=n("has-binary2"),a,e;t.exports=i=r;a={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1};e=c.prototype.emit;c(r.prototype);r.prototype.subEvents=function(){if(!this.subs){var n=this.io;this.subs=[s(n,"open",h(this,"onopen")),s(n,"packet",h(this,"onpacket")),s(n,"close",h(this,"onclose"))]}};r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)};r.prototype.send=function(){var n=o(arguments);return n.unshift("message"),this.emit.apply(this,n),this};r.prototype.emit=function(n){if(a.hasOwnProperty(n))return e.apply(this,arguments),this;var t=o(arguments),i={type:(this.flags.binary!==undefined?this.flags.binary:l(t))?u.BINARY_EVENT:u.EVENT,data:t};return i.options={},i.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(f("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),i.id=this.ids++),this.connected?this.packet(i):this.sendBuffer.push(i),this.flags={},this};r.prototype.packet=function(n){n.nsp=this.nsp;this.io.packet(n)};r.prototype.onopen=function(){if(f("transport is open - connecting"),"/"!==this.nsp)if(this.query){var n=typeof this.query=="object"?v.encode(this.query):this.query;
10f("sending connect packet with query %s",n);this.packet({type:u.CONNECT,query:n})}else this.packet({type:u.CONNECT})};r.prototype.onclose=function(n){f("close (%s)",n);this.connected=!1;this.disconnected=!0;delete this.id;this.emit("disconnect",n)};r.prototype.onpacket=function(n){var t=n.nsp===this.nsp,i=n.type===u.ERROR&&n.nsp==="/";if(t||i)switch(n.type){case u.CONNECT:this.onconnect();break;case u.EVENT:this.onevent(n);break;case u.BINARY_EVENT:this.onevent(n);break;case u.ACK:this.onack(n);break;case u.BINARY_ACK:this.onack(n);break;case u.DISCONNECT:this.ondisconnect();break;case u.ERROR:this.emit("error",n.data)}};r.prototype.onevent=function(n){var t=n.data||[];f("emitting event %j",t);null!=n.id&&(f("attaching ack callback to event"),t.push(this.ack(n.id)));this.connected?e.apply(this,t):this.receiveBuffer.push(t)};r.prototype.ack=function(n){var i=this,t=!1;return function(){if(!t){t=!0;var r=o(arguments);f("sending ack %j",r);i.packet({type:l(r)?u.BINARY_ACK:u.ACK,id:n,data:r})}}};r.prototype.onack=function(n){var t=this.acks[n.id];"function"==typeof t?(f("calling ack %s with %j",n.id,n.data),t.apply(this,n.data),delete this.acks[n.id]):f("bad ack %s",n.id)};r.prototype.onconnect=function(){this.connected=!0;this.disconnected=!1;this.emit("connect");this.emitBuffered()};r.prototype.emitBuffered=function(){for(var n=0;n<this.receiveBuffer.length;n++)e.apply(this,this.receiveBuffer[n]);for(this.receiveBuffer=[],n=0;n<this.sendBuffer.length;n++)this.packet(this.sendBuffer[n]);this.sendBuffer=[]};r.prototype.ondisconnect=function(){f("server disconnect (%s)",this.nsp);this.destroy();this.onclose("io server disconnect")};r.prototype.destroy=function(){if(this.subs){for(var n=0;n<this.subs.length;n++)this.subs[n].destroy();this.subs=null}this.io.destroy(this)};r.prototype.close=r.prototype.disconnect=function(){if(this.connected&&(f("performing disconnect (%s)",this.nsp),this.packet({type:u.DISCONNECT})),this.destroy(),this.connected)this.onclose("io client disconnect");return this};r.prototype.compress=function(n){return this.flags.compress=n,this};r.prototype.binary=function(n){return this.flags.binary=n,this}},{"./on":37,"component-bind":9,"component-emitter":10,debug:40,"has-binary2":26,parseqs:32,"socket.io-parser":43,"to-array":47}],39:[function(n,t){function u(n,t){var u=n,e,f;return t=t||typeof location!="undefined"&&location,null==n&&(n=t.protocol+"//"+t.host),"string"==typeof n&&("/"===n.charAt(0)&&(n="/"===n.charAt(1)?t.protocol+n:t.host+n),/^(https?|wss?):\/\//.test(n)||(i("protocol-less url %s",n),n="undefined"!=typeof t?t.protocol+"//"+n:"https://"+n),i("parse %s",n),u=r(n)),u.port||(/^(http|ws)$/.test(u.protocol)?u.port="80":/^(http|ws)s$/.test(u.protocol)&&(u.port="443")),u.path=u.path||"/",e=u.host.indexOf(":")!==-1,f=e?"["+u.host+"]":u.host,u.id=u.protocol+"://"+f+":"+u.port,u.href=u.protocol+"://"+f+(t&&t.port===u.port?"":":"+u.port),u}var r=n("parseuri"),i=n("debug")("socket.io-client:url");t.exports=u},{debug:40,parseuri:33}],40:[function(n,t,i){arguments[4][21][0].apply(i,arguments)},{"./debug":41,_process:34,dup:21}],41:[function(n,t,i){arguments[4][22][0].apply(i,arguments)},{dup:22,ms:31}],42:[function(n,t,i){function u(n,t){var s,f,i,o;if(!n)return n;if(e(n))return s={_placeholder:!0,num:t.length},t.push(n),s;if(r(n)){for(i=new Array(n.length),f=0;f<n.length;f++)i[f]=u(n[f],t);return i}if(typeof n=="object"&&!(n instanceof Date)){i={};for(o in n)i[o]=u(n[o],t);return i}return n}function f(n,t){var i,u;if(!n)return n;if(n&&n._placeholder)return t[n.num];if(r(n))for(i=0;i<n.length;i++)n[i]=f(n[i],t);else if(typeof n=="object")for(u in n)n[u]=f(n[u],t);return n}var r=n("isarray"),e=n("./is-buffer"),o=Object.prototype.toString,s=typeof Blob=="function"||typeof Blob!="undefined"&&o.call(Blob)==="[object BlobConstructor]",h=typeof File=="function"||typeof File!="undefined"&&o.call(File)==="[object FileConstructor]";i.deconstructPacket=function(n){var t=[],r=n.data,i=n;return i.data=u(r,t),i.attachments=t.length,{packet:i,buffers:t}};i.reconstructPacket=function(n,t){return n.data=f(n.data,t),n.attachments=undefined,n};i.removeBlobs=function(n,t){function u(n,o,c){var a,l,v;if(!n)return n;if(s&&n instanceof Blob||h&&n instanceof File)f++,a=new FileReader,a.onload=function(){c?c[o]=this.result:i=this.result;--f||t(i)},a.readAsArrayBuffer(n);else if(r(n))for(l=0;l<n.length;l++)u(n[l],l,n);else if(typeof n=="object"&&!e(n))for(v in n)u(n[v],v,n)}var f=0,i=n;u(i);f||t(i)}},{"./is-buffer":44,isarray:30}],43:[function(n,t,i){function o(){}function h(n){var t=""+n.type,r;
10if((i.BINARY_EVENT===n.type||i.BINARY_ACK===n.type)&&(t+=n.attachments+"-"),n.nsp&&"/"!==n.nsp&&(t+=n.nsp+","),null!=n.id&&(t+=n.id),null!=n.data)if(r=y(n.data),r!==!1)t+=r;else return s;return u("encoded %j as %s",n,t),t}function y(n){try{return JSON.stringify(n)}catch(t){return!1}}function p(n,t){function i(n){var i=f.deconstructPacket(n),u=h(i.packet),r=i.buffers;r.unshift(u);t(r)}f.removeBlobs(n,i)}function r(){this.reconstructor=null}function w(n){var t=0,r={type:Number(n.charAt(0))},e,o,f,s,h;if(null==i.types[r.type])return c("unknown packet type "+r.type);if(i.BINARY_EVENT===r.type||i.BINARY_ACK===r.type){for(e="";n.charAt(++t)!=="-";)if(e+=n.charAt(t),t==n.length)break;if(e!=Number(e)||n.charAt(t)!=="-")throw new Error("Illegal attachments");r.attachments=Number(e)}if("/"===n.charAt(t+1))for(r.nsp="";++t;){if(f=n.charAt(t),","===f)break;if(r.nsp+=f,t===n.length)break}else r.nsp="/";if(o=n.charAt(t+1),""!==o&&Number(o)==o){for(r.id="";++t;){if(f=n.charAt(t),null==f||Number(f)!=f){--t;break}if(r.id+=n.charAt(t),t===n.length)break}r.id=Number(r.id)}if(n.charAt(++t))if(s=b(n.substr(t)),h=s!==!1&&(r.type===i.ERROR||a(s)),h)r.data=s;else return c("invalid payload");return u("decoded %s as %j",n,r),r}function b(n){try{return JSON.parse(n)}catch(t){return!1}}function e(n){this.reconPack=n;this.buffers=[]}function c(n){return{type:i.ERROR,data:"parser error: "+n}}var u=n("debug")("socket.io-parser"),l=n("component-emitter"),f=n("./binary"),a=n("isarray"),v=n("./is-buffer"),s;i.protocol=4;i.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"];i.CONNECT=0;i.DISCONNECT=1;i.EVENT=2;i.ACK=3;i.ERROR=4;i.BINARY_EVENT=5;i.BINARY_ACK=6;i.Encoder=o;i.Decoder=r;s=i.ERROR+'"encode error"';o.prototype.encode=function(n,t){if(u("encoding packet %j",n),i.BINARY_EVENT===n.type||i.BINARY_ACK===n.type)p(n,t);else{var r=h(n);t([r])}};l(r.prototype);r.prototype.add=function(n){var t;if(typeof n=="string")t=w(n),i.BINARY_EVENT===t.type||i.BINARY_ACK===t.type?(this.reconstructor=new e(t),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",t)):this.emit("decoded",t);else if(v(n)||n.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(n),t&&(this.reconstructor=null,this.emit("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+n);};r.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};e.prototype.takeBinaryData=function(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){var t=f.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null};e.prototype.finishedReconstruction=function(){this.reconPack=null;this.buffers=[]}},{"./binary":42,"./is-buffer":44,"component-emitter":10,debug:45,isarray:30}],44:[function(n,t){(function(n){function f(t){return i&&n.isBuffer(t)||r&&(t instanceof ArrayBuffer||u(t))}t.exports=f;var i=typeof n=="function"&&typeof n.isBuffer=="function",r=typeof ArrayBuffer=="function",u=function(n){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer}}).call(this,n("buffer").Buffer)},{buffer:8}],45:[function(n,t,i){arguments[4][21][0].apply(i,arguments)},{"./debug":46,_process:34,dup:21}],46:[function(n,t,i){arguments[4][22][0].apply(i,arguments)},{dup:22,ms:31}],47:[function(n,t){function i(n,t){var r=[],i;for(t=t||0,i=t||0;i<n.length;i++)r[i-t]=n[i];return r}t.exports=i},{}],48:[function(n,t){"use strict";function u(n){var t="";do t=e[n%r]+t,n=Math.floor(n/r);while(n>0);return t}function c(n){var t=0;for(i=0;i<n.length;i++)t=t*r+o[n.charAt(i)];return t}function f(){var n=u(+new Date);return n!==h?(s=0,h=n):n+"."+u(s++)}for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r=64,o={},s=0,i=0,h;i<r;i++)o[e[i]]=i;f.encode=u;f.decode=c;t.exports=f},{}],49:[function(n){function r(){}var i=n("socket.io-client"),t=r.prototype;t.data={uris:[],sockets:[],tokens:[]};t.TryConnectSocket=function(n,t,i,r){var u=this,f=u.FindOrCreateSocket(n);u.AddToken(f,t);u.SetEvent(f,i,r)};t.CreateSocket=function(n){i.connect(n,{secure:n.toLowerCase().startsWith("https")})};t.FindOrCreateSocket=function(n){var u=this,r=this.data.uris.indexOf(n),t=this.data.sockets[r];if(!t){this.data.uris.push(n);r=this.data.uris.indexOf(n);t=this.data.sockets[r]=i.connect(n,{secure:n.toLowerCase().startsWith("https")});t.on("connect",function(){var n=u.data.tokens[r]||[];
10n.forEach(function(n){t.emit("set-token",n)})})}return t};t.AddToken=function(n,t){if(!n)return!1;try{var i=this.data.uris.indexOf(n.io.uri);return this.data.tokens[i]||(this.data.tokens[i]=[]),this.data.tokens[i].indexOf(t)==-1&&(this.data.tokens[i].push(t),n.emit("set-token",t)),!0}catch(r){return!1}};t.SetEvent=function(n,t,i){if(!n)return!1;if(n.hasListeners(t)&&n.off(t),typeof i=="function")n.on(t,i)};window.BroadcastIO||(window.BroadcastIO=new r)},{"socket.io-client":35}]},{},[49]);Element.prototype.replaceWith||(Element.prototype.replaceWith=ReplaceWithPolyfill);CharacterData.prototype.replaceWith||(CharacterData.prototype.replaceWith=ReplaceWithPolyfill);DocumentType.prototype.replaceWith||(DocumentType.prototype.replaceWith=ReplaceWithPolyfill)

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.