supershopui.common.js 168 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153
  1. /*!
  2. * jQuery blockUI plugin
  3. * Version 2.70.0-2014.11.23
  4. * Requires jQuery v1.7 or later
  5. *
  6. * Examples at: http://malsup.com/jquery/block/
  7. * Copyright (c) 2007-2013 M. Alsup
  8. * Dual licensed under the MIT and GPL licenses:
  9. * http://www.opensource.org/licenses/mit-license.php
  10. * http://www.gnu.org/licenses/gpl.html
  11. *
  12. * Thanks to Amir-Hossein Sobhi for some excellent contributions!
  13. */
  14. !function(){"use strict";function e(e){function t(t,n){var s,h,k=t==window,y=n&&void 0!==n.message?n.message:void 0;if(n=e.extend({},e.blockUI.defaults,n||{}),!n.ignoreIfBlocked||!e(t).data("blockUI.isBlocked")){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),s=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),h=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),y=void 0===y?n.message:y,k&&p&&o(window,{fadeOut:0}),y&&"string"!=typeof y&&(y.parentNode||y.jquery)){var m=y.jquery?y[0]:y,v={};e(t).data("blockUI.history",v),v.el=m,v.parent=m.parentNode,v.display=m.style.display,v.position=m.style.position,v.parent&&v.parent.removeChild(m)}e(t).data("blockUI.onUnblock",n.onUnblock);var g,I,w,U,x=n.baseZ;g=e(r||n.forceIframe?'<iframe class="blockUI" style="z-index:'+x++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+n.iframeSrc+'"></iframe>':'<div class="blockUI" style="display:none"></div>'),I=e(n.theme?'<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+x++ +';display:none"></div>':'<div class="blockUI blockOverlay" style="z-index:'+x++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),n.theme&&k?(U='<div class="blockUI '+n.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(x+10)+';display:none;position:fixed">',n.title&&(U+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),U+='<div class="ui-widget-content ui-dialog-content"></div>',U+="</div>"):n.theme?(U='<div class="blockUI '+n.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(x+10)+';display:none;position:absolute">',n.title&&(U+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),U+='<div class="ui-widget-content ui-dialog-content"></div>',U+="</div>"):U=k?'<div class="blockUI '+n.blockMsgClass+' blockPage" style="z-index:'+(x+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+n.blockMsgClass+' blockElement" style="z-index:'+(x+10)+';display:none;position:absolute"></div>',w=e(U),y&&(n.theme?(w.css(h),w.addClass("ui-widget-content")):w.css(s)),n.theme||I.css(n.overlayCSS),I.css("position",k?"fixed":"absolute"),(r||n.forceIframe)&&g.css("opacity",0);var C=[g,I,w],S=e(k?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var O=f&&(!e.support.boxModel||e("object,embed",k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(u||!e.support.boxModel)&&!k)var E=d(t,"borderTopWidth"),T=d(t,"borderLeftWidth"),M=E?"(0 - "+E+")":0,B=T?"(0 - "+T+")":0;e.each(C,function(e,t){var o=t[0].style;if(o.position="absolute",2>e)k?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),k?o.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),B&&o.setExpression("left",B),M&&o.setExpression("top",M);else if(n.centerY)k&&o.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),o.marginTop=0;else if(!n.centerY&&k){var i=n.css&&n.css.top?parseInt(n.css.top,10):0,s="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+i+') + "px"';o.setExpression("top",s)}})}if(y&&(n.theme?w.find(".ui-widget-content").append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&g.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):a(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",W)}}}function o(t,o){var s,l=t==window,a=e(t),d=a.data("blockUI.history"),c=a.data("blockUI.timeout");c&&(clearTimeout(c),a.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=a.data("blockUI.onUnblock"),a.removeData("blockUI.onUnblock"));var r;r=l?e("body").children().filter(".blockUI").add("body > .blockUI"):a.find(">.blockUI"),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0===--s&&n(r,d,o,t)})):n(r,d,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),a=l.width(),d=l[0].style.width;l.width(a-1).width(a),l[0].style.width=d}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var a="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(a,n,s):e(document).unbind(a,s)}}function s(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,a=e(t.target);return a.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),a.parents("div."+s.blockMsgClass).length>0?!0:0===a.parents().children().filter("div.blockUI").length}function l(e){if(b){var t=b[e===!0?b.length-1:0];t&&t.focus()}}function a(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-d(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-d(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),o&&(i.top=l>0?l+"px":"0")}function d(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode||0,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e('<div class="growlUI"></div>');t&&s.append("<h1>"+t+"</h1>"),o&&s.append("<h2>"+o+"</h2>"),void 0===n&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,b=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();
  15. /*!
  16. * JavaScript Cookie v2.0.3
  17. * https://github.com/js-cookie/js-cookie
  18. *
  19. * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
  20. * Released under the MIT license
  21. */
  22. !function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof exports)module.exports=e();else{var n=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=n,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var t=arguments[e];for(var o in t)n[o]=t[o]}return n}function n(t){function o(n,r,i){var c;if(arguments.length>1){if(i=e({path:"/"},o.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(a){}return r=encodeURIComponent(String(r)),r=r.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape),document.cookie=[n,"=",r,i.expires&&"; expires="+i.expires.toUTCString(),i.path&&"; path="+i.path,i.domain&&"; domain="+i.domain,i.secure?"; secure":""].join("")}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,d=0;d<p.length;d++){var f=p[d].split("="),l=f[0].replace(u,decodeURIComponent),m=f.slice(1).join("=");'"'===m.charAt(0)&&(m=m.slice(1,-1));try{if(m=t&&t(m,l)||m.replace(u,decodeURIComponent),this.json)try{m=JSON.parse(m)}catch(a){}if(n===l){c=m;break}n||(c[l]=m)}catch(a){}}return c}return o.get=o.set=o,o.getJSON=function(){return o.apply({json:!0},[].slice.call(arguments))},o.defaults={},o.remove=function(n,t){o(n,"",e(t,{expires:-1}))},o.withConverter=n,o}return n()});
  23. /*! layer-v3.0.1 Web弹层组件 LGPL License http://layer.layui.com/ By 贤心 */
  24. ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],type:["dialog","page","iframe","loading","tips"]},r={v:"3.0.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):r.link("skin/"+e.extend),this):this},link:function(t,n,a){if(r.path){var o=i("head")[0],l=document.createElement("link");"string"==typeof n&&(a=n);var s=(a||t).replace(/\.|\//g,""),f="layuicss-"+s,c=0;l.rel="stylesheet",l.href=r.path+t,l.id=f,i("#"+f)[0]||o.appendChild(l),"function"==typeof n&&!function d(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(i("#"+f).css("width"))?n():setTimeout(d,100))}()}},ready:function(e){var t="skinlayercss",i="1110";return a?layui.addcss("modules/layer/default/layer.css?v="+r.v+i,e,t):r.link("skin/default/layer.css?v="+r.v+i,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var l="function"==typeof t;return l&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},l?{}:t))},msg:function(e,n,a){var l="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",d=s.anim.length-1;return l&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},l&&!o.config.skin?{skin:c+" layui-layer-hui",anim:d}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},l=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},50)};l.pt=l.prototype;var s=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];s.anim=["layer-anim","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.pt.config={type:0,shade:.3,fixed:!0,move:s[1],title:"&#x4FE1;&#x606F;",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},l.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,l=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),d=r.title?'<div class="layui-layer-title" style="'+(f?r.title[1]:"")+'">'+(f?r.title[0]:r.title)+"</div>":"";return r.zIndex=l,t([r.shade?'<div class="layui-layer-shade" id="layui-layer-shade'+a+'" times="'+a+'" style="'+("z-index:"+(l-1)+"; background-color:"+(r.shade[1]||"#000")+"; opacity:"+(r.shade[0]||r.shade)+"; filter:alpha(opacity="+(100*r.shade[0]||100*r.shade)+");")+'"></div>':"",'<div class="'+s[0]+(" layui-layer-"+o.type[r.type])+(0!=r.type&&2!=r.type||r.shade?"":" layui-layer-border")+" "+(r.skin||"")+'" id="'+s[0]+a+'" type="'+o.type[r.type]+'" times="'+a+'" showtime="'+r.time+'" conType="'+(e?"object":"string")+'" style="z-index: '+l+"; width:"+r.area[0]+";height:"+r.area[1]+(r.fixed?"":";position:absolute;")+'">'+(e&&2!=r.type?"":d)+'<div id="'+(r.id||"")+'" class="layui-layer-content'+(0==r.type&&r.icon!==-1?" layui-layer-padding":"")+(3==r.type?" layui-layer-loading"+r.icon:"")+'">'+(0==r.type&&r.icon!==-1?'<i class="layui-layer-ico layui-layer-ico'+r.icon+'"></i>':"")+(1==r.type&&e?"":r.content||"")+'</div><span class="layui-layer-setwin">'+function(){var e=c?'<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>':"";return r.closeBtn&&(e+='<a class="layui-layer-ico '+s[7]+" "+s[7]+(r.title?r.closeBtn:4==r.type?"1":"2")+'" href="javascript:;"></a>'),e}()+"</span>"+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t<i;t++)e+='<a class="'+s[6]+t+'">'+r.btn[t]+"</a>";return'<div class="'+s[6]+" layui-layer-btn-"+(r.btnAlign||"")+'">'+e+"</div>"}():"")+(r.resize?'<span class="layui-layer-resize"></span>':"")+"</div>"],d,i('<div class="layui-layer-move"></div>')),n},l.pt.creat=function(){var e=this,t=e.config,a=e.index,l=t.content,f="object"==typeof l,c=i("body");if(!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var l=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='<iframe scrolling="'+(t.content[1]||"auto")+'" allowtransparency="true" id="'+s[4]+a+'" name="'+s[4]+a+'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'+t.content[0]+'"></iframe>';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'<i class="layui-layer-TipsG"></i>',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}e.vessel(f,function(n,r,d){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){l.parents("."+s[0])[0]||(l.data("display",l.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+s[0]+a).find("."+s[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=d),e.layero=i("#"+s[0]+a),t.scrollbar||s.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",l[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),s.anim[t.anim]&&e.layero.addClass(s.anim[t.anim]).data("anim",!0)}},l.pt.auto=function(e){function t(e){e=l.find(e),e.height(f[1]-c-d-2*(0|parseFloat(e.css("padding"))))}var a=this,o=a.config,l=i("#"+s[0]+e);""===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&l.width(l.innerWidth()),l.outerWidth()>o.maxWidth&&l.width(o.maxWidth));var f=[l.innerWidth(),l.innerHeight()],c=l.find(s[1]).outerHeight()||0,d=l.find("."+s[6]).outerHeight()||0;switch(o.type){case 2:t("iframe");break;default:""===o.area[1]?o.fixed&&f[1]>=n.height()&&(f[1]=n.height(),t("."+s[5])):t("."+s[5])}return a},l.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(s[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},l.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var l={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),l.autoLeft=function(){l.left+o[0]-n.width()>0?(l.tipLeft=l.left+l.width-o[0],f.css({right:12,left:"auto"})):l.tipLeft=l.left},l.where=[function(){l.autoLeft(),l.tipTop=l.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){l.tipLeft=l.left+l.width+10,l.tipTop=l.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){l.autoLeft(),l.tipTop=l.top+l.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){l.tipLeft=l.left-o[0]-10,l.tipTop=l.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],l.where[c-1](),1===c?l.top-(n.scrollTop()+o[1]+16)<0&&l.where[2]():2===c?n.width()-(l.left+l.width+o[0]+16)>0||l.where[3]():3===c?l.top-n.scrollTop()+l.height+o[1]+16-n.height()>0&&l.where[0]():4===c&&o[0]+16-l.left>0&&l.where[1](),a.find("."+s[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:l.tipLeft-(t.fixed?n.scrollLeft():0),top:l.tipTop-(t.fixed?n.scrollTop():0)})},l.pt.move=function(){var e=this,t=e.config,a=i(document),l=e.layero,s=l.find(t.move),f=l.find(".layui-layer-resize"),c={};return t.move&&s.css("cursor","move"),s.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(l.css("left")),e.clientY-parseFloat(l.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[l.outerWidth(),l.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],s="fixed"===l.css("position");if(i.preventDefault(),c.stX=s?0:n.scrollLeft(),c.stY=s?0:n.scrollTop(),!t.moveOut){var f=n.width()-l.outerWidth()+c.stX,d=n.height()-l.outerHeight()+c.stY;a<c.stX&&(a=c.stX),a>f&&(a=f),o<c.stY&&(o=c.stY),o>d&&(o=d)}l.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd()),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},l.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+s[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+s[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+s[0])[0]||1==n.attr("layer")&&i("."+s[0]).length<1&&n.removeAttr("layer").show(),n=null})},l.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+s[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},l.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){s.html.attr("layer-full")==e&&(s.html[0].style.removeProperty?s.html[0].style.removeProperty("overflow"):s.html[0].style.removeAttribute("overflow"),s.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+s[4]).attr("times"),i("#"+s[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+s[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+s[0]+e),a=n.find(s[1]).outerHeight()||0,o=n.find("."+s[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+s[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+s[0]+e),r=a.find(".layui-layer-content"),l=a.attr("type"),f=a.find(s[1]).outerHeight()||0,c=a.find("."+s[6]).outerHeight()||0;a.attr("minLeft");l!==o.type[3]&&l!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+s[6]).outerHeight(),l===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+s[0]+e),l=a.find(s[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:l,left:f,top:n.height()-l,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(s[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+s[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(s[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+s[0]+e);o.record(a),s.html.attr("layer-full")||s.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+s[0]+(t||r.index)).find(s[1]);n.html(e)},r.close=function(e){var t=i("#"+s[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var l="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+s[5]+")").remove();for(var a=t.find("."+l),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(l)}else{if(n===o.type[2])try{var f=i("#"+s[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+s[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}};t.data("anim")&&t.addClass(a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),"function"==typeof o.end[e]&&o.end[e](),delete o.end[e],t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),setTimeout(function(){f()},r.ie&&r.ie<10||!t.data("anim")?0:200)}},r.closeAll=function(e){i.each(i("."+s[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var l,s=2==e.formType?'<textarea class="layui-layer-input"'+a+">"+(e.value||"")+"</textarea>":function(){return'<input type="'+(1==e.formType?"password":"text")+'" class="layui-layer-input" value="'+(e.value||"")+'">'}();return r.open(i.extend({type:1,btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],content:s,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){l=e.find(".layui-layer-input"),l.focus()},resize:!1,yes:function(i){var n=l.val();""===n?l.focus():n.length>(e.maxlength||500)?r.tips("&#x6700;&#x591A;&#x8F93;&#x5165;"+(e.maxlength||500)+"&#x4E2A;&#x5B57;&#x6570;",l,{tips:1}):t&&t(n,i,l)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{};return r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,n="";if(e>0)for(n='<span class="layui-layer-tabnow">'+t[0].title+"</span>";i<e;i++)n+="<span>"+t[i].title+"</span>";return n}(),content:'<ul class="layui-layer-tabmain">'+function(){var e=t.length,i=1,n="";if(e>0)for(n='<li class="layui-layer-tabli xubox_tab_layer">'+(t[0].content||"no content")+"</li>";i<e;i++)n+='<li class="layui-layer-tabli">'+(t[i].content||"no content")+"</li>";return n}()+"</ul>",success:function(t){var n=t.find(".layui-layer-title").children(),a=t.find(".layui-layer-tabmain").children();n.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),o=n.index();n.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),a.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)})}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var l={};if(t=t||{},t.photos){var s=t.photos.constructor===Object,f=s?t.photos:{},d=f.data||[],u=f.start||0;if(l.imgIndex=(0|u)+1,t.img=t.img||"img",s){if(0===d.length)return r.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")}else{var y=i(t.photos),p=function(){d=[],y.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),d.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(p(),0===d.length)return;if(n||y.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:d,tab:t.tab},full:t.full}),!0),p()}),!n)return}l.imgprev=function(e){l.imgIndex--,l.imgIndex<1&&(l.imgIndex=d.length),l.tabimg(e)},l.imgnext=function(e,t){l.imgIndex++,l.imgIndex>d.length&&(l.imgIndex=1,t)||l.tabimg(e)},l.keyup=function(e){if(!l.end){var t=e.keyCode;e.preventDefault(),37===t?l.imgprev(!0):39===t?l.imgnext(!0):27===t&&r.close(l.index)}},l.tabimg=function(e){d.length<=1||(f.start=l.imgIndex-1,r.close(l.index),r.photos(t,!0,e))},l.event=function(){l.bigimg.hover(function(){l.imgsee.show()},function(){l.imgsee.hide()}),l.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),l.imgprev()}),l.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),l.imgnext()}),i(document).on("keyup",l.keyup)},l.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(d[u].src,function(n){r.close(l.loadi),l.index=r.open(i.extend({type:1,area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]<r[1]&&(a[0]=a[0]/r[1],a[1]=a[1]/r[1])}return[a[0]+"px",a[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,anim:5*Math.random()|0,skin:"layui-layer-photos"+c("photos"),content:'<div class="layui-layer-phimg"><img src="'+d[u].src+'" alt="'+(d[u].alt||"")+'" layer-pid="'+d[u].pid+'"><div class="layui-layer-imgsee">'+(d.length>1?'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>':"")+'<div class="layui-layer-imgbar" style="display:'+(a?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(d[u].alt||"")+"</a><em>"+l.imgIndex+"/"+d.length+"</em></span></div></div></div>",success:function(e,i){l.bigimg=e.find(".layui-layer-phimg"),l.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),l.event(e),t.tab&&t.tab(d[u],e)},end:function(){l.end=!0,i(document).off("keyup",l.keyup)}},t))},function(){r.close(l.loadi),r.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;",{time:3e4,btn:["&#x4E0B;&#x4E00;&#x5F20;","&#x4E0D;&#x770B;&#x4E86;"],yes:function(){d.length>1&&l.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),s.html=i("html"),r.open=function(e){var t=new l(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t("layer",r)})):"function"==typeof define?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);
  25. /*! AdminLTE app.js
  26. * ================
  27. * Main JS application file for AdminLTE v2. This file
  28. * should be included in all pages. It controls some layout
  29. * options and implements exclusive AdminLTE plugins.
  30. *
  31. * @Author Almsaeed Studio
  32. * @Support <http://www.almsaeedstudio.com>
  33. * @Email <abdullah@almsaeedstudio.com>
  34. * @version 2.3.6
  35. * @license MIT <http://opensource.org/licenses/MIT>
  36. */
  37. //Make sure jQuery has been loaded before app.js
  38. if (typeof jQuery === "undefined") {
  39. throw new Error("AdminLTE requires jQuery");
  40. }
  41. /* AdminLTE
  42. *
  43. * @type Object
  44. * @description $.AdminLTE is the main object for the template's app.
  45. * It's used for implementing functions and options related
  46. * to the template. Keeping everything wrapped in an object
  47. * prevents conflict with other plugins and is a better
  48. * way to organize our code.
  49. */
  50. $.AdminLTE = {};
  51. var yjsCount=9001;//20170819 ywb
  52. /* --------------------
  53. * - AdminLTE Options -
  54. * --------------------
  55. * Modify these options to suit your implementation
  56. */
  57. $.AdminLTE.options = {
  58. //Add slimscroll to navbar menus
  59. //This requires you to load the slimscroll plugin
  60. //in every page before app.js
  61. navbarMenuSlimscroll: true,
  62. navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
  63. navbarMenuHeight: "200px", //The height of the inner menu
  64. //General animation speed for JS animated elements such as box collapse/expand and
  65. //sidebar treeview slide up/down. This options accepts an integer as milliseconds,
  66. //'fast', 'normal', or 'slow'
  67. animationSpeed: 200,
  68. //Sidebar push menu toggle button selector
  69. sidebarToggleSelector: "[data-toggle='offcanvas']",
  70. //Activate sidebar push menu
  71. sidebarPushMenu: true,
  72. //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
  73. sidebarSlimScroll: true,
  74. //Enable sidebar expand on hover effect for sidebar mini
  75. //This option is forced to true if both the fixed layout and sidebar mini
  76. //are used together
  77. sidebarExpandOnHover: false,
  78. //BoxRefresh Plugin
  79. enableBoxRefresh: true,
  80. //Bootstrap.js tooltip
  81. enableBSToppltip: true,
  82. BSTooltipSelector: "[data-toggle='tooltip']",
  83. //Enable Fast Click. Fastclick.js creates a more
  84. //native touch experience with touch devices. If you
  85. //choose to enable the plugin, make sure you load the script
  86. //before AdminLTE's app.js
  87. enableFastclick: false,
  88. //Control Sidebar Options
  89. enableControlSidebar: true,
  90. controlSidebarOptions: {
  91. //Which button should trigger the open/close event
  92. toggleBtnSelector: "[data-toggle='control-sidebar']",
  93. //The sidebar selector
  94. selector: ".control-sidebar",
  95. //Enable slide over content
  96. slide: true
  97. },
  98. //Box Widget Plugin. Enable this plugin
  99. //to allow boxes to be collapsed and/or removed
  100. enableBoxWidget: true,
  101. //Box Widget plugin options
  102. boxWidgetOptions: {
  103. boxWidgetIcons: {
  104. //Collapse icon
  105. collapse: 'fa-minus',
  106. //Open icon
  107. open: 'fa-plus',
  108. //Remove icon
  109. remove: 'fa-times'
  110. },
  111. boxWidgetSelectors: {
  112. //Remove button selector
  113. remove: '[data-widget="remove"]',
  114. //Collapse button selector
  115. collapse: '[data-widget="collapse"]'
  116. }
  117. },
  118. //Direct Chat plugin options
  119. directChat: {
  120. //Enable direct chat by default
  121. enable: true,
  122. //The button to open and close the chat contacts pane
  123. contactToggleSelector: '[data-widget="chat-pane-toggle"]'
  124. },
  125. //Define the set of colors to use globally around the website
  126. colors: {
  127. lightBlue: "#3c8dbc",
  128. red: "#f56954",
  129. green: "#00a65a",
  130. aqua: "#00c0ef",
  131. yellow: "#f39c12",
  132. blue: "#0073b7",
  133. navy: "#001F3F",
  134. teal: "#39CCCC",
  135. olive: "#3D9970",
  136. lime: "#01FF70",
  137. orange: "#FF851B",
  138. fuchsia: "#F012BE",
  139. purple: "#8E24AA",
  140. maroon: "#D81B60",
  141. black: "#222222",
  142. gray: "#d2d6de"
  143. },
  144. //The standard screen sizes that bootstrap uses.
  145. //If you change these in the variables.less file, change
  146. //them here too.
  147. screenSizes: {
  148. xs: 480,
  149. sm: 768,
  150. md: 992,
  151. lg: 1200
  152. }
  153. };
  154. /* ------------------
  155. * - Implementation -
  156. * ------------------
  157. * The next block of code implements AdminLTE's
  158. * functions and plugins as specified by the
  159. * options above.
  160. */
  161. $(function () {
  162. "use strict";
  163. //Fix for IE page transitions
  164. $("body").removeClass("hold-transition");
  165. //Extend options if external options exist
  166. if (typeof AdminLTEOptions !== "undefined") {
  167. $.extend(true,
  168. $.AdminLTE.options,
  169. AdminLTEOptions);
  170. }
  171. //Easy access to options
  172. var o = $.AdminLTE.options;
  173. //Set up the object
  174. _init();
  175. //Activate the layout maker
  176. $.AdminLTE.layout.activate();
  177. //Enable sidebar tree view controls
  178. $.AdminLTE.tree('.sidebar');
  179. //Enable control sidebar
  180. if (o.enableControlSidebar) {
  181. $.AdminLTE.controlSidebar.activate();
  182. }
  183. //Add slimscroll to navbar dropdown
  184. if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
  185. $(".navbar .menu").slimscroll({
  186. height: o.navbarMenuHeight,
  187. alwaysVisible: false,
  188. size: o.navbarMenuSlimscrollWidth
  189. }).css("width", "100%");
  190. }
  191. //Activate sidebar push menu
  192. if (o.sidebarPushMenu) {
  193. $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
  194. }
  195. //Activate Bootstrap tooltip
  196. if (o.enableBSToppltip) {
  197. $('body').tooltip({
  198. selector: o.BSTooltipSelector
  199. });
  200. }
  201. //Activate box widget
  202. if (o.enableBoxWidget) {
  203. $.AdminLTE.boxWidget.activate();
  204. }
  205. //Activate fast click
  206. if (o.enableFastclick && typeof FastClick != 'undefined') {
  207. FastClick.attach(document.body);
  208. }
  209. //Activate direct chat widget
  210. if (o.directChat.enable) {
  211. $(document).on('click', o.directChat.contactToggleSelector, function () {
  212. var box = $(this).parents('.direct-chat').first();
  213. box.toggleClass('direct-chat-contacts-open');
  214. });
  215. }
  216. /*
  217. * INITIALIZE BUTTON TOGGLE
  218. * ------------------------
  219. */
  220. $('.btn-group[data-toggle="btn-toggle"]').each(function () {
  221. var group = $(this);
  222. $(this).find(".btn").on('click', function (e) {
  223. group.find(".btn.active").removeClass("active");
  224. $(this).addClass("active");
  225. e.preventDefault();
  226. });
  227. });
  228. });
  229. /* ----------------------------------
  230. * - Initialize the AdminLTE Object -
  231. * ----------------------------------
  232. * All AdminLTE functions are implemented below.
  233. */
  234. function _init() {
  235. 'use strict';
  236. /* Layout
  237. * ======
  238. * Fixes the layout height in case min-height fails.
  239. *
  240. * @type Object
  241. * @usage $.AdminLTE.layout.activate()
  242. * $.AdminLTE.layout.fix()
  243. * $.AdminLTE.layout.fixSidebar()
  244. */
  245. $.AdminLTE.layout = {
  246. activate: function () {
  247. var _this = this;
  248. _this.fix();
  249. _this.fixSidebar();
  250. $(window, ".wrapper").resize(function () {
  251. _this.fix();
  252. _this.fixSidebar();
  253. });
  254. },
  255. fix: function () {
  256. //Get window height and the wrapper height
  257. var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
  258. var window_height = $(window).height();
  259. var sidebar_height = $(".sidebar").height();
  260. //Set the min-height of the content and sidebar based on the
  261. //the height of the document.
  262. if ($("body").hasClass("fixed")) {
  263. $(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
  264. } else {
  265. var postSetWidth;
  266. if (window_height >= sidebar_height) {
  267. $(".content-wrapper, .right-side").css('min-height', window_height - neg);
  268. postSetWidth = window_height - neg;
  269. } else {
  270. $(".content-wrapper, .right-side").css('min-height', sidebar_height);
  271. postSetWidth = sidebar_height;
  272. }
  273. //Fix for the control sidebar height
  274. var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
  275. if (typeof controlSidebar !== "undefined") {
  276. if (controlSidebar.height() > postSetWidth)
  277. $(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
  278. }
  279. }
  280. },
  281. fixSidebar: function () {
  282. //Make sure the body tag has the .fixed class
  283. if (!$("body").hasClass("fixed")) {
  284. if (typeof $.fn.slimScroll != 'undefined') {
  285. $(".sidebar").slimScroll({destroy: true}).height("auto");
  286. }
  287. return;
  288. } else if (typeof $.fn.slimScroll == 'undefined' && window.console) {
  289. window.console.error("Error: the fixed layout requires the slimscroll plugin!");
  290. }
  291. //Enable slimscroll for fixed layout
  292. if ($.AdminLTE.options.sidebarSlimScroll) {
  293. if (typeof $.fn.slimScroll != 'undefined') {
  294. //Destroy if it exists
  295. $(".sidebar").slimScroll({destroy: true}).height("auto");
  296. //Add slimscroll
  297. $(".sidebar").slimscroll({
  298. height: ($(window).height() - $(".main-header").height()) + "px",
  299. color: "rgba(0,0,0,0.2)",
  300. size: "3px"
  301. });
  302. }
  303. }
  304. }
  305. };
  306. /* PushMenu()
  307. * ==========
  308. * Adds the push menu functionality to the sidebar.
  309. *
  310. * @type Function
  311. * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
  312. */
  313. $.AdminLTE.pushMenu = {
  314. activate: function (toggleBtn) {
  315. //Get the screen sizes
  316. var screenSizes = $.AdminLTE.options.screenSizes;
  317. //Enable sidebar toggle
  318. $(document).on('click', toggleBtn, function (e) {
  319. e.preventDefault();
  320. //Enable sidebar push menu
  321. if ($(window).width() > (screenSizes.sm - 1)) {
  322. if ($("body").hasClass('sidebar-collapse')) {
  323. $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu');
  324. } else {
  325. $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu');
  326. }
  327. }
  328. //Handle sidebar push menu for small screens
  329. else {
  330. if ($("body").hasClass('sidebar-open')) {
  331. $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
  332. } else {
  333. $("body").addClass('sidebar-open').trigger('expanded.pushMenu');
  334. }
  335. }
  336. });
  337. $(".content-wrapper").click(function () {
  338. //Enable hide menu when clicking on the content-wrapper on small screens
  339. if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
  340. $("body").removeClass('sidebar-open');
  341. }
  342. });
  343. //Enable expand on hover for sidebar mini
  344. if ($.AdminLTE.options.sidebarExpandOnHover
  345. || ($('body').hasClass('fixed')
  346. && $('body').hasClass('sidebar-mini'))) {
  347. this.expandOnHover();
  348. }
  349. },
  350. expandOnHover: function () {
  351. var _this = this;
  352. var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
  353. //Expand sidebar on hover
  354. $('.main-sidebar').hover(function () {
  355. if ($('body').hasClass('sidebar-mini')
  356. && $("body").hasClass('sidebar-collapse')
  357. && $(window).width() > screenWidth) {
  358. _this.expand();
  359. }
  360. }, function () {
  361. if ($('body').hasClass('sidebar-mini')
  362. && $('body').hasClass('sidebar-expanded-on-hover')
  363. && $(window).width() > screenWidth) {
  364. _this.collapse();
  365. }
  366. });
  367. },
  368. expand: function () {
  369. $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
  370. },
  371. collapse: function () {
  372. if ($('body').hasClass('sidebar-expanded-on-hover')) {
  373. $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');
  374. }
  375. }
  376. };
  377. /* Tree()
  378. * ======
  379. * Converts the sidebar into a multilevel
  380. * tree view menu.
  381. *
  382. * @type Function
  383. * @Usage: $.AdminLTE.tree('.sidebar')
  384. */
  385. $.AdminLTE.tree = function (menu) {
  386. var _this = this;
  387. var animationSpeed = $.AdminLTE.options.animationSpeed;
  388. $(document).off('click', menu + ' li a')
  389. .on('click', menu + ' li a', function (e) {
  390. //Get the clicked link and the next element
  391. var $this = $(this);
  392. var checkElement = $this.next();
  393. //Check if the next element is a menu and is visible
  394. if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
  395. //Close the menu
  396. checkElement.slideUp(animationSpeed, function () {
  397. checkElement.removeClass('menu-open');
  398. //Fix the layout in case the sidebar stretches over the height of the window
  399. //_this.layout.fix();
  400. });
  401. checkElement.parent("li").removeClass("active");
  402. }
  403. //If the menu is not visible
  404. else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
  405. //Get the parent menu
  406. var parent = $this.parents('ul').first();
  407. //Close all open menus within the parent
  408. var ul = parent.find('ul:visible').slideUp(animationSpeed);
  409. //Remove the menu-open class from the parent
  410. ul.removeClass('menu-open');
  411. //Get the parent li
  412. var parent_li = $this.parent("li");
  413. //Open the target menu and add the menu-open class
  414. checkElement.slideDown(animationSpeed, function () {
  415. //Add the class active to the parent li
  416. checkElement.addClass('menu-open');
  417. parent.find('li.active').removeClass('active');
  418. parent_li.addClass('active');
  419. //Fix the layout in case the sidebar stretches over the height of the window
  420. _this.layout.fix();
  421. });
  422. }
  423. //if this isn't a link, prevent the page from being redirected
  424. if (checkElement.is('.treeview-menu')) {
  425. e.preventDefault();
  426. }
  427. });
  428. };
  429. /* ControlSidebar
  430. * ==============
  431. * Adds functionality to the right sidebar
  432. *
  433. * @type Object
  434. * @usage $.AdminLTE.controlSidebar.activate(options)
  435. */
  436. $.AdminLTE.controlSidebar = {
  437. //instantiate the object
  438. activate: function () {
  439. //Get the object
  440. var _this = this;
  441. //Update options
  442. var o = $.AdminLTE.options.controlSidebarOptions;
  443. //Get the sidebar
  444. var sidebar = $(o.selector);
  445. //The toggle button
  446. var btn = $(o.toggleBtnSelector);
  447. //Listen to the click event
  448. btn.on('click', function (e) {
  449. e.preventDefault();
  450. //If the sidebar is not open
  451. if (!sidebar.hasClass('control-sidebar-open')
  452. && !$('body').hasClass('control-sidebar-open')) {
  453. //Open the sidebar
  454. _this.open(sidebar, o.slide);
  455. } else {
  456. _this.close(sidebar, o.slide);
  457. }
  458. });
  459. //If the body has a boxed layout, fix the sidebar bg position
  460. var bg = $(".control-sidebar-bg");
  461. _this._fix(bg);
  462. //If the body has a fixed layout, make the control sidebar fixed
  463. if ($('body').hasClass('fixed')) {
  464. _this._fixForFixed(sidebar);
  465. } else {
  466. //If the content height is less than the sidebar's height, force max height
  467. if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
  468. _this._fixForContent(sidebar);
  469. }
  470. }
  471. },
  472. //Open the control sidebar
  473. open: function (sidebar, slide) {
  474. //Slide over content
  475. if (slide) {
  476. sidebar.addClass('control-sidebar-open');
  477. } else {
  478. //Push the content by adding the open class to the body instead
  479. //of the sidebar itself
  480. $('body').addClass('control-sidebar-open');
  481. }
  482. },
  483. //Close the control sidebar
  484. close: function (sidebar, slide) {
  485. if (slide) {
  486. sidebar.removeClass('control-sidebar-open');
  487. } else {
  488. $('body').removeClass('control-sidebar-open');
  489. }
  490. },
  491. _fix: function (sidebar) {
  492. var _this = this;
  493. if ($("body").hasClass('layout-boxed')) {
  494. sidebar.css('position', 'absolute');
  495. sidebar.height($(".wrapper").height());
  496. if (_this.hasBindedResize) {
  497. return;
  498. }
  499. $(window).resize(function () {
  500. _this._fix(sidebar);
  501. });
  502. _this.hasBindedResize = true;
  503. } else {
  504. sidebar.css({
  505. 'position': 'fixed',
  506. 'height': 'auto'
  507. });
  508. }
  509. },
  510. _fixForFixed: function (sidebar) {
  511. sidebar.css({
  512. 'position': 'fixed',
  513. 'max-height': '100%',
  514. 'overflow': 'auto',
  515. 'padding-bottom': '50px'
  516. });
  517. },
  518. _fixForContent: function (sidebar) {
  519. $(".content-wrapper, .right-side").css('min-height', sidebar.height());
  520. }
  521. };
  522. /* BoxWidget
  523. * =========
  524. * BoxWidget is a plugin to handle collapsing and
  525. * removing boxes from the screen.
  526. *
  527. * @type Object
  528. * @usage $.AdminLTE.boxWidget.activate()
  529. * Set all your options in the main $.AdminLTE.options object
  530. */
  531. $.AdminLTE.boxWidget = {
  532. selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,
  533. icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,
  534. animationSpeed: $.AdminLTE.options.animationSpeed,
  535. activate: function (_box) {
  536. var _this = this;
  537. if (!_box) {
  538. _box = document; // activate all boxes per default
  539. }
  540. //Listen for collapse event triggers
  541. $(_box).on('click', _this.selectors.collapse, function (e) {
  542. e.preventDefault();
  543. _this.collapse($(this));
  544. });
  545. //Listen for remove event triggers
  546. $(_box).on('click', _this.selectors.remove, function (e) {
  547. e.preventDefault();
  548. _this.remove($(this));
  549. });
  550. },
  551. collapse: function (element) {
  552. var _this = this;
  553. //Find the box parent
  554. var box = element.parents(".box").first();
  555. //Find the body and the footer
  556. var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");
  557. if (!box.hasClass("collapsed-box")) {
  558. //Convert minus into plus
  559. element.children(":first")
  560. .removeClass(_this.icons.collapse)
  561. .addClass(_this.icons.open);
  562. //Hide the content
  563. box_content.slideUp(_this.animationSpeed, function () {
  564. box.addClass("collapsed-box");
  565. });
  566. } else {
  567. //Convert plus into minus
  568. element.children(":first")
  569. .removeClass(_this.icons.open)
  570. .addClass(_this.icons.collapse);
  571. //Show the content
  572. box_content.slideDown(_this.animationSpeed, function () {
  573. box.removeClass("collapsed-box");
  574. });
  575. }
  576. },
  577. remove: function (element) {
  578. //Find the box parent
  579. var box = element.parents(".box").first();
  580. box.slideUp(this.animationSpeed);
  581. }
  582. };
  583. }
  584. /* ------------------
  585. * - Custom Plugins -
  586. * ------------------
  587. * All custom plugins are defined below.
  588. */
  589. /*
  590. * BOX REFRESH BUTTON
  591. * ------------------
  592. * This is a custom plugin to use with the component BOX. It allows you to add
  593. * a refresh button to the box. It converts the box's state to a loading state.
  594. *
  595. * @type plugin
  596. * @usage $("#box-widget").boxRefresh( options );
  597. */
  598. (function ($) {
  599. "use strict";
  600. $.fn.boxRefresh = function (options) {
  601. // Render options
  602. var settings = $.extend({
  603. //Refresh button selector
  604. trigger: ".refresh-btn",
  605. //File source to be loaded (e.g: ajax/src.php)
  606. source: "",
  607. //Callbacks
  608. onLoadStart: function (box) {
  609. return box;
  610. }, //Right after the button has been clicked
  611. onLoadDone: function (box) {
  612. return box;
  613. } //When the source has been loaded
  614. }, options);
  615. //The overlay
  616. var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
  617. return this.each(function () {
  618. //if a source is specified
  619. if (settings.source === "") {
  620. if (window.console) {
  621. window.console.log("Please specify a source first - boxRefresh()");
  622. }
  623. return;
  624. }
  625. //the box
  626. var box = $(this);
  627. //the button
  628. var rBtn = box.find(settings.trigger).first();
  629. //On trigger click
  630. rBtn.on('click', function (e) {
  631. e.preventDefault();
  632. //Add loading overlay
  633. start(box);
  634. //Perform ajax call
  635. box.find(".box-body").load(settings.source, function () {
  636. done(box);
  637. });
  638. });
  639. });
  640. function start(box) {
  641. //Add overlay and loading img
  642. box.append(overlay);
  643. settings.onLoadStart.call(box);
  644. }
  645. function done(box) {
  646. //Remove overlay and loading img
  647. box.find(overlay).remove();
  648. settings.onLoadDone.call(box);
  649. }
  650. };
  651. })(jQuery);
  652. /*
  653. * EXPLICIT BOX CONTROLS
  654. * -----------------------
  655. * This is a custom plugin to use with the component BOX. It allows you to activate
  656. * a box inserted in the DOM after the app.js was loaded, toggle and remove box.
  657. *
  658. * @type plugin
  659. * @usage $("#box-widget").activateBox();
  660. * @usage $("#box-widget").toggleBox();
  661. * @usage $("#box-widget").removeBox();
  662. */
  663. (function ($) {
  664. 'use strict';
  665. $.fn.activateBox = function () {
  666. $.AdminLTE.boxWidget.activate(this);
  667. };
  668. $.fn.toggleBox = function () {
  669. var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
  670. $.AdminLTE.boxWidget.collapse(button);
  671. };
  672. $.fn.removeBox = function () {
  673. var button = $($.AdminLTE.boxWidget.selectors.remove, this);
  674. $.AdminLTE.boxWidget.remove(button);
  675. };
  676. })(jQuery);
  677. /*
  678. * TODO LIST CUSTOM PLUGIN
  679. * -----------------------
  680. * This plugin depends on iCheck plugin for checkbox and radio inputs
  681. *
  682. * @type plugin
  683. * @usage $("#todo-widget").todolist( options );
  684. */
  685. (function ($) {
  686. 'use strict';
  687. $.fn.todolist = function (options) {
  688. // Render options
  689. var settings = $.extend({
  690. //When the user checks the input
  691. onCheck: function (ele) {
  692. return ele;
  693. },
  694. //When the user unchecks the input
  695. onUncheck: function (ele) {
  696. return ele;
  697. }
  698. }, options);
  699. return this.each(function () {
  700. if (typeof $.fn.iCheck != 'undefined') {
  701. $('input', this).on('ifChecked', function () {
  702. var ele = $(this).parents("li").first();
  703. ele.toggleClass("done");
  704. settings.onCheck.call(ele);
  705. });
  706. $('input', this).on('ifUnchecked', function () {
  707. var ele = $(this).parents("li").first();
  708. ele.toggleClass("done");
  709. settings.onUncheck.call(ele);
  710. });
  711. } else {
  712. $('input', this).on('change', function () {
  713. var ele = $(this).parents("li").first();
  714. ele.toggleClass("done");
  715. if ($('input', ele).is(":checked")) {
  716. settings.onCheck.call(ele);
  717. } else {
  718. settings.onUncheck.call(ele);
  719. }
  720. });
  721. }
  722. });
  723. };
  724. }(jQuery));
  725. /**
  726. * AdminLTE Demo Menu
  727. * ------------------
  728. * You should not use this file in production.
  729. * This file is for demo purposes only.
  730. */
  731. (function ($, AdminLTE) {
  732. "use strict";
  733. /**
  734. * List of all the available skins
  735. *
  736. * @type Array
  737. */
  738. var my_skins = [
  739. "skin-blue",
  740. "skin-black",
  741. "skin-red",
  742. "skin-yellow",
  743. "skin-purple",
  744. "skin-green",
  745. "skin-blue-light",
  746. "skin-black-light",
  747. "skin-red-light",
  748. "skin-yellow-light",
  749. "skin-purple-light",
  750. "skin-green-light"
  751. ];
  752. //Create the new tab
  753. var tab_pane = $("<div />", {
  754. "id": "control-sidebar-theme-demo-options-tab",
  755. "class": "tab-pane active"
  756. });
  757. //Create the tab button
  758. var tab_button = $("<li />", {"class": "active"})
  759. .html("<a href='#control-sidebar-theme-demo-options-tab' data-toggle='tab'>"
  760. + "<i class='fa fa-wrench'></i>"
  761. + "</a>");
  762. //Add the tab button to the right sidebar tabs
  763. $("[href='#control-sidebar-home-tab']")
  764. .parent()
  765. .before(tab_button);
  766. //Create the menu
  767. var demo_settings = $("<div />");
  768. //Layout options
  769. demo_settings.append(
  770. "<h4 class='control-sidebar-heading'>"
  771. + "布局设置"
  772. + "</h4>"
  773. //Fixed layout
  774. + "<div class='form-group'>"
  775. + "<label class='control-sidebar-subheading'>"
  776. + "<input type='checkbox' data-layout='fixed' class='pull-right'/> "
  777. + "自适应布局"
  778. + "</label>"
  779. + "<p></p>"
  780. + "</div>"
  781. //Boxed layout
  782. + "<div class='form-group'>"
  783. + "<label class='control-sidebar-subheading'>"
  784. + "<input type='checkbox' data-layout='layout-boxed'class='pull-right'/> "
  785. + "盒式布局"
  786. + "</label>"
  787. + "<p></p>"
  788. + "</div>"
  789. //Sidebar Toggle
  790. + "<div class='form-group'>"
  791. + "<label class='control-sidebar-subheading'>"
  792. + "<input type='checkbox' data-layout='sidebar-collapse' class='pull-right'/> "
  793. + "面板切换"
  794. + "</label>"
  795. + "<p></p>"
  796. + "</div>"
  797. //Sidebar mini expand on hover toggle
  798. + "<div class='form-group'>"
  799. + "<label class='control-sidebar-subheading'>"
  800. + "<input type='checkbox' data-enable='expandOnHover' class='pull-right'/> "
  801. + "左侧面板隐藏"
  802. + "</label>"
  803. + "<p>左侧最小化面板</p>"
  804. + "</div>"
  805. //Control Sidebar Toggle
  806. + "<div class='form-group'>"
  807. + "<label class='control-sidebar-subheading'>"
  808. + "<input type='checkbox' data-controlsidebar='control-sidebar-open' class='pull-right'/> "
  809. + "右侧面板隐藏"
  810. + "</label>"
  811. + "<p></p>"
  812. + "</div>"
  813. //Control Sidebar Skin Toggle
  814. + "<div class='form-group'>"
  815. + "<label class='control-sidebar-subheading'>"
  816. + "<input type='checkbox' data-sidebarskin='toggle' class='pull-right'/> "
  817. + "面板主题"
  818. + "</label>"
  819. + "<p>主题切换</p>"
  820. + "</div>"
  821. );
  822. var skins_list = $("<ul />", {"class": 'list-unstyled clearfix'});
  823. //Dark sidebar skins
  824. var skin_blue =
  825. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  826. .append("<a href='javascript:void(0);' data-skin='skin-blue' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  827. + "<div><span style='display:block; width: 20%; float: left; height: 7px; background: #367fa9;'></span><span class='bg-light-blue' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  828. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #222d32;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  829. + "</a>"
  830. + "<p class='text-center no-margin'>Blue</p>");
  831. skins_list.append(skin_blue);
  832. var skin_black =
  833. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  834. .append("<a href='javascript:void(0);' data-skin='skin-black' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  835. + "<div style='box-shadow: 0 0 2px rgba(0,0,0,0.1)' class='clearfix'><span style='display:block; width: 20%; float: left; height: 7px; background: #fefefe;'></span><span style='display:block; width: 80%; float: left; height: 7px; background: #fefefe;'></span></div>"
  836. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #222;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  837. + "</a>"
  838. + "<p class='text-center no-margin'>Black</p>");
  839. skins_list.append(skin_black);
  840. var skin_purple =
  841. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  842. .append("<a href='javascript:void(0);' data-skin='skin-purple' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  843. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-purple-active'></span><span class='bg-purple' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  844. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #222d32;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  845. + "</a>"
  846. + "<p class='text-center no-margin'>Purple</p>");
  847. skins_list.append(skin_purple);
  848. var skin_green =
  849. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  850. .append("<a href='javascript:void(0);' data-skin='skin-green' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  851. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-green-active'></span><span class='bg-green' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  852. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #222d32;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  853. + "</a>"
  854. + "<p class='text-center no-margin'>Green</p>");
  855. skins_list.append(skin_green);
  856. var skin_red =
  857. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  858. .append("<a href='javascript:void(0);' data-skin='skin-red' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  859. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-red-active'></span><span class='bg-red' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  860. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #222d32;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  861. + "</a>"
  862. + "<p class='text-center no-margin'>Red</p>");
  863. skins_list.append(skin_red);
  864. var skin_yellow =
  865. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  866. .append("<a href='javascript:void(0);' data-skin='skin-yellow' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  867. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-yellow-active'></span><span class='bg-yellow' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  868. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #222d32;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  869. + "</a>"
  870. + "<p class='text-center no-margin'>Yellow</p>");
  871. skins_list.append(skin_yellow);
  872. //Light sidebar skins
  873. var skin_blue_light =
  874. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  875. .append("<a href='javascript:void(0);' data-skin='skin-blue-light' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  876. + "<div><span style='display:block; width: 20%; float: left; height: 7px; background: #367fa9;'></span><span class='bg-light-blue' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  877. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #f9fafc;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  878. + "</a>"
  879. + "<p class='text-center no-margin' style='font-size: 12px'>Blue Light</p>");
  880. skins_list.append(skin_blue_light);
  881. var skin_black_light =
  882. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  883. .append("<a href='javascript:void(0);' data-skin='skin-black-light' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  884. + "<div style='box-shadow: 0 0 2px rgba(0,0,0,0.1)' class='clearfix'><span style='display:block; width: 20%; float: left; height: 7px; background: #fefefe;'></span><span style='display:block; width: 80%; float: left; height: 7px; background: #fefefe;'></span></div>"
  885. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #f9fafc;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  886. + "</a>"
  887. + "<p class='text-center no-margin' style='font-size: 12px'>Black Light</p>");
  888. skins_list.append(skin_black_light);
  889. var skin_purple_light =
  890. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  891. .append("<a href='javascript:void(0);' data-skin='skin-purple-light' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  892. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-purple-active'></span><span class='bg-purple' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  893. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #f9fafc;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  894. + "</a>"
  895. + "<p class='text-center no-margin' style='font-size: 12px'>Purple Light</p>");
  896. skins_list.append(skin_purple_light);
  897. var skin_green_light =
  898. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  899. .append("<a href='javascript:void(0);' data-skin='skin-green-light' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  900. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-green-active'></span><span class='bg-green' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  901. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #f9fafc;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  902. + "</a>"
  903. + "<p class='text-center no-margin' style='font-size: 12px'>Green Light</p>");
  904. skins_list.append(skin_green_light);
  905. var skin_red_light =
  906. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  907. .append("<a href='javascript:void(0);' data-skin='skin-red-light' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  908. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-red-active'></span><span class='bg-red' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  909. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #f9fafc;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  910. + "</a>"
  911. + "<p class='text-center no-margin' style='font-size: 12px'>Red Light</p>");
  912. skins_list.append(skin_red_light);
  913. var skin_yellow_light =
  914. $("<li />", {style: "float:left; width: 33.33333%; padding: 5px;"})
  915. .append("<a href='javascript:void(0);' data-skin='skin-yellow-light' style='display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)' class='clearfix full-opacity-hover'>"
  916. + "<div><span style='display:block; width: 20%; float: left; height: 7px;' class='bg-yellow-active'></span><span class='bg-yellow' style='display:block; width: 80%; float: left; height: 7px;'></span></div>"
  917. + "<div><span style='display:block; width: 20%; float: left; height: 20px; background: #f9fafc;'></span><span style='display:block; width: 80%; float: left; height: 20px; background: #f4f5f7;'></span></div>"
  918. + "</a>"
  919. + "<p class='text-center no-margin' style='font-size: 12px;'>Yellow Light</p>");
  920. skins_list.append(skin_yellow_light);
  921. demo_settings.append("<h4 class='control-sidebar-heading'>皮肤</h4>");
  922. demo_settings.append(skins_list);
  923. tab_pane.append(demo_settings);
  924. $("#control-sidebar-home-tab").after(tab_pane);
  925. setup();
  926. /**
  927. * Toggles layout classes
  928. *
  929. * @param String cls the layout class to toggle
  930. * @returns void
  931. */
  932. function change_layout(cls) {
  933. $("body").toggleClass(cls);
  934. AdminLTE.layout.fixSidebar();
  935. //Fix the problem with right sidebar and layout boxed
  936. if (cls == "layout-boxed")
  937. AdminLTE.controlSidebar._fix($(".control-sidebar-bg"));
  938. if ($('body').hasClass('fixed') && cls == 'fixed') {
  939. AdminLTE.pushMenu.expandOnHover();
  940. AdminLTE.layout.activate();
  941. }
  942. AdminLTE.controlSidebar._fix($(".control-sidebar-bg"));
  943. AdminLTE.controlSidebar._fix($(".control-sidebar"));
  944. }
  945. /**
  946. * Replaces the old skin with the new skin
  947. * @param String cls the new skin class
  948. * @returns Boolean false to prevent link's default action
  949. */
  950. function change_skin(cls) {
  951. $.each(my_skins, function (i) {
  952. $("body").removeClass(my_skins[i]);
  953. });
  954. $("body").addClass(cls);
  955. store('skin', cls);
  956. return false;
  957. }
  958. /**
  959. * Store a new settings in the browser
  960. *
  961. * @param String name Name of the setting
  962. * @param String val Value of the setting
  963. * @returns void
  964. */
  965. function store(name, val) {
  966. if (typeof (Storage) !== "undefined") {
  967. localStorage.setItem(name, val);
  968. } else {
  969. window.alert('Please use a modern browser to properly view this template!');
  970. }
  971. }
  972. /**
  973. * Get a prestored setting
  974. *
  975. * @param String name Name of of the setting
  976. * @returns String The value of the setting | null
  977. */
  978. function get(name) {
  979. if (typeof (Storage) !== "undefined") {
  980. return localStorage.getItem(name);
  981. } else {
  982. window.alert('Please use a modern browser to properly view this template!');
  983. }
  984. }
  985. /**
  986. * Retrieve default settings and apply them to the template
  987. *
  988. * @returns void
  989. */
  990. function setup() {
  991. var tmp = get('skin');
  992. if (tmp && $.inArray(tmp, my_skins))
  993. change_skin(tmp);
  994. //Add the change skin listener
  995. $("[data-skin]").on('click', function (e) {
  996. if($(this).hasClass('knob'))
  997. return;
  998. e.preventDefault();
  999. change_skin($(this).data('skin'));
  1000. });
  1001. //Add the layout manager
  1002. $("[data-layout]").on('click', function () {
  1003. change_layout($(this).data('layout'));
  1004. });
  1005. $("[data-controlsidebar]").on('click', function () {
  1006. change_layout($(this).data('controlsidebar'));
  1007. var slide = !AdminLTE.options.controlSidebarOptions.slide;
  1008. AdminLTE.options.controlSidebarOptions.slide = slide;
  1009. if (!slide)
  1010. $('.control-sidebar').removeClass('control-sidebar-open');
  1011. });
  1012. $("[data-sidebarskin='toggle']").on('click', function () {
  1013. var sidebar = $(".control-sidebar");
  1014. if (sidebar.hasClass("control-sidebar-dark")) {
  1015. sidebar.removeClass("control-sidebar-dark")
  1016. sidebar.addClass("control-sidebar-light")
  1017. } else {
  1018. sidebar.removeClass("control-sidebar-light")
  1019. sidebar.addClass("control-sidebar-dark")
  1020. }
  1021. });
  1022. $("[data-enable='expandOnHover']").on('click', function () {
  1023. $(this).attr('disabled', true);
  1024. AdminLTE.pushMenu.expandOnHover();
  1025. if (!$('body').hasClass('sidebar-collapse'))
  1026. $("[data-layout='sidebar-collapse']").click();
  1027. });
  1028. // Reset options
  1029. if ($('body').hasClass('fixed')) {
  1030. $("[data-layout='fixed']").attr('checked', 'checked');
  1031. }
  1032. if ($('body').hasClass('layout-boxed')) {
  1033. $("[data-layout='layout-boxed']").attr('checked', 'checked');
  1034. }
  1035. if ($('body').hasClass('sidebar-collapse')) {
  1036. $("[data-layout='sidebar-collapse']").attr('checked', 'checked');
  1037. }
  1038. }
  1039. })(jQuery, $.AdminLTE);
  1040. var App = function() {
  1041. var basePath = './content/';
  1042. var imgPath = 'ui/img/';
  1043. var pluginsPath = 'plugins/';
  1044. var cssPath = 'ui/css/';
  1045. //初始化内容页layout组件高度
  1046. var handleIframeLayoutHeight = function () {
  1047. var height = App.getViewPort().height - $('.main-footer').outerHeight() - $('.main-header').outerHeight() - $(".content-tabs").outerHeight();
  1048. // $("#layout").css({ "height": height });
  1049. return height;
  1050. }
  1051. //初始化iframe内容页高度
  1052. var handleIframeLayoutContent = function () {
  1053. var height = App.getViewPort().height - $('.main-footer').outerHeight() - $('.main-header').outerHeight() - $(".content-tabs").outerHeight();
  1054. $(".tab_iframe").css({
  1055. height: height
  1056. });
  1057. //var width = App.getViewPort().width- $(".page-sidebar-menu").width();
  1058. $(".tab_iframe").css({
  1059. width: "100%"
  1060. });
  1061. }
  1062. //处理全屏
  1063. var handleFullScreen = function () {
  1064. var de = document.documentElement;
  1065. if (de.requestFullscreen) {
  1066. de.requestFullscreen();
  1067. } else if (de.mozRequestFullScreen) {
  1068. de.mozRequestFullScreen();
  1069. } else if (de.webkitRequestFullScreen) {
  1070. de.webkitRequestFullScreen();
  1071. } else if (de.msRequestFullscreen) {
  1072. de.msRequestFullscreen();
  1073. }
  1074. else {
  1075. // App.alert({ message: "该浏览器不支持全屏!", type: "danger" });
  1076. alert("当前浏览器不支持全屏!");
  1077. }
  1078. };
  1079. // 判断浏览器种类
  1080. var exitFullscreen=function() {
  1081. if(document.exitFullscreen) {
  1082. document.exitFullscreen();
  1083. } else if(document.mozCancelFullScreen) {
  1084. document.mozCancelFullScreen();
  1085. } else if(document.webkitExitFullscreen) {
  1086. document.webkitExitFullscreen();
  1087. }
  1088. }
  1089. // Handles custom checkboxes & radios using jQuery iCheck plugin
  1090. var handleiCheck = function () {
  1091. if (!$().iCheck) {
  1092. return;
  1093. }
  1094. $('.icheck').each(function () {
  1095. var checkboxClass = $(this).attr('data-checkbox') ? $(this).attr('data-checkbox') : 'icheckbox_minimal-grey';
  1096. var radioClass = $(this).attr('data-radio') ? $(this).attr('data-radio') : 'iradio_minimal-grey';
  1097. if (checkboxClass.indexOf('_line') > -1 || radioClass.indexOf('_line') > -1) {
  1098. $(this).iCheck({
  1099. checkboxClass: checkboxClass,
  1100. radioClass: radioClass,
  1101. insert: '<div class="icheck_line-icon"></div>' + $(this).attr("data-label")
  1102. });
  1103. } else {
  1104. $(this).iCheck({
  1105. checkboxClass: checkboxClass,
  1106. radioClass: radioClass
  1107. });
  1108. }
  1109. });
  1110. };
  1111. // Handles Bootstrap switches
  1112. var handleBootstrapSwitch = function () {
  1113. if (!$().bootstrapSwitch) {
  1114. return;
  1115. }
  1116. $('.make-switch').bootstrapSwitch();
  1117. };
  1118. // Handles Bootstrap confirmations
  1119. var handleBootstrapConfirmation = function () {
  1120. if (!$().confirmation) {
  1121. return;
  1122. }
  1123. $('[data-toggle=confirmation]').confirmation({ container: 'body', btnOkClass: 'btn btn-sm btn-success', btnCancelClass: 'btn btn-sm btn-danger' });
  1124. }
  1125. // Handles Bootstrap Accordions.
  1126. var handleAccordions = function () {
  1127. $('body').on('shown.bs.collapse', '.accordion.scrollable', function (e) {
  1128. App.scrollTo($(e.target));
  1129. });
  1130. };
  1131. // Handles Bootstrap Tabs.
  1132. var handleTabs = function () {
  1133. //activate tab if tab id provided in the URL
  1134. if (location.hash) {
  1135. var tabid = encodeURI(location.hash.substr(1));
  1136. $('a[href="#' + tabid + '"]').parents('.tab-pane:hidden').each(function () {
  1137. var tabid = $(this).attr("id");
  1138. $('a[href="#' + tabid + '"]').click();
  1139. });
  1140. $('a[href="#' + tabid + '"]').click();
  1141. }
  1142. if ($().tabdrop) {
  1143. $('.tabbable-tabdrop .nav-pills, .tabbable-tabdrop .nav-tabs').tabdrop({
  1144. text: '<i class="fa fa-ellipsis-v"></i>&nbsp;<i class="fa fa-angle-down"></i>'
  1145. });
  1146. }
  1147. };
  1148. // Handles Bootstrap Modals.
  1149. var handleModals = function () {
  1150. // fix stackable modal issue: when 2 or more modals opened, closing one of modal will remove .modal-open class.
  1151. $('body').on('hide.bs.modal', function () {
  1152. if ($('.modal:visible').size() > 1 && $('html').hasClass('modal-open') === false) {
  1153. $('html').addClass('modal-open');
  1154. } else if ($('.modal:visible').size() <= 1) {
  1155. $('html').removeClass('modal-open');
  1156. }
  1157. });
  1158. // fix page scrollbars issue
  1159. $('body').on('show.bs.modal', '.modal', function () {
  1160. if ($(this).hasClass("modal-scroll")) {
  1161. $('body').addClass("modal-open-noscroll");
  1162. }
  1163. });
  1164. // fix page scrollbars issue
  1165. $('body').on('hide.bs.modal', '.modal', function () {
  1166. $('body').removeClass("modal-open-noscroll");
  1167. });
  1168. // remove ajax content and remove cache on modal closed
  1169. $('body').on('hidden.bs.modal', '.modal:not(.modal-cached)', function () {
  1170. $(this).removeData('bs.modal');
  1171. });
  1172. };
  1173. // Handles Bootstrap Tooltips.
  1174. var handleTooltips = function () {
  1175. // global tooltips
  1176. $('.tooltips').tooltip();
  1177. // portlet tooltips
  1178. $('.portlet > .portlet-title .fullscreen').tooltip({
  1179. container: 'body',
  1180. title: 'Fullscreen'
  1181. });
  1182. $('.portlet > .portlet-title > .tools > .reload').tooltip({
  1183. container: 'body',
  1184. title: 'Reload'
  1185. });
  1186. $('.portlet > .portlet-title > .tools > .remove').tooltip({
  1187. container: 'body',
  1188. title: 'Remove'
  1189. });
  1190. $('.portlet > .portlet-title > .tools > .config').tooltip({
  1191. container: 'body',
  1192. title: 'Settings'
  1193. });
  1194. $('.portlet > .portlet-title > .tools > .collapse, .portlet > .portlet-title > .tools > .expand').tooltip({
  1195. container: 'body',
  1196. title: 'Collapse/Expand'
  1197. });
  1198. };
  1199. // Handles Bootstrap Dropdowns
  1200. var handleDropdowns = function () {
  1201. /*
  1202. Hold dropdown on click
  1203. */
  1204. $('body').on('click', '.dropdown-menu.hold-on-click', function (e) {
  1205. e.stopPropagation();
  1206. });
  1207. };
  1208. var handleAlerts = function () {
  1209. $('body').on('click', '[data-close="alert"]', function (e) {
  1210. $(this).parent('.alert').hide();
  1211. $(this).closest('.note').hide();
  1212. e.preventDefault();
  1213. });
  1214. $('body').on('click', '[data-close="note"]', function (e) {
  1215. $(this).closest('.note').hide();
  1216. e.preventDefault();
  1217. });
  1218. $('body').on('click', '[data-remove="note"]', function (e) {
  1219. $(this).closest('.note').remove();
  1220. e.preventDefault();
  1221. });
  1222. };
  1223. // Handle Hower Dropdowns
  1224. var handleDropdownHover = function () {
  1225. $('[data-hover="dropdown"]').not('.hover-initialized').each(function () {
  1226. $(this).dropdownHover();
  1227. $(this).addClass('hover-initialized');
  1228. });
  1229. };
  1230. // Fix input placeholder issue for IE8 and IE9
  1231. var handleFixInputPlaceholderForIE = function () {
  1232. var isIe8 = !!navigator.userAgent.match(/MSIE 8.0/);
  1233. var isIe9 = !!navigator.userAgent.match(/MSIE 9.0/);
  1234. var isIe10 = !!navigator.userAgent.match(/MSIE 10.0/);
  1235. //fix html5 placeholder attribute for ie7 & ie8
  1236. if (isIe8 || isIe9) { // ie8 & ie9
  1237. // this is html5 placeholder fix for inputs, inputs with placeholder-no-fix class will be skipped(e.g: we need this for password fields)
  1238. $('input[placeholder]:not(.placeholder-no-fix), textarea[placeholder]:not(.placeholder-no-fix)').each(function () {
  1239. var input = $(this);
  1240. if (input.val() === '' && input.attr("placeholder") !== '') {
  1241. input.addClass("placeholder").val(input.attr('placeholder'));
  1242. }
  1243. input.focus(function () {
  1244. if (input.val() == input.attr('placeholder')) {
  1245. input.val('');
  1246. }
  1247. });
  1248. input.blur(function () {
  1249. if (input.val() === '' || input.val() == input.attr('placeholder')) {
  1250. input.val(input.attr('placeholder'));
  1251. }
  1252. });
  1253. });
  1254. }
  1255. };
  1256. // last popep popover
  1257. var lastPopedPopover;
  1258. var handlePopovers = function () {
  1259. $('.popovers').popover();
  1260. // close last displayed popover
  1261. $(document).on('click.bs.popover.data-api', function (e) {
  1262. if (lastPopedPopover) {
  1263. lastPopedPopover.popover('hide');
  1264. }
  1265. });
  1266. };
  1267. // Handles scrollable contents using jQuery SlimScroll plugin.
  1268. var handleScrollers = function () {
  1269. App.initSlimScroll('.scroller');
  1270. };
  1271. var handleInitFullScreen = function() {
  1272. fullScreenClickCount = 0;
  1273. $(".fullscreen").bind("click", function() {
  1274. if (fullScreenClickCount % 2 === 0) {
  1275. handleFullScreen();
  1276. } else {
  1277. exitFullscreen();
  1278. }
  1279. fullScreenClickCount++;
  1280. });
  1281. };
  1282. return {
  1283. init: function () {
  1284. //IMPORTANT!!!: Do not modify the core handlers call order.
  1285. //UI Component handlers
  1286. handleiCheck(); // handles custom icheck radio and checkboxes
  1287. handleBootstrapSwitch(); // handle bootstrap switch plugin
  1288. handleScrollers(); // handles slim scrolling contents
  1289. handleAlerts(); //handle closabled alerts
  1290. handleDropdowns(); // handle dropdowns
  1291. handleTabs(); // handle tabs
  1292. handleTooltips(); // handle bootstrap tooltips
  1293. handlePopovers(); // handles bootstrap popovers
  1294. handleAccordions(); //handles accordions
  1295. handleModals(); // handle modals
  1296. handleBootstrapConfirmation(); // handle bootstrap confirmations
  1297. handleFixInputPlaceholderForIE(); //IE8 & IE9 input placeholder issue fix
  1298. handleInitFullScreen();
  1299. },
  1300. initSlimScroll: function (el) {
  1301. $(el).each(function () {
  1302. if ($(this).attr("data-initialized")) {
  1303. return; // exit
  1304. }
  1305. var height;
  1306. if ($(this).attr("data-height")) {
  1307. height = $(this).attr("data-height");
  1308. } else {
  1309. height = $(this).css('height');
  1310. }
  1311. $(this).slimScroll({
  1312. allowPageScroll: true, // allow page scroll when the element scroll is ended
  1313. size: '7px',
  1314. color: ($(this).attr("data-handle-color") ? $(this).attr("data-handle-color") : '#bbb'),
  1315. wrapperClass: ($(this).attr("data-wrapper-class") ? $(this).attr("data-wrapper-class") : 'slimScrollDiv'),
  1316. railColor: ($(this).attr("data-rail-color") ? $(this).attr("data-rail-color") : '#eaeaea'),
  1317. position: isRTL ? 'left' : 'right',
  1318. height: height,
  1319. alwaysVisible: ($(this).attr("data-always-visible") == "1" ? true : false),
  1320. railVisible: ($(this).attr("data-rail-visible") == "1" ? true : false),
  1321. disableFadeOut: true
  1322. });
  1323. $(this).attr("data-initialized", "1");
  1324. });
  1325. },
  1326. destroySlimScroll: function (el) {
  1327. $(el).each(function () {
  1328. if ($(this).attr("data-initialized") === "1") { // destroy existing instance before updating the height
  1329. $(this).removeAttr("data-initialized");
  1330. $(this).removeAttr("style");
  1331. var attrList = {};
  1332. // store the custom attribures so later we will reassign.
  1333. if ($(this).attr("data-handle-color")) {
  1334. attrList["data-handle-color"] = $(this).attr("data-handle-color");
  1335. }
  1336. if ($(this).attr("data-wrapper-class")) {
  1337. attrList["data-wrapper-class"] = $(this).attr("data-wrapper-class");
  1338. }
  1339. if ($(this).attr("data-rail-color")) {
  1340. attrList["data-rail-color"] = $(this).attr("data-rail-color");
  1341. }
  1342. if ($(this).attr("data-always-visible")) {
  1343. attrList["data-always-visible"] = $(this).attr("data-always-visible");
  1344. }
  1345. if ($(this).attr("data-rail-visible")) {
  1346. attrList["data-rail-visible"] = $(this).attr("data-rail-visible");
  1347. }
  1348. $(this).slimScroll({
  1349. wrapperClass: ($(this).attr("data-wrapper-class") ? $(this).attr("data-wrapper-class") : 'slimScrollDiv'),
  1350. destroy: true
  1351. });
  1352. var the = $(this);
  1353. // reassign custom attributes
  1354. $.each(attrList, function (key, value) {
  1355. the.attr(key, value);
  1356. });
  1357. }
  1358. });
  1359. },
  1360. getIframeLayoutHeight: function () {
  1361. return handleIframeLayoutHeight();
  1362. },
  1363. requestFullScreen:function() {
  1364. return handleFullScreen();
  1365. },
  1366. //处理iframe内容
  1367. handleIframeContent:function() {
  1368. return handleIframeLayoutContent();
  1369. },
  1370. //处理sidebar ajax方式加载
  1371. handleSidebarAjaxContent:function() {
  1372. jQuery('.sidebar-menu').on('click', ' li > a.ajaxify', function (e) {
  1373. e.preventDefault();
  1374. var url = $(this).attr("href");
  1375. var pageContentBody = $('#tab-page-content');
  1376. App.startPageLoading({ message: '加载中...' });
  1377. $.get(url, {}, function (res) {
  1378. pageContentBody.html(res);
  1379. // App.fixContentHeight(); // fix content height
  1380. App.stopPageLoading();
  1381. });
  1382. });
  1383. },
  1384. fixIframeCotent: function () {
  1385. setInterval(function () {
  1386. //_runResizeHandlers();
  1387. handleIframeLayoutContent();
  1388. }, 200);
  1389. return;
  1390. },
  1391. blockUI: function (options) {
  1392. options = $.extend(true, {}, options);
  1393. var html = '';
  1394. if (options.animate) {
  1395. html = '<div class="loading-message ' + (options.boxed ? 'loading-message-boxed' : '') + '">' + '<div class="block-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>' + '</div>';
  1396. } else if (options.iconOnly) {
  1397. html = '<div class="loading-message ' + (options.boxed ? 'loading-message-boxed' : '') + '"><img src="' + this.getGlobalImgPath() + 'loading-spinner-blue.gif" align=""></div>';
  1398. } else if (options.textOnly) {
  1399. html = '<div class="loading-message ' + (options.boxed ? 'loading-message-boxed' : '') + '"><span>&nbsp;&nbsp;' + (options.message ? options.message : 'LOADING...') + '</span></div>';
  1400. } else {
  1401. html = '<div class="loading-message ' + (options.boxed ? 'loading-message-boxed' : '') + '"><img src="' + this.getGlobalImgPath() + 'loading-spinner-blue.gif" align=""><span>&nbsp;&nbsp;' + (options.message ? options.message : 'LOADING...') + '</span></div>';
  1402. }
  1403. if (options.target) { // element blocking
  1404. var el = $(options.target);
  1405. if (el.height() <= ($(window).height())) {
  1406. options.cenrerY = true;
  1407. }
  1408. el.block({
  1409. message: html,
  1410. baseZ: options.zIndex ? options.zIndex : 1000,
  1411. centerY: options.cenrerY !== undefined ? options.cenrerY : false,
  1412. css: {
  1413. top: '10%',
  1414. border: '0',
  1415. padding: '0',
  1416. backgroundColor: 'none'
  1417. },
  1418. overlayCSS: {
  1419. backgroundColor: options.overlayColor ? options.overlayColor : '#555',
  1420. opacity: options.boxed ? 0.05 : 0.1,
  1421. cursor: 'wait'
  1422. }
  1423. });
  1424. } else { // page blocking
  1425. $.blockUI({
  1426. message: html,
  1427. baseZ: options.zIndex ? options.zIndex : 1000,
  1428. css: {
  1429. border: '0',
  1430. padding: '0',
  1431. backgroundColor: 'none'
  1432. },
  1433. overlayCSS: {
  1434. backgroundColor: options.overlayColor ? options.overlayColor : '#555',
  1435. opacity: options.boxed ? 0.05 : 0.1,
  1436. cursor: 'wait'
  1437. }
  1438. });
  1439. }
  1440. },
  1441. // wrApper function to un-block element(finish loading)
  1442. unblockUI: function (target) {
  1443. if (target) {
  1444. $(target).unblock({
  1445. onUnblock: function () {
  1446. $(target).css('position', '');
  1447. $(target).css('zoom', '');
  1448. }
  1449. });
  1450. } else {
  1451. $.unblockUI();
  1452. }
  1453. },
  1454. startPageLoading: function (options) {
  1455. if (options && options.animate) {
  1456. $('.page-spinner-bar').remove();
  1457. $('body').append('<div class="page-spinner-bar"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>');
  1458. } else {
  1459. $('.page-loading').remove();
  1460. $('body').append('<div class="page-loading"><img src="' + this.getGlobalImgPath() + 'loading-spinner-blue.gif"/>&nbsp;&nbsp;<span>' + (options && options.message ? options.message : 'Loading...') + '</span></div>');
  1461. }
  1462. },
  1463. stopPageLoading: function () {
  1464. $('.page-loading, .page-spinner-bar').remove();
  1465. },
  1466. getViewPort: function () {
  1467. var e = window,
  1468. a = 'inner';
  1469. if (!('innerWidth' in window)) {
  1470. a = 'client';
  1471. e = document.documentElement || document.body;
  1472. }
  1473. return {
  1474. width: e[a + 'Width'],
  1475. height: e[a + 'Height']
  1476. };
  1477. },
  1478. getbasePath: function () {
  1479. return basePath;
  1480. },
  1481. setbasePath: function (path) {
  1482. basePath = path;
  1483. },
  1484. setGlobalImgPath: function (path) {
  1485. imgPath = path;
  1486. },
  1487. getGlobalImgPath: function () {
  1488. return basePath + imgPath;
  1489. },
  1490. setGlobalPluginsPath: function (path) {
  1491. pluginsPath = path;
  1492. },
  1493. getGlobalPluginsPath: function () {
  1494. return basePath + pluginsPath;
  1495. },
  1496. getGlobalCssPath: function () {
  1497. return basePath + cssPath;
  1498. }
  1499. };
  1500. }();
  1501. jQuery(document).ready(function () {
  1502. App.init(); // init metronic core componets
  1503. });
  1504. /*修复IE11 bug*/
  1505. (function () {
  1506. function CustomEvent(event, params) {
  1507. params = params || { bubbles: false, cancelable: false, detail: undefined };
  1508. var evt = document.createEvent('CustomEvent');
  1509. evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
  1510. return evt;
  1511. };
  1512. CustomEvent.prototype = window.Event.prototype;
  1513. window.CustomEvent = CustomEvent;
  1514. })();
  1515. //插件扩展
  1516. $(function () {
  1517. layer.config({
  1518. extend: '../../../ui/global/layer/skin/moon/style.css', //加载新皮肤
  1519. skin: 'layer-ext-moon' //一旦设定,所有弹层风格都采用此主题。
  1520. });
  1521. $.loading = function (bool, text) {
  1522. if (bool) {
  1523. App.blockUI({
  1524. target: 'body',
  1525. boxed: true,
  1526. message: '加载中' | text //,
  1527. // animate: true
  1528. });
  1529. } else {
  1530. App.unblockUI();
  1531. }
  1532. }
  1533. //兼容各种插件中loading
  1534. loading = function (bool, text) {
  1535. if (bool) {
  1536. App.blockUI({
  1537. target: 'body',
  1538. boxed: true,
  1539. message: '加载中' | text//,
  1540. // animate: true
  1541. });
  1542. } else {
  1543. App.unblockUI();
  1544. }
  1545. }
  1546. });
  1547. (function ($) {
  1548. $.fn.sidebarMenu = function (options) {
  1549. options = $.extend({}, $.fn.sidebarMenu.defaults, options || {});
  1550. var target = $(this);
  1551. var level = 0;
  1552. // target.addClass('nav');
  1553. // target.addClass('nav-list');
  1554. if (options.data) {
  1555. init(target, options.data, level);
  1556. }
  1557. else {
  1558. if (!options.url) return;
  1559. $.getJSON(options.url, options.param, function (data) {
  1560. init(target, data,level);
  1561. });
  1562. }
  1563. function init(target, data,level) {
  1564. $.each(data, function (i, item) {
  1565. //如果标签是isHeader
  1566. var header = $('<li class="header"></li>');
  1567. if (item.isHeader != null && item.isHeader === true) {
  1568. header.append(item.text);
  1569. target.append(header);
  1570. return;
  1571. }
  1572. //如果不是header
  1573. var li = $('<li class="treeview " data-level="' + level + '"></li>');
  1574. var a;
  1575. if (level > 0) {
  1576. a = $('<a style="padding-left:' + (level * 20) + 'px"></a>');
  1577. } else {
  1578. a = $('<a></a>');
  1579. }
  1580. var icon = $('<i></i>');
  1581. icon.addClass(item.icon);
  1582. var isOpen = item.isOpen;
  1583. var text = $(' <span class="title"></span>');
  1584. text.addClass('menu-text').text(item.text);
  1585. a.append(icon);
  1586. a.append(text);
  1587. a.addClass("nav-link");
  1588. if (isOpen === true) {
  1589. li.addClass("active");
  1590. }
  1591. if (item.children && item.children.length > 0) {
  1592. ;
  1593. var pullSpan = $('<span class="pull-right-container"></span>');
  1594. var pullIcon = $('<i class="fa fa-angle-left pull-right"></i>');
  1595. pullSpan.append(pullIcon);
  1596. a.append(pullSpan);
  1597. li.append(a);
  1598. var menus = $('<ul></ul>');
  1599. menus.addClass('treeview-menu');
  1600. if (isOpen===true) {
  1601. menus.css("display", "block");
  1602. menus.addClass("menu-open");
  1603. } else {
  1604. menus.css("display", "none");
  1605. }
  1606. init(menus, item.children,level+1);
  1607. li.append(menus);
  1608. }
  1609. else {
  1610. if (item.targetType != null && item.targetType === "blank") //代表打开新页面
  1611. {
  1612. a.attr("href", item.url);
  1613. a.attr("target", "_blank");
  1614. }
  1615. else if (item.targetType != null && item.targetType === "ajax") { //代表ajax方式打开页面
  1616. a.attr("href", item.url);
  1617. a.addClass("ajaxify");
  1618. }
  1619. else if (item.targetType != null && item.targetType === "iframe-tab") {
  1620. var href = 'addTabs({id:\'' + item.id + '\',title: \'' + item.text + '\',close: true,url: \'' + item.url + '\'});';
  1621. a.attr('onclick', href);
  1622. }
  1623. else if (item.targetType != null && item.targetType === "iframe") { //代表单iframe页面
  1624. a.attr("href", item.url);
  1625. a.addClass("iframeOpen");
  1626. $("#iframe-main").addClass("tab_iframe");
  1627. } else {
  1628. a.attr("href", item.url);
  1629. a.addClass("iframeOpen");
  1630. $("#iframe-main").addClass("tab_iframe");
  1631. }
  1632. a.addClass("nav-link");
  1633. var badge = $("<span></span>");
  1634. // <span class="badge badge-success">1</span>
  1635. if (item.tip != null && item.tip > 0) {
  1636. badge.addClass("label").addClass("label-success").text(item.tip);
  1637. }
  1638. a.append(badge);
  1639. li.append(a);
  1640. }
  1641. target.append(li);
  1642. });
  1643. }
  1644. }
  1645. $.fn.sidebarMenu.defaults = {
  1646. url: null,
  1647. param: null,
  1648. data: null
  1649. };
  1650. })(jQuery);
  1651. //sidebar - menu组件封装
  1652. //在页面上面直接调用sidebar - menu的方法
  1653. var tab_opt_data={};//tab 的参数 add by yuyi
  1654. var addTabs = function(options) {
  1655. var url = window.location.protocol + '//' + window.location.host + "/";
  1656. // options.url = url + options.url; //20170701 ywb注掉
  1657. id = "tab_" + options.id;
  1658. var title = "", content = "";
  1659. //增加tab之间传数据 20170811 ywb修改
  1660. if(options.data){
  1661. tab_opt_data[id]=options.data;
  1662. }
  1663. //如果TAB不存在,创建一个新的TAB
  1664. if (!$("#" + id)[0]) {
  1665. var mainHeight = App.getViewPort().height - $('.page-footer').outerHeight() - $('.page-header').outerHeight() - $(".content-tabs").height();
  1666. //固定TAB中IFRAME高度
  1667. // mainHeight = $(document.body).height() - 90;
  1668. //创建新TAB的title
  1669. title = '<a href="javascript:void(0);" id="tab_' + id + '" data-id="' + id + '" class="menu_tab" >' + options.title;
  1670. title += ' <i class="fa fa-refresh page_tab_refresh" style="cursor: pointer;" data-id="' + id + '" onclick="refreshTab(this)"></i>';
  1671. //是否允许关闭
  1672. if (options.close) {
  1673. title += ' <i class="fa fa-remove page_tab_close" style="cursor: pointer;" data-id="' + id + '" onclick="closeTab(this)"></i>';
  1674. }
  1675. title += '</a>';
  1676. var loadIframe = "";
  1677. //是否指定TAB内容
  1678. content = '<div role="tabpanel" class="tab-pane" id="' + id + '">';
  1679. if ('ajax'==options.dataType) {
  1680. $.ajax({
  1681. type:'post',
  1682. url: options.url,
  1683. success: function(data) {
  1684. $("#tab-content").append(content);
  1685. $("#tab-content").append(data);
  1686. $("#tab-content").append("</div>");
  1687. }
  1688. });
  1689. //content = '<div role="tabpanel" class="tab-pane" id="' + id + '">' + options.content + '</div>';
  1690. } else { //没有内容,使用IFRAME打开链接
  1691. /* App.blockUI({
  1692. target: '#tab-content',
  1693. boxed: true,
  1694. message: '加载中......'//,
  1695. // animate: true
  1696. });*/
  1697. loadIframe = '<iframe onload="javascript:App.unblockUI(\'#tab-content\');" src="' + options.url + '" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="yes" allowtransparency="yes" id="iframe_' + id + '" class=" tab_iframe"></iframe>';
  1698. content += loadIframe;
  1699. content += '</div>';
  1700. $("#tab-content").append(content);
  1701. }
  1702. ////添加访问记录
  1703. //$.ajax({
  1704. // url: "/Home/VisitModule",
  1705. // data: { moduleId: options.id, moduleName: options.title, moduleUrl: options.url },
  1706. // type: "post",
  1707. // dataType: "text"
  1708. //});
  1709. Cookies.set('currentmoduleName', options.title, { path: '/' });
  1710. Cookies.set('currentmoduleId', options.id, { path: '/' });
  1711. //加入TABS
  1712. $(".page-tabs-content").append(title);
  1713. }
  1714. $(".page-tabs-content > a.active").removeClass("active");
  1715. $("#tab-content > .active").removeClass("active");
  1716. //var height = $(".tab_iframe").height() + 1;
  1717. //$(".tab_iframe").css({
  1718. // height: height
  1719. //});
  1720. //激活TAB
  1721. $("#tab_" + id).addClass('active');
  1722. // if (isNewOpen===false) {
  1723. scrollToTab($('.menu_tab.active'));
  1724. // }
  1725. $("#" + id).addClass("active");
  1726. //为一键搜再次检索使用 20170811 ywb
  1727. /*if(options.title=='一键搜'){
  1728. refreshTab();
  1729. }
  1730. */
  1731. };
  1732. //add by yuyi
  1733. /**获取tab的传递的数据data **/
  1734. var getTabData =function(opts){
  1735. var currentId = $('.page-tabs-content').find('.active').attr('data-id');
  1736. if (currentId) {
  1737. return tab_opt_data[currentId];
  1738. }
  1739. return null;
  1740. }
  1741. //清空TabData的值 ywb
  1742. var clearTabData=function(opts){
  1743. var currentId = $('.page-tabs-content').find('.active').attr('data-id');
  1744. if (currentId) {
  1745. tab_opt_data[currentId]='';
  1746. }
  1747. }
  1748. var closeTab = function(item) {
  1749. var id = $(item).attr("data-id");
  1750. //如果关闭的是当前激活的TAB,激活他的前一个TAB
  1751. if ($(".page-tabs-content > a.active").attr('id') === "tab_" + id) {
  1752. var prev = $("#tab_" + id).prev();
  1753. var prevIframe = $("#" + id).prev();
  1754. setTimeout(function() { //某种bug,需要延迟执行
  1755. prev.addClass('active');
  1756. prevIframe.addClass('active');
  1757. }, 300);
  1758. }
  1759. ////关闭TAB
  1760. $("#tab_" + id).remove();
  1761. $("#" + id).remove();
  1762. };
  1763. var closeCurrentTab = function() {
  1764. var currentTab = $('.page-tabs-content').find('.active').find('.fa-remove').parents('a');
  1765. if (currentTab) {
  1766. closeTab(currentTab);
  1767. }
  1768. }
  1769. var refreshTab = function() {
  1770. var currentId = $('.page-tabs-content').find('.active').attr('data-id');
  1771. var target = $('#iframe_' + currentId);
  1772. var url = target.attr('src');
  1773. target.attr('src', url);
  1774. }
  1775. var closeOtherTabs = function(isAll) {
  1776. if (isAll) {
  1777. $('.page-tabs-content').children("[data-id]").find('.fa-remove').parents('a').each(function() {
  1778. $('#' + $(this).data('id')).remove();
  1779. $(this).remove();
  1780. });
  1781. var firstChild = $(".page-tabs-content").children(); //选中那些删不掉的第一个菜单
  1782. if (firstChild) {
  1783. $('#' + firstChild.data('id')).addClass('active');
  1784. firstChild.addClass('active');
  1785. }
  1786. } else {
  1787. $('.page-tabs-content').children("[data-id]").find('.fa-remove').parents('a').not(".active").each(function() {
  1788. $('#' + $(this).data('id')).remove();
  1789. $(this).remove();
  1790. });
  1791. }
  1792. }
  1793. //计算宽度
  1794. var calSumWidth = function (element) {
  1795. var width = 0;
  1796. $(element).each(function () {
  1797. width += $(this).outerWidth(true);
  1798. });
  1799. return width;
  1800. };
  1801. //滚动条滚动到右边
  1802. var scrollTabRight = function() {
  1803. var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
  1804. var tabOuterWidth =calSumWidth($(".content-tabs").children().not(".menuTabs"));
  1805. var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
  1806. var scrollVal = 0;
  1807. if ($(".page-tabs-content").width() < visibleWidth) {
  1808. return false;
  1809. } else {
  1810. var tabElement = $(".menu_tab:first");
  1811. var offsetVal = 0;
  1812. while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) {
  1813. offsetVal += $(tabElement).outerWidth(true);
  1814. tabElement = $(tabElement).next();
  1815. }
  1816. offsetVal = 0;
  1817. while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
  1818. offsetVal += $(tabElement).outerWidth(true);
  1819. tabElement = $(tabElement).next();
  1820. }
  1821. scrollVal =calSumWidth($(tabElement).prevAll());
  1822. if (scrollVal > 0) {
  1823. $('.page-tabs-content').animate({
  1824. marginLeft: 0 - scrollVal + 'px'
  1825. }, "fast");
  1826. }
  1827. }
  1828. };
  1829. //滚动条滚动
  1830. var scrollToTab = function(element) {
  1831. var marginLeftVal =calSumWidth($(element).prevAll()), marginRightVal =calSumWidth($(element).nextAll());
  1832. var tabOuterWidth =calSumWidth($(".content-tabs").children().not(".menuTabs"));
  1833. var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
  1834. var scrollVal = 0;
  1835. if ($(".page-tabs-content").outerWidth() < visibleWidth) {
  1836. scrollVal = 0;
  1837. } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) {
  1838. if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) {
  1839. scrollVal = marginLeftVal;
  1840. var tabElement = element;
  1841. while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) {
  1842. scrollVal -= $(tabElement).prev().outerWidth();
  1843. tabElement = $(tabElement).prev();
  1844. }
  1845. }
  1846. } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
  1847. scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
  1848. }
  1849. $('.page-tabs-content').animate({
  1850. marginLeft: 0 - scrollVal + 'px'
  1851. }, "fast");
  1852. };
  1853. //滚动条滚动到左边
  1854. var scrollTabLeft= function () {
  1855. var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
  1856. var tabOuterWidth =calSumWidth($(".content-tabs").children().not(".menuTabs"));
  1857. var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
  1858. var scrollVal = 0;
  1859. if ($(".page-tabs-content").width() < visibleWidth) {
  1860. return false;
  1861. } else {
  1862. var tabElement = $(".menu_tab:first");
  1863. var offsetVal = 0;
  1864. while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) {
  1865. offsetVal += $(tabElement).outerWidth(true);
  1866. tabElement = $(tabElement).next();
  1867. }
  1868. offsetVal = 0;
  1869. if (calSumWidth($(tabElement).prevAll()) > visibleWidth) {
  1870. while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
  1871. offsetVal += $(tabElement).outerWidth(true);
  1872. tabElement = $(tabElement).prev();
  1873. }
  1874. scrollVal =calSumWidth($(tabElement).prevAll());
  1875. }
  1876. }
  1877. $('.page-tabs-content').animate({
  1878. marginLeft: 0 - scrollVal + 'px'
  1879. }, "fast");
  1880. };
  1881. //激活Tab
  1882. var activeTab = function() {
  1883. var id = $(this).attr("data-id");
  1884. $(".menu_tab").removeClass("active");
  1885. $("#tab-content > .active").removeClass("active");
  1886. //激活TAB
  1887. $("#tab_" + id).addClass('active');
  1888. $("#" + id).addClass("active");
  1889. //主要是针对激活tab后,滚动条消失问题,触发一下滚动条事件
  1890. $("#iframe_" + id).animate({
  1891. height: App.getIframeLayoutHeight()+1
  1892. }, 500);
  1893. $("#iframe_" + id).animate({
  1894. height: App.getIframeLayoutHeight() - 1
  1895. }, 500);
  1896. scrollToTab(this);
  1897. }
  1898. $(function () {
  1899. $(".menuTabs").on("click", ".menu_tab", activeTab);
  1900. });
  1901. /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
  1902. * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
  1903. * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
  1904. *
  1905. * Version: 1.3.8
  1906. *
  1907. */
  1908. (function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
  1909. var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0<d?Math.ceil(g):Math.floor(g),c.css({top:g+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());g=
  1910. l*(b[0].scrollHeight-b.outerHeight());e&&(g=d,d=g/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),f),c.css({top:d+"px"}));b.scrollTop(g);b.trigger("slimscrolling",~~g);w();p()}function x(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:u+"px"});var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function w(){x();clearTimeout(B);l==~~l?(k=a.allowPageScroll,C!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;C=l;u>=b.outerHeight()?k=!0:(c.stop(!0,
  1911. !0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
  1912. h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("<div></div>").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
  1913. width:a.width,height:a.height});var m=e("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
  1914. WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
  1915. function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
  1916. x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
  1917. /*! pace 1.0.0 */
  1918. (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X=[].slice,Y={}.hasOwnProperty,Z=function(a,b){function c(){this.constructor=a}for(var d in b)Y.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},$=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(u={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},C=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new Date},E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==E&&(E=function(a){return setTimeout(a,50)},t=function(a){return clearTimeout(a)}),G=function(a){var b,c;return b=C(),(c=function(){var d;return d=C()-b,d>=33?(b=C(),a(d,function(){return E(c)})):setTimeout(c,33-d)})()},F=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?X.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},v=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?X.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)Y.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?v(b[a],e):b[a]=e);return b},q=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},x=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];c<this.bindings[a].length;)e.push(this.bindings[a][c].handler===b?this.bindings[a].splice(c,1):c++);return e}},a.prototype.trigger=function(){var a,b,c,d,e,f,g,h,i;if(c=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],null!=(g=this.bindings)?g[c]:void 0){for(e=0,i=[];e<this.bindings[c].length;)h=this.bindings[c][e],d=h.handler,b=h.ctx,f=h.once,d.apply(null!=b?b:this,a),i.push(f?this.bindings[c].splice(e,1):e++);return i}},a}(),j=window.Pace||{},window.Pace=j,v(j,g.prototype),D=j.options=v({},u,window.paceOptions,x()),U=["ajax","document","eventLag","elements"],Q=0,S=U.length;S>Q;Q++)K=U[Q],D[K]===!0&&(D[K]=u[K]);i=function(a){function b(){return V=b.__super__.constructor.apply(this,arguments)}return Z(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(D.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b,c,d,e,f,g;if(null==document.querySelector(D.target))return!1;for(a=this.getElement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkitTransform","msTransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setAttribute("data-progress",""+c)),this.lastRenderedProgress=this.progress},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),P=window.XMLHttpRequest,O=window.XDomainRequest,N=window.WebSocket,w=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],f.push(null==a[d]&&"function"!=typeof e?a[d]=e:void 0)}catch(g){c=g}return f},A=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("ignore"),c=b.apply(null,a),A.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("track"),c=b.apply(null,a),A.shift(),c},J=function(a){var b;if(null==a&&(a="GET"),"track"===A[0])return"force";if(!A.length&&D.ajax){if("socket"===a&&D.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),$.call(D.ajax.trackMethods,b)>=0)return!0}return!1},k=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return J(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new P(b),a(c),c};try{w(window.XMLHttpRequest,P)}catch(d){}if(null!=O){window.XDomainRequest=function(){var b;return b=new O,a(b),b};try{w(window.XDomainRequest,O)}catch(d){}}if(null!=N&&D.ajax.trackWebSockets){window.WebSocket=function(a,b){var d;return d=null!=b?new N(a,b):new N(a),J("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.WebSocket,N)}catch(d){}}}return Z(b,a),b}(h),R=null,y=function(){return null==R&&(R=new k),R},I=function(a){var b,c,d,e;for(e=D.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,I(g)?void 0:j.running||D.restartOnRequestAfter===!1&&"force"!==J(f)?void 0:(d=arguments,c=D.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(K=i[c],K instanceof a){K.watch.apply(K,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,I(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100},!1);else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),n=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100},!1)}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},D.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=C(),b=setInterval(function(){var g;return g=C()-c-50,c=C(),e.push(g),e.length>D.eventLag.sampleCount&&e.shift(),a=q(e),++d>=D.eventLag.minSamples&&a<D.eventLag.lagThreshold?(f.progress=100,clearInterval(b)):f.progress=100*(3/(a+3))},50)}return a}(),m=function(){function a(a){this.source=a,this.last=this.sinceLastUpdate=0,this.rate=D.initialRate,this.catchup=0,this.progress=this.lastProgress=0,null!=this.source&&(this.progress=F(this.source,"progress"))}return a.prototype.tick=function(a,b){var c;return null==b&&(b=F(this.source,"progress")),b>=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/D.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,D.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+D.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),L=null,H=null,r=null,M=null,p=null,s=null,j.running=!1,z=function(){return D.restartOnPushState?j.restart():void 0},null!=window.history.pushState&&(T=window.history.pushState,window.history.pushState=function(){return z(),T.apply(window.history,arguments)}),null!=window.history.replaceState&&(W=window.history.replaceState,window.history.replaceState=function(){return z(),W.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventLag:f},(B=function(){var a,c,d,e,f,g,h,i;for(j.sources=L=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],D[a]!==!1&&L.push(new l[a](D[a]));for(i=null!=(h=D.extraSources)?h:[],d=0,f=i.length;f>d;d++)K=i[d],L.push(new K(D));return j.bar=r=new b,H=[],M=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),B()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=C(),s=!1,p=G(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=L.length;u>q;i=++q)for(K=L[i],o=null!=H[i]?H[i]:H[i]=[],h=null!=(w=K.elements)?w:[K],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(M.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),setTimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},Math.max(D.ghostTime,Math.max(D.minTime-(C()-a),0)))):c()})},j.start=function(a){v(D,a),j.running=!0;try{r.render()}catch(b){i=b}return document.querySelector(".pace")?(j.trigger("start"),j.go()):setTimeout(j.start,50)},"function"==typeof define&&define.amd?define(function(){return j}):"object"==typeof exports?module.exports=j:D.startOnPageLoad&&j.start()}).call(this);
  1919. //! moment.js
  1920. //! version : 2.9.0
  1921. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  1922. //! license : MIT
  1923. //! momentjs.com
  1924. (function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return Bb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){vb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return o(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){sc[a]||(e(b),sc[a]=!0)}function h(a,b){return function(c){return r(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function k(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function l(){}function m(a,b){b!==!1&&H(a),p(this,a),this._d=new Date(+a._d),uc===!1&&(uc=!0,vb.updateOffset(this),uc=!1)}function n(a){var b=A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=vb.localeData(),this._bubble()}function o(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function p(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Kb.length>0)for(c in Kb)d=Kb[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function s(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function t(a,b){var c;return b=M(b,a),a.isBefore(b)?c=s(a,b):(c=s(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function u(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(g(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=vb.duration(c,d),v(this,e,a),this}}function v(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&pb(a,"Date",ob(a,"Date")+f*c),g&&nb(a,ob(a,"Month")+g*c),d&&vb.updateOffset(a,f||g)}function w(a){return"[object Array]"===Object.prototype.toString.call(a)}function x(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function y(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&C(a[d])!==C(b[d]))&&g++;return g+f}function z(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=lc[a]||mc[b]||b}return a}function A(a){var b,d,e={};for(d in a)c(a,d)&&(b=z(d),b&&(e[b]=a[d]));return e}function B(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}vb[b]=function(e,f){var g,h,i=vb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=vb().utc().set(d,a);return i.call(vb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function C(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function D(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function E(a,b,c){return jb(vb([a,11,31+b-c]),b,c).week}function F(a){return G(a)?366:365}function G(a){return a%4===0&&a%100!==0||a%400===0}function H(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Db]<0||a._a[Db]>11?Db:a._a[Eb]<1||a._a[Eb]>D(a._a[Cb],a._a[Db])?Eb:a._a[Fb]<0||a._a[Fb]>24||24===a._a[Fb]&&(0!==a._a[Gb]||0!==a._a[Hb]||0!==a._a[Ib])?Fb:a._a[Gb]<0||a._a[Gb]>59?Gb:a._a[Hb]<0||a._a[Hb]>59?Hb:a._a[Ib]<0||a._a[Ib]>999?Ib:-1,a._pf._overflowDayOfYear&&(Cb>b||b>Eb)&&(b=Eb),a._pf.overflow=b)}function I(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function J(a){return a?a.toLowerCase().replace("_","-"):a}function K(a){for(var b,c,d,e,f=0;f<a.length;){for(e=J(a[f]).split("-"),b=e.length,c=J(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=L(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&y(e,c,!0)>=b-1)break;b--}f++}return null}function L(a){var b=null;if(!Jb[a]&&Lb)try{b=vb.locale(),require("./locale/"+a),vb.locale(b)}catch(c){}return Jb[a]}function M(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(vb.isMoment(a)||x(a)?+a:+vb(a))-+c,c._d.setTime(+c._d+d),vb.updateOffset(c,!1),c):vb(a).local()}function N(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function O(a){var b,c,d=a.match(Pb);for(b=0,c=d.length;c>b;b++)d[b]=rc[d[b]]?rc[d[b]]:N(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function P(a,b){return a.isValid()?(b=Q(b,a.localeData()),nc[b]||(nc[b]=O(b)),nc[b](a)):a.localeData().invalidDate()}function Q(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Qb.lastIndex=0;d>=0&&Qb.test(a);)a=a.replace(Qb,c),Qb.lastIndex=0,d-=1;return a}function R(a,b){var c,d=b._strict;switch(a){case"Q":return _b;case"DDDD":return bc;case"YYYY":case"GGGG":case"gggg":return d?cc:Tb;case"Y":case"G":case"g":return ec;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?dc:Ub;case"S":if(d)return _b;case"SS":if(d)return ac;case"SSS":if(d)return bc;case"DDD":return Sb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Wb;case"a":case"A":return b._locale._meridiemParse;case"x":return Zb;case"X":return $b;case"Z":case"ZZ":return Xb;case"T":return Yb;case"SSSS":return Vb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?ac:Rb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Rb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp($(Z(a.replace("\\","")),"i"))}}function S(a){a=a||"";var b=a.match(Xb)||[],c=b[b.length-1]||[],d=(c+"").match(jc)||["-",0,0],e=+(60*d[1])+C(d[2]);return"+"===d[0]?e:-e}function T(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Db]=3*(C(b)-1));break;case"M":case"MM":null!=b&&(e[Db]=C(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Db]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Eb]=C(b));break;case"Do":null!=b&&(e[Eb]=C(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=C(b));break;case"YY":e[Cb]=vb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Cb]=C(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Fb]=C(b);break;case"m":case"mm":e[Gb]=C(b);break;case"s":case"ss":e[Hb]=C(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ib]=C(1e3*("0."+b));break;case"x":c._d=new Date(C(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=S(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=C(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=vb.parseTwoDigitYear(b)}}function U(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Cb],jb(vb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Cb],jb(vb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=kb(d,e,f,h,g),a._a[Cb]=i.year,a._dayOfYear=i.dayOfYear}function V(a){var c,d,e,f,g=[];if(!a._d){for(e=X(a),a._w&&null==a._a[Eb]&&null==a._a[Db]&&U(a),a._dayOfYear&&(f=b(a._a[Cb],e[Cb]),a._dayOfYear>F(f)&&(a._pf._overflowDayOfYear=!0),d=fb(f,0,a._dayOfYear),a._a[Db]=d.getUTCMonth(),a._a[Eb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Fb]&&0===a._a[Gb]&&0===a._a[Hb]&&0===a._a[Ib]&&(a._nextDay=!0,a._a[Fb]=0),a._d=(a._useUTC?fb:eb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Fb]=24)}}function W(a){var b;a._d||(b=A(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],V(a))}function X(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Y(b){if(b._f===vb.ISO_8601)return void ab(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Q(b._f,b._locale).match(Pb)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(R(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),rc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),T(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Fb]<=12&&(b._pf.bigHour=a),b._a[Fb]=k(b._locale,b._a[Fb],b._meridiem),V(b),H(b)}function Z(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function $(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=p({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=d(),b._f=a._f[f],Y(b),I(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,c=b));o(a,c||b)}function ab(a){var b,c,d=a._i,e=fc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=hc.length;c>b;b++)if(hc[b][1].exec(d)){a._f=hc[b][0]+(e[6]||" ");break}for(b=0,c=ic.length;c>b;b++)if(ic[b][1].exec(d)){a._f+=ic[b][0];break}d.match(Xb)&&(a._f+="Z"),Y(a)}else a._isValid=!1}function bb(a){ab(a),a._isValid===!1&&(delete a._isValid,vb.createFromInputFallback(a))}function cb(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function db(b){var c,d=b._i;d===a?b._d=new Date:x(d)?b._d=new Date(+d):null!==(c=Mb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?bb(b):w(d)?(b._a=cb(d.slice(0),function(a){return parseInt(a,10)}),V(b)):"object"==typeof d?W(b):"number"==typeof d?b._d=new Date(d):vb.createFromInputFallback(b)}function eb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function fb(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function gb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function hb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ib(a,b,c){var d=vb.duration(a).abs(),e=Ab(d.as("s")),f=Ab(d.as("m")),g=Ab(d.as("h")),h=Ab(d.as("d")),i=Ab(d.as("M")),j=Ab(d.as("y")),k=e<oc.s&&["s",e]||1===f&&["m"]||f<oc.m&&["mm",f]||1===g&&["h"]||g<oc.h&&["hh",g]||1===h&&["d"]||h<oc.d&&["dd",h]||1===i&&["M"]||i<oc.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,hb.apply({},k)}function jb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=vb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function kb(a,b,c,d,e){var f,g,h=fb(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:F(a-1)+g}}function lb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||vb.localeData(b._l),null===d||e===a&&""===d?vb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),vb.isMoment(d)?new m(d,!0):(e?w(e)?_(b):Y(b):db(b),c=new m(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function mb(a,b){var c,d;if(1===b.length&&w(b[0])&&(b=b[0]),!b.length)return vb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function nb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),D(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function ob(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function pb(a,b,c){return"Month"===b?nb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function qb(a,b){return function(c){return null!=c?(pb(this,a,c),vb.updateOffset(this,b),this):ob(this,a)}}function rb(a){return 400*a/146097}function sb(a){return 146097*a/400}function tb(a){vb.duration.fn[a]=function(){return this._data[a]}}function ub(a){"undefined"==typeof ender&&(wb=zb.moment,zb.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",vb):vb)}for(var vb,wb,xb,yb="2.9.0",zb="undefined"==typeof global||"undefined"!=typeof window&&window!==global.window?this:global,Ab=Math.round,Bb=Object.prototype.hasOwnProperty,Cb=0,Db=1,Eb=2,Fb=3,Gb=4,Hb=5,Ib=6,Jb={},Kb=[],Lb="undefined"!=typeof module&&module&&module.exports,Mb=/^\/?Date\((\-?\d+)/i,Nb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ob=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Pb=/(\[[^\[]*\])|(\\)?(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,4}|x|X|zz?|ZZ?|.)/g,Qb=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Rb=/\d\d?/,Sb=/\d{1,3}/,Tb=/\d{1,4}/,Ub=/[+\-]?\d{1,6}/,Vb=/\d+/,Wb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Xb=/Z|[\+\-]\d\d:?\d\d/gi,Yb=/T/i,Zb=/[\+\-]?\d+/,$b=/[\+\-]?\d+(\.\d{1,3})?/,_b=/\d/,ac=/\d\d/,bc=/\d{3}/,cc=/\d{4}/,dc=/[+-]?\d{6}/,ec=/[+-]?\d+/,fc=/^\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)?)?$/,gc="YYYY-MM-DDTHH:mm:ssZ",hc=[["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}/]],ic=[["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/]],jc=/([\+\-]|\d\d)/gi,kc=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),lc={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},mc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},nc={},oc={s:45,m:45,h:22,d:26,M:11},pc="DDD w W M D d".split(" "),qc="M D H h m s w W".split(" "),rc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return r(this.year()%100,2)},YYYY:function(){return r(this.year(),4)},YYYYY:function(){return r(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+r(Math.abs(a),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return C(this.milliseconds()/100)},SS:function(){return r(C(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+":"+r(C(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+r(C(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},sc={},tc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],uc=!1;pc.length;)xb=pc.pop(),rc[xb+"o"]=i(rc[xb],xb);for(;qc.length;)xb=qc.pop(),rc[xb+xb]=h(rc[xb],2);rc.DDDD=h(rc.DDD,3),o(l.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=vb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=vb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{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"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return jb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),vb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),lb(g)},vb.suppressDeprecationWarnings=!1,vb.createFromInputFallback=f("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(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),vb.min=function(){var a=[].slice.call(arguments,0);return mb("isBefore",a)},vb.max=function(){var a=[].slice.call(arguments,0);return mb("isAfter",a)},vb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),lb(g).utc()},vb.unix=function(a){return vb(1e3*a)},vb.duration=function(a,b){var d,e,f,g,h=a,i=null;return vb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Nb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:C(i[Eb])*d,h:C(i[Fb])*d,m:C(i[Gb])*d,s:C(i[Hb])*d,ms:C(i[Ib])*d}):(i=Ob.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(g=t(vb(h.from),vb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new n(h),vb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},vb.version=yb,vb.defaultFormat=gc,vb.ISO_8601=function(){},vb.momentProperties=Kb,vb.updateOffset=function(){},vb.relativeTimeThreshold=function(b,c){return oc[b]===a?!1:c===a?oc[b]:(oc[b]=c,!0)},vb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return vb.locale(a,b)}),vb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?vb.defineLocale(a,b):vb.localeData(a),c&&(vb.duration._locale=vb._locale=c)),vb._locale._abbr},vb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Jb[a]||(Jb[a]=new l),Jb[a].set(b),vb.locale(a),Jb[a]):(delete Jb[a],null)},vb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return vb.localeData(a)}),vb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return vb._locale;if(!w(a)){if(b=L(a))return b;a=[a]}return K(a)},vb.isMoment=function(a){return a instanceof m||null!=a&&c(a,"_isAMomentObject")},vb.isDuration=function(a){return a instanceof n};for(xb=tc.length-1;xb>=0;--xb)B(tc[xb]);vb.normalizeUnits=function(a){return z(a)},vb.invalid=function(a){var b=vb.utc(0/0);return null!=a?o(b._pf,a):b._pf.userInvalidated=!0,b},vb.parseZone=function(){return vb.apply(null,arguments).parseZone()},vb.parseTwoDigitYear=function(a){return C(a)+(C(a)>68?1900:2e3)},vb.isDate=x,o(vb.fn=m.prototype,{clone:function(){return vb(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=vb(this).utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():P(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):P(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return I(this)},isDSTShifted:function(){return this._a?this.isValid()&&y(this._a,(this._isUTC?vb.utc(this._a):vb(this._a)).toArray())>0:!1},parsingFlags:function(){return o({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var b=P(this,a||vb.defaultFormat);return this.localeData().postformat(b)},add:u(1,"add"),subtract:u(-1,"subtract"),diff:function(a,b,c){var d,e,f=M(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=j(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:q(e)},from:function(a,b){return vb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(vb(),a)},calendar:function(a){var b=a||vb(),c=M(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,vb(b)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=gb(a,this.localeData()),this.add(a-b,"d")):b},month:qb("Month",!0),startOf:function(a){switch(a=z(a)){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"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=z(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+this>+a):(c=vb.isMoment(a)?+a:+vb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+a>+this):(c=vb.isMoment(a)?+a:+vb(a),+this.clone().endOf(b)<c)},isBetween:function(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)},isSame:function(a,b){var c;return b=z(b||"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+this===+a):(c=+vb(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=vb.apply(null,arguments),this>a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=vb.apply(null,arguments),a>this?this:a}),zone:f("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}),utcOffset:function(a,b){var c,d=this._offset||0;return null!=a?("string"==typeof a&&(a=S(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.add(c,"m"),d!==a&&(!b||this._changeInProgress?v(this,vb.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,vb.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(S(this._i)),this},hasAlignedHourOffset:function(a){return a=a?vb(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(){return D(this.year(),this.month())},dayOfYear:function(a){var b=Ab((vb(this).startOf("day")-vb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=jb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=jb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=jb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return E(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return E(this.year(),a.dow,a.doy)},get:function(a){return a=z(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=z(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(b){var c;return b===a?this._locale._abbr:(c=vb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),vb.fn.millisecond=vb.fn.milliseconds=qb("Milliseconds",!1),vb.fn.second=vb.fn.seconds=qb("Seconds",!1),vb.fn.minute=vb.fn.minutes=qb("Minutes",!1),vb.fn.hour=vb.fn.hours=qb("Hours",!0),vb.fn.date=qb("Date",!0),vb.fn.dates=f("dates accessor is deprecated. Use date instead.",qb("Date",!0)),vb.fn.year=qb("FullYear",!0),vb.fn.years=f("years accessor is deprecated. Use year instead.",qb("FullYear",!0)),vb.fn.days=vb.fn.day,vb.fn.months=vb.fn.month,vb.fn.weeks=vb.fn.week,vb.fn.isoWeeks=vb.fn.isoWeek,vb.fn.quarters=vb.fn.quarter,vb.fn.toJSON=vb.fn.toISOString,vb.fn.isUTC=vb.fn.isUtc,o(vb.duration.fn=n.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=q(d/1e3),g.seconds=a%60,b=q(a/60),g.minutes=b%60,c=q(b/60),g.hours=c%24,e+=q(c/24),h=q(rb(e)),e-=q(sb(h)),f+=q(e/30),e%=30,h+=q(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return q(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12)
  1925. },humanize:function(a){var b=ib(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=vb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=vb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=z(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=z(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*rb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(sb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:vb.fn.lang,locale:vb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),vb.duration.fn.toString=vb.duration.fn.toISOString;for(xb in kc)c(kc,xb)&&tb(xb.toLowerCase());vb.duration.fn.asMilliseconds=function(){return this.as("ms")},vb.duration.fn.asSeconds=function(){return this.as("s")},vb.duration.fn.asMinutes=function(){return this.as("m")},vb.duration.fn.asHours=function(){return this.as("h")},vb.duration.fn.asDays=function(){return this.as("d")},vb.duration.fn.asWeeks=function(){return this.as("weeks")},vb.duration.fn.asMonths=function(){return this.as("M")},vb.duration.fn.asYears=function(){return this.as("y")},vb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===C(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Lb?module.exports=vb:"function"==typeof define&&define.amd?(define(function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(zb.moment=wb),vb}),ub(!0)):ub()}).call(this);
  1926. !function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t){!function(){"use strict";function e(t,n){function i(e,t){return function(){return e.apply(t,arguments)}}var o;if(n=n||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=n.touchBoundary||10,this.layer=t,this.tapDelay=n.tapDelay||200,this.tapTimeout=n.tapTimeout||700,!e.notNeeded(t)){for(var s=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],a=this,c=0,l=s.length;l>c;c++)a[s[c]]=i(a[s[c]],a);r&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0)),t.addEventListener("click",this.onClick,!0),t.addEventListener("touchstart",this.onTouchStart,!1),t.addEventListener("touchmove",this.onTouchMove,!1),t.addEventListener("touchend",this.onTouchEnd,!1),t.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(e,n,r){var i=Node.prototype.removeEventListener;"click"===e?i.call(t,e,n.hijacked||n,r):i.call(t,e,n,r)},t.addEventListener=function(e,n,r){var i=Node.prototype.addEventListener;"click"===e?i.call(t,e,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),r):i.call(t,e,n,r)}),"function"==typeof t.onclick&&(o=t.onclick,t.addEventListener("click",function(e){o(e)},!1),t.onclick=null)}}var n=navigator.userAgent.indexOf("Windows Phone")>=0,r=navigator.userAgent.indexOf("Android")>0&&!n,i=/iP(ad|hone|od)/.test(navigator.userAgent)&&!n,o=i&&/OS 4_\d(_\d)?/.test(navigator.userAgent),s=i&&/OS [6-7]_\d/.test(navigator.userAgent),a=navigator.userAgent.indexOf("BB10")>0;e.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(i&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},e.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!r;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},e.prototype.sendClick=function(e,t){var n,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},e.prototype.determineEventType=function(e){return r&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},e.prototype.focus=function(e){var t;i&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},e.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},e.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},e.prototype.onTouchStart=function(e){var t,n,r;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],i){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!o){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<this.tapDelay&&e.preventDefault(),!0},e.prototype.touchHasMoved=function(e){var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n?!0:!1},e.prototype.onTouchMove=function(e){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},e.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},e.prototype.onTouchEnd=function(e){var t,n,a,c,l,u=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(e.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,s&&(l=e.changedTouches[0],u=document.elementFromPoint(l.pageX-window.pageXOffset,l.pageY-window.pageYOffset)||u,u.fastClickScrollParent=this.targetElement.fastClickScrollParent),a=u.tagName.toLowerCase(),"label"===a){if(t=this.findControl(u)){if(this.focus(u),r)return!1;u=t}}else if(this.needsFocus(u))return e.timeStamp-n>100||i&&window.top!==window&&"input"===a?(this.targetElement=null,!1):(this.focus(u),this.sendClick(u,e),i&&"select"===a||(this.targetElement=null,e.preventDefault()),!1);return i&&!o&&(c=u.fastClickScrollParent,c&&c.fastClickLastScrollTop!==c.scrollTop)?!0:(this.needsClick(u)||(e.preventDefault(),this.sendClick(u,e)),!1)},e.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},e.prototype.onMouse=function(e){return this.targetElement?e.forwardedTouchEvent?!0:e.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1):!0:!0},e.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail?!0:(t=this.onMouse(e),t||(this.targetElement=null),t)},e.prototype.destroy=function(){var e=this.layer;r&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},e.notNeeded=function(e){var t,n,i,o;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!r)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(a&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction?!0:(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],o>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===e.style.touchAction||"manipulation"===e.style.touchAction?!0:!1)},e.attach=function(t,n){return new e(t,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return e}):"undefined"!=typeof t&&t.exports?(t.exports=e.attach,t.exports.FastClick=e):window.FastClick=e}()},{}],2:[function(e){window.Origami={fastclick:e("./bower_components/fastclick/lib/fastclick.js")}},{"./bower_components/fastclick/lib/fastclick.js":1}]},{},[2]);;(function() {function trigger(){document.dispatchEvent(new CustomEvent('o.load'))};document.addEventListener('load',trigger);if (document.readyState==='ready') trigger();}());(function() {function trigger(){document.dispatchEvent(new CustomEvent('o.DOMContentLoaded'))};document.addEventListener('DOMContentLoaded',trigger);if (document.readyState==='interactive') trigger();}())
  1927. /**
  1928. * Project: Bootstrap Hover Dropdown
  1929. * Author: Cameron Spear
  1930. * Contributors: Mattia Larentis
  1931. *
  1932. * Dependencies: Bootstrap's Dropdown plugin, jQuery
  1933. *
  1934. * A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
  1935. *
  1936. * License: MIT
  1937. *
  1938. * http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
  1939. */
  1940. !function(e,n){var o=e();e.fn.dropdownHover=function(t){return"ontouchstart"in document?this:(o=o.add(this.parent()),this.each(function(){var i,r=e(this),s=r.parent(),d={delay:500,instantlyCloseOthers:!0},a={delay:e(this).data("delay"),instantlyCloseOthers:e(this).data("close-others")},h="show.bs.dropdown",u="hide.bs.dropdown",l=e.extend(!0,{},d,t,a);s.hover(function(e){return s.hasClass("open")||r.is(e.target)?(o.find(":focus").blur(),l.instantlyCloseOthers===!0&&o.removeClass("open"),n.clearTimeout(i),s.addClass("open"),void r.trigger(h)):!0},function(){i=n.setTimeout(function(){s.removeClass("open"),r.trigger(u)},l.delay)}),r.hover(function(){o.find(":focus").blur(),l.instantlyCloseOthers===!0&&o.removeClass("open"),n.clearTimeout(i),s.addClass("open"),r.trigger(h)}),s.find(".dropdown-submenu").each(function(){var o,t=e(this);t.hover(function(){n.clearTimeout(o),t.children(".dropdown-menu").show(),t.siblings().children(".dropdown-menu").hide()},function(){var e=t.children(".dropdown-menu");o=n.setTimeout(function(){e.hide()},l.delay)})})}))},e(document).ready(function(){e('[data-hover="dropdown"]').not(".hover-initialized").each(function(){e(this).dropdownHover(),e(this).addClass("hover-initialized")})})}(jQuery,this);