forked from Gitlink/forgeplus
49 lines
1.5 MiB
49 lines
1.5 MiB
function createMDEditor(t,e){var n={height:600,path:"/editormd/lib/",syncScrolling:"single",tex:!0,tocm:!0,emoji:!0,taskList:!0,codeFold:!0,searchReplace:!0,htmlDecode:"style,script,iframe",sequenceDiagram:!0,autoFocus:!1,toolbarIcons:function(){return["bold","italic","|","list-ul","list-ol","|","code","code-block","|","image","table","|","watch","clear"]},saveHTMLToTextarea:!0,dialogMaskOpacity:.6,imageUpload:!0,imageFormats:["jpg","jpeg","gif","png","bmp","webp","JPG","JPEG","GIF","PNG","BMP","WEBP"],imageUploadURL:"/api/attachments.json"},i=$.extend({},n,e);return editormd(t,i)}function ajaxErrorNotifyHandler(t){var e="";return e=500!==t.status?t.responseJSON.message:"\u7cfb\u7edf\u9519\u8bef",$.notify({message:e},{type:"danger"})}function resetFileInputFunc(t){t.after(t.clone().val("")),t.remove()}function customConfirm(t){var e={title:"\u63d0\u793a",buttons:{ok:{text:"\u786e\u8ba4",btnClass:"btn btn-primary",action:t.ok},cancel:{text:"\u53d6\u6d88",btnClass:"btn btn-secondary",action:t.cancel}}};return $.confirm($.extend({},e,t))}function customLoading(t){var e,n={content:t.ajax,contentLoaded:function(){setTimeout(function(){e.close()},200)}};return e=$.confirm($.extend({},n,t))}function show_success_flash(t){$.notify({message:t||"\u64cd\u4f5c\u6210\u529f"},{type:"success"})}function showSuccessFlash(t){$.notify({message:t||"\u64cd\u4f5c\u6210\u529f"},{type:"success"})}function showErrorNotify(t){$.notify({message:t||"\u64cd\u4f5c\u5931\u8d25"},{type:"danger"})}function show_add_manager(t){$(".auth-schools-user-add").modal("show"),$(".auth-schools-user-add").find("#school_id_input").val(t)}function addSponsor(t){var e='<div class="sponsor_label">\n <input type="hidden" value="school_id" />\n <span>caicai</span>\n <a href="javascript:void(0)" onclick="del_sponsor(this)">\xd7</a>\n </div>';$(t).parents(".sponsorPanel").append(e)}function del_sponsor(t){$(t).parents(".sponsor_label").remove()}function change_total(t){var e=parseInt($(t).val()),n=$(t).parents(".small_panel_item").attr("attr_line"),i=$(t).parents(".large_panel_part").attr("attr_line");console.log(i),console.log(n);var r=parseInt($("#task_Input_"+n).find(".task_Input_div").length),o="";if(r<e){for(var a=0;a<e-r;a++)o+='<div class="col-4 row task_Input_div"><span class="col-4 text-right mt-3 no_padding mr10">\u4efb\u52a1'+(r+a+1)+'</span>\n<div class="col-6 no_padding">\n<input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n</div>\n</div>';$("#task_Input_"+n).append(o)}else{var s=r-e;console.log(r),console.log(e);var l=parseInt($("#task_Input_"+n).find(".task_Input_div:last").index());console.log(l);var u=l-s;console.log(u),0==e?$("#task_Input_"+n).empty():$("#task_Input_"+n).find(".task_Input_div:gt("+u+")").remove()}}function Del_tab(t){$(t).parents(".large_panel_part").remove()}function addNewTab(t){if(0<$(".new-stage-form").length)alert("\u8bf7\u5148\u4fdd\u5b58\u4e0a\u4e00\u4e2atab");else{var e=parseInt($("#large_panel").find(".large_panel_part").length)+1,n='<form class="stage-update-form new-stage-form flex-1" action="/admins/competitions/'+t+'/competition_stages" accept-charset="UTF-8" data-remote="true" method="post"><div class="large_panel_part" attr_line="'+e+'"><div class="row d-flex mt-3">\n <span class="col-1 mt-2">tab\u6807\u9898</span>\n <div class="col-2 no_padding">\n <input type="text" class="form-control" name="stage_name"/>\n </div>\n <span class="col-1 text-right mt-2 no_padding">\u603b\u6392\u884c\u699c\u5360\u6bd4:</span>\n <div class="col-1 no_padding">\n <input type="number" class="form-control" name="score_rate" value="100"/>\n </div><span class=" mt-2">%</span>\n <div class="flex-1">\n <a href="javascript:void(0)"class="btn btn-outline-primary export-action ml20 add-task-sub">\u65b0\u589e\u5b50\u9636\u6bb5</a>\n </div>\n <a href="javascript:void(0)" class="btn btn-default ml20" onclick="Del_tab(this)">\u5220\u9664</a>\n <a href="javascript:void(0)" class="btn btn-outline-primary update-stage export-action ml20">\u4fdd\u5b58</a>\n </div>\n <div id="small_panel_'+e+'" class="small_panel">\n <div class="row d-flex small_panel_item" attr_line="sub_new_new" count="1">\n <span class="mt-2 subName mr10">\u7b2c1\u9636\u6bb5</span>\n <div class="flex-1">\n <div class="row">\n <div class="row col-6"><span class="mt-2 ml20 mr10">\u6709\u6548\u65f6\u95f4:</span>\n <div class="col-4 no_padding ">\n <input type="text" name="stage[][start_time]" id="stage__start_time" value="" autocomplete="off" class="section-start-time form-control" placeholder="\u6709\u6548\u5f00\u59cb\u65f6\u95f4">\n </div>\n <span class="mt-2">~</span>\n <div class="col-4 no_padding input_middle">\n <input type="text" name="stage[][end_time]" id="stage__end_time" value="" autocomplete="off" class="section-end-time form-control" placeholder="\u6709\u6548\u7ed3\u675f\u65f6\u95f4">\n </div></div>\n <div class="row col-3"><span class="col-4 text-right mt-2 no_padding mr10">\u603b\u4efb\u52a1\u6570:</span>\n <div class="col-6 no_padding ">\n <input type="number" class="form-control" onchange="change_total(this)" value="3" name="stage[][entry]">\n </div></div>\n <div class="row col-3"><span class="col-4 text-right mt-2 no_padding mr10">\u6210\u7ee9\u6765\u6e90:</span>\n <div class="col-6 no_padding ">\n <select class="form-control" name="stage[][score_source]">\n <option value="0">\u7ecf\u9a8c\u503c</option>\n <option value="1">\u9884\u6d4b\u51c6\u786e\u7387</option>\n </select>\n </div></div>\n </div>\n <div class="row mt-2" id="task_Input_sub_new_new">\n <div class="col-4 row task_Input_div">\n <span class="col-3 text-right mt-3 no_padding mr10">\u4efb\u52a11</span>\n <div class="col-8 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n <div class="col-4 row task_Input_div">\n <span class="col-3 text-right mt-3 no_padding mr10">\u4efb\u52a12</span>\n <div class="col-8 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n <div class="col-4 row task_Input_div">\n <span class="col-3 text-right no_padding mr10 mt-3">\u4efb\u52a13</span>\n <div class="col-8 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n </div>\n </div>\n <span>\n <a href="javascript:void(0)" class="btn btn-default ml20 small_panel_item_del">\u5220\u9664</a>\n </span>\n </div>\n</div></div></form>';$("#large_panel").append(n)}}function showMessageModal(t,e){var n=$(".modal.admin-message-modal"),i=n.find(".submit-btn");i.unbind(),e!==undefined&&"function"==typeof e&&i.on("click",e),n.find(".modal-body").html(t),n.modal("show")}function show_success_flash(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"},{type:"success"})}(function(){var t=this;(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"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])",formDisableSelector:"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",formEnableSelector:"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",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]"}}).call(this)}).call(t);var y=t.Rails;(function(){(function(){var e;e=null,y.loadCSPNonce=function(){var t;return e=null!=(t=document.querySelector("meta[name=csp-nonce]"))?t.content:void 0},y.cspNonce=function(){return null!=e?e:y.loadCSPNonce()}}).call(this),function(){var i,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,y.matches=function(t,e){return null!=e.exclude?n.call(t,e.selector)&&!n.call(t,e.exclude):n.call(t,e)},i="_ujsData",y.getData=function(t,e){var n;return null!=(n=t[i])?n[e]:void 0},y.setData=function(t,e,n){return null==t[i]&&(t[i]={}),t[i][e]=n},y.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var n,i,r;n=y.$,r=y.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},i=y.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},y.CSRFProtection=function(t){var e;if(null!=(e=r()))return t.setRequestHeader("X-CSRF-Token",e)},y.refreshCSRFTokens=function(){var t,e;if(e=r(),t=i(),null!=e&&null!=t)return n('form input[name="'+t+'"]').forEach(function(t){return t.value=e})}}.call(this),function(){var r,e,o,n;o=y.matches,"function"!=typeof(r=window.CustomEvent)&&((r=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,n=r.prototype.preventDefault,r.prototype.preventDefault=function(){var t;return t=n.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),e=y.fire=function(t,e,n){var i;return i=new r(e,{bubbles:!0,cancelable:!0,detail:n}),t.dispatchEvent(i),!i.defaultPrevented},y.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},y.delegate=function(t,n,e,i){return t.addEventListener(e,function(t){var e;for(e=t.target;e instanceof Element&&!o(e,n);)e=e.parentNode;if(e instanceof Element&&!1===i.call(e,t))return t.preventDefault(),t.stopPropagation()})}}.call(this),function(){var e,i,t,o,r,a;o=y.cspNonce,i=y.CSRFProtection,y.fire,e={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},y.ajax=function(n){var i;return n=r(n),i=t(n,function(){var t,e;return e=a(null!=(t=i.response)?t:i.responseText,i.getResponseHeader("Content-Type")),2===Math.floor(i.status/100)?"function"==typeof n.success&&n.success(e,i.statusText,i):"function"==typeof n.error&&n.error(e,i.statusText,i),"function"==typeof n.complete?n.complete(i,i.statusText):void 0}),!(null!=n.beforeSend&&!n.beforeSend(i,n))&&(i.readyState===XMLHttpRequest.OPENED?i.send(n.data):void 0)},r=function(t){return t.url=t.url||location.href,t.type=t.type.toUpperCase(),"GET"===t.type&&t.data&&(t.url.indexOf("?")<0?t.url+="?"+t.data:t.url+="&"+t.data),null==e[t.dataType]&&(t.dataType="*"),t.accept=e[t.dataType],"*"!==t.dataType&&(t.accept+=", */*; q=0.01"),t},t=function(t,e){var n;return(n=new XMLHttpRequest).open(t.type,t.url,!0),n.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||n.setRequestHeader("X-Requested-With","XMLHttpRequest"),i(n),n.withCredentials=!!t.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return e(n)},n},a=function(t,e){var n,i;if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(r){}else if(e.match(/\b(?:java|ecma)script\b/))(i=document.createElement("script")).setAttribute("nonce",o()),i.text=t,document.head.appendChild(i).parentNode.removeChild(i);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(r){}}return t},y.href=function(t){return t.href},y.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return i,!0}}}.call(this),function(){var r,o;r=y.matches,o=function(t){return Array.prototype.slice.call(t)},y.serializeElement=function(t,e){var n,i;return n=[t],r(t,"form")&&(n=o(t.elements)),i=[],n.forEach(function(e){if(e.name&&!e.disabled)return r(e,"select")?o(e.options).forEach(function(t){if(t.selected)return i.push({name:e.name,value:t.value})}):e.checked||-1===["radio","checkbox","submit"].indexOf(e.type)?i.push({name:e.name,value:e.value}):void 0}),e&&i.push(e),i.map(function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t}).join("&")},y.formElements=function(t,e){return r(t,"form")?o(t.elements).filter(function(t){return r(t,e)}):o(t.querySelectorAll(e))}}.call(this),function(){var e,o,n;o=y.fire,n=y.stopEverything,y.handleConfirm=function(t){if(!e(this))return n(t)},e=function(t){var e,n,i;if(!(i=t.getAttribute("data-confirm")))return!0;if(e=!1,o(t,"confirm")){try{e=confirm(i)}catch(r){}n=o(t,"confirm:complete",[e])}return e&&n}}.call(this),function(){var n,i,r,o,a,s,e,l,u,c,d;u=y.matches,l=y.getData,c=y.setData,d=y.stopEverything,e=y.formElements,y.handleDisabledElement=function(t){if(this.disabled)return d(t)},y.enableElement=function(t){var e;return e=t instanceof Event?t.target:t,u(e,y.linkDisableSelector)?s(e):u(e,y.buttonDisableSelector)||u(e,y.formEnableSelector)?o(e):u(e,y.formSubmitSelector)?a(e):void 0},y.disableElement=function(t){var e;return e=t instanceof Event?t.target:t,u(e,y.linkDisableSelector)?r(e):u(e,y.buttonDisableSelector)||u(e,y.formDisableSelector)?n(e):u(e,y.formSubmitSelector)?i(e):void 0},r=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(c(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",d),c(t,"ujs:disabled",!0)},s=function(t){var e;return null!=(e=l(t,"ujs:enable-with"))&&(t.innerHTML=e,c(t,"ujs:enable-with",null)),t.removeEventListener("click",d),c(t,"ujs:disabled",null)},i=function(t){return e(t,y.formDisableSelector).forEach(n)},n=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(u(t,"button")?(c(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(c(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,c(t,"ujs:disabled",!0)},a=function(t){return e(t,y.formEnableSelector).forEach(o)},o=function(t){var e;return null!=(e=l(t,"ujs:enable-with"))&&(u(t,"button")?t.innerHTML=e:t.value=e,c(t,"ujs:enable-with",null)),t.disabled=!1,c(t,"ujs:disabled",null)}}.call(this),function(){var l;l=y.stopEverything,y.handleMethod=function(t){var e,n,i,r,o,a,s;if(s=(a=this).getAttribute("data-method"))return o=y.href(a),n=y.csrfToken(),e=y.csrfParam(),i=document.createElement("form"),r="<input name='_method' value='"+s+"' type='hidden' />",null==e||null==n||y.isCrossDomain(o)||(r+="<input name='"+e+"' value='"+n+"' type='hidden' />"),r+='<input type="submit" />',i.method="post",i.action=o,i.target=a.target,i.innerHTML=r,i.style.display="none",document.body.appendChild(i),i.querySelector('[type="submit"]').click(),l(t)}}.call(this),function(){var l,u,c,d,h,f,p,g,m,v=[].slice;f=y.matches,c=y.getData,g=y.setData,u=y.fire,m=y.stopEverything,l=y.ajax,d=y.isCrossDomain,p=y.serializeElement,h=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},y.handleRemote=function(t){var e,n,i,r,o,a,s;return!h(r=this)||(u(r,"ajax:before")?(s=r.getAttribute("data-with-credentials"),i=r.getAttribute("data-type")||"script",f(r,y.formSubmitSelector)?(e=c(r,"ujs:submit-button"),o=c(r,"ujs:submit-button-formmethod")||r.method,a=c(r,"ujs:submit-button-formaction")||r.getAttribute("action")||location.href,"GET"===o.toUpperCase()&&(a=a.replace(/\?.*$/,"")),"multipart/form-data"===r.enctype?(n=new FormData(r),null!=e&&n.append(e.name,e.value)):n=p(r,e),g(r,"ujs:submit-button",null),g(r,"ujs:submit-button-formmethod",null),g(r,"ujs:submit-button-formaction",null)):f(r,y.buttonClickSelector)||f(r,y.inputChangeSelector)?(o=r.getAttribute("data-method"),a=r.getAttribute("data-url"),n=p(r,r.getAttribute("data-params"))):(o=r.getAttribute("data-method"),a=y.href(r),n=r.getAttribute("data-params")),l({type:o||"GET",url:a,data:n,dataType:i,beforeSend:function(t,e){return u(r,"ajax:beforeSend",[t,e])?u(r,"ajax:send",[t]):(u(r,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:complete",t)},crossDomain:d(a),withCredentials:null!=s&&"false"!==s}),m(t)):(u(r,"ajax:stopped"),!1))},y.formSubmitButtonClick=function(){var t,e;if(e=(t=this).form)return t.name&&g(e,"ujs:submit-button",{name:t.name,value:t.value}),g(e,"ujs:formnovalidate-button",t.formNoValidate),g(e,"ujs:submit-button-formaction",t.getAttribute("formaction")),g(e,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},y.preventInsignificantClick=function(t){var e,n,i,r;if(r=((i=this).getAttribute("data-method")||"GET").toUpperCase(),e=i.getAttribute("data-params"),n=(t.metaKey||t.ctrlKey)&&"GET"===r&&!e,null!=t.button&&0!==t.button||n)return t.stopImmediatePropagation()}}.call(this),function(){var t,i,e,n,r,o,a,s,l,u,c,d,h,f,p;if(o=y.fire,e=y.delegate,s=y.getData,t=y.$,p=y.refreshCSRFTokens,i=y.CSRFProtection,h=y.loadCSPNonce,r=y.enableElement,n=y.disableElement,u=y.handleDisabledElement,l=y.handleConfirm,f=y.preventInsignificantClick,d=y.handleRemote,a=y.formSubmitButtonClick,c=y.handleMethod,"undefined"!=typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=y,jQuery.ajaxPrefilter(function(t,e,n){if(!t.crossDomain)return i(n)})}y.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return t(y.formEnableSelector).forEach(function(t){if(s(t,"ujs:disabled"))return r(t)}),t(y.linkDisableSelector).forEach(function(t){if(s(t,"ujs:disabled"))return r(t)})}),e(document,y.linkDisableSelector,"ajax:complete",r),e(document,y.linkDisableSelector,"ajax:stopped",r),e(document,y.buttonDisableSelector,"ajax:complete",r),e(document,y.buttonDisableSelector,"ajax:stopped",r),e(document,y.linkClickSelector,"click",f),e(document,y.linkClickSelector,"click",u),e(document,y.linkClickSelector,"click",l),e(document,y.linkClickSelector,"click",n),e(document,y.linkClickSelector,"click",d),e(document,y.linkClickSelector,"click",c),e(document,y.buttonClickSelector,"click",f),e(document,y.buttonClickSelector,"click",u),e(document,y.buttonClickSelector,"click",l),e(document,y.buttonClickSelector,"click",n),e(document,y.buttonClickSelector,"click",d),e(document,y.inputChangeSelector,"change",u),e(document,y.inputChangeSelector,"change",l),e(document,y.inputChangeSelector,"change",d),e(document,y.formSubmitSelector,"submit",u),e(document,y.formSubmitSelector,"submit",l),e(document,y.formSubmitSelector,"submit",d),e(document,y.formSubmitSelector,"submit",function(t){return setTimeout(function(){return n(t)},13)}),e(document,y.formSubmitSelector,"ajax:send",n),e(document,y.formSubmitSelector,"ajax:complete",r),e(document,y.formInputClickSelector,"click",f),e(document,y.formInputClickSelector,"click",u),e(document,y.formInputClickSelector,"click",l),e(document,y.formInputClickSelector,"click",a),document.addEventListener("DOMContentLoaded",p),document.addEventListener("DOMContentLoaded",h),window._rails_loaded=!0},window.Rails===y&&o(document,"rails:attachBindings")&&y.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=y:"function"==typeof define&&define.amd&&define(y)}).call(this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.ActiveStorage={})}(this,function(t){"use strict";function e(t,e){return t(e={exports:{}},e.exports),e.exports}function a(t){var e=i(document.head,'meta[name="'+t+'"]');if(e)return e.getAttribute("content")}function r(t,e){return"string"==typeof t&&(e=t,t=document),o(t.querySelectorAll(e))}function i(t,e){return"string"==typeof t&&(e=t,t=document),t.querySelector(e)}function l(t,e,n){var i=2<arguments.length&&n!==undefined?arguments[2]:{},r=t.disabled,o=i.bubbles,a=i.cancelable,s=i.detail,l=document.createEvent("Event");l.initEvent(e,o||!0,a||!0),l.detail=s||{};try{t.disabled=!1,t.dispatchEvent(l)}finally{t.disabled=r}return l}function o(t){return Array.isArray(t)?t:Array.from?Array.from(t):[].slice.call(t)}function s(t,e){if(t&&"function"==typeof t[e]){for(var n=arguments.length,i=Array(2<n?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return t[e].apply(t,i)}}function n(){E||(E=!0,document.addEventListener("click",u,!0),document.addEventListener("submit",c),document.addEventListener("ajax:before",d))}function u(t){var e=t.target;"INPUT"!=e.tagName&&"BUTTON"!=e.tagName||"submit"!=e.type||!e.form||I.set(e.form,e)}function c(t){h(t)}function d(t){"FORM"==t.target.tagName&&h(t)}function h(t){var e=t.target;if(e.hasAttribute(k))t.preventDefault();else{var n=new M(e),i=n.inputs;i.length&&(t.preventDefault(),e.setAttribute(k,""),i.forEach(p),n.start(function(t){e.removeAttribute(k),t?i.forEach(g):f(e)}))}}function f(t){var e=I.get(t)||i(t,"input[type=submit], button[type=submit]");if(e){var n=e.disabled;e.disabled=!1,e.focus(),e.click(),e.disabled=n}else(e=document.createElement("input")).type="submit",e.style.display="none",t.appendChild(e),e.click(),t.removeChild(e);I["delete"](t)}function p(t){t.disabled=!0}function g(t){t.disabled=!1}function m(){window.ActiveStorage&&n()}var v=e(function(t){var e;e=function(c){function u(t,e){var n=t[0],i=t[1],r=t[2],o=t[3];i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+e[0]-680876936|0)<<7|n>>>25)+i|0)&i|~n&r)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&i)+e[2]+606105819|0)<<17|r>>>15)+o|0)&o|~r&n)+e[3]-1044525330|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+e[4]-176418897|0)<<7|n>>>25)+i|0)&i|~n&r)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&i)+e[6]-1473231341|0)<<17|r>>>15)+o|0)&o|~r&n)+e[7]-45705983|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+e[8]+1770035416|0)<<7|n>>>25)+i|0)&i|~n&r)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&i)+e[10]-42063|0)<<17|r>>>15)+o|0)&o|~r&n)+e[11]-1990404162|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&r|~i&o)+e[12]+1804603682|0)<<7|n>>>25)+i|0)&i|~n&r)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&i)+e[14]-1502002290|0)<<17|r>>>15)+o|0)&o|~r&n)+e[15]+1236535329|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+e[1]-165796510|0)<<5|n>>>27)+i|0)&r|i&~r)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&i|n&~i)+e[11]+643717713|0)<<14|r>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+e[5]-701558691|0)<<5|n>>>27)+i|0)&r|i&~r)+e[10]+38016083|0)<<9|o>>>23)+n|0)&i|n&~i)+e[15]-660478335|0)<<14|r>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+e[9]+568446438|0)<<5|n>>>27)+i|0)&r|i&~r)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&i|n&~i)+e[3]-187363961|0)<<14|r>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i&o|r&~o)+e[13]-1444681467|0)<<5|n>>>27)+i|0)&r|i&~r)+e[2]-51403784|0)<<9|o>>>23)+n|0)&i|n&~i)+e[7]+1735328473|0)<<14|r>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+e[5]-378558|0)<<4|n>>>28)+i|0)^i^r)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^i)+e[11]+1839030562|0)<<16|r>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+e[1]-1530992060|0)<<4|n>>>28)+i|0)^i^r)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^i)+e[7]-155497632|0)<<16|r>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+e[13]+681279174|0)<<4|n>>>28)+i|0)^i^r)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^i)+e[3]-722521979|0)<<16|r>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((o=((o+=((n=((n+=(i^r^o)+e[9]-640364487|0)<<4|n>>>28)+i|0)^i^r)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^i)+e[15]+530742520|0)<<16|r>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|i>>>9)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+e[0]-198630844|0)<<6|n>>>26)+i|0)|~r))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+e[14]-1416354905|0)<<15|r>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+e[12]+1700485571|0)<<6|n>>>26)+i|0)|~r))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+e[10]-1051523|0)<<15|r>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+e[8]+1873313359|0)<<6|n>>>26)+i|0)|~r))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+e[6]-1560198380|0)<<15|r>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|i>>>11)+r|0,i=((i+=((o=((o+=(i^((n=((n+=(r^(i|~o))+e[4]-145523070|0)<<6|n>>>26)+i|0)|~r))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((r=((r+=(n^(o|~i))+e[2]+718787259|0)<<15|r>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|i>>>11)+r|0,t[0]=n+t[0]|0,t[1]=i+t[1]|0,t[2]=r+t[2]|0,t[3]=o+t[3]|0}function d(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function h(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function i(t){var e,n,i,r,o,a,s=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=s;e+=64)u(l,d(t.substring(e-64,e)));for(n=(t=t.substring(e-64)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<n;e+=1)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),55<e)for(u(l,i),e=0;e<16;e+=1)i[e]=0;return r=(r=8*s).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(r[2],16),a=parseInt(r[1],16)||0,i[14]=o,i[15]=a,u(l,i),l}function r(t){var e,n,i,r,o,a,s=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=s;e+=64)u(l,h(t.subarray(e-64,e)));for(n=(t=e-64<s?t.subarray(e-64):new Uint8Array(0)).length,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<n;e+=1)i[e>>2]|=t[e]<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),55<e)for(u(l,i),e=0;e<16;e+=1)i[e]=0;return r=(r=8*s).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(r[2],16),a=parseInt(r[1],16)||0,i[14]=o,i[15]=a,u(l,i),l}function n(t){var e,n="";for(e=0;e<4;e+=1)n+=g[t>>8*e+4&15]+g[t>>8*e&15];return n}function a(t){var e;for(e=0;e<t.length;e+=1)t[e]=n(t[e]);return t.join("")}function o(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function e(t,e){var n,i=t.length,r=new ArrayBuffer(i),o=new Uint8Array(r);for(n=0;n<i;n+=1)o[n]=t.charCodeAt(n);return e?o:r}function s(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function l(t,e,n){var i=new Uint8Array(t.byteLength+e.byteLength);return i.set(new Uint8Array(t)),i.set(new Uint8Array(e),t.byteLength),n?i:i.buffer}function f(t){var e,n=[],i=t.length;for(e=0;e<i-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}var g=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return a(i("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function u(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(t,e){var n,i,r,o,a=this.byteLength,s=u(t,a),l=a;return e!==c&&(l=u(e,a)),l<s?new ArrayBuffer(0):(n=l-s,i=new ArrayBuffer(n),r=new Uint8Array(i),o=new Uint8Array(this,s,n),r.set(o),i)}}(),p.prototype.append=function(t){return this.appendBinary(o(t)),this},p.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,n=this._buff.length;for(e=64;e<=n;e+=64)u(this._hash,d(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},p.prototype.end=function(t){var e,n,i=this._buff,r=i.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r;e+=1)o[e>>2]|=i.charCodeAt(e)<<(e%4<<3);return this._finish(o,r),n=a(this._hash),t&&(n=f(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},p.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(t,e){var n,i,r,o=e;if(t[o>>2]|=128<<(o%4<<3),55<o)for(u(this._hash,t),o=0;o<16;o+=1)t[o]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),r=parseInt(n[1],16)||0,t[14]=i,t[15]=r,u(this._hash,t)},p.hash=function(t,e){return p.hashBinary(o(t),e)},p.hashBinary=function(t,e){var n=a(i(t));return e?f(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(t){var e,n=l(this._buff.buffer,t,!0),i=n.length;for(this._length+=t.byteLength,e=64;e<=i;e+=64)u(this._hash,h(n.subarray(e-64,e)));return this._buff=e-64<i?new Uint8Array(n.buffer.slice(e-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(t){var e,n,i=this._buff,r=i.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r;e+=1)o[e>>2]|=i[e]<<(e%4<<3);return this._finish(o,r),n=a(this._hash),t&&(n=f(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var t=p.prototype.getState.call(this);return t.buff=s(t.buff),t},p.ArrayBuffer.prototype.setState=function(t){return t.buff=e(t.buff,!0),p.prototype.setState.call(this,t)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(t,e){var n=a(r(new Uint8Array(t)));return e?f(n):n},p},t.exports=e()}),y=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},x=function(){function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}}(),b=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,_=function(){function n(t){y(this,n),this.file=t,this.chunkSize=2097152,this.chunkCount=Math.ceil(this.file.size/this.chunkSize),this.chunkIndex=0}return x(n,null,[{key:"create",value:function i(t,e){new n(t).create(e)}}]),x(n,[{key:"create",value:function i(t){var e=this;this.callback=t,this.md5Buffer=new v.ArrayBuffer,this.fileReader=new FileReader,this.fileReader.addEventListener("load",function(t){return e.fileReaderDidLoad(t)}),this.fileReader.addEventListener("error",function(t){return e.fileReaderDidError(t)}),this.readNextChunk()}},{key:"fileReaderDidLoad",value:function r(t){if(this.md5Buffer.append(t.target.result),!this.readNextChunk()){
|
|
var e=this.md5Buffer.end(!0),n=btoa(e);this.callback(null,n)}}},{key:"fileReaderDidError",value:function t(){this.callback("Error reading "+this.file.name)}},{key:"readNextChunk",value:function o(){if(this.chunkIndex<this.chunkCount||0==this.chunkIndex&&0==this.chunkCount){var t=this.chunkIndex*this.chunkSize,e=Math.min(t+this.chunkSize,this.file.size),n=b.call(this.file,t,e);return this.fileReader.readAsArrayBuffer(n),this.chunkIndex++,!0}return!1}}]),n}(),w=function(){function r(t,e,n){var i=this;y(this,r),this.file=t,this.attributes={filename:t.name,content_type:t.type,byte_size:t.size,checksum:e},this.xhr=new XMLHttpRequest,this.xhr.open("POST",n,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.xhr.setRequestHeader("X-CSRF-Token",a("csrf-token")),this.xhr.addEventListener("load",function(t){return i.requestDidLoad(t)}),this.xhr.addEventListener("error",function(t){return i.requestDidError(t)})}return x(r,[{key:"create",value:function e(t){this.callback=t,this.xhr.send(JSON.stringify({blob:this.attributes}))}},{key:"requestDidLoad",value:function i(t){if(200<=this.status&&this.status<300){var e=this.response,n=e.direct_upload;delete e.direct_upload,this.attributes=e,this.directUploadData=n,this.callback(null,this.toJSON())}else this.requestDidError(t)}},{key:"requestDidError",value:function t(){this.callback('Error creating Blob for "'+this.file.name+'". Status: '+this.status)}},{key:"toJSON",value:function n(){var t={};for(var e in this.attributes)t[e]=this.attributes[e];return t}},{key:"status",get:function o(){return this.xhr.status}},{key:"response",get:function o(){var t=this.xhr,e=t.responseType,n=t.response;return"json"==e?n:JSON.parse(n)}}]),r}(),S=function(){function a(t){var e=this;y(this,a),this.blob=t,this.file=t.file;var n=t.directUploadData,i=n.url,r=n.headers;for(var o in this.xhr=new XMLHttpRequest,this.xhr.open("PUT",i,!0),this.xhr.responseType="text",r)this.xhr.setRequestHeader(o,r[o]);this.xhr.addEventListener("load",function(t){return e.requestDidLoad(t)}),this.xhr.addEventListener("error",function(t){return e.requestDidError(t)})}return x(a,[{key:"create",value:function e(t){this.callback=t,this.xhr.send(this.file.slice())}},{key:"requestDidLoad",value:function r(t){var e=this.xhr,n=e.status,i=e.response;200<=n&&n<300?this.callback(null,i):this.requestDidError(t)}},{key:"requestDidError",value:function t(){this.callback('Error storing "'+this.file.name+'". Status: '+this.xhr.status)}}]),a}(),C=0,T=function(){function i(t,e,n){y(this,i),this.id=++C,this.file=t,this.url=e,this.delegate=n}return x(i,[{key:"create",value:function t(i){var r=this;_.create(this.file,function(t,e){if(t)i(t);else{var n=new w(r.file,e,r.url);s(r.delegate,"directUploadWillCreateBlobWithXHR",n.xhr),n.create(function(t){if(t)i(t);else{var e=new S(n);s(r.delegate,"directUploadWillStoreFileWithXHR",e.xhr),e.create(function(t){t?i(t):i(null,n.toJSON())})}})}})}}]),i}(),A=function(){function n(t,e){y(this,n),this.input=t,this.file=e,this.directUpload=new T(this.file,this.url,this),this.dispatch("initialize")}return x(n,[{key:"start",value:function t(n){var i=this,r=document.createElement("input");r.type="hidden",r.name=this.input.name,this.input.insertAdjacentElement("beforebegin",r),this.dispatch("start"),this.directUpload.create(function(t,e){t?(r.parentNode.removeChild(r),i.dispatchError(t)):r.value=e.signed_id,i.dispatch("end"),n(t)})}},{key:"uploadRequestDidProgress",value:function i(t){var e=t.loaded/t.total*100;e&&this.dispatch("progress",{progress:e})}},{key:"dispatch",value:function r(t,e){var n=1<arguments.length&&e!==undefined?arguments[1]:{};return n.file=this.file,n.id=this.directUpload.id,l(this.input,"direct-upload:"+t,{detail:n})}},{key:"dispatchError",value:function e(t){this.dispatch("error",{error:t}).defaultPrevented||alert(t)}},{key:"directUploadWillCreateBlobWithXHR",value:function o(t){this.dispatch("before-blob-request",{xhr:t})}},{key:"directUploadWillStoreFileWithXHR",value:function a(t){var e=this;this.dispatch("before-storage-request",{xhr:t}),t.upload.addEventListener("progress",function(t){return e.uploadRequestDidProgress(t)})}},{key:"url",get:function s(){return this.input.getAttribute("data-direct-upload-url")}}]),n}(),D="input[type=file][data-direct-upload-url]:not([disabled])",M=function(){function e(t){y(this,e),this.form=t,this.inputs=r(t,D).filter(function(t){return t.files.length})}return x(e,[{key:"start",value:function t(e){var n=this,i=this.createDirectUploadControllers(),r=function r(){var t=i.shift();t?t.start(function(t){t?(e(t),n.dispatch("end")):r()}):(e(),n.dispatch("end"))};this.dispatch("start"),r()}},{key:"createDirectUploadControllers",value:function n(){var i=[];return this.inputs.forEach(function(n){o(n.files).forEach(function(t){var e=new A(n,t);i.push(e)})}),i}},{key:"dispatch",value:function i(t,e){var n=1<arguments.length&&e!==undefined?arguments[1]:{};return l(this.form,"direct-uploads:"+t,{detail:n})}}]),e}(),k="data-direct-uploads-processing",I=new WeakMap,E=!1;setTimeout(m,1),t.start=n,t.DirectUpload=T,Object.defineProperty(t,"__esModule",{value:!0})}),function(){var t=this;(function(){(function(){this.Turbolinks={supported:null!=window.history.pushState&&null!=window.requestAnimationFrame&&null!=window.addEventListener,visit:function(t,e){return c.controller.visit(t,e)},clearCache:function(){return c.controller.clearCache()},setProgressBarDelay:function(t){return c.controller.setProgressBarDelay(t)}}}).call(this)}).call(t);var c=t.Turbolinks;(function(){(function(){var n,i,l,t,e,r,o,a,s,u=[].slice;c.copyObject=function(t){var e,n,i;for(e in n={},t)i=t[e],n[e]=i;return n},c.closest=function(t,e){return n.call(t,e)},n=null!=(s=document.documentElement.closest)?s:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&i.call(e,t))return e;e=e.parentNode}},c.defer=function(t){return setTimeout(t,1)},c.throttle=function(n){var i;return i=null,function(){var t,e;return t=1<=arguments.length?u.call(arguments,0):[],null!=i?i:i=requestAnimationFrame((e=this,function(){return i=null,n.apply(e,t)}))}},c.dispatch=function(t,e){var n,i,r,o,a,s;return s=(a=null!=e?e:{}).target,n=a.cancelable,i=a.data,(r=document.createEvent("Events")).initEvent(t,!0,!0===n),r.data=null!=i?i:{},r.cancelable&&!l&&(o=r.preventDefault,r.preventDefault=function(){return this.defaultPrevented||Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),o.call(this)}),(null!=s?s:document).dispatchEvent(r),r},(a=document.createEvent("Events")).initEvent("test",!0,!0),a.preventDefault(),l=a.defaultPrevented,c.match=function(t,e){return i.call(t,e)},i=null!=(e=null!=(r=null!=(o=(t=document.documentElement).matchesSelector)?o:t.webkitMatchesSelector)?r:t.msMatchesSelector)?e:t.mozMatchesSelector,c.uuid=function(){var t,e,n;for(n="",t=e=1;e<=36;t=++e)n+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return n}}).call(this),function(){c.Location=function(){function t(t){var e,n;null==t&&(t=""),(n=document.createElement("a")).href=t.toString(),this.absoluteURL=n.href,(e=n.hash.length)<2?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=n.hash.slice(1))}var e,n,i,r;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.requestURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=n(t),this.isEqualTo(t)||r(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},n=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return i(t,"/")?t:t+"/"},r=function(t,e){return t.slice(0,e.length)===e},i=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var i=function(t,e){return function(){return t.apply(e,arguments)}};c.HttpRequest=function(){function t(t,e,n){this.delegate=t,this.requestCanceled=i(this.requestCanceled,this),this.requestTimedOut=i(this.requestTimedOut,this),this.requestFailed=i(this.requestFailed,this),this.requestLoaded=i(this.requestLoaded,this),this.requestProgressed=i(this.requestProgressed,this),this.url=c.Location.wrap(e).requestURL,this.referrer=c.Location.wrap(n).absoluteURL,this.createXHR()}return t.NETWORK_FAILURE=0,t.TIMEOUT_FAILURE=-1,t.timeout=60,t.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},t.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},t.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},t.prototype.requestLoaded=function(){return this.endRequest((e=this,function(){var t;return 200<=(t=e.xhr.status)&&t<300?e.delegate.requestCompletedWithResponse(e.xhr.responseText,e.xhr.getResponseHeader("Turbolinks-Location")):(e.failed=!0,e.delegate.requestFailedWithStatusCode(e.xhr.status,e.xhr.responseText))}));var e},t.prototype.requestFailed=function(){return this.endRequest((t=this,function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}));var t},t.prototype.requestTimedOut=function(){return this.endRequest((t=this,function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}));var t},t.prototype.requestCanceled=function(){return this.endRequest()},t.prototype.notifyApplicationBeforeRequestStart=function(){return c.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},t.prototype.notifyApplicationAfterRequestEnd=function(){return c.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},t.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},t.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},t.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},t.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},t}()}.call(this),function(){var n=function(t,e){return function(){return t.apply(e,arguments)}};c.ProgressBar=function(){function t(){this.trickle=n(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var e;return e=300,t.defaultCSS=".turbolinks-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 9999;\n transition: width "+e+"ms ease-out, opacity "+e/2+"ms "+e/2+"ms ease-in;\n transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement((t=this,function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}))):void 0;var t},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*e)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,e)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame((t=this,function(){return t.progressElement.style.width=10+90*t.value+"%"}));var t},t.prototype.createStylesheetElement=function(){var t;return(t=document.createElement("style")).type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return(t=document.createElement("div")).className="turbolinks-progress-bar",t},t}()}.call(this),function(){var r=function(t,e){return function(){return t.apply(e,arguments)}};c.BrowserAdapter=function(){function t(t){this.controller=t,this.showProgressBar=r(this.showProgressBar,this),this.progressBar=new c.ProgressBar}var n,i,e;return e=c.HttpRequest,n=e.NETWORK_FAILURE,i=e.TIMEOUT_FAILURE,t.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},t.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},t.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},t.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},t.prototype.visitRequestCompleted=function(t){return t.loadResponse()},t.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case i:return this.reload();default:return t.loadResponse()}},t.prototype.visitRequestFinished=function(){return this.hideProgressBar()},t.prototype.visitCompleted=function(t){return t.followRedirect()},t.prototype.pageInvalidated=function(){return this.reload()},t.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,this.controller.progressBarDelay)},t.prototype.showProgressBar=function(){return this.progressBar.show()},t.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},t.prototype.reload=function(){return window.location.reload()},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};c.History=function(){function t(t){this.delegate=t,this.onPageLoad=e(this.onPageLoad,this),this.onPopState=e(this.onPopState,this)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},t.prototype.push=function(t,e){return t=c.Location.wrap(t),this.update("push",t,e)},t.prototype.replace=function(t,e){return t=c.Location.wrap(t),this.update("replace",t,e)},t.prototype.onPopState=function(t){var e,n,i,r;return this.shouldHandlePopState()&&(r=null!=(n=t.state)?n.turbolinks:void 0)?(e=c.Location.wrap(window.location),i=r.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(e,i)):void 0},t.prototype.onPageLoad=function(){return c.defer((t=this,function(){return t.pageLoaded=!0}));var t},t.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},t.prototype.pageIsLoaded=function(){return this.pageLoaded||"complete"===document.readyState},t.prototype.update=function(t,e,n){var i;return i={turbolinks:{restorationIdentifier:n}},history[t+"State"](i,null,e)},t}()}.call(this),function(){c.HeadDetails=function(){function t(t){var e,n,i,r,o;for(this.elements={},n=0,r=t.length;n<r;n++)(o=t[n]).nodeType===Node.ELEMENT_NODE&&(i=o.outerHTML,(null!=(e=this.elements)[i]?e[i]:e[i]={type:s(o),tracked:a(o),elements:[]}).elements.push(o))}var o,e,n,a,s;return t.fromHeadElement=function(t){var e;return new this(null!=(e=null!=t?t.childNodes:void 0)?e:[])},t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var n;return function(){var t,e;for(n in e=[],t=this.elements)t[n].tracked&&e.push(n);return e}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var n,i,r,o,a,s;for(i in a=[],r=this.elements)s=(o=r[i]).type,n=o.elements,s!==t||e.hasElementWithKey(i)||a.push(n[0]);return a},t.prototype.getProvisionalElements=function(){var t,e,n,i,r,o,a;for(e in n=[],i=this.elements)a=(r=i[e]).type,o=r.tracked,t=r.elements,null!=a||o?1<t.length&&n.push.apply(n,t.slice(1)):n.push.apply(n,t);return n},t.prototype.getMetaValue=function(t){var e;return null!=(e=this.findMetaElementByName(t))?e.getAttribute("content"):void 0},t.prototype.findMetaElementByName=function(t){var e,n,i,r;for(i in e=void 0,r=this.elements)n=r[i].elements,o(n[0],t)&&(e=n[0]);return e},s=function(t){return e(t)?"script":n(t)?"stylesheet":void 0},a=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){return"script"===t.tagName.toLowerCase()},n=function(t){var e;return"style"===(e=t.tagName.toLowerCase())||"link"===e&&"stylesheet"===t.getAttribute("rel")},o=function(t,e){return"meta"===t.tagName.toLowerCase()&&t.getAttribute("name")===e},t}()}.call(this),function(){c.Snapshot=function(){function t(t,e){this.headDetails=t,this.bodyElement=e}return t.wrap=function(t){return t instanceof this?t:"string"==typeof t?this.fromHTMLString(t):this.fromHTMLElement(t)},t.fromHTMLString=function(t){var e;return(e=document.createElement("html")).innerHTML=t,this.fromHTMLElement(e)},t.fromHTMLElement=function(t){var e,n,i;return n=t.querySelector("head"),e=null!=(i=t.querySelector("body"))?i:document.createElement("body"),new this(c.HeadDetails.fromHeadElement(n),e)},t.prototype.clone=function(){return new this.constructor(this.headDetails,this.bodyElement.cloneNode(!0))},t.prototype.getRootLocation=function(){var t,e;return e=null!=(t=this.getSetting("root"))?t:"/",new c.Location(e)},t.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},t.prototype.getElementForAnchor=function(t){try{return this.bodyElement.querySelector("[id='"+t+"'], a[name='"+t+"']")}catch(c){}},t.prototype.getPermanentElements=function(){return this.bodyElement.querySelectorAll("[id][data-turbolinks-permanent]")},t.prototype.getPermanentElementById=function(t){return this.bodyElement.querySelector("#"+t+"[data-turbolinks-permanent]")},t.prototype.getPermanentElementsPresentInSnapshot=function(t){var e,n,i,r,o;for(o=[],n=0,i=(r=this.getPermanentElements()).length;n<i;n++)e=r[n],t.getPermanentElementById(e.id)&&o.push(e);return o},t.prototype.findFirstAutofocusableElement=function(){return this.bodyElement.querySelector("[autofocus]")},t.prototype.hasAnchor=function(t){return null!=this.getElementForAnchor(t)},t.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},t.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},t.prototype.isVisitable=function(){return"reload"!==this.getSetting("visit-control")},t.prototype.getSetting=function(t){return this.headDetails.getMetaValue("turbolinks-"+t)},t}()}.call(this),function(){var o=[].slice;c.Renderer=function(){function t(){}var n;return t.render=function(t,e){var n,i,r;return i=t,n=e,(r=function(t,e,n){n.prototype=t.prototype;var i=new n,r=t.apply(i,e);return Object(r)===r?r:i}(this,3<=arguments.length?o.call(arguments,2):[],function(){})).delegate=i,r.render(n),r},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:((e=document.createElement("script")).textContent=t.textContent,e.async=!1,n(e,t),e)},n=function(t,e){var n,i,r,o,a,s,l;for(s=[],n=0,i=(o=e.attributes).length;n<i;n++)r=(a=o[n]).name,l=a.value,s.push(t.setAttribute(r,l));return s},t}()}.call(this),function(){var s,l,n=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;c.SnapshotRenderer=function(t){function e(t,e,n){this.currentSnapshot=t,this.newSnapshot=e,this.isPreview=n,this.currentHeadDetails=this.currentSnapshot.headDetails,this.newHeadDetails=this.newSnapshot.headDetails,this.currentBody=this.currentSnapshot.bodyElement,this.newBody=this.newSnapshot.bodyElement}return n(e,t),e.prototype.render=function(t){return this.shouldRender()?(this.mergeHead(),this.renderView((e=this,function(){return e.replaceBody(),e.isPreview||e.focusFirstAutofocusableElement(),t()}))):this.invalidateView();var e},e.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},e.prototype.replaceBody=function(){var t;return t=this.relocateCurrentBodyPermanentElements(),this.activateNewBodyScriptElements(),this.assignNewBody(),this.replacePlaceholderElementsWithClonedPermanentElements(t)},e.prototype.shouldRender=function(){return this.newSnapshot.isVisitable()&&this.trackedElementsAreIdentical()},e.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},e.prototype.copyNewHeadStylesheetElements=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.getNewHeadStylesheetElements()).length;e<n;e++)t=i[e],r.push(document.head.appendChild(t));return r},e.prototype.copyNewHeadScriptElements=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.getNewHeadScriptElements()).length;e<n;e++)t=i[e],r.push(document.head.appendChild(this.createScriptElement(t)));return r},e.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.getCurrentHeadProvisionalElements()).length;e<n;e++)t=i[e],r.push(document.head.removeChild(t));return r},e.prototype.copyNewHeadProvisionalElements=function(){var t,e,n,i,r;for(r=[],e=0,n=(i=this.getNewHeadProvisionalElements()).length;e<n;e++)t=i[e],r.push(document.head.appendChild(t));return r},e.prototype.relocateCurrentBodyPermanentElements=function(){var t,e,n,i,r,o,a;for(a=[],t=0,e=(o=this.getCurrentBodyPermanentElements()).length;t<e;t++)i=o[t],r=s(i),n=this.newSnapshot.getPermanentElementById(i.id),l(i,r.element),l(n,i),a.push(r);return a},e.prototype.replacePlaceholderElementsWithClonedPermanentElements=function(t){var e,n,i,r,o,a;for(a=[],i=0,r=t.length;i<r;i++)n=(o=t[i]).element,e=o.permanentElement.cloneNode(!0),a.push(l(n,e));return a},e.prototype.activateNewBodyScriptElements=function(){var t,e,n,i,r,o;for(o=[],e=0,i=(r=this.getNewBodyScriptElements()).length;e<i;e++)n=r[e],t=this.createScriptElement(n),o.push(l(n,t));return o},e.prototype.assignNewBody=function(){return document.body=this.newBody},e.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.newSnapshot.findFirstAutofocusableElement())?t.focus():void 0},e.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},e.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},e.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},e.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},e.prototype.getCurrentBodyPermanentElements=function(){return this.currentSnapshot.getPermanentElementsPresentInSnapshot(this.newSnapshot)},e.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},e}(c.Renderer),s=function(t){var e;return(e=document.createElement("meta")).setAttribute("name","turbolinks-permanent-placeholder"),e.setAttribute("content",t.id),{element:e,permanentElement:t}},l=function(t,e){var n;return(n=t.parentNode)?n.replaceChild(e,t):void 0}}.call(this),function(){var n=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;c.ErrorRenderer=function(t){function e(t){var e;(e=document.createElement("html")).innerHTML=t,this.newHead=e.querySelector("head"),this.newBody=e.querySelector("body")}return n(e,t),e.prototype.render=function(t){return this.renderView((e=this,function(){return e.replaceHeadAndBody(),e.activateBodyScriptElements(),t()}));var e},e.prototype.replaceHeadAndBody=function(){var t,e;return e=document.head,t=document.body,e.parentNode.replaceChild(this.newHead,e),t.parentNode.replaceChild(this.newBody,t)},e.prototype.activateBodyScriptElements=function(){var t,e,n,i,r,o;for(o=[],e=0,n=(i=this.getScriptElements()).length;e<n;e++)r=i[e],t=this.createScriptElement(r),o.push(r.parentNode.replaceChild(t,r));return o},e.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},e}(c.Renderer)}.call(this),function(){c.View=function(){function t(t){this.delegate=t,this.htmlElement=document.documentElement}return t.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},t.prototype.getElementForAnchor=function(t){return this.getSnapshot().getElementForAnchor(t)},t.prototype.getSnapshot=function(){return c.Snapshot.fromHTMLElement(this.htmlElement)},t.prototype.render=function(t,e){var n,i,r;return r=t.snapshot,n=t.error,i=t.isPreview,this.markAsPreview(i),null!=r?this.renderSnapshot(r,i,e):this.renderError(n,e)},t.prototype.markAsPreview=function(t){return t?this.htmlElement.setAttribute("data-turbolinks-preview",""):this.htmlElement.removeAttribute("data-turbolinks-preview")},t.prototype.renderSnapshot=function(t,e,n){return c.SnapshotRenderer.render(this.delegate,n,this.getSnapshot(),c.Snapshot.wrap(t),e)},t.prototype.renderError=function(t,e){return c.ErrorRenderer.render(this.delegate,e,t)},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};c.ScrollManager=function(){function t(t){this.delegate=t,this.onScroll=e(this.onScroll,this),this.onScroll=c.throttle(this.onScroll)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},t.prototype.scrollToElement=function(t){return t.scrollIntoView()},t.prototype.scrollToPosition=function(t){var e,n;return e=t.x,n=t.y,window.scrollTo(e,n)},t.prototype.onScroll=function(){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},t.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},t}()}.call(this),function(){c.SnapshotCache=function(){function t(t){this.size=t,this.keys=[],this.snapshots={}}var i;return t.prototype.has=function(t){return i(t)in this.snapshots},t.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},t.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},t.prototype.read=function(t){var e;return e=i(t),this.snapshots[e]},t.prototype.write=function(t,e){var n;return n=i(t),this.snapshots[n]=e},t.prototype.touch=function(t){var e,n;return n=i(t),-1<(e=this.keys.indexOf(n))&&this.keys.splice(e,1),this.keys.unshift(n),this.trim()},t.prototype.trim=function(){var t,e,n,i,r;for(r=[],t=0,n=(i=this.keys.splice(this.size)).length;t<n;t++)e=i[t],r.push(delete this.snapshots[e]);return r},i=function(t){return c.Location.wrap(t).toCacheKey()},t}()}.call(this),function(){var i=function(t,e){return function(){return t.apply(e,arguments)}};c.Visit=function(){function t(t,e,n){this.controller=t,this.action=n,this.performScroll=i(this.performScroll,this),this.identifier=c.uuid(),this.location=c.Location.wrap(e),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return t.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},t.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},t.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},t.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},t.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},t.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new c.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},t.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},t.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},t.prototype.loadCachedSnapshot=function(){var e,n;return(n=this.getCachedSnapshot())?(e=this.shouldIssueRequest(),this.render(function(){var t;return this.cacheSnapshot(),this.controller.render({snapshot:n,isPreview:e},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),e?void 0:this.complete()})):void 0},t.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},t.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},t.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},
|
|
t.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},t.prototype.requestCompletedWithResponse=function(t,e){return this.response=t,null!=e&&(this.redirectedToLocation=c.Location.wrap(e)),this.adapter.visitRequestCompleted(this)},t.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},t.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},t.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},t.prototype.scrollToRestoredPosition=function(){var t,e;return null!=(t=null!=(e=this.restorationData)?e.scrollPosition:void 0)?(this.controller.scrollToPosition(t),!0):void 0},t.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},t.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},t.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},t.prototype.getTimingMetrics=function(){return c.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},t.prototype.shouldIssueRequest=function(){return"restore"!==this.action||!this.hasCachedSnapshot()},t.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},t.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame((e=this,function(){return e.frame=null,t.call(e)}));var e},t.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};c.Controller=function(){function t(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new c.History(this),this.view=new c.View(this),this.scrollManager=new c.ScrollManager(this),this.restorationData={},this.clearCache(),this.setProgressBarDelay(500)}return t.prototype.start=function(){return c.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},t.prototype.disable=function(){return this.enabled=!1},t.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},t.prototype.clearCache=function(){return this.cache=new c.SnapshotCache(10)},t.prototype.visit=function(t,e){var n,i;return null==e&&(e={}),t=c.Location.wrap(t),this.applicationAllowsVisitingLocation(t)?this.locationIsVisitable(t)?(n=null!=(i=e.action)?i:"advance",this.adapter.visitProposedToLocationWithAction(t,n)):window.location=t:void 0},t.prototype.startVisitToLocationWithAction=function(t,e,n){var i;return c.supported?(i=this.getRestorationDataForIdentifier(n),this.startVisit(t,e,{restorationData:i})):window.location=t},t.prototype.setProgressBarDelay=function(t){return this.progressBarDelay=t},t.prototype.startHistory=function(){return this.location=c.Location.wrap(window.location),this.restorationIdentifier=c.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},t.prototype.stopHistory=function(){return this.history.stop()},t.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=c.Location.wrap(t),this.history.push(this.location,this.restorationIdentifier)},t.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=c.Location.wrap(t),this.history.replace(this.location,this.restorationIdentifier)},t.prototype.historyPoppedToLocationWithRestorationIdentifier=function(t,e){var n;return this.restorationIdentifier=e,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(t,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=c.Location.wrap(t)):this.adapter.pageInvalidated()},t.prototype.getCachedSnapshotForLocation=function(t){var e;return null!=(e=this.cache.get(t))?e.clone():void 0},t.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},t.prototype.cacheSnapshot=function(){var t,e,n;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),e=this.view.getSnapshot(),t=this.lastRenderedLocation,c.defer((n=this,function(){return n.cache.put(t,e.clone())}))):void 0},t.prototype.scrollToAnchor=function(t){var e;return(e=this.view.getElementForAnchor(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},t.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},t.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},t.prototype.scrollPositionChanged=function(t){return this.getCurrentRestorationData().scrollPosition=t},t.prototype.render=function(t,e){return this.view.render(t,e)},t.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},t.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},t.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},t.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},t.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},t.prototype.clickBubbled=function(t){var e,n,i;return this.enabled&&this.clickEventIsSignificant(t)&&(n=this.getVisitableLinkForNode(t.target))&&(i=this.getVisitableLocationForLink(n))&&this.applicationAllowsFollowingLinkToLocation(n,i)?(t.preventDefault(),e=this.getActionForLink(n),this.visit(i,{action:e})):void 0},t.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){return!this.notifyApplicationAfterClickingLinkToLocation(t,e).defaultPrevented},t.prototype.applicationAllowsVisitingLocation=function(t){return!this.notifyApplicationBeforeVisitingLocation(t).defaultPrevented},t.prototype.notifyApplicationAfterClickingLinkToLocation=function(t,e){return c.dispatch("turbolinks:click",{target:t,data:{url:e.absoluteURL},cancelable:!0})},t.prototype.notifyApplicationBeforeVisitingLocation=function(t){return c.dispatch("turbolinks:before-visit",{data:{url:t.absoluteURL},cancelable:!0})},t.prototype.notifyApplicationAfterVisitingLocation=function(t){return c.dispatch("turbolinks:visit",{data:{url:t.absoluteURL}})},t.prototype.notifyApplicationBeforeCachingSnapshot=function(){return c.dispatch("turbolinks:before-cache")},t.prototype.notifyApplicationBeforeRender=function(t){return c.dispatch("turbolinks:before-render",{data:{newBody:t}})},t.prototype.notifyApplicationAfterRender=function(){return c.dispatch("turbolinks:render")},t.prototype.notifyApplicationAfterPageLoad=function(t){return null==t&&(t={}),c.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:t}})},t.prototype.startVisit=function(t,e,n){var i;return null!=(i=this.currentVisit)&&i.cancel(),this.currentVisit=this.createVisit(t,e,n),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},t.prototype.createVisit=function(t,e,n){var i,r,o,a,s;return a=(r=null!=n?n:{}).restorationIdentifier,o=r.restorationData,i=r.historyChanged,(s=new c.Visit(this,t,e)).restorationIdentifier=null!=a?a:c.uuid(),s.restorationData=c.copyObject(o),s.historyChanged=i,s.referrer=this.location,s},t.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},t.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||1<t.which||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},t.prototype.getVisitableLinkForNode=function(t){return this.nodeIsVisitable(t)?c.closest(t,"a[href]:not([target]):not([download])"):void 0},t.prototype.getVisitableLocationForLink=function(t){var e;return e=new c.Location(t.getAttribute("href")),this.locationIsVisitable(e)?e:void 0},t.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},t.prototype.nodeIsVisitable=function(t){var e;return!(e=c.closest(t,"[data-turbolinks]"))||"false"!==e.getAttribute("data-turbolinks")},t.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},t.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},t.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},t}()}.call(this),function(){!function(){var t,e;if((t=e=document.currentScript)&&!e.hasAttribute("data-turbolinks-suppress-warning"))for(;t=t.parentNode;)if(t===document.body)return console.warn("You are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!\n\nLoad your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\nFor more information, see: https://github.com/turbolinks/turbolinks#working-with-script-elements\n\n\u2014\u2014\nSuppress this warning by adding a `data-turbolinks-suppress-warning` attribute to: %s",e.outerHTML)}()}.call(this),function(){var t,e,n;c.start=function(){return e()?(null==c.controller&&(c.controller=t()),c.controller.start()):void 0},e=function(){return null==window.Turbolinks&&(window.Turbolinks=c),n()},t=function(){var t;return(t=new c.Controller).adapter=new c.BrowserAdapter(t),t},(n=function(){return window.Turbolinks===c})()&&c.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=c:"function"==typeof define&&define.amd&&define(c)}.call(this),function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(C,t){"use strict";function g(t,e,n){var i,r,o=(n=n||lt).createElement("script");if(o.text=t,e)for(i in wt)(r=e[i]||e.getAttribute&&e.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function m(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?pt[gt.call(t)]||"object":typeof t}function s(t){var e=!!t&&"length"in t&&t.length,n=m(t);return!bt(t)&&!_t(t)&&("array"===n||0===e||"number"==typeof e&&0<e&&e-1 in t)}function u(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function e(t,n,i){return bt(n)?Ct.grep(t,function(t,e){return!!n.call(t,e,t)!==i}):n.nodeType?Ct.grep(t,function(t){return t===n!==i}):"string"!=typeof n?Ct.grep(t,function(t){return-1<ft.call(n,t)!==i}):Ct.filter(n,t,i)}function n(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function c(t){var n={};return Ct.each(t.match(Nt)||[],function(t,e){n[e]=!0}),n}function d(t){return t}function h(t){throw t}function l(t,e,n,i){var r;try{t&&bt(r=t.promise)?r.call(t).done(e).fail(n):t&&bt(r=t.then)?r.call(t,e,n):e.apply(undefined,[t].slice(i))}catch(t){n.apply(undefined,[t])}}function i(){lt.removeEventListener("DOMContentLoaded",i),C.removeEventListener("load",i),Ct.ready()}function r(t,e){return e.toUpperCase()}function f(t){return t.replace(zt,"ms-").replace(jt,r)}function o(){this.expando=Ct.expando+o.uid++}function a(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Wt.test(t)?JSON.parse(t):t)}function p(t,e,n){var i;if(n===undefined&&1===t.nodeType)if(i="data-"+e.replace(Ut,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=a(n)}catch(r){}Vt.set(t,e,n)}else n=undefined;return n}function v(t,e,n,i){var r,o,a=20,s=i?function(){return i.cur()}:function(){return Ct.css(t,e,"")},l=s(),u=n&&n[3]||(Ct.cssNumber[e]?"":"px"),c=t.nodeType&&(Ct.cssNumber[e]||"px"!==u&&+l)&&Gt.exec(Ct.css(t,e));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)Ct.style(t,e,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,Ct.style(t,e,c+u),n=n||[]}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function y(t){var e,n=t.ownerDocument,i=t.nodeName,r=te[i];return r||(e=n.body.appendChild(n.createElement(i)),r=Ct.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),te[i]=r)}function x(t,e){for(var n,i,r=[],o=0,a=t.length;o<a;o++)(i=t[o]).style&&(n=i.style.display,e?("none"===n&&(r[o]=Bt.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&Qt(i)&&(r[o]=y(i))):"none"!==n&&(r[o]="none",Bt.set(i,"display",n)));for(o=0;o<a;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}function b(t,e){var n;return n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],e===undefined||e&&u(t,e)?Ct.merge([t],n):n}function _(t,e){for(var n=0,i=t.length;n<i;n++)Bt.set(t[n],"globalEval",!e||Bt.get(e[n],"globalEval"))}function w(t,e,n,i,r){for(var o,a,s,l,u,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===m(o))Ct.merge(h,o.nodeType?[o]:o);else if(se.test(o)){for(a=a||d.appendChild(e.createElement("div")),s=(ne.exec(o)||["",""])[1].toLowerCase(),l=re[s]||re._default,a.innerHTML=l[1]+Ct.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;Ct.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&-1<Ct.inArray(o,i))r&&r.push(o);else if(u=Xt(o),a=b(d.appendChild(o),"script"),u&&_(a),n)for(c=0;o=a[c++];)ie.test(o.type||"")&&n.push(o);return d}function S(){return!0}function T(){return!1}function A(t,e){return t===D()==("focus"===e)}function D(){try{return lt.activeElement}catch(t){}}function M(t,e,n,i,r,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=undefined),e)M(t,s,n,i,e[s],o);return t}if(null==i&&null==r?(r=n,i=n=undefined):null==r&&("string"==typeof n?(r=i,i=undefined):(r=i,i=n,n=undefined)),!1===r)r=T;else if(!r)return t;return 1===o&&(a=r,(r=function(t){return Ct().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=Ct.guid++)),t.each(function(){Ct.event.add(this,e,r,i,n)})}function k(t,r,o){o?(Bt.set(t,r,!1),Ct.event.add(t,r,{namespace:!1,handler:function(t){var e,n,i=Bt.get(this,r);if(1&t.isTrigger&&this[r]){if(i.length)(Ct.event.special[r]||{}).delegateType&&t.stopPropagation();else if(i=ct.call(arguments),Bt.set(this,r,i),e=o(this,r),this[r](),i!==(n=Bt.get(this,r))||e?Bt.set(this,r,!1):n={},i!==n)return t.stopImmediatePropagation(),t.preventDefault(),n.value}else i.length&&(Bt.set(this,r,{value:Ct.event.trigger(Ct.extend(i[0],Ct.Event.prototype),i.slice(1),this)}),t.stopImmediatePropagation())}})):Bt.get(t,r)===undefined&&Ct.event.add(t,r,S)}function I(t,e){return u(t,"table")&&u(11!==e.nodeType?e:e.firstChild,"tr")&&Ct(t).children("tbody")[0]||t}function E(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function L(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function O(t,e){var n,i,r,o,a,s,l,u;if(1===e.nodeType){if(Bt.hasData(t)&&(o=Bt.access(t),a=Bt.set(e,o),u=o.events))for(r in delete a.handle,a.events={},u)for(n=0,i=u[r].length;n<i;n++)Ct.event.add(e,r,u[r][n]);Vt.hasData(t)&&(s=Vt.access(t),l=Ct.extend({},s),Vt.set(e,l))}}function P(t,e){var n=e.nodeName.toLowerCase();"input"===n&&ee.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function N(n,i,r,o){i=dt.apply([],i);var t,e,a,s,l,u,c=0,d=n.length,h=d-1,f=i[0],p=bt(f);if(p||1<d&&"string"==typeof f&&!xt.checkClone&&fe.test(f))return n.each(function(t){var e=n.eq(t);p&&(i[0]=f.call(this,t,e.html())),N(e,i,r,o)});if(d&&(e=(t=w(i,n[0].ownerDocument,!1,n,o)).firstChild,1===t.childNodes.length&&(t=e),e||o)){for(s=(a=Ct.map(b(t,"script"),E)).length;c<d;c++)l=t,c!==h&&(l=Ct.clone(l,!0,!0),s&&Ct.merge(a,b(l,"script"))),r.call(n[c],l,c);if(s)for(u=a[a.length-1].ownerDocument,Ct.map(a,L),c=0;c<s;c++)l=a[c],ie.test(l.type||"")&&!Bt.access(l,"globalEval")&&Ct.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?Ct._evalUrl&&!l.noModule&&Ct._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")}):g(l.textContent.replace(pe,""),l,u))}return n}function R(t,e,n){for(var i,r=e?Ct.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||Ct.cleanData(b(i)),i.parentNode&&(n&&Xt(i)&&_(b(i,"script")),i.parentNode.removeChild(i));return t}function $(t,e,n){var i,r,o,a,s=t.style;return(n=n||me(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||Xt(t)||(a=Ct.style(t,e)),!xt.pixelBoxStyles()&&ge.test(a)&&ve.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),a!==undefined?a+"":a}function F(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}function z(t){for(var e=t[0].toUpperCase()+t.slice(1),n=ye.length;n--;)if((t=ye[n]+e)in xe)return t}function j(t){var e=Ct.cssProps[t]||be[t];return e||(t in xe?t:be[t]=z(t)||t)}function H(t,e,n){var i=Gt.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function B(t,e,n,i,r,o){var a="width"===e?1:0,s=0,l=0;if(n===(i?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=Ct.css(t,n+Yt[a],!0,r)),i?("content"===n&&(l-=Ct.css(t,"padding"+Yt[a],!0,r)),"margin"!==n&&(l-=Ct.css(t,"border"+Yt[a]+"Width",!0,r))):(l+=Ct.css(t,"padding"+Yt[a],!0,r),"padding"!==n?l+=Ct.css(t,"border"+Yt[a]+"Width",!0,r):s+=Ct.css(t,"border"+Yt[a]+"Width",!0,r));return!i&&0<=o&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-s-.5))||0),l}function V(t,e,n){var i=me(t),r=(!xt.boxSizingReliable()||n)&&"border-box"===Ct.css(t,"boxSizing",!1,i),o=r,a=$(t,e,i),s="offset"+e[0].toUpperCase()+e.slice(1);if(ge.test(a)){if(!n)return a;a="auto"}return(!xt.boxSizingReliable()&&r||"auto"===a||!parseFloat(a)&&"inline"===Ct.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===Ct.css(t,"boxSizing",!1,i),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+B(t,e,n||(r?"border":"content"),o,i,a)+"px"}function W(t,e,n,i,r){return new W.prototype.init(t,e,n,i,r)}function U(){Ae&&(!1===lt.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(U):C.setTimeout(U,Ct.fx.interval),Ct.fx.tick())}function q(){return C.setTimeout(function(){Te=undefined}),Te=Date.now()}function G(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=Yt[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function Y(t,e,n){for(var i,r=(K.tweeners[e]||[]).concat(K.tweeners["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,e,t))return i}function Z(t,e,n){var i,r,o,a,s,l,u,c,d="width"in e||"height"in e,h=this,f={},p=t.style,g=t.nodeType&&Qt(t),m=Bt.get(t,"fxshow");for(i in n.queue||(null==(a=Ct._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,Ct.queue(t,"fx").length||a.empty.fire()})})),e)if(r=e[i],ke.test(r)){if(delete e[i],o=o||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||m[i]===undefined)continue;g=!0}f[i]=m&&m[i]||Ct.style(t,i)}if((l=!Ct.isEmptyObject(e))||!Ct.isEmptyObject(f))for(i in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=m&&m.display)&&(u=Bt.get(t,"display")),"none"===(c=Ct.css(t,"display"))&&(u?c=u:(x([t],!0),u=t.style.display||u,c=Ct.css(t,"display"),x([t]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===Ct.css(t,"float")&&(l||(h.done(function(){p.display=u}),null==u&&(c=p.display,u="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1,f)l||(m?"hidden"in m&&(g=m.hidden):m=Bt.access(t,"fxshow",{display:u}),o&&(m.hidden=!g),g&&x([t],!0),h.done(function(){for(i in g||x([t]),Bt.remove(t,"fxshow"),f)Ct.style(t,i,f[i])})),l=Y(g?m[i]:0,i,h),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}function X(t,e){var n,i,r,o,a;for(n in t)if(r=e[i=f(n)],o=t[n],Array.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(a=Ct.cssHooks[i])&&"expand"in a)for(n in o=a.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}function K(o,t,e){var n,a,i=0,r=K.prefilters.length,s=Ct.Deferred().always(function(){delete l.elem}),l=function(){if(a)return!1;for(var t=Te||q(),e=Math.max(0,u.startTime+u.duration-t),n=1-(e/u.duration||0),i=0,r=u.tweens.length;i<r;i++)u.tweens[i].run(n);return s.notifyWith(o,[u,n,e]),n<1&&r?e:(r||s.notifyWith(o,[u,1,0]),s.resolveWith(o,[u]),!1)},u=s.promise({elem:o,props:Ct.extend({},t),opts:Ct.extend(!0,{specialEasing:{},easing:Ct.easing._default},e),originalProperties:t,originalOptions:e,startTime:Te||q(),duration:e.duration,tweens:[],createTween:function(t,e){var n=Ct.Tween(o,u.opts,t,e,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var e=0,n=t?u.tweens.length:0;if(a)return this;for(a=!0;e<n;e++)u.tweens[e].run(1);return t?(s.notifyWith(o,[u,1,0]),s.resolveWith(o,[u,t])):s.rejectWith(o,[u,t]),this}}),c=u.props;for(X(c,u.opts.specialEasing);i<r;i++)if(n=K.prefilters[i].call(u,o,c,u.opts))return bt(n.stop)&&(Ct._queueHooks(u.elem,u.opts.queue).stop=n.stop.bind(n)),n;return Ct.map(c,Y,u),bt(u.opts.start)&&u.opts.start.call(o,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),Ct.fx.timer(Ct.extend(l,{elem:o,anim:u,queue:u.opts.queue})),u}function Q(t){return(t.match(Nt)||[]).join(" ")}function J(t){return t.getAttribute&&t.getAttribute("class")||""}function tt(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(Nt)||[]}function et(n,t,i,r){var e;if(Array.isArray(t))Ct.each(t,function(t,e){i||He.test(n)?r(n,e):et(n+"["+("object"==typeof e&&null!=e?t:"")+"]",e,i,r)});else if(i||"object"!==m(t))r(n,t);else for(e in t)et(n+"["+e+"]",t[e],i,r)}function nt(o){return function(t,e){"string"!=typeof t&&(e=t,t="*");var n,i=0,r=t.toLowerCase().match(Nt)||[];if(bt(e))for(;n=r[i++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(e)):(o[n]=o[n]||[]).push(e)}}function it(e,r,o,a){function s(t){var i;return l[t]=!0,Ct.each(e[t]||[],function(t,e){var n=e(r,o,a);return"string"!=typeof n||u||l[n]?u?!(i=n):void 0:(r.dataTypes.unshift(n),s(n),!1)}),i}var l={},u=e===Je;return s(r.dataTypes[0])||!l["*"]&&s("*")}function rt(t,e){var n,i,r=Ct.ajaxSettings.flatOptions||{};for(n in e)e[n]!==undefined&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&Ct.extend(!0,t,i),t}function ot(t,e,n){for(var i,r,o,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),i===undefined&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}function at(t,e,n,i){var r,o,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(r in u)if((s=r.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[r]:!0!==u[r]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t["throws"])e=a(e);else try{e=a(e)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}var st=[],lt=C.document,ut=Object.getPrototypeOf,ct=st.slice,dt=st.concat,ht=st.push,ft=st.indexOf,pt={},gt=pt.toString,mt=pt.hasOwnProperty,vt=mt.toString,yt=vt.call(Object),xt={},bt=function bt(t){return"function"==typeof t&&"number"!=typeof t.nodeType},_t=function _t(t){return null!=t&&t===t.window},wt={type:!0,src:!0,nonce:!0,noModule:!0},St="3.4.1",Ct=function(t,e){return new Ct.fn.init(t,e)},Tt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;Ct.fn=Ct.prototype={jquery:St,constructor:Ct,length:0,toArray:function(){return ct.call(this)},get:function(t){return null==t?ct.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=Ct.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return Ct.each(this,t)},map:function(n){return this.pushStack(Ct.map(this,function(t,e){return n.call(t,e,t)}))},slice:function(){return this.pushStack(ct.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(0<=n&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ht,sort:st.sort,splice:st.splice},Ct.extend=Ct.fn.extend=function(t){var e,n,i,r,o,a,s=t||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"==typeof s||bt(s)||(s={}),l===u&&(s=this,l--);l<u;l++)if(null!=(e=arguments[l]))for(n in e)r=e[n],"__proto__"!==n&&s!==r&&(c&&r&&(Ct.isPlainObject(r)||(o=Array.isArray(r)))?(i=s[n],a=o&&!Array.isArray(i)?[]:o||Ct.isPlainObject(i)?i:{},o=!1,s[n]=Ct.extend(c,a,r)):r!==undefined&&(s[n]=r));return s},Ct.extend({expando:"jQuery"+(St+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==gt.call(t))&&(!(e=ut(t))||"function"==typeof(n=mt.call(e,"constructor")&&e.constructor)&&vt.call(n)===yt)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e){g(t,{nonce:e&&e.nonce})},each:function(t,e){var n,i=0;if(s(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(Tt,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(s(Object(t))?Ct.merge(n,"string"==typeof t?[t]:t):ht.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:ft.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i=[],r=0,o=t.length,a=!n;r<o;r++)!e(t[r],r)!==a&&i.push(t[r]);return i},map:function(t,e,n){var i,r,o=0,a=[];if(s(t))for(i=t.length;o<i;o++)null!=(r=e(t[o],o,n))&&a.push(r);else for(o in t)null!=(r=e(t[o],o,n))&&a.push(r);return dt.apply([],a)},guid:1,support:xt}),"function"==typeof Symbol&&(Ct.fn[Symbol.iterator]=st[Symbol.iterator]),Ct.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){pt["[object "+e+"]"]=e.toLowerCase()});var At=function(n){function b(t,e,n,i){var r,o,a,s,l,u,c,d=e&&e.ownerDocument,h=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==h&&9!==h&&11!==h)return n;if(!i&&((e?e.ownerDocument||e:H)!==O&&L(e),e=e||O,N)){if(11!==h&&(l=xt.exec(t)))if(r=l[1]){if(9===h){if(!(a=e.getElementById(r)))return n;if(a.id===r)return n.push(a),n}else if(d&&(a=d.getElementById(r))&&z(e,a)&&a.id===r)return n.push(a),n}else{if(l[2])return J.apply(n,e.getElementsByTagName(t)),n;if((r=l[3])&&w.getElementsByClassName&&e.getElementsByClassName)return J.apply(n,e.getElementsByClassName(r)),n}if(w.qsa&&!G[t+" "]&&(!R||!R.test(t))&&(1!==h||"object"!==e.nodeName.toLowerCase())){if(c=t,d=e,1===h&&dt.test(t)){for((s=e.getAttribute("id"))?s=s.replace(St,Ct):e.setAttribute("id",s=j),o=(u=A(t)).length;o--;)u[o]="#"+s+" "+g(u[o]);c=u.join(","),d=bt.test(t)&&p(e.parentNode)||e}try{return J.apply(n,d.querySelectorAll(c)),n}catch(f){G(t,!0)}finally{s===j&&e.removeAttribute("id")}}}return M(t.replace(lt,"$1"),e,n,i)}function t(){function n(t,e){return i.push(t+" ")>S.cacheLength&&delete n[i.shift()],n[t+" "]=e}var i=[];return n}function l(t){return t[j]=!0,t}function r(t){var e=O.createElement("fieldset");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function e(t,e){for(var n=t.split("|"),i=n.length;i--;)S.attrHandle[n[i]]=e}function u(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function i(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function o(n){return function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&t.type===n}}function a(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&At(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function s(a){return l(function(o){return o=+o,l(function(t,e){for(var n,i=a([],t.length,o),r=i.length;r--;)t[n=i[r]]&&(t[n]=!(e[n]=t[n]))})})}function p(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function c(){}function g(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function d(s,t,e){var l=t.dir,u=t.next,c=u||l,d=e&&"parentNode"===c,h=V++;return t.first?function(t,e,n){for(;t=t[l];)if(1===t.nodeType||d)return s(t,e,n);return!1}:function(t,e,n){var i,r,o,a=[B,h];if(n){for(;t=t[l];)if((1===t.nodeType||d)&&s(t,e,n))return!0}else for(;t=t[l];)if(1===t.nodeType||d)if(r=(o=t[j]||(t[j]={}))[t.uniqueID]||(o[t.uniqueID]={}),u&&u===t.nodeName.toLowerCase())t=t[l]||t;else{if((i=r[c])&&i[0]===B&&i[1]===h)return a[2]=i[2];if((r[c]=a)[2]=s(t,e,n))return!0}return!1}}function h(r){return 1<r.length?function(t,e,n){for(var i=r.length;i--;)if(!r[i](t,e,n))return!1;return!0}:r[0]}function y(t,e,n){for(var i=0,r=e.length;i<r;i++)b(t,e[i],n);return n}function _(t,e,n,i,r){for(var o,a=[],s=0,l=t.length,u=null!=e;s<l;s++)(o=t[s])&&(n&&!n(o,i,r)||(a.push(o),u&&e.push(s)));return a}function x(f,p,g,m,v,t){return m&&!m[j]&&(m=x(m)),v&&!v[j]&&(v=x(v,t)),l(function(t,e,n,i){var r,o,a,s=[],l=[],u=e.length,c=t||y(p||"*",n.nodeType?[n]:n,[]),d=!f||!t&&p?c:_(c,s,f,n,i),h=g?v||(t?f:u||m)?[]:e:d;if(g&&g(d,h,n,i),m)for(r=_(h,l),m(r,[],n,i),o=r.length;o--;)(a=r[o])&&(h[l[o]]=!(d[l[o]]=a));if(t){if(v||f){if(v){for(r=[],o=h.length;o--;)(a=h[o])&&r.push(d[o]=a);v(null,h=[],r,i)}for(o=h.length;o--;)(a=h[o])&&-1<(r=v?et(t,a):s[o])&&(t[r]=!(e[r]=a))}}else h=_(h===e?h.splice(u,h.length):h),v?v(null,e,h,i):J.apply(e,h)})}function f(t){for(var r,e,n,i=t.length,o=S.relative[t[0].type],a=o||S.relative[" "],s=o?1:0,l=d(function(t){return t===r},a,!0),u=d(function(t){return-1<et(r,t)},a,!0),c=[function(t,e,n){var i=!o&&(n||e!==k)||((r=e).nodeType?l(t,e,n):u(t,e,n));return r=null,i}];s<i;s++)if(e=S.relative[t[s].type])c=[d(h(c),e)];else{if((e=S.filter[t[s].type].apply(null,t[s].matches))[j]){for(n=++s;n<i&&!S.relative[t[n].type];n++);return x(1<s&&h(c),1<s&&g(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(lt,"$1"),e,s<n&&f(t.slice(s,n)),n<i&&f(t=t.slice(n)),n<i&&g(t))}c.push(e)}return h(c)}function m(m,v){var y=0<v.length,x=0<m.length,t=function(t,e,n,i,r){var o,a,s,l=0,u="0",c=t&&[],d=[],h=k,f=t||x&&S.find.TAG("*",r),p=B+=null==h?1:Math.random()||.1,g=f.length;for(r&&(k=e===O||e||r);u!==g&&null!=(o=f[u]);u++){if(x&&o){for(a=0,e||o.ownerDocument===O||(L(o),n=!N);s=m[a++];)if(s(o,e||O,n)){i.push(o);break}r&&(B=p)}y&&((o=!s&&o)&&l--,t&&c.push(o))}if(l+=u,y&&u!==l){for(a=0;s=v[a++];)s(c,d,e,n);if(t){if(0<l)for(;u--;)c[u]||d[u]||(d[u]=K.call(i));d=_(d)}J.apply(i,d),r&&!t&&0<d.length&&1<l+v.length&&b.uniqueSort(i)}return r&&(B=p,k=h),c};return y?l(t):t}var v,w,S,C,T,A,D,M,k,I,E,L,O,P,N,R,$,F,z,j="sizzle"+1*new Date,H=n.document,B=0,V=0,W=t(),U=t(),q=t(),G=t(),Y=function(t,e){return t===e&&(E=!0),0},Z={}.hasOwnProperty,X=[],K=X.pop,Q=X.push,J=X.push,tt=X.slice,et=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ot="\\["+it+"*("+rt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+it+"*\\]",
|
|
at=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",st=new RegExp(it+"+","g"),lt=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),ut=new RegExp("^"+it+"*,"+it+"*"),ct=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),dt=new RegExp(it+"|>"),ht=new RegExp(at),ft=new RegExp("^"+rt+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+at),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+nt+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},gt=/HTML$/i,mt=/^(?:input|select|textarea|button)$/i,vt=/^h\d$/i,yt=/^[^{]+\{\s*\[native \w/,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,_t=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),wt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},St=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ct=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},Tt=function(){L()},At=d(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{J.apply(X=tt.call(H.childNodes),H.childNodes),X[H.childNodes.length].nodeType}catch(Dt){J={apply:X.length?function(t,e){Q.apply(t,tt.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}for(v in w=b.support={},T=b.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!gt.test(e||n&&n.nodeName||"HTML")},L=b.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:H;return i!==O&&9===i.nodeType&&i.documentElement&&(P=(O=i).documentElement,N=!T(O),H!==O&&(n=O.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Tt,!1):n.attachEvent&&n.attachEvent("onunload",Tt)),w.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=r(function(t){return t.appendChild(O.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=yt.test(O.getElementsByClassName),w.getById=r(function(t){return P.appendChild(t).id=j,!O.getElementsByName||!O.getElementsByName(j).length}),w.getById?(S.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){return t.getAttribute("id")===e}},S.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n=e.getElementById(t);return n?[n]:[]}}):(S.filter.ID=function(t){var n=t.replace(_t,wt);return function(t){var e="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===n}},S.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),S.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"!==t)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},S.find.CLASS=w.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&N)return e.getElementsByClassName(t)},$=[],R=[],(w.qsa=yt.test(O.querySelectorAll))&&(r(function(t){P.appendChild(t).innerHTML="<a id='"+j+"'></a><select id='"+j+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+it+"*(?:value|"+nt+")"),t.querySelectorAll("[id~="+j+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+j+"+*").length||R.push(".#.+[+~]")}),r(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=O.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+it+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&R.push(":enabled",":disabled"),P.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(w.matchesSelector=yt.test(F=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&r(function(t){w.disconnectedMatch=F.call(t,"*"),F.call(t,"[s!='']:x"),$.push("!=",at)}),R=R.length&&new RegExp(R.join("|")),$=$.length&&new RegExp($.join("|")),e=yt.test(P.compareDocumentPosition),z=e||yt.test(P.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Y=e?function(t,e){if(t===e)return E=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!w.sortDetached&&e.compareDocumentPosition(t)===n?t===O||t.ownerDocument===H&&z(H,t)?-1:e===O||e.ownerDocument===H&&z(H,e)?1:I?et(I,t)-et(I,e):0:4&n?-1:1)}:function(t,e){if(t===e)return E=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!r||!o)return t===O?-1:e===O?1:r?-1:o?1:I?et(I,t)-et(I,e):0;if(r===o)return u(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?u(a[i],s[i]):a[i]===H?-1:s[i]===H?1:0}),O},b.matches=function(t,e){return b(t,null,null,e)},b.matchesSelector=function(t,e){if((t.ownerDocument||t)!==O&&L(t),w.matchesSelector&&N&&!G[e+" "]&&(!$||!$.test(e))&&(!R||!R.test(e)))try{var n=F.call(t,e);if(n||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(Dt){G(e,!0)}return 0<b(e,O,null,[t]).length},b.contains=function(t,e){return(t.ownerDocument||t)!==O&&L(t),z(t,e)},b.attr=function(t,e){(t.ownerDocument||t)!==O&&L(t);var n=S.attrHandle[e.toLowerCase()],i=n&&Z.call(S.attrHandle,e.toLowerCase())?n(t,e,!N):undefined;return i!==undefined?i:w.attributes||!N?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},b.escape=function(t){return(t+"").replace(St,Ct)},b.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},b.uniqueSort=function(t){var e,n=[],i=0,r=0;if(E=!w.detectDuplicates,I=!w.sortStable&&t.slice(0),t.sort(Y),E){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return I=null,t},C=b.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=C(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=C(e);return n},(S=b.selectors={cacheLength:50,createPseudo:l,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||b.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&b.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ht.test(n)&&(e=A(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=W[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&W(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(t){var e=b.attr(t,n);return null==e?"!="===i:!i||(e+="","="===i?e===r:"!="===i?e!==r:"^="===i?r&&0===e.indexOf(r):"*="===i?r&&-1<e.indexOf(r):"$="===i?r&&e.slice(-r.length)===r:"~="===i?-1<(" "+e.replace(st," ")+" ").indexOf(r):"|="===i&&(e===r||e.slice(0,r.length+1)===r+"-"))}},CHILD:function(p,t,e,g,m){var v="nth"!==p.slice(0,3),y="last"!==p.slice(-4),x="of-type"===t;return 1===g&&0===m?function(t){return!!t.parentNode}:function(t,e,n){var i,r,o,a,s,l,u=v!==y?"nextSibling":"previousSibling",c=t.parentNode,d=x&&t.nodeName.toLowerCase(),h=!n&&!x,f=!1;if(c){if(v){for(;u;){for(a=t;a=a[u];)if(x?a.nodeName.toLowerCase()===d:1===a.nodeType)return!1;l=u="only"===p&&!l&&"nextSibling"}return!0}if(l=[y?c.firstChild:c.lastChild],y&&h){for(f=(s=(i=(r=(o=(a=c)[j]||(a[j]={}))[a.uniqueID]||(o[a.uniqueID]={}))[p]||[])[0]===B&&i[1])&&i[2],a=s&&c.childNodes[s];a=++s&&a&&a[u]||(f=s=0)||l.pop();)if(1===a.nodeType&&++f&&a===t){r[p]=[B,s,f];break}}else if(h&&(f=s=(i=(r=(o=(a=t)[j]||(a[j]={}))[a.uniqueID]||(o[a.uniqueID]={}))[p]||[])[0]===B&&i[1]),!1===f)for(;(a=++s&&a&&a[u]||(f=s=0)||l.pop())&&((x?a.nodeName.toLowerCase()!==d:1!==a.nodeType)||!++f||(h&&((r=(o=a[j]||(a[j]={}))[a.uniqueID]||(o[a.uniqueID]={}))[p]=[B,f]),a!==t)););return(f-=m)===g||f%g==0&&0<=f/g}}},PSEUDO:function(t,o){var e,a=S.pseudos[t]||S.setFilters[t.toLowerCase()]||b.error("unsupported pseudo: "+t);return a[j]?a(o):1<a.length?(e=[t,t,"",o],S.setFilters.hasOwnProperty(t.toLowerCase())?l(function(t,e){for(var n,i=a(t,o),r=i.length;r--;)t[n=et(t,i[r])]=!(e[n]=i[r])}):function(t){return a(t,0,e)}):a}},pseudos:{not:l(function(t){var i=[],r=[],s=D(t.replace(lt,"$1"));return s[j]?l(function(t,e,n,i){for(var r,o=s(t,null,i,[]),a=t.length;a--;)(r=o[a])&&(t[a]=!(e[a]=r))}):function(t,e,n){return i[0]=t,s(i,null,n,r),i[0]=null,!r.pop()}}),has:l(function(e){return function(t){return 0<b(e,t).length}}),contains:l(function(e){return e=e.replace(_t,wt),function(t){return-1<(t.textContent||C(t)).indexOf(e)}}),lang:l(function(n){return ft.test(n||"")||b.error("unsupported lang: "+n),n=n.replace(_t,wt).toLowerCase(),function(t){var e;do{if(e=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===n||0===e.indexOf(n+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var e=n.location&&n.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===P},focus:function(t){return t===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:a(!1),disabled:a(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!S.pseudos.empty(t)},header:function(t){return vt.test(t.nodeName)},input:function(t){return mt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:s(function(){return[0]}),last:s(function(t,e){return[e-1]}),eq:s(function(t,e,n){return[n<0?n+e:n]}),even:s(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:s(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:s(function(t,e,n){for(var i=n<0?n+e:e<n?e:n;0<=--i;)t.push(i);return t}),gt:s(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=S.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.pseudos[v]=i(v);for(v in{submit:!0,reset:!0})S.pseudos[v]=o(v);return c.prototype=S.filters=S.pseudos,S.setFilters=new c,A=b.tokenize=function(t,e){var n,i,r,o,a,s,l,u=U[t+" "];if(u)return e?0:u.slice(0);for(a=t,s=[],l=S.preFilter;a;){for(o in n&&!(i=ut.exec(a))||(i&&(a=a.slice(i[0].length)||a),s.push(r=[])),n=!1,(i=ct.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(lt," ")}),a=a.slice(n.length)),S.filter)!(i=pt[o].exec(a))||l[o]&&!(i=l[o](i))||(n=i.shift(),r.push({value:n,type:o,matches:i}),a=a.slice(n.length));if(!n)break}return e?a.length:a?b.error(t):U(t,s).slice(0)},D=b.compile=function(t,e){var n,i=[],r=[],o=q[t+" "];if(!o){for(e||(e=A(t)),n=e.length;n--;)(o=f(e[n]))[j]?i.push(o):r.push(o);(o=q(t,m(r,i))).selector=t}return o},M=b.select=function(t,e,n,i){var r,o,a,s,l,u="function"==typeof t&&t,c=!i&&A(t=u.selector||t);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===e.nodeType&&N&&S.relative[o[1].type]){if(!(e=(S.find.ID(a.matches[0].replace(_t,wt),e)||[])[0]))return n;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=pt.needsContext.test(t)?0:o.length;r--&&(a=o[r],!S.relative[s=a.type]);)if((l=S.find[s])&&(i=l(a.matches[0].replace(_t,wt),bt.test(o[0].type)&&p(e.parentNode)||e))){if(o.splice(r,1),!(t=i.length&&g(o)))return J.apply(n,i),n;break}}return(u||D(t,c))(i,e,!N,n,!e||bt.test(t)&&p(e.parentNode)||e),n},w.sortStable=j.split("").sort(Y).join("")===j,w.detectDuplicates=!!E,L(),w.sortDetached=r(function(t){return 1&t.compareDocumentPosition(O.createElement("fieldset"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||e("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||e("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||e(nt,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),b}(C);Ct.find=At,Ct.expr=At.selectors,Ct.expr[":"]=Ct.expr.pseudos,Ct.uniqueSort=Ct.unique=At.uniqueSort,Ct.text=At.getText,Ct.isXMLDoc=At.isXML,Ct.contains=At.contains,Ct.escapeSelector=At.escape;var Dt=function(t,e,n){for(var i=[],r=n!==undefined;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&Ct(t).is(n))break;i.push(t)}return i},Mt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},kt=Ct.expr.match.needsContext,It=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Ct.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?Ct.find.matchesSelector(i,t)?[i]:[]:Ct.find.matches(t,Ct.grep(e,function(t){return 1===t.nodeType}))},Ct.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(Ct(t).filter(function(){for(e=0;e<i;e++)if(Ct.contains(r[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)Ct.find(t,r[e],n);return 1<i?Ct.uniqueSort(n):n},filter:function(t){return this.pushStack(e(this,t||[],!1))},not:function(t){return this.pushStack(e(this,t||[],!0))},is:function(t){return!!e(this,"string"==typeof t&&kt.test(t)?Ct(t):t||[],!1).length}});var Et,Lt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(Ct.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||Et,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):bt(t)?n.ready!==undefined?n.ready(t):t(Ct):Ct.makeArray(t,this);if(!(i="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:Lt.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof Ct?e[0]:e,Ct.merge(this,Ct.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:lt,!0)),It.test(i[1])&&Ct.isPlainObject(e))for(i in e)bt(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=lt.getElementById(i[2]))&&(this[0]=r,this.length=1),this}).prototype=Ct.fn,Et=Ct(lt);var Ot=/^(?:parents|prev(?:Until|All))/,Pt={children:!0,contents:!0,next:!0,prev:!0};Ct.fn.extend({has:function(t){var e=Ct(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(Ct.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,r=this.length,o=[],a="string"!=typeof t&&Ct(t);if(!kt.test(t))for(;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&Ct.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(1<o.length?Ct.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?ft.call(Ct(t),this[0]):ft.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(Ct.uniqueSort(Ct.merge(this.get(),Ct(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),Ct.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Dt(t,"parentNode")},parentsUntil:function(t,e,n){return Dt(t,"parentNode",n)},next:function(t){return n(t,"nextSibling")},prev:function(t){return n(t,"previousSibling")},nextAll:function(t){return Dt(t,"nextSibling")},prevAll:function(t){return Dt(t,"previousSibling")},nextUntil:function(t,e,n){return Dt(t,"nextSibling",n)},prevUntil:function(t,e,n){return Dt(t,"previousSibling",n)},siblings:function(t){return Mt((t.parentNode||{}).firstChild,t)},children:function(t){return Mt(t.firstChild)},contents:function(t){return"undefined"!=typeof t.contentDocument?t.contentDocument:(u(t,"template")&&(t=t.content||t),Ct.merge([],t.childNodes))}},function(i,r){Ct.fn[i]=function(t,e){var n=Ct.map(this,r,t);return"Until"!==i.slice(-5)&&(e=t),e&&"string"==typeof e&&(n=Ct.filter(e,n)),1<this.length&&(Pt[i]||Ct.uniqueSort(n),Ot.test(i)&&n.reverse()),this.pushStack(n)}});var Nt=/[^\x20\t\r\n\f]+/g;Ct.Callbacks=function(i){i="string"==typeof i?c(i):Ct.extend({},i);var r,t,e,n,o=[],a=[],s=-1,l=function(){for(n=n||i.once,e=r=!0;a.length;s=-1)for(t=a.shift();++s<o.length;)!1===o[s].apply(t[0],t[1])&&i.stopOnFalse&&(s=o.length,t=!1);i.memory||(t=!1),r=!1,n&&(o=t?[]:"")},u={add:function(){return o&&(t&&!r&&(s=o.length-1,a.push(t)),function n(t){Ct.each(t,function(t,e){bt(e)?i.unique&&u.has(e)||o.push(e):e&&e.length&&"string"!==m(e)&&n(e)})}(arguments),t&&!r&&l()),this},remove:function(){return Ct.each(arguments,function(t,e){for(var n;-1<(n=Ct.inArray(e,o,n));)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?-1<Ct.inArray(t,o):0<o.length},empty:function(){return o&&(o=[]),this},disable:function(){return n=a=[],o=t="",this},disabled:function(){return!o},lock:function(){return n=a=[],t||r||(o=t=""),this},locked:function(){return!!n},fireWith:function(t,e){return n||(e=[t,(e=e||[]).slice?e.slice():e],a.push(e),r||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!e}};return u},Ct.extend({Deferred:function(t){var o=[["notify","progress",Ct.Callbacks("memory"),Ct.Callbacks("memory"),2],["resolve","done",Ct.Callbacks("once memory"),Ct.Callbacks("once memory"),0,"resolved"],["reject","fail",Ct.Callbacks("once memory"),Ct.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(t){return a.then(null,t)},pipe:function(){var r=arguments;return Ct.Deferred(function(i){Ct.each(o,function(t,e){var n=bt(r[e[4]])&&r[e[4]];s[e[1]](function(){var t=n&&n.apply(this,arguments);t&&bt(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[e[0]+"With"](this,n?[t]:arguments)})}),r=null}).promise()},then:function(e,n,i){function u(o,a,s,l){return function(){var n=this,i=arguments,e=function(){var t,e;if(!(o<c)){if((t=s.apply(n,i))===a.promise())throw new TypeError("Thenable self-resolution");e=t&&("object"==typeof t||"function"==typeof t)&&t.then,bt(e)?l?e.call(t,u(c,a,d,l),u(c,a,h,l)):(c++,e.call(t,u(c,a,d,l),u(c,a,h,l),u(c,a,d,a.notifyWith))):(s!==d&&(n=undefined,i=[t]),(l||a.resolveWith)(n,i))}},r=l?e:function(){try{e()}catch(t){Ct.Deferred.exceptionHook&&Ct.Deferred.exceptionHook(t,r.stackTrace),c<=o+1&&(s!==h&&(n=undefined,i=[t]),a.rejectWith(n,i))}};o?r():(Ct.Deferred.getStackHook&&(r.stackTrace=Ct.Deferred.getStackHook()),C.setTimeout(r))}}var c=0;return Ct.Deferred(function(t){o[0][3].add(u(0,t,bt(i)?i:d,t.notifyWith)),o[1][3].add(u(0,t,bt(e)?e:d)),o[2][3].add(u(0,t,bt(n)?n:h))}).promise()},promise:function(t){return null!=t?Ct.extend(t,a):a}},s={};return Ct.each(o,function(t,e){var n=e[2],i=e[5];a[e[1]]=n.add,i&&n.add(function(){r=i},o[3-t][2].disable,o[3-t][3].disable,o[0][2].lock,o[0][3].lock),n.add(e[3].fire),s[e[0]]=function(){return s[e[0]+"With"](this===s?undefined:this,arguments),this},s[e[0]+"With"]=n.fireWith}),a.promise(s),t&&t.call(s,s),s},when:function(t){var n=arguments.length,e=n,i=Array(e),r=ct.call(arguments),o=Ct.Deferred(),a=function(e){return function(t){i[e]=this,r[e]=1<arguments.length?ct.call(arguments):t,--n||o.resolveWith(i,r)}};if(n<=1&&(l(t,o.done(a(e)).resolve,o.reject,!n),"pending"===o.state()||bt(r[e]&&r[e].then)))return o.then();for(;e--;)l(r[e],a(e),o.reject);return o.promise()}});var Rt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Ct.Deferred.exceptionHook=function(t,e){C.console&&C.console.warn&&t&&Rt.test(t.name)&&C.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},Ct.readyException=function(t){C.setTimeout(function(){throw t})};var $t=Ct.Deferred();Ct.fn.ready=function(t){return $t.then(t)["catch"](function(t){Ct.readyException(t)}),this},Ct.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--Ct.readyWait:Ct.isReady)||(Ct.isReady=!0)!==t&&0<--Ct.readyWait||$t.resolveWith(lt,[Ct])}}),Ct.ready.then=$t.then,"complete"===lt.readyState||"loading"!==lt.readyState&&!lt.documentElement.doScroll?C.setTimeout(Ct.ready):(lt.addEventListener("DOMContentLoaded",i),C.addEventListener("load",i));var Ft=function(t,e,n,i,r,o,a){var s=0,l=t.length,u=null==n;if("object"===m(n))for(s in r=!0,n)Ft(t,e,s,n[s],!0,o,a);else if(i!==undefined&&(r=!0,bt(i)||(a=!0),u&&(a?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(Ct(t),n)})),e))for(;s<l;s++)e(t[s],n,a?i:i.call(t[s],s,e(t[s],n)));return r?t:u?e.call(t):l?e(t[0],n):o},zt=/^-ms-/,jt=/-([a-z])/g,Ht=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};o.uid=1,o.prototype={cache:function(t){var e=t[this.expando];return e||(e={},Ht(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[f(e)]=n;else for(i in e)r[f(i)]=e[i];return r},get:function(t,e){return e===undefined?this.cache(t):t[this.expando]&&t[this.expando][f(e)]},access:function(t,e,n){return e===undefined||e&&"string"==typeof e&&n===undefined?this.get(t,e):(this.set(t,e,n),n!==undefined?n:e)},remove:function(t,e){var n,i=t[this.expando];if(i!==undefined){if(e!==undefined){n=(e=Array.isArray(e)?e.map(f):(e=f(e))in i?[e]:e.match(Nt)||[]).length;for(;n--;)delete i[e[n]]}(e===undefined||Ct.isEmptyObject(i))&&(t.nodeType?t[this.expando]=undefined:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return e!==undefined&&!Ct.isEmptyObject(e)}};var Bt=new o,Vt=new o,Wt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ut=/[A-Z]/g;Ct.extend({hasData:function(t){return Vt.hasData(t)||Bt.hasData(t)},data:function(t,e,n){return Vt.access(t,e,n)},removeData:function(t,e){Vt.remove(t,e)},_data:function(t,e,n){return Bt.access(t,e,n)},_removeData:function(t,e){Bt.remove(t,e)}}),Ct.fn.extend({data:function(n,t){var e,i,r,o=this[0],a=o&&o.attributes;if(n!==undefined)return"object"==typeof n?this.each(function(){Vt.set(this,n)}):Ft(this,function(t){var e;if(o&&t===undefined)return(e=Vt.get(o,n))!==undefined?e:(e=p(o,n))!==undefined?e:void 0;this.each(function(){Vt.set(this,n,t)})},null,t,1<arguments.length,null,!0);if(this.length&&(r=Vt.get(o),1===o.nodeType&&!Bt.get(o,"hasDataAttrs"))){for(e=a.length;e--;)a[e]&&0===(i=a[e].name).indexOf("data-")&&(i=f(i.slice(5)),p(o,i,r[i]));Bt.set(o,"hasDataAttrs",!0)}return r},removeData:function(t){return this.each(function(){Vt.remove(this,t)})}}),Ct.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Bt.get(t,e),n&&(!i||Array.isArray(n)?i=Bt.access(t,e,Ct.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=Ct.queue(t,e),i=n.length,r=n.shift(),o=Ct._queueHooks(t,e),a=function(){Ct.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Bt.get(t,n)||Bt.access(t,n,{empty:Ct.Callbacks("once memory").add(function(){Bt.remove(t,[e+"queue",n])})})}}),Ct.fn.extend({queue:function(e,n){var t=2;return"string"!=typeof e&&(n=e,e="fx",t--),arguments.length<t?Ct.queue(this[0],e):n===undefined?this:this.each(function(){var t=Ct.queue(this,e,n);Ct._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&Ct.dequeue(this,e)})},dequeue:function(t){return this.each(function(){Ct.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=Ct.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=undefined),t=t||"fx";a--;)(n=Bt.get(o[a],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(e)}});var qt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Gt=new RegExp("^(?:([+-])=|)("+qt+")([a-z%]*)$","i"),Yt=["Top","Right","Bottom","Left"],Zt=lt.documentElement,Xt=function(t){return Ct.contains(t.ownerDocument,t)},Kt={composed:!0};Zt.getRootNode&&(Xt=function(t){return Ct.contains(t.ownerDocument,t)||t.getRootNode(Kt)===t.ownerDocument});var Qt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&Xt(t)&&"none"===Ct.css(t,"display")},Jt=function(t,e,n,i){var r,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];for(o in r=n.apply(t,i||[]),e)t.style[o]=a[o];return r},te={};Ct.fn.extend({show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Qt(this)?Ct(this).show():Ct(this).hide()})}});var ee=/^(?:checkbox|radio)$/i,ne=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ie=/^$|^module$|\/(?:java|ecma)script/i,re={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};re.optgroup=re.option,re.tbody=re.tfoot=re.colgroup=re.caption=re.thead,re.th=re.td;var oe,ae,se=/<|&#?\w+;/;oe=lt.createDocumentFragment().appendChild(lt.createElement("div")),(ae=lt.createElement("input")).setAttribute("type","radio"),ae.setAttribute("checked","checked"),ae.setAttribute("name","t"),oe.appendChild(ae),xt.checkClone=oe.cloneNode(!0).cloneNode(!0).lastChild.checked,oe.innerHTML="<textarea>x</textarea>",xt.noCloneChecked=!!oe.cloneNode(!0).lastChild.defaultValue;var le=/^key/,ue=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ce=/^([^.]*)(?:\.(.+)|)/;Ct.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,d,h,f,p,g,m=Bt.get(e);if(m)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&Ct.find.matchesSelector(Zt,r),n.guid||(n.guid=Ct.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==Ct&&Ct.event.triggered!==t.type?Ct.event.dispatch.apply(e,arguments):undefined}),u=(t=(t||"").match(Nt)||[""]).length;u--;)f=g=(s=ce.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=Ct.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=Ct.event.special[f]||{},c=Ct.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&Ct.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),Ct.event.global[f]=!0)},remove:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,f,p,g,m=Bt.hasData(t)&&Bt.get(t);if(m&&(l=m.events)){for(u=(e=(e||"").match(Nt)||[""]).length;u--;)if(f=g=(s=ce.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=Ct.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,m.handle)||Ct.removeEvent(t,f,m.handle),delete l[f])}else for(f in l)Ct.event.remove(t,f+e[u],n,i,!0);Ct.isEmptyObject(l)&&Bt.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,a,s=Ct.event.fix(t),l=new Array(arguments.length),u=(Bt.get(this,"events")||{})[s.type]||[],c=Ct.event.special[s.type]||{};for(l[0]=s,e=1;e<arguments.length;e++)l[e]=arguments[e];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=Ct.event.handlers.call(this,s,u),e=0;(r=a[e++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,(i=((Ct.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l))!==undefined&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(t,e){var n,i,r,o,a,s=[],l=e.delegateCount,u=t.target;if(l&&u.nodeType&&!("click"===t.type&&1<=t.button))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)a[r=(i=e[n]).selector+" "]===undefined&&(a[r]=i.needsContext?-1<Ct(r,this).index(u):Ct.find(r,this,null,[u]).length),a[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return u=this,l<e.length&&s.push({elem:u,handlers:e.slice(l)}),s},addProp:function(e,t){Object.defineProperty(Ct.Event.prototype,e,{enumerable:!0,configurable:!0,get:bt(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(t){return t[Ct.expando]?t:new Ct.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return ee.test(e.type)&&e.click&&u(e,"input")&&k(e,"click",S),!1},trigger:function(t){var e=this||t;return ee.test(e.type)&&e.click&&u(e,"input")&&k(e,"click"),!0},_default:function(t){var e=t.target;return ee.test(e.type)&&e.click&&u(e,"input")&&Bt.get(e,"click")||u(e,"a")}},beforeunload:{postDispatch:function(t){t.result!==undefined&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},Ct.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},Ct.Event=function(t,e){if(!(this instanceof Ct.Event))return new Ct.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.defaultPrevented===undefined&&!1===t.returnValue?S:T,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&Ct.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[Ct.expando]=!0},Ct.Event.prototype={constructor:Ct.Event,isDefaultPrevented:T,isPropagationStopped:T,isImmediatePropagationStopped:T,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=S,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=S,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=S,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},Ct.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&le.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&e!==undefined&&ue.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},Ct.event.addProp),Ct.each({focus:"focusin",blur:"focusout"},function(t,e){
|
|
Ct.event.special[t]={setup:function(){return k(this,t,A),!1},trigger:function(){return k(this,t),!0},delegateType:e}}),Ct.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,o){Ct.event.special[t]={delegateType:o,bindType:o,handle:function(t){var e,n=this,i=t.relatedTarget,r=t.handleObj;return i&&(i===n||Ct.contains(n,i))||(t.type=r.origType,e=r.handler.apply(this,arguments),t.type=o),e}}}),Ct.fn.extend({on:function(t,e,n,i){return M(this,t,e,n,i)},one:function(t,e,n,i){return M(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,Ct(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"!=typeof t)return!1!==e&&"function"!=typeof e||(n=e,e=undefined),!1===n&&(n=T),this.each(function(){Ct.event.remove(this,t,n,e)});for(r in t)this.off(r,e,t[r]);return this}});var de=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,he=/<script|<style|<link/i,fe=/checked\s*(?:[^=]|=\s*.checked.)/i,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;Ct.extend({htmlPrefilter:function(t){return t.replace(de,"<$1></$2>")},clone:function(t,e,n){var i,r,o,a,s=t.cloneNode(!0),l=Xt(t);if(!(xt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||Ct.isXMLDoc(t)))for(a=b(s),i=0,r=(o=b(t)).length;i<r;i++)P(o[i],a[i]);if(e)if(n)for(o=o||b(t),a=a||b(s),i=0,r=o.length;i<r;i++)O(o[i],a[i]);else O(t,s);return 0<(a=b(s,"script")).length&&_(a,!l&&b(t,"script")),s},cleanData:function(t){for(var e,n,i,r=Ct.event.special,o=0;(n=t[o])!==undefined;o++)if(Ht(n)){if(e=n[Bt.expando]){if(e.events)for(i in e.events)r[i]?Ct.event.remove(n,i):Ct.removeEvent(n,i,e.handle);n[Bt.expando]=undefined}n[Vt.expando]&&(n[Vt.expando]=undefined)}}}),Ct.fn.extend({detach:function(t){return R(this,t,!0)},remove:function(t){return R(this,t)},text:function(t){return Ft(this,function(t){return t===undefined?Ct.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return N(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||I(this,t).appendChild(t)})},prepend:function(){return N(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=I(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return N(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return N(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(Ct.cleanData(b(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return Ct.clone(this,t,e)})},html:function(t){return Ft(this,function(t){var e=this[0]||{},n=0,i=this.length;if(t===undefined&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!he.test(t)&&!re[(ne.exec(t)||["",""])[1].toLowerCase()]){t=Ct.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(Ct.cleanData(b(e,!1)),e.innerHTML=t);e=0}catch(r){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var n=[];return N(this,arguments,function(t){var e=this.parentNode;Ct.inArray(this,n)<0&&(Ct.cleanData(b(this)),e&&e.replaceChild(t,this))},n)}}),Ct.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,a){Ct.fn[t]=function(t){for(var e,n=[],i=Ct(t),r=i.length-1,o=0;o<=r;o++)e=o===r?this:this.clone(!0),Ct(i[o])[a](e),ht.apply(n,e.get());return this.pushStack(n)}});var ge=new RegExp("^("+qt+")(?!px)[a-z%]+$","i"),me=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=C),e.getComputedStyle(t)},ve=new RegExp(Yt.join("|"),"i");!function(){function t(){if(l){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Zt.appendChild(s).appendChild(l);var t=C.getComputedStyle(l);n="1%"!==t.top,a=12===e(t.marginLeft),l.style.right="60%",o=36===e(t.right),i=36===e(t.width),l.style.position="absolute",r=12===e(l.offsetWidth/3),Zt.removeChild(s),l=null}}function e(t){return Math.round(parseFloat(t))}var n,i,r,o,a,s=lt.createElement("div"),l=lt.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",xt.clearCloneStyle="content-box"===l.style.backgroundClip,Ct.extend(xt,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),a},scrollboxSize:function(){return t(),r}}))}();var ye=["Webkit","Moz","ms"],xe=lt.createElement("div").style,be={},_e=/^(none|table(?!-c[ea]).+)/,we=/^--/,Se={position:"absolute",visibility:"hidden",display:"block"},Ce={letterSpacing:"0",fontWeight:"400"};Ct.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=$(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=f(e),l=we.test(e),u=t.style;if(l||(e=j(s)),a=Ct.cssHooks[e]||Ct.cssHooks[s],n===undefined)return a&&"get"in a&&(r=a.get(t,!1,i))!==undefined?r:u[e];"string"===(o=typeof n)&&(r=Gt.exec(n))&&r[1]&&(n=v(t,e,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(Ct.cssNumber[s]?"":"px")),xt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&(n=a.set(t,n,i))===undefined||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,o,a,s=f(e);return we.test(e)||(e=j(s)),(a=Ct.cssHooks[e]||Ct.cssHooks[s])&&"get"in a&&(r=a.get(t,!0,n)),r===undefined&&(r=$(t,e,i)),"normal"===r&&e in Ce&&(r=Ce[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),Ct.each(["height","width"],function(t,l){Ct.cssHooks[l]={get:function(t,e,n){if(e)return!_e.test(Ct.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?V(t,l,n):Jt(t,Se,function(){return V(t,l,n)})},set:function(t,e,n){var i,r=me(t),o=!xt.scrollboxSize()&&"absolute"===r.position,a=(o||n)&&"border-box"===Ct.css(t,"boxSizing",!1,r),s=n?B(t,l,n,a,r):0;return a&&o&&(s-=Math.ceil(t["offset"+l[0].toUpperCase()+l.slice(1)]-parseFloat(r[l])-B(t,l,"border",!1,r)-.5)),s&&(i=Gt.exec(e))&&"px"!==(i[3]||"px")&&(t.style[l]=e,e=Ct.css(t,l)),H(t,e,s)}}}),Ct.cssHooks.marginLeft=F(xt.reliableMarginLeft,function(t,e){if(e)return(parseFloat($(t,"marginLeft"))||t.getBoundingClientRect().left-Jt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),Ct.each({margin:"",padding:"",border:"Width"},function(r,o){Ct.cssHooks[r+o]={expand:function(t){for(var e=0,n={},i="string"==typeof t?t.split(" "):[t];e<4;e++)n[r+Yt[e]+o]=i[e]||i[e-2]||i[0];return n}},"margin"!==r&&(Ct.cssHooks[r+o].set=H)}),Ct.fn.extend({css:function(t,e){return Ft(this,function(t,e,n){var i,r,o={},a=0;if(Array.isArray(e)){for(i=me(t),r=e.length;a<r;a++)o[e[a]]=Ct.css(t,e[a],!1,i);return o}return n!==undefined?Ct.style(t,e,n):Ct.css(t,e)},t,e,1<arguments.length)}}),(Ct.Tween=W).prototype={constructor:W,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||Ct.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(Ct.cssNumber[n]?"":"px")},cur:function(){var t=W.propHooks[this.prop];return t&&t.get?t.get(this):W.propHooks._default.get(this)},run:function(t){var e,n=W.propHooks[this.prop];return this.options.duration?this.pos=e=Ct.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=Ct.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){Ct.fx.step[t.prop]?Ct.fx.step[t.prop](t):1!==t.elem.nodeType||!Ct.cssHooks[t.prop]&&null==t.elem.style[j(t.prop)]?t.elem[t.prop]=t.now:Ct.style(t.elem,t.prop,t.now+t.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},Ct.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},Ct.fx=W.prototype.init,Ct.fx.step={};var Te,Ae,De,Me,ke=/^(?:toggle|show|hide)$/,Ie=/queueHooks$/;Ct.Animation=Ct.extend(K,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return v(n.elem,t,Gt.exec(e),n),n}]},tweener:function(t,e){bt(t)?(e=t,t=["*"]):t=t.match(Nt);for(var n,i=0,r=t.length;i<r;i++)n=t[i],K.tweeners[n]=K.tweeners[n]||[],K.tweeners[n].unshift(e)},prefilters:[Z],prefilter:function(t,e){e?K.prefilters.unshift(t):K.prefilters.push(t)}}),Ct.speed=function(t,e,n){var i=t&&"object"==typeof t?Ct.extend({},t):{complete:n||!n&&e||bt(t)&&t,duration:t,easing:n&&e||e&&!bt(e)&&e};return Ct.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in Ct.fx.speeds?i.duration=Ct.fx.speeds[i.duration]:i.duration=Ct.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){bt(i.old)&&i.old.call(this),i.queue&&Ct.dequeue(this,i.queue)},i},Ct.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Qt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(e,t,n,i){var r=Ct.isEmptyObject(e),o=Ct.speed(t,n,i),a=function(){var t=K(this,Ct.extend({},e),o);(r||Bt.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(r,t,o){var a=function(t){var e=t.stop;delete t.stop,e(o)};return"string"!=typeof r&&(o=t,t=r,r=undefined),t&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var t=!0,e=null!=r&&r+"queueHooks",n=Ct.timers,i=Bt.get(this);if(e)i[e]&&i[e].stop&&a(i[e]);else for(e in i)i[e]&&i[e].stop&&Ie.test(e)&&a(i[e]);for(e=n.length;e--;)n[e].elem!==this||null!=r&&n[e].queue!==r||(n[e].anim.stop(o),t=!1,n.splice(e,1));!t&&o||Ct.dequeue(this,r)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var t,e=Bt.get(this),n=e[a+"queue"],i=e[a+"queueHooks"],r=Ct.timers,o=n?n.length:0;for(e.finish=!0,Ct.queue(this,a,[]),i&&i.stop&&i.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===a&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<o;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete e.finish})}}),Ct.each(["toggle","show","hide"],function(t,i){var r=Ct.fn[i];Ct.fn[i]=function(t,e,n){return null==t||"boolean"==typeof t?r.apply(this,arguments):this.animate(G(i,!0),t,e,n)}}),Ct.each({slideDown:G("show"),slideUp:G("hide"),slideToggle:G("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,i){Ct.fn[t]=function(t,e,n){return this.animate(i,t,e,n)}}),Ct.timers=[],Ct.fx.tick=function(){var t,e=0,n=Ct.timers;for(Te=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||Ct.fx.stop(),Te=undefined},Ct.fx.timer=function(t){Ct.timers.push(t),Ct.fx.start()},Ct.fx.interval=13,Ct.fx.start=function(){Ae||(Ae=!0,U())},Ct.fx.stop=function(){Ae=null},Ct.fx.speeds={slow:600,fast:200,_default:400},Ct.fn.delay=function(i,t){return i=Ct.fx&&Ct.fx.speeds[i]||i,t=t||"fx",this.queue(t,function(t,e){var n=C.setTimeout(t,i);e.stop=function(){C.clearTimeout(n)}})},De=lt.createElement("input"),Me=lt.createElement("select").appendChild(lt.createElement("option")),De.type="checkbox",xt.checkOn=""!==De.value,xt.optSelected=Me.selected,(De=lt.createElement("input")).value="t",De.type="radio",xt.radioValue="t"===De.value;var Ee,Le=Ct.expr.attrHandle;Ct.fn.extend({attr:function(t,e){return Ft(this,Ct.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){Ct.removeAttr(this,t)})}}),Ct.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?Ct.prop(t,e,n):(1===o&&Ct.isXMLDoc(t)||(r=Ct.attrHooks[e.toLowerCase()]||(Ct.expr.match.bool.test(e)?Ee:undefined)),n!==undefined?null===n?void Ct.removeAttr(t,e):r&&"set"in r&&(i=r.set(t,n,e))!==undefined?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=Ct.find.attr(t,e))?undefined:i)},attrHooks:{type:{set:function(t,e){if(!xt.radioValue&&"radio"===e&&u(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(Nt);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),Ee={set:function(t,e,n){return!1===e?Ct.removeAttr(t,n):t.setAttribute(n,n),n}},Ct.each(Ct.expr.match.bool.source.match(/\w+/g),function(t,e){var a=Le[e]||Ct.find.attr;Le[e]=function(t,e,n){var i,r,o=e.toLowerCase();return n||(r=Le[o],Le[o]=i,i=null!=a(t,e,n)?o:null,Le[o]=r),i}});var Oe=/^(?:input|select|textarea|button)$/i,Pe=/^(?:a|area)$/i;Ct.fn.extend({prop:function(t,e){return Ft(this,Ct.prop,t,e,1<arguments.length)},removeProp:function(t){return this.each(function(){delete this[Ct.propFix[t]||t]})}}),Ct.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Ct.isXMLDoc(t)||(e=Ct.propFix[e]||e,r=Ct.propHooks[e]),n!==undefined?r&&"set"in r&&(i=r.set(t,n,e))!==undefined?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=Ct.find.attr(t,"tabindex");return e?parseInt(e,10):Oe.test(t.nodeName)||Pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),xt.optSelected||(Ct.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),Ct.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ct.propFix[this.toLowerCase()]=this}),Ct.fn.extend({addClass:function(e){var t,n,i,r,o,a,s,l=0;if(bt(e))return this.each(function(t){Ct(this).addClass(e.call(this,t,J(this)))});if((t=tt(e)).length)for(;n=this[l++];)if(r=J(n),i=1===n.nodeType&&" "+Q(r)+" "){for(a=0;o=t[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(s=Q(i))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,o,a,s,l=0;if(bt(e))return this.each(function(t){Ct(this).removeClass(e.call(this,t,J(this)))});if(!arguments.length)return this.attr("class","");if((t=tt(e)).length)for(;n=this[l++];)if(r=J(n),i=1===n.nodeType&&" "+Q(r)+" "){for(a=0;o=t[a++];)for(;-1<i.indexOf(" "+o+" ");)i=i.replace(" "+o+" "," ");r!==(s=Q(i))&&n.setAttribute("class",s)}return this},toggleClass:function(r,e){var o=typeof r,a="string"===o||Array.isArray(r);return"boolean"==typeof e&&a?e?this.addClass(r):this.removeClass(r):bt(r)?this.each(function(t){Ct(this).toggleClass(r.call(this,t,J(this),e),e)}):this.each(function(){var t,e,n,i;if(a)for(e=0,n=Ct(this),i=tt(r);t=i[e++];)n.hasClass(t)?n.removeClass(t):n.addClass(t);else r!==undefined&&"boolean"!==o||((t=J(this))&&Bt.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===r?"":Bt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+Q(J(n))+" ").indexOf(e))return!0;return!1}});var Ne=/\r/g;Ct.fn.extend({val:function(n){var i,t,r,e=this[0];return arguments.length?(r=bt(n),this.each(function(t){var e;1===this.nodeType&&(null==(e=r?n.call(this,t,Ct(this).val()):n)?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=Ct.map(e,function(t){return null==t?"":t+""})),(i=Ct.valHooks[this.type]||Ct.valHooks[this.nodeName.toLowerCase()])&&"set"in i&&i.set(this,e,"value")!==undefined||(this.value=e))})):e?(i=Ct.valHooks[e.type]||Ct.valHooks[e.nodeName.toLowerCase()])&&"get"in i&&(t=i.get(e,"value"))!==undefined?t:"string"==typeof(t=e.value)?t.replace(Ne,""):null==t?"":t:void 0}}),Ct.extend({valHooks:{option:{get:function(t){var e=Ct.find.attr(t,"value");return null!=e?e:Q(Ct.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?o+1:r.length;for(i=o<0?l:a?o:0;i<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!u(n.parentNode,"optgroup"))){if(e=Ct(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=Ct.makeArray(e),a=r.length;a--;)((i=r[a]).selected=-1<Ct.inArray(Ct.valHooks.option.get(i),o))&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),Ct.each(["radio","checkbox"],function(){Ct.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=-1<Ct.inArray(Ct(t).val(),e)}},xt.checkOn||(Ct.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),xt.focusin="onfocusin"in C;var Re=/^(?:focusinfocus|focusoutblur)$/,$e=function(t){t.stopPropagation()};Ct.extend(Ct.event,{trigger:function(t,e,n,i){var r,o,a,s,l,u,c,d,h=[n||lt],f=mt.call(t,"type")?t.type:t,p=mt.call(t,"namespace")?t.namespace.split("."):[];if(o=d=a=n=n||lt,3!==n.nodeType&&8!==n.nodeType&&!Re.test(f+Ct.event.triggered)&&(-1<f.indexOf(".")&&(f=(p=f.split(".")).shift(),p.sort()),l=f.indexOf(":")<0&&"on"+f,(t=t[Ct.expando]?t:new Ct.Event(f,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=n),e=null==e?[t]:Ct.makeArray(e,[t]),c=Ct.event.special[f]||{},i||!c.trigger||!1!==c.trigger.apply(n,e))){if(!i&&!c.noBubble&&!_t(n)){for(s=c.delegateType||f,Re.test(s+f)||(o=o.parentNode);o;o=o.parentNode)h.push(o),a=o;a===(n.ownerDocument||lt)&&h.push(a.defaultView||a.parentWindow||C)}for(r=0;(o=h[r++])&&!t.isPropagationStopped();)d=o,t.type=1<r?s:c.bindType||f,(u=(Bt.get(o,"events")||{})[t.type]&&Bt.get(o,"handle"))&&u.apply(o,e),(u=l&&o[l])&&u.apply&&Ht(o)&&(t.result=u.apply(o,e),!1===t.result&&t.preventDefault());return t.type=f,i||t.isDefaultPrevented()||c._default&&!1!==c._default.apply(h.pop(),e)||!Ht(n)||l&&bt(n[f])&&!_t(n)&&((a=n[l])&&(n[l]=null),Ct.event.triggered=f,t.isPropagationStopped()&&d.addEventListener(f,$e),n[f](),t.isPropagationStopped()&&d.removeEventListener(f,$e),Ct.event.triggered=undefined,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var i=Ct.extend(new Ct.Event,n,{type:t,isSimulated:!0});Ct.event.trigger(i,null,e)}}),Ct.fn.extend({trigger:function(t,e){return this.each(function(){Ct.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return Ct.event.trigger(t,e,n,!0)}}),xt.focusin||Ct.each({focus:"focusin",blur:"focusout"},function(n,i){var r=function(t){Ct.event.simulate(i,t.target,Ct.event.fix(t))};Ct.event.special[i]={setup:function(){var t=this.ownerDocument||this,e=Bt.access(t,i);e||t.addEventListener(n,r,!0),Bt.access(t,i,(e||0)+1)},teardown:function(){var t=this.ownerDocument||this,e=Bt.access(t,i)-1;e?Bt.access(t,i,e):(t.removeEventListener(n,r,!0),Bt.remove(t,i))}}});var Fe=C.location,ze=Date.now(),je=/\?/;Ct.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new C.DOMParser).parseFromString(t,"text/xml")}catch(n){e=undefined}return e&&!e.getElementsByTagName("parsererror").length||Ct.error("Invalid XML: "+t),e};var He=/\[\]$/,Be=/\r?\n/g,Ve=/^(?:submit|button|image|reset|file)$/i,We=/^(?:input|select|textarea|keygen)/i;Ct.param=function(t,e){var n,i=[],r=function(t,e){var n=bt(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!Ct.isPlainObject(t))Ct.each(t,function(){r(this.name,this.value)});else for(n in t)et(n,t[n],e,r);return i.join("&")},Ct.fn.extend({serialize:function(){return Ct.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=Ct.prop(this,"elements");return t?Ct.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!Ct(this).is(":disabled")&&We.test(this.nodeName)&&!Ve.test(t)&&(this.checked||!ee.test(t))}).map(function(t,e){var n=Ct(this).val();return null==n?null:Array.isArray(n)?Ct.map(n,function(t){return{name:e.name,value:t.replace(Be,"\r\n")}}):{name:e.name,value:n.replace(Be,"\r\n")}}).get()}});var Ue=/%20/g,qe=/#.*$/,Ge=/([?&])_=[^&]*/,Ye=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ze=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Xe=/^(?:GET|HEAD)$/,Ke=/^\/\//,Qe={},Je={},tn="*/".concat("*"),en=lt.createElement("a");en.href=Fe.href,Ct.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fe.href,type:"GET",isLocal:Ze.test(Fe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":tn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Ct.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?rt(rt(t,Ct.ajaxSettings),e):rt(Ct.ajaxSettings,t)},ajaxPrefilter:nt(Qe),ajaxTransport:nt(Je),ajax:function(t,e){function n(t,e,n,i){var r,o,a,s,l,u=e;p||(p=!0,f&&C.clearTimeout(f),c=undefined,h=i||"",w.readyState=0<t?4:0,r=200<=t&&t<300||304===t,n&&(s=ot(m,w,n)),s=at(m,s,w,r),r?(m.ifModified&&((l=w.getResponseHeader("Last-Modified"))&&(Ct.lastModified[d]=l),(l=w.getResponseHeader("etag"))&&(Ct.etag[d]=l)),204===t||"HEAD"===m.type?u="nocontent":304===t?u="notmodified":(u=s.state,o=s.data,r=!(a=s.error))):(a=u,!t&&u||(u="error",t<0&&(t=0))),w.status=t,w.statusText=(e||u)+"",r?x.resolveWith(v,[o,u,w]):x.rejectWith(v,[w,u,a]),w.statusCode(_),_=undefined,g&&y.trigger(r?"ajaxSuccess":"ajaxError",[w,m,r?o:a]),b.fireWith(v,[w,u]),g&&(y.trigger("ajaxComplete",[w,m]),--Ct.active||Ct.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=undefined),e=e||{};var c,d,h,i,f,r,p,g,o,a,m=Ct.ajaxSetup({},e),v=m.context||m,y=m.context&&(v.nodeType||v.jquery)?Ct(v):Ct.event,x=Ct.Deferred(),b=Ct.Callbacks("once memory"),_=m.statusCode||{},s={},l={},u="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(p){if(!i)for(i={};e=Ye.exec(h);)i[e[1].toLowerCase()+" "]=(i[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=i[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return p?h:null},setRequestHeader:function(t,e){return null==p&&(t=l[t.toLowerCase()]=l[t.toLowerCase()]||t,s[t]=e),this},overrideMimeType:function(t){return null==p&&(m.mimeType=t),this},statusCode:function(t){var e;if(t)if(p)w.always(t[w.status]);else for(e in t)_[e]=[_[e],t[e]];return this},abort:function(t){var e=t||u;return c&&c.abort(e),n(0,e),this}};if(x.promise(w),m.url=((t||m.url||Fe.href)+"").replace(Ke,Fe.protocol+"//"),m.type=e.method||e.type||m.method||m.type,m.dataTypes=(m.dataType||"*").toLowerCase().match(Nt)||[""],null==m.crossDomain){r=lt.createElement("a");try{r.href=m.url,r.href=r.href,m.crossDomain=en.protocol+"//"+en.host!=r.protocol+"//"+r.host}catch(S){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=Ct.param(m.data,m.traditional)),it(Qe,m,e,w),p)return w;for(o in(g=Ct.event&&m.global)&&0==Ct.active++&&Ct.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Xe.test(m.type),d=m.url.replace(qe,""),m.hasContent?m.data&&m.processData&&0===(m.contentType||"").indexOf("application/x-www-form-urlencoded")&&(m.data=m.data.replace(Ue,"+")):(a=m.url.slice(d.length),m.data&&(m.processData||"string"==typeof m.data)&&(d+=(je.test(d)?"&":"?")+m.data,delete m.data),!1===m.cache&&(d=d.replace(Ge,"$1"),a=(je.test(d)?"&":"?")+"_="+ze+++a),m.url=d+a),m.ifModified&&(Ct.lastModified[d]&&w.setRequestHeader("If-Modified-Since",Ct.lastModified[d]),Ct.etag[d]&&w.setRequestHeader("If-None-Match",Ct.etag[d])),(m.data&&m.hasContent&&!1!==m.contentType||e.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+tn+"; q=0.01":""):m.accepts["*"]),m.headers)w.setRequestHeader(o,m.headers[o]);if(m.beforeSend&&(!1===m.beforeSend.call(v,w,m)||p))return w.abort();if(u="abort",b.add(m.complete),w.done(m.success),w.fail(m.error),c=it(Je,m,e,w)){if(w.readyState=1,g&&y.trigger("ajaxSend",[w,m]),p)return w;m.async&&0<m.timeout&&(f=C.setTimeout(function(){w.abort("timeout")},m.timeout));try{p=!1,c.send(s,n)}catch(S){if(p)throw S;n(-1,S)}}else n(-1,"No Transport");return w},getJSON:function(t,e,n){return Ct.get(t,e,n,"json")},getScript:function(t,e){return Ct.get(t,undefined,e,"script")}}),Ct.each(["get","post"],function(t,r){Ct[r]=function(t,e,n,i){return bt(e)&&(i=i||n,n=e,e=undefined),Ct.ajax(Ct.extend({url:t,type:r,dataType:i,data:e,success:n},Ct.isPlainObject(t)&&t))}}),Ct._evalUrl=function(t,e){return Ct.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){Ct.globalEval(t,e)}})},Ct.fn.extend({wrapAll:function(t){var e;return this[0]&&(bt(t)&&(t=t.call(this[0])),e=Ct(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(n){return bt(n)?this.each(function(t){Ct(this).wrapInner(n.call(this,t))}):this.each(function(){var t=Ct(this),e=t.contents();e.length?e.wrapAll(n):t.append(n)})},wrap:function(e){var n=bt(e);return this.each(function(t){Ct(this).wrapAll(n?e.call(this,t):e)})},unwrap:function(t){return this.parent(t).not("body").each(function(){Ct(this).replaceWith(this.childNodes)}),this}}),Ct.expr.pseudos.hidden=function(t){return!Ct.expr.pseudos.visible(t)},Ct.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},Ct.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(t){}};var nn={0:200,1223:204},rn=Ct.ajaxSettings.xhr();xt.cors=!!rn&&"withCredentials"in rn,xt.ajax=rn=!!rn,Ct.ajaxTransport(function(o){var a,s;if(xt.cors||rn&&!o.crossDomain)return{send:function(t,e){var n,i=o.xhr();if(i.open(o.type,o.url,o.async,o.username,o.password),o.xhrFields)for(n in o.xhrFields)i[n]=o.xhrFields[n];for(n in o.mimeType&&i.overrideMimeType&&i.overrideMimeType(o.mimeType),o.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t)i.setRequestHeader(n,t[n]);a=function(t){return function(){a&&(a=s=i.onload=i.onerror=i.onabort=i.ontimeout=i.onreadystatechange=null,"abort"===t?i.abort():"error"===t?"number"!=typeof i.status?e(0,"error"):e(i.status,i.statusText):e(nn[i.status]||i.status,i.statusText,"text"!==(i.responseType||"text")||"string"!=typeof i.responseText?{binary:i.response}:{text:i.responseText},i.getAllResponseHeaders()))}},i.onload=a(),s=i.onerror=i.ontimeout=a("error"),i.onabort!==undefined?i.onabort=s:i.onreadystatechange=function(){4===i.readyState&&C.setTimeout(function(){a&&s()})},a=a("abort");try{i.send(o.hasContent&&o.data||null)}catch(r){if(a)throw r}},abort:function(){a&&a()}}}),Ct.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),Ct.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return Ct.globalEval(t),t}}}),Ct.ajaxPrefilter("script",function(t){t.cache===undefined&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),Ct.ajaxTransport("script",function(n){var i,r;if(n.crossDomain||n.scriptAttrs)return{send:function(t,e){i=Ct("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(t){i.remove(),r=null,t&&e("error"===t.type?404:200,t.type)}),lt.head.appendChild(i[0])},abort:function(){r&&r()}}});var on,an=[],sn=/(=)\?(?=&|$)|\?\?/;Ct.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=an.pop()||Ct.expando+"_"+ze++;return this[t]=!0,t}}),Ct.ajaxPrefilter("json jsonp",function(t,e,n){var i,r,o,a=!1!==t.jsonp&&(sn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&sn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=bt(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(sn,"$1"+i):!1!==t.jsonp&&(t.url+=(je.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||Ct.error(i+" was not called"),o[0]},t.dataTypes[0]="json",r=C[i],C[i]=function(){o=arguments},n.always(function(){r===undefined?Ct(C).removeProp(i):C[i]=r,t[i]&&(t.jsonpCallback=e.jsonpCallback,an.push(i)),o&&bt(r)&&r(o[0]),o=r=undefined}),"script"}),xt.createHTMLDocument=((on=lt.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===on.childNodes.length),Ct.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(xt.createHTMLDocument?((i=(e=lt.implementation.createHTMLDocument("")).createElement("base")).href=lt.location.href,e.head.appendChild(i)):e=lt),o=!n&&[],(r=It.exec(t))?[e.createElement(r[1])]:(r=w([t],e,o),o&&o.length&&Ct(o).remove(),Ct.merge([],r.childNodes)));var i,r,o},Ct.fn.load=function(t,e,n){var i,r,o,a=this,s=t.indexOf(" ");return-1<s&&(i=Q(t.slice(s)),t=t.slice(0,s)),bt(e)?(n=e,e=undefined):e&&"object"==typeof e&&(r="POST"),0<a.length&&Ct.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,a.html(i?Ct("<div>").append(Ct.parseHTML(t)).find(i):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},Ct.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){Ct.fn[e]=function(t){return this.on(e,t)}}),Ct.expr.pseudos.animated=function(e){return Ct.grep(Ct.timers,function(t){return e===t.elem}).length},Ct.offset={setOffset:function(t,e,n){var i,r,o,a,s,l,u=Ct.css(t,"position"),c=Ct(t),d={};"static"===u&&(t.style.position="relative"),s=c.offset(),o=Ct.css(t,"top"),l=Ct.css(t,"left"),("absolute"===u||"fixed"===u)&&-1<(o+l).indexOf("auto")?(a=(i=c.position()).top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),bt(e)&&(e=e.call(t,n,Ct.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+r),"using"in e?e.using.call(t,d):c.css(d)}},Ct.fn.extend({offset:function(e){if(arguments.length)return e===undefined?this:this.each(function(t){Ct.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===Ct.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===Ct.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=Ct(t).offset()).top+=Ct.css(t,"borderTopWidth",!0),r.left+=Ct.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-Ct.css(i,"marginTop",!0),left:e.left-r.left-Ct.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===Ct.css(t,"position");)t=t.offsetParent;return t||Zt})}}),Ct.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var o="pageYOffset"===r;Ct.fn[e]=function(t){return Ft(this,function(t,e,n){var i;if(_t(t)?i=t:9===t.nodeType&&(i=t.defaultView),n===undefined)return i?i[r]:t[e];i?i.scrollTo(o?i.pageXOffset:n,o?n:i.pageYOffset):t[e]=n},e,t,arguments.length)}}),Ct.each(["top","left"],function(t,n){Ct.cssHooks[n]=F(xt.pixelPosition,function(t,e){if(e)return e=$(t,n),ge.test(e)?Ct(t).position()[n]+"px":e})}),Ct.each({Height:"height",Width:"width"},function(a,s){Ct.each({padding:"inner"+a,content:s,"":"outer"+a},function(i,o){Ct.fn[o]=function(t,e){var n=arguments.length&&(i||"boolean"!=typeof t),r=i||(!0===t||!0===e?"margin":"border");return Ft(this,function(t,e,n){var i;return _t(t)?0===o.indexOf("outer")?t["inner"+a]:t.document.documentElement["client"+a]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+a],i["scroll"+a],t.body["offset"+a],i["offset"+a],i["client"+a])):n===undefined?Ct.css(t,e,r):Ct.style(t,e,n,r)},s,n?t:undefined,n)}})}),Ct.each(
|
|
"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,n){Ct.fn[n]=function(t,e){return 0<arguments.length?this.on(n,null,t,e):this.trigger(n)}}),Ct.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),Ct.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),Ct.proxy=function(t,e){var n,i,r;return"string"==typeof e&&(n=t[e],e=t,t=n),bt(t)?(i=ct.call(arguments,2),(r=function(){return t.apply(e||this,i.concat(ct.call(arguments)))}).guid=t.guid=t.guid||Ct.guid++,r):undefined},Ct.holdReady=function(t){t?Ct.readyWait++:Ct.ready(!0)},Ct.isArray=Array.isArray,Ct.parseJSON=JSON.parse,Ct.nodeName=u,Ct.isFunction=bt,Ct.isWindow=_t,Ct.camelCase=f,Ct.type=m,Ct.now=Date.now,Ct.isNumeric=function(t){var e=Ct.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return Ct});var ln=C.jQuery,un=C.$;return Ct.noConflict=function(t){return C.$===Ct&&(C.$=un),t&&C.jQuery===Ct&&(C.jQuery=ln),Ct},t||(C.jQuery=C.$=Ct),Ct}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";function s(t){return t&&"[object Function]"==={}.toString.call(t)}function b(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function p(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function g(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=b(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/(auto|scroll|overlay)/.test(n+r+i)?t:g(p(t))}function m(t){return t&&t.referenceNode?t.referenceNode:t}function v(t){return 11===t?rt:10===t?ot:rt||ot}function x(t){if(!t)return document.documentElement;for(var e=v(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===b(n,"position")?x(n):n:t?t.ownerDocument.documentElement:document.documentElement}function l(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||x(t.firstElementChild)===t)}function u(t){return null===t.parentNode?t:u(t.parentNode)}function y(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,r=n?e:t,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||i.contains(r))return l(a)?a:x(a);var s=u(t);return s.host?y(s.host,e):y(t,u(e).host)}function d(t,e){var n="top"===(1<arguments.length&&void 0!==e?arguments[1]:"top")?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"!==i&&"HTML"!==i)return t[n];var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[n]}function _(t,e,n){var i=2<arguments.length&&void 0!==n&&arguments[2],r=d(e,"top"),o=d(e,"left"),a=i?-1:1;return t.top+=r*a,t.bottom+=r*a,t.left+=o*a,t.right+=o*a,t}function h(t,e){var n="x"===e?"Left":"Top",i="Left"==n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+i+"Width"],10)}function r(t,e,n,i){return tt(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],v(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,i=v(10)&&getComputedStyle(n);return{height:r("Height",e,n,i),width:r("Width",e,n,i)}}function S(t){return ut({},t,{right:t.left+t.width,bottom:t.top+t.height})}function C(t){var e={};try{if(v(10)){e=t.getBoundingClientRect();var n=d(t,"top"),i=d(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(b){}var r={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?w(t.ownerDocument):{},a=o.width||t.clientWidth||r.width,s=o.height||t.clientHeight||r.height,l=t.offsetWidth-a,u=t.offsetHeight-s;if(l||u){var c=b(t);l-=h(c,"x"),u-=h(c,"y"),r.width-=l,r.height-=u}return S(r)}function T(t,e,n){var i=2<arguments.length&&void 0!==n&&arguments[2],r=v(10),o="HTML"===e.nodeName,a=C(t),s=C(e),l=g(t),u=b(e),c=parseFloat(u.borderTopWidth,10),d=parseFloat(u.borderLeftWidth,10);i&&o&&(s.top=tt(s.top,0),s.left=tt(s.left,0));var h=S({top:a.top-s.top-c,left:a.left-s.left-d,width:a.width,height:a.height});if(h.marginTop=0,h.marginLeft=0,!r&&o){var f=parseFloat(u.marginTop,10),p=parseFloat(u.marginLeft,10);h.top-=c-f,h.bottom-=c-f,h.left-=d-p,h.right-=d-p,h.marginTop=f,h.marginLeft=p}return(r&&!i?e.contains(l):e===l&&"BODY"!==l.nodeName)&&(h=_(h,e)),h}function A(t,e){var n=1<arguments.length&&void 0!==e&&arguments[1],i=t.ownerDocument.documentElement,r=T(t,i),o=tt(i.clientWidth,window.innerWidth||0),a=tt(i.clientHeight,window.innerHeight||0),s=n?0:d(i),l=n?0:d(i,"left");return S({top:s-r.top+r.marginTop,left:l-r.left+r.marginLeft,width:o,height:a})}function D(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===b(t,"position"))return!0;var n=p(t);return!!n&&D(n)}function M(t){if(!t||!t.parentElement||v())return document.documentElement;for(var e=t.parentElement;e&&"none"===b(e,"transform");)e=e.parentElement;return e||document.documentElement}function f(t,e,n,i,r){var o=4<arguments.length&&void 0!==r&&arguments[4],a={top:0,left:0},s=o?M(t):y(t,m(e));if("viewport"===i)a=A(s,o);else{var l;"scrollParent"===i?"BODY"===(l=g(p(e))).nodeName&&(l=t.ownerDocument.documentElement):l="window"===i?t.ownerDocument.documentElement:i;var u=T(l,s,o);if("HTML"!==l.nodeName||D(s))a=u;else{var c=w(t.ownerDocument),d=c.height,h=c.width;a.top+=u.top-u.marginTop,a.bottom=d+u.top,a.left+=u.left-u.marginLeft,a.right=h+u.left}}var f="number"==typeof(n=n||0);return a.left+=f?n:n.left||0,a.top+=f?n:n.top||0,a.right-=f?n:n.right||0,a.bottom-=f?n:n.bottom||0,a}function k(t){return t.width*t.height}function c(t,e,i,n,r,o){var a=5<arguments.length&&void 0!==o?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=f(i,n,a,r),l={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},u=Object.keys(l).map(function(t){return ut({key:t},l[t],{area:k(l[t])})}).sort(function(t,e){return e.area-t.area}),c=u.filter(function(t){var e=t.width,n=t.height;return e>=i.clientWidth&&n>=i.clientHeight}),d=0<c.length?c[0].key:u[0].key,h=t.split("-")[1];return d+(h?"-"+h:"")}function I(t,e,n,i){var r=3<arguments.length&&void 0!==i?arguments[3]:null;return T(n,r?M(e):y(e,m(n)),r)}function E(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function L(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function O(t,e,n){n=n.split("-")[0];var i=E(t),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",u=o?"width":"height";return r[a]=e[a]+e[l]/2-i[l]/2,r[s]=n===s?e[s]-i[u]:e[L(s)],r}function P(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function i(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=P(t,function(t){return t[e]===n});return t.indexOf(i)}function N(t,n,e){return(void 0===e?t:t.slice(0,i(t,"name",e))).forEach(function(t){t["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var e=t["function"]||t.fn;t.enabled&&s(e)&&(n.offsets.popper=S(n.offsets.popper),n.offsets.reference=S(n.offsets.reference),n=e(n,t))}),n}function t(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=I(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=c(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=O(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=N(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function e(t,n){return t.some(function(t){var e=t.name;return t.enabled&&e===n})}function R(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var r=e[i],o=r?""+r+n:t;if("undefined"!=typeof document.body.style[o])return o}return null}function n(){return this.state.isDestroyed=!0,e(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[R("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function o(t){var e=t.ownerDocument;return e?e.defaultView:window}function a(t,e,n,i){var r="BODY"===t.nodeName,o=r?t.ownerDocument.defaultView:t;o.addEventListener(e,n,{passive:!0}),r||a(g(o.parentNode),e,n,i),i.push(o)}function $(t,e,n,i){n.updateBound=i,o(t).addEventListener("resize",n.updateBound,{passive:!0});var r=g(t);return a(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function F(){this.state.eventsEnabled||(this.state=$(this.reference,this.options,this.state,this.scheduleUpdate))}function z(t,e){return o(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function j(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=z(this.reference,this.state))}function H(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function B(n,i){Object.keys(i).forEach(function(t){var e="";-1!==["width","height","top","right","bottom","left"].indexOf(t)&&H(i[t])&&(e="px"),n.style[t]=i[t]+e})}function V(e,n){Object.keys(n).forEach(function(t){!1===n[t]?e.removeAttribute(t):e.setAttribute(t,n[t])})}function W(t,e){var n=t.offsets,i=n.popper,r=n.reference,o=J,a=function(t){return t},s=o(r.width),l=o(i.width),u=-1!==["left","right"].indexOf(t.placement),c=-1!==t.placement.indexOf("-"),d=e?u||c||s%2==l%2?o:Q:a,h=e?o:a;return{left:d(1==s%2&&1==l%2&&!c&&e?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:d(i.right)}}function U(t,e,n){var i=P(t,function(t){return t.name===e}),r=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!r){var o="`"+e+"`";console.warn("`"+n+"` modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}function q(t){return"end"===t?"start":"start"===t?"end":t}function G(t,e){var n=1<arguments.length&&void 0!==e&&arguments[1],i=ht.indexOf(t),r=ht.slice(i+1).concat(ht.slice(0,i));return n?r.reverse():r}function Y(t,e,n,i){var r,o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+o[1],s=o[2];if(!a)return t;if(0!==s.indexOf("%"))return"vh"!==s&&"vw"!==s?a:("vh"===s?tt(document.documentElement.clientHeight,window.innerHeight||0):tt(document.documentElement.clientWidth,window.innerWidth||0))/100*a;switch(s){case"%p":r=n;break;case"%":case"%r":default:r=i}return S(r)[e]/100*a}function Z(t,r,o,e){var a=[0,0],s=-1!==["right","left"].indexOf(e),n=t.split(/(\+|\-)/).map(function(t){return t.trim()}),i=n.indexOf(P(n,function(t){return-1!==t.search(/,|\s/)}));n[i]&&-1===n[i].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1===i?[n]:[n.slice(0,i).concat([n[i].split(l)[0]]),[n[i].split(l)[1]].concat(n.slice(i+1))];return(u=u.map(function(t,e){var n=(1===e?!s:s)?"height":"width",i=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,i=!0,t):i?(t[t.length-1]+=e,i=!1,t):t.concat(e)},[]).map(function(t){return Y(t,n,r,o)})})).forEach(function(n,i){n.forEach(function(t,e){H(t)&&(a[i]+=t*("-"===n[e-1]?-1:1))})}),a}function X(t,e){var n,i=e.offset,r=t.placement,o=t.offsets,a=o.popper,s=o.reference,l=r.split("-")[0];return n=H(+i)?[+i,0]:Z(i,a,s,l),"left"===l?(a.top+=n[0],a.left-=n[1]):"right"===l?(a.top+=n[0],a.left+=n[1]):"top"===l?(a.left+=n[0],a.top-=n[1]):"bottom"===l&&(a.left+=n[0],a.top+=n[1]),t.popper=a,t}var K=Math.min,Q=Math.floor,J=Math.round,tt=Math.max,et="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,nt=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(et&&0<=navigator.userAgent.indexOf(t[e]))return 1;return 0}(),it=et&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},nt))}},rt=et&&!(!window.MSInputMethodContext||!document.documentMode),ot=et&&/MSIE 10/.test(navigator.userAgent),at=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},st=function(){function i(t,e){for(var n,i=0;i<e.length;i++)(n=e[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}return function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}}(),lt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},ut=Object.assign||function(t){for(var e,n=1;n<arguments.length;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ct=et&&/Firefox/i.test(navigator.userAgent),dt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ht=dt.slice(3),ft={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},pt=function(){function a(t,e,n){var i=this,r=2<arguments.length&&void 0!==n?arguments[2]:{};at(this,a),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=it(this.update.bind(this)),this.options=ut({},a.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(ut({},a.Defaults.modifiers,r.modifiers)).forEach(function(t){i.options.modifiers[t]=ut({},a.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return ut({name:t},i.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&s(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return st(a,[{key:"update",value:function(){return t.call(this)}},{key:"destroy",value:function(){return n.call(this)}},{key:"enableEventListeners",value:function(){return F.call(this)}},{key:"disableEventListeners",value:function(){return j.call(this)}}]),a}();return pt.Utils=("undefined"==typeof window?global:window).PopperUtils,pt.placements=dt,pt.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var r=t.offsets,o=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",c={start:lt({},l,o[l]),end:lt({},l,o[l]+o[u]-a[u])};t.offsets.popper=ut({},a,c[i])}return t}},offset:{order:200,enabled:!0,fn:X,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,i){var e=i.boundariesElement||x(t.instance.popper);t.instance.reference===e&&(e=x(e));var n=R("transform"),r=t.instance.popper.style,o=r.top,a=r.left,s=r[n];r.top="",r.left="",r[n]="";var l=f(t.instance.popper,t.instance.reference,i.padding,e,t.positionFixed);r.top=o,r.left=a,r[n]=s,i.boundaries=l;var u=i.priority,c=t.offsets.popper,d={primary:function(t){var e=c[t];return c[t]<l[t]&&!i.escapeWithReference&&(e=tt(c[t],l[t])),lt({},t,e)},secondary:function(t){var e="right"===t?"left":"top",n=c[e];return c[t]>l[t]&&!i.escapeWithReference&&(n=K(c[e],l[t]-("right"===t?c.width:c.height))),lt({},e,n)}};return u.forEach(function(t){var e=-1===["left","top"].indexOf(t)?"secondary":"primary";c=ut({},c,d[e](t))}),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,r=t.placement.split("-")[0],o=Q,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]<o(i[l])&&(t.offsets.popper[l]=o(i[l])-n[u]),n[l]>o(i[s])&&(t.offsets.popper[l]=o(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!U(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(r),u=l?"height":"width",c=l?"Top":"Left",d=c.toLowerCase(),h=l?"left":"top",f=l?"bottom":"right",p=E(i)[u];s[f]-p<a[d]&&(t.offsets.popper[d]-=a[d]-(s[f]-p)),s[d]+p>a[f]&&(t.offsets.popper[d]+=s[d]+p-a[f]),t.offsets.popper=S(t.offsets.popper);var g=s[d]+s[u]/2-p/2,m=b(t.instance.popper),v=parseFloat(m["margin"+c],10),y=parseFloat(m["border"+c+"Width"],10),x=g-t.offsets.popper[d]-v-y;return x=tt(K(a[u]-p,x),0),t.arrowElement=i,t.offsets.arrow=(lt(n={},d,J(x)),lt(n,h,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(g,m){if(e(g.instance.modifiers,"inner"))return g;if(g.flipped&&g.placement===g.originalPlacement)return g;var v=f(g.instance.popper,g.instance.reference,m.padding,m.boundariesElement,g.positionFixed),y=g.placement.split("-")[0],x=L(y),b=g.placement.split("-")[1]||"",_=[];switch(m.behavior){case ft.FLIP:_=[y,x];break;case ft.CLOCKWISE:_=G(y);break;case ft.COUNTERCLOCKWISE:_=G(y,!0);break;default:_=m.behavior}return _.forEach(function(t,e){if(y!==t||_.length===e+1)return g;y=g.placement.split("-")[0],x=L(y);var n=g.offsets.popper,i=g.offsets.reference,r=Q,o="left"===y&&r(n.right)>r(i.left)||"right"===y&&r(n.left)<r(i.right)||"top"===y&&r(n.bottom)>r(i.top)||"bottom"===y&&r(n.top)<r(i.bottom),a=r(n.left)<r(v.left),s=r(n.right)>r(v.right),l=r(n.top)<r(v.top),u=r(n.bottom)>r(v.bottom),c="left"===y&&a||"right"===y&&s||"top"===y&&l||"bottom"===y&&u,d=-1!==["top","bottom"].indexOf(y),h=!!m.flipVariations&&(d&&"start"===b&&a||d&&"end"===b&&s||!d&&"start"===b&&l||!d&&"end"===b&&u),f=!!m.flipVariationsByContent&&(d&&"start"===b&&s||d&&"end"===b&&a||!d&&"start"===b&&u||!d&&"end"===b&&l),p=h||f;(o||c||p)&&(g.flipped=!0,(o||c)&&(y=_[e+1]),p&&(b=q(b)),g.placement=y+(b?"-"+b:""),g.offsets.popper=ut({},g.offsets.popper,O(g.instance.popper,g.offsets.reference,g.placement)),g=N(g.instance.modifiers,g,"flip"))}),g},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,r=i.popper,o=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=o[n]-(s?r[a?"width":"height"]:0),t.placement=L(e),t.offsets.popper=S(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!U(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=P(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,r=t.offsets.popper,o=P(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,s,l=void 0===o?e.gpuAcceleration:o,u=x(t.instance.popper),c=C(u),d={position:r.position},h=W(t,window.devicePixelRatio<2||!ct),f="bottom"===n?"top":"bottom",p="right"===i?"left":"right",g=R("transform");if(s="bottom"==f?"HTML"===u.nodeName?-u.clientHeight+h.bottom:-c.height+h.bottom:h.top,a="right"==p?"HTML"===u.nodeName?-u.clientWidth+h.right:-c.width+h.right:h.left,l&&g)d[g]="translate3d("+a+"px, "+s+"px, 0)",d[f]=0,d[p]=0,d.willChange="transform";else{var m="bottom"==f?-1:1,v="right"==p?-1:1;d[f]=s*m,d[p]=a*v,d.willChange=f+", "+p}var y={"x-placement":t.placement};return t.attributes=ut({},y,t.attributes),t.styles=ut({},d,t.styles),t.arrowStyles=ut({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){return B(t.instance.popper,t.styles),V(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&B(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,r){var o=I(r,e,t,n.positionFixed),a=c(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),B(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},pt}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):(t=t||self).Util=e(t.jQuery)}(this,function(o){"use strict";function s(t){return{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase()}function t(){return{bindType:i,delegateType:i,handle:function e(t){return o(t.target).is(this)?t.handleObj.handler.apply(this,arguments):undefined}}}function e(t){var e=this,n=!1;return o(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(e)},t),this}function n(){o.fn.emulateTransitionEnd=e,o.event.special[l.TRANSITION_END]=t()}o=o&&o.hasOwnProperty("default")?o["default"]:o;var i="transitionend",r=1e6,a=1e3,l={TRANSITION_END:"bsTransitionEnd",getUID:function u(t){for(;t+=~~(Math.random()*r),document.getElementById(t););return t},getSelectorFromElement:function c(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(i){return null}},getTransitionDurationFromElement:function d(t){if(!t)return 0;var e=o(t).css("transition-duration"),n=o(t).css("transition-delay"),i=parseFloat(e),r=parseFloat(n);return i||r?(e=e.split(",")[0],n=n.split(",")[0],(parseFloat(e)+parseFloat(n))*a):0},reflow:function h(t){return t.offsetHeight},triggerTransitionEnd:function f(t){o(t).trigger(i)},supportsTransitionEnd:function p(){return Boolean(i)},isElement:function g(t){return(t[0]||t).nodeType},typeCheckConfig:function m(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],o=e[i],a=o&&l.isElement(o)?"element":s(o);if(!new RegExp(r).test(a))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+r+'".')}},findShadowRoot:function v(t){if(!document.documentElement.attachShadow)return null;if("function"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?l.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null}};return n(),l}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],e):(t=t||self).Alert=e(t.jQuery,t.Util)}(this,function(d,h){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function f(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}d=d&&d.hasOwnProperty("default")?d["default"]:d,h=h&&h.hasOwnProperty("default")?h["default"]:h;var t="alert",p="4.3.1",g="bs.alert",e="."+g,n=".data-api",r=d.fn[t],o={DISMISS:'[data-dismiss="alert"]'},m={CLOSE:"close"+e,CLOSED:"closed"+e,CLICK_DATA_API:"click"+e+n},v={ALERT:"alert",FADE:"fade",SHOW:"show"},a=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function n(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function e(){d.removeData(this._element,g),this._element=null},t._getRootElement=function r(t){var e=h.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=d(t).closest("."+v.ALERT)[0]),n},t._triggerCloseEvent=function o(t){var e=d.Event(m.CLOSE);return d(t).trigger(e),e},t._removeElement=function a(e){var n=this;if(d(e).removeClass(v.SHOW),d(e).hasClass(v.FADE)){var t=h.getTransitionDurationFromElement(e);d(e).one(h.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function s(t){d(t).detach().trigger(m.CLOSED).remove()},i._jQueryInterface=function l(n){return this.each(function(){var t=d(this),e=t.data(g);e||(e=new i(this),t.data(g,e)),"close"===n&&e[n](this)})},i._handleDismiss=function u(e){return function(t){t&&t.preventDefault(),e.close(this)}},f(i,null,[{key:"VERSION",get:function c(){return p}}]),i}();return d(document).on(m.CLICK_DATA_API,o.DISMISS,a._handleDismiss(new a)),d.fn[t]=a._jQueryInterface,d.fn[t].Constructor=a,d.fn[t].noConflict=function(){return d.fn[t]=r,a._jQueryInterface},a}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):(t=t||self).Button=e(t.jQuery)}(this,function(a){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}a=a&&a.hasOwnProperty("default")?a["default"]:a;var t="button",l="4.3.1",u="bs.button",e="."+u,n=".data-api",r=a.fn[t],c={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},d={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:'input:not([type="hidden"])',ACTIVE:".active",BUTTON:".btn"},o={CLICK_DATA_API:"click"+e+n,FOCUS_BLUR_DATA_API:"focus"+e+n+" blur"+e+n},h=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function o(){var t=!0,e=!0,n=a(this._element).closest(d.DATA_TOGGLE)[0];if(n){var i=this._element.querySelector(d.INPUT);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(c.ACTIVE))t=!1;else{var r=n.querySelector(d.ACTIVE);r&&a(r).removeClass(c.ACTIVE)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(c.ACTIVE),a(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(c.ACTIVE)),t&&a(this._element).toggleClass(c.ACTIVE)},t.dispose=function e(){a.removeData(this._element,u),this._element=null},n._jQueryInterface=function i(e){return this.each(function(){var t=a(this).data(u);t||(t=new n(this),a(this).data(u,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function r(){return l}}]),n}();return a(document).on(o.CLICK_DATA_API,d.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var e=t.target;a(e).hasClass(c.BUTTON)||(e=a(e).closest(d.BUTTON)),h._jQueryInterface.call(a(e),"toggle")}).on(o.FOCUS_BLUR_DATA_API,d.DATA_TOGGLE_CARROT,function(t){var e=a(t.target).closest(d.BUTTON)[0];a(e).toggleClass(c.FOCUS,/^focus(in)?$/.test(t.type))}),a.fn[t]=h._jQueryInterface,a.fn[t].Constructor=h,a.fn[t].noConflict=function(){return a.fn[t]=r,h._jQueryInterface},h}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],e):(t=t||self).Carousel=e(t.jQuery,t.Util)}(this,function(w,S){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function C(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}w=w&&w.hasOwnProperty("default")?w["default"]:w,S=S&&S.hasOwnProperty("default")?S["default"]:S;var A="carousel",D="4.3.1",M="bs.carousel",k="."+M,t=".data-api",e=w.fn[A],I=37,E=39,L=500,O=40,P={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},N={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},R={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},$={SLIDE:"slide"+k,SLID:"slid"+k,KEYDOWN:"keydown"+k,MOUSEENTER:"mouseenter"+k,MOUSELEAVE:"mouseleave"+k,TOUCHSTART:"touchstart"+k,TOUCHMOVE:"touchmove"+k,TOUCHEND:"touchend"+k,POINTERDOWN:"pointerdown"+k,POINTERUP:"pointerup"+k,DRAG_START:"dragstart"+k,LOAD_DATA_API:"load"+k+t,CLICK_DATA_API:"click"+k+t},F={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item",POINTER_EVENT:"pointer-event"},z={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",ITEM_IMG:".carousel-item img",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},j={TOUCH:"touch",PEN:"pen"},o=function(){function o(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(z.INDICATORS),this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=o.prototype;return t.next=function e(){this._isSliding||this._slide(R.NEXT)},t.nextWhenVisible=function n(){!document.hidden&&w(this._element).is(":visible")&&"hidden"!==w(this._element).css("visibility")&&this.next()},t.prev=function i(){this._isSliding||this._slide(R.PREV)},t.pause=function r(t){t||(this._isPaused=!0),this._element.querySelector(z.NEXT_PREV)&&(S.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function a(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function s(t){var e=this;this._activeElement=this._element.querySelector(z.ACTIVE_ITEM);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)w(this._element).one($.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?R.NEXT:R.PREV;this._slide(i,this._items[t])}},t.dispose=function l(){w(this._element).off(k),w.removeData(this._element,M),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,
|
|
this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function u(t){return t=T({},P,t),S.typeCheckConfig(A,t,N),t},t._handleSwipe=function c(){var t=Math.abs(this.touchDeltaX);if(!(t<=O)){var e=t/this.touchDeltaX;0<e&&this.prev(),e<0&&this.next()}},t._addEventListeners=function d(){var e=this;this._config.keyboard&&w(this._element).on($.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&w(this._element).on($.MOUSEENTER,function(t){return e.pause(t)}).on($.MOUSELEAVE,function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function h(){var e=this;if(this._touchSupported){var n=function n(t){e._pointerEvent&&j[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},i=function i(t){t.originalEvent.touches&&1<t.originalEvent.touches.length?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX},r=function r(t){e._pointerEvent&&j[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},L+e._config.interval))};w(this._element.querySelectorAll(z.ITEM_IMG)).on($.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(w(this._element).on($.POINTERDOWN,function(t){return n(t)}),w(this._element).on($.POINTERUP,function(t){return r(t)}),this._element.classList.add(F.POINTER_EVENT)):(w(this._element).on($.TOUCHSTART,function(t){return n(t)}),w(this._element).on($.TOUCHMOVE,function(t){return i(t)}),w(this._element).on($.TOUCHEND,function(t){return r(t)}))}},t._keydown=function f(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case I:t.preventDefault(),this.prev();break;case E:t.preventDefault(),this.next()}},t._getItemIndex=function p(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(z.ITEM)):[],this._items.indexOf(t)},t._getItemByDirection=function g(t,e){var n=t===R.NEXT,i=t===R.PREV,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var a=(r+(t===R.PREV?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},t._triggerSlideEvent=function m(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(z.ACTIVE_ITEM)),r=w.Event($.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return w(this._element).trigger(r),r},t._setActiveIndicatorElement=function v(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(z.ACTIVE));w(e).removeClass(F.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&w(n).addClass(F.ACTIVE)}},t._slide=function y(t,e){var n,i,r,o=this,a=this._element.querySelector(z.ACTIVE_ITEM),s=this._getItemIndex(a),l=e||a&&this._getItemByDirection(t,a),u=this._getItemIndex(l),c=Boolean(this._interval);if(t===R.NEXT?(n=F.LEFT,i=F.NEXT,r=R.LEFT):(n=F.RIGHT,i=F.PREV,r=R.RIGHT),l&&w(l).hasClass(F.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(l,r).isDefaultPrevented()&&a&&l){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(l);var d=w.Event($.SLID,{relatedTarget:l,direction:r,from:s,to:u});if(w(this._element).hasClass(F.SLIDE)){w(l).addClass(i),S.reflow(l),w(a).addClass(n),w(l).addClass(n);var h=parseInt(l.getAttribute("data-interval"),10);h?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=h):this._config.interval=this._config.defaultInterval||this._config.interval;var f=S.getTransitionDurationFromElement(a);w(a).one(S.TRANSITION_END,function(){w(l).removeClass(n+" "+i).addClass(F.ACTIVE),w(a).removeClass(F.ACTIVE+" "+i+" "+n),o._isSliding=!1,setTimeout(function(){return w(o._element).trigger(d)},0)}).emulateTransitionEnd(f)}else w(a).removeClass(F.ACTIVE),w(l).addClass(F.ACTIVE),this._isSliding=!1,w(this._element).trigger(d);c&&this.cycle()}},o._jQueryInterface=function x(i){return this.each(function(){var t=w(this).data(M),e=T({},P,w(this).data());"object"==typeof i&&(e=T({},e,i));var n="string"==typeof i?i:e.slide;if(t||(t=new o(this,e),w(this).data(M,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}else e.interval&&e.ride&&(t.pause(),t.cycle())})},o._dataApiClickHandler=function b(t){var e=S.getSelectorFromElement(this);if(e){var n=w(e)[0];if(n&&w(n).hasClass(F.CAROUSEL)){var i=T({},w(n).data(),w(this).data()),r=this.getAttribute("data-slide-to");r&&(i.interval=!1),o._jQueryInterface.call(w(n),i),r&&w(n).data(M).to(r),t.preventDefault()}}},C(o,null,[{key:"VERSION",get:function _(){return D}},{key:"Default",get:function _(){return P}}]),o}();return w(document).on($.CLICK_DATA_API,z.DATA_SLIDE,o._dataApiClickHandler),w(window).on($.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(z.DATA_RIDE)),e=0,n=t.length;e<n;e++){var i=w(t[e]);o._jQueryInterface.call(i,i.data())}}),w.fn[A]=o._jQueryInterface,w.fn[A].Constructor=o,w.fn[A].noConflict=function(){return w.fn[A]=e,o._jQueryInterface},o}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],e):(t=t||self).Collapse=e(t.jQuery,t.Util)}(this,function(p,g){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function m(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}p=p&&p.hasOwnProperty("default")?p["default"]:p,g=g&&g.hasOwnProperty("default")?g["default"]:g;var y="collapse",x="4.3.1",b="bs.collapse",t="."+b,e=".data-api",n=p.fn[y],_={toggle:!0,parent:""},w={toggle:"boolean",parent:"(string|element)"},S={SHOW:"show"+t,SHOWN:"shown"+t,HIDE:"hide"+t,HIDDEN:"hidden"+t,CLICK_DATA_API:"click"+t+e},C={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},T={WIDTH:"width",HEIGHT:"height"},A={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},o=function(){function l(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(A.DATA_TOGGLE)),i=0,r=n.length;i<r;i++){var o=n[i],a=g.getSelectorFromElement(o),s=[].slice.call(document.querySelectorAll(a)).filter(function(t){return t===e});null!==a&&0<s.length&&(this._selector=a,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=l.prototype;return t.toggle=function e(){p(this._element).hasClass(C.SHOW)?this.hide():this.show()},t.show=function u(){var t,e,n=this;if(!this._isTransitioning&&!p(this._element).hasClass(C.SHOW)&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(A.ACTIVES)).filter(function(t){return"string"==typeof n._config.parent?t.getAttribute("data-parent")===n._config.parent:t.classList.contains(C.COLLAPSE)})).length&&(t=null),!(t&&(e=p(t).not(this._selector).data(b))&&e._isTransitioning))){var i=p.Event(S.SHOW);if(p(this._element).trigger(i),!i.isDefaultPrevented()){t&&(l._jQueryInterface.call(p(t).not(this._selector),"hide"),e||p(t).data(b,null));var r=this._getDimension();p(this._element).removeClass(C.COLLAPSE).addClass(C.COLLAPSING),this._element.style[r]=0,this._triggerArray.length&&p(this._triggerArray).removeClass(C.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var o=function o(){p(n._element).removeClass(C.COLLAPSING).addClass(C.COLLAPSE).addClass(C.SHOW),n._element.style[r]="",n.setTransitioning(!1),p(n._element).trigger(S.SHOWN)},a="scroll"+(r[0].toUpperCase()+r.slice(1)),s=g.getTransitionDurationFromElement(this._element);p(this._element).one(g.TRANSITION_END,o).emulateTransitionEnd(s),this._element.style[r]=this._element[a]+"px"}}},t.hide=function c(){var t=this;if(!this._isTransitioning&&p(this._element).hasClass(C.SHOW)){var e=p.Event(S.HIDE);if(p(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",g.reflow(this._element),p(this._element).addClass(C.COLLAPSING).removeClass(C.COLLAPSE).removeClass(C.SHOW);var i=this._triggerArray.length;if(0<i)for(var r=0;r<i;r++){var o=this._triggerArray[r],a=g.getSelectorFromElement(o);if(null!==a)p([].slice.call(document.querySelectorAll(a))).hasClass(C.SHOW)||p(o).addClass(C.COLLAPSED).attr("aria-expanded",!1)}this.setTransitioning(!0);var s=function s(){t.setTransitioning(!1),p(t._element).removeClass(C.COLLAPSING).addClass(C.COLLAPSE).trigger(S.HIDDEN)};this._element.style[n]="";var l=g.getTransitionDurationFromElement(this._element);p(this._element).one(g.TRANSITION_END,s).emulateTransitionEnd(l)}}},t.setTransitioning=function n(t){this._isTransitioning=t},t.dispose=function i(){p.removeData(this._element,b),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function r(t){return(t=v({},_,t)).toggle=Boolean(t.toggle),g.typeCheckConfig(y,t,w),t},t._getDimension=function o(){return p(this._element).hasClass(T.WIDTH)?T.WIDTH:T.HEIGHT},t._getParent=function a(){var t,n=this;g.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(t.querySelectorAll(e));return p(i).each(function(t,e){n._addAriaAndCollapsedClass(l._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function s(t,e){var n=p(t).hasClass(C.SHOW);e.length&&p(e).toggleClass(C.COLLAPSED,!n).attr("aria-expanded",n)},l._getTargetFromElement=function d(t){var e=g.getSelectorFromElement(t);return e?document.querySelector(e):null},l._jQueryInterface=function h(i){return this.each(function(){var t=p(this),e=t.data(b),n=v({},_,t.data(),"object"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new l(this,n),t.data(b,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method named "'+i+'"');e[i]()}})},m(l,null,[{key:"VERSION",get:function f(){return x}},{key:"Default",get:function f(){return _}}]),l}();return p(document).on(S.CLICK_DATA_API,A.DATA_TOGGLE,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=p(this),e=g.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));p(i).each(function(){var t=p(this),e=t.data(b)?"toggle":n.data();o._jQueryInterface.call(t,e)})}),p.fn[y]=o._jQueryInterface,p.fn[y].Constructor=o,p.fn[y].noConflict=function(){return p.fn[y]=n,o._jQueryInterface},o}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("popper.js"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","popper.js","./util.js"],e):(t=t||self).Dropdown=e(t.jQuery,t.Popper,t.Util)}(this,function(x,b,_){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function w(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}x=x&&x.hasOwnProperty("default")?x["default"]:x,b=b&&b.hasOwnProperty("default")?b["default"]:b,_=_&&_.hasOwnProperty("default")?_["default"]:_;var C="dropdown",T="4.3.1",A="bs.dropdown",D="."+A,t=".data-api",e=x.fn[C],M=27,k=32,I=9,E=38,L=40,O=3,P=new RegExp(E+"|"+L+"|"+M),N={HIDE:"hide"+D,HIDDEN:"hidden"+D,SHOW:"show"+D,SHOWN:"shown"+D,CLICK:"click"+D,CLICK_DATA_API:"click"+D+t,KEYDOWN_DATA_API:"keydown"+D+t,KEYUP_DATA_API:"keyup"+D+t},R={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",DROPRIGHT:"dropright",DROPLEFT:"dropleft",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",POSITION_STATIC:"position-static"},$={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)"},F={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end",RIGHT:"right-start",RIGHTEND:"right-end",LEFT:"left-start",LEFTEND:"left-end"},z={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},j={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},n=function(){function u(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=u.prototype;return t.toggle=function o(){if(!this._element.disabled&&!x(this._element).hasClass(R.DISABLED)){var t=u._getParentFromElement(this._element),e=x(this._menu).hasClass(R.SHOW);if(u._clearMenus(),!e){var n={relatedTarget:this._element},i=x.Event(N.SHOW,n);if(x(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if(void 0===b)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var r=this._element;"parent"===this._config.reference?r=t:_.isElement(this._config.reference)&&(r=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(r=this._config.reference[0])),"scrollParent"!==this._config.boundary&&x(t).addClass(R.POSITION_STATIC),this._popper=new b(r,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===x(t).closest($.NAVBAR_NAV).length&&x(document.body).children().on("mouseover",null,x.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),x(this._menu).toggleClass(R.SHOW),x(t).toggleClass(R.SHOW).trigger(x.Event(N.SHOWN,n))}}}},t.show=function i(){if(!(this._element.disabled||x(this._element).hasClass(R.DISABLED)||x(this._menu).hasClass(R.SHOW))){var t={relatedTarget:this._element},e=x.Event(N.SHOW,t),n=u._getParentFromElement(this._element);x(n).trigger(e),e.isDefaultPrevented()||(x(this._menu).toggleClass(R.SHOW),x(n).toggleClass(R.SHOW).trigger(x.Event(N.SHOWN,t)))}},t.hide=function r(){if(!this._element.disabled&&!x(this._element).hasClass(R.DISABLED)&&x(this._menu).hasClass(R.SHOW)){var t={relatedTarget:this._element},e=x.Event(N.HIDE,t),n=u._getParentFromElement(this._element);x(n).trigger(e),e.isDefaultPrevented()||(x(this._menu).toggleClass(R.SHOW),x(n).toggleClass(R.SHOW).trigger(x.Event(N.HIDDEN,t)))}},t.dispose=function e(){x.removeData(this._element,A),x(this._element).off(D),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function n(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function a(){var e=this;x(this._element).on(N.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function s(t){return t=S({},this.constructor.Default,x(this._element).data(),t),_.typeCheckConfig(C,t,this.constructor.DefaultType),t},t._getMenuElement=function l(){if(!this._menu){var t=u._getParentFromElement(this._element);t&&(this._menu=t.querySelector($.MENU))}return this._menu},t._getPlacement=function c(){var t=x(this._element.parentNode),e=F.BOTTOM;return t.hasClass(R.DROPUP)?(e=F.TOP,x(this._menu).hasClass(R.MENURIGHT)&&(e=F.TOPEND)):t.hasClass(R.DROPRIGHT)?e=F.RIGHT:t.hasClass(R.DROPLEFT)?e=F.LEFT:x(this._menu).hasClass(R.MENURIGHT)&&(e=F.BOTTOMEND),e},t._detectNavbar=function d(){return 0<x(this._element).closest(".navbar").length},t._getOffset=function h(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=S({},t.offsets,e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},t._getPopperConfig=function f(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),t},u._jQueryInterface=function p(e){return this.each(function(){var t=x(this).data(A);if(t||(t=new u(this,"object"==typeof e?e:null),x(this).data(A,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},u._clearMenus=function g(t){if(!t||t.which!==O&&("keyup"!==t.type||t.which===I))for(var e=[].slice.call(document.querySelectorAll($.DATA_TOGGLE)),n=0,i=e.length;n<i;n++){var r=u._getParentFromElement(e[n]),o=x(e[n]).data(A),a={relatedTarget:e[n]};if(t&&"click"===t.type&&(a.clickEvent=t),o){var s=o._menu;if(x(r).hasClass(R.SHOW)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&t.which===I)&&x.contains(r,t.target))){var l=x.Event(N.HIDE,a);x(r).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&x(document.body).children().off("mouseover",null,x.noop),e[n].setAttribute("aria-expanded","false"),x(s).removeClass(R.SHOW),x(r).removeClass(R.SHOW).trigger(x.Event(N.HIDDEN,a)))}}}},u._getParentFromElement=function m(t){var e,n=_.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},u._dataApiKeydownHandler=function v(t){if((/input|textarea/i.test(t.target.tagName)?!(t.which===k||t.which!==M&&(t.which!==L&&t.which!==E||x(t.target).closest($.MENU).length)):P.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!x(this).hasClass(R.DISABLED))){var e=u._getParentFromElement(this),n=x(e).hasClass(R.SHOW);if(n&&(!n||t.which!==M&&t.which!==k)){var i=[].slice.call(e.querySelectorAll($.VISIBLE_ITEMS));if(0!==i.length){var r=i.indexOf(t.target);t.which===E&&0<r&&r--,t.which===L&&r<i.length-1&&r++,r<0&&(r=0),i[r].focus()}}else{if(t.which===M){var o=e.querySelector($.DATA_TOGGLE);x(o).trigger("focus")}x(this).trigger("click")}}},w(u,null,[{key:"VERSION",get:function y(){return T}},{key:"Default",get:function y(){return z}},{key:"DefaultType",get:function y(){return j}}]),u}();return x(document).on(N.KEYDOWN_DATA_API,$.DATA_TOGGLE,n._dataApiKeydownHandler).on(N.KEYDOWN_DATA_API,$.MENU,n._dataApiKeydownHandler).on(N.CLICK_DATA_API+" "+N.KEYUP_DATA_API,n._clearMenus).on(N.CLICK_DATA_API,$.DATA_TOGGLE,function(t){t.preventDefault(),t.stopPropagation(),n._jQueryInterface.call(x(this),"toggle")}).on(N.CLICK_DATA_API,$.FORM_CHILD,function(t){t.stopPropagation()}),x.fn[C]=n._jQueryInterface,x.fn[C].Constructor=n,x.fn[C].noConflict=function(){return x.fn[C]=e,n._jQueryInterface},n}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],e):(t=t||self).Modal=e(t.jQuery,t.Util)}(this,function(S,C){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function T(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}S=S&&S.hasOwnProperty("default")?S["default"]:S,C=C&&C.hasOwnProperty("default")?C["default"]:C;var D="modal",M="4.3.1",k="bs.modal",I="."+k,t=".data-api",e=S.fn[D],E=27,L={backdrop:!0,keyboard:!0,focus:!0,show:!0},O={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},P={HIDE:"hide"+I,HIDDEN:"hidden"+I,SHOW:"show"+I,SHOWN:"shown"+I,FOCUSIN:"focusin"+I,RESIZE:"resize"+I,CLICK_DISMISS:"click.dismiss"+I,KEYDOWN_DISMISS:"keydown.dismiss"+I,MOUSEUP_DISMISS:"mouseup.dismiss"+I,MOUSEDOWN_DISMISS:"mousedown.dismiss"+I,CLICK_DATA_API:"click"+I+t},N={SCROLLABLE:"modal-dialog-scrollable",SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},R={DIALOG:".modal-dialog",MODAL_BODY:".modal-body",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top"},a=function(){function r(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(R.DIALOG),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var t=r.prototype;return t.toggle=function e(t){return this._isShown?this.hide():this.show(t)},t.show=function i(t){var e=this;if(!this._isShown&&!this._isTransitioning){S(this._element).hasClass(N.FADE)&&(this._isTransitioning=!0);var n=S.Event(P.SHOW,{relatedTarget:t});S(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),S(this._element).on(P.CLICK_DISMISS,R.DATA_DISMISS,function(t){return e.hide(t)}),S(this._dialog).on(P.MOUSEDOWN_DISMISS,function(){S(e._element).one(P.MOUSEUP_DISMISS,function(t){S(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function o(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=S.Event(P.HIDE);if(S(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=S(this._element).hasClass(N.FADE);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),S(document).off(P.FOCUSIN),S(this._element).removeClass(N.SHOW),S(this._element).off(P.CLICK_DISMISS),S(this._dialog).off(P.MOUSEDOWN_DISMISS),i){var r=C.getTransitionDurationFromElement(this._element);S(this._element).one(C.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(r)}else this._hideModal()}}},t.dispose=function n(){[window,this._element,this._dialog].forEach(function(t){return S(t).off(I)}),S(document).off(P.FOCUSIN),S.removeData(this._element,k),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},t.handleUpdate=function a(){this._adjustDialog()},t._getConfig=function s(t){return t=A({},L,t),C.typeCheckConfig(D,t,O),t},t._showElement=function l(t){var e=this,n=S(this._element).hasClass(N.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),S(this._dialog).hasClass(N.SCROLLABLE)?this._dialog.querySelector(R.MODAL_BODY).scrollTop=0:this._element.scrollTop=0,n&&C.reflow(this._element),S(this._element).addClass(N.SHOW),this._config.focus&&this._enforceFocus();var i=S.Event(P.SHOWN,{relatedTarget:t}),r=function r(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,S(e._element).trigger(i)};if(n){var o=C.getTransitionDurationFromElement(this._dialog);S(this._dialog).one(C.TRANSITION_END,r).emulateTransitionEnd(o)}else r()},t._enforceFocus=function u(){var e=this;S(document).off(P.FOCUSIN).on(P.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===S(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function c(){var e=this;this._isShown&&this._config.keyboard?S(this._element).on(P.KEYDOWN_DISMISS,function(t){t.which===E&&(t.preventDefault(),e.hide())}):this._isShown||S(this._element).off(P.KEYDOWN_DISMISS)},t._setResizeEvent=function d(){var e=this;this._isShown?S(window).on(P.RESIZE,function(t){return e.handleUpdate(t)}):S(window).off(P.RESIZE)},t._hideModal=function h(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop(function(){S(document.body).removeClass(N.OPEN),t._resetAdjustments(),t._resetScrollbar(),S(t._element).trigger(P.HIDDEN)})},t._removeBackdrop=function f(){this._backdrop&&(S(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function p(t){var e=this,n=S(this._element).hasClass(N.FADE)?N.FADE:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=N.BACKDROP,n&&this._backdrop.classList.add(n),S(this._backdrop).appendTo(document.body),S(this._element).on(P.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),n&&C.reflow(this._backdrop),S(this._backdrop).addClass(N.SHOW),!t)return;if(!n)return void t();var i=C.getTransitionDurationFromElement(this._backdrop);S(this._backdrop).one(C.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){S(this._backdrop).removeClass(N.SHOW);var r=function r(){e._removeBackdrop(),t&&t()};if(S(this._element).hasClass(N.FADE)){var o=C.getTransitionDurationFromElement(this._backdrop);S(this._backdrop).one(C.TRANSITION_END,r).emulateTransitionEnd(o)}else r()}else t&&t()},t._adjustDialog=function g(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function m(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function v(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function y(){var r=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(R.FIXED_CONTENT)),e=[].slice.call(document.querySelectorAll(R.STICKY_CONTENT));S(t).each(function(t,e){var n=e.style.paddingRight,i=S(e).css("padding-right");S(e).data("padding-right",n).css("padding-right",parseFloat(i)+r._scrollbarWidth+"px")}),S(e).each(function(t,e){var n=e.style.marginRight,i=S(e).css("margin-right");S(e).data("margin-right",n).css("margin-right",parseFloat(i)-r._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=S(document.body).css("padding-right");S(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}S(document.body).addClass(N.OPEN)},t._resetScrollbar=function x(){var t=[].slice.call(document.querySelectorAll(R.FIXED_CONTENT));S(t).each(function(t,e){var n=S(e).data("padding-right");S(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(""+R.STICKY_CONTENT));S(e).each(function(t,e){var n=S(e).data("margin-right");void 0!==n&&S(e).css("margin-right",n).removeData("margin-right")});var n=S(document.body).data("padding-right");S(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function b(){var t=document.createElement("div");t.className=N.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},r._jQueryInterface=function _(n,i){return this.each(function(){var t=S(this).data(k),e=A({},L,S(this).data(),"object"==typeof n&&n?n:{});if(t||(t=new r(this,e),S(this).data(k,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n](i)}else e.show&&t.show(i)})},T(r,null,[{key:"VERSION",get:function w(){return M}},{key:"Default",get:function w(){return L}}]),r}();return S(document).on(P.CLICK_DATA_API,R.DATA_TOGGLE,function(t){var e,n=this,i=C.getSelectorFromElement(this);i&&(e=document.querySelector(i));var r=S(e).data(k)?"toggle":A({},S(e).data(),S(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var o=S(e).one(P.SHOW,function(t){t.isDefaultPrevented()||o.one(P.HIDDEN,function(){S(n).is(":visible")&&n.focus()})});a._jQueryInterface.call(S(e),r,this)}),S.fn[D]=a._jQueryInterface,S.fn[D].Constructor=a,S.fn[D].noConflict=function(){return S.fn[D]=e,a._jQueryInterface},a}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("popper.js"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","popper.js","./util.js"],e):(t=t||self).Tooltip=e(t.jQuery,t.Popper,t.Util)}(this,function(E,L,O){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function P(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function u(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===a.indexOf(n)||Boolean(t.nodeValue.match(s)||t.nodeValue.match(l));for(var i=e.filter(function(t){return t instanceof RegExp}),r=0,o=i.length;r<o;r++)if(n.match(i[r]))return!0;return!1}function R(t,o,e){if(0===t.length)return t;if(e&&"function"==typeof e)return e(t);for(var n=(new window.DOMParser).parseFromString(t,"text/html"),a=Object.keys(o),s=[].slice.call(n.body.querySelectorAll("*")),l=function l(t){var e=s[t],n=e.nodeName.toLowerCase();if(-1===a.indexOf(e.nodeName.toLowerCase()))return e.parentNode.removeChild(e),"continue";var i=[].slice.call(e.attributes),r=[].concat(o["*"]||[],o[n]||[]);i.forEach(function(t){u(t,r)||e.removeAttribute(t.nodeName)})},i=0,r=s.length;i<r;i++)l(i,r);return n.body.innerHTML}E=E&&E.hasOwnProperty("default")?E["default"]:E,L=L&&L.hasOwnProperty("default")?L["default"]:L,O=O&&O.hasOwnProperty("default")?O["default"]:O;var a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},s=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,$="tooltip",F="4.3.1",z="bs.tooltip",j="."+z,e=E.fn[$],H="bs-tooltip",B=new RegExp("(^|\\s)"+H+"\\S+","g"),V=["sanitize","whiteList","sanitizeFn"],W={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},U={AUTO:"auto",
|
|
TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},q={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:t},G={SHOW:"show",OUT:"out"},Y={HIDE:"hide"+j,HIDDEN:"hidden"+j,SHOW:"show"+j,SHOWN:"shown"+j,INSERTED:"inserted"+j,CLICK:"click"+j,FOCUSIN:"focusin"+j,FOCUSOUT:"focusout"+j,MOUSEENTER:"mouseenter"+j,MOUSELEAVE:"mouseleave"+j},Z={FADE:"fade",SHOW:"show"},X={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},K={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},n=function(){function i(t,e){if(void 0===L)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function e(){this._isEnabled=!0},t.disable=function n(){this._isEnabled=!1},t.toggleEnabled=function r(){this._isEnabled=!this._isEnabled},t.toggle=function o(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=E(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),E(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(E(this.getTipElement()).hasClass(Z.SHOW))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function a(){clearTimeout(this._timeout),E.removeData(this.element,this.constructor.DATA_KEY),E(this.element).off(this.constructor.EVENT_KEY),E(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&E(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function f(){var e=this;if("none"===E(this.element).css("display"))throw new Error("Please use show on visible elements");var t=E.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){E(this.element).trigger(t);var n=O.findShadowRoot(this.element),i=E.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var r=this.getTipElement(),o=O.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&E(r).addClass(Z.FADE);var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,s=this._getAttachment(a);this.addAttachmentClass(s);var l=this._getContainer();E(r).data(this.constructor.DATA_KEY,this),E.contains(this.element.ownerDocument.documentElement,this.tip)||E(r).appendTo(l),E(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new L(this.element,r,{placement:s,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:X.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function d(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function h(t){return e._handlePopperPlacementChange(t)}}),E(r).addClass(Z.SHOW),"ontouchstart"in document.documentElement&&E(document.body).children().on("mouseover",null,E.noop);var u=function u(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,E(e.element).trigger(e.constructor.Event.SHOWN),t===G.OUT&&e._leave(null,e)};if(E(this.tip).hasClass(Z.FADE)){var c=O.getTransitionDurationFromElement(this.tip);E(this.tip).one(O.TRANSITION_END,u).emulateTransitionEnd(c)}else u()}},t.hide=function s(t){var e=this,n=this.getTipElement(),i=E.Event(this.constructor.Event.HIDE),r=function r(){e._hoverState!==G.SHOW&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),E(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(E(this.element).trigger(i),!i.isDefaultPrevented()){if(E(n).removeClass(Z.SHOW),"ontouchstart"in document.documentElement&&E(document.body).children().off("mouseover",null,E.noop),this._activeTrigger[K.CLICK]=!1,this._activeTrigger[K.FOCUS]=!1,this._activeTrigger[K.HOVER]=!1,E(this.tip).hasClass(Z.FADE)){var o=O.getTransitionDurationFromElement(n);E(n).one(O.TRANSITION_END,r).emulateTransitionEnd(o)}else r();this._hoverState=""}},t.update=function l(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function u(){return Boolean(this.getTitle())},t.addAttachmentClass=function c(t){E(this.getTipElement()).addClass(H+"-"+t)},t.getTipElement=function d(){return this.tip=this.tip||E(this.config.template)[0],this.tip},t.setContent=function h(){var t=this.getTipElement();this.setElementContent(E(t.querySelectorAll(X.TOOLTIP_INNER)),this.getTitle()),E(t).removeClass(Z.FADE+" "+Z.SHOW)},t.setElementContent=function p(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=R(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?E(e).parent().is(t)||t.empty().append(e):t.text(E(e).text())},t.getTitle=function g(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function m(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=N({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function v(){return!1===this.config.container?document.body:O.isElement(this.config.container)?E(this.config.container):E(document).find(this.config.container)},t._getAttachment=function y(t){return U[t.toUpperCase()]},t._setListeners=function x(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)E(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==K.MANUAL){var e=t===K.HOVER?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===K.HOVER?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;E(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),E(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=N({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function b(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function _(t,e){var n=this.constructor.DATA_KEY;(e=e||E(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),E(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?K.FOCUS:K.HOVER]=!0),E(e.getTipElement()).hasClass(Z.SHOW)||e._hoverState===G.SHOW?e._hoverState=G.SHOW:(clearTimeout(e._timeout),e._hoverState=G.SHOW,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===G.SHOW&&e.show()},e.config.delay.show):e.show())},t._leave=function w(t,e){var n=this.constructor.DATA_KEY;(e=e||E(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),E(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?K.FOCUS:K.HOVER]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=G.OUT,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===G.OUT&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function S(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function C(t){var e=E(this.element).data();return Object.keys(e).forEach(function(t){-1!==V.indexOf(t)&&delete e[t]}),"number"==typeof(t=N({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),O.typeCheckConfig($,t,this.constructor.DefaultType),t.sanitize&&(t.template=R(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function T(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function A(){var t=E(this.getTipElement()),e=t.attr("class").match(B);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function D(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function M(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(E(t).removeClass(Z.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function k(n){return this.each(function(){var t=E(this).data(z),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),E(this).data(z,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},P(i,null,[{key:"VERSION",get:function I(){return F}},{key:"Default",get:function I(){return q}},{key:"NAME",get:function I(){return $}},{key:"DATA_KEY",get:function I(){return z}},{key:"Event",get:function I(){return Y}},{key:"EVENT_KEY",get:function I(){return j}},{key:"DefaultType",get:function I(){return W}}]),i}();return E.fn[$]=n._jQueryInterface,E.fn[$].Constructor=n,E.fn[$].noConflict=function(){return E.fn[$]=e,n._jQueryInterface},n}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./tooltip.js")):"function"==typeof define&&define.amd?define(["jquery","./tooltip.js"],e):(t=t||self).Popover=e(t.jQuery,t.Tooltip)}(this,function(d,t){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function h(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function f(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}d=d&&d.hasOwnProperty("default")?d["default"]:d,t=t&&t.hasOwnProperty("default")?t["default"]:t;var p="popover",g="4.3.1",m="bs.popover",v="."+m,n=d.fn[p],y="bs-popover",x=new RegExp("(^|\\s)"+y+"\\S+","g"),b=e({},t.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),_=e({},t.DefaultType,{content:"(string|element|function)"}),w={FADE:"fade",SHOW:"show"},S={TITLE:".popover-header",CONTENT:".popover-body"},C={HIDE:"hide"+v,HIDDEN:"hidden"+v,SHOW:"show"+v,SHOWN:"shown"+v,INSERTED:"inserted"+v,CLICK:"click"+v,FOCUSIN:"focusin"+v,FOCUSOUT:"focusout"+v,MOUSEENTER:"mouseenter"+v,MOUSELEAVE:"mouseleave"+v},o=function(t){function i(){return t.apply(this,arguments)||this}f(i,t);var e=i.prototype;return e.isWithContent=function n(){return this.getTitle()||this._getContent()},e.addAttachmentClass=function r(t){d(this.getTipElement()).addClass(y+"-"+t)},e.getTipElement=function o(){return this.tip=this.tip||d(this.config.template)[0],this.tip},e.setContent=function a(){var t=d(this.getTipElement());this.setElementContent(t.find(S.TITLE),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(S.CONTENT),e),t.removeClass(w.FADE+" "+w.SHOW)},e._getContent=function s(){return this.element.getAttribute("data-content")||this.config.content},e._cleanTipClass=function l(){var t=d(this.getTipElement()),e=t.attr("class").match(x);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function u(n){return this.each(function(){var t=d(this).data(m),e="object"==typeof n?n:null;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),d(this).data(m,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},h(i,null,[{key:"VERSION",get:function c(){return g}},{key:"Default",get:function c(){return b}},{key:"NAME",get:function c(){return p}},{key:"DATA_KEY",get:function c(){return m}},{key:"Event",get:function c(){return C}},{key:"EVENT_KEY",get:function c(){return v}},{key:"DefaultType",get:function c(){return _}}]),i}(t);return d.fn[p]=o._jQueryInterface,d.fn[p].Constructor=o,d.fn[p].noConflict=function(){return d.fn[p]=n,o._jQueryInterface},o}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],e):(t=t||self).ScrollSpy=e(t.jQuery,t.Util)}(this,function(f,p){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function g(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}f=f&&f.hasOwnProperty("default")?f["default"]:f,p=p&&p.hasOwnProperty("default")?p["default"]:p;var v="scrollspy",y="4.3.1",x="bs.scrollspy",b="."+x,t=".data-api",e=f.fn[v],_={offset:10,method:"auto",target:""},w={offset:"number",method:"string",target:"(string|element)"},S={ACTIVATE:"activate"+b,SCROLL:"scroll"+b,LOAD_DATA_API:"load"+b+t},C={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},T={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},A={OFFSET:"offset",POSITION:"position"},o=function(){function n(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+T.NAV_LINKS+","+this._config.target+" "+T.LIST_ITEMS+","+this._config.target+" "+T.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,f(this._scrollElement).on(S.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function i(){var e=this,t=this._scrollElement===this._scrollElement.window?A.OFFSET:A.POSITION,r="auto"===this._config.method?t:this._config.method,o=r===A.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=p.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[f(e)[r]().top+o,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function e(){f.removeData(this._element,x),f(this._scrollElement).off(b),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function r(t){if("string"!=typeof(t=m({},_,"object"==typeof t&&t?t:{})).target){var e=f(t.target).attr("id");e||(e=p.getUID(v),f(t.target).attr("id",e)),t.target="#"+e}return p.typeCheckConfig(v,t,w),t},t._getScrollTop=function o(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function a(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function s(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function l(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}},t._activate=function u(e){this._activeTarget=e,this._clear();var t=this._selector.split(",").map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'}),n=f([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(C.DROPDOWN_ITEM)?(n.closest(T.DROPDOWN).find(T.DROPDOWN_TOGGLE).addClass(C.ACTIVE),n.addClass(C.ACTIVE)):(n.addClass(C.ACTIVE),n.parents(T.NAV_LIST_GROUP).prev(T.NAV_LINKS+", "+T.LIST_ITEMS).addClass(C.ACTIVE),n.parents(T.NAV_LIST_GROUP).prev(T.NAV_ITEMS).children(T.NAV_LINKS).addClass(C.ACTIVE)),f(this._scrollElement).trigger(S.ACTIVATE,{relatedTarget:e})},t._clear=function c(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains(C.ACTIVE)}).forEach(function(t){return t.classList.remove(C.ACTIVE)})},n._jQueryInterface=function d(e){return this.each(function(){var t=f(this).data(x);if(t||(t=new n(this,"object"==typeof e&&e),f(this).data(x,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},g(n,null,[{key:"VERSION",get:function h(){return y}},{key:"Default",get:function h(){return _}}]),n}();return f(window).on(S.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(T.DATA_SPY)),e=t.length;e--;){var n=f(t[e]);o._jQueryInterface.call(n,n.data())}}),f.fn[v]=o._jQueryInterface,f.fn[v].Constructor=o,f.fn[v].noConflict=function(){return f.fn[v]=e,o._jQueryInterface},o}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],e):(t=t||self).Tab=e(t.jQuery,t.Util)}(this,function(c,d){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}c=c&&c.hasOwnProperty("default")?c["default"]:c,d=d&&d.hasOwnProperty("default")?d["default"]:d;var t="tab",s="4.3.1",h="bs.tab",e="."+h,n=".data-api",r=c.fn[t],f={HIDE:"hide"+e,HIDDEN:"hidden"+e,SHOW:"show"+e,SHOWN:"shown"+e,CLICK_DATA_API:"click"+e+n},p={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},g={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},a=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function u(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&c(this._element).hasClass(p.ACTIVE)||c(this._element).hasClass(p.DISABLED))){var t,i,e=c(this._element).closest(g.NAV_LIST_GROUP)[0],r=d.getSelectorFromElement(this._element);if(e){var o="UL"===e.nodeName||"OL"===e.nodeName?g.ACTIVE_UL:g.ACTIVE;i=(i=c.makeArray(c(e).find(o)))[i.length-1]}var a=c.Event(f.HIDE,{relatedTarget:this._element}),s=c.Event(f.SHOW,{relatedTarget:i});if(i&&c(i).trigger(a),c(this._element).trigger(s),!s.isDefaultPrevented()&&!a.isDefaultPrevented()){r&&(t=document.querySelector(r)),this._activate(this._element,e);var l=function l(){var t=c.Event(f.HIDDEN,{relatedTarget:n._element}),e=c.Event(f.SHOWN,{relatedTarget:i});c(i).trigger(t),c(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function e(){c.removeData(this._element,h),this._element=null},t._activate=function l(t,e,n){var i=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?c(e).children(g.ACTIVE):c(e).find(g.ACTIVE_UL))[0],o=n&&r&&c(r).hasClass(p.FADE),a=function a(){return i._transitionComplete(t,r,n)};if(r&&o){var s=d.getTransitionDurationFromElement(r);c(r).removeClass(p.SHOW).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a()},t._transitionComplete=function a(t,e,n){if(e){c(e).removeClass(p.ACTIVE);var i=c(e.parentNode).find(g.DROPDOWN_ACTIVE_CHILD)[0];i&&c(i).removeClass(p.ACTIVE),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(c(t).addClass(p.ACTIVE),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),d.reflow(t),t.classList.contains(p.FADE)&&t.classList.add(p.SHOW),t.parentNode&&c(t.parentNode).hasClass(p.DROPDOWN_MENU)){var r=c(t).closest(g.DROPDOWN)[0];if(r){var o=[].slice.call(r.querySelectorAll(g.DROPDOWN_TOGGLE));c(o).addClass(p.ACTIVE)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function r(n){return this.each(function(){var t=c(this),e=t.data(h);if(e||(e=new i(this),t.data(h,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},o(i,null,[{key:"VERSION",get:function n(){return s}}]),i}();return c(document).on(f.CLICK_DATA_API,g.DATA_TOGGLE,function(t){t.preventDefault(),a._jQueryInterface.call(c(this),"show")}),c.fn[t]=a._jQueryInterface,c.fn[t].Constructor=a,c.fn[t].noConflict=function(){return c.fn[t]=r,a._jQueryInterface},a}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],e):(t=t||self).Toast=e(t.jQuery,t.Util)}(this,function(c,d){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function h(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}c=c&&c.hasOwnProperty("default")?c["default"]:c,d=d&&d.hasOwnProperty("default")?d["default"]:d;var p="toast",g="4.3.1",m="bs.toast",t="."+m,e=c.fn[p],v={CLICK_DISMISS:"click.dismiss"+t,HIDE:"hide"+t,HIDDEN:"hidden"+t,SHOW:"show"+t,SHOWN:"shown"+t},y={FADE:"fade",HIDE:"hide",SHOW:"show",SHOWING:"showing"},x={animation:"boolean",autohide:"boolean",delay:"number"},b={animation:!0,autohide:!0,delay:500},_={DATA_DISMISS:'[data-dismiss="toast"]'},n=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function r(){var t=this;c(this._element).trigger(v.SHOW),this._config.animation&&this._element.classList.add(y.FADE);var e=function e(){t._element.classList.remove(y.SHOWING),t._element.classList.add(y.SHOW),c(t._element).trigger(v.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove(y.HIDE),this._element.classList.add(y.SHOWING),this._config.animation){var n=d.getTransitionDurationFromElement(this._element);c(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},t.hide=function n(t){var e=this;this._element.classList.contains(y.SHOW)&&(c(this._element).trigger(v.HIDE),t?this._close():this._timeout=setTimeout(function(){e._close()},this._config.delay))},t.dispose=function e(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(y.SHOW)&&this._element.classList.remove(y.SHOW),c(this._element).off(v.CLICK_DISMISS),c.removeData(this._element,m),this._element=null,this._config=null},t._getConfig=function o(t){return t=f({},b,c(this._element).data(),"object"==typeof t&&t?t:{}),d.typeCheckConfig(p,t,this.constructor.DefaultType),t},t._setListeners=function a(){var t=this;c(this._element).on(v.CLICK_DISMISS,_.DATA_DISMISS,function(){return t.hide(!0)})},t._close=function s(){var t=this,e=function e(){t._element.classList.add(y.HIDE),c(t._element).trigger(v.HIDDEN)};if(this._element.classList.remove(y.SHOW),this._config.animation){var n=d.getTransitionDurationFromElement(this._element);c(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},i._jQueryInterface=function l(n){return this.each(function(){var t=c(this),e=t.data(m);if(e||(e=new i(this,"object"==typeof n&&n),t.data(m,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n](this)}})},h(i,null,[{key:"VERSION",get:function u(){return g}},{key:"DefaultType",get:function u(){return x}},{key:"Default",get:function u(){return b}}]),i}();return c.fn[p]=n._jQueryInterface,c.fn[p].Constructor=n,c.fn[p].noConflict=function(){return c.fn[p]=e,n._jQueryInterface},n}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(d){var n;d.extend(d.fn,{validate:function(t){if(this.length){var i=d.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new d.validator(t,this[0]),d.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(t){i.submitButton=t.currentTarget,d(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==d(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(n){function t(){var t,e;return i.submitButton&&(i.settings.submitHandler||i.formSubmitted)&&(t=d("<input type='hidden'/>").attr("name",i.submitButton.name).val(d(i.submitButton).val()).appendTo(i.currentForm)),!(i.settings.submitHandler&&!i.settings.debug)||(e=i.settings.submitHandler.call(i,i.currentForm,n),t&&t.remove(),void 0!==e&&e)}return i.settings.debug&&n.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,t()):i.form()?i.pendingRequest?!(i.formSubmitted=!0):t():(i.focusInvalid(),!1)})),i)}t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var t,e,n;return d(this[0]).is("form")?t=this.validate().form():(n=[],t=!0,e=d(this[0].form).validate(),this.each(function(){(t=e.element(this)&&t)||(n=n.concat(e.errorList))}),e.errorList=n),t},rules:function(t,e){var n,i,r,o,a,s,l=this[0],u=void 0!==this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=l&&(!l.form&&u&&(l.form=this.closest("form")[0],l.name=this.attr("name")),null!=l.form)){if(t)switch(n=d.data(l.form,"validator").settings,i=n.rules,r=d.validator.staticRules(l),t){case"add":d.extend(r,d.validator.normalizeRule(e)),delete r.messages,i[l.name]=r,e.messages&&(n.messages[l.name]=d.extend(n.messages[l.name],e.messages));break;case"remove":return e?(s={},d.each(e.split(/\s/),function(t,e){s[e]=r[e],delete r[e]}),s):(delete i[l.name],r)}return(o=d.validator.normalizeRules(d.extend({},d.validator.classRules(l),d.validator.attributeRules(l),d.validator.dataRules(l),d.validator.staticRules(l)),l)).required&&(a=o.required,delete o.required,o=d.extend({required:a},o)),o.remote&&(a=o.remote,delete o.remote,o=d.extend(o,{remote:a})),o}}}),d.extend(d.expr.pseudos||d.expr[":"],{blank:function(t){return!d.trim(""+d(t).val())},filled:function(t){var e=d(t).val();return null!==e&&!!d.trim(""+e)},unchecked:function(t){return!d(t).prop("checked")}}),d.validator=function(t,e){this.settings=d.extend(!0,{},d.validator.defaults,t),this.currentForm=e,this.init()},d.validator.format=function(n,t){return 1===arguments.length?function(){var t=d.makeArray(arguments);return t.unshift(n),d.validator.format.apply(this,t)}:(void 0===t||(2<arguments.length&&t.constructor!==Array&&(t=d.makeArray(arguments).slice(1)),t.constructor!==Array&&(t=[t]),d.each(t,function(t,e){n=n.replace(new RegExp("\\{"+t+"\\}","g"),function(){return e})})),n)},d.extend(d.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:d([]),errorLabelContainer:d([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){var n=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===e.which&&""===this.elementValue(t)||-1!==d.inArray(e.keyCode,n)||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(t,e,n){"radio"===t.type?this.findByName(t.name).addClass(e).removeClass(n):d(t).addClass(e).removeClass(n)},unhighlight:function(t,e,n){"radio"===t.type?this.findByName(t.name).removeClass(e).addClass(n):d(t).removeClass(e).addClass(n)}},setDefaults:function(t){d.extend(d.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:d.validator.format("Please enter no more than {0} characters."),minlength:d.validator.format("Please enter at least {0} characters."),rangelength:d.validator.format("Please enter a value between {0} and {1} characters long."),range:d.validator.format("Please enter a value between {0} and {1}."),max:d.validator.format("Please enter a value less than or equal to {0}."),min:d.validator.format("Please enter a value greater than or equal to {0}."),step:d.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function t(t){var e=void 0!==d(this).attr("contenteditable")&&"false"!==d(this).attr("contenteditable");if(!this.form&&e&&(this.form=d(this).closest("form")[0],this.name=d(this).attr("name")),o===this.form){var n=d.data(this.form,"validator"),i="on"+t.type.replace(/^validate/,""),r=n.settings;r[i]&&!d(this).is(r.ignore)&&r[i].call(n,this,t)}}this.labelContainer=d(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||d(this.currentForm),this.containers=d(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var n,o=this.currentForm,i=this.groups={};d.each(this.settings.groups,function(n,t){"string"==typeof t&&(t=t.split(/\s/)),d.each(t,function(t,e){i[e]=n})}),n=this.settings.rules,d.each(n,function(t,e){n[t]=d.validator.normalizeRule(e)}),d(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",t).on("click.validate",
|
|
"select, option, [type='radio'], [type='checkbox']",t),this.settings.invalidHandler&&d(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),d.extend(this.submitted,this.errorMap),this.invalid=d.extend({},this.errorMap),this.valid()||d(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(t){var e,n,i=this.clean(t),r=this.validationTargetFor(i),o=this,a=!0;return void 0===r?delete this.invalid[i.name]:(this.prepareElement(r),this.currentElements=d(r),(n=this.groups[r.name])&&d.each(this.groups,function(t,e){e===n&&t!==r.name&&((i=o.validationTargetFor(o.clean(o.findByName(t))))&&i.name in o.invalid&&(o.currentElements.push(i),a=o.check(i)&&a))}),e=!1!==this.check(r),a=a&&e,this.invalid[r.name]=!e,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),d(t).attr("aria-invalid",!e)),a},showErrors:function(e){if(e){var n=this;d.extend(this.errorMap,e),this.errorList=d.map(this.errorMap,function(t,e){return{message:t,element:n.findByName(e)[0]}}),this.successList=d.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){d.fn.resetForm&&d(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,n=0;for(e in t)void 0!==t[e]&&null!==t[e]&&!1!==t[e]&&n++;return n},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{d(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(i){}},findLastActive:function(){var e=this.lastActive;return e&&1===d.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var n=this,i={};return d(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var t=this.name||d(this).attr("name"),e=void 0!==d(this).attr("contenteditable")&&"false"!==d(this).attr("contenteditable");return!t&&n.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=d(this).closest("form")[0],this.name=t),!(this.form!==n.currentForm||t in i||!n.objectLength(d(this).rules())||(i[t]=!0,0))})},clean:function(t){return d(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return d(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=d([]),this.toHide=d([])},reset:function(){this.resetInternals(),this.currentElements=d([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(t){var e,n,i=d(t),r=t.type,o=void 0!==i.attr("contenteditable")&&"false"!==i.attr("contenteditable");return"radio"===r||"checkbox"===r?this.findByName(t.name).filter(":checked").val():"number"===r&&"undefined"!=typeof t.validity?t.validity.badInput?"NaN":i.val():(e=o?i.text():i.val(),"file"===r?"C:\\fakepath\\"===e.substr(0,12)?e.substr(12):0<=(n=e.lastIndexOf("/"))?e.substr(n+1):0<=(n=e.lastIndexOf("\\"))?e.substr(n+1):e:"string"==typeof e?e.replace(/\r/g,""):e)},check:function(t){t=this.validationTargetFor(this.clean(t));var e,n,i,r,o=d(t).rules(),a=d.map(o,function(t,e){return e}).length,s=!1,l=this.elementValue(t);for(n in"function"==typeof o.normalizer?r=o.normalizer:"function"==typeof this.settings.normalizer&&(r=this.settings.normalizer),r&&(l=r.call(t,l),delete o.normalizer),o){i={method:n,parameters:o[n]};try{if("dependency-mismatch"===(e=d.validator.methods[n].call(this,l,t,i.parameters))&&1===a){s=!0;continue}if(s=!1,"pending"===e)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!e)return this.formatAndAdd(t,i),!1}catch(u){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+i.method+"' method.",u),u instanceof TypeError&&(u.message+=". Exception occurred when checking element "+t.id+", check the '"+i.method+"' method."),u}}if(!s)return this.objectLength(o)&&this.successList.push(t),!0},customDataMessage:function(t,e){return d(t).data("msg"+e.charAt(0).toUpperCase()+e.substring(1).toLowerCase())||d(t).data("msg")},customMessage:function(t,e){var n=this.settings.messages[t];return n&&(n.constructor===String?n:n[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(t,e){"string"==typeof e&&(e={method:e});var n=this.findDefined(this.customMessage(t.name,e.method),this.customDataMessage(t,e.method),!this.settings.ignoreTitle&&t.title||void 0,d.validator.messages[e.method],"<strong>Warning: No message defined for "+t.name+"</strong>"),i=/\$?\{(\d+)\}/g;return"function"==typeof n?n=n.call(this,e.parameters,t):i.test(n)&&(n=d.validator.format(n.replace(i,"{$1}"),e.parameters)),n},formatAndAdd:function(t,e){var n=this.defaultMessage(t,e);this.errorList.push({message:n,element:t,method:e.method}),this.errorMap[t.name]=n,this.submitted[t.name]=n},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,n;for(t=0;this.errorList[t];t++)n=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return d(this.errorList).map(function(){return this.element})},showLabel:function(t,e){var n,i,r,o,a=this.errorsFor(t),s=this.idOrName(t),l=d(t).attr("aria-describedby");a.length?(a.removeClass(this.settings.validClass).addClass(this.settings.errorClass),a.html(e)):(n=a=d("<"+this.settings.errorElement+">").attr("id",s+"-error").addClass(this.settings.errorClass).html(e||""),this.settings.wrapper&&(n=a.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(n):this.settings.errorPlacement?this.settings.errorPlacement.call(this,n,d(t)):n.insertAfter(t),a.is("label")?a.attr("for",s):0===a.parents("label[for='"+this.escapeCssMeta(s)+"']").length&&(r=a.attr("id"),l?l.match(new RegExp("\\b"+this.escapeCssMeta(r)+"\\b"))||(l+=" "+r):l=r,d(t).attr("aria-describedby",l),(i=this.groups[t.name])&&(o=this,d.each(o.groups,function(t,e){e===i&&d("[name='"+o.escapeCssMeta(t)+"']",o.currentForm).attr("aria-describedby",a.attr("id"))})))),!e&&this.settings.success&&(a.text(""),"string"==typeof this.settings.success?a.addClass(this.settings.success):this.settings.success(a,t)),this.toShow=this.toShow.add(a)},errorsFor:function(t){var e=this.escapeCssMeta(this.idOrName(t)),n=d(t).attr("aria-describedby"),i="label[for='"+e+"'], label[for='"+e+"'] *";return n&&(i=i+", #"+this.escapeCssMeta(n).replace(/\s+/g,", #")),this.errors().filter(i)},escapeCssMeta:function(t){return t.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name)),d(t).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(t){return d(this.currentForm).find("[name='"+this.escapeCssMeta(t)+"']")},getLength:function(t,e){switch(e.nodeName.toLowerCase()){case"select":return d("option:selected",e).length;case"input":if(this.checkable(e))return this.findByName(e.name).filter(":checked").length}return t.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{"boolean":function(t){return t},string:function(t,e){return!!d(t,e.form).length},"function":function(t,e){return t(e)}},optional:function(t){var e=this.elementValue(t);return!d.validator.methods.required.call(this,e,t)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,d(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,e){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],d(t).removeClass(this.settings.pendingClass),e&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(d(this.currentForm).submit(),this.submitButton&&d("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!e&&0===this.pendingRequest&&this.formSubmitted&&(d(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t,e){return e="string"==typeof e&&e||"remote",d.data(t,"previousValue")||d.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:e})})},destroy:function(){this.resetForm(),d(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,e){t.constructor===String?this.classRuleSettings[t]=e:d.extend(this.classRuleSettings,t)},classRules:function(t){var e={},n=d(t).attr("class");return n&&d.each(n.split(" "),function(){this in d.validator.classRuleSettings&&d.extend(e,d.validator.classRuleSettings[this])}),e},normalizeAttributeRule:function(t,e,n,i){/min|max|step/.test(n)&&(null===e||/number|range|text/.test(e))&&(i=Number(i),isNaN(i)&&(i=void 0)),i||0===i?t[n]=i:e===n&&"range"!==e&&(t[n]=!0)},attributeRules:function(t){var e,n,i={},r=d(t),o=t.getAttribute("type");for(e in d.validator.methods)"required"===e?(""===(n=t.getAttribute(e))&&(n=!0),n=!!n):n=r.attr(e),this.normalizeAttributeRule(i,o,e,n);return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(t){var e,n,i={},r=d(t),o=t.getAttribute("type");for(e in d.validator.methods)""===(n=r.data("rule"+e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()))&&(n=!0),this.normalizeAttributeRule(i,o,e,n);return i},staticRules:function(t){var e={},n=d.data(t.form,"validator");return n.settings.rules&&(e=d.validator.normalizeRule(n.settings.rules[t.name])||{}),e},normalizeRules:function(i,r){return d.each(i,function(t,e){if(!1!==e){if(e.param||e.depends){var n=!0;switch(typeof e.depends){case"string":n=!!d(e.depends,r.form).length;break;case"function":n=e.depends.call(r,r)}n?i[t]=void 0===e.param||e.param:(d.data(r.form,"validator").resetElements(d(r)),delete i[t])}}else delete i[t]}),d.each(i,function(t,e){i[t]=d.isFunction(e)&&"normalizer"!==t?e(r):e}),d.each(["minlength","maxlength"],function(){i[this]&&(i[this]=Number(i[this]))}),d.each(["rangelength","range"],function(){var t;i[this]&&(d.isArray(i[this])?i[this]=[Number(i[this][0]),Number(i[this][1])]:"string"==typeof i[this]&&(t=i[this].replace(/[\[\]]/g,"").split(/[\s,]+/),i[this]=[Number(t[0]),Number(t[1])]))}),d.validator.autoCreateRanges&&(null!=i.min&&null!=i.max&&(i.range=[i.min,i.max],delete i.min,delete i.max),null!=i.minlength&&null!=i.maxlength&&(i.rangelength=[i.minlength,i.maxlength],delete i.minlength,delete i.maxlength)),i},normalizeRule:function(t){if("string"==typeof t){var e={};d.each(t.split(/\s/),function(){e[this]=!0}),t=e}return t},addMethod:function(t,e,n){d.validator.methods[t]=e,d.validator.messages[t]=void 0!==n?n:d.validator.messages[t],e.length<3&&d.validator.addClassRules(t,d.validator.normalizeRule(t))},methods:{required:function(t,e,n){if(!this.depend(n,e))return"dependency-mismatch";if("select"!==e.nodeName.toLowerCase())return this.checkable(e)?0<this.getLength(t,e):null!=t&&0<t.length;var i=d(e).val();return i&&0<i.length},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(t)},date:(n=!1,function(t,e){return n||(n=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())}),dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(t,e,n){var i=d.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||n<=i},maxlength:function(t,e,n){var i=d.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||i<=n},rangelength:function(t,e,n){var i=d.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||i>=n[0]&&i<=n[1]},min:function(t,e,n){return this.optional(e)||n<=t},max:function(t,e,n){return this.optional(e)||t<=n},range:function(t,e,n){return this.optional(e)||t>=n[0]&&t<=n[1]},step:function(t,e,n){var i,r=d(e).attr("type"),o="Step attribute on input type "+r+" is not supported.",a=["text","number","range"],s=new RegExp("\\b"+r+"\\b"),l=function(t){var e=(""+t).match(/(?:\.(\d+))?$/);return e&&e[1]?e[1].length:0},u=function(t){return Math.round(t*Math.pow(10,i))},c=!0;if(r&&!s.test(a.join()))throw new Error(o);return i=l(n),(l(t)>i||u(t)%u(n)!=0)&&(c=!1),this.optional(e)||c},equalTo:function(t,e,n){var i=d(n);return this.settings.onfocusout&&i.not(".validate-equalTo-blur").length&&i.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){d(e).valid()}),t===i.val()},remote:function(o,a,t,s){if(this.optional(a))return"dependency-mismatch";s="string"==typeof s&&s||"remote";var l,e,n,u=this.previousValue(a,s);return this.settings.messages[a.name]||(this.settings.messages[a.name]={}),u.originalMessage=u.originalMessage||this.settings.messages[a.name][s],this.settings.messages[a.name][s]=u.message,t="string"==typeof t&&{url:t}||t,n=d.param(d.extend({data:o},t.data)),u.old===n?u.valid:(u.old=n,(l=this).startRequest(a),(e={})[a.name]=o,d.ajax(d.extend(!0,{mode:"abort",port:"validate"+a.name,dataType:"json",data:e,context:l.currentForm,success:function(t){var e,n,i,r=!0===t||"true"===t;l.settings.messages[a.name][s]=u.originalMessage,r?(i=l.formSubmitted,l.resetInternals(),l.toHide=l.errorsFor(a),l.formSubmitted=i,l.successList.push(a),l.invalid[a.name]=!1,l.showErrors()):(e={},n=t||l.defaultMessage(a,{method:s,parameters:o}),e[a.name]=u.message=n,l.invalid[a.name]=!0,l.showErrors(e)),u.valid=r,l.stopRequest(a,r)}},t)),"pending")}}});var i,r={};return d.ajaxPrefilter?d.ajaxPrefilter(function(t,e,n){var i=t.port;"abort"===t.mode&&(r[i]&&r[i].abort(),r[i]=n)}):(i=d.ajax,d.ajax=function(t){var e=("mode"in t?t:d.ajaxSettings).mode,n=("port"in t?t:d.ajaxSettings).port;return"abort"===e?(r[n]&&r[n].abort(),r[n]=i.apply(this,arguments),r[n]):i.apply(this,arguments)}),d}),function(t){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(l){return function(){function o(t){return t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-\u201c\u201d\u2019]*/g,"")}l.validator.addMethod("maxWords",function(t,e,n){return this.optional(e)||o(t).match(/\b\w+\b/g).length<=n},l.validator.format("Please enter {0} words or less.")),l.validator.addMethod("minWords",function(t,e,n){return this.optional(e)||o(t).match(/\b\w+\b/g).length>=n},l.validator.format("Please enter at least {0} words.")),l.validator.addMethod("rangeWords",function(t,e,n){var i=o(t),r=/\b\w+\b/g;return this.optional(e)||i.match(r).length>=n[0]&&i.match(r).length<=n[1]},l.validator.format("Please enter between {0} and {1} words."))}(),l.validator.addMethod("abaRoutingNumber",function(t){var e=0,n=t.split(""),i=n.length;if(9!==i)return!1;for(var r=0;r<i;r+=3)e+=3*parseInt(n[r],10)+7*parseInt(n[r+1],10)+parseInt(n[r+2],10);return 0!==e&&e%10==0},"Please enter a valid routing number."),l.validator.addMethod("accept",function(t,e,n){var i,r,o="string"==typeof n?n.replace(/\s/g,""):"image/*",a=this.optional(e);if(a)return a;if("file"===l(e).attr("type")&&(o=o.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),e.files&&e.files.length))for(r=new RegExp(".?("+o+")$","i"),i=0;i<e.files.length;i++)if(!e.files[i].type.match(r))return!1;return!0},l.validator.format("Please enter a value with a valid mimetype.")),l.validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^\w+$/i.test(t)},"Letters, numbers, and underscores only please"),l.validator.addMethod("bankaccountNL",function(t,e){if(this.optional(e))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(t))return!1;var n,i=t.replace(/ /g,""),r=0,o=i.length;for(n=0;n<o;n++)r+=(o-n)*i.substring(n,n+1);return r%11==0},"Please specify a valid bank account number"),l.validator.addMethod("bankorgiroaccountNL",function(t,e){return this.optional(e)||l.validator.methods.bankaccountNL.call(this,t,e)||l.validator.methods.giroaccountNL.call(this,t,e)},"Please specify a valid bank or giro account number"),l.validator.addMethod("bic",function(t,e){return this.optional(e)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(t.toUpperCase())},"Please specify a valid BIC code"),l.validator.addMethod("cifES",function(t,e){"use strict";function n(t){return t%2==0}if(this.optional(e))return!0;var i,r,o,a,s=new RegExp(/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi),l=t.substring(0,1),u=t.substring(1,8),c=t.substring(8,9),d=0,h=0;if(9!==t.length||!s.test(t))return!1;for(i=0;i<u.length;i++)r=parseInt(u[i],10),n(i)?h+=(r*=2)<10?r:r-9:d+=r;return o=(10-(d+h).toString().substr(-1)).toString(),o=9<parseInt(o,10)?"0":o,a="JABCDEFGHI".substr(o,1).toString(),l.match(/[ABEH]/)?c===o:l.match(/[KPQS]/)?c===a:c===o||c===a},"Please specify a valid CIF number."),l.validator.addMethod("cnhBR",function(t){if(11!==(t=t.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,"")).length)return!1;var e,n,i,r,o,a=0,s=0;if(e=t.charAt(0),new Array(12).join(e)===t)return!1;for(o=9,r=0;r<9;++r,--o)a+=+t.charAt(r)*o;for(10<=(n=a%11)&&(n=0,s=2),o=1,r=a=0;r<9;++r,++o)a+=+t.charAt(r)*o;return 10<=(i=a%11)?i=0:i-=s,String(n).concat(i)===t.substr(-2)},"Please specify a valid CNH number"),l.validator.addMethod("cnpjBR",function(t,e){"use strict";if(this.optional(e))return!0;if(14!==(t=t.replace(/[^\d]+/g,"")).length)return!1;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return!1;for(var n=t.length-2,i=t.substring(0,n),r=t.substring(n),o=0,a=n-7,s=n;1<=s;s--)o+=i.charAt(n-s)*a--,a<2&&(a=9);var l=o%11<2?0:11-o%11;if(l!==parseInt(r.charAt(0),10))return!1;n+=1,i=t.substring(0,n),o=0,a=n-7;for(var u=n;1<=u;u--)o+=i.charAt(n-u)*a--,a<2&&(a=9);return(l=o%11<2?0:11-o%11)===parseInt(r.charAt(1),10)},"Please specify a CNPJ value number"),l.validator.addMethod("cpfBR",function(t,e){"use strict";if(this.optional(e))return!0;if(11!==(t=t.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,"")).length)return!1;var n,i,r,o,a=0;if(n=parseInt(t.substring(9,10),10),i=parseInt(t.substring(10,11),10),r=function(t,e){var n=10*t%11;return 10!==n&&11!==n||(n=0),n===e},""===t||"00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return!1;for(o=1;o<=9;o++)a+=parseInt(t.substring(o-1,o),10)*(11-o);if(r(a,n)){for(a=0,o=1;o<=10;o++)a+=parseInt(t.substring(o-1,o),10)*(12-o);return r(a,i)}return!1},"Please specify a valid CPF number"),l.validator.addMethod("creditcard",function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var n,i,r=0,o=0,a=!1;if((t=t.replace(/\D/g,"")).length<13||19<t.length)return!1;for(n=t.length-1;0<=n;n--)i=t.charAt(n),o=parseInt(i,10),a&&9<(o*=2)&&(o-=9),r+=o,a=!a;return r%10==0},"Please enter a valid credit card number."),l.validator.addMethod("creditcardtypes",function(t,e,n){if(/[^0-9\-]+/.test(t))return!1;t=t.replace(/\D/g,"");var i=0;return n.mastercard&&(i|=1),n.visa&&(i|=2),n.amex&&(i|=4),n.dinersclub&&(i|=8),n.enroute&&(i|=16),n.discover&&(i|=32),n.jcb&&(i|=64),n.unknown&&(i|=128),n.all&&(i=255),1&i&&(/^(5[12345])/.test(t)||/^(2[234567])/.test(t))?16===t.length:2&i&&/^(4)/.test(t)?16===t.length:4&i&&/^(3[47])/.test(t)?15===t.length:8&i&&/^(3(0[012345]|[68]))/.test(t)?14===t.length:16&i&&/^(2(014|149))/.test(t)?15===t.length:32&i&&/^(6011)/.test(t)?16===t.length:64&i&&/^(3)/.test(t)?16===t.length:64&i&&/^(2131|1800)/.test(t)?15===t.length:!!(128&i)},"Please enter a valid credit card number."),l.validator.addMethod("currency",function(t,e,n){var i,r="string"==typeof n,o=r?n:n[0],a=!!r||n[1];return o=o.replace(/,/g,""),i="^["+(o=a?o+"]":o+"]?")+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",i=new RegExp(i),this.optional(e)||i.test(t)},"Please specify a valid currency"),l.validator.addMethod("dateFA",function(t,e){return this.optional(e)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(t)},l.validator.messages.date),l.validator.addMethod("dateITA",function(t,e){var n,i,r,o,a,s=!1;return/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(t)?(n=t.split("/"),i=parseInt(n[0],10),r=parseInt(n[1],10),o=parseInt(n[2],10),s=(a=new Date(Date.UTC(o,r-1,i,12,0,0,0))).getUTCFullYear()===o&&a.getUTCMonth()===r-1&&a.getUTCDate()===i):s=!1,this.optional(e)||s},l.validator.messages.date),l.validator.addMethod("dateNL",function(t,e){return this.optional(e)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(t)},l.validator.messages.date),l.validator.addMethod("extension",function(t,e,n){return n="string"==typeof n?n.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(e)||t.match(new RegExp("\\.("+n+")$","i"))},l.validator.format("Please enter a value with a valid extension.")),l.validator.addMethod("giroaccountNL",function(t,e){return this.optional(e)||/^[0-9]{1,7}$/.test(t)},"Please specify a valid giro account number"),l.validator.addMethod("greaterThan",function(t,e,n){var i=l(n);return this.settings.onfocusout&&i.not(".validate-greaterThan-blur").length&&i.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){l(e).valid()}),t>i.val()},"Please enter a greater value."),l.validator.addMethod("greaterThanEqual",function(t,e,n){var i=l(n);return this.settings.onfocusout&&i.not(".validate-greaterThanEqual-blur").length&&i.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){l(e).valid()}),t>=i.val()},"Please enter a greater value."),l.validator.addMethod("iban",function(t,e){if(this.optional(e))return!0;var n,i,r,o,a,s=t.replace(/ /g,"").toUpperCase(),l="",u=!0,c="",d=5;if(s.length<d)return!1;if(void 0!==(r={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"}[s.substring(0,2)])&&!new RegExp("^[A-Z]{2}\\d{2}"+r+"$","").test(s))return!1;for(n=s.substring(4,s.length)+s.substring(0,4),o=0;o<n.length;o++)"0"!==(i=n.charAt(o))&&(u=!1),u||(l+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(i));for(a=0;a<l.length;a++)c=(""+c+l.charAt(a))%97;return 1===c},"Please specify a valid IBAN"),l.validator.addMethod("integer",function(t,e){return this.optional(e)||/^-?\d+$/.test(t)},"A positive or negative non-decimal number please"),l.validator.addMethod("ipv4",function(t,e){return this.optional(e)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(t)},"Please enter a valid IP v4 address."),l.validator.addMethod("ipv6",function(t,e){return this.optional(e)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(t)},"Please enter a valid IP v6 address."),l.validator.addMethod("lessThan",function(t,e,n){var i=l(n);return this.settings.onfocusout&&i.not(".validate-lessThan-blur").length&&i.addClass("validate-lessThan-blur").on("blur.validate-lessThan",function(){l(e).valid()}),t<i.val()},"Please enter a lesser value."),l.validator.addMethod("lessThanEqual",function(t,e,n){var i=l(n);return this.settings.onfocusout&&i.not(".validate-lessThanEqual-blur").length&&i.addClass("validate-lessThanEqual-blur").on("blur.validate-lessThanEqual",function(){l(e).valid()}),t<=i.val()},"Please enter a lesser value."),l.validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},"Letters only please"),l.validator.addMethod("letterswithbasicpunc",function(t,e){return this.optional(e)||/^[a-z\-.,()'"\s]+$/i.test(t)},"Letters or punctuation only please"),l.validator.addMethod("maxfiles",function(t,e,n){return!!this.optional(e)||!("file"===l(e).attr("type")&&e.files&&e.files.length>n)},l.validator.format("Please select no more than {0} files.")),l.validator.addMethod("maxsize",function(t,e,n){if(this.optional(e))return!0;if("file"===l(e).attr("type")&&e.files&&e.files.length)for(var i=0;i<e.files.length;i++)if(e.files[i].size>n)return!1;return!0},l.validator.format("File size must not exceed {0} bytes each.")),l.validator.addMethod("maxsizetotal",function(t,e,n){if(this.optional(e))return!0;if("file"===l(e).attr("type")&&e.files&&e.files.length)for(var i=0,r=0;r<e.files.length;r++)if(n<(i+=e.files[r].size))return!1;return!0},l.validator.format("Total size of all files must not exceed {0} bytes.")),l.validator.addMethod("mobileNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid mobile number"),l.validator.addMethod("mobileRU",function(t,e){var n=t.replace(/\(|\)|\s+|-/g,"");return this.optional(e)||9<n.length&&/^((\+7|7|8)+([0-9]){10})$/.test(n)},"Please specify a valid mobile number"),l.validator.addMethod("mobileUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||9<t.length&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),l.validator.addMethod("netmask",function(t,e){return this.optional(e)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(t)},"Please enter a valid netmask."),l.validator.addMethod("nieES",function(t,e){"use strict";if(this.optional(e))return!0;var n,i=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),r="TRWAGMYFPDXBNJZSQVHLCKET",o=t.substr(t.length-1).toUpperCase();return!(10<(t=t.toString().toUpperCase()).length||t.length<9||!i.test(t))&&(n=9===(t=t.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2")).length?t.substr(0,8):t.substr(0,9),r.charAt(parseInt(n,10)%23)===o)},"Please specify a valid NIE number."),l.validator.addMethod("nifES",function(t,e){"use strict";return!!this.optional(e)||!!(t=t.toUpperCase()).match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(t)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.substring(8,0)%23)===t.charAt(8):!!/^[KLM]{1}/.test(t)&&t[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.substring(8,1)%23))},"Please specify a valid NIF number."),l.validator.addMethod("nipPL",function(t){"use strict";if(10!==(t=t.replace(/[^0-9]/g,"")).length)return!1;for(var e=[6,5,7,2,3,4,5,6,7],n=0,i=0;i<9;i++)n+=e[i]*t[i];var r=n%11;return(10===r?0:r)===parseInt(t[9],10)},"Please specify a valid NIP number."),l.validator.addMethod("nisBR",function(t){var e,n,i,r,o,a=0;if(11!==(t=t.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,"")).length)return!1;for(n=parseInt(t.substring(10,11),10),e=parseInt(t.substring(0,10),10),r=2;r<12;r++)10===(o=r)&&(o=2),11===r&&(o=3),a+=e%10*o,e=parseInt(e/10,10);return n===(i=1<(i=a%11)?11-i:0)},
|
|
"Please specify a valid NIS/PIS number"),l.validator.addMethod("notEqualTo",function(t,e,n){return this.optional(e)||!l.validator.methods.equalTo.call(this,t,e,n)},"Please enter a different value, values must not be the same."),l.validator.addMethod("nowhitespace",function(t,e){return this.optional(e)||/^\S+$/i.test(t)},"No white space please"),l.validator.addMethod("pattern",function(t,e,n){return!!this.optional(e)||("string"==typeof n&&(n=new RegExp("^(?:"+n+")$")),n.test(t))},"Invalid format."),l.validator.addMethod("phoneNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid phone number."),l.validator.addMethod("phonePL",function(t,e){t=t.replace(/\s+/g,"");var n=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(e)||n.test(t)},"Please specify a valid phone number"),l.validator.addMethod("phonesUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||9<t.length&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),l.validator.addMethod("phoneUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||9<t.length&&t.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),l.validator.addMethod("phoneUS",function(t,e){return t=t.replace(/\s+/g,""),this.optional(e)||9<t.length&&t.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number"),l.validator.addMethod("postalcodeBR",function(t,e){return this.optional(e)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(t)},"Informe um CEP v\xe1lido."),l.validator.addMethod("postalCodeCA",function(t,e){return this.optional(e)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(t)},"Please specify a valid postal code"),l.validator.addMethod("postalcodeIT",function(t,e){return this.optional(e)||/^\d{5}$/.test(t)},"Please specify a valid postal code"),l.validator.addMethod("postalcodeNL",function(t,e){return this.optional(e)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},"Please specify a valid postal code"),l.validator.addMethod("postcodeUK",function(t,e){return this.optional(e)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(t)},"Please specify a valid UK postcode"),l.validator.addMethod("require_from_group",function(t,e,n){var i=l(n[1],e.form),r=i.eq(0),o=r.data("valid_req_grp")?r.data("valid_req_grp"):l.extend({},this),a=i.filter(function(){return o.elementValue(this)}).length>=n[0];return r.data("valid_req_grp",o),l(e).data("being_validated")||(i.data("being_validated",!0),i.each(function(){o.element(this)}),i.data("being_validated",!1)),a},l.validator.format("Please fill at least {0} of these fields.")),l.validator.addMethod("skip_or_fill_minimum",function(t,e,n){var i=l(n[1],e.form),r=i.eq(0),o=r.data("valid_skip")?r.data("valid_skip"):l.extend({},this),a=i.filter(function(){return o.elementValue(this)}).length,s=0===a||a>=n[0];return r.data("valid_skip",o),l(e).data("being_validated")||(i.data("being_validated",!0),i.each(function(){o.element(this)}),i.data("being_validated",!1)),s},l.validator.format("Please either skip these fields or fill at least {0} of them.")),l.validator.addMethod("stateUS",function(t,e,n){var i,r=void 0===n,o=!r&&"undefined"!=typeof n.caseSensitive&&n.caseSensitive,a=!r&&"undefined"!=typeof n.includeTerritories&&n.includeTerritories,s=!r&&"undefined"!=typeof n.includeMilitary&&n.includeMilitary;return i=a||s?a&&s?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":a?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",i=o?new RegExp(i):new RegExp(i,"i"),this.optional(e)||i.test(t)},"Please specify a valid state"),l.validator.addMethod("strippedminlength",function(t,e,n){return l(t).text().length>=n},l.validator.format("Please enter at least {0} characters")),l.validator.addMethod("time",function(t,e){return this.optional(e)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(t)},"Please enter a valid time, between 00:00 and 23:59"),l.validator.addMethod("time12h",function(t,e){return this.optional(e)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(t)},"Please enter a valid time in 12-hour am/pm format"),l.validator.addMethod("url2",function(t,e){return this.optional(e)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},l.validator.messages.url),l.validator.addMethod("vinUS",function(t){if(17!==t.length)return!1;var e,n,i,r,o,a,s=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],l=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],u=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],c=0;for(e=0;e<17;e++){if(r=u[e],i=t.slice(e,e+1),8===e&&(a=i),isNaN(i)){for(n=0;n<s.length;n++)if(i.toUpperCase()===s[n]){i=l[n],i*=r,isNaN(a)&&8===n&&(a=s[n]);break}}else i*=r;c+=i}return 10===(o=c%11)&&(o="X"),o===a},"The specified vehicle identification number (VIN) is invalid."),l.validator.addMethod("zipcodeUS",function(t,e){return this.optional(e)||/^\d{5}(-\d{4})?$/.test(t)},"The specified US ZIP Code is invalid"),l.validator.addMethod("ziprange",function(t,e){return this.optional(e)||/^90[2-5]\d\{2\}-\d{4}$/.test(t)},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx"),l}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(o){function n(t,e,n){e={content:{message:"object"==typeof e?e.message:e,title:e.title?e.title:"",icon:e.icon?e.icon:"",url:e.url?e.url:"#",target:e.target?e.target:"-"}};n=o.extend(!0,{},e,n),this.settings=o.extend(!0,{},i,n),this._defaults=i,"-"==this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),this.init()}var i={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:1e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-4 col-sm-2 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(t){for(var e=t,n=1;n<arguments.length;n++)e=e.replace(RegExp("\\{"+(n-1)+"\\}","gm"),arguments[n]);return e},o.extend(n.prototype,{init:function(){var a=this;this.buildNotify(),this.settings.content.icon&&this.setIcon(),"#"!=this.settings.content.url&&this.styleURL(),this.placement(),this.bind(),this.notify={$ele:this.$ele,update:function(t,e){var n={};for(var t in"string"==typeof t?n[t]=e:n=t,n)switch(t){case"type":this.$ele.removeClass("alert-"+a.settings.type),this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+a.settings.type),a.settings.type=n[t],this.$ele.addClass("alert-"+n[t]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+n[t]);break;case"icon":var i=this.$ele.find('[data-notify="icon"]');"class"==a.settings.icon_type.toLowerCase()?i.removeClass(a.settings.content.icon).addClass(n[t]):(i.is("img")||i.find("img"),i.attr("src",n[t]));break;case"progress":var r=a.settings.delay-a.settings.delay*(n[t]/100);this.$ele.data("notify-delay",r),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",n[t]).css("width",n[t]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",n[t]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",n[t]);break;default:this.$ele.find('[data-notify="'+t+'"]').html(n[t])}var o=this.$ele.outerHeight()+parseInt(a.settings.spacing)+parseInt(a.settings.offset.y);a.reposition(o)},close:function(){a.close()}}},buildNotify:function(){var t=this.settings.content;this.$ele=o(String.format(this.settings.template,this.settings.type,t.title,t.message,t.url,t.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"==this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1}),this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},placement:function(){var n=this,t=this.settings.offset.y,e={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},i=!1,r=this.settings;switch(o('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return t=Math.max(t,parseInt(o(this).css(r.placement.from))+parseInt(o(this).outerHeight())+parseInt(r.spacing))}),1==this.settings.newest_on_top&&(t=this.settings.offset.y),e[this.settings.placement.from]=t+"px",this.settings.placement.align){case"left":case"right":e[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":e.left=0,e.right=0}this.$ele.css(e).addClass(this.settings.animate.enter),o.each(Array("webkit","moz","o","ms",""),function(t,e){n.$ele[0].style[e+"AnimationIterationCount"]=1}),o(this.settings.element).append(this.$ele),1==this.settings.newest_on_top&&(t=parseInt(t)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(t)),o.isFunction(n.settings.onShow)&&n.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){o.isFunction(n.settings.onShown)&&n.settings.onShown.call(this)}),setTimeout(function(){i||o.isFunction(n.settings.onShown)&&n.settings.onShown.call(this)},600)},bind:function(){var n=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){n.close()}),this.$ele.mouseover(function(){o(this).data("data-hover","true")}).mouseout(function(){o(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),0<this.settings.delay){n.$ele.data("notify-delay",n.settings.delay);var i=setInterval(function(){var t=parseInt(n.$ele.data("notify-delay"))-n.settings.timer;if("false"===n.$ele.data("data-hover")&&"pause"==n.settings.mouse_over||"pause"!=n.settings.mouse_over){var e=(n.settings.delay-t)/n.settings.delay*100;n.$ele.data("notify-delay",t),n.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",e).css("width",e+"%")}t<=-n.settings.timer&&(clearInterval(i),n.close())},n.settings.timer)}},close:function(){var t=this,e=parseInt(this.$ele.css(this.settings.placement.from)),n=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit),t.reposition(e),o.isFunction(t.settings.onClose)&&t.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(){n=!0}).one(this.animations.end,function(){o(this).remove(),o.isFunction(t.settings.onClosed)&&t.settings.onClosed.call(this)}),setTimeout(function(){n||(t.$ele.remove(),t.settings.onClosed&&t.settings.onClosed(t.$ele))},600)},reposition:function(t){var e=this,n='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',i=this.$ele.nextAll(n);1==this.settings.newest_on_top&&(i=this.$ele.prevAll(n)),i.each(function(){o(this).css(e.settings.placement.from,t),t=parseInt(t)+parseInt(e.settings.spacing)+o(this).outerHeight()})}}),o.notify=function(t,e){return new n(this,t,e).notify},o.notifyDefaults=function(t){return i=o.extend(!0,{},i,t)},o.notifyClose=function(t){void 0===t||"all"==t?o("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):o('[data-notify-position="'+t+'"]').find('[data-notify="dismiss"]').trigger("click")}}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(h){function f(t){return v.raw?t:encodeURIComponent(t)}function p(t){return v.raw?t:decodeURIComponent(t)}function g(t){return f(v.json?JSON.stringify(t):String(t))}function i(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(e," ")),v.json?JSON.parse(t):t}catch(f){}}function m(t,e){var n=v.raw?t:i(t);return h.isFunction(e)?e(n):n}var e=/\+/g,v=h.cookie=function(t,e,n){if(void 0!==e&&!h.isFunction(e)){if("number"==typeof(n=h.extend({},v.defaults,n)).expires){var i=n.expires,r=n.expires=new Date;r.setTime(+r+864e5*i)}return document.cookie=[f(t),"=",g(e),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}for(var o=t?void 0:{},a=document.cookie?document.cookie.split("; "):[],s=0,l=a.length;s<l;s++){var u=a[s].split("="),c=p(u.shift()),d=u.join("=");if(t&&t===c){o=m(d,e);break}t||void 0===(d=m(d))||(o[c]=d)}return o};v.defaults={},h.removeCookie=function(t,e){return void 0!==h.cookie(t)&&(h.cookie(t,"",h.extend({},e,{expires:-1})),!h.cookie(t))}}),function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(t,e){return e===undefined&&(e="undefined"!=typeof window?require("jquery"):require("jquery")(t)),n(e),e}:n(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var r,c,d;return t&&t.requirejs||(t?c=t:t={},function(f){function p(t,e){return n.call(t,e)}function a(t,e){var n,i,r,o,a,s,l,u,c,d,h,f=e&&e.split("/"),p=S.map,g=p&&p["*"]||{};if(t){for(a=(t=t.split("/")).length-1,S.nodeIdCompat&&T.test(t[a])&&(t[a]=t[a].replace(T,"")),"."===t[0].charAt(0)&&f&&(t=f.slice(0,f.length-1).concat(t)),c=0;c<t.length;c++)if("."===(h=t[c]))t.splice(c,1),c-=1;else if(".."===h){if(0===c||1===c&&".."===t[2]||".."===t[c-1])continue;0<c&&(t.splice(c-1,2),c-=2)}t=t.join("/")}if((f||g)&&p){for(c=(n=t.split("/")).length;0<c;c-=1){if(i=n.slice(0,c).join("/"),f)for(d=f.length;0<d;d-=1)if((r=p[f.slice(0,d).join("/")])&&(r=r[i])){o=r,s=c;break}if(o)break;!l&&g&&g[i]&&(l=g[i],u=c)}!o&&l&&(o=l,s=u),o&&(n.splice(0,s,o),t=n.join("/"))}return t}function g(e,n){return function(){var t=i.call(arguments,0);return"string"!=typeof t[0]&&1===t.length&&t.push(null),u.apply(f,t.concat([e,n]))}}function s(e){return function(t){return a(t,e)}}function m(e){return function(t){_[e]=t}}function v(t){if(p(w,t)){var e=w[t];delete w[t],C[t]=!0,o.apply(f,e)}if(!p(_,t)&&!p(C,t))throw new Error("No "+t);return _[t]}function l(t){var e,n=t?t.indexOf("!"):-1;return-1<n&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function y(t){return t?l(t):[]}function e(t){return function(){return S&&S.config&&S.config[t]||{}}}var o,u,x,b,_={},w={},S={},C={},n=Object.prototype.hasOwnProperty,i=[].slice,T=/\.js$/;x=function(t,e){var n,i=l(t),r=i[0],o=e[1];return t=i[1],r&&(n=v(r=a(r,o))),r?t=n&&n.normalize?n.normalize(t,s(o)):a(t,o):(r=(i=l(t=a(t,o)))[0],t=i[1],r&&(n=v(r))),{f:r?r+"!"+t:t,n:t,pr:r,p:n}},b={require:function(t){return g(t)},exports:function(t){var e=_[t];return void 0!==e?e:_[t]={}},module:function(t){return{id:t,uri:"",exports:_[t],config:e(t)}}},o=function(t,e,n,i){var r,o,a,s,l,u,c,d=[],h=typeof n;if(u=y(i=i||t),"undefined"===h||"function"===h){for(e=!e.length&&n.length?["require","exports","module"]:e,l=0;l<e.length;l+=1)if("require"===(o=(s=x(e[l],u)).f))d[l]=b.require(t);else if("exports"===o)d[l]=b.exports(t),c=!0;else if("module"===o)r=d[l]=b.module(t);else if(p(_,o)||p(w,o)||p(C,o))d[l]=v(o);else{if(!s.p)throw new Error(t+" missing "+o);s.p.load(s.n,g(i,!0),m(o),{}),d[l]=_[o]}a=n?n.apply(_[t],d):undefined,t&&(r&&r.exports!==f&&r.exports!==_[t]?_[t]=r.exports:a===f&&c||(_[t]=a))}else t&&(_[t]=n)},r=c=u=function(t,e,n,i,r){if("string"==typeof t)return b[t]?b[t](e):v(x(t,y(e)).f);if(!t.splice){if((S=t).deps&&u(S.deps,S.callback),!e)return;e.splice?(t=e,e=n,n=null):t=f}return e=e||function(){},"function"==typeof n&&(n=i,i=r),i?o(f,t,e,n):setTimeout(function(){o(f,t,e,n)},4),u},u.config=function(t){return u(t)},r._defined=_,(d=function(t,e,n){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(n=e,e=[]),p(_,t)||p(w,t)||(w[t]=[t,e,n])}).amd={jQuery:!0}}(),t.requirejs=r,t.require=c,t.define=d),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(o){function d(t){var e=t.prototype,n=[];for(var i in e){"function"==typeof e[i]&&("constructor"!==i&&n.push(i))}return n}var r={Extend:function(t,e){function n(){this.constructor=t}var i={}.hasOwnProperty;for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},Decorate:function(i,r){function o(){var t=Array.prototype.unshift,e=r.prototype.constructor.length,n=i.prototype.constructor;0<e&&(t.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}function t(){this.constructor=o}var e=d(r),n=d(i);r.displayName=i.displayName,o.prototype=new t;for(var a=0;a<n.length;a++){var s=n[a];o.prototype[s]=i.prototype[s]}for(var l=function(t){var e=function(){};t in o.prototype&&(e=o.prototype[t]);var n=r.prototype[t];return function(){return Array.prototype.unshift.call(arguments,e),n.apply(this,arguments)}},u=0;u<e.length;u++){var c=e[u];o.prototype[c]=l(c)}return o}},t=function(){this.listeners={}};t.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},t.prototype.trigger=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=t)in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].apply(this,e)},r.Observable=t,r.generateChars=function(t){for(var e="",n=0;n<t;n++){e+=Math.floor(36*Math.random()).toString(36)}return e},r.bind=function(t,e){return function(){t.apply(e,arguments)}},r._convertData=function(t){for(var e in t){var n=e.split("-"),i=t;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=t[e]),i=i[o]}delete t[e]}}return t},r.hasScroll=function(t,e){var n=o(e),i=e.style.overflowX,r=e.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<e.scrollHeight||n.innerWidth()<e.scrollWidth))},r.escapeMarkup=function(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},r.appendMany=function(t,e){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(e,function(t){n=n.add(t)}),e=n}t.append(e)},r.__cache={};var n=0;return r.GetUniqueElementId=function(t){var e=t.getAttribute("data-select2-id");return null==e&&(t.id?(e=t.id,t.setAttribute("data-select2-id",e)):(t.setAttribute("data-select2-id",++n),e=n.toString())),e},r.StoreData=function(t,e,n){var i=r.GetUniqueElementId(t);r.__cache[i]||(r.__cache[i]={}),r.__cache[i][e]=n},r.GetData=function(t,e){var n=r.GetUniqueElementId(t);return e?r.__cache[n]&&null!=r.__cache[n][e]?r.__cache[n][e]:o(t).data(e):r.__cache[n]},r.RemoveData=function(t){var e=r.GetUniqueElementId(t);null!=r.__cache[e]&&delete r.__cache[e]},r}),t.define("select2/results",["jquery","./utils"],function(f,p){function i(t,e,n){this.$element=t,this.data=n,this.options=e,i.__super__.constructor.call(this)}return p.Extend(i,p.Observable),i.prototype.render=function(){var t=f('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(t){var e=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=f('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(t.message);n.append(e(i(t.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var n=0;n<t.results.length;n++){var i=t.results[n],r=this.option(i);e.push(r)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(t,e){e.find(".select2-results").append(t)},i.prototype.sort=function(t){return this.options.get("sorter")(t)},i.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");0<e.length?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var e=this;this.data.current(function(t){var i=f.map(t,function(t){return t.id.toString()});e.$results.find(".select2-results__option[aria-selected]").each(function(){var t=f(this),e=p.GetData(this,"data"),n=""+e.id;null!=e.element&&e.element.selected||null==e.element&&-1<f.inArray(n,i)?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},i.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},n=this.option(e);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(t){var e=document.createElement("li");e.className="select2-results__option";var n={role:"treeitem","aria-selected":"false"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var r in(null!=t.element&&i.call(t.element,":disabled")||null==t.element&&t.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==t.id&&delete n["aria-selected"],null!=t._resultId&&(e.id=t._resultId),t.title&&(e.title=t.title),t.children&&(n.role="group",n["aria-label"]=t.text,delete n["aria-selected"]),n){var o=n[r];e.setAttribute(r,o)}if(t.children){var a=f(e),s=document.createElement("strong");s.className="select2-results__group";f(s);this.template(t,s);for(var l=[],u=0;u<t.children.length;u++){var c=t.children[u],d=this.option(c);l.push(d)}var h=f("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});h.append(l),a.append(s),a.append(h)}else this.template(t,e);return p.StoreData(e,"data",t),e},i.prototype.bind=function(e){var l=this,t=e.id+"-results";this.$results.attr("id",t),e.on("results:all",function(t){l.clear(),l.append(t.data),e.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),e.on("results:append",function(t){l.append(t.data),e.isOpen()&&l.setClasses()}),e.on("query",function(t){l.hideMessages(),l.showLoading(t)}),e.on("select",function(){e.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),e.on("unselect",function(){e.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),e.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),e.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),e.on("results:toggle",function(){var t=l.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),e.on("results:select",function(){var t=l.getHighlightedResults();if(0!==t.length){var e=p.GetData(t[0],"data");"true"==t.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:e})}}),e.on("results:previous",function(){var t=l.getHighlightedResults(),e=l.$results.find("[aria-selected]"),n=e.index(t);if(!(n<=0)){var i=n-1;0===t.length&&(i=0);var r=e.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,a=r.offset().top,s=l.$results.scrollTop()+(a-o);0===i?l.$results.scrollTop(0):a-o<0&&l.$results.scrollTop(s)}}),e.on("results:next",function(){var t=l.getHighlightedResults(),e=l.$results.find("[aria-selected]"),n=e.index(t)+1;if(!(n>=e.length)){var i=e.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),a=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(a)}}),e.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),e.on("results:message",function(t){l.displayMessage(t)}),f.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-e+t.deltaY,i=0<t.deltaY&&e-t.deltaY<=0,r=t.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var e=f(this),n=p.GetData(this,"data");"true"!==e.attr("aria-selected")?l.trigger("select",{originalEvent:t,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:t,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(){var t=p.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:f(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),n=this.$results.offset().top,i=t.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(t,e){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(t,e);null==r?e.style.display="none":"string"==typeof r?e.innerHTML=i(r):f(e).append(r)},i}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(n,i,r){function o(t,e){this.$element=t,this.options=e,o.__super__.constructor.call(this)}return i.Extend(o,i.Observable),o.prototype.render=function(){var t=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=i.GetData(this.$element[0],"old-tabindex")?this._tabindex=i.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t},o.prototype.bind=function(t){var e=this,n=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(t){e.trigger("focus",t)}),this.$selection.on("blur",function(t){e._handleBlur(t)}),this.$selection.on("keydown",function(t){e.trigger("keypress",t),t.which===r.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){e.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){e.update(t.data)}),t.on("open",function(){e.$selection.attr("aria-expanded","true"),e.$selection.attr("aria-owns",n),e._attachCloseHandler(t)}),t.on("close",function(){e.$selection.attr("aria-expanded","false"),e.$selection.removeAttr("aria-activedescendant"),e.$selection.removeAttr("aria-owns"),e.$selection.trigger("focus"),e._detachCloseHandler(t)}),t.on("enable",function(){e.$selection.attr("tabindex",e._tabindex)}),t.on("disable",function(){e.$selection.attr("tabindex","-1")})},o.prototype._handleBlur=function(t){var e=this;window.setTimeout(function(){document.activeElement==e.$selection[0]||n.contains(e.$selection[0],document.activeElement)||e.trigger("blur",t)},1)},o.prototype._attachCloseHandler=function(t){n(document.body).on("mousedown.select2."+t.id,function(t){var e=n(t.target).closest(".select2");n(".select2.select2-container--open").each(function(){n(this);this!=e[0]&&i.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(t){n(document.body).off("mousedown.select2."+t.id)},o.prototype.position=function(t,e){e.find(".selection").append(t)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.")},o}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(t,e,n){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,e),r.prototype.render=function(){
|
|
var t=r.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(t){1===t.which&&n.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(){}),this.$selection.on("blur",function(){}),t.on("focus",function(){t.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},r.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},r.prototype.selectionContainer=function(){return t("<span></span>")},r.prototype.update=function(t){if(0!==t.length){var e=t[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(e,n);n.empty().append(i),n.attr("title",e.title||e.text)}else this.clear()},r}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(r,t,s){function n(t,e){n.__super__.constructor.apply(this,arguments)}return s.Extend(n,t),n.prototype.render=function(){var t=n.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},n.prototype.bind=function(t,e){var i=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){i.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!i.options.get("disabled")){var e=r(this).parent(),n=s.GetData(e[0],"data");i.trigger("unselect",{originalEvent:t,data:n})}})},n.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},n.prototype.display=function(t,e){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(t,e))},n.prototype.selectionContainer=function(){return r('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},n.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],n=0;n<t.length;n++){var i=t[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o),r.attr("title",i.title||i.text),s.StoreData(r[0],"data",i),e.push(r)}var a=this.$selection.find(".select2-selection__rendered");s.appendMany(a,e)}},n}),t.define("select2/selection/placeholder",["../utils"],function(){function t(t,e,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n)}return t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.createPlaceholder=function(t,e){var n=this.selectionContainer();return n.html(this.display(e)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(t,e){var n=1==e.length&&e[0].id!=this.placeholder.id;if(1<e.length||n)return t.call(this,e);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(r,i,s){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){i._handleClear(t)}),e.on("keypress",function(t){i._handleKeyboardClear(t,e)})},t.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){e.stopPropagation();var i=s.GetData(n[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var o={data:i};if(this.trigger("clear",o),o.prevented)this.$element.val(r);else{for(var a=0;a<i.length;a++)if(o={data:i[a]},this.trigger("unselect",o),o.prevented)return void this.$element.val(r);this.$element.trigger("change"),this.trigger("toggle",{})}}}},t.prototype._handleKeyboardClear=function(t,e,n){n.isOpen()||e.which!=i.DELETE&&e.which!=i.BACKSPACE||this._handleClear(e)},t.prototype.update=function(t,e){if(t.call(this,e),!(0<this.$selection.find(".select2-selection__placeholder").length||0===e.length)){var n=this.options.get("translations").get("removeAllItems"),i=r('<span class="select2-selection__clear" title="'+n()+'">×</span>');s.StoreData(i[0],"data",e),this.$selection.find(".select2-selection__rendered").prepend(i)}},t}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(i,a,s){function t(t,e,n){t.call(this,e,n)}return t.prototype.render=function(t){var e=i('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=e,this.$search=e.find("input");var n=t.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("open",function(){i.$search.trigger("focus")}),e.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),e.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),e.on("disable",function(){i.$search.prop("disabled",!0)}),e.on("focus",function(){i.$search.trigger("focus")}),e.on("results:focus",function(t){i.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2-search--inline",function(t){i.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){i._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){if(t.stopPropagation(),i.trigger("keypress",t),i._keyUpPrevented=t.isDefaultPrevented(),t.which===s.BACKSPACE&&""===i.$search.val()){var e=i.$searchContainer.prev(".select2-selection__choice");if(0<e.length){var n=a.GetData(e[0],"data");i.searchRemoveChoice(n),t.preventDefault()}}});var r=document.documentMode,o=r&&r<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(){o?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(o&&"input"===t.type)i.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=s.SHIFT&&e!=s.CTRL&&e!=s.ALT&&e!=s.TAB&&i.handleSearch(t)}})},t.prototype._transferTabIndex=function(){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},t.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";""!==this.$search.attr("placeholder")?t=this.$selection.find(".select2-selection__rendered").innerWidth():t=.75*(this.$search.val().length+1)+"em";this.$search.css("width",t)},t}),t.define("select2/selection/eventRelay",["jquery"],function(a){function t(){}return t.prototype.bind=function(t,e,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];t.call(this,e,n),e.on("*",function(t,e){if(-1!==a.inArray(t,r)){e=e||{};var n=a.Event("select2:"+t,{params:e});i.$element.trigger(n),-1!==a.inArray(t,o)&&(e.prevented=n.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,n){function i(t){this.dict=t||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(t){return this.dict[t]},i.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},i._cache={},i.loadPath=function(t){if(!(t in i._cache)){var e=n(t);i._cache[t]=e}return new i(i._cache[t])},i}),t.define("select2/diacritics",[],function(){return{"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u0152":"OE","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u0153":"oe","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03ce":"\u03c9","\u03c2":"\u03c3","\u2019":"'"}}),t.define("select2/data/base",["../utils"],function(i){function t(){t.__super__.constructor.call(this)}return i.Extend(t,i.Observable),t.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,e){var n=t.id+"-result-";return n+=i.generateChars(4),null!=e.id?n+="-"+e.id.toString():n+="-"+i.generateChars(4),n},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(t,s,l){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return s.Extend(n,t),n.prototype.current=function(t){var n=[],i=this;this.$element.find(":selected").each(function(){var t=l(this),e=i.item(t);n.push(e)}),t(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,l(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(t){var e=[];(r=[r]).push.apply(r,t);for(var n=0;n<r.length;n++){var i=r[n].id;-1===l.inArray(i,e)&&e.push(i)}o.$element.val(e),o.$element.trigger("change")});else{var t=r.id;this.$element.val(t),this.$element.trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple")){if(r.selected=!1,l(r.element).is("option"))return r.element.selected=!1,void this.$element.trigger("change");this.current(function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n].id;i!==r.id&&-1===l.inArray(i,e)&&e.push(i)}o.$element.val(e),o.$element.trigger("change")})}},n.prototype.bind=function(t){var e=this;(this.container=t).on("select",function(t){e.select(t.data)}),t.on("unselect",function(t){e.unselect(t.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){s.RemoveData(this)})},n.prototype.query=function(i,t){var r=[],o=this;this.$element.children().each(function(){var t=l(this);if(t.is("option")||t.is("optgroup")){var e=o.item(t),n=o.matches(i,e);null!==n&&r.push(n)}}),t({results:r})},n.prototype.addOptions=function(t){s.appendMany(this.$element,t)},n.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup")).label=t.text:(e=document.createElement("option")).textContent!==undefined?e.textContent=t.text:e.innerText=t.text,t.id!==undefined&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var n=l(e),i=this._normalizeItem(t);return i.element=e,s.StoreData(e,"data",i),n},n.prototype.item=function(t){var e={};if(null!=(e=s.GetData(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var n=t.children("option"),i=[],r=0;r<n.length;r++){var o=l(n[r]),a=this.item(o);i.push(a)}e.children=i}return(e=this._normalizeItem(e)).element=t[0],s.StoreData(t[0],"data",e),e},n.prototype._normalizeItem=function(t){t!==Object(t)&&(t={id:t,text:t});var e={selected:!1,disabled:!1};return null!=(t=l.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),l.extend({},e,t)},n.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},n}),t.define("select2/data/array",["./select","../utils","jquery"],function(t,p,g){function i(t,e){var n=e.get("data")||[];i.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(n))}return p.Extend(i,t),i.prototype.select=function(n){var t=this.$element.find("option").filter(function(t,e){return e.value==n.id.toString()});0===t.length&&(t=this.option(n),this.addOptions(t)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(t){function e(t){return function(){return g(this).val()==t.id}}for(var n=this,i=this.$element.find("option"),r=i.map(function(){return n.item(g(this)).id}).get(),o=[],a=0;a<t.length;a++){var s=this._normalizeItem(t[a]);if(0<=g.inArray(s.id,r)){var l=i.filter(e(s)),u=this.item(l),c=g.extend(!0,{},s,u),d=this.option(c);l.replaceWith(d)}else{var h=this.option(s);if(s.children){var f=this.convertToOptions(s.children);p.appendMany(h,f)}o.push(h)}}return o},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(t,e,o){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype._applyDefaults=function(t){var e={data:function(t){return o.extend({},t,{q:t.term})},transport:function(t,e,n){var i=o.ajax(t);return i.then(e),i.fail(n),i}};return o.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(n,i){function t(){var t=e.transport(e,function(t){var e=r.processResults(t,n);r.options.get("debug")&&window.console&&console.error&&(e&&e.results&&o.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(e)},function(){"status"in t&&(0===t.status||"0"===t.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=t}var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var e=o.extend({type:"GET"},this.ajaxOptions);"function"==typeof e.url&&(e.url=e.url.call(this.$element,n)),"function"==typeof e.data&&(e.data=e.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(t,this.ajaxOptions.delay)):t()},n}),t.define("select2/data/tags",["jquery"],function(c){function t(t,e,n){var i=n.get("tags"),r=n.get("createTag");r!==undefined&&(this.createTag=r);var o=n.get("insertTag");if(o!==undefined&&(this.insertTag=o),t.call(this,e,n),c.isArray(i))for(var a=0;a<i.length;a++){var s=i[a],l=this._normalizeItem(s),u=this.option(l);this.$element.append(u)}}return t.prototype.query=function(t,l,u){function c(t,e){for(var n=t.results,i=0;i<n.length;i++){var r=n[i],o=null!=r.children&&!c({results:r.children},!0);if((r.text||"").toUpperCase()===(l.term||"").toUpperCase()||o)return!e&&(t.data=n,void u(t))}if(e)return!0;var a=d.createTag(l);if(null!=a){var s=d.option(a);s.attr("data-select2-tag",!0),d.addOptions([s]),d.insertTag(n,a)}t.results=n,u(t)}var d=this;this._removeOldTags(),null!=l.term&&null==l.page?t.call(this,l,c):t.call(this,l,u)},t.prototype.createTag=function(t,e){var n=c.trim(e.term);return""===n?null:{id:n,text:n}},t.prototype.insertTag=function(t,e,n){e.unshift(n)},t.prototype._removeOldTags=function(){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||c(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(d){function t(t,e,n){var i=n.get("tokenizer");i!==undefined&&(this.tokenizer=i),t.call(this,e,n)}return t.prototype.bind=function(t,e,n){t.call(this,e,n),this.$search=e.dropdown.$search||e.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,e,n){function i(t){var e=o._normalizeItem(t);if(!o.$element.find("option").filter(function(){return d(this).val()===e.id}).length){var n=o.option(e);n.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([n])}r(e)}function r(t){o.trigger("select",{data:t})}var o=this;e.term=e.term||"";var a=this.tokenizer(e,this.options,i);a.term!==e.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.trigger("focus")),e.term=a.term),t.call(this,e,n)},t.prototype.tokenizer=function(t,e,n,i){for(var r=n.get("tokenSeparators")||[],o=e.term,a=0,s=this.createTag||function(t){return{id:t.term,text:t.term}};a<o.length;){var l=o[a];if(-1!==d.inArray(l,r)){var u=o.substr(0,a),c=s(d.extend({},e,{term:u}));null!=c?(i(c),o=o.substr(a+1)||"",a=0):a++}else a++}return{term:o}},t}),t.define("select2/data/minimumInputLength",[],function(){function t(t,e,n){this.minimumInputLength=n.get("minimumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t}),t.define("select2/data/maximumInputLength",[],function(){function t(t,e,n){this.maximumInputLength=n.get("maximumInputLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){e.term=e.term||"",0<this.maximumInputLength&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,n)},t}),t.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),t.call(this,e,n)}return t.prototype.query=function(n,i,r){var o=this;this.current(function(t){var e=null!=t?t.length:0;0<o.maximumSelectionLength&&e>=o.maximumSelectionLength?o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):n.call(o,i,r)})},t}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},n.prototype.bind=function(){},n.prototype.position=function(){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(r){function t(){}return t.prototype.render=function(t){var e=t.call(this),n=r('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),e.prepend(n),e},t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),this.$search.on("keydown",function(t){i.trigger("keypress",t),i._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(){r(this).off("keyup")}),this.$search.on("keyup input",function(t){i.handleSearch(t)}),e.on("open",function(){i.$search.attr("tabindex",0),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),e.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val(""),i.$search.trigger("blur")}),e.on("focus",function(){e.isOpen()||i.$search.trigger("focus")}),e.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(i.showSearch(t)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(){return!0},t}),t.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n,i)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var n=e.slice(0),i=e.length-1;0<=i;i--){var r=e[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},t}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function t(t,e,n,i){this.lastParams={},t.call(this,e,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("query",function(t){i.lastParams=t,i.loading=!0}),e.on("query:append",function(t){i.lastParams=t,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&t){var e=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loadMore()}},t.prototype.loadMore=function(){this.loading=!0;var t=n.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},t.prototype.createLoadingMore=function(){
|
|
var t=n('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),e=this.options.get("translations").get("loadingMore");return t.html(e(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,s){function t(t,e,n){this.$dropdownParent=n.get("dropdownParent")||f(document.body),t.call(this,e,n)}return t.prototype.bind=function(t,e,n){var i=this,r=!1;t.call(this,e,n),e.on("open",function(){i._showDropdown(),i._attachPositioningHandler(e),r||(r=!0,e.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),e.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),e.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},t.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},t.prototype.position=function(t,e,n){e.attr("class",n.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=n},t.prototype.render=function(t){var e=f("<span></span>"),n=t.call(this);return e.append(n),this.$dropdownContainer=e},t.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},t.prototype._attachPositioningHandler=function(t,e){var n=this,i="scroll.select2."+e.id,r="resize.select2."+e.id,o="orientationchange.select2."+e.id,a=this.$container.parents().filter(s.hasScroll);a.each(function(){s.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),a.on(i,function(){var t=s.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+o,function(){n._positionDropdown(),n._resizeDropdown()})},t.prototype._detachPositioningHandler=function(t,e){var n="scroll.select2."+e.id,i="resize.select2."+e.id,r="orientationchange.select2."+e.id;this.$container.parents().filter(s.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},t.prototype._positionDropdown=function(){var t=f(window),e=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var a={height:this.$dropdown.outerHeight(!1)},s={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},l=s.top<r.top-a.height,u=s.bottom>r.bottom+a.height,c={left:r.left,top:o.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var h=d.offset();c.top-=h.top,c.left-=h.left,e||n||(i="below"),u||!l||e?!l&&u&&e&&(i="below"):i="above",("above"==i||e&&"below"!==i)&&(c.top=o.top-h.top-a.height),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(c)},t.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},t.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},t}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function r(t){for(var e=0,n=0;n<t.length;n++){var i=t[n];i.children?e+=r(i.children):e++}return e}function t(t,e,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=Infinity),t.call(this,e,n,i)}return t.prototype.showSearch=function(t,e){return!(r(e.data.results)<this.minimumResultsForSearch)&&t.call(this,e)},t}),t.define("select2/dropdown/selectOnClose",["../utils"],function(o){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("close",function(t){i._handleSelectOnClose(t)})},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalSelect2Event){var n=e.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=o.GetData(i[0],"data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},t}),t.define("select2/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("select",function(t){i._selectTriggered(t)}),e.on("unselect",function(t){i._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var n=e.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:e})},t}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,n="Please delete "+e+" character";return 1!=e&&(n+="s"),n},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"},removeAllItems:function(){return"Remove all items"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(m,v,y,x,b,_,w,S,C,T,A,n,D,M,k,I,E,L,O,P,N,R,$,F,z,j,H,B,t){function e(){this.reset()}return e.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=k:null!=t.data?t.dataAdapter=M:t.dataAdapter=D,0<t.minimumInputLength&&(t.dataAdapter=T.Decorate(t.dataAdapter,L)),0<t.maximumInputLength&&(t.dataAdapter=T.Decorate(t.dataAdapter,O)),0<t.maximumSelectionLength&&(t.dataAdapter=T.Decorate(t.dataAdapter,P)),t.tags&&(t.dataAdapter=T.Decorate(t.dataAdapter,I)),null==t.tokenSeparators&&null==t.tokenizer||(t.dataAdapter=T.Decorate(t.dataAdapter,E)),null!=t.query){var e=v(t.amdBase+"compat/query");t.dataAdapter=T.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=v(t.amdBase+"compat/initSelection");t.dataAdapter=T.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=y,null!=t.ajax&&(t.resultsAdapter=T.Decorate(t.resultsAdapter,F)),null!=t.placeholder&&(t.resultsAdapter=T.Decorate(t.resultsAdapter,$)),t.selectOnClose&&(t.resultsAdapter=T.Decorate(t.resultsAdapter,H))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=N;else{var i=T.Decorate(N,R);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=T.Decorate(t.dropdownAdapter,j)),t.closeOnSelect&&(t.dropdownAdapter=T.Decorate(t.dropdownAdapter,B)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var r=v(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=T.Decorate(t.dropdownAdapter,r)}t.dropdownAdapter=T.Decorate(t.dropdownAdapter,z)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=b:t.selectionAdapter=x,null!=t.placeholder&&(t.selectionAdapter=T.Decorate(t.selectionAdapter,_)),t.allowClear&&(t.selectionAdapter=T.Decorate(t.selectionAdapter,w)),t.multiple&&(t.selectionAdapter=T.Decorate(t.selectionAdapter,S)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var o=v(t.amdBase+"compat/containerCss");t.selectionAdapter=T.Decorate(t.selectionAdapter,o)}t.selectionAdapter=T.Decorate(t.selectionAdapter,C)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var a=t.language.split("-")[0];t.language=[t.language,a]}else t.language=[t.language];if(m.isArray(t.language)){var s=new A;t.language.push("en");for(var l=t.language,u=0;u<l.length;u++){var c=l[u],d={};try{d=A.loadPath(c)}catch(p){try{c=this.defaults.amdLanguageBase+c,d=A.loadPath(c)}catch(g){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+c+'" could not be automatically loaded. A fallback will be used instead.');continue}}s.extend(d)}t.translations=s}else{var h=A.loadPath(this.defaults.amdLanguageBase+"en"),f=new A(t.language);f.extend(h),t.translations=f}return t},e.prototype.reset=function(){function a(t){function e(t){return n[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function s(t,e){if(""===m.trim(t.term))return e;if(e.children&&0<e.children.length){for(var n=m.extend(!0,{},e),i=e.children.length-1;0<=i;i--){null==s(t,e.children[i])&&n.children.splice(i,1)}return 0<n.children.length?n:s(t,n)}var r=a(e.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<r.indexOf(o)?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:T.escapeMarkup,language:t,matcher:s,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},e.prototype.set=function(t,e){var n={};n[m.camelCase(t)]=e;var i=T._convertData(n);m.extend(!0,this.defaults,i)},new e}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(i,d,r,h){function t(t,e){if(this.options=t,null!=e&&this.fromElement(e),this.options=r.apply(this.options),e&&e.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=h.Decorate(this.options.dataAdapter,n)}}return t.prototype.fromElement=function(t){function e(t,e){return e.toUpperCase()}var n=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),h.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),h.StoreData(t[0],"data",h.GetData(t[0],"select2Tags")),h.StoreData(t[0],"tags",!0)),h.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",h.GetData(t[0],"ajaxUrl")),h.StoreData(t[0],"ajax-Url",h.GetData(t[0],"ajaxUrl")));for(var i={},r=0;r<t[0].attributes.length;r++){var o=t[0].attributes[r].name,a="data-";if(o.substr(0,a.length)==a){var s=o.substring(a.length),l=h.GetData(t[0],s);i[s.replace(/-([a-z])/g,e)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&t[0].dataset&&(i=d.extend(!0,{},t[0].dataset,i));var u=d.extend(!0,{},h.GetData(t[0]),i);for(var c in u=h._convertData(u))-1<d.inArray(c,n)||(d.isPlainObject(this.options[c])?d.extend(this.options[c],u[c]):this.options[c]=u[c]);return this},t.prototype.get=function(t){return this.options[t]},t.prototype.set=function(t,e){this.options[t]=e},t}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(r,u,c,i){var d=function(t,e){null!=c.GetData(t[0],"select2")&&c.GetData(t[0],"select2").destroy(),this.$element=t,this.id=this._generateId(t),e=e||{},this.options=new u(e,t),d.__super__.constructor.call(this);var n=t.attr("tabindex")||0;c.StoreData(t[0],"old-tabindex",n),t.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(t,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var a=this.options.get("dropdownAdapter");this.dropdown=new a(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var s=this.options.get("resultsAdapter");this.results=new s(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){l.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(t[0],"select2",this),t.data("select2",this)};return c.Extend(d,c.Observable),d.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+c.generateChars(2):c.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},d.prototype._resolveWidth=function(t,e){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var i=this._resolveWidth(t,"style");return null!=i?i:this._resolveWidth(t,"element")}if("element"==e){var r=t.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=e)return"computedstyle"!=e?e:window.getComputedStyle(t[0]).width;var o=t.attr("style");if("string"!=typeof o)return null;for(var a=o.split(";"),s=0,l=a.length;s<l;s+=1){var u=a[s].replace(/\s/g,"").match(n);if(null!==u&&1<=u.length)return u[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=t?(this._observer=new t(function(t){r.each(t,e._syncA),r.each(t,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(t,e){n.trigger(t,e)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(t){n.focus(t)}),this.selection.on("*",function(t,e){-1===r.inArray(t,i)&&n.trigger(t,e)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(t,e){n.trigger(t,e)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(t,e){n.trigger(t,e)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(e){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(e,function(t){n.trigger("results:all",{data:t,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(t){n.trigger("results:append",{data:t,query:e})})}),this.on("keypress",function(t){var e=t.which;n.isOpen()?e===i.ESC||e===i.TAB||e===i.UP&&t.altKey?(n.close(),t.preventDefault()):e===i.ENTER?(n.trigger("results:select",{}),t.preventDefault()):e===i.SPACE&&t.ctrlKey?(n.trigger("results:toggle",{}),t.preventDefault()):e===i.UP?(n.trigger("results:previous",{}),t.preventDefault()):e===i.DOWN&&(n.trigger("results:next",{}),t.preventDefault()):(e===i.ENTER||e===i.SPACE||e===i.DOWN&&t.altKey)&&(n.open(),t.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._syncSubtree=function(t,e){var n=!1,i=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&0<e.addedNodes.length)for(var r=0;r<e.addedNodes.length;r++){e.addedNodes[r].selected&&(n=!0)}else e.removedNodes&&0<e.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(t){i.trigger("selection:update",{data:t})})}},d.prototype.trigger=function(t,e){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(e===undefined&&(e={}),t in i){var r=i[t],o={prevented:!1,name:t,args:e};if(n.call(this,r,o),o.prevented)return void(e.prevented=!0)}n.call(this,t,e)},d.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.trigger("query",{})},d.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},d.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var e=t[0];r.isArray(e)&&(e=r.map(e,function(t){return t.toString()})),this.$element.val(e).trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var t=r('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(t[0],"element",this.$element),t},d}),t.define("jquery-mousewheel",["jquery"],function(t){return t}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(r,t,o,e,a){if(null==r.fn.select2){var s=["open","close","destroy"];r.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each(function(){var t=r.extend(!0,{},e);new o(r(this),t)}),this;if("string"!=typeof e)throw new Error("Invalid arguments for Select2: "+e);var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=a.GetData(this,"select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=t[e].apply(t,i)}),-1<r.inArray(e,s)?this:n}}return null==r.fn.select2.defaults&&(r.fn.select2.defaults=e),o}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function u(){return Pn.apply(null,arguments)}function t(t){Pn=t}function r(t){return"[object Array]"===Object.prototype.toString.call(t)}function o(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function n(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function s(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function a(t,e){for(var n in e)s(e,n)&&(t[n]=e[n]);return s(e,"toString")&&(t.toString=e.toString),s(e,"valueOf")&&(t.valueOf=e.valueOf),t}function l(t,e,n,i){return Mt(t,e,n,i,!0).utc()}function e(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function c(t){return null==t._pf&&(t._pf=e()),t._pf}function d(t){if(null==t._isValid){var e=c(t);t._isValid=!(isNaN(t._d.getTime())||!(e.overflow<0)||e.empty||e.invalidMonth||e.invalidWeekday||e.nullInput||e.invalidFormat||e.userInvalidated),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function i(t){var e=l(NaN);return null!=t?a(c(e),t):c(e).userInvalidated=!0,e}function h(t,e){var n,i,r;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=c(e)),"undefined"!=typeof e._locale&&(t._locale=e._locale),0<Rn.length)for(n in Rn)void 0!==(r=e[i=Rn[n]])&&(t[i]=r);return t}function f(t){h(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),!1===$n&&($n=!0,u.updateOffset(this),$n=!1)}function p(t){return t instanceof f||null!=t&&null!=t._isAMomentObject}function g(t){return t<0?Math.ceil(t):Math.floor(t)}function m(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=g(e)),n}function v(t,e,n){var i,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),a=0;for(i=0;i<r;i++)(n&&t[i]!==e[i]||!n&&m(t[i])!==m(e[i]))&&a++;return a+o}function y(){}function x(t){return t?t.toLowerCase().replace("_","-"):t}function b(t){for(var e,n,i,r,o=0;o<t.length;){for(e=(r=x(t[o]).split("-")).length,n=(n=x(t[o+1]))?n.split("-"):null;0<e;){if(i=_(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&v(r,n,!0)>=e-1)break;e--}o++}return null}function _(t){var e=null;if(!Fn[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=Nn._abbr,require("./locale/"+t),w(e)}catch(r){}return Fn[t]}function w(t,e){var n;return t&&((n=void 0===e?C(t):S(t,e))&&(Nn=n)),Nn._abbr}function S(t,e){return null!==e?(e.abbr=t,Fn[t]=Fn[t]||new y,Fn[t].set(e),w(t),Fn[t]):(delete Fn[t],null)}function C(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Nn;if(!r(t)){if(e=_(t))return e;t=[t]}return b(t)}function T(t,e){var n=t.toLowerCase();zn[n]=zn[n+"s"]=zn[e]=t}function A(t){return"string"==typeof t?zn[t]||zn[t.toLowerCase()]:void 0}function D(t){var e,n,i={};for(n in t)s(t,n)&&((e=A(n))&&(i[e]=t[n]));return i}function M(e,n){return function(t){return null!=t?(I(this,e,t),u.updateOffset(this,n),this):k(this,e)}}function k(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function I(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function E(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if("function"==typeof this[t=A(t)])return this[t](e);return this}function L(t,e,n){var i=""+Math.abs(t),r=e-i.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function O(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(Vn[t]=r),e&&(Vn[e[0]]=function(){return L(r.apply(this,arguments),e[1],e[2])}),n&&(Vn[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function P(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function N(n){var i,r,o=n.match(jn);for(i=0,r=o.length;i<r;i++)Vn[o[i]]?o[i]=Vn[o[i]]:o[i]=P(o[i]);return function(t){var e="";for(i=0;i<r;i++)e+=o[i]instanceof Function?o[i].call(t,n):o[i];return e}}function R(t,e){return t.isValid()?(e=$(e,t.localeData()),Bn[e]=Bn[e]||N(e),Bn[e](t)):t.localeData().invalidDate()}function $(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(Hn.lastIndex=0;0<=i&&Hn.test(t);)t=t.replace(Hn,n),Hn.lastIndex=0,i-=1;return t}function F(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function z(t,e,n){ri[t]=F(e)?e:function(t){return t&&n?n:e}}function j(t,e){return s(ri,t)?ri[t](e._strict,e._locale):new RegExp(H(t))}function H(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function B(t,n){var e,i=n;for("string"==typeof t&&(t=[t]),"number"==typeof n&&(i=function(t,e){e[n]=m(t)}),e=0;e<t.length;e++)oi[t[e]]=i}function V(t,r){B(t,function(t,e,n,i){n._w=n._w||{},r(t,n._w,n,i)})}function W(t,e,n){null!=e&&s(oi,t)&&oi[t](e,n._a,n,t)}function U(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function q(t){return this._months[t.month()]}function G(t){return this._monthsShort[t.month()]}function Y(t,e,n){var i,r,o;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=l([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function Z(t,e){var n;return"string"==typeof e&&"number"!=typeof(e=t.localeData().monthsParse(e))||(n=Math.min(t.date(),U(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n)),t}function X(t){return null!=t?(Z(this,t),u.updateOffset(this,!0),this):k(this,"Month")}function K(){return U(this.year(),this.month())}function Q(t){var e,n=t._a;return n&&-2===c(t).overflow&&(e=n[si]<0||11<n[si]?si:n[li]<1||n[li]>U(n[ai],n[si])?li:n[ui]<0||24<n[ui]||24===n[ui]&&(0!==n[ci]||0!==n[di]||0!==n[hi])?ui:n[ci]<0||59<n[ci]?ci:n[di]<0||59<n[di]?di:n[hi]<0||999<n[hi]?hi:-1,c(t)._overflowDayOfYear&&(e<ai||li<e)&&(e=li),c(t).overflow=e),t}function J(t){!1===u.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function tt(t,e){var n=!0;return a(function(){return n&&(J(t+"\n"+(new Error).stack),n=!1),e.apply(this,arguments)},e)}function et(t,e){gi[t]||(J(e),gi[t]=!0)}function nt(t){var e,n,i=t._i,r=mi.exec(i);if(r){for(c(t).iso=!0,e=0,n=vi.length;e<n;e++)if(vi[e][1].exec(i)){t._f=vi[e][0];break}for(e=0,n=yi.length;e<n;e++)if(yi[e][1].exec(i)){t._f+=(r[6]||" ")+yi[e][0];break}i.match(ei)&&(t._f+="Z"),_t(t)}else t._isValid=!1}function it(t){var e=xi.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(nt(t),void(!1===t._isValid&&(delete t._isValid,u.createFromInputFallback(t))))}function rt(t,e,n,i,r,o,a){var s=new Date(t,e,n,i,r,o,a);return t<1970&&s.setFullYear(t),s}function ot(t){var e=new Date(Date.UTC.apply(null,arguments));return t<1970&&e.setUTCFullYear(t),e}function at(t){return st(t)?366:365}function st(t){return t%4==0&&t%100!=0||t%400==0}function lt(){return st(this.year())}function ut(t,e,n){var i,r=n-e,o=n-t.day();return r<o&&(o-=7),o<r-7&&(o+=7),i=kt(t).add(o,"d"),{week:Math.ceil(i.dayOfYear()/7),year:i.year()}}function ct(t){return ut(t,this._week.dow,this._week.doy).week}function dt(){return this._week.dow}function ht(){return this._week.doy}function ft(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function pt(t){var e=ut(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function gt(t,e,n,i,r){var o,a=6+r-i,s=ot(t,0,1+a).getUTCDay();return s<r&&(s+=7),{year:0<(o=1+a+7*(e-1)-s+(n=null!=n?1*n:r))?t:t-1,dayOfYear:0<o?o:at(t-1)+o}}function mt(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function vt(t,e,n){return null!=t?t:null!=e?e:n}function yt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function xt(t){var e,n,i,r,o=[];if(!t._d){for(i=yt(t),t._w&&null==t._a[li]&&null==t._a[si]&&bt(t),t._dayOfYear&&(r=vt(t._a[ai],i[ai]),t._dayOfYear>at(r)&&(c(t)._overflowDayOfYear=!0),n=ot(r,0,t._dayOfYear),t._a[si]=n.getUTCMonth(),t._a[li]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=i[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ui]&&0===t._a[ci]&&0===t._a[di]&&0===t._a[hi]&&(t._nextDay=!0,t._a[ui]=0),t._d=(t._useUTC?ot:rt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ui]=24)}}function bt(t){var e,n,i,r,o,a,s;null!=(e=t._w).GG||null!=e.W||null!=e.E?(o=1,a=4,n=vt(e.GG,t._a[ai],ut(kt(),1,4).year),i=vt(e.W,1),r=vt(e.E,1)):(o=t._locale._week.dow,a=t._locale._week.doy,n=vt(e.gg,t._a[ai],ut(kt(),o,a).year),i=vt(e.w,1),null!=e.d?(r=e.d)<o&&++i:r=null!=e.e?e.e+o:o),s=gt(n,i,r,a,o),t._a[ai]=s.year,t._dayOfYear=s.dayOfYear}function _t(t){if(t._f!==u.ISO_8601){t._a=[],c(t).empty=!0;var e,n,i,r,o,a=""+t._i,s=a.length,l=0;for(i=$(t._f,t._locale).match(jn)||[],e=0;e<i.length;e++)r=i[e],(n=(a.match(j(r,t))||[])[0])&&(0<(o=a.substr(0,a.indexOf(n))).length&&c(t).unusedInput.push(o),a=a.slice(a.indexOf(n)+n.length),l+=n.length),Vn[r]?(n?c(t).empty=!1:c(t).unusedTokens.push(r),W(r,n,t)):t._strict&&!n&&c(t).unusedTokens.push(r);c(t).charsLeftOver=s-l,0<a.length&&c(t).unusedInput.push(a),!0===c(t).bigHour&&t._a[ui]<=12&&0<t._a[ui]&&(c(t).bigHour=void 0),t._a[ui]=wt(t._locale,t._a[ui],t._meridiem),xt(t),Q(t)}else nt(t)}function wt(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0)),e)}function St(t){var e,n,i,r,o;if(0===t._f.length)return c(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<t._f.length;r++)o=0,e=h({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],_t(e),d(e)&&(o+=c(e).charsLeftOver,o+=10*c(e).unusedTokens.length,c(e).score=o,(null==i||o<i)&&(i=o,n=e));a(t,n||e)}
|
|
function Ct(t){if(!t._d){var e=D(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],xt(t)}}function Tt(t){var e=new f(Q(At(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function At(t){var e=t._i,n=t._f;return t._locale=t._locale||C(t._l),null===e||void 0===n&&""===e?i({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),p(e)?new f(Q(e)):(r(n)?St(t):n?_t(t):o(e)?t._d=e:Dt(t),t))}function Dt(t){var e=t._i;void 0===e?t._d=new Date:o(e)?t._d=new Date(+e):"string"==typeof e?it(t):r(e)?(t._a=n(e.slice(0),function(t){return parseInt(t,10)}),xt(t)):"object"==typeof e?Ct(t):"number"==typeof e?t._d=new Date(e):u.createFromInputFallback(t)}function Mt(t,e,n,i,r){var o={};return"boolean"==typeof n&&(i=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=r,o._l=n,o._i=t,o._f=e,o._strict=i,Tt(o)}function kt(t,e,n,i){return Mt(t,e,n,i,!1)}function It(t,e){var n,i;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return kt();for(n=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][t](n))&&(n=e[i]);return n}function Et(){return It("isBefore",[].slice.call(arguments,0))}function Lt(){return It("isAfter",[].slice.call(arguments,0))}function Ot(t){var e=D(t),n=e.year||0,i=e.quarter||0,r=e.month||0,o=e.week||0,a=e.day||0,s=e.hour||0,l=e.minute||0,u=e.second||0,c=e.millisecond||0;this._milliseconds=+c+1e3*u+6e4*l+36e5*s,this._days=+a+7*o,this._months=+r+3*i+12*n,this._data={},this._locale=C(),this._bubble()}function Pt(t){return t instanceof Ot}function Nt(t,n){O(t,0,0,function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+L(~~(t/60),2)+n+L(~~t%60,2)})}function Rt(t){var e=(t||"").match(ei)||[],n=((e[e.length-1]||[])+"").match(Ci)||["-",0,0],i=60*n[1]+m(n[2]);return"+"===n[0]?i:-i}function $t(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(p(t)||o(t)?+t:+kt(t))-+n,n._d.setTime(+n._d+i),u.updateOffset(n,!1),n):kt(t).local()}function Ft(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function zt(t,e){var n,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Rt(t)),Math.abs(t)<16&&(t*=60),!this._isUTC&&e&&(n=Ft(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==t&&(!e||this._changeInProgress?ee(this,Xt(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,u.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ft(this)}function jt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Ht(t){return this.utcOffset(0,t)}function Bt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ft(this),"m")),this}function Vt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Rt(this._i)),this}function Wt(t){return t=t?kt(t).utcOffset():0,(this.utcOffset()-t)%60==0}function Ut(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(h(t,this),(t=At(t))._a){var e=t._isUTC?l(t._a):kt(t._a);this._isDSTShifted=this.isValid()&&0<v(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}function Gt(){return!this._isUTC}function Yt(){return this._isUTC}function Zt(){return this._isUTC&&0===this._offset}function Xt(t,e){var n,i,r,o=t,a=null;return Pt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(a=Ti.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:m(a[li])*n,h:m(a[ui])*n,m:m(a[ci])*n,s:m(a[di])*n,ms:m(a[hi])*n}):(a=Ai.exec(t))?(n="-"===a[1]?-1:1,o={y:Kt(a[2],n),M:Kt(a[3],n),d:Kt(a[4],n),h:Kt(a[5],n),m:Kt(a[6],n),s:Kt(a[7],n),w:Kt(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=Jt(kt(o.from),kt(o.to)),(o={}).ms=r.milliseconds,o.M=r.months),i=new Ot(o),Pt(t)&&s(t,"_locale")&&(i._locale=t._locale),i}function Kt(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Qt(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Jt(t,e){var n;return e=$t(e,t),t.isBefore(e)?n=Qt(t,e):((n=Qt(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n}function te(i,r){return function(t,e){var n;return null===e||isNaN(+e)||(et(r,"moment()."+r+"(period, number) is deprecated. Please use moment()."+r+"(number, period)."),n=t,t=e,e=n),ee(this,Xt(t="string"==typeof t?+t:t,e),i),this}}function ee(t,e,n,i){var r=e._milliseconds,o=e._days,a=e._months;i=null==i||i,r&&t._d.setTime(+t._d+r*n),o&&I(t,"Date",k(t,"Date")+o*n),a&&Z(t,k(t,"Month")+a*n),i&&u.updateOffset(t,o||a)}function ne(t,e){var n=t||kt(),i=$t(n,this).startOf("day"),r=this.diff(i,"days",!0),o=r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse";return this.format(e&&e[o]||this.localeData().calendar(o,this,kt(n)))}function ie(){return new f(this)}function re(t,e){return"millisecond"===(e=A(void 0!==e?e:"millisecond"))?+(t=p(t)?t:kt(t))<+this:(p(t)?+t:+kt(t))<+this.clone().startOf(e)}function oe(t,e){var n;return"millisecond"===(e=A(void 0!==e?e:"millisecond"))?+this<+(t=p(t)?t:kt(t)):(n=p(t)?+t:+kt(t),+this.clone().endOf(e)<n)}function ae(t,e,n){return this.isAfter(t,n)&&this.isBefore(e,n)}function se(t,e){var n;return"millisecond"===(e=A(e||"millisecond"))?+this==+(t=p(t)?t:kt(t)):(n=+kt(t),+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e))}function le(t,e,n){var i,r,o=$t(t,this),a=6e4*(o.utcOffset()-this.utcOffset());return"year"===(e=A(e))||"month"===e||"quarter"===e?(r=ue(this,o),"quarter"===e?r/=3:"year"===e&&(r/=12)):(i=this-o,r="second"===e?i/1e3:"minute"===e?i/6e4:"hour"===e?i/36e5:"day"===e?(i-a)/864e5:"week"===e?(i-a)/6048e5:i),n?r:g(r)}function ue(t,e){var n,i=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(i,"months");return e-r<0?n=(e-r)/(r-t.clone().add(i-1,"months")):n=(e-r)/(t.clone().add(i+1,"months")-r),-(i+n)}function ce(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function de(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():R(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):R(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function he(t){var e=R(this,t||u.defaultFormat);return this.localeData().postformat(e)}function fe(t,e){return this.isValid()?Xt({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function pe(t){return this.from(kt(),t)}function ge(t,e){return this.isValid()?Xt({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function me(t){return this.to(kt(),t)}function ve(t){var e;return void 0===t?this._locale._abbr:(null!=(e=C(t))&&(this._locale=e),this)}function ye(){return this._locale}function xe(t){switch(t=A(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function be(t){return void 0===(t=A(t))||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")}function _e(){return+this._d-6e4*(this._offset||0)}function we(){return Math.floor(+this/1e3)}function Se(){return this._offset?new Date(+this):this._d}function Ce(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Te(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ae(){return d(this)}function De(){return a({},c(this))}function Me(){return c(this).overflow}function ke(t,e){O(0,[t,t.length],0,e)}function Ie(t,e,n){return ut(kt([t,11,31+e-n]),e,n).week}function Ee(t){var e=ut(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")}function Le(t){var e=ut(this,1,4).year;return null==t?e:this.add(t-e,"y")}function Oe(){return Ie(this.year(),1,4)}function Pe(){var t=this.localeData()._week;return Ie(this.year(),t.dow,t.doy)}function Ne(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Re(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function $e(t){return this._weekdays[t.day()]}function Fe(t){return this._weekdaysShort[t.day()]}function ze(t){return this._weekdaysMin[t.day()]}function je(t){var e,n,i;for(this._weekdaysParse=this._weekdaysParse||[],e=0;e<7;e++)if(this._weekdaysParse[e]||(n=kt([2e3,1]).day(e),i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function He(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Re(t,this.localeData()),this.add(t-e,"d")):e}function Be(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ve(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function We(t,e){O(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ue(t,e){return e._meridiemParse}function qe(t){return"p"===(t+"").toLowerCase().charAt(0)}function Ge(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"}function Ye(t,e){e[hi]=m(1e3*("0."+t))}function Ze(){return this._isUTC?"UTC":""}function Xe(){return this._isUTC?"Coordinated Universal Time":""}function Ke(t){return kt(1e3*t)}function Qe(){return kt.apply(null,arguments).parseZone()}function Je(t,e,n){var i=this._calendar[t];return"function"==typeof i?i.call(e,n):i}function tn(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function en(){return this._invalidDate}function nn(t){return this._ordinal.replace("%d",t)}function rn(t){return t}function on(t,e,n,i){var r=this._relativeTime[n];return"function"==typeof r?r(t,e,n,i):r.replace(/%d/i,t)}function an(t,e){var n=this._relativeTime[0<t?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function sn(t){var e,n;for(n in t)"function"==typeof(e=t[n])?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ln(t,e,n,i){var r=C(),o=l().set(i,e);return r[n](o,t)}function un(t,e,n,i,r){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ln(t,e,n,r);var o,a=[];for(o=0;o<i;o++)a[o]=ln(t,o,n,r);return a}function cn(t,e){return un(t,e,"months",12,"month")}function dn(t,e){return un(t,e,"monthsShort",12,"month")}function hn(t,e){return un(t,e,"weekdays",7,"day")}function fn(t,e){return un(t,e,"weekdaysShort",7,"day")}function pn(t,e){return un(t,e,"weekdaysMin",7,"day")}function gn(){var t=this._data;return this._milliseconds=Zi(this._milliseconds),this._days=Zi(this._days),this._months=Zi(this._months),t.milliseconds=Zi(t.milliseconds),t.seconds=Zi(t.seconds),t.minutes=Zi(t.minutes),t.hours=Zi(t.hours),t.months=Zi(t.months),t.years=Zi(t.years),this}function mn(t,e,n,i){var r=Xt(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function vn(t,e){return mn(this,t,e,1)}function yn(t,e){return mn(this,t,e,-1)}function xn(t){return t<0?Math.floor(t):Math.ceil(t)}function bn(){var t,e,n,i,r,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return 0<=o&&0<=a&&0<=s||o<=0&&a<=0&&s<=0||(o+=864e5*xn(wn(s)+a),s=a=0),l.milliseconds=o%1e3,t=g(o/1e3),l.seconds=t%60,e=g(t/60),l.minutes=e%60,n=g(e/60),l.hours=n%24,s+=r=g(_n(a+=g(n/24))),a-=xn(wn(r)),i=g(s/12),s%=12,l.days=a,l.months=s,l.years=i,this}function _n(t){return 4800*t/146097}function wn(t){return 146097*t/4800}function Sn(t){var e,n,i=this._milliseconds;if("month"===(t=A(t))||"year"===t)return e=this._days+i/864e5,n=this._months+_n(e),"month"===t?n:n/12;switch(e=this._days+Math.round(wn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function Cn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*m(this._months/12)}function Tn(t){return function(){return this.as(t)}}function An(t){return this[(t=A(t))+"s"]()}function Dn(t){return function(){return this._data[t]}}function Mn(){return g(this.days()/7)}function kn(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function In(t,e,n){var i=Xt(t).abs(),r=dr(i.as("s")),o=dr(i.as("m")),a=dr(i.as("h")),s=dr(i.as("d")),l=dr(i.as("M")),u=dr(i.as("y")),c=r<hr.s&&["s",r]||1===o&&["m"]||o<hr.m&&["mm",o]||1===a&&["h"]||a<hr.h&&["hh",a]||1===s&&["d"]||s<hr.d&&["dd",s]||1===l&&["M"]||l<hr.M&&["MM",l]||1===u&&["y"]||["yy",u];return c[2]=e,c[3]=0<+t,c[4]=n,kn.apply(null,c)}function En(t,e){return void 0!==hr[t]&&(void 0===e?hr[t]:(hr[t]=e,!0))}function Ln(t){var e=this.localeData(),n=In(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function On(){var t,e,n=fr(this._milliseconds)/1e3,i=fr(this._days),r=fr(this._months);e=g((t=g(n/60))/60),n%=60,t%=60;var o=g(r/12),a=r%=12,s=i,l=e,u=t,c=n,d=this.asSeconds();return d?(d<0?"-":"")+"P"+(o?o+"Y":"")+(a?a+"M":"")+(s?s+"D":"")+(l||u||c?"T":"")+(l?l+"H":"")+(u?u+"M":"")+(c?c+"S":""):"P0D"}var Pn,Nn,Rn=u.momentProperties=[],$n=!1,Fn={},zn={},jn=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Hn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Bn={},Vn={},Wn=/\d/,Un=/\d\d/,qn=/\d{3}/,Gn=/\d{4}/,Yn=/[+-]?\d{6}/,Zn=/\d\d?/,Xn=/\d{1,3}/,Kn=/\d{1,4}/,Qn=/[+-]?\d{1,6}/,Jn=/\d+/,ti=/[+-]?\d+/,ei=/Z|[+-]\d\d:?\d\d/gi,ni=/[+-]?\d+(\.\d{1,3})?/,ii=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ri={},oi={},ai=0,si=1,li=2,ui=3,ci=4,di=5,hi=6;O("M",["MM",2],"Mo",function(){return this.month()+1}),O("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),O("MMMM",0,0,function(t){return this.localeData().months(this,t)}),T("month","M"),z("M",Zn),z("MM",Zn,Un),z("MMM",ii),z("MMMM",ii),B(["M","MM"],function(t,e){e[si]=m(t)-1}),B(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[si]=r:c(n).invalidMonth=t});var fi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),gi={};u.suppressDeprecationWarnings=!1;var mi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],yi=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],xi=/^\/?Date\((\-?\d+)/i;u.createFromInputFallback=tt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),O(0,["YY",2],0,function(){return this.year()%100}),O(0,["YYYY",4],0,"year"),O(0,["YYYYY",5],0,"year"),O(0,["YYYYYY",6,!0],0,"year"),T("year","y"),z("Y",ti),z("YY",Zn,Un),z("YYYY",Kn,Gn),z("YYYYY",Qn,Yn),z("YYYYYY",Qn,Yn),B(["YYYYY","YYYYYY"],ai),B("YYYY",function(t,e){e[ai]=2===t.length?u.parseTwoDigitYear(t):m(t)}),B("YY",function(t,e){e[ai]=u.parseTwoDigitYear(t)});var bi=M("FullYear",!(u.parseTwoDigitYear=function(t){return m(t)+(68<m(t)?1900:2e3)}));O("w",["ww",2],"wo","week"),O("W",["WW",2],"Wo","isoWeek"),T("week","w"),T("isoWeek","W"),z("w",Zn),z("ww",Zn,Un),z("W",Zn),z("WW",Zn,Un),V(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=m(t)});var _i={dow:0,doy:6};O("DDD",["DDDD",3],"DDDo","dayOfYear"),T("dayOfYear","DDD"),z("DDD",Xn),z("DDDD",qn),B(["DDD","DDDD"],function(t,e,n){n._dayOfYear=m(t)}),u.ISO_8601=function(){};var wi=tt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=kt.apply(null,arguments);return t<this?this:t}),Si=tt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=kt.apply(null,arguments);return this<t?this:t});Nt("Z",":"),Nt("ZZ",""),z("Z",ei),z("ZZ",ei),B(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Rt(t)});var Ci=/([\+\-]|\d\d)/gi;u.updateOffset=function(){};var Ti=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ai=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Xt.fn=Ot.prototype;var Di=te(1,"add"),Mi=te(-1,"subtract");u.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var ki=tt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});O(0,["gg",2],0,function(){return this.weekYear()%100}),O(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ke("gggg","weekYear"),ke("ggggg","weekYear"),ke("GGGG","isoWeekYear"),ke("GGGGG","isoWeekYear"),T("weekYear","gg"),T("isoWeekYear","GG"),z("G",ti),z("g",ti),z("GG",Zn,Un),z("gg",Zn,Un),z("GGGG",Kn,Gn),z("gggg",Kn,Gn),z("GGGGG",Qn,Yn),z("ggggg",Qn,Yn),V(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=m(t)}),V(["gg","GG"],function(t,e,n,i){e[i]=u.parseTwoDigitYear(t)}),O("Q",0,0,"quarter"),T("quarter","Q"),z("Q",Wn),B("Q",function(t,e){e[si]=3*(m(t)-1)}),O("D",["DD",2],"Do","date"),T("date","D"),z("D",Zn),z("DD",Zn,Un),z("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),B(["D","DD"],li),B("Do",function(t,e){e[li]=m(t.match(Zn)[0],10)});var Ii=M("Date",!0);O("d",0,"do","day"),O("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),O("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),O("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),O("e",0,0,"weekday"),O("E",0,0,"isoWeekday"),T("day","d"),T("weekday","e"),T("isoWeekday","E"),z("d",Zn),z("e",Zn),z("E",Zn),z("dd",ii),z("ddd",ii),z("dddd",ii),V(["dd","ddd","dddd"],function(t,e,n){var i=n._locale.weekdaysParse(t);null!=i?e.d=i:c(n).invalidWeekday=t}),V(["d","e","E"],function(t,e,n,i){e[i]=m(t)});var Ei="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Li="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Oi="Su_Mo_Tu_We_Th_Fr_Sa".split("_");O("H",["HH",2],0,"hour"),O("h",["hh",2],0,function(){return this.hours()%12||12}),We("a",!0),We("A",!1),T("hour","h"),z("a",Ue),z("A",Ue),z("H",Zn),z("h",Zn),z("HH",Zn,Un),z("hh",Zn,Un),B(["H","HH"],ui),B(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),B(["h","hh"],function(t,e,n){e[ui]=m(t),c(n).bigHour=!0});var Pi=/[ap]\.?m?\.?/i,Ni=M("Hours",!0);O("m",["mm",2],0,"minute"),T("minute","m"),z("m",Zn),z("mm",Zn,Un),B(["m","mm"],ci);var Ri=M("Minutes",!1);O("s",["ss",2],0,"second"),T("second","s"),z("s",Zn),z("ss",Zn,Un),B(["s","ss"],di);var $i,Fi=M("Seconds",!1);for(O("S",0,0,function(){return~~(this.millisecond()/100)}),O(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),O(0,["SSS",3],0,"millisecond"),O(0,["SSSS",4],0,function(){return 10*this.millisecond()}),O(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),O(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),O(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),O(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),O(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),T("millisecond","ms"),z("S",Xn,Wn),z("SS",Xn,Un),z("SSS",Xn,qn),$i="SSSS";$i.length<=9;$i+="S")z($i,Jn);for($i="S";$i.length<=9;$i+="S")B($i,Ye);var zi=M("Milliseconds",!1);O("z",0,0,"zoneAbbr"),O("zz",0,0,"zoneName");var ji=f.prototype;ji.add=Di,ji.calendar=ne,ji.clone=ie,ji.diff=le,ji.endOf=be,ji.format=he,ji.from=fe,ji.fromNow=pe,ji.to=ge,ji.toNow=me,ji.get=E,ji.invalidAt=Me,ji.isAfter=re,ji.isBefore=oe,ji.isBetween=ae,ji.isSame=se,ji.isValid=Ae,ji.lang=ki,ji.locale=ve,ji.localeData=ye,ji.max=Si,ji.min=wi,ji.parsingFlags=De,ji.set=E,ji.startOf=xe,ji.subtract=Mi,ji.toArray=Ce,ji.toObject=Te,ji.toDate=Se,ji.toISOString=de,ji.toJSON=de,ji.toString=ce,ji.unix=we,ji.valueOf=_e,ji.year=bi,ji.isLeapYear=lt,ji.weekYear=Ee,ji.isoWeekYear=Le,ji.quarter=ji.quarters=Ne,ji.month=X,ji.daysInMonth=K,ji.week=ji.weeks=ft,ji.isoWeek=ji.isoWeeks=pt,ji.weeksInYear=Pe,ji.isoWeeksInYear=Oe,ji.date=Ii,ji.day=ji.days=He,ji.weekday=Be,ji.isoWeekday=Ve,ji.dayOfYear=mt,ji.hour=ji.hours=Ni,ji.minute=ji.minutes=Ri,ji.second=ji.seconds=Fi,ji.millisecond=ji.milliseconds=zi,ji.utcOffset=zt,ji.utc=Ht,ji.local=Bt,ji.parseZone=Vt,ji.hasAlignedHourOffset=Wt,ji.isDST=Ut,ji.isDSTShifted=qt,ji.isLocal=Gt,ji.isUtcOffset=Yt,ji.isUtc=Zt,ji.isUTC=Zt,ji.zoneAbbr=Ze,ji.zoneName=Xe,ji.dates=tt("dates accessor is deprecated. Use date instead.",Ii),ji.months=tt("months accessor is deprecated. Use month instead",X),ji.years=tt("years accessor is deprecated. Use year instead",bi),ji.zone=tt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",jt);var Hi=ji,Bi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Vi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Wi="Invalid date",Ui="%d",qi=/\d{1,2}/,Gi={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Yi=y.prototype;Yi._calendar=Bi,Yi.calendar=Je,Yi._longDateFormat=Vi,Yi.longDateFormat=tn,Yi._invalidDate=Wi,Yi.invalidDate=en,Yi._ordinal=Ui,Yi.ordinal=nn,Yi._ordinalParse=qi,Yi.preparse=rn,Yi.postformat=rn,Yi._relativeTime=Gi,Yi.relativeTime=on,Yi.pastFuture=an,Yi.set=sn,Yi.months=q,Yi._months=fi,Yi.monthsShort=G,Yi._monthsShort=pi,Yi.monthsParse=Y,Yi.week=ct,Yi._week=_i,Yi.firstDayOfYear=ht,Yi.firstDayOfWeek=dt,Yi.weekdays=$e,Yi._weekdays=Ei,Yi.weekdaysMin=ze,Yi._weekdaysMin=Oi,Yi.weekdaysShort=Fe,Yi._weekdaysShort=Li,Yi.weekdaysParse=je,Yi.isPM=qe,Yi._meridiemParse=Pi,Yi.meridiem=Ge,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===m(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),u.lang=tt("moment.lang is deprecated. Use moment.locale instead.",w),u.langData=tt("moment.langData is deprecated. Use moment.localeData instead.",C);var Zi=Math.abs,Xi=Tn("ms"),Ki=Tn("s"),Qi=Tn("m"),Ji=Tn("h"),tr=Tn("d"),er=Tn("w"),nr=Tn("M"),ir=Tn("y"),rr=Dn("milliseconds"),or=Dn("seconds"),ar=Dn("minutes"),sr=Dn("hours"),lr=Dn("days"),ur=Dn("months"),cr=Dn("years"),dr=Math.round,hr={s:45,m:45,h:22,d:26,M:11},fr=Math.abs,pr=Ot.prototype;return pr.abs=gn,pr.add=vn,pr.subtract=yn,pr.as=Sn,pr.asMilliseconds=Xi,pr.asSeconds=Ki,pr.asMinutes=Qi,pr.asHours=Ji,pr.asDays=tr,pr.asWeeks=er,pr.asMonths=nr,pr.asYears=ir,pr.valueOf=Cn,pr._bubble=bn,pr.get=An,pr.milliseconds=rr,pr.seconds=or,pr.minutes=ar,pr.hours=sr,pr.days=lr,pr.weeks=Mn,pr.months=ur,pr.years=cr,pr.humanize=Ln,pr.toISOString=On,pr.toString=On,pr.toJSON=On,pr.locale=ve,pr.localeData=ye,pr.toIsoString=tt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",On),pr.lang=ki,O("X",0,0,"unix"),O("x",0,0,"valueOf"),z("x",ti),z("X",ni),B("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),B("x",function(t,e,n){n._d=new Date(m(t))}),u.version="2.10.6",t(kt),u.fn=Hi,u.min=Et,u.max=Lt,u.utc=l,u.unix=Ke,u.months=cn,u.isDate=o,u.locale=w,u.invalid=i,u.duration=Xt,u.isMoment=p,u.weekdays=hn,u.parseZone=Qe,u.localeData=C,u.isDuration=Pt,u.monthsShort=dn,u.weekdaysMin=pn,u.defineLocale=S,u.weekdaysShort=fn,u.normalizeUnits=A,u.relativeTimeThreshold=En,u}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(window.jQuery||window.Zepto||window.$)}(function(f){var p=function(){for(var t,e,n,i=0,r=arguments.length;i<r;i++)p.isJquery(arguments[i])||p.isZepto(arguments[i])?t=arguments[i]:p.isElement(arguments[i])?t=f(arguments[i]):"function"==typeof arguments[i]?n=arguments[i]:"object"==typeof arguments[i]&&(e=arguments[i]);var o=new p.init(t,e);return"function"==typeof n&&n(o),o};p.isElement=function(t){return!(!t||"function"!=typeof HTMLElement&&"object"!=typeof HTMLElement||!(t instanceof HTMLElement))||!(!t||!t.nodeType||1!==t.nodeType)},p.isJquery=function(t){return!!(t&&t.length&&("function"==typeof jQuery||"object"==typeof jQuery)&&t instanceof jQuery)},p.isZepto=function(t){return!(!t||!t.length||"function"!=typeof Zepto&&"object"!=typeof Zepto||!Zepto.zepto.isZ(t))},p.getIndex=function(t,e){return e?t:t-1},p.getData=function(t,e){if("string"==typeof e&&e.length)for(var n=0,i=(e=e.split(".")).length;n<i;n++)t=t[e[n]];return t},p.init=function(t,e){var n=this;if(p.isJquery(t)||p.isZepto(t)){var i={dom:{box:t}};n.attach=p.attach.bind(i),n.detach=p.detach.bind(i),n.setOptions=p.setOptions.bind(i),n.clear=p.clear.bind(i),i.changeEvent=function(){p.selectChange.call(i,this.className)},i.settings=f.extend({},f.cxSelect.defaults,e,{url:i.dom.box.data("url"),emptyStyle:i.dom.box.data("emptyStyle"),required:i.dom.box.data("required"),firstTitle:i.dom.box.data("firstTitle"),firstValue:i.dom.box.data("firstValue"),jsonSpace:i.dom.box.data("jsonSpace"),jsonName:i.dom.box.data("jsonName"),jsonValue:i.dom.box.data("jsonValue"),jsonSub:i.dom.box.data("jsonSub")});var r=i.dom.box.data("selects");"string"==typeof r&&r.length&&(i.settings.selects=r.split(",")),n.setOptions(),n.attach(),i.settings.url||i.settings.data?f.isArray(i.settings.data)?p.start.call(i,i.settings.data):"string"==typeof i.settings.url&&i.settings.url.length&&f.getJSON(i.settings.url,function(t){p.start.call(i,t)}):p.start.apply(i)}},p.setOptions=function(t){var e=this;if(t&&f.extend(e.settings,t),(!f.isArray(e.selectArray)||!e.selectArray.length||t&&t.selects)&&(e.selectArray=[],f.isArray(e.settings.selects)&&e.settings.selects.length))for(var n,i=0,r=e.settings.selects.length;i<r&&((n=e.dom.box.find("select."+e.settings.selects[i]))&&n.length);i++)e.selectArray.push(n);t&&(!f.isArray(t.data)&&"string"==typeof t.url&&t.url.length?f.getJSON(e.settings.url,function(t){p.start.call(e,t)}):p.start.call(e,t.data))},p.attach=function(){var t=this;t.attachStatus||t.dom.box.on("change","select",t.changeEvent),"boolean"==typeof t.attachStatus&&p.start.call(t),t.attachStatus=!0},p.detach=function(){var t=this;t.dom.box.off("change","select",t.changeEvent),t.attachStatus=!1},p.clear=function(t){for(var e=this,n={display:"",visibility:""},i=t=isNaN(t)?0:t,r=e.selectArray.length;i<r;i++)e.selectArray[i].empty().prop("disabled",!0),"none"===e.settings.emptyStyle?n.display="none":"hidden"===e.settings.emptyStyle&&(n.visibility="hidden"),e.selectArray[i].css(n)},p.start=function(t){var e=this;if(f.isArray(t)&&(e.settings.data=p.getData(t,e.settings.jsonSpace)),e.selectArray.length){for(var n=0,i=e.selectArray.length;n<i;n++)"string"!=typeof e.selectArray[n].attr("data-value")&&e.selectArray[n][0].options.length&&e.selectArray[n].attr("data-value",e.selectArray[n].val());e.settings.data||"string"==typeof e.selectArray[0].data("url")&&e.selectArray[0].data("url").length?p.getOptionData.call(e,0):e.selectArray[0].prop("disabled",!1).css({display:"",visibility:""})}},p.getOptionData=function(e){var n=this;if(!("number"!=typeof e||isNaN(e)||e<0||e>=n.selectArray.length)){var i,t,r,o,a,s=n.selectArray[e],l=s.data("url"),u=void 0===s.data("jsonSpace")?n.settings.jsonSpace:s.data("jsonSpace"),c={};if(p.clear.call(n,e),"string"==typeof l&&l.length){if(0<e)for(var d=0,h=1;d<e;d++,h++)r=n.selectArray[h].data("queryName"),o=n.selectArray[d].attr("name"),a=n.selectArray[d].val(),"string"==typeof r&&r.length?c[r]=a:"string"==typeof o&&o.length&&(c[o]=a);f.getJSON(l,c,function(t){i=p.getData(t,u),p.buildOption.call(n,e,i)})}else if(n.settings.data&&"object"==typeof n.settings.data){i=n.settings.data;for(d=0;d<e;d++){if(t=p.getIndex(n.selectArray[d][0].selectedIndex,"boolean"==typeof n.selectArray[d].data("required")?n.selectArray[d].data("required"):n.settings.required),"object"!=typeof i[t]||!f.isArray(i[t][n.settings.jsonSub])||!i[t][n.settings.jsonSub].length){i=null;break}i=i[t][n.settings.jsonSub]}p.buildOption.call(n,e,i)}}},p.buildOption=function(t,e){var n=this,i=n.selectArray[t],r="boolean"==typeof i.data("required")?i.data("required"):n.settings.required,o=void 0===i.data("firstTitle")?n.settings.firstTitle:i.data("firstTitle"),a=void 0===i.data("firstValue")?n.settings.firstValue:i.data("firstValue"),s=void 0===i.data("jsonName")?n.settings.jsonName:i.data("jsonName"),l=void 0===i.data("jsonValue")?n.settings.jsonValue:i.data("jsonValue");if(f.isArray(e)){var u=r?"":'<option value="'+String(a)+'">'+String(o)+"</option>";if("string"==typeof s&&s.length){"string"==typeof l&&l.length||(l=s);for(var c=0,d=e.length;c<d;c++)u+='<option value="'+String(e[c][l])+'">'+String(e[c][s])+"</option>"}else for(c=0,d=e.length;c<d;c++)u+='<option value="'+String(e[c])+'">'+String(e[c])+"</option>";i.html(u).prop("disabled",!1).css({display:"",visibility:""}),"string"==typeof i.attr("data-value")&&(i.val(String(i.attr("data-value"))).removeAttr("data-value"),i[0].selectedIndex<0&&(i[0].options[0].selected=!0)),(r||0<i[0].selectedIndex)&&i.trigger("change")}},p.selectChange=function(t){var e=this;if("string"==typeof t&&t.length){var n;t=","+(t=t.replace(/\s+/g,","))+",";for(var i=0,r=e.selectArray.length;i<r;i++)if(-1<t.indexOf(","+e.settings.selects[i]+",")){n=i;break}"number"==typeof n&&-1<n&&(n+=1,p.getOptionData.call(e,n))}},f.cxSelect=function(){return p.apply(this,arguments)},f.cxSelect.defaults={selects:[],url:null,data:null,emptyStyle:null,required:!1,firstTitle:"\u8bf7\u9009\u62e9",firstValue:"",jsonSpace:"",jsonName:"n",jsonValue:"",jsonSub:"s"},f.fn.cxSelect=function(t,e){return this.each(function(){f.cxSelect(this,t,e)}),this}}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(M,k){function I(){return new Date(Date.UTC.apply(Date,arguments))}function E(){var t=new Date;return I(t.getFullYear(),t.getMonth(),t.getDate())}function o(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function t(t,e){return function(){return e!==k&&M.fn.datepicker.deprecated(e),this[t].apply(this,arguments)}}function u(t){return t&&!isNaN(t.getTime())}function c(t,e){function n(t,e){return e.toLowerCase()}var i=M(t).data(),r={},o=new RegExp("^"+e.toLowerCase()+"([A-Z])");for(var a in e=new RegExp("^"+e.toLowerCase()),i)e.test(a)&&(r[a.replace(o,n)]=i[a]);return r}function d(t){var n={};if(L[t]||(t=t.split("-")[0],L[t])){var i=L[t];return M.each(a,function(t,e){e in i&&(n[e]=i[e])}),n}}var e,n=(e={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),n=0,i=this.length;n<i;n++)if(0<=this[n].valueOf()-e&&this[n].valueOf()-e<864e5)return n;return-1},remove:function(t){this.splice(t,1)},replace:function(t){t&&(M.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var t=new n;return t.replace(this),t}},function(){var t=[];return t.push.apply(t,arguments),M.extend(t,e),t}),w=function(t,e){M.data(t,"datepicker",this),this._events=[],this._secondaryEvents=[],this._process_options(e),this.dates=new n,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=M(t),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=M(O.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),
|
|
this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(t,e){return Number(e)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};w.prototype={constructor:w,_resolveViewName:function(n){return M.each(O.viewModes,function(t,e){if(n===t||-1!==M.inArray(n,e.names))return n=t,!1}),n},_resolveDaysOfWeek:function(t){return M.isArray(t)||(t=t.split(/[,\s]*/)),M.map(t,Number)},_check_template:function(t){try{return t!==k&&""!==t&&((t.match(/[<>]/g)||[]).length<=0||0<M(t).length)}catch(e){return!1}},_process_options:function(t){this._o=M.extend({},this._o,t);var e=this.o=M.extend({},this._o),n=e.language;L[n]||(n=n.split("-")[0],L[n]||(n=f.language)),e.language=n,e.startView=this._resolveViewName(e.startView),e.minViewMode=this._resolveViewName(e.minViewMode),e.maxViewMode=this._resolveViewName(e.maxViewMode),e.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,e.startView)),!0!==e.multidate&&(e.multidate=Number(e.multidate)||!1,!1!==e.multidate&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var i=O.parseFormat(e.format);e.startDate!==-Infinity&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=O.parseDate(e.startDate,i,e.language,e.assumeNearbyYear):e.startDate=-Infinity),e.endDate!==Infinity&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=O.parseDate(e.endDate,i,e.language,e.assumeNearbyYear):e.endDate=Infinity),e.daysOfWeekDisabled=this._resolveDaysOfWeek(e.daysOfWeekDisabled||[]),e.daysOfWeekHighlighted=this._resolveDaysOfWeek(e.daysOfWeekHighlighted||[]),e.datesDisabled=e.datesDisabled||[],M.isArray(e.datesDisabled)||(e.datesDisabled=e.datesDisabled.split(",")),e.datesDisabled=M.map(e.datesDisabled,function(t){return O.parseDate(t,i,e.language,e.assumeNearbyYear)});var r=String(e.orientation).toLowerCase().split(/\s+/g),o=e.orientation.toLowerCase();if(r=M.grep(r,function(t){return/^auto|left|right|top|bottom$/.test(t)}),e.orientation={x:"auto",y:"auto"},o&&"auto"!==o)if(1===r.length)switch(r[0]){case"top":case"bottom":e.orientation.y=r[0];break;case"left":case"right":e.orientation.x=r[0]}else o=M.grep(r,function(t){return/^left|right$/.test(t)}),e.orientation.x=o[0]||"auto",o=M.grep(r,function(t){return/^top|bottom$/.test(t)}),e.orientation.y=o[0]||"auto";else;if(e.defaultViewDate instanceof Date||"string"==typeof e.defaultViewDate)e.defaultViewDate=O.parseDate(e.defaultViewDate,i,e.language,e.assumeNearbyYear);else if(e.defaultViewDate){var a=e.defaultViewDate.year||(new Date).getFullYear(),s=e.defaultViewDate.month||0,l=e.defaultViewDate.day||1;e.defaultViewDate=I(a,s,l)}else e.defaultViewDate=E()},_applyEvents:function(t){for(var e,n,i,r=0;r<t.length;r++)e=t[r][0],2===t[r].length?(n=k,i=t[r][1]):3===t[r].length&&(n=t[r][1],i=t[r][2]),e.on(i,n)},_unapplyEvents:function(t){for(var e,n,i,r=0;r<t.length;r++)e=t[r][0],2===t[r].length?(i=k,n=t[r][1]):3===t[r].length&&(i=t[r][1],n=t[r][2]),e.off(n,i)},_buildEvents:function(){var t={keyup:M.proxy(function(t){-1===M.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:M.proxy(this.keydown,this),paste:M.proxy(this.paste,this)};!0===this.o.showOnFocus&&(t.focus=M.proxy(this.show,this)),this.isInput?this._events=[[this.element,t]]:this.component&&this.inputField.length?this._events=[[this.inputField,t],[this.component,{click:M.proxy(this.show,this)}]]:this._events=[[this.element,{click:M.proxy(this.show,this),keydown:M.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:M.proxy(function(t){this._focused_from=t.target},this)}],[this.element,{blur:M.proxy(function(t){this._focused_from=t.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":M.proxy(function(t){this.update(t.date)},this)}]),this._secondaryEvents=[[this.picker,{click:M.proxy(this.click,this)}],[this.picker,".prev, .next",{click:M.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:M.proxy(this.dayCellClick,this)}],[M(window),{resize:M.proxy(this.place,this)}],[M(document),{"mousedown touchstart":M.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).length||this.picker.is(t.target)||this.picker.find(t.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var n=e||this.dates.get(-1),i=this._utc_to_local(n);this.element.trigger({type:t,date:i,viewMode:this.viewMode,dates:M.map(this.dates,this._utc_to_local),format:M.proxy(function(t,e){0===arguments.length?(t=this.dates.length-1,e=this.o.format):"string"==typeof t&&(e=t,t=this.dates.length-1),e=e||this.o.format;var n=this.dates.get(t);return O.formatDate(n,e,this.o.language)},this)})},show:function(){if(!(this.inputField.is(":disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&M(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")||(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide")),this},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var e;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==M.inArray("text/plain",t.originalEvent.clipboardData.types))e=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;e=window.clipboardData.getData("Text")}this.setDate(e),this.update(),t.preventDefault()},_utc_to_local:function(t){if(!t)return t;var e=new Date(t.getTime()+6e4*t.getTimezoneOffset());return e.getTimezoneOffset()!==t.getTimezoneOffset()&&(e=new Date(t.getTime()+6e4*e.getTimezoneOffset())),e},_local_to_utc:function(t){return t&&new Date(t.getTime()-6e4*t.getTimezoneOffset())},_zero_time:function(t){return t&&new Date(t.getFullYear(),t.getMonth(),t.getDate())},_zero_utc_time:function(t){return t&&I(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},getDates:function(){return M.map(this.dates,this._utc_to_local)},getUTCDates:function(){return M.map(this.dates,function(t){return new Date(t)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var t=this.dates.get(-1);return t!==k?new Date(t):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(t){var e=M.isArray(t)?t:arguments;return this.update.apply(this,e),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(t){var e=M.isArray(t)?t:arguments;return this.setDates.apply(this,M.map(e,this._utc_to_local)),this},setDate:t("setDates"),setUTCDate:t("setUTCDates"),remove:t("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var t=this.getFormattedDate();return this.inputField.val(t),this},getFormattedDate:function(e){e===k&&(e=this.o.format);var n=this.o.language;return M.map(this.dates,function(t){return O.formatDate(t,e,n)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(t){return this._process_options({startDate:t}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(t){return this._process_options({endDate:t}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(t){return this._process_options({daysOfWeekDisabled:t}),this.update(),this},setDaysOfWeekHighlighted:function(t){return this._process_options({daysOfWeekHighlighted:t}),this.update(),this},setDatesDisabled:function(t){return this._process_options({datesDisabled:t}),this.update(),this},place:function(){if(this.isInline)return this;var t=this.picker.outerWidth(),e=this.picker.outerHeight(),n=10,i=M(this.o.container),r=i.width(),o="body"===this.o.container?M(document).scrollTop():i.scrollTop(),a=i.offset(),s=[0];this.element.parents().each(function(){var t=M(this).css("z-index");"auto"!==t&&0!==Number(t)&&s.push(Number(t))});var l=Math.max.apply(Math,s)+this.o.zIndexOffset,u=this.component?this.component.parent().offset():this.element.offset(),c=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=u.left-a.left,f=u.top-a.top;"body"!==this.o.container&&(f+=o),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(h-=t-d)):u.left<0?(this.picker.addClass("datepicker-orient-left"),h-=u.left-n):r<h+t?(this.picker.addClass("datepicker-orient-right"),h+=d-t):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p=this.o.orientation.y;if("auto"===p&&(p=-o+f-e<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+p),"top"===p?f-=e+parseInt(this.picker.css("padding-top")):f+=c,this.o.rtl){var g=r-(h+d);this.picker.css({top:f,right:g,zIndex:l})}else this.picker.css({top:f,left:h,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),n=[],e=!1;return arguments.length?(M.each(arguments,M.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),n.push(e)},this)),e=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=M.map(n,M.proxy(function(t){return O.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),n=M.grep(n,M.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(n),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),e?(this.setValue(),this.element.change()):this.dates.length&&String(t)!==String(this.dates)&&e&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&t.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var t=this.o.weekStart,e="<tr>";for(this.o.calendarWeeks&&(e+='<th class="cw"> </th>');t<this.o.weekStart+7;)e+='<th class="dow',-1!==M.inArray(t,this.o.daysOfWeekDisabled)&&(e+=" disabled"),e+='">'+L[this.o.language].daysMin[t++%7]+"</th>";e+="</tr>",this.picker.find(".datepicker-days thead").append(e)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",n=0;n<12;n++)e+='<span class="month'+(t&&t.getMonth()===n?" focused":"")+'">'+L[this.o.language].monthsShort[n]+"</span>";this.picker.find(".datepicker-months td").html(e)},setRange:function(t){t&&t.length?this.range=M.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var e=[],n=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),r=E();return t.getUTCFullYear()<n||t.getUTCFullYear()===n&&t.getUTCMonth()<i?e.push("old"):(t.getUTCFullYear()>n||t.getUTCFullYear()===n&&t.getUTCMonth()>i)&&e.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&e.push("focused"),this.o.todayHighlight&&o(t,r)&&e.push("today"),-1!==this.dates.contains(t)&&e.push("active"),this.dateWithinRange(t)||e.push("disabled"),this.dateIsDisabled(t)&&e.push("disabled","disabled-date"),-1!==M.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&e.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&e.push("range"),-1!==M.inArray(t.valueOf(),this.range)&&e.push("selected"),t.valueOf()===this.range[0]&&e.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&e.push("range-end")),e},_fill_yearsView:function(t,e,n,i,r,o,a){for(var s,l,u,c="",d=n/10,h=this.picker.find(t),f=Math.floor(i/n)*n,p=f+9*d,g=Math.floor(this.viewDate.getFullYear()/d)*d,m=M.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/d)*d}),v=f-d;v<=p+d;v+=d)s=[e],l=null,v===f-d?s.push("old"):v===p+d&&s.push("new"),-1!==M.inArray(v,m)&&s.push("active"),(v<r||o<v)&&s.push("disabled"),v===g&&s.push("focused"),a!==M.noop&&((u=a(new Date(v,0,1)))===k?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&s.push("disabled"),u.classes&&(s=s.concat(u.classes.split(/\s+/))),u.tooltip&&(l=u.tooltip)),c+='<span class="'+s.join(" ")+'"'+(l?' title="'+l+'"':"")+">"+v+"</span>";h.find(".datepicker-switch").text(f+"-"+p),h.find("td").html(c)},fill:function(){var t,e,n=new Date(this.viewDate),r=n.getUTCFullYear(),i=n.getUTCMonth(),o=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,a=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,s=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,l=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,u=L[this.o.language].today||L.en.today||"",c=L[this.o.language].clear||L.en.clear||"",d=L[this.o.language].titleFormat||L.en.titleFormat,h=E(),f=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&h>=this.o.startDate&&h<=this.o.endDate&&!this.weekOfDateIsDisabled(h);if(!isNaN(r)&&!isNaN(i)){this.picker.find(".datepicker-days .datepicker-switch").text(O.formatDate(n,d,this.o.language)),this.picker.find("tfoot .today").text(u).css("display",f?"table-cell":"none"),this.picker.find("tfoot .clear").text(c).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var p=I(r,i,0),g=p.getUTCDate();p.setUTCDate(g-(p.getUTCDay()-this.o.weekStart+7)%7);var m=new Date(p);p.getUTCFullYear()<100&&m.setUTCFullYear(p.getUTCFullYear()),m.setUTCDate(m.getUTCDate()+42),m=m.valueOf();for(var v,y,x=[];p.valueOf()<m;){if((v=p.getUTCDay())===this.o.weekStart&&(x.push("<tr>"),this.o.calendarWeeks)){var b=new Date(+p+(this.o.weekStart-v-7)%7*864e5),_=new Date(Number(b)+(11-b.getUTCDay())%7*864e5),w=new Date(Number(w=I(_.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),S=(_-w)/864e5/7+1;x.push('<td class="cw">'+S+"</td>")}(y=this.getClassNames(p)).push("day");var C=p.getUTCDate();this.o.beforeShowDay!==M.noop&&((e=this.o.beforeShowDay(this._utc_to_local(p)))===k?e={}:"boolean"==typeof e?e={enabled:e}:"string"==typeof e&&(e={classes:e}),!1===e.enabled&&y.push("disabled"),e.classes&&(y=y.concat(e.classes.split(/\s+/))),e.tooltip&&(t=e.tooltip),e.content&&(C=e.content)),y=M.isFunction(M.uniqueSort)?M.uniqueSort(y):M.unique(y),x.push('<td class="'+y.join(" ")+'"'+(t?' title="'+t+'"':"")+' data-date="'+p.getTime().toString()+'">'+C+"</td>"),t=null,v===this.o.weekEnd&&x.push("</tr>"),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(x.join(""));var T=L[this.o.language].monthsTitle||L.en.monthsTitle||"Months",A=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?T:r).end().find("tbody span").removeClass("active");if(M.each(this.dates,function(t,e){e.getUTCFullYear()===r&&A.eq(e.getUTCMonth()).addClass("active")}),(r<o||s<r)&&A.addClass("disabled"),r===o&&A.slice(0,a).addClass("disabled"),r===s&&A.slice(l+1).addClass("disabled"),this.o.beforeShowMonth!==M.noop){var D=this;M.each(A,function(t,e){var n=new Date(r,t,1),i=D.o.beforeShowMonth(n);i===k?i={}:"boolean"==typeof i?i={enabled:i}:"string"==typeof i&&(i={classes:i}),!1!==i.enabled||M(e).hasClass("disabled")||M(e).addClass("disabled"),i.classes&&M(e).addClass(i.classes),i.tooltip&&M(e).prop("title",i.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,r,o,s,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,r,o,s,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,r,o,s,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,n=new Date(this.viewDate),i=n.getUTCFullYear(),r=n.getUTCMonth(),o=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,a=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,s=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,l=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,u=1;switch(this.viewMode){case 4:u*=10;case 3:u*=10;case 2:u*=10;case 1:t=Math.floor(i/u)*u<=o,e=Math.floor(i/u)*u+u>s;break;case 0:t=i<=o&&r<=a,e=s<=i&&l<=r}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(t){var e,n,i,r;t.preventDefault(),t.stopPropagation(),(e=M(t.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),e.hasClass("today")&&!e.hasClass("day")&&(this.setViewMode(0),this._setDate(E(),"linked"===this.o.todayBtn?null:"view")),e.hasClass("clear")&&this.clearDates(),e.hasClass("disabled")||(e.hasClass("month")||e.hasClass("year")||e.hasClass("decade")||e.hasClass("century"))&&(this.viewDate.setUTCDate(1),(n=1)===this.viewMode?(r=e.parent().find("span").index(e),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(r)):(r=0,i=Number(e.text()),this.viewDate.setUTCFullYear(i)),this._trigger(O.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(I(i,r,n)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(t){var e=M(t.currentTarget).data("date"),n=new Date(e);this.o.updateViewDate&&(n.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),n.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(n)},navArrowsClick:function(t){var e=M(t.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(e*=12*O.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,e),this._trigger(O.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||1<this.o.multidate||this.o.toggleActive)&&this.dates.remove(e):(!1===this.o.multidate&&this.dates.clear(),this.dates.push(t)),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),(!e&&this.o.updateViewDate||"view"===e)&&(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var n=new Date(t);return n.setUTCDate(t.getUTCDate()+e),n},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!u(t))return this.o.defaultViewDate;if(!e)return t;var n,i,r=new Date(t.valueOf()),o=r.getUTCDate(),a=r.getUTCMonth(),s=Math.abs(e);if(e=0<e?1:-1,1===s)i=-1===e?function(){return r.getUTCMonth()===a}:function(){return r.getUTCMonth()!==n},n=a+e,r.setUTCMonth(n),n=(n+12)%12;else{for(var l=0;l<s;l++)r=this.moveMonth(r,e);n=r.getUTCMonth(),r.setUTCDate(o),i=function(){return n!==r.getUTCMonth()}}for(;i();)r.setUTCDate(--o),r.setUTCMonth(n);return r},moveYear:function(t,e){return this.moveMonth(t,12*e)},moveAvailableDate:function(t,e,n){do{if(t=this[n](t,e),!this.dateWithinRange(t))return!1;n="moveDay"}while(this.dateIsDisabled(t));return t},weekOfDateIsDisabled:function(t){return-1!==M.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(e){return this.weekOfDateIsDisabled(e)||0<M.grep(this.o.datesDisabled,function(t){return o(e,t)}).length},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,n,i=!1,r=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(n=this.moveAvailableDate(r,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(n=this.moveAvailableDate(r,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?n=this.moveAvailableDate(r,e,"moveDay"):this.weekOfDateIsDisabled(r)||(n=this.moveAvailableDate(r,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(r,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(r,e,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation())},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+O.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var h=function(t,e){M.data(t,"datepicker",this),this.element=M(t),this.inputs=M.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,this.keepEmptyValues=e.keepEmptyValues,delete e.keepEmptyValues,r.call(M(this.inputs),e).on("changeDate",M.proxy(this.dateUpdated,this)),this.pickers=M.map(this.inputs,function(t){return M.data(t,"datepicker")}),this.updateDates()};h.prototype={updateDates:function(){this.dates=M.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var n=M.map(this.dates,function(t){return t.valueOf()});M.each(this.pickers,function(t,e){e.setRange(n)})},clearDates:function(){M.each(this.pickers,function(t,e){e.clearDates()})},dateUpdated:function(t){if(!this.updating){this.updating=!0;var n=M.data(t.target,"datepicker");if(n!==k){var i=n.getUTCDate(),r=this.keepEmptyValues,e=M.inArray(t.target,this.inputs),o=e-1,a=e+1,s=this.inputs.length;if(-1!==e){if(M.each(this.pickers,function(t,e){e.getUTCDate()||e!==n&&r||e.setUTCDate(i)}),i<this.dates[o])for(;0<=o&&i<this.dates[o];)this.pickers[o--].setUTCDate(i);else if(i>this.dates[a])for(;a<s&&i>this.dates[a];)this.pickers[a++].setUTCDate(i);this.updateDates(),delete this.updating}}}},destroy:function(){M.map(this.pickers,function(t){t.destroy()}),M(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:t("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var i=M.fn.datepicker,r=function(a){var s,l=Array.apply(null,arguments);if(l.shift(),this.each(function(){var t=M(this),e=t.data("datepicker"),n="object"==typeof a&&a;if(!e){var i=c(this,"date"),r=d(M.extend({},f,i,n).language),o=M.extend({},f,r,i,n);t.hasClass("input-daterange")||o.inputs?(M.extend(o,{inputs:o.inputs||t.find("input").toArray()}),e=new h(this,o)):e=new w(this,o),t.data("datepicker",e)}"string"==typeof a&&"function"==typeof e[a]&&(s=e[a].apply(e,l))}),s===k||s instanceof w||s instanceof h)return this;if(1<this.length)throw new Error("Using only allowed for the collection of a single element ("+a+" function)");return s};M.fn.datepicker=r;var f=M.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:M.noop,beforeShowMonth:M.noop,beforeShowYear:M.noop,beforeShowDecade:M.noop,beforeShowCentury:M.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},a=M.fn.datepicker.locale_opts=["format","rtl","weekStart"];M.fn.datepicker.Constructor=w;var L=M.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},O={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),n=t.match(this.validParts);if(!e||!e.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:e,parts:n}},parseDate:function(t,e,n,i){function r(t,e){return!0===e&&(e=10),t<100&&(t+=2e3)>(new Date).getFullYear()+e&&(t-=100),t}function o(){var t=this.slice(0,a[u].length),e=a[u].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!t)return k;if(t instanceof Date)return t;if("string"==typeof e&&(e=O.parseFormat(e)),e.toValue)return e.toValue(t,e,n);var a,s,l,u,c,d={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},h={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(t in h&&(t=h[t]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(t)){for(a=t.match(/([\-+]\d+)([dmwy])/gi),t=new Date,u=0;u<a.length;u++)s=a[u].match(/([\-+]\d+)([dmwy])/i),l=Number(s[1]),c=d[s[2].toLowerCase()],t=w.prototype[c](t,l);return w.prototype._zero_utc_time(t)}a=t&&t.match(this.nonpunctuation)||[];var f,p,g={},m=["yyyy","yy","M","MM","m","mm","d","dd"],v={yyyy:function(t,e){return t.setUTCFullYear(i?r(e,i):e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};v.yy=v.yyyy,v.M=v.MM=v.mm=v.m,v.dd=v.d,t=E();var y=e.parts.slice();if(a.length!==y.length&&(y=M(y).filter(function(t,e){return-1!==M.inArray(e,m)}).toArray()),a.length===y.length){var x,b,_;for(u=0,x=y.length;u<x;u++){if(f=parseInt(a[u],10),s=y[u],isNaN(f))switch(s){case"MM":p=M(L[n].months).filter(o),f=M.inArray(p[0],L[n].months)+1;break;case"M":p=M(L[n].monthsShort).filter(o),f=M.inArray(p[0],L[n].monthsShort)+1}g[s]=f}for(u=0;u<m.length;u++)(_=m[u])in g&&!isNaN(g[_])&&(b=new Date(t),v[_](b,g[_]),isNaN(b)||(t=b))}return t},formatDate:function(t,e,n){if(!t)return"";if("string"==typeof e&&(e=O.parseFormat(e)),e.toDisplay)return e.toDisplay(t,e,n);var i={d:t.getUTCDate(),D:L[n].daysShort[t.getUTCDay()],DD:L[n].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:L[n].monthsShort[t.getUTCMonth()],MM:L[n].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m,t=[];for(var r=M.extend([],e.separators),o=0,a=e.parts.length;o<=a;o++)r.length&&t.push(r.shift()),t.push(i[e.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+f.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+f.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};O.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+O.headTemplate+"<tbody></tbody>"+O.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+O.headTemplate+O.contTemplate+O.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+O.headTemplate+O.contTemplate+O.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+O.headTemplate+O.contTemplate+O.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+O.headTemplate+O.contTemplate+O.footTemplate+"</table></div></div>",M.fn.datepicker.DPGlobal=O,M.fn.datepicker.noConflict=function(){return M.fn.datepicker=i,this},M.fn.datepicker.version="1.9.0",M.fn.datepicker.deprecated=function(t){var e=window.console;e&&e.warn&&e.warn("DEPRECATED: "+t)},M(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=M(this);e.data("datepicker")||(t.preventDefault(),r.call(e,"show"))}),M(function(){r.call(M('[data-provide="datepicker-inline"]'))})}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(D,a){function r(){var t,e,n,i,r;if((n=(null!=(r=(e=(new Date).toString()).split("(")[1])?r.slice(0,-1):0)||e.split(" "))instanceof Array){i=[];for(var o=0,a=n.length;o<a;o++)(t=null!==(r=n[o].match(/\b[A-Z]+\b/)))&&r[0]&&i.push(t);n=i.pop()}return n}function M(){return new Date(Date.UTC.apply(Date,arguments))}"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,e){e===a&&(e=0),e<0&&(e+=this.length),e<0&&(e=0);for(var n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1});var y=function(t,o){var e=this;this.element=D(t),this.container=o.container||"body",this.language=o.language||this.element.data("date-language")||"en",this.language=this.language in I?this.language:this.language.split("-")[0],this.language=this.language in I?this.language:"en",this.isRTL=I[this.language].rtl||!1,this.formatType=o.formatType||this.element.data("format-type")||"standard",this.format=E.parseFormat(o.format||this.element.data("date-format")||I[this.language].format||E.getDefaultFormat(this.formatType,"input"),this.formatType),this.isInline=!1,this.isVisible=!1,this.isInput=this.element.is("input"),this.fontAwesome=o.fontAwesome||this.element.data("font-awesome")||!1,this.bootcssVer=o.bootcssVer||(this.isInput?this.element.is(".form-control")?3:2:this.bootcssVer=this.element.is(".input-group")?3:2),this.component=!!this.element.is(
|
|
".date")&&(3===this.bootcssVer?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent()),this.componentReset=!!this.element.is(".date")&&(3===this.bootcssVer?this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent():this.element.find(".add-on .icon-remove, .add-on .fa-times").parent()),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.linkField=o.linkField||this.element.data("link-field")||!1,this.linkFormat=E.parseFormat(o.linkFormat||this.element.data("link-format")||E.getDefaultFormat(this.formatType,"link"),this.formatType),this.minuteStep=o.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=o.pickerPosition||this.element.data("picker-position")||"bottom-right",this.showMeridian=o.showMeridian||this.element.data("show-meridian")||!1,this.initialDate=o.initialDate||new Date,this.zIndex=o.zIndex||this.element.data("z-index")||a,this.title="undefined"!=typeof o.title&&o.title,this.timezone=o.timezone||r(),this.icons={leftArrow:this.fontAwesome?"fa-arrow-left":3===this.bootcssVer?"glyphicon-arrow-left":"icon-arrow-left",rightArrow:this.fontAwesome?"fa-arrow-right":3===this.bootcssVer?"glyphicon-arrow-right":"icon-arrow-right"},this.icontype=this.fontAwesome?"fa":"glyphicon",this._attachEvents(),this.clickedOutside=function(t){0===D(t.target).closest(".datetimepicker").length&&e.hide()},this.formatViewType="datetime","formatViewType"in o?this.formatViewType=o.formatViewType:"formatViewType"in this.element.data()&&(this.formatViewType=this.element.data("formatViewType")),this.minView=0,"minView"in o?this.minView=o.minView:"minView"in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=E.convertViewMode(this.minView),this.maxView=E.modes.length-1,"maxView"in o?this.maxView=o.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=E.convertViewMode(this.maxView),this.wheelViewModeNavigation=!1,"wheelViewModeNavigation"in o?this.wheelViewModeNavigation=o.wheelViewModeNavigation:"wheelViewModeNavigation"in this.element.data()&&(this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")),this.wheelViewModeNavigationInverseDirection=!1,"wheelViewModeNavigationInverseDirection"in o?this.wheelViewModeNavigationInverseDirection=o.wheelViewModeNavigationInverseDirection:"wheelViewModeNavigationInverseDirection"in this.element.data()&&(this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")),this.wheelViewModeNavigationDelay=100,"wheelViewModeNavigationDelay"in o?this.wheelViewModeNavigationDelay=o.wheelViewModeNavigationDelay:"wheelViewModeNavigationDelay"in this.element.data()&&(this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")),this.startViewMode=2,"startView"in o?this.startViewMode=o.startView:"startView"in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=E.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,this.viewSelect=this.minView,"viewSelect"in o?this.viewSelect=o.viewSelect:"viewSelect"in this.element.data()&&(this.viewSelect=this.element.data("view-select")),this.viewSelect=E.convertViewMode(this.viewSelect),this.forceParse=!0,"forceParse"in o?this.forceParse=o.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse"));for(var n=3===this.bootcssVer?E.templateV3:E.template;-1!==n.indexOf("{iconType}");)n=n.replace("{iconType}",this.icontype);for(;-1!==n.indexOf("{leftArrow}");)n=n.replace("{leftArrow}",this.icons.leftArrow);for(;-1!==n.indexOf("{rightArrow}");)n=n.replace("{rightArrow}",this.icons.rightArrow);if(this.picker=D(n).appendTo(this.isInline?this.element:this.container).on({click:D.proxy(this.click,this),mousedown:D.proxy(this.mousedown,this)}),this.wheelViewModeNavigation&&(D.fn.mousewheel?this.picker.on({mousewheel:D.proxy(this.mousewheel,this)}):console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")),this.isInline?this.picker.addClass("datetimepicker-inline"):this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu"),this.isRTL){this.picker.addClass("datetimepicker-rtl");var i=3===this.bootcssVer?".prev span, .next span":".prev i, .next i";this.picker.find(i).toggleClass(this.icons.leftArrow+" "+this.icons.rightArrow)}D(document).on("mousedown touchend",this.clickedOutside),this.autoclose=!1,"autoclose"in o?this.autoclose=o.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in o?this.keyboardNavigation=o.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=o.todayBtn||this.element.data("date-today-btn")||!1,this.clearBtn=o.clearBtn||this.element.data("date-clear-btn")||!1,this.todayHighlight=o.todayHighlight||this.element.data("date-today-highlight")||!1,this.weekStart=0,"undefined"!=typeof o.weekStart?this.weekStart=o.weekStart:void 0!==this.element.data("date-weekstart")?this.weekStart=this.element.data("date-weekstart"):"undefined"!=typeof I[this.language].weekStart&&(this.weekStart=I[this.language].weekStart),this.weekStart=this.weekStart%7,this.weekEnd=(this.weekStart+6)%7,this.onRenderDay=function(t){var e=(o.onRenderDay||function(){return[]})(t);return"string"==typeof e&&(e=[e]),["day"].concat(e||[])},this.onRenderHour=function(t){var e=(o.onRenderHour||function(){return[]})(t);return"string"==typeof e&&(e=[e]),["hour"].concat(e||[])},this.onRenderMinute=function(t){var e=(o.onRenderMinute||function(){return[]})(t),n=["minute"];return"string"==typeof e&&(e=[e]),t<this.startDate||t>this.endDate?n.push("disabled"):Math.floor(this.date.getUTCMinutes()/this.minuteStep)===Math.floor(t.getUTCMinutes()/this.minuteStep)&&n.push("active"),n.concat(e||[])},this.onRenderYear=function(t){var e=(o.onRenderYear||function(){return[]})(t),n=["year"];"string"==typeof e&&(e=[e]),this.date.getUTCFullYear()===t.getUTCFullYear()&&n.push("active");var i=t.getUTCFullYear(),r=this.endDate.getUTCFullYear();return(t<this.startDate||r<i)&&n.push("disabled"),n.concat(e||[])},this.onRenderMonth=function(t){var e=(o.onRenderMonth||function(){return[]})(t);return"string"==typeof e&&(e=[e]),["month"].concat(e||[])},this.startDate=new Date(-8639968443048e3),this.endDate=new Date(8639968443048e3),this.datesDisabled=[],this.daysOfWeekDisabled=[],this.setStartDate(o.startDate||this.element.data("date-startdate")),this.setEndDate(o.endDate||this.element.data("date-enddate")),this.setDatesDisabled(o.datesDisabled||this.element.data("date-dates-disabled")),this.setDaysOfWeekDisabled(o.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.setMinutesDisabled(o.minutesDisabled||this.element.data("date-minute-disabled")),this.setHoursDisabled(o.hoursDisabled||this.element.data("date-hour-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};y.prototype={constructor:y,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:D.proxy(this.show,this),keyup:D.proxy(this.update,this),keydown:D.proxy(this.keydown,this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:D.proxy(this.show,this),keyup:D.proxy(this.update,this),keydown:D.proxy(this.keydown,this)}],[this.component,{click:D.proxy(this.show,this)}]],this.componentReset&&this._events.push([this.componentReset,{click:D.proxy(this.reset,this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:D.proxy(this.show,this)}]];for(var t,e,n=0;n<this._events.length;n++)t=this._events[n][0],e=this._events[n][1],t.on(e)},_detachEvents:function(){for(var t,e,n=0;n<this._events.length;n++)t=this._events[n][0],e=this._events[n][1],t.off(e);this._events=[]},show:function(t){this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.forceParse&&this.update(),this.place(),D(window).on("resize",D.proxy(this.place,this)),t&&(t.stopPropagation(),t.preventDefault()),this.isVisible=!0,this.element.trigger({type:"show",date:this.date})},hide:function(){this.isVisible&&(this.isInline||(this.picker.hide(),D(window).off("resize",this.place),this.viewMode=this.startViewMode,this.showMode(),this.isInput||D(document).off("mousedown",this.hide),this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this.isVisible=!1,this.element.trigger({type:"hide",date:this.date})))},remove:function(){this._detachEvents(),D(document).off("mousedown",this.clickedOutside),this.picker.remove(),delete this.picker,delete this.element.data().datetimepicker},getDate:function(){var t=this.getUTCDate();return null===t?null:new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},getInitialDate:function(){return this.initialDate},setInitialDate:function(t){this.initialDate=t},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){t>=this.startDate&&t<=this.endDate?(this.date=t,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:t,startDate:this.startDate,endDate:this.endDate})},setFormat:function(t){var e;this.format=E.parseFormat(t,this.formatType),this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val()&&this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):(this.component&&this.element.find("input").val(t),this.element.data("date",t)),this.linkField&&D("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(t){return t=t||this.format,E.formatDate(this.date,t,this.language,this.formatType,this.timezone)},setStartDate:function(t){this.startDate=t||this.startDate,8639968443048e3!==this.startDate.valueOf()&&(this.startDate=E.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setEndDate:function(t){this.endDate=t||this.endDate,8639968443048e3!==this.endDate.valueOf()&&(this.endDate=E.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setDatesDisabled:function(t){this.datesDisabled=t||[],D.isArray(this.datesDisabled)||(this.datesDisabled=this.datesDisabled.split(/,\s*/));var e=this;this.datesDisabled=D.map(this.datesDisabled,function(t){return E.parseDate(t,e.format,e.language,e.formatType,e.timezone).toDateString()}),this.update(),this.updateNavArrows()},setTitle:function(t,e){return this.picker.find(t).find("th:eq(1)").text(!1===this.title?e:this.title)},setDaysOfWeekDisabled:function(t){this.daysOfWeekDisabled=t||[],D.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=D.map(this.daysOfWeekDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},setMinutesDisabled:function(t){this.minutesDisabled=t||[],D.isArray(this.minutesDisabled)||(this.minutesDisabled=this.minutesDisabled.split(/,\s*/)),this.minutesDisabled=D.map(this.minutesDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},setHoursDisabled:function(t){this.hoursDisabled=t||[],D.isArray(this.hoursDisabled)||(this.hoursDisabled=this.hoursDisabled.split(/,\s*/)),this.hoursDisabled=D.map(this.hoursDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){if(!this.zIndex){var e=0;D("div").each(function(){var t=parseInt(D(this).css("zIndex"),10);e<t&&(e=t)}),this.zIndex=e+10}var t,n,i,r;r=this.container instanceof D?this.container.offset():D(this.container).offset(),this.component?(i=(t=this.component.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(i+=this.component.outerWidth()-this.picker.outerWidth())):(i=(t=this.element.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(i+=this.element.outerWidth()-this.picker.outerWidth()));var o=document.body.clientWidth||window.innerWidth;o<i+220&&(i=o-220),n="top-left"===this.pickerPosition||"top-right"===this.pickerPosition?t.top-this.picker.outerHeight():t.top+this.height,n-=r.top,i-=r.left,this.picker.css({top:n,left:i,zIndex:this.zIndex})}},hour_minute:"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",update:function(t){var e,n=!1;arguments&&arguments.length&&("string"==typeof t||t instanceof Date)?(e=t,n=!0):"string"==typeof(e=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate)&&(e=e.replace(/^\s+|\s+$/g,"")),e||(e=new Date,n=!1),"string"==typeof e&&(new RegExp(this.hour_minute).test(e)||new RegExp(this.hour_minute+":[0-5][0-9]").test(e))&&(e=this.getDate()),this.date=E.parseDate(e,this.format,this.language,this.formatType,this.timezone),n&&this.setValue(),this.date<this.startDate?this.viewDate=new Date(this.startDate):this.date>this.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var t=this.weekStart,e="<tr>";t<this.weekStart+7;)e+='<th class="dow">'+I[this.language].daysMin[t++%7]+"</th>";e+="</tr>",this.picker.find(".datetimepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=new Date(this.viewDate),n=0;n<12;n++){e.setUTCMonth(n),t+='<span class="'+this.onRenderMonth(e).join(" ")+'">'+I[this.language].monthsShort[n]+"</span>"}this.picker.find(".datetimepicker-months td").html(t)},fill:function(){if(this.date&&this.viewDate){var t=new Date(this.viewDate),e=t.getUTCFullYear(),n=t.getUTCMonth(),i=t.getUTCDate(),r=t.getUTCHours(),o=this.startDate.getUTCFullYear(),a=this.startDate.getUTCMonth(),s=this.endDate.getUTCFullYear(),l=this.endDate.getUTCMonth()+1,u=new M(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),c=new Date;if(this.setTitle(".datetimepicker-days",I[this.language].months[n]+" "+e),"time"===this.formatViewType){var d=this.getFormattedDate();this.setTitle(".datetimepicker-hours",d),this.setTitle(".datetimepicker-minutes",d)}else this.setTitle(".datetimepicker-hours",i+" "+I[this.language].months[n]+" "+e),this.setTitle(".datetimepicker-minutes",i+" "+I[this.language].months[n]+" "+e);this.picker.find("tfoot th.today").text(I[this.language].today||I.en.today).toggle(!1!==this.todayBtn),this.picker.find("tfoot th.clear").text(I[this.language].clear||I.en.clear).toggle(!1!==this.clearBtn),this.updateNavArrows(),this.fillMonths();var h=M(e,n-1,28,0,0,0,0),f=E.getDaysInMonth(h.getUTCFullYear(),h.getUTCMonth());h.setUTCDate(f),h.setUTCDate(f-(h.getUTCDay()-this.weekStart+7)%7);var p=new Date(h);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();for(var g,m=[];h.valueOf()<p;)h.getUTCDay()===this.weekStart&&m.push("<tr>"),g=this.onRenderDay(h),h.getUTCFullYear()<e||h.getUTCFullYear()===e&&h.getUTCMonth()<n?g.push("old"):(h.getUTCFullYear()>e||h.getUTCFullYear()===e&&h.getUTCMonth()>n)&&g.push("new"),this.todayHighlight&&h.getUTCFullYear()===c.getFullYear()&&h.getUTCMonth()===c.getMonth()&&h.getUTCDate()===c.getDate()&&g.push("today"),h.valueOf()===u&&g.push("active"),(h.valueOf()+864e5<=this.startDate||h.valueOf()>this.endDate||-1!==D.inArray(h.getUTCDay(),this.daysOfWeekDisabled)||-1!==D.inArray(h.toDateString(),this.datesDisabled))&&g.push("disabled"),m.push('<td class="'+g.join(" ")+'">'+h.getUTCDate()+"</td>"),h.getUTCDay()===this.weekEnd&&m.push("</tr>"),h.setUTCDate(h.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(m.join("")),m=[];var v="",y="",x="",b=this.hoursDisabled||[];t=new Date(this.viewDate);for(var _=0;_<24;_++){t.setUTCHours(_),g=this.onRenderHour(t),-1!==b.indexOf(_)&&g.push("disabled");var w=M(e,n,i,_);w.valueOf()+36e5<=this.startDate||w.valueOf()>this.endDate?g.push("disabled"):r===_&&g.push("active"),this.showMeridian&&2===I[this.language].meridiem.length?((y=_<12?I[this.language].meridiem[0]:I[this.language].meridiem[1])!==x&&(""!==x&&m.push("</fieldset>"),m.push('<fieldset class="hour"><legend>'+y.toUpperCase()+"</legend>")),x=y,v=_%12?_%12:12,_<12?g.push("hour_am"):g.push("hour_pm"),m.push('<span class="'+g.join(" ")+'">'+v+"</span>"),23===_&&m.push("</fieldset>")):(v=_+":00",m.push('<span class="'+g.join(" ")+'">'+v+"</span>"))}this.picker.find(".datetimepicker-hours td").html(m.join("")),m=[],x=y=v="";var S=this.minutesDisabled||[];t=new Date(this.viewDate);for(_=0;_<60;_+=this.minuteStep)-1===S.indexOf(_)&&(t.setUTCMinutes(_),t.setUTCSeconds(0),g=this.onRenderMinute(t),this.showMeridian&&2===I[this.language].meridiem.length?((y=r<12?I[this.language].meridiem[0]:I[this.language].meridiem[1])!==x&&(""!==x&&m.push("</fieldset>"),m.push('<fieldset class="minute"><legend>'+y.toUpperCase()+"</legend>")),x=y,v=r%12?r%12:12,m.push('<span class="'+g.join(" ")+'">'+v+":"+(_<10?"0"+_:_)+"</span>"),59===_&&m.push("</fieldset>")):(v=_+":00",m.push('<span class="'+g.join(" ")+'">'+r+":"+(_<10?"0"+_:_)+"</span>")));this.picker.find(".datetimepicker-minutes td").html(m.join(""));var C=this.date.getUTCFullYear(),T=this.setTitle(".datetimepicker-months",e).end().find(".month").removeClass("active");C===e&&T.eq(this.date.getUTCMonth()).addClass("active"),(e<o||s<e)&&T.addClass("disabled"),e===o&&T.slice(0,a).addClass("disabled"),e===s&&T.slice(l).addClass("disabled"),m="",e=10*parseInt(e/10,10);var A=this.setTitle(".datetimepicker-years",e+"-"+(e+9)).end().find("td");e-=1,t=new Date(this.viewDate);for(_=-1;_<11;_++)t.setUTCFullYear(e),g=this.onRenderYear(t),-1!==_&&10!==_||g.push(k),m+='<span class="'+g.join(" ")+'">'+e+"</span>",e+=1;A.html(m),this.place()}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),n=t.getUTCMonth(),i=t.getUTCDate(),r=t.getUTCHours();switch(this.viewMode){case 0:e<=this.startDate.getUTCFullYear()&&n<=this.startDate.getUTCMonth()&&i<=this.startDate.getUTCDate()&&r<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&n>=this.endDate.getUTCMonth()&&i>=this.endDate.getUTCDate()&&r>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:e<=this.startDate.getUTCFullYear()&&n<=this.startDate.getUTCMonth()&&i<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&n>=this.endDate.getUTCMonth()&&i>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:e<=this.startDate.getUTCFullYear()&&n<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&n>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:e<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(t){if(t.preventDefault(),t.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var e=t.originalEvent.wheelDelta,n=0<e?1:0===e?0:-1;this.wheelViewModeNavigationInverseDirection&&(n=-n),this.showMode(n),setTimeout(D.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(t){t.stopPropagation(),t.preventDefault();var e=D(t.target).closest("span, td, th, legend");if(e.is("."+this.icontype)&&(e=D(e).parent().closest("span, td, th, legend")),1===e.length){if(e.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(e[0].nodeName.toLowerCase()){case"th":switch(e[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var n=E.modes[this.viewMode].navStep*("prev"===e[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,n);break;case 1:this.viewDate=this.moveDate(this.viewDate,n);break;case 2:this.viewDate=this.moveMonth(this.viewDate,n);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,n)}this.fill(),this.element.trigger({type:e[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset(),this.autoclose&&this.hide();break;case"today":var i=new Date;(i=M(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),0))<this.startDate?i=this.startDate:i>this.endDate&&(i=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(i),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!e.is(".disabled")){var r=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),a=this.viewDate.getUTCDate(),s=this.viewDate.getUTCHours(),l=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(e.is(".month")?(this.viewDate.setUTCDate(1),o=e.parent().find("span").index(e),a=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(o),this.element.trigger({type:"changeMonth",date:this.viewDate}),3<=this.viewSelect&&this._setDate(M(r,o,a,s,l,u,0))):e.is(".year")?(this.viewDate.setUTCDate(1),r=parseInt(e.text(),10)||0,this.viewDate.setUTCFullYear(r),this.element.trigger({type:"changeYear",date:this.viewDate}),4<=this.viewSelect&&this._setDate(M(r,o,a,s,l,u,0))):e.is(".hour")?(s=parseInt(e.text(),10)||0,(e.hasClass("hour_am")||e.hasClass("hour_pm"))&&(12===s&&e.hasClass("hour_am")?s=0:12!==s&&e.hasClass("hour_pm")&&(s+=12)),this.viewDate.setUTCHours(s),this.element.trigger({type:"changeHour",date:this.viewDate}),1<=this.viewSelect&&this._setDate(M(r,o,a,s,l,u,0))):e.is(".minute")&&(l=parseInt(e.text().substr(e.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(l),this.element.trigger({type:"changeMinute",date:this.viewDate}),0<=this.viewSelect&&this._setDate(M(r,o,a,s,l,u,0))),0!==this.viewMode){var c=this.viewMode;this.showMode(-1),this.fill(),c===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(e.is(".day")&&!e.is(".disabled")){a=parseInt(e.text(),10)||1,r=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),s=this.viewDate.getUTCHours(),l=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();e.is(".old")?0===o?(o=11,r-=1):o-=1:e.is(".new")&&(11===o?(o=0,r+=1):o+=1),this.viewDate.setUTCFullYear(r),this.viewDate.setUTCMonth(o,a),this.element.trigger({type:"changeDay",date:this.viewDate}),2<=this.viewSelect&&this._setDate(M(r,o,a,s,l,u,0))}c=this.viewMode;this.showMode(-1),this.fill(),c===this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(t,e){var n;e&&"date"!==e||(this.date=t),e&&"view"!==e||(this.viewDate=t),this.fill(),this.setValue(),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.element.trigger({type:"changeDate",date:this.getDate()}),null===t&&(this.date=this.viewDate)},moveMinute:function(t,e){if(!e)return t;var n=new Date(t.valueOf());return n.setUTCMinutes(n.getUTCMinutes()+e*this.minuteStep),n},moveHour:function(t,e){if(!e)return t;var n=new Date(t.valueOf());return n.setUTCHours(n.getUTCHours()+e),n},moveDate:function(t,e){if(!e)return t;var n=new Date(t.valueOf());return n.setUTCDate(n.getUTCDate()+e),n},moveMonth:function(t,e){if(!e)return t;var n,i,r=new Date(t.valueOf()),o=r.getUTCDate(),a=r.getUTCMonth(),s=Math.abs(e);if(e=0<e?1:-1,1===s)i=-1===e?function(){return r.getUTCMonth()===a}:function(){return r.getUTCMonth()!==n},n=a+e,r.setUTCMonth(n),(n<0||11<n)&&(n=(n+12)%12);else{for(var l=0;l<s;l++)r=this.moveMonth(r,e);n=r.getUTCMonth(),r.setUTCDate(o),i=function(){return n!==r.getUTCMonth()}}for(;i();)r.setUTCDate(--o),r.setUTCMonth(n);return r},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.startDate&&t<=this.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27===t.keyCode&&this.show();else{var e,n,i,r,o=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;e=37===t.keyCode?-1:1;var a=this.viewMode;t.ctrlKey?a+=2:t.shiftKey&&(a+=1),4===a?(n=this.moveYear(this.date,e),i=this.moveYear(this.viewDate,e)):3===a?(n=this.moveMonth(this.date,e),i=this.moveMonth(this.viewDate,e)):2===a?(n=this.moveDate(this.date,e),i=this.moveDate(this.viewDate,e)):1===a?(n=this.moveHour(this.date,e),i=this.moveHour(this.viewDate,e)):0===a&&(n=this.moveMinute(this.date,e),i=this.moveMinute(this.viewDate,e)),this.dateWithinRange(n)&&(this.date=n,this.viewDate=i,this.setValue(),this.update(),t.preventDefault(),o=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;e=38===t.keyCode?-1:1,a=this.viewMode,t.ctrlKey?a+=2:t.shiftKey&&(a+=1),4===a?(n=this.moveYear(this.date,e),i=this.moveYear(this.viewDate,e)):3===a?(n=this.moveMonth(this.date,e),i=this.moveMonth(this.viewDate,e)):2===a?(n=this.moveDate(this.date,7*e),i=this.moveDate(this.viewDate,7*e)):1===a?this.showMeridian?(n=this.moveHour(this.date,6*e),i=this.moveHour(this.viewDate,6*e)):(n=this.moveHour(this.date,4*e),i=this.moveHour(this.viewDate,4*e)):0===a&&(n=this.moveMinute(this.date,4*e),i=this.moveMinute(this.viewDate,4*e)),this.dateWithinRange(n)&&(this.date=n,this.viewDate=i,this.setValue(),this.update(),t.preventDefault(),o=!0);break;case 13:if(0!==this.viewMode){var s=this.viewMode;this.showMode(-1),this.fill(),s===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();t.preventDefault();break;case 9:this.hide()}if(o)this.isInput?r=this.element:this.component&&(r=this.element.find("input")),r&&r.change(),this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(t){if(t){var e=Math.max(0,Math.min(E.modes.length-1,this.viewMode+t));e>=this.minView&&e<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:e}),this.viewMode=e)}this.picker.find(">div").hide().filter(".datetimepicker-"+E.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(t){switch(t){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var k=D.fn.datetimepicker;D.fn.datetimepicker=function(i){var r,o=Array.apply(null,arguments);return o.shift(),this.each(function(){var t=D(this),e=t.data("datetimepicker"),n="object"==typeof i&&i;if(e||t.data("datetimepicker",e=new y(this,D.extend({},D.fn.datetimepicker.defaults,n))),"string"==typeof i&&"function"==typeof e[i]&&(r=e[i].apply(e,o))!==a)return!1}),r!==a?r:this},D.fn.datetimepicker.defaults={},D.fn.datetimepicker.Constructor=y;var I=D.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}},E={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,E.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},getDefaultFormat:function(t,e){if("standard"===t)return"input"===e?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"===t)return"input"===e?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(t){if("standard"===t)return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"===t)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(t,e){var n=t.replace(this.validParts(e),"\0").split("\0"),i=t.match(this.validParts(e));if(!n||!n.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:n,parts:i}},parseDate:function(t,e,n,i,r){if(t instanceof Date){var o=new Date(t.valueOf()-6e4*t.getTimezoneOffset());return o.setMilliseconds(0),o}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(t)&&(e=this.parseFormat("yyyy-mm-dd",i)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(t)&&(e=this.parseFormat("yyyy-mm-dd hh:ii",i)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(t)&&(e=this.parseFormat("yyyy-mm-dd hh:ii:ss",i)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(t)){var a,s=/([-+]\d+)([dmwy])/,l=t.match(/([-+]\d+)([dmwy])/g);t=new Date;for(var u=0;u<l.length;u++)switch(h=s.exec(l[u]),a=parseInt(h[1]),h[2]){case"d":t.setUTCDate(t.getUTCDate()+a);break;case"m":t=y.prototype.moveMonth.call(y.prototype,t,a);break;case"w":t.setUTCDate(t.getUTCDate()+7*a);break;case"y":t=y.prototype.moveYear.call(y.prototype,t,a)}return M(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),0)}l=t&&t.toString().match(this.nonpunctuation)||[],t=new Date(0,0,0,0,0,0,0);var c,d,h,f={},p=["hh","h","ii","i","ss","s","yyyy","yy","M","MM","m","mm","D","DD","d","dd","H","HH","p","P","z","Z"],g={hh:function(t,e){return t.setUTCHours(e)},h:function(t,e){return t.setUTCHours(e)},HH:function(t,e){return t.setUTCHours(12===e?0:e)},H:function(t,e){return t.setUTCHours(12===e?0:e)},ii:function(t,e){return t.setUTCMinutes(e)},i:function(t,e){return t.setUTCMinutes(e)},ss:function(t,e){return t.setUTCSeconds(e)},s:function(t,e){return t.setUTCSeconds(e)},yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;){if(isNaN(t.getUTCMonth()))return t;t.setUTCDate(t.getUTCDate()-1)}return t},d:function(t,e){return t.setUTCDate(e)},p:function(t,e){return t.setUTCHours(1===e?t.getUTCHours()+12:t.getUTCHours())},z:function(){return r}};if(g.M=g.MM=g.mm=g.m,g.dd=g.d,g.P=g.p,g.Z=g.z,t=M(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()),l.length===e.parts.length){u=0;for(var m=e.parts.length;u<m;u++){if(c=parseInt(l[u],10),h=e.parts[u],isNaN(c))switch(h){case"MM":d=D(I[n].months).filter(function(){var t=this.slice(0,l[u].length);return t===l[u].slice(0,t.length)}),c=D.inArray(d[0],I[n].months)+1;break;case"M":d=D(I[n].monthsShort).filter(function(){var t=this.slice(0,l[u].length),e=l[u].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}),c=D.inArray(d[0],I[n].monthsShort)+1;break;case"p":case"P":c=D.inArray(l[u].toLowerCase(),I[n].meridiem)}f[h]=c}var v;for(u=0;u<p.length;u++)(v=p[u])in f&&!isNaN(f[v])&&g[v](t,f[v])}return t},formatDate:function(t,e,n,i,r){if(null===t)return"";var o;if("standard"===i)o={t:t.getTime(),yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear(),m:t.getUTCMonth()+1,M:I[n].monthsShort[t.getUTCMonth()],MM:I[n].months[t.getUTCMonth()],d:t.getUTCDate(),D:I[n].daysShort[t.getUTCDay()],DD:I[n].days[t.getUTCDay()],p:2===I[n].meridiem.length?I[n].meridiem[t.getUTCHours()<12?0:1]:"",h:t.getUTCHours(),i:t.getUTCMinutes(),s:t.getUTCSeconds(),z:r},2===I[n].meridiem.length?o.H=o.h%12==0?12:o.h%12:o.H=o.h,o.HH=(o.H<10?"0":"")+o.H,o.P=o.p.toUpperCase(),o.Z=o.z,o.hh=(o.h<10?"0":"")+o.h,o.ii=(o.i<10?"0":"")+o.i,o.ss=(o.s<10?"0":"")+o.s,o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m;else{if("php"!==i)throw new Error("Invalid format type.");(o={y:t.getUTCFullYear().toString().substring(2),Y:t.getUTCFullYear(),
|
|
F:I[n].months[t.getUTCMonth()],M:I[n].monthsShort[t.getUTCMonth()],n:t.getUTCMonth()+1,t:E.getDaysInMonth(t.getUTCFullYear(),t.getUTCMonth()),j:t.getUTCDate(),l:I[n].days[t.getUTCDay()],D:I[n].daysShort[t.getUTCDay()],w:t.getUTCDay(),N:0===t.getUTCDay()?7:t.getUTCDay(),S:t.getUTCDate()%10<=I[n].suffix.length?I[n].suffix[t.getUTCDate()%10-1]:"",a:2===I[n].meridiem.length?I[n].meridiem[t.getUTCHours()<12?0:1]:"",g:t.getUTCHours()%12==0?12:t.getUTCHours()%12,G:t.getUTCHours(),i:t.getUTCMinutes(),s:t.getUTCSeconds()}).m=(o.n<10?"0":"")+o.n,o.d=(o.j<10?"0":"")+o.j,o.A=o.a.toString().toUpperCase(),o.h=(o.g<10?"0":"")+o.g,o.H=(o.G<10?"0":"")+o.G,o.i=(o.i<10?"0":"")+o.i,o.s=(o.s<10?"0":"")+o.s}t=[];for(var a=D.extend([],e.separators),s=0,l=e.parts.length;s<l;s++)a.length&&t.push(a.shift()),t.push(o[e.parts[s]]);return a.length&&t.push(a.shift()),t.join("")},convertViewMode:function(t){switch(t){case 4:case"decade":t=4;break;case 3:case"year":t=3;break;case 2:case"month":t=2;break;case 1:case"day":t=1;break;case 0:case"hour":t=0}return t},headTemplate:'<thead><tr><th class="prev"><i class="{iconType} {leftArrow}"/></th><th colspan="5" class="switch"></th><th class="next"><i class="{iconType} {rightArrow}"/></th></tr></thead>',headTemplateV3:'<thead><tr><th class="prev"><span class="{iconType} {leftArrow}"></span> </th><th colspan="5" class="switch"></th><th class="next"><span class="{iconType} {rightArrow}"></span> </th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};E.template='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+E.headTemplate+E.contTemplate+E.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+E.headTemplate+E.contTemplate+E.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+E.headTemplate+"<tbody></tbody>"+E.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+E.headTemplate+E.contTemplate+E.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+E.headTemplate+E.contTemplate+E.footTemplate+"</table></div></div>",E.templateV3='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+E.headTemplateV3+E.contTemplate+E.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+E.headTemplateV3+E.contTemplate+E.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+E.headTemplateV3+"<tbody></tbody>"+E.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+E.headTemplateV3+E.contTemplate+E.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+E.headTemplateV3+E.contTemplate+E.footTemplate+"</table></div></div>",D.fn.datetimepicker.DPGlobal=E,D.fn.datetimepicker.noConflict=function(){return D.fn.datetimepicker=k,this},D(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(t){var e=D(this);e.data("datetimepicker")||(t.preventDefault(),e.datetimepicker("show"))}),D(function(){D('[data-provide="datetimepicker-inline"]').datetimepicker()})}),$.fn.bootstrapViewer=function(s){$(this).on("click",function(){var t=$.extend({},$.fn.bootstrapViewer.defaults,s),e=$('<div class="modal fade bs-example-modal-lg text-center" id="bootstrapViewer" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" >\n <div class="modal-dialog modal-lg" style="display: inline-block; width: auto;">\n <div class="modal-content">\n <img\t\t\t class="carousel-inner img-responsive img-rounded img-viewer" draggable="false"\n'+"\t\t\t onclick=\"/*$('#bootstrapViewer').modal('hide');setTimeout(function(){$('#bootstrapViewer').remove();},200);*/\"\n\t\t\t onmouseover=\"this.style.cursor='move';\" \n\t\t\t onmouseout=\"this.style.cursor='default'\" \n\t\t\t />\n </div>\n </div>\n </div>");if($("body").append(e),!$(this).attr(t.src))throw"\u56fe\u7247\u4e0d\u5b58\u5728";$("#bootstrapViewer").find(".img-viewer").attr("src",$(this).attr(t.src)),$("#bootstrapViewer").modal(),$("#bootstrapViewer").on("hidden.bs.modal",function(){$("#bootstrapViewer").remove()});var i=$("#bootstrapViewer .modal-dialog"),r=!1,o=i.offset().left,a=i.offset().top,n=function(t){if(r){var e=t.pageX-o,n=t.pageY-a;e<0&&(e=0),n<0&&(n=0),i.css({left:e,top:n})}};i.mousedown(function(t){i.css({left:i[0].offsetLeft,top:i[0].offsetTop,marginTop:0,position:"absolute"}),r=!0,o=t.pageX-i.offset().left,a=t.pageY-i.offset().top,$(document).mousemove(n)}).mouseup(function(){r=!1,$(document).unbind("mousemove",n)})}),$(this).on("mouseover",function(){$(this).css("cursor","zoom-in")})},$.fn.bootstrapViewer.defaults={src:"src"},function(n,i){"use strict";"object"==typeof module&&"object"==typeof module.exports&&i(require("jquery"),n),"function"==typeof define?define.cmd?define(function(t){var e=t("jquery");i(e,n)}):define(["jquery"],function(t){i(t,n)}):i(n.jQuery,n)}("undefined"!=typeof window?window:this,function(l,t){"use strict";function u(t,e){e=e||{},this.dom=t,this.options=l.extend(!0,{},u.defaultOptions,e),this.curtain=null,this.render().show()}if(l||(l=t.jQuery||null),!l)throw new TypeError("\u5fc5\u987b\u5f15\u5165jquery\u5e93\u65b9\u53ef\u6b63\u5e38\u4f7f\u7528\uff01");var e=Array.prototype.slice,n=function(t,e){var n=!0;for(var i in t)if(t[i]!==e[t]){n=!0;break}return n};u.prototype={constructor:u,initElement:function(){var t=this.dom,e=this.options,n=t.children(".mloading"),i=n.children(".mloading-body"),r=i.children(".mloading-bar"),o=r.children(".mloading-icon"),a=r.find(".mloading-text");if(0==n.length&&(n=l('<div class="mloading"></div>'),t.append(n)),0==i.length&&(i=l('<div class="mloading-body"></div>'),n.append(i)),0==r.length&&(r=l('<div class="mloading-bar"></div>'),i.append(r)),0==o.length){var s=document.createElement(e.iconTag);(o=l(s)).addClass("mloading-icon"),r.append(o)}return 0==a.length&&(a=l('<span class="mloading-text"></span>'),r.append(a)),this.curtainElement=n,this.bodyElement=i,this.barElement=r,this.iconElement=o,this.textElement=a,this},render:function(){var t=this.dom,e=this.options;return this.initElement(),t.is("html")||t.is("body")?this.curtainElement.addClass("mloading-full"):(this.curtainElement.removeClass("mloading-full"),t.hasClass("mloading-container")||t.addClass("mloading-container")),e.mask?this.curtainElement.addClass("mloading-mask"):this.curtainElement.removeClass("mloading-mask"),""!=e.content&&"undefined"!=typeof e.content?e.html?this.bodyElement.html(e.content):this.bodyElement.text(e.content):(this.iconElement.attr("src",e.icon),e.html?this.textElement.html(e.text):this.textElement.text(e.text)),this},setOptions:function(t){t=t||{};var e=this.options;this.options=l.extend(!0,{},this.options,t),n(e,this.options)||this.render()},show:function(){this.dom,this.options;var t=this.barElement;return this.curtainElement.addClass("active"),t.css({marginTop:"-"+t.outerHeight()/2+"px",marginLeft:"-"+t.outerWidth()/2+"px"}),this},hide:function(){var t=this.dom;this.options;return this.curtainElement.removeClass("active"),t.is("html")||t.is("body")||t.removeClass("mloading-container"),this},destroy:function(){var t=this.dom;this.options;return this.curtainElement.remove(),t.is("html")||t.is("body")||t.removeClass("mloading-container"),t.removeData(u.dataKey),this}},u.dataKey="MLoading",u.defaultOptions={text:"\u52a0\u8f7d\u4e2d...",iconTag:"img",icon:"data:image/gif;base64,R0lGODlhDwAPAKUAAEQ+PKSmpHx6fNTW1FxaXOzu7ExOTIyOjGRmZMTCxPz6/ERGROTi5Pz29JyanGxubMzKzIyKjGReXPT29FxWVGxmZExGROzq7ERCRLy6vISChNze3FxeXPTy9FROTJSSlMTGxPz+/OTm5JyenNTOzGxqbExKTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBgAhACwAAAAADwAPAAAGd8CQcEgsChuTZMNIDFgsC1Nn9GEwDwDAoqMBWEDFiweA2YoiZevwA9BkDAUhW0MkADYhiEJYwJj2QhYGTBwAE0MUGGp5IR1+RBEAEUMVDg4AAkQMJhgfFyEIWRgDRSALABKgWQ+HRQwaCCEVC7R0TEITHbmtt0xBACH5BAkGACYALAAAAAAPAA8AhUQ+PKSmpHRydNTW1FxWVOzu7MTCxIyKjExKTOTi5LSytHx+fPz6/ERGROTe3GxqbNTS1JyWlFRSVKympNze3FxeXPT29MzKzFROTOzq7ISGhERCRHx6fNza3FxaXPTy9MTGxJSSlExOTOTm5LS2tISChPz+/ExGRJyenKyqrAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ6QJNQeIkUhsjkp+EhMZLITKgBAGigQgiiCtiAKJdkBgNYgDYLhmDjQIbKwgfF9C4hPYC5KSMsbBBIJyJYFQAWQwQbI0J8Jh8nDUgHAAcmDA+LKAAcSAkIEhYTAAEoGxsdSSAKIyJcGyRYJiQbVRwDsVkPXrhDDCQBSUEAIfkECQYAEAAsAAAAAA8ADwCFRD48pKKkdHZ01NLUXFpc7OrsTE5MlJKU9Pb03N7cREZExMbEhIKEbGpsXFZUVFZU/P78tLa0fH583NrcZGJk9PL0VE5MnJ6c/Pb05ObkTEZEREJErKqsfHp81NbUXF5c7O7slJaU5OLkzMrMjIaEdG5sVFJU/Pr8TEpMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABndAiHA4DICISCIllBQWQgSNY6NJJAcoAMCw0XaQBQtAYj0ANgcE0SwZlgSe04hI2FiFAyEFRdQYmh8AakIOJhgQHhVCFQoaRAsVGSQWihAXAF9EHFkNEBUXGxsTSBxaGx9dGxFJGKgKAAoSEydNIwoFg01DF7oQQQAh+QQJBgAYACwAAAAADwAPAIVEPjykoqR0cnTU0tRUUlSMiozs6uxMSkx8fnzc3txcXlyUlpT09vRcWlxMRkS0trR8enzc2txcVlSUkpRUTkyMhoTk5uScnpz8/vxEQkR8dnTU1tRUVlSMjoz08vRMTkyEgoTk4uRkYmSclpT8+vy8urwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGc0CMcEgsGo9Gw6LhkHRCmICFODgAAJ8M4FDJTIUGCgCRwIQKV+9wMiaWtIAvRqOACiMKwucjJzFIJEN+gEQiHAQcJUMeBROCBFcLRBcAEESQAB0GGB4XGRkbghwCnxkiWhkPRRMMCSAfABkIoUhCDLW4Q0EAIfkECQYAGQAsAAAAAA8ADwCFRD48pKKkdHJ01NLU7OrsXFZUjIqMvLq8TEpM3N7c9Pb0lJaUxMbErK6sfH58bGpsVFJUTEZE3Nrc9PL0XF5clJKUxMLEVE5M5Obk/P78nJ6ctLa0hIaEREJE1NbU7O7sXFpcjI6MvL68TE5M5OLk/Pr8nJqczM7MtLK0hIKEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABnPAjHBILBqPRsICFCmESMcBAgAYdQAIi9HzSCUyJEOnAx0GBqUSsQJwYFAZyTiFGZZEgHGlJKACQBIZEwJXVR8iYwANE0MTAVMNGSISHAAhRSUYC2pCJFMhH4IaEAdGDGMdFFcdG0cJKSNYDoFIQgqctblBADs=",html:!1,content:"",mask:!0},l.fn.mLoading=function(t){var o={},a="",s=[];return"object"==typeof t?o=t:"string"==typeof t&&(a=t,s=e.call(arguments).splice(0,1)),this.each(function(t,e){var n=l(e),i=n.data(u.dataKey);if(i||(i=new u(n,o)),a){var r=i[a];"function"==typeof r&&r.apply(i,s)}})}}),function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(t,e){return e===undefined&&(e="undefined"!=typeof window?require("jquery"):require("jquery")(t)),n(e),e}:n(jQuery)}(function(l){var u=window;l.fn.confirm=function(o,t){return void 0===o&&(o={}),"string"==typeof o&&(o={content:o,title:t||!1}),l(this).each(function(){var r=l(this);r.attr("jc-attached")?console.warn("jConfirm has already been attached to this element ",r[0]):(r.on("click",function(t){t.preventDefault();var e=l.extend({},o);if(r.attr("data-title")&&(e.title=r.attr("data-title")),r.attr("data-content")&&(e.content=r.attr("data-content")),"undefined"==typeof e.buttons&&(e.buttons={}),(e.$target=r).attr("href")&&0===Object.keys(e.buttons).length){var n=l.extend(!0,{},u.jconfirm.pluginDefaults.defaultButtons,(u.jconfirm.defaults||{}).defaultButtons||{}),i=Object.keys(n)[0];e.buttons=n,e.buttons[i].action=function(){location.href=r.attr("href")}}e.closeIcon=!1;l.confirm(e)}),r.attr("jc-attached",!0))}),l(this)},l.confirm=function(t,e){void 0===t&&(t={}),"string"==typeof t&&(t={content:t,title:e||!1});var n=!(!1===t.buttons);if("object"!=typeof t.buttons&&(t.buttons={}),0===Object.keys(t.buttons).length&&n){var i=l.extend(!0,{},u.jconfirm.pluginDefaults.defaultButtons,(u.jconfirm.defaults||{}).defaultButtons||{});t.buttons=i}return u.jconfirm(t)},l.alert=function(t,e){void 0===t&&(t={}),"string"==typeof t&&(t={content:t,title:e||!1});var n=!(!1===t.buttons);if("object"!=typeof t.buttons&&(t.buttons={}),0===Object.keys(t.buttons).length&&n){var i=l.extend(!0,{},u.jconfirm.pluginDefaults.defaultButtons,(u.jconfirm.defaults||{}).defaultButtons||{}),r=Object.keys(i)[0];t.buttons[r]=i[r]}return u.jconfirm(t)},l.dialog=function(t,e){return void 0===t&&(t={}),"string"==typeof t&&(t={content:t,title:e||!1,closeIcon:function(){}}),t.buttons={},"undefined"==typeof t.closeIcon&&(t.closeIcon=function(){}),t.confirmKeys=[13],u.jconfirm(t)},u.jconfirm=function(t){void 0===t&&(t={});var e=l.extend(!0,{},u.jconfirm.pluginDefaults);u.jconfirm.defaults&&(e=l.extend(!0,e,u.jconfirm.defaults)),e=l.extend(!0,{},e,t);var n=new u.Jconfirm(e);return u.jconfirm.instances.push(n),n},u.Jconfirm=function(t){l.extend(this,t),this._init()},u.Jconfirm.prototype={_init:function(){var t=this;u.jconfirm.instances.length||(u.jconfirm.lastFocused=l("body").find(":focus")),this._id=Math.round(99999*Math.random()),this.contentParsed=l(document.createElement("div")),this.lazyOpen||setTimeout(function(){t.open()},0)},_buildHTML:function(){var t=this;this._parseAnimation(this.animation,"o"),this._parseAnimation(this.closeAnimation,"c"),this._parseBgDismissAnimation(this.backgroundDismissAnimation),this._parseColumnClass(this.columnClass),this._parseTheme(this.theme),this._parseType(this.type);var e=l(this.template);e.find(".jconfirm-box").addClass(this.animationParsed).addClass(this.backgroundDismissAnimationParsed).addClass(this.typeParsed),this.typeAnimated&&e.find(".jconfirm-box").addClass("jconfirm-type-animated"),this.useBootstrap?(e.find(".jc-bs3-row").addClass(this.bootstrapClasses.row),e.find(".jc-bs3-row").addClass("justify-content-md-center justify-content-sm-center justify-content-xs-center justify-content-lg-center"),e.find(".jconfirm-box-container").addClass(this.columnClassParsed),this.containerFluid?e.find(".jc-bs3-container").addClass(this.bootstrapClasses.containerFluid):e.find(".jc-bs3-container").addClass(this.bootstrapClasses.container)):e.find(".jconfirm-box").css("width",this.boxWidth),this.titleClass&&e.find(".jconfirm-title-c").addClass(this.titleClass),e.addClass(this.themeParsed);var n="jconfirm-box"+this._id;e.find(".jconfirm-box").attr("aria-labelledby",n).attr("tabindex",-1),e.find(".jconfirm-content").attr("id",n),null!==this.bgOpacity&&e.find(".jconfirm-bg").css("opacity",this.bgOpacity),this.rtl&&e.addClass("jconfirm-rtl"),this.$el=e.appendTo(this.container),this.$jconfirmBoxContainer=this.$el.find(".jconfirm-box-container"),this.$jconfirmBox=this.$body=this.$el.find(".jconfirm-box"),this.$jconfirmBg=this.$el.find(".jconfirm-bg"),this.$title=this.$el.find(".jconfirm-title"),this.$titleContainer=this.$el.find(".jconfirm-title-c"),this.$content=this.$el.find("div.jconfirm-content"),this.$contentPane=this.$el.find(".jconfirm-content-pane"),this.$icon=this.$el.find(".jconfirm-icon-c"),this.$closeIcon=this.$el.find(".jconfirm-closeIcon"),this.$holder=this.$el.find(".jconfirm-holder"),this.$btnc=this.$el.find(".jconfirm-buttons"),this.$scrollPane=this.$el.find(".jconfirm-scrollpane"),t.setStartingPoint(),this._contentReady=l.Deferred(),this._modalReady=l.Deferred(),this.$holder.css({"padding-top":this.offsetTop,"padding-bottom":this.offsetBottom}),this.setTitle(),this.setIcon(),this._setButtons(),this._parseContent(),this.initDraggable(),this.isAjax&&this.showLoading(!1),l.when(this._contentReady,this._modalReady).then(function(){t.isAjaxLoading?setTimeout(function(){t.isAjaxLoading=!1,t.setContent(),t.setTitle(),t.setIcon(),setTimeout(function(){t.hideLoading(!1),t._updateContentMaxHeight()},100),"function"==typeof t.onContentReady&&t.onContentReady()},50):(t._updateContentMaxHeight(),t.setTitle(),t.setIcon(),"function"==typeof t.onContentReady&&t.onContentReady()),t.autoClose&&t._startCountDown()}).then(function(){t._watchContent()}),"none"===this.animation&&(this.animationSpeed=1,this.animationBounce=1),this.$body.css(this._getCSS(this.animationSpeed,this.animationBounce)),this.$contentPane.css(this._getCSS(this.animationSpeed,1)),this.$jconfirmBg.css(this._getCSS(this.animationSpeed,1)),this.$jconfirmBoxContainer.css(this._getCSS(this.animationSpeed,1))},_typePrefix:"jconfirm-type-",typeParsed:"",_parseType:function(t){this.typeParsed=this._typePrefix+t},setType:function(t){var e=this.typeParsed;this._parseType(t),this.$jconfirmBox.removeClass(e).addClass(this.typeParsed)},themeParsed:"",_themePrefix:"jconfirm-",setTheme:function(t){var e=this.theme;this.theme=t||this.theme,this._parseTheme(this.theme),e&&this.$el.removeClass(e),this.$el.addClass(this.themeParsed),this.theme=t},_parseTheme:function(n){var i=this;n=n.split(","),l.each(n,function(t,e){-1===e.indexOf(i._themePrefix)&&(n[t]=i._themePrefix+l.trim(e))}),this.themeParsed=n.join(" ").toLowerCase()},backgroundDismissAnimationParsed:"",_bgDismissPrefix:"jconfirm-hilight-",_parseBgDismissAnimation:function(t){var n=t.split(","),i=this;l.each(n,function(t,e){-1===e.indexOf(i._bgDismissPrefix)&&(n[t]=i._bgDismissPrefix+l.trim(e))}),this.backgroundDismissAnimationParsed=n.join(" ").toLowerCase()},animationParsed:"",closeAnimationParsed:"",_animationPrefix:"jconfirm-animation-",setAnimation:function(t){this.animation=t||this.animation,this._parseAnimation(this.animation,"o")},_parseAnimation:function(t,e){e=e||"o";var n=t.split(","),i=this;l.each(n,function(t,e){-1===e.indexOf(i._animationPrefix)&&(n[t]=i._animationPrefix+l.trim(e))});var r=n.join(" ").toLowerCase();return"o"===e?this.animationParsed=r:this.closeAnimationParsed=r,r},setCloseAnimation:function(t){this.closeAnimation=t||this.closeAnimation,this._parseAnimation(this.closeAnimation,"c")},setAnimationSpeed:function(t){this.animationSpeed=t||this.animationSpeed},columnClassParsed:"",setColumnClass:function(t){this.useBootstrap?(this.columnClass=t||this.columnClass,this._parseColumnClass(this.columnClass),this.$jconfirmBoxContainer.addClass(this.columnClassParsed)):console.warn("cannot set columnClass, useBootstrap is set to false")},_updateContentMaxHeight:function(){var t=l(window).height()-(this.$jconfirmBox.outerHeight()-this.$contentPane.outerHeight())-(this.offsetTop+this.offsetBottom);this.$contentPane.css({"max-height":t+"px"})},setBoxWidth:function(t){this.useBootstrap?console.warn("cannot set boxWidth, useBootstrap is set to true"):(this.boxWidth=t,this.$jconfirmBox.css("width",t))},_parseColumnClass:function(t){var e;switch(t=t.toLowerCase()){case"xl":case"xlarge":e="col-md-12";break;case"l":case"large":e="col-md-8 col-md-offset-2";break;case"m":case"medium":e="col-md-6 col-md-offset-3";break;case"s":case"small":e="col-md-4 col-md-offset-4";break;case"xs":case"xsmall":e="col-md-2 col-md-offset-5";break;default:e=t}this.columnClassParsed=e},initDraggable:function(){var e=this,n=this.$titleContainer;this.resetDrag(),this.draggable&&(n.on("mousedown",function(t){n.addClass("jconfirm-hand"),e.mouseX=t.clientX,e.mouseY=t.clientY,e.isDrag=!0}),l(window).on("mousemove."+this._id,function(t){e.isDrag&&(e.movingX=t.clientX-e.mouseX+e.initialX,e.movingY=t.clientY-e.mouseY+e.initialY,e.setDrag())}),l(window).on("mouseup."+this._id,function(){n.removeClass("jconfirm-hand"),e.isDrag&&(e.isDrag=!1,e.initialX=e.movingX,e.initialY=e.movingY)}))},resetDrag:function(){this.isDrag=!1,this.initialX=0,this.initialY=0,this.movingX=0,this.movingY=0,this.mouseX=0,this.mouseY=0,this.$jconfirmBoxContainer.css("transform","translate(0px, 0px)")},setDrag:function(){if(this.draggable){this.alignMiddle=!1;var t=this.$jconfirmBox.outerWidth(),e=this.$jconfirmBox.outerHeight(),n=l(window).width(),i=l(window).height(),r=this,o=1;if(r.movingX%o==0||r.movingY%o==0){if(r.dragWindowBorder){var a=n/2-t/2,s=i/2-e/2;s-=r.dragWindowGap,(a-=r.dragWindowGap)+r.movingX<0?r.movingX=-a:a-r.movingX<0&&(r.movingX=a),s+r.movingY<0?r.movingY=-s:s-r.movingY<0&&(r.movingY=s)}r.$jconfirmBoxContainer.css("transform","translate("+r.movingX+"px, "+r.movingY+"px)")}}},_scrollTop:function(){if("undefined"!=typeof pageYOffset)return pageYOffset;var t=document.body,e=document.documentElement;return(e=e.clientHeight?e:t).scrollTop},_watchContent:function(){var n=this;this._timer&&clearInterval(this._timer);var i=0;this._timer=setInterval(function(){if(n.smoothContent){var t=n.$content.outerHeight()||0;t!==i&&(i=t);var e=l(window).height();n.offsetTop+n.offsetBottom+n.$jconfirmBox.height()-n.$contentPane.height()+n.$content.height()<e?n.$contentPane.addClass("no-scroll"):n.$contentPane.removeClass("no-scroll")}},this.watchInterval)},_overflowClass:"jconfirm-overflow",_hilightAnimating:!1,highlight:function(){this.hiLightModal()},hiLightModal:function(){var t=this;if(!this._hilightAnimating){t.$body.addClass("hilight");var e=parseFloat(t.$body.css("animation-duration"))||2;this._hilightAnimating=!0,setTimeout(function(){t._hilightAnimating=!1,t.$body.removeClass("hilight")},1e3*e)}},_bindEvents:function(){var r=this;this.boxClicked=!1,this.$scrollPane.click(function(){if(!r.boxClicked){var t,e=!1,n=!1;if("string"==typeof(t="function"==typeof r.backgroundDismiss?r.backgroundDismiss():r.backgroundDismiss)&&"undefined"!=typeof r.buttons[t]?(e=t,n=!1):n=void 0===t||!0==!!t,e){var i=r.buttons[e].action.apply(r);n=void 0===i||!!i}n?r.close():r.hiLightModal()}r.boxClicked=!1}),this.$jconfirmBox.click(function(){r.boxClicked=!0});var e=!1;l(window).on("jcKeyDown."+r._id,function(){e||(e=!0)}),l(window).on("keyup."+r._id,function(t){e&&(r.reactOnKey(t),e=!1)}),l(window).on("resize."+this._id,function(){r._updateContentMaxHeight(),setTimeout(function(){r.resetDrag()},100)})},_cubic_bezier:"0.36, 0.55, 0.19",_getCSS:function(t,e){return{"-webkit-transition-duration":t/1e3+"s","transition-duration":t/1e3+"s","-webkit-transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+e+")","transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+e+")"}},_setButtons:function(){var o=this,i=0;if("object"!=typeof this.buttons&&(this.buttons={}),l.each(this.buttons,function(n,t){i+=1,"function"==typeof t&&(o.buttons[n]=t={action:t}),o.buttons[n].text=t.text||n,o.buttons[n].btnClass=t.btnClass||"btn-default",o.buttons[n].action=t.action||function(){},o.buttons[n].keys=t.keys||[],o.buttons[n].isHidden=t.isHidden||!1,o.buttons[n].isDisabled=t.isDisabled||!1,l.each(o.buttons[n].keys,function(t,e){o.buttons[n].keys[t]=e.toLowerCase()});var e=l('<button type="button" class="btn"></button>').html(o.buttons[n].text).addClass(o.buttons[n].btnClass).prop("disabled",o.buttons[n].isDisabled).css("display",o.buttons[n].isHidden?"none":"").click(function(t){t.preventDefault();var e=o.buttons[n].action.apply(o,[o.buttons[n]]);o.onAction.apply(o,[n,o.buttons[n]]),o._stopCountDown(),(void 0===e||e)&&o.close()});o.buttons[n].el=e,o.buttons[n].setText=function(t){e.html(t)},o.buttons[n].addClass=function(t){e.addClass(t)},o.buttons[n].removeClass=function(t){e.removeClass(t)},o.buttons[n].disable=function(){o.buttons[n].isDisabled=!0,e.prop("disabled",!0)},o.buttons[n].enable=function(){o.buttons[n].isDisabled=!1,e.prop("disabled",!1)},o.buttons[n].show=function(){o.buttons[n].isHidden=!1,e.css("display","")},o.buttons[n].hide=function(){o.buttons[n].isHidden=!0,e.css("display","none")},o["$_"+n]=o["$$"+n]=e,o.$btnc.append(e)}),0===i&&this.$btnc.hide(),null===this.closeIcon&&0===i&&(this.closeIcon=!0),this.closeIcon){if(this.closeIconClass){var t='<i class="'+this.closeIconClass+'"></i>';this.$closeIcon.html(t)}this.$closeIcon.click(function(t){t.preventDefault();var e,n=!1,i=!1;if("string"==typeof(e="function"==typeof o.closeIcon?o.closeIcon():o.closeIcon)&&"undefined"!=typeof o.buttons[e]?(n=e,i=!1):i=void 0===e||!0==!!e,n){var r=o.buttons[n].action.apply(o);i=void 0===r||!!r}i&&o.close()}),this.$closeIcon.show()}else this.$closeIcon.hide()},setTitle:function(t,e){if(e=e||!1,void 0!==t)if("string"==typeof t)this.title=t;else if("function"==typeof t){"function"==typeof t.promise&&console.error("Promise was returned from title function, this is not supported.");var n=t();this.title="string"==typeof n&&n}else this.title=!1;this.isAjaxLoading&&!e||(this.$title.html(this.title||""),this.updateTitleContainer())},setIcon:function(t,e){if(e=e||!1,void 0!==t)if("string"==typeof t)this.icon=t;else if("function"==typeof t){var n=t();this.icon="string"==typeof n&&n}else this.icon=!1;this.isAjaxLoading&&!e||(this.$icon.html(this.icon?'<i class="'+this.icon+'"></i>':""),this.updateTitleContainer())},updateTitleContainer:function(){this.title||this.icon?this.$titleContainer.show():this.$titleContainer.hide()},setContentPrepend:function(t){t&&this.contentParsed.prepend(t)},setContentAppend:function(t){t&&this.contentParsed.append(t)},setContent:function(t,e){e=!!e;var n=this;t&&this.contentParsed.html("").append(t),this.isAjaxLoading&&!e||(this.$content.html(""),this.$content.append(this.contentParsed),setTimeout(function(){n.$body.find("input[autofocus]:visible:first").focus()},100))},loadingSpinner:!1,showLoading:function(t){this.loadingSpinner=!0,this.$jconfirmBox.addClass("loading"),t&&this.$btnc.find("button").prop("disabled",!0)},hideLoading:function(t){this.loadingSpinner=!1,this.$jconfirmBox.removeClass("loading"),t&&this.$btnc.find("button").prop("disabled",!1)},ajaxResponse:!1,contentParsed:"",isAjax:!1,isAjaxLoading:!1,_parseContent:function(){var i=this,t=" ";if("function"==typeof this.content){var e=this.content.apply(this);"string"==typeof e?this.content=e:("object"==typeof e&&"function"==typeof e.always&&(this.isAjax=!0,this.isAjaxLoading=!0,e.always(function(t,e,n){i.ajaxResponse={data:t,status:e,xhr:n},i._contentReady.resolve(t,e,n),"function"==typeof i.contentLoaded&&i.contentLoaded(t,e,n)})),this.content=t)}if("string"==typeof this.content&&"url:"===this.content.substr(0,4).toLowerCase()){this.isAjax=!0,this.isAjaxLoading=!0;var n=this.content.substring(4,this.content.length);l.get(n).done(function(t){i.contentParsed.html(t)}).always(function(t,e,n){i.ajaxResponse={data:t,status:e,xhr:n},i._contentReady.resolve(t,e,n),"function"==typeof i.contentLoaded&&i.contentLoaded(t,e,n)})}this.content||(this.content=t),this.isAjax||(this.contentParsed.html(this.content),this.setContent(),i._contentReady.resolve())},_stopCountDown:function(){clearInterval(this.autoCloseInterval),this.$cd&&this.$cd.remove()},_startCountDown:function(){var t=this,e=this.autoClose.split("|");if(2!==e.length)return console.error("Invalid option for autoClose. example 'close|10000'"),!1;var n=e[0],i=parseInt(e[1]);if("undefined"==typeof this.buttons[n])return console.error("Invalid button key '"+n+"' for autoClose"),!1;var r=Math.ceil(i/1e3);this.$cd=l('<span class="countdown"> ('+r+")</span>").appendTo(this["$_"+n]),this.autoCloseInterval=setInterval(function(){t.$cd.html(" ("+(r-=1)+") "),r<=0&&(t["$$"+n].trigger("click"),t._stopCountDown())},1e3)},_getKey:function(t){switch(t){case 192:return"tilde";case 13:return"enter";case 16:return"shift";case 9:return"tab";case 20:return"capslock";case 17:return"ctrl";case 91:return"win";case 18:return"alt";case 27:return"esc";case 32:return"space"}var e=String.fromCharCode(t);return!!/^[A-z0-9]+$/.test(e)&&e.toLowerCase()},reactOnKey:function(t){var n=this,e=l(".jconfirm");if(e.eq(e.length-1)[0]!==this.$el[0])return!1;var i=t.which;if(this.$content.find(":input").is(":focus")&&/13|32/.test(i))return!1;var r,o=this._getKey(i);"esc"===o&&this.escapeKey&&(!0===this.escapeKey?this.$scrollPane.trigger("click"):"string"!=typeof this.escapeKey&&"function"!=typeof this.escapeKey||(r="function"==typeof this.escapeKey?this.escapeKey():this.escapeKey)&&("undefined"==typeof this.buttons[r]?console.warn("Invalid escapeKey, no buttons found with key "+r):this["$_"+r].trigger("click")));l.each(this.buttons,function(t,e){-1!==e.keys.indexOf(o)&&n["$_"+t].trigger("click")})},setDialogCenter:function(){console.info("setDialogCenter is deprecated, dialogs are centered with CSS3 tables")},_unwatchContent:function(){clearInterval(this._timer)},close:function(t){var a=this;return"function"==typeof this.onClose&&this.onClose(t),this._unwatchContent(),l(window).unbind("resize."+this._id),l(window).unbind("keyup."+this._id),l(window).unbind("jcKeyDown."+this._id),this.draggable&&(l(window).unbind("mousemove."+this._id),l(window).unbind("mouseup."+this._id),this.$titleContainer.unbind("mousedown")),a.$el.removeClass(a.loadedClass),l("body").removeClass("jconfirm-no-scroll-"+a._id),a.$jconfirmBoxContainer.removeClass("jconfirm-no-transition"),setTimeout(function(){a.$body.addClass(a.closeAnimationParsed),a.$jconfirmBg.addClass("jconfirm-bg-h");var t="none"===a.closeAnimation?1:a.animationSpeed;setTimeout(function(){a.$el.remove();u.jconfirm.instances;for(var t=u.jconfirm.instances.length-1;0<=t;t--)u.jconfirm.instances[t]._id===a._id&&u.jconfirm.instances.splice(t,1);if(!u.jconfirm.instances.length&&a.scrollToPreviousElement&&u.jconfirm.lastFocused&&u.jconfirm.lastFocused.length&&l.contains(document,u.jconfirm.lastFocused[0])){var e=u.jconfirm.lastFocused;if(a.scrollToPreviousElementAnimate){var n=l(window).scrollTop(),i=u.jconfirm.lastFocused.offset().top,r=l(window).height();if(n<i&&i<n+r)e.focus();else{var o=i-Math.round(r/3);l("html, body").animate({scrollTop:o},a.animationSpeed,"swing",function(){e.focus()})}}else e.focus();u.jconfirm.lastFocused=!1}"function"==typeof a.onDestroy&&a.onDestroy()},.4*t)},50),!0},open:function(){return!this.isOpen()&&(this._buildHTML(),this._bindEvents(),this._open(),!0)},setStartingPoint:function(){var t=!1;if(!0!==this.animateFromElement&&this.animateFromElement)t=this.animateFromElement,u.jconfirm.lastClicked=!1;else{if(!u.jconfirm.lastClicked||!0!==this.animateFromElement)return!1;t=u.jconfirm.lastClicked,u.jconfirm.lastClicked=!1}if(!t)return!1;var e=t.offset(),n=t.outerHeight()/2,i=t.outerWidth()/2;n-=this.$jconfirmBox.outerHeight()/2,i-=this.$jconfirmBox.outerWidth()/2;var r=e.top+n;r-=this._scrollTop();var o=e.left+i,a=l(window).height()/2,s=l(window).width()/2;if(r-=a-this.$jconfirmBox.outerHeight()/2,o-=s-this.$jconfirmBox.outerWidth()/2,Math.abs(r)>a||Math.abs(o)>s)return!1;this.$jconfirmBoxContainer.css("transform","translate("+o+"px, "+r+"px)")},_open:function(){var t=this;"function"==typeof t.onOpenBefore&&t.onOpenBefore(),this.$body.removeClass(this.animationParsed),this.$jconfirmBg.removeClass("jconfirm-bg-h"),this.$body.focus(),t.$jconfirmBoxContainer.css("transform","translate(0px, 0px)"),setTimeout(function(){t.$body.css(t._getCSS(t.animationSpeed,1)),t.$body.css({"transition-property":t.$body.css("transition-property")+", margin"}),t.$jconfirmBoxContainer.addClass("jconfirm-no-transition"),t._modalReady.resolve(),"function"==typeof t.onOpen&&t.onOpen(),t.$el.addClass(t.loadedClass)},this.animationSpeed)},loadedClass:"jconfirm-open",isClosed:function(){return!this.$el||0===this.$el.parent().length},isOpen:function(){return!this.isClosed()},toggle:function(){this.isOpen()?this.close():this.open()}},u.jconfirm.instances=[],u.jconfirm.lastFocused=!1;var n=!(u.jconfirm.pluginDefaults={template:'<div class="jconfirm"><div class="jconfirm-bg jconfirm-bg-h"></div><div class="jconfirm-scrollpane"><div class="jconfirm-row"><div class="jconfirm-cell"><div class="jconfirm-holder"><div class="jc-bs3-container"><div class="jc-bs3-row"><div class="jconfirm-box-container jconfirm-animated"><div class="jconfirm-box" role="dialog" aria-labelledby="labelled" tabindex="-1"><div class="jconfirm-closeIcon">×</div><div class="jconfirm-title-c"><span class="jconfirm-icon-c"></span><span class="jconfirm-title"></span></div><div class="jconfirm-content-pane"><div class="jconfirm-content"></div></div><div class="jconfirm-buttons"></div><div class="jconfirm-clear"></div></div></div></div></div></div></div></div></div></div>',title:"Hello",titleClass:"",type:"default",typeAnimated:!0,draggable:!0,dragWindowGap:15,dragWindowBorder:!0,animateFromElement:!0,alignMiddle:!0,smoothContent:!0,content:"Are you sure to continue?",buttons:{},defaultButtons:{ok:{action:function(){}},close:{action:function(){}}},contentLoaded:function(){},icon:"",lazyOpen:!1,bgOpacity:null,theme:"light",animation:"scale",closeAnimation:"scale",animationSpeed:400,animationBounce:1,escapeKey:!0,rtl:!1,container:"body",containerFluid:!1,backgroundDismiss:!1,backgroundDismissAnimation:"shake",autoClose:!1,closeIcon:null,closeIconClass:!1,watchInterval:100,columnClass:"col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1",boxWidth:"50%",scrollToPreviousElement:!0,scrollToPreviousElementAnimate:!0,useBootstrap:!0,offsetTop:40,offsetBottom:40,bootstrapClasses:{container:"container",containerFluid:"container-fluid",row:"row"},onContentReady:function(){},onOpenBefore:function(){},onOpen:function(){},onClose:function(){},onDestroy:function(){},onAction:function(){}});l(window).on("keydown",function(t){if(!n){var e=!1;l(t.target).closest(".jconfirm-box").length&&(e=!0),e&&l(window).trigger("jcKeyDown"),n=!0}}),l(window).on("keyup",function(){
|
|
n=!1}),u.jconfirm.lastClicked=!1,l(document).on("mousedown","button, a, [jc-source]",function(){u.jconfirm.lastClicked=l(this)})}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},n={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1]),a&&(n.weChat=!0),{browser:n,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&11<=n.version)}}function n(t,e){"createCanvas"===t&&(jb=null),t_[t]=e}function L(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Gb.call(t);if("[object Array]"===n){if(!M(t)){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=L(t[i])}}else if(qb[n]){if(!M(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(i=0,r=t.length;i<r;i++)e[i]=L(t[i])}}}else if(!Ub[n]&&!M(t)&&!S(t))for(var a in e={},t)t.hasOwnProperty(a)&&(e[a]=L(t[a]));return e}function g(t,e,n){if(!b(e)||!b(t))return n?L(e):t;for(var i in e)if(e.hasOwnProperty(i)){var r=t[i],o=e[i];!b(o)||!b(r)||E(o)||E(r)||S(o)||S(r)||s(o)||s(r)||M(o)||M(r)?!n&&i in t||(t[i]=L(e[i],!0)):g(r,o,n)}return t}function c(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=g(n,t[i],e);return n}function O(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function D(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function i(){return jb||(jb=e_().getContext("2d")),jb}function x(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function o(t,e){function n(){}var i=t.prototype;for(var r in n.prototype=e.prototype,t.prototype=new n,i)t.prototype[r]=i[r];(t.prototype.constructor=t).superClass=e}function r(t,e,n){D(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)}function P(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function I(t,e,n){if(t&&e)if(t.forEach&&t.forEach===Zb)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function A(t,e,n){if(t&&e){if(t.map&&t.map===Qb)return t.map(e,n);for(var i=[],r=0,o=t.length;r<o;r++)i.push(e.call(n,t[r],r,t));return i}}function p(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===Jb)return t.reduce(e,n,i);for(var r=0,o=t.length;r<o;r++)n=e.call(i,n,t[r],r,t);return n}}function f(t,e,n){if(t&&e){if(t.filter&&t.filter===Xb)return t.filter(e,n);for(var i=[],r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function a(t,e,n){if(t&&e)for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]}function v(t,e){var n=Kb.call(arguments,2);return function(){return t.apply(e,n.concat(Kb.call(arguments)))}}function y(t){var e=Kb.call(arguments,1);return function(){return t.apply(this,e.concat(Kb.call(arguments)))}}function E(t){return"[object Array]"===Gb.call(t)}function m(t){return"function"==typeof t}function _(t){return"[object String]"===Gb.call(t)}function b(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function s(t){return!!Ub[Gb.call(t)]}function w(t){return!!qb[Gb.call(t)]}function S(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function C(t){return t!=t}function N(){for(var t=0,e=arguments.length;t<e;t++)if(null!=arguments[t])return arguments[t]}function R(t,e){return null!=t?t:e}function $(t,e,n){return null!=t?t:null!=e?e:n}function l(){return Function.call.apply(Kb,arguments)}function u(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function T(t,e){if(!t)throw new Error(e)}function d(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function h(t){t[n_]=!0}function M(t){return t[n_]}function k(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=E(t),i=this;t instanceof k?t.each(e):t&&I(t,e)}function F(t){return new k(t)}function z(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n}function j(){}function H(t,e){var n=new r_(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function B(t,e){return t[0]=e[0],t[1]=e[1],t}function V(t){var e=new r_(2);return e[0]=t[0],e[1]=t[1],e}function W(t,e,n){return t[0]=e,t[1]=n,t}function U(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function q(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function G(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Y(t){return Math.sqrt(Z(t))}function Z(t){return t[0]*t[0]+t[1]*t[1]}function X(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function K(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function Q(t,e){return t[0]*e[0]+t[1]*e[1]}function J(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function tt(t,e){var n=Y(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function et(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function nt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function it(t,e){return t[0]=-e[0],t[1]=-e[1],t}function rt(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function ot(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function at(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function st(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function lt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function ut(t,e){return{target:t,topTarget:e&&e.topTarget}}function ct(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which}}function dt(){}function ht(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||h_}return!1}function ft(){var t=new g_(6);return pt(t),t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function mt(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function vt(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function yt(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),c=Math.cos(n);return t[0]=i*c+a*u,t[1]=-i*u+a*c,t[2]=r*c+s*u,t[3]=-r*u+c*s,t[4]=c*o+u*l,t[5]=c*l-u*o,t}function xt(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function bt(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function _t(t){var e=ft();return gt(e,t),e}function wt(t){return y_<t||t<-y_}function St(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Ct(t){return(t=Math.round(t))<0?0:255<t?255:t}function Tt(t){return(t=Math.round(t))<0?0:360<t?360:t}function At(t){return t<0?0:1<t?1:t}function Dt(t){return t.length&&"%"===t.charAt(t.length-1)?Ct(parseFloat(t)/100*255):Ct(parseInt(t,10))}function Mt(t){return t.length&&"%"===t.charAt(t.length-1)?At(parseFloat(t)/100):At(parseFloat(t))}function kt(t,e,n){return n<0?n+=1:1<n&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function It(t,e,n){return t+(e-t)*n}function Et(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Lt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Ot(t,e){I_&&Lt(I_,e),I_=k_.put(t,I_||e.slice())}function Pt(t,e){if(t){e=e||[];var n=k_.get(t);if(n)return Lt(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in M_)return Lt(e,M_[r]),Ot(t,e),e;if("#"===r.charAt(0))return 4===r.length?0<=(i=parseInt(r.substr(1),16))&&i<=4095?(Et(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Ot(t,e),e):void Et(e,0,0,0,1):7===r.length?0<=(i=parseInt(r.substr(1),16))&&i<=16777215?(Et(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),Ot(t,e),e):void Et(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Et(e,0,0,0,1);u=Mt(l.pop());case"rgb":return 3!==l.length?void Et(e,0,0,0,1):(Et(e,Dt(l[0]),Dt(l[1]),Dt(l[2]),u),Ot(t,e),e);case"hsla":return 4!==l.length?void Et(e,0,0,0,1):(l[3]=Mt(l[3]),Nt(l,e),Ot(t,e),e);case"hsl":return 3!==l.length?void Et(e,0,0,0,1):(Nt(l,e),Ot(t,e),e);default:return}}Et(e,0,0,0,1)}}function Nt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Mt(t[1]),r=Mt(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Et(e=e||[],Ct(255*kt(a,o,n+1/3)),Ct(255*kt(a,o,n)),Ct(255*kt(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Rt(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)n=e=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-i)/6+l/2)/l,d=((s-r)/6+l/2)/l,h=((s-o)/6+l/2)/l;i===s?e=h-d:r===s?e=1/3+c-h:o===s&&(e=2/3+d-c),e<0&&(e+=1),1<e&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}function $t(t,e){var n=Pt(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:t[i]<0&&(n[i]=0);return Vt(n,4===n.length?"rgba":"rgb")}}function Ft(t){var e=Pt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function zt(t,e,n){if(e&&e.length&&0<=t&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Ct(It(a[0],s[0],l)),n[1]=Ct(It(a[1],s[1],l)),n[2]=Ct(It(a[2],s[2],l)),n[3]=At(It(a[3],s[3],l)),n}}function jt(t,e,n){if(e&&e.length&&0<=t&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=Pt(e[r]),s=Pt(e[o]),l=i-r,u=Vt([Ct(It(a[0],s[0],l)),Ct(It(a[1],s[1],l)),Ct(It(a[2],s[2],l)),At(It(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}function Ht(t,e,n,i){if(t=Pt(t))return t=Rt(t),null!=e&&(t[0]=Tt(e)),null!=n&&(t[1]=Mt(n)),null!=i&&(t[2]=Mt(i)),Vt(Nt(t),"rgba")}function Bt(t,e){if((t=Pt(t))&&null!=e)return t[3]=At(e),Vt(t,"rgba")}function Vt(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Wt(t,e){return t[e]}function Ut(t,e,n){t[e]=n}function qt(t,e,n){return(e-t)*n+t}function Gt(t,e,n){return.5<n?e:t}function Yt(t,e,n,i,r){var o=t.length;if(1==r)for(var a=0;a<o;a++)i[a]=qt(t[a],e[a],n);else{var s=o&&t[0].length;for(a=0;a<o;a++)for(var l=0;l<s;l++)i[a][l]=qt(t[a][l],e[a][l],n)}}function Zt(t,e,n){var i=t.length,r=e.length;if(i!==r)if(r<i)t.length=r;else for(var o=i;o<r;o++)t.push(1===n?e[o]:P_.call(e[o]));var a=t[0]&&t[0].length;for(o=0;o<t.length;o++)if(1===n)isNaN(t[o])&&(t[o]=e[o]);else for(var s=0;s<a;s++)isNaN(t[o][s])&&(t[o][s]=e[o][s])}function Xt(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;r<i;r++)if(t[r]!==e[r])return!1}else{var o=t[0].length;for(r=0;r<i;r++)for(var a=0;a<o;a++)if(t[r][a]!==e[r][a])return!1}return!0}function Kt(t,e,n,i,r,o,a,s,l){var u=t.length;if(1==l)for(var c=0;c<u;c++)s[c]=Qt(t[c],e[c],n[c],i[c],r,o,a);else{var d=t[0].length;for(c=0;c<u;c++)for(var h=0;h<d;h++)s[c][h]=Qt(t[c][h],e[c][h],n[c][h],i[c][h],r,o,a)}}function Qt(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function Jt(t){if(P(t)){var e=t.length;if(P(t[0])){for(var n=[],i=0;i<e;i++)n.push(P_.call(t[i]));return n}return P_.call(t)}return t}function te(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ee(t){var e=t[t.length-1].value;return P(e&&e[0])?2:1}function ne(t,e,n,i,o,r){var a=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var c,d=P(i[0].value),h=!1,f=!1,p=d?ee(i):0;i.sort(function(t,e){return t.time-e.time}),c=i[u-1].time;for(var g=[],m=[],v=i[0].value,y=!0,x=0;x<u;x++){g.push(i[x].time/c);var b=i[x].value;if(d&&Xt(b,v,p)||!d&&b===v||(y=!1),"string"==typeof(v=b)){var _=Pt(b);_?(b=_,h=!0):f=!0}m.push(b)}if(r||!y){var w=m[u-1];for(x=0;x<u-1;x++)d?Zt(m[x],w,p):!isNaN(m[x])||isNaN(w)||f||h||(m[x]=w);d&&Zt(a(t._target,o),w,p);var S,C,T,A,D,M=0,k=0;if(h)var I=[0,0,0,0];var E=function(t,e){var n;if(e<0)n=0;else if(e<k){for(n=Math.min(M+1,u-1);0<=n&&!(g[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=M;n<u&&!(g[n]>e);n++);n=Math.min(n-1,u-2)}k=e;var i=g[(M=n)+1]-g[n];if(0!==i)if(S=(e-g[n])/i,l)if(T=m[n],C=m[0===n?n:n-1],A=m[u-2<n?u-1:n+1],D=m[u-3<n?u-1:n+2],d)Kt(C,T,A,D,S,S*S,S*S*S,a(t,o),p);else{if(h)r=Kt(C,T,A,D,S,S*S,S*S*S,I,1),r=te(I);else{if(f)return Gt(T,A,S);r=Qt(C,T,A,D,S,S*S,S*S*S)}s(t,o,r)}else if(d)Yt(m[n],m[n+1],S,a(t,o),p);else{var r;if(h)Yt(m[n],m[n+1],S,I,1),r=te(I);else{if(f)return Gt(m[n],m[n+1],S);r=qt(m[n],m[n+1],S)}s(t,o,r)}},L=new St({target:t._target,life:c,loop:t._loop,delay:t._delay,onframe:E,ondestroy:n});return e&&"spline"!==e&&(L.easing=e),L}}}function ie(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function re(t){for(var e=0;K_<=t;)e|=1&t,t>>=1;return t+e}function oe(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r<n&&i(t[r],t[r-1])<0;)r++;ae(t,e,r)}else for(;r<n&&0<=i(t[r],t[r-1]);)r++;return r-e}function ae(t,e,n){for(n--;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}function se(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var o,a=t[i],s=e,l=i;s<l;)r(a,t[o=s+l>>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=a}}function le(t,e,n,i,r,o){var a=0,s=0,l=1;if(0<o(t,e[n+r])){for(s=i-r;l<s&&0<o(t,e[n+r+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(t,e[n+r-l])<=0;)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a<l;){var c=a+(l-a>>>1);0<o(t,e[n+c])?a=c+1:l=c}return l}function ue(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;l<s&&o(t,e[n+r-l])<0;)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l<s&&0<=o(t,e[n+r+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=r,l+=r}for(a++;a<l;){var c=a+(l-a>>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function ce(p,g){function t(t,e){l[c]=t,u[c]=e,c+=1}function e(){for(;1<c;){var t=c-2;if(1<=t&&u[t-1]<=u[t]+u[t+1]||2<=t&&u[t-2]<=u[t]+u[t-1])u[t-1]<u[t+1]&&t--;else if(u[t]>u[t+1])break;i(t)}}function n(){for(;1<c;){var t=c-2;0<t&&u[t-1]<u[t+1]&&t--,i(t)}}function i(t){var e=l[t],n=u[t],i=l[t+1],r=u[t+1];u[t]=n+r,t===c-3&&(l[t+1]=l[t+2],u[t+1]=u[t+2]),c--;var o=ue(p[i],p,e,n,0,g);e+=o,0!==(n-=o)&&0!==(r=le(p[e+n-1],p,i,r,r-1,g))&&(n<=r?a(e,n,i,r):s(e,n,i,r))}function a(t,e,n,i){var r=0;for(r=0;r<e;r++)v[r]=p[t+r];var o=0,a=n,s=t;if(p[s++]=p[a++],0!=--i)if(1!==e){for(var l,u,c,d=m;;){u=l=0,c=!1;do{if(g(p[a],v[o])<0){if(p[s++]=p[a++],u++,(l=0)==--i){c=!0;break}}else if(p[s++]=v[o++],l++,u=0,1==--e){c=!0;break}}while((l|u)<d);if(c)break;do{if(0!==(l=ue(p[a],v,o,e,0,g))){for(r=0;r<l;r++)p[s+r]=v[o+r];if(s+=l,o+=l,(e-=l)<=1){c=!0;break}}if(p[s++]=p[a++],0==--i){c=!0;break}if(0!==(u=le(v[o],p,a,i,0,g))){for(r=0;r<u;r++)p[s+r]=p[a+r];if(s+=u,a+=u,0===(i-=u)){c=!0;break}}if(p[s++]=v[o++],1==--e){c=!0;break}d--}while(Q_<=l||Q_<=u);if(c)break;d<0&&(d=0),d+=2}if((m=d)<1&&(m=1),1===e){for(r=0;r<i;r++)p[s+r]=p[a+r];p[s+i]=v[o]}else{if(0===e)throw new Error;for(r=0;r<e;r++)p[s+r]=v[o+r]}}else{for(r=0;r<i;r++)p[s+r]=p[a+r];p[s+i]=v[o]}else for(r=0;r<e;r++)p[s+r]=v[o+r]}function s(t,e,n,i){var r=0;for(r=0;r<i;r++)v[r]=p[n+r];var o=t+e-1,a=i-1,s=n+i-1,l=0,u=0;if(p[s--]=p[o--],0!=--e)if(1!==i){for(var c=m;;){var d=0,h=0,f=!1;do{if(g(v[a],p[o])<0){if(p[s--]=p[o--],d++,(h=0)==--e){f=!0;break}}else if(p[s--]=v[a--],h++,d=0,1==--i){f=!0;break}}while((d|h)<c);if(f)break;do{if(0!==(d=e-ue(v[a],p,t,e,e-1,g))){for(e-=d,u=(s-=d)+1,l=(o-=d)+1,r=d-1;0<=r;r--)p[u+r]=p[l+r];if(0===e){f=!0;break}}if(p[s--]=v[a--],1==--i){f=!0;break}if(0!==(h=i-le(p[o],v,0,i,i-1,g))){for(i-=h,u=(s-=h)+1,l=(a-=h)+1,r=0;r<h;r++)p[u+r]=v[l+r];if(i<=1){f=!0;break}}if(p[s--]=p[o--],0==--e){f=!0;break}c--}while(Q_<=d||Q_<=h);if(f)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===i){for(u=(s-=e)+1,l=(o-=e)+1,r=e-1;0<=r;r--)p[u+r]=p[l+r];p[s]=v[a]}else{if(0===i)throw new Error;for(l=s-(i-1),r=0;r<i;r++)p[l+r]=v[r]}}else{for(u=(s-=e)+1,l=(o-=e)+1,r=e-1;0<=r;r--)p[u+r]=p[l+r];p[s]=v[a]}else for(l=s-(i-1),r=0;r<i;r++)p[l+r]=v[r]}var l,u,m=Q_,c=0,v=[];l=[],u=[],this.mergeRuns=e,this.forceMergeRuns=n,this.pushRun=t}function de(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<K_)se(t,n,i,n+(o=oe(t,n,i,e)),e);else{var a=new ce(t,e),s=re(r);do{if((o=oe(t,n,i,e))<s){var l=r;s<l&&(l=s),se(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}function he(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function fe(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(i,o,r,a)}function pe(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*i+n.x,s=s*r+n.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}function ge(){return!1}function me(t,e,n){var i=e_(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}function ve(t){if("string"!=typeof t)return t;var e=cw.get(t);return e&&e.image}function ye(t,e,n,i,r){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var o=cw.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!be(e=o.image)&&o.pending.push(a):(!e&&(e=new Image),e.onload=xe,cw.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return e}function xe(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function be(t){return t&&t.width&&t.height}function _e(t,e){mw[t]=e}function we(t,e){var n=t+":"+(e=e||gw);if(dw[n])return dw[n];for(var i=(t+"").split("\n"),r=0,o=0,a=i.length;o<a;o++)r=Math.max(Pe(i[o],e).width,r);return fw<hw&&(hw=0,dw={}),hw++,dw[n]=r}function Se(t,e,n,i,r,o,a){return o?Te(t,e,n,i,r,o,a):Ce(t,e,n,i,r,a)}function Ce(t,e,n,i,r,o){var a=Ne(t,e,r,o),s=we(t,e);r&&(s+=r[1]+r[3]);var l=a.outerHeight,u=new ie(Ae(0,s,n),De(0,l,i),s,l);return u.lineHeight=a.lineHeight,u}function Te(t,e,n,i,r,o,a){var s=Re(t,{rich:o,truncate:a,font:e,textAlign:n,textPadding:r}),l=s.outerWidth,u=s.outerHeight;return new ie(Ae(0,l,n),De(0,u,i),l,u)}function Ae(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function De(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Me(t,e,n){var i=e.x,r=e.y,o=e.height,a=e.width,s=o/2,l="left",u="top";switch(t){case"left":i-=n,r+=s,l="right",u="middle";break;case"right":i+=n+a,r+=s,u="middle";break;case"top":i+=a/2,r-=n,l="center",u="bottom";break;case"bottom":i+=a/2,r+=o+n,l="center";break;case"inside":i+=a/2,r+=s,l="center",u="middle";break;case"insideLeft":i+=n,r+=s,u="middle";break;case"insideRight":i+=a-n,r+=s,l="right",u="middle";break;case"insideTop":i+=a/2,r+=n,l="center";break;case"insideBottom":i+=a/2,r+=o-n,l="center",u="bottom";break;case"insideTopLeft":i+=n,r+=n;break;case"insideTopRight":i+=a-n,r+=n,l="right";break;case"insideBottomLeft":i+=n,r+=o-n,u="bottom";break;case"insideBottomRight":i+=a-n,r+=o-n,l="right",u="bottom"}return{x:i,y:r,textAlign:l,textVerticalAlign:u}}function ke(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=Ie(e,n,i,r);for(var a=0,s=o.length;a<s;a++)o[a]=Ee(o[a],r);return o.join("\n")}function Ie(t,e,n,i){(i=O({},i)).font=e;n=R(n,"...");i.maxIterations=R(i.maxIterations,2);var r=i.minChar=R(i.minChar,0);i.cnCharWidth=we("\u56fd",e);var o=i.ascCharWidth=we("a",e);i.placeholder=R(i.placeholder,"");for(var a=t=Math.max(0,t-1),s=0;s<r&&o<=a;s++)a-=o;var l=we(n);return a<l&&(n="",l=0),a=t-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=a,i.containerWidth=t,i}function Ee(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=we(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?Le(t,r,e.ascCharWidth,e.cnCharWidth):0<o?Math.floor(t.length*r/o):0;o=we(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function Le(t,e,n,i){for(var r=0,o=0,a=t.length;o<a&&r<e;o++){var s=t.charCodeAt(o);r+=0<=s&&s<=127?n:i}return o}function Oe(t){return we("\u56fd",t)}function Pe(t,e){return mw.measureText(t,e)}function Ne(t,e,n,i){null!=t&&(t+="");var r=Oe(e),o=t?t.split("\n"):[],a=o.length*r,s=a;if(n&&(s+=n[0]+n[2]),t&&i){var l=i.outerHeight,u=i.outerWidth;if(null!=l&&l<s)t="",o=[];else if(null!=u)for(var c=Ie(u-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),d=0,h=o.length;d<h;d++)o[d]=Ee(o[d],c)}return{lines:o,height:a,outerHeight:s,lineHeight:r}}function Re(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=pw.lastIndex=0;null!=(i=pw.exec(t));){var o=i.index;r<o&&$e(n,t.substring(r,o)),$e(n,i[2],i[1]),r=pw.lastIndex}r<t.length&&$e(n,t.substring(r,t.length));var a=n.lines,s=0,l=0,u=[],c=e.textPadding,d=e.truncate,h=d&&d.outerWidth,f=d&&d.outerHeight;c&&(null!=h&&(h-=c[1]+c[3]),null!=f&&(f-=c[0]+c[2]));for(var p=0;p<a.length;p++){for(var g=a[p],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(k=g.tokens[y]).styleName&&e.rich[k.styleName]||{},b=k.textPadding=x.textPadding,_=k.font=x.font||e.font,w=k.textHeight=R(x.textHeight,Oe(_));if(b&&(w+=b[0]+b[2]),k.height=w,k.lineHeight=$(x.textLineHeight,e.textLineHeight,w),k.textAlign=x&&x.textAlign||e.textAlign,k.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+k.lineHeight>f)return{lines:[],width:0,height:0};k.textWidth=we(k.text,_);var S=x.textWidth,C=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))k.percentWidth=S,u.push(k),S=0;else{if(C){S=k.textWidth;var T=x.textBackgroundColor,A=T&&T.image;A&&be(A=ve(A))&&(S=Math.max(S,A.width*w/A.height))}var D=b?b[1]+b[3]:0;S+=D;var M=null!=h?h-v:null;null!=M&&M<S&&(!C||M<D?(k.text="",k.textWidth=S=0):(k.text=ke(k.text,M-D,_,d.ellipsis,{minChar:d.minChar}),k.textWidth=we(k.text,_),S=k.textWidth+D))}v+=k.width=S,x&&(m=Math.max(m,k.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}n.outerWidth=n.width=R(e.textWidth,l),n.outerHeight=n.height=R(e.textHeight,s),c&&(n.outerWidth+=c[1]+c[3],n.outerHeight+=c[0]+c[2]);for(p=0;p<u.length;p++){var k,I=(k=u[p]).percentWidth;k.width=parseInt(I,10)/100*l}return n}function $e(t,e,n){for(var i=""===e,r=e.split("\n"),o=t.lines,a=0;a<r.length;a++){var s=r[a],l={styleName:n,text:s,isLineHolder:!s&&!i};if(a)o.push({tokens:[l]});else{var u=(o[o.length-1]||(o[0]={tokens:[]})).tokens,c=u.length;1===c&&u[0].isLineHolder?u[0]=l:(s||!c||i)&&u.push(l)}}}function Fe(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&d(e)||t.textFont||t.font}function ze(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,c=e.height,d=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=i=r=o=d:d instanceof Array?1===d.length?n=i=r=o=d[0]:2===d.length?(n=r=d[0],i=o=d[1]):3===d.length?(n=d[0],i=o=d[1],r=d[2]):(n=d[0],i=d[1],r=d[2],o=d[3]):n=i=r=o=0,u<n+i&&(n*=u/(a=n+i),i*=u/a),u<r+o&&(r*=u/(a=r+o),o*=u/a),c<i+r&&(i*=c/(a=i+r),r*=c/a),c<n+o&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+c-r),0!==r&&t.arc(s+u-r,l+c-r,r,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}function je(t){return He(t),I(t.rich,He),t}function He(t){if(t){t.font=Fe(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||vw[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||yw[n]?n:"top",t.textPadding&&(t.textPadding=u(t.textPadding))}}function Be(t,e,n,i,r){i.rich?We(t,e,n,i,r):Ve(t,e,n,i,r)}function Ve(t,e,n,i,r){var o=Qe(e,"font",i.font||gw),a=i.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=Ne(n,o,a,i.truncate));var l=s.outerHeight,u=s.lines,c=s.lineHeight,d=Ke(l,i,r),h=d.baseX,f=d.baseY,p=d.textAlign,g=d.textVerticalAlign;qe(e,i,r,h,f);var m=De(f,l,g),v=h,y=m,x=Ye(i);if(x||a){var b=we(n,o);a&&(b+=a[1]+a[3]);var _=Ae(h,b,p);x&&Ze(t,e,i,_,m,b,l),a&&(v=nn(h,p,a),y+=a[0])}Qe(e,"textAlign",p||"left"),Qe(e,"textBaseline","middle"),Qe(e,"shadowBlur",i.textShadowBlur||0),Qe(e,"shadowColor",i.textShadowColor||"transparent"),Qe(e,"shadowOffsetX",i.textShadowOffsetX||0),Qe(e,"shadowOffsetY",i.textShadowOffsetY||0),y+=c/2;var w=i.textStrokeWidth,S=Je(i.textStroke,w),C=tn(i.textFill);S&&(Qe(e,"lineWidth",w),Qe(e,"strokeStyle",S)),C&&Qe(e,"fillStyle",C);for(var T=0;T<u.length;T++)S&&e.strokeText(u[T],v,y),C&&e.fillText(u[T],v,y),y+=c}function We(t,e,n,i,r){var o=t.__textCotentBlock;o&&!t.__dirty||(o=t.__textCotentBlock=Re(n,i)),Ue(t,e,o,i,r)}function Ue(t,e,n,i,r){var o=n.width,a=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=Ke(s,i,r),c=u.baseX,d=u.baseY,h=u.textAlign,f=u.textVerticalAlign;qe(e,i,r,c,d);var p=Ae(c,a,h),g=De(d,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+o;Ye(i)&&Ze(t,e,i,p,g,a,s);for(var x=0;x<n.lines.length;x++){for(var b,_=n.lines[x],w=_.tokens,S=w.length,C=_.lineHeight,T=_.width,A=0,D=m,M=y,k=S-1;A<S&&(!(b=w[A]).textAlign||"left"===b.textAlign);)Ge(t,e,b,i,C,v,D,"left"),T-=b.width,D+=b.width,A++;for(;0<=k&&"right"===(b=w[k]).textAlign;)Ge(t,e,b,i,C,v,M,"right"),T-=b.width,M-=b.width,k--;for(D+=(o-(D-m)-(y-M)-T)/2;A<=k;)Ge(t,e,b=w[A],i,C,v,D+b.width/2,"center"),D+=b.width,A++;v+=C}}function qe(t,e,n,i,r){if(n&&e.textRotation){var o=e.textOrigin;"center"===o?(i=n.width/2+n.x,r=n.height/2+n.y):o&&(i=o[0]+n.x,r=o[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function Ge(t,e,n,i,r,o,a,s){var l=i.rich[n.styleName]||{},u=n.textVerticalAlign,c=o+r/2;"top"===u?c=o+n.height/2:"bottom"===u&&(c=o+r-n.height/2),!n.isLineHolder&&Ye(l)&&Ze(t,e,l,"right"===s?a-n.width:"center"===s?a-n.width/2:a,c-n.height/2,n.width,n.height);var d=n.textPadding;d&&(a=nn(a,s,d),c-=n.height/2-d[2]-n.textHeight/2),Qe(e,"shadowBlur",$(l.textShadowBlur,i.textShadowBlur,0)),Qe(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Qe(e,"shadowOffsetX",$(l.textShadowOffsetX,i.textShadowOffsetX,0)),Qe(e,"shadowOffsetY",$(l.textShadowOffsetY,i.textShadowOffsetY,0)),Qe(e,"textAlign",s),Qe(e,"textBaseline","middle"),Qe(e,"font",n.font||gw);var h=Je(l.textStroke||i.textStroke,p),f=tn(l.textFill||i.textFill),p=R(l.textStrokeWidth,i.textStrokeWidth);h&&(Qe(e,"lineWidth",p),Qe(e,"strokeStyle",h),e.strokeText(n.text,a,c)),f&&(Qe(e,"fillStyle",f),e.fillText(n.text,a,c))}function Ye(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ze(t,e,n,i,r,o,a){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,c=_(s);if(Qe(e,"shadowBlur",n.textBoxShadowBlur||0),Qe(e,"shadowColor",n.textBoxShadowColor||"transparent"),Qe(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Qe(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),c||l&&u){e.beginPath();var d=n.textBorderRadius;d?ze(e,{x:i,y:r,width:o,height:a,r:d}):e.rect(i,r,o,a),e.closePath()}if(c)Qe(e,"fillStyle",s),e.fill();else if(b(s)){var h=s.image;(h=ye(h,null,t,Xe,s))&&be(h)&&e.drawImage(h,i,r,o,a)}l&&u&&(Qe(e,"lineWidth",l),Qe(e,"strokeStyle",u),e.stroke())}function Xe(t,e){e.image=t}function Ke(t,e,n){var i=e.x||0,r=e.y||0,o=e.textAlign,a=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)i=n.x+en(s[0],n.width),r=n.y+en(s[1],n.height);else{var l=Me(s,n,e.textDistance);i=l.x,r=l.y,o=o||l.textAlign,a=a||l.textVerticalAlign}var u=e.textOffset;u&&(i+=u[0],r+=u[1])}return{baseX:i,baseY:r,textAlign:o,textVerticalAlign:a}}function Qe(t,e,n){return t[e]=ew(t,e,n),t[e]}function Je(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function tn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function en(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function nn(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function rn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function on(t){for(var e in t=t||{},B_.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new iw(t.style,this),this._rect=null,this.__clipPaths=[]}function an(t){on.call(this,t)}function sn(t){return parseInt(t,10)}function ln(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function un(t,e,n){return Tw.copy(t.getBoundingRect()),t.transform&&Tw.applyTransform(t.transform),Aw.width=e,Aw.height=n,!Tw.intersect(Aw)}function cn(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0}function dn(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}function hn(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}function fn(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function pn(t,e,n,i){return n=n||{},i||!Wb.canvasSupported?gn(t,e,n):Wb.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):gn(t,e,n),n}function gn(t,e,n){var i=fn(t);n.zrX=e.clientX-i.left,n.zrY=e.clientY-i.top}function mn(t,e,n){if(null!=(e=e||window.event).zrX)return e;var i=e.type;if(i&&0<=i.indexOf("touch")){var r="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];r&&pn(t,r,e,n)}else pn(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&o!==undefined&&kw.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function vn(t,e,n){Mw?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function yn(t,e,n){Mw?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function xn(t){return 1<t.which}function bn(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function _n(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function wn(t){return"mousewheel"===t&&Wb.browser.firefox?"DOMMouseScroll":t}function Sn(t,e,n){var i=t._gestureMgr;"start"===n&&i.clear();var r=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===n&&i.clear(),r){var o=r.type;e.gestureEvent=o,t.handler.dispatchToElement({target:r.target},o,r.event)}}function Cn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Tn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function An(e){function n(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}I(Rw,function(t){e._handlers[t]=v(zw[t],e)}),I(Fw,function(t){e._handlers[t]=v(zw[t],e)}),I(Nw,function(t){e._handlers[t]=n(zw[t],e)})}function Dn(n){function t(t,e){I(t,function(t){vn(n,wn(t),e._handlers[t])},e)}d_.call(this),this.dom=n,this._touching=!1,this._touchTimer,this._gestureMgr=new Lw,this._handlers={},An(this),Wb.pointerEventsSupported?t(Fw,this):(Wb.touchEventsSupported&&t(Rw,this),t(Nw,this))}function Mn(t,e){var n=new Uw(Vb(),t,e);return Vw[n.id]=n}function kn(t){if(t)t.dispose();else{for(var e in Vw)Vw.hasOwnProperty(e)&&Vw[e].dispose();Vw={}}return this}function In(t){return Vw[t]}function En(t,e){Bw[t]=e}function Ln(t){delete Vw[t]}function On(t){
|
|
return t instanceof Array?t:null==t?[]:[t]}function Pn(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function Nn(t){return!Yw(t)||Zw(t)||t instanceof Date?t:t.value}function Rn(t){return Yw(t)&&!(t instanceof Array)}function $n(t,r){r=(r||[]).slice();var o=A(t||[],function(t){return{exist:t}});return Gw(r,function(t,e){if(Yw(t)){for(var n=0;n<o.length;n++)if(!o[n].option&&null!=t.id&&o[n].exist.id===t.id+"")return o[n].option=t,void(r[e]=null);for(n=0;n<o.length;n++){var i=o[n].exist;if(!(o[n].option||null!=i.id&&null!=t.id||null==t.name||jn(t)||jn(i)||i.name!==t.name+""))return o[n].option=t,void(r[e]=null)}}}),Gw(r,function(t){if(Yw(t)){for(var e=0;e<o.length;e++){var n=o[e].exist;if(!o[e].option&&!jn(n)&&null==t.id){o[e].option=t;break}}e>=o.length&&o.push({option:t})}}),o}function Fn(t){var a=F();Gw(t,function(t){var e=t.exist;e&&a.set(e.id,t)}),Gw(t,function(t){var e=t.option;T(!e||null==e.id||!a.get(e.id)||a.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&a.set(e.id,t),!t.keyInfo&&(t.keyInfo={})}),Gw(t,function(t,e){var n=t.exist,i=t.option,r=t.keyInfo;if(Yw(i)){if(r.name=null!=i.name?i.name+"":n?n.name:Xw+e,n)r.id=n.id;else if(null!=i.id)r.id=i.id+"";else for(var o=0;r.id="\0"+r.name+"\0"+o++,a.get(r.id););a.set(r.id,t)}})}function zn(t){var e=t.name;return!(!e||!e.indexOf(Xw))}function jn(t){return Yw(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Hn(t,e){function n(t,e,n){for(var i=0,r=t.length;i<r;i++)for(var o=t[i].seriesId,a=On(t[i].dataIndex),s=n&&n[o],l=0,u=a.length;l<u;l++){var c=a[l];s&&s[c]?s[c]=null:(e[o]||(e[o]={}))[c]=1}}function o(t,e){var n=[];for(var i in t)if(t.hasOwnProperty(i)&&null!=t[i])if(e)n.push(+i);else{var r=o(t[i],!0);r.length&&n.push({seriesId:i,dataIndex:r})}return n}var i={},r={};return n(t||[],i),n(e||[],r,i),[o(i),o(r)]}function Bn(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?E(t.dataIndex)?A(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?E(t.name)?A(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Vn(){var e="__\0ec_inner_"+Qw+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}function Wn(s,l,u){if(_(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||Un(l,e+"Index")||Un(l,e+"Id")||Un(l,e+"Name")||(l[e+"Index"]=0);var c={};return Gw(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var n=e.match(/^(\w+)(Index|Id|Name)$/)||[],i=n[1],r=(n[2]||"").toLowerCase();if(!(!i||!r||null==t||"index"===r&&"none"===t||u&&u.includeMainTypes&&x(u.includeMainTypes,i)<0)){var o={mainType:i};"index"===r&&"all"===t||(o[r]=t);var a=s.queryComponents(o);c[i+"Models"]=a,c[i+"Model"]=a[0]}}else c[e]=t}),c}function Un(t,e){return t&&t.hasOwnProperty(e)}function qn(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Gn(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Yn(t){var e={main:"",sub:""};return t&&(t=t.split(Jw),e.main=t[0]||"",e.sub=t[1]||""),e}function Zn(t){T(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Xn(t,i){(t.$constructor=t).extend=function(e){Hb&&I(i,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?" in "+e.type:"")+".")});var t=this,n=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return O(n.prototype,e),n.extend=this.extend,n.superCall=Qn,n.superApply=Jn,o(n,this),n.superClass=t,n}}function Kn(t){var e=["__\0is_clz",eS++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,Hb&&T(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(t){return!(!t||!t[e])}}function Qn(t,e){var n=l(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Jn(t,e,n){return this.superClass.prototype[e].apply(t,n)}function ti(n,t){function i(t){var e=r[t.main];return e&&e[tS]||((e=r[t.main]={})[tS]=!0),e}t=t||{};var r={};if(n.registerClass=function(t,e){if(e)if(Zn(e),(e=Yn(e)).sub){if(e.sub!==tS){i(e)[e.sub]=t}}else Hb&&r[e.main]&&console.warn(e.main+" exists."),r[e.main]=t;return t},n.getClass=function(t,e,n){var i=r[t];if(i&&i[tS]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=Yn(t);var n=[],e=r[t.main];return e&&e[tS]?I(e,function(t,e){e!==tS&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=Yn(t),!!r[t.main]},n.getAllClassMainTypes=function(){var n=[];return I(r,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=Yn(t);var e=r[t.main];return e&&e[tS]},n.parseClassType=Yn,t.registerWhenExtend){var o=n.extend;o&&(n.extend=function(t){var e=o.call(this,t);return n.registerClass(e,t.type)})}return n}function ei(t){return-uS<t&&t<uS}function ni(t){return uS<t||t<-uS}function ii(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function ri(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function oi(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,f=0;if(ei(c)&&ei(d)){if(ei(s))o[0]=0;else 0<=(C=-l/s)&&C<=1&&(o[f++]=C)}else{var p=d*d-4*c*h;if(ei(p)){var g=d/c,m=-g/2;0<=(C=-s/a+g)&&C<=1&&(o[f++]=C),0<=m&&m<=1&&(o[f++]=m)}else if(0<p){var v=lS(p),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);0<=(C=(-s-((y=y<0?-sS(-y,hS):sS(y,hS))+(x=x<0?-sS(-x,hS):sS(x,hS))))/(3*a))&&C<=1&&(o[f++]=C)}else{var b=(2*c*s-3*a*d)/(2*lS(c*c*c)),_=Math.acos(b)/3,w=lS(c),S=Math.cos(_),C=(-s-2*w*S)/(3*a),T=(m=(-s+w*(S+dS*Math.sin(_)))/(3*a),(-s+w*(S-dS*Math.sin(_)))/(3*a));0<=C&&C<=1&&(o[f++]=C),0<=m&&m<=1&&(o[f++]=m),0<=T&&T<=1&&(o[f++]=T)}}return f}function ai(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(ei(a)){if(ni(o))0<=(c=-s/o)&&c<=1&&(r[l++]=c)}else{var u=o*o-4*a*s;if(ei(u))r[0]=-o/(2*a);else if(0<u){var c,d=lS(u),h=(-o-d)/(2*a);0<=(c=(-o+d)/(2*a))&&c<=1&&(r[l++]=c),0<=h&&h<=1&&(r[l++]=h)}}return l}function si(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,c=(l-s)*r+s,d=(c-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=i}function li(t,e,n,i,r,o,a,s,l,u,c){var d,h,f,p,g,m=.005,v=Infinity;fS[0]=l,fS[1]=u;for(var y=0;y<1;y+=.05)pS[0]=ii(t,n,r,a,y),pS[1]=ii(e,i,o,s,y),(p=l_(fS,pS))<v&&(d=y,v=p);v=Infinity;for(var x=0;x<32&&!(m<cS);x++)h=d-m,f=d+m,pS[0]=ii(t,n,r,a,h),pS[1]=ii(e,i,o,s,h),p=l_(pS,fS),0<=h&&p<v?(d=h,v=p):(gS[0]=ii(t,n,r,a,f),gS[1]=ii(e,i,o,s,f),g=l_(gS,fS),f<=1&&g<v?(d=f,v=g):m*=.5);return c&&(c[0]=ii(t,n,r,a,d),c[1]=ii(e,i,o,s,d)),lS(v)}function ui(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function ci(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function di(t,e,n,i,r){var o=t-2*e+n,a=2*(e-t),s=t-i,l=0;if(ei(o)){if(ni(a))0<=(c=-s/a)&&c<=1&&(r[l++]=c)}else{var u=a*a-4*o*s;if(ei(u))0<=(c=-a/(2*o))&&c<=1&&(r[l++]=c);else if(0<u){var c,d=lS(u),h=(-a-d)/(2*o);0<=(c=(-a+d)/(2*o))&&c<=1&&(r[l++]=c),0<=h&&h<=1&&(r[l++]=h)}}return l}function hi(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function fi(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function pi(t,e,n,i,r,o,a,s,l){var u,c=.005,d=Infinity;fS[0]=a,fS[1]=s;for(var h=0;h<1;h+=.05){pS[0]=ui(t,n,r,h),pS[1]=ui(e,i,o,h),(m=l_(fS,pS))<d&&(u=h,d=m)}d=Infinity;for(var f=0;f<32&&!(c<cS);f++){var p=u-c,g=u+c;pS[0]=ui(t,n,r,p),pS[1]=ui(e,i,o,p);var m=l_(pS,fS);if(0<=p&&m<d)u=p,d=m;else{gS[0]=ui(t,n,r,g),gS[1]=ui(e,i,o,g);var v=l_(gS,fS);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=ui(t,n,r,u),l[1]=ui(e,i,o,u)),lS(d)}function gi(t,e,n){if(0!==t.length){var i,r=t[0],o=r[0],a=r[0],s=r[1],l=r[1];for(i=1;i<t.length;i++)r=t[i],o=mS(o,r[0]),a=vS(a,r[0]),s=mS(s,r[1]),l=vS(l,r[1]);e[0]=o,e[1]=s,n[0]=a,n[1]=l}}function mi(t,e,n,i,r,o){r[0]=mS(t,n),r[1]=mS(e,i),o[0]=vS(t,n),o[1]=vS(e,i)}function vi(t,e,n,i,r,o,a,s,l,u){var c,d=ai,h=ii,f=d(t,n,r,a,CS);for(l[0]=Infinity,l[1]=Infinity,u[0]=-Infinity,u[1]=-Infinity,c=0;c<f;c++){var p=h(t,n,r,a,CS[c]);l[0]=mS(p,l[0]),u[0]=vS(p,u[0])}for(f=d(e,i,o,s,TS),c=0;c<f;c++){var g=h(e,i,o,s,TS[c]);l[1]=mS(g,l[1]),u[1]=vS(g,u[1])}l[0]=mS(t,l[0]),u[0]=vS(t,u[0]),l[0]=mS(a,l[0]),u[0]=vS(a,u[0]),l[1]=mS(e,l[1]),u[1]=vS(e,u[1]),l[1]=mS(s,l[1]),u[1]=vS(s,u[1])}function yi(t,e,n,i,r,o,a,s){var l=hi,u=ui,c=vS(mS(l(t,n,r),1),0),d=vS(mS(l(e,i,o),1),0),h=u(t,n,r,c),f=u(e,i,o,d);a[0]=mS(t,r,h),a[1]=mS(e,o,f),s[0]=vS(t,r,h),s[1]=vS(e,o,f)}function xi(t,e,n,i,r,o,a,s,l){var u=at,c=st,d=Math.abs(r-o);if(d%bS<1e-4&&1e-4<d)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(_S[0]=xS(r)*n+t,_S[1]=yS(r)*i+e,wS[0]=xS(o)*n+t,wS[1]=yS(o)*i+e,u(s,_S,wS),c(l,_S,wS),(r%=bS)<0&&(r+=bS),(o%=bS)<0&&(o+=bS),o<r&&!a?o+=bS:r<o&&a&&(r+=bS),a){var h=o;o=r,r=h}for(var f=0;f<o;f+=Math.PI/2)r<f&&(SS[0]=xS(f)*n+t,SS[1]=yS(f)*i+e,u(s,SS,s),c(l,SS,l))}function bi(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(e+s<a&&i+s<a||a<e-s&&a<i-s||t+s<o&&n+s<o||o<t-s&&o<n-s)return!1;if(t===n)return Math.abs(o-t)<=s/2;var u=(l=(e-i)/(t-n))*o-a+(t*i-n*e)/(t-n);return u*u/(l*l+1)<=s/2*s/2}function _i(t,e,n,i,r,o,a,s,l,u,c){if(0===l)return!1;var d=l;return!(e+d<c&&i+d<c&&o+d<c&&s+d<c||c<e-d&&c<i-d&&c<o-d&&c<s-d||t+d<u&&n+d<u&&r+d<u&&a+d<u||u<t-d&&u<n-d&&u<r-d&&u<a-d)&&li(t,e,n,i,r,o,a,s,u,c,null)<=d/2}function wi(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;return!(e+u<l&&i+u<l&&o+u<l||l<e-u&&l<i-u&&l<o-u||t+u<s&&n+u<s&&r+u<s||s<t-u&&s<n-u&&s<r-u)&&pi(t,e,n,i,r,o,s,l,null)<=u/2}function Si(t){return(t%=zS)<0&&(t+=zS),t}function Ci(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var c=Math.sqrt(s*s+l*l);if(n<c-u||c+u<n)return!1;if(Math.abs(i-r)%jS<1e-4)return!0;if(o){var d=i;i=Si(r),r=Si(d)}else i=Si(i),r=Si(r);r<i&&(r+=jS);var h=Math.atan2(l,s);return h<0&&(h+=jS),i<=h&&h<=r||i<=h+jS&&h+jS<=r}function Ti(t,e,n,i,r,o){if(e<o&&i<o||o<e&&o<i)return 0;if(i===e)return 0;var a=i<e?1:-1,s=(o-e)/(i-e);1!==s&&0!==s||(a=i<e?.5:-.5);var l=s*(n-t)+t;return l===r?Infinity:r<l?a:0}function Ai(t,e){return Math.abs(t-e)<VS}function Di(){var t=US[0];US[0]=US[1],US[1]=t}function Mi(t,e,n,i,r,o,a,s,l,u){if(e<u&&i<u&&o<u&&s<u||u<e&&u<i&&u<o&&u<s)return 0;var c=oi(e,i,o,s,u,WS);if(0===c)return 0;for(var d,h,f=0,p=-1,g=0;g<c;g++){var m=WS[g],v=0===m||1===m?.5:1;ii(t,n,r,a,m)<l||(p<0&&(p=ai(e,i,o,s,US),US[1]<US[0]&&1<p&&Di(),d=ii(e,i,o,s,US[0]),1<p&&(h=ii(e,i,o,s,US[1]))),2==p?m<US[0]?f+=d<e?v:-v:m<US[1]?f+=h<d?v:-v:f+=s<h?v:-v:m<US[0]?f+=d<e?v:-v:f+=s<d?v:-v)}return f}function ki(t,e,n,i,r,o,a,s){if(e<s&&i<s&&o<s||s<e&&s<i&&s<o)return 0;var l=di(e,i,o,s,WS);if(0===l)return 0;var u=hi(e,i,o);if(0<=u&&u<=1){for(var c=0,d=ui(e,i,o,u),h=0;h<l;h++){var f=0===WS[h]||1===WS[h]?.5:1;ui(t,n,r,WS[h])<a||(WS[h]<u?c+=d<e?f:-f:c+=o<d?f:-f)}return c}f=0===WS[0]||1===WS[0]?.5:1;return ui(t,n,r,WS[0])<a?0:o<e?f:-f}function Ii(t,e,n,i,r,o,a,s){if(n<(s-=e)||s<-n)return 0;var l=Math.sqrt(n*n-s*s);WS[0]=-l,WS[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u%BS<1e-4){r=BS;var c=o?1:-1;return a>=WS[i=0]+t&&a<=WS[1]+t?c:0}if(o){l=i;i=Si(r),r=Si(l)}else i=Si(i),r=Si(r);r<i&&(r+=BS);for(var d=0,h=0;h<2;h++){var f=WS[h];if(a<f+t){var p=Math.atan2(s,f);c=o?1:-1;p<0&&(p=BS+p),(i<=p&&p<=r||i<=p+BS&&p+BS<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(c=-c),d+=c)}}return d}function Ei(t,e,n,i,r){for(var o=0,a=0,s=0,l=0,u=0,c=0;c<t.length;){var d=t[c++];switch(d===HS.M&&1<c&&(n||(o+=Ti(a,s,l,u,i,r))),1==c&&(l=a=t[c],u=s=t[c+1]),d){case HS.M:a=l=t[c++],s=u=t[c++];break;case HS.L:if(n){if(bi(a,s,t[c],t[c+1],e,i,r))return!0}else o+=Ti(a,s,t[c],t[c+1],i,r)||0;a=t[c++],s=t[c++];break;case HS.C:if(n){if(_i(a,s,t[c++],t[c++],t[c++],t[c++],t[c],t[c+1],e,i,r))return!0}else o+=Mi(a,s,t[c++],t[c++],t[c++],t[c++],t[c],t[c+1],i,r)||0;a=t[c++],s=t[c++];break;case HS.Q:if(n){if(wi(a,s,t[c++],t[c++],t[c],t[c+1],e,i,r))return!0}else o+=ki(a,s,t[c++],t[c++],t[c],t[c+1],i,r)||0;a=t[c++],s=t[c++];break;case HS.A:var h=t[c++],f=t[c++],p=t[c++],g=t[c++],m=t[c++],v=t[c++],y=(t[c++],1-t[c++]),x=Math.cos(m)*p+h,b=Math.sin(m)*g+f;1<c?o+=Ti(a,s,x,b,i,r):(l=x,u=b);var _=(i-h)*g/p+h;if(n){if(Ci(h,f,g,m,m+v,y,e,_,r))return!0}else o+=Ii(h,f,g,m,m+v,y,_,r);a=Math.cos(m+v)*p+h,s=Math.sin(m+v)*g+f;break;case HS.R:l=a=t[c++],u=s=t[c++];x=l+t[c++],b=u+t[c++];if(n){if(bi(l,u,x,u,e,i,r)||bi(x,u,x,b,e,i,r)||bi(x,b,l,b,e,i,r)||bi(l,b,l,u,e,i,r))return!0}else o+=Ti(x,u,x,b,i,r),o+=Ti(l,b,l,u,i,r);break;case HS.Z:if(n){if(bi(a,s,l,u,e,i,r))return!0}else o+=Ti(a,s,l,u,i,r);a=l,s=u}}return n||Ai(s,u)||(o+=Ti(a,s,l,u,i,r)||0),0!==o}function Li(t,e,n){return Ei(t,0,!1,e,n)}function Oi(t,e,n,i){return Ei(t,e,!0,n,i)}function Pi(t){on.call(this,t),this.path=null}function Ni(t,e,n,i,r,o,a,s,l,u,c){var d=l*(rC/180),h=iC(d)*(t-n)/2+nC(d)*(e-i)/2,f=-1*nC(d)*(t-n)/2+iC(d)*(e-i)/2,p=h*h/(a*a)+f*f/(s*s);1<p&&(a*=eC(p),s*=eC(p));var g=(r===o?-1:1)*eC((a*a*(s*s)-a*a*(f*f)-s*s*(h*h))/(a*a*(f*f)+s*s*(h*h)))||0,m=g*a*f/s,v=g*-s*h/a,y=(t+n)/2+iC(d)*m-nC(d)*v,x=(e+i)/2+nC(d)*m+iC(d)*v,b=sC([1,0],[(h-m)/a,(f-v)/s]),_=[(h-m)/a,(f-v)/s],w=[(-1*h-m)/a,(-1*f-v)/s],S=sC(_,w);aC(_,w)<=-1&&(S=rC),1<=aC(_,w)&&(S=0),0===o&&0<S&&(S-=2*rC),1===o&&S<0&&(S+=2*rC),c.addData(u,y,x,a,s,b,S,d,o)}function Ri(t){if(!t)return[];var e,n=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e<tC.length;e++)n=n.replace(new RegExp(tC[e],"g"),"|"+tC[e]);var i,r=n.split("|"),o=0,a=0,s=new FS,l=FS.CMD;for(e=1;e<r.length;e++){var u,c=r[e],d=c.charAt(0),h=0,f=c.slice(1).replace(/e,-/g,"e-").split(",");0<f.length&&""===f[0]&&f.shift();for(var p=0;p<f.length;p++)f[p]=parseFloat(f[p]);for(;h<f.length&&!isNaN(f[h])&&!isNaN(f[0]);){var g,m,v,y,x,b,_,w=o,S=a;switch(d){case"l":o+=f[h++],a+=f[h++],u=l.L,s.addData(u,o,a);break;case"L":o=f[h++],a=f[h++],u=l.L,s.addData(u,o,a);break;case"m":o+=f[h++],a+=f[h++],u=l.M,s.addData(u,o,a),d="l";break;case"M":o=f[h++],a=f[h++],u=l.M,s.addData(u,o,a),d="L";break;case"h":o+=f[h++],u=l.L,s.addData(u,o,a);break;case"H":o=f[h++],u=l.L,s.addData(u,o,a);break;case"v":a+=f[h++],u=l.L,s.addData(u,o,a);break;case"V":a=f[h++],u=l.L,s.addData(u,o,a);break;case"C":u=l.C,s.addData(u,f[h++],f[h++],f[h++],f[h++],f[h++],f[h++]),o=f[h-2],a=f[h-1];break;case"c":u=l.C,s.addData(u,f[h++]+o,f[h++]+a,f[h++]+o,f[h++]+a,f[h++]+o,f[h++]+a),o+=f[h-2],a+=f[h-1];break;case"S":g=o,m=a;var C=s.len(),T=s.data;i===l.C&&(g+=o-T[C-4],m+=a-T[C-3]),u=l.C,w=f[h++],S=f[h++],o=f[h++],a=f[h++],s.addData(u,g,m,w,S,o,a);break;case"s":g=o,m=a;C=s.len(),T=s.data;i===l.C&&(g+=o-T[C-4],m+=a-T[C-3]),u=l.C,w=o+f[h++],S=a+f[h++],o+=f[h++],a+=f[h++],s.addData(u,g,m,w,S,o,a);break;case"Q":w=f[h++],S=f[h++],o=f[h++],a=f[h++],u=l.Q,s.addData(u,w,S,o,a);break;case"q":w=f[h++]+o,S=f[h++]+a,o+=f[h++],a+=f[h++],u=l.Q,s.addData(u,w,S,o,a);break;case"T":g=o,m=a;C=s.len(),T=s.data;i===l.Q&&(g+=o-T[C-4],m+=a-T[C-3]),o=f[h++],a=f[h++],u=l.Q,s.addData(u,g,m,o,a);break;case"t":g=o,m=a;C=s.len(),T=s.data;i===l.Q&&(g+=o-T[C-4],m+=a-T[C-3]),o+=f[h++],a+=f[h++],u=l.Q,s.addData(u,g,m,o,a);break;case"A":v=f[h++],y=f[h++],x=f[h++],b=f[h++],_=f[h++],Ni(w=o,S=a,o=f[h++],a=f[h++],b,_,v,y,x,u=l.A,s);break;case"a":v=f[h++],y=f[h++],x=f[h++],b=f[h++],_=f[h++],Ni(w=o,S=a,o+=f[h++],a+=f[h++],b,_,v,y,x,u=l.A,s)}}"z"!==d&&"Z"!==d||(u=l.Z,s.addData(u)),i=u}return s.toStatic(),s}function $i(t,e){var n=Ri(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){JS(n,t),this.dirty(!0)},e}function Fi(t,e){return new Pi($i(t,e))}function zi(t,e){return Pi.extend($i(t,e))}function ji(t,e){for(var n=[],i=t.length,r=0;r<i;r++){var o=t[r];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),n.push(o.path)}var a=new Pi(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},a}function Hi(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function Bi(t,e,n){var i=e.points,r=e.smooth;if(i&&2<=i.length){if(r&&"spline"!==r){var o=gC(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===r&&(i=pC(i,n)),t.moveTo(i[0][0],i[0][1]);s=1;for(var d=i.length;s<d;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function Vi(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?ri:ii)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?ri:ii)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?ci:ui)(t.x1,t.cpx1,t.x2,e),(n?ci:ui)(t.y1,t.cpy1,t.y2,e)]}function Wi(t){on.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Ui(t){return Pi.extend(t)}function qi(t,e){return zi(t,e)}function Gi(t,e,n,i){var r=Fi(t,e),o=r.getBoundingRect();return n&&("center"===i&&(n=Zi(n,o)),Xi(r,n)),r}function Yi(t,n,i){var r=new an({style:{image:t,x:n.x,y:n.y,width:n.width,height:n.height},onload:function(t){if("center"===i){var e={width:t.width,height:t.height};r.setStyle(Zi(n,e))}}});return r}function Zi(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}function Xi(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function Ki(t){var e=t.shape,n=t.style.lineWidth;return MC(2*e.x1)===MC(2*e.x2)&&(e.x1=e.x2=Ji(e.x1,n,!0)),MC(2*e.y1)===MC(2*e.y2)&&(e.y1=e.y2=Ji(e.y1,n,!0)),t}function Qi(t){var e=t.shape,n=t.style.lineWidth,i=e.x,r=e.y,o=e.width,a=e.height;return e.x=Ji(e.x,n,!0),e.y=Ji(e.y,n,!0),e.width=Math.max(Ji(i+o,n,!1)-e.x,0===o?0:1),e.height=Math.max(Ji(r+a,n,!1)-e.y,0===a?0:1),t}function Ji(t,e,n){var i=MC(2*t);return(i+MC(e))%2==0?i/2:(i+(n?1:-1))/2}function tr(t){return null!=t&&"none"!=t}function er(t){return"string"==typeof t?$t(t,-.1):t}function nr(t){if(t.__hoverStlDirty){var e=t.style.stroke,n=t.style.fill,i=t.__hoverStl;i.fill=i.fill||(tr(n)?er(n):null),i.stroke=i.stroke||(tr(e)?er(e):null);var r={};for(var o in i)null!=i[o]&&(r[o]=t.style[o]);t.__normalStl=r,t.__hoverStlDirty=!1}}function ir(t){if(!t.__isHover){if(nr(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,n=e.insideRollbackOpt;n&&_r(e),e.extendFrom(t.__hoverStl),n&&(br(e,e.insideOriginalTextPosition,n),null==e.textFill&&(e.textFill=n.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function rr(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function or(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&ir(t)}):ir(t)}function ar(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&rr(t)}):rr(t)}function sr(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&nr(t)}function lr(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&or(this)}function ur(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&ar(this)}function cr(){this.__isEmphasis=!0,or(this)}function dr(){this.__isEmphasis=!1,ar(this)}function hr(t,e,n){t.__hoverSilentOnTouch=n&&n.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&sr(t,e)}):sr(t,e),t.on("mouseover",lr).on("mouseout",ur),t.on("emphasis",cr).on("normal",dr)}function fr(t,e,n,i,r,o,a){var s,l=(r=r||EC).labelFetcher,u=r.labelDataIndex,c=r.labelDimIndex,d=n.getShallow("show"),h=i.getShallow("show");(d||h)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c)),null==s&&(s=m(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=d?s:null,p=h?R(l?l.getFormattedLabel(u,"emphasis",null,c):null,s):null;null==f&&null==p||(pr(t,n,o,r),pr(e,i,a,r,!0)),t.text=f,e.text=p}function pr(t,e,n,i,r){return mr(t,e,i,r),n&&O(t,n),t.host&&t.host.dirty&&t.host.dirty(!1),t}function gr(t,e,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,mr(t,e,r,i),t.host&&t.host.dirty&&t.host.dirty(!1)}function mr(t,e,n,i){if((n=n||EC).isRectText){var r=e.getShallow("position")||(i?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=R(e.getShallow("distance"),i?null:5)}var a,s=e.ecModel,l=s&&s.option.textStyle,u=vr(e);if(u)for(var c in a={},u)if(u.hasOwnProperty(c)){var d=e.getModel(["rich",c]);yr(a[c]={},d,l,n,i)}return t.rich=a,yr(t,e,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function vr(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||EC).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}function yr(t,e,n,i,r,o){if(n=!r&&n||EC,t.textFill=xr(e.getShallow("color"),i)||n.color,t.textStroke=xr(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=R(e.getShallow("textBorderWidth"),n.textBorderWidth),!r){if(o){var a=t.textPosition;t.insideRollback=br(t,a,i),t.insideOriginalTextPosition=a,t.insideRollbackOpt=i}null==t.textFill&&(t.textFill=i.autoColor)}t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&i.disableBox||(t.textBackgroundColor=xr(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=xr(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function xr(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function br(t,e,n){var i,r=n.useInsideStyle;return null==t.textFill&&!1!==r&&(!0===r||n.isRectText&&e&&"string"==typeof e&&0<=e.indexOf("inside"))&&(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=n.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),i}function _r(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function wr(t,e){var n=e||e.getModel("textStyle");return d([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function Sr(t,e,n,i,r,o){if("function"==typeof r&&(o=r,r=null),i&&i.isAnimationEnabled()){var a=t?"Update":"",s=i.getShallow("animationDuration"+a),l=i.getShallow("animationEasing"+a),u=i.getShallow("animationDelay"+a);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),0<s?e.animateTo(n,s,u||0,l,o,!!o):(e.stopAnimation(),e.attr(n),o&&o())}else e.stopAnimation(),e.attr(n),o&&o()}function Cr(t,e,n,i,r){Sr(!0,t,e,n,i,r)}function Tr(t,e,n,i,r){Sr(!1,t,e,n,i,r)}function Ar(t,e){for(var n=pt([]);t&&t!==e;)mt(n,t.getLocalTransform(),n),t=t.parent;return n}function Dr(t,e,n){return e&&!P(e)&&(e=x_.getLocalTransform(e)),n&&(e=bt([],e)),ot([],t,e)}function Mr(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=Dr(o,e,n),Math.abs(o[0])>Math.abs(o[1])?0<o[0]?"right":"left":0<o[1]?"bottom":"top"}function kr(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:V(t.position),rotation:t.rotation};return t.shape&&(e.shape=O({},t.shape)),e}if(t&&e){var o=n(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=r(t);t.attr(r(e)),Cr(t,n,i,t.dataIndex)}}})}}function Ir(t,i){return A(t,function(t){var e=t[0];e=kC(e,i.x),e=IC(e,i.x+i.width);var n=t[1];return n=kC(n,i.y),[e,n=IC(n,i.y+i.height)]})}function Er(t,e){var n=kC(t.x,e.x),i=IC(t.x+t.width,e.x+e.width),r=kC(t.y,e.y),o=IC(t.y+t.height,e.y+e.height);if(n<=i&&r<=o)return{x:n,y:r,width:i-n,height:o-r}}function Lr(t,e,n){var i=(e=O({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),D(i,n),new an(e)):Gi(t.replace("path://",""),e,n,"center")}function Or(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Pr(t,e,n){for(var i=0;i<e.length&&(!e[i]||null!=(t=t&&"object"==typeof t?t[e[i]]:null));i++);return null==t&&n&&(t=n.get(e)),t}function Nr(t,e){var n=zC(t).getParent;return n?n.call(t,e):t.parentModel}function Rr(t){return[t||"",jC++,Math.random().toFixed(5)].join("_")}function $r(r){var o={};return r.registerSubTypeDefaulter=function(t,e){t=Yn(t),o[t.main]=e},r.determineSubType=function(t,e){var n=e.type;if(!n){var i=Yn(t).main;r.hasSubTypes(t)&&o[i]&&(n=o[i](e))}return n},r}function Fr(t,a){function f(e){var r={},o=[];return I(e,function(n){var i=s(r,n),t=l(i.originalDeps=a(n),e);i.entryCount=t.length,0===i.entryCount&&o.push(n),I(t,function(t){x(i.predecessor,t)<0&&i.predecessor.push(t);var e=s(r,t);x(e.successor,t)<0&&e.successor.push(n)})}),{graph:r,noEntryList:o}}function s(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function l(t,e){var n=[];return I(t,function(t){0<=x(e,t)&&n.push(t)}),n}t.topologicalTravel=function(t,e,n,i){function r(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function o(t){u[t]=!0,r(t)}if(t.length){var a=f(e),s=a.graph,l=a.noEntryList,u={};for(I(t,function(t){u[t]=!0});l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(n.call(i,c,d.originalDeps.slice()),delete u[c]),I(d.successor,h?o:r)}I(u,function(){throw new Error("Circle dependency may exists")})}}}function zr(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function jr(t,e,n,i){var r=e[1]-e[0],o=n[1]-n[0];if(0===r)return 0===o?n[0]:(n[0]+n[1])/2;if(i)if(0<r){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function Hr(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?zr(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Br(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Vr(t){return t.sort(function(t,e){return t-e}),t}function Wr(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Ur(t){var e=t.toString(),n=e.indexOf("e");if(0<n){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function qr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Gr(t,e,n){if(!t[e])return 0;var i=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),o=A(t,function(t){return(isNaN(t)?0:t)/i*r*100}),a=100*r,s=A(o,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=A(o,function(t,e){return t-s[e]});l<a;){for(var c=Number.NEGATIVE_INFINITY,d=null,h=0,f=u.length;h<f;++h)u[h]>c&&(c=u[h],d=h);++s[d],u[d]=0,++l}return s[e]/r}function Yr(t){var e=2*Math.PI;return(t%e+e)%e}function Zr(t){return-HC<t&&t<HC}function Xr(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=VC.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function Kr(t){return Math.pow(10,Qr(t))}function Qr(t){return Math.floor(Math.log(t)/Math.LN10)}function Jr(t,e){var n=Qr(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,-20<=n?+t.toFixed(n<0?-n:0):t}function to(t){function i(t,e,n){return t.interval[n]<e.interval[n]||t.interval[n]===e.interval[n]&&(t.close[n]-e.close[n]==(n?-1:1)||!n&&i(t,e,1))}t.sort(function(t,e){return i(t,e,0)?-1:1});for(var e=-Infinity,n=1,r=0;r<t.length;){for(var o=t[r].interval,a=t[r].close,s=0;s<2;s++)o[s]<=e&&(o[s]=e,a[s]=s?1:1-n),e=o[s],n=a[s];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(r,1):r++}return t}function eo(t){return 0<=t-parseFloat(t)}function no(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function io(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function ro(t){return null==t?"":(t+"").replace(qC,function(t,e){return GC[e]})}function oo(t,e,n){E(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o<r.length;o++){var a=YC[o];t=t.replace(ZC(a),ZC(a,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(ZC(YC[l],s),n?ro(u):u)}return t}function ao(n,t,i){return I(t,function(t,e){n=n.replace("{"+e+"}",i?ro(t):t)}),n}function so(t,e){var n=(t=_(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type;e=t.extraCssText;return n?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ro(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+ro(n)+";"+(e||"")+'"></span>':""}function lo(t,e){return t+="","0000".substr(0,e-t.length)+t}function uo(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Xr(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),c=i["get"+r+"Seconds"](),d=i["get"+r+"Milliseconds"]();return t=t.replace("MM",lo(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",lo(s,2)).replace("d",s).replace("hh",lo(l,2)).replace("h",l).replace("mm",lo(u,2)).replace("m",u).replace("ss",lo(c,2)).replace("s",c).replace("SSS",lo(d,3))}function co(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ho(c,d,h,f,p){var g=0,m=0;null==f&&(f=Infinity),null==p&&(p=Infinity);var v=0;d.eachChild(function(t,e){var n,i,r=t.position,o=t.getBoundingRect(),a=d.childAt(e+1),s=a&&a.getBoundingRect();if("horizontal"===c){var l=o.width+(s?-s.x+o.x:0);f<(n=g+l)||t.newline?(g=0,n=l,m+=v+h,v=o.height):v=Math.max(v,o.height)}else{var u=o.height+(s?-s.y+o.y:0);p<(i=m+u)||t.newline?(g+=v+h,m=0,i=u,v=o.width):v=Math.max(v,o.width)}t.newline||(r[0]=g,r[1]=m,"horizontal"===c?g=n+h:m=i+h)})}function fo(t,e,n){var i=e.width,r=e.height,o=Hr(t.x,i),a=Hr(t.y,r),s=Hr(t.x2,i),l=Hr(t.y2,r);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=i),(isNaN(a)||isNaN(parseFloat(t.y)))&&(a=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=r),n=UC(n||0),{width:Math.max(s-o-n[1]-n[3],0),height:Math.max(l-a-n[0]-n[2],0)}}function po(t,e,n){n=UC(n||0);var i=e.width,r=e.height,o=Hr(t.left,i),a=Hr(t.top,r),s=Hr(t.right,i),l=Hr(t.bottom,r),u=Hr(t.width,i),c=Hr(t.height,r),d=n[2]+n[0],h=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-h-o),isNaN(c)&&(c=r-l-d-a),null!=f&&(isNaN(u)&&isNaN(c)&&(i/r<f?u=.8*i:c=.8*r),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(o)&&(o=i-s-u-h),isNaN(a)&&(a=r-l-c-d),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-h}switch(t.top||t.bottom){case"middle":case"center":a=r/2-c/2-n[0];break;case"bottom":a=r-c-d}o=o||0,a=a||0,isNaN(u)&&(u=i-h-o-(s||0)),isNaN(c)&&(c=r-d-a-(l||0));var p=new ie(o+n[3],a+n[0],u,c);return p.margin=n,p}function go(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new ie(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=po(D({width:l.width,height:l.height},e),n,i);var c=t.position,d=o?e.x-l.x:0,h=a?e.y-l.y:0;t.attr("position","raw"===s?[d,h
|
|
]:[c[0]+d,c[1]+h])}}function mo(t,e){return null!=t[eT[e][0]]||null!=t[eT[e][1]]&&null!=t[eT[e][2]]}function vo(u,c,t){function e(t,e){var n={},i=0,r={},o=0,a=2;if(JC(t,function(t){r[t]=u[t]}),JC(t,function(t){d(c,t)&&(n[t]=r[t]=c[t]),h(n,t)&&i++,h(r,t)&&o++}),f[e])return h(c,t[1])?r[t[2]]=null:h(c,t[2])&&(r[t[1]]=null),r;if(o!==a&&i){if(a<=i)return n;for(var s=0;s<t.length;s++){var l=t[s];if(!d(n,l)&&d(u,l)){n[l]=u[l];break}}return n}return r}function d(t,e){return t.hasOwnProperty(e)}function h(t,e){return null!=t[e]&&"auto"!==t[e]}function n(t,e,n){JC(t,function(t){e[t]=n[t]})}!b(t)&&(t={});var f=t.ignoreSize;!E(f)&&(f=[f,f]);var i=e(eT[0],0),r=e(eT[1],1);n(eT[0],u,i),n(eT[1],u,r)}function yo(t){return xo({},t)}function xo(e,n){return n&&e&&JC(tT,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}function bo(t){var e=[];return I(oT.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=A(e,function(t){return Yn(t).main}),"dataset"!==t&&x(e,"dataset")<=0&&e.unshift("dataset"),e}function _o(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}function wo(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:F(),categoryAxisMap:F()},i=cT[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}function So(t){return"category"===t.get("type")}function Co(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===pT?{}:[]),this.sourceFormat=t.sourceFormat||gT,this.seriesLayoutBy=t.seriesLayoutBy||vT,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&F(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function To(t){var e=t.option.source,n=gT;if(w(e))n=mT;else if(E(e))for(var i=0,r=e.length;i<r;i++){var o=e[i];if(null!=o){if(E(o)){n=hT;break}if(b(o)){n=fT;break}}}else if(b(e)){for(var a in e)if(e.hasOwnProperty(a)&&P(e[a])){n=pT;break}}else if(null!=e)throw new Error("Invalid data");xT(t).sourceFormat=n}function Ao(t){return xT(t).source}function Do(t){xT(t).datasetMap=F()}function Mo(t){var e=t.option,n=e.data,i=w(n)?mT:dT,r=!1,o=e.seriesLayoutBy,a=e.sourceHeader,s=e.dimensions,l=Po(t);if(l){var u=l.option;n=u.source,i=xT(l).sourceFormat,r=!0,o=o||u.seriesLayoutBy,null==a&&(a=u.sourceHeader),s=s||u.dimensions}var c=ko(n,i,o,a,s),d=e.encode;!d&&l&&(d=Oo(t,l,n,i,o,c)),xT(t).source=new Co({data:n,fromDataset:r,seriesLayoutBy:o,sourceFormat:i,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:d})}function ko(t,e,n,i,r){if(!t)return{dimensionsDefine:Io(r)};var o,a,s,l;if(e===hT)"auto"===i||null==i?Eo(function(t){null!=t&&"-"!==t&&(_(t)?null==a&&(a=1):a=0)},n,t,10):a=i?1:0,r||1!==a||(r=[],Eo(function(t,e){r[e]=null!=t?t:""},n,t)),o=r?r.length:n===yT?t.length:t[0]?t[0].length:null;else if(e===fT)r||(r=Lo(t),s=!0);else if(e===pT)r||(r=[],s=!0,I(t,function(t,e){r.push(e)}));else if(e===dT){var u=Nn(t[0]);o=E(u)&&u.length||1}else e===mT&&Hb&&T(!!r,"dimensions must be given if data is TypedArray.");return s&&I(r,function(t,e){"name"===(b(t)?t.name:t)&&(l=e)}),{startIndex:a,dimensionsDefine:Io(r),dimensionsDetectCount:o,potentialNameDimIndex:l}}function Io(t){if(t){var n=F();return A(t,function(t){if(null==(t=O({},b(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var e=n.get(t.name);return e?t.name+="-"+e.count++:n.set(t.name,{count:1}),t})}}function Eo(t,e,n,i){if(null==i&&(i=Infinity),e===yT)for(var r=0;r<n.length&&r<i;r++)t(n[r]?n[r][0]:null,r);else{var o=n[0]||[];for(r=0;r<o.length&&r<i;r++)t(o[r],r)}}function Lo(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var i=[];return I(e,function(t,e){i.push(e)}),i}}function Oo(t,e,n,i,r,o){var a=wo(t),s={},l=[],u=[],c=t.subType,d=F(["pie","map","funnel"]),h=F(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(a&&null!=h.get(c)){var f=t.ecModel,p=xT(f).datasetMap,g=e.uid+"_"+r,m=p.get(g)||p.set(g,{categoryWayDim:1,valueWayDim:0});I(a.coordSysDims,function(t){if(null==a.firstCategoryDimIndex){var e=m.valueWayDim++;s[t]=e,u.push(e)}else if(a.categoryAxisMap.get(t))s[t]=0,l.push(0);else{e=m.categoryWayDim++;s[t]=e,u.push(e)}})}else if(null!=d.get(c)){for(var v,y=0;y<5&&null==v;y++)Ro(n,i,r,o.dimensionsDefine,o.startIndex,y)||(v=y);if(null!=v){s.value=v;var x=o.potentialNameDimIndex||Math.max(v-1,0);u.push(x),l.push(x)}}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}function Po(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function No(t,e){return Ro(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Ro(t,e,n,i,r,o){function a(t){return(null==t||!isFinite(t)||""===t)&&(!(!_(t)||"-"===t)||void 0)}var s,l,u=5;if(w(t))return!1;if(i&&(l=b(l=i[o])?l.name:l),e===hT)if(n===yT){for(var c=t[o],d=0;d<(c||[]).length&&d<u;d++)if(null!=(s=a(c[r+d])))return s}else for(d=0;d<t.length&&d<u;d++){var h=t[r+d];if(h&&null!=(s=a(h[o])))return s}else if(e===fT){if(!l)return;for(d=0;d<t.length&&d<u;d++){if((f=t[d])&&null!=(s=a(f[l])))return s}}else if(e===pT){if(!l)return;if(!(c=t[l])||w(c))return!1;for(d=0;d<c.length&&d<u;d++)if(null!=(s=a(c[d])))return s}else if(e===dT)for(d=0;d<t.length&&d<u;d++){var f,p=Nn(f=t[d]);if(!E(p))return!1;if(null!=(s=a(p[o])))return s}return!1}function $o(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,r=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function Fo(n,t){var i=n.color&&!n.colorLayer;I(t,function(t,e){"colorLayer"===e&&i||oT.hasClass(e)||("object"==typeof t?n[e]=n[e]?g(n[e],t,!1):L(t):null==n[e]&&(n[e]=t))})}function zo(t){t=t,this.option={},this.option[bT]=1,this._componentsMap=F({series:[]}),this._seriesIndices,this._seriesIndicesMap,Fo(t,this._theme.option),g(t,sT,!1),this.mergeOption(t)}function jo(e,t){E(t)||(t=t?[t]:[]);var n={};return I(t,function(t){n[t]=(e.get(t)||[]).slice()}),n}function Ho(t,e,n){return e.type?e.type:n?n.subType:oT.determineSubType(t,e)}function Bo(t,e){t._seriesIndicesMap=F(t._seriesIndices=A(e,function(t){return t.componentIndex})||[])}function Vo(t,e){return e.hasOwnProperty("subType")?f(t,function(t){return t.subType===e.subType}):t}function Wo(t){if(Hb&&!t._seriesIndices)throw new Error("Option should contains series.")}function Uo(e){I(wT,function(t){this[t]=v(e[t],e)},this)}function qo(){this._coordinateSystems=[]}function Go(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Yo(t,n,i){var e,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;CT(l,function(t){t&&t.option&&(t.query?a.push(t):e||(e=t))})}return r||(r=t),r.timeline||(r.timeline=s),CT([r].concat(o).concat(A(a,function(t){return t.option})),function(e){CT(n,function(t){t(e,i)})}),{baseOption:r,timelineOptions:o,mediaDefault:e,mediaList:a}}function Zo(t,e,n){var o={width:e,height:n,aspectratio:e/n},a=!0;return I(t,function(t,e){var n=e.match(MT);if(n&&n[1]&&n[2]){var i=n[1],r=n[2].toLowerCase();Xo(o[r],t,i)||(a=!1)}}),a}function Xo(t,e,n){return"min"===n?e<=t:"max"===n?t<=e:t===e}function Ko(t,e){return t.join(",")===e.join(",")}function Qo(r,t){CT(t=t||{},function(t,e){if(null!=t){var n=r[e];if(oT.hasClass(e)){t=On(t);var i=$n(n=On(n),t);r[e]=AT(i,function(t){return t.option&&t.exist?DT(t.exist,t.option,!0):t.exist||t.option})}else r[e]=DT(n,t,!0)}})}function Jo(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=ET.length;n<i;n++){var r=ET[n],o=e.normal,a=e.emphasis;o&&o[r]&&(t[r]=t[r]||{},t[r].normal?g(t[r].normal,o[r]):t[r].normal=o[r],o[r]=null),a&&a[r]&&(t[r]=t[r]||{},t[r].emphasis?g(t[r].emphasis,a[r]):t[r].emphasis=a[r],a[r]=null)}}function ta(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,D(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function ea(t){ta(t,"itemStyle"),ta(t,"lineStyle"),ta(t,"areaStyle"),ta(t,"label"),ta(t,"labelLine"),ta(t,"upperLabel"),ta(t,"edgeLabel")}function na(t,e){var n=IT(t)&&t[e],i=IT(n)&&n.textStyle;if(i)for(var r=0,o=Kw.length;r<o;r++){e=Kw[r];i.hasOwnProperty(e)&&(n[e]=i[e])}}function ia(t){t&&(ea(t),na(t,"label"),t.emphasis&&na(t.emphasis,"label"))}function ra(t){if(IT(t)){Jo(t),ea(t),na(t,"label"),na(t,"upperLabel"),na(t,"edgeLabel"),t.emphasis&&(na(t.emphasis,"label"),na(t.emphasis,"upperLabel"),na(t.emphasis,"edgeLabel")),(n=t.markPoint)&&(Jo(n),ia(n)),(i=t.markLine)&&(Jo(i),ia(i));var e=t.markArea;e&&ia(e);var n,i,r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!w(o))for(var a=0;a<o.length;a++)ia(o[a]);I(t.categories,function(t){ea(t)})}if(r&&!w(r))for(a=0;a<r.length;a++)ia(r[a]);if((n=t.markPoint)&&n.data){var s=n.data;for(a=0;a<s.length;a++)ia(s[a])}if((i=t.markLine)&&i.data){var l=i.data;for(a=0;a<l.length;a++)E(l[a])?(ia(l[a][0]),ia(l[a][1])):ia(l[a])}"gauge"===t.type?(na(t,"axisLabel"),na(t,"title"),na(t,"detail")):"treemap"===t.type?(ta(t.breadcrumb,"itemStyle"),I(t.levels,function(t){ea(t)})):"tree"===t.type&&ea(t.leaves)}}function oa(t){return E(t)?t:t?[t]:[]}function aa(t){return(E(t)?t[0]:t)||{}}function sa(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&null!=(n=n&&n[e[i]]);i++);return n}function la(t,e,n,i){e=e.split(",");for(var r,o=t,a=0;a<e.length-1;a++)null==o[r=e[a]]&&(o[r]={}),o=o[r];(i||null==o[e[a]])&&(o[e[a]]=n)}function ua(e){I(OT,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}function ca(m){I(m,function(c,d){var h=[],f=[NaN,NaN],t=[c.stackResultDimension,c.stackedOverDimension],p=c.data,g=c.isStackedByIndex,e=p.map(t,function(t,e,n){var i,r,o=p.get(c.stackedDimension,n);if(isNaN(o))return f;g?r=p.getRawIndex(n):i=p.get(c.stackedByDimension,n);for(var a=NaN,s=d-1;0<=s;s--){var l=m[s];if(g||(r=l.data.rawIndexOf(l.stackedByDimension,i)),0<=r){var u=l.data.getByRawIndex(l.stackResultDimension,r);if(0<=o&&0<u||o<=0&&u<0){o+=u,a=u;break}}}return h[0]=o,h[1]=a,h});p.hostModel.setData(e),c.data=e})}function da(t,e){Co.isInstance(t)||(t=Co.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;if(i===mT){if(Hb&&null==e)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=n}var r=FT[i===hT?i+"_"+t.seriesLayoutBy:i];Hb&&T(r,"Invalide sourceFormat: "+i),O(this,r)}function ha(){return this._data.length}function fa(t){return this._data[t]}function pa(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function ga(t,e,n){return null!=n?t[n]:t}function ma(t,e,n,i){return va(t[i],this._dimensionInfos[e])}function va(t,e){var n=e&&e.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Xr(t)),null==t||""===t?NaN:+t;var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}function ya(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,o,a=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(r=s.name,o=s.index),zT[a](i,e,o,r)}}}function xa(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===dT||i===fT){var r=t.getRawDataItem(e);return i!==dT||b(r)||(r=null),r?r[n]:void 0}}}function ba(t){return new _a(t)}function _a(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function wa(t,e,n,i,r,o){WT.reset(n,i,r,o),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:WT.next},t.context)}function Sa(t,e){var n,i;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((n=t._reset(t.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),E(n)&&!n.length&&(n=null)),t._progress=n,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),i}function Ca(t){var e=t.name;zn(t)||(t.name=Ta(t)||e)}function Ta(t){var n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[];return I(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")}function Aa(t){return t.model.getRawData().count()}function Da(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Ma}function Ma(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ka(e,n){I(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,y(Ia,n))})}function Ia(t){var e=Ea(t);e&&e.setOutputEnd(this.count())}function Ea(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function La(){this.group=new X_,this.uid=Rr("viewChart"),this.renderTask=ba({plan:Na,reset:Ra}),this.renderTask.context={view:this}}function Oa(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n<t.childCount();n++)Oa(t.childAt(n),e)}function Pa(e,t,n){var i=Bn(e,t);null!=i?I(On(i),function(t){Oa(e.getItemGraphicEl(t),n)}):e.eachItemGraphicEl(function(t){Oa(t,n)})}function Na(t){return KT(t.model)}function Ra(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&XT(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),JT[l]}function $a(t,n,i){function r(){d=(new Date).getTime(),h=null,t.apply(s,l||[])}var o,a,s,l,u,c=0,d=0,h=null;n=n||0;var e=function(){o=(new Date).getTime(),s=this,l=arguments;var t=u||n,e=u||i;u=null,a=o-(e?c:d)-t,clearTimeout(h),e?h=setTimeout(r,t):0<=a?r():h=setTimeout(r,-a),c=o};return e.clear=function(){h&&(clearTimeout(h),h=null)},e.debounceNextCall=function(t){u=t},e}function Fa(t,e,n,i){var r=t[e];if(r){var o=r[tA]||r,a=r[nA];if(r[eA]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=$a(o,n,"debounce"===i))[tA]=o,r[nA]=i,r[eA]=n}return r}}function za(t,e){var n=t[e];n&&n[tA]&&(t[e]=n[tA])}function ja(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=F()}function Ha(s,t,l,u,c){function d(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}var h;c=c||{},I(t,function(n){if(!c.visualType||c.visualType===n.visualType){var t=s._stageTaskMap.get(n.uid),e=t.seriesTaskMap,i=t.overallTask;if(i){var r,o=i.agentStubMap;o.each(function(t){d(c,t)&&(t.dirty(),r=!0)}),r&&i.dirty(),uA(i,u);var a=s.getPerformArgs(i,c.block);o.each(function(t){t.perform(a)}),h|=i.perform(a)}else e&&e.each(function(t){d(c,t)&&t.dirty();var e=s.getPerformArgs(t,c.block);e.skip=!n.performRawSeries&&l.isSeriesFiltered(t.context.model),uA(t,u),h|=t.perform(e)})}}),s.unfinished|=h}function Ba(i,r,t,o,a){function e(t){var e=t.uid,n=s.get(e)||s.set(e,ba({plan:Ya,reset:Za,count:Ka}));n.context={model:t,ecModel:o,api:a,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:i},Qa(i,t,n)}var s=t.seriesTaskMap||(t.seriesTaskMap=F()),n=r.seriesType,l=r.getTargetSeries;r.createOnAllSeries?o.eachRawSeries(e):n?o.eachRawSeriesByType(n,e):l&&l(o,a).each(e);var u=i._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}function Va(i,t,e,n,r){function o(t){var e=t.uid,n=s.get(e);n||(n=s.set(e,ba({reset:Ua,onDirty:Ga})),a.dirty()),n.context={model:t,overallProgress:c,modifyOutputEnd:d},n.agent=a,n.__block=c,Qa(i,t,n)}var a=e.overallTask=e.overallTask||ba({reset:Wa});a.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var s=a.agentStubMap=a.agentStubMap||F(),l=t.seriesType,u=t.getTargetSeries,c=!0,d=t.modifyOutputEnd;l?n.eachRawSeriesByType(l,o):u?u(n,r).each(o):(c=!1,I(n.getSeries(),o));var h=i._pipelineMap;s.each(function(t,e){h.get(e)||(t.dispose(),a.dirty(),s.removeKey(e))})}function Wa(t){t.overallReset(t.ecModel,t.api,t.payload)}function Ua(t){return t.overallProgress&&qa}function qa(){this.agent.dirty(),this.getDownstream().dirty()}function Ga(){this.agent&&this.agent.dirty()}function Ya(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Za(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=On(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?A(e,function(t,e){return Xa(e)}):cA}function Xa(o){return function(t,e){var n=e.data,i=e.resetDefines[o];if(i&&i.dataEach)for(var r=t.start;r<t.end;r++)i.dataEach(n,r);else i&&i.progress&&i.progress(t,n)}}function Ka(t){return t.data.count()}function Qa(t,e,n){var i=e.uid,r=t._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),(r.tail=n).__idxInPipeline=r.count++,n.__pipeline=r}function Ja(t){dA=null;try{t(hA,fA)}catch(e){}return dA}function ts(t,e){for(var n in e.prototype)t[n]=j}function es(i){return function(t,e,n){t=t&&t.toLowerCase(),d_.prototype[i].call(this,t,e,n)}}function ns(){d_.call(this)}function is(t,e,n){function i(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=qA[e]),this.id,this.group,this._dom=t;var r="canvas";Hb&&(r=("undefined"==typeof window?global:window).__ECHARTS__DEFAULT__RENDERER__||r);var o=this._zr=Mn(t,{renderer:n.renderer||r,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=$a(v(o.flush,o),17),(e=L(e))&&NT(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new qo;var a=this._api=_s(this);de(UA,i),de(BA,i),this._scheduler=new ja(this,a,BA,UA),d_.call(this),this._messageCenter=new ns,this._initEvents(),this.resize=v(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),ds(o,this),h(this)}function rs(t,e,n){var i,r=this._model,o=this._coordSysMgr.getCoordinateSystems();e=Wn(r,e);for(var a=0;a<o.length;a++){var s=o[a];if(s[t]&&null!=(i=s[t](r,e,n)))return i}Hb&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}function os(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),hs(t,"component",e,n),hs(t,"chart",e,n),n.plan()}function as(e,n,i,r,t){function o(t){t&&t.__alive&&t[n]&&t[n](t.__model,a,e._api,i)}var a=e._model;if(r){var s={};s[r+"Id"]=i[r+"Id"],s[r+"Index"]=i[r+"Index"],s[r+"Name"]=i[r+"Name"];var l={mainType:r,query:s};t&&(l.subType=t);var u=i.excludeSeriesId;null!=u&&(u=F(On(u))),a&&a.eachComponent(l,function(t){u&&null!=u.get(t.id)||o(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else _A(e._componentsViews.concat(e._chartsViews),o)}function ss(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function ls(e,t){var n=e.type,i=e.escapeConnect,r=jA[n],o=r.actionInfo,a=(o.update||"update").split(":"),s=a.pop();a=null!=a[0]&&CA(a[0]),this[PA]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=A(e.batch,function(t){return(t=D(O({},t),e)).batch=null,t}));var c,d=[],h="highlight"===n||"downplay"===n;_A(l,function(t){(c=(c=r.action(t,this._model,this._api))||O({},t)).type=o.event||c.type,d.push(c),h?as(this,s,t,"series"):a&&as(this,s,t,a.main,a.sub)},this),"none"===s||h||a||(this[NA]?(os(this),FA.update.call(this,e),this[NA]=!1):FA[s].call(this,e)),c=u?{type:o.event||n,escapeConnect:i,batch:d}:d[0],this[PA]=!1,!t&&this._messageCenter.trigger(c.type,c)}function us(t){for(var e=this._pendingActions;e.length;){var n=e.shift();ls.call(this,n,t)}}function cs(t){!t&&this.trigger("updated")}function ds(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[NA]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function hs(t,e,o,a){function n(t){var e="_ec_"+t.id+"_"+t.type,n=u[e];if(!n){var i=CA(t.type),r=s?GT.getClass(i.main,i.sub):La.getClass(i.sub);Hb&&bA(r,i.sub+" does not exist."),(n=new r).init(o,d),u[e]=n,l.push(n),c.add(n.group)}t.__viewId=n.__id=e,n.__alive=!0,n.__model=t,n.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!s&&a.prepareView(n,t,o,d)}for(var s="component"===e,l=s?t._componentsViews:t._chartsViews,u=s?t._componentsMap:t._chartsMap,c=t._zr,d=t._api,i=0;i<l.length;i++)l[i].__alive=!1;s?o.eachComponent(function(t,e){"series"!==t&&n(e)}):o.eachSeries(n);for(i=0;i<l.length;){var r=l[i];r.__alive?i++:(!s&&r.renderTask.dispose(),c.remove(r.group),r.dispose(o,d),l.splice(i,1),delete u[r.__id],r.__id=r.group.__ecComponentInfo=null)}}function fs(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function ps(t,e,n,i){gs(t,e,n,i),_A(t._chartsViews,function(t){t.__alive=!1}),ms(t,e,n,i),_A(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function gs(t,n,i,r,e){_A(e||t._componentsViews,function(t){var e=t.__model;t.render(e,n,i,r),bs(e,t)})}function ms(i,t,e,r,o){var a,s=i._scheduler;t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];e.__alive=!0;var n=e.renderTask;s.updatePayload(n,r),o&&o.get(t.uid)&&n.dirty(),a|=n.perform(s.getPerformArgs(n)),e.group.silent=!!t.get("silent"),bs(t,e),xs(t,e)}),s.unfinished|=a,ys(i._zr,t),oA(i._zr.dom,t)}function vs(e,n){_A(WA,function(t){t(e,n)})}function ys(t,e){var n=t.storage,i=0;n.traverse(function(t){t.isGroup||i++}),i>e.get("hoverLayerThreshold")&&!Wb.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function xs(t,e){var n=t.get("blendMode")||null;Hb&&!Wb.canvasSupported&&n&&"source-over"!==n&&console.warn("Only canvas support blendMode"),e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function bs(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function _s(n){var t=n._coordSysMgr;return O(new Uo(n),{getCoordinateSystems:v(t.getCoordinateSystems,t),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}}})}function ws(i){function r(t,e){for(var n=0;n<t.length;n++){t[n][l]=e}}var o=0,a=1,s=2,l="__connectUpdateStatus";_A(HA,function(t,e){i._messageCenter.on(e,function(t){if(ZA[i.group]&&i[l]!==o){if(t&&t.escapeConnect)return;var e=i.makeActionFromEvent(t),n=[];_A(YA,function(t){t!==i&&t.group===i.group&&n.push(t)}),r(n,o),_A(n,function(t){t[l]!==a&&t.dispatchAction(e)}),r(n,s)}})})}function Ss(t,e,n){if(Hb){if(Ww.replace(".","")-0<AA.zrender.replace(".","")-0)throw new Error("zrender/src "+Ww+" is too old for ECharts "+TA+". Current version need ZRender "+AA.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var i=Ds(t);if(i)return Hb&&console.warn("There is a chart instance already initialized on the dom."),i;Hb&&(!S(t)||"CANVAS"===t.nodeName.toUpperCase()||(t.clientWidth||n&&null!=n.width)&&(t.clientHeight||n&&null!=n.height)||console.warn("Can't get dom width or height"));var r=new is(t,e,n);return r.id="ec_"+XA++,YA[r.id]=r,qn(t,QA,r.id),ws(r),r}function Cs(e){if(E(e)){var t=e;e=null,_A(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+KA++,_A(t,function(t){t.group=e})}return ZA[e]=!0,e}function Ts(t){ZA[t]=!1}function As(t){"string"==typeof t?t=YA[t]:t instanceof is||(t=Ds(t)),t instanceof is&&!t.isDisposed()&&t.dispose()}function Ds(t){return YA[Gn(t,QA)]}function Ms(t){return YA[t]}function ks(t,e){qA[t]=e}function Is(t){VA.push(t)}function Es(t,e){Fs(BA,t,e,MA)}function Ls(t){WA.push(t)}function Os(t,e,n){"function"==typeof e&&(n=e,e="");var i=SA(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,bA(RA.test(i)&&RA.test(e)),jA[i]||(jA[i]={action:n,actionInfo:t}),HA[e]=i}function Ps(t,e){qo.register(t,e)}function Ns(t){var e=qo.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Rs(t,e){Fs(UA,t,e,IA,"layout")}function $s(t,e){Fs(UA,t,e,LA,"visual")}function Fs(t,e,n,i,r){if((wA(e)||SA(e))&&(n=e,e=i),Hb){if(isNaN(e)||null==e)throw new Error("Illegal priority");_A(t,function(t){bA(t.__raw!==n)})}var o=ja.wrapStageHandler(n,r);return o.__prio=e,o.__raw=n,t.push(o),o}function zs(t,e){GA[t]=e}function js(t){return oT.extend(t)}function Hs(t){return GT.extend(t)}function Bs(t){return qT.extend(t)}function Vs(t){return La.extend(t)}function Ws(t){n("createCanvas",t)}function Us(t,e,n){e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),JA[t]={geoJson:e,specialAreas:n}}function qs(t){return JA[t]}function Gs(t){return t}function Ys(t,e,n,i,r){this._old=t,this._new=e,this._oldKeyGetter=n||Gs,this._newKeyGetter=i||Gs,this.context=r}function Zs(t,e,n,i,r){for(var o=0;o<t.length;o++){var a="_ec_"+r[i](t[o],o),s=e[a];null==s?(n.push(a),e[a]=o):(s.length||(e[a]=s=[s]),s.push(o))}}function Xs(i){var t={},o=t.encode={},a=F(),s=[],l=[];I(i.dimensions,function(t){var r=i.getDimensionInfo(t),e=r.coordDim;if(e){Hb&&T(null==nD.get(e));var n=o[e];o.hasOwnProperty(e)||(n=o[e]=[]),n[r.coordDimIndex]=t,r.isExtraCoord||(a.set(e,1),Qs(r.type)&&(s[0]=t)),r.defaultTooltip&&l.push(t)}nD.each(function(t,e){var n=o[e];o.hasOwnProperty(e)||(n=o[e]=[]);var i=r.otherDims[e];null!=i&&!1!==i&&(n[i]=r.name)})});var r=[],u={};a.each(function(t,e){var n=o[e];u[e]=n[0],r=r.concat(n)}),t.dataDimsOnCoord=r,t.encodeFirstDimNotExtra=u;var e=o.label;e&&e.length&&(s=e.slice());var n=o.tooltip;return n&&n.length?l=n.slice():l.length||(l=s.slice()),o.defaultedLabel=s,o.defaultedTooltip=l,t}function Ks(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Qs(t){return!("ordinal"===t||"time"===t)}function Js(t){return 65535<t._rawCount?sD:lD}function tl(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function el(e,n){I(uD.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,I(cD,function(t){e[t]=L(n[t])}),e._calculationInfo=O(n._calculationInfo)}function nl(r){var o=r._invertedIndicesMap;I(o,function(t,e){var n=r._dimensionInfos[e].ordinalMeta;if(n){t=o[e]=new sD(n.categories.length);for(var i=0;i<t.length;i++)t[i]=NaN;for(i=0;i<r._count;i++)t[r.get(e,i)]=i}})}function il(t,e,n){var i;if(null!=e){var r=t._chunkSize,o=Math.floor(n/r),a=n%r,s=t.dimensions[e],l=t._storage[s][o];if(l){i=l[a];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function rl(t){return t}function ol(t){return t<this._count&&0<=t?this._indices[t]:-1}function al(t,e){var n=t._idList[e];return null==n&&(n=il(t,t._idDimIdx,e)),null==n&&(n=oD+e),n}function sl(t){return E(t)||(t=[t]),t}function ll(t,e){for(var n=0;n<e.length;n++)t._dimensionInfos[e[n]]||console.error("Unkown dimension "+e[n])}function ul(t,e){var n=t.dimensions,i=new dD(A(n,t.getDimensionInfo,t),t.hostModel);el(i,t);for(var r=i._storage={},o=t._storage,a=0;a<n.length;a++){var s=n[a];o[s]&&(0<=x(e,s)?(r[s]=cl(o[s]),i._rawExtent[s]=dl(),i._extent[s]=null):r[s]=o[s])}return i}function cl(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=tl(t[n]);return e}function dl(){return[Infinity,-Infinity]}function hl(t,e,n){function l(t,e,n){null!=nD.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,o.set(e,!0))}Co.isInstance(e)||(e=Co.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),u=F(n.encodeDef),r=F(),o=F(),c=[],a=fl(e,t,i,n.dimCount),s=0;s<a;s++){var d=i[s]=O({},b(i[s])?i[s]:{name:i[s]}),h=d.name,f=c[s]={otherDims:{}};null!=h&&null==r.get(h)&&(f.name=f.displayName=h,r.set(h,s)),null!=d.type&&(f.type=d.type),null!=d.displayName&&(f.displayName=d.displayName)}u.each(function(t,n){t=On(t).slice();var i=u.set(n,[]);I(t,function(t,e){_(t)&&(t=r.get(t)),null!=t&&t<a&&(i[e]=t,l(c[t],n,e))})});var p=0;I(t,function(r){var o,a,s;if(_(r))o=r,r={};else{o=r.name;var t=r.ordinalMeta;r.ordinalMeta=null,(r=L(r)).ordinalMeta=t,a=r.dimsDef,s=r.otherDims,r.name=r.coordDim=r.coordDimIndex=r.dimsDef=r.otherDims=null}var e=On(u.get(o));if(!e.length)for(var n=0;n<(a&&a.length||1);n++){for(;p<c.length&&null!=c[p].coordDim;)p++;p<c.length&&e.push(p++)}I(e,function(t,e){var n=c[t];if(l(D(n,r),o,e),null==n.name&&a){var i=a[e];!b(i)&&(i={name:i}),n.name=n.displayName=i.name,n.defaultTooltip=i.defaultTooltip}s&&D(n.otherDims,s)})});var g=n.generateCoord,m=n.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",x=0;x<a;x++){null==(f=c[x]=c[x]||{}).coordDim&&(f.coordDim=pl(y,o,v),f.coordDimIndex=0,(!g||m<=0)&&(f.isExtraCoord=!0),m--),null==f.name&&(f.name=pl(f.coordDim,r)),null==f.type&&No(e,x,f.name)&&(f.type="ordinal")}return c}function fl(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return I(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function pl(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function gl(t,n,e){var i,r,o,a,s=(e=e||{}).byIndex,l=e.stackedCoordDimension,u=!(!t||!t.get("stack"));if(I(n,function(t,e){_(t)&&(n[e]=t={name:t}),u&&!t.isExtraCoord&&(s||i||!t.ordinalMeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||i||(s=!0),r){o="__\0ecstackresult",a="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var c=r.coordDim,d=r.type,h=0;I(n,function(t){t.coordDim===c&&h++}),n.push({name:o,coordDim:c,coordDimIndex:h,type:d,isExtraCoord:!0,isCalculationCoord:!0}),h++,n.push({name:a,coordDim:a,coordDimIndex:h,type:d,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:a,stackResultDimension:o}}function ml(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function vl(t,e){return ml(t,e)?t.getCalculationInfo("stackResultDimension"):e}function yl(t,e,n){n=n||{},Co.isInstance(t)||(t=Co.seriesDataToSource(t));var i,r=e.get("coordinateSystem"),o=qo.get(r),a=wo(e);a&&(i=A(a.coordSysDims,function(t){var e={name:t},n=a.axisMap.get(t);if(n){var i=n.get("type");e.type=Ks(i)}return e})),i||(i=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var s,l,u=pD(t,{coordDimensions:i,generateCoord:n.generateCoord});a&&I(u,function(t,e){var n=t.coordDim,i=a.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var c=gl(e,u),d=new dD(u,e);d.setCalculationInfo(c);var h=null!=s&&xl(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return d.hasItemOption=!1,d.initData(t,null,h),d}function xl(t){if(t.sourceFormat===dT){var e=bl(t.data||[]);return null!=e&&!E(Nn(e))}}function bl(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function _l(t){this._setting=t||{},this._extent=[Infinity,-Infinity],this._interval=0,this.init&&this.init.apply(this,arguments)}function wl(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function Sl(t){return t._map||(t._map=F(t.categories))}function Cl(t){return b(t)&&null!=t.value?t.value:t+""}function Tl(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=Jr(o/e,!0);null!=n&&a<n&&(a=r.interval=n),null!=i&&i<a&&(a=r.interval=i);var s=r.intervalPrecision=Al(a);return Ml(r.niceTickExtent=[yD(Math.ceil(t[0]/a)*a,s),yD(Math.floor(t[1]/a)*a,s)],t),r}function Al(t){return Ur(t)+2}function Dl(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Ml(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Dl(t,0,e),Dl(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function kl(t,e,n,i){var r=[];if(!t)return r;var o=1e4;e[0]<n[0]&&r.push(e[0]);for(var a=n[0];a<=n[1]&&(r.push(a),(a=yD(a+t,i))!==r[r.length-1]);)if(r.length>o)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function Il(t){return t.get("stack")||_D+t.seriesIndex}function El(t){return t.dim+t.index}function Ll(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o<t.count;o++)e.push(D({bandWidth:r,axisKey:i,stackId:_D+o},t));var a=Nl(e),s=[];for(o=0;o<t.count;o++){var l=a[i][_D+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function Ol(t,e){var n=[];return e.eachSeriesByType(t,function(t){Fl(t)&&!zl(t)&&n.push(t)}),n}function Pl(t){var u=[];return I(t,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),r="category"===n.type?n.getBandWidth():Math.abs(i[1]-i[0])/e.count(),o=Hr(t.get("barWidth"),r),a=Hr(t.get("barMaxWidth"),r),s=t.get("barGap"),l=t.get("barCategoryGap");u.push({bandWidth:r,barWidth:o,barMaxWidth:a,barGap:s,barCategoryGap:l,axisKey:El(n),stackId:Il(t)})}),Nl(u)}function Nl(t){var c={};I(t,function(t){var e=t.axisKey,n=t.bandWidth,i=c[e]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},r=i.stacks;c[e]=i;var o=t.stackId;r[o]||i.autoWidthCount++,r[o]=r[o]||{width:0,maxWidth:0};var a=t.barWidth;a&&!r[o].width&&(r[o].width=a,a=Math.min(i.remainedWidth,a),i.remainedWidth-=a);var s=t.barMaxWidth;s&&(r[o].maxWidth=s);var l=t.barGap;null!=l&&(i.gap=l);var u=t.barCategoryGap
|
|
;null!=u&&(i.categoryGap=u)});var h={};return I(c,function(t,n){h[n]={};var e=t.stacks,i=t.bandWidth,r=Hr(t.categoryGap,i),o=Hr(t.gap,1),a=t.remainedWidth,s=t.autoWidthCount,l=(a-r)/(s+(s-1)*o);l=Math.max(l,0),I(e,function(t){var e=t.maxWidth;e&&e<l&&(e=Math.min(e,a),t.width&&(e=Math.min(e,t.width)),a-=e,t.width=e,s--)}),l=(a-r)/(s+(s-1)*o),l=Math.max(l,0);var u,c=0;I(e,function(t){t.width||(t.width=l),c+=(u=t).width*(1+o)}),u&&(c-=u.width*o);var d=-c/2;I(e,function(t,e){h[n][e]=h[n][e]||{offset:d,width:t.width},d+=t.width*(1+o)})}),h}function Rl(t,e,n){if(t&&e){var i=t[El(e)];return null!=i&&null!=n&&(i=i[Il(n)]),i}}function $l(t,e){var n=Ol(t,e),A=Pl(n),D={};I(n,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=Il(t),o=A[El(i)][r],a=o.offset,s=o.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;D[r]=D[r]||[],e.setLayout({offset:a,size:s});for(var c=e.mapDimension(l.dim),d=e.mapDimension(i.dim),h=ml(e,c),f=l.isHorizontal(),p=jl(i,l,h),g=0,m=e.count();g<m;g++){var v=e.get(c,g),y=e.get(d,g);if(!isNaN(v)){var x,b,_,w,S,C=0<=v?"p":"n",T=p;if(h&&(D[r][y]||(D[r][y]={p:p,n:p}),T=D[r][y][C]),f)x=T,b=(S=n.dataToPoint([v,y]))[1]+a,_=S[0]-p,w=s,Math.abs(_)<u&&(_=(_<0?-1:1)*u),h&&(D[r][y][C]+=_);else x=(S=n.dataToPoint([y,v]))[0]+a,b=T,_=s,w=S[1]-p,Math.abs(w)<u&&(w=(w<=0?-1:1)*u),h&&(D[r][y][C]+=w);e.setItemLayout(g,{x:x,y:b,width:_,height:w})}}},this)}function Fl(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function zl(t){return t.pipelineContext&&t.pipelineContext.large}function jl(t,e,n){return 0<=x(t.getAxesOnZeroOf(),e)||n?e.toGlobalCoord(e.dataToCoord(0)):e.getGlobalExtent()[0]}function Hl(t,e){return FD(t,$D(e))}function Bl(t,e){var n,i,r,o=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,u=null!=s,c=t.getExtent();"ordinal"===o?n=e.getCategories().length:(E(i=e.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(Hb&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),i=[0,0]),i[0]=Hr(i[0],1),i[1]=Hr(i[1],1),r=c[1]-c[0]||Math.abs(c[0])),null==a&&(a="ordinal"===o?n?0:NaN:c[0]-i[0]*r),null==s&&(s="ordinal"===o?n?n-1:NaN:c[1]+i[1]*r),"dataMin"===a?a=c[0]:"function"==typeof a&&(a=a({min:c[0],max:c[1]})),"dataMax"===s?s=c[1]:"function"==typeof s&&(s=s({min:c[0],max:c[1]})),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(C(a)||C(s)||"ordinal"===o&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<a&&0<s&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=e.ecModel;if(d&&"time"===o){var h,f=Ol("bar",d);if(I(f,function(t){h|=t.getBaseAxis()===e.axis}),h){var p=Pl(f),g=Vl(a,s,e,p);a=g.min,s=g.max}}return[a,s]}function Vl(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=Rl(i,n.axis);if(a===undefined)return{min:t,max:e};var s=Infinity;I(a,function(t){s=Math.min(t.offset,s)});var l=-Infinity;I(a,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,d=c/(1-(s+l)/o)-c;return{min:t-=d*(s/u),max:e+=d*(l/u)}}function Wl(t,e){var n=Bl(t,e),i=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:o,fixMin:i,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Ul(t,e){if(e=e||t.get("type"))switch(e){case"category":return new vD(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[Infinity,-Infinity]);case"value":return new bD;default:return(_l.getClass(e)||bD).create(t)}}function ql(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(0<n&&0<i||n<0&&i<0)}function Gl(n){var e,i=n.getLabelModel().get("formatter"),r="category"===n.type?n.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(t){return e.replace("{value}",null!=t?t:"")}):"function"==typeof i?function(t,e){return null!=r&&(e=t-r),i(Yl(n,t),e)}:function(t){return n.scale.getLabel(t)}}function Yl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Zl(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,o="category"===t.type,a=n.getExtent();r=o?n.count():(i=n.getTicks()).length;var s,l=t.getLabelModel(),u=Gl(t),c=1;40<r&&(c=Math.ceil(r/40));for(var d=0;d<r;d+=c){var h=u(i?i[d]:a[0]+d),f=Xl(l.getTextRect(h),l.get("rotate")||0);s?s.union(f):s=f}return s}}function Xl(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,o=i.height,a=r*Math.cos(n)+o*Math.sin(n),s=r*Math.sin(n)+o*Math.cos(n);return new ie(i.x,i.y,a,s)}function Kl(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function Ql(t,e,n,i,r,o,a){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Yi(t.slice(8),new ie(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?Gi(t.slice(7),{},new ie(e,n,i,r),a?"center":"cover"):new KD({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=Kl,s.setColor(o),s}function Jl(t){return yl(t.getSource(),t)}function tu(t,e){var n=e;Or.isInstance(e)||r(n=new Or(e),WD);var i=Ul(n);return i.setExtent(t[0],t[1]),Wl(i,n),i}function eu(t){r(t,WD)}function nu(t,e){return Math.abs(t-e)<tM}function iu(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;o<t.length;o++){var a=t[o];i+=Ti(r[0],r[1],a[0],a[1],e,n),r=a}var s=t[0];return nu(r[0],s[0])&&nu(r[1],s[1])||(i+=Ti(r[0],r[1],s[0],s[1],e,n)),0!==i}function ru(t,e,n){if(this.name=t,this.geometries=e,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}function ou(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++)for(var r=n[i].geometry,o=r.coordinates,a=r.encodeOffsets,s=0;s<o.length;s++){var l=o[s];if("Polygon"===r.type)o[s]=au(l,a[s],e);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=au(c,a[s][u],e)}}return t.UTF8Encoding=!1,t}function au(t,e,n){for(var i=[],r=e[0],o=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function su(t){return"category"===t.type?uu(t):hu(t)}function lu(t,e){return"category"===t.type?du(t,e):{ticks:t.scale.getTicks()}}function uu(t){var e=t.getLabelModel(),n=cu(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function cu(t,e){var n,i=fu(t,"labels"),r=_u(e),o=pu(i,r);return o||gu(i,r,{labels:m(r)?bu(t,r):xu(t,n="auto"===r?mu(t):r),labelCategoryInterval:n})}function du(t,e){var n,i,r=fu(t,"ticks"),o=_u(e),a=pu(r,o);if(a)return a;if(e.get("show")&&!t.scale.isBlank()||(n=[]),m(o))n=bu(t,o,!0);else if("auto"===o){var s=cu(t,t.getLabelModel());i=s.labelCategoryInterval,n=A(s.labels,function(t){return t.tickValue})}else n=xu(t,i=o,!0);return gu(r,o,{ticks:n,tickCategoryInterval:i})}function hu(n){var t=n.scale.getTicks(),i=Gl(n);return{labels:A(t,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t}})}}function fu(t,e){return nM(t)[e]||(nM(t)[e]=[])}function pu(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function gu(t,e,n){return t.push({key:e,value:n}),n}function mu(t){var e=nM(t).autoInterval;return null!=e?e:nM(t).autoInterval=t.calculateCategoryInterval()}function vu(t){var e=yu(t),n=Gl(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;40<a&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,f=0;l<=o[1];l+=s){var p=0,g=0,m=Se(n(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,h=Math.max(h,p,7),f=Math.max(f,g,7)}var v=h/c,y=f/d;isNaN(v)&&(v=Infinity),isNaN(y)&&(y=Infinity);var x=Math.max(0,Math.floor(Math.min(v,y))),b=nM(t.model),_=b.lastAutoInterval,w=b.lastTickCount;return null!=_&&null!=w&&Math.abs(_-x)<=1&&Math.abs(w-a)<=1&&x<_?x=_:(b.lastTickCount=a,b.lastAutoInterval=x),x}function yu(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function xu(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:t})}var r=Gl(t),o=t.scale,a=o.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),c=a[0],d=o.count();0!==c&&1<u&&2<d/u&&(c=Math.round(Math.ceil(c/u)*u));var h={min:s.get("showMinLabel"),max:s.get("showMaxLabel")};h.min&&c!==a[0]&&i(a[0]);for(var f=c;f<=a[1];f+=u)i(f);return h.max&&f!==a[1]&&i(a[1]),l}function bu(t,n,i){var r=t.scale,o=Gl(t),a=[];return I(r.getTicks(),function(t){var e=r.getLabel(t);n(t,e)&&a.push(i?t:{formattedLabel:o(t),rawLabel:e,tickValue:t})}),a}function _u(t){var e=t.get("interval");return null==e?"auto":e}function wu(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function Su(t,e,n,i,r){function o(t,e){return c?e<t:t<e}var a=e.length;if(t.onBand&&!i&&a){var s,l=t.getExtent();if(1===a)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;I(e,function(t){t.coord-=u/2;var e=e||0;0<e%2&&(t.coord-=u/(2*(e+1)))}),s={coord:e[a-1].coord+u},e.push(s)}var c=l[0]>l[1];o(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&o(l[0],e[0].coord)&&e.unshift({coord:l[0]}),o(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&o(s.coord,l[1])&&e.push({coord:l[1]})}}function Cu(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return ya(t,e,n[0]);if(i){for(var r=[],o=0;o<n.length;o++){var a=ya(t,e,n[o]);r.push(a)}return r.join(" ")}}function Tu(t,e,n){X_.call(this),this.updateData(t,e,n)}function Au(t){return[t[0]/2,t[1]/2]}function Du(t,e){this.parent.drift(t,e)}function Mu(t){this.group=new X_,this._symbolCtor=t||Tu}function ku(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function Iu(t){return null==t||b(t)||(t={isIgnore:t}),t||{}}function Eu(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Lu(t,e,n){var i,r=t.getBaseAxis(),o=t.getOtherAxis(r),a=Ou(o,n),s=r.dim,l=o.dim,u=e.mapDimension(l),c=e.mapDimension(s),d="x"===l||"radius"===l?1:0,h=A(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(i|=ml(e,h[0]))&&(h[0]=f),(i|=ml(e,h[1]))&&(h[1]=f),{dataDimsForPoint:h,valueStart:a,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:c,baseDataOffset:d,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Ou(t,e){var n=0,i=t.scale.getExtent();return"start"===e?n=i[0]:"end"===e?n=i[1]:0<i[0]?n=i[0]:i[1]<0&&(n=i[1]),n}function Pu(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}function Nu(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function Ru(t){return isNaN(t[0])||isNaN(t[1])}function $u(t,e,n,i,r,o,a,s,l,u){return"none"!==u&&u?Fu.apply(this,arguments):zu.apply(this,arguments)}function Fu(t,e,n,i,r,o,a,s,l,u,c){for(var d=0,h=n,f=0;f<i;f++){var p=e[h];if(r<=h||h<0)break;if(Ru(p)){if(c){h+=o;continue}break}if(h===n)t[0<o?"moveTo":"lineTo"](p[0],p[1]);else if(0<l){var g=e[d],m="y"===u?1:0,v=(p[m]-g[m])*l;yM(bM,g),bM[m]=g[m]+v,yM(_M,p),_M[m]=p[m]-v,t.bezierCurveTo(bM[0],bM[1],_M[0],_M[1],p[0],p[1])}else t.lineTo(p[0],p[1]);d=h,h+=o}return f}function zu(t,e,n,i,r,o,a,s,l,u,c){for(var d=0,h=n,f=0;f<i;f++){var p=e[h];if(r<=h||h<0)break;if(Ru(p)){if(c){h+=o;continue}break}if(h===n)t[0<o?"moveTo":"lineTo"](p[0],p[1]),yM(bM,p);else if(0<l){var g=h+o,m=e[g];if(c)for(;m&&Ru(e[g]);)m=e[g+=o];var v=.5,y=e[d];if(!(m=e[g])||Ru(m))yM(_M,p);else{var x,b;if(Ru(m)&&!c&&(m=p),G(xM,m,y),"x"===u||"y"===u){var _="x"===u?0:1;x=Math.abs(p[_]-y[_]),b=Math.abs(p[_]-m[_])}else x=s_(p,y),b=s_(p,m);vM(_M,p,xM,-l*(1-(v=b/(b+x))))}gM(bM,bM,s),mM(bM,bM,a),gM(_M,_M,s),mM(_M,_M,a),t.bezierCurveTo(bM[0],bM[1],_M[0],_M[1],p[0],p[1]),vM(bM,p,xM,l*v)}else t.lineTo(p[0],p[1]);d=h,h+=o}return f}function ju(t,e){var n=[Infinity,Infinity],i=[-Infinity,-Infinity];if(e)for(var r=0;r<t.length;r++){var o=t[r];o[0]<n[0]&&(n[0]=o[0]),o[1]<n[1]&&(n[1]=o[1]),o[0]>i[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}function Hu(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(i[0]!==r[0]||i[1]!==r[1])return}return!0}}function Bu(t){return"number"==typeof t?t:t?.5:0}function Vu(t){var e=t.getGlobalExtent();if(t.onBand){var n=t.getBandWidth()/2-1,i=e[1]>e[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function Wu(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,o=e.count();r<o;r++)i.push(Pu(n,t,e,r));return i}function Uu(t,e,n,i){var r=Vu(t.getAxis("x")),o=Vu(t.getAxis("y")),a=t.getBaseAxis().isHorizontal(),s=Math.min(r[0],r[1]),l=Math.min(o[0],o[1]),u=Math.max(r[0],r[1])-s,c=Math.max(o[0],o[1])-l;if(n)s-=.5,u+=.5,l-=.5,c+=.5;else{var d=i.get("lineStyle.width")||2,h=i.get("clipOverflow")?d/2:Math.max(u,c);a?(l-=h,c+=2*h):(s-=h,u+=2*h)}var f=new yC({shape:{x:s,y:l,width:u,height:c}});return e&&(f.shape[a?"width":"height"]=0,Tr(f,{shape:{width:u,height:c}},i)),f}function qu(t,e,n,i){var r=t.getAngleAxis(),o=t.getRadiusAxis().getExtent().slice();o[0]>o[1]&&o.reverse();var a=r.getExtent(),s=Math.PI/180;n&&(o[0]-=.5,o[1]+=.5);var l=new hC({shape:{cx:Br(t.cx,1),cy:Br(t.cy,1),r0:Br(o[0],1),r:Br(o[1],1),startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:r.inverse}});return e&&(l.shape.endAngle=-a[0]*s,Tr(l,{shape:{endAngle:-a[1]*s}},i)),l}function Gu(t,e,n,i){return"polar"===t.type?qu(t,e,n,i):Uu(t,e,n,i)}function Yu(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,o=[],a=0;a<t.length-1;a++){var s=t[a+1],l=t[a];o.push(l);var u=[];switch(n){case"end":u[r]=s[r],u[1-r]=l[1-r],o.push(u);break;case"middle":var c=(l[r]+s[r])/2,d=[];u[r]=d[r]=c,u[1-r]=l[1-r],d[1-r]=s[1-r],o.push(u),o.push(d);break;default:u[r]=l[r],u[1-r]=s[1-r],o.push(u)}}return t[a]&&o.push(t[a]),o}function Zu(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count())if("cartesian2d"===e.type){for(var i,r,o=n.length-1;0<=o;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[o];break}}if(r){var u=e.getAxis(i),c=A(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),d=c.length,h=r.outerColors.slice();d&&c[0].coord>c[d-1].coord&&(c.reverse(),h.reverse());var f=10,p=c[0].coord-f,g=c[d-1].coord+f,m=g-p;if(m<.001)return"transparent";I(c,function(t){t.offset=(t.coord-p)/m}),c.push({offset:d?c[d-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:d?c[0].offset:.5,color:h[0]||"transparent"});var v=new TC(0,0,0,0,c,!0);return v[i]=p,v[i+"2"]=g,v}Hb&&console.warn("Visual map on line style only support x or y dimension.")}else Hb&&console.warn("Visual map on line style is only supported on cartesian2d.")}function Xu(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!Ku(o,e))){var a=e.mapDimension(o.dim),s={};return I(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function Ku(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;a<r;a+=o)if(1.5*Tu.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}function Qu(t){return this._axes[t]}function Ju(t){kM.call(this,t)}function tc(t,e){return e.type||(e.data?"category":"value")}function ec(t,e){return t.getCoordSysModel()===e}function nc(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function ic(t,e,n){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,r=t[e],o=n.model,a=o.get("axisLine.onZero"),s=o.get("axisLine.onZeroAxisIndex");if(a)if(null==s){for(var l in r)if(r.hasOwnProperty(l)&&rc(r[l])){i=r[l];break}}else rc(r[s])&&(i=r[s])}function rc(t){return t&&"category"!==t.type&&"time"!==t.type&&ql(t)}function oc(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function ac(n){return A(FM,function(t){var e=n.getReferringComponents(t)[0];if(Hb&&!e)throw new Error(t+' "'+N(n.get(t+"Index"),n.get(t+"Id"),0)+'" not found');return e})}function sc(t){return"cartesian2d"===t.get("coordinateSystem")}function lc(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function uc(t,e,n,i){var r,o,a=Yr(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return Zr(a-zM/2)?(o=l?"bottom":"top",r="center"):Zr(a-1.5*zM)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*zM&&zM/2<a?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function cc(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function dc(t,e,n){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");n=n||[];var o=(e=e||[])[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],c=n[1],d=n[n.length-1],h=n[n.length-2];!1===i?(hc(o),hc(u)):fc(o,a)&&(i?(hc(a),hc(c)):(hc(o),hc(u))),!1===r?(hc(s),hc(d)):fc(l,s)&&(r?(hc(l),hc(h)):(hc(s),hc(d)))}function hc(t){t&&(t.ignore=!0)}function fc(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=pt([]);return yt(r,r,-t.rotation),n.applyTransform(mt([],r,t.getLocalTransform())),i.applyTransform(mt([],r,e.getLocalTransform())),n.intersect(i)}}function pc(t){return"middle"===t||"center"===t}function gc(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),o=r.getModel("lineStyle"),a=r.get("length"),s=i.getTicksCoords(),l=[],u=[],c=t._transform,d=[],h=0;h<s.length;h++){var f=s[h].coord;l[0]=f,u[l[1]=0]=f,u[1]=n.tickDirection*a,c&&(ot(l,l,c),ot(u,u,c));var p=new xC(Ki({anid:"tick_"+s[h].tickValue,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:D(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(p),d.push(p)}return d}}function mc(u,c,d){var h=c.axis;if(N(d.axisLabelShow,c.get("axisLabel.show"))&&!h.scale.isBlank()){var f=c.getModel("axisLabel"),p=f.get("margin"),t=h.getViewLabels(),e=(N(d.labelRotate,f.get("rotate"))||0)*zM/180,g=BM(d.rotation,e,d.labelDirection),m=c.getCategories(!0),v=[],y=cc(c),x=c.get("triggerEvent");return I(t,function(t,e){var n=t.tickValue,i=t.formattedLabel,r=t.rawLabel,o=f;m&&m[n]&&m[n].textStyle&&(o=new Or(m[n].textStyle,f,c.ecModel));var a=o.getTextColor()||c.get("axisLine.lineStyle.color"),s=[h.dataToCoord(n),d.labelOffset+d.labelDirection*p],l=new lC({anid:"label_"+n,position:s,rotation:g.rotation,silent:y,z2:10});pr(l.style,o,{text:i,textAlign:o.getShallow("align",!0)||g.textAlign,textVerticalAlign:o.getShallow("verticalAlign",!0)||o.getShallow("baseline",!0)||g.textVerticalAlign,textFill:"function"==typeof a?a("category"===h.type?r:"value"===h.type?n+"":n,e):a}),x&&(l.eventData=lc(c),l.eventData.targetType="axisLabel",l.eventData.value=r),u._dumbGroup.add(l),l.updateTransform(),v.push(l),u.group.add(l),l.decomposeTransform()}),v}}function vc(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return yc(n,t,e),n.seriesInvolved&&bc(n,t),n}function yc(p,g,t){var o=g.getComponent("tooltip"),m=g.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[];VM(t.getCoordinateSystems(),function(d){function t(t,e,n){var i=n.model.getModel("axisPointer",m),r=i.get("show");if(r&&("auto"!==r||t||Ac(i))){null==e&&(e=i.get("triggerTooltip"));var o=(i=t?xc(n,f,m,g,t,e):i).get("snap"),a=Dc(n.model),s=e||o||"category"===n.type,l=p.axesInfo[a]={key:a,axis:n,coordSys:d,axisPointerModel:i,triggerTooltip:e,involveSeries:s,snap:o,useHandle:Ac(i),seriesModels:[]};h[a]=l,p.seriesInvolved|=s;var u=_c(v,n);if(null!=u){var c=y[u]||(y[u]={axesInfo:{}});c.axesInfo[a]=l,c.mapper=v[u].mapper,l.linkGroup=c}}}if(d.axisPointerEnabled){var e=Dc(d.model),h=p.coordSysAxesInfo[e]={},f=(p.coordSysMap[e]=d).model.getModel("tooltip",o);if(VM(d.getAxes(),WM(t,!1,null)),d.getTooltipAxes&&o&&f.get("show")){var n="axis"===f.get("trigger"),i="cross"===f.get("axisPointer.type"),r=d.getTooltipAxes(f.get("axisPointer.axis"));(n||i)&&VM(r.baseAxes,WM(t,!i||"cross",n)),i&&VM(r.otherAxes,WM(t,"cross",!1))}}})}function xc(t,e,n,i,r,o){var a=e.getModel("axisPointer"),s={};VM(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=L(a.get(t))}),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=a.get("label.show");if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&D(l,c.textStyle)}}return t.model.getModel("axisPointer",new Or(s,n,i))}function bc(r,t){t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get("tooltip.trigger",!0),e=n.get("tooltip.show",!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get("axisPointer.show",!0)&&VM(r.coordSysAxesInfo[Dc(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})},this)}function _c(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var o=t[r]||{};if(wc(o[i+"AxisId"],n.id)||wc(o[i+"AxisIndex"],n.componentIndex)||wc(o[i+"AxisName"],n.name))return r}}function wc(t,e){return"all"===t||E(t)&&0<=x(t,e)||t===e}function Sc(t){var e=Cc(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=Ac(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),r.value=a,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function Cc(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Dc(t)]}function Tc(t){var e=Cc(t);return e&&e.axisPointerModel}function Ac(t){return!!t.get("handle.show")}function Dc(t){return t.type+"||"+t.id}function Mc(t,e,n,i,r,o){var a=UM.getAxisPointerClass(t.axisPointerClass);if(a){var s=Tc(e);s?(t._axisPointer||(t._axisPointer=new a)).render(e,s,i,o):kc(t,i)}}function kc(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}function Ic(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));p[h.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[h[l]]:d[0],"x"===u?p[h[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);var m={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=m[s],o.labelOffset=a?p[h[s]]-p[h.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),N(n.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var v=e.get("axisLabel.rotate");return o.labelRotate="top"===l?-v:v,o.z2=1,o}function Ec(t,e,n,i,r,o){fr(t,e,n.getModel("label"),n.getModel("emphasis.label"),{labelFetcher:r,labelDataIndex:o,defaultText:Cu(r.getData(),o),isRectText:!0,autoColor:i}),Lc(t),Lc(e)}function Lc(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Oc(t,e,n){n.style.text=null,Cr(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function Pc(t,e,n){n.style.text=null,Cr(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}function Nc(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"color"),u=e.getItemVisual(n,"opacity"),c=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(D({fill:l,opacity:u},c.getBarItemStyle()));var h=i.getShallow("cursor");h&&t.attr("cursor",h);var f=a?0<r.height?"bottom":"top":0<r.width?"left":"right";s||Ec(t.style,d,i,l,o,n,f),hr(t,d)}function Rc(t,e){var n=t.get(JM)||0;return Math.min(n,Math.abs(e.width),Math.abs(e.height))}function $c(t,e,n){var i=t.getData(),r=[],o=i.getLayout("valueAxisHorizontal")?1:0;r[1-o]=i.getLayout("valueAxisStart");var a=new nk({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__valueIdx:o});e.add(a),Fc(a,t,i)}function Fc(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function zc(t,e,n,i){var r=e.getData(),o=this.dataIndex,a=r.getName(o),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),r.each(function(t){jc(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function jc(t,e,n,i,r){var o=(e.startAngle+e.endAngle)/2,a=n?i:0,s=[Math.cos(o)*a,Math.sin(o)*a];r?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Hc(t,e){function n(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function i(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}X_.call(this);var r=new hC({z2:2}),o=new vC,a=new lC;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function Bc(r,t,e,n,i,o,a){function s(t,e,n){for(var i=t;i<e;i++)if(r[i].y+=n,t<i&&i+1<e&&r[i+1].y>r[i].y+r[i].height)return void l(i,n/2);l(e-1,n/2)}function l(t,e){for(var n=t;0<=n&&(r[n].y-=e,!(0<n&&r[n].y>r[n-1].y+r[n-1].height));n--);}function u(t,e,n,i,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("center"!==t[s].position){var u=Math.abs(t[s].y-i),c=t[s].len,d=t[s].len2,h=u<r+c?Math.sqrt((r+c+d)*(r+c+d)-u*u):Math.abs(t[s].x-n);e&&a<=h&&(h=a-10),!e&&h<=a&&(h=a+10),t[s].x=n+h*o,a=h}}r.sort(function(t,e){return t.y-e.y});for(var c,d=0,h=r.length,f=[],p=[],g=0;g<h;g++)(c=r[g].y-d)<0&&s(g,h,-c,i),d=r[g].y+r[g].height;a-d<0&&l(h-1,d-a);for(g=0;g<h;g++)r[g].y>=e?p.push(r[g]):f.push(r[g]);u(f,!1,t,e,n,i),u(p,!0,t,e,n,i)}function Vc(t,e,n,i,r,o){for(var a=[],s=[],l=0;l<t.length;l++)t[l].x<e?a.push(t[l]):s.push(t[l]);Bc(s,e,n,i,1,r,o),Bc(a,e,n,i,-1,r,o);for(l=0;l<t.length;l++){var u=t[l].linePoints;if(u){var c=u[1][0]-u[2][0];t[l].x<e?u[2][0]=t[l].x+3:u[2][0]=t[l].x-3,u[1][1]=u[2][1]=t[l].y,u[1][0]=u[2][0]+c}}}function Wc(){this.group=new X_}function Uc(t,e,n){rM.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function qc(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=A(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new Uc(n,new bD);return i.name=t.get("name"),(i.model=t).axis=i,this.dimensions.push(n),i},this),this.resize(t,n),this.cx,this.cy,this.r,this.startAngle}function Gc(t,e){return D({show:e},t)}function Yc(t){return E(t)||(t=[+t,+t]),t}function Zc(){x_.call(this)}function Xc(t){this.name=t,this.zoomLimit,x_.call(this),this._roamTransformable=new Zc,this._rawTransformable=new Zc,this._center,this._zoom}function Kc(t,e,n,i){var r=n.seriesModel,o=r?r.coordinateSystem:null;return o===this?o[t](i):null}function Qc(t,e,n,i,r){Xc.call(this,t),this.map=e,this._nameCoordMap=F(),this.loadGeoJson(n,i,r)}function Jc(t,e,n,i){var r=n.geoModel,o=n.seriesModel,a=r?r.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return a===this?a[t](i):null}function td(t,e){var n=t.get("boundingCoords");if(null!=n){var i=n[0],r=n[1];isNaN(i[0])||isNaN(i[1])||isNaN(r[0])||isNaN(r[1])?Hb&&console.error("Invalid boundingCoords"):this.setBoundingRect(i[0],i[1],r[0]-i[0],r[1]-i[1])}var o,a=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),c=e.getHeight(),d=t.get("aspectScale")||.75,h=a.width/a.height*d,f=!1;if(s&&l&&(s=[Hr(s[0],u),Hr(s[1],c)],l=Hr(l,Math.min(u,c)),isNaN(s[0])||isNaN(s[1])||isNaN(l)?Hb&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."):f=!0),f){var p={};1<h?(p.width=l,p.height=l/h):(p.height=l,p.width=l*h),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else(o=t.getBoxLayoutParams()).aspect=h,p=po(o,{width:u,height:c});this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function ed(n,t){I(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})}function nd(t,e,n){od(t)[e]=n}function id(t,e,n){var i=od(t);i[e]===n&&(i[e]=null)}function rd(t,e){return!!od(t)[e]}function od(t){return t[Pk]||(t[Pk]={})}function ad(n){this.pointerChecker,this._zr=n,this._opt={};var t=v,i=t(sd,this),r=t(ld,this),o=t(ud,this),a=t(cd,this),s=t(dd,this);d_.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=D(L(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",r),n.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",a),n.on("pinch",s))},this.disable=function(){n.off("mousedown",i),n.off("mousemove",r),n.off("mouseup",o),n.off("mousewheel",a),n.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function sd(t){if(!(xn(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function ld(t){if(!xn(t)&&fd(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!rd(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Iw(t.event),this.trigger("pan",o,a,i,r,e,n)}}function ud(t){xn(t)||(this._dragging=!1)}function cd(t){if(fd(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=0<t.wheelDelta?1.1:1/1.1;hd.call(this,t,e,t.offsetX,t.offsetY)}}function dd(t){if(!rd(this._zr,"globalPan")){var e=1<t.pinchScale?1.1:1/1.1;hd.call(this,t,e,t.pinchX,t.pinchY)}}function hd(t,e,n,i){this.pointerChecker&&this.pointerChecker(t,n,i)&&(Iw(t.event),this.trigger("zoom",e,n,i))}function fd(t,e,n){var i=t._opt[e];return i&&(!_(i)||n.event[i+"Key"])}function pd(t,e,n){var i=t.target,r=i.position;r[0]+=e,r[1]+=n,i.dirty()}function gd(t,e,n,i){var r=t.target,o=t.zoomLimit,a=r.position,s=r.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,c=o.max||Infinity;l=Math.max(Math.min(c,l),u)}var d=l/t.zoom;t.zoom=l,a[0]-=(n-a[0])*(d-1),a[1]-=(i-a[1])*(d-1),s[0]*=d,s[1]*=d,r.dirty()}function md(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!Nk[i.mainType]&&r&&r.model!==n}function vd(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function yd(i,r,o,a,s){o.off("click"),o.off("mousedown"),r.get("selectedMode")&&(o.on("mousedown",function(){i._mouseDownFlag=!0}),o.on("click",function(t){if(i._mouseDownFlag){i._mouseDownFlag=!1;for(var e=t.target;!e.__regions;)e=e.parent;if(e){var n={type:("geo"===r.mainType?"geo":"map")+"ToggleSelect",batch:A(e.__regions,function(t){return{name:t.name,from:s.uid}})};n[r.mainType+"Id"]=r.id,a.dispatchAction(n),xd(r,o)}}}))}function xd(n,t){t.eachChild(function(e){I(e.__regions,function(t){e.trigger(n.isSelected(t.name)?"emphasis":"normal")})})}function bd(t,e){var n=new X_;this._controller=new ad(t.getZr()),this._controllerHost={target:e?n:null},this.group=n,this._updateGroup=e,this._mouseDownFlag}function _d(t,e,n){var i=t.getZoom(),r=t.getCenter(),o=e.zoom,a=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy){a[0]-=e.dx,a[1]-=e.dy;r=t.pointToData(a);t.setCenter(r)}if(null!=o){if(n){var s=n.min||0,l=n.max||Infinity;o=Math.max(Math.min(i*o,l),s)/i}t.scale[0]*=o,t.scale[1]*=o;var u=t.position,c=(e.originX-u[0])*(o-1),d=(e.originY-u[1])*(o-1);u[0]-=c,u[1]-=d,t.updateTransform();r=t.pointToData(a);t.setCenter(r),t.setZoom(o*i)}return{center:t.getCenter(),zoom:t.getZoom()}}function wd(u,c
|
|
){var d={};return I(u,function(i){i.each(i.mapDimension("value"),function(t,e){var n="ec-"+i.getName(e);d[n]=d[n]||[],isNaN(t)||d[n].push(t)})}),u[0].map(u[0].mapDimension("value"),function(t,e){for(var n,i="ec-"+u[0].getName(e),r=0,o=Infinity,a=-Infinity,s=d[i].length,l=0;l<s;l++)o=Math.min(o,d[i][l]),a=Math.max(a,d[i][l]),r+=d[i][l];return n="min"===c?o:"max"===c?a:"average"===c?r/s:r,0===s?NaN:n})}function Sd(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,kd(i,t,n),zk(t,function(e){zk(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,y(Cd,n))})}),i.wrapMethod("cloneShallow",y(Ad,n)),zk(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,y(Td,n))}),T(t[i.dataType]===i)}function Cd(t,e){if(Md(this)){var n=O({},this[jk]);kd(n[this.dataType]=e,n,t)}else Id(e,this.dataType,this[Hk],t);return e}function Td(t,e){return t.struct&&t.struct.update(this),e}function Ad(n,i){return zk(i[jk],function(t,e){t!==i&&Id(t.cloneShallow(),e,i,n)}),i}function Dd(t){var e=this[Hk];return null==t||null==e?e:e[jk][t]}function Md(t){return t[Hk]===t}function kd(n,t,i){n[jk]={},zk(t,function(t,e){Id(t,e,n,i)})}function Id(t,e,n,i){(n[jk][e]=t)[Hk]=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Dd}function Ed(e,t,n){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=A(t||[],function(t){return new Or(t,e,e.ecModel)}),this.leavesModel=new Or(n||{},e,e.ecModel)}function Ld(t,e){var n=e.children;t.parentNode!==e&&(n.push(t),t.parentNode=e)}function Od(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var r=n.length-1;0<=r;r--){var o=n[r];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},i.push(o)}}function Pd(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,r=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){zd(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=jd(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function Nd(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Rd(t){return arguments.length?t:Ud}function $d(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function Fd(t,e){return po(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function zd(t){for(var e=t.children,n=e.length,i=0,r=0;0<=--n;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}function jd(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=Hd(s),o=Bd(o),s&&o;){r=Hd(r),a=Bd(a),r.hierNode.ancestor=t;var h=s.hierNode.prelim+d-o.hierNode.prelim-u+i(s,o);0<h&&(Wd(Vd(s,t,n),t,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,c+=a.hierNode.modifier}s&&!Hd(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=d-l),o&&!Bd(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=t)}return n}function Hd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Bd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Vd(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function Wd(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function Ud(t,e){return t.parentNode===e.parentNode?1:2}function qd(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function Gd(t,e,n){return n.itemModel=e,n.itemStyle=e.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=e.getModel("lineStyle").getLineStyle(),n.labelModel=e.getModel("label"),n.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function Yd(t,e,n,i,r,o){var a=!n,s=t.tree.getNodeByDataIndex(e),l=(o=Gd(s,s.getModel(),o),t.tree.root),u=s.parentNode===l?s:s.parentNode||s,c=t.getItemGraphicEl(u.dataIndex),d=u.getLayout(),h=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,f=s.getLayout();a?(n=new Tu(t,e,o)).attr("position",[h.x,h.y]):n.updateData(t,e,o),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=f.rawX,n.__radialRawY=f.rawY,i.add(n),t.setItemGraphicEl(e,n),Cr(n,{position:[f.x,f.y]},r);var p=n.getSymbolPath();if("radial"===o.layout){var g,m,v=l.children[0],y=v.getLayout(),x=v.children.length;if(f.x===y.x&&!0===s.isExpand){var b={};b.x=(v.children[0].getLayout().x+v.children[x-1].getLayout().x)/2,b.y=(v.children[0].getLayout().y+v.children[x-1].getLayout().y)/2,(g=Math.atan2(b.y-y.y,b.x-y.x))<0&&(g=2*Math.PI+g),(m=b.x<y.x)&&(g-=Math.PI)}else(g=Math.atan2(f.y-y.y,f.x-y.x))<0&&(g=2*Math.PI+g),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(m=f.x<y.x)&&(g-=Math.PI):(m=f.x>y.x)||(g-=Math.PI);var _=m?"left":"right";p.setStyle({textPosition:_,textRotation:-g,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==l){var w=n.__edge;w||(w=n.__edge=new _C({shape:Xd(o,h,h),style:D({opacity:0},o.lineStyle)})),Cr(w,{shape:Xd(o,d,f),style:{opacity:1}},r),i.add(w)}}function Zd(t,e,n,i,r,o){for(var a,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=(o=Gd(s,s.getModel(),o),s.parentNode===l?s:s.parentNode||s);null==(a=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;Cr(n,{position:[a.x+1,a.y+1]},r,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var c=n.__edge;c&&Cr(c,{shape:Xd(o,a,a),style:{opacity:0}},r,function(){i.remove(c)})}function Xd(t,e,n){var i,r,o,a,s=t.orient;if("radial"===t.layout){var l=e.rawX,u=e.rawY,c=n.rawX,d=n.rawY,h=$d(l,u),f=$d(l,u+(d-u)*t.curvature),p=$d(c,d+(u-d)*t.curvature),g=$d(c,d);return{x1:h.x,y1:h.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}l=e.x,u=e.y,c=n.x,d=n.y;return"LR"!==s&&"RL"!==s||(i=l+(c-l)*t.curvature,r=u,o=c+(l-c)*t.curvature,a=d),"TB"!==s&&"BT"!==s||(i=l,r=u+(d-u)*t.curvature,o=c,a=d+(u-d)*t.curvature),{x1:l,y1:u,x2:c,y2:d,cpx1:i,cpy1:r,cpx2:o,cpy2:a}}function Kd(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s<a.length;s++)r.push(a[s])}for(;i=o.pop();)e(i,n)}function Qd(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;0<=o;o--)i.push(r[o])}}function Jd(t,e){var n=Fd(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=Rd(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(r=n.width,o=n.height,a=Rd());var s=t.getData().tree.root,l=s.children[0];if(l){Od(s),Kd(l,Pd,a),s.hierNode.modifier=-l.hierNode.prelim,Qd(l,Nd);var u=l,c=l,d=l;Qd(l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>c.getLayout().x&&(c=t),t.depth>d.depth&&(d=t)});var h=u===c?1:a(u,c)/2,f=h-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===i)p=r/(c.getLayout().x+h+f),g=o/(d.depth-1||1),Qd(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=$d(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(c.getLayout().x+h+f),p=r/(d.depth-1||1),Qd(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:r-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=r/(c.getLayout().x+h+f),g=o/(d.depth-1||1),Qd(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function th(t,e,n){if(t&&0<=x(e,t.type)){var i=n.getData().tree.root,r=t.targetNode;if(r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function eh(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function nh(t,e){return 0<=x(eh(t),e)}function ih(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}function rh(t){var n=0;I(t.children,function(t){rh(t);var e=t.value;E(e)&&(e=e[0]),n+=e});var e=t.value;E(e)&&(e=e[0]),(null==e||isNaN(e))&&(e=n),e<0&&(e=0),E(t.value)?t.value[0]=e:t.value=e}function oh(t,e){var n=e.get("color");if(n){var i;if(I(t=t||[],function(t){var e=new Or(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)}),!i)(t[0]||(t[0]={})).color=n.slice();return t}}function ah(t){this.group=new X_,t.add(this.group)}function sh(t,e,n,i,r,o){var a=[[r?t:t-qk,e],[t+n,e],[t+n,e+i],[r?t:t-qk,e+i]];return!o&&a.splice(2,0,[t+n+qk,e+i/2]),!r&&a.push([t,e+i/2]),a}function lh(t,e,n){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&ih(n,e)}}function uh(){var o,a=[],s={};return{add:function(t,e,n,i,r){return _(i)&&(r=i,i=0),!s[t.id]&&(s[t.id]=1,a.push({el:t,target:e,time:n,delay:i,easing:r}),!0)},done:function(t){return o=t,this},start:function(){function t(){--e||(a.length=0,s={},o&&o())}for(var e=a.length,n=0,i=a.length;n<i;n++){var r=a[n];r.el.animateTo(r.target,r.time,r.delay,r.easing,t)}return this}}}function ch(){return{nodeGroup:[],background:[],content:[]}}function dh(h,a,s,l,u,n,f,t,e,i){function r(t,i,r){i.dataIndex=f.dataIndex,i.seriesIndex=h.seriesIndex,i.setShape({x:0,y:0,width:y,height:x});var o=f.getVisual("borderColor",!0),a=M.get("borderColor");c(i,function(){var t=aI(D);t.fill=o;var e=oI(M);if(e.fill=a,r){var n=y-2*b;d(t,e,o,n,T,{x:b,y:0,width:n,height:T})}else t.text=e.text=null;i.setStyle(t),hr(i,e)}),t.add(i)}function o(t,n){n.dataIndex=f.dataIndex,n.seriesIndex=h.seriesIndex;var i=Math.max(y-2*b,0),r=Math.max(x-2*b,0);n.culling=!0,n.setShape({x:b,y:b,width:i,height:r});var o=f.getVisual("color",!0);c(n,function(){var t=aI(D);t.fill=o;var e=oI(M);d(t,e,o,i,r),n.setStyle(t),hr(n,e)}),t.add(n)}function c(t,e){_?!t.invisible&&n.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function d(t,e,n,i,r,o){var a=f.getModel(),s=N(h.getFormattedLabel(f.dataIndex,"normal",null,null,o?"upperLabel":"label"),a.get("name"));if(!o&&v.isLeafRoot){var l=h.get("drillDownIcon",!0);s=l?l+" "+s:s}var u=a.getModel(o?tI:Qk),c=a.getModel(o?eI:Jk),d=u.getShallow("show");fr(t,e,u,c,{defaultText:d?s:null,autoColor:n,isRectText:!0}),o&&(t.textRect=L(o)),t.truncate=d&&u.get("ellipsis")?{outerWidth:i,outerHeight:r,minChar:2}:null}function p(t,e,n,i){var r=null!=S&&s[t][S],o=u[t];return r?(s[t][S]=null,g(o,r,t)):_||((r=new e({z:hh(n,i)})).__tmDepth=n,r.__tmStorageName=t,m(o,r,t)),a[t][w]=r}function g(t,e,n){(t[w]={}).old="nodeGroup"===n?e.position.slice():O({},e.shape)}function m(t,e,n){var i=t[w]={},r=f.parentNode;if(r&&(!l||"drillDown"===l.direction)){var o=0,a=0,s=u.background[r.getRawIndex()];!l&&s&&s.old&&(o=s.old.width,a=s.old.height),i.old="nodeGroup"===n?[0,a]:{x:o,y:a,width:0,height:0}}i.fadein="nodeGroup"!==n}if(f){var v=f.getLayout();if(v&&v.isInView){var y=v.width,x=v.height,b=v.borderWidth,_=v.invisible,w=f.getRawIndex(),S=t&&t.getRawIndex(),C=f.viewChildren,T=v.upperHeight,A=C&&C.length,D=f.getModel("itemStyle"),M=f.getModel("emphasis.itemStyle"),k=p("nodeGroup",Yk);if(k){if(e.add(k),k.attr("position",[v.x||0,v.y||0]),k.__tmNodeWidth=y,k.__tmNodeHeight=x,v.isAboveViewRoot)return k;var I=p("background",Zk,i,iI);if(I&&r(k,I,A&&v.upperHeight),!A){var E=p("content",Zk,i,rI);E&&o(k,E)}return k}}}}function hh(t,e){var n=t*nI+e;return(n-1)/n}function fh(n){var t=n.pieceList;n.hasSpecialVisual=!1,I(t,function(t,e){t.originIndex=e,null!=t.visual&&(n.hasSpecialVisual=!0)})}function ph(t){var e=t.categories,n=t.visual,i=t.categoryMap={};if(cI(e,function(t,e){i[t]=e}),!E(n)){var r=[];b(n)?cI(n,function(t,e){var n=i[e];r[null!=n?n:hI]=t}):r[hI]=n,n=Sh(t,r)}for(var o=e.length-1;0<=o;o--)null==n[o]&&(delete i[e[o]],e.pop())}function gh(t,e){var n=t.visual,i=[];b(n)?cI(n,function(t){i.push(t)}):null!=n&&i.push(n);var r={color:1,symbol:1};e||1!==i.length||r.hasOwnProperty(t.type)||(i[1]=i[0]),Sh(t,i)}function mh(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t),n("color",i(e("color"),t))},_doMap:_h([0,1])}}function vh(t){var e=this.option.visual;return e[Math.round(jr(t,[0,1],[0,e.length-1],!0))]||{}}function yh(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function xh(t){var e=this.option.visual;return e[this.option.loop&&t!==hI?t%e.length:t]}function bh(){return this.option.visual[0]}function _h(i){return{linear:function(t){return jr(t,i,this.option.visual,!0)},category:xh,piecewise:function(t,e){var n=wh.call(this,e);return null==n&&(n=jr(t,i,this.option.visual,!0)),n},fixed:bh}}function wh(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[fI.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function Sh(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=A(e,function(t){return Pt(t)})),e}function Ch(t,e,n){return t?e<=n:e<n}function Th(t,e,n,i,r,o){var a=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=t.getModel(vI),c=Ah(u,e,n[t.depth],i),d=u.get("borderColor"),h=u.get("borderColorSaturation");null!=h&&(d=Mh(h,l=Dh(c,t))),t.setVisual("borderColor",d);var f=t.viewChildren;if(f&&f.length){var p=Ih(t,a,s,u,c,f);I(f,function(t,e){(t.depth>=r.length||t===r[t.depth])&&Th(t,Lh(a,c,t,e,p,o),n,i,r,o)})}else l=Dh(c,t),t.setVisual("color",l)}}function Ah(n,i,r,o){var a=O({},i);return I(["color","colorAlpha","colorSaturation"],function(t){var e=n.get(t,!0);null==e&&r&&(e=r[t]),null==e&&(e=i[t]),null==e&&(e=o.get(t)),null!=e&&(a[t]=e)}),a}function Dh(t){var e=kh(t,"color");if(e){var n=kh(t,"colorAlpha"),i=kh(t,"colorSaturation");return i&&(e=Ht(e,null,null,i)),n&&(e=Bt(e,n)),e}}function Mh(t,e){return null!=e?Ht(e,null,null,t):null}function kh(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function Ih(t,e,n,i,r,o){if(o&&o.length){var a=Eh(e,"color")||null!=r.color&&"none"!==r.color&&(Eh(e,"colorAlpha")||Eh(e,"colorSaturation"));if(a){var s=e.get("visualMin"),l=e.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new fI(d);return h.__drColorMappingBy=c,h}}}function Eh(t,e){var n=t.get(e);return mI(n)&&n.length?{name:e,range:n}:null}function Lh(t,e,n,i,r,o){var a=O({},e);if(r){var s=r.type,l="color"===s&&r.__drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}function Oh(t,e,n,i){var r,o;if(!t.isRemoved()){var a=t.getLayout();r=a.width,o=a.height;var s=(f=t.getModel()).get(SI),l=f.get(CI)/2,u=Vh(f),c=Math.max(s,u),d=s-l,h=c-l,f=t.getModel();t.setLayout({borderWidth:s,upperHeight:c,upperLabelHeight:u},!0);var p=(r=xI(r-2*d,0))*(o=xI(o-d-h,0)),g=Ph(t,f,p,e,n,i);if(g.length){for(var m={x:d,y:h,width:r,height:o},v=bI(r,o),y=Infinity,x=[],b=x.area=0,_=g.length;b<_;){var w=g[b];x.push(w),x.area+=w.getLayout().area;var S=Fh(x,v,e.squareRatio);S<=y?(b++,y=S):(x.area-=x.pop().getLayout().area,zh(x,v,m,l,!1),v=bI(m.width,m.height),x.length=x.area=0,y=Infinity)}if(x.length&&zh(x,v,m,l,!0),!n){var C=f.get("childrenVisibleMin");null!=C&&p<C&&(n=!0)}for(b=0,_=g.length;b<_;b++)Oh(g[b],e,n,i+1)}}}function Ph(t,e,n,i,r,o){var a=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=o;if(r&&!l)return t.viewChildren=[];Rh(a=f(a,function(t){return!t.isRemoved()}),s);var u=$h(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=Nh(e,n,u.sum,s,a),0===u.sum)return t.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var h=a[c].getValue()/u.sum*n;a[c].setLayout({area:h})}return l&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0),t.viewChildren=a,t.setLayout({dataExtent:u.dataExtent},!0),a}function Nh(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;0<=l;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*e<o&&(s=l,n-=u)}return"asc"===i?r.splice(0,a-s):r.splice(s,a-s),n}function Rh(t,i){return i&&t.sort(function(t,e){var n="asc"===i?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0===n?"asc"===i?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n}),t}function $h(t,e,n){for(var i=0,r=0,o=e.length;r<o;r++)i+=e[r].getValue();var a=t.get("visualDimension");if(e&&e.length)if("value"===a&&n)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&s.reverse();else{var s=[Infinity,-Infinity];wI(e,function(t){var e=t.getValue(a);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:i,dataExtent:s}}function Fh(t,e,n){for(var i,r=0,o=Infinity,a=0,s=t.length;a<s;a++)(i=t[a].getLayout().area)&&(i<o&&(o=i),r<i&&(r=i));var l=t.area*t.area,u=e*e*n;return l?xI(u*r/l,l/(u*o)):Infinity}function zh(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=e?t.area/e:0;(r||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,h=t.length;d<h;d++){var f=t[d],p={},g=c?f.getLayout().area/c:0,m=p[l[a]]=xI(c-2*i,0),v=n[s[o]]+n[l[o]]-u,y=d===h-1||v<g?v:g,x=p[l[o]]=xI(y-2*i,0);p[s[a]]=n[s[a]]+bI(i,m/2),p[s[o]]=u+bI(i,x/2),u+=y,f.setLayout(p,!0)}n[s[a]]+=c,n[l[a]]-=c}function jh(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;for(var l=i*r,u=l*t.option.zoomToNodeRatio;o=a.parentNode;){for(var c=0,d=o.children,h=0,f=d.length;h<f;h++)c+=d[h].getValue();var p=a.getValue();if(0===p)return s;u*=c/p;var g=o.getModel(),m=g.get(SI);u+=4*m*m+(3*m+Math.max(m,Vh(g,m)))*Math.pow(u,.5),BC<u&&(u=BC),a=o}u<l&&(u=l);var v=Math.pow(u/l,.5);return[i*v,r*v]}function Hh(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;var r=n.node,o=r.getLayout();if(!o)return i;for(var a=[o.width/2,o.height/2],s=r;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}function Bh(t,e,n,i,r){var o=t.getLayout(),a=n[r],s=a&&a===t;if(!(a&&!s||r===n.length&&t!==i)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new ie(e.x-o.x,e.y-o.y,e.width,e.height);wI(t.viewChildren||[],function(t){Bh(t,l,n,i,r+1)})}}function Vh(t){return t.get(TI)?t.get(AI):0}function Wh(t){return"_EC_"+t}function Uh(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function qh(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}function Gh(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Yh(t){return"_"+t+"Type"}function Zh(t,e,n){var i=e.getItemVisual(n,"color"),r=e.getItemVisual(n,t),o=e.getItemVisual(n,t+"Size");if(r&&"none"!==r){E(o)||(o=[o,o]);var a=Ql(r,-o[0]/2,-o[1]/2,o[0],o[1],i);return a.name=t,a}}function Xh(t){var e=new NI({name:"line"});return Kh(e.shape,t),e}function Kh(t,e){var n=e[0],i=e[1],r=e[2];t.x1=n[0],t.y1=n[1],t.x2=i[0],t.y2=i[1],t.percent=1,r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}function Qh(){var t=this,e=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.childOfName("label");if(e||n||!i.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=G([],u,l);if(tt(c,c),e){e.attr("position",l);var d=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(d[1],d[0])),e.attr("scale",[r*s,r*s])}if(n){n.attr("position",u);d=a.tangentAt(1);n.attr("rotation",-Math.PI/2-Math.atan2(d[1],d[0])),n.attr("scale",[r*s,r*s])}if(!i.ignore){var h,f,p;i.attr("position",u);var g=5*r;if("end"===i.__position)h=[c[0]*g+u[0],c[1]*g+u[1]],f=.8<c[0]?"left":c[0]<-.8?"right":"center",p=.8<c[1]?"top":c[1]<-.8?"bottom":"middle";else if("middle"===i.__position){var m=s/2,v=[(d=a.tangentAt(m))[1],-d[0]],y=a.pointAt(m);0<v[1]&&(v[0]=-v[0],v[1]=-v[1]),h=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(d[1],d[0]);u[0]<l[0]&&(x=Math.PI+x),i.attr("rotation",x)}else h=[-c[0]*g+l[0],-c[1]*g+l[1]],f=.8<c[0]?"right":c[0]<-.8?"left":"center",p=.8<c[1]?"bottom":c[1]<-.8?"top":"middle";i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||f},position:h,scale:[r,r]})}}}}function Jh(t,e,n){X_.call(this),this._createLine(t,e,n)}function tf(t){this._ctor=t||Jh,this.group=new X_}function ef(t,e,n,i){if(af(e.getItemLayout(n))){var r=new t._ctor(e,n,i);e.setItemGraphicEl(n,r),t.group.add(r)}}function nf(t,e,n,i,r,o){var a=e.getItemGraphicEl(i);af(n.getItemLayout(r))?(a?a.updateData(n,r,o):a=new t._ctor(n,r,o),n.setItemGraphicEl(r,a),t.group.add(a)):t.group.remove(a)}function rf(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function of(t){return isNaN(t[0])||isNaN(t[1])}function af(t){return!of(t[0])&&!of(t[1])}function sf(t,e,n){for(var i,r=t[0],o=t[1],a=t[2],s=Infinity,l=n*n,u=.1,c=.1;c<=.9;c+=.1){zI[0]=BI(r[0],o[0],a[0],c),zI[1]=BI(r[1],o[1],a[1],c),(f=WI(VI(zI,e)-l))<s&&(s=f,i=c)}for(var d=0;d<32;d++){var h=i+u;jI[0]=BI(r[0],o[0],a[0],i),jI[1]=BI(r[1],o[1],a[1],i),HI[0]=BI(r[0],o[0],a[0],h),HI[1]=BI(r[1],o[1],a[1],h);var f=VI(jI,e)-l;if(WI(f)<.01)break;var p=VI(HI,e)-l;u/=2,f<0?0<=p?i+=u:i-=u:0<=p?i-=u:i+=u}return i}function lf(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function uf(t,e,n){var i=t.getGraphicEl(),r=lf(t,e);null!=n&&(null==r&&(r=1),r*=n),i.downplay&&i.downplay(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",r)})}function cf(t,e){var n=lf(t,e),i=t.getGraphicEl();i.highlight&&i.highlight(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}function df(t){return t instanceof Array||(t=[t,t]),t}function hf(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),ff(n)}}function ff(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=V(t.node1.getLayout()),i=V(t.node2.getLayout()),r=[n,i];+e&&r.push([(n[0]+i[0])/2-(n[1]-i[1])*e,(n[1]+i[1])/2-(i[0]-n[0])*e]),t.setLayout(r)})}function pf(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=e.getBoundingRect(),i=t.getData(),r=i.graph,o=0,a=i.getSum("value"),s=2*Math.PI/(a||i.count()),l=n.width/2+n.x,u=n.height/2+n.y,c=Math.min(n.width,n.height)/2;r.eachNode(function(t){var e=t.getValue("value");o+=s*(a?e:1)/2,t.setLayout([c*Math.cos(o)+l,c*Math.sin(o)+u]),o+=s*(a?e:1)/2}),i.setLayout({cx:l,cy:u}),r.eachEdge(function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,i=V(t.node1.getLayout()),r=V(t.node2.getLayout()),o=(i[0]+r[0])/2,a=(i[1]+r[1])/2;+n&&(e=[l*(n*=3)+o*(1-n),u*n+a*(1-n)]),t.setLayout([i,r,e])})}}function gf(f,p,t){for(var e=t.rect,n=e.width,i=e.height,g=[e.x+n/2,e.y+i/2],m=null==t.gravity?.1:t.gravity,r=0;r<f.length;r++){var o=f[r];o.p||(o.p=H(n*(Math.random()-.5)+g[0],i*(Math.random()-.5)+g[1])),o.pp=V(o.p),o.edges=null}var v=.6;return{warmUp:function(){v=.5},setFixed:function(t){f[t].fixed=!0},setUnfixed:function(t){f[t].fixed=!1},step:function(t){for(var e=[],n=f.length,i=0;i<p.length;i++){var r=p[i],o=r.n1;G(e,(u=r.n2).p,o.p);var a=Y(e)-r.d,s=u.w/(o.w+u.w);isNaN(s)&&(s=0),tt(e,e),!o.fixed&&QI(o.p,o.p,e,s*a*v),!u.fixed&&QI(u.p,u.p,e,-(1-s)*a*v)}for(i=0;i<n;i++){(h=f[i]).fixed||(G(e,g,h.p),QI(h.p,h.p,e,m*v))}for(i=0;i<n;i++){o=f[i];for(var l=i+1;l<n;l++){var u;G(e,(u=f[l]).p,o.p),0===(a=Y(e))&&(W(e,Math.random()-.5,Math.random()-.5),a=1);var c=(o.rep+u.rep)/a/a;!o.fixed&&QI(o.pp,o.pp,e,c),!u.fixed&&QI(u.pp,u.pp,e,-c)}}var d=[];for(i=0;i<n;i++){var h;(h=f[i]).fixed||(G(d,h.p,h.pp),QI(h.p,h.p,d,v),B(h.pp,h.p))}v*=.992,t&&t(f,p,v<.01)}}}function mf(t,e,n){var i=t.getBoxLayoutParams();return i.aspect=n,po(i,{width:e.getWidth(),height:e.getHeight()})}function vf(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:Hr(n[0],e.getWidth()),cy:Hr(n[1],e.getHeight()),r:Hr(t.get("radius"),o/2)}}function yf(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function xf(t,e){function n(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function i(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}X_.call(this);var r=new mC,o=new vC,a=new lC;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function bf(t,e){return po(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function _f(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),r=[],o="ascending"===e,a=0,s=t.count();a<s;a++)r[a]=a;return"function"==typeof e?r.sort(e):"none"!==e&&r.sort(function(t,e){return o?i[t]-i[e]:i[e]-i[t]}),r}function wf(g){g.each(function(t){var e,n,i,r,o=g.getItemModel(t),a=o.getModel("label").get("position"),s=o.getModel("labelLine"),l=g.getItemLayout(t),u=l.points,c="inner"===a||"inside"===a||"center"===a;if(c)e="center",r=[[n=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,i=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4],[n,i]];else{var d,h,f,p=s.get("length");"left"===a?(d=(u[3][0]+u[0][0])/2,h=(u[3][1]+u[0][1])/2,n=(f=d-p)-5,e="right"):(d=(u[1][0]+u[2][0])/2,h=(u[1][1]+u[2][1])/2,n=(f=d+p)+5,e="left");r=[[d,h],[f,h]],i=h}l.label={linePoints:r,x:n,y:i,verticalAlign:"middle",textAlign:e,inside:c}})}function Sf(t){if(!t.parallel){var e=!1;I(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}}function Cf(i){I(On(i.parallelAxis),function(t){if(b(t)){var e=t.parallelIndex||0,n=On(i.parallel)[e];n&&n.parallelAxisDefault&&g(t,n.parallelAxisDefault,!1)}})}function Tf(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:0<n?-1:n<0?1:e?-1:1}}function Af(t,e){return Math.min(e[1],Math.max(e[0],t))}function Df(t,e,n){this._axesMap=F(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function Mf(t,e){return dE(hE(t,e[0]),e[1])}function kf(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function If(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*o-e.axisExpandWindow[0],u=o,c=!0):(n=r-(a-1-t)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}function Ef(i,r){var o=[];return i.eachComponent("parallel",function(t,e){var n=new Df(t,i,r);n.name="parallel_"+e,n.resize(t,r),(t.coordinateSystem=n).model=t,o.push(n)}),i.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),o}function Lf(t,e){return e.type||(e.data?"category":"value")}function Of(t){Hb&&T(t),d_.call(this),this._zr=t,this.group=new X_,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,Hb&&this._mounted,this._uid="brushController_"+LE++,this._handlers={},bE(OE,function(t,e){this._handlers[e]=v(t,this)},this)}function Pf(t,e){var n=t._zr;t._enableGlobalPan||nd(n,ME,t._uid),bE(t._handlers,function(t,e){n.on(e,t)}),t._brushType=e.brushType,t._brushOption=g(L(EE),e,!0)}function Nf(t){var n=t._zr;id(n,ME,t._uid),bE(t._handlers,function(t,e){n.off(e,t)}),t._brushType=t._brushOption=null}function Rf(t,e){var n=PE[e.brushType].createCover(t,e);return n.__brushOption=e,zf(n,e),t.group.add(n),n}function $f(t,e){var n=Hf(e);return n.endCreating&&(n.endCreating(t,e),zf(e,e.__brushOption)),e}function Ff(t,e){var n=e.__brushOption;Hf(e).updateCoverShape(t,e,n.range,n)}function zf(t,e){var n=e.z;null==n&&(n=TE),t.traverse(function(t){t.z=n,t.z2=n})}function jf(t,e){Hf(e).updateCommon(t,e),Ff(t,e)}function Hf(t){return PE[t.__brushOption.brushType]}function Bf(t,e,n){var i,r=t._panels;if(!r)return!0;var o=t._transform;return bE(r,function(t){t.isTargetByCursor(e,n,o)&&(i=t)}),i}function Vf(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushOption.panelId;return null==i||n[i]}function Wf(e){var t=e._covers,n=t.length;return bE(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function Uf(t,e){var n=_E(t._covers,function(t){var e=t.__brushOption,n=L(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function qf(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1],a=CE(r*r+o*o,.5);return AE<a}function Gf(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Yf(e,n,t,i){var r=new X_;return r.add(new yC({name:"main",style:Qf(t),silent:!0,draggable:!0,cursor:"move",drift:xE(e,n,r,"nswe"),ondragend:xE(Uf,n,{isEnd:!0})})),bE(i,function(t){r.add(new yC({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:xE(e,n,r,t),ondragend:xE(Uf,n,{isEnd:!0})}))}),r}function Zf(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=SE(r,DE),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,c=n[0][1],d=n[1][1],h=c-o+r/2,f=d-o+r/2,p=c-a,g=d-s,m=p+r,v=g+r;Kf(t,e,"main",a,s,p,g),i.transformable&&(Kf(t,e,"w",l,u,o,v),Kf(t,e,"e",h,u,o,v),Kf(t,e,"n",l,u,m,o),Kf(t,e,"s",l,f,m,o),Kf(t,e,"nw",l,u,o,o),Kf(t,e,"ne",h,u,o,o),Kf(t,e,"sw",l,f,o,o),Kf(t,e,"se",h,f,o,o))}function Xf(i,r){var t=r.__brushOption,o=t.transformable,e=r.childAt(0);e.useStyle(Qf(t)),e.attr({silent:!o,cursor:o?"move":"default"}),bE(["w","e","n","s","se","sw","ne","nw"],function(t){var e=r.childOfName(t),n=ep(i,t);e&&e.attr({silent:!o,invisible:!o,cursor:o?IE[n]+"-resize":null})})}function Kf(t,e,n,i,r,o,a){var s=e.childOfName(n);s&&s.setShape(ap(op(t,e,[[i,r],[i+o,r+a]])))}function Qf(t){return D({strokeNoScale:!0},t.brushStyle)}function Jf(t,e,n,i){var r=[wE(t,n),wE(e,i)],o=[SE(t,n),SE(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function tp(t){return Ar(t.group)}function ep(t,e){var n;return 1<e.length?(("e"===(n=[ep(t,(e=e.split(""))[0]),ep(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("")):{left:"w",right:"e",top:"n",bottom:"s"}[n=Mr({w:"left",e:"right",n:"top",s:"bottom"}[e],tp(t))]}function np(t,e,n,i,r,o,a){var s=i.__brushOption,l=t(s.range),u=rp(n,o,a);bE(r.split(""),function(t){var e=kE[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(Jf(l[0][0],l[1][0],l[0][1],l[1][1])),jf(n,i),Uf(n,{isEnd:!1})}function ip(t,e,n,i){var r=e.__brushOption.range,o=rp(t,n,i);bE(r,function(t){t[0]+=o[0],t[1]+=o[1]}),jf(t,e),Uf(t,{isEnd:!1})}function rp(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function op(t,e,n){var i=Vf(t,e);return i&&!0!==i?i.clipPath(n,t._transform):L(n)}function ap(t){var e=wE(t[0][0],t[1][0]),n=wE(t[0][1],t[1][1]);return{x:e,y:n,width:SE(t[0][0],t[1][0])-e,height:SE(t[0][1],t[1][1])-n}}function sp(t,e,n){if(t._brushType){var i=t._zr,r=t._covers,o=Bf(t,e,n);if(!t._dragging)for(var a=0;a<r.length;a++){var s=r[a].__brushOption;if(o&&(!0===o||s.panelId===o.panelId)&&PE[s.brushType].contain(r[a],n[0],n[1]))return}o&&i.setCursorStyle("crosshair")}}function lp(t){var e=t.event;e.preventDefault&&e.preventDefault()}function up(t,e,n){return t.childOfName("main").contain(e,n)}function cp(t,e,n,i){var r,o=t._creatingCover,a=t._creatingPanel,s=t._brushOption;if(t._track.push(n.slice()),qf(t)||o){if(a&&!o){"single"===s.brushMode&&Wf(t);var l=L(s);l.brushType=dp(l.brushType,a),l.panelId=!0===a?null:a.panelId,o=t._creatingCover=Rf(t,l),t._covers.push(o)}if(o){var u=PE[dp(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(op(t,o,t._track)),i&&($f(t,o),u.updateCommon(t,o)),Ff(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&Bf(t,e,n)&&Wf(t)&&(r={isEnd:i,removeOnClick:!0});return r}function dp(t,e){return"auto"===t?(Hb&&T(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}function hp(t){if(this._dragging){lp(t);var e=cp(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&Uf(this,e)}}function fp(l){return{createCover:function(t,e){return Yf(xE(np,function(t){var e=[t,[0,100]];return l&&e.reverse(),e},function(t){return t[l]}),t,e,[["w","e"],["n","s"]][l])},getCreatingRange:function(t){var e=Gf(t);return[wE(e[0][l],e[1][l]),SE(
|
|
e[0][l],e[1][l])]},updateCoverShape:function(t,e,n,i){var r,o=Vf(t,e);if(!0!==o&&o.getLinearBrushOtherExtent)r=o.getLinearBrushOtherExtent(l,t._transform);else{var a=t._zr;r=[0,[a.getWidth(),a.getHeight()][1-l]]}var s=[n,r];l&&s.reverse(),Zf(t,e,s,i)},updateCommon:Xf,contain:up}}function pp(e){return e=vp(e),function(t){return Ir(t,e)}}function gp(r,o){return r=vp(r),function(t){var e=null!=o?o:t,n=e?r.width:r.height,i=e?r.x:r.y;return[i,i+(n||0)]}}function mp(n,i,r){return n=vp(n),function(t,e){return n.contain(e[0],e[1])&&!md(t,i,r)}}function vp(t){return ie.create(t)}function yp(t,e,n){return n&&"axisAreaSelect"===n.type&&e.findComponents({mainType:"parallelAxis",query:n})[0]===t}function xp(t){var e=t.axis;return A(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function bp(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}function _p(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}function wp(t,e){if(!t.encodeDefine){var n=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(n){var i=t.encodeDefine=F();I(n.dimensions,function(t){var e=Sp(t);i.set(t,e)})}}}function Sp(t){return+t.replace("dim","")}function Cp(t,e,n){var i=t.model,r=t.getRect(),o=new yC({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),a="horizontal"===i.get("layout")?"width":"height";return o.setShape(a,0),Tr(o,{shape:{width:r.width,height:r.height}},e,n),o}function Tp(t,e,n,i){for(var r=[],o=0;o<n.length;o++){var a=n[o],s=t.get(t.mapDimension(a),e);kp(s,i.getAxis(a).type)||r.push(i.dataToPoint(s,a))}return r}function Ap(t,e,n,i,r){var o=Tp(t,n,i,r),a=new vC({shape:{points:o},silent:!0,z2:10});return e.add(a),t.setItemGraphicEl(n,a),a}function Dp(t){var e=t.get("smooth",!0);return!0===e&&(e=zE),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:zE}}function Mp(t,e,n,i){var r=i.lineStyle;e.hasItemOption&&(r=e.getItemModel(n).getModel("lineStyle").getLineStyle());t.useStyle(r);var o=t.style;o.fill=null,o.stroke=e.getItemVisual(n,"color"),o.opacity=e.getItemVisual(n,"opacity"),i.smooth&&(t.shape.smooth=i.smooth)}function kp(t,e){return"category"===e?null==t:null==t||isNaN(t)}function Ip(t,e,n){var i=new yC({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Tr(i,{shape:{width:t.width+20,height:t.height+20}},e,n),i}function Ep(){function u(t,n){if(n>=c.length)return t;for(var e=-1,i=t.length,r=c[n++],o={},a={};++e<i;){var s=r(t[e]),l=a[s];l?l.push(t[e]):a[s]=[t[e]]}return I(a,function(t,e){o[e]=u(t,n)}),o}function o(t,n){if(n>=c.length)return t;var i=[],r=e[n++];return I(t,function(t,e){i.push({key:e,values:o(t,n)})}),r?i.sort(function(t,e){return r(t.key,e.key)}):i}var c=[],e=[];return{key:function(t){return c.push(t),this},sortKeys:function(t){return e[c.length-1]=t,this},entries:function(t){return o(u(t,0),0)}}}function Lp(t,e){return po(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Op(t,e,n,i,r,o,a){Np(t,e,n,r),Fp(t,e,o,i,a),Up(t)}function Pp(t){I(t,function(t){var e=Yp(t.outEdges,Qp),n=Yp(t.inEdges,Qp),i=Math.max(e,n);t.setLayout({value:i},!0)})}function Np(r,o,e,t){for(var a=[],s=[],n=[],l=[],i=0,u=0;u<o.length;u++)a[u]=1;for(u=0;u<r.length;u++)s[u]=r[u].inEdges.length,0===s[u]&&n.push(r[u]);for(;n.length;)I(n,function(t){t.setLayout({x:i},!0),t.setLayout({dx:e},!0),I(t.outEdges,function(t){var e=o.indexOf(t);a[e]=0;var n=t.node2,i=r.indexOf(n);0==--s[i]&&l.push(n)})}),++i,n=l,l=[];for(u=0;u<a.length;u++)if(Hb&&1===a[u])throw new Error("Sankey is a DAG, the original data has cycle!");Rp(r,i),$p(r,(t-e)/(i-1))}function Rp(t,e){I(t,function(t){t.outEdges.length||t.setLayout({x:e-1},!0)})}function $p(t,n){I(t,function(t){var e=t.getLayout().x*n;t.setLayout({x:e},!0)})}function Fp(t,e,n,i,r){var o=Ep().key(function(t){return t.getLayout().x}).sortKeys(Kp).entries(t).map(function(t){return t.values});zp(t,o,e,n,i),jp(o,i,n);for(var a=1;0<r;r--)Hp(o,a*=.99),jp(o,i,n),Vp(o,a),jp(o,i,n)}function zp(t,e,n,r,o){var a=[];I(e,function(t){var e=t.length,n=0;I(t,function(t){n+=t.getLayout().value});var i=(r-(e-1)*o)/n;a.push(i)}),a.sort(function(t,e){return t-e});var i=a[0];I(e,function(t){I(t,function(t,e){t.setLayout({y:e},!0);var n=t.getLayout().value*i;t.setLayout({dy:n},!0)})}),I(n,function(t){var e=+t.getValue()*i;t.setLayout({dy:e},!0)})}function jp(t,s,l){I(t,function(t){var e,n,i,r=0,o=t.length;for(t.sort(Xp),i=0;i<o;i++){if(0<(n=r-(e=t[i]).getLayout().y)){var a=e.getLayout().y+n;e.setLayout({y:a},!0)}r=e.getLayout().y+e.getLayout().dy+s}if(0<(n=r-s-l)){a=e.getLayout().y-n;for(e.setLayout({y:a},!0),r=e.getLayout().y,i=o-2;0<=i;--i)0<(n=(e=t[i]).getLayout().y+e.getLayout().dy+s-r)&&(a=e.getLayout().y-n,e.setLayout({y:a},!0)),r=e.getLayout().y}})}function Hp(t,i){I(t.slice().reverse(),function(t){I(t,function(t){if(t.outEdges.length){var e=Yp(t.outEdges,Bp)/Yp(t.outEdges,Qp),n=t.getLayout().y+(e-Zp(t))*i;t.setLayout({y:n},!0)}})})}function Bp(t){return Zp(t.node2)*t.getValue()}function Vp(t,i){I(t,function(t){I(t,function(t){if(t.inEdges.length){var e=Yp(t.inEdges,Wp)/Yp(t.inEdges,Qp),n=t.getLayout().y+(e-Zp(t))*i;t.setLayout({y:n},!0)}})})}function Wp(t){return Zp(t.node1)*t.getValue()}function Up(t){I(t,function(t){t.outEdges.sort(qp),t.inEdges.sort(Gp)}),I(t,function(t){var e=0,n=0;I(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),I(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}function qp(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function Gp(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function Yp(t,e){for(var n=0,i=t.length,r=-1;++r<i;){var o=+e.call(t,t[r],r);isNaN(o)||(n+=o)}return n}function Zp(t){return t.getLayout().y+t.getLayout().dy/2}function Xp(t,e){return t.getLayout().y-e.getLayout().y}function Kp(t,e){return t-e}function Qp(t){return t.getValue()}function Jp(t,e,n,i,r){var o=t.ends,a=new GE({shape:{points:r?eg(o,i,t):o}});return tg(t,a,e,n,r),a}function tg(t,e,n,i,r){var o=n.hostModel;(0,OC[r?"initProps":"updateProps"])(e,{shape:{points:t.ends}},o,i);var a=n.getItemModel(i),s=a.getModel(UE),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,hr(e,a.getModel(qE).getItemStyle())}function eg(t,e,n){return A(t,function(t){return(t=t.slice())[e]=n.initBaseline,t})}function ng(t){var i=[],r=[];return t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),n=x(r,e);n<0&&(n=r.length,r[n]=e,i[n]={axis:e,seriesModels:[]}),i[n].seriesModels.push(t)}),i}function ig(t){var e,n,i=t.axis,r=t.seriesModels,o=r.length,a=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===i.type)n=i.getBandWidth();else{var u=0;ZE(r,function(t){u=Math.max(u,t.getData().count())}),e=i.getExtent(),Math.abs(e[1]-e[0])}ZE(r,function(t){var e=t.get("boxWidth");E(e)||(e=[e,e]),l.push([Hr(e[0],n)||0,Hr(e[1],n)||0])});var c=.8*n-2,d=c/o*.3,h=(c-d*(o-1))/o,f=h/2-c/2;ZE(r,function(t,e){s.push(f),f+=d+h,a.push(Math.min(Math.max(h,l[e][0]),l[e][1]))})}function rg(t,a,e){function n(t,e,n){var i,r=l.get(e,n),o=[];return o[u]=t,o[c]=r,isNaN(t)||isNaN(r)?i=[NaN,NaN]:(i=s.dataToPoint(o))[u]+=a,i}function i(t,e,n){var i=e.slice(),r=e.slice();i[u]+=o,r[u]-=o,n?t.push(i,r):t.push(r,i)}function r(t,e){var n=e.slice(),i=e.slice();n[u]-=o,i[u]+=o,t.push(n,i)}var s=t.coordinateSystem,l=t.getData(),o=e/2,u="horizontal"===t.get("layout")?0:1,c=1-u,d=["x","y"],h=l.mapDimension(d[u]),f=l.mapDimension(d[c],!0);if(!(null==h||f.length<5))for(var p=0;p<l.count();p++){var g=l.get(h,p),m=n(g,f[2],p),v=n(g,f[0],p),y=n(g,f[1],p),x=n(g,f[3],p),b=n(g,f[4],p),_=[];i(_,y,0),i(_,x,1),_.push(v,y,b,x),r(_,v),r(_,b),r(_,m),l.setItemLayout(p,{initBaseline:m[c],ends:_})}}function og(t,e,n){var i=t.ends;return new tL({shape:{points:n?sg(i,t):i},z2:100})}function ag(t,e,n,i){var r=e.getItemModel(n),o=r.getModel(KE),a=e.getItemVisual(n,"color"),s=e.getItemVisual(n,"borderColor")||a,l=o.getItemStyle(JE);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=a,t.style.stroke=s,t.__simpleBox=i,hr(t,r.getModel(QE).getItemStyle())}function sg(t,e){return A(t,function(t){return(t=t.slice())[1]=e.initBaseline,t})}function lg(t,e,n){var i=t.getData(),r=i.getLayout("largePoints"),o=new eL({shape:{points:r},__sign:1});e.add(o);var a=new eL({shape:{points:r},__sign:-1});e.add(a),ug(1,o,t,i),ug(-1,a,t,i),n&&(o.incremental=!0,a.incremental=!0)}function ug(t,e,n,i){var r=0<t?"P":"N",o=i.getVisual("borderColor"+r)||i.getVisual("color"+r),a=n.getModel(KE).getItemStyle(JE);e.useStyle(a),e.style.fill=null,e.style.stroke=o}function cg(t,e,n,i,r){return i<n?-1:n<i?1:0<e?t.get(r,e-1)<=i?1:-1:1}function dg(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=Hr(R(t.get("barMaxWidth"),r),r),a=Hr(R(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?Hr(s,r):Math.max(Math.min(r/2,o),a)}function hg(t){return E(t)||(t=[+t,+t]),t}function fg(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function pg(t,e){X_.call(this);var n=new Tu(t,e),i=new X_;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(t,e)}function gg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(Hb&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=A(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),c([e,t[0],t[1]])}))}function mg(t,e,n){X_.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}function vg(t,e,n){X_.call(this),this._createPolyline(t,e,n)}function yg(t,e,n){mg.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}function xg(){this.group=new X_}function bg(t){return t instanceof Array||(t=[t,t]),t}function _g(){var t=e_();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function wg(e,i,r){var n=e[1]-e[0],o=(i=A(i,function(t){return{interval:[(t.interval[0]-e[0])/n,(t.interval[1]-e[0])/n]}})).length,a=0;return function(t){for(var e=a;e<o;e++){if((n=i[e].interval)[0]<=t&&t<=n[1]){a=e;break}}if(e===o)for(e=a-1;0<=e;e--){var n;if((n=i[e].interval)[0]<=t&&t<=n[1]){a=e;break}}return 0<=e&&e<o&&r[e]}}function Sg(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}function Cg(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Tg(t,e,n,i){var r=t.getItemLayout(e),o=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),d={dataIndex:e,layout:r,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:a,symbolRepeat:o,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverAnimation:c&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};Ag(n,o,r,i,d),Mg(t,e,r,o,a,d.boundingLength,d.pxSign,u,i,d),kg(n,d.symbolScale,l,i,d);var h=d.symbolSize,f=n.get("symbolOffset");return E(f)&&(f=[Hr(f[0],h[0]),Hr(f[1],h[1])]),Ig(n,h,r,o,a,f,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function Ag(t,e,n,i,r){var o,a=i.valueDim,s=t.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(E(s)){var d=[Dg(l,s[0])-u,Dg(l,s[1])-u];d[1]<d[0]&&d.reverse(),o=d[c]}else o=null!=s?Dg(l,s)-u:e?i.coordSysExtent[a.index][c]-u:n[a.wh];r.boundingLength=o,e&&(r.repeatCutLength=n[a.wh]),r.pxSign=0<o?1:o<0?-1:0}function Dg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Mg(t,e,n,i,r,o,a,s,l,u){var c=l.valueDim,d=l.categoryDim,h=Math.abs(n[d.wh]),f=t.getItemVisual(e,"symbolSize");E(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[d.index]=Hr(f[d.index],h),f[c.index]=Hr(f[c.index],i?h:Math.abs(o)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}function kg(t,e,n,i,r){var o=t.get(TL)||0;o&&(DL.attr({scale:e.slice(),rotation:n}),DL.updateTransform(),o/=DL.getLineScale(),o*=e[i.valueDim.index]),r.valueLineWidth=o}function Ig(t,e,n,i,r,o,a,s,l,u,c,d){var h=c.categoryDim,f=c.valueDim,p=d.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(i){var v=Math.abs(l),y=N(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=Hr(y,e[f.index]);var b=Math.max(g+2*y,0),_=x?0:2*y,w=eo(i),S=w?i:Gg((v+_)/b);b=g+2*(y=(v-S*g)/2/(x?S:S-1)),_=x?0:2*y,w||"fixed"===i||(S=u?Gg((Math.abs(u)+_)/b):0),m=S*b-_,d.repeatTimes=S,d.symbolMargin=y}var C=p*(m/2),T=d.pathPosition=[];T[h.index]=n[h.wh]/2,T[f.index]="start"===a?C:"end"===a?l-C:l/2,o&&(T[0]+=o[0],T[1]+=o[1]);var A=d.bundlePosition=[];A[h.index]=n[h.xy],A[f.index]=n[f.xy];var D=d.barRectShape=O({},n);D[f.wh]=p*Math.max(Math.abs(n[f.wh]),Math.abs(T[f.index]+C)),D[h.wh]=n[h.wh];var M=d.clipShape={};M[h.xy]=-n[h.xy],M[h.wh]=c.ecSize[h.wh],M[f.xy]=0,M[f.wh]=n[f.wh]}function Eg(t){var e=t.symbolPatternSize,n=Ql(t.symbolType,-e/2,-e/2,e,e,t.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function Lg(t,e,r,n){function i(t){var e=c.slice(),n=r.pxSign,i=t;return("start"===r.symbolRepeatDirection?0<n:n<0)&&(i=h-1-t),e[d.index]=p*(i-h/2+.5)+c[d.index],{position:e,scale:r.symbolScale.slice(),rotation:r.rotation}}function o(){Wg(t,function(t){t.trigger("emphasis")})}function a(){Wg(t,function(t){t.trigger("normal")})}var s=t.__pictorialBundle,l=r.symbolSize,u=r.valueLineWidth,c=r.pathPosition,d=e.valueDim,h=r.repeatTimes||0,f=0,p=l[e.valueDim.index]+u+2*r.symbolMargin;for(Wg(t,function(t){t.__pictorialAnimationIndex=f,t.__pictorialRepeatTimes=h,f<h?Ug(t,null,i(f),r,n):Ug(t,null,{scale:[0,0]},r,n,function(){s.remove(t)}),zg(t,r),f++});f<h;f++){var g=Eg(r);g.__pictorialAnimationIndex=f,g.__pictorialRepeatTimes=h,s.add(g);var m=i(f);Ug(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},r,n),g.on("mouseover",o).on("mouseout",a),zg(g,r)}}function Og(t,e,n,i){function r(){this.trigger("emphasis")}function o(){this.trigger("normal")}var a=t.__pictorialBundle,s=t.__pictorialMainPath;s?Ug(s,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(s=t.__pictorialMainPath=Eg(n),a.add(s),Ug(s,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),s.on("mouseover",r).on("mouseout",o)),zg(s,n)}function Pg(t,e,n){var i=O({},e.barRectShape),r=t.__pictorialBarRect;r?Ug(r,null,{shape:i},e,n):(r=t.__pictorialBarRect=new yC({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(r))}function Ng(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=O({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)Cr(r,{shape:o},s,l);else{o[a.wh]=0,r=new yC({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],OC[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function Rg(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=$g,n.isAnimationEnabled=Fg,n}function $g(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Fg(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zg(t,e){t.off("emphasis").off("normal");var n=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:n.slice()},400,"elasticOut")})}function jg(t,e,n,i){var r=new X_,o=new X_;return r.add(o),(r.__pictorialBundle=o).attr("position",n.bundlePosition.slice()),n.symbolRepeat?Lg(r,e,n):Og(r,e,n),Pg(r,n,i),Ng(r,e,n,i),r.__pictorialShapeStr=Vg(t,n),r.__pictorialSymbolMeta=n,r}function Hg(t,e,n){var i=n.animationModel,r=n.dataIndex;Cr(t.__pictorialBundle,{position:n.bundlePosition.slice()},i,r),n.symbolRepeat?Lg(t,e,n,!0):Og(t,e,n,!0),Pg(t,n,!0),Ng(t,e,n,!0)}function Bg(t,e,n,i){var r=i.__pictorialBarRect;r&&(r.style.text=null);var o=[];Wg(i,function(t){o.push(t)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),I(o,function(t){Cr(t,{scale:[0,0]},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function Vg(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Wg(e,n,i){I(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function Ug(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&OC[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function qg(t,e,n){var i=n.color,r=n.dataIndex,o=n.itemModel,a=o.getModel("itemStyle").getItemStyle(["color"]),s=o.getModel("emphasis.itemStyle").getItemStyle(),l=o.getShallow("cursor");Wg(t,function(t){t.setColor(i),t.setStyle(D({fill:i,opacity:n.opacity},a)),hr(t,s),l&&(t.cursor=l),t.z2=n.z2});var u={},c=e.valueDim.posDesc[+(0<n.boundingLength)],d=t.__pictorialBarRect;Ec(d.style,u,o,i,e.seriesModel,r,c),hr(d,u)}function Gg(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function Yg(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}function Zg(i,r){var o=[];return i.eachComponent("singleAxis",function(t,e){var n=new Yg(t,i,r);n.name="single_"+e,n.resize(t,r),t.coordinateSystem=n,o.push(n)}),i.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=e&&e.coordinateSystem}}),o}function Xg(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];var c={horizontal:0,vertical:1};r.rotation=Math.PI/2*c[a];var d={top:-1,bottom:1,right:1,left:-1};r.labelDirection=r.tickDirection=r.nameDirection=d[o],t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),N(e.labelInside,t.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get("axisLabel.rotate")),r.labelRotation="top"===o?-h:h,r.z2=1,r}function Kg(t,e){return e.type||(e.data?"category":"value")}function Qg(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=Jg(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&O(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s,r),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function Jg(s,t){var l=t.axis,u=l.dim,c=s,d=[],h=Number.MAX_VALUE,f=-1;return NL(t.seriesModels,function(e){var t,n,i=e.getData().mapDimension(u,!0);if(e.getAxisTooltipData){var r=e.getAxisTooltipData(i,s,l);n=r.dataIndices,t=r.nestestValue}else{if(!(n=e.getData().indicesOfNearest(i[0],s,"category"===l.type?.5:null)).length)return;t=e.getData().get(i[0],n[0])}if(null!=t&&isFinite(t)){var o=s-t,a=Math.abs(o);a<=h&&((a<h||0<=o&&f<0)&&(h=a,f=o,c=t,d.length=0),NL(n,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:d,snapToValue:c}}function tm(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function em(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=Dc(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function nm(r,t,e){var o=e.axesInfo=[];NL(t,function(t,e){var n=t.axisPointerModel.option,i=r[e];i?(!t.useHandle&&(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(n.status="hide"),"show"===n.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})})}function im(t,e,n,i){if(!sm(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}function rm(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=$L(i)[r]||{},a=$L(i)[r]={};NL(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&NL(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];I(o,function(t,e){!a[e]&&l.push(t)}),I(a,function(t,e){!o[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function om(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function am(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function sm(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function lm(t,e,n){if(!Wb.node){var i=e.getZr();zL(i).records||(zL(i).records={}),um(i,e),(zL(i).records[t]||(zL(i).records[t]={})).handler=n}}function um(r,o){function t(t,i){r.on(t,function(e){var n=fm(o);jL(zL(r).records,function(t){t&&i(t,e,n.dispatchAction)}),cm(n.pendings,o)})}zL(r).initialized||(zL(r).initialized=!0,t("click",y(hm,"click")),t("mousemove",y(hm,"mousemove")),t("globalout",dm))}function cm(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function dm(t,e,n){t.handler("leave",null,n)}function hm(t,e,n,i){e.handler(t,n,i)}function fm(n){var i={showTip:[],hideTip:[]},r=function(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=r,n.dispatchAction(t))};return{dispatchAction:r,pendings:i}}function pm(t,e){if(!Wb.node){var n=e.getZr();(zL(n).records||{})[t]&&(zL(n).records[t]=null)}}function gm(){}function mm(t,e,n,i){vm(BL(n).lastProp,i)||(BL(n).lastProp=i,e?Cr(n,i,t):(n.stopAnimation(),n.attr(i)))}function vm(n,t){if(b(n)&&b(t)){var i=!0;return I(t,function(t,e){i=i&&vm(n[e],t)}),!!i}return n===t}function ym(t,e){t[e.get("label.show")?"show":"hide"]()}function xm(t){return{position:t.position.slice(),rotation:t.rotation||0}}function bm(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function _m(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function wm(t,e,n,i,r){var o=Cm(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),a=n.getModel("label"),s=UC(a.get("padding")||0),l=a.getFont(),u=Se(o,l),c=r.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],f=r.align;"right"===f&&(c[0]-=d),"center"===f&&(c[0]-=d/2);var p=r.verticalAlign;"bottom"===p&&(c[1]-=h),"middle"===p&&(c[1]-=h/2),Sm(c,d,h,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:h,r:a.get("borderRadius")},position:c.slice(),style:{text:o,textFont:l,textFill:a.getTextColor(),textPosition:"inside",fill:g,stroke:a.get("borderColor")||"transparent",lineWidth:a.get("borderWidth")||0,shadowBlur:a.get("shadowBlur"),shadowColor:a.get("shadowColor"),shadowOffsetX:a.get("shadowOffsetX"),shadowOffsetY:a.get("shadowOffsetY")},z2:10}}function Sm(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Cm(t,e,r,n,i){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:i.precision}),a=i.formatter;if(a){var s={value:Yl(e,t),seriesData:[]};I(n,function(t){var e=r.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,i=e&&e.getDataParams(n);i&&s.seriesData.push(i)}),_(a)?o=a.replace("{value}",o):m(a)&&(o=a(s))}return o}function Tm(t,e,n){var i=ft();return yt(i,i,n.rotation),vt(i,i,n.position),Dr([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function Am(t,e,n,i,r,o){var a=jM.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),wm(e,i,r,o,{position:Tm(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function Dm(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function Mm(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function km(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}function Im(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function Em(t){return"x"===t.dim?0:1}function Lm(t){return t.isHorizontal()?0:1}function Om(t,e){var n=t.getRect();return[n[GL[e]],n[GL[e]]+n[YL[e]]]}function Pm(t,e,n){var i=new yC({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Tr(i,{shape:{width:t.width+20,height:t.height+20}},e,n),i}function Nm(n,t,e){if(n.count())for(var i,r=t.coordinateSystem,o=t.getLayerSeries(),a=n.mapDimension("single"),s=n.mapDimension("value"),l=A(o,function(t){return A(t.indices,function(t){var e=r.dataToPoint(n.get(a,t));return e[1]=n.get(s,t),e})}),u=Rm(l),c=u.y0,d=e/u.max,h=o.length,f=o[0].indices.length,p=0;p<f;++p){i=c[p]*d,n.setItemLayout(o[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:i,y:l[0][p][1]*d});for(var g=1;g<h;++g)i+=l[g-1][p][1]*d,n.setItemLayout(o[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:i,y:l[g][p][1]*d})}}function Rm(t){for(var e=t.length,n=t[0].length,i=[],r=[],o=0,a={},s=0;s<n;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];o<u&&(o=u),i.push(u)}for(var c=0;c<n;++c)r[c]=(o-i[c])/2;for(var d=o=0;d<n;++d){var h=i[d]+r[d];o<h&&(o=h)}return a.y0=r,a.max=o,a}function $m(t){var n=0;I(t.children,function(t){$m(t);var e=t.value;E(e)&&(e=e[0]),n+=e});var e=t.value;E(e)&&(e=e[0]),(null==e||isNaN(e))&&(e=n),e<0&&(e=0),E(t.value)?t.value[0]=e:t.value=e}function Fm(t,e,n){function i(){a.ignore=a.hoverIgnore}function r(){a.ignore=a.normalIgnore}X_.call(this);var o=new hC({z2:eO});o.seriesIndex=e.seriesIndex;var a=new lC({z2:nO,silent:t.getModel("label").get("silent")});this.add(o),this.add(a),this.updateData(!0,t,"normal",e,n),this.on("emphasis",i).on("normal",r).on("mouseover",i).on("mouseout",r)}function zm(t,e,n){var i=t.getVisual("color"),r=t.getVisual("visualMeta");r&&0!==r.length||(i=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(i)return i;if(0===t.depth)return n.option.color[0];var a=n.option.color.length;return o=n.option.color[jm(t)%a]}function jm(t){for(var e=t;1<e.depth;)e=e.parentNode;return x(t.getAncestors()[0].children,e)}function Hm(t,e,n){return n!==tO.NONE&&(n===tO.SELF?t===e:n===tO.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function Bm(t,e){var n=t.children||[];t.children=Vm(n,e),n.length&&I(t.children,function(t){Bm(t,e)})}function Vm(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Wm(o,a){return a=a||[0,0],A(["x","y"],function(t,e){var n=this.getAxis(t),i=a[e],r=o[e]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))},this)}function Um(o,a){return a=a||[0,0],A([0,1],function(t){var e=a[t],n=o[t]/2,i=[],r=[];return i[t]=e-n,r[t]=e+n,i[1-t]=r[1-t]=a[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(r)[t])},this)}function qm(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function Gm(s,l){return A(["Radius","Angle"],function(t,e){var n=this["get"+t+"Axis"](),i=l[e],r=s[e]/2,o="dataTo"+t,a="category"===n.type?n.getBandWidth():Math.abs(n[o](i-r)-n[o](i+r));return"Angle"===t&&(a=a*Math.PI/180),a},this)}function Ym(t){var e,n=t.type;if("path"===n){var i=t.shape;(e=Gi(i.pathData,null,{x:i.x||0,y:i.y||0,width:i.width||0,height:i.height||0},"center")).__customPathData=t.pathData}else if("image"===n)(e=new an({})).__customImagePath=t.style.image;else if("text"===n)(e=new lC({})).__customText=t.style.text;else{var r=OC[n.charAt(0).toUpperCase()+n.slice(1)];Hb&&T(r,'graphic type "'+n+'" can not be found.'),e=new r}return e.__customGraphicType=n,e.name=t.name,e}function Zm(e,t,n,i,r,o){var a={},s=n.style||{};if(n.shape&&(a.shape=L(n.shape)),n.position&&(a.position=n.position.slice()),n.scale&&(a.scale=n.scale.slice()),n.origin&&(a.origin=n.origin.slice()),n.rotation&&(a.rotation=n.rotation),"image"===e.type&&n.style){var l=a.style={};I(["x","y","width","height"],function(t){Xm(t,l,s,e.style,o)})}if("text"===e.type&&n.style){l=a.style={};I(["x","y"],function(t){Xm(t,l,s,e.style,o)}),!s.hasOwnProperty("textFill")&&s.fill&&(s.textFill=s.fill),!s.hasOwnProperty("textStroke")&&s.stroke&&(s.textStroke=s.stroke)}if("group"!==e.type&&(e.useStyle(s),o)){e.style.opacity=0;var u=s.opacity;null==u&&(u=1),Tr(e,{style:{opacity:u}},i,t)}o?e.attr(a):Cr(e,a,i,t),e.attr({z2:n.z2||0,silent:n.silent}),!1!==n.styleEmphasis&&hr(e,n.styleEmphasis)}function Xm(t,e,n,i,r){null==n[t]||r||(e[t]=n[t],n[t]=i[t])}function Km(r,o,e,n){function a(t){null==t&&(t=g),w&&(m=o.getItemModel(t),v=m.getModel(dO),y=m.getModel(hO),x=o.getItemVisual(t,"color"),w=!1)}function t(t,e){return null==e&&(e=g),o.get(o.getDimension(t||0),e)}function i(t,e){null==e&&(e=g),a(e);var n=m.getModel(uO).getItemStyle();null!=x&&(n.fill=x);var i=o.getItemVisual(e,"opacity");return null!=i&&(n.opacity=i),pr(n,v,null,{autoColor:x,isRectText:!0}),n.text=v.getShallow("show")?R(r.getFormattedLabel(e,"normal"),Cu(o,e)):null,t&&O(n,t),n}function s(t,e){null==e&&(e=g),a(e);var n=m.getModel(cO).getItemStyle();return pr(n,y,null,{isRectText:!0},!0),n.text=y.getShallow("show")?$(r.getFormattedLabel(e,"emphasis"),r.getFormattedLabel(e,"normal"),Cu(o,e)):null,t&&O(n,t),n}function l(t,e){return null==e&&(e=g),o.getItemVisual(e,t)}function u(t){if(f.getBaseAxis)return Ll(D({axis:f.getBaseAxis()},t),n)}function c(){return e.getCurrentSeriesIndices()}function d(t){return wr(t,e)}var h=r.get("renderItem"),f=r.coordinateSystem,p={};f&&(Hb&&(T(h,"series.render is required."),T(f.prepareCustoms||pO[f.type],"This coordSys does not support custom series.")),p=f.prepareCustoms?f.prepareCustoms():pO[f.type](f));var g,m,v,y,x,b=D({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:t,style:i,styleEmphasis:s,visual:l,barLayout:u,currentSeriesIndices:c,font:d},p.api||{}),_={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:p.coordSys,dataInsideLength:o.count(),encode:Qm(r.getData())},w=!0;return function(t){return g=t,w=!0,h&&h(D({dataIndexInside:t,dataIndex:o.getRawIndex(t)},_),b)||{}}}function Qm(r){var o={};return I(r.dimensions,function(t,e){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var i=n.coordDim;(o[i]=o[i]||[])[n.coordDimIndex]=e}}),o}function Jm(t,e,n,i,r,o){return(t=tv(t,e,n,i,r,o))&&o.setItemGraphicEl(e,t),t}function tv(t,e,n,i,r,o){var a=n.type;if(!t||a===t.__customGraphicType||"path"===a&&n.pathData===t.__customPathData||"image"===a&&n.style.image===t.__customImagePath||"text"===a&&n.style.text===t.__customText||(r.remove(t),t=null),null!=a){var s=!t;if(!t&&(t=Ym(n)),Zm(t,e,n,i,o,s),"group"===a){var l=t.children()||[],u=n.children||[];if(n.diffChildrenByName)ev({oldChildren:l,newChildren:u,dataIndex:e,animatableModel:i,group:t,data:o});else{for(var c=0;c<u.length;c++)tv(t.childAt(c),e,u[c],i,t,o);for(;c<l.length;c++)l[c]&&t.remove(l[c])}}return r.add(t),t}}function ev(t){new Ys(t.oldChildren,t.newChildren,nv,nv,t).add(iv).update(iv).remove(rv).execute()}function nv(t,e){var n=t&&t.name;return null!=n?n:fO+e}function iv(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null;tv(null!=e?n.oldChildren[e]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function rv(t){var e=this.context,n=e.oldChildren[t];n&&e.group.remove(n)}function ov(t,e,n,i){var r=n.type;Hb&&T(r,"graphic type MUST be set");var o=OC[r.charAt(0).toUpperCase()+r.slice(1)];Hb&&T(o,"graphic type can not be found");var a=new o(n);e.add(a),i.set(t,a),a.__ecGraphicId=t}function av(t,e){
|
|
var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){av(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function sv(e){return e=O({},e),I(["id","parentId","$action","hv","bounding"].concat(tT),function(t){delete e[t]}),e}function lv(e,t){var n;return I(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}function uv(t,e){var n=t.exist;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}function cv(t,e,n){var i=O({},n),r=t[e],o=n.$action||"merge";if("merge"===o)if(r){if(Hb){var a=n.type;T(!a||r.type===a,'Please set $action: "replace" to change `type`')}g(r,i,!0),vo(r,i,{ignoreSize:!0}),xo(n,r)}else t[e]=i;else"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}function dv(t,e){t&&(t.hv=e.hv=[lv(e,["left","right"]),lv(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function hv(t,e,n){var r,o={},a="toggleSelected"===t;return n.eachComponent("legend",function(i){a&&null!=r?i[r?"select":"unSelect"](e.name):(i[t](e.name),r=i.isSelected(e.name)),I(i.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);o.hasOwnProperty(e)?o[e]=o[e]&&n:o[e]=n}})}),{name:e.name,selected:o}}function fv(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=po(i,o,r);nT(e.get("orient"),t,e.get("itemGap"),a.width,a.height),go(t,i,o,r)}function pv(t,e){var n=UC(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new yC({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}function gv(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function mv(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t.name,name:e,excludeSeriesId:i})}function vv(t,e,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t.name,name:e,excludeSeriesId:i})}function yv(t,e,n){var i=[1,1];i[t.getOrient().index]=0,vo(e,n,{type:"box",ignoreSize:i})}function xv(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return A(MO,function(t){return t+"transition:"+n}).join(";")}function bv(n){var i=[],t=n.get("fontSize"),e=n.getTextColor();return e&&i.push("color:"+e),i.push("font:"+n.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px"),AO(["decoration","align"],function(t){var e=n.get(t);e&&i.push("text-"+t+":"+e)}),i.join(";")}function _v(r){var o=[],t=r.get("transitionDuration"),e=r.get("backgroundColor"),n=r.getModel("textStyle"),i=r.get("padding");return t&&o.push(xv(t)),e&&(Wb.canvasSupported?o.push("background-Color:"+e):(o.push("background-Color:#"+Ft(e)),o.push("filter:alpha(opacity=70)"))),AO(["width","color","radius"],function(t){var e="border-"+t,n=DO(e),i=r.get(n);null!=i&&o.push(e+":"+i+("color"===t?"":"px"))}),o.push(bv(n)),null!=i&&o.push("padding:"+UC(i).join("px ")+"px"),o.join(";")+";"}function wv(n,t){if(Wb.wxa)return null;var e=document.createElement("div"),i=this._zr=t.getZr();this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,n.appendChild(e),this._container=n,this._show=!1,this._hideTimeout;var r=this;e.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},e.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=i.handler;mn(n,t,!0),e.dispatch("mousemove",t)}},e.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function Sv(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Or.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Or(n,e,e.ecModel))}return e}function Cv(t,e){return t.dispatchAction||v(e.dispatchAction,e)}function Tv(t,e,n,i,r,o,a){var s=Dv(n),l=s.width,u=s.height;return null!=o&&(i<t+l+o?t-=l+o:t+=o),null!=a&&(r<e+u+a?e-=u+a:e+=a),[t,e]}function Av(t,e,n,i,r){var o=Dv(n),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,[t=Math.max(t,0),e=Math.max(e,0)]}function Dv(t){var e=t.clientWidth,n=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(t);i&&(e+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),n+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:n}}function Mv(t,e,n){var i=n[0],r=n[1],o=5,a=0,s=0,l=e.width,u=e.height;switch(t){case"inside":a=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":a=e.x+l/2-i/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-i/2,s=e.y+u+o;break;case"left":a=e.x-i-o,s=e.y+u/2-r/2;break;case"right":a=e.x+l+o,s=e.y+u/2-r/2}return[a,s]}function kv(t){return"center"===t||"middle"===t}function Iv(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Ev(t){return t.dim}function Lv(t,e,n){var L=n.getWidth(),O=n.getHeight(),P={},N=Ov(f(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=Iv(t),o=N[Ev(i)][r],a=o.offset,s=o.width,l=n.getOtherAxis(i),u=t.get("center")||["50%","50%"],c=Hr(u[0],L),d=Hr(u[1],O),h=t.get("barMinHeight")||0,f=t.get("barMinAngle")||0;P[r]=P[r]||[];for(var p=e.mapDimension(l.dim),g=e.mapDimension(i.dim),m=ml(e,p),v=l.getExtent()[0],y=0,x=e.count();y<x;y++){var b=e.get(p,y),_=e.get(g,y);if(!isNaN(b)){var w,S,C,T,A=0<=b?"p":"n",D=v;if(m&&(P[r][_]||(P[r][_]={p:v,n:v}),D=P[r][_][A]),"radius"===l.dim){var M=l.dataToRadius(b)-v,k=i.dataToAngle(_);Math.abs(M)<h&&(M=(M<0?-1:1)*h),S=(w=D)+M,T=(C=k-a)-s,m&&(P[r][_][A]=S)}else{var I=l.dataToAngle(b,!0)-v,E=i.dataToRadius(_);Math.abs(I)<f&&(I=(I<0?-1:1)*f),S=(w=E+a)+s,T=(C=D)+I,m&&(P[r][_][A]=T)}e.setItemLayout(y,{cx:c,cy:d,r0:w,r:S,startAngle:-C*Math.PI/180,endAngle:-T*Math.PI/180})}}}},this)}function Ov(t){var h={};I(t,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),r="category"===n.type?n.getBandWidth():Math.abs(i[1]-i[0])/e.count(),o=h[Ev(n)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;h[Ev(n)]=o;var s=Iv(t);a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=Hr(t.get("barWidth"),r),u=Hr(t.get("barMaxWidth"),r),c=t.get("barGap"),d=t.get("barCategoryGap");l&&!a[s].width&&(l=Math.min(o.remainedWidth,l),a[s].width=l,o.remainedWidth-=l),u&&(a[s].maxWidth=u),null!=c&&(o.gap=c),null!=d&&(o.categoryGap=d)});var f={};return I(h,function(t,n){f[n]={};var e=t.stacks,i=t.bandWidth,r=Hr(t.categoryGap,i),o=Hr(t.gap,1),a=t.remainedWidth,s=t.autoWidthCount,l=(a-r)/(s+(s-1)*o);l=Math.max(l,0),I(e,function(t){var e=t.maxWidth;e&&e<l&&(e=Math.min(e,a),t.width&&(e=Math.min(e,t.width)),a-=e,t.width=e,s--)}),l=(a-r)/(s+(s-1)*o),l=Math.max(l,0);var u,c=0;I(e,function(t){t.width||(t.width=l),c+=(u=t).width*(1+o)}),u&&(c-=u.width*o);var d=-c/2;I(e,function(t,e){f[n][e]=f[n][e]||{offset:d,width:t.width},d+=t.width*(1+o)})}),f}function Pv(t,e){rM.call(this,"radius",t,e),this.type="category"}function Nv(t,e){e=e||[0,360],rM.call(this,"angle",t,e),this.type="category"}function Rv(t,e){return e.type||(e.data?"category":"value")}function $v(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=Hr(i[0],r),t.cy=Hr(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=Hr(e.get("radius"),s);a.inverse?a.setExtent(l,0):a.setExtent(0,l)}function Fv(t){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(Infinity,-Infinity),r.scale.setExtent(Infinity,-Infinity),t.eachSeries(function(t){if(t.coordinateSystem===n){var e=t.getData();I(e.mapDimension("radius",!0),function(t){r.scale.unionExtentFromData(e,vl(e,t))}),I(e.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(e,vl(e,t))})}}),Wl(i.scale,i.model),Wl(r.scale,r.model),"category"===i.type&&!i.onBand){var e=i.getExtent(),o=360/i.scale.count();i.inverse?e[1]+=o:e[1]-=o,i.setExtent(e[0],e[1])}}function zv(t,e){if(t.type=e.get("type"),t.scale=Ul(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}(e.axis=t).model=e}function jv(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function Hv(t){return t.getRadiusAxis().inverse?0:1}function Bv(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}function Vv(t,e,n){return{position:[t.cx,t.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Wv(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=i.getRadiusAxis().getExtent();if("radius"===o.dim){var h=ft();yt(h,h,s),vt(h,h,[i.cx,i.cy]),l=Dr([a,-r],h);var f=e.getModel("axisLabel").get("rotate")||0,p=jM.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,c=p.textVerticalAlign}else{var g=d[1];l=i.coordToPoint([g+r,a]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}function Uv(i,t){t.update="updateView",Os(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),I(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}function qv(n){var e={};I(n,function(t){e[t]=1}),n.length=0,I(e,function(t,e){n.push(e)})}function Gv(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Yv(t,e,o){function n(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return UO(e,function(i){var r=a[i]=n();UO(t[i],function(t,e){if(fI.isValidType(e)){var n={type:e,visual:t};o&&o(n,i),r[e]=new fI(n),"opacity"===e&&((n=L(n)).type="colorAlpha",r.__hidden.__alphaForOpacity=new fI(n))}})}),a}function Zv(e,n,t){var i;I(t,function(t){n.hasOwnProperty(t)&&Gv(n[t])&&(i=!0)}),i&&I(t,function(t){n.hasOwnProperty(t)&&Gv(n[t])?e[t]=L(n[t]):delete e[t]})}function Xv(t,u,c,d,h,f){function p(t){return c.getItemVisual(m,t)}function g(t,e){c.setItemVisual(m,t,e)}function e(t,e){m=null==f?t:e;var n=c.getRawDataItem(m);if(!n||!1!==n.visualMap)for(var i=d.call(h,t),r=u[i],o=v[i],a=0,s=o.length;a<s;a++){var l=o[a];r[l]&&r[l].applyVisual(t,p,g)}}var m,v={};I(t,function(t){var e=fI.prepareVisualTypes(u[t]);v[t]=e}),null==f?c.each(e):c.each([f],e)}function Kv(t,f,p,g){function e(t,n){function e(t){return n.getItemVisual(r,t)}function i(t,e){n.setItemVisual(r,t,e)}var r;for(null!=g&&(g=n.getDimension(g));null!=(r=t.next());){var o=n.getRawDataItem(r);if(o&&!1===o.visualMap)return;for(var a=null!=g?n.get(g,r,!0):r,s=p(a),l=f[s],u=m[s],c=0,d=u.length;c<d;c++){var h=u[c];l[h]&&l[h].applyVisual(a,e,i)}}}var m={};return I(t,function(t){var e=fI.prepareVisualTypes(f[t]);m[t]=e}),{progress:e}}function Qv(o){var a=["x","y"],s=["width","height"];return{point:function(t,e,n){if(t){var i=n.range;return Jv(t[o],i)}},rect:function(t,e,n){if(t){var i=n.range,r=[t[a[o]],t[a[o]]+t[s[o]]];return r[1]<r[0]&&r.reverse(),Jv(r[0],i)||Jv(r[1],i)||Jv(i[0],r)||Jv(i[1],r)}}}}function Jv(t,e){return e[0]<=t&&t<=e[1]}function ty(t,e,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(ey(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function ey(t,e,n,i,r,o,a,s){var l=iy(n-t,r-a,i-e,o-s);if(ny(l))return!1;var u=iy(r-t,r-a,o-e,o-s)/l;if(u<0||1<u)return!1;var c=iy(n-t,r-t,i-e,o-e)/l;return!(c<0||1<c)}function ny(t){return t<=1e-6&&-1e-6<=t}function iy(t,e,n,i){return t*i-e*n}function ry(t,e,n){var i=this._targetInfoList=[],r={},o=ay(e,t);GO(JO,function(t,e){(!n||!n.include||0<=YO(n.include,e))&&t(o,i,r)})}function oy(t){return t[0]>t[1]&&t.reverse(),t}function ay(t,e){return Wn(t,e,{includeMainTypes:KO})}function sy(t,e,n,i){Hb&&T("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var r=n.getAxis(["x","y"][t]),o=oy(A([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}function ly(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function uy(t,e){var n=cy(t),i=cy(e),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function cy(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function dy(t,e,n,i,r){if(r){var o=t.getZr();if(!o[aP])o[oP]||(o[oP]=hy),Fa(o,oP,n,e)(t,i)}}function hy(t,e){if(!t.isDisposed()){var n=t.getZr();n[aP]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[aP]=!1}}function fy(t,e,n,i){for(var r=0,o=e.length;r<o;r++){var a=e[r];if(t[a.brushType](i,n,a.selectors,a))return!0}}function py(t){var a=t.brushSelector;if(_(a)){var e=[];return I(qO,function(o,t){e[t]=function(t,e,n,i){var r=e.getItemLayout(t);return o[a](r,n,i)}}),e}if(m(a)){var n={};return I(qO,function(t,e){n[e]=a}),n}return a}function gy(t,e){var n=t.option.seriesIndex;return null!=n&&"all"!==n&&(E(n)?x(n,e)<0:e!==n)}function my(n){var i=n.selectors={};return I(qO[n.brushType],function(e,t){i[t]=function(t){return e(t,i,n)}}),n}function vy(t){return new ie(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function yy(t,e){return g({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Or(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function xy(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function by(t,e){cP[t]=e}function _y(t){return cP[t]}function wy(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}function Sy(t){this._model=t}function Cy(t,e,n,i){var r=n.calendarModel,o=n.seriesModel,a=r?r.coordinateSystem:o?o.coordinateSystem:null;return a===this?a[t](i):null}function Ty(t,e){var n=t.cellSize;E(n)?1===n.length&&(n[1]=n[0]):n=t.cellSize=[n,n];var i=A([0,1],function(t){return mo(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]});vo(t,e,{type:"box",ignoreSize:i})}function Ay(t){return 0<=x(vP,t)}function Dy(t,a){var s=A(t=t.slice(),co),l=A(a=(a||[]).slice(),co);return function(r,o){I(t,function(t,e){for(var n={name:t,capital:s[e]},i=0;i<a.length;i++)n[a[i]]=t+l[i];r.call(o,n)})}}function My(r,o,a){function s(t,e){return 0<=x(e.nodes,t)}function l(t,n){var i=!1;return o(function(e){I(a(t,e)||[],function(t){n.records[e.name][t]&&(i=!0)})}),i}function u(t,n){n.nodes.push(t),o(function(e){I(a(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(t){function e(t){!s(t,i)&&l(t,i)&&(u(t,i),n=!0)}var n,i={nodes:[],records:{}};if(o(function(t){i.records[t.name]={}}),!t)return i;for(u(t,i);n=!1,r(e),n;);return i}}function ky(t,e,n){var i=[Infinity,-Infinity];return xP(n,function(t){var n=t.getData();n&&xP(n.mapDimension(e,!0),function(t){var e=n.getApproximateExtent(t);e[0]<i[0]&&(i[0]=e[0]),e[1]>i[1]&&(i[1]=e[1])})}),i[1]<i[0]&&(i=[NaN,NaN]),Iy(t,i),i}function Iy(t,e){var n=t.getAxisModel(),i=n.getMin(!0),r="category"===n.get("type"),o=r&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?e[0]=i:r&&(e[0]=0<o?0:NaN);var a=n.getMax(!0);return null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=0<o?o-1:NaN),n.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Ey(t,e){var n=t.getAxisModel(),i=t._percentWindow,r=t._valueWindow;if(i){var o=qr(r,[0,500]);o=Math.min(o,20);var a=e||0===i[0]&&100===i[1];n.setRange(a?null:+r[0].toFixed(o),a?null:+r[1].toFixed(o))}}function Ly(i){var r=i._minMaxSpan={},o=i._dataZoomModel;xP(["min","max"],function(t){r[t+"Span"]=o.get(t+"Span");var e=o.get(t+"ValueSpan");if(null!=e&&(r[t+"ValueSpan"]=e,null!=(e=i.getAxisModel().axis.scale.parse(e)))){var n=i._dataExtent;r[t+"Span"]=jr(n[0]+e,n,[0,100],!0)}})}function Oy(e){var n={};return wP(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function Py(t,r){var o=t._rangePropMode,a=t.get("rangeMode");wP([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=r[t[0]],i=null!=r[t[1]];n&&!i?o[e]="percent":!n&&i?o[e]="value":a?o[e]=a[e]:n&&(o[e]="percent")})}function Ny(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function Ry(t){return"vertical"===t?"ns-resize":"ew-resize"}function $y(t,n){var e=jy(t),i=n.dataZoomId,r=n.coordId;I(e,function(t){var e=t.dataZoomInfos;e[i]&&x(n.allCoordIds,r)<0&&(delete e[i],t.count--)}),By(e);var o=e[r];o||((o=e[r]={coordId:r,dataZoomInfos:{},count:0}).controller=Hy(t,o),o.dispatchAction=y(qy,t)),!o.dataZoomInfos[i]&&o.count++,o.dataZoomInfos[i]=n;var a=Gy(o.dataZoomInfos);o.controller.enable(a.controlType,a.opt),o.controller.setPointerChecker(n.containsPoint),Fa(o,"dispatchAction",n.throttleRate,"fixRate")}function Fy(t,n){var e=jy(t);I(e,function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)}),By(e)}function zy(t){return t.type+"\0_"+t.id}function jy(t){var e=t.getZr();return e[jP]||(e[jP]={})}function Hy(t,e){var n=new ad(t.getZr());return n.on("pan",zP(Vy,e)),n.on("zoom",zP(Wy,e)),n}function By(n){I(n,function(t,e){t.count||(t.controller.dispose(),delete n[e])})}function Vy(e,n,i,r,o,a,s){Uy(e,function(t){return t.panGetRange(e.controller,n,i,r,o,a,s)})}function Wy(e,n,i,r){Uy(e,function(t){return t.zoomGetRange(e.controller,n,i,r)})}function Uy(t,n){var i=[];I(t.dataZoomInfos,function(t){var e=n(t);!t.disabled&&e&&i.push({dataZoomId:t.dataZoomId,start:e[0],end:e[1]})}),i.length&&t.dispatchAction(i)}function qy(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Gy(t){var n,i={},r="type_",o={type_true:2,type_move:1,type_false:0,type_undefined:-1};return I(t,function(t){var e=!t.disabled&&(!t.zoomLock||"move");o[r+e]>o[r+n]&&(n=e),O(i,t.roamControllerOpt)}),{controlType:n,opt:i}}function Yy(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Zy(t,e,n,i){function r(t){return l[t]}function o(t,e){l[t]=e}for(var a=e.targetVisuals[i],s=fI.prepareVisualTypes(a),l={color:t.getData().getVisual("color")},u=0,c=s.length;u<c;u++){var d=s[u],h=a["opacity"===d?"__alphaForOpacity":d];h&&h.applyVisual(n,r,o)}return l.color}function Xy(t,e,n){if(n[0]===n[1])return n.slice();for(var i=200,r=(n[1]-n[0])/i,o=n[0],a=[],s=0;s<=i&&o<n[1];s++)a.push(o),o+=r;return a.push(n[1]),a}function Ky(t,e,n){var i=t.option,r=i.align;if(null!=r&&"auto"!==r)return r;for(var o={width:e.getWidth(),height:e.getHeight()},a="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[a],u=[0,null,10],c={},d=0;d<3;d++)c[s[1-a][d]]=u[d],c[l[d]]=2===d?n[0]:i[l[d]];var h=[["x","width",3],["y","height",0]][a],f=po(c,o,i.padding);return l[(f.margin[h[2]]||0)+f[h[0]]+.5*f[h[1]]<.5*o[h[1]]?0:1]}function Qy(t){return I(t||[],function(){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)}),t}function Jy(t,e,n,i){return new mC({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Iw(t.event)},ondragend:i})}function tx(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function ex(t,e,n,i){return t?[[0,-sN(e,lN(n,0))],[cN,0],[0,sN(e,lN(i-n,0))]]:[[0,0],[5,-5],[5,5]]}function nx(t,e,n){var i=uN/2,r=t.get("hoverLinkDataSize");return r&&(i=oN(r,e,n,!0)/2),i}function ix(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function rx(t){return"vertical"===t?"ns-resize":"ew-resize"}function ox(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}function ax(t){Pn(t,"label",["show"])}function sx(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function lx(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function ux(t,e,n,i,r,o){var a=[],s=ml(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=gx(e,s,t),u=e.indicesOfNearest(s,l)[0];a[r]=e.get(n,u),a[o]=e.get(i,u);var c=Wr(e.get(i,u));return 0<=(c=Math.min(c,20))&&(a[o]=+a[o].toFixed(c)),a}function cx(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!lx(e)&&!E(e.coord)&&i){var r=i.dimensions,o=dx(e,n,i,t);if((e=L(e)).type&&xN[e.type]&&o.baseAxis&&o.valueAxis){var a=vN(r,o.baseAxis.dim),s=vN(r,o.valueAxis.dim);e.coord=xN[e.type](n,o.baseDataDim,o.valueDataDim,a,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;u<2;u++)xN[l[u]]&&(l[u]=gx(n,n.mapDimension(r[u]),l[u]));e.coord=l}}return e}function dx(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(hx(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function hx(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r<i.length;r++){var o=n.getDimensionInfo(i[r]);if(o.name===e)return o.coordDim}}function fx(t,e){return!(t&&t.containData&&e.coord&&!sx(e))||t.containData(e.coord)}function px(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function gx(t,e,n){if("average"!==n)return"median"===n?t.getMedian(e):t.getDataExtent(e,!0)["max"===n?1:0];var i=0,r=0;return t.each(e,function(t){isNaN(t)||(i+=t,r++)}),i/r}function mx(s,l,u){var c=l.coordinateSystem;s.each(function(t){var e,n=s.getItemModel(t),i=Hr(n.get("x"),u.getWidth()),r=Hr(n.get("y"),u.getHeight());if(isNaN(i)||isNaN(r)){if(l.getMarkerPosition)e=l.getMarkerPosition(s.getValues(s.dimensions,t));else if(c){var o=s.get(c.dimensions[0],t),a=s.get(c.dimensions[1],t);e=c.dataToPoint([o,a])}}else e=[i,r];isNaN(i)||(e[0]=i),isNaN(r)||(e[1]=r),s.setItemLayout(t,e)})}function vx(t,e,n){var i;i=t?A(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new dD(i,n),o=A(n.get("data"),y(cx,e));return t&&(o=f(o,y(fx,t))),r.initData(o,null,t?px:function(t){return t.value}),r}function yx(t){return!isNaN(t)&&!isFinite(t)}function xx(t,e,n,i){var r=1-t,o=i.dimensions[t];return yx(e[r])&&yx(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function bx(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(xx(1,n,i,t)||xx(0,n,i,t)))return!0}return fx(t,e[0])&&fx(t,e[1])}function _x(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Hr(s.get("x"),r.getWidth()),u=Hr(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,d=t.get(c[0],e),h=t.get(c[1],e);o=a.dataToPoint([d,h])}if("cartesian2d"===a.type){var f=a.getAxis("x"),p=a.getAxis("y");c=a.dimensions;yx(t.get(c[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):yx(t.get(c[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}function Sx(t,e,n){var i;i=t?A(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new dD(i,n),o=new dD(i,n),a=new dD([],n),s=A(n.get("data"),y(_N,e,t,n));t&&(s=f(s,y(bx,t)));var l=t?px:function(t){return t.value};return r.initData(A(s,function(t){return t[0]}),null,l),o.initData(A(s,function(t){return t[1]}),null,l),a.initData(A(s,function(t){return t[2]})),a.hasItemOption=!0,{from:r,to:o,line:a}}function Cx(t){return!isNaN(t)&&!isFinite(t)}function Tx(t,e,n){var i=1-t;return Cx(e[i])&&Cx(n[i])}function Ax(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!Tx(1,n,i,t)&&!Tx(0,n,i,t))||(fx(t,{coord:n,x:e.x0,y:e.y0})||fx(t,{coord:i,x:e.x1,y:e.y1}))}function Dx(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Hr(s.get(n[0]),r.getWidth()),u=Hr(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var c=[f=t.get(n[0],e),p=t.get(n[1],e)];a.clampData&&a.clampData(c,c),o=a.dataToPoint(c,!0)}if("cartesian2d"===a.type){var d=a.getAxis("x"),h=a.getAxis("y"),f=t.get(n[0],e),p=t.get(n[1],e);Cx(f)?o[0]=d.toGlobalCoord(d.getExtent()["x0"===n[0]?0:1]):Cx(p)&&(o[1]=h.toGlobalCoord(h.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}function Mx(t,n,e){var i,r,o=["x0","y0","x1","y1"];t?(i=A(t&&t.dimensions,function(t){var e=n.getData();return D({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),r=new dD(A(o,function(t,e){return{name:t,type:i[e%2].type}}),e)):r=new dD(i=[{name:"value",type:"float"}],e);var a=A(e.get("data"),y(wN,n,t,e));t&&(a=f(a,y(Ax,t)));var s=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return r.initData(a,null,s),r.hasItemOption=!0,r}function kx(t){var e=t.type,n={number:"value",time:"time"};if(n[e]&&(t.axisType=n[e],delete t.type),Ix(t),Ex(t,"controlPosition")){var i=t.controlStyle||(t.controlStyle={});Ex(i,"position")||(i.position=t.controlPosition),"none"!==i.position||Ex(i,"show")||(i.show=!1,delete i.position),delete t.controlPosition}I(t.data||[],function(t){b(t)&&!E(t)&&(!Ex(t,"value")&&Ex(t,"name")&&(t.value=t.name),Ix(t))})}function Ix(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},r=i.normal||(i.normal={}),o={normal:1,emphasis:1};I(i,function(t,e){o[e]||Ex(r,e)||(r[e]=t)}),n.label&&!Ex(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function Ex(t,e){return t.hasOwnProperty(e)}function Lx(t,e){return po(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function Ox(t,e,n,i){return Gi(t.get(e).replace(/^path:\/\//,""),L(i||{}),new ie(n[0],n[1],n[2],n[3]),"center")}function Px(t,e,n,i,r,o){var a=e.get("color");r?(r.setColor(a),n.add(r),o&&o.onUpdate(r)):((r=Ql(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(r),o&&o.onCreate(r));var s=e.getItemStyle(["color","symbol","symbolSize"]);r.setStyle(s),i=g({rectHover:!0,z2:100},i,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,i.scale=l;var u=t.get("symbolOffset");if(u){var c=i.position=i.position||[0,0];c[0]+=Hr(u[0],l[0]),c[1]+=Hr(u[1],l[1])}var d=t.get("symbolRotate");return i.rotation=(d||0)*Math.PI/180||0,r.attr(i),r.updateTransform(),r}function Nx(t,e,n,i,r){if(!t.dragging){var o=i.getModel("checkpointStyle"),a=n.dataToCoord(i.getData().get(["value"],e));r||!o.get("animation",!0)?t.attr({position:[a,0]}):(t.stopAnimation(!0),t.animateTo({position:[a,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}function Rx(t){return 0===t.indexOf("my")}function $x(t){this.model=t}function Fx(t){this.model=t}function zx(t){var r={},o=[],a=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)o.push(t);else{var n=e.getBaseAxis();if("category"===n.type){var i=n.dim+"_"+n.index;r[i]||(r[i]={categoryAxis:n,valueAxis:e.getOtherAxis(n),series:[]},a.push({axisDim:n.dim,axisIndex:n.index})),r[i].series.push(t)}else o.push(t)}}),{seriesGroupByCategoryAxis:r,other:o,meta:a}}function jx(t){var u=[];return I(t,function(t){var e=t.categoryAxis,n=t.valueAxis.dim,i=[" "].concat(A(t.series,function(t){return t.name})),r=[e.model.getCategories()];I(t.series,function(t){r.push(t.getRawData().mapArray(n,function(t){return t}))});for(var o=[i.join(zN)],a=0;a<r[0].length;a++){for(var s=[],l=0;l<r.length;l++)s.push(r[l][a]);o.push(s.join(zN))}u.push(o.join("\n"))}),u.join("\n\n"+FN+"\n\n")}function Hx(t){return A(t,function(t){var r=t.getRawData(),o=[t.name],a=[];return r.each(r.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],n=r.getName(e),i=0;i<t-1;i++)a[i]=arguments[i];o.push((n?n+zN:"")+a.join(zN))}),o.join("\n")}).join("\n\n"+FN+"\n\n")}function Bx(t){var e=zx(t);return{value:f([jx(e.seriesGroupByCategoryAxis),Hx(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+FN+"\n\n"),meta:e.meta}}function Vx(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Wx(t){if(0<=t.slice(0,t.indexOf("\n")).indexOf(zN))return!0}function Ux(t){for(var e=t.split(/\n+/g),n=[],i=A(Vx(e.shift()).split(jN),function(t){return{name:t,data:[]}}),r=0;r<e.length;r++){var o=Vx(e[r]).split(jN);n.push(o.shift());for(var a=0;a<o.length;a++)i[a]&&(i[a].data[r]=o[a])}return{series:i,categories:n}}function qx(t){for(var e=t.split(/\n+/g),n=Vx(e.shift()),i=[],r=0;r<e.length;r++){var o,a=Vx(e[r]).split(jN),s="",l=!1;isNaN(a[0])?(l=!0,s=a[0],a=a.slice(1),i[r]={name:s,value:[]},o=i[r].value):o=i[r]=[];for(var u=0;u<a.length;u++)o.push(+a[u]);1===o.length&&(l?i[r].value=o[0]:i[r]=o[0])}return{name:n,data:i}}function Gx(t,o){var e=t.split(new RegExp("\n*"+FN+"\n*","g")),a={series:[]};return I(e,function(t,e){if(Wx(t)){var n=Ux(t),i=o[e],r=i.axisDim+"Axis";i&&(a[r]=a[r]||[],a[r][i.axisIndex]={data:n.categories},a.series=a.series.concat(n.series))}else{n=qx(t);a.series.push(n)}}),a}function Yx(t){this._dom=null,this.model=t}function Zx(t,i){return A(t,function(t,e){var n=i&&i[e];return b(n)&&!E(n)?(b(t)&&!E(t)&&(t=t.value),D({value:t},n)):t})}function Xx(o,t){var a=tb(o);HN(t,function(t,e){for(var n=a.length-1;0<=n;n--){if(a[n][e])break}if(n<0){var i=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(i){var r=i.getPercentRange();a[0][e]={dataZoomId:e,start:r[0],end:r[1]}}}}),a.push(t)}function Kx(t){var i=tb(t),e=i[i.length-1];1<i.length&&i.pop();var r={};return HN(e,function(t,e){for(var n=i.length-1;0<=n;n--){if(t=i[n][e]){r[e]=t;break}}}),r}function Qx(t){t[BN]=null}function Jx(t){return tb(t).length}function tb(t){var e=t[BN];return e||(e=t[BN]=[{}]),e}function eb(t,e,n){(this._brushController=new Of(n.getZr())).on("brush",v(this._onBrush,this)).mount(),this._isZoomActive}function nb(e){var n={};return I(["xAxisIndex","yAxisIndex"],function(t){n[t]=e[t],null==n[t]&&(n[t]="all"),(!1===n[t]||"none"===n[t])&&(n[t]=[])}),n}function ib(t,e){t.setIconStatus("back",1<Jx(e)?"emphasis":"normal")}function rb(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new ry(nb(t.option),e,{include:["grid"]});n._brushController.setPanels(a.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!o&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function ob(t){this.model=t}function ab(t){return ZN(t)}function sb(){if(!QN&&JN){QN=!0;var t=JN.styleSheets;t.length<31?JN.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function lb(t){return parseInt(t,10)}function ub(t,e){sb(),this.root=t,this.storage=e;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",t.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var r=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){r.call(e,t),t&&t.onRemove&&t.onRemove(i)},e.addToStorage=function(t){t.onAdd&&t.onAdd(i),o.call(e,t)},this._firstPaint=!0}function cb(t){return function(){j_('In IE8.0 VML mode painter not support method "'+t+'"')}}function db(t){return document.createElementNS(BR,t)}function hb(t){return qR(1e4*t)/1e4}function fb(t){return t<QR&&-QR<t}function pb(t,e){var n=e?t.textFill:t.fill;return null!=n&&n!==UR}function gb(t,e){var n=e?t.textStroke:t.stroke;return null!=n&&n!==UR}function mb(t,e){e&&vb(t,"transform","matrix("+WR.call(e,",")+")")}function vb(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&("string"==typeof n&&-1<n.indexOf("NaN")&&console.log(n),t.setAttribute(e,n))}function yb(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function xb(t,e,n){if(pb(e,n)){var i=n?e.textFill:e.fill;i="transparent"===i?UR:i,"none"!==t.getAttribute("clip-path")&&i===UR&&(i="rgba(0, 0, 0, 0.002)"),vb(t,"fill",i),vb(t,"fill-opacity",e.opacity)}else vb(t,"fill",UR);if(gb(e,n)){var r=n?e.textStroke:e.stroke;vb(t,"stroke",r="transparent"===r?UR:r),vb(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?e.host.getLineScale():1)),vb(t,"paint-order",n?"stroke":"fill"),vb(t,"stroke-opacity",e.opacity),e.lineDash?(vb(t,"stroke-dasharray",e.lineDash.join(",")),vb(t,
|
|
"stroke-dashoffset",qR(e.lineDashOffset||0))):vb(t,"stroke-dasharray",""),e.lineCap&&vb(t,"stroke-linecap",e.lineCap),e.lineJoin&&vb(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&vb(t,"stroke-miterlimit",e.miterLimit)}else vb(t,"stroke",UR)}function bb(t){for(var e=[],n=t.data,i=t.len(),r=0;r<i;){var o="",a=0;switch(n[r++]){case VR.M:o="M",a=2;break;case VR.L:o="L",a=2;break;case VR.Q:o="Q",a=4;break;case VR.C:o="C",a=6;break;case VR.A:var s=n[r++],l=n[r++],u=n[r++],c=n[r++],d=n[r++],h=n[r++],f=n[r++],p=n[r++],g=Math.abs(h),m=fb(g-XR)&&!fb(g),v=!1;v=XR<=g||!fb(g)&&(-ZR<h&&h<0||ZR<h)==!!p;var y=hb(s+u*YR(d)),x=hb(l+c*GR(d));m&&(h=p?XR-1e-4:1e-4-XR,v=!0,9===r&&e.push("M",y,x));var b=hb(s+u*YR(d+h)),_=hb(l+c*GR(d+h));e.push("A",hb(u),hb(c),qR(f*KR),+v,+p,b,_);break;case VR.Z:o="Z";break;case VR.R:b=hb(n[r++]),_=hb(n[r++]);var w=hb(n[r++]),S=hb(n[r++]);e.push("M",b,_,"L",b+w,_,"L",b+w,_+S,"L",b,_+S,"L",b,_)}o&&e.push(o);for(var C=0;C<a;C++)e.push(hb(n[r++]))}return e.join(" ")}function _b(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function wb(){}function Sb(t,e){for(var n=0,i=e.length,r=0,o=0;n<i;n++){var a=e[n];if(a.removed){for(s=[],l=o;l<o+a.count;l++)s.push(l);a.indices=s,o+=a.count}else{for(var s=[],l=r;l<r+a.count;l++)s.push(l);a.indices=s,r+=a.count,a.added||(o+=a.count)}}return e}function Cb(t){return{newPos:t.newPos,components:t.components.slice(0)}}function Tb(t,e,n,i,r){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=r||"_dom",this.nextId=0}function Ab(t,e){Tb.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function Db(t,e){Tb.call(this,t,e,"clipPath","__clippath_in_use__")}function Mb(t,e){Tb.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function kb(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function Ib(t){return parseInt(t,10)}function Eb(t){return t instanceof Pi?JR:t instanceof an?t$:t instanceof lC?e$:JR}function Lb(t,e){return e&&t&&e.parentNode!==t}function Ob(t,e,n){if(Lb(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function Pb(t,e){if(Lb(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function Nb(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function Rb(t){return t.__textSvgEl}function $b(t){return t.__svgEl}function Fb(t){return function(){j_('In SVG mode painter not support method "'+t+'"')}}var zb;"undefined"!=typeof window?zb=window.__DEV__:"undefined"!=typeof global&&(zb=global.__DEV__),void 0===zb&&(zb=!0);var jb,Hb=zb,Bb=2311,Vb=function(){return Bb++},Wb="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0}:e(navigator.userAgent),Ub={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},qb={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Gb=Object.prototype.toString,Yb=Array.prototype,Zb=Yb.forEach,Xb=Yb.filter,Kb=Yb.slice,Qb=Yb.map,Jb=Yb.reduce,t_={},e_=function(){return t_.createCanvas()};t_.createCanvas=function(){return document.createElement("canvas")};var n_="__ec_primitive__";k.prototype={constructor:k,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=v(t,e)),this)this.hasOwnProperty(n)&&t(this[n],n)},removeKey:function(t){delete this[t]}};var i_=(Object.freeze||Object)({$override:n,clone:L,merge:g,mergeAll:c,extend:O,defaults:D,createCanvas:e_,getContext:i,indexOf:x,inherits:o,mixin:r,isArrayLike:P,each:I,map:A,reduce:p,filter:f,find:a,bind:v,curry:y,isArray:E,isFunction:m,isString:_,isObject:b,isBuiltInObject:s,isTypedArray:w,isDom:S,eqNaN:C,retrieve:N,retrieve2:R,retrieve3:$,slice:l,normalizeCssArray:u,assert:T,trim:d,setAsPrimitive:h,isPrimitive:M,createHashMap:F,concatArray:z,noop:j}),r_="undefined"==typeof Float32Array?Array:Float32Array,o_=Y,a_=Z,s_=et,l_=nt,u_=(Object.freeze||Object)({create:H,copy:B,clone:V,set:W,add:U,scaleAndAdd:q,sub:G,len:Y,length:o_,lenSquare:Z,lengthSquare:a_,mul:X,div:K,dot:Q,scale:J,normalize:tt,distance:et,dist:s_,distanceSquare:nt,distSquare:l_,negate:it,lerp:rt,applyTransform:ot,min:at,max:st});lt.prototype={constructor:lt,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ut(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.dispatchToElement(ut(e,t),"drag",t.event);var a=this.findHover(n,i,e).target,s=this._dropTarget;e!==(this._dropTarget=a)&&(s&&a!==s&&this.dispatchToElement(ut(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(ut(a,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ut(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ut(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var c_=Array.prototype.slice,d_=function(){this._$handlers={}};d_.prototype={constructor:d_,one:function(t,e,n){var i=this._$handlers;if(!e||!t)return this;i[t]||(i[t]=[]);for(var r=0;r<i[t].length;r++)if(i[t][r].h===e)return this;return i[t].push({h:e,one:!0,ctx:n||this}),this},on:function(t,e,n){var i=this._$handlers;if(!e||!t)return this;i[t]||(i[t]=[]);for(var r=0;r<i[t].length;r++)if(i[t][r].h===e)return this;return i[t].push({h:e,one:!1,ctx:n||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;r<o;r++)n[t][r].h!=e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;3<n&&(e=c_.call(e,1));for(var i=this._$handlers[t],r=i.length,o=0;o<r;){switch(n){case 1:i[o].h.call(i[o].ctx);break;case 2:i[o].h.call(i[o].ctx,e[1]);break;case 3:i[o].h.call(i[o].ctx,e[1],e[2]);break;default:i[o].h.apply(i[o].ctx,e)}i[o].one?(i.splice(o,1),r--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,n=e.length;4<n&&(e=c_.call(e,1,e.length-1));for(var i=e[e.length-1],r=this._$handlers[t],o=r.length,a=0;a<o;){switch(n){case 1:r[a].h.call(i);break;case 2:r[a].h.call(i,e[1]);break;case 3:r[a].h.call(i,e[1],e[2]);break;default:r[a].h.apply(i,e)}r[a].one?(r.splice(a,1),o--):a++}}return this}};var h_="silent";dt.prototype.dispose=function(){};var f_=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],p_=function(t,e,n,i){d_.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new dt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,lt.call(this),this.setHandlerProxy(n)};p_.prototype={constructor:p_,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(I(f_,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,r=i.target;r&&!r.__zr&&(r=(i=this.findHover(i.x,i.y)).target);var o=this._hovered=this.findHover(e,n),a=o.target,s=this.proxy;s.setCursor&&s.setCursor(a?a.cursor:"default"),r&&a!==r&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(o,"mousemove",t),a&&a!==r&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);for(var e,n=t.toElement||t.relatedTarget;(n=n&&n.parentNode)&&9!=n.nodeType&&!(e=n===this.painterRoot););!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=ct(e,t,n);i&&(i[r]&&(o.cancelBubble=i[r].call(i,o)),i.trigger(e,o),i=i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},o=i.length-1;0<=o;o--){var a;if(i[o]!==n&&!i[o].ignore&&(a=ht(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==h_)){r.target=i[o];break}}return r}},I(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(i){p_.prototype[i]=function(t){var e=this.findHover(t.zrX,t.zrY),n=e.target;if("mousedown"===i)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===i)this._upEl=n;else if("click"===i){if(this._downEl!==this._upEl||!this._downPoint||4<s_(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,i,t)}}),r(p_,d_),r(p_,lt);var g_="undefined"==typeof Float32Array?Array:Float32Array,m_=(Object.freeze||Object)({create:ft,identity:pt,copy:gt,mul:mt,translate:vt,rotate:yt,scale:xt,invert:bt,clone:_t}),v_=pt,y_=5e-5,x_=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},b_=x_.prototype;b_.transform=null,b_.needLocalTransform=function(){return wt(this.rotation)||wt(this.position[0])||wt(this.position[1])||wt(this.scale[0]-1)||wt(this.scale[1]-1)},b_.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||ft(),n?this.getLocalTransform(i):v_(i),e&&(n?mt(i,t.transform,i):gt(i,t.transform)),this.transform=i,this.invTransform=this.invTransform||ft(),bt(this.invTransform,i)):i&&v_(i)},b_.getLocalTransform=function(t){return x_.getLocalTransform(this,t)},b_.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},b_.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var __=[];b_.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(mt(__,t.invTransform,e),e=__);var n=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=this.position,o=this.scale;wt(n-1)&&(n=Math.sqrt(n)),wt(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(n=-n),e[3]<0&&(i=-i),r[0]=e[4],r[1]=e[5],o[0]=n,o[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/n)}},b_.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),n=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(n=-n),[e,n]},b_.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&ot(n,n,i),n},b_.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&ot(n,n,i),n},x_.getLocalTransform=function(t,e){v_(e=e||[]);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),xt(e,e,i),r&&yt(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=o[0],e[5]+=o[1],e};var w_={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},elasticOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-w_.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*w_.bounceIn(2*t):.5*w_.bounceOut(2*t-1)+.5}};St.prototype={constructor:St,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?w_[i]:i,o="function"==typeof r?r(n):n;return this.fire("frame",o),1==n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var S_=function(){this.head=null,this.tail=null,this._len=0},C_=S_.prototype;C_.insert=function(t){var e=new T_(t);return this.insertEntry(e),e},C_.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},C_.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},C_.len=function(){return this._len},C_.clear=function(){this.head=this.tail=null,this._len=0};var T_=function(t){this.value=t,this.next,this.prev},A_=function(t){this._list=new S_,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},D_=A_.prototype;D_.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&0<o){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new T_(e),a.key=t,n.insertEntry(a),i[t]=a}return r},D_.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},D_.clear=function(){this._list.clear(),this._map={}};var M_={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},k_=new A_(20),I_=null,E_=zt,L_=jt,O_=(Object.freeze||Object)({parse:Pt,lift:$t,toHex:Ft,fastLerp:zt,fastMapToColor:E_,lerp:jt,mapToColor:L_,modifyHSL:Ht,modifyAlpha:Bt,stringify:Vt}),P_=Array.prototype.slice,N_=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Wt,this._setter=i||Ut,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};N_.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:Jt(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;n<e;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,o=function(){--r||i._doneCallback()};for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var s=ne(this,t,o,this._tracks[a],a,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var r=e[i];t&&r.onframe(this._target,1),n&&n.removeClip(r)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var R_=1;"undefined"!=typeof window&&(R_=Math.max(window.devicePixelRatio||1,1));var $_=0,F_=R_,z_=function(){};1===$_?z_=function(){for(var t in arguments)throw new Error(arguments[t])}:1<$_&&(z_=function(){for(var t in arguments)console.log(arguments[t])});var j_=z_,H_=function(){this.animators=[]};H_.prototype={constructor:H_,animate:function(t,e){var n,i=!1,r=this,o=this.__zr;if(t){var a=t.split("."),s=r;i="shape"===a[0];for(var l=0,u=a.length;l<u;l++)s&&(s=s[a[l]]);s&&(n=s)}else n=r;if(n){var c=r.animators,d=new N_(n,e);return d.during(function(){r.dirty(i)}).done(function(){c.splice(x(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d}j_('Property "'+t+'" is not existed in element '+r.id)},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;i<n;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,r,o){function a(){--l||r&&r()}_(n)?(r=i,i=n,n=0):m(i)?(r=i,i="linear",n=0):m(n)?(r=n,n=0):m(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,n);var s=this.animators.slice(),l=s.length;l||r&&r();for(var u=0;u<s.length;u++)s[u].done(a).start(i,o)},_animateToShallow:function(t,e,n,i,r){var o={},a=0;for(var s in n)if(n.hasOwnProperty(s))if(null!=e[s])b(n[s])&&!P(n[s])?this._animateToShallow(t?t+"."+s:s,e[s],n[s],i,r):(o[s]=n[s],a++);else if(null!=n[s])if(t){var l={};l[t]={},l[t][s]=n[s],this.attr(l)}else this.attr(s,n[s]);return 0<a&&this.animate(t,!1).when(null==i?500:i,o).delay(r||0),this}};var B_=function(t){x_.call(this,t),d_.call(this,t),H_.call(this,t),this.id=t.id||Vb()};B_.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(b(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},r(B_,H_),r(B_,x_),r(B_,d_);var V_,W_,U_,q_,G_=ot,Y_=Math.min,Z_=Math.max;ie.prototype={constructor:ie,union:function(t){var e=Y_(t.x,this.x),n=Y_(t.y,this.y);this.width=Z_(t.x+t.width,this.x+this.width)-e,this.height=Z_(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(V_=[],W_=[],U_=[],q_=[],function(t){if(t){V_[0]=U_[0]=this.x,V_[1]=q_[1]=this.y,W_[0]=q_[0]=this.x+this.width,W_[1]=U_[1]=this.y+this.height,G_(V_,V_,t),G_(W_,W_,t),G_(U_,U_,t),G_(q_,q_,t),this.x=Y_(V_[0],W_[0],U_[0],q_[0]),this.y=Y_(V_[1],W_[1],U_[1],q_[1]);var e=Z_(V_[0],W_[0],U_[0],q_[0]),n=Z_(V_[1],W_[1],U_[1],q_[1]);this.width=e-this.x,this.height=n-this.y}}),calculateTransform:function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=ft();return vt(r,r,[-e.x,-e.y]),xt(r,r,[n,i]),vt(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof ie||(t=ie.create(t));var e=this,n=e.x,i=e.x+e.width,r=e.y,o=e.y+e.height,a=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(i<a||s<n||o<l||u<r)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new ie(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},ie.create=function(t){return new ie(t.x,t.y,t.width,t.height)};var X_=function(t){for(var e in t=t||{},B_.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};X_.prototype={constructor:X_,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,i=n.indexOf(e);0<=i&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof X_&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=x(i,t);return r<0||(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof X_&&t.delChildrenFromStorage(n)),e&&e.refresh()),this},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e<n.length;e++)t=n[e],i&&(i.delFromStorage(t),t instanceof X_&&t.delChildrenFromStorage(i)),t.parent=null;return n.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof X_&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof X_&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new ie(0,0,0,0),i=t||this._children,r=[],o=0;o<i.length;o++){var a=i[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),(e=e||n.clone()).union(n)):(e=e||s.clone()).union(s)}}return e||n}},o(X_,B_);var K_=32,Q_=7,J_=function(){this._roots=[],this._displayList=[],this._displayListLen=0};J_.prototype={constructor:J_,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,r=e.length;i<r;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,Wb.canvasSupported&&de(n,he)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),r=(o=r).clipPath}if(t.isGroup){for(var a=t._children,s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof X_&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof X_&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var i=t.length;e<i;e++)this.delRoot(t[e])}else{var r=x(this._roots,t);0<=r&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof X_&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:he};var tw={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},ew=function(t,e,n){return tw.hasOwnProperty(e)?n*t.dpr:n},nw=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],iw=function(t,e){this.extendFrom(t,!1),this.host=e};iw.prototype={constructor:iw,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){for(var i=this,r=n&&n.style,o=!r,a=0;a<nw.length;a++){var s=nw[a],l=s[0];(o||i[l]!==r[l])&&(t[l]=ew(t,l,i[l]||s[1]))}if((o||i.fill!==r.fill)&&(t.fillStyle=i.fill),(o||i.stroke!==r.stroke)&&(t.strokeStyle=i.stroke),(o||i.opacity!==r.opacity)&&(t.globalAlpha=null==i.opacity?1:i.opacity),(o||i.blend!==r.blend)&&(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?pe:fe)(t,e,n),r=e.colorStops,o=0;o<r.length;o++)i.addColorStop(r[o].offset,r[o].color);return i}};for(var rw=iw.prototype,ow=0;ow<nw.length;ow++){var aw=nw[ow];aw[0]in rw||(rw[aw[0]]=aw[1])}iw.getGradient=rw.getGradient;var sw=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};sw.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var lw=function(t,e,n){var i;n=n||F_,"string"==typeof t?i=me(t,e,n):b(t)&&(t=(i=t).id),this.id=t;var r=(this.dom=i).style;r&&(i.onselectstart=ge,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,
|
|
this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};lw.prototype={constructor:lw,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=me("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,r=i.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,o&&(o.width=t*n,o.height=e*n,1!=n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n,i=this.dom,r=this.ctx,o=i.width,a=i.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,o/u,a/u)),r.clearRect(0,0,o,a),e&&"transparent"!==e)&&(e.colorStops?(n=e.__canvasGradient||iw.getGradient(r,e,{x:0,y:0,width:o,height:a}),e.__canvasGradient=n):e.image&&(n=sw.prototype.getCanvasPattern.call(e,r)),r.save(),r.fillStyle=n||e,r.fillRect(0,0,o,a),r.restore());if(s){var c=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(c,0,0,o,a),r.restore()}}};var uw="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},cw=new A_(50),dw={},hw=0,fw=5e3,pw=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,gw="12px sans-serif",mw={measureText:function(t,e){var n=i();return n.font=e||gw,n.measureText(t)}},vw={left:1,right:1,center:1},yw={top:1,bottom:1,middle:1},xw=new ie,bw=function(){};bw.prototype={constructor:bw,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&je(n,!0);var i=n.text;if(null!=i&&(i+=""),rn(i,n)){t.save();var r=this.transform;n.transformText?this.setTransform(t):r&&(xw.copy(e),xw.applyTransform(r),e=xw),Be(this,t,i,n,e),t.restore()}}},on.prototype={constructor:on,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,inplace:!1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?B_.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new iw(t,this),this.dirty(!1),this}},o(on,B_),r(on,bw),an.prototype={constructor:an,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var r=this._image=ye(i,this._image,this,this.onload);if(r&&be(r)){var o=n.x||0,a=n.y||0,s=n.width,l=n.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),n.sWidth&&n.sHeight){var c=n.sx||0,d=n.sy||0;t.drawImage(r,c,d,n.sWidth,n.sHeight,o,a,s,l)}else if(n.sx&&n.sy){var h=s-(c=n.sx),f=l-(d=n.sy);t.drawImage(r,c,d,h,f,o,a,s,l)}else t.drawImage(r,o,a,s,l);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new ie(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},o(an,on);var _w=1e5,ww=314159,Sw=.01,Cw=.001,Tw=new ie(0,0,0,0),Aw=new ie(0,0,0,0),Dw=function(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=O({},n||{}),this.dpr=n.devicePixelRatio||F_,this._singleCanvas=i;var r=(this.root=t).style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],a=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var s=t.width,l=t.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new lw(t,this,this.dpr);u.__builtin__=!0,u.initContext(),(a[ww]=u).zlevel=ww,o.push(ww),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=hn(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Dw.prototype={constructor:Dw,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],o=this._layers[r];if(!o.__builtin__&&o.refresh){var a=0===i?this._backgroundColor:null;o.refresh(a)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape});((n.__from=t).__hoverMir=n).setStyle(e),this._hoverElements.push(n)}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=x(n,e);0<=i&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var n=t[e].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){de(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(_w));var i={};n.ctx.save();for(var r=0;r<e;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,n,!0,i))):(t.splice(r,1),a.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(_w)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;uw(function(){r._paintList(t,e,n)})}}},_compositeManually:function(){var e=this.getLayer(ww).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&n.push(s)}for(var o=!0,a=0;a<n.length;a++){var s,l=(s=n[a]).ctx,u={};l.save();var c=e?s.__startIndex:s.__drawIndex,d=!e&&s.incremental&&Date.now,h=d&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(c===s.__startIndex){var p=t[c];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var g=c;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=!1,d)if(15<Date.now()-h)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(o=!1),u.prevElClipPaths&&l.restore(),l.restore()}return Wb.wxa&&I(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,n,i){var r=e.ctx,o=t.transform;if((e.__dirty||n)&&!t.invisible&&0!==t.style.opacity&&(!o||o[0]||o[3])&&(!t.culling||!un(t,this._width,this._height))){var a=t.__clipPaths;i.prevElClipPaths&&!cn(a,i.prevElClipPaths)||(i.prevElClipPaths&&(e.ctx.restore(),i.prevElClipPaths=null,i.prevEl=null),a&&(r.save(),dn(a,r),i.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,i.prevEl||null),(i.prevEl=t).afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ww);var n=this._layers[t];return n||((n=new lw("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&g(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n=this._layers,i=this._zlevelList,r=i.length,o=null,a=-1,s=this._domRoot;if(n[t])j_("ZLevel "+t+" has been used already");else if(ln(e)){if(0<r&&t>i[0]){for(a=0;a<r-1&&!(i[a]<t&&i[a+1]>t);a++);o=n[i[a]]}if(i.splice(a+1,0,t),!(n[t]=e).virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else j_("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){var n,i,r,o=this._zlevelList;for(r=0;r<o.length;r++)i=o[r],(n=this._layers[i]).__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){var n,i,r,o=this._zlevelList;for(r=0;r<o.length;r++)i=o[r],(n=this._layers[i]).__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){if((o=t[n]).zlevel!==t[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var i=null,r=0;for(n=0;n<t.length;n++){var o,a,s=(o=t[n]).zlevel;o.incremental?((a=this.getLayer(s+Cw,this._needsManuallyCompositing)).incremental=!0,r=1):a=this.getLayer(s+(0<r?Sw:0),this._needsManuallyCompositing),a.__builtin__||j_("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==n&&(a.__dirty=!0),a.__startIndex=n,a.incremental?a.__drawIndex=-1:a.__drawIndex=n,e(n),i=a),o.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?g(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===t||r===t+Sw)g(this._layers[r],n[t],!0)}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(x(n,t),1))},resize:function(e,n){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=n&&(i.height=n),e=this._getSize(0),n=this._getSize(1),t.style.display="",this._width!=e||n!=this._height){for(var r in t.style.width=e+"px",t.style.height=n+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,n);I(this._progressiveLayers,function(t){t.resize(e,n)}),this.refresh(!0)}this._width=e,this._height=n}else{if(null==e||null==n)return;this._width=e,this._height=n,this.getLayer(ww).resize(e,n)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[ww].dom;var e=new lw("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var o={},a=this.storage.getDisplayList(!0),s=0;s<a.length;s++){var l=a[s];this._doPaintEl(l,e,!0,o)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||sn(s[n])||sn(a.style[n]))-(sn(s[r])||0)-(sn(s[o])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),o=t.style,a=o.shadowBlur*e,s=o.shadowOffsetX*e,l=o.shadowOffsetY*e,u=o.hasStroke()?o.lineWidth:0,c=Math.max(u/2,-s+a),d=Math.max(u/2,s+a),h=Math.max(u/2,-l+a),f=Math.max(u/2,l+a),p=r.width+c+d,g=r.height+h+f;n.width=p*e,n.height=g*e,i.scale(e,e),i.clearRect(0,0,p,g),i.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[c-r.x,h-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var v=new an({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var Mw="undefined"!=typeof window&&!!window.addEventListener,kw=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Iw=Mw?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Ew=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,d_.call(this)};Ew.prototype={constructor:Ew,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=x(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,r=[],o=[],a=0;a<i;a++){var s=n[a],l=s.step(t,e);l&&(r.push(l),o.push(s))}for(a=0;a<i;)n[a]._needsRemove?(n[a]=n[i-1],n.pop(),i--):a++;i=r.length;for(a=0;a<i;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(uw(t),!e._paused&&e._update())}var e=this;this._running=!0,uw(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var n=new N_(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},r(Ew,d_);var Lw=function(){this._track=[]};Lw.prototype={constructor:Lw,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o<a;o++){var s=i[o],l=pn(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Ow)if(Ow.hasOwnProperty(e)){var n=Ow[e](this._track,t);if(n)return n}}};var Ow={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&1<r.length&&i&&1<i.length){var o=bn(i)/bn(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=_n(i);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},Pw=300,Nw=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Rw=["touchstart","touchend","touchmove"],$w={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Fw=A(Nw,function(t){var e=t.replace("mouse","pointer");return $w[e]?e:t}),zw={mousemove:function(t){t=mn(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=mn(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=mn(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Sn(this,t,"start"),zw.mousemove.call(this,t),zw.mousedown.call(this,t),Cn(this)},touchmove:function(t){(t=mn(this.dom,t)).zrByTouch=!0,Sn(this,t,"change"),zw.mousemove.call(this,t),Cn(this)},touchend:function(t){(t=mn(this.dom,t)).zrByTouch=!0,Sn(this,t,"end"),zw.mouseup.call(this,t),+new Date-this._lastTouchMoment<Pw&&zw.click.call(this,t),Cn(this)},pointerdown:function(t){zw.mousedown.call(this,t)},pointermove:function(t){Tn(t)||zw.mousemove.call(this,t)},pointerup:function(t){zw.mouseup.call(this,t)},pointerout:function(t){Tn(t)||zw.mouseout.call(this,t)}};I(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){zw[e]=function(t){t=mn(this.dom,t),this.trigger(e,t)}});var jw=Dn.prototype;jw.dispose=function(){for(var t=Nw.concat(Rw),e=0;e<t.length;e++){var n=t[e];yn(this.dom,wn(n),this._handlers[n])}},jw.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},r(Dn,d_);var Hw=!Wb.canvasSupported,Bw={canvas:Dw},Vw={},Ww="4.0.4",Uw=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,r=new J_,o=n.renderer;if(Hw){if(!Bw.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&Bw[o]||(o="canvas");var a=new Bw[o](e,r,n,t);this.storage=r,this.painter=a;var s=Wb.node||Wb.worker?null:new Dn(a.getViewportRoot());this.handler=new p_(r,a,s,a.root),this.animation=new Ew({stage:{update:v(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(i)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(i)}};Uw.prototype={constructor:Uw,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,Ln(this.id)}};var qw=(Object.freeze||Object)({version:Ww,init:Mn,dispose:kn,getInstance:In,registerPainter:En}),Gw=I,Yw=b,Zw=E,Xw="series\0",Kw=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],Qw=0,Jw=".",tS="___EC__COMPONENT__CONTAINER___",eS=0,nS=function(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,n){for(var i={},r=0;r<s.length;r++){var o=s[r][1];if(!(e&&0<=x(e,o)||n&&x(n,o)<0)){var a=t.getShallow(o);null!=a&&(i[s[r][0]]=a)}}return i}},iS=nS([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),rS={getLineStyle:function(t){var e=iS(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},oS=nS([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),aS={getAreaStyle:function(t,e){return oS(this,t,e)}},sS=Math.pow,lS=Math.sqrt,uS=1e-8,cS=1e-4,dS=lS(3),hS=1/3,fS=H(),pS=H(),gS=H(),mS=Math.min,vS=Math.max,yS=Math.sin,xS=Math.cos,bS=2*Math.PI,_S=H(),wS=H(),SS=H(),CS=[],TS=[],AS={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},DS=[],MS=[],kS=[],IS=[],ES=Math.min,LS=Math.max,OS=Math.cos,PS=Math.sin,NS=Math.sqrt,RS=Math.abs,$S="undefined"!=typeof Float32Array,FS=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};FS.prototype={constructor:FS,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=RS(1/F_/t)||0,this._uy=RS(1/F_/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(AS.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=RS(t-this._xi)>this._ux||RS(e-this._yi)>this._uy||this._len<5;return this.addData(AS.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,o){return this.addData(AS.C,t,e,n,i,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,n,i){return this.addData(AS.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,o){return this.addData(AS.A,t,e,n,n,i,r-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=OS(r)*n+t,this._yi=PS(r)*n+t,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(AS.R,t,e,n,i),this},closePath:function(){this.addData(AS.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!$S||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;r<e;r++)n+=t[r].len();$S&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(r=0;r<e;r++)for(var o=t[r].data,a=0;a<o.length;a++)this.data[i++]=o[a];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,i,r=this._dashSum,o=this._dashOffset,a=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,c=t-l,d=e-u,h=NS(c*c+d*d),f=l,p=u,g=a.length;for(o<0&&(o=r+o),f-=(o%=r)*(c/=h),p-=o*(d/=h);0<c&&f<=t||c<0&&t<=f||0==c&&(0<d&&p<=e||d<0&&e<=p);)f+=c*(n=a[i=this._dashIdx]),p+=d*n,this._dashIdx=(i+1)%g,0<c&&f<l||c<0&&l<f||0<d&&p<u||d<0&&u<p||s[i%2?"moveTo":"lineTo"](0<=c?ES(f,t):LS(f,t),0<=d?ES(p,e):LS(p,e));c=f-t,d=p-e,this._dashOffset=-NS(c*c+d*d)},_dashedBezierTo:function(t,e,n,i,r,o){var a,s,l,u,c,d=this._dashSum,h=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=ii,y=0,x=this._dashIdx,b=f.length,_=0;for(h<0&&(h=d+h),h%=d,a=0;a<1;a+=.1)s=v(g,t,n,r,a+.1)-v(g,t,n,r,a),l=v(m,e,i,o,a+.1)-v(m,e,i,o,a),y+=NS(s*s+l*l);for(;x<b&&!(h<(_+=f[x]));x++);for(a=(_-h)/y;a<=1;)u=v(g,t,n,r,a),c=v(m,e,i,o,a),x%2?p.moveTo(u,c):p.lineTo(u,c),a+=f[x]/y,x=(x+1)%b;x%2!=0&&p.lineTo(r,o),s=r-u,l=o-c,this._dashOffset=-NS(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,$S&&(this.data=new Float32Array(t)))},getBoundingRect:function(){DS[0]=DS[1]=kS[0]=kS[1]=Number.MAX_VALUE,MS[0]=MS[1]=IS[0]=IS[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,o=0;o<t.length;){var a=t[o++];switch(1==o&&(i=e=t[o],r=n=t[o+1]),a){case AS.M:e=i=t[o++],n=r=t[o++],kS[0]=i,kS[1]=r,IS[0]=i,IS[1]=r;break;case AS.L:mi(e,n,t[o],t[o+1],kS,IS),e=t[o++],n=t[o++];break;case AS.C:vi(e,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],kS,IS),e=t[o++],n=t[o++];break;case AS.Q:yi(e,n,t[o++],t[o++],t[o],t[o+1],kS,IS),e=t[o++],n=t[o++];break;case AS.A:var s=t[o++],l=t[o++],u=t[o++],c=t[o++],d=t[o++],h=t[o++]+d,f=(t[o++],1-t[o++]);1==o&&(i=OS(d)*u+s,r=PS(d)*c+l),xi(s,l,u,c,d,h,f,kS,IS),e=OS(h)*u+s,n=PS(h)*c+l;break;case AS.R:mi(i=e=t[o++],r=n=t[o++],i+t[o++],r+t[o++],kS,IS);break;case AS.Z:e=i,n=r}at(DS,DS,kS),st(MS,MS,IS)}return 0===o&&(DS[0]=DS[1]=MS[0]=MS[1]=0),new ie(DS[0],DS[1],MS[0]-DS[0],MS[1]-DS[1])},rebuildPath:function(t){for(var e,n,i,r,o,a,s=this.data,l=this._ux,u=this._uy,c=this._len,d=0;d<c;){var h=s[d++];switch(1==d&&(e=i=s[d],n=r=s[d+1]),h){case AS.M:e=i=s[d++],n=r=s[d++],t.moveTo(i,r);break;case AS.L:o=s[d++],a=s[d++],(RS(o-i)>l||RS(a-r)>u||d===c-1)&&(t.lineTo(o,a),i=o,r=a);break;case AS.C:t.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),i=s[d-2],r=s[d-1];break;case AS.Q:t.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),i=s[d-2],r=s[d-1];break;case AS.A:var f=s[d++],p=s[d++],g=s[d++],m=s[d++],v=s[d++],y=s[d++],x=s[d++],b=s[d++],_=m<g?g:m,w=m<g?1:g/m,S=m<g?m/g:1,C=v+y;.001<Math.abs(g-m)?(t.translate(f,p),t.rotate(x),t.scale(w,S),t.arc(0,0,_,v,C,1-b),t.scale(1/w,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,_,v,C,1-b),1==d&&(e=OS(v)*g+f,n=PS(v)*m+p),i=OS(C)*g+f,r=PS(C)*m+p;break;case AS.R:e=i=s[d],n=r=s[d+1],t.rect(s[d++],s[d++],s[d++],s[d++]);break;case AS.Z:t.closePath(),i=e,r=n}}}},FS.CMD=AS;var zS=2*Math.PI,jS=2*Math.PI,HS=FS.CMD,BS=2*Math.PI,VS=1e-4,WS=[-1,-1,-1],US=[-1,-1],qS=sw.prototype.getCanvasPattern,GS=Math.abs,YS=new FS(!0);Pi.prototype={constructor:Pi,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n,i=this.style,r=this.path||YS,o=i.hasStroke(),a=i.hasFill(),s=i.fill,l=i.stroke,u=a&&!!s.colorStops,c=o&&!!l.colorStops,d=a&&!!s.image,h=o&&!!l.image;(i.bind(t,this,e),this.setTransform(t),this.__dirty)&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(t,s,n)),c&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,l,n)));u?t.fillStyle=this._fillGradient:d&&(t.fillStyle=qS.call(s,t)),c?t.strokeStyle=this._strokeGradient:h&&(t.strokeStyle=qS.call(l,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();r.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(r.beginPath(t),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&r.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o&&r.stroke(t),f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new FS},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new FS),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),1e-10<a&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Oi(o,a/s,t,e)))return!0}if(r.hasFill())return Li(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):on.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(b(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<GS(t[0]-1)&&1e-10<GS(t[3]-1)?Math.sqrt(GS(t[0]*t[3]-t[2]*t[1])):1}},Pi.extend=function(r){var t=function(t){Pi.call(this,t),r.style&&this.style.extendFrom(r.style,!1);var e=r.shape;if(e){this.shape=this.shape||{};var n=this.shape;for(var i in e)!n.hasOwnProperty(i)&&e.hasOwnProperty(i)&&(n[i]=e[i])}r.init&&r.init.call(this,t)};for(var e in o(t,Pi),r)"style"!==e&&"shape"!==e&&(t.prototype[e]=r[e]);return t},o(Pi,on);var ZS=FS.CMD,XS=[[],[],[]],KS=Math.sqrt,QS=Math.atan2,JS=function(t,e){var n,i,r,o,a,s=t.data,l=ZS.M,u=ZS.C,c=ZS.L,d=ZS.R,h=ZS.A,f=ZS.Q;for(o=r=0;r<s.length;){switch(n=s[r++],o=r,i=0,n){case l:case c:i=1;break;case u:i=3;break;case f:i=2;break;case h:var p=e[4],g=e[5],m=KS(e[0]*e[0]+e[1]*e[1]),v=KS(e[2]*e[2]+e[3]*e[3]),y=QS(-e[1]/v,e[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,o=r+=2;break;case d:x[0]=s[r++],x[1]=s[r++],ot(x,x,e),s[o++]=x[0],s[o++]=x[1],x[0]+=s[r++],x[1]+=s[r++],ot(x,x,e),s[o++]=x[0],s[o++]=x[1]}for(a=0;a<i;a++){var x;(x=XS[a])[0]=s[r++],x[1]=s[r++],ot(x,x,e),s[o++]=x[0],s[o++]=x[1]}}},tC=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],eC=Math.sqrt,nC=Math.sin,iC=Math.cos,rC=Math.PI,oC=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},aC=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(oC(t)*oC(e))},sC=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(aC(t,e))},lC=function(t){on.call(this,t)};lC.prototype={constructor:lC,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&je(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),n.bind(t,this,e),rn(i,n)&&(this.setTransform(t),Be(this,t,i,n),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&je(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var n=Se(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(n.x+=t.x||0,n.y+=t.y||0,Je(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},o(lC,on);var uC=Pi.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),cC=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],dC=function(l){return Wb.browser.ie&&11<=Wb.browser.version?function(){var t,e=this.__clipPaths,
|
|
n=this.style;if(e)for(var i=0;i<e.length;i++){var r=e[i],o=r&&r.shape,a=r&&r.type;if(o&&("sector"===a&&o.startAngle===o.endAngle||"rect"===a&&(!o.width||!o.height))){for(var s=0;s<cC.length;s++)cC[s][2]=n[cC[s][0]],n[cC[s][0]]=cC[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(s=0;s<cC.length;s++)n[cC[s][0]]=cC[s][2]}:l},hC=Pi.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:dC(Pi.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(a),c=Math.sin(a);t.moveTo(u*r+n,c*r+i),t.lineTo(u*o+n,c*o+i),t.arc(n,i,o,a,s,!l),t.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&t.arc(n,i,r,s,a,l),t.closePath()}}),fC=Pi.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)}}),pC=function(t,e){for(var n=t.length,i=[],r=0,o=1;o<n;o++)r+=et(t[o-1],t[o]);var a=r/2;a=a<n?n:a;for(o=0;o<a;o++){var s,l,u,c=o/(a-1)*(e?n:n-1),d=Math.floor(c),h=c-d,f=t[d%n];e?(s=t[(d-1+n)%n],l=t[(d+1)%n],u=t[(d+2)%n]):(s=t[0===d?d:d-1],l=t[n-2<d?n-1:d+1],u=t[n-3<d?n-1:d+2]);var p=h*h,g=h*p;i.push([Hi(s[0],f[0],l[0],u[0],h,p,g),Hi(s[1],f[1],l[1],u[1],h,p,g)])}return i},gC=function(t,e,n,i){var r,o,a,s,l=[],u=[],c=[],d=[];if(i){a=[Infinity,Infinity],s=[-Infinity,-Infinity];for(var h=0,f=t.length;h<f;h++)at(a,a,t[h]),st(s,s,t[h]);at(a,a,i[0]),st(s,s,i[1])}for(h=0,f=t.length;h<f;h++){var p=t[h];if(n)r=t[h?h-1:f-1],o=t[(h+1)%f];else{if(0===h||h===f-1){l.push(V(t[h]));continue}r=t[h-1],o=t[h+1]}G(u,o,r),J(u,u,e);var g=et(p,r),m=et(p,o),v=g+m;0!==v&&(g/=v,m/=v),J(c,u,-g),J(d,u,m);var y=U([],p,c),x=U([],p,d);i&&(st(y,y,a),at(y,y,s),st(x,x,a),at(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l},mC=Pi.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Bi(t,e,!0)}}),vC=Pi.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Bi(t,e,!1)}}),yC=Pi.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width,o=e.height;e.r?ze(t,e):t.rect(n,i,r,o),t.closePath()}}),xC=Pi.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.percent;0!==a&&(t.moveTo(n,i),a<1&&(r=n*(1-a)+r*a,o=i*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),bC=[],_C=Pi.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,c=e.percent;0!==c&&(t.moveTo(n,i),null==l||null==u?(c<1&&(fi(n,a,r,c,bC),a=bC[1],r=bC[2],fi(i,s,o,c,bC),s=bC[1],o=bC[2]),t.quadraticCurveTo(a,s,r,o)):(c<1&&(si(n,a,l,r,c,bC),a=bC[1],l=bC[2],r=bC[3],si(i,s,u,o,c,bC),s=bC[1],u=bC[2],o=bC[3]),t.bezierCurveTo(a,s,l,u,r,o)))},pointAt:function(t){return Vi(this.shape,t,!1)},tangentAt:function(t){var e=Vi(this.shape,t,!0);return tt(e,e)}}),wC=Pi.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)}}),SC=Pi.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Pi.prototype.getBoundingRect.call(this)}}),CC=function(t){this.colorStops=t||[]};CC.prototype={constructor:CC,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var TC=function(t,e,n,i,r,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=o||!1,CC.call(this,r)};TC.prototype={constructor:TC},o(TC,CC);var AC=function(t,e,n,i,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,CC.call(this,i)};AC.prototype={constructor:AC},o(AC,CC),Wi.prototype.incremental=!0,Wi.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Wi.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Wi.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Wi.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Wi.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Wi.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){(n=this._displayables[e]).beforeBrush&&n.beforeBrush(t),n.brush(t,e===this._cursor?null:this._displayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=e;for(e=0;e<this._temporaryDisplayables.length;e++){var n;(n=this._temporaryDisplayables[e]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===e?null:this._temporaryDisplayables[e-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var DC=[];Wi.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ie(Infinity,Infinity,-Infinity,-Infinity),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(DC)),t.union(i)}this._rect=t}return this._rect},Wi.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(t,e))return!0}return!1},o(Wi,on);var MC=Math.round,kC=Math.max,IC=Math.min,EC={},LC=ji,OC=(Object.freeze||Object)({extendShape:Ui,extendPath:qi,makePath:Gi,makeImage:Yi,mergePath:LC,resizePath:Xi,subPixelOptimizeLine:Ki,subPixelOptimizeRect:Qi,subPixelOptimize:Ji,setHoverStyle:hr,setLabelStyle:fr,setTextStyle:pr,setText:gr,getFont:wr,updateProps:Cr,initProps:Tr,getTransform:Ar,applyTransform:Dr,transformDirection:Mr,groupTransition:kr,clipPointsByRect:Ir,clipRectByRect:Er,createIcon:Lr,Group:X_,Image:an,Text:lC,Circle:uC,Sector:hC,Ring:fC,Polygon:mC,Polyline:vC,Rect:yC,Line:xC,BezierCurve:_C,Arc:wC,IncrementalDisplayable:Wi,CompoundPath:SC,LinearGradient:TC,RadialGradient:AC,BoundingRect:ie}),PC=["textStyle","color"],NC={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(PC):null)},getFont:function(){return wr({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Se(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},RC=nS([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),$C={getItemStyle:function(t,e){var n=RC(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},FC=r,zC=Vn();Or.prototype={constructor:Or,init:null,mergeOption:function(t){g(this.option,t,!0)},get:function(t,e){return null==t?this.option:Pr(this.option,this.parsePath(t),!e&&Nr(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&Nr(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n;return new Or(null==t?this.option:Pr(this.option,t=this.parsePath(t)),e=e||(n=Nr(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(L(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){zC(this).getParent=t},isAnimationEnabled:function(){if(!Wb.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Xn(Or),Kn(Or),FC(Or,rS),FC(Or,aS),FC(Or,NC),FC(Or,$C);var jC=0,HC=1e-4,BC=9007199254740991,VC=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,WC=(Object.freeze||Object)({linearMap:jr,parsePercent:Hr,round:Br,asc:Vr,getPrecision:Wr,getPrecisionSafe:Ur,getPixelPrecision:qr,getPercentWithPrecision:Gr,MAX_SAFE_INTEGER:BC,remRadian:Yr,isRadianAroundZero:Zr,parseDate:Xr,quantity:Kr,nice:Jr,reformIntervals:to,isNumeric:eo}),UC=u,qC=/([&<>"'])/g,GC={"&":"&","<":"<",">":">",'"':""","'":"'"},YC=["a","b","c","d","e","f","g"],ZC=function(t,e){return"{"+t+(null==e?"":e)+"}"},XC=ke,KC=Se,QC=(Object.freeze||Object)({addCommas:no,toCamelCase:io,normalizeCssArray:UC,encodeHTML:ro,formatTpl:oo,formatTplSimple:ao,getTooltipMarker:so,formatTime:uo,capitalFirst:co,truncateText:XC,getTextRect:KC}),JC=I,tT=["left","right","top","bottom","width","height"],eT=[["width","left","right"],["height","top","bottom"]],nT=ho,iT=(y(ho,"vertical"),y(ho,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),rT=Vn(),oT=Or.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Or.call(this,t,e,n,i),this.uid=Rr("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?yo(t):{};g(t,e.getTheme().get(this.mainType)),g(t,this.getDefaultOption()),n&&vo(t,i,n)},mergeOption:function(t){g(this.option,t,!0);var e=this.layoutMode;e&&vo(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=rT(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var r={},o=e.length-1;0<=o;o--)r=g(r,e[o],!0);t.defaultOption=r}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});ti(oT,{registerWhenExtend:!0}),$r(oT),Fr(oT,bo),r(oT,iT);var aT="";"undefined"!=typeof navigator&&(aT=navigator.platform||"");var sT={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:aT.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},lT=Vn(),uT={clearColorPalette:function(){lT(this).colorIdx=0,lT(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=lT(e=e||this),r=i.colorIdx||0,o=i.colorNameMap=i.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var a=On(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?_o(s,n):a;if((l=l||a)&&l.length){var u=l[r];return t&&(o[t]=u),i.colorIdx=(r+1)%l.length,u}}},cT={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];if(Hb){if(!r)throw new Error('xAxis "'+N(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!o)throw new Error('yAxis "'+N(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),So(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),So(o)&&(i.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];if(Hb&&!r)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],n.set("single",r),So(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");if(Hb){if(!a)throw new Error("angleAxis option not found");if(!o)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),So(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),So(a)&&(i.set("angle",a),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,r,o,a){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=r.coordSysDims=e.dimensions.slice();I(e.parallelAxisIndex,function(t,e){var n=s.getComponent("parallelAxis",t),i=l[e];o.set(i,n),So(n)&&null==r.firstCategoryDimIndex&&(a.set(i,n),r.firstCategoryDimIndex=e)})}},dT="original",hT="arrayRows",fT="objectRows",pT="keyedColumns",gT="unknown",mT="typedArray",vT="column",yT="row";Co.seriesDataToSource=function(t){return new Co({data:t,sourceFormat:w(t)?mT:dT,fromDataset:!1})},Kn(Co);var xT=Vn(),bT="\0_ec_inner",_T=Or.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Or(n),this._optionManager=i},setOption:function(t,e){T(!(bT in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):zo.call(this,i),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=n.getMediaOption(this,this._api);o.length&&I(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(i){function t(a,t){var e=On(i[a]),n=$n(u.get(a),e);Fn(n),I(n,function(t){var e=t.option;b(e)&&(t.keyInfo.mainType=a,t.keyInfo.subType=Ho(a,e,t.exist))});var s=jo(u,t);l[a]=[],u.set(a,[]),I(n,function(t,e){var n=t.exist,i=t.option;if(T(b(i)||n,"Empty component definition"),i){var r=oT.getClass(a,t.keyInfo.subType,!0);if(n&&n instanceof r)n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1);else{var o=O({dependentModels:s,componentIndex:e},t.keyInfo);O(n=new r(i,this,this,o),o),n.init(i,this,this,o),n.optionUpdated(null,!0)}}else n.mergeOption({},this),n.optionUpdated({},!1);u.get(a)[e]=n,l[a][e]=n.option},this),"series"===a&&Bo(this,u.get("series"))}var l=this.option,u=this._componentsMap,n=[];Do(this),I(i,function(t,e){null!=t&&(oT.hasClass(e)?e&&n.push(e):l[e]=null==l[e]?L(t):g(l[e],t,!0))}),oT.topologicalTravel(n,oT.getAllClassMainTypes(),t,this),this._seriesIndicesMap=F(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=L(this.option);return I(i,function(t,e){if(oT.hasClass(e)){for(var n=(t=On(t)).length-1;0<=n;n--)jn(t[n])&&t.splice(n,1);i[e]=t}}),delete i[bT],i},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,r=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];if(null!=i)E(i)||(i=[i]),n=f(A(i,function(t){return a[t]}),function(t){return!!t});else if(null!=r){var s=E(r);n=f(a,function(t){return s&&0<=x(r,t.id)||!s&&t.id===r})}else if(null!=o){var l=E(o);n=f(a,function(t){return l&&0<=x(o,t.name)||!l&&t.name===o})}else n=a.slice();return Vo(n,t)},findComponents:function(e){function t(t){var e=r+"Index",n=r+"Id",i=r+"Name";return!t||null==t[e]&&null==t[n]&&null==t[i]?null:{mainType:r,index:t[e],id:t[n],name:t[i]}}function n(t){return e.filter?f(t,e.filter):t}var i=e.query,r=e.mainType,o=t(i);return n(Vo(o?this.queryComponents(o):this._componentsMap.get(r),e))},eachComponent:function(t,i,r){var e=this._componentsMap;if("function"==typeof t)r=i,i=t,e.each(function(t,n){I(t,function(t,e){i.call(r,n,t,e)})});else if(_(t))I(e.get(t),i,r);else if(b(t)){I(this.findComponents(t),i,r)}},getSeriesByName:function(e){return f(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return f(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(n,i){Wo(this),I(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){I(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,r){Wo(this),I(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(r,e,t)},this)},eachRawSeriesByType:function(t,e,n){return I(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return Wo(this),null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Wo(this),Bo(this,f(this._componentsMap.get("series"),t,e))},restoreData:function(n){var t=this._componentsMap;Bo(this,t.get("series"));var i=[];t.each(function(t,e){i.push(e)}),oT.topologicalTravel(i,oT.getAllClassMainTypes(),function(e){I(t.get(e),function(t){("series"!==e||!$o(t,n))&&t.restoreData()})})}});r(_T,uT);var wT=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],ST={};qo.prototype={constructor:qo,create:function(n,i){var r=[];I(ST,function(t){var e=t.create(n,i);r=r.concat(e||[])}),this._coordinateSystems=r},update:function(e,n){I(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},qo.register=function(t,e){ST[t]=e},qo.get=function(t){return ST[t]};var CT=I,TT=L,AT=A,DT=g,MT=/^(min|max)?(.+)$/;Go.prototype={constructor:Go,setOption:function(t,e){t&&I(On(t.series),function(t){t&&t.data&&w(t.data)&&h(t.data)}),t=TT(t,!0);var n=this._optionBackup,i=Yo.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(Qo(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=AT(e.timelineOptions,TT),this._mediaList=AT(e.mediaList,TT),this._mediaDefault=TT(e.mediaDefault),this._currentMediaIndices=[],TT(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=TT(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,r=[],o=[];if(!n.length&&!i)return o;for(var a=0,s=n.length;a<s;a++)Zo(n[a].query,t,e)&&r.push(a);return!r.length&&i&&(r=[-1]),r.length&&!Ko(r,this._currentMediaIndices)&&(o=AT(r,function(t){return TT(-1===t?i.option:n[t].option)})),this._currentMediaIndices=r,o}};var kT=I,IT=b,ET=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],LT=function(e,t){kT(oa(e.series),function(t){IT(t)&&ra(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),kT(n,function(t){kT(oa(e[t]),function(t){t&&(na(t,"axisLabel"),na(t.axisPointer,"label"))})}),kT(oa(e.parallel),function(t){var e=t&&t.parallelAxisDefault;na(e,"axisLabel"),na(e&&e.axisPointer,"label")}),kT(oa(e.calendar),function(t){ta(t,"itemStyle"),na(t,"dayLabel"),na(t,"monthLabel"),na(t,"yearLabel")}),kT(oa(e.radar),function(t){na(t,"name")}),kT(oa(e.geo),function(t){IT(t)&&(ia(t),kT(oa(t.regions),function(t){ia(t)}))}),kT(oa(e.timeline),function(t){ia(t),ta(t,"label"),ta(t,"itemStyle"),ta(t,"controlStyle",!0);var e=t.data;E(e)&&I(e,function(t){b(t)&&(ta(t,"label"),ta(t,"itemStyle"))})}),kT(oa(e.toolbox),function(t){ta(t,"iconStyle"),kT(t.feature,function(t){ta(t,"iconStyle")})}),na(aa(e.axisPointer),"label"),na(aa(e.tooltip).axisPointer,"label")},OT=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],PT=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],NT=function(n,t){LT(n,t),n.series=On(n.series),I(n.series,function(t){if(b(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var n=sa(t,"pointer.color");null!=n&&la(t,"itemStyle.normal.color",n)}ua(t)}}),n.dataRange&&(n.visualMap=n.dataRange),I(PT,function(t){var e=n[t];e&&(E(e)||(e=[e]),I(e,function(t){ua(t)}))})},RT=function(t){var o=F();t.eachSeries(function(t){var e=t.get("stack");if(e){var n=o.get(e)||o.set(e,[]),i=t.getData(),r={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;n.length&&i.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(r)}}),o.each(ca)},$T=da.prototype;$T.pure=!1;var FT={arrayRows_column:{pure:$T.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:pa},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i<n.length;i++){var r=n[i];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:ha,getItem:fa,appendData:pa},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];e.push(r?r[t]:null)}return e},appendData:function(t){var r=this._data;I(t,function(t,e){for(var n=r[e]||(r[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},original:{count:ha,getItem:fa,appendData:pa},typedArray:{persistent:!($T.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){Hb&&T(w(t),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},zT={arrayRows:ga,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:ga,original:function(t,e,n){var i=Nn(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:ga},jT={arrayRows:ma,objectRows:function(t,e){return va(t[e],this._dimensionInfos[e])},keyedColumns:ma,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&Rn(t)&&(this.hasItemOption=!0),va(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},HT=/\{@(.+?)\}/g,BT={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"color");return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:o,dataIndex:r,data:a,dataType:e,value:i,color:s,marker:so(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(i,t,e,n,r){t=t||"normal";var o=this.getData(e),a=o.getItemModel(i),s=this.getDataParams(i,e);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=a.get("normal"===t?[r||"label","formatter"]:[t,r||"label","formatter"]);return"function"==typeof l?(s.status=t,l(s)):"string"==typeof l?oo(l,s).replace(HT,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),ya(o,i,e)}):void 0},getRawValue:function(t,e){return ya(this.getData(e),t)},formatTooltip:function(){}},VT=_a.prototype;VT.perform=function(t){function e(t){return!(1<=t)&&(t=1),t}var n,i=this._upstream,r=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(n=this._plan(this.context));var a,s=e(this._modBy),l=this._modDataCount||0,u=e(t&&t.modBy),c=t&&t.modDataCount||0;s===u&&l===c||(n="reset"),(this._dirty||"reset"===n)&&(this._dirty=!1,a=Sa(this,r)),this._modBy=u,this._modDataCount=c;var d=t&&t.step;if(i?(Hb&&T(null!=i._outputDueEnd),this._dueEnd=i._outputDueEnd):(Hb&&T(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):Infinity),this._progress){var h=this._dueIndex,f=Math.min(null!=d?this._dueIndex+d:Infinity,this._dueEnd);if(!r&&(a||h<f)){var p=this._progress;if(E(p))for(var g=0;g<p.length;g++)wa(this,p[g],h,f,u,c);else wa(this,p,h,f,u,c)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;Hb&&T(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var WT=function(){function r(){return s<a?s++:null}function o(){var t=s%c*l+Math.ceil(s/c),e=a<=s?null:t<u?t:s;return s++,e}var a,s,l,u,c,d={reset:function(t,e,n,i){s=t,a=e,l=n,u=i,c=Math.ceil(u/l),d.next=1<l&&0<u?o:r}};return d}();VT.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},VT.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},VT.pipe=function(t){Hb&&T(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&((this._downstream=t)._upstream=this,t.dirty())},VT.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},VT.getUpstream=function(){return this._upstream},VT.getDownstream=function(){return this._downstream},VT.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var UT=Vn(),qT=oT.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=ba({count:Aa,reset:Da}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),Mo(this);var i=this.getInitialData(t,n);ka(i,this),this.dataTask.context.data=i,Hb&&T(i,"getInitialData returned invalid data."),UT(this).dataBeforeProcessed=i,Ca(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?yo(t):{},r=this.subType;oT.hasClass(r)&&(r+="Series"),g(t,e.getTheme().get(this.subType)),g(t,this.getDefaultOption()),Pn(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&vo(t,i,n)},mergeOption:function(t,e){t=g(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&vo(this.option,t,n),Mo(this);var i=this.getInitialData(t,e);ka(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,UT(this).dataBeforeProcessed=i,Ca(this)},fillDataTextStyle:function(t){if(t&&!w(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Pn(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Ea(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return UT(this).data},setData:function(t){var e=Ea(this);if(e){var n=e.context;n.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),n.outputData=t,e!==this.dataTask&&(n.data=t)}UT(this).data=t},getSource:function(){return Ao(this)},getRawData:function(){return UT(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(n,l){function t(t){function e(t,e){var n=u.getDimensionInfo(e);if(n&&!1!==n.otherDims.tooltip){var i=n.type,r=so({color:c,type:"subItem"}),o=(a?r+ro(n.displayName||"-")+": ":"")+ro("ordinal"===i?t+"":"time"===i?l?"":uo("yyyy/MM/dd hh:mm:ss",t):no(t));o&&s.push(o)}}var a=p(t,function(t,e,n){var i=u.getDimensionInfo(n);return t|(i&&!1!==i.tooltip&&null!=i.displayName)},0),s=[];return i.length?I(i,function(t){e(ya(u,n,t),t)}):I(t,e),(a?"<br/>":"")+s.join(a?"<br/>":", ")}function e(t){return ro(no(t))}var u=this.getData(),i=u.mapDimension("defaultedTooltip",!0),r=i.length,o=this.getRawValue(n),a=E(o),c=u.getItemVisual(n,"color");b(c)&&c.colorStops&&(c=(c.colorStops[0]||{}).color),c=c||"transparent";var s=1<r||a&&!r?t(o):e(r?ya(u,n,i[0]):a?o[0]:o),d=so(c),h=u.getName(n),f=this.name;return zn(this)||(f=""),f=f?ro(f)+(l?": ":"<br/>"):"",l?d+f+s:f+d+(h?ro(h)+": "+s:s)},isAnimationEnabled:function(){if(Wb.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=uT.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});r(qT,BT),r(qT,uT);var GT=function(){this.group=new X_,this.uid=Rr("viewComponent")};GT.prototype={constructor:GT,init:function(){},render:function(){},dispose:function(){}};var YT=GT.prototype;YT.updateView=YT.updateLayout=YT.updateVisual=function(){},Xn(GT),ti(GT,{registerWhenExtend:!0});var ZT=function(){var s=Vn();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,r=e.progressiveRender,o=e.large=n.large,a=e.progressiveRender=n.progressiveRender;return!!(i^o||r^a)&&"reset"}},XT=Vn(),KT=ZT();La.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){Pa(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){Pa(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var QT=La.prototype;QT.updateView=QT.updateLayout=QT.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Xn(La,["dispose"]),ti(La,{registerWhenExtend:!0}),La.markUpdateMethod=function(t,e){XT(t).updateMethod=e};var JT={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},tA="\0__throttleOriginMethod",eA="\0__throttleRate",nA="\0__throttleType",iA={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),r=e.get(i)||e.getColorFromPalette(e.name,null,t.getSeriesCount());if(n.setVisual("color",r),!t.isSeriesFiltered(e)){"function"!=typeof r||r instanceof CC||n.each(function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))});var o=function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}
|
|
;return{dataEach:n.hasItemOption?o:null}}}},rA={toolbox:{brush:{title:{rect:"\u77e9\u5f62\u9009\u62e9",polygon:"\u5708\u9009",lineX:"\u6a2a\u5411\u9009\u62e9",lineY:"\u7eb5\u5411\u9009\u62e9",keep:"\u4fdd\u6301\u9009\u62e9",clear:"\u6e05\u9664\u9009\u62e9"}},dataView:{title:"\u6570\u636e\u89c6\u56fe",lang:["\u6570\u636e\u89c6\u56fe","\u5173\u95ed","\u5237\u65b0"]},dataZoom:{title:{zoom:"\u533a\u57df\u7f29\u653e",back:"\u533a\u57df\u7f29\u653e\u8fd8\u539f"}},magicType:{title:{line:"\u5207\u6362\u4e3a\u6298\u7ebf\u56fe",bar:"\u5207\u6362\u4e3a\u67f1\u72b6\u56fe",stack:"\u5207\u6362\u4e3a\u5806\u53e0",tiled:"\u5207\u6362\u4e3a\u5e73\u94fa"}},restore:{title:"\u8fd8\u539f"},saveAsImage:{title:"\u4fdd\u5b58\u4e3a\u56fe\u7247",lang:["\u53f3\u952e\u53e6\u5b58\u4e3a\u56fe\u7247"]}},series:{typeNames:{pie:"\u997c\u56fe",bar:"\u67f1\u72b6\u56fe",line:"\u6298\u7ebf\u56fe",scatter:"\u6563\u70b9\u56fe",effectScatter:"\u6d9f\u6f2a\u6563\u70b9\u56fe",radar:"\u96f7\u8fbe\u56fe",tree:"\u6811\u56fe",treemap:"\u77e9\u5f62\u6811\u56fe",boxplot:"\u7bb1\u578b\u56fe",candlestick:"K\u7ebf\u56fe",k:"K\u7ebf\u56fe",heatmap:"\u70ed\u529b\u56fe",map:"\u5730\u56fe",parallel:"\u5e73\u884c\u5750\u6807\u56fe",lines:"\u7ebf\u56fe",graph:"\u5173\u7cfb\u56fe",sankey:"\u6851\u57fa\u56fe",funnel:"\u6f0f\u6597\u56fe",gauge:"\u4eea\u8868\u76d8\u56fe",pictorialBar:"\u8c61\u5f62\u67f1\u56fe",themeRiver:"\u4e3b\u9898\u6cb3\u6d41\u56fe",sunburst:"\u65ed\u65e5\u56fe"}},aria:{general:{withTitle:"\u8fd9\u662f\u4e00\u4e2a\u5173\u4e8e\u201c{title}\u201d\u7684\u56fe\u8868\u3002",withoutTitle:"\u8fd9\u662f\u4e00\u4e2a\u56fe\u8868\uff0c"},series:{single:{prefix:"",withName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\uff0c\u8868\u793a{seriesName}\u3002",withoutName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\u3002"},multiple:{prefix:"\u5b83\u7531{seriesCount}\u4e2a\u56fe\u8868\u7cfb\u5217\u7ec4\u6210\u3002",withName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a\u8868\u793a{seriesName}\u7684{seriesType}\uff0c",withoutName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a{seriesType}\uff0c",separator:{middle:"\uff1b",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636e\u662f\u2014\u2014",partialData:"\u5176\u4e2d\uff0c\u524d{displayCnt}\u9879\u662f\u2014\u2014",withName:"{name}\u7684\u6570\u636e\u662f{value}",withoutName:"{value}",separator:{middle:"\uff0c",end:""}}}},oA=function(t,e){function c(t,e){if("string"!=typeof t)return t;var n=t;return I(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function d(t){var e=o.get(t);if(null!=e)return e;for(var n=t.split("."),i=rA.aria,r=0;r<n.length;++r)i=i[n[r]];return i}function n(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function h(t){return rA.series.typeNames[t]||"\u81ea\u5b9a\u4e49\u56fe"}var o=e.getModel("aria");if(o.get("show"))if(o.get("description"))t.setAttribute("aria-label",o.get("description"));else{var f=0;e.eachSeries(function(){++f},this);var i,p=o.get("data.maxCount")||10,r=o.get("series.maxCount")||10,g=Math.min(f,r);if(!(f<1)){var a=n();i=a?c(d("general.withTitle"),{title:a}):d("general.withoutTitle");var m=[];i+=c(d(1<f?"series.multiple.prefix":"series.single.prefix"),{seriesCount:f}),e.eachSeries(function(t,e){if(e<g){var n,i=t.get("name"),r="series."+(1<f?"multiple":"single")+".";n=c(n=d(i?r+"withName":r+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:h(t.subType)});var o=t.getData();(window.data=o).count()>p?n+=c(d("data.partialData"),{displayCnt:p}):n+=d("data.allData");for(var a=[],s=0;s<o.count();s++)if(s<p){var l=o.getName(s),u=ya(o,s);a.push(c(d(l?"data.withName":"data.withoutName"),{name:l,value:u}))}n+=a.join(d("data.separator.middle"))+d("data.separator.end"),m.push(n)}}),i+=m.join(d("series.multiple.separator.middle"))+d("series.multiple.separator.end"),t.setAttribute("aria-label",i)}}},aA=Math.PI,sA=function(i,t){D(t=t||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var r=new yC({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),o=new wC({shape:{startAngle:-aA/2,endAngle:-aA/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),a=new yC({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*aA/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*aA/2}).delay(300).start("circularInOut");var e=new X_;return e.add(o),e.add(a),e.add(r),e.resize=function(){var t=i.getWidth()/2,e=i.getHeight()/2;o.setShape({cx:t,cy:e});var n=o.shape.r;a.setShape({x:t-n,y:e-n,width:2*n,height:2*n}),r.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},e.resize(),e},lA=ja.prototype;lA.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},lA.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},lA.getPipeline=function(t){return this._pipelineMap.get(t)},lA.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},lA.restorePipelines=function(t){var i=this,r=i._pipelineMap=F();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Qa(i,t,t.dataTask)})},lA.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),r=this.api;I(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&Ba(this,t,e,i,r),t.overallReset&&Va(this,t,e,i,r)},this)},lA.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,Qa(this,e,r)},lA.performDataProcessorTasks=function(t,e){Ha(this,this._dataProcessorHandlers,t,e,{block:!0})},lA.performVisualTasks=function(t,e,n){Ha(this,this._visualHandlers,t,e,n)},lA.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},lA.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var uA=lA.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},cA=Xa(0);ja.wrapStageHandler=function(t,e){return m(t)&&(t={overallReset:t,seriesType:Ja(t)}),t.uid=Rr("stageHandler"),e&&(t.visualType=e),t};var dA,hA={},fA={};ts(hA,_T),ts(fA,Uo),hA.eachSeriesByType=hA.eachRawSeriesByType=function(t){dA=t},hA.eachComponent=function(t){"series"===t.mainType&&t.subType&&(dA=t.subType)};var pA=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],gA={color:pA,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],pA]},mA="#eee",vA=function(){return{axisLine:{lineStyle:{color:mA}},axisTick:{lineStyle:{color:mA}},axisLabel:{textStyle:{color:mA}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:mA}}}},yA=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],xA={color:yA,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:mA},crossStyle:{color:mA}}},legend:{textStyle:{color:mA}},textStyle:{color:mA},title:{textStyle:{color:mA}},toolbox:{iconStyle:{normal:{borderColor:mA}}},dataZoom:{textStyle:{color:mA}},visualMap:{textStyle:{color:mA}},timeline:{lineStyle:{color:mA},itemStyle:{normal:{color:yA[1]}},label:{normal:{textStyle:{color:mA}}},controlStyle:{normal:{color:mA,borderColor:mA}}},timeAxis:vA(),logAxis:vA(),valueAxis:vA(),categoryAxis:vA(),line:{symbol:"circle"},graph:{color:yA},gauge:{title:{textStyle:{color:mA}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};xA.categoryAxis.splitLine.show=!1,oT.extend({type:"dataset",defaultOption:{seriesLayoutBy:vT,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){To(this)}}),GT.extend({type:"dataset"});var bA=T,_A=I,wA=m,SA=b,CA=oT.parseClassType,TA="4.1.0",AA={zrender:"4.0.4"},DA=1,MA=1e3,kA=5e3,IA=1e3,EA=2e3,LA=3e3,OA={PROCESSOR:{FILTER:MA,STATISTIC:kA},VISUAL:{LAYOUT:IA,GLOBAL:EA,CHART:LA,COMPONENT:4e3,BRUSH:5e3}},PA="__flagInMainProcess",NA="__optionUpdated",RA=/^[a-zA-Z0-9_]+$/;ns.prototype.on=es("on"),ns.prototype.off=es("off"),ns.prototype.one=es("one"),r(ns,d_);var $A=is.prototype;$A._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[NA]){var e=this[NA].silent;this[PA]=!0,os(this),FA.update.call(this),this[PA]=!1,this[NA]=!1,us.call(this,e),cs.call(this,e)}else if(t.unfinished){var n=DA,i=this._model,r=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),ss(this,i),t.performVisualTasks(i),ms(this,this._model,r,"remain"),n-=+new Date-o}while(0<n&&t.unfinished);t.unfinished||this._zr.flush()}}},$A.getDom=function(){return this._dom},$A.getZr=function(){return this._zr},$A.setOption=function(t,e,n){var i;if(Hb&&bA(!this[PA],"`setOption` should not be called during main process."),SA(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[PA]=!0,!this._model||e){var r=new Go(this._api),o=this._theme,a=this._model=new _T(null,null,o,r);a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,VA),n?(this[NA]={silent:i},this[PA]=!1):(os(this),FA.update.call(this),this._zr.flush(),this[NA]=!1,this[PA]=!1,us.call(this,i),cs.call(this,i))},$A.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},$A.getModel=function(){return this._model},$A.getOption=function(){return this._model&&this._model.getOption()},$A.getWidth=function(){return this._zr.getWidth()},$A.getHeight=function(){return this._zr.getHeight()},$A.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},$A.getRenderedCanvas=function(t){if(Wb.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},$A.getSvgDataUrl=function(){if(Wb.svgSupported){var t=this._zr;return I(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},$A.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;_A(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return _A(i,function(t){t.group.ignore=!1}),o},$A.getConnectedDataURL=function(i){if(Wb.canvasSupported){var r=this.group,o=Math.min,a=Math.max,t=Infinity;if(ZA[r]){var s=t,l=t,u=-t,c=-t,d=[],n=i&&i.pixelRatio||1;I(YA,function(t){if(t.group===r){var e=t.getRenderedCanvas(L(i)),n=t.getDom().getBoundingClientRect();s=o(n.left,s),l=o(n.top,l),u=a(n.right,u),c=a(n.bottom,c),d.push({dom:e,left:n.left,top:n.top})}});var e=(u*=n)-(s*=n),h=(c*=n)-(l*=n),f=e_();f.width=e,f.height=h;var p=Mn(f);return _A(d,function(t){var e=new an({style:{x:t.left*n-s,y:t.top*n-l,image:t.dom}});p.add(e)}),p.refreshImmediately(),f.toDataURL("image/"+(i&&i.type||"png"))}return this.getDataURL(i)}},$A.convertToPixel=y(rs,"convertToPixel"),$A.convertFromPixel=y(rs,"convertFromPixel"),$A.containPixel=function(t,r){var o;return I(t=Wn(this._model,t),function(t,i){0<=i.indexOf("Models")&&I(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)o|=!!e.containPoint(r);else if("seriesModels"===i){var n=this._chartsMap[t.__viewId];n&&n.containPoint?o|=n.containPoint(r,t):Hb&&console.warn(i+": "+(n?"The found component do not support containPoint.":"No view mapping to the found component."))}else Hb&&console.warn(i+": containPoint is not supported")},this)},this),!!o},$A.getVisual=function(t,e){var n=(t=Wn(this._model,t,{defaultMainType:"series"})).seriesModel;Hb&&(n||console.warn("There is no specified seires model"));var i=n.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=r?i.getItemVisual(r,e):i.getVisual(e)},$A.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},$A.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var FA={prepareAndUpdate:function(t){os(this),FA.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),r.create(e,n),o.performDataProcessorTasks(e,t),ss(this,e),r.update(e,n),fs(e),o.performVisualTasks(e,t),ps(this,e,n,t);var a=e.get("backgroundColor")||"transparent";if(Wb.canvasSupported)i.setBackgroundColor(a);else{var s=Pt(a);a=Vt(s,"rgb"),0===s[3]&&(a="transparent")}vs(e,n)}},updateTransform:function(r){var o=this._model,a=this,s=this._api;if(o){var l=[];o.eachComponent(function(t,e){var n=a.getViewOfComponentModel(e);if(n&&n.__alive)if(n.updateTransform){var i=n.updateTransform(e,o,s,r);i&&i.update&&l.push(n)}else l.push(n)});var i=F();o.eachSeries(function(t){var e=a._chartsMap[t.__viewId];if(e.updateTransform){var n=e.updateTransform(t,o,s,r);n&&n.update&&i.set(t.uid,1)}else i.set(t.uid,1)}),fs(o),this._scheduler.performVisualTasks(o,r,{setDirty:!0,dirtyMap:i}),ms(a,o,s,r,i),vs(o,this._api)}},updateView:function(t){var e=this._model;e&&(La.markUpdateMethod(t,"updateView"),fs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),ps(this,this._model,this._api,t),vs(e,this._api))},updateVisual:function(t){FA.update.call(this,t)},updateLayout:function(t){FA.update.call(this,t)}};$A.resize=function(t){Hb&&bA(!this[PA],"`resize` should not be called during main process."),this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[PA]=!0,n&&os(this),FA.update.call(this),this[PA]=!1,us.call(this,i),cs.call(this,i)}},$A.showLoading=function(t,e){if(SA(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),GA[t]){var n=GA[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}else Hb&&console.warn("Loading effects "+t+" not exists.")},$A.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},$A.makeActionFromEvent=function(t){var e=O({},t);return e.type=HA[t.type],e},$A.dispatchAction=function(t,e){SA(e)||(e={silent:!!e}),jA[t.type]&&this._model&&(this[PA]?this._pendingActions.push(t):(ls.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&Wb.browser.weChat&&this._throttledZrFlush(),us.call(this,e.silent),cs.call(this,e.silent)))},$A.appendData=function(t){var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);Hb&&bA(t.data&&n),n.appendData(t),this._scheduler.unfinished=!0},$A.on=es("on"),$A.off=es("off"),$A.one=es("one");var zA=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];$A._initEvents=function(){_A(zA,function(o){this._zr.on(o,function(t){var e,n=this.getModel(),i=t.target;if("globalout"===o)e={};else if(i&&null!=i.dataIndex){var r=i.dataModel||n.getSeriesByIndex(i.seriesIndex);e=r&&r.getDataParams(i.dataIndex,i.dataType)||{}}else i&&i.eventData&&(e=O({},i.eventData));e&&(e.event=t,e.type=o,this.trigger(o,e))},this)},this),_A(HA,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},$A.isDisposed=function(){return this._disposed},$A.clear=function(){this.setOption({series:[]},!0)},$A.dispose=function(){if(this._disposed)Hb&&console.warn("Instance "+this.id+" has been disposed");else{this._disposed=!0,qn(this.getDom(),QA,"");var e=this._api,n=this._model;_A(this._componentsViews,function(t){t.dispose(n,e)}),_A(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete YA[this.id]}},r(is,d_);var jA={},HA={},BA=[],VA=[],WA=[],UA=[],qA={},GA={},YA={},ZA={},XA=new Date-0,KA=new Date-0,QA="_echarts_instance_",JA={},tD=Ts;$s(EA,iA),Is(NT),Es(kA,RT),zs("default",sA),Os({type:"highlight",event:"highlight",update:"highlight"},j),Os({type:"downplay",event:"downplay",update:"downplay"},j),ks("light",gA),ks("dark",xA);var eD={};Ys.prototype={constructor:Ys,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],r=[];for(Zs(t,{},i,"_oldKeyGetter",this),Zs(e,n,r,"_newKeyGetter",this),o=0;o<t.length;o++){if(null!=(s=n[a=i[o]]))(u=s.length)?(1===u&&(n[a]=null),s=s.unshift()):n[a]=null,this._update&&this._update(s,o);else this._remove&&this._remove(o)}for(var o=0;o<r.length;o++){var a=r[o];if(n.hasOwnProperty(a)){var s;if(null==(s=n[a]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var nD=F(["tooltip","label","itemName","itemId","seriesName"]),iD=b,rD="undefined",oD="e\0\0",aD={"float":typeof Float64Array===rD?Array:Float64Array,"int":typeof Int32Array===rD?Array:Int32Array,ordinal:Array,number:Array,time:Array},sD=typeof Uint32Array===rD?Array:Uint32Array,lD=typeof Uint16Array===rD?Array:Uint16Array,uD=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],cD=["_extent","_approximateExtent","_rawExtent"],dD=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},o=0;o<t.length;o++){var a=t[o];_(a)&&(a={name:a});var s=a.name;a.type=a.type||"float",a.coordDim||(a.coordDim=s,a.coordDimIndex=0),a.otherDims=a.otherDims||{},i.push(s),(n[s]=a).index=o,a.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=Xs(this),this._invertedIndicesMap=r,this._calculationInfo={}},hD=dD.prototype;hD.type="list",hD.hasItemOption=!0,hD.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},hD.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},hD.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},hD.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return!0===e?(i||[]).slice():i&&i[e]},hD.initData=function(t,e,n){var i=Co.isInstance(t)||P(t);if(i&&(t=new da(t,this.dimensions.length)),Hb&&!i&&("function"!=typeof t.getItem||"function"!=typeof t.count))throw new Error("Inavlid data provider.");this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=jT[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},hD.getProvider=function(){return this._rawData},hD.appendData=function(t){Hb&&T(!this._indices,"appendData can only be called on raw data.");var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},hD._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=a.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,d=this._rawExtent,h=this._nameRepeatCount={},f=this._chunkCount,p=f-1,g=0;g<s;g++){d[A=a[g]]||(d[A]=dl());var m=l[A];0===m.otherDims.itemName&&(n=this._nameDimIdx=g),0===m.otherDims.itemId&&(this._idDimIdx=g);var v=aD[m.type];o[A]||(o[A]=[]);var y=o[A][p];if(y&&y.length<i){for(var x=new v(Math.min(e-p*i,i)),b=0;b<y.length;b++)x[b]=y[b];o[A][p]=x}for(var _=f*i;_<e;_+=i)o[A].push(new v(Math.min(e-_,i)));this._chunkCount=o[A].length}for(var w=new Array(s),S=t;S<e;S++){w=r.getItem(S,w);var C=Math.floor(S/i),T=S%i;for(_=0;_<s;_++){var A,D=o[A=a[_]][C],M=this._dimValueGetter(w,A,S,_);D[T]=M;var k=d[A];M<k[0]&&(k[0]=M),M>k[1]&&(k[1]=M)}if(!r.pure){var I=u[S];if(w&&null==I)if(null!=w.name)u[S]=I=w.name;else if(null!=n){var E=a[n],L=o[E][C];if(L){I=L[T];var O=l[E].ordinalMeta;O&&O.categories.length&&(I=O.categories[I])}}var P=null==w?null:w.id;null==P&&null!=I&&(h[I]=h[I]||0,0<h[P=I]&&(P+="__ec__"+h[I]),h[I]++),null!=P&&(c[S]=P)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},nl(this)}},hD.count=function(){return this._count},hD.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){r=new e(n);for(var i=0;i<n;i++)r[i]=t[i]}else r=new e(t.buffer,0,n)}else{var r=new(e=Js(this))(this.count());for(i=0;i<r.length;i++)r[i]=i}return r},hD.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return n[t][i][r]},hD.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;var n=this._storage[t];if(!n)return NaN;var i=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return n[i][r]},hD._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},hD.getValues=function(t,e){var n=[];E(t)||(e=t,t=this.dimensions);for(var i=0,r=t.length;i<r;i++)n.push(this.get(t[i],e));return n},hD.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,i=0,r=e.length;i<r;i++)if("ordinal"!==n[e[i]].type&&isNaN(this.get(e[i],t)))return!1;return!0},hD.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=dl();if(!e)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var o=(i=n)[0],a=i[1],s=0;s<r;s++){var l=this._getFast(t,this.getRawIndex(s));l<o&&(o=l),a<l&&(a=l)}return i=[o,a],this._extent[t]=i},hD.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},hD.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},hD.getCalculationInfo=function(t){return this._calculationInfo[t]},hD.setCalculationInfo=function(t,e){iD(t)?O(this._calculationInfo,t):this._calculationInfo[t]=e},hD.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var r=this.get(t,n);isNaN(r)||(e+=r)}return e},hD.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},hD.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t];if(Hb&&!n)throw new Error("Do not supported yet");var i=n[e];return null==i||isNaN(i)?-1:i},hD.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},hD.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;i<=r;){var o=(i+r)/2|0;if(e[o]<t)i=o+1;else{if(!(e[o]>t))return o;r=o-1}}return-1},hD.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=Infinity);for(var r=Number.MAX_VALUE,o=-1,a=0,s=this.count();a<s;a++){var l=e-this.get(t,a),u=Math.abs(l);l<=n&&u<=r&&((u<r||0<=l&&o<0)&&(r=u,o=l,i.length=0),i.push(a))}return i},hD.getRawIndex=rl,hD.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},hD.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||il(this,this._nameDimIdx,e)||""},hD.getId=function(t){return al(this,this.getRawIndex(t))},hD.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=A(sl(t),this.getDimension,this),Hb&&ll(this,t);for(var r=t.length,o=0;o<this.count();o++)switch(r){case 0:e.call(n,o);break;case 1:e.call(n,this.get(t[0],o),o);break;case 2:e.call(n,this.get(t[0],o),this.get(t[1],o),o);break;default:for(var a=0,s=[];a<r;a++)s[a]=this.get(t[a],o);s[a]=o,e.apply(n,s)}}},hD.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=A(sl(t),this.getDimension,this),Hb&&ll(this,t);for(var r=this.count(),o=new(Js(this))(r),a=[],s=t.length,l=0,u=t[0],c=0;c<r;c++){var d,h=this.getRawIndex(c);if(0===s)d=e.call(n,c);else if(1===s){var f=this._getFast(u,h);d=e.call(n,f,c)}else{for(var p=0;p<s;p++)a[p]=this._getFast(u,h);a[p]=c,d=e.apply(n,a)}d&&(o[l++]=h)}return l<r&&(this._indices=o),this._count=l,this._extent={},this.getRawIndex=this._indices?ol:rl,this}},hD.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);Hb&&ll(this,e);var i=e.length;if(i){var r=this.count(),o=new(Js(this))(r),a=0,s=e[0],l=t[s][0],u=t[s][1],c=!1;if(!this._indices){var d=0;if(1===i){for(var h=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=h[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){(l<=(_=p[m])&&_<=u||isNaN(_))&&(o[a++]=d),d++}c=!0}else if(2===i){h=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=h[f];var b=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var _=p[m],w=b[m];(l<=_&&_<=u||isNaN(_))&&(y<=w&&w<=x||isNaN(w))&&(o[a++]=d),d++}}c=!0}}if(!c)if(1===i)for(m=0;m<r;m++){var S=this.getRawIndex(m);(l<=(_=this._getFast(s,S))&&_<=u||isNaN(_))&&(o[a++]=S)}else for(m=0;m<r;m++){var C=!0;for(S=this.getRawIndex(m),f=0;f<i;f++){var T=e[f];((_=this._getFast(n,S))<t[T][0]||_>t[T][1])&&(C=!1)}C&&(o[a++]=this.getRawIndex(m))}return a<r&&(this._indices=o),this._count=a,this._extent={},this.getRawIndex=this._indices?ol:rl,this}}},hD.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},hD.map=function(t,e,n,i){n=n||i||this,t=A(sl(t),this.getDimension,this),Hb&&ll(this,t);var r=ul(this,t);r._indices=this._indices,r.getRawIndex=r._indices?ol:rl;for(var o=r._storage,a=[],s=this._chunkSize,l=t.length,u=this.count(),c=[],d=r._rawExtent,h=0;h<u;h++){for(var f=0;f<l;f++)c[f]=this.get(t[f],h);c[l]=h;var p=e&&e.apply(n,c);if(null!=p){"object"!=typeof p&&(a[0]=p,p=a);for(var g=this.getRawIndex(h),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var x=t[y],b=p[y],_=d[x],w=o[x];w&&(w[m][v]=b),b<_[0]&&(_[0]=b),b>_[1]&&(_[1]=b)}}}return r},hD.downSample=function(t,e,n,i){for(var r=ul(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),c=this._chunkSize,d=r._rawExtent[t],h=new(Js(this))(u),f=0,p=0;p<u;p+=s){u-p<s&&(s=u-p,a.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/c),y=m%c;a[g]=l[v][y]}var x=n(a),b=this.getRawIndex(Math.min(p+i(a,x)||0,u-1)),_=b%c;(l[Math.floor(b/c)][_]=x)<d[0]&&(d[0]=x),x>d[1]&&(d[1]=x),h[f++]=b}return r._count=f,r._indices=h,r.getRawIndex=ol,r},hD.getItemModel=function(t){var e=this.hostModel;return new Or(this.getRawDataItem(t),e,e&&e.ecModel)},hD.diff=function(e){var n=this;return new Ys(e?e.getIndices():[],this.getIndices(),function(t){return al(e,t)},function(t){return al(n,t)})},hD.getVisual=function(t){var e=this._visual;return e&&e[t]},hD.setVisual=function(t,e){if(iD(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},hD.setLayout=function(t,e){if(iD(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},hD.getLayout=function(t){return this._layout[t]},hD.getItemLayout=function(t){return this._itemLayouts[t]},hD.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?O(this._itemLayouts[t]||{},e):e},hD.clearItemLayouts=function(){this._itemLayouts.length=0},hD.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},hD.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,iD(e))for(var o in e)e.hasOwnProperty(o)&&(i[o]=e[o],r[o]=!0);else i[e]=n,r[e]=!0},hD.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var fD=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};hD.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(fD,e)),this._graphicEls[t]=e},hD.getItemGraphicEl=function(t){return this._graphicEls[t]},hD.eachItemGraphicEl=function(n,i){I(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},hD.cloneShallow=function(t){if(!t){var e=A(this.dimensions,this.getDimensionInfo,this);t=new dD(e,this.hostModel)}if(t._storage=this._storage,el(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ol:rl,t},hD.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(l(arguments)))})},hD.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],hD.CHANGABLE_METHODS=["filterSelf","selectRange"];var pD=function(t,e){return hl((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};_l.prototype.parse=function(t){return t},_l.prototype.getSetting=function(t){return this._setting[t]},_l.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},_l.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},_l.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},_l.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},_l.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},_l.prototype.getExtent=function(){return this._extent.slice()},_l.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},_l.prototype.isBlank=function(){return this._isBlank},_l.prototype.setBlank=function(t){this._isBlank=t},_l.prototype.getLabel=null,Xn(_l),ti(_l,{registerWhenExtend:!0}),wl.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&A(n,Cl);return new wl({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var gD=wl.prototype;gD.getOrdinal=function(t){return Sl(this).get(t)},gD.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=Sl(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var mD=_l.prototype,vD=_l.extend({type:"ordinal",init:function(t,e){t&&!E(t)||(t=new wl({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),mD.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return mD.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(mD.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:j,niceExtent:j});vD.create=function(){return new vD
|
|
};var yD=Br,xD=Br,bD=_l.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),bD.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Al(t)},getTicks:function(){return kl(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Ur(t)||0:"auto"===n&&(n=this._intervalPrecision),no(t=xD(t,n,!0))},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var o=Tl(i,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=xD(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=xD(Math.ceil(e[1]/r)*r))}});bD.create=function(){return new bD};var _D="__ec_stack_",wD=.5,SD="undefined"!=typeof Float32Array?Float32Array:Array,CD={seriesType:"bar",plan:ZT(),reset:function(t){function e(t,e){for(var n,i=new SD(2*t.count),r=[],o=[],a=0;null!=(n=t.next());)o[f]=e.get(c,n),o[1-f]=e.get(d,n),r=s.dataToPoint(o,null,r),i[a++]=r[0],i[a++]=r[1];e.setLayout({largePoints:i,barWidth:p,valueAxisStart:jl(l,u,!1),valueAxisHorizontal:h})}if(Fl(t)&&zl(t)){var n=t.getData(),s=t.coordinateSystem,l=s.getBaseAxis(),u=s.getOtherAxis(l),c=n.mapDimension(u.dim),d=n.mapDimension(l.dim),h=u.isHorizontal(),f=h?0:1,p=Rl(Pl([t]),l,t).width;return wD<p||(p=wD),{progress:e}}}},TD=bD.prototype,AD=Math.ceil,DD=Math.floor,MD=1e3,kD=60*MD,ID=60*kD,ED=24*ID,LD=function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n},OD=bD.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return uo(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=ED,e[1]+=ED),e[1]===-Infinity&&e[0]===Infinity){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-ED}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=Br(DD(e[0]/i)*i)),t.fixMax||(e[1]=Br(AD(e[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,r=i[1]-i[0],o=r/t;null!=e&&o<e&&(o=e),null!=n&&n<o&&(o=n);var a=PD.length,s=LD(PD,o,0,a),l=PD[Math.min(s,a-1)],u=l[1];"year"===l[0]&&(u*=Jr(r/u/t,!0));var c=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round(AD((i[0]-c)/u)*u+c),Math.round(DD((i[1]-c)/u)*u+c)];Ml(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(t){return+Xr(t)}});I(["contain","normalize"],function(e){OD.prototype[e]=function(t){return TD[e].call(this,this.parse(t))}});var PD=[["hh:mm:ss",MD],["hh:mm:ss",5*MD],["hh:mm:ss",10*MD],["hh:mm:ss",15*MD],["hh:mm:ss",30*MD],["hh:mm\nMM-dd",kD],["hh:mm\nMM-dd",5*kD],["hh:mm\nMM-dd",10*kD],["hh:mm\nMM-dd",15*kD],["hh:mm\nMM-dd",30*kD],["hh:mm\nMM-dd",ID],["hh:mm\nMM-dd",2*ID],["hh:mm\nMM-dd",6*ID],["hh:mm\nMM-dd",12*ID],["MM-dd\nyyyy",ED],["MM-dd\nyyyy",2*ED],["MM-dd\nyyyy",3*ED],["MM-dd\nyyyy",4*ED],["MM-dd\nyyyy",5*ED],["MM-dd\nyyyy",6*ED],["week",7*ED],["MM-dd\nyyyy",10*ED],["week",14*ED],["week",21*ED],["month",31*ED],["week",42*ED],["month",62*ED],["week",42*ED],["quarter",380*ED/4],["month",31*ED*4],["month",31*ED*5],["half-year",380*ED/2],["month",31*ED*8],["month",31*ED*10],["year",380*ED]];OD.create=function(t){return new OD({useUTC:t.ecModel.get("useUTC")})};var ND=_l.prototype,RD=bD.prototype,$D=Ur,FD=Br,zD=Math.floor,jD=Math.ceil,HD=Math.pow,BD=Math.log,VD=_l.extend({type:"log",base:10,$constructor:function(){_l.apply(this,arguments),this._originalScale=new bD},getTicks:function(){var n=this._originalScale,i=this._extent,r=n.getExtent();return A(RD.getTicks.call(this),function(t){var e=Br(HD(this.base,t));return e=t===i[0]&&n.__fixMin?Hl(e,r[0]):e,e=t===i[1]&&n.__fixMax?Hl(e,r[1]):e},this)},getLabel:RD.getLabel,scale:function(t){return t=ND.scale.call(this,t),HD(this.base,t)},setExtent:function(t,e){var n=this.base;t=BD(t)/BD(n),e=BD(e)/BD(n),RD.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=ND.getExtent.call(this);e[0]=HD(t,e[0]),e[1]=HD(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=Hl(e[0],i[0])),n.__fixMax&&(e[1]=Hl(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=BD(t[0])/BD(e),t[1]=BD(t[1])/BD(e),ND.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===Infinity||n<=0)){var i=Kr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;var r=[Br(jD(e[0]/i)*i),Br(zD(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(t){RD.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});I(["contain","normalize"],function(e){VD.prototype[e]=function(t){return t=BD(t)/BD(this.base),ND[e].call(this,t)}}),VD.create=function(){return new VD};var WD={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!C(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!C(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:j,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},UD=Ui({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),qD=Ui({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),GD=Ui({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),h=Math.cos(u),f=.6*a,p=.7*a;t.moveTo(n-c,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+c-d*f,l+s+h*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-c+d*f,l+s+h*f,n-c,l+s),t.closePath()}}),YD=Ui({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),ZD={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},XD={};I({line:xC,rect:yC,roundRect:yC,square:yC,circle:uC,diamond:qD,pin:GD,arrow:YD,triangle:UD},function(t,e){XD[e]=new t});var KD=Ui({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,r=XD[i];"none"!==e.symbolType&&(r||(r=XD[i="rect"]),ZD[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n))}}),QD={isDimensionStacked:ml,enableDataStack:gl,getStackedDimension:vl},JD=(Object.freeze||Object)({createList:Jl,getLayoutRect:po,dataStack:QD,createScale:tu,mixinAxisModelCommonMethods:eu,completeDimensions:hl,createDimensions:pD,createSymbol:Ql}),tM=1e-8;ru.prototype={constructor:ru,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],o=[],a=this.geometries,s=0;s<a.length;s++){if("polygon"===a[s].type)gi(a[s].exterior,r,o),at(n,n,r),st(i,i,o)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new ie(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,r=n.length;i<r;i++)if("polygon"===n[i].type){var o=n[i].exterior,a=n[i].interiors;if(iu(o,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(iu(a[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),o=r.width/r.height;n?i||(i=n/o):n=o*i;for(var a=new ie(t,e,n,i),s=r.calculateTransform(a),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var c=l[u].exterior,d=l[u].interiors,h=0;h<c.length;h++)ot(c[h],c[h],s);for(var f=0;f<(d?d.length:0);f++)for(h=0;h<d[f].length;h++)ot(d[f][h],d[f][h],s)}(r=this._rect).copy(a),this.center=[r.x+r.width/2,r.y+r.height/2]}};var eM=function(t){return ou(t),A(f(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&I(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new ru(e.name,r,e.cp);return o.properties=e,o})},nM=Vn(),iM=[0,1],rM=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};rM.prototype={constructor:rM,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return n<=t&&t<=i},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return qr(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&wu(n=n.slice(),i.count()),jr(t,iM,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&wu(n=n.slice(),i.count());var r=jr(t,n,iM,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=lu(this,e),i=A(n.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),r=e.get("alignWithLabel");return Su(this,i,n.tickCategoryInterval,r,t.clamp),i},getViewLabels:function(){return su(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return vu(this)}};var oM=eM,aM={};I(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){aM[t]=i_[t]}),qT.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t){if(Hb){var e=t.coordinateSystem;if("polar"!==e&&"cartesian2d"!==e)throw new Error("Line not support coordinateSystem besides cartesian and polar")}return yl(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:Infinity}});var sM=Tu.prototype,lM=Tu.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};sM._createSymbol=function(t,e,n,i,r){this.removeAll();var o=Ql(t,-1,-1,2,2,e.getItemVisual(n,"color"),r);o.attr({z2:100,culling:!0,scale:Au(i)}),o.drift=Du,this._symbolType=t,this.add(o)},sM.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},sM.getSymbolPath=function(){return this.childAt(0)},sM.getScale=function(){return this.childAt(0).scale},sM.highlight=function(){this.childAt(0).trigger("emphasis")},sM.downplay=function(){this.childAt(0).trigger("normal")},sM.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},sM.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},sM.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,o=lM(t,e),a=i!==this._symbolType;if(a){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,o,s)}else{(l=this.childAt(0)).silent=!1,Cr(l,{scale:Au(o)},r,e)}if(this._updateCommon(t,e,o,n),a){var l=this.childAt(0),u=n&&n.fadeIn,c={scale:l.scale.slice()};u&&(c.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Tr(l,c,r,e)}this._seriesModel=r};var uM=["itemStyle"],cM=["emphasis","itemStyle"],dM=["label"],hM=["emphasis","label"];sM._updateCommon=function(e,t,n,i){function r(t){return _?e.getName(t):Cu(e,t)}var o=this.childAt(0),a=e.hostModel,s=e.getItemVisual(t,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var l=i&&i.itemStyle,u=i&&i.hoverItemStyle,c=i&&i.symbolRotate,d=i&&i.symbolOffset,h=i&&i.labelModel,f=i&&i.hoverLabelModel,p=i&&i.hoverAnimation,g=i&&i.cursorStyle;if(!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(t);l=m.getModel(uM).getItemStyle(["color"]),u=m.getModel(cM).getItemStyle(),c=m.getShallow("symbolRotate"),d=m.getShallow("symbolOffset"),h=m.getModel(dM),f=m.getModel(hM),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else u=O({},u);var v=o.style;o.attr("rotation",(c||0)*Math.PI/180||0),d&&o.attr("position",[Hr(d[0],n[0]),Hr(d[1],n[1])]),g&&o.attr("cursor",g),o.setColor(s,i&&i.symbolInnerColor),o.setStyle(l);var y=e.getItemVisual(t,"opacity");null!=y&&(v.opacity=y);var x=e.getItemVisual(t,"liftZ"),b=o.__z2Origin;null!=x?null==b&&(o.__z2Origin=o.z2,o.z2+=x):null!=b&&(o.z2=b,o.__z2Origin=null);var _=i&&i.useNameLabel;fr(v,u,h,f,{labelFetcher:a,labelDataIndex:t,defaultText:r,isRectText:!0,autoColor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,hr(o);var w=Au(n);if(p&&a.isAnimationEnabled()){var S=function(){if(!this.incremental){var t=w[1]/w[0];this.animateTo({scale:[Math.max(1.1*w[0],w[0]+3),Math.max(1.1*w[1],w[1]+3*t)]},400,"elasticOut")}},C=function(){this.incremental||this.animateTo({scale:w},400,"elasticOut")};o.on("mouseover",S).on("mouseout",C).on("emphasis",S).on("normal",C)}},sM.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,(!e||!e.keepLabel)&&(n.style.text=null),Cr(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},o(Tu,X_);var fM=Mu.prototype;fM.updateData=function(r,o){o=Iu(o);var a=this.group,s=r.hostModel,l=this._data,u=this._symbolCtor,c=Eu(r);l||a.removeAll(),r.diff(l).add(function(t){var e=r.getItemLayout(t);if(ku(r,e,t,o)){var n=new u(r,t,c);n.attr("position",e),r.setItemGraphicEl(t,n),a.add(n)}}).update(function(t,e){var n=l.getItemGraphicEl(e),i=r.getItemLayout(t);ku(r,i,t,o)?(n?(n.updateData(r,t,c),Cr(n,{position:i},s)):(n=new u(r,t)).attr("position",i),a.add(n),r.setItemGraphicEl(t,n)):a.remove(n)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){a.remove(e)})}).execute(),this._data=r},fM.isPersistent=function(){return!0},fM.updateLayout=function(){var i=this._data;i&&i.eachItemGraphicEl(function(t,e){var n=i.getItemLayout(e);t.attr("position",n)})},fM.incrementalPrepareUpdate=function(t){this._seriesScope=Eu(t),this._data=null,this.group.removeAll()},fM.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=Iu(n);for(var r=t.start;r<t.end;r++){var o=e.getItemLayout(r);if(ku(e,o,r,n)){var a=new this._symbolCtor(e,r,this._seriesScope);a.traverse(i),a.attr("position",o),this.group.add(a),e.setItemGraphicEl(r,a)}}},fM.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var pM=function(t,e,n,i,r,o,a,s){for(var l=Nu(t,e),u=[],c=[],d=[],h=[],f=[],p=[],g=[],m=Lu(r,e,a),v=Lu(o,t,s),y=0;y<l.length;y++){var x=l[y],b=!0;switch(x.cmd){case"=":var _=t.getItemLayout(x.idx),w=e.getItemLayout(x.idx1);(isNaN(_[0])||isNaN(_[1]))&&(_=w.slice()),u.push(_),c.push(w),d.push(n[x.idx]),h.push(i[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(r.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),c.push(e.getItemLayout(S).slice()),d.push(Pu(m,r,e,S)),h.push(i[S]),g.push(e.getRawIndex(S));break;case"-":S=x.idx;var C=t.getRawIndex(S);C!==S?(u.push(t.getItemLayout(S)),c.push(o.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),d.push(n[S]),h.push(Pu(v,o,t,S)),g.push(C)):b=!1}b&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});var T=[],A=[],D=[],M=[],k=[];for(y=0;y<p.length;y++){S=p[y];T[y]=u[S],A[y]=c[S],D[y]=d[S],M[y]=h[S],k[y]=f[S]}return{current:T,next:A,stackedOnCurrent:D,stackedOnNext:M,status:k}},gM=at,mM=st,vM=q,yM=B,xM=[],bM=[],_M=[],wM=Pi.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:dC(Pi.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,o=ju(n,e.smoothConstraint);if(e.connectNulls){for(;0<r&&Ru(n[r-1]);r--);for(;i<r&&Ru(n[i]);i++);}for(;i<r;)i+=$u(t,n,i,r,r,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),SM=Pi.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:dC(Pi.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length,a=e.smoothMonotone,s=ju(n,e.smoothConstraint),l=ju(i,e.smoothConstraint);if(e.connectNulls){for(;0<o&&Ru(n[o-1]);o--);for(;r<o&&Ru(n[r]);r++);}for(;r<o;){var u=$u(t,n,r,o,o,1,s.min,s.max,e.smooth,a,e.connectNulls);$u(t,i,r+u-1,u,o,-1,l.min,l.max,e.stackedOnSmooth,a,e.connectNulls),r+=u+1,t.closePath()}}});La.extend({type:"line",init:function(){var t=new X_,e=new Mu;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=o.mapArray(o.getItemLayout),u="polar"===i.type,c=this._coordSys,d=this._symbolDraw,h=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=Wu(i,o,Lu(i,o,v)),x=t.get("showSymbol"),b=x&&!u&&Xu(t,o,i),_=this._data;_&&_.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),_.setItemGraphicEl(e,null))}),x||d.remove(),r.add(p);var w=!u&&t.get("step");h&&c.type===i.type&&w===this._step?(m&&!f?f=this._newPolygon(l,y,i,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Gu(i,!1,!1,t)),x&&d.updateData(o,{isIgnore:b,clipShape:Gu(i,!1,!0,t)}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Hu(this._stackedOnPoints,y)&&Hu(this._points,l)||(g?this._updateAnimation(o,y,i,n,w,v):(w&&(l=Yu(l,i,w),y=Yu(y,i,w)),h.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(x&&d.updateData(o,{isIgnore:b,clipShape:Gu(i,!1,!0,t)}),w&&(l=Yu(l,i,w),y=Yu(y,i,w)),h=this._newPolyline(l,i,g),m&&(f=this._newPolygon(l,y,i,g)),p.setClipPath(Gu(i,!0,!1,t)));var S=Zu(o,i)||o.getVisual("color");h.useStyle(D(a.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var C=t.get("smooth");if(C=Bu(t.get("smooth")),h.setShape({smooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=o.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(D(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),T&&(A=Bu(T.get("smooth"))),f.setShape({smooth:C,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=w,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),o=Bn(r,i);if(!(o instanceof Array)&&null!=o&&0<=o){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;(a=new Tu(r,o)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else La.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),o=Bn(r,i);if(null!=o&&0<=o){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else La.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new wM({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new SM({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=pM(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),c=u.current,d=u.stackedOnCurrent,h=u.next,f=u.stackedOnNext;r&&(c=Yu(u.current,n,r),d=Yu(u.stackedOnCurrent,n,r),h=Yu(u.next,n,r),f=Yu(u.stackedOnNext,n,r)),a.shape.__points=u.current,a.shape.points=c,Cr(a,{shape:{points:h}},l),s&&(s.setShape({points:c,stackedOnPoints:d}),Cr(s,{shape:{points:h,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=t.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}}a.animators&&a.animators.length&&a.animators[0].during(function(){for(var t=0;t<p.length;t++){p[t].el.attr("position",a.shape.__points[p[t].ptIdx])}})},remove:function(){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var CM=function(t,a,s){return{seriesType:t,performRawSeries:!0,reset:function(l,t){function e(t,e){if("function"==typeof u){var n=l.getRawValue(e),i=l.getDataParams(e);t.setItemVisual(e,"symbolSize",u(n,i))}if(t.hasItemOption){var r=t.getItemModel(e),o=r.getShallow("symbol",!0),a=r.getShallow("symbolSize",!0),s=r.getShallow("symbolKeepAspect",!0);null!=o&&t.setItemVisual(e,"symbol",o),null!=a&&t.setItemVisual(e,"symbolSize",a),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s)}}var n=l.getData(),i=l.get("symbol")||a,u=l.get("symbolSize"),r=l.get("symbolKeepAspect");if(n.setVisual({legendSymbol:s||i,symbol:i,symbolSize:u,symbolKeepAspect:r}),!t.isSeriesFiltered(l)){var o="function"==typeof u;return{dataEach:n.hasItemOption||o?e:null}}}}},TM=function(t){return{seriesType:t,plan:ZT(),reset:function(t){function e(t,e){for(var n=t.end-t.start,i=h&&new Float32Array(n*p),r=t.start,o=0,a=[],s=[];r<t.end;r++){var l;if(1===p){var u=e.get(f[0],r);l=!isNaN(u)&&d.dataToPoint(u,null,s)}else{u=a[0]=e.get(f[0],r);var c=a[1]=e.get(f[1],r);l=!isNaN(u)&&!isNaN(c)&&d.dataToPoint(a,null,s)}h?(i[o++]=l?l[0]:NaN,i[o++]=l?l[1]:NaN):e.setItemLayout(r,l&&l.slice()||[NaN,NaN])}h&&e.setLayout("symbolPoints",i)}var n=t.getData(),d=t.coordinateSystem,h=t.pipelineContext.large;if(d){var f=A(d.dimensions,function(t){return n.mapDimension(t)}).slice(0,2),p=f.length,i=n.getCalculationInfo("stackResultDimension");return ml(n,f[0])&&(f[0]=i),ml(n,f[1])&&(f[1]=i),p&&{progress:e}}}}},AM={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-Infinity,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=Infinity,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},DM=function(t){return Math.round(t.length/2)},MM=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t){var e=t.getData(),n=t.get("sampling"),i=t.coordinateSystem;if("cartesian2d"===i.type&&n){var r,o=i.getBaseAxis(),a=i.getOtherAxis(o),s=o.getExtent(),l=s[1]-s[0],u=Math.round(e.count()/l);if(1<u)"string"==typeof n?r=AM[n]:"function"==typeof n&&(r=n),r&&t.setData(e.downSample(e.mapDimension(a.dim),1/u,r,DM))}}}},kM=function(t){this._axes={},this._dimList=[],this.name=t||""};kM.prototype={constructor:kM,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return A(this._dimList,Qu,this)},getAxesByScale:function(e){return e=e.toLowerCase(),f(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;r<n.length;r++){var o=n[r],a=this._axes[o];i[o]=a[e](t[o])}return i}},Ju.prototype={constructor:Ju,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),r=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=r.toGlobalCoord(r.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return(e=e||[])[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},o(Ju,kM);var IM=function(t,e,n,i,r){rM.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom"};IM.prototype={constructor:IM,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},o(IM,rM);var EM={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},LM={};LM.categoryAxis=g({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},EM),LM.valueAxis=g({boundaryGap:[0,0],splitNumber:5},EM),LM.timeAxis=D({scale:!0,min:"dataMin",max:"dataMax"},LM.valueAxis),LM.logAxis=D({scale:!0,logBase:10},LM.valueAxis);var OM=["value","category","time","log"],PM=function(o,t,a,e){I(OM,function(r){t.extend({type:o+"Axis."+r,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?yo(t):{};g(t,e.getTheme().get(r+"Axis")),g(t,this.getDefaultOption()),t.type=a(o,t),n&&vo(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=wl.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:c([{},LM[r+"Axis"],e],!0)})}),oT.registerSubTypeDefaulter(o+"Axis",y(a,o))},NM=oT.extend({type:"cartesian2dAxis",axis:null,init:function(){NM.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){NM.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){NM.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});g(NM.prototype,WD);var RM={offset:0};PM("x",NM,tc,RM),PM("y",NM,tc,RM),oT.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var $M=nc.prototype;$M.type="grid",$M.axisPointerEnabled=!0,$M.getRect=function(){return this._rect},$M.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),I(n.x,function(t){Wl(t.scale,t.model)}),I(n.y,function(t){Wl(t.scale,t.model)}),I(n.x,function(t){ic(n,"y",t)}),I(n.y,function(t){ic(n,"x",t)}),this.resize(this.model,e)},$M.resize=function(t,e,n){function i(){I(o,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),oc(t,e?r.x:r.y)})}var r=po(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;i(),!n&&t.get("containLabel")&&(I(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Zl(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},$M.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},$M.getAxes=function(){return this._axesList.slice()},$M.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}b(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},$M.getCartesians=function(){return this._coordsList.slice()},$M.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},$M.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},$M._findConvertTarget=function(t,e){var n,i,r=e.seriesModel,o=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],a=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)x(l,n=r.coordinateSystem)<0&&(n=null);else if(o&&a)n=this.getCartesian(o.componentIndex,a.componentIndex);else if(o)i=this.getAxis("x",o.componentIndex);else if(a)i=this.getAxis("y",a.componentIndex);else if(s){s.coordinateSystem===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},$M.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},$M._initCartesian=function(a,s){function t(o){return function(t,e){if(ec(t,a,s)){var n=t.get("position");"x"===o?"top"!==n&&"bottom"!==n&&l[n="bottom"]&&(n="top"===n?"bottom":"top"):"left"!==n&&"right"!==n&&l[n="left"]&&(n="left"===n?"right":"left"),l[n]=!0;var i=new IM(o,Ul(t),[0,0],t.get("type"),n),r="category"===i.type;i.onBand=r&&t.get("boundaryGap"),i.inverse=t.get("inverse"),(t.axis=i).model=t,i.grid=this,i.index=e,this._axesList.push(i),u[o][e]=i,c[o]++}}}var l={
|
|
left:!1,right:!1,top:!1,bottom:!1},u={x:{},y:{}},c={x:0,y:0};if(s.eachComponent("xAxis",t("x"),this),s.eachComponent("yAxis",t("y"),this),!c.x||!c.y)return this._axesMap={},void(this._axesList=[]);I((this._axesMap=u).x,function(r,o){I(u.y,function(t,e){var n="x"+o+"y"+e,i=new Ju(n);i.grid=this,i.model=a,this._coordsMap[n]=i,this._coordsList.push(i),i.addAxis(r),i.addAxis(t)},this)},this)},$M._updateScale=function(l,u){function c(e,n){I(e.mapDimension(n.dim,!0),function(t){n.scale.unionExtentFromData(e,vl(e,t))})}I(this._axesList,function(t){t.scale.setExtent(Infinity,-Infinity)}),l.eachSeries(function(t){if(sc(t)){var e=ac(t,l),n=e[0],i=e[1];if(!ec(n,u,l)||!ec(i,u,l))return;var r=this.getCartesian(n.componentIndex,i.componentIndex),o=t.getData(),a=r.getAxis("x"),s=r.getAxis("y");"list"===o.type&&(c(o,a,t),c(o,s,t))}},this)},$M.getTooltipAxes=function(i){var r=[],o=[];return I(this.getCartesians(),function(t){var e=null!=i&&"auto"!==i?t.getAxis(i):t.getBaseAxis(),n=t.getOtherAxis(e);x(r,e)<0&&r.push(e),x(o,n)<0&&o.push(n)}),{baseAxes:r,otherAxes:o}};var FM=["xAxis","yAxis"];nc.create=function(a,i){var r=[];return a.eachComponent("grid",function(t,e){var n=new nc(t,a,i);n.name="grid_"+e,n.resize(t,i,!0),t.coordinateSystem=n,r.push(n)}),a.eachSeries(function(t){if(sc(t)){var e=ac(t,a),n=e[0],i=e[1],r=n.getCoordSysModel();if(Hb){if(!r)throw new Error('Grid "'+N(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==i.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var o=r.coordinateSystem;t.coordinateSystem=o.getCartesian(n.componentIndex,i.componentIndex)}}),r},nc.dimensions=nc.prototype.dimensions=Ju.prototype.dimensions,qo.register("cartesian2d",nc);var zM=Math.PI,jM=function(t,e){this.opt=e,this.axisModel=t,D(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new X_;var n=new X_({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};jM.prototype={constructor:jM,hasBuilder:function(t){return!!HM[t]},add:function(t){HM[t].call(this)},getGroup:function(){return this.group}};var HM={axisLine:function(){var o=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var e=this.axisModel.axis.getExtent(),n=this._transform,a=[e[0],0],i=[e[1],0];n&&(ot(a,a,n),ot(i,i,n));var s=O({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new xC(Ki({anid:"line",shape:{x1:a[0],y1:a[1],x2:i[0],y2:i[1]},style:s,strokeContainThreshold:o.strokeContainThreshold||5,silent:!0,z2:1})));var l=t.get("axisLine.symbol"),r=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),"string"!=typeof r&&"number"!=typeof r||(r=[r,r]);var c=r[0],d=r[1];I([{rotate:o.rotation+Math.PI/2,offset:u[0],r:0},{rotate:o.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((a[0]-i[0])*(a[0]-i[0])+(a[1]-i[1])*(a[1]-i[1]))}],function(t,e){if("none"!==l[e]&&null!=l[e]){var n=Ql(l[e],-c/2,-d/2,c,d,s.stroke,!0),i=t.r+t.offset,r=[a[0]+i*Math.cos(o.rotation),a[1]-i*Math.sin(o.rotation)];n.attr({rotation:t.rotate,position:r,silent:!0}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=gc(this,t,e);dc(t,mc(this,t,e),n)},axisName:function(){var t=this.opt,e=this.axisModel,n=N(t.axisName,e.get("name"));if(n){var i,r,o=e.get("nameLocation"),a=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),c=u[0]>u[1]?-1:1,d=["start"===o?u[0]-c*l:"end"===o?u[1]+c*l:(u[0]+u[1])/2,pc(o)?t.labelOffset+a*l:0],h=e.get("nameRotate");null!=h&&(h=h*zM/180),pc(o)?i=BM(t.rotation,null!=h?h:t.rotation,a):(i=uc(t,o,h||0,u),null!=(r=t.axisNameAvailableWidth)&&(r=Math.abs(r/Math.sin(i.rotation)),!isFinite(r)&&(r=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,m=N(t.nameTruncateMaxWidth,p.maxWidth,r),v=null!=g&&null!=m?XC(n,m,f,g,{minChar:2,placeholder:p.placeholder}):n,y=e.get("tooltip",!0),x=e.mainType,b={componentType:x,name:n,$vars:["name"]};b[x+"Index"]=e.componentIndex;var _=new lC({anid:"name",__fullText:n,__truncatedText:v,position:d,rotation:i.rotation,silent:cc(e),z2:1,tooltip:y&&y.show?O({content:n,formatter:function(){return n},formatterParams:b},y):null});pr(_.style,s,{text:v,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:i.textAlign,textVerticalAlign:i.textVerticalAlign}),e.get("triggerEvent")&&(_.eventData=lc(e),_.eventData.targetType="axisName",_.eventData.name=n),this._dumbGroup.add(_),_.updateTransform(),this.group.add(_),_.decomposeTransform()}}},BM=jM.innerTextLayout=function(t,e,n){var i,r,o=Yr(e-t);return Zr(o)?(r=0<n?"top":"bottom",i="center"):Zr(o-zM)?(r=0<n?"bottom":"top",i="center"):(r="middle",i=0<o&&o<zM?0<n?"right":"left":0<n?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},VM=I,WM=y,UM=Hs({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&Sc(t),UM.superApply(this,"render",arguments),Mc(this,t,e,n,i,!0)},updateAxisPointer:function(t,e,n,i){Mc(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),UM.superApply(this,"remove",arguments)},dispose:function(t,e){kc(this,e),UM.superApply(this,"dispose",arguments)}}),qM=[];UM.registerAxisPointerClass=function(t,e){if(Hb&&qM[t])throw new Error("axisPointer "+t+" exists");qM[t]=e},UM.getAxisPointerClass=function(t){return t&&qM[t]};var GM=["axisLine","axisTickLabel","axisName"],YM=["splitArea","splitLine"],ZM=UM.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new X_,this.group.add(this._axisGroup),e.get("show")){var o=e.getCoordSysModel(),a=Ic(o,e),s=new jM(e,a);I(GM,s.add,s),this._axisGroup.add(s.getGroup()),I(YM,function(t){e.get(t+".show")&&this["_"+t](e,o)},this),kr(r,this._axisGroup,e),ZM.superCall(this,"render",e,t,n,i)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),o=r.get("color");o=E(o)?o:[o];for(var a=e.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),c=[],d=[],h=r.getLineStyle(),f=0;f<u.length;f++){var p=n.toGlobalCoord(u[f].coord);s?(c[0]=p,c[1]=a.y,d[0]=p,d[1]=a.y+a.height):(c[0]=a.x,c[1]=p,d[0]=a.x+a.width,d[1]=p);var g=l++%o.length,m=u[f].tickValue;this._axisGroup.add(new xC(Ki({anid:null!=m?"line_"+u[f].tickValue:null,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:D({stroke:o[g]},h),silent:!0})))}}},_splitArea:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitArea"),r=i.getModel("areaStyle"),o=r.get("color"),a=e.coordinateSystem.getRect(),s=n.getTicksCoords({tickModel:i,clamp:!0});if(s.length){var l=o.length,u=this._splitAreaColors,c=F(),d=0;if(u)for(var h=0;h<s.length;h++){var f=u.get(s[h].tickValue);if(null!=f){d=(f+(l-1)*h)%l;break}}var p=n.toGlobalCoord(s[0].coord),g=r.getAreaStyle();o=E(o)?o:[o];for(h=1;h<s.length;h++){var m,v,y,x,b=n.toGlobalCoord(s[h].coord);n.isHorizontal()?(m=p,v=a.y,y=b-m,x=a.height,p=m+y):(m=a.x,v=p,y=a.width,p=v+(x=b-v));var _=s[h-1].tickValue;null!=_&&c.set(_,d),this._axisGroup.add(new yC({anid:null!=_?"area_"+_:null,shape:{x:m,y:v,width:y,height:x},style:D({fill:o[d]},g),silent:!0})),d=(d+1)%l}this._splitAreaColors=c}}}});ZM.extend({type:"xAxis"}),ZM.extend({type:"yAxis"}),Hs({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new yC({shape:t.coordinateSystem.getRect(),style:D({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Is(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),$s(CM("line","circle","line")),Rs(TM("line")),Es(OA.PROCESSOR.STATISTIC,MM("line"));var XM=qT.extend({type:"series.__base_bar__",getInitialData:function(){return yl(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});XM.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t}});var KM=nS([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),QM={getBarItemStyle:function(t){var e=KM(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},JM=["itemStyle","barBorderWidth"];O(Or.prototype,QM),Vs({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"===i||"polar"===i?this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n):Hb&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(o){var a,s=this.group,l=o.getData(),u=this._data,c=o.coordinateSystem,t=c.getBaseAxis();"cartesian2d"===c.type?a=t.isHorizontal():"polar"===c.type&&(a="angle"===t.dim);var d=o.isAnimationEnabled()?o:null;l.diff(u).add(function(t){if(l.hasValue(t)){var e=l.getItemModel(t),n=ek[c.type](l,t,e),i=tk[c.type](l,t,e,n,a,d);l.setItemGraphicEl(t,i),s.add(i),Nc(i,l,t,e,n,o,a,"polar"===c.type)}}).update(function(t,e){var n=u.getItemGraphicEl(e);if(l.hasValue(t)){var i=l.getItemModel(t),r=ek[c.type](l,t,i);n?Cr(n,{shape:r},d,t):n=tk[c.type](l,t,i,r,a,d,!0),l.setItemGraphicEl(t,n),s.add(n),Nc(n,l,t,i,r,o,a,"polar"===c.type)}else s.remove(n)}).remove(function(t){var e=u.getItemGraphicEl(t);"cartesian2d"===c.type?e&&Oc(t,d,e):e&&Pc(t,d,e)}).execute(),this._data=l},_renderLarge:function(t){this._clear(),$c(t,this.group)},_incrementalRenderLarge:function(t,e){$c(e,this.group,!0)},dispose:j,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(t){"sector"===t.type?Pc(t.dataIndex,e,t):Oc(t.dataIndex,e,t)}):t.removeAll(),this._data=null}});var tk={cartesian2d:function(t,e,n,i,r,o,a){var s=new yC({shape:O({},i)});if(o){var l=r?"height":"width",u={};s.shape[l]=0,u[l]=i[l],OC[a?"updateProps":"initProps"](s,{shape:u},o,e)}return s},polar:function(t,e,n,i,r,o,a){var s=i.startAngle<i.endAngle,l=new hC({shape:D({clockwise:s},i)});if(o){var u=r?"r":"endAngle",c={};l.shape[u]=r?0:i.startAngle,c[u]=i[u],OC[a?"updateProps":"initProps"](l,{shape:c},o,e)}return l}},ek={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),r=Rc(n,i),o=0<i.width?1:-1,a=0<i.height?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},nk=Pi.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__valueIdx,o=0;o<n.length;o+=2)i[this.__valueIdx]=n[o+r],t.moveTo(i[0],i[1]),t.lineTo(n[o],n[o+1])}});Rs(y($l,"bar")),Rs(CD),$s({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var ik=function(t,e,n){e=E(e)&&{coordDimensions:e}||O({},e);var i=t.getSource(),r=pD(i,e),o=new dD(r,t);return o.initData(i,n),o},rk={updateSelectedMap:function(t){this._targetList=E(t)?t.slice():[],this._selectTargetMap=p(t||[],function(t,e){return t.set(e.name,e),t},F())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=n)return this[n.selected?"unSelect":"select"](t,e),n.selected},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}},ok=Bs({type:"series.pie",init:function(t){ok.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){ok.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return ik(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,r=t.count();i<r;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:xa(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=ok.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=Gr(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){Pn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});r(ok,rk);var ak=Hc.prototype;ak.updateData=function(t,e,n){function i(){o.stopAnimation(!0),o.animateTo({shape:{r:l.r+a.get("hoverOffset")}},300,"elasticOut")}function r(){o.stopAnimation(!0),o.animateTo({shape:{r:l.r}},300,"elasticOut")}var o=this.childAt(0),a=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=O({},l);(u.label=null,n)?(o.setShape(u),"scale"===a.getShallow("animationType")?(o.shape.r=l.r0,Tr(o,{shape:{r:l.r}},a,e)):(o.shape.endAngle=l.startAngle,Cr(o,{shape:{endAngle:l.endAngle}},a,e))):Cr(o,{shape:u},a,e);var c=t.getItemVisual(e,"color");o.useStyle(D({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),o.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&o.attr("cursor",d),jc(this,t.getItemLayout(e),a.isSelected(null,e),a.get("selectedOffset"),a.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),s.get("hoverAnimation")&&a.isAnimationEnabled()&&o.on("mouseover",i).on("mouseout",r).on("emphasis",i).on("normal",r),this._updateLabel(t,e),hr(this)},ak._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Cr(n,{shape:{points:a.linePoints||[[a.x,a.y],[a.x,a.y],[a.x,a.y]]}},r,e),Cr(i,{style:{x:a.x,y:a.y}},r,e),i.attr({rotation:a.rotation,origin:[a.x,a.y],z2:10});var l=o.getModel("label"),u=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");fr(i.style,i.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!a.inside},{textAlign:a.textAlign,textVerticalAlign:a.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),n.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=d.getModel("lineStyle").getLineStyle();var h=c.get("smooth");h&&!0===h&&(h=.4),n.setShape({smooth:h})},o(Hc,X_);La.extend({type:"pie",init:function(){var t=new X_;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getData(),o=this._data,a=this.group,s=e.get("animation"),l=!o,u=t.get("animationType"),c=y(zc,this.uid,t,s,n),d=t.get("selectedMode");if(r.diff(o).add(function(t){var e=new Hc(r,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var n=o.getItemGraphicEl(e);n.updateData(r,t),n.off("click"),d&&n.on("click",c),a.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),s&&l&&0<r.count()&&"scale"!==u){var h=r.getItemLayout(0),f=Math.max(n.getWidth(),n.getHeight())/2,p=v(a.removeClipPath,a);a.setClipPath(this._createClipPath(h.cx,h.cy,f,h.startAngle,h.clockwise,p,t))}this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,o,a){var s=new hC({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}});return Tr(s,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},a,o),s},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}}});var sk=function(n,t){I(t,function(o){o.update="updateView",Os(o,function(t,e){var r={};return e.eachComponent({mainType:"series",subType:n,query:t},function(n){n[o.method]&&n[o.method](t.name,t.dataIndex);var i=n.getData();i.each(function(t){var e=i.getName(t);r[e]=n.isSelected(e)||!1})}),{name:t.name,selected:r}})})},lk=function(i){return{getTargetSeries:function(t){var e={},n=F();return t.eachSeriesByType(i,function(t){t.__paletteScope=e,n.set(t.uid,t)}),n},reset:function(r){var o=r.getRawData(),a={},s=r.getData();s.each(function(t){var e=s.getRawIndex(t);a[e]=t}),o.each(function(t){var e=a[t],n=null!=e&&s.getItemVisual(e,"color",!0);if(n)o.setItemVisual(t,"color",n);else{var i=o.getItemModel(t).get("itemStyle.color")||r.getColorFromPalette(o.getName(t)||t+"",r.__paletteScope,o.count());o.setItemVisual(t,"color",i),null!=e&&s.setItemVisual(e,"color",i)}})}}},uk=function(C,T,t,e){var A,D,M=C.getData(),k=[],I=!1;M.each(function(t){var e,n,i,r,o=M.getItemLayout(t),a=M.getItemModel(t),s=a.getModel("label"),l=s.get("position")||a.get("emphasis.label.position"),u=a.getModel("labelLine"),c=u.get("length"),d=u.get("length2"),h=(o.startAngle+o.endAngle)/2,f=Math.cos(h),p=Math.sin(h);A=o.cx,D=o.cy;var g="inside"===l||"inner"===l;if("center"===l)e=o.cx,n=o.cy,r="center";else{var m=(g?(o.r+o.r0)/2*f:o.r*f)+A,v=(g?(o.r+o.r0)/2*p:o.r*p)+D;if(e=m+3*f,n=v+3*p,!g){var y=m+f*(c+T-o.r),x=v+p*(c+T-o.r),b=y+(f<0?-1:1)*d;e=b+(f<0?-5:5),i=[[m,v],[y,x],[b,n=x]]}r=g?"center":0<f?"left":"right"}var _=s.getFont(),w=s.get("rotate")?f<0?-h+Math.PI:-h:0,S=Se(C.getFormattedLabel(t,"normal")||M.getName(t),_,r,"top");I=!!w,o.label={x:e,y:n,position:l,height:S.height,len:c,len2:d,linePoints:i,textAlign:r,verticalAlign:"middle",rotation:w,inside:g},g||k.push(o.label)}),!I&&C.get("avoidLabelOverlap")&&Vc(k,A,D,T,t,e)},ck=2*Math.PI,dk=Math.PI/180,hk=function(t,e,A){e.eachSeriesByType(t,function(t){var r=t.getData(),e=r.mapDimension("value"),n=t.get("center"),i=t.get("radius");E(i)||(i=[0,i]),E(n)||(n=[n,n]);var o=A.getWidth(),a=A.getHeight(),s=Math.min(o,a),l=Hr(n[0],o),u=Hr(n[1],a),c=Hr(i[0],s/2),d=Hr(i[1],s/2),h=-t.get("startAngle")*dk,f=t.get("minAngle")*dk,p=0;r.each(e,function(t){!isNaN(t)&&p++});var g=r.getSum(e),m=Math.PI/(g||p)*2,v=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),b=r.getDataExtent(e);b[0]=0;var _=ck,w=0,S=h,C=v?1:-1;if(r.each(e,function(t,e){var n;if(isNaN(t))r.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:l,cy:u,r0:c,r:y?NaN:d});else{(n="area"!==y?0===g&&x?m:t*m:ck/p)<f?_-=n=f:w+=t;var i=S+C*n;r.setItemLayout(e,{angle:n,startAngle:S,endAngle:i,clockwise:v,cx:l,cy:u,r0:c,r:y?jr(t,b,[c,d]):d}),S=i}}),_<ck&&p)if(_<=.001){var T=ck/p;r.each(e,function(t,e){if(!isNaN(t)){var n=r.getItemLayout(e);n.angle=T,n.startAngle=h+C*e*T,n.endAngle=h+C*(e+1)*T}})}else m=_/w,S=h,r.each(e,function(t,e){if(!isNaN(t)){var n=r.getItemLayout(e),i=n.angle===f?f:t*m;n.startAngle=S,n.endAngle=S+C*i,S+=C*i}});uk(t,d,o,a)})},fk=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var r=t.getData();r.filterSelf(function(t){for(var e=r.getName(t),n=0;n<i.length;n++)if(!i[n].isSelected(e))return!1;return!0})}}}};sk("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),$s(lk("pie")),Rs(y(hk,"pie")),Es(fk("pie")),qT.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(){return yl(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8}}});var pk=4,gk=Ui({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,o=r.shape;if(!((t.getContext?t.getContext():t)&&i[0]<pk))for(var a=0;a<n.length;){var s=n[a++],l=n[a++];isNaN(s)||isNaN(l)||(o.x=s-i[0]/2,o.y=l-i[1]/2,o.width=i[0],o.height=i[1],r.buildPath(t,o,!0))}},afterBrush:function(t){var e=this.shape,n=e.points,i=e.size;if(i[0]<pk){this.setTransform(t);for(var r=0;r<n.length;){var o=n[r++],a=n[r++];isNaN(o)||isNaN(a)||t.fillRect(o-i[0]/2,a-i[1]/2,i[0],i[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var n=this.shape,i=n.points,r=n.size,o=Math.max(r[0],4),a=Math.max(r[1],4),s=i.length/2-1;0<=s;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(u<=t&&c<=e&&t<=u+o&&e<=c+a)return s}return-1}}),mk=Wc.prototype;mk.isPersistent=function(){return!this._incremental},mk.updateData=function(t){this.group.removeAll();var e=new gk({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},mk.updateLayout=function(t){if(!this._incremental){var i=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var e=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;i=new Float32Array(i.buffer,n,e)}t.setShape("points",i)})}},mk.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new Wi({silent:!0})),this.group.add(this._incremental)):this._incremental=null},mk.incrementalUpdate=function(t,e){var n;this._incremental?(n=new gk,this._incremental.addDisplayable(n,!0)):((n=new gk({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental)},mk._setCommon=function(n,t,e){var i=t.hostModel,r=t.getVisual("symbolSize");n.setShape("size",r instanceof Array?r:[r,r]),n.symbolProxy=Ql(t.getVisual("symbol"),0,0,0,0),n.setColor=n.symbolProxy.setColor;var o=n.shape.size[0]<pk;n.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("color");a&&n.setColor(a),e||(n.seriesIndex=i.seriesIndex,n.on("mousemove",function(t){n.dataIndex=null;var e=n.findDataIndex(t.offsetX,t.offsetY);0<=e&&(n.dataIndex=e+(n.startIndex||0))}))},mk.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},mk._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Vs({type:"scatter",render:function(t){var e=t.getData();this._updateSymbolDraw(e,t).updateData(e),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData();this._updateSymbolDraw(e,t).incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||1e4<e.count()||!this._symbolDraw.isPersistent())return{update:!0};var n=TM().reset(t);n.progress&&n.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new Wc:new Mu,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),$s(CM("scatter","circle")),Rs(TM("scatter")),o(Uc,rM),qc.prototype.getIndicatorAxes=function(){return this._indicatorAxes},qc.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},qc.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},qc.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var r,o=Math.atan2(-n,e),a=Infinity,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(o-u.angle);c<a&&(r=u,s=l,a=c)}return[s,+(r&&r.coodToData(i))]},qc.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r)/2;this.cx=Hr(n[0],i),this.cy=Hr(n[1],r),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=Hr(t.get("radius"),o),I(this._indicatorAxes,function(t,e){t.setExtent(0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),t.angle=n},this)},qc.prototype.update=function(n){function h(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),n=t/e;return 2===n?n=5:n*=2,n*e}var i=this._indicatorAxes,r=this._model;I(i,function(t){t.scale.setExtent(Infinity,-Infinity)}),n.eachSeriesByType("radar",function(t){if("radar"===t.get("coordinateSystem")&&n.getComponent("radar",t.get("radarIndex"))===r){var e=t.getData();I(i,function(t){t.scale.unionExtentFromData(e,e.mapDimension(t.dim))})}},this);var f=r.get("splitNumber");I(i,function(t){var e=Bl(t.scale,t.model);Wl(t.scale,t.model);var n=t.model,i=t.scale,r=n.getMin(),o=n.getMax(),a=i.getInterval();if(null!=r&&null!=o)i.setExtent(+r,+o),i.setInterval((o-r)/f);else if(null!=r)for(var s;s=r+a*f,i.setExtent(+r,s),i.setInterval(a),a=h(a),s<e[1]&&isFinite(s)&&isFinite(e[1]););else if(null!=o)for(var l;l=o-a*f,i.setExtent(l,+o),i.setInterval(a),a=h(a),l>e[0]&&isFinite(l)&&isFinite(e[0]););else{var u=i.getTicks().length-1;f<u&&(a=h(a));var c=Math.round((e[0]+e[1])/2/a)*a,d=Math.round(f/2);i.setExtent(Br(c-d*a),Br(c+(f-d)*a)),i.setInterval(a)}})},qc.dimensions=[],qc.create=function(n,i){var r=[];return n.eachComponent("radar",function(t){var e=new qc(t,n,i);r.push(e),t.coordinateSystem=e}),n.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=r[t.get("radarIndex")||0])}),r},qo.register("radar",qc);var vk=LM.valueAxis,yk=(js({type:"radar",optionUpdated:function(){var r=this.get("boundaryGap"),o=this.get("splitNumber"),a=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),h=this.get("name.formatter"),f=this.get("nameGap"),p=this.get("triggerEvent"),t=A(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=c;if(null!=t.color&&(e=D({color:t.color},c)),t=g(L(t),{boundaryGap:r,splitNumber:o,scale:a,axisLine:s,axisTick:l,axisLabel:u,name:t.text,nameLocation:"end",nameGap:f,nameTextStyle:e,triggerEvent:p},!1),d||(t.name=""),"string"==typeof h){var n=t.name;t.name=h.replace("{value}",null!=n?n:"")}else"function"==typeof h&&(t.name=h(t.name,t));var i=O(new Or(t,null,this.ecModel),WD);return i.mainType="radar",i.componentIndex=this.componentIndex,i},this);this.getIndicatorModels=function(){return t}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:g({lineStyle:{color:"#bbb"}},vk.axisLine),axisLabel:Gc(vk.axisLabel,!1),axisTick:Gc(vk.axisTick,!1),splitLine:Gc(vk.splitLine,!0),splitArea:Gc(vk.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Hs({type:"radar",render:function(t){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;I(A(e.getIndicatorAxes(),function(t){return new jM(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){I(yk,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var r=t.get("shape"),o=t.getModel("splitLine"),a=t.getModel("splitArea"),s=o.getModel("lineStyle"),l=a.getModel("areaStyle"),u=o.get("show"),c=a.get("show"),d=s.get("color"),h=l.get("color");d=E(d)?d:[d],h=E(h)?h:[h];var f=[],p=[];if("circle"===r)for(var g=n[0].getTicksCoords(),m=i.cx,v=i.cy,y=0;y<g.length;y++){if(u)f[e(f,d,y)].push(new uC({shape:{cx:m,cy:v,r:g[y].coord}}));if(c&&y<g.length-1)p[e(p,h,y)].push(new fC({shape:{cx:m,cy:v,r0:g[y].coord,r:g[y+1].coord}}))}else{var x,b=A(n,function(t,e){var n=t.getTicksCoords();return x=null==x?n.length-1:Math.min(n.length-1,x),A(n,function(t){return i.coordToPoint(t.coord,e)})}),_=[];for(y=0;y<=x;y++){for(var w=[],S=0;S<n.length;S++)w.push(b[S][y]);if(w[0]?w.push(w[0].slice()):Hb&&console.error("Can't draw value axis "+y),u)f[e(f,d,y)].push(new vC({shape:{points:w}}));if(c&&_)p[e(p,h,y-1)].push(new mC({shape:{points:w.concat(_)}}));_=w.slice().reverse()}}var C=s.getLineStyle(),T=l.getAreaStyle();I(p,function(t,e){this.group.add(LC(t,{style:D({stroke:"none",fill:h[e%h.length]},T),silent:!0}))},this),I(f,function(t,e){this.group.add(LC(t,{style:D({fill:"none",stroke:d[e%d.length]},C),silent:!0}))},this)}}});var xk=qT.extend({type:"series.radar",dependencies:["radar"],init:function(){xk.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(){return ik(this,{generateCoord:"indicator_",generateCoordCount:Infinity})},formatTooltip:function(n){var i=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(n);return ro(""===e?this.name:e)+"<br/>"+A(t,function(t){var e=i.get(i.mapDimension(t.dim),n);return ro(t.name+" : "+e)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Vs({type:"radar",render:function(l){function u(t,e){var n=t.getItemVisual(e,"symbol")||"circle",i=t.getItemVisual(e,"color");if("none"!==n){var r=Yc(t.getItemVisual(e,"symbolSize")),o=Ql(n,-1,-1,2,2,i);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[r[0]/2,r[1]/2]}),o}}function s(t,e,n,i,r,o){n.removeAll();for(var a=0;a<e.length-1;a++){var s=u(i,r);s&&(t[s.__dimIdx=a]?(s.attr("position",t[a]),OC[o?"initProps":"updateProps"](s,{position:e[a]},l,r)):s.attr("position",e[a]),n.add(s))}}function c(t){return A(t,function(){return[e.cx,e.cy]})}var e=l.coordinateSystem,v=this.group,y=l.getData(),d=this._data;y.diff(d).add(function(t){var e=y.getItemLayout(t);if(e){var n=new mC,i=new vC,r={shape:{points:e}};n.shape.points=c(e),i.shape.points=c(e),Tr(n,r,l,t),Tr(i,r,l,t);var o=new X_,a=new X_;o.add(i),o.add(n),o.add(a),s(i.shape.points,e,a,y,t,!0),y.setItemGraphicEl(t,o)}}).update(function(t,e){var n=d.getItemGraphicEl(e),i=n.childAt(0),r=n.childAt(1),o=n.childAt(2),a={shape:{points:y.getItemLayout(t)}};a.shape.points&&(s(i.shape.points,a.shape.points,o,y,t,!1),Cr(i,a,l),Cr(r,a,l),y.setItemGraphicEl(t,n))}).remove(function(t){v.remove(d.getItemGraphicEl(t))}).execute(),y.eachItemGraphicEl(function(t,e){function n(){a.attr("ignore",h)}function i(){a.attr("ignore",d)}var r=y.getItemModel(e),o=t.childAt(0),a=t.childAt(1),s=t.childAt(2),l=y.getItemVisual(e,"color");v.add(t),o.useStyle(D(r.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),o.hoverStyle=r.getModel("emphasis.lineStyle").getLineStyle();var u=r.getModel(
|
|
"areaStyle"),c=r.getModel("emphasis.areaStyle"),d=u.isEmpty()&&u.parentModel.isEmpty(),h=c.isEmpty()&&c.parentModel.isEmpty();h=h&&d,a.ignore=d,a.useStyle(D(u.getAreaStyle(),{fill:l,opacity:.7})),a.hoverStyle=c.getAreaStyle();var f=r.getModel("itemStyle").getItemStyle(["color"]),p=r.getModel("emphasis.itemStyle").getItemStyle(),g=r.getModel("label"),m=r.getModel("emphasis.label");s.eachChild(function(t){t.setStyle(f),t.hoverStyle=L(p),fr(t.style,t.hoverStyle,g,m,{labelFetcher:y.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:y.get(y.dimensions[t.__dimIdx],e),autoColor:l,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",n).on("mouseover",n).on("normal",i).on("mouseout",i),hr(t)}),this._data=y},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var bk=function(t){t.eachSeriesByType("radar",function(t){function e(t,e){i[e]=i[e]||[],i[e][a]=r.dataToPoint(t,a)}var n=t.getData(),i=[],r=t.coordinateSystem;if(r){for(var o=r.getIndicatorAxes(),a=0;a<o.length;a++)n.each(n.mapDimension(o[a].dim),e);n.each(function(t){i[t][0]&&i[t].push(i[t][0].slice()),n.setItemLayout(t,i[t])})}})},_k=function(e){var t=e.polar;if(t){E(t)||(t=[t]);var n=[];I(t,function(t){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],E(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}I(e.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})};$s(lk("radar")),$s(CM("radar","circle")),Rs(bk),Es(fk("radar")),Is(_k);var wk=ot;r(Zc,x_),Xc.prototype={constructor:Xc,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new ie(t,e,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new ie(t,e,n,i)},transformTo:function(t,e,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new ie(t,e,n,i)),o.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),r=this.getZoom();i=ot([],i,t),n=ot([],n,t),e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[r,r],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),gt(this.transform||(this.transform=[]),e.transform||ft()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],bt(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?wk(n,t,i):B(n,t)},pointToData:function(t){var e=this.invTransform;return e?wk([],t,e):[t[0],t[1]]},convertToPixel:y(Kc,"dataToPoint"),convertFromPixel:y(Kc,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},r(Xc,x_);for(var Sk=[126,25],Ck=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Tk=0;Tk<Ck.length;Tk++)for(var Ak=0;Ak<Ck[Tk].length;Ak++)Ck[Tk][Ak][0]/=10.5,Ck[Tk][Ak][1]/=-14,Ck[Tk][Ak][0]+=Sk[0],Ck[Tk][Ak][1]+=Sk[1];var Dk={"\u5357\u6d77\u8bf8\u5c9b":[32,80],"\u5e7f\u4e1c":[0,-10],"\u9999\u6e2f":[10,5],"\u6fb3\u95e8":[-10,10],"\u5929\u6d25":[5,5]},Mk={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},kk=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],Ik=[function(t){"china"===t.map&&t.regions.push(new ru("\u5357\u6d77\u8bf8\u5c9b",A(Ck,function(t){return{type:"polygon",exterior:t}}),Sk))},function(t){I(t.regions,function(t){var e=Dk[t.name];if(e){var n=t.center;n[0]+=e[0]/10.5,n[1]+=-e[1]/14}})},function(t){I(t.regions,function(t){var e=Mk[t.name];if(e){var n=t.center;n[0]=e[0],n[1]=e[1]}})},function(t){if("china"===t.map)for(var e=0,n=t.regions.length;e<n;++e)"\u53f0\u6e7e"===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:kk[0]})}];if(Qc.prototype={constructor:Qc,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return!0;return!1},loadGeoJson:function(t,e,n){try{this.regions=t?eM(t):[]}catch(l){throw"Invalid geoJson format\n"+l.message}e=e||{},n=n||{};for(var i=this.regions,r=F(),o=0;o<i.length;o++){var a=i[o].name;a=n.hasOwnProperty(a)?n[a]:a,i[o].name=a,r.set(a,i[o]),this.addGeoCoord(a,i[o].center);var s=e[a];s&&i[o].transformTo(s.left,s.top,s.width,s.height)}this._regionsMap=r,this._rect=null,I(Ik,function(t){t(this)},this)},transformTo:function(t,e,n,i){var r=this.getBoundingRect();(r=r.clone()).y=-r.y-r.height;var o=this._rawTransformable;o.transform=r.calculateTransform(new ie(t,e,n,i)),o.decomposeTransform();var a=o.scale;a[1]=-a[1],o.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return e[n]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){if(this._rect)return this._rect;for(var t,e=this.regions,n=0;n<e.length;n++){var i=e[n].getBoundingRect();(t=t||i.clone()).union(i)}return this._rect=t||new ie(0,0,0,0)},dataToPoint:function(t,e,n){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return Xc.prototype.dataToPoint.call(this,t,e,n)},convertToPixel:y(Jc,"dataToPoint"),convertFromPixel:y(Jc,"pointToData")},r(Qc,Xc),Hb)var Ek=function(t){console.error("Map "+t+" not exists. You can download map file on http://echarts.baidu.com/download-map.html")};var Lk={dimensions:Qc.prototype.dimensions,create:function(t,o){var a=[];t.eachComponent("geo",function(t,e){var n=t.get("map"),i=qs(n);Hb&&(i||Ek(n));var r=new Qc(n+e,n,i&&i.geoJson,i&&i.specialAreas,t.get("nameMap"));r.zoomLimit=t.get("scaleLimit"),a.push(r),ed(r,t),(t.coordinateSystem=r).model=t,r.resize=td,r.resize(t,o)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=a[e]}});var n={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}}),I(n,function(t,e){var n=qs(e);Hb&&(n||Ek(t[0].get("map")));var i=A(t,function(t){return t.get("nameMap")}),r=new Qc(e,e,n&&n.geoJson,n&&n.specialAreas,c(i));r.zoomLimit=N.apply(null,A(t,function(t){return t.get("scaleLimit")})),a.push(r),r.resize=td,r.resize(t[0],o),I(t,function(t){ed(t.coordinateSystem=r,t)})}),a},getFilledRegions:function(t,e,n){var i=(t||[]).slice();n=n||{};var r=qs(e),o=r&&r.geoJson;if(!o)return Hb&&Ek(e),t;for(var a=F(),s=o.features,l=0;l<i.length;l++)a.set(i[l].name,i[l]);for(l=0;l<s.length;l++){var u=s[l].properties.name;a.get(u)||(n.hasOwnProperty(u)&&(u=n[u]),i.push({name:u}))}return i}};Ps("geo",Lk);var Ok=qT.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],init:function(){Ok.superApply(this,"init",arguments),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return ik(this,["value"])},mergeOption:function(){Ok.superApply(this,"mergeOption",arguments),this.updateSelectedMap(this._createSelectableList())},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,r=t.count();i<r;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:xa(t,i,"selected")});return n=Lk.getFilledRegions(n,this.getMapType(),this.option.nameMap)},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(){},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),n=no(this.getRawValue(t)),i=e.getName(t),r=this.seriesGroup,o=[],a=0;a<r.length;a++){var s=r[a].originalData.indexOfName(i),l=e.mapDimension("value");isNaN(r[a].originalData.get(l,s))||o.push(ro(r[a].name))}return o.join(", ")+"<br />"+ro(i+" : "+n)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}});r(Ok,rk);var Pk="\0_ec_interaction_mutex";Os({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),r(ad,d_);var Nk={axisPointer:1,tooltip:1,brush:1};bd.prototype={constructor:bd,draw:function(x,t,e,n,i){var b="geo"===x.mainType,_=x.getData&&x.getData();b&&t.eachComponent({mainType:"series",subType:"map"},function(t){_||t.getHostGeoModel()!==x||(_=t.getData())});var r=x.coordinateSystem,w=this.group,S=r.scale,o={position:r.position,scale:S};!w.childAt(0)||i?w.attr(o):Cr(w,o,x),w.removeAll();var C=["itemStyle"],T=["emphasis","itemStyle"],A=["label"],D=["emphasis","label"],M=F();I(r.regions,function(t){var e=M.get(t.name)||M.set(t.name,new X_),n=new SC({shape:{paths:[]}});e.add(n);var i,r=(y=x.getRegionModel(t.name)||x).getModel(C),o=y.getModel(T),a=vd(r,S),s=vd(o,S),l=y.getModel(A),u=y.getModel(D);if(_){i=_.indexOfName(t.name);var c=_.getItemVisual(i,"color",!0);c&&(a.fill=c)}I(t.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new mC({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new mC({shape:{points:t.interiors[e]}}))}}),n.setStyle(a),n.style.strokeNoScale=!0,n.culling=!0;var d=l.get("show"),h=u.get("show"),f=_&&isNaN(_.get(_.mapDimension("value"),i)),p=_&&_.getItemLayout(i);if(b||f&&(d||h)||p&&p.showLabel){var g,m=b?t.name:i;(!_||0<=i)&&(g=x);var v=new lC({position:t.center.slice(),scale:[1/S[0],1/S[1]],z2:10,silent:!0});fr(v.style,v.hoverStyle={},l,u,{labelFetcher:g,labelDataIndex:m,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),e.add(v)}if(_)_.setItemGraphicEl(i,e);else{var y=x.getRegionModel(t.name);n.eventData={componentType:"geo",geoIndex:x.componentIndex,name:t.name,region:y&&y.option||{}}}(e.__regions||(e.__regions=[])).push(t),hr(e,s,{hoverSilentOnTouch:!!x.get("selectedMode")}),w.add(e)}),this._updateController(x,t,e),yd(this,x,w,e,n),xd(x,w)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(i,t,o){function a(){var t={type:"geoRoam",componentType:n};return t[n+"Id"]=i.id,t}var r=i.coordinateSystem,e=this._controller,s=this._controllerHost;s.zoomLimit=i.get("scaleLimit"),s.zoom=r.getZoom(),e.enable(i.get("roam")||!1);var n=i.mainType;e.off("pan").on("pan",function(t,e){this._mouseDownFlag=!1,pd(s,t,e),o.dispatchAction(O(a(),{dx:t,dy:e}))},this),e.off("zoom").on("zoom",function(t,e,n){if(this._mouseDownFlag=!1,gd(s,t,e,n),o.dispatchAction(O(a(),{zoom:t,originX:e,originY:n})),this._updateGroup){var i=this.group,r=i.scale;i.traverse(function(t){"text"===t.type&&t.attr("scale",[1/r[0],1/r[1]])})}},this),e.setPointerChecker(function(t,e,n){return r.getViewRectAfterRoam().contain(e,n)&&!md(t,o,i)})}},Vs({type:"map",render:function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeAll(),!t.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id)(o=this._mapDraw)&&r.add(o.group);else if(t.needsDrawMap){var o=this._mapDraw||new bd(n,!0);r.add(o.group),o.draw(t,e,n,this,i),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(v){var y=v.originalData,x=this.group;y.each(y.mapDimension("value"),function(t,e){if(!isNaN(t)){var n=y.getItemLayout(e);if(n&&n.point){var i=n.point,r=n.offset,o=new uC({style:{fill:v.getData().getVisual("color")},shape:{cx:i[0]+9*r,cy:i[1],r:3},silent:!0,z2:r?8:10});if(!r){var a=v.mainSeries.getData(),s=y.getName(e),l=a.indexOfName(s),u=y.getItemModel(e),c=u.getModel("label"),d=u.getModel("emphasis.label"),h=a.getItemGraphicEl(l),f=R(v.getFormattedLabel(e,"normal"),s),p=R(v.getFormattedLabel(e,"emphasis"),f),g=function(){var t=pr({},d,{text:d.get("show")?p:null},{isRectText:!0,useInsideStyle:!1},!0);o.style.extendFrom(t),o.__mapOriginalZ2=o.z2,o.z2+=1},m=function(){pr(o.style,c,{text:c.get("show")?f:null,textPosition:c.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=o.__mapOriginalZ2&&(o.z2=o.__mapOriginalZ2,o.__mapOriginalZ2=null)};h.on("mouseover",g).on("mouseout",m).on("emphasis",g).on("normal",m),m()}x.add(o)}}})}}),Os({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var r=i.componentType||"series";t.eachComponent({mainType:r,query:i},function(t){var e=t.coordinateSystem;if("geo"===e.type){var n=_d(e,i,t.get("scaleLimit"));t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom),"series"===r&&I(t.seriesGroup,function(t){t.setCenter(n.center),t.setZoom(n.zoom)})}})});var Rk=function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),n=t.getModel("itemStyle"),i=n.get("areaColor"),r=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:r})})},$k=function(t){var i={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),n=e?"o"+e.id:"i"+t.getMapType();(i[n]=i[n]||[]).push(t)}),I(i,function(t){for(var e=wd(A(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(n=0;n<t.length;n++)(t[n].seriesGroup=t)[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(e.cloneShallow()),t[n].mainSeries=t[0]})},Fk=function(t){var e=[];I(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,D(t,t.mapLocation))})};Rs(function(n){var r={};n.eachSeriesByType("map",function(t){var e=t.getMapType();if(!t.getHostGeoModel()&&!r[e]){var l={};I(t.seriesGroup,function(t){var a=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&n.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var n=s.getName(e),i=a.getRegion(n);if(i&&!isNaN(t)){var r=l[n]||0,o=a.dataToPoint(i.center);l[n]=r+1,s.setItemLayout(e,{point:o,offset:r})}})});var i=t.getData();i.each(function(t){var e=i.getName(t),n=i.getItemLayout(t)||{};n.showLabel=!l[e],i.setItemLayout(t,n)}),r[e]=!0}})}),$s(Rk),Es(OA.PROCESSOR.STATISTIC,$k),Is(Fk),sk("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var zk=I,jk="\0__link_datas",Hk="\0__link_mainData",Bk=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};Bk.prototype={constructor:Bk,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null),_(t=t||{})&&(t={order:t});var i,r=t.order||"preorder",o=this[t.attr||"children"];"preorder"===r&&(i=e.call(n,this));for(var a=0;!i&&a<o.length;a++)o[a].eachNode(t,e,n);"postorder"===r&&e.call(n,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var r=n[e].getNodeById(t);if(r)return r}},contains:function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var r=n[e].contains(t);if(r)return r}},getAncestors:function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,n=this.hostTree,i=n.data.getItemModel(this.dataIndex),r=this.getLevelModel();return r||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),i.getModel(t,(r||e||n.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Ed.prototype={constructor:Ed,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},Ed.createTree=function(t,e,n){function a(t,e){var n=t.value;u=Math.max(u,E(n)?n.length:1),l.push(t);var i=new Bk(t.name,s);e?Ld(i,e):s.root=i,s._nodes.push(i);var r=t.children;if(r)for(var o=0;o<r.length;o++)a(r[o],i)}var s=new Ed(e,n.levels,n.leaves),l=[],u=1;a(t),s.root.updateDepthAndHeight(0);var i=pD(l,{coordDimensions:["value"],dimensionsCount:u}),r=new dD(i,e);return r.initData(l),Sd({mainData:r,struct:s,structAttr:"tree"}),s.update(),s},qT.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i={};i.leaves=n;var r=Ed.createTree(e,this,i),o=0;r.eachNode("preorder",function(t){t.depth>o&&(o=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:o;return r.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),r.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},formatTooltip:function(t){for(var e=this.getData().tree,n=e.root.children[0],i=e.getNodeByDataIndex(t),r=i.getValue(),o=i.name;i&&i!==n;)o=i.parentNode.name+"."+o,i=i.parentNode;return ro(o+(isNaN(r)||null==r?"":" : "+r))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Vs({type:"tree",init:function(){this._oldTree,this._mainGroup=new X_,this.group.add(this._mainGroup)},render:function(i,t,n){var r=i.getData(),e=i.layoutInfo,o=this._mainGroup,a=i.get("layout");"radial"===a?o.attr("position",[e.x+e.width/2,e.y+e.height/2]):o.attr("position",[e.x,e.y]);var s=this._data,l={expandAndCollapse:i.get("expandAndCollapse"),layout:a,orient:i.getOrient(),curvature:i.get("lineStyle.curveness"),symbolRotate:i.get("symbolRotate"),symbolOffset:i.get("symbolOffset"),hoverAnimation:i.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};r.diff(s).add(function(t){qd(r,t)&&Yd(r,t,null,o,i,l)}).update(function(t,e){var n=s.getItemGraphicEl(e);qd(r,t)?Yd(r,t,n,o,i,l):n&&Zd(s,e,n,o,i,l)}).remove(function(t){var e=s.getItemGraphicEl(t);e&&Zd(s,t,e,o,i,l)}).execute(),!0===l.expandAndCollapse&&r.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=r},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Os({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=i.dataIndex,n=t.getData().tree.getNodeByDataIndex(e);n.isExpand=!n.isExpand})});var Vk=function(t,e){t.eachSeriesByType("tree",function(t){Jd(t,e)})};$s(CM("tree","circle")),Rs(Vk),qT.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:Infinity,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var n={name:t.name,children:t.data};rh(n);var i=t.levels||[];i=t.levels=oh(i,e);var r={};return r.levels=i,Ed.createTree(n,this,r).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=E(n)?no(n[0]):no(n);return ro(e.getName(t)+": "+i)},getDataParams:function(t){var e=qT.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=ih(n,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},O(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=F(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var Wk=8,Uk=8,qk=5;ah.prototype={constructor:ah,render:function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),go(o,l.pos,l.box)}},_prepare:function(t,e,n){for(var i=t;i;i=i.parentNode){var r=i.getModel().get("name"),o=n.getTextRect(r),a=Math.max(o.width+2*Wk,e.emptyItemWidth);e.totalWidth+=a+Uk,e.renderList.push({node:i,text:r,width:a})}},_renderContent:function(t,e,n,i,r){for(var o=0,a=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=fo(e.pos,e.box),u=e.totalWidth,c=e.renderList,d=c.length-1;0<=d;d--){var h=c[d],f=h.node,p=h.width,g=h.text;u>l.width&&(u-=p-a,p=a,g=null);var m=new mC({shape:{points:sh(o,0,p,s,d===c.length-1,0===d)},style:D(n.getItemStyle(),{lineJoin:"bevel",text:g,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:y(r,f)});this.group.add(m),lh(m,t,f),o+=p+Uk}},remove:function(){this.group.removeAll()}};var Gk=v,Yk=X_,Zk=yC,Xk=I,Kk=3,Qk=["label"],Jk=["emphasis","label"],tI=["upperLabel"],eI=["emphasis","upperLabel"],nI=10,iI=1,rI=2,oI=nS([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),aI=function(t){var e=oI(t);return e.stroke=e.fill=e.lineWidth=null,e};Vs({type:"treemap",init:function(){this._containerGroup,this._storage=ch(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,n,i){if(!(x(e.findComponents({mainType:"series",subType:"treemap",query:i}),t)<0)){this.seriesModel=t,this.api=n,this.ecModel=e;var r=th(i,["treemapZoomToNode","treemapRootToNode"],t),o=i&&i.type,a=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===o&&r&&l?{rootNodeGroup:l.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,c=this._giveContainerGroup(a),d=this._doRender(c,t,u);s||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(c,d,t,u),this._resetController(n),this._renderBreadcrumb(t,n,r)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Yk,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,n){function c(o,a,s,l,u){function t(t){return t.getId()}function n(t,e){var n=null!=t?o[t]:null,i=null!=e?a[e]:null,r=h(n,i,s,u);r&&c(n&&n.viewChildren||[],i&&i.viewChildren||[],r,l,u+1)}l?Xk(a=o,function(t,e){!t.isRemoved()&&n(e,e)}):new Ys(a,o,t,t).add(n).update(n).remove(y(n,null)).execute()}function i(t){var i=ch();return t&&Xk(t,function(t,e){var n=i[e];Xk(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),i}function r(){Xk(f,function(t){Xk(t,function(t){t.parent&&t.parent.remove(t)})}),Xk(d,function(t){t.invisible=!0,t.dirty()})}var o=e.getData().tree,a=this._oldTree,s=ch(),l=ch(),u=this._storage,d=[],h=y(dh,e,l,u,n,s,d);c(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var f=i(u);return this._oldTree=o,this._storage=l,{lastsForAnimation:s,willDeleteEls:f,renderFinally:r}},_doAnimation:function(t,o,e,a){if(e.get("animation")){var s=e.get("animationDurationUpdate"),l=e.get("animationEasing"),u=uh();Xk(o.willDeleteEls,function(t,o){Xk(t,function(t){if(!t.invisible){var e,n=t.parent;if(a&&"drillDown"===a.direction)e=n===a.rootNodeGroup?{shape:{x:0,y:0,width:n.__tmNodeWidth,height:n.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var i=0,r=0;n.__tmWillDelete||(i=n.__tmNodeWidth/2,r=n.__tmNodeHeight/2),e="nodeGroup"===o?{position:[i,r],style:{opacity:0}}:{shape:{x:i,y:r,width:0,height:0},style:{opacity:0}}}e&&u.add(t,e,s,l)}})}),Xk(this._storage,function(t,r){Xk(t,function(t,e){var n=o.lastsForAnimation[r][e],i={};n&&("nodeGroup"===r?n.old&&(i.position=t.position.slice(),t.attr("position",n.old)):(n.old&&(i.shape=O({},t.shape),t.setShape(n.old)),n.fadein?(t.setStyle("opacity",0),i.style={opacity:1}):1!==t.style.opacity&&(i.style={opacity:1})),u.add(t,i,s,l))})},this),this._state="animating",u.done(Gk(function(){this._state="ready",o.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new ad(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Gk(this._onPan,this)),e.on("zoom",Gk(this._onZoom,this)));var i=new ie(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t,e){if("animating"!==this._state&&(Math.abs(t)>Kk||Math.abs(e)>Kk)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t,y:i.y+e,width:i.width,height:i.height}})}},_onZoom:function(t,e,n){if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new ie(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=ft();vt(s,s,[-e,-n]),xt(s,s,[t,t]),vt(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var n=this.findTarget(t.offsetX,t.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===e)this._zoomToNode(n);else if("link"===e){var r=i.hostTree.data.getItemModel(i.dataIndex),o=r.get("link",!0),a=r.get("target",!0)||"blank";o&&window.open(o,a)}}}}},this)},_renderBreadcrumb:function(e,t,n){function i(t){"animating"!==this._state&&(nh(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new ah(this.group))).render(e,t,n.node,Gk(i,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ch(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(r,o){var a;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var n=e.transformCoordToLocal(r,o),i=e.shape;if(!(i.x<=n[0]&&n[0]<=i.x+i.width&&i.y<=n[1]&&n[1]<=i.y+i.height))return!1;a={node:t,offsetX:n[0],offsetY:n[1]}}},this),a}});for(var sI=function(){},lI=["treemapZoomToNode","treemapRender","treemapMove"],uI=0;uI<lI.length;uI++)Os({type:lI[uI],update:"updateView"},sI);Os({type:"treemapRootToNode",update:"updateView"},function(i,t){function e(t){var e=th(i,["treemapZoomToNode","treemapRootToNode"],t);if(e){var n=t.getViewRoot();n&&(i.direction=nh(n,e.node)?"rollUp":"drillDown"),t.resetViewRoot(e.node)}}t.eachComponent({mainType:"series",subType:"treemap",query:i},e)});var cI=I,dI=b,hI=-1,fI=function(t){var e=t.mappingMethod,n=t.type,i=this.option=L(t);this.type=n,this.mappingMethod=e,this._normalizeData=gI[e];var r=pI[n];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._doMap=r._doMap[e],"piecewise"===e?(gh(i),fh(i)):"category"===e?i.categories?ph(i):gh(i,!0):(T("linear"!==e||i.dataExtent),gh(i))};fI.prototype={constructor:fI,mapValueToVisual:function(t){
|
|
var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return v(this._normalizeData,this)}};var pI=fI.visualHandlers={color:{applyVisual:yh("color"),getColorMapper:function(){var r=this.option;return v("category"===r.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),xh.call(this,t)}:function(t,e,n){var i=!!n;return!e&&(t=this._normalizeData(t)),n=zt(t,r.parsedVisual,n),i?n:Vt(n,"rgba")},this)},_doMap:{linear:function(t){return Vt(zt(t,this.option.parsedVisual),"rgba")},category:xh,piecewise:function(t,e){var n=wh.call(this,e);return null==n&&(n=Vt(zt(t,this.option.parsedVisual),"rgba")),n},fixed:bh}},colorHue:mh(function(t,e){return Ht(t,e)}),colorSaturation:mh(function(t,e){return Ht(t,null,e)}),colorLightness:mh(function(t,e){return Ht(t,null,null,e)}),colorAlpha:mh(function(t,e){return Bt(t,e)}),opacity:{applyVisual:yh("opacity"),_doMap:_h([0,1])},liftZ:{applyVisual:yh("liftZ"),_doMap:{linear:bh,category:bh,piecewise:bh,fixed:bh}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(_(i))n("symbol",i);else if(dI(i))for(var r in i)i.hasOwnProperty(r)&&n(r,i[r])},_doMap:{linear:vh,category:xh,piecewise:function(t,e){var n=wh.call(this,e);return null==n&&(n=vh.call(this,t)),n},fixed:bh}},symbolSize:{applyVisual:yh("symbolSize"),_doMap:_h([0,1])}},gI={linear:function(t){return jr(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=fI.findPieceIndex(t,e,!0);if(null!=n)return jr(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?hI:e},fixed:j};fI.listVisualTypes=function(){var n=[];return I(pI,function(t,e){n.push(e)}),n},fI.addVisualHandler=function(t,e){pI[t]=e},fI.isValidType=function(t){return pI.hasOwnProperty(t)},fI.eachVisual=function(t,e,n){b(t)?I(t,e,n):e.call(n,t)},fI.mapVisual=function(t,i,r){var o,a=E(t)?[]:b(t)?{}:(o=!0,null);return fI.eachVisual(t,function(t,e){var n=i.call(r,t,e);o?a=n:a[e]=n}),a},fI.retrieveVisuals=function(n){var i,r={};return n&&cI(pI,function(t,e){n.hasOwnProperty(e)&&(r[e]=n[e],i=!0)}),i?r:null},fI.prepareVisualTypes=function(t){if(dI(t)){var n=[];cI(t,function(t,e){n.push(e)}),t=n}else{if(!E(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},fI.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},fI.findPieceIndex=function(i,t,e){function n(t,e){var n=Math.abs(t-i);n<o&&(o=n,r=e)}for(var r,o=Infinity,a=0,s=t.length;a<s;a++){var l=t[a].value;if(null!=l){if(l===i||"string"==typeof l&&l===i+"")return a;e&&n(l,a)}}for(a=0,s=t.length;a<s;a++){var u=t[a],c=u.interval,d=u.close;if(c){if(c[0]===-Infinity){if(Ch(d[1],i,c[1]))return a}else if(c[1]===Infinity){if(Ch(d[0],c[0],i))return a}else if(Ch(d[0],c[0],i)&&Ch(d[1],i,c[1]))return a;e&&n(c[0],a),e&&n(c[1],a)}}if(e)return i===Infinity?t.length-1:i===-Infinity?0:r};var mI=E,vI="itemStyle",yI={seriesType:"treemap",reset:function(t){var e=t.getData().tree,n=e.root,i=t.getModel(vI);n.isRemoved()||Th(n,{},A(e.levelModels,function(t){return t?t.get(vI):null}),i,t.getViewRoot().getAncestors(),t)}},xI=Math.max,bI=Math.min,_I=N,wI=I,SI=["itemStyle","borderWidth"],CI=["itemStyle","gapWidth"],TI=["upperLabel","show"],AI=["upperLabel","height"],DI={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=po(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Hr(_I(s.width,l[0]),r),c=Hr(_I(s.height,l[1]),o),d=i&&i.type,h=th(i,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===d||"treemapMove"===d?i.rootRect:null,p=t.getViewRoot(),g=eh(p);if("treemapMove"!==d){var m="treemapZoomToNode"===d?jh(t,h,p,u,c):f?[f.width,f.height]:[u,c],v=a.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:a.squareRatio,sort:v,leafDepth:a.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(x),Oh(p,y,!1,0);x=p.getLayout();wI(g,function(t,e){var n=(g[e+1]||p).getValue();t.setLayout(O({dataExtent:[n,n],borderWidth:0,upperHeight:0},x))})}var b=t.getData().tree.root;b.setLayout(Hh(s,f,h),!0),t.setLayoutInfo(s),Bh(b,new ie(-s.x,-s.y,r,o),g,p,0)}};$s(yI),Rs(DI);var MI=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},kI=MI.prototype;kI.type="graph",kI.isDirected=function(){return this._directed},kI.addNode=function(t,e){t=t||""+e;var n=this._nodesMap;if(!n[Wh(t)]){var i=new Uh(t,e);return(i.hostGraph=this).nodes.push(i),n[Wh(t)]=i}Hb&&console.error("Graph nodes have duplicate name or id")},kI.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},kI.getNodeById=function(t){return this._nodesMap[Wh(t)]},kI.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),Uh.isInstance(t)||(t=i[Wh(t)]),Uh.isInstance(e)||(e=i[Wh(e)]),t&&e){var o=t.id+"-"+e.id;if(!r[o]){var a=new qh(t,e,n);return(a.hostGraph=this)._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),r[o]=a}}},kI.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},kI.getEdge=function(t,e){Uh.isInstance(t)&&(t=t.id),Uh.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},kI.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r<i;r++)0<=n[r].dataIndex&&t.call(e,n[r],r)},kI.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r<i;r++)0<=n[r].dataIndex&&0<=n[r].node1.dataIndex&&0<=n[r].node2.dataIndex&&t.call(e,n[r],r)},kI.breadthFirstTraverse=function(t,e,n,i){if(Uh.isInstance(e)||(e=this._nodesMap[Wh(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,e,null))for(var a=[e];a.length;){var s=a.shift(),l=s[r];for(o=0;o<l.length;o++){var u=l[o],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(t.call(i,c,s))return;a.push(c),c.__visited=!0}}}}},kI.update=function(){for(var t=this.data,n=this.edgeData,e=this.nodes,i=this.edges,r=0,o=e.length;r<o;r++)e[r].dataIndex=-1;for(r=0,o=t.count();r<o;r++)e[t.getRawIndex(r)].dataIndex=r;n.filterSelf(function(t){var e=i[n.getRawIndex(t)];return 0<=e.node1.dataIndex&&0<=e.node2.dataIndex});for(r=0,o=i.length;r<o;r++)i[r].dataIndex=-1;for(r=0,o=n.count();r<o;r++)i[n.getRawIndex(r)].dataIndex=r},kI.clone=function(){for(var t=new MI(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(i=0;i<n.length;i++){var r=n[i];t.addEdge(r.node1.id,r.node2.id,r.dataIndex)}return t},Uh.prototype={constructor:Uh,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},qh.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var II=function(n,i){return{getValue:function(t){var e=this[n][i];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[n][i].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[n][i].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[n][i].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[n][i].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][i].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][i].getRawIndex(this.dataIndex)}}};r(Uh,II("hostGraph","data")),r(qh,II("hostGraph","edgeData")),MI.Node=Uh,MI.Edge=qh,Kn(Uh),Kn(qh);var EI=function(t,e,n,i,r){for(var o=new MI(i),a=0;a<t.length;a++)o.addNode(N(t[a].id,t[a].name,a),a);var s=[],l=[],u=0;for(a=0;a<e.length;a++){var c=e[a],d=c.source,h=c.target;o.addEdge(d,h,u)&&(l.push(c),s.push(N(c.id,d+" > "+h)),u++)}var f,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=yl(t,n);else{var g=qo.get(p),m=g&&"view"!==g.type&&g.dimensions||[];x(m,"value")<0&&m.concat(["value"]);var v=pD(t,{coordDimensions:m});(f=new dD(v,n)).initData(t)}var y=new dD(["value"],n);return y.initData(l,s),r&&r(f,y),Sd({mainData:f,struct:o,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o},LI=Bs({type:"series.graph",init:function(t){LI.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){LI.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){LI.superApply(this,"mergeDefaultAndTheme",arguments),Pn(t,["edgeLabel"],["show"])},getInitialData:function(t,s){function e(t,e){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),r=new Or({label:i.option},i.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Or({emphasis:{label:o.option}},o.parentModel,s);e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}var n=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&n)return EI(i,n,this,!0,e).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"!==n)return LI.superApply(this,"formatTooltip",arguments);var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),l=ro(l.join(" > ")),r.value&&(l+=" : "+ro(r.value)),l},_updateCategoriesData:function(){var t=A(this.option.categories||[],function(t){return null!=t.value?t:O({value:0},t)}),e=new dD(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return LI.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),OI=xC.prototype,PI=_C.prototype,NI=Ui({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Gh(e)?OI:PI).buildPath(t,e)},pointAt:function(t){return Gh(this.shape)?OI.pointAt.call(this,t):PI.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=Gh(e)?[e.x2-e.x1,e.y2-e.y1]:PI.tangentAt.call(this,t);return tt(n,n)}}),RI=["fromSymbol","toSymbol"],$I=Jh.prototype;$I.beforeUpdate=Qh,$I._createLine=function(n,i,t){var e=n.hostModel,r=Xh(n.getItemLayout(i));r.shape.percent=0,Tr(r,{shape:{percent:1}},e,i),this.add(r);var o=new lC({name:"label"});this.add(o),I(RI,function(t){var e=Zh(t,n,i);this.add(e),this[Yh(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},$I.updateData=function(r,o,t){var e=r.hostModel,n=this.childOfName("line"),i=r.getItemLayout(o),a={shape:{}};Kh(a.shape,i),Cr(n,a,e,o),I(RI,function(t){var e=r.getItemVisual(o,t),n=Yh(t);if(this[n]!==e){this.remove(this.childOfName(t));var i=Zh(t,r,o);this.add(i)}this[n]=e},this),this._updateCommonStl(r,o,t)},$I._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=n&&n.lineStyle,a=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var u=t.getItemModel(e);o=u.getModel("lineStyle").getLineStyle(),a=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=$(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(D({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},o)),r.hoverStyle=a,I(RI,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var h,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(h=c||"#000",null==(f=i.getFormattedLabel(e,"normal",t.dataType)))){var v=i.getRawValue(e);f=null==v?t.getName(e):isFinite(v)?Br(v):v}var y=p?f:null,x=g?R(i.getFormattedLabel(e,"emphasis",t.dataType),f):null,b=m.style;null==y&&null==x||(pr(m.style,s,{text:y},{autoColor:h}),m.__textAlign=b.textAlign,m.__verticalAlign=b.textVerticalAlign,m.__position=s.get("position")||"middle"),m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,hr(this)},$I.highlight=function(){this.trigger("emphasis")},$I.downplay=function(){this.trigger("normal")},$I.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},$I.setLinePoints=function(t){var e=this.childOfName("line");Kh(e.shape,t),e.dirty()},o(Jh,X_);var FI=tf.prototype;FI.isPersistent=function(){return!0},FI.updateData=function(n){var i=this,e=i.group,r=i._lineData;i._lineData=n,r||e.removeAll();var o=rf(n);n.diff(r).add(function(t){ef(i,n,t,o)}).update(function(t,e){nf(i,r,n,e,t,o)}).remove(function(t){e.remove(r.getItemGraphicEl(t))}).execute()},FI.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},FI.incrementalPrepareUpdate=function(t){this._seriesScope=rf(t),this._lineData=null,this.group.removeAll()},FI.incrementalUpdate=function(t,e){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var i=t.start;i<t.end;i++){if(af(e.getItemLayout(i))){var r=new this._ctor(e,i,this._seriesScope);r.traverse(n),this.group.add(r),e.setItemGraphicEl(i,r)}}},FI.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},FI._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var zI=[],jI=[],HI=[],BI=ui,VI=l_,WI=Math.abs,UI=function(t,s){function l(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}var u=[],c=fi,d=[[],[],[]],h=[[],[]],f=[];s/=2,t.eachEdge(function(t){var e=t.getLayout(),n=t.getVisual("fromSymbol"),i=t.getVisual("toSymbol");e.__original||(e.__original=[V(e[0]),V(e[1])],e[2]&&e.__original.push(V(e[2])));var r=e.__original;if(null!=e[2]){if(B(d[0],r[0]),B(d[1],r[2]),B(d[2],r[1]),n&&"none"!=n){var o=l(t.node1),a=sf(d,r[0],o*s);c(d[0][0],d[1][0],d[2][0],a,u),d[0][0]=u[3],d[1][0]=u[4],c(d[0][1],d[1][1],d[2][1],a,u),d[0][1]=u[3],d[1][1]=u[4]}if(i&&"none"!=i){o=l(t.node2),a=sf(d,r[1],o*s);c(d[0][0],d[1][0],d[2][0],a,u),d[1][0]=u[1],d[2][0]=u[2],c(d[0][1],d[1][1],d[2][1],a,u),d[1][1]=u[1],d[2][1]=u[2]}B(e[0],d[0]),B(e[1],d[2]),B(e[2],d[1])}else{if(B(h[0],r[0]),B(h[1],r[1]),G(f,h[1],h[0]),tt(f,f),n&&"none"!=n){o=l(t.node1);q(h[0],h[0],f,o*s)}if(i&&"none"!=i){o=l(t.node2);q(h[1],h[1],f,-o*s)}B(e[0],h[0]),B(e[1],h[1])}})},qI=["itemStyle","opacity"],GI=["lineStyle","opacity"];Vs({type:"graph",init:function(t,e){var n=new Mu,i=new tf,r=this.group;this._controller=new ad(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(r,t,o){var e=r.coordinateSystem;this._model=r,this._nodeScaleRatio=r.get("nodeScaleRatio");var n=this._symbolDraw,i=this._lineDraw,a=this.group;if("view"===e.type){var s={position:e.position,scale:e.scale};this._firstRender?a.attr(s):Cr(a,s,r)}UI(r.getGraph(),this._getNodeGlobalScale(r));var l=r.getData();n.updateData(l);var u=r.getEdgeData();i.updateData(u),this._updateNodeAndLinkScale(),this._updateController(r,t,o),clearTimeout(this._layoutTimeout);var c=r.forceLayout,d=r.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),l.eachItemGraphicEl(function(t,e){var n=l.getItemModel(e);t.off("drag").off("dragend");var i=l.getItemModel(e).get("draggable");i&&t.on("drag",function(){c&&(c.warmUp(),!this._layouting&&this._startForceLayoutIteration(c,d),c.setFixed(e),l.setItemLayout(e,t.position))},this).on("dragend",function(){c&&c.setUnfixed(e)},this),t.setDraggable(i&&c),t.off("mouseover",t.__focusNodeAdjacency),t.off("mouseout",t.__unfocusNodeAdjacency),n.get("focusNodeAdjacency")&&(t.on("mouseover",t.__focusNodeAdjacency=function(){o.dispatchAction({type:"focusNodeAdjacency",seriesId:r.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){o.dispatchAction({type:"unfocusNodeAdjacency",seriesId:r.id})}))},this),l.graph.eachEdge(function(t){var e=t.getGraphicEl();e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){o.dispatchAction({type:"focusNodeAdjacency",seriesId:r.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){o.dispatchAction({type:"unfocusNodeAdjacency",seriesId:r.id})}))});var h="circular"===r.get("layout")&&r.get("circular.rotateLabel"),f=l.getLayout("cx"),p=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var n=t.getSymbolPath();if(h){var i=l.getItemLayout(e),r=Math.atan2(i[1]-p,i[0]-f);r<0&&(r=2*Math.PI+r);var o=i[0]<f;o&&(r-=Math.PI);var a=o?"left":"right";n.setStyle({textRotation:-r,textPosition:a,textOrigin:"center"}),n.hoverStyle&&(n.hoverStyle.textPosition=a)}else n.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,n,i){var r=this._model.getData().graph,o=i.dataIndex,a=i.edgeDataIndex,s=r.getNodeByIndex(o),l=r.getEdgeByIndex(a);(s||l)&&(r.eachNode(function(t){uf(t,qI,.1)}),r.eachEdge(function(t){uf(t,GI,.1)}),s&&(cf(s,qI),I(s.edges,function(t){t.dataIndex<0||(cf(t,GI),cf(t.node1,qI),cf(t.node2,qI))})),l&&(cf(l,GI),cf(l.node1,qI),cf(l.node2,qI)))},unfocusNodeAdjacency:function(){var t=this._model.getData().graph;t.eachNode(function(t){uf(t,qI)}),t.eachEdge(function(t){uf(t,GI)})},_startForceLayoutIteration:function(t,e){var n=this;!function i(){t.step(function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())})}()},_updateController:function(r,t,o){var e=this._controller,i=this._controllerHost,a=this.group;e.setPointerChecker(function(t,e,n){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(e,n)&&!md(t,o,r)}),"view"===r.coordinateSystem.type?(e.enable(r.get("roam")),i.zoomLimit=r.get("scaleLimit"),i.zoom=r.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t,e){pd(i,t,e),o.dispatchAction({seriesId:r.id,type:"graphRoam",dx:t,dy:e})}).on("zoom",function(t,e,n){gd(i,t,e,n),o.dispatchAction({seriesId:r.id,type:"graphRoam",zoom:t,originX:e,originY:n}),this._updateNodeAndLinkScale(),UI(r.getGraph(),this._getNodeGlobalScale(r)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),n=this._getNodeGlobalScale(t),i=[n,n];e.eachItemGraphicEl(function(t){t.attr("scale",i)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scale,r=i&&i[0]||1;return((e.getZoom()-1)*n+1)/r},updateLayout:function(t){UI(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Os({type:"graphRoam",event:"graphRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",query:n},function(t){var e=_d(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})}),Os({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series.graph:focusNodeAdjacency"},function(){}),Os({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series.graph:unfocusNodeAdjacency"},function(){});var YI=function(t){var a={};t.eachSeriesByType("graph",function(i){var r=i.getCategoriesData(),n=i.getData(),o={};r.each(function(t){var e=r.getName(t);o["ec-"+e]=t;var n=r.getItemModel(t).get("itemStyle.color")||i.getColorFromPalette(e,a);r.setItemVisual(t,"color",n)}),r.count()&&n.each(function(t){var e=n.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=o["ec-"+e]),n.getItemVisual(t,"color",!0)||n.setItemVisual(t,"color",r.getItemVisual(e,"color")))})})},ZI=function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=df(t.get("edgeSymbol")),n=df(t.get("edgeSymbolSize")),u="lineStyle.color".split("."),c="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",n&&n[0]),l.setVisual("toSymbolSize",n&&n[1]),l.setVisual("color",t.get(u)),l.setVisual("opacity",t.get(c)),l.each(function(t){var e=l.getItemModel(t),n=s.getEdgeByIndex(t),i=df(e.getShallow("symbol",!0)),r=df(e.getShallow("symbolSize",!0)),o=e.get(u),a=e.get(c);switch(o){case"source":o=n.node1.getVisual("color");break;case"target":o=n.node2.getVisual("color")}i[0]&&n.setVisual("fromSymbol",i[0]),i[1]&&n.setVisual("toSymbol",i[1]),r[0]&&n.setVisual("fromSymbolSize",r[0]),r[1]&&n.setVisual("toSymbolSize",r[1]),n.setVisual("color",o),n.setVisual("opacity",a)})})},XI=function(t){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),r=[];I(n.dimensions,function(t){r=r.concat(i.mapDimension(t,!0))});for(var o=0;o<i.count();o++){for(var a=[],s=!1,l=0;l<r.length;l++){var u=i.get(r[l],o);isNaN(u)||(s=!0),a.push(u)}s?i.setItemLayout(o,n.dataToPoint(a)):i.setItemLayout(o,[NaN,NaN])}ff(i.graph)}else e&&"none"!==e||hf(t)})},KI=function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&pf(t)})},QI=q,JI=function(t){t.eachSeriesByType("graph",function(t){if(!(l=t.coordinateSystem)||"view"===l.type)if("force"===t.get("layout")){var d=t.preservedPoints||{},h=t.getGraph(),f=h.data,e=h.edgeData,n=t.getModel("force"),i=n.get("initLayout");t.preservedPoints?f.each(function(t){var e=f.getId(t);f.setItemLayout(t,d[e]||[NaN,NaN])}):i&&"none"!==i?"circular"===i&&pf(t):hf(t);var r=f.getDataExtent("value"),o=e.getDataExtent("value"),a=n.get("repulsion"),s=n.get("edgeLength");E(a)||(a=[a,a]),E(s)||(s=[s,s]),s=[s[1],s[0]];var l,u=f.mapArray("value",function(t,e){var n=f.getItemLayout(e),i=jr(t,r,a);return isNaN(i)&&(i=(a[0]+a[1])/2),{w:i,rep:i,fixed:f.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),c=e.mapArray("value",function(t,e){var n=h.getEdgeByIndex(e),i=jr(t,o,s);return isNaN(i)&&(i=(s[0]+s[1])/2),{n1:u[n.node1.dataIndex],n2:u[n.node2.dataIndex],d:i,curveness:n.getModel().get("lineStyle.curveness")||0}}),p=(l=t.coordinateSystem).getBoundingRect(),g=gf(u,c,{rect:p,gravity:n.get("gravity")}),m=g.step;g.step=function(c){for(var t=0,e=u.length;t<e;t++)u[t].fixed&&B(u[t].p,h.getNodeByIndex(t).getLayout());m(function(t,e,n){for(var i=0,r=t.length;i<r;i++)t[i].fixed||h.getNodeByIndex(i).setLayout(t[i].p),d[f.getId(i)]=t[i].p;for(i=0,r=e.length;i<r;i++){var o=e[i],a=h.getEdgeByIndex(i),s=o.n1.p,l=o.n2.p,u=a.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],B(u[0],s),B(u[1],l),+o.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*o.curveness,(s[1]+l[1])/2-(l[0]-s[0])*o.curveness]),a.setLayout(u)}c&&c(n)})},t.forceLayout=g,t.preservedPoints=d,g.step()}else t.forceLayout=null})},tE=function(t,h){var f=[];return t.eachSeriesByType("graph",function(t){var e=t.get("coordinateSystem");if(!e||"view"===e){var n=t.getData(),i=[],r=[];gi(n.mapArray(function(t){var e=n.getItemModel(t);return[+e.get("x"),+e.get("y")]}),i,r),r[0]-i[0]==0&&(r[0]+=1,i[0]-=1),r[1]-i[1]==0&&(r[1]+=1,i[1]-=1);var o=(r[0]-i[0])/(r[1]-i[1]),a=mf(t,h,o);isNaN(o)&&(i=[a.x,a.y],r=[a.x+a.width,a.y+a.height]);var s=r[0]-i[0],l=r[1]-i[1],u=a.width,c=a.height,d=t.coordinateSystem=new Xc;d.zoomLimit=t.get("scaleLimit"),d.setBoundingRect(i[0],i[1],s,l),d.setViewRect(a.x,a.y,u,c),d.setCenter(t.get("center")),d.setZoom(t.get("zoom")),f.push(d)}}),f};Es(function(t){var o=t.findComponents({mainType:"legend"});o&&o.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),i=t.getGraph().data,r=e.mapArray(e.getName);i.filterSelf(function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=r[e]);for(var n=0;n<o.length;n++)if(!o[n].isSelected(e))return!1}return!0})},this)}),$s(CM("graph","circle",null)),$s(YI),$s(ZI),Rs(XI),Rs(KI),Rs(JI),Ps("graphView",{create:tE});qT.extend({type:"series.gauge",getInitialData:function(t){var e=t.data||[];return E(e)||(e=[e]),t.data=e,ik(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var eE=Pi.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(r/3<=o?1:2),l=e.y-i(a)*o*(r/3<=o?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)}}),nE=2*Math.PI,iE=(La.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i=t.get("axisLine.lineStyle.color"),r=vf(t,n);this._renderMain(t,e,n,i,r)},dispose:function(){},_renderMain:function(t,e,n,i,r){for(var o=this.group,a=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=((f=-t.get("endAngle")/180*Math.PI)-l)%nE,c=l,d=a.get("width"),h=0;h<i.length;h++){var f,p=Math.min(Math.max(i[h][0],0),1),g=new hC({shape:{startAngle:c,endAngle:f=l+u*p,cx:r.cx,cy:r.cy,clockwise:s,r0:r.r-d,r:r.r},silent:!0});g.setStyle({fill:i[h][1]}),g.setStyle(a.getLineStyle(["color","borderWidth","borderColor"])),o.add(g),c=f}var m=function(t){if(t<=0)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]};if(!s){var v=l;l=f,f=v}this._renderTicks(t,e,n,m,r,l,f,s),this._renderPointer(t,e,n,m,r,l,f,s),this._renderTitle(t,e,n,m,r),this._renderDetail(t,e,n,m,r)},_renderTicks:function(t,e,n,i,r,o,a){for(var s=this.group,l=r.cx,u=r.cy,c=r.r,d=+t.get("min"),h=+t.get("max"),f=t.getModel("splitLine"),p=t.getModel("axisTick"),g=t.getModel("axisLabel"),m=t.get("splitNumber"),v=p.get("splitNumber"),y=Hr(f.get("length"),c),x=Hr(p.get("length"),c),b=o,_=(a-o)/m,w=_/v,S=f.getModel("lineStyle").getLineStyle(),C=p.getModel("lineStyle").getLineStyle(),T=0;T<=m;T++){var A=Math.cos(b),D=Math.sin(b);if(f.get("show")){var M=new xC({shape:{x1:A*c+l,y1:D*c+u,x2:A*(c-y)+l,y2:D*(c-y)+u},style:S,silent:!0});"auto"===S.stroke&&M.setStyle({stroke:i(T/m)}),s.add(M)}if(g.get("show")){var k=yf(Br(T/m*(h-d)+d),g.get("formatter")),I=g.get("distance"),E=i(T/m);s.add(new lC({style:pr({},g,{text:k,x:A*(c-y-I)+l,y:D*(c-y-I)+u,textVerticalAlign:D<-.4?"top":.4<D?"bottom":"middle",textAlign:A<-.4?"left":.4<A?"right":"center"},{autoColor:E}),silent:!0}))}if(p.get("show")&&T!==m){for(var L=0;L<=v;L++){A=Math.cos(b),D=Math.sin(b);var O=new xC({shape:{x1:A*c+l,y1:D*c+u,x2:A*(c-x)+l,y2:D*(c-x)+u},silent:!0,style:C});"auto"===C.stroke&&O.setStyle({stroke:i((T+L/v)/m)}),s.add(O),b+=w}b-=w}else b+=_}},_renderPointer:function(i,t,e,r,o,n,a){var s=this.group,l=this._data;if(i.get("pointer.show")){var u=[+i.get("min"),+i.get("max")],c=[n,a],d=i.getData(),h=d.mapDimension("value");d.diff(l).add(function(t){var e=new eE({shape:{angle:n}});Tr(e,{shape:{angle:jr(d.get(h,t),u,c,!0)}},i),s.add(e),d.setItemGraphicEl(t,e)}).update(function(t,e){var n=l.getItemGraphicEl(e);Cr(n,{shape:{angle:jr(d.get(h,t),u,c,!0)}},i),s.add(n),d.setItemGraphicEl(t,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var n=d.getItemModel(e),i=n.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Hr(i.get("width"),o.r),r:Hr(i.get("length"),o.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",r(jr(d.get(h,e),u,[0,1],!0))),hr(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else l&&l.eachItemGraphicEl(function(t){s.remove(t)})},_renderTitle:function(t,e,n,i,r){var o=t.getData(),a=o.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=r.cx+Hr(l[0],r.r),c=r.cy+Hr(l[1],r.r),d=+t.get("min"),h=+t.get("max"),f=i(jr(t.getData().get(a,0),[d,h],[0,1],!0));this.group.add(new lC({silent:!0,style:pr({},s,{x:u,y:c,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,n,i,r){var o=t.getModel("detail"),a=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetCenter"),u=r.cx+Hr(l[0],r.r),c=r.cy+Hr(l[1],r.r),d=Hr(o.get("width"),r.r),h=Hr(o.get("height"),r.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=i(jr(p,[a,s],[0,1],!0));this.group.add(new lC({silent:!0,style:pr({},o,{x:u,y:c,text:yf(p,o.get("formatter")),textWidth:isNaN(d)?null:d,textHeight:isNaN(h)?null:h,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Bs({type:"series.funnel",init:function(t){iE.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(){return ik(this,["value"])},_defaultLabelLine:function(t){Pn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),n=iE.superCall(this,"getDataParams",t),i=e.mapDimension("value"),r=e.getSum(i);return n.percent=r?+(e.get(i,t)/r*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),rE=xf.prototype,oE=["itemStyle","opacity"];rE.updateData=function(t,e,n){var i=this.childAt(0),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=t.getItemModel(e).get(oE);s=null==s?1:s,i.useStyle({}),n?(i.setShape({points:a.points}),i.setStyle({opacity:0}),Tr(i,{style:{opacity:s}},r,e)):Cr(i,{style:{opacity:s},shape:{points:a.points}},r,e);var l=o.getModel("itemStyle"),u=t.getItemVisual(e,"color");i.setStyle(D({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),hr(this)},rE._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Cr(n,{shape:{points:a.linePoints||a.linePoints}},r,e),Cr(i,{style:{x:a.x,y:a.y}},r,e),i.attr({rotation:a.rotation,origin:[a.x,a.y],z2:10});var l=o.getModel("label"),u=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");fr(i.style,i.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!a.inside},{textAlign:a.textAlign,textVerticalAlign:a.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),
|
|
n.hoverIgnore=!d.get("show"),n.setStyle({stroke:s}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=d.getModel("lineStyle").getLineStyle()},o(xf,X_);La.extend({type:"funnel",render:function(t){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add(function(t){var e=new xf(i,t);i.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)}).remove(function(t){var e=r.getItemGraphicEl(t);o.remove(e)}).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var aE=function(t,_){t.eachSeriesByType("funnel",function(t){var r=t.getData(),o=r.mapDimension("value"),e=t.get("sort"),a=bf(t,_),n=_f(r,e),s=[Hr(t.get("minSize"),a.width),Hr(t.get("maxSize"),a.width)],i=r.getDataExtent(o),l=t.get("min"),u=t.get("max");null==l&&(l=Math.min(i[0],0)),null==u&&(u=i[1]);var c=t.get("funnelAlign"),d=t.get("gap"),h=(a.height-d*(r.count()-1))/r.count(),f=a.y,p=function(t,e){var n,i=jr(r.get(o,t)||0,[l,u],s,!0);switch(c){case"left":n=a.x;break;case"center":n=a.x+(a.width-i)/2;break;case"right":n=a.x+a.width-i}return[[n,e],[n+i,e]]};"ascending"===e&&(h=-h,d=-d,f+=a.height,n=n.reverse());for(var g=0;g<n.length;g++){var m=n[g],v=n[g+1],y=r.getItemModel(m).get("itemStyle.height");null==y?y=h:(y=Hr(y,a.height),"ascending"===e&&(y=-y));var x=p(m,f),b=p(v,f+y);f+=y+d,r.setItemLayout(m,{points:x.concat(b.slice().reverse())})}wf(r)})};$s(lk("funnel")),Rs(aE),Es(fk("funnel"));var sE=function(t){Sf(t),Cf(t)},lE=function(t,e,n,i,r){rM.call(this,t,e,n),this.type=i||"value",this.axisIndex=r};lE.prototype={constructor:lE,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},o(lE,rM);var uE=function(t,e,n,i,r,o){e[0]=Af(e[0],n),e[1]=Af(e[1],n),t=t||0;var a=n[1]-n[0];null!=r&&(r=Af(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i&&(r=o=Math.abs(e[1]-e[0]),i=0);var s=Tf(e,i);e[i]+=t;var l=r||0,u=n.slice();s.sign<0?u[0]+=l:u[1]-=l,e[i]=Af(e[i],u);var c=Tf(e,i);null!=r&&(c.sign!==s.sign||c.span<r)&&(e[1-i]=e[i]+s.sign*r);c=Tf(e,i);return null!=o&&c.span>o&&(e[1-i]=e[i]+c.sign*o),e},cE=I,dE=Math.min,hE=Math.max,fE=Math.floor,pE=Math.ceil,gE=Br,mE=Math.PI;Df.prototype={type:"parallel",constructor:Df,_init:function(t,a){var e=t.dimensions,s=t.parallelAxisIndex;cE(e,function(t,e){var n=s[e],i=a.getComponent("parallelAxis",n),r=this._axesMap.set(t,new lE(t,Ul(i),[0,0],i.get("type"),n)),o="category"===r.type;r.onBand=o&&i.get("boundaryGap"),r.inverse=i.get("inverse"),(i.axis=r).model=i,r.coordinateSystem=i.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return n<=o&&o<=n+e.axisLength&&i<=a&&a<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,i){i.eachSeries(function(t){if(e.contains(t,i)){var n=t.getData();cE(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Wl(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=po(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,c=Mf(e.get("axisExpandWidth"),l),d=Mf(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&3<u&&d<u&&1<d&&0<c&&0<s,f=e.get("axisExpandWindow");f?(t=Mf(f[1]-f[0],l),f[1]=f[0]+t):(t=Mf(c*(d-1),l),(f=[c*(e.get("axisExpandCenter")||fE(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-d);p<3&&(p=0);var g=[fE(gE(f[0]/c,1))+1,pE(gE(f[1]/c,1))-1],m=p/c*f[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var l=this._rect,t=this._axesMap,e=this.dimensions,u=this._makeLayoutInfo(),c=u.layout;t.each(function(t){var e=[0,u.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),cE(e,function(t,e){var n=(u.axisExpandable?If:kf)(e,u),i={horizontal:{x:n.position,y:u.axisLength},vertical:{x:0,y:n.position}},r={horizontal:mE/2,vertical:0},o=[i[c].x+l.x,i[c].y+l.y],a=r[c],s=ft();yt(s,s,a),vt(s,s,o),this._axesLayout[t]={position:o,rotation:a,transform:s,axisNameAvailableWidth:n.axisNameAvailableWidth,axisLabelShow:n.axisLabelShow,nameTruncateMaxWidth:n.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];I(o,function(t){a.push(e.mapDimension(t)),s.push(r.get(t).model)});for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var c;if(l){c="active";for(var d=e.getValues(a,u),h=0,f=o.length;h<f;h++){if("inactive"===s[h].getActiveState(d[h])){c="inactive";break}}}else c="normal";t(c,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,r=t.length;i<r;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(t,e){return Dr([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return L(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),r=i[1]-i[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var a,s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&s<r*c[0]?(l="jump",a=s-r*c[2]):d&&u&&s>r*(1-c[0])?(l="jump",a=s-r*(1-c[2])):0<=(a=s-r*c[1])&&(a=s-r*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?uE(a,i,o,"all"):l="none";else{r=i[1]-i[0];var h=o[1]*s/r;(i=[hE(0,h-r/2)])[1]=dE(o[1],i[0]+r),i[0]=i[1]-r}return{axisExpandWindow:i,behavior:l}}},qo.register("parallel",{create:Ef});var vE=oT.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return nS([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=L(t);if(e)for(var n=e.length-1;0<=n;n--)Vr(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i<r;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}}),yE={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};g(vE.prototype,WD),PM("parallel",vE,Lf,yE),oT.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){oT.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&g(e,t,!0),this._initDimensions()},contains:function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},setAxisExpand:function(e){I(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[];I(f(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),n.push(t.componentIndex)})}}),Os({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),Os("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var xE=y,bE=I,_E=A,wE=Math.min,SE=Math.max,CE=Math.pow,TE=1e4,AE=6,DE=6,ME="globalPan",kE={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},IE={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},EE={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},LE=0;Of.prototype={constructor:Of,enableBrush:function(t){return Hb&&T(this._mounted),this._brushType&&Nf(this),t.brushType&&Pf(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};I(t,function(t){e[t.panelId]=L(t)})}else this._panels=null;return this},mount:function(t){t=t||{},Hb&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){bE(this._covers,t,e)},updateCovers:function(r){function n(t,e){return(null!=t.id?t.id:o+e)+"-"+t.brushType}function t(t,e){return n(t.__brushOption,e)}function e(t,e){var n=r[t];if(null!=e&&a[e]===u)s[t]=a[e];else{var i=s[t]=null!=e?(a[e].__brushOption=n,a[e]):$f(l,Rf(l,n));jf(l,i)}}function i(t){a[t]!==u&&l.group.remove(a[t])}Hb&&T(this._mounted),r=A(r,function(t){return g(L(EE),t,!0)});var o="\0-brush-index-",a=this._covers,s=this._covers=[],l=this,u=this._creatingCover;return new Ys(a,r,t,n).add(e).update(e).remove(i).execute(),this},unmount:function(){if(!Hb||this._mounted)return this.enableBrush(!1),Wf(this),this._zr.remove(this.group),Hb&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},r(Of,d_);var OE={mousedown:function(t){if(this._dragging)hp.call(this,t);else if(!t.target||!t.target.draggable){lp(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Bf(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(sp(this,t,e),this._dragging){lp(t);var n=cp(this,t,e,!1);n&&Uf(this,n)}},mouseup:hp},PE={lineX:fp(0),lineY:fp(1),rect:{createCover:function(t,e){return Yf(xE(np,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Gf(t);return Jf(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){Zf(t,e,n,i)},updateCommon:Xf,contain:up},polygon:{createCover:function(t,e){var n=new X_;return n.add(new vC({name:"main",style:Qf(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new mC({name:"main",draggable:!0,drift:xE(ip,t,e),ondragend:xE(Uf,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n){e.childAt(0).setShape({points:op(t,e,n)})},updateCommon:Xf,contain:up}},NE=["axisLine","axisTickLabel","axisName"],RE=Hs({type:"parallelAxis",init:function(t,e){RE.superApply(this,"init",arguments),(this._brushController=new Of(e.getZr())).on("brush",v(this._onBrush,this))},render:function(t,e,n,i){if(!yp(t,e,i)){this.axisModel=t,this.api=n,this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new X_,this.group.add(this._axisGroup),t.get("show")){var o=bp(t,e),a=o.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,c=O({strokeContainThreshold:l},a.getAxisLayout(u)),d=new jM(t,c);I(NE,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,t,o,l,n);var h=i&&!1===i.animation?null:t;kr(r,this._axisGroup,h)}}},_refreshBrushController:function(t,e,n,i,r,o){var a=n.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),u=ie.create({x:a[0],y:-r/2,width:s,height:r});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:pp(u),isTargetByCursor:mp(u,o,i),getLinearBrushOtherExtent:gp(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(xp(n))},_onBrush:function(t,e){var n=this.axisModel,i=n.axis,r=A(t,function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:r})},dispose:function(){this._brushController.dispose()}}),$E=5;Hs({type:"parallel",render:function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},I(FE,function(t,e){n.getZr().on(e,this._handlers[e]=v(t,this))},this)),Fa(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,n){I(this._handlers,function(t,e){n.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(O({type:"parallelAxisExpand"},t))}});var FE={mousedown:function(t){_p(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(_p(this,"click")&&e){var n=[t.offsetX,t.offsetY],i=Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2);if($E<i)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&_p(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null})}}};Is(sE),qT.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return wp(t,this),yl(t,this)},getRawIndicesByActiveState:function(n){var t=this.coordinateSystem,i=this.getData(),r=[];return t.eachActiveState(i,function(t,e){n===t&&r.push(i.getRawIndex(e))}),r},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var zE=.3,jE=(La.extend({type:"parallel",init:function(){this._dataGroup=new X_,this.group.add(this._dataGroup),this._data,this._initialized},render:function(r,t,e,o){function n(t){Mp(Ap(l,s,t,d,c),l,t,h)}function i(t,e){var n=u.getItemGraphicEl(e),i=Tp(l,t,d,c);l.setItemGraphicEl(t,n),Cr(n,{shape:{points:i}},o&&!1===o.animation?null:r,t),Mp(n,l,t,h)}function a(t){var e=u.getItemGraphicEl(t);s.remove(e)}var s=this._dataGroup,l=r.getData(),u=this._data,c=r.coordinateSystem,d=c.dimensions,h=Dp(r);if(l.diff(u).add(n).update(i).remove(a).execute(),!this._initialized){this._initialized=!0;var f=Cp(c,r,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(f)}this._data=l},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var n=e.getData(),i=e.coordinateSystem,r=i.dimensions,o=Dp(e),a=t.start;a<t.end;a++){var s=Ap(n,this._dataGroup,a,r,i);s.incremental=!0,Mp(s,n,a,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}}),["lineStyle","normal","opacity"]);$s({seriesType:"parallel",reset:function(t,e){function n(t,r){c.eachActiveState(r,function(t,e){var n=h[t];if("normal"===t&&r.hasItemOption){var i=r.getItemModel(e).get(jE,!0);null!=i&&(n=i)}r.setItemVisual(e,"opacity",n)},t.start,t.end)}var i=t.getModel("itemStyle"),r=t.getModel("lineStyle"),o=e.get("color"),a=r.get("color")||i.get("color")||o[t.seriesIndex%o.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),c=t.coordinateSystem,d=t.getData(),h={normal:u.opacity,active:l,inactive:s};return d.setVisual("color",a),{progress:n}}});var HE=qT.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,n=t.data||t.nodes;if(n&&e)return EI(n,e,this,!0).data},setNodePosition:function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,n){if("edge"!==n)return HE.superCall(this,"formatTooltip",t,e);var i=this.getDataParams(t,n),r=i.data,o=r.source+" -- "+r.target;return i.value&&(o+=" : "+i.value),ro(o)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),BE=Ui({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildPath:function(t,e){var n=e.extent/2;t.moveTo(e.x1,e.y1-n),t.bezierCurveTo(e.cpx1,e.cpy1-n,e.cpx2,e.cpy2-n,e.x2,e.y2-n),t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n),t.closePath()}});Vs({type:"sankey",_model:null,render:function(_,t,i){var e=_.getGraph(),w=this.group,n=_.layoutInfo,S=n.width,C=n.height,u=_.getData(),T=_.getData("edge");this._model=_,w.removeAll(),w.attr("position",[n.x,n.y]),e.eachEdge(function(t){var e=new BE;e.dataIndex=t.dataIndex,e.seriesIndex=_.seriesIndex,e.dataType="edge";var n=t.getModel("lineStyle"),i=n.get("curveness"),r=t.node1.getLayout(),o=t.node1.getModel(),a=o.get("localX"),s=o.get("localY"),l=t.node2.getLayout(),u=t.node2.getModel(),c=u.get("localX"),d=u.get("localY"),h=t.getLayout();e.shape.extent=Math.max(1,h.dy);var f=(null!=a?a*S:r.x)+r.dx,p=(null!=s?s*C:r.y)+h.sy+h.dy/2,g=null!=c?c*S:l.x,m=(null!=d?d*C:l.y)+h.ty+h.dy/2,v=f*(1-i)+g*i,y=p,x=f*i+g*(1-i),b=m;switch(e.setShape({x1:f,y1:p,x2:g,y2:m,cpx1:v,cpy1:y,cpx2:x,cpy2:b}),e.setStyle(n.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}hr(e,t.getModel("emphasis.lineStyle").getItemStyle()),w.add(e),T.setItemGraphicEl(t.dataIndex,e)}),e.eachNode(function(t){var e=t.getLayout(),n=t.getModel(),i=n.get("localX"),r=n.get("localY"),o=n.getModel("label"),a=n.getModel("emphasis.label"),s=new yC({shape:{x:null!=i?i*S:e.x,y:null!=r?r*C:e.y,width:e.dx,height:e.dy},style:n.getModel("itemStyle").getItemStyle()}),l=t.getModel("emphasis.itemStyle").getItemStyle();fr(s.style,l,o,a,{labelFetcher:_,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),s.setStyle("fill",t.getVisual("color")),hr(s,l),w.add(s),u.setItemGraphicEl(t.dataIndex,s),s.dataType="node"}),_.get("draggable")&&u.eachItemGraphicEl(function(t,n){t.drift=function(t,e){this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:_.id,dataIndex:u.getRawIndex(n),localX:this.shape.x/S,localY:this.shape.y/C})},t.draggable=!0,t.cursor="move"}),!this._data&&_.get("animation")&&w.setClipPath(Ip(w.getBoundingRect(),_,function(){w.removeClipPath()})),this._data=_.getData()},dispose:function(){}}),Os({type:"dragNode",event:"dragNode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})});var VE=function(t){t.eachSeriesByType("sankey",function(i){var t=i.getGraph().nodes;if(t.length){var r=Infinity,o=-Infinity;I(t,function(t){var e=t.getLayout().value;e<r&&(r=e),o<e&&(o=e)}),I(t,function(t){var e=new fI({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:i.get("color")}).mapValueToVisual(t.getLayout().value);t.setVisual("color",e);var n=t.getModel().get("itemStyle.color");null!=n&&t.setVisual("color",n)})}})};Rs(function(t,u){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth"),n=t.get("nodeGap"),i=Lp(t,u),r=(t.layoutInfo=i).width,o=i.height,a=t.getGraph(),s=a.nodes,l=a.edges;Pp(s),Op(s,l,e,n,r,o,0!==f(s,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"))})}),$s(VE);var WE={_baseAxisDim:null,getInitialData:function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,c=this._baseAxisDim=l[u],d=l[1-u],h=[r,o],f=h[u].get("type"),p=h[1-u].get("type"),g=t.data;if(g&&i){var m=[];I(g,function(t,e){var n;t.value&&E(t.value)?(n=t.value.slice(),t.value.unshift(e)):E(t)?(n=t.slice(),t.unshift(e)):n=t,m.push(n)}),t.data=m}var v=this.defaultValueDimensions;return ik(this,{coordDimensions:[{name:c,type:Ks(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:Ks(p),dimsDef:v.slice()}],dimensionsCount:v.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};r(qT.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),WE,!0);var UE=["itemStyle"],qE=["emphasis","itemStyle"],GE=(La.extend({type:"boxplot",render:function(t){var r=t.getData(),o=this.group,a=this._data;this._data||o.removeAll();var s="horizontal"===t.get("layout")?1:0;r.diff(a).add(function(t){if(r.hasValue(t)){var e=Jp(r.getItemLayout(t),r,t,s,!0);r.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var n=a.getItemGraphicEl(e);if(r.hasValue(t)){var i=r.getItemLayout(t);n?tg(i,n,r,t):n=Jp(i,r,t,s),o.add(n),r.setItemGraphicEl(t,n)}else o.remove(n)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=r},remove:function(){var e=this.group,t=this._data;this._data=null,t&&t.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:j}),Pi.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])}})),YE=["itemStyle","borderColor"],ZE=I,XE=function(t){var e=ng(t);ZE(e,function(n){var t=n.seriesModels;t.length&&(ig(n),ZE(t,function(t,e){rg(t,n.boxOffsetList[e],n.boxWidthList[e])}))})};$s(function(i){var r=i.get("color");i.eachRawSeriesByType("boxplot",function(t){var e=r[t.seriesIndex%r.length],n=t.getData();n.setVisual({legendSymbol:"roundRect",color:t.get(YE)||e}),i.isSeriesFiltered(t)||n.each(function(t){var e=n.getItemModel(t);n.setItemVisual(t,{color:e.get(YE,!0)})})})}),Rs(XE),r(qT.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)}}),WE,!0);var KE=["itemStyle"],QE=["emphasis","itemStyle"],JE=["color","color0","borderColor","borderColor0"],tL=(La.extend({type:"candlestick",render:function(t){this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(r){var o=r.getData(),a=this._data,s=this.group,l=o.getLayout("isSimpleBox");this._data||s.removeAll(),o.diff(a).add(function(t){if(o.hasValue(t)){var e,n=o.getItemLayout(t);Tr(e=og(n,t,!0),{shape:{points:n.ends}},r,t),ag(e,o,t,l),s.add(e),o.setItemGraphicEl(t,e)}}).update(function(t,e){var n=a.getItemGraphicEl(e);if(o.hasValue(t)){var i=o.getItemLayout(t);n?Cr(n,{shape:{points:i.ends}},r,t):n=og(i,t),ag(n,o,t,l),s.add(n),o.setItemGraphicEl(t,n)}else s.remove(n)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&s.remove(e)}).execute(),this._data=o},_renderLarge:function(t){this._clear(),lg(t,this.group)},_incrementalRenderNormal:function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o;ag(o=og(i.getItemLayout(n),n),i,n,r),o.incremental=!0,this.group.add(o)}},_incrementalRenderLarge:function(t,e){lg(e,this.group,!0)},remove:function(){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:j}),Pi.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))}})),eL=Pi.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var n=e.points,i=0;i<n.length;)if(this.__sign===n[i++]){var r=n[i++];t.moveTo(r,n[i++]),t.lineTo(r,n[i++])}else i+=3}}),nL=function(t){t&&E(t.series)&&I(t.series,function(t){b(t)&&"k"===t.type&&(t.type="candlestick")})},iL=["itemStyle","borderColor"],rL=["itemStyle","borderColor0"],oL=["itemStyle","color"],aL=["itemStyle","color0"],sL={seriesType:"candlestick",plan:ZT(),performRawSeries:!0,reset:function(t,e){function n(t,e){for(var n;null!=(n=t.next());){var i=e.getItemModel(n),r=e.getItemLayout(n).sign;e.setItemVisual(n,{color:o(r,i),borderColor:a(r,i)})}}function o(t,e){return e.get(0<t?oL:aL)}function a(t,e){return e.get(0<t?iL:rL)}var i=t.getData(),r=t.pipelineContext.large;if(i.setVisual({legendSymbol:"roundRect",colorP:o(1,t),colorN:o(-1,t),borderColorP:a(1,t),borderColorN:a(-1,t)}),!e.isSeriesFiltered(t))return!r&&{progress:n}}},lL="undefined"!=typeof Float32Array?Float32Array:Array,uL={seriesType:"candlestick",plan:ZT(),reset:function(t){function e(t,e){function o(t,e){var n=[];return n[_]=e,n[w]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:x.dataToPoint(n)}function n(t,e,n){var i=e.slice(),r=e.slice();i[_]=Ji(i[_]+b/2,1,!1),r[_]=Ji(r[_]-b/2,1,!0),n?t.push(i,r):t.push(r,i)}function i(t,e,n){var i=o(t,n),r=o(e,n);return i[_]-=b/2,r[_]-=b/2,{x:i[0],y:i[1],width:w?b:r[0]-i[0],height:w?r[1]-i[1]:b}}function r(t){return t[_]=Ji(t[_],1),t}for(var a;null!=(a=t.next());){var s=e.get(S,a),l=e.get(C,a),u=e.get(T,a),c=e.get(A,a),d=e.get(D,a),h=Math.min(l,u),f=Math.max(l,u),p=o(h,s),g=o(f,s),m=o(c,s),v=o(d,s),y=[];n(y,g,0),n(y,p,1),y.push(r(v),r(g),r(m),r(p)),e.setItemLayout(a,{sign:cg(e,a,l,u,T),initBaseline:u<l?g[w]:p[w],ends:y,brushRect:i(c,d,s)})}}function n(t,e){for(var n,i,r=new lL(5*t.count),o=0,a=[],s=[];null!=(i=t.next());){var l=e.get(S,i),u=e.get(C,i),c=e.get(T,i),d=e.get(A,i),h=e.get(D,i);isNaN(l)||isNaN(d)||isNaN(h)?(r[o++]=NaN,o+=4):(r[o++]=cg(e,i,u,c,T),a[_]=l,a[w]=d,n=x.dataToPoint(a,null,s),r[o++]=n?n[0]:NaN,r[o++]=n?n[1]:NaN,a[w]=h,n=x.dataToPoint(a,null,s),r[o++]=n?n[1]:NaN)}e.setLayout("largePoints",r)}var x=t.coordinateSystem,i=t.getData(),b=dg(t,i),_=0,w=1,r=["x","y"],S=i.mapDimension(r[_]),o=i.mapDimension(r[w],!0),C=o[0],T=o[1],A=o[2],D=o[3];if(i.setLayout({candleWidth:b,isSimpleBox:b<=1.3}),!(null==S||o.length<4))return{progress:t.pipelineContext.large?n:e}}};Is(nL),$s(sL),Rs(uL),qT.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return yl(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var cL=3,dL=pg.prototype;dL.stopEffectAnimation=function(){this.childAt(1).removeAll()},dL.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),r=0;r<cL;r++){var o=Ql(e,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var a=-r/cL*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(a).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(o)}fg(i,t)},dL.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],r=0;r<i.length;r++){var o=i[r];if(e[o]!==t[o])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}fg(n,t)},dL.highlight=function(){this.trigger("emphasis")},dL.downplay=function(){this.trigger("normal")},dL.updateData=function(t,e){var n=t.hostModel;this.childAt(0).updateData(t,e);var i=this.childAt(1),r=t.getItemModel(e),o=t.getItemVisual(e,"symbol"),a=hg(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");i.attr("scale",a),i.traverse(function(t){t.attr({fill:s})});var l=r.getShallow("symbolOffset");if(l){var u=i.position;u[0]=Hr(l[0],a[0]),u[1]=Hr(l[1],a[1])}i.rotation=(r.getShallow("symbolRotate")||0)*Math.PI/180||0;var c={};if(c.showEffectOn=n.get("showEffectOn"),c.rippleScale=r.get("rippleEffect.scale"),c.brushType=r.get("rippleEffect.brushType"),c.period=1e3*r.get("rippleEffect.period"),c.effectOffset=e/t.count(),c.z=r.getShallow("z")||0,c.zlevel=r.getShallow("zlevel")||0,c.symbolType=o,c.color=s,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===c.showEffectOn)this._effectCfg?this.updateEffectAnimation(c):this.startEffectAnimation(c),this._effectCfg=c;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),h=function(){d.highlight(),"render"!==c.showEffectOn&&this.startEffectAnimation(c)},f=function(){d.downplay(),"render"!==c.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",h,this).on("mouseout",f,this).on("emphasis",h,this).on("normal",f,this)}this._effectCfg=c},dL.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},o(pg,X_),Vs({type:"effectScatter",init:function(){this._symbolDraw=new Mu(pg)},render:function(t){var e=t.getData(),n=this._symbolDraw;n.updateData(e),this.group.add(n.group)},updateTransform:function(t){var e=t.getData();this.group.dirty();var n=TM().reset(t);n.progress&&n.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=_t(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),$s(CM("effectScatter","circle")),Rs(TM("effectScatter"));var hL="undefined"==typeof Uint32Array?Array:Uint32Array,fL="undefined"==typeof Float64Array?Array:Float64Array,pL=qT.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],gg(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),pL.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],gg(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}pL.superApply(this,"mergeOption",
|
|
arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=z(this._flatCoords,e.flatCoords),this._flatCoordsOffset=z(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),n=e.option instanceof Array?e.option:e.getShallow("coords");if(Hb&&!(n instanceof Array&&0<n.length&&n[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(n)+". Lines must have 2d coords array in data item.");return n},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r<i;r++)e[r]=e[r]||[],e[r][0]=this._flatCoords[n+2*r],e[r][1]=this._flatCoords[n+2*r+1];return i}var o=this._getCoordsFromItemModel(t);for(r=0;r<o.length;r++)e[r]=e[r]||[],e[r][0]=o[r][0],e[r][1]=o[r][1];return o.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var n=t.length,i=new hL(n),r=new fL(n),o=0,a=0,s=0,l=0;l<n;){s++;var u=t[l++];i[a++]=o+e,i[a++]=u;for(var c=0;c<u;c++){var d=t[l++],h=t[l++];if(r[o++]=d,r[o++]=h,n<l&&Hb)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,a),flatCoords:r,count:s}},getInitialData:function(t){if(Hb&&!qo.get(t.coordinateSystem))throw new Error("Unkown coordinate system "+t.coordinateSystem);var o=new dD(["value"],this);return o.hasItemOption=!1,o.initData(t.data,[],function(t,e,n,i){if(t instanceof Array)return NaN;o.hasItemOption=!0;var r=t.value;return null!=r?r instanceof Array?r[i]:r:void 0}),o},formatTooltip:function(t){var e=this.getData().getItemModel(t),n=e.get("name");if(n)return n;var i=e.get("fromName"),r=e.get("toName"),o=[];return null!=i&&o.push(i),null!=r&&o.push(r),ro(o.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),gL=mg.prototype;gL.createLine=function(t,e,n){return new Jh(t,e,n)},gL._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");E(i)||(i=[i,i]);var o=n.get("color")||t.getItemVisual(e,"color"),a=this.childAt(1);this._symbolType!==r&&(this.remove(a),(a=Ql(r,-.5,-.5,1,1,o)).z2=100,a.culling=!0,this.add(a)),a&&(a.setStyle("shadowColor",o),a.setStyle(n.getItemStyle(["color"])),a.attr("scale",i),a.setColor(o),a.attr("scale",i),this._symbolType=r,this._updateEffectAnimation(t,n,e))},gL._updateEffectAnimation=function(e,t,n){var i=this.childAt(1);if(i){var r=this,o=e.getItemLayout(n),a=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=N(t.get("delay"),function(t){return t/e.count()*a/3}),c="function"==typeof u;if(i.ignore=!0,this.updateAnimationPoints(i,o),0<l&&(a=this.getLineLength(i)/l*1e3),a!==this._period||s!==this._loop){i.stopAnimation();var d=u;c&&(d=u(n)),0<i.__t&&(d=-a*i.__t),i.__t=0;var h=i.animate("",s).when(a,{__t:1}).delay(d).during(function(){r.updateSymbolPosition(i)});s||h.done(function(){r.remove(i)}),h.start()}this._period=a,this._loop=s}},gL.getLineLength=function(t){return s_(t.__p1,t.__cp1)+s_(t.__cp1,t.__p2)},gL.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},gL.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},gL.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=t.position,a=ui,s=ci;o[0]=a(e[0],i[0],n[0],r),o[1]=a(e[1],i[1],n[1],r);var l=s(e[0],i[0],n[0],r),u=s(e[1],i[1],n[1],r);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},gL.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},o(mg,X_);var mL=vg.prototype;mL._createPolyline=function(t,e,n){var i=t.getItemLayout(e),r=new vC({shape:{points:i}});this.add(r),this._updateCommonStl(t,e,n)},mL.updateData=function(t,e,n){var i=t.hostModel;Cr(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},mL._updateCommonStl=function(t,e,n){var i=this.childAt(0),r=t.getItemModel(e),o=t.getItemVisual(e,"color"),a=n&&n.lineStyle,s=n&&n.hoverLineStyle;n&&!t.hasItemOption||(a=r.getModel("lineStyle").getLineStyle(),s=r.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(D({strokeNoScale:!0,fill:"none",stroke:o},a)),i.hoverStyle=s,hr(this)},mL.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},o(vg,X_);var vL=yg.prototype;vL.createLine=function(t,e,n){return new vg(t,e,n)},vL.updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,r=1;r<e.length;r++){var o=e[r-1],a=e[r];i+=s_(o,a),n.push(i)}if(0!==i){for(r=0;r<n.length;r++)n[r]/=i;this._offsets=n,this._length=i}},vL.getLineLength=function(){return this._length},vL.updateSymbolPosition=function(t){var e=t.__t,n=this._points,i=this._offsets,r=n.length;if(i){var o=this._lastFrame;if(e<this._lastFramePercent){for(a=Math.min(o+1,r-1);0<=a&&!(i[a]<=e);a--);a=Math.min(a,r-2)}else{for(var a=o;a<r&&!(i[a]>e);a++);a=Math.min(a-1,r-2)}rt(t.position,n[a],n[a+1],(e-i[a])/(i[a+1]-i[a]));var s=n[a+1][0]-n[a][0],l=n[a+1][1]-n[a][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=a,this._lastFramePercent=e,t.ignore=!1}},o(yg,mg);var yL=Ui({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r<n.length;){var o=n[r++];if(0<o){t.moveTo(n[r++],n[r++]);for(var a=1;a<o;a++)t.lineTo(n[r++],n[r++])}}else for(r=0;r<n.length;){var s=n[r++],l=n[r++],u=n[r++],c=n[r++];if(t.moveTo(s,l),0<i){var d=(s+u)/2-(l-c)*i,h=(l+c)/2-(u-s)*i;t.quadraticCurveTo(d,h,u,c)}else t.lineTo(u,c)}},findDataIndex:function(){var t=this.shape,e=t.segs,n=t.curveness;if(t.polyline)for(var i=0,r=0;r<e.length;){var o=e[r++];if(0<o)for(var a=e[r++],s=e[r++],l=1;l<o;l++){if(bi(a,s,u=e[r++],c=e[r++]))return i}i++}else for(i=0,r=0;r<e.length;){a=e[r++],s=e[r++];var u=e[r++],c=e[r++];if(0<n){if(wi(a,s,(a+u)/2-(s-c)*n,(s+c)/2-(u-a)*n,u,c))return i}else if(bi(a,s,u,c))return i;i++}return-1}}),xL=xg.prototype;xL.isPersistent=function(){return!this._incremental},xL.updateData=function(t){this.group.removeAll();var e=new yL({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},xL.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new Wi({silent:!0})),this.group.add(this._incremental)):this._incremental=null},xL.incrementalUpdate=function(t,e){var n=new yL;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},xL.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},xL._setCommon=function(n,t,e){var i=t.hostModel;n.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),n.useStyle(i.getModel("lineStyle").getLineStyle()),n.style.strokeNoScale=!0;var r=t.getVisual("color");r&&n.setStyle("stroke",r),n.setStyle("fill"),e||(n.seriesIndex=i.seriesIndex,n.on("mousemove",function(t){n.dataIndex=null;var e=n.findDataIndex(t.offsetX,t.offsetY);0<e&&(n.dataIndex=e+n.__startIndex)}))},xL._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var bL={seriesType:"lines",plan:ZT(),reset:function(g){function t(t,e){var n=[];if(y){var i,r=t.end-t.start;if(v){for(var o=0,a=t.start;a<t.end;a++)o+=g.getLineCoordsCount(a);i=new Float32Array(r+2*o)}else i=new Float32Array(4*r);var s=0,l=[];for(a=t.start;a<t.end;a++){var u=g.getLineCoords(a,n);v&&(i[s++]=u);for(var c=0;c<u;c++)l=m.dataToPoint(n[c],!1,l),i[s++]=l[0],i[s++]=l[1]}e.setLayout("linesPoints",i)}else for(a=t.start;a<t.end;a++){var d=e.getItemModel(a),h=(u=g.getLineCoords(a,n),[]);if(v)for(var f=0;f<u;f++)h.push(m.dataToPoint(n[f]));else{h[0]=m.dataToPoint(n[0]),h[1]=m.dataToPoint(n[1]);var p=d.get("lineStyle.curveness");+p&&(h[2]=[(h[0][0]+h[1][0])/2-(h[0][1]-h[1][1])*p,(h[0][1]+h[1][1])/2-(h[1][0]-h[0][0])*p])}e.setItemLayout(a,h)}}var m=g.coordinateSystem,v=g.get("polyline"),y=g.pipelineContext.large;return{progress:t}}};Vs({type:"lines",init:function(){},render:function(e,t,n){var i=e.getData(),r=this._updateLineDraw(i,e),o=e.get("zlevel"),a=e.get("effect.trailLength"),s=n.getZr(),l="svg"===s.painter.getType();if(l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&a){if(Hb){var u=!1;t.eachSeries(function(t){t!==e&&t.get("zlevel")===o&&(u=!0)}),u&&console.warn("Lines with trail effect should have an individual zlevel")}l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})}r.updateData(i),this._lastZlevel=o,this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=bL.reset(t);o.progress&&o.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext.large;return Hb&&i&&o&&console.warn("Large lines not support effect"),n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new xg:new tf(r?i?yg:vg:i?mg:Jh),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var _L="lineStyle.opacity".split("."),wL={seriesType:"lines",reset:function(t){function e(t,e){var n=t.getItemModel(e),i=bg(n.getShallow("symbol",!0)),r=bg(n.getShallow("symbolSize",!0)),o=n.get(_L);i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1]),t.setItemVisual(e,"opacity",o)}var n=bg(t.get("symbol")),i=bg(t.get("symbolSize")),r=t.getData();return r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",i&&i[0]),r.setVisual("toSymbolSize",i&&i[1]),r.setVisual("opacity",t.get(_L)),{dataEach:r.hasItemOption?e:null}}};Rs(bL),$s(wL),qT.extend({type:"series.heatmap",getInitialData:function(){return yl(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=qo.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var SL=256;_g.prototype={update:function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(t,r,"inRange"),l=this._getGradient(t,r,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=t.length;c.width=e,c.height=n;for(var f=0;f<h;++f){var p=t[f],g=p[0],m=p[1],v=i(p[2]);d.globalAlpha=v,d.drawImage(a,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=d.getImageData(0,0,c.width,c.height),x=y.data,b=0,_=x.length,w=this.minOpacity,S=this.maxOpacity-w;b<_;){v=x[b+3]/256;var C=4*Math.floor(v*(SL-1));if(0<v){var T=o(v)?s:l;0<v&&(v=v*S+w),x[b++]=T[C],x[b++]=T[C+1],x[b++]=T[C+2],x[b++]=T[C+3]*v*256}else b+=4}return d.putImageData(y,0,0),c},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=e_()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},_getGradient:function(t,e,n){for(var i=this._gradientPixels,r=i[n]||(i[n]=new Uint8ClampedArray(1024)),o=[0,0,0,0],a=0,s=0;s<256;s++)e[n](s/255,!0,o),r[a++]=o[0],r[a++]=o[1],r[a++]=o[2],r[a++]=o[3];return r}},Vs({type:"heatmap",render:function(n,t,e){var i;if(t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),Hb&&!i)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var r=n.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(n,e,0,n.getData().count()):Cg(r)&&this._renderOnGeo(r,n,i,e)},incrementalPrepareRender:function(){this.group.removeAll()},incrementalRender:function(t,e,n,i){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,n,i,r){var o,a,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");if(Hb){if("category"!==l.type||"category"!==u.type)throw new Error("Heatmap on cartesian must have two category axes");if(!l.onBand||!u.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}o=l.getBandWidth(),a=u.getBandWidth()}for(var c=this.group,d=t.getData(),h="itemStyle",f="emphasis.itemStyle",p="label",g="emphasis.label",m=t.getModel(h).getItemStyle(["color"]),v=t.getModel(f).getItemStyle(),y=t.getModel(p),x=t.getModel(g),b=s.type,_="cartesian2d"===b?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],w=n;w<i;w++){var S;if("cartesian2d"===b){if(isNaN(d.get(_[2],w)))continue;var C=s.dataToPoint([d.get(_[0],w),d.get(_[1],w)]);S=new yC({shape:{x:C[0]-o/2,y:C[1]-a/2,width:o,height:a},style:{fill:d.getItemVisual(w,"color"),opacity:d.getItemVisual(w,"opacity")}})}else{if(isNaN(d.get(_[1],w)))continue;S=new yC({z2:1,shape:s.dataToRect([d.get(_[0],w)]).contentShape,style:{fill:d.getItemVisual(w,"color"),opacity:d.getItemVisual(w,"opacity")}})}var T=d.getItemModel(w);d.hasItemOption&&(m=T.getModel(h).getItemStyle(["color"]),v=T.getModel(f).getItemStyle(),y=T.getModel(p),x=T.getModel(g));var A=t.getRawValue(w),D="-";A&&null!=A[2]&&(D=A[2]),fr(m,v,y,x,{labelFetcher:t,labelDataIndex:w,defaultText:D,isRectText:!0}),S.setStyle(m),hr(S,d.hasItemOption?v:O({},v)),(S.incremental=r)&&(S.useHoverLayer=!0),c.add(S),d.setItemGraphicEl(w,S)}},_renderOnGeo:function(r,t,e,n){var i=e.targetVisuals.inRange,o=e.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new _g;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=r.getViewRect().clone(),u=r.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),h=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=h-c,g=f-d,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,function(t,e,n){var i=r.dataToPoint([t,e]);return i[0]-=c,i[1]-=d,i.push(n),i}),y=e.getExtent(),x="visualMap.continuous"===e.type?Sg(y,e.option.range):wg(y,e.getPieceList(),e.option.selected);s.update(v,p,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var b=new an({style:{width:p,height:g,x:c,y:d,image:s.canvas},silent:!0});this.group.add(b)},dispose:function(){}});var CL=XM.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,CL.superApply(this,"getInitialData",arguments)}}),TL=["itemStyle","borderWidth"],AL=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],DL=new uC;Vs({type:"pictorialBar",render:function(t,e,n){var a=this.group,s=t.getData(),l=this._data,i=t.coordinateSystem,r=!!i.getBaseAxis().isHorizontal(),o=i.grid.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:i,coordSysExtent:[[o.x,o.x+o.width],[o.y,o.y+o.height]],isHorizontal:r,valueDim:AL[+r],categoryDim:AL[1-r]};return s.diff(l).add(function(t){if(s.hasValue(t)){var e=Rg(s,t),n=Tg(s,t,e,u),i=jg(s,u,n);s.setItemGraphicEl(t,i),a.add(i),qg(i,u,n)}}).update(function(t,e){var n=l.getItemGraphicEl(e);if(s.hasValue(t)){var i=Rg(s,t),r=Tg(s,t,i,u),o=Vg(s,r);n&&o!==n.__pictorialShapeStr&&(a.remove(n),s.setItemGraphicEl(t,null),n=null),n?Hg(n,u,r):n=jg(s,u,r,!0),s.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=r,a.add(n),qg(n,u,r)}else a.remove(n)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&Bg(l,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=s,this.group},dispose:j,remove:function(e){var t=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){Bg(n,t.dataIndex,e,t)}):t.removeAll()}});Rs(y($l,"pictorialBar")),$s(CM("pictorialBar","roundRect"));var ML=function(t,e,n,i,r){rM.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom",this.orient=null};ML.prototype={constructor:ML,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},o(ML,rM),Yg.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:Yg,_init:function(t){var e=this.dimension,n=new ML(e,Ul(t),[0,0],t.get("type"),t.get("position")),i="category"===n.type;n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),n.orient=t.get("orient"),(t.axis=n).model=t,(n.coordinateSystem=this)._axis=n},update:function(t){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();I(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Wl(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=po({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setExtent(i[r],i[1-r]),this._updateAxisTransform(e,n?t.x:t.y)},_updateAxisTransform:function(t,e){var n=t.getExtent(),i=n[0]+n[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return i-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i}},qo.register("single",{create:Zg,dimensions:Yg.prototype.dimensions});var kL=["axisLine","axisTickLabel","axisName"],IL="splitLine",EL=UM.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,i){var r=this.group;r.removeAll();var o=Xg(t),a=new jM(t,o);I(kL,a.add,a),r.add(a.getGroup()),t.get(IL+".show")&&this["_"+IL](t),EL.superCall(this,"render",t,e,n,i)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var n=t.getModel("splitLine"),i=n.getModel("lineStyle"),r=i.get("width"),o=i.get("color");o=o instanceof Array?o:[o];for(var a=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,c=e.getTicksCoords({tickModel:n}),d=[],h=[],f=0;f<c.length;++f){var p=e.toGlobalCoord(c[f].coord);s?(d[0]=p,d[1]=a.y,h[0]=p,h[1]=a.y+a.height):(d[0]=a.x,d[1]=p,h[0]=a.x+a.width,h[1]=p);var g=u++%o.length;l[g]=l[g]||[],l[g].push(new xC(Ki({shape:{x1:d[0],y1:d[1],x2:h[0],y2:h[1]},style:{lineWidth:r},silent:!0})))}for(f=0;f<l.length;++f)this.group.add(LC(l[f],{style:{stroke:o[f%o.length],lineDash:i.getLineDash(r),lineWidth:r},silent:!0}))}}}),LL=oT.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),OL={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};g(LL.prototype,WD),PM("single",LL,Kg,OL);var PL=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Bn(o,t);if(null==a||a<0||E(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(o.getValues(A(l.dimensions,function(t){return o.mapDimension(t)}),a,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},NL=I,RL=y,$L=Vn(),FL=function(t,e,n){var i=t.currTrigger,o=[t.x,t.y],r=t,a=t.dispatchAction||v(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){sm(o)&&(o=PL({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=sm(o),u=r.axesInfo,c=s.axesInfo,d="leave"===i||sm(o),h={},f={},p={list:[],map:{}},g={showPointer:RL(tm,f),showTooltip:RL(em,p)};NL(s.coordSysMap,function(t,e){var r=l||t.containPoint(o);NL(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=om(u,t);if(!d&&r&&(!u||n)){var i=n&&n.value;null!=i||l||(i=e.pointToData(o)),null!=i&&Qg(t,i,g,!1,h)}})});var m={};return NL(c,function(r,t){var o=r.linkGroup;o&&!f[t]&&NL(o.axesInfo,function(t,e){var n=f[e];if(t!==r&&n){var i=n.value;o.mapper&&(i=r.axis.scale.parse(o.mapper(i,am(t),am(r)))),m[r.key]=i}})}),NL(m,function(t,e){Qg(c[e],t,g,!0,h)}),nm(f,c,h),im(p,o,t,a),rm(c,a,n),h}},zL=(js({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),Vn()),jL=I,HL=Hs({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";lm("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||0<=r.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){pm(e.getZr(),"axisPointer"),HL.superApply(this._model,"remove",arguments)},dispose:function(t,e){pm("axisPointer",e),HL.superApply(this._model,"dispose",arguments)}}),BL=Vn(),VL=L,WL=v;gm.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(t,e);if(a){var d=y(mm,e,c);this.updatePointerEl(a,l,d,e),this.updateLabelEl(a,l,d,e)}else a=this._group=new X_,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);bm(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"!==n&&null!=n)return!0===n;var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=Cc(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1},makeElOption:function(){},createPointerEl:function(t,e){var n=e.pointer;if(n){var i=BL(t).pointerEl=new OC[n.type](VL(e.pointer));t.add(i)}},createLabelEl:function(t,e,n,i){if(e.label){var r=BL(t).labelEl=new yC(VL(e.label));t.add(r),ym(r,i)}},updatePointerEl:function(t,e,n){var i=BL(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=BL(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),ym(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Lr(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Iw(t.event)},onmousedown:WL(this._onHandleDragMove,this,0,0),drift:WL(this._onHandleDragMove,this),ondragend:WL(this._onHandleDragEnd,this)}),i.add(r)),bm(r,n,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];r.setStyle(o.getItemStyle(null,s));var l=o.get("size");E(l)||(l=[l,l]),r.attr("scale",[l[0]/2,l[1]/2]),Fa(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){mm(this._axisPointerModel,!e&&this._moveAnimation,this._handle,xm(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(xm(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(xm(i)),BL(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}},Xn(gm.prototype.constructor=gm);var UL=gm.extend({makeElOption:function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=Im(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var c=_m(i),d=qL[s](o,u,l,c);d.style=c,t.graphicKey=d.type,t.pointer=d}Am(e,t,Ic(a.model,n),n,i,r)},getHandleTransform:function(t,e,n){var i=Ic(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Tm(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.grid,o=i.getGlobalExtent(!0),a=Im(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var u=(a[1]+a[0])/2,c=[u,u];c[s]=l[s];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:d[s]}}}),qL={line:function(t,e,n,i){var r=Dm([e,n[0]],[e,n[1]],Em(t));return Ki({shape:r,style:i}),{type:"Line",shape:r}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:Mm([e-i/2,n[0]],[i,r],Em(t))}}};UM.registerAxisPointerClass("CartesianAxisPointer",UL),Is(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!E(e)&&(t.axisPointer.link=[e])}}),Es(OA.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=vc(t,e)}),Os({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},FL);var GL=["x","y"],YL=["width","height"],ZL=gm.extend({makeElOption:function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=Om(a,1-Lm(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var c=_m(i),d=XL[u](o,l,s,c);d.style=c,t.graphicKey=d.type,t.pointer=d}Am(e,t,Xg(n),n,i,r)},getHandleTransform:function(t,e,n){var i=Xg(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Tm(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,r=i.coordinateSystem,o=Lm(i),a=Om(r,o),s=t.position;s[o]+=e[o],s[o]=Math.min(a[1],s[o]),s[o]=Math.max(a[0],s[o]);var l=Om(r,1-o),u=(l[1]+l[0])/2,c=[u,u];return c[o]=s[o],{position:s,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),XL={line:function(t,e,n,i){var r=Dm([e,n[0]],[e,n[1]],Lm(t));return Ki({shape:r,style:i}),{type:"Line",shape:r}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:Mm([e-i/2,n[0]],[i,r],Lm(t))}}};UM.registerAxisPointerClass("SingleAxisPointer",ZL),Hs({type:"single"});var KL=2,QL=qT.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){QL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,n=A(Ep().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),i=n.length,r=-1,o=-1,a=0;a<i;++a){var s=n[a].dataList.length;r<s&&(r=s,o=a)}for(var l=0;l<i;++l)if(l!==o)for(var u=n[l].name,c=0;c<r;++c){for(var d=n[o].dataList[c][0],h=n[l].dataList.length,f=-1,p=0;p<h;++p){if(n[l].dataList[p][0]===d){f=p;break}}-1===f&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=u,e++)}return t},getInitialData:function(t,e){for(var n=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),i=f(t.data,function(t){return t[2]!==undefined}),r=this.fixData(i||[]),o=[],a=this.nameMap=F(),s=0,l=0;l<r.length;++l)o.push(r[l][KL]),a.get(r[l][KL])||(a.set(r[l][KL],s),s++);var u=pD(r,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Ks(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new dD(u,this);return c.initData(r),c},getLayerSeries:function(){function t(t,e){return n.get(a,t)-n.get(a,e)}for(var n=this.getData(),e=n.count(),i=[],r=0;r<e;++r)i[r]=r;for(var o=A(Ep().key(function(t){
|
|
return n.get("name",t)}).entries(i),function(t){return{name:t.key,indices:t.values}}),a=n.mapDimension("single"),s=0;s<o.length;++s)o[s].indices.sort(t);return o},getAxisTooltipData:function(t,e){E(t)||(t=t?[t]:[]);for(var n,i=this.getData(),r=this.getLayerSeries(),o=[],a=r.length,s=0;s<a;++s){for(var l=Number.MAX_VALUE,u=-1,c=r[s].indices.length,d=0;d<c;++d){var h=i.get(t[0],r[s].indices[d]),f=Math.abs(h-e);f<=l&&(n=h,l=f,u=r[s].indices[d])}o.push(u)}return{dataIndices:o,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),n=e.getName(t),i=e.get(e.mapDimension("value"),t);return(isNaN(i)||null==i)&&(i="-"),ro(n+" : "+i)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Vs({type:"themeRiver",init:function(){this._layers=[]},render:function(w){function t(t){return t.name}function e(t,e,n){var i=this._layers;if("remove"!==t){for(var r,o,a,s=[],l=[],u=T[e].indices,c=0;c<u.length;c++){var d=S.getItemLayout(u[c]),h=d.x,f=d.y0,p=d.y;s.push([h,f]),l.push([h,f+p]),r=S.getItemVisual(u[c],"color")}var g=S.getItemLayout(u[0]),m=S.getItemModel(u[c-1]),v=m.getModel("label"),y=v.get("margin");if("add"===t){var x=A[e]=new X_;o=new SM({shape:{points:s,stackedOnPoints:l,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),a=new lC({style:{x:g.x-y,y:g.y0+g.y/2}}),x.add(o),x.add(a),C.add(x),o.setClipPath(Pm(o.getBoundingRect(),w,function(){o.removeClipPath()}))}else{x=i[n];o=x.childAt(0),a=x.childAt(1),C.add(x),A[e]=x,Cr(o,{shape:{points:s,stackedOnPoints:l}},w),Cr(a,{style:{x:g.x-y,y:g.y0+g.y/2}},w)}var b=m.getModel("emphasis.itemStyle"),_=m.getModel("itemStyle");pr(a.style,v,{text:v.get("show")?w.getFormattedLabel(u[c-1],"normal")||S.getName(u[c-1]):null,textVerticalAlign:"middle"}),o.setStyle(O({fill:r},_.getItemStyle(["color"]))),hr(o,b.getItemStyle())}else C.remove(i[e])}var S=w.getData(),C=this.group,T=w.getLayerSeries(),n=S.getLayout("layoutInfo"),i=n.rect,r=n.boundaryGap;C.attr("position",[0,i.y+r[0]]);var o=new Ys(this._layersSeries||[],T,t,t),A={};o.add(v(e,this,"add")).update(v(e,this,"update")).remove(v(e,this,"remove")).execute(),this._layersSeries=T,this._layers=A},dispose:function(){}});var JL=function(t){t.eachSeriesByType("themeRiver",function(r){var o=r.getData(),a=r.getRawData(),s=r.get("color"),l=F();o.each(function(t){l.set(o.getRawIndex(t),t)}),a.each(function(t){var e=a.getName(t),n=s[(r.nameMap.get(e)-1)%s.length];a.setItemVisual(t,"color",n);var i=l.get(t);null!=i&&o.setItemVisual(i,"color",n)})})};Rs(function(t){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},r=n.getRect();i.rect=r;var o=t.get("boundaryGap"),a=n.getAxis();(i.boundaryGap=o,"horizontal"===a.orient)?(o[0]=Hr(o[0],r.height),o[1]=Hr(o[1],r.height),Nm(e,t,r.height-o[0]-o[1])):(o[0]=Hr(o[0],r.width),o[1]=Hr(o[1],r.width),Nm(e,t,r.width-o[0]-o[1]));e.setLayout("layoutInfo",i)})}),$s(JL),Es(fk("themeRiver")),qT.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t){var e={name:t.name,children:t.data};$m(e);var n=t.levels||[],i={};return i.levels=n,Ed.createTree(e,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=qT.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=ih(n,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var tO={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},eO=2,nO=4,iO=Fm.prototype;iO.updateData=function(t,e,n,i,r){(this.node=e).piece=this,i=i||this._seriesModel,r=r||this._ecModel;var o=this.childAt(0);o.dataIndex=e.dataIndex;var a=e.getModel(),s=e.getLayout();s||console.log(e.getLayout());var l=O({},s);l.label=null;var u,c=zm(e,i,r),d=a.getModel("itemStyle").getItemStyle();"normal"===n?u=d:u=g(a.getModel(n+".itemStyle").getItemStyle(),d);u=D({lineJoin:"bevel",fill:u.fill||c},u),t?(o.setShape(l),o.shape.r=s.r0,Cr(o,{shape:{r:s.r}},i,e.dataIndex),o.useStyle(u)):"object"==typeof u.fill&&u.fill.type||"object"==typeof o.style.fill&&o.style.fill.type?(Cr(o,{shape:l},i),o.useStyle(u)):Cr(o,{shape:l,style:u},i),this._updateLabel(i,c,n);var h=a.getShallow("cursor");if(h&&o.attr("cursor",h),t){var f=i.getShallow("highlightPolicy");this._initEvents(o,e,i,f)}this._seriesModel=i||this._seriesModel,this._ecModel=r||this._ecModel},iO.onEmphasis=function(e){var n=this;this.node.hostTree.root.eachNode(function(t){t.piece&&(n.node===t?t.piece.updateData(!1,t,"emphasis"):Hm(t,n.node,e)?t.piece.childAt(0).trigger("highlight"):e!==tO.NONE&&t.piece.childAt(0).trigger("downplay"))})},iO.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},iO.onHighlight=function(){this.updateData(!1,this.node,"highlight")},iO.onDownplay=function(){this.updateData(!1,this.node,"downplay")},iO._updateLabel=function(t,e,n){function i(t){var e=a.get(t);return null==e?o.get(t):e}var r=this.node.getModel(),o=r.getModel("label"),a="normal"===n||"emphasis"===n?o:r.getModel(n+".label"),s=r.getModel("emphasis.label"),l=N(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);!1===i("show")&&(l="");var u=this.node.getLayout(),c=a.get("minAngle");null==c&&(c=o.get("minAngle")),c=c/180*Math.PI;var d=u.endAngle-u.startAngle;null!=c&&Math.abs(d)<c&&(l="");var h=this.childAt(1);fr(h.style,h.hoverStyle||{},o,s,{defaultText:a.getShallow("show")?l:null,autoColor:e,useInsideStyle:!0});var f,p=(u.startAngle+u.endAngle)/2,g=Math.cos(p),m=Math.sin(p),v=i("position"),y=i("distance")||0,x=i("align");"outside"===v?(f=u.r+y,x=p>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),h.attr("style",{text:l,textAlign:x,textVerticalAlign:i("verticalAlign")||"middle",opacity:i("opacity")});var b=f*g+u.cx,_=f*m+u.cy;h.attr("position",[b,_]);var w=i("rotate"),S=0;"radial"===w?(S=-p)<-Math.PI/2&&(S+=Math.PI):"tangential"===w?(S=Math.PI/2-p)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof w&&(S=w*Math.PI/180),h.attr("rotation",S)},iO._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this,o=function(){r.onEmphasis(i)},a=function(){r.onNormal()},s=function(){r.onDownplay()},l=function(){r.onHighlight()};n.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",s).on("highlight",l)},o(Fm,X_);var rO="sunburstRootToNode",oO=(La.extend({type:"sunburst",init:function(){},render:function(i,r,t,e){function n(n,i){function t(t){return t.getId()}function e(t,e){o(null==t?null:n[t],null==e?null:i[e])}0===n.length&&0===i.length||new Ys(i,n,t,t).add(e).update(e).remove(y(e,null)).execute()}function o(t,e){if(f||!t||t.getValue()||(t=null),t!==c&&e!==c)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",i,r),u.setItemGraphicEl(t.dataIndex,e.piece)):a(e);else if(t){var n=new Fm(t,i,r);h.add(n),u.setItemGraphicEl(t.dataIndex,n)}}function a(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}function s(t,e){if(0<e.depth){l.virtualPiece?l.virtualPiece.updateData(!1,t,"normal",i,r):(l.virtualPiece=new Fm(t,i,r),h.add(l.virtualPiece)),e.piece._onclickEvent&&e.piece.off("click",e.piece._onclickEvent);var n=function(){l._rootToNode(e.parentNode)};e.piece._onclickEvent=n,l.virtualPiece.on("click",n)}else l.virtualPiece&&(h.remove(l.virtualPiece),l.virtualPiece=null)}var l=this;this.seriesModel=i,this.api=t,this.ecModel=r;var u=i.getData(),c=u.tree.root,d=i.getViewRoot(),h=this.group,f=i.get("renderLabelForZeroData"),p=[];d.eachNode(function(t){p.push(t)});var g=this._oldChildren||[];if(n(p,g),s(c,d),e&&e.highlight&&e.highlight.piece){var m=i.getShallow("highlightPolicy");e.highlight.piece.onEmphasis(m)}else if(e&&e.unhighlight){var v=this.virtualPiece;!v&&c.children.length&&(v=c.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var s=this,t=function(o){var a=!1;s.seriesModel.getViewRoot().eachNode(function(t){if(!a&&t.piece&&t.piece.childAt(0)===o.target){var e=t.getModel().get("nodeClick");if("rootToNode"===e)s._rootToNode(t);else if("link"===e){var n=t.getModel(),i=n.get("link");if(i){var r=n.get("target",!0)||"_blank";window.open(i,r)}}a=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:rO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}}}),"sunburstRootToNode");Os({type:oO,update:"updateView"},function(i,t){function e(t){var e=th(i,[oO],t);if(e){var n=t.getViewRoot();n&&(i.direction=nh(n,e.node)?"rollUp":"drillDown"),t.resetViewRoot(e.node)}}t.eachComponent({mainType:"series",subType:"sunburst",query:i},e)});var aO="sunburstHighlight";Os({type:aO,update:"updateView"},function(n,t){function e(t){var e=th(n,[aO],t);e&&(n.highlight=e.node)}t.eachComponent({mainType:"series",subType:"sunburst",query:n},e)}),Os({type:"sunburstUnhighlight",update:"updateView"},function(t,e){function n(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},n)});var sO=Math.PI/180,lO=function(t,e,k){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");E(n)||(n=[0,n]),E(e)||(e=[e,e]);var i=k.getWidth(),r=k.getHeight(),c=Math.min(i,r),d=Hr(e[0],i),h=Hr(e[1],r),f=Hr(n[0],c/2),o=Hr(n[1],c/2),a=-t.get("startAngle")*sO,p=t.get("minAngle")*sO,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&Bm(s,l);var u=0;I(s.children,function(t){!isNaN(t.getValue())&&u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0<s.depth,b=s.height-(x?-1:1),_=(o-f)/(b||1),w=t.get("clockwise"),S=t.get("stillShowZeroSum"),C=w?1:-1,T=function(t,e){if(t){var n=e;if(t!==g){var i=t.getValue(),r=0===v&&S?y:i*y;r<p&&(r=p),n=e+C*r;var o=t.depth-m-(x?-1:1),a=f+_*o,s=f+_*(o+1),l=t.getModel();null!=l.get("r0")&&(a=Hr(l.get("r0"),c/2)),null!=l.get("r")&&(s=Hr(l.get("r"),c/2)),t.setLayout({angle:r,startAngle:e,endAngle:n,clockwise:w,cx:d,cy:h,r0:a,r:s})}if(t.children&&t.children.length){var u=0;I(t.children,function(t){u+=T(t,e+u)})}return n-e}};if(x){var A=f,D=f+_,M=2*Math.PI;g.setLayout({angle:M,startAngle:a,endAngle:a+M,clockwise:w,cx:d,cy:h,r0:A,r:D})}T(s,a)})};$s(y(lk,"sunburst")),Rs(y(lO,"sunburst")),Es(y(fk,"sunburst"));var uO=["itemStyle"],cO=["emphasis","itemStyle"],dO=["label"],hO=["emphasis","label"],fO="e\0\0",pO={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:v(Wm,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:v(Um,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:v(qm,e)}}},polar:function(r){var o=r.getRadiusAxis(),a=r.getAngleAxis(),t=o.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:t[1],r0:t[0]},api:{coord:v(function(t){var e=o.dataToRadius(t[0]),n=a.dataToAngle(t[1]),i=r.coordToPoint([e,n]);return i.push(e,n*Math.PI/180),i}),size:v(Gm,r)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};Bs({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0},getInitialData:function(){return yl(this.getSource(),this)}}),Vs({type:"custom",_data:null,render:function(n,t,e){var i=this._data,r=n.getData(),o=this.group,a=Km(n,r,t,e);this.group.removeAll(),r.diff(i).add(function(t){Jm(null,t,a(t),n,o,r)}).update(function(t,e){Jm(i.getItemGraphicEl(e),t,a(t),n,o,r)}).remove(function(t){var e=i.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=r},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,i){function r(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var o=e.getData(),a=Km(e,o,n,i),s=t.start;s<t.end;s++){Jm(null,s,a(s),e,this.group,o).traverse(r)}},dispose:j}),Is(function(t){var e=t.graphic;E(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var gO=js({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,gO.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o);var a=$n(r,o);Fn(a);var s=this._elOptionsToUpdate=[];I(a,function(t,e){var n=t.option;Hb&&T(b(n)||t.exist,"Empty graphic option definition"),n&&(s.push(n),uv(t,n),cv(r,e,n),dv(r[e],n))},this);for(var l=r.length-1;0<=l;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(t,n,i){I(t,function(t){if(t){i&&(t.parentOption=i),n.push(t);var e=t.children;"group"===t.type&&e&&this._flatten(e,n,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Hs({type:"graphic",init:function(){this._elMap=F(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,n),this._relocate(t,n)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var u=this._elMap,c=this.group;I(e,function(t){var e=t.$action,n=t.id,i=u.get(n),r=t.parentId,o=null!=r?u.get(r):c;if("text"===t.type){var a=t.style;t.hv&&t.hv[1]&&(a.textVerticalAlign=a.textBaseline=null),!a.hasOwnProperty("textFill")&&a.fill&&(a.textFill=a.fill),!a.hasOwnProperty("textStroke")&&a.stroke&&(a.textStroke=a.stroke)}var s=sv(t);Hb&&i&&T(o===i.parent,"Changing parent is not supported."),e&&"merge"!==e?"replace"===e?(av(i,u),ov(n,o,s,u)):"remove"===e&&av(i,u):i?i.attr(s):ov(n,o,s,u);var l=u.get(n);l&&(l.__ecGraphicWidth=t.width,l.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=n.length-1;0<=o;o--){var a=n[o],s=r.get(a.id);if(s){var l=s.parent;go(s,a,l===i?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:a.hv,boundingMode:a.bounding})}}},_clear:function(){var e=this._elMap;e.each(function(t){av(t,e)}),this._elMap=F()},dispose:function(){this._clear()}});var mO=js({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){mO.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(o){var a=[],s=[];o.eachRawSeries(function(t){var e,n=t.name;if(s.push(n),t.legendDataProvider){var i=t.legendDataProvider(),r=i.mapArray(i.getName);o.isSeriesFiltered(t)||(s=s.concat(r)),r.length?a=a.concat(r):e=!0}else e=!0;e&&zn(t)&&a.push(t.name)}),this._availableNames=s;var t=A(this.get("data")||a,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new Or(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&I(this._data,function(t){e[t.get("name")]=!1});e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=x(this._availableNames,t)},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Os("legendToggleSelect","legendselectchanged",y(hv,"toggleSelected")),Os("legendSelect","legendselected",y(hv,"select")),Os("legendUnSelect","legendunselected",y(hv,"unSelect"));var vO=y,yO=I,xO=X_,bO=Hs({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new xO),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){if(this.resetInner(),t.get("show",!0)){var i=t.get("align");i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(i,t,e,n);var r=t.getBoxLayoutParams(),o={width:n.getWidth(),height:n.getHeight()},a=t.get("padding"),s=po(r,o,a),l=this.layoutInner(t,i,s),u=po(D({width:l.width,height:l.height},r),o,a);this.group.attr("position",[u.x-l.x,u.y-l.y]),this.group.add(this._backgroundEl=pv(l,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(l,u,c,d){var h=this.getContentGroup(),f=F(),p=u.get("selectedMode"),g=[];c.eachRawSeries(function(t){!t.get("legendHoverLink")&&g.push(t.id)}),yO(u.getData(),function(o,a){var s=o.get("name");if(this.newlineDisabled||""!==s&&"\n"!==s){var t=c.getSeriesByName(s)[0];if(!f.get(s)){if(t){var e=t.getData(),n=e.getVisual("color");"function"==typeof n&&(n=n(t.getDataParams(0)));var i=e.getVisual("legendSymbol")||"roundRect",r=e.getVisual("symbol");this._createItem(s,a,o,u,i,r,l,n,p).on("click",vO(gv,s,d)).on("mouseover",vO(mv,t,null,d,g)).on("mouseout",vO(vv,t,null,d,g)),f.set(s,!0)}else c.eachRawSeries(function(t){if(!f.get(s)&&t.legendDataProvider){var e=t.legendDataProvider(),n=e.indexOfName(s);if(n<0)return;var i=e.getItemVisual(n,"color"),r="roundRect";this._createItem(s,a,o,u,r,null,l,i,p).on("click",vO(gv,s,d)).on("mouseover",vO(mv,t,s,d,g)).on("mouseout",vO(vv,t,s,d,g)),f.set(s,!0)}},this);Hb&&(f.get(s)||console.warn(s+" series not exists. Legend data should be same with series name or data name."))}}else h.add(new xO({newline:!0}))},this)},_createItem:function(t,e,n,i,r,o,a,s,l){var u=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),h=i.get("symbolKeepAspect"),f=i.isSelected(t),p=new xO,g=n.getModel("textStyle"),m=n.get("icon"),v=n.getModel("tooltip"),y=v.parentModel;if(r=m||r,p.add(Ql(r,0,0,u,c,f?s:d,null==h||h)),!m&&o&&(o!==r||"none"==o)){var x=.8*c;"none"===o&&(o="circle"),p.add(Ql(o,(u-x)/2,(c-x)/2,x,x,f?s:d,null==h||h))}var b="left"===a?u+5:-5,_=a,w=i.get("formatter"),S=t;"string"==typeof w&&w?S=w.replace("{name}",null!=t?t:""):"function"==typeof w&&(S=w(t)),p.add(new lC({style:pr({},g,{text:S,x:b,y:c/2,textFill:f?g.getTextColor():d,textAlign:_,textVerticalAlign:"middle"})}));var C=new yC({shape:p.getBoundingRect(),invisible:!0,tooltip:v.get("show")?O({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},v.option):null});return p.add(C),p.eachChild(function(t){t.silent=!0}),C.silent=!l,this.getContentGroup().add(p),hr(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,n){var i=this.getContentGroup();nT(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var r=i.getBoundingRect();return i.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}});Es(function(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}),oT.registerSubTypeDefaulter("legend",function(){return"plain"});var _O=mO.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,n,i){var r=yo(t);_O.superCall(this,"init",t,e,n,i),yv(this,t,r)},mergeOption:function(t,e){_O.superCall(this,"mergeOption",t,e),yv(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}}),wO=X_,SO=["width","height"],CO=["x","y"],TO=bO.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){TO.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new wO),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new wO),this._showController},resetInner:function(){TO.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,r,e,o){function n(t,e){var n=t+"DataIndex",i=Lr(r.get("pageIcons",!0)[r.getOrient().name][e],{onclick:v(a._pageGo,a,n,r,o)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});i.name=t,s.add(i)}var a=this;TO.superCall(this,"renderInner",t,r,e,o);var s=this._controllerGroup,l=r.get("pageIconSize",!0);E(l)||(l=[l,l]),n("pagePrev",0);var i=r.getModel("pageTextStyle");s.add(new lC({name:"pageText",style:{textFill:i.getTextColor(),font:i.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),n("pageNext",1)},layoutInner:function(t,e,n){var i=this.getContentGroup(),r=this._containerGroup,o=this._controllerGroup,a=t.getOrient().index,s=SO[a],l=SO[1-a],u=CO[1-a];nT(t.get("orient"),i,t.get("itemGap"),a?n.width:null,a?null:n.height),nT("horizontal",o,t.get("pageButtonItemGap",!0));var c=i.getBoundingRect(),d=o.getBoundingRect(),h=this._showController=c[s]>n[s],f=[-c.x,-c.y];f[a]=i.position[a];var p=[0,0],g=[-d.x,-d.y],m=R(t.get("pageButtonGap",!0),t.get("itemGap",!0));h&&("end"===t.get("pageButtonPosition",!0)?g[a]+=n[s]-d[s]:p[a]+=d[s]+m);g[1-a]+=c[l]/2-d[l]/2,i.attr("position",f),r.attr("position",p),o.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=h?n[s]:c[s],v[l]=Math.max(c[l],d[l]),v[u]=Math.min(0,d[u]+g[1-a]),r.__rectSize=n[s],h){var y={x:0,y:0};y[s]=Math.max(n[s]-d[s]-m,0),y[l]=v[l],r.setClipPath(new yC({shape:y})),r.__rectSize=y[s]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&Cr(i,{position:x.contentPosition},!!h&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,r){var o=this._controllerGroup;I(["pagePrev","pageNext"],function(t){var e=null!=r[t+"DataIndex"],n=o.childOfName(t);n&&(n.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),n.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=i.get("pageFormatter"),n=r.pageIndex,a=null!=n?n+1:0,s=r.pageCount;t&&e&&t.setStyle("text",_(e)?e.replace("{current}",a).replace("{total}",s):e({current:a,total:s}))},_getPageInfo:function(t){function i(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[c],e}var e,n,r,o,a=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),u=this._containerGroup.__rectSize,c=t.getOrient().index,d=SO[c],h=SO[1-c],f=CO[c],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=s.childAt(0);var g=u?Math.ceil(l[d]/u):0;if(o){var m=o.getBoundingRect(),v=o.position[c]+m[f];p[c]=-v-l[f],e=Math.floor(g*(v+m[f]+u/2)/l[d]),e=l[d]&&g?Math.max(0,Math.min(g-1,e)):-1;var y,x={x:0,y:0};x[d]=u,x[h]=l[h],x[f]=-p[c]-l[f];var b=s.children();if(s.eachChild(function(t,e){var n=i(t);n.intersect(x)&&(null==y&&(y=e),r=t.__legendDataIndex),e===b.length-1&&n[f]+n[d]<=x[f]+x[d]&&(r=null)}),null!=y){var _=i(b[y]);if(x[f]=_[f]+_[d]-x[d],y<=0&&_[f]>=x[f])n=null;else{for(;0<y&&i(b[y-1]).intersect(x);)y--;n=b[y].__legendDataIndex}}}return{contentPosition:p,pageIndex:e,pageCount:g,pagePrevDataIndex:n,pageNextDataIndex:r}}});Os("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})}),js({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var AO=I,DO=io,MO=["","-webkit-","-moz-","-o-"],kO="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";wv.prototype={constructor:wv,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=kO+_v(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(v(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var IO=v,EO=I,LO=Hr,OO=new yC({shape:{x:-1,y:-1,width:2,height:2}});Hs({type:"tooltip",init:function(t,e){if(!Wb.node){var n=new wv(e.getDom(),e);this._tooltipContent=n}},render:function(t,e,n){if(!Wb.node&&!Wb.wxa){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var i=this._tooltipModel.get("triggerOn");lm("itemTooltip",this._api,IO(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!Wb.node){var r=Cv(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var a=OO;a.position=[i.x,i.y],a.update(),a.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:a},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=PL(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(Cv(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=Sv([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=v(e,this),clearTimeout(this._showTimout),0<n?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var u=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],c=[],d=[],r=Sv([e.tooltipOption,n]);EO(t,function(t){EO(t.dataByAxis,function(r){var o=u.getComponent(r.axisDim+"Axis",r.axisIndex),a=r.value,s=[];if(o&&null!=a){var l=Cm(a,o.axis,u,r.seriesDataIndices,r.valueLabelOpt);I(r.seriesDataIndices,function(t){var e=u.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,i=e&&e.getDataParams(n);i.axisDim=r.axisDim,i.axisIndex=r.axisIndex,i.axisType=r.axisType,i.axisId=r.axisId,i.axisValue=Yl(o.axis,a),i.axisValueLabel=l,i&&(d.push(i),s.push(e.formatTooltip(n,!0)))});var t=l;c.push((t?ro(t)+"<br />":"")+s.join("<br />"))}})},this),c.reverse(),c=c.join("<br /><br />");var o=e.position;this._showOrMove(r,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(r,o,i[0],i[1],this._tooltipContent,d):this._showTooltipContent(r,c,d,Math.random(),i[0],i[1],o)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,o=i.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,u=a.getData(),c=Sv([u.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),d=c.get("trigger");if(null==d||"item"===d){var h=a.getDataParams(s,l),f=a.formatTooltip(s,!1,l),p="item_"+a.name+"_"+s;this._showOrMove(c,function(){this._showTooltipContent(c,f,h,p,t.offsetX,t.offsetY,t.position,t.target)}),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var r=new Or(i,this._tooltipModel,this._ecModel),o=r.get("content"),a=Math.random();this._showOrMove(r,function(){this._showTooltipContent(r,o,r.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(n,t,i,e,r,o,a,s){if(this._ticket="",n.get("showContent")&&n.get("show")){var l=this._tooltipContent,u=n.get("formatter");a=a||n.get("position");var c=t;if(u&&"string"==typeof u)c=oo(u,i,!0);else if("function"==typeof u){var d=IO(function(t,e){t===this._ticket&&(l.setContent(e),this._updatePosition(n,a,r,o,l,i,s))},this);this._ticket=e,c=u(i,e,d)}l.setContent(c),l.show(n),this._updatePosition(n,a,r,
|
|
o,l,i,s)}},_updatePosition:function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),c=t.get("align"),d=t.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),"function"==typeof e&&(e=e([n,i],o,r.el,h,{viewSize:[s,l],contentSize:u.slice()})),E(e))n=LO(e[0],s),i=LO(e[1],l);else if(b(e)){e.width=u[0],e.height=u[1];var f=po(e,{width:s,height:l});n=f.x,i=f.y,d=c=null}else if("string"==typeof e&&a){n=(p=Mv(e,h,u))[0],i=p[1]}else{var p;n=(p=Tv(n,i,r.el,s,l,c?null:20,d?null:20))[0],i=p[1]}(c&&(n-=kv(c)?u[0]/2:"right"===c?u[0]:0),d&&(i-=kv(d)?u[1]/2:"bottom"===d?u[1]:0),t.get("confine"))&&(n=(p=Av(n,i,r.el,s,l))[0],i=p[1]);r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(i){var t=this._lastDataByCoordSys,a=!!t&&t.length===i.length;return a&&EO(t,function(t,e){var n=t.dataByAxis||{},o=(i[e]||{}).dataByAxis||[];(a&=n.length===o.length)&&EO(n,function(t,e){var n=o[e]||{},i=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(a&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&i.length===r.length)&&EO(i,function(t,e){var n=r[e];a&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=i,!!a},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Wb.node||Wb.wxa||(this._tooltipContent.hide(),pm("itemTooltip",e))}}),Os({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Os({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Pv.prototype={constructor:Pv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:rM.prototype.dataToCoord,radiusToData:rM.prototype.coordToData},o(Pv,rM),Nv.prototype={constructor:Nv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:rM.prototype.dataToCoord,angleToData:rM.prototype.coordToData},o(Nv,rM);var PO=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Pv,this._angleAxis=new Nv,this._radiusAxis.polar=this._angleAxis.polar=this};PO.prototype={type:"polar",axisPointerEnabled:!0,constructor:PO,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=l<o?1:-1;l<o||a<l;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]}};var NO=oT.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});g(NO.prototype,WD);var RO={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};PM("angle",NO,Rv,RO.angle),PM("radius",NO,Rv,RO.radius),js({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var $O={dimensions:PO.prototype.dimensions,create:function(n,s){var l=[];return n.eachComponent("polar",function(t,e){var n=new PO(e);n.update=Fv;var i=n.getRadiusAxis(),r=n.getAngleAxis(),o=t.findAxisModel("radiusAxis"),a=t.findAxisModel("angleAxis");zv(i,o),zv(r,a),$v(n,t,s),l.push(n),(t.coordinateSystem=n).model=t}),n.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];if(Hb&&!e)throw new Error('Polar "'+N(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}}),l}};qo.register("polar",$O);var FO=["axisLine","axisLabel","axisTick","splitLine","splitArea"];UM.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=A(n.getViewLabels(),function(t){return(t=L(t)).coord=n.dataToCoord(t.tickValue),t});Bv(a),Bv(o),I(FO,function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,o,r,a)},this)}},_axisLine:function(t,e,n,i){var r=t.getModel("axisLine.lineStyle"),o=new uC({shape:{cx:e.cx,cy:e.cy,r:i[Hv(e)]},style:r.getLineStyle(),z2:1,silent:!0});o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,n,i){var r=t.getModel("axisTick"),o=(r.get("inside")?-1:1)*r.get("length"),a=i[Hv(e)],s=A(n,function(t){return new xC({shape:jv(e,[a,a+o],t.coord)})});this.group.add(LC(s,{style:D(r.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(c,d,t,h,e){var f=c.getCategories(!0),p=c.getModel("axisLabel"),g=p.get("margin");I(e,function(t){var e=p,n=t.tickValue,i=h[Hv(d)],r=d.coordToPoint([i+g,t.coord]),o=d.cx,a=d.cy,s=Math.abs(r[0]-o)/i<.3?"center":r[0]>o?"left":"right",l=Math.abs(r[1]-a)/i<.3?"middle":r[1]>a?"top":"bottom";f&&f[n]&&f[n].textStyle&&(e=new Or(f[n].textStyle,p,p.ecModel));var u=new lC({silent:!0});this.group.add(u),pr(u.style,e,{x:r[0],y:r[1],textFill:e.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:s,textVerticalAlign:l})},this)},_splitLine:function(t,e,n,i){var r=t.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),a=0;o=o instanceof Array?o:[o];for(var s=[],l=0;l<n.length;l++){var u=a++%o.length;s[u]=s[u]||[],s[u].push(new xC({shape:jv(e,i,n[l].coord)}))}for(l=0;l<s.length;l++)this.group.add(LC(s[l],{style:D({stroke:o[l%o.length]},r.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,n,i){if(n.length){var r=t.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),a=0;o=o instanceof Array?o:[o];for(var s=[],l=Math.PI/180,u=-n[0].coord*l,c=Math.min(i[0],i[1]),d=Math.max(i[0],i[1]),h=t.get("clockwise"),f=1;f<n.length;f++){var p=a++%o.length;s[p]=s[p]||[],s[p].push(new hC({shape:{cx:e.cx,cy:e.cy,r0:c,r:d,startAngle:u,endAngle:-n[f].coord*l,clockwise:h},silent:!0})),u=-n[f].coord*l}for(f=0;f<s.length;f++)this.group.add(LC(s[f],{style:D({fill:o[f%o.length]},r.getAreaStyle()),silent:!0}))}}});var zO=["axisLine","axisTickLabel","axisName"],jO=["splitLine","splitArea"];UM.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,t=i.getAngleAxis(),r=n.getTicksCoords(),o=t.getExtent()[0],a=n.getExtent(),s=Vv(i,e,o),l=new jM(e,s);I(zO,l.add,l),this.group.add(l.getGroup()),I(jO,function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,o,a,r)},this)}},_splitLine:function(t,e,n,i,r){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=0;u<r.length;u++){var c=s++%a.length;l[c]=l[c]||[],l[c].push(new uC({shape:{cx:e.cx,cy:e.cy,r:r[u].coord},silent:!0}))}for(u=0;u<l.length;u++)this.group.add(LC(l[u],{style:D({stroke:a[u%a.length],fill:null},o.getLineStyle()),silent:!0}))},_splitArea:function(t,e,n,i,r){if(r.length){var o=t.getModel("splitArea").getModel("areaStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=r[0].coord,c=1;c<r.length;c++){var d=s++%a.length;l[d]=l[d]||[],l[d].push(new hC({shape:{cx:e.cx,cy:e.cy,r0:u,r:r[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=r[c].coord}for(c=0;c<l.length;c++)this.group.add(LC(l[c],{style:D({fill:a[c%a.length]},o.getAreaStyle()),silent:!0}))}}});var HO=gm.extend({makeElOption:function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a,s=o.polar,l=s.getOtherAxis(o).getExtent();a=o["dataTo"+co(o.dim)](e);var u=i.get("type");if(u&&"none"!==u){var c=_m(i),d=BO[u](o,s,a,l,c);d.style=c,t.graphicKey=d.type,t.pointer=d}wm(t,n,i,r,Wv(e,n,i,s,i.get("label.margin")))}}),BO={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:Dm(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:km(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:km(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}};UM.registerAxisPointerClass("PolarAxisPointer",HO),Rs(y(Lv,"bar")),Hs({type:"polar"}),r(oT.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){oT.prototype.init.apply(this,arguments),Pn(t,"label",["show"])},optionUpdated:function(){var t=this.option,n=this;t.regions=Lk.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=p(t.regions||[],function(t,e){return e.name&&t.set(e.name,new Or(e,n)),t},F()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new Or(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t).get("label."+e+".formatter"),i={name:t};return"function"==typeof n?(i.status=e,n(i)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),rk),Hs({type:"geo",init:function(t,e){var n=new bd(e,!0);this._mapDraw=n,this.group.add(n.group)},render:function(t,e,n,i){if(!i||"geoToggleSelect"!==i.type||i.from!==this.uid){var r=this._mapDraw;t.get("show")?r.draw(t,e,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),Uv("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),Uv("select",{type:"geoSelect",event:"geoselected"}),Uv("unSelect",{type:"geoUnSelect",event:"geounselected"});var VO=["rect","polygon","keep","clear"],WO=function(t,e){var n=t&&t.brush;if(E(n)||(n=n?[n]:[]),n.length){var i=[];I(n,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))});var r=t&&t.toolbox;E(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),qv(s),e&&!s.length&&s.push.apply(s,VO)}},UO=I,qO={lineX:Qv(0),lineY:Qv(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&iu(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(iu(i,r,o)||iu(i,r+a,o)||iu(i,r,o+s)||iu(i,r+a,o+s)||ie.create(t).contain(l[0],l[1])||ty(r,o,r+a,o,i)||ty(r,o,r,o+s,i)||ty(r+a,o,r+a,o+s,i)||ty(r,o+s,r+a,o+s,i))||void 0}}},GO=I,YO=x,ZO=y,XO=["dataToPoint","pointToData"],KO=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],QO=ry.prototype;QO.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=nP[t.brushType](0,n,e);t.__rangeOffset={offset:iP[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})},QO.matchOutputRanges=function(t,i,r){GO(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&I(t.coordSyses,function(t){var e=nP[n.brushType](1,t,n.range);r(n,e.values,t,i)})},this)},QO.setInputRanges=function(t,r){GO(t,function(t){var e=this.findTargetInfo(t,r);if(Hb&&(T(!e||!0===e||t.coordRange,"coordRange must be specified when coord index specified."),T(!e||!0!==e||t.range,"range must be specified in global brush.")),t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var n=nP[t.brushType](0,e.coordSys,t.coordRange),i=t.__rangeOffset;t.range=i?iP[t.brushType](n.values,i.offset,uy(n.xyMinMax,i.xyMinMax)):n.values}},this)},QO.makePanelOpts=function(n,i){return A(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:pp(e),isTargetByCursor:mp(e,n,t.coordSysModel),getLinearBrushOtherExtent:gp(e)}})},QO.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&0<=YO(i.coordSyses,e.coordinateSystem)},QO.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=ay(e,t),r=0;r<n.length;r++){var o=n[r],a=t.panelId;if(a){if(o.panelId===a)return o}else for(r=0;r<tP.length;r++)if(tP[r](i,o))return o}return!0};var JO={grid:function(t,i){var r=t.xAxisModels,o=t.yAxisModels,e=t.gridModels,n=F(),a={},s={};(r||o||e)&&(GO(r,function(t){var e=t.axis.grid.model;n.set(e.id,e),a[e.id]=!0}),GO(o,function(t){var e=t.axis.grid.model;n.set(e.id,e),s[e.id]=!0}),GO(e,function(t){n.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),n.each(function(t){var e=t.coordinateSystem,n=[];GO(e.getCartesians(),function(t){(0<=YO(r,t.getAxis("x").model)||0<=YO(o,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:eP.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){GO(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:eP.geo})})}},tP=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],eP={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ar(t)),e}},nP={lineX:ZO(sy,0),lineY:ZO(sy,1),rect:function(t,e,n){var i=e[XO[t]]([n[0][0],n[1][0]]),r=e[XO[t]]([n[0][1],n[1][1]]),o=[oy([i[0],r[0]]),oy([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(n,i,t){var r=[[Infinity,-Infinity],[Infinity,-Infinity]];return{values:A(t,function(t){var e=i[XO[n]](t);return r[0][0]=Math.min(r[0][0],e[0]),r[1][0]=Math.min(r[1][0],e[1]),r[0][1]=Math.max(r[0][1],e[0]),r[1][1]=Math.max(r[1][1],e[1]),e}),xyMinMax:r}}},iP={lineX:ZO(ly,0),lineY:ZO(ly,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return A(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}},rP=["inBrush","outOfBrush"],oP="__ecBrushSelect",aP="__ecInBrushSelectEvent",sP=OA.VISUAL.BRUSH;Rs(sP,function(e,t,n){e.eachComponent({mainType:"brush"},function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1}),(t.brushTargetManager=new ry(t.option,e)).setInputRanges(t.areas,e)})}),$s(sP,function(g,t,e){var m,v,y=[];g.eachComponent({mainType:"brush"},function(o,t){function s(t){return"all"===n||a[t]}function l(t){return!!t.length}function i(t,e){var n=t.coordinateSystem;h|=n.hasAxisBrushed(),s(e)&&n.eachActiveState(t.getData(),function(t,e){"active"===t&&(c[e]=1)})}function r(e,t,n){var i=py(e);if(i&&!gy(o,t)&&(I(f,function(t){i[t.brushType]&&o.brushTargetManager.controlSeries(t,e,g)&&n.push(t),h|=l(n)}),s(t)&&l(n))){var r=e.getData();r.each(function(t){fy(i,n,r,t)&&(c[t]=1)})}}var u={brushId:o.id,brushIndex:t,brushName:o.name,areas:L(o.areas),selected:[]};y.push(u);var e=o.option,n=e.brushLink,a=[],c=[],d=[],h=0;t||(m=e.throttleType,v=e.throttleDelay);var f=A(o.areas,function(t){return my(D({boundingRect:lP[t.brushType](t)},t))}),p=Yv(o.option,rP,function(t){t.mappingMethod="fixed"});E(n)&&I(n,function(t){a[t]=1}),g.eachSeries(function(t,e){var n=d[e]=[];"parallel"===t.subType?i(t,e,n):r(t,e,n)}),g.eachSeries(function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};u.selected.push(n);var i=py(t),r=d[e],o=t.getData(),a=s(e)?function(t){return c[t]?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return fy(i,r,o,t)?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(s(e)?h:l(r))&&Xv(rP,p,o,a)})}),dy(t,m,v,y,e)});var lP={lineX:j,lineY:j,rect:function(t){return vy(t.range)},polygon:function(t){for(var e,n=t.range,i=0,r=n.length;i<r;i++){e=e||[[Infinity,-Infinity],[Infinity,-Infinity]];var o=n[i];o[0]<e[0][0]&&(e[0][0]=o[0]),o[0]>e[0][1]&&(e[0][1]=o[0]),o[1]<e[1][0]&&(e[1][0]=o[1]),o[1]>e[1][1]&&(e[1][1]=o[1])}return e&&vy(e)}},uP=["#ddd"];js({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;!e&&Zv(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:uP},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){Hb&&(T(E(t)),I(t,function(t){T(t.brushType,"Illegal areas")})),t&&(this.areas=A(t,function(t){return yy(this.option,t)},this))},setBrushOption:function(t){this.brushOption=yy(this.option,t),this.brushType=this.brushOption.brushType}});Hs({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Of(e.getZr())).on("brush",v(this._onBrush,this)).mount()},render:function(t){return this.model=t,xy.apply(this,arguments)},updateTransform:xy,updateView:xy,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:L(t),$from:n})}}),Os({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),Os({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var cP={},dP=rA.toolbox.brush;wy.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:L(dP.title)};var hP=wy.prototype;hP.render=hP.updateView=function(e,t){var n,i,r;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,i=t.brushOption.brushMode||"single",r|=t.areas.length}),this._brushType=n,this._brushMode=i,I(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?r:t===n)?"emphasis":"normal")})},hP.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return I(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},hP.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},by("brush",wy),Is(WO);var fP=864e5;Sy.prototype={constructor:Sy,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Xr(t)).getFullYear(),n=t.getMonth()+1;n=n<10?"0"+n:n;var i=t.getDate();i=i<10?"0"+i:i;var r=t.getDay();return{y:e,m:n,d:i,day:r=Math.abs((r+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+i,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){function n(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,r=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[i,7]:[7,i];I([0,1],function(t){n(o,t)&&(a[r[t]]=o[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=po(a,l);I([0,1],function(t){n(o,t)||(o[t]=u[r[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){E(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,r=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+fP))return[NaN,NaN];var o=n.day,a=this._getRangeInfo([i.start.time,r]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var n=this.dataToPoint(t,e);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,i):this._getDateByWeeksAndDay(e,n-1,i)},convertToPixel:y(Cy,"dataToPoint"),convertFromPixel:y(Cy,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(E(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var n=this.getDateInfo(e),i=n.date;i.setMonth(i.getMonth()+1);var r=this.getNextNDay(i,-1);t=[n.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var n=Math.floor(t[1].time/fP)-Math.floor(t[0].time/fP)+1,i=new Date(t[0].time),r=i.getDate(),o=t[1].date.getDate();if(i.setDate(r+n-1),i.getDate()!==o)for(var a=0<i.getTime()-t[1].time?1:-1;i.getDate()!==o&&0<(i.getTime()-t[1].time)*a;)n-=a,i.setDate(r+n-1);var s=Math.floor((n+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&e<i.fweek||t===i.weeks&&e>i.lweek)return!1;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(i.start.d+r),this.getDateInfo(o)}},Sy.dimensions=Sy.prototype.dimensions,Sy.getDimensionsInfo=Sy.prototype.getDimensionsInfo,Sy.create=function(n,i){var r=[];return n.eachComponent("calendar",function(t){var e=new Sy(t,n,i);r.push(e),t.coordinateSystem=e}),n.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=r[t.get("calendarIndex")||0])}),r},qo.register("calendar",Sy);var pP=oT.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t){var e=yo(t);pP.superApply(this,"init",arguments),Ty(t,e)},mergeOption:function(t){pP.superApply(this,"mergeOption",arguments),Ty(this.option,t)}}),gP={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]},mP={EN:["S","M","T","W","T","F","S"],CN:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]};Hs({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var n=t.coordinateSystem,i=n.getRangeInfo(),r=n.getOrient();this._renderDayRect(t,i,e),this._renderLines(t,i,r,e),this._renderYearText(t,i,r,e),this._renderMonthText(t,r,e),this._renderWeekText(t,i,r,e)},_renderDayRect:function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new yC({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},_renderLines:function(n,t,i,r){function e(t){o._firstDayOfMonth.push(a.getDateInfo(t)),o._firstDayPoints.push(a.dataToRect([t],!1).tl);var e=o._getLinePointsOfOneWeek(n,t,i);o._tlpoints.push(e[0]),o._blpoints.push(e[e.length-1]),l&&o._drawSplitline(e,s,r)}var o=this,a=n.coordinateSystem,s=n.getModel("splitLine.lineStyle").getLineStyle(),l=n.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=t.start,d=0;c.time<=t.end.time;d++){e(c.formatedDate),0===d&&(c=a.getDateInfo(t.start.y+"-"+t.start.m));var h=c.date;h.setMonth(h.getMonth()+1),c=a.getDateInfo(h)}e(a.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,u,i),s,r),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,u,i),s,r)},_getEdgesPoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},_drawSplitline:function(t,e,n){var i=new vC({z2:20,shape:{points:t},style:e});n.add(i)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var r=[],o=0;o<7;o++){var a=i.getNextNDay(e.time,o),s=i.dataToRect([a.time],!1);r[2*a.day]=s.tl,r[2*a.day+1]=s["horizontal"===n?"bl":"tr"]}return r},_formatterLabel:function(t,e){return"string"==typeof t&&t?ao(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,r){e=e.slice();var o=["center","bottom"];"bottom"===i?(e[1]+=r,o=["center","top"]):"left"===i?e[0]-=r:"right"===i?(e[0]+=r,o=["center","top"]):e[1]-=r;var a=0;return"left"!==i&&"right"!==i||(a=Math.PI/2),{rotation:a,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},h=e.start.y;+e.end.y>+e.start.y&&(h=h+"-"+e.end.y);var f=r.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:h},g=this._formatterLabel(f,p),m=new lC({z2:30});pr(m.style,r,{text:g}),m.attr(this._yearTextPositionControl(m,d[a],n,a,o)),i.add(m)}},_monthTextPositionControl:function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:a}},_renderMonthText:function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var r=i.get("nameMap"),o=i.get("margin"),a=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];_(r)&&(r=gP[r.toUpperCase()]||[]);var u="start"===a?0:1,c="horizontal"===e?0:1;o="start"===a?-o:o;for(var d="center"===s,h=0;h<l[u].length-1;h++){var f=l[u][h].slice(),p=this._firstDayOfMonth[h];if(d){var g=this._firstDayPoints[h];f[c]=(g[c]+l[0][h+1][c])/2}var m=i.get("formatter"),v=r[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},x=this._formatterLabel(m,y),b=new lC({z2:30});O(pr(b.style,i,{text:x}),this._monthTextPositionControl(f,d,e,a,o)),n.add(b)}}},_weekTextPositionControl:function(t,e,n,i,r){var o="center",a="middle",s=t[0],l=t[1],u="start"===n;return"horizontal"===e?(s=s+i+(u?1:-1)*r[0]/2,o=u?"right":"left"):(l=l+i+(u?1:-1)*r[1]/2,a=u?"bottom":"top"),{x:s,y:l,textAlign:o,textVerticalAlign:a}},_renderWeekText:function(t,e,n,i){var r=t.getModel("dayLabel");if(r.get("show")){var o=t.coordinateSystem,a=r.get("position"),s=r.get("nameMap"),l=r.get("margin"),u=o.getFirstDayOfWeek();_(s)&&(s=mP[s.toUpperCase()]||[]);var c=o.getNextNDay(e.end.time,7-e.lweek).time,d=[o.getCellWidth(),o.getCellHeight()];l=Hr(l,d["horizontal"===n?0:1]),"start"===a&&(c=o.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var h=0;h<7;h++){var f=o.getNextNDay(c,h),p=o.dataToRect([f.time],!1).center,g=h;g=Math.abs((h+u)%7);var m=new lC({z2:30});O(pr(m.style,r,{text:s[g]}),this._weekTextPositionControl(p,n,a,l,d)),i.add(m)}}}}),js({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Hs({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=t.get("textBaseline"),l=new lC({style:pr({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),d=new lC({style:pr({},o,{text:c,textFill:o.getTextColor(),
|
|
y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),h=t.get("link"),f=t.get("sublink");l.silent=!h,d.silent=!f,h&&l.on("click",function(){window.open(h,"_"+t.get("target"))}),f&&d.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),i.add(l),c&&i.add(d);var p=i.getBoundingRect(),g=t.getBoxLayoutParams();g.width=p.width,g.height=p.height;var m=po(g,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.attr("position",[m.x,m.y]);var v={textAlign:a,textVerticalAlign:s};l.setStyle(v),d.setStyle(v),p=i.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new yC({shape:{x:p.x-y[3],y:p.y-y[0],width:p.width+y[1]+y[3],height:p.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});Qi(b),i.add(b)}}}),oT.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var vP=["cartesian2d","polar","singleAxis"],yP=Dy(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]),xP=I,bP=Vr,_P=function(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};_P.prototype={constructor:_P,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var i=[],r=this.ecModel;return r.eachSeries(function(t){if(Ay(t.get("coordinateSystem"))){var e=this._dimName,n=r.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0];this._axisIndex===(n&&n.componentIndex)&&i.push(t)}},this),i},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,n,i=this._dimName,r=this.ecModel,o=this.getAxisModel();return"x"===i||"y"===i?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle"),r.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(n=t)}),n},getMinMaxSpan:function(){return L(this._minMaxSpan)},calculateDataWindow:function(e){var i=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),a=[0,100],s=[e.start,e.end],l=[];return xP(["startValue","endValue"],function(t){l.push(null!=e[t]?r.parse(e[t]):null)}),xP([0,1],function(t){var e=l[t],n=s[t];"percent"===o[t]?(null==n&&(n=a[t]),e=r.parse(jr(n,a,i,!0))):n=jr(e,i,a,!0),l[t]=e,s[t]=n}),{valueWindow:bP(l),percentWindow:bP(s)}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=ky(this,this._dimName,e);var n=this.calculateDataWindow(t.option);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,Ly(this),Ey(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Ey(this,!0))},filterData:function(t){function i(t){return t>=d[0]&&t<=d[1]}if(t===this._dataZoomModel){var e=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),d=this._valueWindow;"none"!==r&&xP(n,function(n){var u=n.getData(),c=u.mapDimension(e,!0);"weakFilter"===r?u.filterSelf(function(t){for(var e,n,i,r=0;r<c.length;r++){var o=u.get(c[r],t),a=!isNaN(o),s=o<d[0],l=o>d[1];if(a&&!s&&!l)return!0;a&&(i=!0),s&&(e=!0),l&&(n=!0)}return i&&e&&n}):xP(c,function(t){if("empty"===r)n.setData(u.map(t,function(t){return i(t)?t:NaN}));else{var e={};e[t]=d,u.selectRange(e)}}),xP(c,function(t){u.setApproximateExtent(d,t)})})}}};var wP=I,SP=yP,CP=js({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=Oy(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=Oy(t);g(this.option,t,!0),this.doInit(e)},doInit:function(t){var n=this.option;Wb.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),Py(this,t),wP([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var a=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var r=this.dependentModels[t.axis][e],o=r.__dzAxisProxy||(r.__dzAxisProxy=new _P(t.name,e,this,i));a[t.name+"_"+e]=o},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();SP(function(t){var e=t.axisIndex;n[e]=On(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;SP(function(t){null!=e[t.axisIndex]&&(n=!0)},this);var t=e.orient;return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var o=!0,e=this.get("orient",!0),a=this.option,t=this.dependentModels;if(o){var n="vertical"===e?"y":"x";t[n+"Axis"].length?(a[n+"AxisIndex"]=[0],o=!1):wP(t.singleAxis,function(t){o&&t.get("orient",!0)===e&&(a.singleAxisIndex=[t.componentIndex],o=!1)})}o&&SP(function(t){if(o){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,r=n.length;i<r;i++)"category"===n[i].get("type")&&e.push(i);(a[t.axisIndex]=e).length&&(o=!1)}},this),o&&this.ecModel.eachSeries(function(o){this._isSeriesHasAllAxesTypeOf(o,"value")&&SP(function(t){var e=a[t.axisIndex],n=o.get(t.axisIndex),i=o.get(t.axisId),r=o.ecModel.queryComponents({mainType:t.axis,index:n,id:i})[0];if(Hb&&!r)throw new Error(t.axis+' "'+N(n,i,0)+'" not found');x(e,n=r.componentIndex)<0&&e.push(n)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){!e&&(e=t.name)},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(i,r){var o=!0;return SP(function(t){var e=i.get(t.axisIndex),n=this.dependentModels[t.axis][e];n&&n.get("type")===r||(o=!1)},this),o},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var n;return SP(function(t){if(null==n){var e=this.get(t.axisIndex);e.length&&(n=this.dependentModels[t.axis][e[0]])}},this),n},eachTargetAxis:function(n,i){var r=this.ecModel;SP(function(e){wP(this.get(e.axisIndex),function(t){n.call(i,e,t,this,r)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(e,t){var n=this.option;wP([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=e[t[0]],n[t[1]]=e[t[1]])},this),!t&&Py(this,e)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}}),TP=GT.extend({type:"dataZoom",render:function(t,e,n){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){function r(t,e,n,i){for(var r,o=0;o<n.length;o++)if(n[o].model===t){r=n[o];break}r||n.push(r={model:t,axisModels:[],coordIndex:i}),r.axisModels.push(e)}var t=this.dataZoomModel,o=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var n=o.getComponent(t.axis,e);if(n){var i=n.getCoordSysModel();i&&r(i,n,a[i.mainType]||(a[i.mainType]=[]),i.componentIndex)}},this),a}}),AP=(CP.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),yC),DP=jr,MP=Vr,kP=v,IP=I,EP=7,LP=1,OP=30,PP="horizontal",NP="vertical",RP=5,$P=["line","bar","candlestick","scatter"],FP=TP.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,i){FP.superApply(this,"render",arguments),Fa(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){FP.superApply(this,"remove",arguments),za(this,"_dispatchZoomAction")},dispose:function(){FP.superApply(this,"dispose",arguments),za(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new X_;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},r=this._orient===PP?{right:i.width-n.x-n.width,top:i.height-OP-EP,width:n.width,height:OP}:{right:EP,top:n.y,width:OP,height:n.height},o=yo(t.option);I(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=po(o,i,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],this._orient===NP&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==PP||r?n===PP&&r?{scale:a?[-1,1]:[-1,-1]}:n!==NP||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new AP({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new AP({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:v(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[0,e[0]],c=[[e[0],0],[0,0]],d=[],h=u[1]/(i.count()-1),f=0,p=Math.round(i.count()/e[0]);i.each([r],function(t,e){if(0<p&&e%p)f+=h;else{var n=null==t||isNaN(t)||""===t,i=n?0:DP(t,o,l,!0);n&&!s&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!n&&s&&(c.push([f,0]),d.push([f,0])),c.push([f,i]),d.push([f,i]),f+=h,s=n}});var g=this.dataZoomModel;this._displayables.barGroup.add(new mC({shape:{points:c},style:D({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new vC({shape:{points:d},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(o,a){I(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(l||!0!==s&&x($P,t.get("type"))<0)){var e,n=u.getComponent(o.axis,a).axis,i=Ny(o.name),r=t.coordinateSystem;null!=i&&r.getOtherAxis&&(e=r.getOtherAxis(n).inverse),i=t.getData().mapDimension(i),l={thisAxis:n,series:t,thisDim:o.name,otherDim:i,otherAxisInverse:e}}},this)},this),l}},_renderHandle:function(){var t=this._displayables,o=t.handles=[],a=t.handleLabels=[],s=this._displayables.barGroup,e=this._size,l=this.dataZoomModel;s.add(t.filler=new AP({draggable:!0,cursor:Ry(this._orient),drift:kP(this._onDragMove,this,"all"),onmousemove:function(t){Iw(t.event)},ondragstart:kP(this._showDataInfo,this,!0),ondragend:kP(this._onDragEnd,this),onmouseover:kP(this._showDataInfo,this,!0),onmouseout:kP(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new AP(Qi({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:LP,fill:"rgba(0,0,0,0)"}}))),IP([0,1],function(t){var e=Lr(l.get("handleIcon"),{cursor:Ry(this._orient),draggable:!0,drift:kP(this._onDragMove,this,t),onmousemove:function(t){Iw(t.event)},ondragend:kP(this._onDragEnd,this),onmouseover:kP(this._showDataInfo,this,!0),onmouseout:kP(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),n=e.getBoundingRect();this._handleHeight=Hr(l.get("handleSize"),this._size[1]),this._handleWidth=n.width/n.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle());var i=l.get("handleColor");null!=i&&(e.style.fill=i),s.add(o[t]=e);var r=l.textStyleModel;this.group.add(a[t]=new lC({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:r.getTextColor(),textFont:r.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[DP(t[0],[0,100],e,!0),DP(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];uE(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?DP(o.minSpan,a,r,!0):null,null!=o.maxSpan?DP(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=MP([DP(i[0],r,a,!0),DP(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var i=this._displayables,r=this._handleEnds,e=MP(r.slice()),o=this._size;IP([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scale:[n/2,n/2],position:[r[t],o[1]/2-n/2]})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Ar(o.handles[t].parent,this.group),n=Mr(0===t?"right":"left",e),i=this._handleWidth/2+RP,r=Dr([d[t]+(0===t?-i:i),this._size[1]/2],e);a[t].setStyle({x:r[0],y:r[1],textVerticalAlign:s===PP?"middle":n,textAlign:s===PP?n:"center",text:l[t]})}var n=this.dataZoomModel,o=this._displayables,a=o.handleLabels,s=this._orient,l=["",""];if(n.get("showDetail")){var i=n.findRepresentativeAxisProxy();if(i){var r=i.getAxisModel().axis,u=this._range,c=t?i.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:i.getDataValueWindow();l=[this._formatLabel(c[0],r),this._formatLabel(c[1],r)]}}var d=MP(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),r=n.get("labelPrecision");null!=r&&"auto"!==r||(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return m(i)?i(t,o):_(i)?i.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,n){this._dragging=!0;var i=Dr([e,n],this._displayables.barGroup.getLocalTransform(),!0),r=this._updateInterval(t,i[0]),o=this.dataZoomModel.get("realtime");this._updateView(!o),r&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,n=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var n;if(IP(this.getTargetCoordInfo(),function(t){if(!n&&t.length){var e=t[0].model.coordinateSystem;n=e.getRect&&e.getRect()}}),!n){var t=this.api.getWidth(),e=this.api.getHeight();n={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return n}});CP.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var zP=y,jP="\0_ec_dataZoom_roams",HP=v,BP=TP.extend({type:"dataZoom.inside",init:function(){this._range},render:function(o,t,a){BP.superApply(this,"render",arguments),this._range=o.getPercentRange(),I(this.getTargetCoordInfo(),function(t,n){var r=A(t,function(t){return zy(t.model)});I(t,function(t){var i=t.model,e=o.option;$y(a,{coordId:zy(i),allCoordIds:r,containsPoint:function(t,e,n){return i.coordinateSystem.containPoint([e,n])},dataZoomId:o.id,throttleRate:o.get("throttle",!0),panGetRange:HP(this._onPan,this,t,n),zoomGetRange:HP(this._onZoom,this,t,n),zoomLock:e.zoomLock,disabled:e.disabled,roamControllerOpt:{zoomOnMouseWheel:e.zoomOnMouseWheel,moveOnMouseMove:e.moveOnMouseMove,preventDefaultMouseMove:e.preventDefaultMouseMove}})},this)},this)},dispose:function(){Fy(this.api,this.dataZoomModel.id),BP.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,n,i,r,o,a,s,l){var u=this._range,c=u.slice(),d=t.axisModels[0];if(d){var h=VP[e]([o,a],[s,l],d,n,t),f=h.signal*(c[1]-c[0])*h.pixel/h.pixelLength;return uE(f,c,[0,100],"all"),this._range=c,u[0]!==c[0]||u[1]!==c[1]?c:void 0}},_onZoom:function(t,e,n,i,r,o){var a=this._range,s=a.slice(),l=t.axisModels[0];if(l){var u=VP[e](null,[r,o],l,n,t),c=(0<u.signal?u.pixelStart+u.pixelLength-u.pixel:u.pixel-u.pixelStart)/u.pixelLength*(s[1]-s[0])+s[0];i=Math.max(1/i,0),s[0]=(s[0]-c)*i+c,s[1]=(s[1]-c)*i+c;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return uE(0,s,[0,100],0,d.minSpan,d.maxSpan),this._range=s,a[0]!==s[0]||a[1]!==s[1]?s:void 0}}}),VP={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};Es({getTargetSeries:function(t){var i=F();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){I(n.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){i.set(t.uid,t)})})}),i},modifyOutputEnd:!0,overallReset:function(t,i){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).reset(n,i)}),t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setRawRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]},!0)})}}),Os("dataZoom",function(e,t){var n=My(v(t.eachComponent,t,"dataZoom"),yP,function(t,e){return t.get(e.axisIndex)}),i=[];t.eachComponent({mainType:"dataZoom",query:e},function(t){i.push.apply(i,n(t).nodes)}),I(i,function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})});var WP=I,UP=function(t){var e=t&&t.visualMap;E(e)||(e=e?[e]:[]),WP(e,function(t){if(t){Yy(t,"splitList")&&!Yy(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&E(e)&&WP(e,function(t){b(t)&&(Yy(t,"start")&&!Yy(t,"min")&&(t.min=t.start),Yy(t,"end")&&!Yy(t,"max")&&(t.max=t.end))})}})};oT.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var qP=OA.VISUAL.COMPONENT;$s(qP,{createOnAllSeries:!0,reset:function(n,t){var i=[];return t.eachComponent("visualMap",function(t){var e=n.pipelineContext;!t.isTargetSeries(n)||e&&e.large||i.push(Kv(t.stateList,t.targetVisuals,v(t.getValueState,t),t.getDataDimension(n.getData())))}),i}}),$s(qP,{createOnAllSeries:!0,reset:function(r,t){var o=r.getData(),a=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(r)){var e=t.getVisualMeta(v(Zy,null,r,t))||{stops:[],outerColors:[]},n=t.getDataDimension(o),i=o.getDimensionInfo(n);null!=i&&(e.dimension=i.index,a.push(e))}}),r.getData().setVisual("visualMeta",a)}});var GP={get:function(t,e,n){var i=L((YP[t]||{})[e]);return n&&E(i)?i[i.length-1]:i}},YP={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},ZP=fI.mapVisual,XP=fI.eachVisual,KP=E,QP=I,JP=Vr,tN=jr,eN=js({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-Infinity,Infinity],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,n)},optionUpdated:function(t,e){var n=this.option;Wb.canvasSupported||(n.realtime=!1),!e&&Zv(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=v(t,this),this.controllerVisuals=Yv(this.option.controller,e,t),this.targetVisuals=Yv(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=On(t),n},eachTargetSeries:function(e,n){I(this.getTargetSeriesIndices(),function(t){e.call(n,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},formatValueText:function(t,e,n){function i(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var r,o,a=this.option,s=a.precision,l=this.dataBound,u=a.formatter;return n=n||["<",">"],E(t)&&(t=t.slice(),r=!0),o=e?t:r?[i(t[0]),i(t[1])]:i(t),_(u)?u.replace("{value}",r?o[0]:o).replace("{value2}",r?o[1]:o):m(u)?r?u(t[0],t[1]):u(t):r?t[0]===l[0]?n[0]+" "+o[1]:t[1]===l[1]?n[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetExtent:function(){var t=this.option,e=JP([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,r=i.length-1;0<=r;r--){var o=i[r];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(i){KP(o.color)&&!i.inRange&&(i.inRange={color:o.color.slice().reverse()}),i.inRange=i.inRange||{color:r.get("gradientColor")},QP(this.stateList,function(t){var e=i[t];if(_(e)){var n=GP.get(e,"active",u);n?(i[t]={},i[t][e]=n):delete i[t]}},this)}function e(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},QP(i,function(t,e){if(fI.isValidType(e)){var n=GP.get(e,"inactive",u);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function n(o){var a=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,s=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,l=this.get("inactiveColor");QP(this.stateList,function(t){var e=this.itemSize,n=o[t];n||(n=o[t]={color:u?l:[l]}),null==n.symbol&&(n.symbol=a&&L(a)||(u?"roundRect":["roundRect"])),null==n.symbolSize&&(n.symbolSize=s&&L(s)||(u?e[0]:[e[0],e[0]])),n.symbol=ZP(n.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var i=n.symbolSize;if(null!=i){var r=-Infinity;XP(i,function(t){r<t&&(r=t)}),n.symbolSize=ZP(i,function(t){return tN(t,[0,r],[0,e[0]],!0)})}},this)}var r=this.ecModel,o=this.option,i={inRange:o.inRange,outOfRange:o.outOfRange},a=o.target||(o.target={}),s=o.controller||(o.controller={});g(a,i),g(s,i);var u=this.isCategory();t.call(this,a),t.call(this,s),e.call(this,a,"inRange","outOfRange"),n.call(this,s)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:j,getValueState:j,getVisualMeta:j}),nN=[20,140],iN=eN.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(){iN.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){iN.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=nN[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=nN[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):E(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){eN.prototype.completeVisualOption.apply(this,arguments),I(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Vr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(i){var r=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),r.push({seriesId:t.id,dataIndex:n})},this),r},getVisualMeta:function(n){function t(t,e){r.push({value:t,color:n(t,e)})}for(var e=Xy(this,"outOfRange",this.getExtent()),i=Xy(this,"inRange",this.option.range.slice()),r=[],o=0,a=0,s=i.length,l=e.length;a<l&&(!i.length||e[a]<=i[0]);a++)e[a]<i[o]&&t(e[a],"outOfRange");for(var u=1;o<s;o++,u=0)u&&r.length&&t(i[o],"outOfRange"),t(i[o],"inRange");for(u=1;a<l;a++)(!i.length||i[i.length-1]<e[a])&&(u&&(r.length&&t(r[r.length-1].value,"outOfRange"),u=0),t(e[a],"outOfRange"));var c=r.length;return{stops:r,outerColors:[c?r[0].color:"transparent",c?r[c-1].color:"transparent"]}}}),rN=Hs({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,n=UC(e.get("padding")||0),i=t.getBoundingRect();t.add(new yC({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(n,i,r){function o(t){return s[t]}function a(t,e){s[t]=e}var t=(r=r||{}).forceState,e=this.visualMapModel,s={};if("symbol"===i&&(s.symbol=e.get("itemSymbol")),"color"===i){var l=e.get("contentColor");s.color=l}var u=e.controllerVisuals[t||e.getValueState(n)];return I(fI.prepareVisualTypes(u),function(t){var e=u[t];r.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),fI.dependsOn(t,i)&&e&&e.applyVisual(n,o,a)}),s[i]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;go(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:j}),oN=jr,aN=I,sN=Math.min,lN=Math.max,uN=12,cN=6,dN=rN.extend({type:"visualMap.continuous",init:function(){dN.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){if(e){var i=e[1-n];i=null!=i?i+"":"";var r=this.visualMapModel,o=r.get("textGap"),a=r.itemSize,s=this._shapes.barGroup,l=this._applyTransform([a[0]/2,0===n?-o:a[1]+o],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new lC({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:i,textFont:d.getFont(),textFill:d.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,r=this._orient,o=this._useHandle,a=Ky(e,this.api,i),s=n.barGroup=this._createBarGroup(a);s.add(n.outOfRange=Jy()),s.add(n.inRange=Jy(null,o?rx(this._orient):null,v(this._dragHandle,this,"all",!1),v(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("\u56fd"),u=lN(l.width,l.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,r,a),this._createHandle(s,1,i,u,r,a)),this._createIndicator(s,i,u,r),t.add(s)},_createHandle:function(t,e,n,i,r){var o=v(this._dragHandle,this,e,!1),a=v(this._dragHandle,this,e,!0),s=Jy(tx(e,i),rx(this._orient),o,a);s.position[0]=n[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new lC({draggable:!0,drift:o,onmousemove:function(t){Iw(t.event)},ondragend:a,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var c=["horizontal"===r?i/2:1.5*i,"horizontal"===r?0===e?-1.5*i:1.5*i:0===e?-i/2:i/2],d=this._shapes;d.handleThumbs[e]=s,d.handleLabelPoints[e]=c,d.handleLabels[e]=u},_createIndicator:function(t,e,n,i){var r=Jy([[0,0]],"move");r.position[0]=e[0],r.attr({invisible:!0,silent:!0}),t.add(r);var o=this.visualMapModel.textStyleModel,a=new lC({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:o.getFont(),textFill:o.getTextColor()}});this.group.add(a);var s=["horizontal"===i?n/2:cN+3,0],
|
|
l=this._shapes;l.indicator=r,l.indicatorLabel=a,l.indicatorLabelPoint=s},_dragHandle:function(t,e,n,i){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(t,r[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():ix(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[oN(e[0],n,i,!0),oN(e[1],n,i,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,r=[0,n.itemSize[1]];uE(e,i,r,t,0);var o=n.getExtent();this._dataInterval=[oN(i[0],r,o,!0),oN(i[1],r,o,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,r=[0,e.itemSize[1]],o=t?r:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,o,"inRange"),s=this._createBarVisual(n,n,r,"outOfRange");i.inRange.setStyle({fill:a.barColor,opacity:a.opacity}).setShape("points",a.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(o,a)},_createBarVisual:function(t,e,n,i){var r={forceState:i,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,r),a=[this.getControllerVisual(t[0],"symbolSize",r),this.getControllerVisual(t[1],"symbolSize",r)],s=this._createBarPoints(n,a);return{barColor:new TC(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var n=100,i=[],r=(t[1]-t[0])/n;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<n;o++){var a=t[0]+r*o;if(a>t[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/n})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new X_("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(i,r){if(this._useHandle){var o=this._shapes,a=this.visualMapModel,s=o.handleThumbs,l=o.handleLabels;aN([0,1],function(t){var e=s[t];e.setStyle("fill",r.handlesColor[t]),e.position[1]=i[t];var n=Dr(o.handleLabelPoints[t],Ar(e,this.group));l[t].setStyle({x:n[0],y:n[1],text:a.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",o.barGroup)})},this)}},_showIndicator:function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=oN(t,o,s,!0),u=this._shapes,c=u.indicator;if(c){c.position[1]=l,c.attr("invisible",!1),c.setShape("points",ex(!!n,i,l,a[1]));var d={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",d);c.setStyle("fill",h);var f=Dr(u.indicatorLabelPoint,Ar(c,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(n||"")+r.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var i=this;this._shapes.barGroup.on("mousemove",function(t){if(i._hovering=!0,!i._dragging){var e=i.visualMapModel.itemSize,n=i._applyTransform([t.offsetX,t.offsetY],i._shapes.barGroup,!0,!0);n[1]=sN(lN(0,n[1]),e[1]),i._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=e[0])}}).on("mouseout",function(){i._hovering=!1,!i._dragging&&i._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var r=[0,i[1]],o=n.getExtent();t=sN(lN(r[0],t),r[1]);var a=nx(n,o,r),s=[t-a,t+a],l=oN(t,r,o,!0),u=[oN(s[0],r,o,!0),oN(s[1],r,o,!0)];s[0]<r[0]&&(u[0]=-Infinity),s[1]>r[1]&&(u[1]=Infinity),e&&(u[0]===-Infinity?this._showIndicator(l,u[1],"< ",a):u[1]===Infinity?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"\u2248 ",a));var c=this._hoverLinkDataIndices,d=[];(e||ix(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=Hn(c,d);this._dispatchHighDown("downplay",Qy(h[0])),this._dispatchHighDown("highlight",Qy(h[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=e.dataIndex){var i=this.ecModel.getSeriesByIndex(e.seriesIndex);if(n.isTargetSeries(i)){var r=i.getData(e.dataType),o=r.get(n.getDataDimension(r),e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Qy(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){var r=Ar(e,i?null:this.group);return OC[E(t)?"applyTransform":"transformDirection"](t,r,n)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});Os({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),Is(UP);var hN=eN.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){hN.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();fN[this._mode].call(this),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=L(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=A(this._pieceList,function(t){t=L(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function i(t,e,n){return t&&t[e]&&(b(t[e])?t[e].hasOwnProperty(n):t[e]===n)}var r=this.option,n={},t=fI.listVisualTypes(),o=this.isCategory();I(r.pieces,function(e){I(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),I(n,function(t,e){var n=0;I(this.stateList,function(t){n|=i(r,t,e)||i(r.target,t,e)},this),!n&&I(this.stateList,function(t){(r[t]||(r[t]={}))[e]=GP.get(e,"inRange"===t?"active":"inactive",o)})},this),eN.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,I(i,function(t){var e=this.getSelectedMapKey(t);r.hasOwnProperty(e)||(r[e]=!0)},this),"single"===n.selectedMode){var o=!1;I(i,function(t){var e=this.getSelectedMapKey(t);r[e]&&(o?r[e]=!1:o=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=L(t)},getValueState:function(t){var e=fI.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(i){var r=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){fI.findPieceIndex(t,this._pieceList)===i&&n.push(e)},this),r.push({seriesId:t.id,dataIndex:n})},this),r},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-Infinity&&n[1]===Infinity?0:(n[0]+n[1])/2}return e},getVisualMeta:function(r){function n(t,e){var n=s.getRepresentValue({interval:t});e||(e=s.getValueState(n));var i=r(n,e);t[0]===-Infinity?a[0]=i:t[1]===Infinity?a[1]=i:o.push({value:t[0],color:i},{value:t[1],color:i})}if(!this.isCategory()){var o=[],a=[],s=this,t=this._pieceList.slice();if(t.length){var e=t[0].interval[0];e!==-Infinity&&t.unshift({interval:[-Infinity,e]}),(e=t[t.length-1].interval[1])!==Infinity&&t.push({interval:[e,Infinity]})}else t.push({interval:[-Infinity,Infinity]});var i=-Infinity;return I(t,function(t){var e=t.interval;e&&(e[0]>i&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:o,outerColors:a}}}}),fN={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n);var a=0;t.minOpen&&e.push({index:a++,interval:[-Infinity,i[0]],close:[0,0]});for(var s=i[0],l=a+r;a<l;s+=o){var u=a===r-1?i[1]:s+o;e.push({index:a++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:a++,interval:[i[1],Infinity],close:[0,0]}),to(e),I(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;I(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),ox(t,this._pieceList)},pieces:function(){var t=this.option,h=this._pieceList;I(t.pieces,function(t,e){b(t)||(t={value:t});var n={text:"",index:e};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var r=n.interval=[],o=n.close=[0,0],a=[1,0,1],s=[-Infinity,Infinity],l=[],u=0;u<2;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;d<3&&null==r[u];d++)r[u]=t[c[d]],o[u]=a[d],l[u]=2===d;null==r[u]&&(r[u]=s[u])}l[0]&&r[1]===Infinity&&(o[0]=0),l[1]&&r[0]===-Infinity&&(o[1]=0),Hb&&r[0]>r[1]&&console.warn("Piece "+e+"is illegal: "+r+" lower bound should not greater then uppper bound."),r[0]===r[1]&&o[0]&&o[1]&&(n.value=r[0])}n.visual=fI.retrieveVisuals(t),h.push(n)},this),ox(t,h),to(h),I(h,function(t){var e=t.close,n=[["<","\u2264"][e[1]],[">","\u2265"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};rN.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var e=t.piece,n=new X_;n.onclick=v(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);var i=a.getRepresentValue(e);if(this._createItemSymbol(n,i,[0,0,d[0],d[1]]),h){var r=this.visualMapModel.getValueState(i);n.add(new lC({style:{x:"right"===c?-s:d[0]+s,y:d[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:c,textFont:l,textFill:u,opacity:"outOfRange"===r?.5:1}}))}o.add(n)}var o=this.group;o.removeAll();var a=this.visualMapModel,s=a.get("textGap"),e=a.textStyleModel,l=e.getFont(),u=e.getTextColor(),c=this._getItemAlign(),d=a.itemSize,n=this._getViewData(),i=n.endsText,h=N(a.get("showLabel",!0),!i);i&&this._renderEndsText(o,i[0],d,h,c),I(n.viewPieceList,t,this),i&&this._renderEndsText(o,i[1],d,h,c),nT(a.get("orient"),o,a.get("itemGap")),this.renderBackground(o),this.positionGroup(o)},_enableHoverLink:function(t,n){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:Qy(e.findTargetDataIndices(n))})}t.on("mouseover",v(e,this,"highlight")).on("mouseout",v(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Ky(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,n,i,r){if(e){var o=new X_,a=this.visualMapModel.textStyleModel;o.add(new lC({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?r:"center",text:e,textFont:a.getFont(),textFill:a.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=A(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},_createItemSymbol:function(t,e,n){t.add(Ql(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,i=L(n.selected),r=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[r]=!0,I(i,function(t,e){i[e]=e===r})):i[r]=!i[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}});Is(UP);var pN=no,gN=ro,mN=js({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){if(Hb&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(Wb.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,i,e,r){var o=this.constructor,a=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[a];e&&e.data?(n?n.mergeOption(e,i,!0):(r&&ax(e),I(e.data,function(t){t instanceof Array?(ax(t[0]),ax(t[1])):ax(t)}),O(n=new o(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),t[a]=n):t[a]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=E(n)?A(n,pN).join(", "):pN(n),r=e.getName(t),o=gN(this.name);return(null!=n||r)&&(o+="<br />"),r&&(o+=gN(r),null!=n&&(o+=" : ")),null!=n&&(o+=gN(i)),o},getData:function(){return this._data},setData:function(t){this._data=t}});r(mN,BT),mN.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var vN=x,yN=y,xN={min:yN(ux,"min"),max:yN(ux,"max"),average:yN(ux,"average")},bN=Hs({type:"marker",init:function(){this.markerGroupMap=F()},render:function(t,n,i){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var r=this.type+"Model";n.eachSeries(function(t){var e=t[r];e&&this.renderSeries(t,e,n,i)},this),e.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});bN.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(mx(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,i,e,n){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new Mu),u=vx(r,t,i);i.setData(u),mx(i.getData(),t,n),u.each(function(t){var e=u.getItemModel(t),n=e.getShallow("symbolSize");"function"==typeof n&&(n=n(i.getRawValue(t),i.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:e.get("itemStyle.color")||a.getVisual("color"),symbol:e.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})}),l.__keep=!0,l.group.silent=i.get("silent")||t.get("silent")}}),Is(function(t){t.markPoint=t.markPoint||{}}),mN.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var _N=function(t,e,n,i){var r=t.getData(),o=i.type;if(!E(i)&&("min"===o||"max"===o||"average"===o||"median"===o||null!=i.xAxis||null!=i.yAxis)){var a,s;if(null!=i.yAxis||null!=i.xAxis)a=null!=i.yAxis?"y":"x",e.getAxis(a),s=N(i.yAxis,i.xAxis);else{var l=dx(i,r,e,t);a=l.valueDataDim,l.valueAxis,s=gx(r,a,o)}var u="x"===a?0:1,c=1-u,d=L(i),h={};d.type=null,d.coord=[],h.coord=[],d.coord[c]=-Infinity,h.coord[c]=Infinity;var f=n.get("precision");0<=f&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),d.coord[u]=h.coord[u]=s,i=[d,h,{type:o,valueIndex:i.valueIndex,value:s}]}return(i=[cx(t,i[0]),cx(t,i[1]),O({},i[2])])[2].type=i[2].type||"",g(i[2],i[0]),g(i[2],i[1]),i};bN.extend({type:"markLine",updateTransform:function(t,e,o){e.eachSeries(function(e){var t=e.markLineModel;if(t){var n=t.getData(),i=t.__from,r=t.__to;i.each(function(t){_x(i,t,!0,e,o),_x(r,t,!1,e,o)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),r.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},renderSeries:function(r,e,t,o){function n(t,e,n){var i=t.getItemModel(e);_x(t,e,n,r,o),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||g[n?0:1],symbol:i.get("symbol",!0)||p[n?0:1],color:i.get("itemStyle.color")||s.getVisual("color")})}var i=r.coordinateSystem,a=r.id,s=r.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new tf);this.group.add(u.group);var c=Sx(i,r,e),d=c.from,h=c.to,f=c.line;e.__from=d,e.__to=h,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");E(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),c.from.each(function(t){n(d,t,!0),n(h,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||d.getItemVisual(t,"color")}),f.setItemLayout(t,[d.getItemLayout(t),h.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:d.getItemVisual(t,"symbolSize"),fromSymbol:d.getItemVisual(t,"symbol"),toSymbolSize:h.getItemVisual(t,"symbolSize"),toSymbol:h.getItemVisual(t,"symbol")})}),u.updateData(f),c.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||r.get("silent")}}),Is(function(t){t.markLine=t.markLine||{}}),mN.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var wN=function(t,e,n,i){var r=cx(t,i[0]),o=cx(t,i[1]),a=N,s=r.coord,l=o.coord;s[0]=a(s[0],-Infinity),s[1]=a(s[1],-Infinity),l[0]=a(l[0],Infinity),l[1]=a(l[1],Infinity);var u=c([{},r,o]);return u.coord=[r.coord,o.coord],u.x0=r.x,u.y0=r.y,u.x1=o.x,u.y1=o.y,u},SN=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];bN.extend({type:"markArea",updateTransform:function(t,e,r){e.eachSeries(function(n){var t=n.markAreaModel;if(t){var i=t.getData();i.each(function(e){var t=A(SN,function(t){return Dx(i,e,t,n,r)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})}},this)},renderSeries:function(n,a,t,i){var e=n.coordinateSystem,r=n.id,o=n.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new X_});this.group.add(l.group),l.__keep=!0;var u=Mx(e,n,a);a.setData(u),u.each(function(e){u.setItemLayout(e,A(SN,function(t){return Dx(u,e,t,n,i)})),u.setItemVisual(e,{color:o.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new mC({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var n=l.__data.getItemGraphicEl(e);Cr(n,{shape:{points:u.getItemLayout(t)}},a,t),l.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=n.getModel("label"),r=n.getModel("emphasis.label"),o=u.getItemVisual(e,"color");t.useStyle(D(n.getModel("itemStyle").getItemStyle(),{fill:Bt(o,.4),stroke:o})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),fr(t.style,t.hoverStyle,i,r,{labelFetcher:a,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:o}),hr(t,{}),t.dataModel=a}),l.__data=u,l.group.silent=a.get("silent")||n.get("silent")}}),Is(function(t){t.markArea=t.markArea||{}});var CN=function(t){var e=t&&t.timeline;E(e)||(e=e?[e]:[]),I(e,function(t){t&&kx(t)})};oT.registerSubTypeDefaulter("timeline",function(){return"slider"}),Os({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),e.resetOption("timeline"),D({currentIndex:n.option.currentIndex},t)}),Os({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)});var TN=oT.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(){TN.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,r=this._names=[];if("category"===n){var o=[];I(e,function(t,e){var n,i=Nn(t);b(t)?(n=L(t)).value=e:n=e,o.push(n),_(i)||null!=i&&!isNaN(i)||(i=""),r.push(i+"")}),e=o}var i={category:"ordinal",time:"time"}[n]||"number";(this._data=new dD([{name:"value",type:i}],this)).initData(e,r)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});r(TN.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),BT);var AN=GT.extend({type:"timeline"}),DN=function(t,e,n,i){rM.call(this,t,e,n),this.type=i||"value",this.model=null};DN.prototype={constructor:DN,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},o(DN,rM);var MN=v,kN=I,IN=Math.PI;AN.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),a=this._axis=this._createAxis(i,e);e.formatTooltip=function(t){return ro(a.scale.getLabel(t))},kN(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,r,a,e)},this),this._renderAxisLabel(i,o,a,e),this._position(i,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n=t.get("label.position"),i=t.get("orient"),r=Lx(t,e);null==n||"auto"===n?n="horizontal"===i?r.y+r.height/2<e.getHeight()/2?"-":"+":r.x+r.width/2<e.getWidth()/2?"+":"-":isNaN(n)&&(n={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]);var o,a,s,l,u={horizontal:"center",vertical:0<=n||"+"===n?"left":"right"},c={horizontal:0<=n||"+"===n?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:IN/2},h="vertical"===i?r.height:r.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=t.get("label.rotate")||0;y=y*IN/180;var x=f.get("position",!0),b=p&&f.get("showPlayBtn",!0),_=p&&f.get("showPrevBtn",!0),w=p&&f.get("showNextBtn",!0),S=0,C=h;return"left"===x||"bottom"===x?(b&&(o=[0,0],S+=v),_&&(a=[S,0],S+=v)):(b&&(o=[C-g,0],C-=v),_&&(a=[0,0],S+=v)),w&&(s=[C-g,0],C-=v),l=[S,C],t.get("inverse")&&l.reverse(),{viewRect:r,mainLength:h,orient:i,rotation:d[i],labelRotation:y,labelPosOpt:n,labelAlign:t.get("label.align")||u[i],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||c[i],playPosition:o,prevBtnPosition:a,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(t){function e(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function i(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}var r=this._mainGroup,o=this._labelGroup,a=t.viewRect;if("vertical"===t.orient){var s=ft(),l=a.x,u=a.y+a.height;vt(s,s,[-l,-u]),yt(s,s,-IN/2),vt(s,s,[l,u]),(a=a.clone()).applyTransform(s)}var c=n(a),d=n(r.getBoundingRect()),h=n(o.getBoundingRect()),f=r.position,p=o.position;p[0]=f[0]=c[0][0];var g,m=t.labelPosOpt;isNaN(m)?(i(f,d,c,1,g="+"===m?0:1),i(p,h,c,1,1-g)):(i(f,d,c,1,g=0<=m?0:1),p[1]=f[1]+m);r.attr("position",f),o.attr("position",p),r.rotation=o.rotation=t.rotation,e(r),e(o)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),r=Ul(e,i);r.getTicks=function(){return n.mapArray(["value"],function(t){return t})};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var a=new DN("value",r,t.axisExtent,i);return a.model=e,a},_createGroup:function(t){var e=this["_"+t]=new X_;return this.group.add(e),e},_renderAxisLine:function(t,e,n,i){var r=n.getExtent();i.get("lineStyle.show")&&e.add(new xC({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:O({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,s,l,u){var c=u.getData(),e=l.scale.getTicks();kN(e,function(t){var e=l.dataToCoord(t),n=c.getItemModel(t),i=n.getModel("itemStyle"),r=n.getModel("emphasis.itemStyle"),o={position:[e,0],onclick:MN(this._changeTimeline,this,t)},a=Px(n,i,s,o);hr(a,r.getItemStyle()),n.get("tooltip")?(a.dataIndex=t,a.dataModel=u):a.dataIndex=a.dataModel=null},this)},_renderAxisLabel:function(s,l,u,t){if(u.getLabelModel().get("show")){var c=t.getData(),e=u.getViewLabels();kN(e,function(t){var e=t.tickValue,n=c.getItemModel(e),i=n.getModel("label"),r=n.getModel("emphasis.label"),o=u.dataToCoord(t.tickValue),a=new lC({position:[o,0],rotation:s.labelRotation-s.rotation,onclick:MN(this._changeTimeline,this,e),silent:!1});pr(a.style,i,{text:t.formattedLabel,textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(a),hr(a,pr({},r))},this)}},_renderControl:function(t,o,e,a){function n(t,e,n,i){if(t){var r=Ox(a,e,d,{position:t,origin:[s/2,0],rotation:i?-l:0,rectHover:!0,style:u,onclick:n});o.add(r),hr(r,c)}}var s=t.controlSize,l=t.rotation,u=a.getModel("controlStyle").getItemStyle(),c=a.getModel("emphasis.controlStyle").getItemStyle(),d=[0,-s/2,s,s],i=a.getPlayState(),r=a.get("inverse",!0);n(t.nextBtnPosition,"controlStyle.nextIcon",MN(this._changeTimeline,this,r?"-":"+")),n(t.prevBtnPosition,"controlStyle.prevIcon",MN(this._changeTimeline,this,r?"+":"-")),n(t.playPosition,"controlStyle."+(i?"stopIcon":"playIcon"),MN(this._handlePlayClick,this,!i),!0)},_renderCurrentPointer:function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=MN(s._handlePointerDrag,s),t.ondragend=MN(s._handlePointerDragend,s),Nx(t,o,n,i,!0)},onUpdate:function(t){Nx(t,o,n,i)}};this._currentPointer=Px(a,a,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var n=this._toAxisCoord(t)[0],i=Vr(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var r=this._findNearestTick(n),o=this.model;(e||r!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(r)},_doPlayStop:function(){function t(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(MN(t,this),this.model.get("playInterval")))},_toAxisCoord:function(t){return Dr(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(r){var o,t=this.model.getData(),a=Infinity,s=this._axis;return t.each(["value"],function(t,e){var n=s.dataToCoord(t),i=Math.abs(n-r);i<a&&(a=i,o=e)}),o},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Is(CN);var EN=js({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){EN.superApply(this,"optionUpdated",arguments),I(this.option.feature,function(t,e){var n=_y(e);n&&g(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});Hs({type:"toolbox",render:function(c,d,h,s){function t(t,e){var n,i=m[t],r=m[e],o=new Or(u[i],c,c.ecModel);if(i&&!r){if(Rx(i))n={model:o,onclick:o.option.onclick,featureName:i};else{var a=_y(i);if(!a)return;n=new a(o,d,h)}g[i]=n}else{if(!(n=g[r]))return;n.model=o,n.ecModel=d,n.api=h}i||!r?o.get("show")&&!n.unusable?(l(o,n,i),o.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},n.render&&n.render(o,d,h,s)):n.remove&&n.remove(d,h):n.dispose&&n.dispose(d,h)}function l(i,r,t){var o=i.getModel("iconStyle"),a=i.getModel("emphasis.iconStyle"),e=r.getIcons?r.getIcons():i.get("icon"),s=i.get("title")||{};if("string"==typeof e){var n=e,l=s;s={},(e={})[t]=n,s[t]=l}var u=i.iconPaths={};I(e,function(t,e){var n=Lr(t,{},{x:-p/2,y:-p/2,width:p,height:p});n.setStyle(o.getItemStyle()),n.hoverStyle=a.getItemStyle(),hr(n),c.get("showTitle")&&(n.__title=s[e],n.on("mouseover",function(){var t=a.getItemStyle()
|
|
;n.setStyle({text:s[e],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){n.setStyle({textFill:null})})),n.trigger(i.get("iconStatus."+e)||"normal"),f.add(n),n.on("click",v(r.onclick,r,d,h,e)),u[e]=n})}var f=this.group;if(f.removeAll(),c.get("show")){var p=+c.get("itemSize"),u=c.get("feature")||{},g=this._features||(this._features={}),m=[];I(u,function(t,e){m.push(e)}),new Ys(this._featureNames||[],m).add(t).update(t).remove(y(t,null)).execute(),this._featureNames=m,fv(f,c,h),f.add(pv(f.getBoundingRect(),c)),f.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var i=Se(e,Fe(n)),r=t.position[0]+f.position[0],o=!1;t.position[1]+f.position[1]+p+i.height>h.getHeight()&&(n.textPosition="top",o=!0);var a=o?-5-i.height:p+8;r+i.width/2>h.getWidth()?(n.textPosition=["100%",a],n.textAlign="right"):r-i.width/2<0&&(n.textPosition=[0,a],n.textAlign="left")}})}},updateView:function(t,e,n,i){I(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){I(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){I(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var LN=rA.toolbox.saveAsImage;$x.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:LN.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:LN.lang.slice()},$x.prototype.unusable=!Wb.canvasSupported,$x.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=n.get("type",!0)||"png";r.download=i+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(r.href=a,"function"!=typeof MouseEvent||Wb.browser.ie||Wb.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(a.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var c=new Blob([u]);window.navigator.msSaveOrOpenBlob(c,i+"."+o)}else{var d=n.get("lang"),h='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(d&&d[0]||"")+'" /></body>';window.open().document.write(h)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(f)}},by("saveAsImage",$x);var ON=rA.toolbox.magicType;Fx.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:L(ON.title),option:{},seriesIndex:{}};var PN=Fx.prototype;PN.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return I(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var NN={line:function(t,e,n,i){if("bar"===t)return g({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(t,e,n,i){if("line"===t)return g({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(t,e,n,i){if("line"===t||"bar"===t)return g({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0)},tiled:function(t,e,n,i){if("line"===t||"bar"===t)return g({id:e,stack:""},i.get("option.tiled")||{},!0)}},RN=[["line","bar"],["stack","tiled"]];PN.onclick=function(u,t,c){var d=this.model,e=d.get("seriesIndex."+c);if(NN[c]){var h={series:[]},n=function(t){var e=t.subType,n=t.id,i=NN[c](e,n,t,d);i&&(D(i,t.option),h.series.push(i));var r=t.coordinateSystem;if(r&&"cartesian2d"===r.type&&("line"===c||"bar"===c)){var o=r.getAxesByScale("ordinal")[0];if(o){var a=o.dim+"Axis",s=u.queryComponents({mainType:a,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;h[a]=h[a]||[];for(var l=0;l<=s;l++)h[a][s]=h[a][s]||{};h[a][s].boundaryGap="bar"===c}}};I(RN,function(t){0<=x(t,c)&&I(t,function(t){d.setIconStatus(t,"normal")})}),d.setIconStatus(c,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},n),t.dispatchAction({type:"changeMagicType",currentType:c,newOption:h})}},Os({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),by("magicType",Fx);var $N=rA.toolbox.dataView,FN=new Array(60).join("-"),zN="\t",jN=new RegExp("["+zN+"]+","g");Yx.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:L($N.title),lang:L($N.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Yx.prototype.onclick=function(t,n){function i(){e.removeChild(o),x._dom=null}var e=n.getDom(),r=this.model;this._dom&&e.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=r.get("lang")||[];a.innerHTML=s[0]||r.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=r.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var c=r.get("optionToContent"),d=r.get("contentToOption"),h=Bx(t);if("function"==typeof c){var f=c(n.getOption());"string"==typeof f?l.innerHTML=f:S(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=r.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=r.get("textColor"),u.style.borderColor=r.get("textareaBorderColor"),u.style.backgroundColor=r.get("textareaColor"),u.value=h.value;var p=h.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;vn(v,"click",i),vn(y,"click",function(){var t;try{t="function"==typeof d?d(l,n.getOption()):Gx(u.value,p)}catch(e){throw i(),new Error("Data view format error "+e)}t&&n.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),vn(u,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,n=this.selectionStart,i=this.selectionEnd;this.value=e.substring(0,n)+zN+e.substring(i),this.selectionStart=this.selectionEnd=n+1,Iw(t)}}),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=e.clientHeight-80+"px",e.appendChild(o),this._dom=o},Yx.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Yx.prototype.dispose=function(t,e){this.remove(t,e)},by("dataView",Yx),Os({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,i){var r=[];I(t.newOption.series,function(t){var e=i.getSeriesByName(t.name)[0];if(e){var n=e.get("data");r.push({name:t.name,data:Zx(t.data,n)})}else r.push(O({type:"scatter"},t))}),i.mergeOption(D({series:r},t.newOption))});var HN=I,BN="\0_ec_hist_store";CP.extend({type:"dataZoom.select"}),TP.extend({type:"dataZoom.select"});var VN=rA.toolbox.dataZoom,WN=I,UN="\0_ec_\0toolbox-dataZoom_";eb.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:L(VN.title)};var qN=eb.prototype;qN.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n,rb(t,e,this,i,n),ib(t,e)},qN.onclick=function(t,e,n){GN[n].call(this)},qN.remove=function(){this._brushController.unmount()},qN.dispose=function(){this._brushController.dispose()};var GN={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Kx(this.ecModel))}};qN._onBrush=function(t,e){function r(t,e,n){var i=e.getAxis(t),r=i.model,o=s(t,r,u),a=o.findRepresentativeAxisProxy(r).getMinMaxSpan();null==a.minValueSpan&&null==a.maxValueSpan||(n=uE(0,n.slice(),i.scale.getExtent(),0,a.minValueSpan,a.maxValueSpan)),o&&(l[o.id]={dataZoomId:o.id,startValue:n[0],endValue:n[1]})}function s(e,n,t){var i;return t.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(e,n.componentIndex)&&(i=t)}),i}if(e.isEnd&&t.length){var l={},u=this.ecModel;this._brushController.updateCovers([]),new ry(nb(this.model.option),u,{include:["grid"]}).matchOutputRanges(t,u,function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}}),Xx(u,l),this._dispatchZoomAction(l)}},qN._dispatchZoomAction=function(t){var e=[];WN(t,function(t){e.push(L(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},by("dataZoom",eb),Is(function(i){function t(i,t){if(t){var r=i+"Index",o=t[r];null==o||"all"==o||E(o)||(o=!1===o||"none"===o?[]:[o]),e(i,function(t,e){if(null==o||"all"==o||-1!==x(o,e)){var n={type:"select",$fromToolbox:!0,id:UN+i+e};n[r]=e,a.push(n)}})}}function e(t,e){var n=i[t];E(n)||(n=n?[n]:[]),WN(n,e)}if(i){var a=i.dataZoom||(i.dataZoom=[]);E(a)||(i.dataZoom=a=[a]);var n=i.toolbox;if(n&&(E(n)&&(n=n[0]),n&&n.feature)){var r=n.feature.dataZoom;t("xAxis",r),t("yAxis",r)}}});var YN=rA.toolbox.restore;ob.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:YN.title},ob.prototype.onclick=function(t,e){Qx(t),e.dispatchAction({type:"restore",from:this.uid})},by("restore",ob),Os({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var ZN,XN="urn:schemas-microsoft-com:vml",KN="undefined"==typeof window?null:window,QN=!1,JN=KN&&KN.document;if(JN&&!Wb.canvasSupported)try{!JN.namespaces.zrvml&&JN.namespaces.add("zrvml",XN),ZN=function(t){return JN.createElement("<zrvml:"+t+' class="zrvml">')}}catch(u$){ZN=function(t){return JN.createElement("<"+t+' xmlns="'+XN+'" class="zrvml">')}}var tR=FS.CMD,eR=Math.round,nR=Math.sqrt,iR=Math.abs,rR=Math.cos,oR=Math.sin,aR=Math.max;if(!Wb.canvasSupported){var sR=",",lR="progid:DXImageTransform.Microsoft",uR=21600,cR=uR/2,dR=1e5,hR=1e3,fR=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=uR+","+uR,t.coordorigin="0,0"},pR=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},gR=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},mR=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},vR=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},yR=function(t,e,n){return(parseFloat(t)||0)*dR+(parseFloat(e)||0)*hR+n},xR=function(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t},bR=function(t,e,n){var i=Pt(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=gR(i[0],i[1],i[2]),t.opacity=n*i[3])},_R=function(t){var e=Pt(t);return[gR(e[0],e[1],e[2]),e[3]]},wR=function(t,e,n){var i=e.fill;if(null!=i)if(i instanceof CC){var r,o=0,a=[0,0],s=0,l=1,u=n.getBoundingRect(),c=u.width,d=u.height;if("linear"===i.type){r="gradient";var h=n.transform,f=[i.x*c,i.y*d],p=[i.x2*c,i.y2*d];h&&(ot(f,f,h),ot(p,p,h));var g=p[0]-f[0],m=p[1]-f[1];(o=180*Math.atan2(g,m)/Math.PI)<0&&(o+=360),o<1e-6&&(o=0)}else{r="gradientradial";f=[i.x*c,i.y*d],h=n.transform;var v=n.scale,y=c,x=d;a=[(f[0]-u.x)/y,(f[1]-u.y)/x],h&&ot(f,f,h),y/=v[0]*uR,x/=v[1]*uR;var b=aR(y,x);s=0/b,l=2*i.r/b-s}var _=i.colorStops.slice();_.sort(function(t,e){return t.offset-e.offset});for(var w=_.length,S=[],C=[],T=0;T<w;T++){var A=_[T],D=_R(A.color);C.push(A.offset*l+s+" "+D[0]),0!==T&&T!==w-1||S.push(D)}if(2<=w){var M=S[0][0],k=S[1][0],I=S[0][1]*e.opacity,E=S[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=M,t.color2=k,t.colors=C.join(","),t.opacity=E,t.opacity2=I}"radial"===r&&(t.focusposition=a.join(","))}else bR(t,i,e.opacity)},SR=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof CC||bR(t,e.stroke,e.opacity)},CR=function(t,e,n,i){var r="fill"==e,o=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof CC&&vR(t,o),o||(o=ab(e)),r?wR(o,n,i):SR(o,n),mR(t,o)):(t[r?"filled":"stroked"]="false",vR(t,o))},TR=[[],[],[]],AR=function(t,e){var n,i,r,o,a,s,l=tR.M,u=tR.C,c=tR.L,d=tR.A,h=tR.Q,f=[],p=t.data,g=t.len();for(o=0;o<g;){switch(i="",n=0,r=p[o++]){case l:i=" m ",n=1,a=p[o++],s=p[o++],TR[0][0]=a,TR[0][1]=s;break;case c:i=" l ",n=1,a=p[o++],s=p[o++],TR[0][0]=a,TR[0][1]=s;break;case h:case u:i=" c ",n=3;var m,v,y=p[o++],x=p[o++],b=p[o++],_=p[o++];r===h?(b=((m=b)+2*y)/3,_=((v=_)+2*x)/3,y=(a+2*y)/3,x=(s+2*x)/3):(m=p[o++],v=p[o++]),TR[0][0]=y,TR[0][1]=x,TR[1][0]=b,TR[1][1]=_,a=TR[2][0]=m,s=TR[2][1]=v;break;case d:var w=0,S=0,C=1,T=1,A=0;e&&(w=e[4],S=e[5],C=nR(e[0]*e[0]+e[1]*e[1]),T=nR(e[2]*e[2]+e[3]*e[3]),A=Math.atan2(-e[1]/T,e[0]/C));var D=p[o++],M=p[o++],k=p[o++],I=p[o++],E=p[o++]+A,L=p[o++]+E+A;o++;var O=p[o++],P=D+rR(E)*k,N=M+oR(E)*I,R=(y=D+rR(L)*k,x=M+oR(L)*I,O?" wa ":" at ");Math.abs(P-y)<1e-4&&(.01<Math.abs(L-E)?O&&(P+=270/uR):Math.abs(N-M)<1e-4?O&&P<D||!O&&D<P?x-=270/uR:x+=270/uR:O&&N<M||!O&&M<N?y+=270/uR:y-=270/uR),f.push(R,eR(((D-k)*C+w)*uR-cR),sR,eR(((M-I)*T+S)*uR-cR),sR,eR(((D+k)*C+w)*uR-cR),sR,eR(((M+I)*T+S)*uR-cR),sR,eR((P*C+w)*uR-cR),sR,eR((N*T+S)*uR-cR),sR,eR((y*C+w)*uR-cR),sR,eR((x*T+S)*uR-cR)),a=y,s=x;break;case tR.R:var $=TR[0],F=TR[1];$[0]=p[o++],$[1]=p[o++],F[0]=$[0]+p[o++],F[1]=$[1]+p[o++],e&&(ot($,$,e),ot(F,F,e)),$[0]=eR($[0]*uR-cR),F[0]=eR(F[0]*uR-cR),$[1]=eR($[1]*uR-cR),F[1]=eR(F[1]*uR-cR),f.push(" m ",$[0],sR,$[1]," l ",F[0],sR,$[1]," l ",F[0],sR,F[1]," l ",$[0],sR,F[1]);break;case tR.Z:f.push(" x ")}if(0<n){f.push(i);for(var z=0;z<n;z++){var j=TR[z];e&&ot(j,j,e),f.push(eR(j[0]*uR-cR),sR,eR(j[1]*uR-cR),z<n-1?sR:"")}}}return f.join("")};Pi.prototype.brushVML=function(t){var e=this.style,n=this._vmlEl;n||(n=ab("shape"),fR(n),this._vmlEl=n),CR(n,"fill",e,this),CR(n,"stroke",e,this);var i=this.transform,r=null!=i,o=n.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(r&&!e.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];a*=nR(iR(s))}o.weight=a+"px"}var l=this.path||(this.path=new FS);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=AR(l,this.transform),n.style.zIndex=yR(this.zlevel,this.z,this.z2),mR(t,n),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Pi.prototype.onRemove=function(t){vR(t,this._vmlEl),this.removeRectText(t)},Pi.prototype.onAdd=function(t){mR(t,this._vmlEl),this.appendRectText(t)};var DR=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};an.prototype.brushVML=function(t){var e,n,i=this.style,r=i.image;if(DR(r)){var o=r.src;if(o===this._imageSrc)e=this._imageWidth,n=this._imageHeight;else{var a=r.runtimeStyle,s=a.width,l=a.height;a.width="auto",a.height="auto",e=r.width,n=r.height,a.width=s,a.height=l,this._imageSrc=o,this._imageWidth=e,this._imageHeight=n}r=o}else r===this._imageSrc&&(e=this._imageWidth,n=this._imageHeight);if(r){var u=i.x||0,c=i.y||0,d=i.width,h=i.height,f=i.sWidth,p=i.sHeight,g=i.sx||0,m=i.sy||0,v=f&&p,y=this._vmlEl;y||(y=JN.createElement("div"),fR(y),this._vmlEl=y);var x,b=y.style,_=!1,w=1,S=1;if(this.transform&&(x=this.transform,w=nR(x[0]*x[0]+x[1]*x[1]),S=nR(x[2]*x[2]+x[3]*x[3]),_=x[1]||x[2]),_){var C=[u,c],T=[u+d,c],A=[u,c+h],D=[u+d,c+h];ot(C,C,x),ot(T,T,x),ot(A,A,x),ot(D,D,x);var M=aR(C[0],T[0],A[0],D[0]),k=aR(C[1],T[1],A[1],D[1]),I=[];I.push("M11=",x[0]/w,sR,"M12=",x[2]/S,sR,"M21=",x[1]/w,sR,"M22=",x[3]/S,sR,"Dx=",eR(u*w+x[4]),sR,"Dy=",eR(c*S+x[5])),b.padding="0 "+eR(M)+"px "+eR(k)+"px 0",b.filter=lR+".Matrix("+I.join("")+", SizingMethod=clip)"}else x&&(u=u*w+x[4],c=c*S+x[5]),b.filter="",b.left=eR(u)+"px",b.top=eR(c)+"px";var E=this._imageEl,L=this._cropEl;E||(E=JN.createElement("div"),this._imageEl=E);var O=E.style;if(v){if(e&&n)O.width=eR(w*e*d/f)+"px",O.height=eR(S*n*h/p)+"px";else{var P=new Image,N=this;P.onload=function(){P.onload=null,e=P.width,n=P.height,O.width=eR(w*e*d/f)+"px",O.height=eR(S*n*h/p)+"px",N._imageWidth=e,N._imageHeight=n,N._imageSrc=r},P.src=r}L||((L=JN.createElement("div")).style.overflow="hidden",this._cropEl=L);var R=L.style;R.width=eR((d+g*d/f)*w),R.height=eR((h+m*h/p)*S),R.filter=lR+".Matrix(Dx="+-g*d/f*w+",Dy="+-m*h/p*S+")",L.parentNode||y.appendChild(L),E.parentNode!=L&&L.appendChild(E)}else O.width=eR(w*d)+"px",O.height=eR(S*h)+"px",y.appendChild(E),L&&L.parentNode&&(y.removeChild(L),this._cropEl=null);var $="",F=i.opacity;F<1&&($+=".Alpha(opacity="+eR(100*F)+") "),$+=lR+".AlphaImageLoader(src="+r+", SizingMethod=scale)",O.filter=$,y.style.zIndex=yR(this.zlevel,this.z,this.z2),mR(t,y),null!=i.text&&this.drawRectText(t,this.getBoundingRect())}},an.prototype.onRemove=function(t){vR(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},an.prototype.onAdd=function(t){mR(t,this._vmlEl),this.appendRectText(t)};var MR,kR="normal",IR={},ER=0,LR=100,OR=document.createElement("div"),PR=function(t){var e=IR[t];if(!e){LR<ER&&(ER=0,IR={});var n,i=OR.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(u$){}e={style:i.fontStyle||kR,variant:i.fontVariant||kR,weight:i.fontWeight||kR,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},IR[t]=e,ER++}return e};_e("measureText",function(t,e){var n=JN;MR||((MR=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",JN.body.appendChild(MR));try{MR.style.font=e}catch(i){}return MR.innerHTML="",MR.appendChild(n.createTextNode(t)),{width:MR.offsetWidth}});for(var NR=new ie,RR=function(t,e,n,i){var r=this.style;this.__dirty&&je(r,!0);var o=r.text;if(null!=o&&(o+=""),o){if(r.rich){var a=Re(o,r);o=[];for(var s=0;s<a.lines.length;s++){for(var l=a.lines[s].tokens,u=[],c=0;c<l.length;c++)u.push(l[c].text);o.push(u.join(""))}o=o.join("\n")}var d,h,f=r.textAlign,p=r.textVerticalAlign,g=PR(r.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';n=n||Se(o,m,f,p);var v=this.transform;if(v&&!i&&(NR.copy(e),NR.applyTransform(v),e=NR),i)d=e.x,h=e.y;else{var y=r.textPosition,x=r.textDistance;if(y instanceof Array)d=e.x+xR(y[0],e.width),h=e.y+xR(y[1],e.height),f=f||"left";else{var b=Me(y,e,x);d=b.x,h=b.y,f=f||b.textAlign,p=p||b.textVerticalAlign}}d=Ae(d,n.width,f),h=De(h,n.height,p),h+=n.height/2;var _,w,S,C=ab,T=this._textVmlEl;T?w=(_=(S=T.firstChild).nextSibling).nextSibling:(T=C("line"),_=C("path"),w=C("textpath"),S=C("skew"),w.style["v-text-align"]="left",fR(T),_.textpathok=!0,w.on=!0,T.from="0 0",T.to="1000 0.05",mR(T,S),mR(T,_),mR(T,w),this._textVmlEl=T);var A=[d,h],D=T.style;v&&i?(ot(A,A,v),S.on=!0,S.matrix=v[0].toFixed(3)+sR+v[2].toFixed(3)+sR+v[1].toFixed(3)+sR+v[3].toFixed(3)+",0,0",S.offset=(eR(A[0])||0)+","+(eR(A[1])||0),S.origin="0 0",D.left="0px",D.top="0px"):(S.on=!1,D.left=eR(d)+"px",D.top=eR(h)+"px"),w.string=pR(o);try{w.style.font=m}catch(u$){}CR(T,"fill",{fill:r.textFill,opacity:r.opacity},this),CR(T,"stroke",{stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash},this),T.style.zIndex=yR(this.zlevel,this.z,this.z2),mR(t,T)}},$R=function(t){vR(t,this._textVmlEl),this._textVmlEl=null},FR=function(t){mR(t,this._textVmlEl)},zR=[bw,on,an,Pi,lC],jR=0;jR<zR.length;jR++){var HR=zR[jR].prototype;HR.drawRectText=RR,HR.removeRectText=$R,HR.appendRectText=FR}lC.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},lC.prototype.onRemove=function(t){this.removeRectText(t)},lC.prototype.onAdd=function(t){this.appendRectText(t)}}ub.prototype={constructor:ub,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,n=0;n<t.length;n++){var i=t[n];i.invisible||i.ignore?(i.__alreadyNotVisible||i.onRemove(e),i.__alreadyNotVisible=!0):(i.__alreadyNotVisible&&i.onAdd(e),i.__alreadyNotVisible=!1,i.__dirty&&(i.beforeBrush&&i.beforeBrush(),(i.brushVML||i.brush).call(i,e),i.afterBrush&&i.afterBrush())),i.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t,this._height=e;var n=this._vmlViewport.style;n.width=t+"px",n.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||lb(e.width))-lb(e.paddingLeft)-lb(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||lb(e.height))-lb(e.paddingTop)-lb(e.paddingBottom)|0}},I(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){ub.prototype[t]=cb(t)}),En("vml",ub);var BR="http://www.w3.org/2000/svg",VR=FS.CMD,WR=Array.prototype.join,UR="none",qR=Math.round,GR=Math.sin,YR=Math.cos,ZR=Math.PI,XR=2*Math.PI,KR=180/ZR,QR=1e-4,JR={brush:function(t){var e=t.style,n=t.__svgEl;n||(n=db("path"),t.__svgEl=n),t.path||t.createPathProxy();var i=t.path;if(t.__dirtyPath){i.beginPath(),t.buildPath(i,t.shape),t.__dirtyPath=!1;var r=bb(i);r.indexOf("NaN")<0&&vb(n,"d",r)}xb(n,e),mb(n,t.transform),null!=e.text&&i$(t,t.getBoundingRect())}},t$={brush:function(t){var e=t.style,n=e.image;n instanceof HTMLImageElement&&(n=n.src);if(n){var i=e.x||0,r=e.y||0,o=e.width,a=e.height,s=t.__svgEl;s||(s=db("image"),t.__svgEl=s),n!==t.__imageSrc&&(yb(s,"href",n),t.__imageSrc=n),vb(s,"width",o),vb(s,"height",a),vb(s,"x",i),vb(s,"y",r),mb(s,t.transform),null!=e.text&&i$(t,t.getBoundingRect())}}},e$={},n$=new ie,i$=function(t,e,n){var i=t.style;t.__dirty&&je(i,!0);var r=i.text;if(null!=r){r+="";var o,a,s=t.__textSvgEl;s||(s=db("text"),t.__textSvgEl=s);var l=i.textPosition,u=i.textDistance,c=i.textAlign||"left";"number"==typeof i.fontSize&&(i.fontSize+="px");var d=i.font||[i.fontStyle||"",i.fontWeight||"",i.fontSize||"",i.fontFamily||""].join(" ")||gw,h=_b(i.textVerticalAlign),f=(n=Se(r,d,c,h)).lineHeight;if(l instanceof Array)o=e.x+l[0],a=e.y+l[1];else{var p=Me(l,e,u);o=p.x,a=p.y,h=_b(p.textVerticalAlign),c=p.textAlign}vb(s,"alignment-baseline",h),d&&(s.style.font=d);var g=i.textPadding;if(vb(s,"x",o),vb(s,"y",a),xb(s,i,!0),t instanceof lC||t.style.transformText)mb(s,t.transform);else{if(t.transform)n$.copy(e),n$.applyTransform(t.transform),e=n$;else{var m=t.transformCoordToGlobal(e.x,e.y);e.x=m[0],e.y=m[1]}var v=i.textOrigin;"center"===v?(o=n.width/2+o,a=n.height/2+a):v&&(o=v[0]+o,a=v[1]+a);var y=-i.textRotation||0,x=ft();yt(x,t.transform,y),mb(s,x)}var b=r.split("\n"),_=b.length,w=c;"left"===w?(w="start",g&&(o+=g[3])):"right"===w?(w="end",g&&(o-=g[1])):"center"===w&&(w="middle",g&&(o+=(g[3]-g[1])/2));var S=0;if("baseline"===h?(S=-n.height+f,g&&(S-=g[2])):"middle"===h?(S=(-n.height+f)/2,g&&(a+=(g[0]-g[2])/2)):g&&(S+=g[0]),t.__text!==r||t.__textFont!==d){var C=t.__tspanList||[];t.__tspanList=C;for(var T=0;T<_;T++){(D=C[T])?D.innerHTML="":(D=C[T]=db("tspan"),s.appendChild(D),vb(D,"alignment-baseline",h),vb(D,"text-anchor",w)),vb(D,"x",o),vb(D,"y",a+T*f+S),D.appendChild(document.createTextNode(b[T]))}for(;T<C.length;T++)s.removeChild(C[T]);C.length=_,t.__text=r,t.__textFont=d}else if(t.__tspanList.length){var A=t.__tspanList.length;for(T=0;T<A;++T){var D;(D=t.__tspanList[T])&&(vb(D,"x",o),vb(D,"y",a+T*f+S))}}}};e$.drawRectText=i$,e$.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],i$(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},wb.prototype={diff:function(s,l,t){function e(){for(var t=-1*h;t<=h;t+=2){var e,n=f[t-1],i=f[t+1],r=(i?i.newPos:0)-t;n&&(f[t-1]=undefined);var o=n&&n.newPos+1<c,a=i&&0<=r&&r<d;if(o||a){if(!o||a&&n.newPos<i.newPos?(e=Cb(i),u.pushComponent(e.components,undefined,!0)):((e=n).newPos++,u.pushComponent(e.components,!0,undefined)),r=u.extractCommon(e,l,s,t),e.newPos+1>=c&&d<=r+1)return Sb(u,e.components,l,s);f[t]=e}else f[t]=undefined}h++}t||(t=function(t,e){return t===e}),this.equals=t;var u=this;s=s.slice();var c=(l=l.slice()).length,d=s.length,h=1,n=c+d,f=[{newPos:-1,components:[]}],i=this.extractCommon(f[0],l,s,0);if(f[0].newPos+1>=c&&d<=i+1){for(var r=[],o=0;o<l.length;o++)r.push(o);return[{indices:r,count:l.length}]}for(;h<=n;){var a=e();if(a)return a}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var r=e.length,o=n.length,a=t.newPos,s=a-i,l=0;a+1<r&&s+1<o&&this.equals(e[a+1],n[s+1]);)a++,s++,l++;return l&&t.components.push({count:l}),t.newPos=a,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var r$=new wb,o$=function(t,e,n){return r$.diff(t,e,n)},a$="0",s$="1";Tb.prototype.createElement=db,Tb.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},Tb.prototype.update=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},Tb.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Tb.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Tb.prototype.getDoms=function(){var n=this.getDefs(!1);if(!n)return[];var i=[];return I(this._tagNames,function(t){var e=n.getElementsByTagName(t);i=i.concat([].slice.call(e))}),i},Tb.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;I(t,function(t){t[e._markLabel]=a$})},Tb.prototype.markUsed=function(t){t&&(t[this._markLabel]=s$)},Tb.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;I(t,function(t){t[n._markLabel]!==s$&&e.removeChild(t)})}},Tb.prototype.getSvgProxy=function(t){return t instanceof Pi?JR:t instanceof an?t$:t instanceof lC?e$:JR},Tb.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Tb.prototype.getSvgElement=function(t){return t.__svgEl},o(Ab,Tb),Ab.prototype.addWithoutUpdate=function(o,a){if(a&&a.style){var s=this;I(["fill","stroke"],function(t){if(a.style[t]&&("linear"===a.style[t].type||"radial"===a.style[t].type)){var e,n=a.style[t],i=s.getDefs(!0);n._dom?(e=n._dom,i.contains(n._dom)||s.addDom(e)):e=s.add(n),s.markUsed(a);var r=e.getAttribute("id");o.setAttribute(t,"url(#"+r+")")}})}},Ab.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return j_("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Ab.prototype.update=function(n){var i=this;Tb.prototype.update.call(this,n,function(){var t=n.type,e=n._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?i.updateDom(n,n._dom):(i.removeDom(n),i.add(n))})},Ab.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void j_("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,r=n.length;i<r;++i){var o=this.createElement("stop");o.setAttribute("offset",100*n[i].offset+"%"),o.setAttribute("stop-color",n[i].color),e.appendChild(o)}t._dom=e},Ab.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&Tb.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&Tb.prototype.markUsed.call(this,e._dom)}},o(Db,Tb),Db.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},Db.prototype.updateDom=function(t,e,n){if(e&&0<e.length){var i,r,o=this.getDefs(!0),a=e[0],s=n?"_textDom":"_dom";a[s]?(r=a[s].getAttribute("id"),i=a[s],o.contains(i)||o.appendChild(i)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",r),o.appendChild(i),a[s]=i);var l=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!n){var u=Array.prototype.slice.call(a.transform);mt(a.transform,a.parent.invTransform,a.transform),l.brush(a),a.transform=u}else l.brush(a);var c=this.getSvgElement(a);i.innerHTML="",i.appendChild(c.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),1<e.length&&this.updateDom(i,e.slice(1),n)}else t&&t.setAttribute("clip-path","none")},Db.prototype.markUsed=function(t){var e=this;t.__clipPaths&&0<t.__clipPaths.length&&I(t.__clipPaths,function(t){t._dom&&Tb.prototype.markUsed.call(e,t._dom),t._textDom&&Tb.prototype.markUsed.call(e,t._textDom)})},o(Mb,Tb),Mb.prototype.addWithoutUpdate=function(t,e){if(e&&kb(e.style)){var n,i=e.style;if(i._shadowDom)n=i._shadowDom,this.getDefs(!0).contains(i._shadowDom)||this.addDom(n);else n=this.add(e);this.markUsed(e);var r=n.getAttribute("id");t.style.filter="url(#"+r+")"}},Mb.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},Mb.prototype.update=function(t,e){var n=e.style;if(kb(n)){var i=this;Tb.prototype.update.call(this,e,function(t){i.updateDom(e,t._shadowDom)})}else this.remove(t,n)},Mb.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},Mb.prototype.updateDom=function(t,e){var n=e.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,r,o,a,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,r=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);i=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",r/u),n.setAttribute("flood-color",a);var c=o/2/l+" "+o/2/u;n.setAttribute("stdDeviation",c),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(n),s._shadowDom=e},Mb.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&Tb.prototype.markUsed.call(this,e._shadowDom)};var l$=function(t,e,n,i){this.root=t,this.storage=e,this._opts=n=O({},n||{});var r=db("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new Ab(i,r),this.clipPathManager=new Db(i,r),this.shadowManager=new Mb(i,r)
|
|
;var o=document.createElement("div");o.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=o,t.appendChild(o),o.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]};l$.prototype={constructor:l$,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,n=this._svgRoot,i=this._visibleList,r=t.length,o=[];for(e=0;e<r;e++){var a=Eb(f=t[e]),s=$b(f)||Rb(f);f.invisible||(f.__dirty&&(a&&a.brush(f),this.clipPathManager.update(f),f.style&&(this.gradientManager.update(f.style.fill),this.gradientManager.update(f.style.stroke),this.shadowManager.update(s,f)),f.__dirty=!1),o.push(f))}var l,u=o$(i,o);for(e=0;e<u.length;e++){if((h=u[e]).removed)for(var c=0;c<h.count;c++){s=$b(f=i[h.indices[c]]);var d=Rb(f);Nb(n,s),Nb(n,d)}}for(e=0;e<u.length;e++){var h;if((h=u[e]).added)for(c=0;c<h.count;c++){s=$b(f=o[h.indices[c]]),d=Rb(f);l?Ob(n,s,l):Pb(n,s),s?Ob(n,d,s):l?Ob(n,d,l):Pb(n,d),Ob(n,d,s),l=d||s||l,this.gradientManager.addWithoutUpdate(s,f),this.shadowManager.addWithoutUpdate(l,f),this.clipPathManager.markUsed(f)}else if(!h.removed)for(c=0;c<h.count;c++){var f;l=s=Rb(f=o[h.indices[c]])||$b(f)||l,this.gradientManager.markUsed(f),this.gradientManager.addWithoutUpdate(s,f),this.shadowManager.markUsed(f),this.shadowManager.addWithoutUpdate(s,f),this.clipPathManager.markUsed(f)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(t){var i,e=this._svgRoot;return 0!==(i=this._svgRoot.getElementsByTagName("defs")).length?i[0]:t?((i=e.insertBefore(db("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null},resize:function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||Ib(s[n])||Ib(a.style[n]))-(Ib(s[r])||0)-(Ib(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},I(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){l$.prototype[t]=Fb(t)}),En("svg",l$),t.version=TA,t.dependencies=AA,t.PRIORITY=OA,t.init=Ss,t.connect=Cs,t.disConnect=Ts,t.disconnect=tD,t.dispose=As,t.getInstanceByDom=Ds,t.getInstanceById=Ms,t.registerTheme=ks,t.registerPreprocessor=Is,t.registerProcessor=Es,t.registerPostUpdate=Ls,t.registerAction=Os,t.registerCoordinateSystem=Ps,t.getCoordinateSystemDimensions=Ns,t.registerLayout=Rs,t.registerVisual=$s,t.registerLoading=zs,t.extendComponentModel=js,t.extendComponentView=Hs,t.extendSeriesModel=Bs,t.extendChartView=Vs,t.setCanvasCreator=Ws,t.registerMap=Us,t.getMap=qs,t.dataTool=eD,t.zrender=qw,t.graphic=OC,t.number=WC,t.format=QC,t.throttle=$a,t.helper=JD,t.matrix=m_,t.vector=u_,t.color=O_,t.parseGeoJSON=eM,t.parseGeoJson=oM,t.util=aM,t.List=dD,t.Model=Or,t.Axis=rM,t.env=Wb}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.CodeMirror=e()}(this,function(){"use strict";function s(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function p(t){for(var e=t.childNodes.length;0<e;--e)t.removeChild(t.firstChild);return t}function o(t,e){return p(t).appendChild(e)}function _(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)r.appendChild(e[o]);return r}function d(t,e,n,i){var r=_(t,e,n,i);return r.setAttribute("role","presentation"),r}function m(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function h(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function i(t,e){var n=t.className;s(e).test(n)||(t.className+=(n?" ":"")+e)}function l(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!s(n[i]).test(e)&&(e+=" "+n[i]);return e}function u(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function f(t,e,n){for(var i in e||(e={}),t)!t.hasOwnProperty(i)||!1===n&&e.hasOwnProperty(i)||(e[i]=t[i]);return e}function C(t,e,n,i,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=i||0,a=r||0;;){var s=t.indexOf("\t",o);if(s<0||e<=s)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}function g(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}function T(t,e,n){for(var i=0,r=0;;){var o=t.indexOf("\t",i);-1==o&&(o=t.length);var a=o-i;if(o==t.length||e<=r+a)return i+Math.min(a,e-r);if(r+=o-i,i=o+1,e<=(r+=n-r%n))return i}}function w(t){for(;Qa.length<=t;)Qa.push(V(Qa)+" ");return Qa[t]}function V(t){return t[t.length-1]}function v(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i],i);return n}function a(t,e,n){for(var i=0,r=n(e);i<t.length&&n(t[i])<=r;)i++;t.splice(i,0,e)}function r(){}function n(t,e){var n;return Object.create?n=Object.create(t):(r.prototype=t,n=new r),e&&f(e,n),n}function c(t){return/\w/.test(t)||"\x80"<t&&(t.toUpperCase()!=t.toLowerCase()||Ja.test(t))}function y(t,e){return e?!!(-1<e.source.indexOf("\\w")&&c(t))||e.test(t):c(t)}function x(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function S(t){return 768<=t.charCodeAt(0)&&ts.test(t)}function A(t,e,n){for(;(n<0?0<e:e<t.length)&&S(t.charAt(e));)e+=n;return e}function D(t,e,n){for(var i=n<e?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function I(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,o=0;o<t.length;++o){var a=t[o];(a.from<n&&a.to>e||e==n&&a.to==e)&&(i(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}function b(t,e,n){var i;es=null;for(var r=0;r<t.length;++r){var o=t[r];if(o.from<e&&o.to>e)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:es=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:es=r)}return null!=i?i:es}function E(t,e){var n=t.order;return null==n&&(n=t.order=ns(t.text,e)),n}function M(t,e){return t._handlers&&t._handlers[e]||is}function k(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=g(r,n);-1<o&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function L(t,e){var n=M(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function O(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),L(t,n||e.type,t,e),$(e)||e.codemirrorIgnore}function P(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),i=0;i<e.length;++i)-1==g(n,e[i])&&n.push(e[i])}function N(t,e){return 0<M(t,e).length}function t(t){t.prototype.on=function(t,e){rs(this,t,e)},t.prototype.off=function(t,e){k(this,t,e)}}function R(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function e(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function $(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function F(t){R(t),e(t)}function z(t){return t.target||t.srcElement}function j(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),Pa&&t.ctrlKey&&1==e&&(e=3),e}function H(t){if(null==Wa){var e=_("span","\u200b");o(t,_("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Wa=e.offsetWidth<=1&&2<e.offsetHeight&&!(wa&&Sa<8))}var n=Wa?_("span","\u200b"):_("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function B(t){if(null!=Ua)return Ua;var e=o(t,document.createTextNode("A\u062eA")),n=Fa(e,0,1).getBoundingClientRect(),i=Fa(e,1,2).getBoundingClientRect();return p(t),!(!n||n.left==n.right)&&(Ua=i.right-n.right<3)}function W(t){if(null!=us)return us;var e=o(t,_("span","x")),n=e.getBoundingClientRect(),i=Fa(e,0,1).getBoundingClientRect();return us=1<Math.abs(n.left-i.left)}function U(t,e){2<arguments.length&&(e.dependencies=Array.prototype.slice.call(arguments,2)),cs[t]=e}function q(t,e){ds[t]=e}function G(t){if("string"==typeof t&&ds.hasOwnProperty(t))t=ds[t];else if(t&&"string"==typeof t.name&&ds.hasOwnProperty(t.name)){var e=ds[t.name];"string"==typeof e&&(e={name:e}),(t=n(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return G("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return G("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Y(t,e){e=G(e);var n=cs[e.name];if(!n)return Y(t,"text/plain");var i=n(t,e);if(hs.hasOwnProperty(e.name)){var r=hs[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)i[a]=e.modeProps[a];return i}function Z(t,e){f(e,hs.hasOwnProperty(t)?hs[t]:hs[t]={})}function X(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function K(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Q(t,e,n){return!t.startState||t.startState(e,n)}function J(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e<o){n=r;break}e-=o}return n.lines[e]}function tt(t,n,i){var r=[],o=n.line;return t.iter(n.line,i.line+1,function(t){var e=t.text;o==i.line&&(e=e.slice(0,i.ch)),o==n.line&&(e=e.slice(n.ch)),r.push(e),++o}),r}function et(t,e,n){var i=[];return t.iter(e,n,function(t){i.push(t.text)}),i}function nt(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function it(t){if(null==t.parent)return null;for(var e=t.parent,n=g(e.lines,t),i=e.parent;i;i=(e=i).parent)for(var r=0;i.children[r]!=e;++r)n+=i.children[r].chunkSize();return n+e.first}function rt(t,e){var n=t.first;t:do{for(var i=0;i<t.children.length;++i){var r=t.children[i],o=r.height;if(e<o){t=r;continue t}e-=o,n+=r.chunkSize()}return n}while(!t.lines);for(var a=0;a<t.lines.length;++a){var s=t.lines[a].height;if(e<s)break;e-=s}return n+a}function ot(t,e){return e>=t.first&&e<t.first+t.size}function at(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function st(t,e,n){if(void 0===n&&(n=null),!(this instanceof st))return new st(t,e,n);this.line=t,this.ch=e,this.sticky=n}function lt(t,e){return t.line-e.line||t.ch-e.ch}function ut(t,e){return t.sticky==e.sticky&&0==lt(t,e)}function ct(t){return st(t.line,t.ch)}function dt(t,e){return lt(t,e)<0?e:t}function ht(t,e){return lt(t,e)<0?t:e}function ft(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function pt(t,e){if(e.line<t.first)return st(t.first,0);var n=t.first+t.size-1;return e.line>n?st(n,J(t,n).text.length):gt(e,J(t,e.line).text.length)}function gt(t,e){var n=t.ch;return null==n||e<n?st(t.line,e):n<0?st(t.line,0):t}function mt(t,e){for(var n=[],i=0;i<e.length;i++)n[i]=pt(t,e[i]);return n}function vt(e,n,i,t){var l=[e.state.modeGen],r={};Tt(e,n.text,e.doc.mode,i,function(t,e){return l.push(t,e)},r,t);for(var u=i.state,o=function(t){i.baseTokens=l;var o=e.state.overlays[t],a=1,s=0;i.state=!0,Tt(e,n.text,o.mode,i,function(t,e){for(var n=a;s<t;){var i=l[a];t<i&&l.splice(a,1,t,l[a+1],i),a+=2,s=Math.min(t,i)}if(e)if(o.opaque)l.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;n<a;n+=2){var r=l[n+1];l[n+1]=(r?r+" ":"")+"overlay "+e}},r),i.state=u,i.baseTokens=null,i.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)o(a);return{styles:l,classes:r.bgClass||r.textClass?r:null}}function yt(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=xt(t,it(e)),r=e.text.length>t.options.maxHighlightLength&&X(t.doc.mode,i.state),o=vt(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function xt(n,i,t){var e=n.doc,r=n.display;if(!e.mode.startState)return new gs(e,!0,i);var o=At(n,i,t),a=o>e.first&&J(e,o-1).stateAfter,s=a?gs.fromSaved(e,a,o):new gs(e,Q(e.mode),o);return e.iter(o,i,function(t){bt(n,t.text,s);var e=s.line;t.stateAfter=e==i-1||e%5==0||e>=r.viewFrom&&e<r.viewTo?s.save():null,s.nextLine()}),t&&(e.modeFrontier=s.line),s}function bt(t,e,n,i){var r=t.doc.mode,o=new fs(e,t.options.tabSize,n);for(o.start=o.pos=i||0,""==e&&_t(r,n.state);!o.eol();)wt(r,o,n.state),o.start=o.pos}function _t(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=K(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function wt(t,e,n,i){for(var r=0;r<10;r++){i&&(i[0]=K(t,n).mode);var o=t.token(e,n);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function St(t,e,n,i){var r,o,a=t.doc,s=a.mode,l=J(a,(e=pt(a,e)).line),u=xt(t,e.line,n),c=new fs(l.text,t.options.tabSize,u);for(i&&(o=[]);(i||c.pos<e.ch)&&!c.eol();)c.start=c.pos,r=wt(s,c,u.state),i&&o.push(new ms(c,r,X(a.mode,u.state)));return i?o:new ms(c,r,u.state)}function Ct(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==e[i]?e[i]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(e[i])||(e[i]+=" "+n[2])}return t}function Tt(t,e,n,i,r,o,a){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var l,u=0,c=null,d=new fs(e,t.options.tabSize,i),h=t.options.addModeClass&&[null];for(""==e&&Ct(_t(n,i.state),o);!d.eol();){if(d.pos>t.options.maxHighlightLength?(s=!1,a&&bt(t,e,i,d.pos),d.pos=e.length,l=null):l=Ct(wt(n,d,i.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;u<d.start;)r(u=Math.min(d.start,u+5e3),c);c=l}d.start=d.pos}for(;u<d.pos;){var p=Math.min(d.pos,u+5e3);r(p,c),u=p}}function At(t,e,n){for(var i,r,o=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;a<s;--s){if(s<=o.first)return o.first;var l=J(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof ps?u.lookAhead:0)<=o.modeFrontier))return s;var c=C(l.text,null,t.options.tabSize);(null==r||c<i)&&(r=s-1,i=c)}return r}function Dt(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,i=e-1;n<i;i--){var r=J(t,i).stateAfter;if(r&&(!(r instanceof ps)||i+r.lookAhead<e)){n=i+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}function Mt(){vs=!0}function kt(){ys=!0}function It(t,e,n){this.marker=t,this.from=e,this.to=n}function Et(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function Lt(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function Ot(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function Pt(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=e:o.to>e);(i||(i=[])).push(new It(a,o.from,s?null:o.to))}}return i}function Nt(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from<e);(i||(i=[])).push(new It(a,s?null:o.from-e,null==o.to?null:o.to-e))}}return i}function Rt(t,e){if(e.full)return null;var n=ot(t,e.from.line)&&J(t,e.from.line).markedSpans,i=ot(t,e.to.line)&&J(t,e.to.line).markedSpans;if(!n&&!i)return null;var r=e.from.ch,o=e.to.ch,a=0==lt(e.from,e.to),s=Pt(n,r,a),l=Nt(i,o,a),u=1==e.text.length,c=V(e.text).length+(u?r:0);if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null==h.to){var f=Et(l,h.marker);f?u&&(h.to=null==f.to?null:f.to+c):h.to=r}}if(l)for(var p=0;p<l.length;++p){var g=l[p];if(null!=g.to&&(g.to+=c),null==g.from)Et(s,g.marker)||(g.from=c,u&&(s||(s=[])).push(g));else g.from+=c,u&&(s||(s=[])).push(g)}s&&(s=$t(s)),l&&l!=s&&(l=$t(l));var m=[s];if(!u){var v,y=e.text.length-2;if(0<y&&s)for(var x=0;x<s.length;++x)null==s[x].to&&(v||(v=[])).push(new It(s[x].marker,null,null));for(var b=0;b<y;++b)m.push(v);m.push(l)}return m}function $t(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Ft(t,e,n){var i=null;if(t.iter(e.line,n.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||i&&-1!=g(i,n)||(i||(i=[])).push(n)}}),!i)return null;for(var r=[{from:e,to:n}],o=0;o<i.length;++o)for(var a=i[o],s=a.find(0),l=0;l<r.length;++l){var u=r[l];if(!(lt(u.to,s.from)<0||0<lt(u.from,s.to))){var c=[l,1],d=lt(u.from,s.from),h=lt(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(0<h||!a.inclusiveRight&&!h)&&c.push({from:s.to,to:u.to}),r.splice.apply(r,c),l+=c.length-3}}return r}function zt(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function jt(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function Ht(t){return t.inclusiveLeft?-1:0}function Bt(t){return t.inclusiveRight?1:0}function Vt(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var i=t.find(),r=e.find(),o=lt(i.from,r.from)||Ht(t)-Ht(e);if(o)return-o;var a=lt(i.to,r.to)||Bt(t)-Bt(e);return a||e.id-t.id}function Wt(t,e){var n,i=ys&&t.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(e?r.from:r.to)&&(!n||Vt(n,r.marker)<0)&&(n=r.marker);return n}function Ut(t){return Wt(t,!0)}function qt(t){return Wt(t,!1)}function Gt(t,e){var n,i=ys&&t.markedSpans;if(i)for(var r=0;r<i.length;++r){var o=i[r];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!n||Vt(n,o.marker)<0)&&(n=o.marker)}return n}function Yt(t,e,n,i,r){var o=J(t,e),a=ys&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=lt(u.from,n)||Ht(l.marker)-Ht(r),d=lt(u.to,i)||Bt(l.marker)-Bt(r);if(!(0<=c&&d<=0||c<=0&&0<=d)&&(c<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?0<=lt(u.to,n):0<lt(u.to,n))||0<=c&&(l.marker.inclusiveRight&&r.inclusiveLeft?lt(u.from,i)<=0:lt(u.from,i)<0)))return!0}}}function Zt(t){for(var e;e=Ut(t);)t=e.find(-1,!0).line;return t}function Xt(t){for(var e;e=qt(t);)t=e.find(1,!0).line;return t}function Kt(t){for(var e,n;e=qt(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function Qt(t,e){var n=J(t,e),i=Zt(n);return n==i?e:it(i)}function Jt(t,e){if(e>t.lastLine())return e;var n,i=J(t,e);if(!te(t,i))return e;for(;n=qt(i);)i=n.find(1,!0).line;return it(i)+1}function te(t,e){var n=ys&&e.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&ee(t,e,i))return!0}}function ee(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return ee(t,i.line,Et(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var r=void 0,o=0;o<e.markedSpans.length;++o)if((r=e.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&ee(t,e,r))return!0}function ne(t){for(var e=0,n=(t=Zt(t)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==t)break;e+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;e+=s.height}return e}function ie(t){if(0==t.height)return 0;for(var e,n=t.text.length,i=t;e=Ut(i);){var r=e.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=t;e=qt(i);){var o=e.find(0,!0);n-=i.text.length-o.from.ch,n+=(i=o.to.line).text.length-o.to.ch}return n}function re(t){var n=t.display,e=t.doc;n.maxLine=J(e,e.first),n.maxLineLength=ie(n.maxLine),n.maxLineChanged=!0,e.iter(function(t){var e=ie(t);e>n.maxLineLength&&(n.maxLineLength=e,n.maxLine=t)})}function oe(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),zt(t),jt(t,n);var r=i?i(t):1;r!=t.height&&nt(t,r)}function ae(t){t.parent=null,zt(t)}function se(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?ws:_s;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function le(t,e){var n=d("span",null,null,Ca?"padding-right: .1px":null),i={pre:d("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o=r?e.rest[r-1]:e.line,a=void 0;i.pos=0,i.addToken=ce,B(t.display.measure)&&(a=E(o,t.doc.direction))&&(i.addToken=he(i.addToken,a)),i.map=[],pe(o,i,yt(t,o,e!=t.display.externalMeasured&&it(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=l(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=l(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(H(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(Ca){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return L(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=l(i.pre.className,i.textClass||"")),i}function ue(t){var e=_("span","\u2022","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function ce(t,e,n,i,r,o,a){if(e){var s,l=t.splitSpaces?de(e,t.trailingSpace):e,u=t.cm.state.specialChars,c=!1;if(u.test(e)){s=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var h=u.exec(e),f=h?h.index-d:e.length-d;if(f){var p=document.createTextNode(l.slice(d,d+f));wa&&Sa<9?s.appendChild(_("span",[p])):s.appendChild(p),t.map.push(t.pos,t.pos+f,p),t.col+=f,t.pos+=f}if(!h)break;d+=f+1;var g=void 0;if("\t"==h[0]){var m=t.cm.options.tabSize,v=m-t.col%m;(g=s.appendChild(_("span",w(v),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),t.col+=v}else"\r"==h[0]||"\n"==h[0]?(g=s.appendChild(_("span","\r"==h[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",h[0]):((g=t.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),wa&&Sa<9?s.appendChild(_("span",[g])):s.appendChild(g)),t.col+=1;t.map.push(t.pos,t.pos+1,g),t.pos++}}else t.col+=e.length,s=document.createTextNode(l),t.map.push(t.pos,t.pos+e.length,s),wa&&Sa<9&&(c=!0),t.pos+=e.length;if(t.trailingSpace=32==l.charCodeAt(e.length-1),n||i||r||c||o){var y=n||"";i&&(y+=i),r&&(y+=r);var x=_("span",[s],y,o);if(a)for(var b in a)a.hasOwnProperty(b)&&"style"!=b&&"class"!=b&&x.setAttribute(b,a[b]);return t.content.appendChild(x)}t.content.appendChild(s)}}function de(t,e){if(1<t.length&&!/ /.test(t))return t;for(var n=e,i="",r=0;r<t.length;r++){var o=t.charAt(r);" "!=o||!n||r!=t.length-1&&32!=t.charCodeAt(r+1)||(o="\xa0"),i+=o,n=" "==o}return i}function he(d,h){return function(t,e,n,i,r,o,a){n=n?n+" cm-force-border":"cm-force-border";for(var s=t.pos,l=s+e.length;;){for(var u=void 0,c=0;c<h.length&&!((u=h[c]).to>s&&u.from<=s);c++);if(u.to>=l)return d(t,e,n,i,r,o,a);d(t,e.slice(0,u.to-s),n,i,null,o,a),i=null,e=e.slice(u.to-s),s=u.to}}}function fe(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function pe(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var a,s,l,u,c,d,h,f=r.length,p=0,g=1,m="",v=0;;){if(v==p){l=u=c=s="",d=h=null,v=Infinity;for(var y=[],x=void 0,b=0;b<i.length;++b){var _=i[b],w=_.marker;if("bookmark"==w.type&&_.from==p&&w.widgetNode)y.push(w);else if(_.from<=p&&(null==_.to||_.to>p||w.collapsed&&_.to==p&&_.from==p)){if(null!=_.to&&_.to!=p&&v>_.to&&(v=_.to,u=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&_.from==p&&(c+=" "+w.startStyle),w.endStyle&&_.to==v&&(x||(x=[])).push(w.endStyle,_.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var S in w.attributes)(h||(h={}))[S]=w.attributes[S];w.collapsed&&(!d||Vt(d.marker,w)<0)&&(d=_)}else _.from>p&&v>_.from&&(v=_.from)}if(x)for(var C=0;C<x.length;C+=2)x[C+1]==v&&(u+=" "+x[C]);if(!d||d.from==p)for(var T=0;T<y.length;++T)fe(e,0,y[T]);if(d&&(d.from||0)==p){if(fe(e,(null==d.to?f+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(f<=p)break;for(var A=Math.min(f,v);;){if(m){var D=p+m.length;if(!d){var M=A<D?m.slice(0,A-p):m;e.addToken(e,M,a?a+l:l,c,p+M.length==v?u:"",s,h)}if(A<=D){m=m.slice(A-p),p=A;break}p=D,c=""}m=r.slice(o,o=n[g++]),a=se(n[g++],e.cm.options)}}else for(var k=1;k<n.length;k+=2)e.addToken(e,r.slice(o,o=n[k]),se(n[k+1],e.cm.options))}function ge(t,e,n){this.line=e,this.rest=Kt(e),this.size=this.rest?it(V(this.rest))-n+1:1,this.node=this.text=null,this.hidden=te(t,e)}function me(t,e,n){for(var i,r=[],o=e;o<n;o=i){var a=new ge(t.doc,J(t.doc,o),o);i=o+a.size,r.push(a)}return r}function ve(t){Ss?Ss.ops.push(t):t.ownsGroup=Ss={ops:[t],delayedCallbacks:[]}}function ye(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var i=0;i<t.ops.length;i++){var r=t.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<e.length)}function xe(t,e){var n=t.ownsGroup;if(n)try{ye(n)}finally{Ss=null,e(n)}}function be(t,e){var n=M(t,e);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);Ss?i=Ss.delayedCallbacks:Cs?i=Cs:(i=Cs=[],setTimeout(_e,0));for(var o=function(t){i.push(function(){return n[t].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function _e(){var t=Cs;Cs=null;for(var e=0;e<t.length;++e)t[e]()}function we(t,e,n,i){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?Ae(t,e):"gutter"==o?Me(t,e,n,i):"class"==o?De(t,e):"widget"==o&&ke(t,e,i)}e.changes=null}function Se(t){return t.node==t.text&&(t.node=_("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),wa&&Sa<8&&(t.node.style.zIndex=2)),t.node}function Ce(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var i=Se(e);e.background=i.insertBefore(_("div",null,n),i.firstChild),t.display.input.setUneditable(e.background)}}function Te(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):le(t,e)}function Ae(t,e){var n=e.text.className,i=Te(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,De(t,e)):n&&(e.text.className=n)}function De(t,e){Ce(t,e),e.line.wrapClass?Se(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function Me(t,e,n,i){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var r=Se(e);e.gutterBackground=_("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),r.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){var a=Se(e),s=e.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(s),a.insertBefore(s,e.text),e.line.gutterClass&&(s.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=s.appendChild(_("div",at(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.display.gutterSpecs.length;++l){var u=t.display.gutterSpecs[l].className,c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(_("div",[c],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function ke(t,e,n){e.alignable&&(e.alignable=null);for(var i=e.node.firstChild,r=void 0;i;i=r)r=i.nextSibling,"CodeMirror-linewidget"==i.className&&e.node.removeChild(i);Ee(t,e,n)}function Ie(t,e,n,i){var r=Te(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),De(t,e),Me(t,e,n,i),Ee(t,e,i),e.node}function Ee(t,e,n){if(Le(t,e.line,e,n,!0),e.rest)for(var i=0;i<e.rest.length;i++)Le(t,e.rest[i],e,n,!1)}function Le(t,e,n,i,r){if(e.widgets)for(var o=Se(n),a=0,s=e.widgets;a<s.length;++a){var l=s[a],u=_("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Oe(l,u,n,i),t.display.input.setUneditable(u),r&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),be(l,"redraw")}}function Oe(t,e,n,i){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var r=i.wrapperWidth;e.style.left=i.fixedPos+"px",t.coverGutter||(r-=i.gutterTotalWidth,e.style.paddingLeft=i.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-i.gutterTotalWidth+"px"))}function Pe(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!m(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),o(e.display.measure,_("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function Ne(t,e){for(var n=z(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function Re(t){return t.lineSpace.offsetTop}function $e(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Fe(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=o(t.measure,_("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(t.cachedPaddingH=i),i}function ze(t){return Ga-t.display.nativeBarWidth}function je(t){return t.display.scroller.clientWidth-ze(t)-t.display.barWidth}function He(t){return t.display.scroller.clientHeight-ze(t)-t.display.barHeight}function Be(t,e,n){var i=t.options.lineWrapping,r=i&&je(t);if(!e.measure.heights||i&&e.measure.width!=r){var o=e.measure.heights=[];if(i){e.measure.width=r;for(var a=e.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];2<Math.abs(l.bottom-u.bottom)&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}
|
|
function Ve(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;i<t.rest.length;i++)if(t.rest[i]==e)return{map:t.measure.maps[i],cache:t.measure.caches[i]};for(var r=0;r<t.rest.length;r++)if(it(t.rest[r])>n)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function We(t,e){var n=it(e=Zt(e)),i=t.display.externalMeasured=new ge(t.doc,e,n);i.lineN=n;var r=i.built=le(t,i);return i.text=r.pre,o(t.display.lineMeasure,r.pre),i}function Ue(t,e,n,i){return Ye(t,Ge(t,e),n,i)}function qe(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[An(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function Ge(t,e){var n=it(e),i=qe(t,n);i&&!i.text?i=null:i&&i.changes&&(we(t,i,n,_n(t)),t.curOp.forceUpdate=!0),i||(i=We(t,e));var r=Ve(i,e,n);return{line:e,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Ye(t,e,n,i,r){e.before&&(n=-1);var o,a=n+(i||"");return e.cache.hasOwnProperty(a)?o=e.cache[a]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(Be(t,e.view,e.rect),e.hasHeights=!0),(o=Ke(t,e,n,i)).bogus||(e.cache[a]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}function Ze(t,e,n){for(var i,r,o,a,s,l,u=0;u<t.length;u+=3)if(s=t[u],l=t[u+1],e<s?(r=0,o=1,a="left"):e<l?o=(r=e-s)+1:(u==t.length-3||e==l&&t[u+3]>e)&&(r=(o=l-s)-1,l<=e&&(a="right")),null!=r){if(i=t[u+2],s==l&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;u&&t[u-2]==t[u-3]&&t[u-1].insertLeft;)i=t[2+(u-=3)],a="left";if("right"==n&&r==l-s)for(;u<t.length-3&&t[u+3]==t[u+4]&&!t[u+5].insertLeft;)i=t[(u+=3)+2],a="right";break}return{node:i,start:r,end:o,collapse:a,coverStart:s,coverEnd:l}}function Xe(t,e){var n=Ts;if("left"==e)for(var i=0;i<t.length&&(n=t[i]).left==n.right;i++);else for(var r=t.length-1;0<=r&&(n=t[r]).left==n.right;r--);return n}function Ke(t,e,n,i){var r,o=Ze(e.map,n,i),a=o.node,s=o.start,l=o.end,u=o.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;s&&S(e.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l<o.coverEnd&&S(e.line.text.charAt(o.coverStart+l));)++l;if((r=wa&&Sa<9&&0==s&&l==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Xe(Fa(a,s,l).getClientRects(),i)).left||r.right||0==s)break;l=s,s-=1,u="right"}wa&&Sa<11&&(r=Qe(t.display.measure,r))}else{var d;0<s&&(u=i="right"),r=t.options.lineWrapping&&1<(d=a.getClientRects()).length?d["right"==i?d.length-1:0]:a.getBoundingClientRect()}if(wa&&Sa<9&&!s&&(!r||!r.left&&!r.right)){var h=a.parentNode.getClientRects()[0];r=h?{left:h.left,right:h.left+bn(t.display),top:h.top,bottom:h.bottom}:Ts}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v<m.length-1&&!(g<m[v]);v++);var y=v?m[v-1]:0,x=m[v],b={left:("right"==u?r.right:r.left)-e.rect.left,right:("left"==u?r.left:r.right)-e.rect.left,top:y,bottom:x};return r.left||r.right||(b.bogus=!0),t.options.singleCursorHeightPerLine||(b.rtop=f,b.rbottom=p),b}function Qe(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!W(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}function Je(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function tn(t){t.display.externalMeasure=null,p(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Je(t.display.view[e])}function en(t){tn(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function nn(){return Aa&&La?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function rn(){return Aa&&La?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function on(t){var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;++n)t.widgets[n].above&&(e+=Pe(t.widgets[n]));return e}function an(t,e,n,i,r){if(!r){var o=on(e);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var a=ne(e);if("local"==i?a+=Re(t.display):a-=t.display.viewOffset,"page"==i||"window"==i){var s=t.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==i?0:rn());var l=s.left+("window"==i?0:nn());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function sn(t,e,n){if("div"==n)return e;var i=e.left,r=e.top;if("page"==n)i-=nn(),r-=rn();else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:r-a.top}}function ln(t,e,n,i,r){return i||(i=J(t.doc,e.line)),an(t,i,Ue(t,i,e.ch,r),n)}function un(i,t,r,o,a,s){function l(t,e){var n=Ye(i,a,t,e?"right":"left",s);return e?n.left=n.right:n.right=n.left,an(i,o,n,r)}function e(t,e,n){return l(n?t-1:t,1==u[e].level!=n)}o=o||J(i.doc,t.line),a||(a=Ge(i,o));var u=E(o,i.doc.direction),n=t.ch,c=t.sticky;if(n>=o.text.length?(n=o.text.length,c="before"):n<=0&&(n=0,c="after"),!u)return l("before"==c?n-1:n,"before"==c);var d=b(u,n,c),h=es,f=e(n,d,"before"==c);return null!=h&&(f.other=e(n,h,"before"!=c)),f}function cn(t,e){var n=0;e=pt(t.doc,e),t.options.lineWrapping||(n=bn(t.display)*e.ch);var i=J(t.doc,e.line),r=ne(i)+Re(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function dn(t,e,n,i,r){var o=st(t,e,n);return o.xRel=r,i&&(o.outside=i),o}function hn(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return dn(i.first,0,null,-1,-1);var r=rt(i,n),o=i.first+i.size-1;if(o<r)return dn(i.first+i.size-1,J(i,o).text.length,null,1,1);e<0&&(e=0);for(var a=J(i,r);;){var s=mn(t,a,r,e,n),l=Gt(a,s.ch+(0<s.xRel||0<s.outside?1:0));if(!l)return s;var u=l.find(1);if(u.line==r)return u;a=J(i,r=u.line)}}function fn(e,t,n,i){i-=on(t);var r=t.text.length,o=D(function(t){return Ye(e,n,t-1).bottom<=i},r,0);return{begin:o,end:r=D(function(t){return Ye(e,n,t).top>i},o,r)}}function pn(t,e,n,i){return n||(n=Ge(t,e)),fn(t,e,n,an(t,e,Ye(t,n,i),"line").top)}function gn(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function mn(n,t,e,i,r){r-=ne(t);var o=Ge(n,t),a=on(t),s=0,l=t.text.length,u=!0,c=E(t,n.doc.direction);if(c){var d=(n.options.lineWrapping?yn:vn)(n,t,e,o,c,i,r);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var h,f,p=null,g=null,m=D(function(t){var e=Ye(n,o,t);return e.top+=a,e.bottom+=a,!!gn(e,i,r,!1)&&(e.top<=r&&e.left<=i&&(p=t,g=e),!0)},s,l),v=!1;if(g){var y=i-g.left<g.right-i,x=y==u;m=p+(x?0:1),f=x?"after":"before",h=y?g.left:g.right}else{u||m!=l&&m!=s||m++,f=0==m?"after":m==t.text.length?"before":Ye(n,o,m-(u?1:0)).bottom+a<=r==u?"after":"before";var b=un(n,st(e,m,f),"line",t,o);h=b.left,v=r<b.top?-1:r>=b.bottom?1:0}return dn(e,m=A(t.text,m,1),f,v,i-h)}function vn(i,r,o,a,s,l,u){var t=D(function(t){var e=s[t],n=1!=e.level;return gn(un(i,st(o,n?e.to:e.from,n?"before":"after"),"line",r,a),l,u,!0)},0,s.length-1),e=s[t];if(0<t){var n=1!=e.level,c=un(i,st(o,n?e.from:e.to,n?"after":"before"),"line",r,a);gn(c,l,u,!0)&&c.top>u&&(e=s[t-1])}return e}function yn(t,e,n,i,r,o,a){var s=fn(t,e,i,a),l=s.begin,u=s.end;/\s/.test(e.text.charAt(u-1))&&u--;for(var c=null,d=null,h=0;h<r.length;h++){var f=r[h];if(!(f.from>=u||f.to<=l)){var p=Ye(t,i,1!=f.level?Math.min(u,f.to)-1:Math.max(l,f.from)).right,g=p<o?o-p+1e9:p-o;(!c||g<d)&&(c=f,d=g)}}return c||(c=r[r.length-1]),c.from<l&&(c={from:l,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function xn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==bs){bs=_("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)bs.appendChild(document.createTextNode("x")),bs.appendChild(_("br"));bs.appendChild(document.createTextNode("x"))}o(t.measure,bs);var n=bs.offsetHeight/50;return 3<n&&(t.cachedTextHeight=n),p(t.measure),n||1}function bn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=_("span","xxxxxxxxxx"),n=_("pre",[e],"CodeMirror-line-like");o(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return 2<r&&(t.cachedCharWidth=r),r||10}function _n(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+r,i[s]=o.clientWidth}return{fixedPos:wn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function wn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Sn(i){var r=xn(i.display),o=i.options.lineWrapping,a=o&&Math.max(5,i.display.scroller.clientWidth/bn(i.display)-3);return function(t){if(te(i.doc,t))return 0;var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;n++)t.widgets[n].height&&(e+=t.widgets[n].height);return o?e+(Math.ceil(t.text.length/a)||1)*r:e+r}}function Cn(t){var e=t.doc,n=Sn(t);e.iter(function(t){var e=n(t);e!=t.height&&nt(t,e)})}function Tn(t,e,n,i){var r=t.display;if(!n&&"true"==z(e).getAttribute("cm-not-content"))return null;var o,a,s=r.lineSpace.getBoundingClientRect();try{o=e.clientX-s.left,a=e.clientY-s.top}catch(e){return null}var l,u=hn(t,o,a);if(i&&1==u.xRel&&(l=J(t.doc,u.line).text).length==u.ch){var c=C(l,l.length,t.options.tabSize)-l.length;u=st(u.line,Math.max(0,Math.round((o-Fe(t.display).left)/bn(t.display))-c))}return u}function An(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;i<n.length;i++)if((e-=n[i].size)<0)return i}function Dn(t,e,n,i){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),i||(i=0);var r=t.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)ys&&Qt(t.doc,e)<r.viewTo&&kn(t);else if(n<=r.viewFrom)ys&&Jt(t.doc,n+i)>r.viewFrom?kn(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)kn(t);else if(e<=r.viewFrom){var o=In(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):kn(t)}else if(n>=r.viewTo){var a=In(t,e,e,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):kn(t)}else{var s=In(t,e,e,-1),l=In(t,n,n+i,1);s&&l?(r.view=r.view.slice(0,s.index).concat(me(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):kn(t)}var u=r.externalMeasured;u&&(n<u.lineN?u.lineN+=i:e<u.lineN+u.size&&(r.externalMeasured=null))}function Mn(t,e,n){t.curOp.viewChanged=!0;var i=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(i.externalMeasured=null),!(e<i.viewFrom||e>=i.viewTo)){var o=i.view[An(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==g(a,n)&&a.push(n)}}}function kn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function In(t,e,n,i){var r,o=An(t,e),a=t.display.view;if(!ys||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=e){if(0<i){if(o==a.length-1)return null;r=s+a[o].size-e,o++}else r=s-e;e+=r,n+=r}for(;Qt(t.doc,n)!=n;){if(o==(i<0?0:a.length-1))return null;n+=i*a[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function En(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=me(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=me(t,e,i.viewFrom).concat(i.view):i.viewFrom<e&&(i.view=i.view.slice(An(t,e))),i.viewFrom=e,i.viewTo<n?i.view=i.view.concat(me(t,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,An(t,n)))),i.viewTo=n}function Ln(t){for(var e=t.display.view,n=0,i=0;i<e.length;i++){var r=e[i];r.hidden||r.node&&!r.changes||++n}return n}function On(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Pn(t,e){void 0===e&&(e=!0);for(var n=t.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(e||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=t.display.viewTo||s.to().line<t.display.viewFrom)){var l=s.empty();(l||t.options.showCursorWhenSelecting)&&Nn(t,s.head,r),l||$n(t,s,o)}}return i}function Nn(t,e,n){var i=un(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),r=n.appendChild(_("div","\xa0","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*t.options.cursorHeight+"px",i.other){var o=n.appendChild(_("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Rn(t,e){return t.top-e.top||t.left-e.left}function $n(a,t,e){function A(t,e,n,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),o.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?M-t:n)+"px;\n height: "+(i-e)+"px"))}function n(n,y,x){function b(t,e){return ln(a,st(n,t),"div",o,e)}function _(t,e,n){var i=pn(a,o,null,t),r="ltr"==e==("after"==n)?"left":"right";return b("after"==n?i.begin:i.end-(/\s/.test(o.text.charAt(i.end-1))?2:1),r)[r]}var w,S,o=J(r,n),C=o.text.length,T=E(o,r.direction);return I(T,y||0,null==x?C:x,function(t,e,n,i){var r="ltr"==n,o=b(t,r?"left":"right"),a=b(e-1,r?"right":"left"),s=null==y&&0==t,l=null==x&&e==C,u=0==i,c=!T||i==T.length-1;if(a.top-o.top<=3){var d=(k?l:s)&&c,h=(k?s:l)&&u?D:(r?o:a).left,f=d?M:(r?a:o).right;A(h,o.top,f-h,o.bottom)}else{var p,g,m,v;r?(p=k&&s&&u?D:o.left,g=k?M:_(t,n,"before"),m=k?D:_(e,n,"after"),v=k&&l&&c?M:a.right):(p=k?_(t,n,"before"):D,g=!k&&s&&u?M:o.right,m=!k&&l&&c?D:a.left,v=k?_(e,n,"after"):M),A(p,o.top,g-p,o.bottom),o.bottom<a.top&&A(D,o.bottom,null,a.top),A(m,a.top,v-m,a.bottom)}(!w||Rn(o,w)<0)&&(w=o),Rn(a,w)<0&&(w=a),(!S||Rn(o,S)<0)&&(S=o),Rn(a,S)<0&&(S=a)}),{start:w,end:S}}var i=a.display,r=a.doc,o=document.createDocumentFragment(),s=Fe(a.display),D=s.left,M=Math.max(i.sizerWidth,je(a)-i.sizer.offsetLeft)-s.right,k="ltr"==r.direction,l=t.from(),u=t.to();if(l.line==u.line)n(l.line,l.ch,u.ch);else{var c=J(r,l.line),d=J(r,u.line),h=Zt(c)==Zt(d),f=n(l.line,l.ch,h?c.text.length+1:null).end,p=n(u.line,h?0:null,u.ch).start;h&&(f.top<p.top-2?(A(f.right,f.top,null,f.bottom),A(D,p.top,p.left,p.bottom)):A(f.right,f.top,p.left-f.right,f.bottom)),f.bottom<p.top&&A(D,f.bottom,null,p.top)}e.appendChild(o)}function Fn(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",0<t.options.cursorBlinkRate?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function zn(t){t.state.focused||(t.display.input.focus(),Hn(t))}function jn(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Bn(t))},100)}function Hn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(L(t,"focus",t,e),t.state.focused=!0,i(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),Ca&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Fn(t))}function Bn(t,e){t.state.delayingBlurEvent||(t.state.focused&&(L(t,"blur",t,e),t.state.focused=!1,Ha(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Vn(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var r=e.view[i],o=t.options.lineWrapping,a=void 0,s=0;if(!r.hidden){if(wa&&Sa<8){var l=r.node.offsetTop+r.node.offsetHeight;a=l-n,n=l}else{var u=r.node.getBoundingClientRect();a=u.bottom-u.top,!o&&r.text.firstChild&&(s=r.text.firstChild.getBoundingClientRect().right-u.left-1)}var c=r.line.height-a;if((.005<c||c<-.005)&&(nt(r.line,a),Wn(r.line),r.rest))for(var d=0;d<r.rest.length;d++)Wn(r.rest[d]);if(s>t.display.sizerWidth){var h=Math.ceil(s/bn(t.display));h>t.display.maxLineLength&&(t.display.maxLineLength=h,t.display.maxLine=r.line,t.display.maxLineChanged=!0)}}}}function Wn(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function Un(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-Re(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,o=rt(e,i),a=rt(e,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?a=rt(e,ne(J(e,o=s))+t.wrapper.clientHeight):Math.min(l,e.lastLine())>=a&&(o=rt(e,ne(J(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function qn(t,e){if(!O(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!Ia){var o=_("div","\u200b",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Re(t.display))+"px;\n height: "+(e.bottom-e.top+ze(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function Gn(t,e,n,i){var r;null==i&&(i=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?st(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?st(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=un(t,e),l=n&&n!=e?un(t,n):s,u=Zn(t,r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-i,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+i}),c=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=u.scrollTop&&(ni(t,u.scrollTop),1<Math.abs(t.doc.scrollTop-c)&&(a=!0)),null!=u.scrollLeft&&(ri(t,u.scrollLeft),1<Math.abs(t.doc.scrollLeft-d)&&(a=!0)),!a)break}return r}function Yn(t,e){var n=Zn(t,e);null!=n.scrollTop&&ni(t,n.scrollTop),null!=n.scrollLeft&&ri(t,n.scrollLeft)}function Zn(t,e){var n=t.display,i=xn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=He(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+$e(n),l=e.top<i,u=e.bottom>s-i;if(e.top<r)a.scrollTop=l?0:e.top;else if(e.bottom>r+o){var c=Math.min(e.top,(u?s:e.bottom)-o);c!=r&&(a.scrollTop=c)}var d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,h=je(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),f=e.right-e.left>h;return f&&(e.right=e.left+h),e.left<10?a.scrollLeft=0:e.left<d?a.scrollLeft=Math.max(0,e.left-(f?0:10)):e.right>h+d-3&&(a.scrollLeft=e.right+(f?0:10)-h),a}function Xn(t,e){null!=e&&(ti(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Kn(t){ti(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Qn(t,e,n){null==e&&null==n||ti(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Jn(t,e){ti(t),t.curOp.scrollToPos=e}function ti(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,ei(t,cn(t,e.from),cn(t,e.to),e.margin))}function ei(t,e,n,i){var r=Zn(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});Qn(t,r.scrollLeft,r.scrollTop)}function ni(t,e){Math.abs(t.doc.scrollTop-e)<2||(ya||Mi(t,{top:e}),ii(t,e,!0),ya&&Mi(t),_i(t,100))}function ii(t,e,n){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function ri(t,e,n,i){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,Li(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function oi(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+$e(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+ze(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ai(t,e){e||(e=oi(t));var n=t.display.barWidth,i=t.display.barHeight;si(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&Vn(t),si(t,oi(t)),n=t.display.barWidth,i=t.display.barHeight}function si(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}function li(n){n.display.scrollbars&&(n.display.scrollbars.clear(),n.display.scrollbars.addClass&&Ha(n.display.wrapper,n.display.scrollbars.addClass)),n.display.scrollbars=new Ms[n.options.scrollbarStyle](function(t){n.display.wrapper.insertBefore(t,n.display.scrollbarFiller),rs(t,"mousedown",function(){n.state.focused&&setTimeout(function(){return n.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,e){"horizontal"==e?ri(n,t):ni(n,t)},n),n.display.scrollbars.addClass&&i(n.display.wrapper,n.display.scrollbars.addClass)}function ui(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ks},ve(t.curOp)}function ci(t){var e=t.curOp;e&&xe(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;di(t)})}function di(t){for(var e=t.ops,n=0;n<e.length;n++)hi(e[n]);for(var i=0;i<e.length;i++)fi(e[i]);for(var r=0;r<e.length;r++)pi(e[r]);for(var o=0;o<e.length;o++)gi(e[o]);for(var a=0;a<e.length;a++)mi(e[a])}function hi(t){var e=t.cm,n=e.display;Si(e),t.updateMaxLine&&re(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Is(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function fi(t){t.updatedDisplay=t.mustUpdate&&Ai(t.cm,t.update)}function pi(t){var e=t.cm,n=e.display;t.updatedDisplay&&Vn(e),t.barMeasure=oi(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ue(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+ze(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-je(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function gi(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&ri(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==h();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&ai(e,t.barMeasure),t.updatedDisplay&&Ei(e,t.barMeasure),t.selectionChanged&&Fn(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&zn(t.cm)}function mi(t){var e=t.cm,n=e.display,i=e.doc;(t.updatedDisplay&&Di(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&ii(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&ri(e,t.scrollLeft,!0,!0),t.scrollToPos)&&qn(e,Gn(e,pt(i,t.scrollToPos.from),pt(i,t.scrollToPos.to),t.scrollToPos.margin));var r=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(r)for(var a=0;a<r.length;++a)r[a].lines.length||L(r[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&L(o[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&L(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function vi(t,e){if(t.curOp)return e();ui(t);try{return e()}finally{ci(t)}}function yi(t,e){return function(){if(t.curOp)return e.apply(t,arguments);ui(t);try{return e.apply(t,arguments)}finally{ci(t)}}}function xi(t){return function(){if(this.curOp)return t.apply(this,arguments);ui(this);try{return t.apply(this,arguments)}finally{ci(this)}}}function bi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ui(t);try{return e.apply(this,arguments)}finally{ci(t)}}}function _i(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,u(wi,t))}function wi(l){var u=l.doc;if(!(u.highlightFrontier>=l.display.viewTo)){var c=+new Date+l.options.workTime,d=xt(l,u.highlightFrontier),h=[];u.iter(d.line,Math.min(u.first+u.size,l.display.viewTo+500),function(t){if(d.line>=l.display.viewFrom){var e=t.styles,n=t.text.length>l.options.maxHighlightLength?X(u.mode,d.state):null,i=vt(l,t,d,!0);n&&(d.state=n),t.styles=i.styles;var r=t.styleClasses,o=i.classes;o?t.styleClasses=o:r&&(t.styleClasses=null);for(var a=!e||e.length!=t.styles.length||r!=o&&(!r||!o||r.bgClass!=o.bgClass||r.textClass!=o.textClass),s=0;!a&&s<e.length;++s)a=e[s]!=t.styles[s];a&&h.push(d.line),t.stateAfter=d.save(),d.nextLine()}else t.text.length<=l.options.maxHighlightLength&&bt(l,t.text,d),t.stateAfter=d.line%5==0?d.save():null,d.nextLine();if(+new Date>c)return _i(l,l.options.workDelay),!0}),u.highlightFrontier=d.line,u.modeFrontier=Math.max(u.modeFrontier,d.line),h.length&&vi(l,function(){for(var t=0;t<h.length;t++)Mn(l,h[t],"text")})}}function Si(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=ze(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=ze(t)+"px",e.scrollbarsClipped=!0)}function Ci(t){if(t.hasFocus())return null;var e=h();if(!e||!m(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&m(t.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}function Ti(t){if(t&&t.activeElt&&t.activeElt!=h()&&(t.activeElt.focus(),t.anchorNode&&m(document.body,t.anchorNode)&&m(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}function Ai(t,e){var n=t.display,i=t.doc;if(e.editorIsHidden)return kn(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ln(t))return!1;Oi(t)&&(kn(t),e.dims=_n(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),a=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),ys&&(o=Qt(t.doc,o),a=Jt(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;En(t,o,a),n.viewOffset=ne(J(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=Ln(t);if(!s&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Ci(t);return 4<l&&(n.lineDiv.style.display="none"),ki(t,n.updateLineNumbers,e.dims),4<l&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ti(u),p(n.cursorDiv),p(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,_i(t,400)),!(n.updateLineNumbers=null)}function Di(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=je(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+$e(t.display)-He(t),n.top)}),e.visible=Un(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ai(t,e);i=!1){Vn(t);var r=oi(t);On(t),ai(t,r),Ei(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Mi(t,e){var n=new Is(t,e);if(Ai(t,n)){Vn(t),Di(t,n);var i=oi(t);On(t),ai(t,i),Ei(t,i),n.finish()}}function ki(n,t,e){function i(t){var e=t.nextSibling;return Ca&&Pa&&n.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),e}for(var r=n.display,o=n.options.lineNumbers,a=r.lineDiv,s=a.firstChild,l=r.view,u=r.viewFrom,c=0;c<l.length;c++){var d=l[c];if(d.hidden);else if(d.node&&d.node.parentNode==a){for(;s!=d.node;)s=i(s);var h=o&&null!=t&&t<=u&&d.lineNumber;d.changes&&(-1<g(d.changes,"gutter")&&(h=!1),we(n,d,u,e)),h&&(p(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(at(n.options,u)))),s=d.node.nextSibling}else{var f=Ie(n,d,u,e);a.insertBefore(f,s)}u+=d.size}for(;s;)s=i(s)}function Ii(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function Ei(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+ze(t)+"px"}function Li(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=wn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){t.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=i+r+"px")}}function Oi(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=at(t.options,e.first+e.size-1),i=t.display;if(n.length==i.lineNumChars)return!1;var r=i.measure.appendChild(_("div",[_("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,a=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Ii(t.display),!0}function Pi(t,e){for(var n=[],i=!1,r=0;r<t.length;r++){var o=t[r],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!e)continue;i=!0}n.push({className:o,style:a})}return e&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ni(t){var e=t.gutters,n=t.gutterSpecs;p(e),t.lineGutter=null;for(var i=0;i<n.length;++i){var r=n[i],o=r.className,a=r.style,s=e.appendChild(_("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&((t.lineGutter=s).style.width=(t.lineNumWidth||1)+"px")}e.style.display=n.length?"":"none",Ii(t)}function Ri(t){Ni(t.display),Dn(t),Li(t)}function $i(t,e,n,i){var r=this;this.input=n,r.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=d("div",null,"CodeMirror-code"),r.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=_("div",null,"CodeMirror-cursors"),r.measure=_("div",null,"CodeMirror-measure"),r.lineMeasure=_("div",null,"CodeMirror-measure"),r.lineSpace=d("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var o=d("div",[r.lineSpace],"CodeMirror-lines");r.mover=_("div",[o],null,"position: relative"),r.sizer=_("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=_("div",null,null,"position: absolute; height: "+Ga+"px; width: 1px;"),r.gutters=_("div",null,"CodeMirror-gutters"),r.lineGutter=null,
|
|
r.scroller=_("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=_("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),wa&&Sa<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),Ca||ya&&Oa||(r.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(r.wrapper):t(r.wrapper)),r.viewFrom=r.viewTo=e.first,r.reportedViewFrom=r.reportedViewTo=e.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=Pi(i.gutters,i.lineNumbers),Ni(r),n.init(r)}function Fi(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function zi(t){var e=Fi(t);return e.x*=Ls,e.y*=Ls,e}function ji(t,e){var n=Fi(e),i=n.x,r=n.y,o=t.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(i&&s||r&&l){if(r&&Pa&&Ca)t:for(var u=e.target,c=o.view;u!=a;u=u.parentNode)for(var d=0;d<c.length;d++)if(c[d].node==u){t.display.currentWheelTarget=u;break t}if(i&&!ya&&!Da&&null!=Ls)return r&&l&&ni(t,Math.max(0,a.scrollTop+r*Ls)),ri(t,Math.max(0,a.scrollLeft+i*Ls)),(!r||r&&l)&&R(e),void(o.wheelStartX=null);if(r&&null!=Ls){var h=r*Ls,f=t.doc.scrollTop,p=f+o.wrapper.clientHeight;h<0?f=Math.max(0,f+h-50):p=Math.min(t.doc.height,p+h+50),Mi(t,{top:f,bottom:p})}Es<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=i,o.wheelDY=r,setTimeout(function(){if(null!=o.wheelStartX){var t=a.scrollLeft-o.wheelStartX,e=a.scrollTop-o.wheelStartY,n=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Ls=(Ls*Es+n)/(Es+1),++Es)}},200)):(o.wheelDX+=i,o.wheelDY+=r))}}function Hi(t,e,n){var i=t&&t.options.selectionsMayTouch,r=e[n];e.sort(function(t,e){return lt(t.from(),e.from())}),n=g(e,r);for(var o=1;o<e.length;o++){var a=e[o],s=e[o-1],l=lt(s.to(),a.from());if(i&&!a.empty()?0<l:0<=l){var u=ht(s.from(),a.from()),c=dt(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new Ps(d?c:u,d?u:c))}}return new Os(e,n)}function Bi(t,e){return new Os([new Ps(t,e||t)],0)}function Vi(t){return t.text?st(t.from.line+t.text.length-1,V(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Wi(t,e){if(lt(t,e.from)<0)return t;if(lt(t,e.to)<=0)return Vi(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=Vi(e).ch-e.to.ch),st(n,i)}function Ui(t,e){for(var n=[],i=0;i<t.sel.ranges.length;i++){var r=t.sel.ranges[i];n.push(new Ps(Wi(r.anchor,e),Wi(r.head,e)))}return Hi(t.cm,n,t.sel.primIndex)}function qi(t,e,n){return t.line==e.line?st(n.line,t.ch-e.ch+n.ch):st(n.line+(t.line-e.line),t.ch)}function Gi(t,e,n){for(var i=[],r=st(t.first,0),o=r,a=0;a<e.length;a++){var s=e[a],l=qi(s.from,r,o),u=qi(Vi(s),r,o);if(r=s.to,o=u,"around"==n){var c=t.sel.ranges[a],d=lt(c.head,c.anchor)<0;i[a]=new Ps(d?u:l,d?l:u)}else i[a]=new Ps(l,l)}return new Os(i,t.sel.primIndex)}function Yi(t){t.doc.mode=Y(t.options,t.doc.modeOption),Zi(t)}function Zi(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,_i(t,100),t.state.modeGen++,t.curOp&&Dn(t)}function Xi(t,e){return 0==e.from.ch&&0==e.to.ch&&""==V(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Ki(t,i,e,r){function o(t){return e?e[t]:null}function n(t,e,n){oe(t,e,n,r),be(t,"change",t,i)}function a(t,e){for(var n=[],i=t;i<e;++i)n.push(new xs(u[i],o(i),r));return n}var s=i.from,l=i.to,u=i.text,c=J(t,s.line),d=J(t,l.line),h=V(u),f=o(u.length-1),p=l.line-s.line;if(i.full)t.insert(0,a(0,u.length)),t.remove(u.length,t.size-u.length);else if(Xi(t,i)){var g=a(0,u.length-1);n(d,d.text,f),p&&t.remove(s.line,p),g.length&&t.insert(s.line,g)}else if(c==d)if(1==u.length)n(c,c.text.slice(0,s.ch)+h+c.text.slice(l.ch),f);else{var m=a(1,u.length-1);m.push(new xs(h+c.text.slice(l.ch),f,r)),n(c,c.text.slice(0,s.ch)+u[0],o(0)),t.insert(s.line+1,m)}else if(1==u.length)n(c,c.text.slice(0,s.ch)+u[0]+d.text.slice(l.ch),o(0)),t.remove(s.line+1,p);else{n(c,c.text.slice(0,s.ch)+u[0],o(0)),n(d,h+d.text.slice(l.ch),f);var v=a(1,u.length-1);1<p&&t.remove(s.line+1,p-1),t.insert(s.line+1,v)}be(t,"change",t,i)}function Qi(t,a,s){function l(t,e,n){if(t.linked)for(var i=0;i<t.linked.length;++i){var r=t.linked[i];if(r.doc!=e){var o=n&&r.sharedHist;s&&!o||(a(r.doc,o),l(r.doc,t,o))}}}l(t,null,!0)}function Ji(t,e){if(e.cm)throw new Error("This document is already in use.");Cn((t.doc=e).cm=t),Yi(t),tr(t),t.options.lineWrapping||re(t),t.options.mode=e.modeOption,Dn(t)}function tr(t){("rtl"==t.doc.direction?i:Ha)(t.display.lineDiv,"CodeMirror-rtl")}function er(t){vi(t,function(){tr(t),Dn(t)})}function nr(t){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function ir(t,e){var n={from:ct(e.from),to:Vi(e),text:tt(t,e.from,e.to)};return cr(t,n,e.from.line,e.to.line+1),Qi(t,function(t){return cr(t,n,e.from.line,e.to.line+1)},!0),n}function rr(t){for(;t.length;){if(!V(t).ranges)break;t.pop()}}function or(t,e){return e?(rr(t.done),V(t.done)):t.done.length&&!V(t.done).ranges?V(t.done):1<t.done.length&&!t.done[t.done.length-2].ranges?(t.done.pop(),V(t.done)):void 0}function ar(t,e,n,i){var r=t.history;r.undone.length=0;var o,a,s=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=or(r,r.lastOp==i)))a=V(o.changes),0==lt(e.from,e.to)&&0==lt(e.from,a.to)?a.to=Vi(e):o.changes.push(ir(t,e));else{var l=V(r.done);for(l&&l.ranges||ur(t.sel,r.done),o={changes:[ir(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,a||L(t,"historyAdded")}function sr(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function lr(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||sr(t,o,V(r.done),e))?r.done[r.done.length-1]=e:ur(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&rr(r.undone)}function ur(t,e){var n=V(e);n&&n.ranges&&n.equals(t)||e.push(t)}function cr(e,n,t,i){var r=n["spans_"+e.id],o=0;e.iter(Math.max(e.first,t),Math.min(e.first+e.size,i),function(t){t.markedSpans&&((r||(r=n["spans_"+e.id]={}))[o]=t.markedSpans),++o})}function dr(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function hr(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var i=[],r=0;r<e.text.length;++r)i.push(dr(n[r]));return i}function fr(t,e){var n=hr(t,e),i=Rt(t,e);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],a=i[r];if(o&&a)t:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue t;o.push(l)}else a&&(n[r]=a)}return n}function pr(t,e,n){for(var i=[],r=0;r<t.length;++r){var o=t[r];if(o.ranges)i.push(n?Os.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var u=a[l],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),e)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&-1<g(e,Number(c[1]))&&(V(s)[d]=u[d],delete u[d])}}}return i}function gr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=lt(e,r)<0;o!=lt(n,r)<0?(r=e,e=n):o!=lt(e,n)<0&&(e=n)}return new Ps(r,e)}return new Ps(n||e,e)}function mr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),wr(t,new Os([gr(t.sel.primary(),e,n,r)],0),i)}function vr(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)i[o]=gr(t.sel.ranges[o],e[o],null,r);wr(t,Hi(t.cm,i,t.sel.primIndex),n)}function yr(t,e,n,i){var r=t.sel.ranges.slice(0);r[e]=n,wr(t,Hi(t.cm,r,t.sel.primIndex),i)}function xr(t,e,n,i){wr(t,Bi(e,n),i)}function br(i,t,e){var n={ranges:t.ranges,update:function(t){var e=this;this.ranges=[];for(var n=0;n<t.length;n++)e.ranges[n]=new Ps(pt(i,t[n].anchor),pt(i,t[n].head))},origin:e&&e.origin};return L(i,"beforeSelectionChange",i,n),i.cm&&L(i.cm,"beforeSelectionChange",i.cm,n),n.ranges!=t.ranges?Hi(i.cm,n.ranges,n.ranges.length-1):t}function _r(t,e,n){var i=t.history.done,r=V(i);r&&r.ranges?Sr(t,i[i.length-1]=e,n):wr(t,e,n)}function wr(t,e,n){Sr(t,e,n),lr(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function Sr(t,e,n){(N(t,"beforeSelectionChange")||t.cm&&N(t.cm,"beforeSelectionChange"))&&(e=br(t,e,n)),Cr(t,Ar(t,e,n&&n.bias||(lt(e.primary().head,t.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!t.cm||Kn(t.cm)}function Cr(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,P(t.cm)),be(t,"cursorActivity",t))}function Tr(t){Cr(t,Ar(t,t.sel,null,!1))}function Ar(t,e,n,i){for(var r,o=0;o<e.ranges.length;o++){var a=e.ranges[o],s=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=Mr(t,a.anchor,s&&s.anchor,n,i),u=Mr(t,a.head,s&&s.head,n,i);(r||l!=a.anchor||u!=a.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new Ps(l,u))}return r?Hi(t.cm,r,e.primIndex):e}function Dr(t,e,n,i,r){var o=J(t,e.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,c="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(u?s.from<=e.ch:s.from<e.ch))&&(null==s.to||(c?s.to>=e.ch:s.to>e.ch))){if(r&&(L(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(i<0?1:-1),h=void 0;if((i<0?c:u)&&(d=kr(t,d,-i,d&&d.line==e.line?o:null)),d&&d.line==e.line&&(h=lt(d,n))&&(i<0?h<0:0<h))return Dr(t,d,e,i,r)}var f=l.find(i<0?-1:1);return(i<0?u:c)&&(f=kr(t,f,i,f.line==e.line?o:null)),f?Dr(t,f,e,i,r):null}}return e}function Mr(t,e,n,i,r){var o=i||1,a=Dr(t,e,n,o,r)||!r&&Dr(t,e,n,o,!0)||Dr(t,e,n,-o,r)||!r&&Dr(t,e,n,-o,!0);return a||(t.cantEdit=!0,st(t.first,0))}function kr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?pt(t,st(e.line-1)):null:0<n&&e.ch==(i||J(t,e.line)).text.length?e.line<t.first+t.size-1?st(e.line+1,0):null:new st(e.line,e.ch+n)}function Ir(t){t.setSelection(st(t.firstLine(),0),st(t.lastLine()),Za)}function Er(r,t,e){var o={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return o.canceled=!0}};return e&&(o.update=function(t,e,n,i){t&&(o.from=pt(r,t)),e&&(o.to=pt(r,e)),n&&(o.text=n),i!==undefined&&(o.origin=i)}),L(r,"beforeChange",r,o),r.cm&&L(r.cm,"beforeChange",r.cm,o),o.canceled?(r.cm&&(r.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function Lr(t,e,n){if(t.cm){if(!t.cm.curOp)return yi(t.cm,Lr)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(N(t,"beforeChange")||t.cm&&N(t.cm,"beforeChange"))||(e=Er(t,e,!0))){var i=vs&&!n&&Ft(t,e.from,e.to);if(i)for(var r=i.length-1;0<=r;--r)Or(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Or(t,e)}}function Or(t,n){if(1!=n.text.length||""!=n.text[0]||0!=lt(n.from,n.to)){var e=Ui(t,n);ar(t,n,e,t.cm?t.cm.curOp.id:NaN),Rr(t,n,e,Rt(t,n));var i=[];Qi(t,function(t,e){e||-1!=g(i,t.history)||(Hr(t.history,n),i.push(t.history)),Rr(t,n,null,Rt(t,n))})}}function Pr(r,o,t){var e=r.cm&&r.cm.state.suppressEdits;if(!e||t){for(var a,n=r.history,i=r.sel,s="undo"==o?n.done:n.undone,l="undo"==o?n.undone:n.done,u=0;u<s.length&&(a=s[u],t?!a.ranges||a.equals(r.sel):a.ranges);u++);if(u!=s.length){for(n.lastOrigin=n.lastSelOrigin=null;;){if(!(a=s.pop()).ranges){if(e)return void s.push(a);break}if(ur(a,l),t&&!a.equals(r.sel))return void wr(r,a,{clearRedo:!1});i=a}var c=[];ur(i,l),l.push({changes:c,generation:n.generation}),n.generation=a.generation||++n.maxGeneration;for(var d=N(r,"beforeChange")||r.cm&&N(r.cm,"beforeChange"),h=function(t){var n=a.changes[t];if(n.origin=o,d&&!Er(r,n,!1))return s.length=0,{};c.push(ir(r,n));var e=t?Ui(r,n):V(s);Rr(r,n,e,fr(r,n)),!t&&r.cm&&r.cm.scrollIntoView({from:n.from,to:Vi(n)});var i=[];Qi(r,function(t,e){e||-1!=g(i,t.history)||(Hr(t.history,n),i.push(t.history)),Rr(t,n,null,fr(t,n))})},f=a.changes.length-1;0<=f;--f){var p=h(f);if(p)return p.v}}}}function Nr(t,e){if(0!=e&&(t.first+=e,t.sel=new Os(v(t.sel.ranges,function(t){return new Ps(st(t.anchor.line+e,t.anchor.ch),st(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){Dn(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;i<n.viewTo;i++)Mn(t.cm,i,"gutter")}}function Rr(t,e,n,i){if(t.cm&&!t.cm.curOp)return yi(t.cm,Rr)(t,e,n,i);if(e.to.line<t.first)Nr(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);Nr(t,r),e={from:st(t.first,0),to:st(e.to.line+r,e.to.ch),text:[V(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:st(o,J(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=tt(t,e.from,e.to),n||(n=Ui(t,e)),t.cm?$r(t.cm,e,i):Ki(t,e,i),Sr(t,n,Za),t.cantEdit&&Mr(t,st(t.firstLine(),0))&&(t.cantEdit=!1)}}function $r(t,e,n){var i=t.doc,r=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=it(Zt(J(i,o.line))),i.iter(l,a.line+1,function(t){if(t==r.maxLine)return s=!0})),-1<i.sel.contains(e.from,e.to)&&P(t),Ki(i,e,n,Sn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=ie(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),Dt(i,o.line),_i(t,400);var u=e.text.length-(a.line-o.line)-1;e.full?Dn(t):o.line!=a.line||1!=e.text.length||Xi(t.doc,e)?Dn(t,o.line,a.line+1,u):Mn(t,o.line,"text");var c=N(t,"changes"),d=N(t,"change");if(d||c){var h={from:o,to:a,text:e.text,removed:e.removed,origin:e.origin};d&&be(t,"change",t,h),c&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}function Fr(t,e,n,i,r){var o;i||(i=n),lt(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof e&&(e=t.splitLines(e)),Lr(t,{from:n,to:i,text:e,origin:r})}function zr(t,e,n,i){n<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function jr(t,e,n,i){for(var r=0;r<t.length;++r){var o=t[r],a=!0;if(o.ranges){o.copied||((o=t[r]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)zr(o.ranges[s].anchor,e,n,i),zr(o.ranges[s].head,e,n,i)}else{for(var l=0;l<o.changes.length;++l){var u=o.changes[l];if(n<u.from.line)u.from=st(u.from.line+i,u.from.ch),u.to=st(u.to.line+i,u.to.ch);else if(e<=u.to.line){a=!1;break}}a||(t.splice(0,r+1),r=0)}}}function Hr(t,e){var n=e.from.line,i=e.to.line,r=e.text.length-(i-n)-1;jr(t.done,n,i,r),jr(t.undone,n,i,r)}function Br(t,e,n,i){var r=e,o=e;return"number"==typeof e?o=J(t,ft(t,e)):r=it(e),null==r?null:(i(o,r)&&t.cm&&Mn(t.cm,r,n),o)}function Vr(t){var e=this;this.lines=t,this.parent=null;for(var n=0,i=0;i<t.length;++i)t[i].parent=e,n+=t[i].height;this.height=n}function Wr(t){var e=this;this.children=t;for(var n=0,i=0,r=0;r<t.length;++r){var o=t[r];n+=o.chunkSize(),i+=o.height,o.parent=e}this.size=n,this.height=i,this.parent=null}function Ur(t,e,n){ne(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Xn(t,n)}function qr(i,t,e,n){var r=new Ns(i,e,n),o=i.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),Br(i,t,"widget",function(t){var e=t.widgets||(t.widgets=[]);if(null==r.insertAt?e.push(r):e.splice(Math.min(e.length-1,Math.max(0,r.insertAt)),0,r),r.line=t,o&&!te(i,t)){var n=ne(t)<i.scrollTop;nt(t,t.height+Pe(r)),n&&Xn(o,r.height),o.curOp.forceUpdate=!0}return!0}),o&&be(o,"lineWidgetAdded",o,r,"number"==typeof t?t:it(t)),r}function Gr(e,n,i,t,r){if(t&&t.shared)return Yr(e,n,i,t,r);if(e.cm&&!e.cm.curOp)return yi(e.cm,Gr)(e,n,i,t,r);var o=new $s(e,r),a=lt(n,i);if(t&&f(t,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=d("span",[o.replacedWith],"CodeMirror-widget"),t.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),t.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Yt(e,n.line,n,i,o)||n.line!=i.line&&Yt(e,i.line,n,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");kt()}o.addToHistory&&ar(e,{from:n,to:i,origin:"markText"},e.sel,NaN);var s,l=n.line,u=e.cm;if(e.iter(l,i.line+1,function(t){u&&o.collapsed&&!u.options.lineWrapping&&Zt(t)==u.display.maxLine&&(s=!0),o.collapsed&&l!=n.line&&nt(t,0),Ot(t,new It(o,l==n.line?n.ch:null,l==i.line?i.ch:null)),++l}),o.collapsed&&e.iter(n.line,i.line+1,function(t){te(e,t)&&nt(t,0)}),o.clearOnEnter&&rs(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Mt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Rs,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Dn(u,n.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=n.line;c<=i.line;c++)Mn(u,c,"text");o.atomic&&Tr(u.doc),be(u,"markerAdded",u,o)}return o}function Yr(t,n,i,r,o){(r=f(r)).shared=!1;var a=[Gr(t,n,i,r,o)],s=a[0],l=r.widgetNode;return Qi(t,function(t){l&&(r.widgetNode=l.cloneNode(!0)),a.push(Gr(t,pt(t,n),pt(t,i),r,o));for(var e=0;e<t.linked.length;++e)if(t.linked[e].isParent)return;s=V(a)}),new Fs(a,s)}function Zr(t){return t.findMarks(st(t.first,0),t.clipPos(st(t.lastLine())),function(t){return t.parent})}function Xr(t,e){for(var n=0;n<e.length;n++){var i=e[n],r=i.find(),o=t.clipPos(r.from),a=t.clipPos(r.to);if(lt(o,a)){var s=Gr(t,o,a,i.primary,i.primary.type);i.markers.push(s),s.parent=i}}}function Kr(o){for(var t=function(t){var e=o[t],n=[e.primary.doc];Qi(e.primary.doc,function(t){return n.push(t)});for(var i=0;i<e.markers.length;i++){var r=e.markers[i];-1==g(n,r.doc)&&(r.parent=null,e.markers.splice(i--,1))}},e=0;e<o.length;e++)t(e)}function Qr(t){var r=this;if(eo(r),!O(r,t)&&!Ne(r.display,t)){R(t),wa&&(Hs=+new Date);var o=Tn(r,t,!0),e=t.dataTransfer.files;if(o&&!r.isReadOnly())if(e&&e.length&&window.FileReader&&window.File)for(var a=e.length,s=Array(a),l=0,n=function(t,n){if(!r.options.allowDropFileTypes||-1!=g(r.options.allowDropFileTypes,t.type)){var i=new FileReader;i.onload=yi(r,function(){var t=i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),s[n]=t,++l==a){var e={from:o=pt(r.doc,o),to:o,text:r.doc.splitLines(s.join(r.doc.lineSeparator())),origin:"paste"};Lr(r.doc,e),_r(r.doc,Bi(o,Vi(e)))}}),i.readAsText(t)}},i=0;i<a;++i)n(e[i],i);else{if(r.state.draggingText&&-1<r.doc.sel.contains(o))return r.state.draggingText(t),void setTimeout(function(){return r.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var c;if(r.state.draggingText&&!r.state.draggingText.copy&&(c=r.listSelections()),Sr(r.doc,Bi(o,o)),c)for(var d=0;d<c.length;++d)Fr(r.doc,"",c[d].anchor,c[d].head,"drag");r.replaceSelection(u,"around","paste"),r.display.input.focus()}}catch(t){}}}}function Jr(t,e){if(wa&&(!t.state.draggingText||+new Date-Hs<100))F(e);else if(!O(t,e)&&!Ne(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!Ma)){var n=_("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Da&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),Da&&n.parentNode.removeChild(n)}}function to(t,e){var n=Tn(t,e);if(n){var i=document.createDocumentFragment();Nn(t,n,i),t.display.dragCursor||(t.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),o(t.display.dragCursor,i)}}function eo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function no(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<t.length;i++){var r=t[i].CodeMirror;r&&n.push(r)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}function io(){Bs||(ro(),Bs=!0)}function ro(){var t;rs(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,no(oo)},100))}),rs(window,"blur",function(){return no(Bn)})}function oo(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}function ao(t){var e,n,i,r,o=t.split(/-(?!$)/);t=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))r=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),r&&(t="Cmd-"+t),i&&(t="Shift-"+t),t}function so(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete t[n];continue}for(var r=v(n.split(" "),ao),o=0;o<r.length;o++){var a=void 0,s=void 0;o==r.length-1?(s=r.join(" "),a=i):(s=r.slice(0,o+1).join(" "),a="...");var l=e[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else e[s]=a}delete t[n]}for(var u in e)t[u]=e[u];return t}function lo(t,e,n,i){var r=(e=fo(e)).call?e.call(t,i):e[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return lo(t,e.fallthrough,n,i);for(var o=0;o<e.fallthrough.length;o++){var a=lo(t,e.fallthrough[o],n,i);if(a)return a}}}function uo(t){var e="string"==typeof t?t:Vs[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function co(t,e,n){var i=t;return e.altKey&&"Alt"!=i&&(t="Alt-"+t),(za?e.metaKey:e.ctrlKey)&&"Ctrl"!=i&&(t="Ctrl-"+t),(za?e.ctrlKey:e.metaKey)&&"Cmd"!=i&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=i&&(t="Shift-"+t),t}function ho(t,e){if(Da&&34==t.keyCode&&t["char"])return!1;var n=Vs[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),co(n,t,e))}function fo(t){return"string"==typeof t?Gs[t]:t}function po(e,t){for(var n=e.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=t(n[r]);i.length&<(o.from,V(i).to)<=0;){var a=i.pop();if(lt(a.from,o.from)<0){o.from=a.from;break}}i.push(o)}vi(e,function(){for(var t=i.length-1;0<=t;t--)Fr(e.doc,"",i[t].from,i[t].to,"+delete");Kn(e)})}function go(t,e,n){var i=A(t.text,e+n,n);return i<0||i>t.text.length?null:i}function mo(t,e,n){var i=go(t,e.ch,n);return null==i?null:new st(e.line,i,n<0?"after":"before")}function vo(t,e,n,i,r){if(t){var o=E(n,e.doc.direction);if(o){var a,s=r<0?V(o):o[0],l=r<0==(1==s.level)?"after":"before";if(0<s.level||"rtl"==e.doc.direction){var u=Ge(e,n);a=r<0?n.text.length-1:0;var c=Ye(e,u,a).top;a=D(function(t){return Ye(e,u,t).top==c},r<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=go(n,a,1))}else a=r<0?s.to:s.from;return new st(i,a,l)}}return new st(i,r<0?n.text.length:0,r<0?"before":"after")}function yo(e,n,s,t){var l=E(n,e.doc.direction);if(!l)return mo(n,s,t);s.ch>=n.text.length?(s.ch=n.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var i=b(l,s.ch,s.sticky),r=l[i];if("ltr"==e.doc.direction&&r.level%2==0&&(0<t?r.to>s.ch:r.from<s.ch))return mo(n,s,t);var o,u=function(t,e){return go(n,t instanceof st?t.ch:t,e)},a=function(t){return e.options.lineWrapping?(o=o||Ge(e,n),pn(e,n,o,t)):{begin:0,end:n.text.length}},c=a("before"==s.sticky?u(s,-1):s.ch);if("rtl"==e.doc.direction||1==r.level){var d=1==r.level==t<0,h=u(s,d?1:-1);if(null!=h&&(d?h<=r.to&&h<=c.end:h>=r.from&&h>=c.begin)){var f=d?"before":"after";return new st(s.line,h,f)}}var p=function(t,e,n){for(var i=function(t,e){return e?new st(s.line,u(t,1),"before"):new st(s.line,t,"after")};0<=t&&t<l.length;t+=e){var r=l[t],o=0<e==(1!=r.level),a=o?n.begin:u(n.end,-1);if(r.from<=a&&a<r.to)return i(a,o);if(a=o?r.from:u(r.to,-1),n.begin<=a&&a<n.end)return i(a,o)}},g=p(i+t,t,c);if(g)return g;var m=0<t?c.end:u(c.begin,-1);return null==m||0<t&&m==n.text.length||!(g=p(0<t?0:l.length-1,t,a(m)))?null:g}function xo(t,e){var n=J(t.doc,e),i=Zt(n);return i!=n&&(e=it(i)),vo(!0,t,i,e,1)}function bo(t,e){var n=J(t.doc,e),i=Xt(n);return i!=n&&(e=it(i)),vo(!0,t,n,e,-1)}function _o(t,e){var n=xo(t,e.line),i=J(t.doc,n.line),r=E(i,t.doc.direction);if(r&&0!=r[0].level)return n;var o=Math.max(0,i.text.search(/\S/)),a=e.line==n.line&&e.ch<=o&&e.ch;return st(n.line,a?0:o,n.sticky)}function wo(t,e,n){if("string"==typeof e&&!(e=Xs[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=Ya}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function So(t,e,n){for(var i=0;i<t.state.keyMaps.length;i++){var r=lo(e,t.state.keyMaps[i],n,t);if(r)return r}return t.options.extraKeys&&lo(e,t.options.extraKeys,n,t)||lo(e,t.options.keyMap,n,t)}function Co(t,e,n,i){var r=t.state.keySeq;if(r){if(uo(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:Ks.set(50,function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())}),To(t,r+" "+e,n,i))return!0}return To(t,e,n,i)}function To(t,e,n,i){var r=So(t,e,i);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&be(t,"keyHandled",t,e,n),"handled"!=r&&"multi"!=r||(R(n),Fn(t)),!!r}function Ao(e,t){var n=ho(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+n,t,function(t){return wo(e,t,!0)})||Co(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return wo(e,t)}):Co(e,n,t,function(t){return wo(e,t)}))}function Do(e,t,n){return Co(e,"'"+n+"'",t,function(t){return wo(e,t,!0)})}function Mo(t){var e=this;if(e.curOp.focus=h(),!O(e,t)){wa&&Sa<11&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var i=Ao(e,t);Da&&(Qs=i?n:null,!i&&88==n&&!ls&&(Pa?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||ko(e)}}function ko(t){function e(t){18!=t.keyCode&&t.altKey||(Ha(n,"CodeMirror-crosshair"),k(document,"keyup",e),k(document,"mouseover",e))}var n=t.display.lineDiv;i(n,"CodeMirror-crosshair"),rs(document,"keyup",e),rs(document,"mouseover",e)}function Io(t){16==t.keyCode&&(this.doc.sel.shift=!1),O(this,t)}function Eo(t){var e=this;if(!(Ne(e.display,t)||O(e,t)||t.ctrlKey&&!t.altKey||Pa&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(Da&&n==Qs)return Qs=null,void R(t);if(!Da||t.which&&!(t.which<10)||!Ao(e,t)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(Do(e,t,r)||e.display.input.onKeyPress(t))}}}function Lo(t,e){var n=+new Date;return Zs&&Zs.compare(n,t,e)?(Ys=Zs=null,"triple"):Ys&&Ys.compare(n,t,e)?(Zs=new tl(n,t,e),Ys=null,"double"):(Ys=new tl(n,t,e),Zs=null,"single")}function Oo(t){var e=this,n=e.display;if(!(O(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,Ne(n,t))Ca||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!Bo(e,t)){var i=Tn(e,t),r=j(t),o=i?Lo(i,r):"single";window.focus(),1==r&&e.state.selectingText&&e.state.selectingText(t),i&&Po(e,r,i,o,t)||(1==r?i?Ro(e,i,o,t):z(t)==n.scroller&&R(t):2==r?(i&&mr(e.doc,i),setTimeout(function(){return n.input.focus()},20)):3==r&&(ja?e.display.input.onContextMenu(t):jn(e)))}}function Po(n,t,i,e,r){var o="Click";return"double"==e?o="Double"+o:"triple"==e&&(o="Triple"+o),Co(n,co(o=(1==t?"Left":2==t?"Middle":"Right")+o,r),r,function(t){if("string"==typeof t&&(t=Xs[t]),!t)return!1;var e=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),e=t(n,i)!=Ya}finally{n.state.suppressEdits=!1}return e})}function No(t,e,n){var i=t.getOption("configureMouse"),r=i?i(t,e,n):{};if(null==r.unit){var o=Na?n.shiftKey&&n.metaKey:n.altKey;r.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==r.extend||t.doc.extend)&&(r.extend=t.doc.extend||n.shiftKey),null==r.addNew&&(r.addNew=Pa?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(Pa?n.altKey:n.ctrlKey)),r}function Ro(t,e,n,i){wa?setTimeout(u(zn,t),0):t.curOp.focus=h();var r,o=No(t,n,i),a=t.doc.sel;t.options.dragDrop&&os&&!t.isReadOnly()&&"single"==n&&-1<(r=a.contains(e))&&(lt((r=a.ranges[r]).from(),e)<0||0<e.xRel)&&(0<lt(r.to(),e)||e.xRel<0)?$o(t,i,e,o):zo(t,i,e,o)}function $o(e,n,i,r){var o=e.display,a=!1,s=yi(e,function(t){Ca&&(o.scroller.draggable=!1),e.state.draggingText=!1,k(o.wrapper.ownerDocument,"mouseup",s),k(o.wrapper.ownerDocument,"mousemove",l),k(o.scroller,"dragstart",u),k(o.scroller,"drop",s),a||(R(t),r.addNew||mr(e.doc,i,null,null,r.extend),Ca||wa&&9==Sa?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),l=function(t){a=a||10<=Math.abs(n.clientX-t.clientX)+Math.abs(n.clientY-t.clientY)},u=function(){return a=!0};Ca&&(o.scroller.draggable=!0),(e.state.draggingText=s).copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),rs(o.wrapper.ownerDocument,"mouseup",s),rs(o.wrapper.ownerDocument,"mousemove",l),rs(o.scroller,"dragstart",u),rs(o.scroller,"drop",s),jn(e),setTimeout(function(){return o.input.focus()},20)}function Fo(t,e,n){if("char"==n)return new Ps(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ps(st(e.line,0),pt(t.doc,st(e.line+1,0)));var i=n(t,e);return new Ps(i.from,i.to)}function zo(m,t,v,y){function o(t){if(0!=lt(S,t))if(S=t,"rectangle"==y.unit){for(var e=[],n=m.options.tabSize,i=C(J(x,v.line).text,v.ch,n),r=C(J(x,t.line).text,t.ch,n),o=Math.min(i,r),a=Math.max(i,r),s=Math.min(v.line,t.line),l=Math.min(m.lastLine(),Math.max(v.line,t.line));s<=l;s++){var u=J(x,s).text,c=T(u,o,n);o==a?e.push(new Ps(st(s,c),st(s,c))):u.length>c&&e.push(new Ps(st(s,c),st(s,T(u,a,n))))}e.length||e.push(new Ps(v,v)),wr(x,Hi(m,w.ranges.slice(0,_).concat(e),_),{origin:"*mouse",scroll:!1}),m.scrollIntoView(t)}else{var d,h=b,f=Fo(m,t,y.unit),p=h.anchor;0<lt(f.anchor,p)?(d=f.head,p=ht(h.from(),f.anchor)):(d=f.anchor,p=dt(h.to(),f.head));var g=w.ranges.slice(0);g[_]=jo(m,new Ps(pt(x,p),d)),wr(x,Hi(m,g,_),Xa)}}function a(t){var e=++u,n=Tn(m,t,!0,"rectangle"==y.unit);if(n)if(0!=lt(n,S)){m.curOp.focus=h(),o(n);var i=Un(s,x);(n.line>=i.to||n.line<i.from)&&setTimeout(yi(m,function(){u==e&&a(t)}),150)}else{var r=t.clientY<l.top?-20:t.clientY>l.bottom?20:0;r&&setTimeout(yi(m,function(){u==e&&(s.scroller.scrollTop+=r,a(t))}),50)}}function e(t){m.state.selectingText=!1,u=Infinity,t&&(R(t),s.input.focus()),k(s.wrapper.ownerDocument,"mousemove",r),k(s.wrapper.ownerDocument,"mouseup",c),x.history.lastSelOrigin=null}var s=m.display,x=m.doc;R(t);var b,_,w=x.sel,n=w.ranges;if(y.addNew&&!y.extend?(_=x.sel.contains(v),b=-1<_?n[_]:new Ps(v,v)):(b=x.sel.primary(),_=x.sel.primIndex),"rectangle"==y.unit)y.addNew||(b=new Ps(v,v)),v=Tn(m,t,!0,!0),_=-1;else{var i=Fo(m,v,y.unit);b=y.extend?gr(b,i.anchor,i.head,y.extend):i}y.addNew?-1==_?(_=n.length,wr(x,Hi(m,n.concat([b]),_),{scroll:!1,origin:"*mouse"})):1<n.length&&n[_].empty()&&"char"==y.unit&&!y.extend?(wr(x,Hi(m,n.slice(0,_).concat(n.slice(_+1)),0),{scroll:!1,origin:"*mouse"}),w=x.sel):yr(x,_,b,Xa):(wr(x,new Os([b],_=0),Xa),w=x.sel);var S=v,l=s.wrapper.getBoundingClientRect(),u=0,r=yi(m,function(t){0!==t.buttons&&j(t)?a(t):e(t)}),c=yi(m,e);m.state.selectingText=c,rs(s.wrapper.ownerDocument,"mousemove",r),rs(s.wrapper.ownerDocument,"mouseup",c)}function jo(t,e){var n=e.anchor,i=e.head,r=J(t.doc,n.line);if(0==lt(n,i)&&n.sticky==i.sticky)return e;var o=E(r);if(!o)return e;var a=b(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return e;if(i.line!=n.line)l=0<(i.line-n.line)*("ltr"==t.doc.direction?1:-1);else{var c=b(o,i.ch,i.sticky),d=c-a||(i.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?d<0:0<d}var h=o[u+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?e:new Ps(new st(n.line,p,g),i)}function Ho(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&R(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!N(t,n))return $(e)
|
|
;o-=s.top-a.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var u=a.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=r)return L(t,n,t,rt(t.doc,o),t.display.gutterSpecs[l].className,e),$(e)}}function Bo(t,e){return Ho(t,e,"gutterClick",!0)}function Vo(t,e){Ne(t.display,e)||Wo(t,e)||O(t,e,"contextmenu")||ja||t.display.input.onContextMenu(e)}function Wo(t,e){return!!N(t,"gutterContextMenu")&&Ho(t,e,"gutterContextMenu",!1)}function Uo(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),en(t)}function qo(r){function t(t,e,i,n){r.defaults[t]=e,i&&(o[t]=n?function(t,e,n){n!=el&&i(t,e,n)}:i)}var o=r.optionHandlers;r.defineOption=t,r.Init=el,t("value","",function(t,e){return t.setValue(e)},!0),t("mode",null,function(t,e){t.doc.modeOption=e,Yi(t)},!0),t("indentUnit",2,Yi,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(t){Zi(t),en(t),Dn(t)},!0),t("lineSeparator",null,function(t,i){if(t.doc.lineSep=i){var r=[],o=t.doc.first;t.doc.iter(function(t){for(var e=0;;){var n=t.text.indexOf(i,e);if(-1==n)break;e=n+i.length,r.push(st(o,n))}o++});for(var e=r.length-1;0<=e;e--)Fr(t.doc,i,r[e],st(r[e].line,r[e].ch+i.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=el&&t.refresh()}),t("specialCharPlaceholder",ue,function(t){return t.refresh()},!0),t("electricChars",!0),t("inputStyle",Oa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),t("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),t("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),t("rtlMoveVisually",!Ra),t("wholeLineUpdateBefore",!0),t("theme","default",function(t){Uo(t),Ri(t)},!0),t("keyMap","default",function(t,e,n){var i=fo(e),r=n!=el&&fo(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Yo,!0),t("gutters",[],function(t,e){t.display.gutterSpecs=Pi(e,t.options.lineNumbers),Ri(t)},!0),t("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?wn(t.display)+"px":"0",t.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(t){return ai(t)},!0),t("scrollbarStyle","native",function(t){li(t),ai(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),t("lineNumbers",!1,function(t,e){t.display.gutterSpecs=Pi(t.options.gutters,e),Ri(t)},!0),t("firstLineNumber",1,Ri,!0),t("lineNumberFormatter",function(t){return t},Ri,!0),t("showCursorWhenSelecting",!1,On,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("selectionsMayTouch",!1),t("readOnly",!1,function(t,e){"nocursor"==e&&(Bn(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),t("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),t("dragDrop",!0,Go),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,On,!0),t("singleCursorHeightPerLine",!0,On,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Zi,!0),t("addModeClass",!1,Zi,!0),t("pollInterval",100),t("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),t("historyEventDelay",1250),t("viewportMargin",10,function(t){return t.refresh()},!0),t("maxHighlightLength",1e4,Zi,!0),t("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),t("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),t("autofocus",null),t("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),t("phrases",null)}function Go(t,e,n){if(!e!=!(n&&n!=el)){var i=t.display.dragFunctions,r=e?rs:k;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Yo(t){t.options.lineWrapping?(i(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ha(t.display.wrapper,"CodeMirror-wrap"),re(t)),Cn(t),Dn(t),en(t),setTimeout(function(){return ai(t)},100)}function Zo(t,e){var n=this;if(!(this instanceof Zo))return new Zo(t,e);this.options=e=e?f(e):{},f(nl,e,!1);var i=e.value;"string"==typeof i?i=new js(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var r=new Zo.inputStyles[e.inputStyle](this),o=this.display=new $i(t,i,r,e);for(var a in Uo(o.wrapper.CodeMirror=this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),li(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Va,keySeq:null,specialChars:null},e.autofocus&&!Oa&&o.input.focus(),wa&&Sa<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Xo(this),io(),ui(this),this.curOp.forceUpdate=!0,Ji(this,i),e.autofocus&&!Oa||this.hasFocus()?setTimeout(u(Hn,this),20):Bn(this),il)il.hasOwnProperty(a)&&il[a](n,e[a],el);Oi(this),e.finishInit&&e.finishInit(this);for(var s=0;s<rl.length;++s)rl[s](n);ci(this),Ca&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Xo(r){function o(){s.activeTouch&&(i=setTimeout(function(){return s.activeTouch=null},1e3),(l=s.activeTouch).end=+new Date)}function n(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function a(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return 400<n*n+i*i}var s=r.display;rs(s.scroller,"mousedown",yi(r,Oo)),rs(s.scroller,"dblclick",wa&&Sa<11?yi(r,function(t){if(!O(r,t)){var e=Tn(r,t);if(e&&!Bo(r,t)&&!Ne(r.display,t)){R(t);var n=r.findWordAt(e);mr(r.doc,n.anchor,n.head)}}}):function(t){return O(r,t)||R(t)}),rs(s.scroller,"contextmenu",function(t){return Vo(r,t)});var i,l={end:0};rs(s.scroller,"touchstart",function(t){if(!O(r,t)&&!n(t)&&!Bo(r,t)){s.input.ensurePolled(),clearTimeout(i);var e=+new Date;s.activeTouch={start:e,moved:!1,prev:e-l.end<=300?l:null},1==t.touches.length&&(s.activeTouch.left=t.touches[0].pageX,s.activeTouch.top=t.touches[0].pageY)}}),rs(s.scroller,"touchmove",function(){s.activeTouch&&(s.activeTouch.moved=!0)}),rs(s.scroller,"touchend",function(t){var e=s.activeTouch;if(e&&!Ne(s,t)&&null!=e.left&&!e.moved&&new Date-e.start<300){var n,i=r.coordsChar(s.activeTouch,"page");n=!e.prev||a(e,e.prev)?new Ps(i,i):!e.prev.prev||a(e,e.prev.prev)?r.findWordAt(i):new Ps(st(i.line,0),pt(r.doc,st(i.line+1,0))),r.setSelection(n.anchor,n.head),r.focus(),R(t)}o()}),rs(s.scroller,"touchcancel",o),rs(s.scroller,"scroll",function(){s.scroller.clientHeight&&(ni(r,s.scroller.scrollTop),ri(r,s.scroller.scrollLeft,!0),L(r,"scroll",r))}),rs(s.scroller,"mousewheel",function(t){return ji(r,t)}),rs(s.scroller,"DOMMouseScroll",function(t){return ji(r,t)}),rs(s.wrapper,"scroll",function(){return s.wrapper.scrollTop=s.wrapper.scrollLeft=0}),s.dragFunctions={enter:function(t){O(r,t)||F(t)},over:function(t){O(r,t)||(to(r,t),F(t))},start:function(t){return Jr(r,t)},drop:yi(r,Qr),leave:function(t){O(r,t)||eo(r)}};var t=s.input.getField();rs(t,"keyup",function(t){return Io.call(r,t)}),rs(t,"keydown",yi(r,Mo)),rs(t,"keypress",yi(r,Eo)),rs(t,"focus",function(t){return Hn(r,t)}),rs(t,"blur",function(t){return Bn(r,t)})}function Ko(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=xt(t,e).state:n="prev");var a=t.options.tabSize,s=J(o,e),l=C(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((u=o.mode.indent(r,s.text.slice(c.length),s.text))==Ya||150<u)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=e>o.first?C(J(o,e-1).text,null,a):0:"add"==n?u=l+t.options.indentUnit:"subtract"==n?u=l-t.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",h=0;if(t.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)h+=a,d+="\t";if(h<u&&(d+=w(u-h)),d!=c)return Fr(o,d,st(e,0),st(e,c.length),"+input"),!(s.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==e&&g.head.ch<c.length){var m=st(e,c.length);yr(o,p,new Ps(m,m));break}}}function Qo(t){ol=t}function Jo(t,e,n,i,r){var o=t.doc;t.display.shift=!1,i||(i=o.sel);var a=+new Date-200,s="paste"==r||t.state.pasteIncoming>a,l=as(e),u=null;if(s&&1<i.ranges.length)if(ol&&ol.text.join("\n")==e){if(i.ranges.length%ol.text.length==0){u=[];for(var c=0;c<ol.text.length;c++)u.push(o.splitLines(ol.text[c]))}}else l.length==i.ranges.length&&t.options.pasteLinesPerSelection&&(u=v(l,function(t){return[t]}));for(var d=t.curOp.updateInput,h=i.ranges.length-1;0<=h;h--){var f=i.ranges[h],p=f.from(),g=f.to();f.empty()&&(n&&0<n?p=st(p.line,p.ch-n):t.state.overwrite&&!s?g=st(g.line,Math.min(J(o,g.line).text.length,g.ch+V(l).length)):s&&ol&&ol.lineWise&&ol.text.join("\n")==e&&(p=g=st(p.line,0)));var m={from:p,to:g,text:u?u[h%u.length]:l,origin:r||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};Lr(t.doc,m),be(t,"inputRead",t,m)}e&&!s&&ea(t,e),Kn(t),t.curOp.updateInput<2&&(t.curOp.updateInput=d),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function ta(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||vi(e,function(){return Jo(e,n,0,null,"paste")}),!0}function ea(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;0<=i;i--){var r=n.ranges[i];if(!(100<r.head.ch||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(-1<e.indexOf(o.electricChars.charAt(s))){a=Ko(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(J(t.doc,r.head.line).text.slice(0,r.head.ch))&&(a=Ko(t,r.head.line,"smart"));a&&be(t,"electricInput",t,r.head.line)}}}function na(t){for(var e=[],n=[],i=0;i<t.doc.sel.ranges.length;i++){var r=t.doc.sel.ranges[i].head.line,o={anchor:st(r,0),head:st(r+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function ia(t,e,n,i){t.setAttribute("autocorrect",n?"":"off"),t.setAttribute("autocapitalize",i?"":"off"),t.setAttribute("spellcheck",!!e)}function ra(){var t=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=_("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ca?t.style.width="1000px":t.setAttribute("wrap","off"),Ea&&(t.style.border="1px solid black"),ia(t),e}function oa(r){var o=r.optionHandlers,c=r.helpers={};r.prototype={constructor:r,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,e){var n=this.options,i=n[t];n[t]==e&&"mode"!=t||(n[t]=e,o.hasOwnProperty(t)&&yi(this,o[t])(this,e,i),L(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](fo(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:xi(function(t,e){var n=t.token?t:r.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");a(this.state.overlays,{mode:n,modeSpec:t,opaque:e&&e.opaque,priority:e&&e.priority||0},function(t){return t.priority}),this.state.modeGen++,Dn(this)}),removeOverlay:xi(function(t){for(var e=this,n=this.state.overlays,i=0;i<n.length;++i){var r=n[i].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return n.splice(i,1),e.state.modeGen++,void Dn(e)}}),indentLine:xi(function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),ot(this.doc,t)&&Ko(this,t,e,n)}),indentSelection:xi(function(t){for(var e=this,n=this.doc.sel.ranges,i=-1,r=0;r<n.length;r++){var o=n[r];if(o.empty())o.head.line>i&&(Ko(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&Kn(e));else{var a=o.from(),s=o.to(),l=Math.max(i,a.line);i=Math.min(e.lastLine(),s.line-(s.ch?0:1))+1;for(var u=l;u<i;++u)Ko(e,u,t);var c=e.doc.sel.ranges;0==a.ch&&n.length==c.length&&0<c[r].from().ch&&yr(e.doc,r,new Ps(a,c[r].to()),Za)}}}),getTokenAt:function(t,e){return St(this,t,e)},getLineTokens:function(t,e){return St(this,st(t),e,!0)},getTokenTypeAt:function(t){t=pt(this.doc,t);var e,n=yt(this,J(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]<o)){e=n[2*a+2];break}i=a+1}}var s=e?e.indexOf("overlay "):-1;return s<0?e:0==s?null:e.slice(0,s-1)},getModeAt:function(t){var e=this.doc.mode;return e.innerMode?r.innerMode(e,this.getTokenAt(t).state).mode:e},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var n=this,i=[];if(!c.hasOwnProperty(e))return i;var r=c[e],o=this.getModeAt(t);if("string"==typeof o[e])r[o[e]]&&i.push(r[o[e]]);else if(o[e])for(var a=0;a<o[e].length;a++){var s=r[o[e][a]];s&&i.push(s)}else o.helperType&&r[o.helperType]?i.push(r[o.helperType]):r[o.name]&&i.push(r[o.name]);for(var l=0;l<r._global.length;l++){var u=r._global[l];u.pred(o,n)&&-1==g(i,u.val)&&i.push(u.val)}return i},getStateAfter:function(t,e){var n=this.doc;return xt(this,(t=ft(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return un(this,null==t?n.head:"object"==typeof t?pt(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return ln(this,pt(this.doc,t),e||"page")},coordsChar:function(t,e){return hn(this,(t=sn(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=sn(this,{top:t,left:0},e||"page").top,rt(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var i,r=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:o<t&&(t=o,r=!0),i=J(this.doc,t)}else i=t;return an(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-ne(i):0)},defaultTextHeight:function(){return xn(this.display)},defaultCharWidth:function(){return bn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,a=(t=un(this,pt(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)a=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(a=t.bottom),s+e.offsetWidth>u&&(s=u-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==r?(s=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&Yn(this,{left:s,top:a,right:s+e.offsetWidth,bottom:a+e.offsetHeight})},triggerOnKeyDown:xi(Mo),triggerOnKeyPress:xi(Eo),triggerOnKeyUp:Io,triggerOnMouseDown:xi(Oo),execCommand:function(t){if(Xs.hasOwnProperty(t))return Xs[t].call(null,this)},triggerElectric:xi(function(t){ea(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var a=pt(this.doc,t),s=0;s<e&&!(a=aa(r.doc,a,o,n,i)).hitSide;++s);return a},moveH:xi(function(e,n){var i=this;this.extendSelectionsBy(function(t){return i.display.shift||i.doc.extend||t.empty()?aa(i.doc,t.head,e,n,i.options.rtlMoveVisually):e<0?t.from():t.to()},Ka)}),deleteH:xi(function(n,i){var t=this.doc.sel,r=this.doc;t.somethingSelected()?r.replaceSelection("",null,"+delete"):po(this,function(t){var e=aa(r,t.head,n,i,!1);return n<0?{from:e,to:t.head}:{from:t.head,to:e}})}),findPosV:function(t,e,n,i){var r=this,o=1,a=i;e<0&&(o=-1,e=-e);for(var s=pt(this.doc,t),l=0;l<e;++l){var u=un(r,s,"div");if(null==a?a=u.left:u.left=a,(s=sa(r,u,o,n)).hitSide)break}return s},moveV:xi(function(i,r){var o=this,a=this.doc,s=[],l=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(t){if(l)return i<0?t.from():t.to();var e=un(o,t.head,"div");null!=t.goalColumn&&(e.left=t.goalColumn),s.push(e.left);var n=sa(o,e,i,r);return"page"==r&&t==a.sel.primary()&&Xn(o,ln(o,n,"div").top-e.top),n},Ka),s.length)for(var t=0;t<a.sel.ranges.length;t++)a.sel.ranges[t].goalColumn=s[t]}),findWordAt:function(t){var e=J(this.doc,t.line).text,n=t.ch,i=t.ch;if(e){var r=this.getHelper(t,"wordChars");"before"!=t.sticky&&i!=e.length||!n?++i:--n;for(var o=e.charAt(n),a=y(o,r)?function(t){return y(t,r)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!y(t)};0<n&&a(e.charAt(n-1));)--n;for(;i<e.length&&a(e.charAt(i));)++i}return new Ps(st(t.line,n),st(t.line,i))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?i(this.display.cursorDiv,"CodeMirror-overwrite"):Ha(this.display.cursorDiv,"CodeMirror-overwrite"),L(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==h()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:xi(function(t,e){Qn(this,t,e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-ze(this)-this.display.barHeight,width:t.scrollWidth-ze(this)-this.display.barWidth,clientHeight:He(this),clientWidth:je(this)}},scrollIntoView:xi(function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:st(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?Jn(this,t):ei(this,t.from,t.to,t.margin)}),setSize:xi(function(t,e){var n=this,i=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=i(t)),null!=e&&(this.display.wrapper.style.height=i(e)),this.options.lineWrapping&&tn(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){Mn(n,r,"widget");break}++r}),this.curOp.forceUpdate=!0,L(this,"refresh",this)}),operation:function(t){return vi(this,t)},startOperation:function(){return ui(this)},endOperation:function(){return ci(this)},refresh:xi(function(){var t=this.display.cachedTextHeight;Dn(this),this.curOp.forceUpdate=!0,en(this),Qn(this,this.doc.scrollLeft,this.doc.scrollTop),Ii(this.display),(null==t||.5<Math.abs(t-xn(this.display)))&&Cn(this),L(this,"refresh",this)}),swapDoc:xi(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Ji(this,t),en(this),this.display.input.reset(),Qn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,be(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},t(r),r.registerHelper=function(t,e,n){c.hasOwnProperty(t)||(c[t]=r[t]={_global:[]}),c[t][e]=n},r.registerGlobalHelper=function(t,e,n,i){r.registerHelper(t,e,i),c[t]._global.push({pred:n,val:i})}}function aa(n,i,r,t,o){function a(){var t=i.line+r;return!(t<n.first||t>=n.first+n.size)&&(i=new st(t,i.ch,i.sticky),u=J(n,t))}function e(t){var e;if(null==(e=o?yo(n.cm,u,i,r):mo(u,i,r))){if(t||!a())return!1;i=vo(o,n.cm,u,i.line,r)}else i=e;return!0}var s=i,l=r,u=J(n,i.line);if("char"==t)e();else if("column"==t)e(!0);else if("word"==t||"group"==t)for(var c=null,d="group"==t,h=n.cm&&n.cm.getHelper(i,"wordChars"),f=!0;!(r<0)||e(!f);f=!1){var p=u.text.charAt(i.ch)||"\n",g=y(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||g||(g="s"),c&&c!=g){r<0&&(r=1,e(),i.sticky="after");break}if(g&&(c=g),0<r&&!e(!f))break}var m=Mr(n,i,s,l,!0);return ut(s,m)&&(m.hitSide=!0),m}function sa(t,e,n,i){var r,o,a=t.doc,s=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*xn(t.display),3);r=(0<n?e.bottom:e.top)+n*u}else"line"==i&&(r=0<n?e.bottom+3:e.top-3);for(;(o=hn(t,s,r)).outside;){if(n<0?r<=0:r>=a.height){o.hitSide=!0;break}r+=5*n}return o}function la(t,e){var n=qe(t,e.line);if(!n||n.hidden)return null;var i=J(t.doc,e.line),r=Ve(n,i,e.line),o=E(i,t.doc.direction),a="left";o&&(a=b(o,e.ch)%2?"right":"left");var s=Ze(r.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ua(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ca(t,e){return e&&(t.bad=!0),t}function da(s,t,e,l,u){function c(e){return function(t){return t.id==e}}function d(){p&&(n+=g,m&&(n+=g),p=m=!1)}function h(t){t&&(d(),n+=t)}function f(t){if(1==t.nodeType){var e=t.getAttribute("cm-text");if(e)return void h(e);var n,i=t.getAttribute("cm-marker");if(i){var r=s.findMarks(st(l,0),st(u+1,0),c(+i));return void(r.length&&(n=r[0].find(0))&&h(tt(s.doc,n.from,n.to).join(g)))}if("false"==t.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;o&&d();for(var a=0;a<t.childNodes.length;a++)f(t.childNodes[a]);/^(pre|p)$/i.test(t.nodeName)&&(m=!0),o&&(p=!0)}else 3==t.nodeType&&h(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(var n="",p=!1,g=s.doc.lineSeparator(),m=!1;f(t),t!=e;)t=t.nextSibling,m=!1;return n}function ha(t,e,n){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[n]))return ca(t.clipPos(st(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==i)return fa(o,e,n)}}function fa(u,t,e){function n(t,e,n){for(var i=-1;i<(d?d.length:0);i++)for(var r=i<0?c.map:d[i],o=0;o<r.length;o+=3){var a=r[o+2];if(a==t||a==e){var s=it(i<0?u.line:u.rest[i]),l=r[o]+n;return(n<0||a!=t)&&(l=r[o+(n?1:0)]),st(s,l)}}}var i=u.text.firstChild,r=!1;if(!t||!m(i,t))return ca(st(it(u.line),0),!0);if(t==i&&(r=!0,t=i.childNodes[e],e=0,!t)){var o=u.rest?V(u.rest):u.line;return ca(st(it(o),o.text.length),r)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,e&&(e=a.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var c=u.measure,d=c.maps,l=n(a,s,e);if(l)return ca(l,r);for(var h=s.nextSibling,f=a?a.nodeValue.length-e:0;h;h=h.nextSibling){if(l=n(h,h.firstChild,0))return ca(st(l.line,l.ch-f),r);f+=h.textContent.length}for(var p=s.previousSibling,g=e;p;p=p.previousSibling){if(l=n(p,p.firstChild,-1))return ca(st(l.line,l.ch+g),r);g+=p.textContent.length}}function pa(e,t){function n(){e.value=s.getValue()}if((t=t?f(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var i=h();t.autofocus=i==e||null!=e.getAttribute("autofocus")&&i==document.body}var r;if(e.form&&(rs(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;r=o.submit;try{var a=o.submit=function(){n(),o.submit=r,o.submit(),o.submit=a}}catch(l){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(k(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=r))}},e.style.display="none";var s=Zo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}function ga(t){t.off=k,t.on=rs,t.wheelEventPixels=zi,t.Doc=js,t.splitLines=as,t.countColumn=C,t.findColumn=T,t.isWordChar=c,t.Pass=Ya,t.signal=L,t.Line=xs,t.changeEnd=Vi,t.scrollbarModel=Ms,t.Pos=st,t.cmpPos=lt,t.modes=cs,t.mimeModes=ds,t.resolveMode=G,t.getMode=Y,t.modeExtensions=hs,t.extendMode=Z,t.copyState=X,t.startState=Q,t.innerMode=K,t.commands=Xs,t.keyMap=Gs,t.keyName=ho,t.isModifierKey=uo,t.lookupKey=lo,t.normalizeKeyMap=so,t.StringStream=fs,t.SharedTextMarker=Fs,t.TextMarker=$s,t.LineWidget=Ns,t.e_preventDefault=R,t.e_stopPropagation=e,t.e_stop=F,t.addClass=i,t.contains=m,t.rmClass=Ha,t.keyNames=Vs}var ma=navigator.userAgent,va=navigator.platform,ya=/gecko\/\d/i.test(ma),xa=/MSIE \d/.test(ma),ba=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ma),_a=/Edge\/(\d+)/.exec(ma),wa=xa||ba||_a,Sa=wa&&(xa?document.documentMode||6:+(_a||ba)[1]),Ca=!_a&&/WebKit\//.test(ma),Ta=Ca&&/Qt\/\d+\.\d+/.test(ma),Aa=!_a&&/Chrome\//.test(ma),Da=/Opera\//.test(ma),Ma=/Apple Computer/.test(navigator.vendor),ka=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ma),Ia=/PhantomJS/.test(ma),Ea=!_a&&/AppleWebKit/.test(ma)&&/Mobile\/\w+/.test(ma),La=/Android/.test(ma),Oa=Ea||La||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ma),Pa=Ea||/Mac/.test(va),Na=/\bCrOS\b/.test(ma),Ra=/win/i.test(va),$a=Da&&ma.match(/Version\/(\d*\.\d*)/);$a&&($a=Number($a[1])),$a&&15<=$a&&(Ca=!(Da=!1));var Fa,za=Pa&&(Ta||Da&&(null==$a||$a<12.11)),ja=ya||wa&&9<=Sa,Ha=function(t,e){var n=t.className,i=s(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};Fa=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(r){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ba=function(t){t.select()};Ea?Ba=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:wa&&(Ba=function(t){try{t.select()}catch(e){}});var Va=function(){this.id=null};Va.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Wa,Ua,qa,Ga=30,Ya={toString:function(){return"CodeMirror.Pass"}},Za={scroll:!1},Xa={origin:"*mouse"},Ka={origin:"+move"},Qa=[""],Ja=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ts=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,es=null,ns=function(){function R(t){return t<=247?e.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?n.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function $(t,e,n){this.level=t,this.from=e,this.to=n}var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",F=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,z=/[stwN]/,j=/[LRr]/,H=/[Lb1n]/,B=/[1n]/;return function(t,e){var n="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!F.test(t))return!1;for(var i=t.length,r=[],o=0;o<i;++o)r.push(R(t.charCodeAt(o)));for(var a=0,s=n;a<i;++a){var l=r[a];"m"==l?r[a]=s:s=l}for(var u=0,c=n;u<i;++u){var d=r[u];"1"==d&&"r"==c?r[u]="n":j.test(d)&&"r"==(c=d)&&(r[u]="R")}for(var h=1,f=r[0];h<i-1;++h){var p=r[h];"+"==p&&"1"==f&&"1"==r[h+1]?r[h]="1":","!=p||f!=r[h+1]||"1"!=f&&"n"!=f||(r[h]=f),f=p}for(var g=0;g<i;++g){var m=r[g];if(","==m)r[g]="N";else if("%"==m){var v=void 0;for(v=g+1;v<i&&"%"==r[v];++v);for(var y=g&&"!"==r[g-1]||v<i&&"1"==r[v]?"1":"N",x=g;x<v;++x)r[x]=y;g=v-1}}for(var b=0,_=n;b<i;++b){var w=r[b];"L"==_&&"1"==w?r[b]="L":j.test(w)&&(_=w)}for(var S=0;S<i;++S)if(z.test(r[S])){var C=void 0;for(C=S+1;C<i&&z.test(r[C]);++C);for(var T="L"==(S?r[S-1]:n),A=T==("L"==(C<i?r[C]:n))?T?"L":"R":n,D=S;D<C;++D)r[D]=A;S=C-1}for(var M,k=[],I=0;I<i;)if(H.test(r[I])){var E=I;for(++I;I<i&&H.test(r[I]);++I);k.push(new $(0,E,I))}else{var L=I,O=k.length;for(++I;I<i&&"L"!=r[I];++I);for(var P=L;P<I;)if(B.test(r[P])){L<P&&k.splice(O,0,new $(1,L,P));var N=P;for(++P;P<I&&B.test(r[P]);++P);k.splice(O,0,new $(2,N,P)),L=P}else++P;L<I&&k.splice(O,0,new $(1,L,I))}return"ltr"==e&&(1==k[0].level&&(M=t.match(/^\s+/))&&(k[0].from=M[0].length,k.unshift(new $(0,0,M[0].length))),1==V(k).level&&(M=t.match(/\s+$/))&&(V(k).to-=M[0].length,k.push(new $(0,i-M[0].length,i)))),"rtl"==e?k.reverse():k}}(),is=[],rs=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var i=t._handlers||(t._handlers={});i[e]=(i[e]||is).concat(n)}},os=function(){if(wa&&Sa<9)return!1;var t=_("div");return"draggable"in t||"dragDrop"in t}(),as=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},ss=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(n){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},ls="oncopy"in(qa=_("div"))||(qa.setAttribute("oncopy","return;"),"function"==typeof qa.oncopy),us=null,cs={},ds={},hs={},fs=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};fs.prototype.eol=function(){return this.pos>=this.string.length},fs.prototype.sol=function(){return this.pos==this.lineStart},fs.prototype.peek=function(){return this.string.charAt(this.pos)||undefined},fs.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},fs.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},fs.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},fs.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},fs.prototype.skipToEnd=function(){this.pos=this.string.length},fs.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(-1<e)return this.pos=e,!0},fs.prototype.backUp=function(t){this.pos-=t},fs.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=C(this.string,this.start,this.tabSize,
|
|
this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?C(this.string,this.lineStart,this.tabSize):0)},fs.prototype.indentation=function(){return C(this.string,null,this.tabSize)-(this.lineStart?C(this.string,this.lineStart,this.tabSize):0)},fs.prototype.match=function(t,e,n){if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&0<i.index?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},fs.prototype.current=function(){return this.string.slice(this.start,this.pos)},fs.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},fs.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},fs.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ps=function(t,e){this.state=t,this.lookAhead=e},gs=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};gs.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},gs.prototype.baseToken=function(t){var e=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)e.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},gs.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},gs.fromSaved=function(t,e,n){return e instanceof ps?new gs(t,X(t.mode,e.state),n,e.lookAhead):new gs(t,X(t.mode,e),n)},gs.prototype.save=function(t){var e=!1!==t?X(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new ps(e,this.maxLookAhead):e};var ms=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},vs=!1,ys=!1,xs=function(t,e,n){this.text=t,jt(this,e),this.height=n?n(this):1};xs.prototype.lineNo=function(){return it(this)},t(xs);var bs,_s={},ws={},Ss=null,Cs=null,Ts={left:0,right:0,top:0,bottom:0},As=function(t,e,n){this.cm=n;var i=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),rs(i,"scroll",function(){i.clientHeight&&e(i.scrollTop,"vertical")}),rs(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,wa&&Sa<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};As.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<t.clientHeight&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},As.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},As.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},As.prototype.zeroWidthHack=function(){var t=Pa&&!ka?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Va,this.disableVert=new Va},As.prototype.enableZeroWidthBar=function(e,n,i){function r(){var t=e.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=e?e.style.pointerEvents="none":n.set(1e3,r)}e.style.pointerEvents="auto",n.set(1e3,r)},As.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Ds=function(){};Ds.prototype.update=function(){return{bottom:0,right:0}},Ds.prototype.setScrollLeft=function(){},Ds.prototype.setScrollTop=function(){},Ds.prototype.clear=function(){};var Ms={"native":As,"null":Ds},ks=0,Is=function(t,e,n){var i=t.display;this.viewport=e,this.visible=Un(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=je(t),this.force=n,this.dims=_n(t),this.events=[]};Is.prototype.signal=function(t,e){N(t,e)&&this.events.push(arguments)},Is.prototype.finish=function(){for(var t=this,e=0;e<this.events.length;e++)L.apply(null,t.events[e])};var Es=0,Ls=null;wa?Ls=-.53:ya?Ls=15:Aa?Ls=-.7:Ma&&(Ls=-1/3);var Os=function(t,e){this.ranges=t,this.primIndex=e};Os.prototype.primary=function(){return this.ranges[this.primIndex]},Os.prototype.equals=function(t){var e=this;if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var i=e.ranges[n],r=t.ranges[n];if(!ut(i.anchor,r.anchor)||!ut(i.head,r.head))return!1}return!0},Os.prototype.deepCopy=function(){for(var t=this,e=[],n=0;n<this.ranges.length;n++)e[n]=new Ps(ct(t.ranges[n].anchor),ct(t.ranges[n].head));return new Os(e,this.primIndex)},Os.prototype.somethingSelected=function(){for(var t=this,e=0;e<this.ranges.length;e++)if(!t.ranges[e].empty())return!0;return!1},Os.prototype.contains=function(t,e){var n=this;e||(e=t);for(var i=0;i<this.ranges.length;i++){var r=n.ranges[i];if(0<=lt(e,r.from())&<(t,r.to())<=0)return i}return-1};var Ps=function(t,e){this.anchor=t,this.head=e};Ps.prototype.from=function(){return ht(this.anchor,this.head)},Ps.prototype.to=function(){return dt(this.anchor,this.head)},Ps.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Vr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i<r;++i){var o=n.lines[i];n.height-=o.height,ae(o),be(o,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){var i=this;this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=i},iterN:function(t,e,n){for(var i=this,r=t+e;t<r;++t)if(n(i.lines[t]))return!0}},Wr.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){var n=this;this.size-=e;for(var i=0;i<this.children.length;++i){var r=n.children[i],o=r.chunkSize();if(t<o){var a=Math.min(e,o-t),s=r.height;if(r.removeInner(t,a),n.height-=s-r.height,o==a&&(n.children.splice(i--,1),r.parent=null),0==(e-=a))break;t=0}else t-=o}if(this.size-e<25&&(1<this.children.length||!(this.children[0]instanceof Vr))){var l=[];this.collapse(l),this.children=[new Vr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n<this.children.length;++n)e.children[n].collapse(t)},insertInner:function(t,e,n){var i=this;this.size+=e.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=i.children[r],a=o.chunkSize();if(t<=a){if(o.insertInner(t,e,n),o.lines&&50<o.lines.length){for(var s=o.lines.length%25+25,l=s;l<o.lines.length;){var u=new Vr(o.lines.slice(l,l+=25));o.height-=u.height,i.children.splice(++r,0,u),u.parent=i}o.lines=o.lines.slice(0,s),i.maybeSpill()}break}t-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new Wr(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=g(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var i=new Wr(t.children);(i.parent=t).children=[i,e],t=i}e.parent=t.parent}while(10<t.children.length);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;r<this.children.length;++r){var o=i.children[r],a=o.chunkSize();if(t<a){var s=Math.min(e,a-t);if(o.iterN(t,s,n))return!0;if(0==(e-=s))break;t=0}else t-=a}}};var Ns=function(t,e,n){var i=this;if(n)for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]);this.doc=t,this.node=e};Ns.prototype.clear=function(){var t=this,e=this.doc.cm,n=this.line.widgets,i=this.line,r=it(i);if(null!=r&&n){for(var o=0;o<n.length;++o)n[o]==t&&n.splice(o--,1);n.length||(i.widgets=null);var a=Pe(this);nt(i,Math.max(0,i.height-a)),e&&(vi(e,function(){Ur(e,i,-a),Mn(e,r,"widget")}),be(e,"lineWidgetCleared",e,this,r))}},Ns.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=Pe(this)-e;r&&(te(this.doc,i)||nt(i,i.height+r),n&&vi(n,function(){n.curOp.forceUpdate=!0,Ur(n,i,r),be(n,"lineWidgetChanged",n,t,it(i))}))},t(Ns);var Rs=0,$s=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++Rs};$s.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){var e=this.doc.cm,n=e&&!e.curOp;if(n&&ui(e),N(this,"clear")){var i=this.find();i&&be(this,"clear",i.from,i.to)}for(var r=null,o=null,a=0;a<this.lines.length;++a){var s=t.lines[a],l=Et(s.markedSpans,t);e&&!t.collapsed?Mn(e,it(s),"text"):e&&(null!=l.to&&(o=it(s)),null!=l.from&&(r=it(s))),s.markedSpans=Lt(s.markedSpans,l),null==l.from&&t.collapsed&&!te(t.doc,s)&&e&&nt(s,xn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=Zt(t.lines[u]),d=ie(c);d>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=d,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dn(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Tr(e.doc)),e&&be(e,"markerCleared",e,this,r,o),n&&ci(e),this.parent&&this.parent.clear()}},$s.prototype.find=function(t,e){var n,i,r=this;null==t&&"bookmark"==this.type&&(t=1);for(var o=0;o<this.lines.length;++o){var a=r.lines[o],s=Et(a.markedSpans,r);if(null!=s.from&&(n=st(e?a:it(a),s.from),-1==t))return n;if(null!=s.to&&(i=st(e?a:it(a),s.to),1==t))return i}return n&&{from:n,to:i}},$s.prototype.changed=function(){var o=this,a=this.find(-1,!0),s=this,l=this.doc.cm;a&&l&&vi(l,function(){var t=a.line,e=it(a.line),n=qe(l,e);if(n&&(Je(n),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!te(s.doc,t)&&null!=s.height){var i=s.height;s.height=null;var r=Pe(s)-i;r&&nt(t,t.height+r)}be(l,"markerChanged",l,o)})},$s.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=g(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},$s.prototype.detachLine=function(t){if(this.lines.splice(g(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},t($s);var Fs=function(t,e){var n=this;this.markers=t,this.primary=e;for(var i=0;i<t.length;++i)t[i].parent=n};Fs.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)t.markers[e].clear();be(this,"clear")}},Fs.prototype.find=function(t,e){return this.primary.find(t,e)},t(Fs);var zs=0,js=function(t,e,n,i,r){if(!(this instanceof js))return new js(t,e,n,i,r);null==n&&(n=0),Wr.call(this,[new Vr([new xs("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=st(n,0);this.sel=Bi(o),this.history=new nr(null),this.id=++zs,this.modeOption=e,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Ki(this,{from:o,to:o,text:t}),wr(this,Bi(o),Za)};js.prototype=n(Wr.prototype,{constructor:js,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,i=0;i<e.length;++i)n+=e[i].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=et(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:bi(function(t){var e=st(this.first,0),n=this.first+this.size-1;Lr(this,{from:e,to:st(n,J(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Qn(this.cm,0,0),wr(this,Bi(e),Za)}),replaceRange:function(t,e,n,i){Fr(this,t,e=pt(this,e),n=n?pt(this,n):e,i)},getRange:function(t,e,n){var i=tt(this,pt(this,t),pt(this,e));return!1===n?i:i.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(ot(this,t))return J(this,t)},getLineNumber:function(t){return it(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=J(this,t)),Zt(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return pt(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:bi(function(t,e,n){xr(this,pt(this,"number"==typeof t?st(t,e||0):t),null,n)}),setSelection:bi(function(t,e,n){xr(this,pt(this,t),pt(this,e||t),n)}),extendSelection:bi(function(t,e,n){mr(this,pt(this,t),e&&pt(this,e),n)}),extendSelections:bi(function(t,e){vr(this,mt(this,t),e)}),extendSelectionsBy:bi(function(t,e){vr(this,mt(this,v(this.sel.ranges,t)),e)}),setSelections:bi(function(t,e,n){var i=this;if(t.length){for(var r=[],o=0;o<t.length;o++)r[o]=new Ps(pt(i,t[o].anchor),pt(i,t[o].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),wr(this,Hi(this.cm,r,e),n)}}),addSelection:bi(function(t,e,n){var i=this.sel.ranges.slice(0);i.push(new Ps(pt(this,t),pt(this,e||t))),wr(this,Hi(this.cm,i,i.length-1),n)}),getSelection:function(t){for(var e,n=this,i=this.sel.ranges,r=0;r<i.length;r++){var o=tt(n,i[r].from(),i[r].to());e=e?e.concat(o):o}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=this,n=[],i=this.sel.ranges,r=0;r<i.length;r++){var o=tt(e,i[r].from(),i[r].to());!1!==t&&(o=o.join(t||e.lineSeparator())),n[r]=o}return n},replaceSelection:function(t,e,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=t;this.replaceSelections(i,e,n||"+input")},replaceSelections:bi(function(t,e,n){for(var i=this,r=[],o=this.sel,a=0;a<o.ranges.length;a++){var s=o.ranges[a];r[a]={from:s.from(),to:s.to(),text:i.splitLines(t[a]),origin:n}}for(var l=e&&"end"!=e&&Gi(this,r,e),u=r.length-1;0<=u;u--)Lr(i,r[u]);l?_r(this,l):this.cm&&Kn(this.cm)}),undo:bi(function(){Pr(this,"undo")}),redo:bi(function(){Pr(this,"redo")}),undoSelection:bi(function(){Pr(this,"undo",!0)}),redoSelection:bi(function(){Pr(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i<t.done.length;i++)t.done[i].ranges||++e;for(var r=0;r<t.undone.length;r++)t.undone[r].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){this.history=new nr(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:pr(this.history.done),undone:pr(this.history.undone)}},setHistory:function(t){var e=this.history=new nr(this.history.maxGeneration);e.done=pr(t.done.slice(0),null,!0),e.undone=pr(t.undone.slice(0),null,!0)},setGutterMarker:bi(function(t,n,i){return Br(this,t,"gutter",function(t){var e=t.gutterMarkers||(t.gutterMarkers={});return!(e[n]=i)&&x(e)&&(t.gutterMarkers=null),!0})}),clearGutter:bi(function(e){var n=this;this.iter(function(t){t.gutterMarkers&&t.gutterMarkers[e]&&Br(n,t,"gutter",function(){return t.gutterMarkers[e]=null,x(t.gutterMarkers)&&(t.gutterMarkers=null),!0})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!ot(this,t))return null;if(!(t=J(this,e=t)))return null}else if(null==(e=it(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:bi(function(t,n,i){return Br(this,t,"gutter"==n?"gutter":"class",function(t){var e="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(t[e]){if(s(i).test(t[e]))return!1;t[e]+=" "+i}else t[e]=i;return!0})}),removeLineClass:bi(function(t,o,a){return Br(this,t,"gutter"==o?"gutter":"class",function(t){var e="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",n=t[e];if(!n)return!1;if(null==a)t[e]=null;else{var i=n.match(s(a));if(!i)return!1;var r=i.index+i[0].length;t[e]=n.slice(0,i.index)+(i.index&&r!=n.length?" ":"")+n.slice(r)||null}return!0})}),addLineWidget:bi(function(t,e,n){return qr(this,t,e,n)}),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return Gr(this,pt(this,t),pt(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return Gr(this,t=pt(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=J(this,(t=pt(this,t)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(r,o,a){r=pt(this,r),o=pt(this,o);var s=[],l=r.line;return this.iter(r.line,o.line+1,function(t){var e=t.markedSpans;if(e)for(var n=0;n<e.length;n++){var i=e[n];null!=i.to&&l==r.line&&r.ch>=i.to||null==i.from&&l!=r.line||null!=i.from&&l==o.line&&i.from>=o.ch||a&&!a(i.marker)||s.push(i.marker.parent||i.marker)}++l}),s},getAllMarks:function(){var i=[];return this.iter(function(t){var e=t.markedSpans;if(e)for(var n=0;n<e.length;++n)null!=e[n].from&&i.push(e[n].marker)}),i},posFromIndex:function(n){var i,r=this.first,o=this.lineSeparator().length;return this.iter(function(t){var e=t.text.length+o;if(n<e)return i=n,!0;n-=e,++r}),pt(this,st(r,i))},indexFromPos:function(t){var e=(t=pt(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+n}),e},copy:function(t){var e=new js(et(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var i=new js(et(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:t.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],Xr(i,Zr(this)),i},unlinkDoc:function(t){var e=this;if(t instanceof Zo&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){if(e.linked[n].doc==t){e.linked.splice(n,1),t.unlinkDoc(e),Kr(Zr(e));break}}if(t.history==this.history){var i=[t.id];Qi(t,function(t){return i.push(t.id)},!0),t.history=new nr(null),t.history.done=pr(this.history.done,i),t.history.undone=pr(this.history.undone,i)}},iterLinkedDocs:function(t){Qi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):as(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:bi(function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&er(this.cm))})}),js.prototype.eachLine=js.prototype.iter;for(var Hs=0,Bs=!1,Vs={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ws=0;Ws<10;Ws++)Vs[Ws+48]=Vs[Ws+96]=String(Ws);for(var Us=65;Us<=90;Us++)Vs[Us]=String.fromCharCode(Us);for(var qs=1;qs<=12;qs++)Vs[qs+111]=Vs[qs+63235]="F"+qs;var Gs={basic:{Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},pcDefault:{"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},emacsy:{"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},macDefault:{"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]}};Gs["default"]=Pa?Gs.macDefault:Gs.pcDefault;var Ys,Zs,Xs={selectAll:Ir,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),Za)},killLine:function(n){return po(n,function(t){if(t.empty()){var e=J(n.doc,t.head.line).text.length;return t.head.ch==e&&t.head.line<n.lastLine()?{from:t.head,to:st(t.head.line+1,0)}:{from:t.head,to:st(t.head.line,e)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return po(e,function(t){return{from:st(t.from().line,0),to:pt(e.doc,st(t.to().line+1,0))}})},delLineLeft:function(t){return po(t,function(t){return{from:st(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(n){return po(n,function(t){var e=n.charCoords(t.head,"div").top+5;return{from:n.coordsChar({left:0,top:e},"div"),to:t.from()}})},delWrappedLineRight:function(i){return po(i,function(t){var e=i.charCoords(t.head,"div").top+5,n=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:e},"div");return{from:t.from(),to:n}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(st(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(st(t.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return xo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return _o(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return bo(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(n){return n.extendSelectionsBy(function(t){var e=n.cursorCoords(t.head,"div").top+5;return n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:e},"div")},Ka)},goLineLeft:function(n){return n.extendSelectionsBy(function(t){var e=n.cursorCoords(t.head,"div").top+5;return n.coordsChar({left:0,top:e},"div")},Ka)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(t){var e=i.cursorCoords(t.head,"div").top+5,n=i.coordsChar({left:0,top:e},"div");return n.ch<i.getLine(n.line).search(/\S/)?_o(i,t.head):n},Ka)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"char")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),i=t.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=C(t.getLine(o.line),o.ch,i);e.push(w(i-a%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(a){return vi(a,function(){for(var t=a.listSelections(),e=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,r=J(a.doc,i.line).text;if(r)if(i.ch==r.length&&(i=new st(i.line,i.ch-1)),0<i.ch)i=new st(i.line,i.ch+1),a.replaceRange(r.charAt(i.ch-1)+r.charAt(i.ch-2),st(i.line,i.ch-2),i,"+transpose");else if(i.line>a.doc.first){var o=J(a.doc,i.line-1).text;o&&(i=new st(i.line,1),a.replaceRange(r.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),st(i.line-1,o.length-1),i,"+transpose"))}e.push(new Ps(i,i))}a.setSelections(e)})},newlineAndIndent:function(i){return vi(i,function(){for(var t=i.listSelections(),e=t.length-1;0<=e;e--)i.replaceRange(i.doc.lineSeparator(),t[e].anchor,t[e].head,"+input");t=i.listSelections();for(var n=0;n<t.length;n++)i.indentLine(t[n].from().line,null,!0);Kn(i)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}},Ks=new Va,Qs=null,Js=400,tl=function(t,e,n){this.time=t,this.pos=e,this.button=n};tl.prototype.compare=function(t,e,n){return this.time+Js>t&&0==lt(e,this.pos)&&n==this.button};var el={toString:function(){return"CodeMirror.Init"}},nl={},il={};Zo.defaults=nl,Zo.optionHandlers=il;var rl=[];Zo.defineInitHook=function(t){return rl.push(t)};var ol=null,al=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Va,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};al.prototype.init=function(t){function e(t){if(!O(s,t)){if(s.somethingSelected())Qo({lineWise:!1,text:s.getSelections()}),"cut"==t.type&&s.replaceSelection("",null,"cut");else{if(!s.options.lineWiseCopyCut)return;var e=na(s);Qo({lineWise:!0,text:e.text}),"cut"==t.type&&s.operation(function(){s.setSelections(e.ranges,0,Za),s.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=ol.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var i=ra(),r=i.firstChild;s.display.lineSpace.insertBefore(i,s.display.lineSpace.firstChild),r.value=ol.text.join("\n");var o=document.activeElement;Ba(r),setTimeout(function(){s.display.lineSpace.removeChild(i),o.focus(),o==l&&a.showPrimarySelection()},50)}}var n=this,a=this,s=a.cm,l=a.div=t.lineDiv;ia(l,s.options.spellcheck,s.options.autocorrect,s.options.autocapitalize),rs(l,"paste",function(t){O(s,t)||ta(t,s)||Sa<=11&&setTimeout(yi(s,function(){return n.updateFromDOM()}),20)}),rs(l,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),rs(l,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),rs(l,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),rs(l,"touchstart",function(){return a.forceCompositionEnd()}),rs(l,"input",function(){n.composing||n.readFromDOMSoon()}),rs(l,"copy",e),rs(l,"cut",e)},al.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},al.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},al.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},al.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line<e.display.viewFrom)t.removeAllRanges();else{var o=ha(e,t.anchorNode,t.anchorOffset),a=ha(e,t.focusNode,t.focusOffset);if(!o||o.bad||!a||a.bad||0!=lt(ht(o,a),i)||0!=lt(dt(o,a),r)){var s=e.display.view,l=i.line>=e.display.viewFrom&&la(e,i)||{node:s[0].measure.map[2],offset:0},u=r.line<e.display.viewTo&&la(e,r);if(!u){var c=s[s.length-1].measure,d=c.maps?c.maps[c.maps.length-1]:c.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(l&&u){var h,f=t.rangeCount&&t.getRangeAt(0);try{h=Fa(l.node,l.offset,u.offset,u.node)}catch(p){}h&&(!ya&&e.state.focused?(t.collapse(l.node,l.offset),h.collapsed||(t.removeAllRanges(),t.addRange(h))):(t.removeAllRanges(),t.addRange(h)),f&&null==t.anchorNode?t.addRange(f):ya&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},al.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},al.prototype.showMultipleSelections=function(t){o(this.cm.display.cursorDiv,t.cursors),o(this.cm.display.selectionDiv,t.selection)},al.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},al.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return m(this.div,e)},al.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},al.prototype.blur=function(){this.div.blur()},al.prototype.getField=function(){return this.div},al.prototype.supportsTouch=function(){return!0},al.prototype.receivedFocus=function(){function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}var e=this;this.selectionInEditor()?this.pollSelection():vi(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,t)},al.prototype.selectionChanged=function(){var t=this.getSelection()
|
|
;return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},al.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(La&&Aa&&this.cm.display.gutterSpecs.length&&ua(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ha(e,t.anchorNode,t.anchorOffset),i=ha(e,t.focusNode,t.focusOffset);n&&i&&vi(e,function(){wr(e.doc,Bi(n,i),Za),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)})}}},al.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,i=this.cm,r=i.display,o=i.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>i.firstLine()&&(a=st(a.line-1,J(i.doc,a.line-1).length)),s.ch==J(i.doc,s.line).text.length&&s.line<i.lastLine()&&(s=st(s.line+1,0)),a.line<r.viewFrom||s.line>r.viewTo-1)return!1;a.line==r.viewFrom||0==(t=An(i,a.line))?(e=it(r.view[0].line),n=r.view[0].node):(e=it(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,u,c=An(i,s.line);if(c==r.view.length-1?(l=r.viewTo-1,u=r.lineDiv.lastChild):(l=it(r.view[c+1].line)-1,u=r.view[c+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(da(i,n,u,e,l)),h=tt(i.doc,st(e,0),st(l,J(i.doc,l).text.length));1<d.length&&1<h.length;)if(V(d)==V(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),e++}for(var f=0,p=0,g=d[0],m=h[0],v=Math.min(g.length,m.length);f<v&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=V(d),x=V(h),b=Math.min(y.length-(1==d.length?f:0),x.length-(1==h.length?f:0));p<b&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)++p;if(1==d.length&&1==h.length&&e==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var _=st(e,f),w=st(l,h.length?V(h).length-p:0);return 1<d.length||d[0]||lt(_,w)?(Fr(i.doc,d,_,w,"+input"),!0):void 0},al.prototype.ensurePolled=function(){this.forceCompositionEnd()},al.prototype.reset=function(){this.forceCompositionEnd()},al.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},al.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},al.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||vi(this.cm,function(){return Dn(t.cm)})},al.prototype.setUneditable=function(t){t.contentEditable="false"},al.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||yi(this.cm,Jo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},al.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},al.prototype.onContextMenu=function(){},al.prototype.resetPosition=function(){},al.prototype.needsContentAttribute=!0;var sl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Va,this.hasSelection=!1,this.composing=null};sl.prototype.init=function(n){function t(t){if(!O(r,t)){if(r.somethingSelected())Qo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=na(r);Qo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Za):(i.prevInput="",o.value=e.text.join("\n"),Ba(o))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}var e=this,i=this,r=this.cm;this.createField(n);var o=this.textarea;n.wrapper.insertBefore(this.wrapper,n.wrapper.firstChild),Ea&&(o.style.width="0px"),rs(o,"input",function(){wa&&9<=Sa&&e.hasSelection&&(e.hasSelection=null),i.poll()}),rs(o,"paste",function(t){O(r,t)||ta(t,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())}),rs(o,"cut",t),rs(o,"copy",t),rs(n.scroller,"paste",function(t){if(!Ne(n,t)&&!O(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void i.focus();var e=new Event("paste");e.clipboardData=t.clipboardData,o.dispatchEvent(e)}}),rs(n.lineSpace,"selectstart",function(t){Ne(n,t)||R(t)}),rs(o,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),rs(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},sl.prototype.createField=function(){this.wrapper=ra(),this.textarea=this.wrapper.firstChild},sl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=un(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},sl.prototype.showSelection=function(t){var e=this.cm.display;o(e.cursorDiv,t.cursors),o(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},sl.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&Ba(this.textarea),wa&&9<=Sa&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",wa&&9<=Sa&&(this.hasSelection=null))}},sl.prototype.getField=function(){return this.textarea},sl.prototype.supportsTouch=function(){return!1},sl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Oa||h()!=this.textarea))try{this.textarea.focus()}catch(t){}},sl.prototype.blur=function(){this.textarea.blur()},sl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},sl.prototype.receivedFocus=function(){this.slowPoll()},sl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},sl.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},sl.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||ss(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(wa&&9<=Sa&&this.hasSelection===r||Pa&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(i.length,r.length);a<s&&i.charCodeAt(a)==r.charCodeAt(a);)++a;return vi(e,function(){Jo(e,r.slice(a),i.length-a,null,t.composing?"*compose":null),1e3<r.length||-1<r.indexOf("\n")?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},sl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},sl.prototype.onKeyPress=function(){wa&&9<=Sa&&(this.hasSelection=null),this.fastPoll()},sl.prototype.onContextMenu=function(t){function n(){if(null!=s.selectionStart){var t=o.somethingSelected(),e="\u200b"+(t?s.value:"");s.value="\u21da",s.value=e,r.prevInput=t?"":"\u200b",s.selectionStart=1,s.selectionEnd=e.length,a.selForContextMenu=o.doc.sel}}function i(){if(r.contextMenuPending==i&&(r.contextMenuPending=!1,r.wrapper.style.cssText=d,s.style.cssText=c,wa&&Sa<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=l),null!=s.selectionStart)){(!wa||wa&&Sa<9)&&n();var t=0,e=function(){a.selForContextMenu==o.doc.sel&&0==s.selectionStart&&0<s.selectionEnd&&"\u200b"==r.prevInput?yi(o,Ir)(o):t++<10?a.detectingSelectAll=setTimeout(e,500):(a.selForContextMenu=null,a.input.reset())};a.detectingSelectAll=setTimeout(e,200)}}var r=this,o=r.cm,a=o.display,s=r.textarea;r.contextMenuPending&&r.contextMenuPending();var e=Tn(o,t),l=a.scroller.scrollTop;if(e&&!Da){o.options.resetSelectionOnContextMenu&&-1==o.doc.sel.contains(e)&&yi(o,wr)(o.doc,Bi(e),Za);var u,c=s.style.cssText,d=r.wrapper.style.cssText,h=r.wrapper.offsetParent.getBoundingClientRect();if(r.wrapper.style.cssText="position: static",s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(wa?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Ca&&(u=window.scrollY),a.input.focus(),Ca&&window.scrollTo(null,u),a.input.reset(),o.somethingSelected()||(s.value=r.prevInput=" "),r.contextMenuPending=i,a.selForContextMenu=o.doc.sel,clearTimeout(a.detectingSelectAll),wa&&9<=Sa&&n(),ja){F(t);var f=function(){k(window,"mouseup",f),setTimeout(i,20)};rs(window,"mouseup",f)}else setTimeout(i,50)}},sl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},sl.prototype.setUneditable=function(){},sl.prototype.needsContentAttribute=!1,qo(Zo),oa(Zo);var ll="iter insert remove copy getEditor constructor".split(" ");for(var ul in js.prototype)js.prototype.hasOwnProperty(ul)&&g(ll,ul)<0&&(Zo.prototype[ul]=function(t){return function(){return t.apply(this.doc,arguments)}}(js.prototype[ul]));return t(js),Zo.inputStyles={textarea:sl,contenteditable:al},Zo.defineMode=function(t){Zo.defaults.mode||"null"==t||(Zo.defaults.mode=t),U.apply(this,arguments)},Zo.defineMIME=q,Zo.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Zo.defineMIME("text/plain","null"),Zo.defineExtension=function(t,e){Zo.prototype[t]=e},Zo.defineDocExtension=function(t,e){js.prototype[t]=e},Zo.fromTextArea=pa,ga(Zo),Zo.version="5.48.4",Zo}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(a){"use strict";a.defineMode("shell",function(){function t(t,e){for(var n=0;n<e.length;n++)o[e[n]]=t}function n(t,e){if(t.eatSpace())return null;var n=t.sol(),i=t.next();if("\\"===i)return t.next(),null;if("'"===i||'"'===i||"`"===i)return e.tokens.unshift(s(i,"`"===i?"quote":"string")),u(t,e);if("#"===i)return n&&t.eat("!")?(t.skipToEnd(),"meta"):(t.skipToEnd(),"comment");if("$"===i)return e.tokens.unshift(c),u(t,e);if("+"===i||"="===i)return"operator";if("-"===i)return t.eat("-"),t.eatWhile(/\w/),"attribute";if(/\d/.test(i)&&(t.eatWhile(/\d/),t.eol()||!/\w/.test(t.peek())))return"number";t.eatWhile(/[\w-]/);var r=t.current();return"="===t.peek()&&/\w+/.test(r)?"def":o.hasOwnProperty(r)?o[r]:null}function s(r,o){var a="("==r?")":"{"==r?"}":r;return function(t,e){for(var n,i=!1;null!=(n=t.next());){if(n===a&&!i){e.tokens.shift();break}if("$"===n&&!i&&"'"!==r&&t.peek()!=a){i=!0,t.backUp(1),e.tokens.unshift(c);break}if(!i&&r!==a&&n===r)return e.tokens.unshift(s(r,o)),u(t,e);if(!i&&/['"]/.test(n)&&!/['"]/.test(r)){e.tokens.unshift(l(n,"string")),t.backUp(1);break}i=!i&&"\\"===n}return o}}function l(n,i){return function(t,e){return e.tokens[0]=s(n,i),t.next(),u(t,e)}}function u(t,e){return(e.tokens[0]||n)(t,e)}var o={},e=["true","false"],i=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],r=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];a.registerHelper("hintWords","shell",e.concat(i,r)),t("atom",e),t("keyword",i),t("builtin",r);var c=function(t,e){1<e.tokens.length&&t.eat("$");var n=t.next();return/['"({]/.test(n)?(e.tokens[0]=s(n,"("==n?"quote":"{"==n?"def":"string"),u(t,e)):(/\d/.test(n)||t.eatWhile(/\w/),e.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(t,e){return u(t,e)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),a.defineMIME("text/x-sh","shell"),a.defineMIME("application/x-sh","shell")}),function(t){"use strict";"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=t:"function"==typeof define?define.amd||define(["jquery"],t):window.editormd=t()}(function(){"use strict";var _="undefined"!=typeof jQuery?jQuery:Zepto;if(void 0!==_){var f,p,w=function(t,e){return new w.fn.init(t,e)};w.title=w.$name="Editor.md",w.version="1.5.0",w.homePage="https://pandao.github.io/editor.md/",w.classPrefix="editormd-",w.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},w.defaults={mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:!1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return w.toolbarHandlers.ucwords},lowercase:function(){return w.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'<a href="javascript:;" title="Lowercase" unselectable="on"><i class="fa" name="lowercase" style="font-size:24px;margin-top: -10px;">a</i></a>',ucwords:'<a href="javascript:;" title="ucwords" unselectable="on"><i class="fa" name="ucwords" style="font-size:20px;margin-top: -3px;">Aa</i></a>'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:w.classPrefix+"bold",h2:w.classPrefix+"bold",h3:w.classPrefix+"bold",h4:w.classPrefix+"bold",h5:w.classPrefix+"bold",h6:w.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"\u5f00\u6e90\u5728\u7ebfMarkdown\u7f16\u8f91\u5668<br/>Open source online Markdown editor.",tocTitle:"\u76ee\u5f55",toolbar:{undo:"\u64a4\u9500\uff08Ctrl+Z\uff09",redo:"\u91cd\u505a\uff08Ctrl+Y\uff09",bold:"\u7c97\u4f53",del:"\u5220\u9664\u7ebf",italic:"\u659c\u4f53",quote:"\u5f15\u7528",ucwords:"\u5c06\u6bcf\u4e2a\u5355\u8bcd\u9996\u5b57\u6bcd\u8f6c\u6210\u5927\u5199",uppercase:"\u5c06\u6240\u9009\u8f6c\u6362\u6210\u5927\u5199",lowercase:"\u5c06\u6240\u9009\u8f6c\u6362\u6210\u5c0f\u5199",h1:"\u6807\u98981",h2:"\u6807\u98982",h3:"\u6807\u98983",h4:"\u6807\u98984",h5:"\u6807\u98985",h6:"\u6807\u98986","list-ul":"\u65e0\u5e8f\u5217\u8868","list-ol":"\u6709\u5e8f\u5217\u8868",hr:"\u6a2a\u7ebf",link:"\u94fe\u63a5","reference-link":"\u5f15\u7528\u94fe\u63a5",image:"\u6dfb\u52a0\u56fe\u7247",code:"\u884c\u5185\u4ee3\u7801","preformatted-text":"\u9884\u683c\u5f0f\u6587\u672c / \u4ee3\u7801\u5757\uff08\u7f29\u8fdb\u98ce\u683c\uff09","code-block":"\u4ee3\u7801\u5757\uff08\u591a\u8bed\u8a00\u98ce\u683c\uff09",table:"\u6dfb\u52a0\u8868\u683c",datetime:"\u65e5\u671f\u65f6\u95f4",emoji:"Emoji\u8868\u60c5","html-entities":"HTML\u5b9e\u4f53\u5b57\u7b26",pagebreak:"\u63d2\u5165\u5206\u9875\u7b26","goto-line":"\u8df3\u8f6c\u5230\u884c",watch:"\u5173\u95ed\u5b9e\u65f6\u9884\u89c8",unwatch:"\u5f00\u542f\u5b9e\u65f6\u9884\u89c8",preview:"\u5168\u7a97\u53e3\u9884\u89c8HTML\uff08\u6309 Shift + ESC\u8fd8\u539f\uff09",fullscreen:"\u5168\u5c4f\uff08\u6309ESC\u8fd8\u539f\uff09",clear:"\u6e05\u7a7a",search:"\u641c\u7d22",help:"\u4f7f\u7528\u5e2e\u52a9",info:"\u5173\u4e8e"+w.title},buttons:{enter:"\u786e\u5b9a",cancel:"\u53d6\u6d88",close:"\u5173\u95ed"},dialog:{link:{title:"\u6dfb\u52a0\u94fe\u63a5",url:"\u94fe\u63a5\u5730\u5740",urlTitle:"\u94fe\u63a5\u6807\u9898",urlEmpty:"\u9519\u8bef\uff1a\u8bf7\u586b\u5199\u94fe\u63a5\u5730\u5740\u3002"},referenceLink:{title:"\u6dfb\u52a0\u5f15\u7528\u94fe\u63a5",name:"\u5f15\u7528\u540d\u79f0",url:"\u94fe\u63a5\u5730\u5740",urlId:"\u94fe\u63a5ID",urlTitle:"\u94fe\u63a5\u6807\u9898",nameEmpty:"\u9519\u8bef\uff1a\u5f15\u7528\u94fe\u63a5\u7684\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\u3002",idEmpty:"\u9519\u8bef\uff1a\u8bf7\u586b\u5199\u5f15\u7528\u94fe\u63a5\u7684ID\u3002",urlEmpty:"\u9519\u8bef\uff1a\u8bf7\u586b\u5199\u5f15\u7528\u94fe\u63a5\u7684URL\u5730\u5740\u3002"},image:{title:"\u6dfb\u52a0\u56fe\u7247",url:"\u56fe\u7247\u5730\u5740",link:"\u56fe\u7247\u94fe\u63a5",alt:"\u56fe\u7247\u63cf\u8ff0",uploadButton:"\u672c\u5730\u4e0a\u4f20",imageURLEmpty:"\u9519\u8bef\uff1a\u56fe\u7247\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a\u3002",uploadFileEmpty:"\u9519\u8bef\uff1a\u4e0a\u4f20\u7684\u56fe\u7247\u4e0d\u80fd\u4e3a\u7a7a\u3002",formatNotAllowed:"\u9519\u8bef\uff1a\u53ea\u5141\u8bb8\u4e0a\u4f20\u56fe\u7247\u6587\u4ef6\uff0c\u5141\u8bb8\u4e0a\u4f20\u7684\u56fe\u7247\u6587\u4ef6\u683c\u5f0f\u6709\uff1a"},preformattedText:{title:"\u6dfb\u52a0\u9884\u683c\u5f0f\u6587\u672c\u6216\u4ee3\u7801\u5757",emptyAlert:"\u9519\u8bef\uff1a\u8bf7\u586b\u5199\u9884\u683c\u5f0f\u6587\u672c\u6216\u4ee3\u7801\u7684\u5185\u5bb9\u3002"},codeBlock:{title:"\u6dfb\u52a0\u4ee3\u7801\u5757",selectLabel:"\u4ee3\u7801\u8bed\u8a00\uff1a",selectDefaultText:"\u8bf7\u9009\u62e9\u4ee3\u7801\u8bed\u8a00",otherLanguage:"\u5176\u4ed6\u8bed\u8a00",unselectedLanguageAlert:"\u9519\u8bef\uff1a\u8bf7\u9009\u62e9\u4ee3\u7801\u6240\u5c5e\u7684\u8bed\u8a00\u7c7b\u578b\u3002",codeEmptyAlert:"\u9519\u8bef\uff1a\u8bf7\u586b\u5199\u4ee3\u7801\u5185\u5bb9\u3002"},htmlEntities:{title:"HTML \u5b9e\u4f53\u5b57\u7b26"},help:{title:"\u4f7f\u7528\u5e2e\u52a9"}}}},w.classNames={tex:w.classPrefix+"tex"},w.dialogZindex=99999,w.$katex=null,w.$marked=null,w.$CodeMirror=null,w.$prettyPrint=null,w.prototype=w.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(t,e){e=e||{},"object"==typeof t&&(e=t);var n=this.classPrefix=w.classPrefix,i=this.settings=_.extend(!0,w.defaults,e);t="object"==typeof t?i.id:t;var r=this.editor=_("#"+t);this.id=t,this.lang=i.lang;var o=this.classNames={textarea:{html:n+"html-textarea",markdown:n+"markdown-textarea"}};i.pluginPath=""===i.pluginPath?i.path+"../plugins/":i.pluginPath,this.state.watching=!!i.watch,r.hasClass("editormd")||r.addClass("editormd"),r.css({width:"number"==typeof i.width?i.width+"px":i.width,height:"number"==typeof i.height?i.height+"px":i.height}),i.autoHeight&&r.css("height","auto");var a=this.markdownTextarea=r.children("textarea");a.length<1&&(r.append("<textarea></textarea>"),a=this.markdownTextarea=r.children("textarea")),a.addClass(o.textarea.markdown).attr("placeholder",i.placeholder),void 0!==a.attr("name")&&""!==a.attr("name")||a.attr("name",""!==i.name?i.name:t+"-markdown-doc");var s=[i.readOnly?"":'<a href="javascript:;" class="fa fa-close '+n+'preview-close-btn"></a>',i.saveHTMLToTextarea?'<textarea class="'+o.textarea.html+'" name="'+t+'-html-code"></textarea>':"",'<div class="'+n+'preview"><div class="markdown-body '+n+'preview-container"></div></div>','<div class="'+n+'container-mask" style="display:block;"></div>','<div class="'+n+'mask"></div>'].join("\n");return r.append(s).addClass(n+"vertical"),""!==i.theme&&r.addClass(n+"theme-"+i.theme),this.mask=r.children("."+n+"mask"),this.containerMask=r.children("."+n+"container-mask"),""!==i.markdown&&a.val(i.markdown),""!==i.appendMarkdown&&a.val(a.val()+i.appendMarkdown),this.htmlTextarea=r.children("."+o.textarea.html),this.preview=r.children("."+n+"preview"),this.previewContainer=this.preview.children("."+n+"preview-container"),""!==i.previewTheme&&this.preview.addClass(n+"preview-theme-"+i.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(w.$katex=katex),i.searchReplace&&!i.readOnly&&(w.loadCSS(i.path+"codemirror/addon/dialog/dialog"),w.loadCSS(i.path+"codemirror/addon/search/matchesonscrollbar"))),"function"==typeof define&&define.amd||!i.autoLoadModules?("undefined"!=typeof CodeMirror&&(w.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(w.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){var t=this,e=this.settings,n=e.path,i=function(){w.isIE8?t.loadedDisplay():e.flowChart||e.sequenceDiagram?w.loadScript(n+"raphael.min",function(){w.loadScript(n+"underscore.min",function(){!e.flowChart&&e.sequenceDiagram?w.loadScript(n+"sequence-diagram.min",function(){t.loadedDisplay()}):e.flowChart&&!e.sequenceDiagram?w.loadScript(n+"flowchart.min",function(){w.loadScript(n+"jquery.flowchart.min",function(){t.loadedDisplay()})}):e.flowChart&&e.sequenceDiagram&&w.loadScript(n+"flowchart.min",function(){w.loadScript(n+"jquery.flowchart.min",function(){w.loadScript(n+"sequence-diagram.min",function(){t.loadedDisplay()})})})})}):t.loadedDisplay()};return w.loadCSS(n+"codemirror/codemirror.min"),e.searchReplace&&!e.readOnly&&(w.loadCSS(n+"codemirror/addon/dialog/dialog"),w.loadCSS(n+"codemirror/addon/search/matchesonscrollbar")),e.codeFold&&w.loadCSS(n+"codemirror/addon/fold/foldgutter"),w.loadScript(n+"codemirror/codemirror.min",function(){w.$CodeMirror=CodeMirror,w.loadScript(n+"codemirror/modes.min",function(){w.loadScript(n+"codemirror/addons.min",function(){if(t.setCodeMirror(),"gfm"!==e.mode&&"markdown"!==e.mode)return t.loadedDisplay(),!1;t.setToolbar(),w.loadScript(n+"marked.min",function(){w.$marked=marked,e.previewCodeHighlight?w.loadScript(n+"prettify.min",function(){i()}):i()})})})}),this},setTheme:function(t){var e=this.editor,n=this.settings.theme,i=this.classPrefix+"theme-";return e.removeClass(i+n).addClass(i+t),this.settings.theme=t,this},setEditorTheme:function(t){var e=this.settings;return"default"!==(e.editorTheme=t)&&w.loadCSS(e.path+"codemirror/theme/"+e.editorTheme),this.cm.setOption("theme",t),this},setCodeMirrorTheme:function(t){return this.setEditorTheme(t),this},setPreviewTheme:function(t){var e=this.preview,n=this.settings.previewTheme,i=this.classPrefix+"preview-theme-";return e.removeClass(i+n).addClass(i+t),this.settings.previewTheme=t,this},setCodeMirror:function(){var t=this.settings,e=this.editor;"default"!==t.editorTheme&&w.loadCSS(t.path+"codemirror/theme/"+t.editorTheme);var n={mode:t.mode,theme:t.editorTheme,tabSize:t.tabSize,dragDrop:!1,autofocus:t.autoFocus,autoCloseTags:t.autoCloseTags,readOnly:!!t.readOnly&&"nocursor",indentUnit:t.indentUnit,lineNumbers:t.lineNumbers,lineWrapping:t.lineWrapping,extraKeys:{"Ctrl-Q":function(t){t.foldCode(t.getCursor())}},foldGutter:t.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:t.matchBrackets,indentWithTabs:t.indentWithTabs,styleActiveLine:t.styleActiveLine,styleSelectedText:t.styleSelectedText,autoCloseBrackets:t.autoCloseBrackets,showTrailingSpace:t.showTrailingSpace,highlightSelectionMatches:!!t.matchWordHighlight&&{showToken:"onselected"!==t.matchWordHighlight&&/\w/}};return this.codeEditor=this.cm=w.$CodeMirror.fromTextArea(this.markdownTextarea[0],n),this.codeMirror=this.cmElement=e.children(".CodeMirror"),""!==t.value&&this.cm.setValue(t.value),this.codeMirror.css({fontSize:t.fontSize,width:t.watch?"50%":"100%"}),t.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",Infinity)),t.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(t){return this.cm.getOption(t)},setCodeMirrorOption:function(t,e){return this.cm.setOption(t,e),this},addKeyMap:function(t,e){return this.cm.addKeyMap(t,e),this},removeKeyMap:function(t){return this.cm.removeKeyMap(t),this},gotoLine:function(t){var e=this.settings;if(!e.gotoLine)return this;var n=this.cm,i=(this.editor,n.lineCount()),r=this.preview;if("string"==typeof t&&("last"===t&&(t=i),"first"===t&&(t=1)),"number"!=typeof t)return alert("Error: The line number must be an integer."),this;if(i<(t=parseInt(t)-1))return alert("Error: The line number range 1-"+i),this;n.setCursor({line:t,ch:0});var o=n.getScrollInfo().clientHeight,a=n.charCoords({line:t,ch:0},"local");if(n.scrollTo(null,(a.top+a.bottom-o)/2),e.watch){var s=this.codeMirror.find(".CodeMirror-scroll")[0],l=_(s).height(),u=s.scrollTop,c=u/s.scrollHeight;0===u?r.scrollTop(0):u+l>=s.scrollHeight-16?r.scrollTop(r[0].scrollHeight):r.scrollTop(r[0].scrollHeight*c)}return n.focus(),this},extend:function(t,e){return void 0!==e&&("function"==typeof arguments[1]&&(arguments[1]=_.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&"undefined"==typeof arguments[0].length&&_.extend(!0,this,arguments[0]),this},set:function(t,e){return void 0!==e&&"function"==typeof e&&(e=_.proxy(e,this)),this[t]=e,this},config:function(t,e){var n=this.settings;return"object"==typeof t&&(n=_.extend(!0,n,t)),"string"==typeof t&&(n[t]=e),this.settings=n,this.recreate(),this},on:function(t,e){var n=this.settings;return"undefined"!=typeof n["on"+t]&&(n["on"+t]=_.proxy(e,this)),this},off:function(t){var e=this.settings;return"undefined"!=typeof e["on"+t]&&(e["on"+t]=function(){}),this},showToolbar:function(t){var e=this.settings;return e.readOnly||(e.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),e.toolbar=!0,this.toolbar.show(),this.resize(),_.proxy(t||function(){},this)()),this},hideToolbar:function(t){return this.settings.toolbar=!1,this.toolbar.hide(),this.resize(),_.proxy(t||function(){},this)(),this},setToolbarAutoFixed:function(t){var e=this.state,n=this.editor,i=this.toolbar,r=this.settings;void 0!==t&&(r.toolbarAutoFixed=t);var o=function(){var t=_(window),e=t.scrollTop();if(!r.toolbarAutoFixed)return!1;10<e-n.offset().top&&e<n.height()?i.css({position:"fixed",width:n.width()+"px",left:(t.width()-n.width())/2+"px"}):i.css({position:"absolute",width:"100%",left:0})};return!e.fullscreen&&!e.preview&&r.toolbar&&r.toolbarAutoFixed&&_(window).bind("scroll",o),this},setToolbar:function(){var t=this.settings;if(t.readOnly)return this;var e=this.editor,n=(this.preview,this.classPrefix),i=this.toolbar=e.children("."+n+"toolbar");if(t.toolbar&&i.length<1){var r='<div class="'+n+'toolbar"><div class="'+n+'toolbar-container"><ul class="'+n+'menu"></ul></div></div>';e.append(r),i=this.toolbar=e.children("."+n+"toolbar")}if(!t.toolbar)return i.hide(),this;i.show();for(var o="function"==typeof t.toolbarIcons?t.toolbarIcons():"string"==typeof t.toolbarIcons?w.toolbarModes[t.toolbarIcons]:t.toolbarIcons,a=i.find("."+this.classPrefix+"menu"),s="",l=!1,u=0,c=o.length;u<c;u++){var d=o[u];if("||"===d)l=!0;else if("|"===d)s+='<li class="divider" unselectable="on">|</li>';else{var h=/h(\d)/.test(d),f=d;"watch"!==d||t.watch||(f="unwatch");var p=t.lang.toolbar[f],g=t.toolbarIconTexts[f],m=t.toolbarIconsClass[f];p=void 0===p?"":p,g=void 0===g?"":g,m=void 0===m?"":m;var v=l?'<li class="pull-right">':"<li>";"undefined"!=typeof t.toolbarCustomIcons[d]&&"function"!=typeof t.toolbarCustomIcons[d]?v+=t.toolbarCustomIcons[d]:(v+='<a href="javascript:;" title="'+p+'" unselectable="on">',v+='<i class="fa '+m+'" name="'+d+'" unselectable="on">'+(h?d.toUpperCase():""===m?g:"")+"</i>",v+="</a>"),v+="</li>",s=l?v+s:s+v}}return a.html(s),a.find('[title="Lowercase"]').attr("title",t.lang.toolbar.lowercase),a.find('[title="ucwords"]').attr("title",t.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed(),this},dialogLockScreen:function(){return _.proxy(w.dialogLockScreen,this)(),this},dialogShowMask:function(t){return _.proxy(w.dialogShowMask,this)(t),this},getToolbarHandles:function(t){var e=this.toolbarHandlers=w.toolbarHandlers;return t&&"undefined"!=typeof toolbarIconHandlers[t]?e[t]:e},setToolbarHandler:function(){var r=this,o=this.settings;if(!o.toolbar||o.readOnly)return this;var t=this.toolbar,a=this.cm,e=this.classPrefix,n=this.toolbarIcons=t.find("."+e+"menu > li > a"),s=this.getToolbarHandles();return n.bind(w.mouseOrTouch("click","touchend"),function(){var t=_(this).children(".fa"),e=t.attr("name"),n=a.getCursor(),i=a.getSelection();if(""!==e)return r.activeIcon=t,"undefined"!=typeof s[e]?_.proxy(s[e],r)(a):"undefined"!=typeof o.toolbarHandlers[e]&&_.proxy(o.toolbarHandlers[e],r)(a,t,n,i),"link"!==e&&"reference-link"!==e&&"image"!==e&&"code-block"!==e&&"preformatted-text"!==e&&"watch"!==e&&"preview"!==e&&"search"!==e&&"fullscreen"!==e&&"info"!==e&&a.focus(),!1}),this},createDialog:function(t){return _.proxy(w.createDialog,this)(t)},createInfoDialog:function(){var t=this,e=this.editor,n=this.classPrefix,i=['<div class="'+n+"dialog "+n+'dialog-info" style="">','<div class="'+n+'dialog-container">','<h1><i class="editormd-logo editormd-logo-lg editormd-logo-color"></i> '+w.title+"<small>v"+w.version+"</small></h1>","<p>"+this.lang.description+"</p>",'<p style="margin: 10px 0 20px 0;"><a href="'+w.homePage+'" target="_blank">'+w.homePage+' <i class="fa fa-external-link"></i></a></p>','<p style="font-size: 0.85em;">Copyright © 2015 <a href="https://github.com/pandao" target="_blank" class="hover-link">Pandao</a>, The <a href="https://github.com/pandao/editor.md/blob/master/LICENSE" target="_blank" class="hover-link">MIT</a> License.</p>',"</div>",'<a href="javascript:;" class="fa fa-close '+n+'dialog-close"></a>',"</div>"].join("\n");e.append(i);var r=this.infoDialog=e.children("."+n+"dialog-info");return r.find("."+n+"dialog-close").bind(w.mouseOrTouch("click","touchend"),function(){t.hideInfoDialog()}),r.css("border",w.isIE8?"1px solid #ddd":"").css("z-index",w.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){var t=this.infoDialog,e=function(){t.css({top:(_(window).height()-t.height())/2+"px",left:(_(window).width()-t.width())/2+"px"})};return e(),_(window).resize(e),this},showInfoDialog:function(){_("html,body").css("overflow-x","hidden");var t=this.editor,e=this.settings,n=this.infoDialog=t.children("."+this.classPrefix+"dialog-info");return n.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:e.dialogMaskOpacity,backgroundColor:e.dialogMaskBgColor}).show(),n.css("z-index",w.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return _("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},
|
|
lockScreen:function(t){return w.lockScreen(t),this.resize(),this},recreate:function(){var t=this.editor,e=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),e.readOnly||(0<t.find(".editormd-dialog").length&&t.find(".editormd-dialog").remove(),e.toolbar&&(this.getToolbarHandles(),this.setToolbar())),this.loadedDisplay(!0),this},previewCodeHighlight:function(){var t=this.settings,e=this.previewContainer;return t.previewCodeHighlight&&(e.find("pre").addClass("prettyprint linenums"),"undefined"!=typeof prettyPrint&&prettyPrint()),this},katexRender:function(){return null===f||this.previewContainer.find("."+w.classNames.tex).each(function(){var t=_(this);w.$katex.render(t.text(),t[0]),t.find(".katex").css("font-size","1.6em")}),this},flowChartAndSequenceDiagramRender:function(){var t=this,e=this.settings,n=this.previewContainer;if(w.isIE8)return this;if(e.flowChart){if(null===p)return this;n.find(".flowchart").flowChart()}e.sequenceDiagram&&n.find(".sequence-diagram").sequenceDiagram({theme:"simple"});var i=t.preview,r=t.codeMirror.find(".CodeMirror-scroll"),o=r.height(),a=r.scrollTop(),s=a/r[0].scrollHeight,l=0;i.find(".markdown-toc-list").each(function(){l+=_(this).height()});var u=i.find(".editormd-toc-menu").height();return u=u||0,0===a?i.scrollTop(0):a+o>=r[0].scrollHeight-16?i.scrollTop(i[0].scrollHeight):i.scrollTop((i[0].scrollHeight+l+u)*s),this},registerKeyMaps:function(t){var n=this,e=this.cm,i=this.settings,r=w.toolbarHandlers,o=i.disabledKeyMaps;if(t=t||null)for(var a in t){if(_.inArray(a,o)<0)({})[a]=t[a],e.addKeyMap(t)}else{for(var s in w.keyMaps){var l=w.keyMaps[s],u="string"==typeof l?_.proxy(r[l],n):_.proxy(l,n);if(_.inArray(s,["F9","F10","F11"])<0&&_.inArray(s,o)<0){var c={};c[s]=u,e.addKeyMap(c)}}_(window).keydown(function(t){var e={120:"F9",121:"F10",122:"F11"};if(_.inArray(e[t.keyCode],o)<0)switch(t.keyCode){case 120:return _.proxy(r.watch,n)(),!1;case 121:return _.proxy(r.preview,n)(),!1;case 122:return _.proxy(r.fullscreen,n)(),!1}})}return this},bindScrollEvent:function(){var a=this,s=this.preview,l=this.settings,o=this.codeMirror,t=w.mouseOrTouch;if(!l.syncScrolling)return this;var e=function(){o.find(".CodeMirror-scroll").bind(t("scroll","touchmove"),function(t){var e=_(this).height(),n=_(this).scrollTop(),i=n/_(this)[0].scrollHeight,r=0;s.find(".markdown-toc-list").each(function(){r+=_(this).height()});var o=s.find(".editormd-toc-menu").height();o=o||0,0===n?s.scrollTop(0):n+e>=_(this)[0].scrollHeight-16?s.scrollTop(s[0].scrollHeight):s.scrollTop((s[0].scrollHeight+r+o)*i),_.proxy(l.onscroll,a)(t)})},n=function(){o.find(".CodeMirror-scroll").unbind(t("scroll","touchmove"))},i=function(){s.bind(t("scroll","touchmove"),function(t){var e=_(this).height(),n=_(this).scrollTop(),i=n/_(this)[0].scrollHeight,r=o.find(".CodeMirror-scroll");0===n?r.scrollTop(0):n+e>=_(this)[0].scrollHeight?r.scrollTop(r[0].scrollHeight):r.scrollTop(r[0].scrollHeight*i),_.proxy(l.onpreviewscroll,a)(t)})},r=function(){s.unbind(t("scroll","touchmove"))};return o.bind({mouseover:e,mouseout:n,touchstart:e,touchend:n}),"single"===l.syncScrolling||s.bind({mouseover:i,mouseout:r,touchstart:i,touchend:r}),this},bindChangeEvent:function(){var t=this,e=this.cm,n=this.settings;return n.syncScrolling&&e.on("change",function(){n.watch&&t.previewContainer.css("padding",n.autoHeight?"20px 20px 50px 40px":"20px"),f=setTimeout(function(){clearTimeout(f),t.save(),f=null},n.delay)}),this},loadedDisplay:function(t){t=t||!1;var e=this,n=this.editor,i=this.preview,r=this.settings;return this.containerMask.hide(),this.save(),r.watch&&i.show(),n.data("oldWidth",n.width()).data("oldHeight",n.height()),this.resize(),this.registerKeyMaps(),_(window).resize(function(){e.resize()}),this.bindScrollEvent().bindChangeEvent(),t||_.proxy(r.onload,this)(),this.state.loaded=!0,this},width:function(t){return this.editor.css("width","number"==typeof t?t+"px":t),this.resize(),this},height:function(t){return this.editor.css("height","number"==typeof t?t+"px":t),this.resize(),this},resize:function(t,e){t=t||null,e=e||null;var n=this.state,i=this.editor,r=this.preview,o=this.toolbar,a=this.settings,s=this.codeMirror;if(t&&i.css("width","number"==typeof t?t+"px":t),!a.autoHeight||n.fullscreen||n.preview?(e&&i.css("height","number"==typeof e?e+"px":e),n.fullscreen&&i.height(_(window).height()),a.toolbar&&!a.readOnly?s.css("margin-top",o.height()+1).height(i.height()-o.height()):s.css("margin-top",0).height(i.height())):(i.css("height","auto"),s.css("height","auto")),a.watch)if(s.width(i.width()/2),r.width(n.preview?i.width():i.width()/2),this.previewContainer.css("padding",a.autoHeight?"20px 20px 50px 40px":"20px"),a.toolbar&&!a.readOnly?r.css("top",o.height()+1):r.css("top",0),!a.autoHeight||n.fullscreen||n.preview){var l=a.toolbar&&!a.readOnly?i.height()-o.height():i.height();r.height(l)}else r.height("");else s.width(i.width()),r.hide();return n.loaded&&_.proxy(a.onresize,this)(),this},save:function(){if(null===f)return this;var t=this,e=this.state,n=this.settings,i=this.cm,r=i.getValue(),o=this.previewContainer;if("gfm"!==n.mode&&"markdown"!==n.mode)return this.markdownTextarea.val(r),this;var a=w.$marked,s=this.markdownToC=[],l=this.markedRendererOptions={toc:n.toc,tocm:n.tocm,tocStartLevel:n.tocStartLevel,pageBreak:n.pageBreak,taskList:n.taskList,emoji:n.emoji,tex:n.tex,atLink:n.atLink,emailLink:n.emailLink,flowChart:n.flowChart,sequenceDiagram:n.sequenceDiagram,previewCodeHighlight:n.previewCodeHighlight},u=this.markedOptions={renderer:w.markedRenderer(s,l),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!n.htmlDecode,smartLists:!0,smartypants:!0};a.setOptions(u);var c=w.$marked(r,u);if(c=w.filterHTMLTags(c,n.htmlDecode),this.markdownTextarea.text(r),i.save(),n.saveHTMLToTextarea&&this.htmlTextarea.text(c),n.watch||!n.watch&&e.preview){if(o.html(c),this.previewCodeHighlight(),n.toc){var d=""===n.tocContainer?o:_(n.tocContainer),h=d.find("."+this.classPrefix+"toc-menu");d.attr("previewContainer",""===n.tocContainer?"true":"false"),""!==n.tocContainer&&0<h.length&&h.remove(),w.markdownToCRenderer(s,d,n.tocDropdown,n.tocStartLevel),(n.tocDropdown||0<d.find("."+this.classPrefix+"toc-menu").length)&&w.tocDropdownMenu(d,""!==n.tocTitle?n.tocTitle:this.lang.tocTitle),""!==n.tocContainer&&o.find(".markdown-toc").css("border","none")}n.tex&&(!w.kaTeXLoaded&&n.autoLoadModules?w.loadKaTeX(function(){w.$katex=katex,w.kaTeXLoaded=!0,t.katexRender()}):(w.$katex=katex,this.katexRender())),(n.flowChart||n.sequenceDiagram)&&(p=setTimeout(function(){clearTimeout(p),t.flowChartAndSequenceDiagramRender(),p=null},10)),e.loaded&&_.proxy(n.onchange,this)()}return this},focus:function(){return this.cm.focus(),this},setCursor:function(t){return this.cm.setCursor(t),this},getCursor:function(){return this.cm.getCursor()},setSelection:function(t,e){return this.cm.setSelection(t,e),this},getSelection:function(){return this.cm.getSelection()},setSelections:function(t){return this.cm.setSelections(t),this},getSelections:function(){return this.cm.getSelections()},replaceSelection:function(t){return this.cm.replaceSelection(t),this},insertValue:function(t){return this.replaceSelection(t),this},appendMarkdown:function(t){this.settings;var e=this.cm;return e.setValue(e.getValue()+t),this},setMarkdown:function(t){return this.cm.setValue(t||this.settings.markdown),this},getMarkdown:function(){return this.cm.getValue()},getValue:function(){return this.cm.getValue()},setValue:function(t){return this.cm.setValue(t),this},clear:function(){return this.cm.setValue(""),this},getHTML:function(){return this.settings.saveHTMLToTextarea?this.htmlTextarea.val():(alert("Error: settings.saveHTMLToTextarea == false"),!1)},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){return this.settings.watch?this.previewContainer.html():(alert("Error: settings.watch == false"),!1)},watch:function(t){var e=this.settings;if(_.inArray(e.mode,["gfm","markdown"])<0)return this;if(this.state.watching=e.watch=!0,this.preview.show(),this.toolbar){var n=e.toolbarIconsClass.watch,i=e.toolbarIconsClass.unwatch,r=this.toolbar.find(".fa[name=watch]");r.parent().attr("title",e.lang.toolbar.watch),r.removeClass(i).addClass(n)}return this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2),f=0,this.save().resize(),e.onwatch||(e.onwatch=t||function(){}),_.proxy(e.onwatch,this)(),this},unwatch:function(t){var e=this.settings;if(this.state.watching=e.watch=!1,this.preview.hide(),this.toolbar){var n=e.toolbarIconsClass.watch,i=e.toolbarIconsClass.unwatch,r=this.toolbar.find(".fa[name=watch]");r.parent().attr("title",e.lang.toolbar.unwatch),r.removeClass(n).addClass(i)}return this.codeMirror.css("border-right","none").width(this.editor.width()),this.resize(),e.onunwatch||(e.onunwatch=t||function(){}),_.proxy(e.onunwatch,this)(),this},show:function(t){t=t||function(){};var e=this;return this.editor.show(0,function(){_.proxy(t,e)()}),this},hide:function(t){t=t||function(){};var e=this;return this.editor.hide(0,function(){_.proxy(t,e)()}),this},previewing:function(){var e=this,t=this.editor,n=this.preview,i=this.toolbar,r=this.settings,o=this.codeMirror,a=this.previewContainer;if(_.inArray(r.mode,["gfm","markdown"])<0)return this;r.toolbar&&i&&(i.toggle(),i.find(".fa[name=preview]").toggleClass("active")),o.toggle();var s=function(t){t.shiftKey&&27===t.keyCode&&e.previewed()};"none"===o.css("display")?(this.state.preview=!0,this.state.fullscreen&&n.css("background","#fff"),t.find("."+this.classPrefix+"preview-close-btn").show().bind(w.mouseOrTouch("click","touchend"),function(){e.previewed()}),r.watch?a.css("padding",""):this.save(),a.addClass(this.classPrefix+"preview-active"),n.show().css({position:"",top:0,width:t.width(),height:r.autoHeight&&!this.state.fullscreen?"auto":t.height()}),this.state.loaded&&_.proxy(r.onpreviewing,this)(),_(window).bind("keyup",s)):(_(window).unbind("keyup",s),this.previewed())},previewed:function(){var t=this.editor,e=this.preview,n=this.toolbar,i=this.settings,r=this.previewContainer,o=t.find("."+this.classPrefix+"preview-close-btn");return this.state.preview=!1,this.codeMirror.show(),i.toolbar&&n.show(),e[i.watch?"show":"hide"](),o.hide().unbind(w.mouseOrTouch("click","touchend")),r.removeClass(this.classPrefix+"preview-active"),i.watch&&r.css("padding","20px"),e.css({background:null,position:"absolute",width:t.width()/2,height:i.autoHeight&&!this.state.fullscreen?"auto":t.height()-n.height(),top:i.toolbar?n.height():0}),this.state.loaded&&_.proxy(i.onpreviewed,this)(),this},fullscreen:function(){var e=this,n=this.state,t=this.editor,i=(this.preview,this.toolbar),r=this.settings,o=this.classPrefix+"fullscreen";i&&i.find(".fa[name=fullscreen]").parent().toggleClass("active");var a=function(t){t.shiftKey||27!==t.keyCode||n.fullscreen&&e.fullscreenExit()};return t.hasClass(o)?(_(window).unbind("keyup",a),this.fullscreenExit()):(n.fullscreen=!0,_("html,body").css("overflow","hidden"),t.css({width:_(window).width(),height:_(window).height()}).addClass(o),this.resize(),_.proxy(r.onfullscreen,this)(),_(window).bind("keyup",a)),this},fullscreenExit:function(){var t=this.editor,e=this.settings,n=this.toolbar,i=this.classPrefix+"fullscreen";return this.state.fullscreen=!1,n&&n.find(".fa[name=fullscreen]").parent().removeClass("active"),_("html,body").css("overflow",""),t.css({width:t.data("oldWidth"),height:t.data("oldHeight")}).removeClass(i),this.resize(),_.proxy(e.onfullscreenExit,this)(),this},executePlugin:function(t,e){var n=this,i=this.cm;return e=this.settings.pluginPath+e,"function"==typeof define?"undefined"==typeof this[t]?alert("Error: "+t+" plugin is not found, you are not load this plugin."):this[t](i):_.inArray(e,w.loadFiles.plugin)<0?w.loadPlugin(e,function(){w.loadPlugins[t]=n[t],n[t](i)}):_.proxy(w.loadPlugins[t],this)(i),this},search:function(t){var e=this.settings;return e.searchReplace?e.readOnly||this.cm.execCommand(t||"find"):alert("Error: settings.searchReplace == false"),this},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},w.fn.init.prototype=w.fn,w.dialogLockScreen=function(){(this.settings||{dialogLockScreen:!0}).dialogLockScreen&&(_("html,body").css("overflow","hidden"),this.resize())},w.dialogShowMask=function(t){var e=this.editor,n=this.settings||{dialogShowMask:!0};t.css({top:(_(window).height()-t.height())/2+"px",left:(_(window).width()-t.width())/2+"px"}),n.dialogShowMask&&e.children("."+this.classPrefix+"mask").css("z-index",parseInt(t.css("z-index"))-1).show()},w.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("**"+n+"**"),""===n&&t.setCursor(e.line,e.ch+2)},del:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("~~"+n+"~~"),""===n&&t.setCursor(e.line,e.ch+2)},italic:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("*"+n+"*"),""===n&&t.setCursor(e.line,e.ch+1)},quote:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("> "+n),t.setCursor(e.line,e.ch+2)):t.replaceSelection("> "+n)},ucfirst:function(){var t=this.cm,e=t.getSelection(),n=t.listSelections();t.replaceSelection(w.firstUpperCase(e)),t.setSelections(n)},ucwords:function(){var t=this.cm,e=t.getSelection(),n=t.listSelections();t.replaceSelection(w.wordsFirstUpperCase(e)),t.setSelections(n)},uppercase:function(){var t=this.cm,e=t.getSelection(),n=t.listSelections();t.replaceSelection(e.toUpperCase()),t.setSelections(n)},lowercase:function(){var t=this.cm,e=(t.getCursor(),t.getSelection()),n=t.listSelections();t.replaceSelection(e.toLowerCase()),t.setSelections(n)},h1:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("# "+n),t.setCursor(e.line,e.ch+2)):t.replaceSelection("# "+n)},h2:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("## "+n),t.setCursor(e.line,e.ch+3)):t.replaceSelection("## "+n)},h3:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("### "+n),t.setCursor(e.line,e.ch+4)):t.replaceSelection("### "+n)},h4:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("#### "+n),t.setCursor(e.line,e.ch+5)):t.replaceSelection("#### "+n)},h5:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("##### "+n),t.setCursor(e.line,e.ch+6)):t.replaceSelection("##### "+n)},h6:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();0!==e.ch?(t.setCursor(e.line,0),t.replaceSelection("###### "+n),t.setCursor(e.line,e.ch+7)):t.replaceSelection("###### "+n)},"list-ul":function(){var t=this.cm,e=(t.getCursor(),t.getSelection());if(""===e)t.replaceSelection("- "+e);else{for(var n=e.split("\n"),i=0,r=n.length;i<r;i++)n[i]=""===n[i]?"":"- "+n[i];t.replaceSelection(n.join("\n"))}},"list-ol":function(){var t=this.cm,e=(t.getCursor(),t.getSelection());if(""===e)t.replaceSelection("1. "+e);else{for(var n=e.split("\n"),i=0,r=n.length;i<r;i++)n[i]=""===n[i]?"":i+1+". "+n[i];t.replaceSelection(n.join("\n"))}},hr:function(){var t=this.cm,e=t.getCursor();t.getSelection();t.replaceSelection((0!==e.ch?"\n\n":"\n")+"------------\n\n")},tex:function(){if(!this.settings.tex)return alert("settings.tex === false"),this;var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("$$"+n+"$$"),""===n&&t.setCursor(e.line,e.ch+2)},link:function(){this.executePlugin("linkDialog","link-dialog/link-dialog")},"reference-link":function(){this.executePlugin("referenceLinkDialog","reference-link-dialog/reference-link-dialog")},pagebreak:function(){if(!this.settings.pageBreak)return alert("settings.pageBreak === false"),this;var t=this.cm;t.getSelection();t.replaceSelection("\r\n[========]\r\n")},image:function(){this.executePlugin("imageDialog","image-dialog/image-dialog")},code:function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection("`"+n+"`"),""===n&&t.setCursor(e.line,e.ch+1)},"code-block":function(){this.executePlugin("codeBlockDialog","code-block-dialog/code-block-dialog")},"preformatted-text":function(){this.executePlugin("preformattedTextDialog","preformatted-text-dialog/preformatted-text-dialog")},table:function(){this.executePlugin("tableDialog","table-dialog/table-dialog")},datetime:function(){var t=this.cm,e=(t.getSelection(),new Date,this.settings.lang.name),n=w.dateFormat()+" "+w.dateFormat("zh-cn"===e||"zh-tw"===e?"cn-week-day":"week-day");t.replaceSelection(n)},emoji:function(){this.executePlugin("emojiDialog","emoji-dialog/emoji-dialog")},"html-entities":function(){this.executePlugin("htmlEntitiesDialog","html-entities-dialog/html-entities-dialog")},"goto-line":function(){this.executePlugin("gotoLineDialog","goto-line-dialog/goto-line-dialog")},watch:function(){this[this.settings.watch?"unwatch":"watch"]()},preview:function(){this.previewing()},fullscreen:function(){this.fullscreen()},clear:function(){this.clear()},search:function(){this.search()},help:function(){this.executePlugin("helpDialog","help-dialog/help-dialog")},info:function(){this.showInfoDialog()}},w.keyMaps={"Ctrl-1":"h1","Ctrl-2":"h2","Ctrl-3":"h3","Ctrl-4":"h4","Ctrl-5":"h5","Ctrl-6":"h6","Ctrl-B":"bold","Ctrl-D":"datetime","Ctrl-E":function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();this.settings.emoji?(t.replaceSelection(":"+n+":"),""===n&&t.setCursor(e.line,e.ch+1)):alert("Error: settings.emoji == false")},"Ctrl-Alt-G":"goto-line","Ctrl-H":"hr","Ctrl-I":"italic","Ctrl-K":"code","Ctrl-L":function(){var t=this.cm,e=t.getCursor(),n=t.getSelection(),i=""===n?"":' "'+n+'"';t.replaceSelection("["+n+"]("+i+")"),""===n&&t.setCursor(e.line,e.ch+1)},"Ctrl-U":"list-ul","Shift-Ctrl-A":function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();this.settings.atLink?(t.replaceSelection("@"+n),""===n&&t.setCursor(e.line,e.ch+1)):alert("Error: settings.atLink == false")},"Shift-Ctrl-C":"code","Shift-Ctrl-Q":"quote","Shift-Ctrl-S":"del","Shift-Ctrl-K":"tex","Shift-Alt-C":function(){var t=this.cm,e=t.getCursor(),n=t.getSelection();t.replaceSelection(["```",n,"```"].join("\n")),""===n&&t.setCursor(e.line,e.ch+3)},"Shift-Ctrl-Alt-C":"code-block","Shift-Ctrl-H":"html-entities","Shift-Alt-H":"help","Shift-Ctrl-E":"emoji","Shift-Ctrl-U":"uppercase","Shift-Alt-U":"ucwords","Shift-Ctrl-Alt-U":"ucfirst","Shift-Alt-L":"lowercase","Shift-Ctrl-I":function(){var t=this.cm,e=t.getCursor(),n=t.getSelection(),i=""===n?"":' "'+n+'"';t.replaceSelection("!["+n+"]("+i+")"),""===n&&t.setCursor(e.line,e.ch+4)},"Shift-Ctrl-Alt-I":"image","Shift-Ctrl-L":"link","Shift-Ctrl-O":"list-ol","Shift-Ctrl-P":"preformatted-text","Shift-Ctrl-T":"table","Shift-Alt-P":"pagebreak",F9:"watch",F10:"preview",F11:"fullscreen"};var h=function(t){return String.prototype.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};w.trim=h;var t=function(t){return t.toLowerCase().replace(/\b(\w)|\s(\w)/g,function(t){return t.toUpperCase()})};w.ucwords=w.wordsFirstUpperCase=t;var e=function(t){return t.toLowerCase().replace(/\b(\w)/,function(t){return t.toUpperCase()})};return w.firstUpperCase=w.ucfirst=e,w.urls={atLinkBase:"https://github.com/"},w.regexs={atLink:/@(\w+)/g,email:/(\w+)@(\w+)\.(\w+)\.?(\w+)?/g,emailLink:/(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g,emoji:/:([\w\+-]+):/g,emojiDatetime:/(\d{2}:\d{2}:\d{2})/g,twemoji:/:(tw-([\w]+)-?(\w+)?):/g,fontAwesome:/:(fa-([\w]+)(-(\w+)){0,}):/g,editormdLogo:/:(editormd-logo-?(\w+)?):/g,pageBreak:/^\[[=]{8,}\]$/},w.emoji={path:"http://www.emoji-cheat-sheet.com/graphics/emojis/",ext:".png"},w.twemoji={path:"http://twemoji.maxcdn.com/36x36/",ext:".png"},w.markedRenderer=function(d,t){var e={toc:!0,tocm:!1,tocStartLevel:1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1},s=_.extend(e,t||{}),i=w.$marked,n=new i.Renderer;d=d||[];var r=w.regexs,a=r.atLink,o=r.emoji,l=r.email,u=r.emailLink,g=r.twemoji,m=r.fontAwesome,v=r.editormdLogo,c=r.pageBreak;return n.emoji=function(t){var e=(t=t.replace(w.regexs.emojiDatetime,function(t){return t.replace(/:/g,":")})).match(o);if(!e||!s.emoji)return t;for(var n=0,i=e.length;n<i;n++)":+1:"===e[n]&&(e[n]=":\\+1:"),t=t.replace(new RegExp(e[n]),function(t){var e=t.match(m),n=t.replace(/:/g,"");if(e)for(var i=0,r=e.length;i<r;i++){var o=e[i].replace(/:/g,"");return'<i class="fa '+o+' fa-emoji" title="'+o.replace("fa-","")+'"></i>'}else{var a=t.match(v),s=t.match(g);if(a)for(var l=0,u=a.length;l<u;l++){var c=a[l].replace(/:/g,"");return'<i class="'+c+'" title="Editor.md logo ('+c+')"></i>'}else{if(!s){var d="+1"===n?"plus1":n;return d="moon"===(d="black_large_square"===d?"black_square":d)?"waxing_gibbous_moon":d,'<img src="'+w.emoji.path+d+w.emoji.ext+'" class="emoji" title=":'+n+':" alt=":'+n+':" />'}for(var h=0,f=s.length;h<f;h++){var p=s[h].replace(/:/g,"").replace("tw-","");return'<img src="'+w.twemoji.path+p+w.twemoji.ext+'" title="twemoji-'+p+'" alt="twemoji-'+p+'" class="emoji twemoji" />'}}}});return t},n.atLink=function(t){return a.test(t)&&(s.atLink&&(t=(t=t.replace(l,function(t){return t.replace(/@/g,"_#_@_#_")})).replace(a,function(t,e){return'<a href="'+w.urls.atLinkBase+e+'" title="@'+e+'" class="at-link">'+t+"</a>"}).replace(/_#_@_#_/g,"@")),s.emailLink&&(t=t.replace(u,function(t,e,n,i,r){return!e&&_.inArray(r,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?'<a href="mailto:'+t+'">'+t+"</a>":t}))),t},n.link=function(t,e,n){if(this.options.sanitize){try{var i=decodeURIComponent(unescape(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(o){return""}if(0===i.indexOf("javascript:"))return""}var r='<a href="'+t+'"';return a.test(e)||a.test(n)?(e&&(r+=' title="'+e.replace(/@/g,"@")),r+'">'+n.replace(/@/g,"@")+"</a>"):(e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>")},n.heading=function(t,e){var n=t,i=/\s*\<a\s*href\=\"(.*)\"\s*([^\>]*)\>(.*)\<\/a\>\s*/;if(i.test(t)){for(var r=[],o=0,a=(t=t.split(/\<a\s*([^\>]+)\>([^\>]*)\<\/a\>/)).length;o<a;o++)r.push(t[o].replace(/\s*href\=\"(.*)\"\s*/g,""));t=r.join(" ")}var s=(t=h(t)).toLowerCase().replace(/[^\w]+/g,"-"),l={text:t,level:e,slug:s},u=/^[\u4e00-\u9fa5]+$/.test(t)?escape(t).replace(/\%/g,""):t.toLowerCase().replace(/[^\w]+/g,"-");d.push(l);var c="<h"+e+' id="h'+e+"-"+this.options.headerPrefix+u+'">';return c+='<a name="'+t+'" class="reference-link"></a>',c+='<span class="header-link octicon octicon-link"></span>',c+=i?this.atLink(this.emoji(n)):this.atLink(this.emoji(t)),c+="</h"+e+">"},n.pageBreak=function(t){return c.test(t)&&s.pageBreak&&(t='<hr style="page-break-after:always;" class="page-break editormd-page-break" />'),t},n.paragraph=function(t){var e=/\$\$(.*)\$\$/g.test(t),n=/^\$\$(.*)\$\$$/.test(t),i=n?' class="'+w.classNames.tex+'"':"",r=s.tocm?/^(\[TOC\]|\[TOCM\])$/.test(t):/^\[TOC\]$/.test(t),o=/^\[TOCM\]$/.test(t),a='<div class="markdown-toc editormd-markdown-toc">'+(t=!n&&e?t.replace(/(\$\$([^\$]*)\$\$)+/g,function(t,e){return'<span class="'+w.classNames.tex+'">'+e.replace(/\$/g,"")+"</span>"}):n?t.replace(/\$/g,""):t)+"</div>";return r?o?'<div class="editormd-toc-menu">'+a+"</div><br/>":a:c.test(t)?this.pageBreak(t):"<p"+i+">"+this.atLink(this.emoji(t))+"</p>\n"},n.code=function(t,e,n){return"seq"===e||"sequence"===e?'<div class="sequence-diagram">'+t+"</div>":"flow"===e?'<div class="flowchart">'+t+"</div>":"math"===e||"latex"===e||"katex"===e?'<p class="'+w.classNames.tex+'">'+t+"</p>":i.Renderer.prototype.code.apply(this,arguments)},n.tablecell=function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' style="text-align:'+e.align+'">':"<"+n+">")+this.atLink(this.emoji(t))+"</"+n+">\n"},n.listitem=function(t){return s.taskList&&/^\s*\[[x\s]\]\s*/.test(t)?(t=t.replace(/^\s*\[\s\]\s*/,'<input type="checkbox" class="task-list-item-checkbox" /> ').replace(/^\s*\[x\]\s*/,'<input type="checkbox" class="task-list-item-checkbox" checked disabled /> '),'<li style="list-style: none;">'+this.atLink(this.emoji(t))+"</li>"):"<li>"+this.atLink(this.emoji(t))+"</li>"},n},w.markdownToCRenderer=function(t,e,n,i){var r="",o=0,a=this.classPrefix;i=i||1;for(var s=0,l=t.length;s<l;s++){var u=t[s].text,c=t[s].level;c<i||(r+=o<c?"":c<o?new Array(o-c+2).join("</ul></li>"):"</ul></li>",r+='<li><a class="toc-level-'+c+'" href="#'+u+'" level="'+c+'">'+u+"</a><ul>",o=c)}var d=e.find(".markdown-toc");if(d.length<1&&"false"===e.attr("previewContainer")){var h='<div class="markdown-toc '+a+'markdown-toc"></div>';h=n?'<div class="'+a+'toc-menu">'+h+"</div>":h,e.html(h),d=e.find(".markdown-toc")}return n&&d.wrap('<div class="'+a+'toc-menu"></div><br/>'),d.html('<ul class="markdown-toc-list"></ul>').children(".markdown-toc-list").html(r.replace(/\r?\n?\<ul\>\<\/ul\>/g,"")),d},w.tocDropdownMenu=function(t,a){a=a||"Table of Contents";var s=400,e=t.find("."+this.classPrefix+"toc-menu");return e.each(function(){var t=_(this),e=t.children(".markdown-toc"),i='<i class="fa fa-angle-down"></i>',n='<a href="javascript:;" class="toc-menu-btn">'+i+a+"</a>",r=e.children("ul"),o=r.find("li");e.append(n),o.first().before("<li><h1>"+a+" "+i+"</h1></li>"),t.mouseover(function(){r.show(),o.each(function(){var t=_(this),e=t.children("ul");if(""===e.html()&&e.remove(),0<e.length&&""!==e.html()){var n=t.children("a").first();n.children(".fa").length<1&&n.append(_(i).css({"float":"right",paddingTop:"4px"}))}t.mouseover(function(){e.css("z-index",s).show(),s+=1}).mouseleave(function(){e.hide()})})}).mouseleave(function(){r.hide()})}),e},w.filterHTMLTags=function(t,e){if("string"!=typeof t&&(t=new String(t)),"string"!=typeof e)return t;for(var n=e.split("|"),i=n[0].split(","),a=n[1],r=0,o=i.length;r<o;r++){var s=i[r];t=t.replace(new RegExp("<s*"+s+"s*([^>]*)>([^>]*)<s*/"+s+"s*>","igm"),"")}if(void 0!==a){var l=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi;t="*"===a?t.replace(l,function(t,e,n,i,r){return"<"+e+">"+i+"</"+r+">"}):"on*"===a?t.replace(l,function(t,e,n,i,r){var o=_("<"+e+">"+i+"</"+r+">"),a=_(t)[0].attributes,s={};_.each(a,function(t,e){'"'!==e.nodeName&&(s[e.nodeName]=e.nodeValue)}),_.each(s,function(t){0===t.indexOf("on")&&delete s[t]}),o.attr(s);var l="undefined"!=typeof o[1]?_(o[1]).text():"";return o[0].outerHTML+l}):t.replace(l,function(t,e,n,i){var r=a.split(","),o=_(t);return o.html(i),_.each(r,function(t){o.attr(r[t],null)}),o[0].outerHTML})}return t},w.markdownToHTML=function(t,e){var n={gfm:!0,toc:!0,tocm:!1,tocStartLevel:1,tocTitle:"\u76ee\u5f55",tocDropdown:!1,tocContainer:"",markdown:"",markdownSourceCode:!1,htmlDecode:!1,autoLoadKaTeX:!0,pageBreak:!0,atLink:!0,emailLink:!0,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0};w.$marked=marked;var i=_("#"+t),r=i.settings=_.extend(!0,n,e||{}),o=i.find("textarea");o.length<1&&(i.append("<textarea></textarea>"),o=i.find("textarea"));var a=""===r.markdown?o.val():r.markdown,s=[],l={toc:r.toc,tocm:r.tocm,tocStartLevel:r.tocStartLevel,taskList:r.taskList,emoji:r.emoji,tex:r.tex,pageBreak:r.pageBreak,atLink:r.atLink,emailLink:r.emailLink,flowChart:r.flowChart,sequenceDiagram:r.sequenceDiagram,previewCodeHighlight:r.previewCodeHighlight},u={renderer:w.markedRenderer(s,l),gfm:r.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:!r.htmlDecode,smartLists:!0,smartypants:!0};a=new String(a);var c=marked(a,u);c=w.filterHTMLTags(c,r.htmlDecode),r.markdownSourceCode?o.text(a):o.remove(),i.addClass("markdown-body "+this.classPrefix+"html-preview").append(c);var d=""!==r.tocContainer?_(r.tocContainer):i;if(""!==r.tocContainer&&d.attr("previewContainer",!1),r.toc&&(i.tocContainer=this.markdownToCRenderer(s,d,r.tocDropdown,r.tocStartLevel),(r.tocDropdown||0<i.find("."+this.classPrefix+"toc-menu").length)&&this.tocDropdownMenu(i,r.tocTitle),""!==r.tocContainer&&i.find(".editormd-toc-menu, .editormd-markdown-toc").remove()),r.previewCodeHighlight&&(i.find("pre").addClass("prettyprint linenums"),prettyPrint()),w.isIE8||(r.flowChart&&i.find(".flowchart").flowChart(),r.sequenceDiagram&&i.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),r.tex){var h=function(){i.find("."+w.classNames.tex).each(function(){var t=_(this);katex.render(t.html().replace(/</g,"<").replace(/>/g,">"),t[0]),t.find(".katex").css("font-size","1.6em")})};!r.autoLoadKaTeX||w.$katex||w.kaTeXLoaded?h():this.loadKaTeX(function(){w.$katex=katex,w.kaTeXLoaded=!0,h()})}return i.getMarkdown=function(){return o.val()},i},w.themes=["default","dark"],w.previewThemes=["default","dark"],w.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],w.loadPlugins={},w.loadFiles={js:[],css:[],plugin:[]},w.loadPlugin=function(t,e,n){e=e||function(){},this.loadScript(t,function(){w.loadFiles.plugin.push(t),e()},n)},w.loadCSS=function(t,e,n){n=n||"head",e=e||function(){};var i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.onload=i.onreadystatechange=function(){w.loadFiles.css.push(t),e()},i.href=t+".css","head"===n?document.getElementsByTagName("head")[0].appendChild(i):document.body.appendChild(i)},w.isIE="Microsoft Internet Explorer"==navigator.appName,w.isIE8=w.isIE&&"8."==navigator.appVersion.match(/8./i),w.loadScript=function(t,e,n){n=n||"head",e=e||function(){};var i=null;(i=document.createElement("script")).id=t.replace(/[\./]+/g,"-"),i.type="text/javascript",i.src=t+".js",w.isIE8?i.onreadystatechange=function(){i.readyState&&("loaded"!==i.readyState&&"complete"!==i.readyState||(i.onreadystatechange=null,w.loadFiles.js.push(t),e()))}:i.onload=function(){w.loadFiles.js.push(t),e()},"head"===n?document.getElementsByTagName("head")[0].appendChild(i):document.body.appendChild(i)},w.katexURL={css:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min",js:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min"},w.kaTeXLoaded=!1,w.loadKaTeX=function(t){w.loadCSS(w.katexURL.css,function(){w.loadScript(w.katexURL.js,t||function(){})})},w.lockScreen=function(t){_("html,body").css("overflow",t?"hidden":"")},w.createDialog=function(e){var t={name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1};e=_.extend(!0,t,e);var n=this,i=this.editor,r=w.classPrefix,o=(new Date).getTime(),a=""===e.name?r+"dialog-"+o:e.name,s=w.mouseOrTouch,l='<div class="'+r+"dialog "+a+'">';""!==e.title&&(l+='<div class="'+r+'dialog-header"'+(e.drag?' style="cursor: move;"':"")+">",l+='<strong class="'+r+'dialog-title">'+e.title+"</strong>",l+="</div>"),e.closed&&(l+='<a href="javascript:;" class="fa fa-close '+r+'dialog-close"></a>'),l+='<div class="'+r+'dialog-container">'+e.content,(e.footer||"string"==typeof e.footer)&&(l+='<div class="'+r+'dialog-footer">'+("boolean"==typeof e.footer?"":e.footer)+"</div>"),l+="</div>",l+='<div class="'+r+"dialog-mask "+r+'dialog-mask-bg"></div>',l+='<div class="'+r+"dialog-mask "+r+'dialog-mask-con"></div>',l+="</div>",i.append(l);var u=i.find("."+a);u.lockScreen=function(t){return e.lockScreen&&(_("html,body").css("overflow",t?"hidden":""),n.resize()),u},u.showMask=function(){return e.mask&&i.find("."+r+"mask").css(e.maskStyle).css("z-index",w.dialogZindex-1).show(),u},u.hideMask=function(){return e.mask&&i.find("."+r+"mask").hide(),u},u.loading=function(t){return u.find("."+r+"dialog-mask")[t?"show":"hide"](),u},u.lockScreen(!0).showMask(),u.show().css({zIndex:w.dialogZindex,border:w.isIE8?"1px solid #ddd":"",width:"number"==typeof e.width?e.width+"px":e.width,height:"number"==typeof e.height?e.height+"px":e.height});var c=function(){u.css({top:(_(window).height()-u.height())/2+"px",left:(_(window).width()-u.width())/2+"px"})};if(c(),_(window).resize(c),u.children("."+r+"dialog-close").bind(s("click","touchend"),function(){u.hide().lockScreen(!1).hideMask()}),"object"==typeof e.buttons){var d=u.footer=u.find("."+r+"dialog-footer");for(var h in e.buttons){var f=e.buttons[h],p=r+h+"-btn";d.append('<button class="'+r+"btn "+p+'">'+f[0]+"</button>"),f[1]=_.proxy(f[1],u),d.children("."+p).bind(s("click","touchend"),f[1])}}if(""!==e.title&&e.drag){var g,m,v=u.children("."+r+"dialog-header");e.mask||v.bind(s("click","touchend"),function(){w.dialogZindex+=2,u.css("z-index",w.dialogZindex)}),v.mousedown(function(t){t=t||window.event,g=t.clientX-parseInt(u[0].style.left),
|
|
m=t.clientY-parseInt(u[0].style.top),document.onmousemove=b});var y=function(t){t.removeClass(r+"user-unselect").off("selectstart")},x=function(t){t.addClass(r+"user-unselect").on("selectstart",function(){return!1})},b=function(t){t=t||window.event;var e,n,i=parseInt(u[0].style.left),r=parseInt(u[0].style.top);0<=i?i+u.width()<=_(window).width()?e=t.clientX-g:(e=_(window).width()-u.width(),document.onmousemove=null):(e=0,document.onmousemove=null),0<=r?n=t.clientY-m:(n=0,document.onmousemove=null),document.onselectstart=function(){return!1},x(_("body")),x(u),u[0].style.left=e+"px",u[0].style.top=n+"px"};document.onmouseup=function(){y(_("body")),y(u),document.onselectstart=null,document.onmousemove=null},v.touchDraggable=function(){var i=null,t=function(t){var e=t.originalEvent,n=_(this).parent().position();i={x:e.changedTouches[0].pageX-n.left,y:e.changedTouches[0].pageY-n.top}},e=function(t){t.preventDefault();var e=t.originalEvent;_(this).parent().css({top:e.changedTouches[0].pageY-i.y,left:e.changedTouches[0].pageX-i.x})};this.bind("touchstart",t).bind("touchmove",e)},v.touchDraggable()}return w.dialogZindex+=2,u},w.mouseOrTouch=function(t,e){e=e||"touchend";var n=t=t||"click";try{document.createEvent("TouchEvent"),n=e}catch(i){}return n},w.dateFormat=function(t){t=t||"";var e=function(t){return t<10?"0"+t:t},n=new Date,i=n.getFullYear(),r=i.toString().slice(2,4),o=e(n.getMonth()+1),a=e(n.getDate()),s=n.getDay(),l=e(n.getHours()),u=e(n.getMinutes()),c=e(n.getSeconds()),d=e(n.getMilliseconds()),h="",f=r+"-"+o+"-"+a,p=i+"-"+o+"-"+a,g=l+":"+u+":"+c;switch(t){case"UNIX Time":h=n.getTime();break;case"UTC":h=n.toUTCString();break;case"yy":h=r;break;case"year":case"yyyy":h=i;break;case"month":case"mm":h=o;break;case"cn-week-day":case"cn-wd":h="\u661f\u671f"+["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"][s];break;case"week-day":case"wd":h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][s];break;case"day":case"dd":h=a;break;case"hour":case"hh":h=l;break;case"min":case"ii":h=u;break;case"second":case"ss":h=c;break;case"ms":h=d;break;case"yy-mm-dd":h=f;break;case"yyyy-mm-dd":h=p;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":h=p+" "+g+" "+d;break;case"full":case"yyyy-mm-dd h:i:s":default:h=p+" "+g}return h},w}}),function(){var n=function(t){var e={name:"zh-tw",description:"\u958b\u6e90\u5728\u7ddaMarkdown\u7de8\u8f2f\u5668<br/>Open source online Markdown editor.",tocTitle:"\u76ee\u9304",toolbar:{undo:"\u64a4\u92b7\uff08Ctrl+Z\uff09",redo:"\u91cd\u505a\uff08Ctrl+Y\uff09",bold:"\u7c97\u9ad4",del:"\u522a\u9664\u7dda",italic:"\u659c\u9ad4",quote:"\u5f15\u7528",ucwords:"\u5c07\u6240\u9078\u7684\u6bcf\u500b\u55ae\u8a5e\u9996\u5b57\u6bcd\u8f49\u6210\u5927\u5beb",uppercase:"\u5c07\u6240\u9078\u6587\u672c\u8f49\u6210\u5927\u5beb",lowercase:"\u5c07\u6240\u9078\u6587\u672c\u8f49\u6210\u5c0f\u5beb",h1:"\u6a19\u984c1",h2:"\u6a19\u984c2",h3:"\u6a19\u984c3",h4:"\u6a19\u984c4",h5:"\u6a19\u984c5",h6:"\u6a19\u984c6","list-ul":"\u7121\u5e8f\u5217\u8868","list-ol":"\u6709\u5e8f\u5217\u8868",hr:"\u6a2a\u7ebf",link:"\u94fe\u63a5","reference-link":"\u5f15\u7528\u93c8\u63a5",image:"\u5716\u7247",code:"\u884c\u5167\u4ee3\u78bc","preformatted-text":"\u9810\u683c\u5f0f\u6587\u672c / \u4ee3\u78bc\u584a\uff08\u7e2e\u9032\u98a8\u683c\uff09","code-block":"\u4ee3\u78bc\u584a\uff08\u591a\u8a9e\u8a00\u98a8\u683c\uff09",table:"\u6dfb\u52a0\u8868\u683c",datetime:"\u65e5\u671f\u6642\u9593",emoji:"Emoji \u8868\u60c5","html-entities":"HTML \u5be6\u9ad4\u5b57\u7b26",pagebreak:"\u63d2\u5165\u5206\u9801\u7b26",watch:"\u95dc\u9589\u5be6\u6642\u9810\u89bd",unwatch:"\u958b\u555f\u5be6\u6642\u9810\u89bd",preview:"\u5168\u7a97\u53e3\u9810\u89bdHTML\uff08\u6309 Shift + ESC \u9000\u51fa\uff09",fullscreen:"\u5168\u5c4f\uff08\u6309 ESC \u9000\u51fa\uff09",clear:"\u6e05\u7a7a",search:"\u641c\u5c0b",help:"\u4f7f\u7528\u5e6b\u52a9",info:"\u95dc\u65bc"+t.title},buttons:{enter:"\u78ba\u5b9a",cancel:"\u53d6\u6d88",close:"\u95dc\u9589"},dialog:{link:{title:"\u6dfb\u52a0\u93c8\u63a5",url:"\u93c8\u63a5\u5730\u5740",urlTitle:"\u93c8\u63a5\u6a19\u984c",urlEmpty:"\u932f\u8aa4\uff1a\u8acb\u586b\u5beb\u93c8\u63a5\u5730\u5740\u3002"},referenceLink:{title:"\u6dfb\u52a0\u5f15\u7528\u93c8\u63a5",name:"\u5f15\u7528\u540d\u7a31",url:"\u93c8\u63a5\u5730\u5740",urlId:"\u93c8\u63a5ID",urlTitle:"\u93c8\u63a5\u6a19\u984c",nameEmpty:"\u932f\u8aa4\uff1a\u5f15\u7528\u93c8\u63a5\u7684\u540d\u7a31\u4e0d\u80fd\u70ba\u7a7a\u3002",idEmpty:"\u932f\u8aa4\uff1a\u8acb\u586b\u5beb\u5f15\u7528\u93c8\u63a5\u7684ID\u3002",urlEmpty:"\u932f\u8aa4\uff1a\u8acb\u586b\u5beb\u5f15\u7528\u93c8\u63a5\u7684URL\u5730\u5740\u3002"},image:{title:"\u6dfb\u52a0\u5716\u7247",url:"\u5716\u7247\u5730\u5740",link:"\u5716\u7247\u93c8\u63a5",alt:"\u5716\u7247\u63cf\u8ff0",uploadButton:"\u672c\u5730\u4e0a\u50b3",imageURLEmpty:"\u932f\u8aa4\uff1a\u5716\u7247\u5730\u5740\u4e0d\u80fd\u70ba\u7a7a\u3002",uploadFileEmpty:"\u932f\u8aa4\uff1a\u4e0a\u50b3\u7684\u5716\u7247\u4e0d\u80fd\u70ba\u7a7a\uff01",formatNotAllowed:"\u932f\u8aa4\uff1a\u53ea\u5141\u8a31\u4e0a\u50b3\u5716\u7247\u6587\u4ef6\uff0c\u5141\u8a31\u4e0a\u50b3\u7684\u5716\u7247\u6587\u4ef6\u683c\u5f0f\u6709\uff1a"},preformattedText:{title:"\u6dfb\u52a0\u9810\u683c\u5f0f\u6587\u672c\u6216\u4ee3\u78bc\u584a",emptyAlert:"\u932f\u8aa4\uff1a\u8acb\u586b\u5beb\u9810\u683c\u5f0f\u6587\u672c\u6216\u4ee3\u78bc\u7684\u5167\u5bb9\u3002"},codeBlock:{title:"\u6dfb\u52a0\u4ee3\u78bc\u584a",selectLabel:"\u4ee3\u78bc\u8a9e\u8a00\uff1a",selectDefaultText:"\u8acb\u8a9e\u8a00\u4ee3\u78bc\u8a9e\u8a00",otherLanguage:"\u5176\u4ed6\u8a9e\u8a00",unselectedLanguageAlert:"\u932f\u8aa4\uff1a\u8acb\u9078\u64c7\u4ee3\u78bc\u6240\u5c6c\u7684\u8a9e\u8a00\u985e\u578b\u3002",codeEmptyAlert:"\u932f\u8aa4\uff1a\u8acb\u586b\u5beb\u4ee3\u78bc\u5167\u5bb9\u3002"},htmlEntities:{title:"HTML\u5be6\u9ad4\u5b57\u7b26"},help:{title:"\u4f7f\u7528\u5e6b\u52a9"}}};t.defaults.lang=e};"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=n:"function"==typeof define?define.amd?define(["editormd"],function(t){n(t)}):define(function(t){var e=t("../editormd");n(e)}):n(window.editormd)}(),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).dragula=t()}}(function(){return function c(o,a,s){function l(n,t){if(!a[n]){if(!o[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(u)return u(n,!0);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[n]={exports:{}};o[n][0].call(r.exports,function(t){var e=o[n][1][t];return l(e||t)},r,r.exports,c,o,a,s)}return a[n].exports}for(var u="function"==typeof require&&require,t=0;t<s.length;t++)l(s[t]);return l}({1:[function(t,e){"use strict";function i(t){var e=o[t];return e?e.lastIndex=0:o[t]=e=new RegExp(a+t+s,"g"),e}function n(t,e){var n=t.className;n.length?i(e).test(n)||(t.className+=" "+e):t.className=e}function r(t,e){t.className=t.className.replace(i(e)," ").trim()}var o={},a="(?:^|\\s)",s="(?:\\s|$)";e.exports={add:n,rm:r}},{}],2:[function(i,o){(function(s){"use strict";function t(t,e){function a(t){return-1!==q.containers.indexOf(t)||U.isContainer(t)}function n(t){var e=t?"remove":"add";G(ut,e,"mousedown",l),G(ut,e,"mouseup",v)}function o(t){G(ut,t?"remove":"add","mousemove",u)}function s(t){var e=t?"remove":"add";at[e](ut,"selectstart",r),at[e](ut,"click",r)}function i(){n(!0),v({})}function r(t){V&&t.preventDefault()}function l(t){if($=t.clientX,F=t.clientY,!(1!==Y(t)||t.metaKey||t.ctrlKey)){var e=t.target,n=c(e);n&&(V=n,o(),"mousedown"===t.type&&(nt(e)?e.focus():t.preventDefault()))}}function u(t){if(V)if(0!==Y(t)){if(void 0===t.clientX||t.clientX!==$||void 0===t.clientY||t.clientY!==F){if(U.ignoreInputTextSelection){var e=rt("clientX",t),n=rt("clientY",t);if(nt(lt.elementFromPoint(e,n)))return}var i=V;o(!0),s(),g(),f(i);var r=Z(P);N=rt("pageX",t)-r.left,R=rt("pageY",t)-r.top,st.add(H||P,"gu-transit"),D(),C(t)}}else v({})}function c(t){if(!(q.dragging&&L||a(t))){for(var e=t;et(t)&&!1===a(et(t));){if(U.invalid(t,e))return;if(!(t=et(t)))return}var n=et(t);if(n)if(!U.invalid(t,e))if(U.moves(t,n,e,it(t)))return{item:t,source:n}}}function d(t){return!!c(t)}function h(t){var e=c(t);e&&f(e)}function f(t){E(t.item,t.source)&&(H=t.item.cloneNode(!0),q.emit("cloned",H,t.item,"copy")),O=t.source,P=t.item,z=j=it(t.item),q.dragging=!0,q.emit("drag",P,O)}function p(){return!1}function g(){if(q.dragging){var t=H||P;y(t,et(t))}}function m(){o(!(V=!1)),s(!0)}function v(t){if(m(),q.dragging){var e=H||P,n=rt("clientX",t),i=rt("clientY",t),r=S(X(L,n,i),n,i);r&&(H&&U.copySortSource||!H||r!==O)?y(e,r):U.removeOnSpill?x():b()}}function y(t,e){var n=et(t);H&&U.copySortSource&&e===O&&n.removeChild(P),w(e)?q.emit("cancel",t,O,O):q.emit("drop",t,e,O,j),_()}function x(){if(q.dragging){var t=H||P,e=et(t);e&&e.removeChild(t),q.emit(H?"cancel":"remove",t,e,O),_()}}function b(t){if(q.dragging){var e=0<arguments.length?t:U.revertOnSpill,n=H||P,i=et(n),r=w(i);!1===r&&e&&(H?i&&i.removeChild(H):O.insertBefore(n,z)),r||e?q.emit("cancel",n,O,O):q.emit("drop",n,i,O,j),_()}}function _(){var t=H||P;m(),M(),t&&st.rm(t,"gu-transit"),B&&clearTimeout(B),q.dragging=!1,W&&q.emit("out",t,W,O),q.emit("dragend",t),O=P=H=z=j=B=W=null}function w(t,e){var n;return n=void 0!==e?e:L?j:it(H||P),t===O&&n===z}function S(n,i,r){function t(){if(!1===a(o))return!1;var t=k(o,n),e=I(o,t,i,r);return!!w(o,e)||U.accepts(P,o,O,e)}for(var o=n;o&&!t();)o=et(o);return o}function C(t){function e(t){q.emit(t,l,W,O)}function n(){d&&e("over")}function i(){W&&e("out")}if(L){t.preventDefault();var r=rt("clientX",t),o=rt("clientY",t),a=r-N,s=o-R;L.style.left=a+"px",L.style.top=s+"px";var l=H||P,u=X(L,r,o),c=S(u,r,o),d=null!==c&&c!==W;(d||null===c)&&(i(),W=c,n());var h=et(l);if(c!==O||!H||U.copySortSource){var f,p=k(c,u);if(null!==p)f=I(c,p,r,o);else{if(!0!==U.revertOnSpill||H)return void(H&&h&&h.removeChild(l));f=z,c=O}(null===f&&d||f!==l&&f!==it(l))&&(j=f,c.insertBefore(l,f),q.emit("shadow",l,c,O))}else h&&h.removeChild(l)}}function T(t){st.rm(t,"gu-hide")}function A(t){q.dragging&&st.add(t,"gu-hide")}function D(){if(!L){var t=P.getBoundingClientRect();(L=P.cloneNode(!0)).style.width=J(t)+"px",L.style.height=tt(t)+"px",st.rm(L,"gu-transit"),st.add(L,"gu-mirror"),U.mirrorContainer.appendChild(L),G(ut,"add","mousemove",C),st.add(U.mirrorContainer,"gu-unselectable"),q.emit("cloned",L,P,"mirror")}}function M(){L&&(st.rm(U.mirrorContainer,"gu-unselectable"),G(ut,"remove","mousemove",C),et(L).removeChild(L),L=null)}function k(t,e){for(var n=e;n!==t&&et(n)!==t;)n=et(n);return n===ut?null:n}function I(r,e,o,a){function t(){var t,e,n,i=r.children.length;for(t=0;t<i;t++){if(n=(e=r.children[t]).getBoundingClientRect(),s&&n.left+n.width/2>o)return e;if(!s&&n.top+n.height/2>a)return e}return null}function n(){var t=e.getBoundingClientRect();return i(s?o>t.left+J(t)/2:a>t.top+tt(t)/2)}function i(t){return t?it(e):e}var s="horizontal"===U.direction;return e!==r?n():t()}function E(t,e){return"boolean"==typeof U.copy?U.copy:U.copy(t,e)}var L,O,P,N,R,$,F,z,j,H,B;1===arguments.length&&!1===Array.isArray(t)&&(e=t,t=[]);var V,W=null,U=e||{};void 0===U.moves&&(U.moves=Q),void 0===U.accepts&&(U.accepts=Q),void 0===U.invalid&&(U.invalid=p),void 0===U.containers&&(U.containers=t||[]),void 0===U.isContainer&&(U.isContainer=K),void 0===U.copy&&(U.copy=!1),void 0===U.copySortSource&&(U.copySortSource=!1),void 0===U.revertOnSpill&&(U.revertOnSpill=!1),void 0===U.removeOnSpill&&(U.removeOnSpill=!1),void 0===U.direction&&(U.direction="vertical"),void 0===U.ignoreInputTextSelection&&(U.ignoreInputTextSelection=!0),void 0===U.mirrorContainer&&(U.mirrorContainer=lt.body);var q=ot({containers:U.containers,start:h,end:g,cancel:b,remove:x,destroy:i,canMove:d,dragging:!1});return!0===U.removeOnSpill&&q.on("over",T).on("out",A),n(),q}function G(t,e,n,i){var r={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},o={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},a={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};s.navigator.pointerEnabled?at[e](t,o[n],i):s.navigator.msPointerEnabled?at[e](t,a[n],i):(at[e](t,r[n],i),at[e](t,n,i))}function Y(t){if(void 0!==t.touches)return t.touches.length;if(void 0!==t.which&&0!==t.which)return t.which;if(void 0!==t.buttons)return t.buttons;var e=t.button;return void 0!==e?1&e?1:2&e?3:4&e?2:0:void 0}function Z(t){var e=t.getBoundingClientRect();return{left:e.left+n("scrollLeft","pageXOffset"),top:e.top+n("scrollTop","pageYOffset")}}function n(t,e){return"undefined"!=typeof s[e]?s[e]:ut.clientHeight?ut[t]:lt.body[t]}function X(t,e,n){var i,r=t||{},o=r.className;return r.className+=" gu-hide",i=lt.elementFromPoint(e,n),r.className=o,i}function K(){return!1}function Q(){return!0}function J(t){return t.width||t.right-t.left}function tt(t){return t.height||t.bottom-t.top}function et(t){return t.parentNode===lt?null:t.parentNode}function nt(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||e(t)}function e(t){return!!t&&("false"!==t.contentEditable&&("true"===t.contentEditable||e(et(t))))}function it(e){function t(){for(var t=e;(t=t.nextSibling)&&1!==t.nodeType;);return t}return e.nextElementSibling||t()}function r(t){return t.targetTouches&&t.targetTouches.length?t.targetTouches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t}function rt(t,e){var n=r(e),i={pageX:"clientX",pageY:"clientY"};return t in i&&!(t in n)&&i[t]in n&&(t=i[t]),n[t]}var ot=i("contra/emitter"),at=i("crossvent"),st=i("./classes"),lt=document,ut=lt.documentElement;o.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(t,e){e.exports=function n(t,e){return Array.prototype.slice.call(t,e)}},{}],4:[function(t,e){"use strict";var r=t("ticky");e.exports=function o(t,e,n){t&&r(function i(){t.apply(n||null,e||[])})}},{ticky:9}],5:[function(t,e){"use strict";var l=t("atoa"),u=t("./debounce");e.exports=function n(o,t){var a=t||{},s={};return o===undefined&&(o={}),o.on=function(t,e){return s[t]?s[t].push(e):s[t]=[e],o},o.once=function(t,e){return e._once=!0,o.on(t,e),o},o.off=function(t,e){var n=arguments.length;if(1===n)delete s[t];else if(0===n)s={};else{var i=s[t];if(!i)return o;i.splice(i.indexOf(e),1)}return o},o.emit=function(){var t=l(arguments);return o.emitterSnapshot(t.shift()).apply(this,t)},o.emitterSnapshot=function(r){var t=(s[r]||[]).slice(0);return function(){var e=l(arguments),n=this||o;if("error"===r&&!1!==a["throws"]&&!t.length)throw 1===e.length?e[0]:e;return t.forEach(function i(t){a.async?u(t,e,n):t.apply(n,e),t._once&&o.off(r,t)}),o}},o}},{"./debounce":4,atoa:3}],6:[function(m,v){(function(s){"use strict";function t(t,e,n,i){return t.addEventListener(e,n,i)}function e(t,e,n){return t.attachEvent("on"+e,a(t,e,n))}function n(t,e,n,i){return t.removeEventListener(e,n,i)}function i(t,e,n){var i=l(t,e,n);if(i)return t.detachEvent("on"+e,i)}function r(t,e,n){function i(){var t;return h.createEvent?(t=h.createEvent("Event")).initEvent(e,!0,!0):h.createEventObject&&(t=h.createEventObject()),t}function r(){return new c(e,{detail:n})}var o=-1===d.indexOf(e)?r():i();t.dispatchEvent?t.dispatchEvent(o):t.fireEvent("on"+e,o)}function o(r,t,o){return function a(t){var e=t||s.event;e.target=e.target||e.srcElement,e.preventDefault=e.preventDefault||function n(){e.returnValue=!1},e.stopPropagation=e.stopPropagation||function i(){e.cancelBubble=!0},e.which=e.which||e.keyCode,o.call(r,e)}}function a(t,e,n){var i=l(t,e,n)||o(t,e,n);return g.push({wrapper:i,element:t,type:e,fn:n}),i}function l(t,e,n){var i=u(t,e,n);if(i){var r=g[i].wrapper;return g.splice(i,1),r}}function u(t,e,n){var i,r;for(i=0;i<g.length;i++)if((r=g[i]).element===t&&r.type===e&&r.fn===n)return i}var c=m("custom-event"),d=m("./eventmap"),h=s.document,f=t,p=n,g=[];s.addEventListener||(f=e,p=i),v.exports={add:f,remove:p,fabricate:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(t,r){(function(t){"use strict";var e=[],n="",i=/^on/;for(n in t)i.test(n)&&e.push(n.slice(2));r.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(t,r){(function(t){function e(){try{var t=new n("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(c){}return!1}var n=t.CustomEvent;r.exports=e()?n:"function"==typeof document.createEvent?function i(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function i(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(t,e){var n;n="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){setTimeout(t,0)},e.exports=n},{}]},{},[2])(2)}),jQuery.fn.datepicker.dates["zh-CN"]={days:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],daysShort:["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],daysMin:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],months:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],monthsShort:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],today:"\u4eca\u5929",monthsTitle:"\u9009\u62e9\u6708\u4efd",clear:"\u6e05\u9664",format:"yyyy-mm-dd",titleFormat:"yyyy\u5e74mm\u6708",weekStart:1},jQuery.fn.datetimepicker.dates["zh-CN"]={days:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d","\u661f\u671f\u65e5"],daysShort:["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d","\u5468\u65e5"],daysMin:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u65e5"],months:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],monthsShort:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],today:"\u4eca\u5929",suffix:[],meridiem:["\u4e0a\u5348","\u4e0b\u5348"]},function(t){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate"],t):t(jQuery)}(function(t){t.extend(t.validator.messages,{required:"\u8fd9\u662f\u5fc5\u586b\u5b57\u6bb5",remote:"\u8bf7\u4fee\u6b63\u6b64\u5b57\u6bb5",email:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740",url:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u7f51\u5740",date:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u65e5\u671f",dateISO:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u65e5\u671f (YYYY-MM-DD)",number:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u6570\u5b57",digits:"\u53ea\u80fd\u8f93\u5165\u6570\u5b57",creditcard:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u4fe1\u7528\u5361\u53f7\u7801",equalTo:"\u4f60\u7684\u8f93\u5165\u4e0d\u76f8\u540c",extension:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u540e\u7f00",maxlength:t.validator.format("\u6700\u591a\u53ef\u4ee5\u8f93\u5165 {0} \u4e2a\u5b57\u7b26"),minlength:t.validator.format("\u6700\u5c11\u8981\u8f93\u5165 {0} \u4e2a\u5b57\u7b26"),rangelength:t.validator.format("\u8bf7\u8f93\u5165\u957f\u5ea6\u5728 {0} \u5230 {1} \u4e4b\u95f4\u7684\u5b57\u7b26\u4e32"),range:t.validator.format("\u8bf7\u8f93\u5165\u8303\u56f4\u5728 {0} \u5230 {1} \u4e4b\u95f4\u7684\u6570\u503c"),max:t.validator.format("\u8bf7\u8f93\u5165\u4e0d\u5927\u4e8e {0} \u7684\u6570\u503c"),min:t.validator.format("\u8bf7\u8f93\u5165\u4e0d\u5c0f\u4e8e {0} \u7684\u6570\u503c")})}),function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var t=jQuery.fn.select2.amd;t.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"\u65e0\u6cd5\u8f7d\u5165\u7ed3\u679c\u3002"},inputTooLong:function(t){return"\u8bf7\u5220\u9664"+(t.input.length-t.maximum)+"\u4e2a\u5b57\u7b26"},inputTooShort:function(t){return"\u8bf7\u518d\u8f93\u5165\u81f3\u5c11"+(t.minimum-t.input.length)+"\u4e2a\u5b57\u7b26"},loadingMore:function(){return"\u8f7d\u5165\u66f4\u591a\u7ed3\u679c\u2026"},maximumSelected:function(t){return"\u6700\u591a\u53ea\u80fd\u9009\u62e9"+t.maximum+"\u4e2a\u9879\u76ee"},noResults:function(){return"\u672a\u627e\u5230\u7ed3\u679c"},searching:function(){return"\u641c\u7d22\u4e2d\u2026"},removeAllItems:function(){return"\u5220\u9664\u6240\u6709\u9879\u76ee"}}}),t.define,t.require}(),$(document).on("turbolinks:load",function(){0<$("body.admins-abouts-edit-page, body.admins-abouts-update-page").length&&createMDEditor("about-us-editor",{})}),$(document).on("turbolinks:load",function(){0<$("body.admins-agreements-edit-page, body.admins-agreements-update-page").length&&createMDEditor("agreement-editor",{})}),$(document).on("turbolinks:load",function(){$(document).on("click",".batch-all-check-box",function(){var t=$(this);$(".batch-check-box").prop("checked",t.is(":checked"))}),$(document).on("click",".batch-check-box",function(){var t=$(".batch-check-box:checked").length===$(".batch-check-box").length;$(".batch-all-check-box").prop("checked",t)})}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-carousels-index-page").length){var a=$("#carousels-container").data("laboratoryId"),s=function(){$("#carousels-container .custom-carousel-item-no").each(function(t,e){$(e).html(t+1)})};$(document).on("delete_success",s),$(".carousels-card").on("click",".save-data-btn",function(){var t=$(this),e=t.data("id"),n=$(".custom-carousel-item-"+e).find(".link-input").val(),i=$(".custom-carousel-item-"+e).find(".name-input").val();i&&0!=i.length?(t.attr("disabled",!0),$.ajax({url:"/admins/laboratories/"+a+"/carousels/"+e,method:"PATCH",dataType:"json",data:{link:n,name:i},success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"})},error:ajaxErrorNotifyHandler,complete:function(){t.removeAttr("disabled")}})):$.notify({message:"\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a"},{type:"danger"})}),$(".carousels-card").on("change",".online-check-box",function(){var t=$(this),e=t.data("id"),n=t.is(":checked");t.attr("disabled",!0),$.ajax({url:"/admins/laboratories/"+a+"/carousels/"+e,method:"PATCH",dataType:"json",data:{status:n},success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"});var t=$(".custom-carousel-item-"+e).find(".drag");n?t.removeClass("not_active"):t.addClass("not_active")},error:ajaxErrorNotifyHandler,complete:function(){t.removeAttr("disabled")}})});var t=function(t,e,n,i){var r=$(t).data("id"),o=$(i).data("id")||"";$.ajax({url:"/admins/laboratories/"+a+"/carousels/drag",method:"POST",dataType:"json",data:{move_id:r,after_id:o},success:function(){s()},error:function(t){var e=t.responseJSON;$.notify({message:"\u79fb\u52a8\u5931\u8d25\uff0c\u539f\u56e0\uff1a"+e.message},{type:"danger"})}})},e=document.getElementById("carousels-container");dragula([e],{mirrorContainer:e}).on("drop",t);var n=$(".modal.admin-add-carousel-modal"),i=n.find("form.admin-add-carousel-form");i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"portal_image[image]":{required:!0},"portal_image[name]":{required:!0}}}),n.on("show.bs.modal",function(){resetFileInputFunc(n.find(".img-file-input")),n.find(".file-names").html("\u9009\u62e9\u6587\u4ef6")}),n.on("click",".submit-btn",function(){i.find(".error").html(""),i.valid()?i.submit():i.find(".error").html("\u8bf7\u9009\u62e9\u56fe\u7247")}),n.on("change",".img-file-input",function(){var t=$(this)[0].files[0];n.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")}),$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){$(".custom-carousel-item-"+e.source_id).find(".custom-carousel-item-img img").attr("src",e.url)})}}),$(document).on("turbolinks:load",function(){var n=$(".admin-common-refuse-modal");if(0<n.length){var s=n.find("form.admin-common-refuse-form"),l=n.find('.modal-body input[name="apply_id"]'),u=n.find(".modal-title");s.validate({errorElement:"span",errorClass:"danger text-danger",rules:{reason:{required:!0,maxlength:200}}}),n.on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=e.data("id"),i=e.data("url"),r=e.data("title"),o=e.data("type"),a="POST";void 0!==r&&u.html(r),void 0!==o&&(a=o),l.val(n),s.data("url",i),s.data("type",a)}),n.on("shown.bs.modal",function(){n.find('.modal-body textarea[name="reason"]').focus()}),n.on("hide.bs.modal",function(){l.val(""),n.find('.modal-body textarea[name="reason"]').val(""),s.data("url","")}),n.on("click",".submit-btn",function(){if(s.find(".error").html(""),s.valid()){var t=s.data("url"),e=s.data("type");$.ajax({method:e,dataType:"script",url:t,data:s.serialize()}).done(function(){n.modal("hide")})}})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-competition-settings-index-page").length){var n={autoclose:!0,language:"zh-CN",format:"yyyy-mm-dd",startDate:"2017-04-01"},i={autoclose:1,language:"zh-CN",format:"yyyy-mm-dd hh:ii",minuteStep:30},t=function(e){var t=$.extend({inputs:$(e).find(".start-date, .end-date")},n);$(e).datepicker(t),$(e).find(".start-date").datepicker().on("changeDate",function(t){$(e).find(".end-date").datepicker("setStartDate",t.date)})};$(".competition-start-end-date .start-date").datetimepicker(i),$(".competition-start-end-date .end-date").datetimepicker(i),$(".nav-setting-form .enroll_end_time").datetimepicker(i),$(".stage-update-form .section-start-time").datetimepicker(i),$(".stage-update-form .section-end-time").datetimepicker(i),t(".teaching-mode-date");var r=$("form.basic-setting-form");r.validate({errorElement:"span",errorClass:"danger text-danger",rules:{name:"required",subTitle:"required",startTime:"required",endTime:"required",mode:"required",identifier:"required"}}),r.on("click",".submit-btn",function(){r.find(".submit-btn").attr("disabled","disabled"),r.find(".error").html("");var t=r.valid();if(2==$("input[name='mode']:checked").val()){var e=$("input[name='course_id']");e.val()===undefined||0===e.val().length?(e.addClass("danger text-danger"),t=!1):e.removeClass("danger text-danger")}else if(3==$("input[name='mode']:checked").val()){var n=$("input[name='teach_start_time']"),i=$("input[name='teach_end_time']");n.val()===undefined||0===n.val().length?(n.addClass("danger text-danger"),t=!1):n.removeClass("danger text-danger"),i.val()===undefined||0===i.val().length?(i.addClass("danger text-danger"),t=!1):i.removeClass("danger text-danger")}else $("input[name='course_id']").removeClass("danger text-danger"),$("input[name='teach_start_time']").removeClass("danger text-danger"),$("input[name='teach_end_time']").removeClass("danger text-danger");t&&$.ajax({method:"POST",dataType:"json",url:r.attr("action"),data:new FormData(r[0]),processData:!1,contentType:!1,success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"})},error:function(t){var e=t.responseJSON;r.find(".error").html(e.message)},complete:function(){r.find(".submit-btn").attr("disabled",!1)}})});var e={theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8981\u6dfb\u52a0\u7684\u5355\u4f4d\u540d\u79f0",multiple:!0,minimumInputLength:1,ajax:{delay:500,url:"/api/schools/search.json",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.schools}}},templateResult:function(t){return t.id&&""!==t.id&&t.name||t.text},templateSelection:function(t){return t.name||t.text}};$(".sponsor-select").select2(e),$(".allow-school-select").select2(e),$(".manager-select").select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8981\u6dfb\u52a0\u7684\u7ba1\u7406\u5458\u59d3\u540d",multiple:!0,minimumInputLength:1,ajax:{delay:500,url:"/admins/users",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.users}}},templateResult:function(t){return t.id&&""!==t.id?$("<div class='row px-0'><span class='col-3'>"+t.real_name+"</span><span class='col-5 font-12'>"+t.school_name+"</span><span class='col-4 font-12'>"+t.hidden_phone+"</span></div>"):t.text},templateSelection:function(t){return t.id,t.real_name||t.text}}),$(".nav-setting-form").on("click",".add_linkBtn",function(){$(".nav-setting-form").find(".linkFormItem").length;var t='<div class="row mt-2 align-items-center linkFormItem">\n <div class="col-1 text-right">\n <label class="checkbox checkbox-primary mt-1">\n <input type="checkbox" name="navbar[][hidden]" value="0" hidden class="font-16" checked="checked">\n <input type="checkbox" value="0" class="font-16 module_hidden" checked="checked">\n </label>\n </div>\n <div class="col-md-label mt-1"><input type="hidden" value="md" name="navbar[][module_type]">\n <input type="text" name="navbar[][name]" value="" class="form-control" placeholder="\u6a21\u5757\u540d\u79f0"></div>\n <div class="col-md-1 mt-1"><input type="text" name="navbar[][position]" value="" class="form-control" placeholder="\u4f4d\u7f6e"></div>\n <div class="col-md-3 mt-1"><input type="text" name="navbar[][url]" value="" class="form-control" placeholder="\u8bf7\u8f93\u5165\u8d44\u6599\u4e0b\u8f7d\u5730\u5740"></div>\n <a class="mt-1 btn btn-primary waves-effect waves-light btn-xs setBtn_s add_linkBtn" href="javascript:void(0)">+</a>\n <a class="mt-1 btn btn-icon waves-effect btn-default waves-light setBtn_s ml10 del_linkBtn" href="javascript:void(0)">\xd7</a>\n </div>';$(this).parents(".linkFormItem").after(t)}),$(".nav-setting-form").on("click",".del_linkBtn",function(){$(this).parents(".linkFormItem").remove()}),$(".addRequireBtn").on("click",function(){var t=$("#requireForm").find(".requireForm_item").length+1,e='<div class="row mt-2 mb-4 requireForm_item">\n <div class="col-1 text-right"> </div>\n <div class="col-1 text-left mt-1">\n <input type="text" class="form-control" name="competition_staffs[][minimum]" value="0">\n </div>\n <span class="mt-2">~</span>\n <div class="col-1 mt-1">\n <input type="text" class="form-control" name="competition_staffs[][maximum]" value="1">\n </div>\n <span class="mt-2">\u4eba</span>\n <div class="col-2 mt-1">\n <select class="form-control" name="competition_staffs[][category]">\n <option value="student">\u5b66\u751f</option>\n <option value="teacher">\u6559\u5e08</option>\n </select>\n </div>\n <div class="col-2 mt-1">\n <label class="radio checkbox-primary mt-1" value="require_'+t+'_1">\n <input id="require_'+t+'_1" class="mutiple-limited-radio" value="false" checked name="competition_staffs[][mutiple_limited]" type="checkbox">\n <label for="require_'+t+'_1">\u53ef\u591a\u6b21\u62a5\u540d</label>\n </label>\n </div>\n <div class="col-2 mt-1">\n <label class="radio checkbox-primary mt-1" value="require_'+t+'_2">\n <input id="require_'+t+'_2" class="mutiple-limited-radio" value="true" name="competition_staffs[][mutiple_limited]" type="checkbox">\n <label for="require_'+t+'_2">\u4e0d\u53ef\u591a\u6b21\u62a5\u540d</label>\n </label>\n <a href="javascript:void(0)" class="ml20 delRequrieBtn">\n <i class="fa fa-times-circle font-20 color-grey-c"></i>\n </a>\n </div>\n </div>';$("#requireForm").append(e)}),$("#requireForm").on("click",".delRequrieBtn",function(){$(this).parents(".requireForm_item").remove()}),$(".nav-setting-form").on("click",".module_hidden",function(){var t=$(this);t.is(":checked")?t.prev().val(0):t.prev().val(1)}),$(".competition-staff-settings").on("click",".mutiple-limited-radio",function(){var t=$(this);t.is(
|
|
":checked")?t.parent().parent().siblings().find(".mutiple-limited-radio").attr("checked",!1):t.parent().parent().siblings().find(".mutiple-limited-radio").attr("checked",!0)});var a=$("form.nav-setting-form");a.on("click",".submit-btn",function(){a.find(".submit-btn").attr("disabled","disabled"),a.find(".error").html(""),a.valid()&&$.ajax({method:"POST",dataType:"json",url:a.attr("action"),data:new FormData(a[0]),processData:!1,contentType:!1,success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"})},error:function(t){var e=t.responseJSON;a.find(".error").html(e.message)},complete:function(){a.find(".submit-btn").attr("disabled",!1)}})}),$("#large_panel").on("click",".small_panel_item_del",function(){var t=$(this).parents(".small_panel");$(this).parents(".small_panel_item").remove();for(var e=0;e<$(t).find(".subName").length;e++)console.log(e),$(t).find(".subName").eq(e).html("\u7b2c"+parseInt(e+1)+"\u9636\u6bb5")}),$(".competition-chart-setting").on("click",".update-stage",function(){var r=$(this).parents("form");$(this).attr("disabled","disabled"),r.find(".error").html("");var o=!0,t=r.find('input[name="stage_name"]');t.val()===undefined||0===t.val().length?(t.addClass("danger text-danger"),o=!1):t.removeClass("danger text-danger");var e=r.find('input[name="score_rate"]');e.val()===undefined||0===e.val().length?(e.addClass("danger text-danger"),o=!1):100<parseInt(e.val())||parseInt(e.val())<0?(e.addClass("danger text-danger"),e.after('<span class="danger text-danger">0-100\u4e4b\u95f4\u7684\u6570\u503c</span>'),o=!1):(e.removeClass("danger text-danger"),e.siblings().remove()),r.find('input[name="stage[][start_time]"]').each(function(t,e){var n=$(e);n.val()===undefined||0===n.val().length?(n.addClass("danger text-danger"),o=!1):n.removeClass("danger text-danger")}),r.find('input[name="stage[][end_time]"]').each(function(t,e){var n=$(e);n.val()===undefined||0===n.val().length?(n.addClass("danger text-danger"),o=!1):n.removeClass("danger text-danger")}),r.find('input[name="stage[][mission_count]"]').each(function(t,e){var n=$(e),i=r.find('input[name="stage[][entry]"]').eq(t);n.val()===undefined||0===n.val().length?(n.addClass("danger text-danger"),o=!1):parseInt(n.val())<1?(n.addClass("danger text-danger"),n.after('<span class="danger text-danger">\u5927\u4e8e\u7b49\u4e8e1</span>'),o=!1):parseInt(n.val())>parseInt(i.val())?(n.addClass("danger text-danger"),n.after('<span class="danger text-danger">\u4e0d\u80fd\u5927\u4e8e\u603b\u4efb\u52a1\u6570</span>'),o=!1):(n.removeClass("danger text-danger"),n.siblings().remove())}),r.find('input[name="stage[][entry]"]').each(function(t,e){var n=$(e);n.val()===undefined||0===n.val().length?(n.addClass("danger text-danger"),o=!1):parseInt(n.val())<1?(n.addClass("danger text-danger"),n.after('<span class="danger text-danger">\u5927\u4e8e\u7b49\u4e8e1</span>'),o=!1):(n.removeClass("danger text-danger"),n.siblings().remove())}),r.find('input[name="stage[][identifiers][]"]').each(function(t,e){var n=$(e);n.val()===undefined||0===n.val().length?(n.addClass("danger text-danger"),o=!1):n.removeClass("danger text-danger")}),o&&(r.find('input[name="stage[][mission_count]"]').each(function(t,e){var n=$(e),i=$(e).parents("div.row").find('input[name="stage[][mission_count]"]');parseInt(n.val())>parseInt(i.val())?(n.addClass("danger text-danger"),n.after('<span class="danger text-danger">\u4e0d\u80fd\u5927\u4e8e\u603b\u4efb\u52a1\u6570</span>'),o=!1):(n.removeClass("danger text-danger"),n.siblings().remove())}),$.ajax({method:"POST",dataType:"json",url:r.attr("action"),data:new FormData(r[0]),processData:!1,contentType:!1,success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"}),window.location.reload()},error:function(t){var e=t.responseJSON;a.find(".error").html(e.message)},complete:function(){a.find(".submit-btn").attr("disabled",!1)}}))}),$(".competition-chart-stages").on("click",".add-new-tab",function(){if(0<$(".new-stage-form").length)alert("\u8bf7\u5148\u4fdd\u5b58\u4e0a\u4e00\u4e2atab");else{var t=parseInt($("#large_panel").find(".large_panel_part").length)+1,e='<form class="stage-update-form new-stage-form flex-1" action="/admins/competitions/'+$(this).attr("data-competition-id")+'/competition_stages" accept-charset="UTF-8" data-remote="true" method="post"><div class="large_panel_part" attr_line="'+t+'"><div class="row d-flex mt-3">\n <span class="col-1 mt-2">tab\u6807\u9898</span>\n <div class="col-2 no_padding">\n <input type="text" class="form-control" name="stage_name"/>\n </div>\n <span class="col-1 text-right mt-2 no_padding">\u603b\u6392\u884c\u699c\u5360\u6bd4:</span>\n <div class="col-1 no_padding">\n <input type="number" class="form-control" name="score_rate" value="100"/>\n </div><span class=" mt-2">%</span>\n <div class="flex-1">\n <a href="javascript:void(0)"class="btn btn-outline-primary export-action ml20 add-task-sub">\u65b0\u589e\u5b50\u9636\u6bb5</a>\n </div>\n <a href="javascript:void(0)" class="btn btn-default ml20" onclick="Del_tab(this)">\u5220\u9664</a>\n <a href="javascript:void(0)" class="btn btn-outline-primary update-stage export-action ml20">\u4fdd\u5b58</a>\n </div>\n <div id="small_panel_'+t+'" class="small_panel">\n <div class="row d-flex small_panel_item" attr_line="sub_new_new" count="1">\n <span class="mt-2 subName mr10">\u7b2c1\u9636\u6bb5</span>\n <div class="flex-1">\n <div class="row">\n <div class="row col-6"><span class="mt-2 ml20">\u6709\u6548\u65f6\u95f4:</span>\n <div class="col-4 no_padding">\n <input type="text" name="stage[][start_time]" id="stage__start_time" value="" autocomplete="off" class="section-start-time form-control" placeholder="\u6709\u6548\u5f00\u59cb\u65f6\u95f4">\n </div>\n <span class="mt-2">~</span>\n <div class="col-4 no_padding ">\n <input type="text" name="stage[][end_time]" id="stage__end_time" value="" autocomplete="off" class="section-end-time form-control" placeholder="\u6709\u6548\u7ed3\u675f\u65f6\u95f4">\n </div></div>\n <div class="row col-3"><span class="col-4 text-right mt-2 no_padding">\u603b\u4efb\u52a1\u6570:</span>\n <div class="col-6 no_padding ">\n <input type="number" class="form-control" onchange="change_total(this)" value="3" name="stage[][entry]">\n </div></div>\n <div class="row col-3"><span class="col-4 text-right mt-2 no_padding">\u6210\u7ee9\u6765\u6e90:</span>\n <div class="col-6 no_padding ">\n <select class="form-control" name="stage[][score_source]">\n <option value="0">\u7ecf\u9a8c\u503c</option>\n <option value="1">\u9884\u6d4b\u51c6\u786e\u7387</option>\n </select>\n </div></div>\n </div>\n <div class="row mt-2" id="task_Input_sub_new_new">\n <div class="col-4 row task_Input_div">\n <span class="col-4 text-right mt-3 no_padding mr10">\u4efb\u52a11</span>\n <div class="col-6 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n <div class="col-4 row task_Input_div">\n <span class="col-4 text-right mt-3 no_padding mr10">\u4efb\u52a12</span>\n <div class="col-6 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n <div class="col-4 row task_Input_div">\n <span class="col-4 text-right mt-3 no_padding mr10">\u4efb\u52a13</span>\n <div class="col-6 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n </div>\n </div>\n <span>\n <a href="javascript:void(0)" class="btn btn-default ml20 small_panel_item_del">\u5220\u9664</a>\n </span>\n </div>\n</div></div></form>';$("#large_panel").append(e),$(".stage-update-form .section-start-time").datetimepicker(i),$(".stage-update-form .section-end-time").datetimepicker(i)}}),$(".competition-chart-stages").on("click",".add-task-sub",function(){var t=$(this).parents(".large_panel_part").attr("attr_line"),e=0;console.log("sdfsf"),console.log(0<$("#small_panel_"+t).find(".small_panel_item").length),0<$("#small_panel_"+t).find(".small_panel_item").length?(e=parseInt($("#small_panel_"+t).find(".small_panel_item").last().attr("count"))+1,console.log($("#small_panel_"+t).find(".small_panel_item").last().attr("count"))):e=1;var n='<div class="row d-flex small_panel_item" attr_line="sub_'+t+"_"+e+'" count="'+e+'">\n <span class="mr10 mt-2 subName">\u7b2c'+(parseInt($("#small_panel_"+t).find(".small_panel_item").length)+1)+'\u9636\u6bb5</span>\n <div class="flex-1">\n <div class="row">\n <div class="row col-6"><span class="mt-2 ml20 mr10">\u6709\u6548\u65f6\u95f4:</span>\n <div class="col-4 no_padding ">\n <input type="text" name="stage[][start_time]" id="stage__start_time" value="" autocomplete="off" class="section-start-time form-control" placeholder="\u6709\u6548\u5f00\u59cb\u65f6\u95f4">\n </div>\n <span class="mt-2">~</span>\n <div class="col-4 no_padding ">\n <input type="text" name="stage[][end_time]" id="stage__end_time" value="" autocomplete="off" class="section-end-time form-control" placeholder="\u6709\u6548\u7ed3\u675f\u65f6\u95f4">\n </div></div>\n <div class="row col-3"><span class="col-4 text-right mt-2 no_padding mr10">\u603b\u4efb\u52a1\u6570:</span>\n <div class="col-6 no_padding ">\n <input type="number" class="form-control" onchange="change_total(this)" value="3" name="stage[][entry]">\n </div></div>\n <div class="row col-3"><span class="col-4 mr10 text-right mt-2 no_padding">\u6210\u7ee9\u6765\u6e90:</span>\n <div class="col-6 no_padding ">\n <select class="form-control" name="stage[][score_source]">\n <option value="0">\u7ecf\u9a8c\u503c</option>\n <option value="1">\u9884\u6d4b\u51c6\u786e\u7387</option>\n </select>\n </div></div>\n </div>\n <div class="row mt-2" id="task_Input_sub_'+t+"_"+e+'">\n <div class="col-4 row task_Input_div">\n <span class="col-4 text-right mt-3 no_padding mr10">\u4efb\u52a11</span>\n <div class="col-6 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n <div class="col-4 row task_Input_div">\n <span class="col-4 text-right mt-3 no_padding mr10">\u4efb\u52a12</span>\n <div class="col-6 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n <div class="col-4 row task_Input_div">\n <span class="col-4 text-right mt-3 no_padding mr10">\u4efb\u52a13</span>\n <div class="col-6 no_padding">\n <input type="text" class="form-control mt-2" name="stage[][identifiers][]" placeholder="\u8bf7\u586b\u5199\u5b9e\u8badID">\n </div>\n </div>\n </div>\n </div>\n <span>\n <a href="javascript:void(0)" class="btn btn-default ml20 small_panel_item_del">\u5220\u9664</a>\n </span>\n </div>';$("#small_panel_"+t).append(n),$(".stage-update-form .section-start-time").datetimepicker(i),$(".stage-update-form .section-end-time").datetimepicker(i)});var o=$("#competition-prize-card"),s=o.data("id");$(document).on("prize.save.success",function(){$.ajax({method:"GET",url:"/admins/competitions/"+s+"/competition_prizes",dataType:"script"})}),$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){var n;(n="_member"===e.suffix?$(".prize-member-image-"+e.source_id):"_team"===e.suffix?$(".prize-team-image-"+e.source_id):$(".prize-teacher-image-"+e.source_id)).attr("src",e.url),n.show(),n.next().html("\u91cd\u65b0\u4e0a\u4f20")}),o.on("click",".generate-prize-user-action",function(){var e=$(this),t=function(){return $.ajax({method:"POST",url:"/admins/competitions/"+s+"/competition_prize_users",dataType:"json",success:function(t){t&&0===t.status?(show_success_flash(),e.remove()):showErrorNotify(t.message)},error:function(t){showErrorNotify(t.responseJSON.message)}})};customConfirm({content:"\u786e\u8ba4\u751f\u6210\u5417\uff1f",ok:function(){customLoading({ajax:t})}})})}else $(document).unbind("prize.save.success")}),$(document).on("turbolinks:load",function(){0<$("body.admins-competitions-index-page").length&&$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){var n=$(".competition-image-"+e.source_id);n.attr("src",e.url),n.show(),n.next().html("\u91cd\u65b0\u4e0a\u4f20")}),$(".admin-competition-list-form").on("change",".competitions-hot-select",function(){var t=$(this).get(0).checked?1:0,e={};e.hot=t,$.ajax({url:"/admins/competitions/hot_setting",type:"POST",dataType:"json",data:e,success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"})}})});var e=$(".modal.admin-create-competition-modal"),n=e.find("form.admin-create-competition-form"),t=n.find('input[name="competition_name"]');n.validate({errorElement:"span",errorClass:"danger text-danger",rules:{competition_name:{required:!0}}}),e.on("show.bs.modal",function(){t.val("")}),e.on("click",".submit-btn",function(){if(n.find(".error").html(""),n.valid()){var t=n.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:n.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)}})}});var i=$(".modal.admin-import-competition-score-modal"),r=i.find("form.admin-import-competition-score-form"),o=r.find('input[name="competition_id"]');i.on("show.bs.modal",function(t){resetFileInputFunc(i.find(".upload-file-input")),i.find(".file-names").html("\u9009\u62e9\u6587\u4ef6"),i.find(".upload-file-input").trigger("click");var e=$(t.relatedTarget).data("competition-id");o.val(e)}),i.on("change",".upload-file-input",function(){var t=$(this)[0].files[0];i.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")});var a=function(){return r.find('input[name="file"]').val()!=undefined&&0!=r.find('input[name="file"]').val().length||(r.find(".error").html("\u8bf7\u9009\u62e9\u6587\u4ef6"),!1)},s=function(t){var e="<div>\u5bfc\u5165\u7ed3\u679c\uff1a\u6210\u529f"+t.success+"\u6761\uff0c\u5931\u8d25"+t.fail.length+"\u6761</div>";return 0<t.fail.length&&(e+='<table class="table"><thead class="thead-light"><tr><th>\u6570\u636e</th><th>\u5931\u8d25\u539f\u56e0</th></tr></thead><tbody>',t.fail.forEach(function(t){e+="<tr><td>"+t.data+"</td><td>"+t.message+"</td></tr>"}),e+="</tbody></table>"),e};i.on("click",".submit-btn",function(){r.find(".error").html(""),a()&&($("body").mLoading({text:"\u6b63\u5728\u5bfc\u5165..."}),$.ajax({method:"POST",dataType:"json",url:"/admins/import_competition_scores",data:new FormData(r[0]),processData:!1,contentType:!1,success:function(t){$("body").mLoading("destroy"),i.modal("hide"),showMessageModal(s(t),function(){window.location.reload()})},error:function(t){$("body").mLoading("destroy");var e=t.responseJSON;r.find(".error").html(e.message)}}))})}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-cooperatives-index-page").length){$(".coo-img-card").on("click",".save-url-btn",function(){var t=$(this),e=t.data("id"),n=$(".coo-img-item-"+e).find(".url-input").val();t.attr("disabled",!0),$.ajax({url:"/admins/cooperatives/"+e,method:"PATCH",dataType:"json",data:{url:n},success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"})},error:ajaxErrorNotifyHandler,complete:function(){t.removeAttr("disabled")}})});var t=function(t,e,n,i){var r=$(t).data("id"),o=$(i).data("id")||"";$.ajax({url:"/admins/cooperatives/drag",method:"POST",dataType:"json",data:{move_id:r,after_id:o},success:function(){},error:function(t){var e=t.responseJSON;$.notify({message:"\u79fb\u52a8\u5931\u8d25\uff0c\u539f\u56e0\uff1a"+e.message},{type:"danger"})}})},e=document.getElementById("coo-img-container-alliance_coop");dragula([e],{mirrorContainer:e}).on("drop",t);var n=document.getElementById("coo-img-container-com_coop");dragula([n],{mirrorContainer:n}).on("drop",t);var i=document.getElementById("coo-img-container-edu_coop");dragula([i],{mirrorContainer:i}).on("drop",t);var r=$(".modal.admin-add-cooperative-modal"),o=r.find("form.admin-add-cooperative-form");o.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"coo_img[image]":{required:!0}}}),r.on("show.bs.modal",function(t){resetFileInputFunc(r.find(".img-file-input")),r.find(".file-names").html("\u9009\u62e9\u6587\u4ef6");var e=$(t.relatedTarget).data("imgType");o.find('input[name="coo_img[img_type]"]').val(e)}),r.on("click",".submit-btn",function(){o.find(".error").html(""),o.valid()?o.submit():o.find(".error").html("\u8bf7\u9009\u62e9\u56fe\u7247")}),r.on("change",".img-file-input",function(){var t=$(this)[0].files[0];r.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")}),$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){var n=$(".coo-img-item-"+e.source_id);$.post("/admins/cooperatives/"+e.source_id+"/replace_image_url"),n.find(".coo-img-item-img img").attr("src",e.url)})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-courses-index-page").length){var t=$(".course-list-form"),e=$("form.search-form",t);t.on("change",".course-homepage-show",function(){e.find('input[type="submit"]').trigger("click")}),t.on("click","#course-export",function(){window.location.href="/admins/courses.xlsx?"+e.serialize()}),$(".course-list-container").on("change",".course-setting-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/courses/"+t,type:"PUT",dataType:"script",data:n})}),e.on("click",".clear-btn",function(){e.find('select[name="status"]').val(""),e.find(".school-select").val("").trigger("change"),e.find('input[name="keyword"]').val(""),e.find("#homepage_show").attr("checked",!1),e.find('input[type="submit"]').trigger("click")}),e.find(".school-select").select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9\u5355\u4f4d",minimumInputLength:1,ajax:{delay:500,url:"/api/schools/search.json",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.schools}}},templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id,t.name||t.text}})}}),$(document).on("turbolinks:load",function(){0<$("body.admins-daily-school-statistics-index-page").length&&$(".export-action").on("click",function(){var t=$(".daily-school-statistic-list-form .search-form"),e=$(this),n=t.find("input[name='keyword']").val(),i=e.data("url").split("?")[0]+"?keyword="+n;window.open(i)})}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-dashboards-index-page").length){var e=echarts.init(document.getElementById("month-active-user"));e.setOption({tooltip:{show:"true",trigger:"item",formatter:"{c0}",backgroundColor:"rgba(0,0,0,0.7)",padding:[8,10],extraCssText:"box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);",axisPointer:{type:"shadow"}},series:[{name:"\u8bbf\u95ee\u6765\u6e90",type:"pie",radius:"55%",data:[]}]}),e.showLoading(),$.get("/admins/dashboards/month_active_user.json").done(function(t){e.setOption({series:[{data:t.data}]}),e.hideLoading()})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-departments-index-page").length){var t=$(".department-list-form"),e=t.find("form.search-form");$(".department-list-container");t.on("change",".form-check-input",function(){e.find('input[type="submit"]').trigger("click")});var n=$(".modal.admin-create-department-modal"),i=n.find("form.admin-create-department-form"),r=i.find('input[name="department_name"]'),o=n.find(".school-select");i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{school_id:{required:!0},department_name:{required:!0}},messages:{school_id:{required:"\u8bf7\u9009\u62e9\u6240\u5c5e\u5355\u4f4d"}}}),n.on("show.bs.modal",function(){r.val(""),o.select2("val"," ")});var a=function(t,e){return""===$.trim(t.term)?e:"undefined"==typeof e.text?null:e.name&&-1<e.name.indexOf(t.term)?$.extend({},e,!0):null},s=function(t){o.select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9\u6240\u5c5e\u5355\u4f4d",minimumInputLength:1,data:t,templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id&&$("#school_id").val(t.id),t.name||t.text},matcher:a})};$.ajax({url:"/api/schools/for_option.json",dataType:"json",type:"GET",success:function(t){s(t.schools)}}),n.on("click",".submit-btn",function(){if(i.find(".error").html(""),i.valid()){var t=i.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:i.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),n.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;i.find(".error").html(e.message)}})}});var l=$(".admin-add-department-member-modal"),u=l.find(".admin-add-department-member-form"),c=l.find(".department-member-select"),d=u.find('input[name="department_id"]');l.on("show.bs.modal",function(t){var e=$(t.relatedTarget).data("department-id");d.val(e),c.select2("val"," ")}),c.select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8981\u6dfb\u52a0\u7684\u7ba1\u7406\u5458\u59d3\u540d",multiple:!0,minimumInputLength:1,ajax:{delay:500,url:"/admins/users",dataType:"json",data:function(t){return{name:t.term}},processResults:function(t){return{results:t.users}}},templateResult:function(t){return t.id&&""!==t.id?t.real_name:t.text},templateSelection:function(t){return t.id,t.real_name||t.text}}),l.on("click",".submit-btn",function(){u.find(".error").html("");var t=d.val(),e=c.val();t&&e&&0<e.length?$.ajax({method:"POST",dataType:"script",url:"/admins/departments/"+t+"/department_member",data:{user_ids:e}}):l.modal("hide")})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-disciplines-index-page").length){var e=$(".modal.admin-create-discipline-modal"),n=e.find("form.admin-create-discipline-form"),t=n.find('input[name="name"]');n.validate({errorElement:"span",errorClass:"danger text-danger",rules:{name:{required:!0}}}),e.on("show.bs.modal",function(){t.val("")}),e.on("click",".submit-btn",function(){if(n.find(".error").html(""),n.valid()){var t=n.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:n.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)}})}}),$(".discipline-list-container").on("change",".discipline-source-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/disciplines/"+t,type:"PUT",dataType:"script",data:n})});var i=$(".modal.admin-import-discipline-modal"),r=i.find("form.admin-import-discipline-form");i.on("show.bs.modal",function(){resetFileInputFunc(i.find(".upload-file-input")),i.find(".file-names").html("\u9009\u62e9\u6587\u4ef6"),i.find(".upload-file-input").trigger("click")}),i.on("change",".upload-file-input",function(){var t=$(this)[0].files[0];i.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")});var o=function(){return r.find('input[name="file"]').val()!=undefined&&0!=r.find('input[name="file"]').val().length||(r.find(".error").html("\u8bf7\u9009\u62e9\u6587\u4ef6"),!1)},a=function(t){return"<div>\u5bfc\u5165\u7ed3\u679c\uff1a\u6210\u529f"+t.success+"\u6761\uff0c\u5931\u8d25"+t.fail.length+"\u6761</div>"};i.on("click",".submit-btn",function(){r.find(".error").html(""),o()&&($("body").mLoading({text:"\u6b63\u5728\u5bfc\u5165..."}),$.ajax({method:"POST",dataType:"json",url:"/admins/import_disciplines",data:new FormData(r[0]),processData:!1,contentType:!1,success:function(t){$("body").mLoading("destroy"),i.modal("hide"),showMessageModal(a(t),function(){window.location.reload()})},error:function(t){$("body").mLoading("destroy");var e=t.responseJSON;r.find(".error").html(e.message)}}))}),$(".discipline-list-container").on("click",".move-action",function(){var t=$(this),e=t.data("id"),n=t.data("opr");$.ajax({url:"/admins/disciplines/"+e+"/adjust_position",method:"POST",dataType:"script",data:{opr:n}})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-ec-templates-index-page").length){var o=$(".ec-templates-new-add"),a=o.find(".template-file-upload"),s=o.find(".template_attachment_id");$(".ec-templates-list-container").on("click",".edit-template-content",function(){var t=$(this).attr("data-id"),e=$(this).attr("data-name"),n=$(this).attr("data-template-name"),i=$(this).attr("data-msg"),r=$(this).attr("data-template-id");o.modal("show"),o.find(".template_add_title").html(i),s.val(r),o.find(".template_show_id").val(t),o.find("input[name='name']").val(e),o.find("i.delete-template-icon").attr("data-id",r),"-1"!==r&&(a.find("span.template-file-input").hide(),a.find("span.template_file_show").show(),a.find("span.template_file_show_title").html(n))}),o.on("click",".delete-template-icon",function(){var t=$(this).attr("data-id");$.ajax({url:"/api/attachments/"+t,type:"delete",contentType:"application/json",dataType:"json",success:function(){a.find("span.template-file-input").show(),a.find("span.template_file_show").hide(),s.attr("value","-1")}})}),o.on("change","#upload_template_file",function(){var e=document.getElementById("upload_template_file").files[0],t=new FormData;t.append("file",e),$.ajax({type:"POST",url:"/api/attachments",data:t,contentType:!1,processData:!1,success:function(t){a.find("span.template-file-input").hide(),a.find("span.template_file_show").show(),a.find("span.template_file_show_title").html(e.name),a.find("i.delete-template-icon").attr("data-id",t.id),s.val(t.id)}})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-enroll-lists-index-page").length){var t=$(".search-form");$(".competition-enroll-list-form").on("click","#enroll-lists-export",function(){window.location.href="/admins/competitions/"+$(this).attr("data-competition-id")+"/enroll_lists/export.xlsx?"+t.serialize()})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-examination-authentications-index-page").length){var e=$(".examination-authentication-list-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("processed"),"processed"===t.data("value")?($(".batch-action-container").hide(),e.find(".status-filter").show()):($(".batch-action-container").show(),e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))})}}),$(document).on("turbolinks:load",function(){0<$(".admins-graduation-standards-index-page").length&&$(".admin-body-container").on("click",".standard-create-modal",function(){var t=$(this).attr("data-content"),e=$(this).attr("data-id"),n=$(this).attr("data-msg");$("#graduation-modal-type").html(n),$("#graduation_standard_id").val(e),$("textarea[name='content']").val(t)})}),$(document).on("turbolinks:load",function(){0<$("body.admins-help-centers-edit-page, body.admins-help-centers-update-page").length&&createMDEditor("help-center-editor",{})}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-identity-authentications-index-page").length){var e=$(".identity-authentication-list-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("processed"),"processed"===t.data("value")?($(".batch-action-container").hide(),e.find(".status-filter").show()):($(".batch-action-container").show(),e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))}),$(".batch-agree-btn").on("click",function(){0!==$(".batch-check-box:checked").length?customConfirm({content:"\u786e\u8ba4\u5ba1\u6838\u901a\u8fc7\uff1f",ok:function(){var t=$(".batch-check-box:checked").map(function(t,e){return $(e).val()}).get();$.ajax({url:"/admins/identity_authentications/batch_agree",method:"POST",dataType:"json",data:{ids:t},success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"}),window.location.reload()},error:function(t){$.notify({message:t.responseJSON.message},{type:"danger"})}})}}):$.notify({message:"\u8bf7\u5148\u9009\u62e9\u6570\u636e"},{type:"info"})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-item-authentications-index-page").length){var e=$(".item-authentication-list-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("processed"),"processed"===t.data("value")?($(".batch-action-container").hide(),e.find(".status-filter").show()):($(".batch-action-container").show(),e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-laboratory-settings-show-page, body.admins-laboratory-settings-update-page").length){var n=$(".edit-laboratory-setting-container").find(".edit_laboratory");$(".logo-item-left, .banner-item-bottom").on("change",'input[type="file"]',function(){var e=$(this),t=this.files[0],n=/image.*/;if(t&&t.type.match(n)){var i=new FileReader;i.onload=function(){var t=e.parent();t.find("img").attr("src",i.result).css("display","block"),t.addClass("has-img")},i.readAsDataURL(t)}}),createMDEditor("laboratory-footer-editor",{height:200,placeholder:"\u8bf7\u8f93\u5165\u5907\u6848\u4fe1\u606f"}),n.validate({errorElement:"span",errorClass:"danger text-danger",errorPlacement:function(t,e){e.parent().hasClass("input-group")?e.parent().after(t):e.after(t)},rules:{identifier:{required:!0,checkSite:!0},name:{required:!0}}}),$.validator.addMethod("checkSite",function(t,e){var n=/^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/;return this.optional(e)||n.test(t+".educoder.com")},"\u57df\u540d\u4e0d\u5408\u6cd5\uff01"),n.on("click",".submit-btn",function(){n.find(".submit-btn").attr("disabled","disabled"),n.find(".error").html("");var i=n.valid();$('input[name="navbar[][name]"]').each(function(t,e){var n=$(e);n.val()===undefined||0===n.val().length?(n.addClass("danger text-danger"),i=!1):n.removeClass("danger text-danger")}),i&&$.ajax({method:"PATCH",dataType:"json",url:n.attr("action"),data:new FormData(n[0]),processData:!1,contentType:!1,success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"}),window.location.reload()},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)},complete:function(){n.find(".submit-btn").attr("disabled",!1)}})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-laboratories-index-page").length){$(".laboratory-list-form").find("form.search-form"),$(".laboratory-list-container"
|
|
);var e=$(".modal.admin-create-laboratory-modal"),n=e.find("form.admin-create-laboratory-form"),i=e.find(".school-select");n.validate({errorElement:"span",errorClass:"danger text-danger",rules:{school_id:{required:!0}},messages:{school_id:{required:"\u8bf7\u9009\u62e9\u6240\u5c5e\u5355\u4f4d"}}}),e.on("show.bs.modal",function(){i.select2("val"," ")});var r=function(t,e){return""===$.trim(t.term)?e:"undefined"==typeof e.text?null:e.name&&-1<e.name.indexOf(t.term)?$.extend({},e,!0):null},o=function(t){i.select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9\u5355\u4f4d",minimumInputLength:1,data:t,templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id&&$("#school_id").val(t.id),t.name||t.text},matcher:r})};$.ajax({url:"/api/schools/for_option.json",dataType:"json",type:"GET",success:function(t){o(t.schools)}}),e.on("click",".submit-btn",function(){if(n.find(".error").html(""),n.valid()){var t=n.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:n.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)}})}});var a=$(".admin-add-laboratory-user-modal"),s=a.find(".admin-add-laboratory-user-form"),l=a.find(".laboratory-user-select"),u=s.find('input[name="laboratory_id"]');a.on("show.bs.modal",function(t){var e=$(t.relatedTarget).data("laboratory-id");u.val(e),l.select2("val"," ")}),l.select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8981\u6dfb\u52a0\u7684\u7ba1\u7406\u5458\u59d3\u540d",multiple:!0,minimumInputLength:1,ajax:{delay:500,url:"/admins/users",dataType:"json",data:function(t){return{name:t.term}},processResults:function(t){return{results:t.users}}},templateResult:function(t){return t.id&&""!==t.id?$("<span>"+t.real_name+" <span class='font-12'>"+t.school_name+" "+t.hidden_phone+"</span></span>"):t.text},templateSelection:function(t){return t.id,t.real_name||t.text}}),a.on("click",".submit-btn",function(){s.find(".error").html("");var t=u.val(),e=l.val();t&&e&&0<e.length?$.ajax({method:"POST",dataType:"script",url:"/admins/laboratories/"+t+"/laboratory_user",data:{user_ids:e}}):a.modal("hide")}),$(".laboratory-list-container").on("change",".laboratory-sync-course",function(){var t=$(this).attr("data-id"),e={};$.ajax({url:"/admins/laboratories/"+t+"/update_sync_course",type:"POST",dataType:"script",data:e})}),$(".laboratory-list-container").on("change",".laboratory-sync-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/laboratories/"+t,type:"PUT",dataType:"script",data:n})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-laboratory-shixuns-index-page").length){var t=$(".laboratory-shixun-list-form .search-form"),a=$(".laboratory-shixun-list-container").data("id");t.find("select#tag_id").select2({placeholder:"\u8bf7\u9009\u62e9",allowClear:!0});var e=function(t,i,r,o){$(".laboratory-shixun-list-container").on("click",t,function(){var t=$(this),e=t.siblings(i),n=t.data("id");customConfirm({content:"\u786e\u8ba4\u8fdb\u884c\u8be5\u64cd\u4f5c\u5417\uff1f",ok:function(){$.ajax({url:"/admins/laboratories/"+a+"/laboratory_shixuns/"+n+r,method:"POST",dataType:"json",success:function(){show_success_flash(),t.hide(),e.show(),o&&"function"==typeof o&&o(n,r)}})}})})},n=function(t,e){var n=$(".laboratory-shixun-list-container").find(".laboratory-shixun-item-"+t);"/homepage"===e?n.find(".homepage-badge").show():n.find(".homepage-badge").hide()};e(".homepage-show-action",".homepage-hide-action","/homepage",n),e(".homepage-hide-action",".homepage-show-action","/cancel_homepage",n);var i=$(".modal.admin-add-laboratory-shixun-modal"),r=i.find("form.admin-add-laboratory-user-form").find("select.shixun-select");i.on("show.bs.modal",function(){i.find(".error").html(""),r.select2("val"," ")}),r.select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u5b9e\u8bad\u540d\u79f0/\u521b\u5efa\u8005\u68c0\u7d22",multiple:!0,closeOnSelect:!1,ajax:{delay:500,url:"/admins/laboratories/"+a+"/shixuns_for_select",dataType:"json",data:function(t){return{keyword:t.term,page:t.page||1,per_page:20}},processResults:function(t,e){return e.page=e.page||1,{results:t.shixuns,pagination:{more:20*e.page<t.count}}}},templateResult:function(t){if(!t.id||""===t.id)return t.text;var e="<span>";return e+="<span>"+t.name+"</span>",e+='<span class="font-12"> -- '+t.creator_name+"</span>",e+='<span class="font-12"> -- '+t.status_text+"</span>",e+="</span>",$(e)},templateSelection:function(t){t.id;var e="<span>"+(t.name||t.text)+'<span class="font-12"> -- '+t.creator_name+"</span></span>";return $(e)}}),i.on("click",".submit-btn",function(){i.find(".error").html("");var t=r.val();t&&0<t.length?$.ajax({method:"POST",dataType:"json",url:"/admins/laboratories/"+a+"/laboratory_shixuns",data:{shixun_ids:t},success:function(){show_success_flash(),window.location.reload()},error:function(t){i.find(".error").html(t.responseJSON.message)}}):i.find(".error").html("\u8bf7\u9009\u62e9\u5b9e\u8bad")})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-laboratory-subjects-index-page").length){var t=$(".laboratory-subject-list-form .search-form"),a=$(".laboratory-subject-list-container").data("id");t.find(".school-select").select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9\u521b\u5efa\u8005\u5355\u4f4d",allowClear:!0,minimumInputLength:1,ajax:{delay:500,url:"/api/schools/search.json",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.schools}}},templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id,t.name||t.text}});var e=function(t,i,r,o){$(".laboratory-subject-list-container").on("click",t,function(){var t=$(this),e=t.siblings(i),n=t.data("id");customConfirm({content:"\u786e\u8ba4\u8fdb\u884c\u8be5\u64cd\u4f5c\u5417\uff1f",ok:function(){$.ajax({url:"/admins/laboratories/"+a+"/laboratory_subjects/"+n+r,method:"POST",dataType:"json",success:function(){show_success_flash(),t.hide(),e.show(),o&&"function"==typeof o&&o(n,r)}})}})})},n=function(t,e){var n=$(".laboratory-subject-list-container").find(".laboratory-subject-item-"+t);"/homepage"===e?n.find(".homepage-badge").show():n.find(".homepage-badge").hide()};e(".homepage-show-action",".homepage-hide-action","/homepage",n),e(".homepage-hide-action",".homepage-show-action","/cancel_homepage",n);var i=$(".modal.admin-add-laboratory-subject-modal"),r=i.find("form.admin-add-laboratory-user-form").find("select.subject-select");i.on("show.bs.modal",function(){i.find(".error").html(""),r.select2("val"," ")}),r.select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8bfe\u7a0b\u540d\u79f0/\u521b\u5efa\u8005\u68c0\u7d22",multiple:!1,closeOnSelect:!0,ajax:{delay:500,url:"/admins/laboratories/"+a+"/subjects_for_select",dataType:"json",data:function(t){return{keyword:t.term,page:t.page||1,per_page:20}},processResults:function(t,e){return e.page=e.page||1,{results:t.subjects,pagination:{more:20*e.page<t.count}}}},templateResult:function(t){if(!t.id||""===t.id)return t.text;var e="<span>";return e+="<span>"+t.name+"</span>",e+='<span class="font-12"> -- '+t.creator_name+"</span>",e+='<span class="font-12"> -- '+t.status_text+"</span>",e+="</span>",$(e)},templateSelection:function(t){if(!t.id||""===t.id)return t.text;var e="<span>"+(t.name||t.text)+'<span class="font-12"> -- '+t.creator_name+"</span></span>";return $(e)}}),i.on("click",".submit-btn",function(){i.find(".error").html("");var t=r.val();t&&0<t.length?$.ajax({method:"POST",dataType:"json",url:"/admins/laboratories/"+a+"/laboratory_subjects",data:{subject_id:t},success:function(){show_success_flash(),window.location.reload()},error:function(t){i.find(".error").html(t.responseJSON.message)}}):i.find(".error").html("\u8bf7\u9009\u62e9\u8bfe\u7a0b")})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-library-applies-index-page").length){var e=$(".library-applies-list-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("processed"),"processed"===t.data("value")?e.find(".status-filter").show():(e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))})}}),$(document).on("turbolinks:load",function(){0<$("body.admins-major-informations-index-page").length&&$(".major-informations-list-container").on("click",".collapse-item",function(){var t=$(this).find("i");t.hasClass("fa-caret-right")?t.removeClass("fa-caret-right").addClass("fa-caret-down"):t.removeClass("fa-caret-down").addClass("fa-caret-right")})}),$(document).on("turbolinks:load",function(){var t=$(".modal.admin-message-modal"),e=t.find(".submit-btn");0<t.length&&t.on("hide.bs.modal",function(){t.find(".modal-body").html(""),e.unbind()})}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-mirror-repositories-edit-page, body.admins-mirror-repositories-update-page").length){var e=$("form.edit-mirror");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"mirror_repository[type_name]":{required:!0}}}),e.submit(function(t){e.valid()||t.preventDefault()})}}),$(document).on("turbolinks:load",function(){$("body.admins-mirror-repositories-index-page").length}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-mirror-scripts-edit-page, body.admins-mirror-scripts-update-page, body.admins-mirror-scripts-new-page, body.admins-mirror-scripts-create-page").length){var e=$("form.script-form");CodeMirror.fromTextArea(document.getElementById("mirror_script_script"),{lineNumbers:!0,mode:"shell",theme:"default",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,styleActiveLine:!0,lint:!0}).setSize("auto","600px"),e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"mirror_script[script_type]":{required:!0}}}),e.submit(function(t){e.valid()||t.preventDefault()})}}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-choose-mirror-modal",function(){var e=$(".modal.admin-choose-mirror-modal"),n=e.find("form.admin-choose-mirror-form"),i=function(){return n.find('input[name="mirror_number"]:checked').val()!=undefined||(e.find(".error").html("\u5fc5\u987b\u9009\u62e9\u4e00\u79cd\u955c\u50cf\u4fdd\u5b58\uff01"),!1)};e.on("click",".submit-btn",function(){n.find(".error").html("");var t=n.attr("action");i()&&$.ajax({method:"POST",dataType:"script",url:t,data:n.serialize()}).done(function(){e.modal("hide")})})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-department-modal",function(){var t=$(".modal.admin-edit-department-modal"),e=t.find("form.admin-edit-department-form");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"department[name]":{required:!0,maxlength:20},"department[host_count]":{digits:!0}}}),t.on("click",".submit-btn",function(){e.find(".error").html("");var t=e.attr("action");e.valid()&&$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-discipline-modal",function(){function n(){e.find(".error").html("");var t=e.attr("action");e.valid()&&$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})}var t=$(".modal.admin-edit-discipline-modal"),e=t.find("form.admin-edit-discipline-form");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"discipline[name]":{required:!0,maxlength:20}}}),t.on("click",".submit-btn",n),e.find("#discipline_name").keydown(function(t){var e=t||event;if(13==(e.which||e.keyCode))return n(),!1})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-repertoire-modal",function(){var t=$(".modal.admin-edit-repertoire-modal"),e=t.find("form.admin-edit-repertoire-form");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"repertoire[name]":{required:!0,maxlength:20}}}),t.on("click",".submit-btn",function(){e.find(".error").html("");var t=e.attr("action");e.valid()&&$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-sub-discipline-modal",function(){function n(){e.find(".error").html("");var t=e.attr("action");e.valid()&&$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})}var t=$(".modal.admin-edit-sub-discipline-modal"),e=t.find("form.admin-edit-sub-discipline-form");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"sub_discipline[name]":{required:!0,maxlength:20}}}),t.on("click",".submit-btn",n),e.find("#sub_discipline_name").keydown(function(t){var e=t||event;if(13==(e.which||e.keyCode))return n(),!1})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-sub-repertoire-modal",function(){var t=$(".modal.admin-edit-sub-repertoire-modal"),e=t.find("form.admin-edit-sub-repertoire-form");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"sub_repertoire[name]":{required:!0,maxlength:20}}}),t.on("click",".submit-btn",function(){e.find(".error").html("");var t=e.attr("action");e.valid()&&$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-subject-modal",function(){var t=$(".modal.admin-edit-subject-modal"),e=t.find("form.admin-edit-subject-form");t.on("click",".submit-btn",function(){e.find(".error").html("");var t=e.attr("action");$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-tag-discipline-modal",function(){function n(){e.find(".error").html("");var t=e.attr("action");e.valid()&&$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})}var t=$(".modal.admin-edit-tag-discipline-modal"),e=t.find("form.admin-edit-tag-discipline-form");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"tag_discipline[name]":{required:!0,maxlength:20}}}),t.on("click",".submit-btn",n),e.find("#tag_discipline_name").keydown(function(t){var e=t||event;if(13==(e.which||e.keyCode))return n(),!1})})}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".modal.admin-edit-tag-repertoire-modal",function(){var t=$(".modal.admin-edit-tag-repertoire-modal"),e=t.find("form.admin-edit-tag-repertoire-form");e.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"tag_repertoire[name]":{required:!0,maxlength:20}}}),t.on("click",".submit-btn",function(){e.find(".error").html("");var t=e.attr("action");e.valid()&&$.ajax({method:"PATCH",dataType:"script",url:t,data:e.serialize()})})})}),$(document).on("turbolinks:load",function(){var e=$(".modal.admin-import-course-member-modal");if(0<e.length){var n=e.find("form.admin-import-course-member-form"),t=function(t){t.after(t.clone().val("")),t.remove()};e.on("show.bs.modal",function(){e.find(".file-names").html("\u9009\u62e9\u6587\u4ef6"),e.find(".upload-file-input").trigger("click")}),e.on("hide.bs.modal",function(){t(e.find(".upload-file-input"))}),e.on("change",".upload-file-input",function(){var t=$(this)[0].files[0];e.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")});var i=function(){return n.find('input[name="file"]').val()!=undefined&&0!=n.find('input[name="file"]').val().length||(n.find(".error").html("\u8bf7\u9009\u62e9\u6587\u4ef6"),!1)},r=function(t){var e="<div>\u5bfc\u5165\u7ed3\u679c\uff1a\u6210\u529f"+t.success+"\u6761\uff0c\u5931\u8d25"+t.fail.length+"\u6761</div>";return 0<t.fail.length&&(e+='<table class="table"><thead class="thead-light"><tr><th>\u6570\u636e</th><th>\u5931\u8d25\u539f\u56e0</th></tr></thead><tbody>',t.fail.forEach(function(t){e+="<tr><td>"+t.data+"</td><td>"+t.message+"</td></tr>"}),e+="</tbody></table>"),e};e.on("click",".submit-btn",function(){n.find(".error").html(""),i()&&($("body").mLoading({text:"\u6b63\u5728\u5bfc\u5165..."}),$.ajax({method:"POST",dataType:"json",url:"/admins/import_course_members",data:new FormData(n[0]),processData:!1,contentType:!1,success:function(t){$("body").mLoading("destroy"),e.modal("hide"),showMessageModal(r(t),function(){window.location.reload()})},error:function(t){$("body").mLoading("destroy");var e=t.responseJSON;n.find(".error").html(e.message)}}))})}}),$(document).on("turbolinks:load",function(){var e=$(".modal.admin-merge-course-list-modal");if(0<e.length){var r=e.find("form.admin-merge-course-list-form"),o=r.find('input[name="origin_course_list_id"]');r.validate({errorElement:"span",errorClass:"danger text-danger",rules:{course_list_name:{required:!0}},messages:{course_list_name:{required:"\u8bf7\u8f93\u5165\u8bfe\u7a0b\u540d\u79f0"}}}),e.on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=e.data("courseListId"),i=e.data("url");o.val(n),r.data("url",i)}),e.on("click",".submit-btn",function(){if(r.find(".error").html(""),r.valid()){var t=r.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:r.serialize(),success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;r.find(".error").html(e.message)}})}})}}),$(document).on("turbolinks:load",function(){var e=$(".modal.admin-merge-department-modal");if(0<e.length){var r=e.find("form.admin-merge-department-form"),o=r.find('input[name="school_id"]'),a=r.find('input[name="origin_department_id"]'),n=e.find(".department-select");r.validate({errorElement:"span",errorClass:"danger text-danger",rules:{department_id:{required:!0}},messages:{department_id:{required:"\u8bf7\u9009\u62e9\u90e8\u95e8"}}});var i=function(t,e){return""===$.trim(t.term)?e:"undefined"==typeof e.text?null:e.name&&-1<e.name.indexOf(t.term)?$.extend({},e,!0):null},s=function(t){n.empty(),n.select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9\u6240\u5c5e\u90e8\u95e8",data:t,templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id&&r.find("#department_id").val(t.id),t.name||t.text},matcher:i}),n.select2("val"," ")};e.on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=e.data("schoolId"),i=e.data("url");o.val(n),a.val(e.data("departmentId")),r.data("url",i),$.ajax({url:"/api/schools/"+n+"/departments/for_option.json",dataType:"json",type:"GET",success:function(t){s(t.departments)}})}),e.on("click",".submit-btn",function(){if(r.find(".error").html(""),r.valid()){var t=r.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:r.serialize(),success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;r.find(".error").html(e.message)}})}})}}),$(document).on("turbolinks:load",function(){var e=$(".modal.admin-replace-mirror-modal");if(0<e.length){var n=e.find("form.admin-replace-mirror-form"),i=e.find('.modal-body input[name="mirror_id"]'),r=e.find(".new-mirror-select"),o=function(t,e){i.val(t),n.find(".mirror-id-container").html(t),n.find(".mirror-name-container").html(e)};n.validate({errorElement:"span",errorClass:"danger text-danger",rules:{new_mirror_id:{required:!0}},messages:{new_mirror_id:{required:"\u8bf7\u9009\u62e9\u65b0\u955c\u50cf"}}}),e.on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=e.data("id"),i=e.data("name");o(n,i),r.select2("val"," ")}),e.on("hide.bs.modal",function(){o("",""),r.select2("val"," "),$("#new_mirror_id-error").remove()}),r.select2({theme:"bootstrap4",placeholder:"\u8f93\u5165\u8981\u5408\u5e76\u7684\u955c\u50cf\u540d",minimumInputLength:1,ajax:{url:"/admins/mirror_repositories/for_select",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.mirrors}}},templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id&&($("#new_mirror_id-error").remove(),$("#new_mirror_id").val(t.id)),t.name||t.text}}),e.on("click",".submit-btn",function(){if(n.find(".error").html(""),n.valid()){var t=n.data("url");$.ajax({method:"POST",dataType:"script",url:t,data:n.serialize()}).done(function(){e.modal("hide")})}})}}),$(document).on("turbolinks:load",function(){$(".admin-modal-container").on("show.bs.modal",".admin-save-competition-prize-modal",function(){var n=$(".modal.admin-save-competition-prize-modal"),i=n.find("form.admin-save-competition-prize-form");i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"competition_prize[name]":{required:!0,maxlength:10},"competition_prize[num]":{required:!0,digits:!0,min:1}}}),n.on("click",".submit-btn",function(){i.find(".error").html("");var t=i.attr("action"),e=i.data("form-method");i.valid()&&$.ajax({method:e,dataType:"json",url:t,data:i.serialize(),success:function(t){t&&0===t.status?(show_success_flash(),$(document).trigger("prize.save.success"),n.modal("hide")):n.find(".error").html(t.message)}})})})}),$(document).on("turbolinks:load",function(){var n=$(".modal.admin-select-school-modal");if(0<n.length){var i=n.find("form.admin-select-school-form"),t=i.data("multiple");i.find(".school-select").select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9",multiple:t,minimumInputLength:1,ajax:{delay:500,url:"/api/schools/search.json",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.schools}}},templateResult:function(t){if(!t.id||""===t.id)return t.text;var e="<span>"+t.name+"<span class='ml-4 font-12'>";return t.province&&(e+=t.province),e+="</span></span>",$(e)},templateSelection:function(t){return t.id,t.name||t.text}}),i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{school_ids:{required:!0}},messages:{school_ids:{required:"\u8bf7\u9009\u62e9"}}}),n.on("show.bs.modal",function(t){$(t.relatedTarget)}),n.on("hide.bs.modal",function(){i.find(".error").html(""),i.find(".school-select").select2("val"," ")}),n.on("click",".submit-btn",function(){if(i.find(".error").html(""),i.valid()){var t=i.data("url"),e=i.find("#school_ids").val();$.ajax({method:"POST",dataType:"json",url:t,data:{school_ids:e},success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"}),n.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;i.find(".error").html(e.message)}})}})}}),$(document).on("turbolinks:load",function(){var o=$(".modal.admin-upload-file-modal");if(0<o.length){var n=o.find("form.admin-upload-file-form"),a=o.find('input[name="source_id"]'),s=o.find('input[name="source_type"]'),l=o.find('input[name="suffix"]');o.on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=e.data("sourceId"),i=e.data("sourceType"),r=e.data("suffix");a.val(n),s.val(i),r!=undefined&&l.val(r),o.find(".upload-file-input").trigger("click")}),o.find(".upload-file-input").on("change",function(){var t=$(this)[0].files[0];t&&(o.find(".file-names").html(t.name),o.find(".submit-btn").trigger("click"))});var e=function(){return n.find('input[name="file"]').val()!=undefined&&0!=n.find('input[name="file"]').val().length||(n.find(".error").html("\u8bf7\u9009\u62e9\u6587\u4ef6"),!1)};o.on("click",".submit-btn",function(){if(n.find(".error").html(""),e()){var t=n.serialize();$.ajax({method:"POST",dataType:"json",url:"/admins/files?"+t,data:new FormData(n[0]),processData:!1,contentType:!1,success:function(t){$.notify({message:"\u4e0a\u4f20\u6210\u529f"}),o.find(".file-names").html(""),o.trigger("upload:success",t),o.modal("hide")},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)}})}})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-professional-authentications-index-page").length){var e=$(".professional-authentication-list-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("processed"),"processed"===t.data("value")?($(".batch-action-container").hide(),e.find(".status-filter").show()):($(".batch-action-container").show(),e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))}),$(".batch-agree-btn").on("click",function(){0!==$(".batch-check-box:checked").length?customConfirm({content:"\u786e\u8ba4\u5ba1\u6838\u901a\u8fc7\uff1f",ok:function(){var t=$(".batch-check-box:checked").map(function(t,e){return $(e).val()}).get();$.ajax({url:"/admins/professional_authentications/batch_agree",method:"POST",dataType:"json",data:{ids:t},success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"}),window.location.reload()},error:function(t){$.notify({message:t.responseJSON.message},{type:"danger"})}})}}):$.notify({message:"\u8bf7\u5148\u9009\u62e9\u6570\u636e"},{type:"info"})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-project-package-applies-index-page").length){var e=$(".project-package-applies-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("all"),"all"===t.data("value")?e.find(".status-filter").show():(e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-repertoires-index-page").length){var e=$(".modal.admin-create-repertoire-modal"),n=e.find("form.admin-create-repertoire-form"),t=n.find('input[name="name"]');n.validate({errorElement:"span",errorClass:"danger text-danger",rules:{name:{required:!0}}}),e.on("show.bs.modal",function(){t.val("")}),e.on("click",".submit-btn",function(){if(n.find(".error").html(""),n.valid()){var t=n.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:n.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)}})}}),$(".repertoire-list-container").on("change",".repertoire-source-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/repertoires/"+t,type:"PUT",dataType:"script",data:n})})}}),$(document).on("turbolinks:load",function(){var i=function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"},{type:"success"})};$(".reversed-keyword-list-container").on("click",".close-action",function(){var t=$(this),e=t.siblings(".unclose-action"),n=t.data("id");customConfirm({content:"\u786e\u8ba4\u5173\u95ed\u9650\u5236\u5417\uff1f",ok:function(){$.ajax({url:"/admins/reversed_keywords/"+n,method:"PUT",dataType:"json",data:{reversed_keyword:{closed:!0}},success:function(){i(),t.hide(),e.show(),$(".reversed-keyword-item-"+n).children("td").eq(3).text("")}})}})}),$(".reversed-keyword-list-container").on("click",".unclose-action",function(){var t=$(this),e=t.siblings(".close-action"),n=t.data("id");customConfirm({content:"\u786e\u8ba4\u5f00\u542f\u9650\u5236\u5417\uff1f",ok:function(){$.ajax({url:"/admins/reversed_keywords/"+n,method:"PUT",dataType:"json",data:{reversed_keyword:{closed:!1}},success:function(){i(),e.show(),t.hide(),$(".reversed-keyword-item-"+n).children("td").eq(3).text("\u221a")}})}})})}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-salesman-channels-index-page").length){var n=$(".admin-add-salesman-channel-user-modal"),i=n.find(".admin-add-salesman-channel-user-form"),r=n.find(".salesman-channel-user-select"),o=n.find("form.admin-add-salesman-user-form"),a=$(".saleman-channel-list-form .search-form");n.on("show.bs.modal",function(){r.select2("val"," ")}),r.select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8981\u6dfb\u52a0\u7684\u5355\u4f4d",multiple:!0,minimumInputLength:1,ajax:{delay:500,url:"/admins/schools",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.schools}}},templateResult:function(t){return t.id&&""!==t.id?$("<span>"+t.name+"</span>"):""},templateSelection:function(t){return t.id,t.name||""}}),n.on("click",".submit-btn",function(){i.find(".error").html("");var t=r.val();if(t&&0<t.length){var e=o.data("url");$.ajax({method:"POST",dataType:"json",url:e,data:o.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),n.modal("hide"),a.find('input[name="keyword"]').val(""),setTimeout(function(){l()},500)},error:function(t){var e=t.responseJSON;i.find(".error").html(e.message)}})}else n.modal("hide")}),a.on("click",".clear-btn",function(){a.find(".start_date").val(""),a.find(".end_date").val("").trigger("change"),a.find('input[name="keyword"]').val("")});var s={autoclose:!0,language:"zh-CN",format:"yyyy-mm-dd",startDate:"2017-04-01"};(function(e){var t=$.extend({inputs:$(e).find(".start-date, .end-date")},s);$(e).datepicker(t),$(e).find(".start-date").datepicker().on("changeDate",function(t){$(e).find(".end-date").datepicker("setStartDate",t.date)})})(".grow-date-input-daterange"),a.on("click",".search-btn",function(){l()});var l=function(){var t=a.data("search-form-url"),e=a;$.ajax({url:t,data:e.serialize(),dataType:"script"})}}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-salesman-customers-index-page").length){var e=$(".admin-add-salesman-customer-user-modal"),n=e.find(".admin-add-salesman-customer-user-form"),i=e.find(".salesman-customer-user-select"),r=$(".salesman-customer-list-form").find(".btn-primary");e.on("show.bs.modal",function(t){$(t.relatedTarget);i.select2("val"," ")}),i.select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8981\u6dfb\u52a0\u7684\u9500\u552e\u59d3\u540d",multiple:!0,minimumInputLength:1,ajax:{delay:500,url:"/admins/users",dataType:"json",data:function(t){return{name:t.term}},processResults:function(t){return{results:t.users}}},templateResult:function(t){return t.id&&""!==t.id?$("<span>"+t.real_name+" <span class='font-12'>"+t.school_name+" "+t.hidden_phone+"</span></span>"):t.text},templateSelection:function(t){return t.id,t.real_name||t.text}}),e.on("click",".submit-btn",function(){n.find(".error").html("");var t=i.val();t&&0<t.length?$.ajax({method:"POST",dataType:"json",url:"/admins/salesman_customers/batch_add",data:{salesman_id:r.data("salesman-id"),user_ids:t},success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){o()},500)},error:function(t){var e=t.responseJSON;$form.find(".error").html(e.message)}}):e.modal("hide")});var o=function(){$.ajax({url:"/admins/salesman_customers?salesman_id="+r.data("salesman-id"),dataType:"script"})}}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-salesmans-index-page").length){var e=$(".admin-add-salesman-user-modal"),n=e.find(".admin-add-salesman-user-form"),i=e.find(".salesman-user-select");e.on("show.bs.modal",function(t){$(t.relatedTarget);i.select2("val"," ")}),i.select2({theme:"bootstrap4",placeholder:"\u8bf7\u8f93\u5165\u8981\u6dfb\u52a0\u7684\u9500\u552e\u59d3\u540d",multiple:!0,minimumInputLength:1,ajax:{delay:500,url:"/admins/users",dataType:"json",data:function(t){return{name:t.term}},processResults:function(t){return{results:t.users}}},templateResult:function(t){return t.id&&""!==t.id?$("<span>"+t.real_name+" <span class='font-12'>"+t.school_name+" "+t.hidden_phone+"</span></span>"):t.text},templateSelection:function(t){return t.id,t.real_name||t.text}}),e.on("click",".submit-btn",function(){n.find(".error").html("");var t=i.val();t&&0<t.length?$.ajax({method:"POST",dataType:"json",url:"/admins/salesmans/batch_add",data:{user_ids:t},success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;$form.find(".error").html(e.message)}}):e.modal("hide")}),$(".salesman-list-container").on("change",".salesman-sync-course",function(){var t=$(this).attr("data-id"),e={};$.ajax({url:"/admins/salesmans/"+t+"/update_sync_course",type:"POST",dataType:"script",data:e})}),$(".salesman-list-container").on("change",".salesman-sync-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/salesmans/"+t,type:"PUT",dataType:"script",data:n})})}}),$(document).on("turbolinks:load",function(){if(0<$(
|
|
"body.admins-school-statistics-index-page").length){var n=$(".school-statistic-list-form .search-form"),i=n.data("grow-form-url"),r=n.data("contrast-form-url"),o=n.find("input[name='data_type']"),e=(n.find("input[name='keyword']"),n.find(".contrast-btn")),a=n.find(".grow-btn"),s=n.find(".contrast-date-container"),l=n.find(".grow-date-container"),t=n.find("input[name='begin_date']"),u=n.find("input[name='end_date']"),c=n.find("input[name='other_begin_date']");n.find("input[name='other_end_date']"),n.find("input[name='grow_begin_date']"),n.find("input[name='grow_end_date']");n.on("click",".contrast-btn",function(){e.hasClass("active")||(f("contrast"),d())}),n.on("click",".grow-btn",function(){a.hasClass("active")||(f("grow"),d())}),n.on("click",".search-btn",function(){console.log("submit"),d()}),$(".school-statistic-list-container").on("change",".contrast-column-select",function(){n.find("input[name='contrast_column']").val($(".contrast-column-select").val()),d()});var d=function(){if(h()){var t=n,e="contrast"==o.val()?r:i;$.ajax({url:e,data:t.serialize(),dataType:"script"})}},h=function(){return"contrast"!=o.val()||(""==t.val()&&""==u.val()&&""==c.val()&&""==c.val()||""!=t.val()&&""!=u.val()&&""!=c.val()&&""!=c.val())},f=function(t){o.val()!=t&&("contrast"==t?(e.addClass("active"),a.removeClass("active"),o.val("contrast"),l.hide(),s.show(),p()):(e.removeClass("active"),a.addClass("active"),o.val("grow"),l.show(),s.hide(),g()))},p=function(){n.find("input[name='grow_begin_date']").val(""),n.find("input[name='grow_end_date']").val(""),n.find("input[name='grow_date_input']").val("")},g=function(){n.find("input[name='begin_date']").val(""),n.find("input[name='end_date']").val(""),n.find("input[name='other_begin_date']").val(""),n.find("input[name='other_end_date']").val(""),n.find("input[name='date_input']").val(""),n.find("input[name='other_date_input']").val("")},m={autoclose:!0,language:"zh-CN",format:"yyyy-mm-dd",startDate:"2017-04-01",endDate:"-1d"},v=function(e){var t=$.extend({inputs:$(e).find(".start-date, .end-date")},m);$(e).datepicker(t),$(e).find(".start-date").datepicker().on("changeDate",function(t){$(e).find(".end-date").datepicker("setStartDate",t.date)})};v(".grow-date-input-daterange"),v(".date-input-daterange"),v(".other-date-input-daterange")}}),$(document).on("turbolinks:load",function(){$("body.admins-schools-index-page").length}),$(document).on("turbolinks:load",function(){var e=$(".search-form-container .search-form-tabs");0<e.length&&e.on("click",".search-form-tab",function(){var t=$(this);e.find(".search-form-tab").removeClass("active"),t.addClass("active")})}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-shixun-authorizations-index-page").length){var e=$(".shixun-authorization-list-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("processed"),"processed"===t.data("value")?e.find(".status-filter").show():(e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-shixun-feedback-messages-index-page").length){$(".content-img img").addClass("w-20").addClass("preview-image");var n={autoclose:!0,language:"zh-CN",format:"yyyy-mm-dd 00:00:00",startDate:"2017-04-01"};(function(e){var t=$.extend({inputs:$(e).find(".start-date, .end-date")},n);$(e).datepicker(t),$(e).find(".start-date").datepicker().on("changeDate",function(t){$(e).find(".end-date").datepicker("setStartDate",t.date)})})(".grow-date-input-daterange")}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-shixun-settings-index-page").length){var t=$(".shixun-settings-list-form"),e=$("form.search-form",t);t.on("change",".shixun-settings-select",function(){e.find('input[type="submit"]').trigger("click")}),t.on("click","#shixun-settings-export",function(){window.location.href="/admins/shixun_settings.xls?"+e.serialize()}),t.on("click","#shixun-settings-base-export",function(){window.location.href="/admins/shixun_settings.xls?base_data=1"+e.serialize()}),$(".shixun-settings-list-container").on("change",".shixun-setting-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n=$(this).attr("name"),i={},r=$(this).parent("td").siblings(".shixun-line-no").text();i[n]=e,i.page_no=r,$.ajax({url:"/admins/shixun_settings/"+t,type:"PUT",dataType:"script",data:i})}),$(".shixun-settings-list-container").on("change",".repertoire-setting-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/shixun_settings/"+t+"/update_tag_repertoires",type:"POST",dataType:"script",data:n})}),$("select#settings-tag-choosed").select2({placeholder:"\u8bf7\u9009\u62e9\u5206\u7c7b",allowClear:!0}),$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){var n;"_weapp"==e.suffix?((n=$(".shixun-weapp-image-"+e.source_id)).attr("src",e.url),n.show(),n.next().html("\u91cd\u65b0\u4e0a\u4f20")):((n=$(".shixun-image-"+e.source_id)).attr("src",e.url),n.show(),n.next().html("\u91cd\u65b0\u4e0a\u4f20"))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-shixuns-index-page").length){$("select#tag-choosed").select2({placeholder:"\u8bf7\u9009\u62e9\u5206\u7c7b",allowClear:!0});var t=$(".search-form");$(".shixuns-list-form").on("click","#shixuns-export",function(){window.location.href="/admins/shixuns.xls?"+t.serialize()})}}),$(document).on("turbolinks:load",function(){$("#sidebarCollapse").on("click",function(){$(this).toggleClass("active"),$("#sidebar").toggleClass("active"),$.cookie("admin_sidebar_collapse",$(this).hasClass("active"),{path:"/admins"})});var t=$("#sidebar").data("current-controller");if(0<t.length){$("#sidebar a.active").removeClass("active"),$("#sidebar ul.collapse.show").removeClass("show");var e=$('#sidebar a[data-controller="'+t+'"]');e.addClass("active"),e.parent().parent("ul.collapse").addClass("show")}}),$(document).on("turbolinks:load",function(){function n(){if(i.find(".error").html(""),i.valid()){var t=i.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:i.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;i.find(".error").html(e.message)}})}}if(0<$("body.admins-sub-disciplines-index-page").length){var e=$(".modal.admin-create-sub-discipline-modal"),i=e.find("form.admin-create-sub-discipline-form"),t=i.find('input[name="name"]');i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{name:{required:!0}}}),e.on("show.bs.modal",function(){t.val("")}),e.on("click",".submit-btn",n),t.keydown(function(t){var e=t||event;if(13==(e.which||e.keyCode))return n(),!1}),$(".sub-discipline-list-container").on("change",".sub-discipline-source-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/sub_disciplines/"+t,type:"PUT",dataType:"script",data:n})}),$(".sub-discipline-list-container").on("click",".move-action",function(){var t=$(this),e=t.data("id"),n=t.data("opr");$.ajax({url:"/admins/sub_disciplines/"+e+"/adjust_position",method:"POST",dataType:"script",data:{opr:n}})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-sub-repertoires-index-page").length){var e=$(".modal.admin-create-sub-repertoire-modal"),n=e.find("form.admin-create-sub-repertoire-form"),t=n.find('input[name="name"]');n.validate({errorElement:"span",errorClass:"danger text-danger",rules:{name:{required:!0}}}),e.on("show.bs.modal",function(){t.val("")}),e.on("click",".submit-btn",function(){if(n.find(".error").html(""),n.valid()){var t=n.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:n.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)}})}}),$(".sub-repertoire-list-container").on("change",".sub-repertoire-source-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/sub_repertoires/"+t,type:"PUT",dataType:"script",data:n})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-subject-authorizations-index-page").length){var e=$(".subject-authorization-list-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("processed"),"processed"===t.data("value")?e.find(".status-filter").show():(e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-subject-settings-index-page").length){var t=$(".subject-setting-list-form");t.find(".school-select").select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9\u521b\u5efa\u8005\u5355\u4f4d",minimumInputLength:1,ajax:{delay:500,url:"/api/schools/search.json",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.schools}}},templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id,t.name||t.text}}),$(".subject-setting-list-container").on("change",".subject-setting-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/subject_settings/"+t,type:"PUT",dataType:"script",data:n})}),t.on("click",".clear-btn",function(){t.find('select[name="status"]').val(""),t.find(".school-select").val("").trigger("change"),t.find('input[name="keyword"]').val(""),t.find("#homepage_show").attr("checked",!1),t.find("#excellent").attr("checked",!1),t.find('input[type="submit"]').trigger("click")}),$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){var n;"_qrcode"==e.suffix?((n=$(".subject-weapp-image-"+e.source_id)).attr("src",e.url),n.show(),n.next().html("\u91cd\u65b0\u4e0a\u4f20")):((n=$(".subject-image-"+e.source_id)).attr("src",e.url),n.show(),n.next().html("\u91cd\u65b0\u4e0a\u4f20"))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-subjects-index-page").length){var t=$(".subject-list-form");t.find(".school-select").select2({theme:"bootstrap4",placeholder:"\u8bf7\u9009\u62e9\u521b\u5efa\u8005\u5355\u4f4d",minimumInputLength:1,ajax:{delay:500,url:"/api/schools/search.json",dataType:"json",data:function(t){return{keyword:t.term}},processResults:function(t){return{results:t.schools}}},templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id,t.name||t.text}}),t.on("click",".clear-btn",function(){t.find('select[name="status"]').val(""),t.find(".school-select").val("").trigger("change"),t.find('input[name="keyword"]').val(""),t.find("#homepage_show").attr("checked",!1),t.find("#excellent").attr("checked",!1),t.find('input[type="submit"]').trigger("click")});var e=function(t,i,r,o){$(".subject-list-container").on("click",t,function(){var t=$(this),e=t.siblings(i),n=t.data("id");customConfirm({content:"\u786e\u8ba4\u8fdb\u884c\u8be5\u64cd\u4f5c\u5417\uff1f",ok:function(){$.ajax({url:"/admins/subjects/"+n+r,method:"POST",dataType:"json",success:function(){show_success_flash(),t.hide(),e.show(),o&&"function"==typeof o&&o(n,r)}})}})})};e(".hide-action",".active-action","/hide"),e(".active-action",".hide-action","/cancel_hide");var n=function(t,e){var n=$(".subject-list-container").find(".subject-item-"+t);"/homepage_show"===e?n.find(".homepage-show-badge").show():n.find(".homepage-show-badge").hide()};e(".homepage-show-action",".homepage-hide-action","/homepage_show",n),e(".homepage-hide-action",".homepage-show-action","/cancel_homepage_show",n);var i=function(t,e){var n=$(".subject-list-container").find(".subject-item-"+t);"/excellent"===e?n.find(".excellent-badge").show():n.find(".excellent-badge").hide()};e(".excellent-action",".cancel-excellent-action","/excellent",i),e(".cancel-excellent-action",".excellent-action","/cancel_excellent",i)}}),$(document).on("turbolinks:load",function(){function n(){if(i.find(".error").html(""),i.valid()){var t=i.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:i.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;i.find(".error").html(e.message)}})}}if(0<$("body.admins-tag-disciplines-index-page").length){var e=$(".modal.admin-create-tag-discipline-modal"),i=e.find("form.admin-create-tag-discipline-form"),t=i.find('input[name="name"]');i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{name:{required:!0}}}),e.on("show.bs.modal",function(){t.val("")}),e.on("click",".submit-btn",n),t.keydown(function(t){var e=t||event;if(13==(e.which||e.keyCode))return n(),!1}),$(".tag-discipline-list-container").on("change",".tag-discipline-source-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/tag_disciplines/"+t,type:"PUT",dataType:"script",data:n})}),$(".tag-discipline-list-container").on("click",".move-action",function(){var t=$(this),e=t.data("id"),n=t.data("opr");$.ajax({url:"/admins/tag_disciplines/"+e+"/adjust_position",method:"POST",dataType:"script",data:{opr:n}})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-tag-repertoires-index-page").length){var e=$(".modal.admin-create-tag-repertoire-modal"),n=e.find("form.admin-create-tag-repertoire-form"),t=n.find('input[name="name"]');n.validate({errorElement:"span",errorClass:"danger text-danger",rules:{name:{required:!0}}}),e.on("show.bs.modal",function(){t.val("")}),e.on("click",".submit-btn",function(){if(n.find(".error").html(""),n.valid()){var t=n.data("url");$.ajax({method:"POST",dataType:"json",url:t,data:n.serialize(),success:function(){$.notify({message:"\u521b\u5efa\u6210\u529f"}),e.modal("hide"),setTimeout(function(){window.location.reload()},500)},error:function(t){var e=t.responseJSON;n.find(".error").html(e.message)}})}}),$(".tag-repertoire-list-container").on("change",".tag-repertoire-source-form",function(){var t=$(this).attr("data-id"),e=$(this).val(),n={};n[$(this).attr("name")]=e,$.ajax({url:"/admins/tag_repertoires/"+t,type:"PUT",dataType:"script",data:n})})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-user-statistics-index-page").length){var e=$(".user-statistic-list-form"),n=function(t,e){return""===$.trim(t.term)?e:"undefined"==typeof e.text?null:e.name&&-1<e.name.indexOf(t.term)?$.extend({},e,!0):null},i=function(t){e.find(".school-select").select2({theme:"bootstrap4",placeholder:"\u9009\u62e9\u5b66\u6821/\u5355\u4f4d",minimumInputLength:1,data:t,templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id&&e.find("#school_id").val(t.id),t.name||t.text},matcher:n})};$.ajax({url:"/api/schools/for_option.json",dataType:"json",type:"GET",success:function(t){i(t.schools)}}),e.on("click",".clear-btn",function(){e.find('select[name="date"]').val(""),e.find(".school-select").val("").trigger("change"),e.find('input[type="submit"]').trigger("click")}),$(".export-action").on("click",function(){var t=$(".user-statistic-list-form .search-form"),e=$(this),n=t.find("select[name='date']").val(),i=t.find('input[name="school_id"]').val(),r=e.data("url").split("?")[0]+"?date="+n+"&school_id="+i;window.open(r)})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-users-edit-page, body.admins-users-update-page").length){var e=!0,n=function(t,e){return""===$.trim(t.term)?e:"undefined"==typeof e.text?null:e.name&&-1<e.name.indexOf(t.term)?$.extend({},e,!0):null},i=function(t){$(".school-select").select2({theme:"bootstrap4",placeholder:"\u67e5\u8be2\u5b66\u6821/\u5355\u4f4d",minimumInputLength:1,data:t,templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id&&($("#user_school_id").val(t.id),o(t.id,r)),t.name||t.text},matcher:n})},r=function(t){t.unshift({id:"-1",name:"\u672a\u9009\u62e9"}),e||$(".department-select").empty(),e=!1,$(".department-select").select2({theme:"bootstrap4",placeholder:"\u67e5\u8be2\u5b66\u9662/\u90e8\u95e8",minimumInputLength:0,data:t,templateResult:function(t){return t.id&&""!==t.id?t.name:t.text},templateSelection:function(t){return t.id&&$("#user_department_id").val(t.id),t.name||t.text},matcher:n})},o=function(t,e){$.ajax({url:"/api/schools/"+t+"/departments/for_option.json",dataType:"json",type:"GET",success:function(t){e(t.departments)}})};$.ajax({url:"/api/schools/for_option.json",dataType:"json",type:"GET",success:function(t){i(t.schools)}}),$(".province-city-select").cxSelect({url:"/javascripts/educoder/province-data.json",selects:["province-select","city-select"]});var t=[{v:"teacher",n:"\u6559\u5e08",s:[{n:"\u6559\u6388",v:"\u6559\u6388"},{n:"\u526f\u6559\u6388",v:"\u526f\u6559\u6388"},{n:"\u8bb2\u5e08",v:"\u8bb2\u5e08"},{n:"\u52a9\u6559",v:"\u52a9\u6559"}]},{v:"student",n:"\u5b66\u751f",s:[]},{v:"professional",n:"\u4e13\u4e1a\u4eba\u58eb",s:[{n:"\u4f01\u4e1a\u7ba1\u7406\u8005",v:"\u4f01\u4e1a\u7ba1\u7406\u8005"},{n:"\u90e8\u95e8\u7ba1\u7406\u8005",v:"\u90e8\u95e8\u7ba1\u7406\u8005"},{n:"\u9ad8\u7ea7\u5de5\u7a0b\u5e08",v:"\u9ad8\u7ea7\u5de5\u7a0b\u5e08"},{n:"\u5de5\u7a0b\u5e08",v:"\u5de5\u7a0b\u5e08"},{n:"\u52a9\u7406\u5de5\u7a0b\u5e08",v:"\u52a9\u7406\u5de5\u7a0b\u5e08"}]}];$(".user-identity-select").cxSelect({data:t,jsonValue:"v",selects:["identity-select","technical-title-select"]}),$(".identity-select").on("change",function(){"student"===$(this).val()?($(".technical-title-select-wrapper").hide(),$(".form-group.user_student_id").show()):($(".technical-title-select-wrapper").show(),$(".form-group.user_student_id").hide())});var a=$("form.edit_user");a.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"user[password]":{required:!1,minlength:5},"user[password_confirmation]":{required:!1,minlength:5,equalTo:"#user_password"}},messages:{"user[password_confirmation]":{equalTo:"\u4e24\u6b21\u5bc6\u7801\u8f93\u5165\u4e0d\u4e00\u81f4"}}}),a.submit(function(t){a.valid()||t.preventDefault()})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-users-index-page").length){var r=function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"},{type:"success"})};$(".users-list-container").on("click",".lock-action",function(){var t=$(this),e=t.siblings(".unlock-action"),n=t.data("id");customConfirm({content:"\u786e\u8ba4\u52a0\u9501\u5417\uff1f",ok:function(){$.ajax({url:"/admins/users/"+n+"/lock",method:"POST",dataType:"json",success:function(){r(),t.hide(),e.show()}})}})}),$(".users-list-container").on("click",".unlock-action",function(){var t=$(this),e=t.siblings(".lock-action"),n=t.data("id");customConfirm({content:"\u786e\u8ba4\u89e3\u9501\u5417\uff1f",ok:function(){$.ajax({url:"/admins/users/"+n+"/unlock",method:"POST",dataType:"json",success:function(){r(),e.show(),t.hide()}})}})}),$(".users-list-container").on("click",".active-action",function(){var t=$(this),e=t.siblings(".unlock-action"),n=t.siblings(".lock-action"),i=t.data("id");customConfirm({content:"\u786e\u8ba4\u6fc0\u6d3b\u5417\uff1f",ok:function(){$.ajax({url:"/admins/users/"+i+"/unlock",method:"POST",dataType:"json",success:function(){r(),t.hide(),n.show(),e.hide()}})}})}),$(".users-list-container").on("click",".reset-login-times-action",function(){var t=$(this).data("id");$.ajax({url:"/admins/users/"+t+"/reset_login_times",method:"POST",dataType:"json",success:function(){r()}})});var n=$(".admin-users-reward-grade-modal"),t=n.find("form.admin-users-reward-grade-form");t.validate({errorElement:"span",errorClass:"danger text-danger",rules:{grade:{required:!0,digits:!0}}}),n.on("show.bs.modal",function(t){var e=$(t.relatedTarget).data("id");n.find('.modal-body input[name="user_id"]').val(e)}),n.on("shown.bs.modal",function(){n.find('.modal-body input[name="grade"]').focus()}),$(".admin-users-reward-grade-modal .submit-btn").on("click",function(){if(t.find(".error").html(""),t.valid()){var e=t.find('input[name="user_id"]').val();$.ajax({method:"POST",dataType:"json",url:"/admins/users/"+e+"/reward_grade",data:t.serialize(),success:function(t){r(),$(".users-list-container .user-item-"+e+" td.grade-content").html(t.grade),n.modal("hide")},error:function(t){n.find(".error").html(t.responseJSON.message)}})}});var e=$(".modal.admin-import-user-modal"),i=e.find("form.admin-import-user-form");e.on("show.bs.modal",function(){resetFileInputFunc(e.find(".upload-file-input")),e.find(".file-names").html("\u9009\u62e9\u6587\u4ef6"),e.find(".upload-file-input").trigger("click")}),e.on("change",".upload-file-input",function(){var t=$(this)[0].files[0];e.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")});var o=function(){return i.find('input[name="file"]').val()!=undefined&&0!=i.find('input[name="file"]').val().length||(i.find(".error").html("\u8bf7\u9009\u62e9\u6587\u4ef6"),!1)},a=function(t){var e="<div>\u5bfc\u5165\u7ed3\u679c\uff1a\u6210\u529f"+t.success+"\u6761\uff0c\u5931\u8d25"+t.fail.length+"\u6761</div>";return 0<t.fail.length&&(e+='<table class="table"><thead class="thead-light"><tr><th>\u6570\u636e</th><th>\u5931\u8d25\u539f\u56e0</th></tr></thead><tbody>',t.fail.forEach(function(t){e+="<tr><td>"+t.data+"</td><td>"+t.message+"</td></tr>"}),e+="</tbody></table>"),e};e.on("click",".submit-btn",function(){i.find(".error").html(""),o()&&($("body").mLoading({text:"\u6b63\u5728\u5bfc\u5165..."}),$.ajax({method:"POST",dataType:"json",url:"/admins/import_users",data:new FormData(i[0]),processData:!1,contentType:!1,success:function(t){$("body").mLoading("destroy"),e.modal("hide"),showMessageModal(a(t),function(){window.location.reload()})},error:function(t){$("body").mLoading("destroy");var e=t.responseJSON;i.find(".error").html(e.message)}}))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-video-applies-index-page").length){var e=$(".video-applies-form");e.find('select[name="status"]').val("pending"),e.on("click",".search-form-tab",function(){var t=$(this);e.find('input[name="keyword"]').val(""),e.find('select[name="status"]').val("all"),"all"===t.data("value")?e.find(".status-filter").show():(e.find(".status-filter").hide(),e.find('select[name="status"]').val("pending"))})}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-weapp-adverts-index-page").length){var a=function(){$("#adverts-container .advert-item-no").each(function(t,e){$(e).html(t+1)})};$(".adverts-card").on("click",".save-data-btn",function(){var t=$(this),e=t.data("id"),n=$(".advert-item-"+e).find(".link-input").val();t.attr("disabled",!0),$.ajax({url:"/admins/weapp_adverts/"+e,method:"PATCH",dataType:"json",data:{link:n},success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"})},error:ajaxErrorNotifyHandler,complete:function(){t.removeAttr("disabled")}})}),$(".adverts-card").on("change",".online-check-box",function(){var t=$(this),e=t.data("id"),n=t.is(":checked");t.attr("disabled",!0),$.ajax({url:"/admins/weapp_adverts/"+e,method:"PATCH",dataType:"json",data:{online:n},success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"});var t=$(".advert-item-"+e).find(".drag");n?t.removeClass("not_active"):t.addClass("not_active")},error:ajaxErrorNotifyHandler,complete:function(){t.removeAttr("disabled")}})});var t=function(t,e,n,i){var r=$(t).data("id"),o=$(i).data("id")||"";$.ajax({url:"/admins/weapp_adverts/drag",method:"POST",dataType:"json",data:{move_id:r,after_id:o},success:function(){a()},error:function(t){var e=t.responseJSON;$.notify({message:"\u79fb\u52a8\u5931\u8d25\uff0c\u539f\u56e0\uff1a"+e.message},{type:"danger"})}})},e=document.getElementById("adverts-container");dragula([e],{mirrorContainer:e}).on("drop",t);var n=$(".modal.admin-add-weapp-advert-modal"),i=n.find("form.admin-add-weapp-advert-form");i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"weapp_settings_advert[image]":{required:!0}}}),n.on("show.bs.modal",function(){resetFileInputFunc(n.find(".img-file-input")),n.find(".file-names").html("\u9009\u62e9\u6587\u4ef6")}),n.on("click",".submit-btn",function(){i.find(".error").html(""),i.valid()?i.submit():i.find(".error").html("\u8bf7\u9009\u62e9\u56fe\u7247")}),n.on("change",".img-file-input",function(){var t=$(this)[0].files[0];n.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")}),$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){$(".advert-item-"+e.source_id).find(".advert-item-img img").attr("src",e.url)}),$(document).on("delete_success",a)}}),$(document).on("turbolinks:load",function(){if(0<$("body.admins-weapp-carousels-index-page").length){var a=function(){$("#carousels-container .custom-carousel-item-no").each(function(t,e){$(e).html(t+1)})};$(".carousels-card").on("click",".save-data-btn",function(){var t=$(this),e=t.data("id"),n=$(".custom-carousel-item-"+e).find(".link-input").val();t.attr("disabled",!0),$.ajax({url:"/admins/weapp_carousels/"+e,method:"PATCH",dataType:"json",data:{link:n},success:function(){$.notify({message:"\u64cd\u4f5c\u6210\u529f"})},error:ajaxErrorNotifyHandler,complete:function(){t.removeAttr("disabled")}})}),$(".carousels-card").on("change",".online-check-box",function(){var t=$(this),e=t.data("id"),n=t.is(":checked");t.attr("disabled",!0),$.ajax({url:"/admins/weapp_carousels/"+e,method:"PATCH",dataType:"json",data:{online:n},success:function(){$.notify({message:"\u4fdd\u5b58\u6210\u529f"});var t=$(".custom-carousel-item-"+e).find(".drag");n?t.removeClass("not_active"):t.addClass("not_active")},error:ajaxErrorNotifyHandler,complete:function(){t.removeAttr("disabled")}})});var t=function(t,e,n,i){var r=$(t).data("id"),o=$(i).data("id")||"";$.ajax({url:"/admins/weapp_carousels/drag",method:"POST",dataType:"json",data:{move_id:r,after_id:o},success:function(){a()},error:function(t){var e=t.responseJSON;$.notify({message:"\u79fb\u52a8\u5931\u8d25\uff0c\u539f\u56e0\uff1a"+e.message},{type:"danger"})}})},e=document.getElementById("carousels-container");dragula([e],{mirrorContainer:e}).on("drop",t);var n=$(".modal.admin-add-weapp-carousel-modal"),i=n.find("form.admin-add-weapp-carousel-form");i.validate({errorElement:"span",errorClass:"danger text-danger",rules:{"weapp_settings_carousel[image]":{required:!0}}}),n.on("show.bs.modal",function(){resetFileInputFunc(n.find(".img-file-input")),n.find(".file-names").html("\u9009\u62e9\u6587\u4ef6")}),n.on("click",".submit-btn",function(){i.find(".error").html(""),i.valid()?i.submit():i.find(".error").html("\u8bf7\u9009\u62e9\u56fe\u7247")}),n.on("change",".img-file-input",function(){var t=$(this)[0].files[0];n.find(".file-names").html(t?t.name:"\u8bf7\u9009\u62e9\u6587\u4ef6")}),$(".modal.admin-upload-file-modal").on("upload:success",function(t,e){$(".custom-carousel-item-"+e.source_id).find(".custom-carousel-item-img img").attr("src",e.url)}),$(document).on("delete_success",a)}}),$.ajaxSetup({beforeSend:function(t){t.setRequestHeader("X-CSRF-Token",$('meta[name="csrf-token"]').attr("content"))}}),$.fn.select2.defaults.set("theme","bootstrap4"),$.fn.select2.defaults.set("language","zh-CN"),Turbolinks.setProgressBarDelay(200),$.notifyDefaults({type:"success",z_index:9999,delay:2e3}),$(document).on("turbolinks:load",function(){$('[data-toggle="tooltip"]').tooltip({trigger:"hover"}),$('[data-toggle="popover"]').popover(),$("img.preview-image").bootstrapViewer(),0<$(".admin-alert-container .alert").length&&(setTimeout(function(){$(".admin-alert-container .alert:not(.alert-danger)").alert("close")},2e3),setTimeout(function(){$(".admin-alert-container .alert.alert-danger").alert("close")},5e3))}),$(document).on("turbolinks:before-cache",function(){$('[data-toggle="tooltip"]').tooltip("hide"),$('[data-toggle="popover"]').popover("hide")}),$(function(){}); |