').appendTo(n.$tab),n.activeIndex=!1;var o=location.hash;o&&n.$tabs.each(function(t,e){if(g(e).attr("href")===o)return n.activeIndex=t,!1}),!1===n.activeIndex&&n.$tabs.each(function(t,e){if(g(e).hasClass("mdui-tab-active"))return n.activeIndex=t,!1}),n.$tabs.length&&!1===n.activeIndex&&(n.activeIndex=0),n._setActive(),T.on("resize",g.throttle(function(){n._setIndicatorPosition()},100)),n.$tabs.each(function(t,e){n._bindTabEvent(e)})}}return t.prototype._bindTabEvent=function(e){var n=this,i=g(e),t=function(t){s(i)?t.preventDefault():(n.activeIndex=n.$tabs.index(e),n._setActive())};i.on("click",t),"hover"===n.options.trigger&&i.on("mouseenter",t),i.on("click",function(t){0===i.attr("href").indexOf("#")&&t.preventDefault()})},t.prototype._setActive=function(){var o=this;o.$tabs.each(function(t,e){var n=g(e),i=n.attr("href");t!==o.activeIndex||s(n)?(n.removeClass("mdui-tab-active"),g(i).hide()):(n.hasClass("mdui-tab-active")||(p("change","tab",o,o.$tab,{index:o.activeIndex,id:i.substr(1)}),p("show","tab",o,n),n.addClass("mdui-tab-active")),g(i).show(),o._setIndicatorPosition())})},t.prototype._setIndicatorPosition=function(){var t,e,n=this;!1!==n.activeIndex?(t=n.$tabs.eq(n.activeIndex),s(t)||(e=t.offset(),n.$indicator.css({left:e.left+n.$tab[0].scrollLeft-n.$tab[0].getBoundingClientRect().left+"px",width:t.width()+"px"}))):n.$indicator.css({left:0,width:0})},t.prototype.next=function(){var t=this;!1!==t.activeIndex&&(t.$tabs.length>t.activeIndex+1?t.activeIndex++:t.options.loop&&(t.activeIndex=0),t._setActive())},t.prototype.prev=function(){var t=this;!1!==t.activeIndex&&(0',g.each(n.buttons,function(t,e){o+=''+e.text+""}),o+="");var t=''+(n.title?'
'+n.title+"
":"")+(n.content?'
'+n.content+"
":"")+o+"
",a=new d.Dialog(t,{history:n.history,overlay:n.overlay,modal:n.modal,closeOnEsc:n.closeOnEsc,destroyOnClosed:n.destroyOnClosed});return n.buttons.length&&a.$dialog.find(".mdui-dialog-actions .mdui-btn").each(function(t,e){g(e).on("click",function(){"function"==typeof n.buttons[t].onClick&&n.buttons[t].onClick(a),n.buttons[t].close&&a.close()})}),"function"==typeof n.onOpen&&a.$dialog.on("open.mdui.dialog",function(){n.onOpen(a)}).on("opened.mdui.dialog",function(){n.onOpened(a)}).on("close.mdui.dialog",function(){n.onClose(a)}).on("closed.mdui.dialog",function(){n.onClosed(a)}),a.open(),a},d.alert=function(t,e,n,i){"function"==typeof e&&(e="",n=arguments[1],i=arguments[2]),void 0===n&&(n=function(){}),void 0===i&&(i={});return i=g.extend({},{confirmText:"ok",history:!0,modal:!1,closeOnEsc:!0},i),d.dialog({title:e,content:t,buttons:[{text:i.confirmText,bold:!1,close:!0,onClick:n}],cssClass:"mdui-dialog-alert",history:i.history,modal:i.modal,closeOnEsc:i.closeOnEsc})},d.confirm=function(t,e,n,i,o){"function"==typeof e&&(e="",n=arguments[1],i=arguments[2],o=arguments[3]),void 0===n&&(n=function(){}),void 0===i&&(i=function(){}),void 0===o&&(o={});return o=g.extend({},{confirmText:"ok",cancelText:"cancel",history:!0,modal:!1,closeOnEsc:!0},o),d.dialog({title:e,content:t,buttons:[{text:o.cancelText,bold:!1,close:!0,onClick:i},{text:o.confirmText,bold:!1,close:!0,onClick:n}],cssClass:"mdui-dialog-confirm",history:o.history,modal:o.modal,closeOnEsc:o.closeOnEsc})},d.prompt=function(t,e,i,n,o){"function"==typeof e&&(e="",i=arguments[1],n=arguments[2],o=arguments[3]),void 0===i&&(i=function(){}),void 0===n&&(n=function(){}),void 0===o&&(o={});var a=''+(t?'":"")+("text"===(o=g.extend({},{confirmText:"ok",cancelText:"cancel",history:!0,modal:!1,closeOnEsc:!0,type:"text",maxlength:"",defaultValue:"",confirmOnEnter:!1},o)).type?'":"")+("textarea"===o.type?'":"")+"
",s=n;"function"==typeof n&&(s=function(t){var e=t.$dialog.find(".mdui-textfield-input").val();n(e,t)});var r=i;return"function"==typeof i&&(r=function(t){var e=t.$dialog.find(".mdui-textfield-input").val();i(e,t)}),d.dialog({title:e,content:a,buttons:[{text:o.cancelText,bold:!1,close:!0,onClick:s},{text:o.confirmText,bold:!1,close:!0,onClick:r}],cssClass:"mdui-dialog-prompt",history:o.history,modal:o.modal,closeOnEsc:o.closeOnEsc,onOpen:function(n){var t=n.$dialog.find(".mdui-textfield-input");d.updateTextFields(t),t[0].focus(),"text"===o.type&&!0===o.confirmOnEnter&&t.on("keydown",function(t){if(13===t.keyCode){var e=n.$dialog.find(".mdui-textfield-input").val();i(e,n),n.close()}}),"textarea"===o.type&&t.on("input",function(){n.handleUpdate()}),o.maxlength&&n.handleUpdate()}})},d.Tooltip=function(){var o={position:"auto",delay:0,content:""};function i(t){var e,n,i,o=t.$target[0].getBoundingClientRect(),a=1024'+n.options.content+"").appendTo(document.body),n.$target.on("touchstart mouseenter",function(t){this.disabled||r.isAllow(t)&&(r.register(t),n.open())}).on("touchend mouseleave",function(t){this.disabled||r.isAllow(t)&&n.close()}).on(r.unlock,function(t){this.disabled||r.register(t)})}}var e=function(t){t.$tooltip.hasClass("mdui-tooltip-open")?(t.state="opened",p("opened","tooltip",t,t.$target)):(t.state="closed",p("closed","tooltip",t,t.$target))};return t.prototype._doOpen=function(){var t=this;t.state="opening",p("open","tooltip",t,t.$target),t.$tooltip.addClass("mdui-tooltip-open").transitionEnd(function(){e(t)})},t.prototype.open=function(t){var e=this;if("opening"!==e.state&&"opened"!==e.state){var n=g.extend({},e.options);g.extend(e.options,s(e.$target.attr("mdui-tooltip"))),t&&g.extend(e.options,t),n.content!==e.options.content&&e.$tooltip.html(e.options.content),i(e),e.options.delay?e.timeoutId=setTimeout(function(){e._doOpen()},e.options.delay):(e.timeoutId=!1,e._doOpen())}},t.prototype.close=function(){var t=this;t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=!1),"closing"!==t.state&&"closed"!==t.state&&(t.state="closing",p("close","tooltip",t,t.$target),t.$tooltip.removeClass("mdui-tooltip-open").transitionEnd(function(){e(t)}))},t.prototype.toggle=function(){var t=this;"opening"===t.state||"opened"===t.state?t.close():"closing"!==t.state&&"closed"!==t.state||t.open()},t.prototype.getState=function(){return this.state},t}(),g(function(){f.on("touchstart mouseover","[mdui-tooltip]",function(){var t=g(this),e=t.data("mdui.tooltip");if(!e){var n=s(t.attr("mdui-tooltip"));e=new d.Tooltip(t,n),t.data("mdui.tooltip",e)}})}),function(){var n,i="__md_snackbar",a={timeout:4e3,buttonText:"",buttonColor:"",position:"bottom",closeOnButtonClick:!0,closeOnOutsideClick:!0,onClick:function(){},onButtonClick:function(){},onOpen:function(){},onOpened:function(){},onClose:function(){},onClosed:function(){}},o=function(t){var e=g(t.target);e.hasClass("mdui-snackbar")||e.parents(".mdui-snackbar").length||n.close()};function s(t,e){var n=this;if(n.message=t,n.options=g.extend({},a,e||{}),n.message){n.state="closed",n.timeoutId=!1;var i="",o="";0===n.options.buttonColor.indexOf("#")||0===n.options.buttonColor.indexOf("rgb")?i='style="color:'+n.options.buttonColor+'"':""!==n.options.buttonColor&&(o="mdui-text-color-"+n.options.buttonColor),n.$snackbar=g('").appendTo(document.body),n._setPosition("close"),n.$snackbar.reflow().addClass("mdui-snackbar-"+n.options.position)}}s.prototype._setPosition=function(t){var e,n,i=this.$snackbar[0].clientHeight,o=this.options.position;e="bottom"===o||"top"===o?"-50%":"0","open"===t?n="0":("bottom"===o&&(n=i),"top"===o&&(n=-i),"left-top"!==o&&"right-top"!==o||(n=-i-24),"left-bottom"!==o&&"right-bottom"!==o||(n=i+24)),this.$snackbar.transform("translate("+e+","+n+"px)")},s.prototype.open=function(){var e=this;e.message&&"opening"!==e.state&&"opened"!==e.state&&(n?l.queue(i,function(){e.open()}):((n=e).state="opening",e.options.onOpen(),e._setPosition("open"),e.$snackbar.transitionEnd(function(){"opening"===e.state&&(e.state="opened",e.options.onOpened(),e.options.buttonText&&e.$snackbar.find(".mdui-snackbar-action").on("click",function(){e.options.onButtonClick(),e.options.closeOnButtonClick&&e.close()}),e.$snackbar.on("click",function(t){g(t.target).hasClass("mdui-snackbar-action")||e.options.onClick()}),e.options.closeOnOutsideClick&&f.on(r.start,o),e.options.timeout&&(e.timeoutId=setTimeout(function(){e.close()},e.options.timeout)))})))},s.prototype.close=function(){var t=this;t.message&&"closing"!==t.state&&"closed"!==t.state&&(t.timeoutId&&clearTimeout(t.timeoutId),t.options.closeOnOutsideClick&&f.off(r.start,o),t.state="closing",t.options.onClose(),t._setPosition("close"),t.$snackbar.transitionEnd(function(){"closing"===t.state&&(n=null,t.state="closed",t.options.onClosed(),t.$snackbar.remove(),l.dequeue(i))}))},d.snackbar=function(t,e){"string"!=typeof t&&(t=(e=t).message);var n=new s(t,e);return n.open(),n}}(),f.on("click",".mdui-bottom-nav>a",function(){var n,i=g(this),o=i.parent();o.children("a").each(function(t,e){(n=i.is(e))&&p("change","bottomNav",null,o,{index:t}),g(e)[n?"addClass":"removeClass"]("mdui-bottom-nav-active")})}),d.mutation(".mdui-bottom-nav-scroll-hide",function(){var t=g(this),e=new d.Headroom(t,{pinnedClass:"mdui-headroom-pinned-down",unpinnedClass:"mdui-headroom-unpinned-down"});t.data("mdui.headroom",e)}),o=function(){var t=!!arguments.length&&arguments[0];return''},m=function(t){var e,n=g(t);e=n.hasClass("mdui-spinner-colorful")?o("1")+o("2")+o("3")+o("4"):o(),n.html(e)},g(function(){d.mutation(".mdui-spinner",function(){m(this)})}),d.updateSpinners=function(){g(arguments.length?arguments[0]:".mdui-spinner").each(function(){m(this)})},d.Panel=function(t,e){return new v(t,e,"panel")},g(function(){d.mutation("[mdui-panel]",function(){var t=g(this),e=t.data("mdui.panel");if(!e){var n=s(t.attr("mdui-panel"));e=new d.Panel(t,n),t.data("mdui.panel",e)}})}),d.Menu=function(){var a={position:"auto",align:"auto",gutter:16,fixed:!1,covered:"auto",subMenuTrigger:"hover",subMenuDelay:200},s=function(t){var e,n,i,o,a,s,r=T.height(),d=T.width(),c=t.options.gutter,u=t.isCovered,l=t.options.fixed,f=t.$menu.width(),p=t.$menu.height(),h=t.$anchor,m=h[0].getBoundingClientRect(),v=m.top,g=m.left,b=m.height,x=m.width,y=r-v-b,w=d-g-x,$=h[0].offsetTop,C=h[0].offsetLeft;if(i="auto"===t.options.position?p+c