diff --git a/build/ng-admin-only.min.js b/build/ng-admin-only.min.js index 97e03eae..3c8ab04b 100644 --- a/build/ng-admin-only.min.js +++ b/build/ng-admin-only.min.js @@ -1,40 +1,39 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="http://localhost:8080/",t(0)}([function(e,t,n){n(46),e.exports=n(135)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nn;n++){var i=t[n];e[i.name()]=i}return e}},{key:"getNonOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!1)}},{key:"getOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!0)}},{key:"getReferencedLists",value:function(){for(var e={},t=this._fields.filter(function(e){return"referenced_list"===e.type()}),n=0,r=t.length;r>n;n++){var i=t[n];e[i.name()]=i}return e}},{key:"template",value:function(e){return arguments.length?(this._template=e,this):this._template}},{key:"identifier",value:function(){return this.entity.identifier()}},{key:"actions",value:function(e){return arguments.length?(this._actions=e,this):this._actions}},{key:"removeFields",value:function(){return this._fields=[],this}},{key:"getFields",value:function(){return this._fields}},{key:"getField",value:function(e){return this._fields.filter(function(t){return t.name()===e})[0]}},{key:"getFieldsOfType",value:function(e){return this._fields.filter(function(t){return t.type()===e})}},{key:"addField",value:function(e){return null===e.order()&&e.order(this._fields.length,!0),this._fields.push(e),this._fields=this._fields.sort(function(e,t){return e.order()-t.order()}),this}},{key:"getErrorMessage",value:function(e){return"function"==typeof this._errorMessage?this._errorMessage(e):this._errorMessage}},{key:"errorMessage",value:function(e){return arguments.length?(this._errorMessage=e,this):this._errorMessage}},{key:"url",value:function(e){return arguments.length?(this._url=e,this):this._url}},{key:"getUrl",value:function(e){return"function"==typeof this._url?this._url(e):this._url}},{key:"validate",value:function(e){this._fields.map(function(t){var n=t.validation();"function"==typeof n.validator&&n.validator(e.values[t.name()])})}},{key:"_getReferencesByOptimizationType",value:function(){var e=void 0===arguments[0]?!0:arguments[0],t={},n=this.getReferences();for(var r in n){var i=n[r];!!i.getSingleApiCall()===e&&(t[r]=i)}return t}}],[{key:"flatten",value:function(t){if("Object"===t.constructor.name){console.warn("Passing literal of Field to fields method is deprecated use array instead");var n=[];for(var r in t)n=n.concat(e.flatten(t[r]));return n}return Array.isArray(t)?t.reduce(function(t,n){return t.concat(e.flatten(n))},[]):[t]}}]),e}());t["default"]=s,e.exports=t["default"]},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Di(r):{},Di(Go,r,!1),p(r);var i=r.value;"string"==typeof i&&(i=new ma(i,r.mode)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),a=this.display=new t(n,i,o);a.wrapper.CodeMirror=this,u(this),s(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!Co&&a.input.focus(),m(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new ki,keySeq:null,specialChars:null};var l=this;po&&11>ho&&setTimeout(function(){l.display.input.reset(!0)},20),Vt(this),Ui(),yt(this),this.curOp.forceUpdate=!0,qr(this,i),r.autofocus&&!Co||l.hasFocus()?setTimeout(Li(pn,this),20):hn(this);for(var c in Ko)Ko.hasOwnProperty(c)&&Ko[c](this,r[c],Yo);x(this),r.finishInit&&r.finishInit(this);for(var f=0;fho&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),go||uo&&Co||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Fe(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(za(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ha(e.display.wrapper,"CodeMirror-wrap"),d(e)),a(e),Dt(e),ot(e),setTimeout(function(){y(e)},100)}function o(e){var t=vt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/mt(e.display)-3);return function(i){if(yr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function p(e){var t=Ti(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+He(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Be(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var r=this.vert=ji("div",[ji("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=ji("div",[ji("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ca(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ca(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,po&&8>ho&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function m(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ha(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ca(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?en(t,e):Zt(t,e)},t),t.display.scrollbars.addClass&&za(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&M(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function w(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-We(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Jr(t,r),a=Jr(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=Jr(t,Zr(Gr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Jr(t,Zr(Gr(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function $(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=_(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==It(e))return!1;x(e)&&(Pt(e),t.dims=D(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ao&&(o=vr(e.doc,o),a=mr(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;jt(e,o,a),n.viewOffset=Zr(Gr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=It(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Wi();return l>4&&(n.lineDiv.style.display="none"),L(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Wi()!=u&&u.offsetHeight&&u.focus(),Ii(n.cursorDiv),Ii(n.selectionDiv),n.gutters.style.height=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fe(e,400)),n.updateLineNumbers=null,!0}function O(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ue(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+He(e.display)-qe(e),n.top)}),t.visible=w(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&S(e,t);r=!1){M(e);var i=h(e);Re(e),A(e,i),y(e,i)}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function T(e,t){var n=new k(e,t);if(S(e,n)){M(e),O(e,n);var r=h(e);Re(e),A(e,r),y(e,r),n.finish()}}function A(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+Be(e),t.clientHeight)+"px"}function M(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rho){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var l=o.line.height-i;if(2>i&&(i=vt(t)),(l>.001||-.001>l)&&(Qr(o.line,i),R(o.line),o.rest))for(var u=0;u=t&&f.lineNumber;f.changes&&(Ti(f.changes,"gutter")>-1&&(d=!1),P(e,f,u,n)),d&&(Ii(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(C(e.options,u)))),s=f.node.nextSibling}else{var p=z(e,f,u,n);a.insertBefore(p,s)}u+=f.size}for(;s;)s=r(s)}function P(e,t,n,r){for(var i=0;iho&&(e.node.style.zIndex=2)),e.node}function F(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=N(e);e.background=n.insertBefore(ji("div",null,t),n.firstChild)}}function j(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Lr(e,t)}function I(e,t){var n=t.text.className,r=j(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,V(t)):n&&(t.text.className=n)}function V(e){F(e),e.line.wrapClass?N(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function W(e,t,n,r){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=N(t),a=t.gutter=ji("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px");if(e.display.input.setUneditable(a),o.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(ji("div",C(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s1&&(Do&&Do.join("\n")==t?s=r.ranges.length%Do.length==0&&Ai(Do,qa):a.length==r.ranges.length&&(s=Ai(a,function(e){return[e]})));for(var l=r.ranges.length-1;l>=0;l--){var u=r.ranges[l],c=u.from(),f=u.to();u.empty()&&(n&&n>0?c=Mo(c.line,c.ch-n):e.state.overwrite&&!e.state.pasteIncoming&&(f=Mo(f.line,Math.min(Gr(o,f.line).text.length,f.ch+Oi(a).length))));var d=e.curOp.updateInput,p={from:c,to:f,text:s?s[l%s.length]:a,origin:i||(e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input")};xn(e.doc,p),bi(e,"inputRead",e,p)}t&&!e.state.pasteIncoming&&Z(e,t),Ln(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Nn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Nn(e,i.head.line,"smart"));a&&bi(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?u.map:c[i],a=0;ai?e.line:e.rest[i]),f=o[a]+r;return(0>r||s!=t)&&(f=o[a+(r?1:0)]),Mo(l,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Ia(i,t))return ae(Mo(Xr(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Oi(e.rest):e.line;return ae(Mo(Xr(a),a.text.length),o)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,f=r(s,l,n);if(f)return ae(f,o);for(var d=l.nextSibling,p=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(f=r(d,d.firstChild,0))return ae(Mo(f.line,f.ch-p),o);p+=d.textContent.length}for(var h=l.previousSibling,p=n;h;h=h.previousSibling){if(f=r(h,h.firstChild,-1))return ae(Mo(f.line,f.ch+p),o);p+=d.textContent.length}}function ue(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var u,c=t.getAttribute("cm-marker");if(c){var f=e.findMarks(Mo(r,0),Mo(i+1,0),o(+c));return void(f.length&&(u=f[0].find())&&(s+=Kr(e.doc,u.from,u.to).join("\n")))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var a=Y(o.from(),i.from()),s=K(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(l?s:a,l?a:s))}}return new ce(e,t)}function pe(e,t){return new ce([new fe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.linen?Mo(n,Gr(e,n).text.length):ve(t,Gr(e,t.line).text.length)}function ve(e,t){var n=e.ch;return null==n||n>t?Mo(e.line,t):0>n?Mo(e.line,0):e}function me(e,t){return t>=e.first&&t=o.ch:u.to>o.ch))){if(r&&(ka(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var f=c.find(0>a?-1:1);if(0==Ro(f,o)&&(f.ch+=a,f.ch<0?f=f.line>e.first?ge(e,Mo(f.line-1)):null:f.ch>s.text.length&&(f=f.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(ji("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return ct(e,Mo(t,n),"div",f,r)}var s,l,f=Gr(a,t),d=f.text.length;return Qi(ei(f),n||0,null==i?d:i,function(e,t,a){var f,p,h,g=o(e,"left");if(e==t)f=g,p=h=g.left;else{if(f=o(t-1,"right"),"rtl"==a){var v=g;g=f,f=v}p=g.left,h=f.right}null==n&&0==e&&(p=u),f.top-g.top>3&&(r(p,g.top,null,g.bottom),p=u,g.bottoml.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),u+1>p&&(p=u),r(p,f.top,h-p,f.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=ze(e.display),u=l.left,c=Math.max(o.sizerWidth,Ue(e)-o.sizer.offsetLeft)-l.right,f=t.from(),d=t.to();if(f.line==d.line)i(f.line,f.ch,d.ch);else{var p=Gr(a,f.line),h=Gr(a,d.line),g=hr(p)==hr(h),v=i(f.line,f.ch,g?p.text.length+1:null).end,m=i(d.line,g?0:null,d.ch).start;g&&(v.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ta(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=Ar(e,o,r,!0);o.styles=s.styles;var l=o.styleClasses,u=s.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!c&&fn?(Fe(e,e.options.workDelay),!0):void 0}),i.length&&St(e,function(){for(var t=0;ta;--s){if(s<=o.first)return o.first;var l=Gr(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Ra(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Ie(e,t,n),a=o>r.first&&Gr(r,o-1).stateAfter;return a=a?ta(r.mode,a):na(r.mode),r.iter(o,t,function(n){Rr(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ye(e,t){t=hr(t);var n=Xr(t),r=e.display.externalMeasured=new Mt(e.doc,t,n);r.lineN=n;var i=r.built=Lr(e,r);return r.text=i.pre,Vi(e.display.lineMeasure,i.pre),r}function Qe(e,t,n,r){return Ze(e,Je(e,t),n,r)}function Xe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):u>t?(i=t-l,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-l,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&i==u-l)for(;sc;c++){for(;s&&Fi(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+lho&&0==s&&l==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(po&&e.options.lineWrapping){var f=Pa(a,s,l).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Fo}else i=Pa(a,s,l).getBoundingClientRect()||Fo;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}po&&11>ho&&(i=nt(e.display.measure,i))}else{s>0&&(u=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(po&&9>ho&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+mt(e.display),top:d.top,bottom:d.bottom}:Fo}for(var p=i.top-t.rect.top,h=i.bottom-t.rect.top,g=(p+h)/2,v=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||Gr(e.doc,t.line),i||(i=Je(e,r));var l=ei(r),u=t.ch;if(!l)return a(u);var c=oo(l,u),f=s(u,c);return null!=Xa&&(f.other=s(u,Xa)),f}function dt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=mt(e.display)*t.ch);var r=Gr(e.doc,t.line),i=Zr(r)+We(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function pt(e,t,n,r){var i=Mo(e,t);return i.xRel=r,n&&(i.outside=!0),i}function ht(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return pt(r.first,0,!0,-1);var i=Jr(r,n),o=r.first+r.size-1;if(i>o)return pt(r.first+r.size-1,Gr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Gr(r,i);;){var s=gt(e,a,i,t,n),l=dr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=Xr(a=u.to.line)}}function gt(e,t,n,r,i){function o(r){var i=ft(e,Mo(n,r),"line",t,u);return s=!0,a>i.bottom?i.left-l:av)return pt(n,p,m,1);for(;;){if(c?p==d||p==so(t,d,1):1>=p-d){for(var y=h>r||v-r>=r-h?d:p,b=r-(y==d?h:v);Fi(t.text.charAt(y));)++y;var w=pt(n,y,y==d?g:m,-1>b?-1:b>1?1:0);return w}var $=Math.ceil(f/2),x=d+$;if(c){x=d;for(var C=0;$>C;++C)x=so(t,x,1)}var _=o(x);_>r?(p=x,v=_,(m=s)&&(v+=1e3),f=$):(d=x,h=_,g=s,f-=$)}}function vt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Lo){Lo=ji("pre");for(var t=0;49>t;++t)Lo.appendChild(document.createTextNode("x")),Lo.appendChild(ji("br"));Lo.appendChild(document.createTextNode("x"))}Vi(e.measure,Lo);var n=Lo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Ii(e.measure),n||1}function mt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=ji("span","xxxxxxxxxx"),n=ji("pre",[t]);Vi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function yt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Io},jo?jo.ops.push(e.curOp):e.curOp.ownsGroup=jo={ops:[e.curOp],delayedCallbacks:[]}}function bt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new k(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&S(e.cm,e.update)}function _t(e){var t=e.cm,n=t.display;e.updatedDisplay&&M(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Be(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ue(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function kt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new Mt(e.doc,Gr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ao&&vr(e.doc,t)i.viewFrom?Pt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Pt(e);else if(t<=i.viewFrom){var o=Ft(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Pt(e)}else if(n>=i.viewTo){var o=Ft(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Pt(e)}else{var a=Ft(e,t,t,-1),s=Ft(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Rt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Pt(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Nt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Ti(a,n)&&a.push(n)}}}function Pt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Nt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Ft(e,t,n,r){var i,o=Nt(e,t),a=e.display.view;if(!Ao||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;vr(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function jt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Rt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Rt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Nt(e,n)))),r.viewTo=n}function It(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ca(i.scroller,"mousedown",Ot(e,Ut)),po&&11>ho?Ca(i.scroller,"dblclick",Ot(e,function(t){if(!$i(e,t)){var n=Bt(e,t);if(n&&!Qt(e,t)&&!zt(e.display,t)){wa(t);var r=e.findWordAt(n);we(e.doc,r.anchor,r.head)}}})):Ca(i.scroller,"dblclick",function(t){$i(e,t)||wa(t)}),Oo||Ca(i.scroller,"contextmenu",function(t){gn(e,t)});var o,a={end:0};Ca(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Ca(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ca(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!zt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new fe(Mo(s.line,0),ge(e.doc,Mo(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),wa(n)}t()}),Ca(i.scroller,"touchcancel",t),Ca(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zt(e,i.scroller.scrollTop),en(e,i.scroller.scrollLeft,!0),ka(e,"scroll",e))}),Ca(i.scroller,"mousewheel",function(t){tn(e,t)}),Ca(i.scroller,"DOMMouseScroll",function(t){tn(e,t)}),Ca(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={simple:function(t){$i(e,t)||xa(t)},start:function(t){Jt(e,t)},drop:Ot(e,Xt)};var s=i.input.getField();Ca(s,"keyup",function(t){cn.call(e,t)}),Ca(s,"keydown",Ot(e,ln)),Ca(s,"keypress",Ot(e,fn)),Ca(s,"focus",Li(pn,e)),Ca(s,"blur",Li(hn,e))}function Wt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?Ca:_a;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.simple),a(t.display.scroller,"dragover",o.simple),a(t.display.scroller,"drop",o.drop)}}function Ht(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function zt(e,t){for(var n=mi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Bt(e,t,n,r){var i=e.display;if(!n&&"true"==mi(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=ht(e,o,a);if(r&&1==u.xRel&&(l=Gr(e.doc,u.line).text).length==u.ch){var c=Ra(l,l.length,e.options.tabSize)-l.length;u=Mo(u.line,Math.max(0,Math.round((o-ze(e.display).left)/mt(e.display))-c))}return u}function Ut(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||$i(t,e))){if(n.shift=e.shiftKey,zt(n,e))return void(go||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Qt(t,e)){var r=Bt(t,e);switch(window.focus(),yi(e)){case 1:r?qt(t,e,r):mi(e)==n.scroller&&wa(e);break;case 2:go&&(t.state.lastMiddleDown=+new Date),r&&we(t.doc,r),setTimeout(function(){n.input.focus()},20),wa(e);break;case 3:Oo?gn(t,e):dn(t)}}}}function qt(e,t,n){po?setTimeout(Li(Q,e),0):e.curOp.focus=Wi();var r,i=+new Date;No&&No.time>i-400&&0==Ro(No.pos,n)?r="triple":Po&&Po.time>i-400&&0==Ro(Po.pos,n)?(r="double",No={time:i,pos:n}):(r="single",Po={time:i,pos:n});var o,a=e.doc.sel,s=_o?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ua&&!X(e)&&"single"==r&&(o=a.contains(n))>-1&&!a.ranges[o].empty()?Gt(e,t,n,s):Kt(e,t,n,r,s)}function Gt(e,t,n,r){var i=e.display,o=+new Date,a=Ot(e,function(s){go&&(i.scroller.draggable=!1),e.state.draggingText=!1,_a(document,"mouseup",a),_a(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(wa(s),!r&&+new Date-200=h;h++){var m=Gr(u,h).text,y=Ei(m,l,o);l==p?i.push(new fe(Mo(h,y),Mo(h,y))):m.length>y&&i.push(new fe(Mo(h,y),Mo(h,Ei(m,p,o))))}i.length||i.push(new fe(n,n)),Ee(u,de(d.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,$=t;if("single"!=r){if("double"==r)var x=e.findWordAt(t);else var x=new fe(Mo(t.line,0),ge(u,Mo(t.line+1,0)));Ro(x.anchor,w)>0?($=x.head,w=Y(b.from(),x.anchor)):($=x.anchor,w=K(b.to(),x.head))}var i=d.ranges.slice(0);i[f]=new fe(ge(u,w),$),Ee(u,de(i,f),Aa)}}function a(t){var n=++y,i=Bt(e,t,!0,"rect"==r);if(i)if(0!=Ro(i,v)){e.curOp.focus=Wi(),o(i);var s=w(l,u);(i.line>=s.to||i.linem.bottom?20:0;c&&setTimeout(Ot(e,function(){y==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(e){y=1/0,wa(e),l.input.focus(),_a(document,"mousemove",b),_a(document,"mouseup",$),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;wa(t);var c,f,d=u.sel,p=d.ranges;if(i&&!t.shiftKey?(f=u.sel.contains(n),c=f>-1?p[f]:new fe(n,n)):(c=u.sel.primary(),f=u.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=Bt(e,t,!0,!0),f=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?be(u,c,h.anchor,h.head):h}else if("triple"==r){var g=new fe(Mo(n.line,0),ge(u,Mo(n.line+1,0)));c=e.display.shift||u.extend?be(u,c,g.anchor,g.head):g}else c=be(u,c,n);i?-1==f?(f=p.length,Ee(u,de(p.concat([c]),f),{scroll:!1,origin:"*mouse"})):p.length>1&&p[f].empty()&&"single"==r&&!t.shiftKey?(Ee(u,de(p.slice(0,f).concat(p.slice(f+1)),0)),d=u.sel):xe(u,f,c,Aa):(f=0,Ee(u,new ce([c],0),Aa),d=u.sel);var v=n,m=l.wrapper.getBoundingClientRect(),y=0,b=Ot(e,function(e){yi(e)?a(e):s(e)}),$=Ot(e,s);Ca(document,"mousemove",b),Ca(document,"mouseup",$)}function Yt(e,t,n,r,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&wa(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(a>l.bottom||!Ci(e,n))return vi(t);a-=l.top-s.viewOffset;for(var u=0;u=o){var f=Jr(e.doc,a),d=e.options.gutters[u];return i(e,n,e,f,d,t),vi(t)}}}function Qt(e,t){return Yt(e,t,"gutterClick",!0,bi)}function Xt(e){var t=this;if(!$i(t,e)&&!zt(t.display,e)){wa(e),po&&(Vo=+new Date);var n=Bt(t,e,!0),r=e.dataTransfer.files;if(n&&!X(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){var s=new FileReader;s.onload=Ot(t,function(){if(o[r]=s.result,++a==i){n=ge(t.doc,n);var e={from:n,to:n,text:qa(o.join("\n")),origin:"paste"};xn(t.doc,e),ke(t.doc,pe(n,qo(e)))}}),s.readAsText(e)},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(_o?e.altKey:e.ctrlKey))var u=t.listSelections();if(Se(t.doc,pe(n,n)),u)for(var l=0;la.clientWidth||i&&a.scrollHeight>a.clientHeight){if(i&&_o&&go)e:for(var s=t.target,l=o.view;s!=a;s=s.parentNode)for(var u=0;uc?f=Math.max(0,f+c-50):d=Math.min(e.doc.height,d+c+50),T(e,{top:f,bottom:d})}20>Wo&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Ho=(Ho*Wo+n)/(Wo+1),++Wo)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function nn(e,t,n){if("string"==typeof t&&(t=ra[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{X(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Oa}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function rn(e,t,n){for(var r=0;rho&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=an(t,e);yo&&(Uo=r?n:null,!r&&88==n&&!Ka&&(_o?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||un(t)}}function un(e){function t(e){18!=e.keyCode&&e.altKey||(Ha(n,"CodeMirror-crosshair"),_a(document,"keyup",t),_a(document,"mouseover",t))}var n=e.display.lineDiv;za(n,"CodeMirror-crosshair"),Ca(document,"keyup",t),Ca(document,"mouseover",t)}function cn(e){16==e.keyCode&&(this.doc.sel.shift=!1),$i(this,e)}function fn(e){var t=this;if(!(zt(t.display,e)||$i(t,e)||e.ctrlKey&&!e.altKey||_o&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(yo&&n==Uo)return Uo=null,void wa(e);if(!yo||e.which&&!(e.which<10)||!an(t,e)){var i=String.fromCharCode(null==r?n:r);sn(t,e,i)||t.display.input.onKeyPress(e)}}}function dn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,hn(e))},100)}function pn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ka(e,"focus",e),e.state.focused=!0,za(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),go&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ne(e))}function hn(e){e.state.delayingBlurEvent||(e.state.focused&&(ka(e,"blur",e),e.state.focused=!1,Ha(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function gn(e,t){zt(e.display,t)||vn(e,t)||e.display.input.onContextMenu(t)}function vn(e,t){return Ci(e,"gutterContextMenu")?Yt(e,t,"gutterContextMenu",!1,ka):!1}function mn(e,t){if(Ro(e,t.from)<0)return e;if(Ro(e,t.to)<=0)return qo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=qo(t).ch-t.to.ch),Mo(n,r)}function yn(e,t){for(var n=[],r=0;r=0;--i)Cn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Cn(e,t)}}function Cn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Ro(t.from,t.to)){var n=yn(e,t);oi(e,t,n,e.cm?e.cm.curOp.id:NaN),En(e,t,n,tr(e,t));var r=[];Ur(e,function(e,n){n||-1!=Ti(r,e.history)||(gi(e.history,t),r.push(e.history)),En(e,t,null,tr(e,t))})}}function _n(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--l){var f=r.changes[l];if(f.origin=t,c&&!$n(e,f,!1))return void(a.length=0);u.push(ni(e,f));var d=l?yn(e,f):Oi(a);En(e,f,d,rr(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:qo(f)});var p=[];Ur(e,function(e,t){t||-1!=Ti(p,e.history)||(gi(e.history,f),p.push(e.history)),En(e,f,null,rr(e,f))})}}}}function kn(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Ai(e.sel.ranges,function(e){return new fe(Mo(e.anchor.line+t,e.anchor.ch),Mo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Mo(o,Gr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Kr(e,t.from,t.to),n||(n=yn(e,t)),e.cm?Sn(e.cm,t,r):Hr(e,t,r),Se(e,n,Ta)}}function Sn(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Xr(hr(Gr(r,a.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&xi(e),Hr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),Fe(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Dt(e):a.line!=s.line||1!=t.text.length||Wr(e.doc,t)?Dt(e,a.line,s.line+1,c):Lt(e,a.line,"text");var d=Ci(e,"changes"),p=Ci(e,"change");if(p||d){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&bi(e,"change",e,h),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function On(e,t,n,r,i){if(r||(r=n),Ro(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=qa(t)),xn(e,{from:n,to:r,text:t,origin:i})}function Tn(e,t){if(!$i(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!$o){var o=ji("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-We(e.display))+"px; height: "+(t.bottom-t.top+Be(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function An(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=ft(e,t),s=n&&n!=t?ft(e,n):a,l=Rn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(Zt(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(en(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function Mn(e,t,n,r,i){var o=Rn(e,t,n,r,i);null!=o.scrollTop&&Zt(e,o.scrollTop),null!=o.scrollLeft&&en(e,o.scrollLeft)}function Rn(e,t,n,r,i){var o=e.display,a=vt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=qe(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+He(o),f=a>n,d=i>c-a;if(s>n)u.scrollTop=f?0:n;else if(i>s+l){var p=Math.min(n,(d?c:i)-l);p!=s&&(u.scrollTop=p)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ue(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=r-t>g;return v&&(r=t+g),10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(v?0:10)):r>g+h-3&&(u.scrollLeft=r+(v?0:10)-g),u}function Dn(e,t,n){(null!=t||null!=n)&&Pn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Ln(e){Pn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Mo(t.line,t.ch-1):t,r=Mo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Pn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=Rn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Nn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ve(e,t):n="prev");var a=e.options.tabSize,s=Gr(o,t),l=Ra(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Oa||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Ra(Gr(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)d+=a,f+=" ";if(u>d&&(f+=Si(u-d)),f!=c)return On(o,f,Mo(t,0),Mo(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p=0;t--)On(e.doc,"",r[t].from,r[t].to,"+delete");Ln(e)})}function In(e,t,n,r,i){function o(){var t=s+n;return t=e.first+e.size?f=!1:(s=t,c=Gr(e,t))}function a(e){var t=(i?so:lo)(c,l,n,!0);if(null==t){if(e||!o())return f=!1;l=i?(0>n?eo:Zi)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Gr(e,s),f=!0;if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var d=null,p="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(0>n)||a(!g);g=!1){var v=c.text.charAt(l)||"\n",m=Pi(v,h)?"w":p&&"\n"==v?"n":!p||/\s/.test(v)?null:"p";if(!p||g||m||(m="s"),d&&d!=m){0>n&&(n=1,a());break}if(m&&(d=m),n>0&&!a(!g))break}var y=Me(e,Mo(s,l),u,!0);return f||(y.hitSide=!0),y}function Vn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*vt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=ht(e,a,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Wn(t,n,r,i){e.defaults[t]=n,r&&(Ko[t]=i?function(e,t,n){n!=Yo&&r(e,t,n)}:r)}function Hn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ji("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(pr(e,t.line,t,n,o)||t.line!=n.line&&pr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ao=!0}o.addToHistory&&oi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&hr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Qr(e,0),Jn(e,new Yn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){yr(e,t)&&Qr(t,0)}),o.clearOnEnter&&Ca(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(To=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ua,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Dt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Lt(u,c,"text");o.atomic&&Te(u.doc),bi(u,"markerAdded",u,o)}return o}function Un(e,t,n,r,i){r=Di(r),r.shared=!1;var o=[Bn(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Ur(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Bn(e,ge(e,t),ge(e,n),r,i));for(var l=0;l=t:o.to>t);(r||(r=[])).push(new Yn(a,o.from,l?null:o.to))}}return r}function er(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var f=0;ff;++f)h.push(g);h.push(l)}return h}function nr(e){for(var t=0;t0)){var c=[l,1],f=Ro(u.from,s.from),d=Ro(u.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function or(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Ro(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Ro(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function hr(e){for(var t;t=fr(e);)e=t.find(-1,!0).line;return e}function gr(e){for(var t,n;t=dr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function vr(e,t){var n=Gr(e,t),r=hr(n);return n==r?t:Xr(r)}function mr(e,t){if(t>e.lastLine())return t;var n,r=Gr(e,t);if(!yr(e,r))return t;for(;n=dr(r);)r=n.find(1,!0).line;return Xr(r)+1}function yr(e,t){var n=Ao&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Or(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?ta(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=ge(a,t);var l,u=Gr(a,t.line),c=Ve(e,t.line,n),f=new la(u.text,e.options.tabSize);for(r&&(l=[]);(r||f.pose.options.maxHighlightLength?(s=!1,a&&Rr(e,t,r,f.pos),f.pos=t.length,l=null):l=kr(Sr(n,f,r,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;uu;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Mr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ar(e,t,t.stateAfter=Ve(e,Xr(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Rr(e,t,n,r){var i=e.doc.mode,o=new la(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Er(i,n);!o.eol()&&o.pos<=e.options.maxHighlightLength;)Sr(i,o,n),o.start=o.pos}function Dr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ga:ha;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Lr(e,t){var n=ji("span",null,null,go?"padding-right: .1px":null),r={pre:ji("pre",[n]),content:n,col:0,pos:0,cm:e,splitSpaces:(po||go)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Nr,Ki(e.display.measure)&&(o=ei(a))&&(r.addToken=jr(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&Xr(a);Vr(a,r,Mr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=zi(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=zi(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Gi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return go&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),ka(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=zi(r.pre.className,r.textClass||"")),r}function Pr(e){var t=ji("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Nr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Fr):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var d=l.exec(t),p=d?d.index-f:t.length-f;if(p){var h=document.createTextNode(s.slice(f,f+p));po&&9>ho?c.appendChild(ji("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(f+=p+1," "==d[0]){var g=e.cm.options.tabSize,v=g-e.col%g,h=c.appendChild(ji("span",Si(v),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=v}else{var h=e.cm.options.specialCharPlaceholder(d[0]);h.setAttribute("cm-text",d[0]),po&&9>ho?c.appendChild(ji("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),po&&9>ho&&(u=!0),e.pos+=t.length}if(n||r||i||u||a){var m=n||"";r&&(m+=r),i&&(m+=i);var y=ji("span",[c],m,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Fr(e){for(var t=" ",n=0;nu&&d.from<=u)break}if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function Ir(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Vr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,d,p=i.length,h=0,g=1,v="",m=0;;){if(m==h){l=u=c=f=s="",d=null,m=1/0;for(var y=[],b=0;bh||$.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&m>w.to&&(m=w.to,u=""),$.className&&(l+=" "+$.className),$.css&&(s=$.css),$.startStyle&&w.from==h&&(c+=" "+$.startStyle),$.endStyle&&w.to==m&&(u+=" "+$.endStyle),$.title&&!f&&(f=$.title),$.collapsed&&(!d||ur(d.marker,$)<0)&&(d=w)):w.from>h&&m>w.from&&(m=w.from)}if(d&&(d.from||0)==h){if(Ir(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}if(!d&&y.length)for(var b=0;b=p)break;for(var x=Math.min(p,m);;){if(v){var C=h+v.length;if(!d){var _=C>x?v.slice(0,x-h):v;t.addToken(t,_,a?a+l:l,c,h+_.length==m?u:"",f,s)}if(C>=x){v=v.slice(x-h),h=x;break}h=C,c=""}v=i.slice(o,o=n[g++]),a=Dr(n[g++],t.cm.options)}}else for(var g=1;gn;++n)o.push(new pa(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Gr(e,s.line),f=Gr(e,l.line),d=Oi(u),p=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Wr(e,t)){var g=a(0,u.length-1);o(f,f.text,p),h&&e.remove(s.line,h),g.length&&e.insert(s.line,g)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),p);else{var g=a(1,u.length-1);g.push(new pa(d+c.text.slice(l.ch),p,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,d+f.text.slice(l.ch),p);var g=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,g)}bi(e,"change",e,t)}function zr(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Kr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Yr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Qr(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Xr(e){if(null==e.parent)return null;for(var t=e.parent,n=Ti(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Jr(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function Zr(e){e=hr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Oi(e.done)):void 0}function oi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ii(i,i.lastOp==r))){var s=Oi(o.changes);0==Ro(t.from,t.to)&&0==Ro(t.from,s.to)?s.to=qo(t):o.changes.push(ni(e,t))}else{var l=Oi(i.done);for(l&&l.ranges||li(e.sel,i.done),o={changes:[ni(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||ka(e,"historyAdded")}function ai(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function si(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ai(e,o,Oi(i.done),t))?i.done[i.done.length-1]=t:li(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ri(i.undone)}function li(e,t){var n=Oi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ui(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ci(e){if(!e)return null;for(var t,n=0;n-1&&(Oi(s)[f]=c[f],delete c[f])}}}return i}function pi(e,t,n,r){n0}function _i(e){e.prototype.on=function(e,t){Ca(this,e,t)},e.prototype.off=function(e,t){_a(this,e,t)}}function ki(){this.id=null}function Ei(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function Si(e){for(;Da.length<=e;)Da.push(Oi(Da)+" ");return Da[e]}function Oi(e){return e[e.length-1]}function Ti(e,t){for(var n=0;n-1&&Fa(e)?!0:t.test(e):Fa(e)}function Ni(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Fi(e){return e.charCodeAt(0)>=768&&ja.test(e)}function ji(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Vi(e,t){return Ii(e).appendChild(t)}function Wi(){return document.activeElement}function Hi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function zi(e,t){for(var n=e.split(" "),r=0;r2&&!(po&&8>ho))}var n=Va?ji("span","​"):ji("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px"); -return n.setAttribute("cm-text",""),n}function Ki(e){if(null!=Wa)return Wa;var t=Vi(e,document.createTextNode("AخA")),n=Pa(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Pa(t,1,2).getBoundingClientRect();return Wa=r.right-n.right<3}function Yi(e){if(null!=Ya)return Ya;var t=Vi(e,ji("span","x")),n=t.getBoundingClientRect(),r=Pa(t,0,1).getBoundingClientRect();return Ya=Math.abs(n.left-r.left)>1}function Qi(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function Xi(e){return e.level%2?e.to:e.from}function Ji(e){return e.level%2?e.from:e.to}function Zi(e){var t=ei(e);return t?Xi(t[0]):0}function eo(e){var t=ei(e);return t?Ji(Oi(t)):e.text.length}function to(e,t){var n=Gr(e.doc,t),r=hr(n);r!=n&&(t=Xr(r));var i=ei(r),o=i?i[0].level%2?eo(r):Zi(r):0;return Mo(t,o)}function no(e,t){for(var n,r=Gr(e.doc,t);n=dr(r);)r=n.find(1,!0).line,t=null;var i=ei(r),o=i?i[0].level%2?Zi(r):eo(r):r.text.length;return Mo(null==t?Xr(r):t,o)}function ro(e,t){var n=to(e,t.line),r=Gr(e.doc,n.line),i=ei(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Mo(n.line,a?0:o)}return n}function io(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function oo(e,t){Xa=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return io(e,i.level,e[n].level)?(i.from!=i.to&&(Xa=n),r):(i.from!=i.to&&(Xa=r),n);n=r}}return n}function ao(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Fi(e.text.charAt(t)));return t}function so(e,t,n,r){var i=ei(e);if(!i)return lo(e,t,n,r);for(var o=oo(i,t),a=i[o],s=ao(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?ao(e,a.to,-1,r):ao(e,a.from,1,r)}}function lo(e,t,n,r){var i=t+n;if(r)for(;i>0&&Fi(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var uo=/gecko\/\d/i.test(navigator.userAgent),co=/MSIE \d/.test(navigator.userAgent),fo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),po=co||fo,ho=po&&(co?document.documentMode||6:fo[1]),go=/WebKit\//.test(navigator.userAgent),vo=go&&/Qt\/\d+\.\d+/.test(navigator.userAgent),mo=/Chrome\//.test(navigator.userAgent),yo=/Opera\//.test(navigator.userAgent),bo=/Apple Computer/.test(navigator.vendor),wo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),$o=/PhantomJS/.test(navigator.userAgent),xo=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Co=xo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),_o=xo||/Mac/.test(navigator.platform),ko=/win/i.test(navigator.platform),Eo=yo&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Eo&&(Eo=Number(Eo[1])),Eo&&Eo>=15&&(yo=!1,go=!0);var So=_o&&(vo||yo&&(null==Eo||12.11>Eo)),Oo=uo||po&&ho>=9,To=!1,Ao=!1;g.prototype=Di({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=_o&&!wo?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){mi(e)!=t.vert&&mi(e)!=t.horiz&&Ot(t.cm,Ut)(e)};Ca(this.vert,"mousedown",n),Ca(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),v.prototype=Di({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":g,"null":v},k.prototype.signal=function(e,t){Ci(e,t)&&this.events.push(arguments)},k.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ca(o,"paste",function(){if(go&&!r.state.fakedLastChar&&!(new Date-r.state.lastMiddleDown<200)){var e=o.selectionStart,t=o.selectionEnd;o.value+="$",o.selectionEnd=t,o.selectionStart=e,r.state.fakedLastChar=!0}r.state.pasteIncoming=!0,n.fastPoll()}),Ca(o,"cut",t),Ca(o,"copy",t),Ca(e.scroller,"paste",function(t){zt(e,t)||(r.state.pasteIncoming=!0,n.focus())}),Ca(e.lineSpace,"selectstart",function(t){zt(e,t)||wa(t)}),Ca(o,"compositionstart",function(){var e=r.getCursor("from");n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ca(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=De(e);if(e.options.moveInputWithCursor){var i=ft(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Vi(n.cursorDiv,e.cursors),Vi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ka&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&La(this.textarea),po&&ho>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",po&&ho>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Co||Wi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(!e.state.focused||Ga(t)&&!n||X(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(po&&ho>=9&&this.hasSelection===r||_o&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return St(e,function(){J(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){po&&ho>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,po&&9>ho&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!po||po&&9>ho)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Ot(i,ra.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=Bt(i,e),l=o.scroller.scrollTop;if(s&&!yo){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Ot(i,Ee)(i.doc,pe(s),Ta);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(po?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",go)var f=window.scrollY;if(o.input.focus(),go&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),po&&ho>=9&&t(),Oo){xa(e);var d=function(){_a(window,"mouseup",d),setTimeout(n,20)};Ca(window,"mouseup",d)}else setTimeout(n,50)}},setUneditable:Mi,needsContentAttribute:!1},ne.prototype),ie.prototype=Di({init:function(e){function t(e){if(r.somethingSelected())Do=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Do=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ta),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!xo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Do.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Do.join("\n");var o=document.activeElement;La(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable="true",te(i),Ca(i,"paste",function(e){var t=e.clipboardData&&e.clipboardData.getData("text/plain");t&&(e.preventDefault(),r.replaceSelection(t,null,"paste"))}),Ca(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=pe(Mo(i.head.line,a),Mo(i.head.line,a+t.length)))}}),Ca(i,"compositionupdate",function(e){n.composing.data=e.data}),Ca(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ca(i,"touchstart",function(){n.forceCompositionEnd()}),Ca(i,"input",function(){n.composing||n.pollContent()||St(n.cm,function(){Dt(r)})}),Ca(i,"copy",t),Ca(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=se(this.cm,e.anchorNode,e.anchorOffset),r=se(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Ro(Y(n,r),t.from())||0!=Ro(K(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=Pa(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):uo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Vi(this.cm.display.cursorDiv,e.cursors),Vi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ia(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():St(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=se(t,e.anchorNode,e.anchorOffset),r=se(t,e.focusNode,e.focusOffset);n&&r&&St(t,function(){Ee(t.doc,pe(n,r),Ta),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Nt(e,r.line)))var a=Xr(t.view[0].line),s=t.view[0].node;else var a=Xr(t.view[o].line),s=t.view[o-1].node.nextSibling;var l=Nt(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.view[l].node;else var u=Xr(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=qa(ue(e,s,c,a,u)),d=Kr(e.doc,Mo(a,0),Mo(u,Gr(e.doc,u).text.length));f.length>1&&d.length>1;)if(Oi(f)==Oi(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var p=0,h=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);m>p&&g.charCodeAt(p)==v.charCodeAt(p);)++p;for(var y=Oi(f),b=Oi(d),w=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));w>h&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=y.slice(0,y.length-h),f[0]=f[0].slice(p);var $=Mo(a,p),x=Mo(u,d.length?Oi(d).length-h:0);return f.length>1||f[0]||Ro($,x)?(On(e.doc,f,$,x,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){e.data&&e.data!=e.startData&&Ot(this.cm,J)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.setAttribute("contenteditable","false")},onKeyPress:function(e){e.preventDefault(),Ot(this.cm,J)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},onContextMenu:Mi,resetPosition:Mi,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Ro(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Lo,Po,No,Fo={left:0,right:0,top:0,bottom:0},jo=null,Io=0,Vo=0,Wo=0,Ho=null;po?Ho=-.53:uo?Ho=15:mo?Ho=-.7:bo&&(Ho=-1/3);var zo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=zo(e);return t.x*=Ho,t.y*=Ho,t};var Bo=new ki,Uo=null,qo=e.changeEnd=function(e){return e.text?Mo(e.from.line+e.text.length-1,Oi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Ko.hasOwnProperty(e)&&Ot(this,Ko[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](zn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Nn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ln(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)Nn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&xe(this.doc,r,new fe(o,u[r].to()),Ta)}}}),getTokenAt:function(e,t){return Or(this,e,t)},getLineTokens:function(e,t){return Or(this,Mo(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Mr(this,Gr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!ea.hasOwnProperty(t))return n;var r=ea[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Gr(this.doc,e)}else n=e;return lt(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-Zr(n):0)},defaultTextHeight:function(){return vt(this.display)},defaultCharWidth:function(){return mt(this.display)},setGutterMarker:Tt(function(e,t,n){return Fn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Ni(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Tt(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Lt(t,r,"gutter"),Ni(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!me(this.doc,e))return null;var t=e;if(e=Gr(this.doc,e),!e)return null}else{var t=Xr(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=ft(this,ge(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Mn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Tt(ln),triggerOnKeyPress:Tt(fn),triggerOnKeyUp:cn,execCommand:function(e){return ra.hasOwnProperty(e)?ra[e](this):void 0},triggerElectric:Tt(function(e){Z(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=ge(this.doc,e);t>o&&(a=In(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Tt(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?In(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Ma)}),deleteH:Tt(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):jn(this,function(n){var i=In(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=ge(this.doc,e);t>a;++a){var l=ft(this,s,"div");if(null==o?o=l.left:l.left=o,s=Vn(this,l,i,n),s.hitSide)break}return s},moveV:Tt(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=ft(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Vn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Dn(n,null,ct(n,l,"div").top-s.top),l},Ma),i.length)for(var a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&a(this),ka(this,"refresh",this)}),swapDoc:Tt(function(e){var t=this.doc;return t.cm=null,qr(this,e),ot(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,bi(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},_i(e);var Go=e.defaults={},Ko=e.optionHandlers={},Yo=e.Init={toString:function(){return"CodeMirror.Init"}};Wn("value","",function(e,t){e.setValue(t)},!0),Wn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Wn("indentUnit",2,n,!0),Wn("indentWithTabs",!1),Wn("smartIndent",!0),Wn("tabSize",4,function(e){r(e),ot(e),Dt(e)},!0),Wn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Wn("specialCharPlaceholder",Pr,function(e){e.refresh()},!0),Wn("electricChars",!0),Wn("inputStyle",Co?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Wn("rtlMoveVisually",!ko),Wn("wholeLineUpdateBefore",!0),Wn("theme","default",function(e){s(e),l(e)},!0),Wn("keyMap","default",function(t,n,r){var i=zn(n),o=r!=e.Init&&zn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Wn("extraKeys",null),Wn("lineWrapping",!1,i,!0),Wn("gutters",[],function(e){p(e.options),l(e)},!0),Wn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?_(e.display)+"px":"0",e.refresh()},!0),Wn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Wn("scrollbarStyle","native",function(e){m(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Wn("lineNumbers",!1,function(e){p(e.options),l(e)},!0),Wn("firstLineNumber",1,l,!0),Wn("lineNumberFormatter",function(e){return e},l,!0),Wn("showCursorWhenSelecting",!1,Re,!0),Wn("resetSelectionOnContextMenu",!0),Wn("lineWiseCopyCut",!0),Wn("readOnly",!1,function(e,t){"nocursor"==t?(hn(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||e.display.input.reset())}),Wn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Wn("dragDrop",!0,Wt),Wn("cursorBlinkRate",530),Wn("cursorScrollMargin",0),Wn("cursorHeight",1,Re,!0),Wn("singleCursorHeightPerLine",!0,Re,!0),Wn("workTime",100),Wn("workDelay",100),Wn("flattenSpans",!0,r,!0),Wn("addModeClass",!1,r,!0),Wn("pollInterval",100),Wn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Wn("historyEventDelay",1250),Wn("viewportMargin",10,function(e){e.refresh()},!0),Wn("maxHighlightLength",1e4,r,!0),Wn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Wn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Wn("autofocus",null);var Qo=e.modes={},Xo=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Qo[t]=n},e.defineMIME=function(e,t){Xo[e]=t},e.resolveMode=function(t){if("string"==typeof t&&Xo.hasOwnProperty(t))t=Xo[t];else if(t&&"string"==typeof t.name&&Xo.hasOwnProperty(t.name)){var n=Xo[t.name];"string"==typeof n&&(n={name:n}),t=Ri(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=Qo[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(Jo.hasOwnProperty(n.name)){var o=Jo[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var Jo=e.modeExtensions={};e.extendMode=function(e,t){var n=Jo.hasOwnProperty(e)?Jo[e]:Jo[e]={};Di(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){ma.prototype[e]=t},e.defineOption=Wn;var Zo=[];e.defineInitHook=function(e){Zo.push(e)};var ea=e.helpers={};e.registerHelper=function(t,n,r){ea.hasOwnProperty(t)||(ea[t]=e[t]={_global:[]}),ea[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),ea[t]._global.push({pred:r,val:i})};var ta=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},na=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ra=e.commands={selectAll:function(e){e.setSelection(Mo(e.firstLine(),0),Mo(e.lastLine()),Ta)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ta)},killLine:function(e){jn(e,function(t){if(t.empty()){var n=Gr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Mo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Mo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Gr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+"\n"+a.charAt(a.length-1),Mo(i.line-1,a.length-1),Mo(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){St(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange("\n",r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0),Ln(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},ia=e.keyMap={};ia.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ia.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ia.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ia.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ia["default"]=_o?ia.macDefault:ia.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Ai(n.split(" "),Hn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ua=0,ca=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ua};_i(ca),ca.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yt(e),Ci(this,"clear")){var n=this.find();n&&bi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Te(e.doc)),e&&bi(e,"markerCleared",e,this),t&&wt(e),this.parent&&this.parent.clear()}},ca.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,_r(i),bi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Br.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof zr))){var s=[];this.collapse(s),this.children=[new zr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new zr(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Br(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Ti(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Br(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var va=0,ma=e.Doc=function(e,t,n){if(!(this instanceof ma))return new ma(e,t,n);null==n&&(n=0),Br.call(this,[new zr([new pa("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Mo(n,0);this.sel=pe(r),this.history=new ti(null),this.id=++va,this.modeOption=t,"string"==typeof e&&(e=qa(e)),Hr(this,{from:r,to:r,text:e}),Ee(this,pe(r),Ta)};ma.prototype=Ri(Br.prototype,{constructor:ma,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)xn(this,r[o]);s?ke(this,s):this.cm&&Ln(this.cm)}),undo:At(function(){_n(this,"undo")}),redo:At(function(){_n(this,"redo")}),undoSelection:At(function(){_n(this,"undo",!0)}),redoSelection:At(function(){_n(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ge(this,e),t=ge(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;sl.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),ge(this,Mo(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Da=[""],La=function(e){e.select()};xo?La=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:po&&(La=function(e){try{e.select()}catch(t){}});var Pa,Na=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Fa=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Na.test(e))},ja=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Pa=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ia=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};po&&11>ho&&(Wi=function(){try{return document.activeElement}catch(e){return document.body}});var Va,Wa,Ha=e.rmClass=function(e,t){var n=e.className,r=Hi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},za=e.addClass=function(e,t){var n=e.className;Hi(t).test(n)||(e.className+=(n?" ":"")+t)},Ba=!1,Ua=function(){if(po&&9>ho)return!1;var e=ji("div");return"draggable"in e||"dragDrop"in e}(),qa=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ga=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Ka=function(){var e=ji("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ya=null,Qa={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Qa,function(){for(var e=0;10>e;e++)Qa[e+48]=Qa[e+96]=String(e);for(var e=65;90>=e;e++)Qa[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Qa[e+111]=Qa[e+63235]="F"+e}();var Xa,Ja=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,f=[],d=0;c>d;++d)f.push(r=e(n.charCodeAt(d)));for(var d=0,p=u;c>d;++d){var r=f[d];"m"==r?f[d]=p:p=r}for(var d=0,h=u;c>d;++d){var r=f[d];"1"==r&&"r"==h?f[d]="n":a.test(r)&&(h=r,"r"==r&&(f[d]="R"))}for(var d=1,p=f[0];c-1>d;++d){var r=f[d];"+"==r&&"1"==p&&"1"==f[d+1]?f[d]="1":","!=r||p!=f[d+1]||"1"!=p&&"n"!=p||(f[d]=p),p=r}for(var d=0;c>d;++d){var r=f[d];if(","==r)f[d]="N";else if("%"==r){for(var g=d+1;c>g&&"%"==f[g];++g);for(var v=d&&"!"==f[d-1]||c>g&&"1"==f[g]?"1":"N",m=d;g>m;++m)f[m]=v;d=g-1}}for(var d=0,h=u;c>d;++d){var r=f[d];"L"==h&&"1"==r?f[d]="L":a.test(r)&&(h=r)}for(var d=0;c>d;++d)if(o.test(f[d])){for(var g=d+1;c>g&&o.test(f[g]);++g);for(var y="L"==(d?f[d-1]:u),b="L"==(c>g?f[g]:u),v=y||b?"L":"R",m=d;g>m;++m)f[m]=v;d=g-1}for(var w,$=[],d=0;c>d;)if(s.test(f[d])){var x=d;for(++d;c>d&&s.test(f[d]);++d);$.push(new t(0,x,d))}else{var C=d,_=$.length;for(++d;c>d&&"L"!=f[d];++d);for(var m=C;d>m;)if(l.test(f[m])){m>C&&$.splice(_,0,new t(1,C,m));var k=m;for(++m;d>m&&l.test(f[m]);++m);$.splice(_,0,new t(2,k,m)),C=m}else++m;d>C&&$.splice(_,0,new t(1,C,d))}return 1==$[0].level&&(w=n.match(/^\s+/))&&($[0].from=w[0].length,$.unshift(new t(0,0,w[0].length))),1==Oi($).level&&(w=n.match(/\s+$/))&&(Oi($).to-=w[0].length,$.push(new t(0,c-w[0].length,c))),2==$[0].level&&$.unshift(new t(1,$[0].to,$[0].to)),$[0].level!=Oi($).level&&$.push(new t($[0].level,c,c)),$}}();return e.version="5.3.0",e})},function(e,t,n){n(152),e.exports=angular},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nr;r++){var o=e[r][n];if(o)if(o instanceof Array)for(var a in o)t[o[a]]=!0;else t[o]=!0}return Object.keys(t)}},{key:"getSortFieldName",value:function(){return this._targetEntity.name()+"_ListView."+(this.sortField()||this._targetField.name())}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nn;n++){var i=t[n];e[i.name()]=i}return e}},{key:"listActions",value:function(e){return arguments.length?(this._listActions=e,this):this._listActions}}]),t}(u["default"]);t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0}},{key:"addChild",value:function(t){if(!(t instanceof e))throw new Error("Only Menu instances are accepted as children of a Menu");return this._children.push(t),this}},{key:"hasChild",value:function(){return this._children.length>0}},{key:"getChildByTitle",value:function(e){return this.children().filter(function(t){return t.title()==e}).pop()}},{key:"children",value:function(){return arguments.length?(this._children=arguments[0],this):this._children}},{key:"icon",value:function(){return arguments.length?(this._icon=arguments[0],this):this._icon}},{key:"template",value:function(){return arguments.length?(this._template=arguments[0],this):this._template}},{key:"populateFromEntity",value:function(e){if(!(e instanceof l["default"]))throw new Error("populateFromEntity() only accepts an Entity parameter");return this.title(e.label()),this.active(function(t){return 0===t.indexOf("/"+e.name()+"/")}),this.link("/"+e.name()+"/list"),this.icon(e.menuView().icon()),this}}]),e}();t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function o(e,t,n){r(this,o),this._restWrapper=e,this._promisesResolver=t,this._application=n};t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={order:function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()})}},e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={camelCase:function(e){if(!e)return e;var t=e.charAt(0).toUpperCase();return e=t+e.substr(1),e.replace(/[-_](.)/g,function(e,t){return" "+t.toUpperCase()})}},e.exports=t["default"]},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return'
'}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){if(e!==t){var n=null===e,r=e===E,i=e===e,o=null===t,a=t===E,s=t===t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function a(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i-1;);return n}function f(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function d(e,t){return o(e.criteria,t.criteria)||e.index-t.index}function p(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,s=i.length,l=n.length;++r=l?u:u*(n[r]?1:-1)}return e.index-t.index}function h(e){return Ge[e]}function g(e){return Ke[e]}function v(e){return"\\"+Xe[e]}function m(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i=e&&e>=9&&13>=e||32==e||160==e||5760==e||6158==e||e>=8192&&(8202>=e||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function w(e,t){for(var n=-1,r=e.length,i=-1,o=[];++nt,r=Hn(0,e.length,this.__views__),i=r.start,o=r.end,a=o-i,s=n?o:i-1,l=ba(a,this.__takeCount__),u=this.__iteratees__,c=u?u.length:0,f=0,d=[];e:for(;a--&&l>f;){s+=t;for(var p=-1,h=e[s];++pg.index:s-1?g.count++>=y:!v(h)))continue e}}else{var b=v(h);if(m==z)h=b;else if(!b){if(m==H)continue e;break e}}}d[f++]=h}return d}function ie(){this.__data__={}}function Ge(e){return this.has(e)&&delete this.__data__[e]}function Ke(e){return"__proto__"==e?E:this.__data__[e]}function Ye(e){return"__proto__"!=e&&Yo.call(this.__data__,e)}function Qe(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function Xe(e){var t=e?e.length:0;for(this.data={hash:ha(null),set:new la};t--;)this.push(e[t])}function Je(e,t){var n=e.data,r="string"==typeof t||Oi(t)?n.set.has(t):n.hash[t];return r?0:-1}function Ze(e){var t=this.data;"string"==typeof e||Oi(e)?t.set.add(e):t.hash[e]=!0}function et(e,t){var n=-1,r=e.length;for(t||(t=Lo(r));++n=200?Va(t):null,u=t.length;l&&(o=Je,a=!1,t=l);e:for(;++in&&(n=-n>i?0:i+n),r=r===E||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)e[n++]=t;return e}function Et(e,t){var n=[];return Pa(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function St(e,t,n,r){var i;return n(e,function(e,n,o){return t(e,n,o)?(i=r?n:e,!1):void 0}),i}function Ot(e,t,n){for(var r=-1,i=e.length,o=-1,a=[];++rr;)e=e[t[r++]];return r&&r==i?e:E}}function Lt(e,t,n,r,i,o){return e===t?!0:null==e||null==t||!Oi(e)&&!y(t)?e!==e&&t!==t:Pt(e,t,Lt,n,r,i,o)}function Pt(e,t,n,r,i,o,a){var s=Ss(e),l=Ss(t),u=G,c=G;s||(u=Xo.call(e),u==q?u=ee:u!=ee&&(s=Ni(e))),l||(c=Xo.call(t),c==q?c=ee:c!=ee&&(l=Ni(t)));var f=u==ee,d=c==ee,p=u==c;if(p&&!s&&!f)return Pn(e,t,u);if(!i){var h=f&&Yo.call(e,"__wrapped__"),g=d&&Yo.call(t,"__wrapped__");if(h||g)return n(h?e.value():e,g?t.value():t,r,i,o,a)}if(!p)return!1;o||(o=[]),a||(a=[]);for(var v=o.length;v--;)if(o[v]==e)return a[v]==t;o.push(e),a.push(t);var m=(s?Ln:Nn)(e,t,n,r,i,o,a);return o.pop(),a.pop(),m}function Nt(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=sr(e);r--;){var a=t[r];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++rt&&(t=-t>i?0:i+t),n=n===E||n>i?i:+n||0,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Lo(i);++r=200,l=a?Va():null,u=[];l?(r=Je,o=!1):(a=!1,l=t?[]:u);e:for(;++n=i){for(;i>r;){var o=r+i>>>1,a=e[o];(n?t>=a:t>a)&&null!==a?r=o+1:i=o}return i}return rn(e,t,$o,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,s=null===t,l=t===E;o>i;){var u=ia((i+o)/2),c=n(e[u]),f=c!==E,d=c===c;if(a)var p=d||r;else p=s?d&&f&&(r||null!=c):l?d&&(r||f):null==c?!1:r?t>=c:t>c;p?i=u+1:o=u}return ba(o,Sa)}function on(e,t,n){if("function"!=typeof e)return $o;if(t===E)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function an(e){return ta.call(e,0)}function sn(e,t,n){for(var r=n.length,i=-1,o=ya(e.length-r,0),a=-1,s=t.length,l=Lo(o+s);++a2?n[i-2]:E,a=i>2?n[2]:E,s=i>1?n[i-1]:E;for("function"==typeof o?(o=on(o,s,5),i-=2):(o="function"==typeof s?s:E,i-=o?1:0),a&&Yn(n[0],n[1],a)&&(o=3>i?E:o,i=1);++r-1?n[o]:E}return St(n,r,e)}}function bn(e){return function(t,n,r){return t&&t.length?(n=Fn(n,r,3),a(t,n,e)):-1}}function wn(e){return function(t,n,r){return n=Fn(n,r,3),St(t,n,e,!0)}}function $n(e){return function(){for(var t,n=arguments.length,i=e?n:-1,o=0,a=Lo(n);e?i--:++iy){var _=s?et(s):null,k=ya(u-y,0),S=h?C:null,A=h?null:C,M=h?$:null,R=h?null:$;t|=h?D:L,t&=~(h?L:D),g||(t&=~(O|T));var P=[e,t,n,M,S,R,A,_,l,k],N=Tn.apply(E,P);return Xn(e)&&za(N,P),N.placeholder=x,N}}var F=d?n:this,j=p?F[e]:e;return s&&($=rr($,s)),f&&l<$.length&&($.length=l),this&&this!==rt&&this instanceof c&&(j=m||gn(e)),j.apply(F,$)}var f=t&P,d=t&O,p=t&T,h=t&M,g=t&A,v=t&R,m=p?null:gn(e);return c}function An(e,t,n){var r=e.length;if(t=+t,r>=t||!va(t))return"";var i=t-r;return n=null==n?" ":n+"",uo(n,na(i/n.length)).slice(0,i)}function Mn(e,t,n,r){function i(){for(var t=-1,s=arguments.length,l=-1,u=r.length,c=Lo(s+u);++ll))return!1;for(;++s-1&&e%1==0&&t>e}function Yn(e,t,n){if(!Oi(n))return!1;var r=typeof t;if("number"==r?Gn(n)&&Kn(t,n.length):"string"==r&&t in n){var i=n[t];return e===e?e===i:i!==i}return!1}function Qn(e,t){var n=typeof e;if("string"==n&&Ee.test(e)||"number"==n)return!0;if(Ss(e))return!1;var r=!ke.test(e);return r||null!=t&&e in sr(t)}function Xn(e){var n=jn(e);if(!(n in i.prototype))return!1;var r=t[n];if(e===r)return!0;var o=Wa(r);return!!o&&e===o[0]}function Jn(e){return"number"==typeof e&&e>-1&&e%1==0&&Aa>=e}function Zn(e){return e===e&&!Oi(e)}function er(e,t){var n=e[1],r=t[1],i=n|r,o=P>i,a=r==P&&n==M||r==P&&n==N&&e[7].length<=t[8]||r==(P|N)&&n==M;if(!o&&!a)return e;r&O&&(e[2]=t[2],i|=n&O?0:A);var s=t[3];if(s){var l=e[3];e[3]=l?sn(l,s,t[4]):et(s),e[4]=l?w(e[3],U):et(t[4])}return s=t[5],s&&(l=e[5],e[5]=l?ln(l,s,t[6]):et(s),e[6]=l?w(e[5],U):et(t[6])),s=t[7],s&&(e[7]=et(s)),r&P&&(e[8]=null==e[8]?t[8]:ba(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function tr(e,t){e=sr(e);for(var n=-1,r=t.length,i={};++nr;)a[++o]=Gt(e,r,r+=t);return a}function fr(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++tt?0:t)):[]}function pr(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0,0>t?0:t)):[]}function hr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0,!0):[]}function gr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0):[]}function vr(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&Yn(e,t,n)&&(n=0,r=i),kt(e,t,n,r)):[]}function mr(e){return e?e[0]:E}function yr(e,t,n){var r=e?e.length:0;return n&&Yn(e,t,n)&&(t=!1),r?Ot(e,t):[]}function br(e){var t=e?e.length:0;return t?Ot(e,!0):[]}function wr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?ya(r+n,0):n;else if(n){var i=nn(e,t),o=e[i];return(t===t?t===o:o!==o)?i:-1}return s(e,t,n||0)}function $r(e){return pr(e,1)}function xr(e){var t=e?e.length:0;return t?e[t-1]:E}function Cr(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(0>n?ya(r+n,0):ba(n||0,r-1))+1;else if(n){i=nn(e,t,!0)-1;var o=e[i];return(t===t?t===o:o!==o)?i:-1}if(t!==t)return m(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function _r(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=In(),i=e.length;++n-1;)ca.call(t,o,1);return t}function kr(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=Fn(t,n,3);++it?0:t)):[]}function Tr(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0>t?0:t)):[]}function Ar(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!1,!0):[]}function Mr(e,t,n){return e&&e.length?en(e,Fn(t,n,3)):[]}function Rr(e,t,n,r){var i=e?e.length:0;if(!i)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=Yn(e,t,r)?null:t,t=!1);var o=Fn();return(null!=n||o!==bt)&&(n=o(n,r,3)),t&&In()==s?$(e,n):Jt(e,n)}function Dr(e){if(!e||!e.length)return[];var t=-1,n=0;e=st(e,function(e){return Gn(e)?(n=ya(e.length,n),!0):void 0});for(var r=Lo(n);++tn?ya(i+n,0):n||0,"string"==typeof e||!Ss(e)&&Pi(e)?i>n&&e.indexOf(t,n)>-1:In(e,t,n)>-1):!1}function Qr(e,t,n){var r=Ss(e)?lt:Ft;return t=Fn(t,n,3),r(e,t)}function Xr(e,t){return Qr(e,So(t))}function Jr(e,t,n){var r=Ss(e)?st:Et;return t=Fn(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function Zr(e,t,n){if(n?Yn(e,t,n):null==t){e=ar(e);var r=e.length;return r>0?e[Ut(0,r-1)]:E}var i=-1,o=Vi(e),r=o.length,a=r-1;for(t=ba(0>t?0:+t||0,r);++i0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}}function ui(e,t,n){function r(){d&&ra(d),l&&ra(l),l=d=p=E}function i(){var n=t-(hs()-c);if(0>=n||n>t){l&&ra(l);var r=p;l=d=p=E,r&&(h=hs(),u=e.apply(f,s),d||l||(s=f=null))}else d=ua(i,n)}function o(){d&&ra(d),l=d=p=E,(v||g!==t)&&(h=hs(),u=e.apply(f,s),d||l||(s=f=null))}function a(){if(s=arguments,c=hs(),f=this,p=v&&(d||!m),g===!1)var n=m&&!d;else{l||m||(h=c);var r=g-(c-h),a=0>=r||r>g;a?(l&&(l=ra(l)),h=c,u=e.apply(f,s)):l||(l=ua(o,r))}return a&&d?d=ra(d):d||t===g||(d=ua(i,t)),n&&(a=!0,u=e.apply(f,s)),!a||d||l||(s=f=null),u}var s,l,u,c,f,d,p,h=0,g=!1,v=!0;if("function"!=typeof e)throw new zo(B);if(t=0>t?0:+t||0,n===!0){var m=!0;v=!1}else Oi(n)&&(m=n.leading,g="maxWait"in n&&ya(+n.maxWait||0,t),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function ci(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new zo(B);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new ci.Cache,n}function fi(e){if("function"!=typeof e)throw new zo(B);return function(){return!e.apply(this,arguments)}}function di(e){return li(2,e)}function pi(e,t){if("function"!=typeof e)throw new zo(B);return t=ya(t===E?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=ya(n.length-t,0),o=Lo(i);++rt}function wi(e,t){return e>=t}function $i(e){return y(e)&&Gn(e)&&Xo.call(e)==q}function xi(e){return e===!0||e===!1||y(e)&&Xo.call(e)==K}function Ci(e){return y(e)&&Xo.call(e)==Y}function _i(e){return!!e&&1===e.nodeType&&y(e)&&Xo.call(e).indexOf("Element")>-1}function ki(e){return null==e?!0:Gn(e)&&(Ss(e)||Pi(e)||$i(e)||y(e)&&Ts(e.splice))?!e.length:!Is(e).length}function Ei(e,t,n,r){n="function"==typeof n?on(n,r,3):E;var i=n?n(e,t):E;return i===E?Lt(e,t,n):!!i}function Si(e){return y(e)&&"string"==typeof e.message&&Xo.call(e)==Q}function Oi(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ti(e,t,n,r){return n="function"==typeof n?on(n,r,3):E,Nt(e,Vn(t),n)}function Ai(e){return Di(e)&&e!=+e}function Mi(e){return null==e?!1:Xo.call(e)==X?Zo.test(Ko.call(e)):y(e)&&Pe.test(e)}function Ri(e){return null===e}function Di(e){return"number"==typeof e||y(e)&&Xo.call(e)==Z}function Li(e){return y(e)&&Xo.call(e)==te}function Pi(e){return"string"==typeof e||y(e)&&Xo.call(e)==re}function Ni(e){return y(e)&&Jn(e.length)&&!!Be[Xo.call(e)]}function Fi(e){return e===E}function ji(e,t){return t>e}function Ii(e,t){return t>=e}function Vi(e){var t=e?Ha(e):0;return Jn(t)?t?et(e):[]:Ji(e)}function Wi(e){return yt(e,Gi(e))}function Hi(e,t,n){var r=La(e);return n&&Yn(e,t,n)&&(t=null),t?vt(r,t):r}function zi(e){return Rt(e,Gi(e))}function Bi(e,t,n){var r=null==e?E:Dt(e,lr(t),t+"");return r===E?n:r}function Ui(e,t){if(null==e)return!1;var n=Yo.call(e,t);if(!n&&!Qn(t)){if(t=lr(t),e=1==t.length?e:Dt(e,Gt(t,0,-1)),null==e)return!1;t=xr(t),n=Yo.call(e,t)}return n||Jn(e.length)&&Kn(t,e.length)&&(Ss(e)||$i(e))}function qi(e,t,n){n&&Yn(e,t,n)&&(t=null);for(var r=-1,i=Is(e),o=i.length,a={};++r0;++r=ba(t,n)&&en?0:+n||0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function oo(e){return e=u(e),e&&$e.test(e)?e.replace(be,g):e}function ao(e){return e=u(e),e&&Te.test(e)?e.replace(Oe,"\\$&"):e}function so(e,t,n){e=u(e),t=+t;var r=e.length;if(r>=t||!va(t))return e;var i=(t-r)/2,o=ia(i),a=na(i);return n=An("",a,n),n.slice(0,o)+e+n}function lo(e,t,n){return n&&Yn(e,t,n)&&(t=0),xa(e,t)}function uo(e,t){var n="";if(e=u(e),t=+t,1>t||!e||!va(t))return n;do t%2&&(n+=e),t=ia(t/2),e+=e;while(t);return n}function co(e,t,n){return e=u(e),n=null==n?0:ba(0>n?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function fo(e,n,r){var i=t.templateSettings;r&&Yn(e,n,r)&&(n=r=null),e=u(e),n=gt(vt({},r||n),i,ht);var o,a,s=gt(vt({},n.imports),i.imports,ht),l=Is(s),c=Zt(s,l),f=0,d=n.interpolate||je,p="__p += '",h=Wo((n.escape||je).source+"|"+d.source+"|"+(d===_e?Re:je).source+"|"+(n.evaluate||je).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++ze+"]")+"\n";e.replace(h,function(t,n,r,i,s,l){return r||(r=i),p+=e.slice(f,l).replace(Ie,v),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=l+t.length,t}),p+="';\n";var m=n.variable;m||(p="with (obj) {\n"+p+"\n}\n"),p=(a?p.replace(ge,""):p).replace(ve,"$1").replace(me,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Xs(function(){return Fo(l,g+"return "+p).apply(E,c)});if(y.source=p,Si(y))throw y;return y}function po(e,t,n){var r=e;return(e=u(e))?(n?Yn(r,t,n):null==t)?e.slice(x(e),C(e)+1):(t+="",e.slice(c(e,t),f(e,t)+1)):e}function ho(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(x(e)):e.slice(c(e,t+"")):e}function go(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(0,C(e)+1):e.slice(0,f(e,t+"")+1):e}function vo(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=F,i=j;if(null!=t)if(Oi(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?u(t.omission):i}else r=+t||0;if(e=u(e),r>=e.length)return e;var a=r-i.length;if(1>a)return i;var s=e.slice(0,a);if(null==o)return s+i;if(Li(o)){if(e.slice(a).search(o)){var l,c,f=e.slice(0,a);for(o.global||(o=Wo(o.source,(De.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(f);)c=l.index;s=s.slice(0,null==c?a:c)}}else if(e.indexOf(o,a)!=a){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+i}function mo(e){return e=u(e),e&&we.test(e)?e.replace(ye,_):e}function yo(e,t,n){return n&&Yn(e,t,n)&&(t=null),e=u(e),e.match(t||Ve)||[]}function bo(e,t,n){return n&&Yn(e,t,n)&&(t=null),y(e)?xo(e):bt(e,t)}function wo(e){return function(){return e}}function $o(e){return e}function xo(e){return jt(wt(e,!0))}function Co(e,t){return It(e,wt(t,!0))}function _o(e,t,n){if(null==n){var r=Oi(t),i=r?Is(t):null,o=i&&i.length?Rt(t,i):null;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Rt(t,Is(t)));var a=!0,s=-1,l=Ts(e),u=o.length;n===!1?a=!1:Oi(n)&&"chain"in n&&(a=n.chain);for(;++se||!va(e))return[];var r=-1,i=Lo(ba(e,Ea));for(t=on(t,n,1);++rr?i[r]=t(r):t(r);return i}function Mo(e){var t=++Qo;return u(e)+t}function Ro(e,t){return(+e||0)+(+t||0)}function Do(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=Fn(),i=null==t;return i&&r===bt||(i=!1,t=r(t,n,3)),i?dt(Ss(e)?e:ar(e)):Xt(e,t)}e=e?it.defaults(rt.Object(),e,it.pick(rt,He)):rt;var Lo=e.Array,Po=e.Date,No=e.Error,Fo=e.Function,jo=e.Math,Io=e.Number,Vo=e.Object,Wo=e.RegExp,Ho=e.String,zo=e.TypeError,Bo=Lo.prototype,Uo=Vo.prototype,qo=Ho.prototype,Go=(Go=e.window)?Go.document:null,Ko=Fo.prototype.toString,Yo=Uo.hasOwnProperty,Qo=0,Xo=Uo.toString,Jo=e._,Zo=Wo("^"+ao(Ko.call(Yo)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ea=Wn(e,"ArrayBuffer"),ta=Wn(ea&&new ea(0),"slice"),na=jo.ceil,ra=e.clearTimeout,ia=jo.floor,oa=Wn(Vo,"getPrototypeOf"),aa=e.parseFloat,sa=Bo.push,la=Wn(e,"Set"),ua=e.setTimeout,ca=Bo.splice,fa=Wn(e,"Uint8Array"),da=Wn(e,"WeakMap"),pa=function(){try{var t=Wn(e,"Float64Array"),n=new t(new ea(10),0,1)&&t}catch(r){}return n||null}(),ha=Wn(Vo,"create"),ga=Wn(Lo,"isArray"),va=e.isFinite,ma=Wn(Vo,"keys"),ya=jo.max,ba=jo.min,wa=Wn(Po,"now"),$a=Wn(Io,"isFinite"),xa=e.parseInt,Ca=jo.random,_a=Io.NEGATIVE_INFINITY,ka=Io.POSITIVE_INFINITY,Ea=4294967295,Sa=Ea-1,Oa=Ea>>>1,Ta=pa?pa.BYTES_PER_ELEMENT:0,Aa=9007199254740991,Ma=da&&new da,Ra={},Da=t.support={};!function(e){var t=function(){this.x=e},n=[];t.prototype={valueOf:e,y:e};for(var r in new t)n.push(r);try{Da.dom=11===Go.createDocumentFragment().nodeType}catch(i){Da.dom=!1}}(1,0),t.templateSettings={escape:xe,evaluate:Ce,interpolate:_e,variable:"",imports:{_:t}};var La=function(){function e(){}return function(t){if(Oi(t)){e.prototype=t;var n=new e;e.prototype=null}return n||{}}}(),Pa=fn(At),Na=fn(Mt,!0),Fa=dn(),ja=dn(!0),Ia=Ma?function(e,t){return Ma.set(e,t),e}:$o;ta||(an=ea&&fa?function(e){var t=e.byteLength,n=pa?ia(t/Ta):0,r=n*Ta,i=new ea(t);if(n){var o=new pa(i,0,n);o.set(new pa(e,0,n))}return t!=r&&(o=new fa(i,r),o.set(new fa(e,r))),i}:wo(null));var Va=ha&&la?function(e){return new Xe(e)}:wo(null),Wa=Ma?function(e){return Ma.get(e)}:Eo,Ha=Ht("length"),za=function(){var e=0,t=0;return function(n,r){var i=hs(),o=V-(i-t);if(t=i,o>0){if(++e>=I)return n}else e=0;return Ia(n,r)}}(),Ba=pi(function(e,t){return Gn(e)?xt(e,Ot(t,!1,!0)):[]}),Ua=bn(),qa=bn(!0),Ga=pi(function(e){for(var t=e.length,n=t,r=Lo(f),i=In(),o=i==s,a=[];n--;){var l=e[n]=Gn(l=e[n])?l:[];r[n]=o&&l.length>=120?Va(n&&l):null}var u=e[0],c=-1,f=u?u.length:0,d=r[0];e:for(;++c2?e[t-2]:E,r=t>1?e[t-1]:E;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):E,r=E),e.length=t,Lr(e,n,r)}),ts=pi(function(e,t){return mt(e,Ot(t))}),ns=un(function(e,t,n){Yo.call(e,n)?++e[n]:e[n]=1}),rs=yn(Pa),is=yn(Na,!0),os=xn(tt,Pa),as=xn(nt,Na),ss=un(function(e,t,n){Yo.call(e,n)?e[n].push(t):e[n]=[t]}),ls=un(function(e,t,n){e[n]=t}),us=pi(function(e,t,n){var r=-1,i="function"==typeof t,o=Qn(t),a=Gn(e)?Lo(e.length):[];return Pa(e,function(e){var s=i?t:o&&null!=e?e[t]:null;a[++r]=s?s.apply(e,n):qn(e,t,n)}),a}),cs=un(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),fs=On(ut,Pa),ds=On(ct,Na),ps=pi(function(e,t){if(null==e)return[];var n=t[2];return n&&Yn(t[0],t[1],n)&&(t.length=1),Qt(e,Ot(t),[])}),hs=wa||function(){return(new Po).getTime()},gs=pi(function(e,t,n){var r=O;if(n.length){var i=w(n,gs.placeholder);r|=D}return Dn(e,r,t,n,i)}),vs=pi(function(e,t){t=t.length?Ot(t):zi(e);for(var n=-1,r=t.length;++ne?n=this.takeRight(-e):e&&(n=this.drop(e)),t!==E&&(t=+t||0,n=0>t?n.dropRight(-t):n.take(t-e)),n},i.prototype.toArray=function(){return this.drop(0)},At(i.prototype,function(e,n){var o=t[n];if(o){var a=/^(?:filter|map|reject)|While$/.test(n),s=/^(?:first|last)$/.test(n);t.prototype[n]=function(){var n=arguments,l=this.__chain__,u=this.__wrapped__,c=!!this.__actions__.length,f=u instanceof i,d=n[0],p=f||Ss(u);p&&a&&"function"==typeof d&&1!=d.length&&(f=p=!1);var h=f&&!c;if(s&&!l)return h?e.call(u):o.call(t,this.value());var g=function(e){var r=[e];return sa.apply(r,n),o.apply(t,r)};if(p){var v=h?u:new i(this),m=e.apply(v,n);if(!s&&(c||m.__actions__)){var y=m.__actions__||(m.__actions__=[]);y.push({func:Ir,args:[g],thisArg:t})}return new r(m,l)}return this.thru(g)}}}),tt(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?qo:Bo)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(e); -t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),At(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name,o=Ra[i]||(Ra[i]=[]);o.push({name:n,func:r})}}),Ra[Tn(null,T).name]=[{name:"wrapper",func:null}],i.prototype.clone=b,i.prototype.reverse=J,i.prototype.value=ne,t.prototype.chain=Vr,t.prototype.commit=Wr,t.prototype.plant=Hr,t.prototype.reverse=zr,t.prototype.toString=Br,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Ur,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var E,S="3.9.3",O=1,T=2,A=4,M=8,R=16,D=32,L=64,P=128,N=256,F=30,j="...",I=150,V=16,W=0,H=1,z=2,B="Expected a function",U="__lodash_placeholder__",q="[object Arguments]",G="[object Array]",K="[object Boolean]",Y="[object Date]",Q="[object Error]",X="[object Function]",J="[object Map]",Z="[object Number]",ee="[object Object]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object WeakMap]",oe="[object ArrayBuffer]",ae="[object Float32Array]",se="[object Float64Array]",le="[object Int8Array]",ue="[object Int16Array]",ce="[object Int32Array]",fe="[object Uint8Array]",de="[object Uint8ClampedArray]",pe="[object Uint16Array]",he="[object Uint32Array]",ge=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ye=/&(?:amp|lt|gt|quot|#39|#96);/g,be=/[&<>"'`]/g,we=RegExp(ye.source),$e=RegExp(be.source),xe=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,_e=/<%=([\s\S]+?)%>/g,ke=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ee=/^\w*$/,Se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Oe=/[.*+?^${}()|[\]\/\\]/g,Te=RegExp(Oe.source),Ae=/[\u0300-\u036f\ufe20-\ufe23]/g,Me=/\\(\\)?/g,Re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,De=/\w*$/,Le=/^0[xX]/,Pe=/^\[object .+?Constructor\]$/,Ne=/^\d+$/,Fe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,je=/($^)/,Ie=/['\n\r\u2028\u2029\\]/g,Ve=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),We=" \f \ufeff\n\r\u2028\u2029 ᠎              ",He=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],ze=-1,Be={};Be[ae]=Be[se]=Be[le]=Be[ue]=Be[ce]=Be[fe]=Be[de]=Be[pe]=Be[he]=!0,Be[q]=Be[G]=Be[oe]=Be[K]=Be[Y]=Be[Q]=Be[X]=Be[J]=Be[Z]=Be[ee]=Be[te]=Be[ne]=Be[re]=Be[ie]=!1;var Ue={};Ue[q]=Ue[G]=Ue[oe]=Ue[K]=Ue[Y]=Ue[ae]=Ue[se]=Ue[le]=Ue[ue]=Ue[ce]=Ue[Z]=Ue[ee]=Ue[te]=Ue[re]=Ue[fe]=Ue[de]=Ue[pe]=Ue[he]=!0,Ue[Q]=Ue[X]=Ue[J]=Ue[ne]=Ue[ie]=!1;var qe={leading:!1,maxWait:0,trailing:!1},Ge={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ke={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ye={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Qe={"function":!0,object:!0},Xe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Je=Qe[typeof t]&&t&&!t.nodeType&&t,Ze=Qe[typeof e]&&e&&!e.nodeType&&e,et=Je&&Ze&&"object"==typeof i&&i&&i.Object&&i,tt=Qe[typeof self]&&self&&self.Object&&self,nt=Qe[typeof window]&&window&&window.Object&&window,rt=(Ze&&Ze.exports===Je&&Je,et||nt!==(this&&this.window)&&nt||tt||this),it=k();rt._=it,r=function(){return it}.call(t,n,t,e),!(r!==E&&(e.exports=r))}).call(this)}).call(t,n(165)(e),function(){return this}())},function(e,t,n){/** +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="http://localhost:8080/",t(0)}([function(e,t,n){n(46),e.exports=n(135)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nn;n++){var i=t[n];e[i.name()]=i}return e}},{key:"getNonOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!1)}},{key:"getOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!0)}},{key:"getReferencedLists",value:function(){for(var e={},t=this._fields.filter(function(e){return"referenced_list"===e.type()}),n=0,r=t.length;r>n;n++){var i=t[n];e[i.name()]=i}return e}},{key:"template",value:function(e){return arguments.length?(this._template=e,this):this._template}},{key:"identifier",value:function(){return this.entity.identifier()}},{key:"actions",value:function(e){return arguments.length?(this._actions=e,this):this._actions}},{key:"removeFields",value:function(){return this._fields=[],this}},{key:"getFields",value:function(){return this._fields}},{key:"getField",value:function(e){return this._fields.filter(function(t){return t.name()===e})[0]}},{key:"getFieldsOfType",value:function(e){return this._fields.filter(function(t){return t.type()===e})}},{key:"addField",value:function(e){return null===e.order()&&e.order(this._fields.length,!0),this._fields.push(e),this._fields=this._fields.sort(function(e,t){return e.order()-t.order()}),this}},{key:"getErrorMessage",value:function(e){return"function"==typeof this._errorMessage?this._errorMessage(e):this._errorMessage}},{key:"errorMessage",value:function(e){return arguments.length?(this._errorMessage=e,this):this._errorMessage}},{key:"url",value:function(e){return arguments.length?(this._url=e,this):this._url}},{key:"getUrl",value:function(e){return"function"==typeof this._url?this._url(e):this._url}},{key:"validate",value:function(e){this._fields.map(function(t){var n=t.validation();"function"==typeof n.validator&&n.validator(e.values[t.name()])})}},{key:"_getReferencesByOptimizationType",value:function(){var e=void 0===arguments[0]?!0:arguments[0],t={},n=this.getReferences();for(var r in n){var i=n[r];!!i.getSingleApiCall()===e&&(t[r]=i)}return t}}],[{key:"flatten",value:function(t){if("Object"===t.constructor.name){console.warn("Passing literal of Field to fields method is deprecated use array instead");var n=[];for(var r in t)n=n.concat(e.flatten(t[r]));return n}return Array.isArray(t)?t.reduce(function(t,n){return t.concat(e.flatten(n))},[]):[t]}}]),e}());t["default"]=s,e.exports=t["default"]},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Di(r):{},Di(Go,r,!1),h(r);var i=r.value;"string"==typeof i&&(i=new ma(i,r.mode)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),a=this.display=new t(n,i,o);a.wrapper.CodeMirror=this,u(this),s(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!_o&&a.input.focus(),m(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new ki,keySeq:null,specialChars:null};var l=this;ho&&11>po&&setTimeout(function(){l.display.input.reset(!0)},20),Vt(this),Bi(),yt(this),this.curOp.forceUpdate=!0,qr(this,i),r.autofocus&&!_o||l.hasFocus()?setTimeout(Li(hn,this),20):pn(this);for(var c in Ko)Ko.hasOwnProperty(c)&&Ko[c](this,r[c],Yo);x(this),r.finishInit&&r.finishInit(this);for(var f=0;fpo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),go||uo&&_o||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Fe(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(za(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ha(e.display.wrapper,"CodeMirror-wrap"),d(e)),a(e),Dt(e),ot(e),setTimeout(function(){y(e)},100)}function o(e){var t=vt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/mt(e.display)-3);return function(i){if(yr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function h(e){var t=Ti(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+He(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ue(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var r=this.vert=ji("div",[ji("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=ji("div",[ji("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),_a(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),_a(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,ho&&8>po&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function m(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ha(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),_a(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?en(t,e):Zt(t,e)},t),t.display.scrollbars.addClass&&za(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&M(e),b(e,p(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function w(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-We(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Jr(t,r),a=Jr(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=Jr(t,Zr(Gr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Jr(t,Zr(Gr(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function $(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=C(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==It(e))return!1;x(e)&&(Pt(e),t.dims=D(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ao&&(o=vr(e.doc,o),a=mr(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;jt(e,o,a),n.viewOffset=Zr(Gr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=It(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Wi();return l>4&&(n.lineDiv.style.display="none"),L(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Wi()!=u&&u.offsetHeight&&u.focus(),Ii(n.cursorDiv),Ii(n.selectionDiv),n.gutters.style.height=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fe(e,400)),n.updateLineNumbers=null,!0}function O(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Be(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+He(e.display)-qe(e),n.top)}),t.visible=w(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&S(e,t);r=!1){M(e);var i=p(e);Re(e),A(e,i),y(e,i)}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function T(e,t){var n=new k(e,t);if(S(e,n)){M(e),O(e,n);var r=p(e);Re(e),A(e,r),y(e,r),n.finish()}}function A(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+Ue(e),t.clientHeight)+"px"}function M(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rpo){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var l=o.line.height-i;if(2>i&&(i=vt(t)),(l>.001||-.001>l)&&(Qr(o.line,i),R(o.line),o.rest))for(var u=0;u=t&&f.lineNumber;f.changes&&(Ti(f.changes,"gutter")>-1&&(d=!1),P(e,f,u,n)),d&&(Ii(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(_(e.options,u)))),s=f.node.nextSibling}else{var h=z(e,f,u,n);a.insertBefore(h,s)}u+=f.size}for(;s;)s=r(s)}function P(e,t,n,r){for(var i=0;ipo&&(e.node.style.zIndex=2)),e.node}function F(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=N(e);e.background=n.insertBefore(ji("div",null,t),n.firstChild)}}function j(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Lr(e,t)}function I(e,t){var n=t.text.className,r=j(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,V(t)):n&&(t.text.className=n)}function V(e){F(e),e.line.wrapClass?N(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function W(e,t,n,r){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=N(t),a=t.gutter=ji("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px");if(e.display.input.setUneditable(a),o.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(ji("div",_(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s1&&(Do&&Do.join("\n")==t?s=r.ranges.length%Do.length==0&&Ai(Do,qa):a.length==r.ranges.length&&(s=Ai(a,function(e){return[e]})));for(var l=r.ranges.length-1;l>=0;l--){var u=r.ranges[l],c=u.from(),f=u.to();u.empty()&&(n&&n>0?c=Mo(c.line,c.ch-n):e.state.overwrite&&!e.state.pasteIncoming&&(f=Mo(f.line,Math.min(Gr(o,f.line).text.length,f.ch+Oi(a).length))));var d=e.curOp.updateInput,h={from:c,to:f,text:s?s[l%s.length]:a,origin:i||(e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input")};xn(e.doc,h),bi(e,"inputRead",e,h)}t&&!e.state.pasteIncoming&&Z(e,t),Ln(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Nn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Nn(e,i.head.line,"smart"));a&&bi(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?u.map:c[i],a=0;ai?e.line:e.rest[i]),f=o[a]+r;return(0>r||s!=t)&&(f=o[a+(r?1:0)]),Mo(l,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Ia(i,t))return ae(Mo(Xr(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Oi(e.rest):e.line;return ae(Mo(Xr(a),a.text.length),o)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,f=r(s,l,n);if(f)return ae(f,o);for(var d=l.nextSibling,h=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(f=r(d,d.firstChild,0))return ae(Mo(f.line,f.ch-h),o);h+=d.textContent.length}for(var p=l.previousSibling,h=n;p;p=p.previousSibling){if(f=r(p,p.firstChild,-1))return ae(Mo(f.line,f.ch+h),o);h+=d.textContent.length}}function ue(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var u,c=t.getAttribute("cm-marker");if(c){var f=e.findMarks(Mo(r,0),Mo(i+1,0),o(+c));return void(f.length&&(u=f[0].find())&&(s+=Kr(e.doc,u.from,u.to).join("\n")))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var a=Y(o.from(),i.from()),s=K(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(l?s:a,l?a:s))}}return new ce(e,t)}function he(e,t){return new ce([new fe(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.linen?Mo(n,Gr(e,n).text.length):ve(t,Gr(e,t.line).text.length)}function ve(e,t){var n=e.ch;return null==n||n>t?Mo(e.line,t):0>n?Mo(e.line,0):e}function me(e,t){return t>=e.first&&t=o.ch:u.to>o.ch))){if(r&&(ka(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var f=c.find(0>a?-1:1);if(0==Ro(f,o)&&(f.ch+=a,f.ch<0?f=f.line>e.first?ge(e,Mo(f.line-1)):null:f.ch>s.text.length&&(f=f.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(ji("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return ct(e,Mo(t,n),"div",f,r)}var s,l,f=Gr(a,t),d=f.text.length;return Qi(ei(f),n||0,null==i?d:i,function(e,t,a){var f,h,p,g=o(e,"left");if(e==t)f=g,h=p=g.left;else{if(f=o(t-1,"right"),"rtl"==a){var v=g;g=f,f=v}h=g.left,p=f.right}null==n&&0==e&&(h=u),f.top-g.top>3&&(r(h,g.top,null,g.bottom),h=u,g.bottoml.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),u+1>h&&(h=u),r(h,f.top,p-h,f.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=ze(e.display),u=l.left,c=Math.max(o.sizerWidth,Be(e)-o.sizer.offsetLeft)-l.right,f=t.from(),d=t.to();if(f.line==d.line)i(f.line,f.ch,d.ch);else{var h=Gr(a,f.line),p=Gr(a,d.line),g=pr(h)==pr(p),v=i(f.line,f.ch,g?h.text.length+1:null).end,m=i(d.line,g?0:null,d.ch).start;g&&(v.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ta(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=Ar(e,o,r,!0);o.styles=s.styles;var l=o.styleClasses,u=s.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!c&&fn?(Fe(e,e.options.workDelay),!0):void 0}),i.length&&St(e,function(){for(var t=0;ta;--s){if(s<=o.first)return o.first;var l=Gr(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Ra(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Ie(e,t,n),a=o>r.first&&Gr(r,o-1).stateAfter;return a=a?ta(r.mode,a):na(r.mode),r.iter(o,t,function(n){Rr(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ye(e,t){t=pr(t);var n=Xr(t),r=e.display.externalMeasured=new Mt(e.doc,t,n);r.lineN=n;var i=r.built=Lr(e,r);return r.text=i.pre,Vi(e.display.lineMeasure,i.pre),r}function Qe(e,t,n,r){return Ze(e,Je(e,t),n,r)}function Xe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):u>t?(i=t-l,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-l,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&i==u-l)for(;sc;c++){for(;s&&Fi(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+lpo&&0==s&&l==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(ho&&e.options.lineWrapping){var f=Pa(a,s,l).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Fo}else i=Pa(a,s,l).getBoundingClientRect()||Fo;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}ho&&11>po&&(i=nt(e.display.measure,i))}else{s>0&&(u=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(ho&&9>po&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+mt(e.display),top:d.top,bottom:d.bottom}:Fo}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(h+p)/2,v=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||Gr(e.doc,t.line),i||(i=Je(e,r));var l=ei(r),u=t.ch;if(!l)return a(u);var c=oo(l,u),f=s(u,c);return null!=Xa&&(f.other=s(u,Xa)),f}function dt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=mt(e.display)*t.ch);var r=Gr(e.doc,t.line),i=Zr(r)+We(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function ht(e,t,n,r){var i=Mo(e,t);return i.xRel=r,n&&(i.outside=!0),i}function pt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return ht(r.first,0,!0,-1);var i=Jr(r,n),o=r.first+r.size-1;if(i>o)return ht(r.first+r.size-1,Gr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Gr(r,i);;){var s=gt(e,a,i,t,n),l=dr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=Xr(a=u.to.line)}}function gt(e,t,n,r,i){function o(r){var i=ft(e,Mo(n,r),"line",t,u);return s=!0,a>i.bottom?i.left-l:av)return ht(n,h,m,1);for(;;){if(c?h==d||h==so(t,d,1):1>=h-d){for(var y=p>r||v-r>=r-p?d:h,b=r-(y==d?p:v);Fi(t.text.charAt(y));)++y;var w=ht(n,y,y==d?g:m,-1>b?-1:b>1?1:0);return w}var $=Math.ceil(f/2),x=d+$;if(c){x=d;for(var _=0;$>_;++_)x=so(t,x,1)}var C=o(x);C>r?(h=x,v=C,(m=s)&&(v+=1e3),f=$):(d=x,p=C,g=s,f-=$)}}function vt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Lo){Lo=ji("pre");for(var t=0;49>t;++t)Lo.appendChild(document.createTextNode("x")),Lo.appendChild(ji("br"));Lo.appendChild(document.createTextNode("x"))}Vi(e.measure,Lo);var n=Lo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Ii(e.measure),n||1}function mt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=ji("span","xxxxxxxxxx"),n=ji("pre",[t]);Vi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function yt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Io},jo?jo.ops.push(e.curOp):e.curOp.ownsGroup=jo={ops:[e.curOp],delayedCallbacks:[]}}function bt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new k(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function _t(e){e.updatedDisplay=e.mustUpdate&&S(e.cm,e.update)}function Ct(e){var t=e.cm,n=t.display;e.updatedDisplay&&M(t),e.barMeasure=p(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ue(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Be(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function kt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new Mt(e.doc,Gr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ao&&vr(e.doc,t)i.viewFrom?Pt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Pt(e);else if(t<=i.viewFrom){var o=Ft(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Pt(e)}else if(n>=i.viewTo){var o=Ft(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Pt(e)}else{var a=Ft(e,t,t,-1),s=Ft(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Rt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Pt(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Nt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Ti(a,n)&&a.push(n)}}}function Pt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Nt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Ft(e,t,n,r){var i,o=Nt(e,t),a=e.display.view;if(!Ao||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;vr(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function jt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Rt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Rt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Nt(e,n)))),r.viewTo=n}function It(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;_a(i.scroller,"mousedown",Ot(e,Bt)),ho&&11>po?_a(i.scroller,"dblclick",Ot(e,function(t){if(!$i(e,t)){var n=Ut(e,t);if(n&&!Qt(e,t)&&!zt(e.display,t)){wa(t);var r=e.findWordAt(n);we(e.doc,r.anchor,r.head)}}})):_a(i.scroller,"dblclick",function(t){$i(e,t)||wa(t)}),Oo||_a(i.scroller,"contextmenu",function(t){gn(e,t)});var o,a={end:0};_a(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),_a(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),_a(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!zt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new fe(Mo(s.line,0),ge(e.doc,Mo(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),wa(n)}t()}),_a(i.scroller,"touchcancel",t),_a(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zt(e,i.scroller.scrollTop),en(e,i.scroller.scrollLeft,!0),ka(e,"scroll",e))}),_a(i.scroller,"mousewheel",function(t){tn(e,t)}),_a(i.scroller,"DOMMouseScroll",function(t){tn(e,t)}),_a(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={simple:function(t){$i(e,t)||xa(t)},start:function(t){Jt(e,t)},drop:Ot(e,Xt)};var s=i.input.getField();_a(s,"keyup",function(t){cn.call(e,t)}),_a(s,"keydown",Ot(e,ln)),_a(s,"keypress",Ot(e,fn)),_a(s,"focus",Li(hn,e)),_a(s,"blur",Li(pn,e))}function Wt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?_a:Ca;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.simple),a(t.display.scroller,"dragover",o.simple),a(t.display.scroller,"drop",o.drop)}}function Ht(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function zt(e,t){for(var n=mi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Ut(e,t,n,r){var i=e.display;if(!n&&"true"==mi(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=pt(e,o,a);if(r&&1==u.xRel&&(l=Gr(e.doc,u.line).text).length==u.ch){var c=Ra(l,l.length,e.options.tabSize)-l.length;u=Mo(u.line,Math.max(0,Math.round((o-ze(e.display).left)/mt(e.display))-c))}return u}function Bt(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||$i(t,e))){if(n.shift=e.shiftKey,zt(n,e))return void(go||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Qt(t,e)){var r=Ut(t,e);switch(window.focus(),yi(e)){case 1:r?qt(t,e,r):mi(e)==n.scroller&&wa(e);break;case 2:go&&(t.state.lastMiddleDown=+new Date),r&&we(t.doc,r),setTimeout(function(){n.input.focus()},20),wa(e);break;case 3:Oo?gn(t,e):dn(t)}}}}function qt(e,t,n){ho?setTimeout(Li(Q,e),0):e.curOp.focus=Wi();var r,i=+new Date;No&&No.time>i-400&&0==Ro(No.pos,n)?r="triple":Po&&Po.time>i-400&&0==Ro(Po.pos,n)?(r="double",No={time:i,pos:n}):(r="single",Po={time:i,pos:n});var o,a=e.doc.sel,s=Co?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ba&&!X(e)&&"single"==r&&(o=a.contains(n))>-1&&!a.ranges[o].empty()?Gt(e,t,n,s):Kt(e,t,n,r,s)}function Gt(e,t,n,r){var i=e.display,o=+new Date,a=Ot(e,function(s){go&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ca(document,"mouseup",a),Ca(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(wa(s),!r&&+new Date-200=p;p++){var m=Gr(u,p).text,y=Ei(m,l,o);l==h?i.push(new fe(Mo(p,y),Mo(p,y))):m.length>y&&i.push(new fe(Mo(p,y),Mo(p,Ei(m,h,o))))}i.length||i.push(new fe(n,n)),Ee(u,de(d.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,$=t;if("single"!=r){if("double"==r)var x=e.findWordAt(t);else var x=new fe(Mo(t.line,0),ge(u,Mo(t.line+1,0)));Ro(x.anchor,w)>0?($=x.head,w=Y(b.from(),x.anchor)):($=x.anchor,w=K(b.to(),x.head))}var i=d.ranges.slice(0);i[f]=new fe(ge(u,w),$),Ee(u,de(i,f),Aa)}}function a(t){var n=++y,i=Ut(e,t,!0,"rect"==r);if(i)if(0!=Ro(i,v)){e.curOp.focus=Wi(),o(i);var s=w(l,u);(i.line>=s.to||i.linem.bottom?20:0;c&&setTimeout(Ot(e,function(){y==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(e){y=1/0,wa(e),l.input.focus(),Ca(document,"mousemove",b),Ca(document,"mouseup",$),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;wa(t);var c,f,d=u.sel,h=d.ranges;if(i&&!t.shiftKey?(f=u.sel.contains(n),c=f>-1?h[f]:new fe(n,n)):(c=u.sel.primary(),f=u.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=Ut(e,t,!0,!0),f=-1;else if("double"==r){var p=e.findWordAt(n);c=e.display.shift||u.extend?be(u,c,p.anchor,p.head):p}else if("triple"==r){var g=new fe(Mo(n.line,0),ge(u,Mo(n.line+1,0)));c=e.display.shift||u.extend?be(u,c,g.anchor,g.head):g}else c=be(u,c,n);i?-1==f?(f=h.length,Ee(u,de(h.concat([c]),f),{scroll:!1,origin:"*mouse"})):h.length>1&&h[f].empty()&&"single"==r&&!t.shiftKey?(Ee(u,de(h.slice(0,f).concat(h.slice(f+1)),0)),d=u.sel):xe(u,f,c,Aa):(f=0,Ee(u,new ce([c],0),Aa),d=u.sel);var v=n,m=l.wrapper.getBoundingClientRect(),y=0,b=Ot(e,function(e){yi(e)?a(e):s(e)}),$=Ot(e,s);_a(document,"mousemove",b),_a(document,"mouseup",$)}function Yt(e,t,n,r,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&wa(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(a>l.bottom||!_i(e,n))return vi(t);a-=l.top-s.viewOffset;for(var u=0;u=o){var f=Jr(e.doc,a),d=e.options.gutters[u];return i(e,n,e,f,d,t),vi(t)}}}function Qt(e,t){return Yt(e,t,"gutterClick",!0,bi)}function Xt(e){var t=this;if(!$i(t,e)&&!zt(t.display,e)){wa(e),ho&&(Vo=+new Date);var n=Ut(t,e,!0),r=e.dataTransfer.files;if(n&&!X(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){var s=new FileReader;s.onload=Ot(t,function(){if(o[r]=s.result,++a==i){n=ge(t.doc,n);var e={from:n,to:n,text:qa(o.join("\n")),origin:"paste"};xn(t.doc,e),ke(t.doc,he(n,qo(e)))}}),s.readAsText(e)},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Co?e.altKey:e.ctrlKey))var u=t.listSelections();if(Se(t.doc,he(n,n)),u)for(var l=0;la.clientWidth||i&&a.scrollHeight>a.clientHeight){if(i&&Co&&go)e:for(var s=t.target,l=o.view;s!=a;s=s.parentNode)for(var u=0;uc?f=Math.max(0,f+c-50):d=Math.min(e.doc.height,d+c+50),T(e,{top:f,bottom:d})}20>Wo&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Ho=(Ho*Wo+n)/(Wo+1),++Wo)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function nn(e,t,n){if("string"==typeof t&&(t=ra[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{X(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Oa}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function rn(e,t,n){for(var r=0;rpo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=an(t,e);yo&&(Bo=r?n:null,!r&&88==n&&!Ka&&(Co?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||un(t)}}function un(e){function t(e){18!=e.keyCode&&e.altKey||(Ha(n,"CodeMirror-crosshair"),Ca(document,"keyup",t),Ca(document,"mouseover",t))}var n=e.display.lineDiv;za(n,"CodeMirror-crosshair"),_a(document,"keyup",t),_a(document,"mouseover",t)}function cn(e){16==e.keyCode&&(this.doc.sel.shift=!1),$i(this,e)}function fn(e){var t=this;if(!(zt(t.display,e)||$i(t,e)||e.ctrlKey&&!e.altKey||Co&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(yo&&n==Bo)return Bo=null,void wa(e);if(!yo||e.which&&!(e.which<10)||!an(t,e)){var i=String.fromCharCode(null==r?n:r);sn(t,e,i)||t.display.input.onKeyPress(e)}}}function dn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,pn(e))},100)}function hn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ka(e,"focus",e),e.state.focused=!0,za(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),go&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ne(e))}function pn(e){e.state.delayingBlurEvent||(e.state.focused&&(ka(e,"blur",e),e.state.focused=!1,Ha(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function gn(e,t){zt(e.display,t)||vn(e,t)||e.display.input.onContextMenu(t)}function vn(e,t){return _i(e,"gutterContextMenu")?Yt(e,t,"gutterContextMenu",!1,ka):!1}function mn(e,t){if(Ro(e,t.from)<0)return e;if(Ro(e,t.to)<=0)return qo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=qo(t).ch-t.to.ch),Mo(n,r)}function yn(e,t){for(var n=[],r=0;r=0;--i)_n(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else _n(e,t)}}function _n(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Ro(t.from,t.to)){var n=yn(e,t);oi(e,t,n,e.cm?e.cm.curOp.id:NaN),En(e,t,n,tr(e,t));var r=[];Br(e,function(e,n){n||-1!=Ti(r,e.history)||(gi(e.history,t),r.push(e.history)),En(e,t,null,tr(e,t))})}}function Cn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--l){var f=r.changes[l];if(f.origin=t,c&&!$n(e,f,!1))return void(a.length=0);u.push(ni(e,f));var d=l?yn(e,f):Oi(a);En(e,f,d,rr(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:qo(f)});var h=[];Br(e,function(e,t){t||-1!=Ti(h,e.history)||(gi(e.history,f),h.push(e.history)),En(e,f,null,rr(e,f))})}}}}function kn(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Ai(e.sel.ranges,function(e){return new fe(Mo(e.anchor.line+t,e.anchor.ch),Mo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Mo(o,Gr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Kr(e,t.from,t.to),n||(n=yn(e,t)),e.cm?Sn(e.cm,t,r):Hr(e,t,r),Se(e,n,Ta)}}function Sn(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Xr(pr(Gr(r,a.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&xi(e),Hr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),Fe(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Dt(e):a.line!=s.line||1!=t.text.length||Wr(e.doc,t)?Dt(e,a.line,s.line+1,c):Lt(e,a.line,"text");var d=_i(e,"changes"),h=_i(e,"change");if(h||d){var p={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};h&&bi(e,"change",e,p),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function On(e,t,n,r,i){if(r||(r=n),Ro(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=qa(t)),xn(e,{from:n,to:r,text:t,origin:i})}function Tn(e,t){if(!$i(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!$o){var o=ji("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-We(e.display))+"px; height: "+(t.bottom-t.top+Ue(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function An(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=ft(e,t),s=n&&n!=t?ft(e,n):a,l=Rn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(Zt(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(en(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function Mn(e,t,n,r,i){var o=Rn(e,t,n,r,i);null!=o.scrollTop&&Zt(e,o.scrollTop),null!=o.scrollLeft&&en(e,o.scrollLeft)}function Rn(e,t,n,r,i){var o=e.display,a=vt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=qe(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+He(o),f=a>n,d=i>c-a;if(s>n)u.scrollTop=f?0:n;else if(i>s+l){var h=Math.min(n,(d?c:i)-l);h!=s&&(u.scrollTop=h)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Be(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=r-t>g;return v&&(r=t+g),10>t?u.scrollLeft=0:p>t?u.scrollLeft=Math.max(0,t-(v?0:10)):r>g+p-3&&(u.scrollLeft=r+(v?0:10)-g),u}function Dn(e,t,n){(null!=t||null!=n)&&Pn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Ln(e){Pn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Mo(t.line,t.ch-1):t,r=Mo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Pn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=Rn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Nn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ve(e,t):n="prev");var a=e.options.tabSize,s=Gr(o,t),l=Ra(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Oa||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Ra(Gr(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/a);h;--h)d+=a,f+=" ";if(u>d&&(f+=Si(u-d)),f!=c)return On(o,f,Mo(t,0),Mo(t,c.length),"+input"),s.stateAfter=null,!0;for(var h=0;h=0;t--)On(e.doc,"",r[t].from,r[t].to,"+delete");Ln(e)})}function In(e,t,n,r,i){function o(){var t=s+n;return t=e.first+e.size?f=!1:(s=t,c=Gr(e,t))}function a(e){var t=(i?so:lo)(c,l,n,!0);if(null==t){if(e||!o())return f=!1;l=i?(0>n?eo:Zi)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Gr(e,s),f=!0;if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var d=null,h="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(0>n)||a(!g);g=!1){var v=c.text.charAt(l)||"\n",m=Pi(v,p)?"w":h&&"\n"==v?"n":!h||/\s/.test(v)?null:"p";if(!h||g||m||(m="s"),d&&d!=m){0>n&&(n=1,a());break}if(m&&(d=m),n>0&&!a(!g))break}var y=Me(e,Mo(s,l),u,!0);return f||(y.hitSide=!0),y}function Vn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*vt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=pt(e,a,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Wn(t,n,r,i){e.defaults[t]=n,r&&(Ko[t]=i?function(e,t,n){n!=Yo&&r(e,t,n)}:r)}function Hn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ji("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(hr(e,t.line,t,n,o)||t.line!=n.line&&hr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ao=!0}o.addToHistory&&oi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&pr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Qr(e,0),Jn(e,new Yn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){yr(e,t)&&Qr(t,0)}),o.clearOnEnter&&_a(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(To=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ua,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Dt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Lt(u,c,"text");o.atomic&&Te(u.doc),bi(u,"markerAdded",u,o)}return o}function Bn(e,t,n,r,i){r=Di(r),r.shared=!1;var o=[Un(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Br(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Un(e,ge(e,t),ge(e,n),r,i));for(var l=0;l=t:o.to>t);(r||(r=[])).push(new Yn(a,o.from,l?null:o.to))}}return r}function er(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var f=0;ff;++f)p.push(g);p.push(l)}return p}function nr(e){for(var t=0;t0)){var c=[l,1],f=Ro(u.from,s.from),d=Ro(u.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function or(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Ro(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Ro(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function pr(e){for(var t;t=fr(e);)e=t.find(-1,!0).line;return e}function gr(e){for(var t,n;t=dr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function vr(e,t){var n=Gr(e,t),r=pr(n);return n==r?t:Xr(r)}function mr(e,t){if(t>e.lastLine())return t;var n,r=Gr(e,t);if(!yr(e,r))return t;for(;n=dr(r);)r=n.find(1,!0).line;return Xr(r)+1}function yr(e,t){var n=Ao&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Or(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?ta(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=ge(a,t);var l,u=Gr(a,t.line),c=Ve(e,t.line,n),f=new la(u.text,e.options.tabSize);for(r&&(l=[]);(r||f.pose.options.maxHighlightLength?(s=!1,a&&Rr(e,t,r,f.pos),f.pos=t.length,l=null):l=kr(Sr(n,f,r,d),o),d){var h=d[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||c!=l){for(;uu;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Mr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ar(e,t,t.stateAfter=Ve(e,Xr(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Rr(e,t,n,r){var i=e.doc.mode,o=new la(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Er(i,n);!o.eol()&&o.pos<=e.options.maxHighlightLength;)Sr(i,o,n),o.start=o.pos}function Dr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ga:pa;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Lr(e,t){var n=ji("span",null,null,go?"padding-right: .1px":null),r={pre:ji("pre",[n]),content:n,col:0,pos:0,cm:e,splitSpaces:(ho||go)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Nr,Ki(e.display.measure)&&(o=ei(a))&&(r.addToken=jr(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&Xr(a);Vr(a,r,Mr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=zi(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=zi(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Gi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return go&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),ka(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=zi(r.pre.className,r.textClass||"")),r}function Pr(e){var t=ji("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Nr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Fr):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var d=l.exec(t),h=d?d.index-f:t.length-f;if(h){var p=document.createTextNode(s.slice(f,f+h));ho&&9>po?c.appendChild(ji("span",[p])):c.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!d)break;if(f+=h+1," "==d[0]){var g=e.cm.options.tabSize,v=g-e.col%g,p=c.appendChild(ji("span",Si(v),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text"," "),e.col+=v}else{var p=e.cm.options.specialCharPlaceholder(d[0]);p.setAttribute("cm-text",d[0]),ho&&9>po?c.appendChild(ji("span",[p])):c.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),ho&&9>po&&(u=!0),e.pos+=t.length}if(n||r||i||u||a){var m=n||"";r&&(m+=r),i&&(m+=i);var y=ji("span",[c],m,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Fr(e){for(var t=" ",n=0;nu&&d.from<=u)break}if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function Ir(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Vr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,d,h=i.length,p=0,g=1,v="",m=0;;){if(m==p){l=u=c=f=s="",d=null,m=1/0;for(var y=[],b=0;bp||$.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&m>w.to&&(m=w.to,u=""),$.className&&(l+=" "+$.className),$.css&&(s=$.css),$.startStyle&&w.from==p&&(c+=" "+$.startStyle),$.endStyle&&w.to==m&&(u+=" "+$.endStyle),$.title&&!f&&(f=$.title),$.collapsed&&(!d||ur(d.marker,$)<0)&&(d=w)):w.from>p&&m>w.from&&(m=w.from)}if(d&&(d.from||0)==p){if(Ir(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}if(!d&&y.length)for(var b=0;b=h)break;for(var x=Math.min(h,m);;){if(v){var _=p+v.length;if(!d){var C=_>x?v.slice(0,x-p):v;t.addToken(t,C,a?a+l:l,c,p+C.length==m?u:"",f,s)}if(_>=x){v=v.slice(x-p),p=x;break}p=_,c=""}v=i.slice(o,o=n[g++]),a=Dr(n[g++],t.cm.options)}}else for(var g=1;gn;++n)o.push(new ha(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Gr(e,s.line),f=Gr(e,l.line),d=Oi(u),h=i(u.length-1),p=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Wr(e,t)){var g=a(0,u.length-1);o(f,f.text,h),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),h);else{var g=a(1,u.length-1);g.push(new ha(d+c.text.slice(l.ch),h,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,d+f.text.slice(l.ch),h);var g=a(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,g)}bi(e,"change",e,t)}function zr(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Kr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Yr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Qr(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Xr(e){if(null==e.parent)return null;for(var t=e.parent,n=Ti(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Jr(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function Zr(e){e=pr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Oi(e.done)):void 0}function oi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ii(i,i.lastOp==r))){var s=Oi(o.changes);0==Ro(t.from,t.to)&&0==Ro(t.from,s.to)?s.to=qo(t):o.changes.push(ni(e,t))}else{var l=Oi(i.done);for(l&&l.ranges||li(e.sel,i.done),o={changes:[ni(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||ka(e,"historyAdded")}function ai(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function si(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ai(e,o,Oi(i.done),t))?i.done[i.done.length-1]=t:li(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ri(i.undone)}function li(e,t){var n=Oi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ui(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ci(e){if(!e)return null;for(var t,n=0;n-1&&(Oi(s)[f]=c[f],delete c[f])}}}return i}function hi(e,t,n,r){n0}function Ci(e){e.prototype.on=function(e,t){_a(this,e,t)},e.prototype.off=function(e,t){Ca(this,e,t)}}function ki(){this.id=null}function Ei(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function Si(e){for(;Da.length<=e;)Da.push(Oi(Da)+" ");return Da[e]}function Oi(e){return e[e.length-1]}function Ti(e,t){for(var n=0;n-1&&Fa(e)?!0:t.test(e):Fa(e)}function Ni(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Fi(e){return e.charCodeAt(0)>=768&&ja.test(e)}function ji(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Vi(e,t){return Ii(e).appendChild(t)}function Wi(){return document.activeElement}function Hi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function zi(e,t){for(var n=e.split(" "),r=0;r2&&!(ho&&8>po))}var n=Va?ji("span","​"):ji("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px"); +return n.setAttribute("cm-text",""),n}function Ki(e){if(null!=Wa)return Wa;var t=Vi(e,document.createTextNode("AخA")),n=Pa(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Pa(t,1,2).getBoundingClientRect();return Wa=r.right-n.right<3}function Yi(e){if(null!=Ya)return Ya;var t=Vi(e,ji("span","x")),n=t.getBoundingClientRect(),r=Pa(t,0,1).getBoundingClientRect();return Ya=Math.abs(n.left-r.left)>1}function Qi(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function Xi(e){return e.level%2?e.to:e.from}function Ji(e){return e.level%2?e.from:e.to}function Zi(e){var t=ei(e);return t?Xi(t[0]):0}function eo(e){var t=ei(e);return t?Ji(Oi(t)):e.text.length}function to(e,t){var n=Gr(e.doc,t),r=pr(n);r!=n&&(t=Xr(r));var i=ei(r),o=i?i[0].level%2?eo(r):Zi(r):0;return Mo(t,o)}function no(e,t){for(var n,r=Gr(e.doc,t);n=dr(r);)r=n.find(1,!0).line,t=null;var i=ei(r),o=i?i[0].level%2?Zi(r):eo(r):r.text.length;return Mo(null==t?Xr(r):t,o)}function ro(e,t){var n=to(e,t.line),r=Gr(e.doc,n.line),i=ei(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Mo(n.line,a?0:o)}return n}function io(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function oo(e,t){Xa=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return io(e,i.level,e[n].level)?(i.from!=i.to&&(Xa=n),r):(i.from!=i.to&&(Xa=r),n);n=r}}return n}function ao(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Fi(e.text.charAt(t)));return t}function so(e,t,n,r){var i=ei(e);if(!i)return lo(e,t,n,r);for(var o=oo(i,t),a=i[o],s=ao(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?ao(e,a.to,-1,r):ao(e,a.from,1,r)}}function lo(e,t,n,r){var i=t+n;if(r)for(;i>0&&Fi(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var uo=/gecko\/\d/i.test(navigator.userAgent),co=/MSIE \d/.test(navigator.userAgent),fo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ho=co||fo,po=ho&&(co?document.documentMode||6:fo[1]),go=/WebKit\//.test(navigator.userAgent),vo=go&&/Qt\/\d+\.\d+/.test(navigator.userAgent),mo=/Chrome\//.test(navigator.userAgent),yo=/Opera\//.test(navigator.userAgent),bo=/Apple Computer/.test(navigator.vendor),wo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),$o=/PhantomJS/.test(navigator.userAgent),xo=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),_o=xo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),Co=xo||/Mac/.test(navigator.platform),ko=/win/i.test(navigator.platform),Eo=yo&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Eo&&(Eo=Number(Eo[1])),Eo&&Eo>=15&&(yo=!1,go=!0);var So=Co&&(vo||yo&&(null==Eo||12.11>Eo)),Oo=uo||ho&&po>=9,To=!1,Ao=!1;g.prototype=Di({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=Co&&!wo?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){mi(e)!=t.vert&&mi(e)!=t.horiz&&Ot(t.cm,Bt)(e)};_a(this.vert,"mousedown",n),_a(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),v.prototype=Di({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":g,"null":v},k.prototype.signal=function(e,t){_i(e,t)&&this.events.push(arguments)},k.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),_a(o,"paste",function(){if(go&&!r.state.fakedLastChar&&!(new Date-r.state.lastMiddleDown<200)){var e=o.selectionStart,t=o.selectionEnd;o.value+="$",o.selectionEnd=t,o.selectionStart=e,r.state.fakedLastChar=!0}r.state.pasteIncoming=!0,n.fastPoll()}),_a(o,"cut",t),_a(o,"copy",t),_a(e.scroller,"paste",function(t){zt(e,t)||(r.state.pasteIncoming=!0,n.focus())}),_a(e.lineSpace,"selectstart",function(t){zt(e,t)||wa(t)}),_a(o,"compositionstart",function(){var e=r.getCursor("from");n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),_a(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=De(e);if(e.options.moveInputWithCursor){var i=ft(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Vi(n.cursorDiv,e.cursors),Vi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ka&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&La(this.textarea),ho&&po>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",ho&&po>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!_o||Wi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(!e.state.focused||Ga(t)&&!n||X(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(ho&&po>=9&&this.hasSelection===r||Co&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return St(e,function(){J(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){ho&&po>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,ho&&9>po&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!ho||ho&&9>po)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Ot(i,ra.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=Ut(i,e),l=o.scroller.scrollTop;if(s&&!yo){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Ot(i,Ee)(i.doc,he(s),Ta);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(ho?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",go)var f=window.scrollY;if(o.input.focus(),go&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ho&&po>=9&&t(),Oo){xa(e);var d=function(){Ca(window,"mouseup",d),setTimeout(n,20)};_a(window,"mouseup",d)}else setTimeout(n,50)}},setUneditable:Mi,needsContentAttribute:!1},ne.prototype),ie.prototype=Di({init:function(e){function t(e){if(r.somethingSelected())Do=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Do=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ta),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!xo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Do.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Do.join("\n");var o=document.activeElement;La(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable="true",te(i),_a(i,"paste",function(e){var t=e.clipboardData&&e.clipboardData.getData("text/plain");t&&(e.preventDefault(),r.replaceSelection(t,null,"paste"))}),_a(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=he(Mo(i.head.line,a),Mo(i.head.line,a+t.length)))}}),_a(i,"compositionupdate",function(e){n.composing.data=e.data}),_a(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),_a(i,"touchstart",function(){n.forceCompositionEnd()}),_a(i,"input",function(){n.composing||n.pollContent()||St(n.cm,function(){Dt(r)})}),_a(i,"copy",t),_a(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=se(this.cm,e.anchorNode,e.anchorOffset),r=se(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Ro(Y(n,r),t.from())||0!=Ro(K(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=Pa(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):uo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Vi(this.cm.display.cursorDiv,e.cursors),Vi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ia(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():St(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=se(t,e.anchorNode,e.anchorOffset),r=se(t,e.focusNode,e.focusOffset);n&&r&&St(t,function(){Ee(t.doc,he(n,r),Ta),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Nt(e,r.line)))var a=Xr(t.view[0].line),s=t.view[0].node;else var a=Xr(t.view[o].line),s=t.view[o-1].node.nextSibling;var l=Nt(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.view[l].node;else var u=Xr(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=qa(ue(e,s,c,a,u)),d=Kr(e.doc,Mo(a,0),Mo(u,Gr(e.doc,u).text.length));f.length>1&&d.length>1;)if(Oi(f)==Oi(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var h=0,p=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);m>h&&g.charCodeAt(h)==v.charCodeAt(h);)++h;for(var y=Oi(f),b=Oi(d),w=Math.min(y.length-(1==f.length?h:0),b.length-(1==d.length?h:0));w>p&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;f[f.length-1]=y.slice(0,y.length-p),f[0]=f[0].slice(h);var $=Mo(a,h),x=Mo(u,d.length?Oi(d).length-p:0);return f.length>1||f[0]||Ro($,x)?(On(e.doc,f,$,x,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){e.data&&e.data!=e.startData&&Ot(this.cm,J)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.setAttribute("contenteditable","false")},onKeyPress:function(e){e.preventDefault(),Ot(this.cm,J)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},onContextMenu:Mi,resetPosition:Mi,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Ro(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Lo,Po,No,Fo={left:0,right:0,top:0,bottom:0},jo=null,Io=0,Vo=0,Wo=0,Ho=null;ho?Ho=-.53:uo?Ho=15:mo?Ho=-.7:bo&&(Ho=-1/3);var zo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=zo(e);return t.x*=Ho,t.y*=Ho,t};var Uo=new ki,Bo=null,qo=e.changeEnd=function(e){return e.text?Mo(e.from.line+e.text.length-1,Oi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Ko.hasOwnProperty(e)&&Ot(this,Ko[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](zn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Nn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ln(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)Nn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&xe(this.doc,r,new fe(o,u[r].to()),Ta)}}}),getTokenAt:function(e,t){return Or(this,e,t)},getLineTokens:function(e,t){return Or(this,Mo(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Mr(this,Gr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!ea.hasOwnProperty(t))return n;var r=ea[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Gr(this.doc,e)}else n=e;return lt(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-Zr(n):0)},defaultTextHeight:function(){return vt(this.display)},defaultCharWidth:function(){return mt(this.display)},setGutterMarker:Tt(function(e,t,n){return Fn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Ni(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Tt(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Lt(t,r,"gutter"),Ni(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!me(this.doc,e))return null;var t=e;if(e=Gr(this.doc,e),!e)return null}else{var t=Xr(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=ft(this,ge(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Mn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Tt(ln),triggerOnKeyPress:Tt(fn),triggerOnKeyUp:cn,execCommand:function(e){return ra.hasOwnProperty(e)?ra[e](this):void 0},triggerElectric:Tt(function(e){Z(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=ge(this.doc,e);t>o&&(a=In(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Tt(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?In(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Ma)}),deleteH:Tt(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):jn(this,function(n){var i=In(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=ge(this.doc,e);t>a;++a){var l=ft(this,s,"div");if(null==o?o=l.left:l.left=o,s=Vn(this,l,i,n),s.hitSide)break}return s},moveV:Tt(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=ft(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Vn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Dn(n,null,ct(n,l,"div").top-s.top),l},Ma),i.length)for(var a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&a(this),ka(this,"refresh",this)}),swapDoc:Tt(function(e){var t=this.doc;return t.cm=null,qr(this,e),ot(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,bi(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ci(e);var Go=e.defaults={},Ko=e.optionHandlers={},Yo=e.Init={toString:function(){return"CodeMirror.Init"}};Wn("value","",function(e,t){e.setValue(t)},!0),Wn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Wn("indentUnit",2,n,!0),Wn("indentWithTabs",!1),Wn("smartIndent",!0),Wn("tabSize",4,function(e){r(e),ot(e),Dt(e)},!0),Wn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Wn("specialCharPlaceholder",Pr,function(e){e.refresh()},!0),Wn("electricChars",!0),Wn("inputStyle",_o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Wn("rtlMoveVisually",!ko),Wn("wholeLineUpdateBefore",!0),Wn("theme","default",function(e){s(e),l(e)},!0),Wn("keyMap","default",function(t,n,r){var i=zn(n),o=r!=e.Init&&zn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Wn("extraKeys",null),Wn("lineWrapping",!1,i,!0),Wn("gutters",[],function(e){h(e.options),l(e)},!0),Wn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?C(e.display)+"px":"0",e.refresh()},!0),Wn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Wn("scrollbarStyle","native",function(e){m(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Wn("lineNumbers",!1,function(e){h(e.options),l(e)},!0),Wn("firstLineNumber",1,l,!0),Wn("lineNumberFormatter",function(e){return e},l,!0),Wn("showCursorWhenSelecting",!1,Re,!0),Wn("resetSelectionOnContextMenu",!0),Wn("lineWiseCopyCut",!0),Wn("readOnly",!1,function(e,t){"nocursor"==t?(pn(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||e.display.input.reset())}),Wn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Wn("dragDrop",!0,Wt),Wn("cursorBlinkRate",530),Wn("cursorScrollMargin",0),Wn("cursorHeight",1,Re,!0),Wn("singleCursorHeightPerLine",!0,Re,!0),Wn("workTime",100),Wn("workDelay",100),Wn("flattenSpans",!0,r,!0),Wn("addModeClass",!1,r,!0),Wn("pollInterval",100),Wn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Wn("historyEventDelay",1250),Wn("viewportMargin",10,function(e){e.refresh()},!0),Wn("maxHighlightLength",1e4,r,!0),Wn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Wn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Wn("autofocus",null);var Qo=e.modes={},Xo=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Qo[t]=n},e.defineMIME=function(e,t){Xo[e]=t},e.resolveMode=function(t){if("string"==typeof t&&Xo.hasOwnProperty(t))t=Xo[t];else if(t&&"string"==typeof t.name&&Xo.hasOwnProperty(t.name)){var n=Xo[t.name];"string"==typeof n&&(n={name:n}),t=Ri(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=Qo[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(Jo.hasOwnProperty(n.name)){var o=Jo[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var Jo=e.modeExtensions={};e.extendMode=function(e,t){var n=Jo.hasOwnProperty(e)?Jo[e]:Jo[e]={};Di(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){ma.prototype[e]=t},e.defineOption=Wn;var Zo=[];e.defineInitHook=function(e){Zo.push(e)};var ea=e.helpers={};e.registerHelper=function(t,n,r){ea.hasOwnProperty(t)||(ea[t]=e[t]={_global:[]}),ea[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),ea[t]._global.push({pred:r,val:i})};var ta=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},na=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ra=e.commands={selectAll:function(e){e.setSelection(Mo(e.firstLine(),0),Mo(e.lastLine()),Ta)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ta)},killLine:function(e){jn(e,function(t){if(t.empty()){var n=Gr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Mo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Mo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Gr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+"\n"+a.charAt(a.length-1),Mo(i.line-1,a.length-1),Mo(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){St(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange("\n",r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0),Ln(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},ia=e.keyMap={};ia.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ia.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ia.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ia.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ia["default"]=Co?ia.macDefault:ia.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Ai(n.split(" "),Hn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ua=0,ca=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ua};Ci(ca),ca.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yt(e),_i(this,"clear")){var n=this.find();n&&bi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Te(e.doc)),e&&bi(e,"markerCleared",e,this),t&&wt(e),this.parent&&this.parent.clear()}},ca.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Cr(i),bi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Ur.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof zr))){var s=[];this.collapse(s),this.children=[new zr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new zr(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Ur(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Ti(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Ur(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var va=0,ma=e.Doc=function(e,t,n){if(!(this instanceof ma))return new ma(e,t,n);null==n&&(n=0),Ur.call(this,[new zr([new ha("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Mo(n,0);this.sel=he(r),this.history=new ti(null),this.id=++va,this.modeOption=t,"string"==typeof e&&(e=qa(e)),Hr(this,{from:r,to:r,text:e}),Ee(this,he(r),Ta)};ma.prototype=Ri(Ur.prototype,{constructor:ma,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)xn(this,r[o]);s?ke(this,s):this.cm&&Ln(this.cm)}),undo:At(function(){Cn(this,"undo")}),redo:At(function(){Cn(this,"redo")}),undoSelection:At(function(){Cn(this,"undo",!0)}),redoSelection:At(function(){Cn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ge(this,e),t=ge(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;sl.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),ge(this,Mo(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Da=[""],La=function(e){e.select()};xo?La=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ho&&(La=function(e){try{e.select()}catch(t){}});var Pa,Na=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Fa=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Na.test(e))},ja=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Pa=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ia=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};ho&&11>po&&(Wi=function(){try{return document.activeElement}catch(e){return document.body}});var Va,Wa,Ha=e.rmClass=function(e,t){var n=e.className,r=Hi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},za=e.addClass=function(e,t){var n=e.className;Hi(t).test(n)||(e.className+=(n?" ":"")+t)},Ua=!1,Ba=function(){if(ho&&9>po)return!1;var e=ji("div");return"draggable"in e||"dragDrop"in e}(),qa=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ga=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Ka=function(){var e=ji("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ya=null,Qa={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Qa,function(){for(var e=0;10>e;e++)Qa[e+48]=Qa[e+96]=String(e);for(var e=65;90>=e;e++)Qa[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Qa[e+111]=Qa[e+63235]="F"+e}();var Xa,Ja=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,f=[],d=0;c>d;++d)f.push(r=e(n.charCodeAt(d)));for(var d=0,h=u;c>d;++d){var r=f[d];"m"==r?f[d]=h:h=r}for(var d=0,p=u;c>d;++d){var r=f[d];"1"==r&&"r"==p?f[d]="n":a.test(r)&&(p=r,"r"==r&&(f[d]="R"))}for(var d=1,h=f[0];c-1>d;++d){var r=f[d];"+"==r&&"1"==h&&"1"==f[d+1]?f[d]="1":","!=r||h!=f[d+1]||"1"!=h&&"n"!=h||(f[d]=h),h=r}for(var d=0;c>d;++d){var r=f[d];if(","==r)f[d]="N";else if("%"==r){for(var g=d+1;c>g&&"%"==f[g];++g);for(var v=d&&"!"==f[d-1]||c>g&&"1"==f[g]?"1":"N",m=d;g>m;++m)f[m]=v;d=g-1}}for(var d=0,p=u;c>d;++d){var r=f[d];"L"==p&&"1"==r?f[d]="L":a.test(r)&&(p=r)}for(var d=0;c>d;++d)if(o.test(f[d])){for(var g=d+1;c>g&&o.test(f[g]);++g);for(var y="L"==(d?f[d-1]:u),b="L"==(c>g?f[g]:u),v=y||b?"L":"R",m=d;g>m;++m)f[m]=v;d=g-1}for(var w,$=[],d=0;c>d;)if(s.test(f[d])){var x=d;for(++d;c>d&&s.test(f[d]);++d);$.push(new t(0,x,d))}else{var _=d,C=$.length;for(++d;c>d&&"L"!=f[d];++d);for(var m=_;d>m;)if(l.test(f[m])){m>_&&$.splice(C,0,new t(1,_,m));var k=m;for(++m;d>m&&l.test(f[m]);++m);$.splice(C,0,new t(2,k,m)),_=m}else++m;d>_&&$.splice(C,0,new t(1,_,d))}return 1==$[0].level&&(w=n.match(/^\s+/))&&($[0].from=w[0].length,$.unshift(new t(0,0,w[0].length))),1==Oi($).level&&(w=n.match(/\s+$/))&&(Oi($).to-=w[0].length,$.push(new t(0,c-w[0].length,c))),2==$[0].level&&$.unshift(new t(1,$[0].to,$[0].to)),$[0].level!=Oi($).level&&$.push(new t($[0].level,c,c)),$}}();return e.version="5.3.0",e})},function(e,t,n){n(152),e.exports=angular},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nr;r++){var o=e[r][n];if(o)if(o instanceof Array)for(var a in o)t[o[a]]=!0;else t[o]=!0}return Object.keys(t)}},{key:"getSortFieldName",value:function(){return this.sortField()?this._targetEntity.name()+"_ListView."+this.sortField():null}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nn;n++){var i=t[n];e[i.name()]=i}return e}},{key:"listActions",value:function(e){return arguments.length?(this._listActions=e,this):this._listActions}}]),t}(u["default"]);t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0}},{key:"addChild",value:function(t){if(!(t instanceof e))throw new Error("Only Menu instances are accepted as children of a Menu");return this._children.push(t),this}},{key:"hasChild",value:function(){return this._children.length>0}},{key:"getChildByTitle",value:function(e){return this.children().filter(function(t){return t.title()==e}).pop()}},{key:"children",value:function(){return arguments.length?(this._children=arguments[0],this):this._children}},{key:"icon",value:function(){return arguments.length?(this._icon=arguments[0],this):this._icon}},{key:"template",value:function(){return arguments.length?(this._template=arguments[0],this):this._template}},{key:"populateFromEntity",value:function(e){if(!(e instanceof l["default"]))throw new Error("populateFromEntity() only accepts an Entity parameter");return this.title(e.label()),this.active(function(t){return 0===t.indexOf("/"+e.name()+"/")}),this.link("/"+e.name()+"/list"),this.icon(e.menuView().icon()),this}}]),e}();t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function o(e,t,n){r(this,o),this._restWrapper=e,this._promisesResolver=t,this._application=n};t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={order:function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()})}},e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={camelCase:function(e){if(!e)return e;var t=e.charAt(0).toUpperCase();return e=t+e.substr(1),e.replace(/[-_](.)/g,function(e,t){return" "+t.toUpperCase()})}},e.exports=t["default"]},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return'
'}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){if(e!==t){var n=null===e,r=e===E,i=e===e,o=null===t,a=t===E,s=t===t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function a(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i-1;);return n}function f(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function d(e,t){return o(e.criteria,t.criteria)||e.index-t.index}function h(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,s=i.length,l=n.length;++r=l?u:u*(n[r]?1:-1)}return e.index-t.index}function p(e){return Ge[e]}function g(e){return Ke[e]}function v(e){return"\\"+Xe[e]}function m(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i=e&&e>=9&&13>=e||32==e||160==e||5760==e||6158==e||e>=8192&&(8202>=e||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function w(e,t){for(var n=-1,r=e.length,i=-1,o=[];++nt,r=Hn(0,e.length,this.__views__),i=r.start,o=r.end,a=o-i,s=n?o:i-1,l=ba(a,this.__takeCount__),u=this.__iteratees__,c=u?u.length:0,f=0,d=[];e:for(;a--&&l>f;){s+=t;for(var h=-1,p=e[s];++hg.index:s-1?g.count++>=y:!v(p)))continue e}}else{var b=v(p);if(m==z)p=b;else if(!b){if(m==H)continue e;break e}}}d[f++]=p}return d}function ie(){this.__data__={}}function Ge(e){return this.has(e)&&delete this.__data__[e]}function Ke(e){return"__proto__"==e?E:this.__data__[e]}function Ye(e){return"__proto__"!=e&&Yo.call(this.__data__,e)}function Qe(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function Xe(e){var t=e?e.length:0;for(this.data={hash:pa(null),set:new la};t--;)this.push(e[t])}function Je(e,t){var n=e.data,r="string"==typeof t||Oi(t)?n.set.has(t):n.hash[t];return r?0:-1}function Ze(e){var t=this.data;"string"==typeof e||Oi(e)?t.set.add(e):t.hash[e]=!0}function et(e,t){var n=-1,r=e.length;for(t||(t=Lo(r));++n=200?Va(t):null,u=t.length;l&&(o=Je,a=!1,t=l);e:for(;++in&&(n=-n>i?0:i+n),r=r===E||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)e[n++]=t;return e}function Et(e,t){var n=[];return Pa(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function St(e,t,n,r){var i;return n(e,function(e,n,o){return t(e,n,o)?(i=r?n:e,!1):void 0}),i}function Ot(e,t,n){for(var r=-1,i=e.length,o=-1,a=[];++rr;)e=e[t[r++]];return r&&r==i?e:E}}function Lt(e,t,n,r,i,o){return e===t?!0:null==e||null==t||!Oi(e)&&!y(t)?e!==e&&t!==t:Pt(e,t,Lt,n,r,i,o)}function Pt(e,t,n,r,i,o,a){var s=Ss(e),l=Ss(t),u=G,c=G;s||(u=Xo.call(e),u==q?u=ee:u!=ee&&(s=Ni(e))),l||(c=Xo.call(t),c==q?c=ee:c!=ee&&(l=Ni(t)));var f=u==ee,d=c==ee,h=u==c;if(h&&!s&&!f)return Pn(e,t,u);if(!i){var p=f&&Yo.call(e,"__wrapped__"),g=d&&Yo.call(t,"__wrapped__");if(p||g)return n(p?e.value():e,g?t.value():t,r,i,o,a)}if(!h)return!1;o||(o=[]),a||(a=[]);for(var v=o.length;v--;)if(o[v]==e)return a[v]==t;o.push(e),a.push(t);var m=(s?Ln:Nn)(e,t,n,r,i,o,a);return o.pop(),a.pop(),m}function Nt(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=sr(e);r--;){var a=t[r];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++rt&&(t=-t>i?0:i+t),n=n===E||n>i?i:+n||0,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Lo(i);++r=200,l=a?Va():null,u=[];l?(r=Je,o=!1):(a=!1,l=t?[]:u);e:for(;++n=i){for(;i>r;){var o=r+i>>>1,a=e[o];(n?t>=a:t>a)&&null!==a?r=o+1:i=o}return i}return rn(e,t,$o,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,s=null===t,l=t===E;o>i;){var u=ia((i+o)/2),c=n(e[u]),f=c!==E,d=c===c;if(a)var h=d||r;else h=s?d&&f&&(r||null!=c):l?d&&(r||f):null==c?!1:r?t>=c:t>c;h?i=u+1:o=u}return ba(o,Sa)}function on(e,t,n){if("function"!=typeof e)return $o;if(t===E)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function an(e){return ta.call(e,0)}function sn(e,t,n){for(var r=n.length,i=-1,o=ya(e.length-r,0),a=-1,s=t.length,l=Lo(o+s);++a2?n[i-2]:E,a=i>2?n[2]:E,s=i>1?n[i-1]:E;for("function"==typeof o?(o=on(o,s,5),i-=2):(o="function"==typeof s?s:E,i-=o?1:0),a&&Yn(n[0],n[1],a)&&(o=3>i?E:o,i=1);++r-1?n[o]:E}return St(n,r,e)}}function bn(e){return function(t,n,r){return t&&t.length?(n=Fn(n,r,3),a(t,n,e)):-1}}function wn(e){return function(t,n,r){return n=Fn(n,r,3),St(t,n,e,!0)}}function $n(e){return function(){for(var t,n=arguments.length,i=e?n:-1,o=0,a=Lo(n);e?i--:++iy){var C=s?et(s):null,k=ya(u-y,0),S=p?_:null,A=p?null:_,M=p?$:null,R=p?null:$;t|=p?D:L,t&=~(p?L:D),g||(t&=~(O|T));var P=[e,t,n,M,S,R,A,C,l,k],N=Tn.apply(E,P);return Xn(e)&&za(N,P),N.placeholder=x,N}}var F=d?n:this,j=h?F[e]:e;return s&&($=rr($,s)),f&&l<$.length&&($.length=l),this&&this!==rt&&this instanceof c&&(j=m||gn(e)),j.apply(F,$)}var f=t&P,d=t&O,h=t&T,p=t&M,g=t&A,v=t&R,m=h?null:gn(e);return c}function An(e,t,n){var r=e.length;if(t=+t,r>=t||!va(t))return"";var i=t-r;return n=null==n?" ":n+"",uo(n,na(i/n.length)).slice(0,i)}function Mn(e,t,n,r){function i(){for(var t=-1,s=arguments.length,l=-1,u=r.length,c=Lo(s+u);++ll))return!1;for(;++s-1&&e%1==0&&t>e}function Yn(e,t,n){if(!Oi(n))return!1;var r=typeof t;if("number"==r?Gn(n)&&Kn(t,n.length):"string"==r&&t in n){var i=n[t];return e===e?e===i:i!==i}return!1}function Qn(e,t){var n=typeof e;if("string"==n&&Ee.test(e)||"number"==n)return!0;if(Ss(e))return!1;var r=!ke.test(e);return r||null!=t&&e in sr(t)}function Xn(e){var n=jn(e);if(!(n in i.prototype))return!1;var r=t[n];if(e===r)return!0;var o=Wa(r);return!!o&&e===o[0]}function Jn(e){return"number"==typeof e&&e>-1&&e%1==0&&Aa>=e}function Zn(e){return e===e&&!Oi(e)}function er(e,t){var n=e[1],r=t[1],i=n|r,o=P>i,a=r==P&&n==M||r==P&&n==N&&e[7].length<=t[8]||r==(P|N)&&n==M;if(!o&&!a)return e;r&O&&(e[2]=t[2],i|=n&O?0:A);var s=t[3];if(s){var l=e[3];e[3]=l?sn(l,s,t[4]):et(s),e[4]=l?w(e[3],B):et(t[4])}return s=t[5],s&&(l=e[5],e[5]=l?ln(l,s,t[6]):et(s),e[6]=l?w(e[5],B):et(t[6])),s=t[7],s&&(e[7]=et(s)),r&P&&(e[8]=null==e[8]?t[8]:ba(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function tr(e,t){e=sr(e);for(var n=-1,r=t.length,i={};++nr;)a[++o]=Gt(e,r,r+=t);return a}function fr(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++tt?0:t)):[]}function hr(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0,0>t?0:t)):[]}function pr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0,!0):[]}function gr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0):[]}function vr(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&Yn(e,t,n)&&(n=0,r=i),kt(e,t,n,r)):[]}function mr(e){return e?e[0]:E}function yr(e,t,n){var r=e?e.length:0;return n&&Yn(e,t,n)&&(t=!1),r?Ot(e,t):[]}function br(e){var t=e?e.length:0;return t?Ot(e,!0):[]}function wr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?ya(r+n,0):n;else if(n){var i=nn(e,t),o=e[i];return(t===t?t===o:o!==o)?i:-1}return s(e,t,n||0)}function $r(e){return hr(e,1)}function xr(e){var t=e?e.length:0;return t?e[t-1]:E}function _r(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(0>n?ya(r+n,0):ba(n||0,r-1))+1;else if(n){i=nn(e,t,!0)-1;var o=e[i];return(t===t?t===o:o!==o)?i:-1}if(t!==t)return m(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function Cr(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=In(),i=e.length;++n-1;)ca.call(t,o,1);return t}function kr(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=Fn(t,n,3);++it?0:t)):[]}function Tr(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0>t?0:t)):[]}function Ar(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!1,!0):[]}function Mr(e,t,n){return e&&e.length?en(e,Fn(t,n,3)):[]}function Rr(e,t,n,r){var i=e?e.length:0;if(!i)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=Yn(e,t,r)?null:t,t=!1);var o=Fn();return(null!=n||o!==bt)&&(n=o(n,r,3)),t&&In()==s?$(e,n):Jt(e,n)}function Dr(e){if(!e||!e.length)return[];var t=-1,n=0;e=st(e,function(e){return Gn(e)?(n=ya(e.length,n),!0):void 0});for(var r=Lo(n);++tn?ya(i+n,0):n||0,"string"==typeof e||!Ss(e)&&Pi(e)?i>n&&e.indexOf(t,n)>-1:In(e,t,n)>-1):!1}function Qr(e,t,n){var r=Ss(e)?lt:Ft;return t=Fn(t,n,3),r(e,t)}function Xr(e,t){return Qr(e,So(t))}function Jr(e,t,n){var r=Ss(e)?st:Et;return t=Fn(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function Zr(e,t,n){if(n?Yn(e,t,n):null==t){e=ar(e);var r=e.length;return r>0?e[Bt(0,r-1)]:E}var i=-1,o=Vi(e),r=o.length,a=r-1;for(t=ba(0>t?0:+t||0,r);++i0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}}function ui(e,t,n){function r(){d&&ra(d),l&&ra(l),l=d=h=E}function i(){var n=t-(ps()-c);if(0>=n||n>t){l&&ra(l);var r=h;l=d=h=E,r&&(p=ps(),u=e.apply(f,s),d||l||(s=f=null))}else d=ua(i,n)}function o(){d&&ra(d),l=d=h=E,(v||g!==t)&&(p=ps(),u=e.apply(f,s),d||l||(s=f=null))}function a(){if(s=arguments,c=ps(),f=this,h=v&&(d||!m),g===!1)var n=m&&!d;else{l||m||(p=c);var r=g-(c-p),a=0>=r||r>g;a?(l&&(l=ra(l)),p=c,u=e.apply(f,s)):l||(l=ua(o,r))}return a&&d?d=ra(d):d||t===g||(d=ua(i,t)),n&&(a=!0,u=e.apply(f,s)),!a||d||l||(s=f=null),u}var s,l,u,c,f,d,h,p=0,g=!1,v=!0;if("function"!=typeof e)throw new zo(U);if(t=0>t?0:+t||0,n===!0){var m=!0;v=!1}else Oi(n)&&(m=n.leading,g="maxWait"in n&&ya(+n.maxWait||0,t),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function ci(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new zo(U);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new ci.Cache,n}function fi(e){if("function"!=typeof e)throw new zo(U);return function(){return!e.apply(this,arguments)}}function di(e){return li(2,e)}function hi(e,t){if("function"!=typeof e)throw new zo(U);return t=ya(t===E?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=ya(n.length-t,0),o=Lo(i);++rt}function wi(e,t){return e>=t}function $i(e){return y(e)&&Gn(e)&&Xo.call(e)==q}function xi(e){return e===!0||e===!1||y(e)&&Xo.call(e)==K}function _i(e){return y(e)&&Xo.call(e)==Y}function Ci(e){return!!e&&1===e.nodeType&&y(e)&&Xo.call(e).indexOf("Element")>-1}function ki(e){return null==e?!0:Gn(e)&&(Ss(e)||Pi(e)||$i(e)||y(e)&&Ts(e.splice))?!e.length:!Is(e).length}function Ei(e,t,n,r){n="function"==typeof n?on(n,r,3):E;var i=n?n(e,t):E;return i===E?Lt(e,t,n):!!i}function Si(e){return y(e)&&"string"==typeof e.message&&Xo.call(e)==Q}function Oi(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ti(e,t,n,r){return n="function"==typeof n?on(n,r,3):E,Nt(e,Vn(t),n)}function Ai(e){return Di(e)&&e!=+e}function Mi(e){return null==e?!1:Xo.call(e)==X?Zo.test(Ko.call(e)):y(e)&&Pe.test(e)}function Ri(e){return null===e}function Di(e){return"number"==typeof e||y(e)&&Xo.call(e)==Z}function Li(e){return y(e)&&Xo.call(e)==te}function Pi(e){return"string"==typeof e||y(e)&&Xo.call(e)==re}function Ni(e){return y(e)&&Jn(e.length)&&!!Ue[Xo.call(e)]}function Fi(e){return e===E}function ji(e,t){return t>e}function Ii(e,t){return t>=e}function Vi(e){var t=e?Ha(e):0;return Jn(t)?t?et(e):[]:Ji(e)}function Wi(e){return yt(e,Gi(e))}function Hi(e,t,n){var r=La(e);return n&&Yn(e,t,n)&&(t=null),t?vt(r,t):r}function zi(e){return Rt(e,Gi(e))}function Ui(e,t,n){var r=null==e?E:Dt(e,lr(t),t+"");return r===E?n:r}function Bi(e,t){if(null==e)return!1;var n=Yo.call(e,t);if(!n&&!Qn(t)){if(t=lr(t),e=1==t.length?e:Dt(e,Gt(t,0,-1)),null==e)return!1;t=xr(t),n=Yo.call(e,t)}return n||Jn(e.length)&&Kn(t,e.length)&&(Ss(e)||$i(e))}function qi(e,t,n){n&&Yn(e,t,n)&&(t=null);for(var r=-1,i=Is(e),o=i.length,a={};++r0;++r=ba(t,n)&&en?0:+n||0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function oo(e){return e=u(e),e&&$e.test(e)?e.replace(be,g):e}function ao(e){return e=u(e),e&&Te.test(e)?e.replace(Oe,"\\$&"):e}function so(e,t,n){e=u(e),t=+t;var r=e.length;if(r>=t||!va(t))return e;var i=(t-r)/2,o=ia(i),a=na(i);return n=An("",a,n),n.slice(0,o)+e+n}function lo(e,t,n){return n&&Yn(e,t,n)&&(t=0),xa(e,t)}function uo(e,t){var n="";if(e=u(e),t=+t,1>t||!e||!va(t))return n;do t%2&&(n+=e),t=ia(t/2),e+=e;while(t);return n}function co(e,t,n){return e=u(e),n=null==n?0:ba(0>n?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function fo(e,n,r){var i=t.templateSettings;r&&Yn(e,n,r)&&(n=r=null),e=u(e),n=gt(vt({},r||n),i,pt);var o,a,s=gt(vt({},n.imports),i.imports,pt),l=Is(s),c=Zt(s,l),f=0,d=n.interpolate||je,h="__p += '",p=Wo((n.escape||je).source+"|"+d.source+"|"+(d===Ce?Re:je).source+"|"+(n.evaluate||je).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++ze+"]")+"\n";e.replace(p,function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(f,l).replace(Ie,v),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=l+t.length,t}),h+="';\n";var m=n.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(ge,""):h).replace(ve,"$1").replace(me,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=Xs(function(){return Fo(l,g+"return "+h).apply(E,c)});if(y.source=h,Si(y))throw y;return y}function ho(e,t,n){var r=e;return(e=u(e))?(n?Yn(r,t,n):null==t)?e.slice(x(e),_(e)+1):(t+="",e.slice(c(e,t),f(e,t)+1)):e}function po(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(x(e)):e.slice(c(e,t+"")):e}function go(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(0,_(e)+1):e.slice(0,f(e,t+"")+1):e}function vo(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=F,i=j;if(null!=t)if(Oi(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?u(t.omission):i}else r=+t||0;if(e=u(e),r>=e.length)return e;var a=r-i.length;if(1>a)return i;var s=e.slice(0,a);if(null==o)return s+i;if(Li(o)){if(e.slice(a).search(o)){var l,c,f=e.slice(0,a);for(o.global||(o=Wo(o.source,(De.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(f);)c=l.index;s=s.slice(0,null==c?a:c)}}else if(e.indexOf(o,a)!=a){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+i}function mo(e){return e=u(e),e&&we.test(e)?e.replace(ye,C):e}function yo(e,t,n){return n&&Yn(e,t,n)&&(t=null),e=u(e),e.match(t||Ve)||[]}function bo(e,t,n){return n&&Yn(e,t,n)&&(t=null),y(e)?xo(e):bt(e,t)}function wo(e){return function(){return e}}function $o(e){return e}function xo(e){return jt(wt(e,!0))}function _o(e,t){return It(e,wt(t,!0))}function Co(e,t,n){if(null==n){var r=Oi(t),i=r?Is(t):null,o=i&&i.length?Rt(t,i):null;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Rt(t,Is(t)));var a=!0,s=-1,l=Ts(e),u=o.length;n===!1?a=!1:Oi(n)&&"chain"in n&&(a=n.chain);for(;++se||!va(e))return[];var r=-1,i=Lo(ba(e,Ea));for(t=on(t,n,1);++rr?i[r]=t(r):t(r);return i}function Mo(e){var t=++Qo;return u(e)+t}function Ro(e,t){return(+e||0)+(+t||0)}function Do(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=Fn(),i=null==t;return i&&r===bt||(i=!1,t=r(t,n,3)),i?dt(Ss(e)?e:ar(e)):Xt(e,t)}e=e?it.defaults(rt.Object(),e,it.pick(rt,He)):rt;var Lo=e.Array,Po=e.Date,No=e.Error,Fo=e.Function,jo=e.Math,Io=e.Number,Vo=e.Object,Wo=e.RegExp,Ho=e.String,zo=e.TypeError,Uo=Lo.prototype,Bo=Vo.prototype,qo=Ho.prototype,Go=(Go=e.window)?Go.document:null,Ko=Fo.prototype.toString,Yo=Bo.hasOwnProperty,Qo=0,Xo=Bo.toString,Jo=e._,Zo=Wo("^"+ao(Ko.call(Yo)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ea=Wn(e,"ArrayBuffer"),ta=Wn(ea&&new ea(0),"slice"),na=jo.ceil,ra=e.clearTimeout,ia=jo.floor,oa=Wn(Vo,"getPrototypeOf"),aa=e.parseFloat,sa=Uo.push,la=Wn(e,"Set"),ua=e.setTimeout,ca=Uo.splice,fa=Wn(e,"Uint8Array"),da=Wn(e,"WeakMap"),ha=function(){try{var t=Wn(e,"Float64Array"),n=new t(new ea(10),0,1)&&t}catch(r){}return n||null}(),pa=Wn(Vo,"create"),ga=Wn(Lo,"isArray"),va=e.isFinite,ma=Wn(Vo,"keys"),ya=jo.max,ba=jo.min,wa=Wn(Po,"now"),$a=Wn(Io,"isFinite"),xa=e.parseInt,_a=jo.random,Ca=Io.NEGATIVE_INFINITY,ka=Io.POSITIVE_INFINITY,Ea=4294967295,Sa=Ea-1,Oa=Ea>>>1,Ta=ha?ha.BYTES_PER_ELEMENT:0,Aa=9007199254740991,Ma=da&&new da,Ra={},Da=t.support={};!function(e){var t=function(){this.x=e},n=[];t.prototype={valueOf:e,y:e};for(var r in new t)n.push(r);try{Da.dom=11===Go.createDocumentFragment().nodeType}catch(i){Da.dom=!1}}(1,0),t.templateSettings={escape:xe,evaluate:_e,interpolate:Ce,variable:"",imports:{_:t}};var La=function(){function e(){}return function(t){if(Oi(t)){e.prototype=t;var n=new e;e.prototype=null}return n||{}}}(),Pa=fn(At),Na=fn(Mt,!0),Fa=dn(),ja=dn(!0),Ia=Ma?function(e,t){return Ma.set(e,t),e}:$o;ta||(an=ea&&fa?function(e){var t=e.byteLength,n=ha?ia(t/Ta):0,r=n*Ta,i=new ea(t);if(n){var o=new ha(i,0,n);o.set(new ha(e,0,n))}return t!=r&&(o=new fa(i,r),o.set(new fa(e,r))),i}:wo(null));var Va=pa&&la?function(e){return new Xe(e)}:wo(null),Wa=Ma?function(e){return Ma.get(e)}:Eo,Ha=Ht("length"),za=function(){var e=0,t=0;return function(n,r){var i=ps(),o=V-(i-t);if(t=i,o>0){if(++e>=I)return n}else e=0;return Ia(n,r)}}(),Ua=hi(function(e,t){return Gn(e)?xt(e,Ot(t,!1,!0)):[]}),Ba=bn(),qa=bn(!0),Ga=hi(function(e){for(var t=e.length,n=t,r=Lo(f),i=In(),o=i==s,a=[];n--;){var l=e[n]=Gn(l=e[n])?l:[];r[n]=o&&l.length>=120?Va(n&&l):null}var u=e[0],c=-1,f=u?u.length:0,d=r[0];e:for(;++c2?e[t-2]:E,r=t>1?e[t-1]:E;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):E,r=E),e.length=t,Lr(e,n,r)}),ts=hi(function(e,t){return mt(e,Ot(t))}),ns=un(function(e,t,n){Yo.call(e,n)?++e[n]:e[n]=1}),rs=yn(Pa),is=yn(Na,!0),os=xn(tt,Pa),as=xn(nt,Na),ss=un(function(e,t,n){Yo.call(e,n)?e[n].push(t):e[n]=[t]}),ls=un(function(e,t,n){e[n]=t}),us=hi(function(e,t,n){var r=-1,i="function"==typeof t,o=Qn(t),a=Gn(e)?Lo(e.length):[];return Pa(e,function(e){var s=i?t:o&&null!=e?e[t]:null;a[++r]=s?s.apply(e,n):qn(e,t,n)}),a}),cs=un(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),fs=On(ut,Pa),ds=On(ct,Na),hs=hi(function(e,t){if(null==e)return[];var n=t[2];return n&&Yn(t[0],t[1],n)&&(t.length=1),Qt(e,Ot(t),[])}),ps=wa||function(){return(new Po).getTime()},gs=hi(function(e,t,n){var r=O;if(n.length){var i=w(n,gs.placeholder);r|=D}return Dn(e,r,t,n,i)}),vs=hi(function(e,t){t=t.length?Ot(t):zi(e);for(var n=-1,r=t.length;++ne?n=this.takeRight(-e):e&&(n=this.drop(e)),t!==E&&(t=+t||0,n=0>t?n.dropRight(-t):n.take(t-e)),n},i.prototype.toArray=function(){return this.drop(0)},At(i.prototype,function(e,n){var o=t[n];if(o){var a=/^(?:filter|map|reject)|While$/.test(n),s=/^(?:first|last)$/.test(n);t.prototype[n]=function(){var n=arguments,l=this.__chain__,u=this.__wrapped__,c=!!this.__actions__.length,f=u instanceof i,d=n[0],h=f||Ss(u);h&&a&&"function"==typeof d&&1!=d.length&&(f=h=!1);var p=f&&!c;if(s&&!l)return p?e.call(u):o.call(t,this.value());var g=function(e){var r=[e];return sa.apply(r,n),o.apply(t,r)};if(h){var v=p?u:new i(this),m=e.apply(v,n);if(!s&&(c||m.__actions__)){var y=m.__actions__||(m.__actions__=[]);y.push({func:Ir,args:[g],thisArg:t})}return new r(m,l)}return this.thru(g)}}}),tt(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?qo:Uo)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(e); +t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),At(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name,o=Ra[i]||(Ra[i]=[]);o.push({name:n,func:r})}}),Ra[Tn(null,T).name]=[{name:"wrapper",func:null}],i.prototype.clone=b,i.prototype.reverse=J,i.prototype.value=ne,t.prototype.chain=Vr,t.prototype.commit=Wr,t.prototype.plant=Hr,t.prototype.reverse=zr,t.prototype.toString=Ur,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Br,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var E,S="3.9.3",O=1,T=2,A=4,M=8,R=16,D=32,L=64,P=128,N=256,F=30,j="...",I=150,V=16,W=0,H=1,z=2,U="Expected a function",B="__lodash_placeholder__",q="[object Arguments]",G="[object Array]",K="[object Boolean]",Y="[object Date]",Q="[object Error]",X="[object Function]",J="[object Map]",Z="[object Number]",ee="[object Object]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object WeakMap]",oe="[object ArrayBuffer]",ae="[object Float32Array]",se="[object Float64Array]",le="[object Int8Array]",ue="[object Int16Array]",ce="[object Int32Array]",fe="[object Uint8Array]",de="[object Uint8ClampedArray]",he="[object Uint16Array]",pe="[object Uint32Array]",ge=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ye=/&(?:amp|lt|gt|quot|#39|#96);/g,be=/[&<>"'`]/g,we=RegExp(ye.source),$e=RegExp(be.source),xe=/<%-([\s\S]+?)%>/g,_e=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,ke=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ee=/^\w*$/,Se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Oe=/[.*+?^${}()|[\]\/\\]/g,Te=RegExp(Oe.source),Ae=/[\u0300-\u036f\ufe20-\ufe23]/g,Me=/\\(\\)?/g,Re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,De=/\w*$/,Le=/^0[xX]/,Pe=/^\[object .+?Constructor\]$/,Ne=/^\d+$/,Fe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,je=/($^)/,Ie=/['\n\r\u2028\u2029\\]/g,Ve=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),We=" \f \ufeff\n\r\u2028\u2029 ᠎              ",He=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],ze=-1,Ue={};Ue[ae]=Ue[se]=Ue[le]=Ue[ue]=Ue[ce]=Ue[fe]=Ue[de]=Ue[he]=Ue[pe]=!0,Ue[q]=Ue[G]=Ue[oe]=Ue[K]=Ue[Y]=Ue[Q]=Ue[X]=Ue[J]=Ue[Z]=Ue[ee]=Ue[te]=Ue[ne]=Ue[re]=Ue[ie]=!1;var Be={};Be[q]=Be[G]=Be[oe]=Be[K]=Be[Y]=Be[ae]=Be[se]=Be[le]=Be[ue]=Be[ce]=Be[Z]=Be[ee]=Be[te]=Be[re]=Be[fe]=Be[de]=Be[he]=Be[pe]=!0,Be[Q]=Be[X]=Be[J]=Be[ne]=Be[ie]=!1;var qe={leading:!1,maxWait:0,trailing:!1},Ge={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ke={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ye={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Qe={"function":!0,object:!0},Xe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Je=Qe[typeof t]&&t&&!t.nodeType&&t,Ze=Qe[typeof e]&&e&&!e.nodeType&&e,et=Je&&Ze&&"object"==typeof i&&i&&i.Object&&i,tt=Qe[typeof self]&&self&&self.Object&&self,nt=Qe[typeof window]&&window&&window.Object&&window,rt=(Ze&&Ze.exports===Je&&Je,et||nt!==(this&&this.window)&&nt||tt||this),it=k();rt._=it,r=function(){return it}.call(t,n,t,e),!(r!==E&&(e.exports=r))}).call(this)}).call(t,n(165)(e),function(){return this}())},function(e,t,n){/** * State-based routing for AngularJS * @version v0.2.15 * @link http://angular-ui.github.com/ * @license MIT License, http://www.opensource.org/licenses/MIT */ -"undefined"!=typeof e&&"undefined"!=typeof t&&e.exports===t&&(e.exports="ui.router"),function(e,t,n){"use strict";function r(e,t){return I(new(I(function(){},{prototype:e})),t)}function i(e){return j(arguments,function(t){t!==e&&j(t,function(t,n){e.hasOwnProperty(n)||(e[n]=t)})}),e}function o(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}function a(e){if(Object.keys)return Object.keys(e);var t=[];return j(e,function(e,n){t.push(n)}),t}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t,Number(arguments[2])||0);var n=e.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=n);n>r;r++)if(r in e&&e[r]===t)return r;return-1}function l(e,t,n,r){var i,l=o(n,r),u={},c=[];for(var f in l)if(l[f].params&&(i=a(l[f].params),i.length))for(var d in i)s(c,i[d])>=0||(c.push(i[d]),u[i[d]]=e[i[d]]);return I({},u,t)}function u(e,t,n){if(!n){n=[];for(var r in e)n.push(r)}for(var i=0;i "));if(y[n]=r,P(e))v.push(n,[function(){return t.get(e)}],u);else{var i=t.annotate(e);j(i,function(e){e!==n&&l.hasOwnProperty(e)&&p(l[e],e)}),v.push(n,e,i)}m.pop(),y[n]=o}}function h(e){return N(e)&&e.then&&e.$$promises}if(!N(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],m=[],y={};return j(l,p),l=m=y=null,function(r,o,a){function s(){--w||($||i(b,o.$$values),m.$$values=b,m.$$promises=m.$$promises||!0,delete m.$$inheritedValues,p.resolve(b))}function l(e){m.$$failure=e,p.reject(e)}function u(n,i,o){function u(e){f.reject(e),l(e)}function c(){if(!D(m.$$failure))try{f.resolve(t.invoke(i,a,b)),f.promise.then(function(e){b[n]=e,s()},u)}catch(e){u(e)}}var f=e.defer(),d=0;j(o,function(e){y.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&(d++,y[e].then(function(t){b[e]=t,--d||c()},u))}),d||c(),y[n]=f.promise}if(h(r)&&a===n&&(a=o,o=r,r=null),r){if(!N(r))throw new Error("'locals' must be an object")}else r=c;if(o){if(!h(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var p=e.defer(),m=p.promise,y=m.$$promises={},b=I({},r),w=1+v.length/3,$=!1;if(D(o.$$failure))return l(o.$$failure),m;o.$$inheritedValues&&i(b,d(o.$$inheritedValues,g)),I(y,o.$$promises),o.$$values?($=i(b,d(o.$$values,g)),m.$$inheritedValues=d(o.$$values,g),s()):(o.$$inheritedValues&&(m.$$inheritedValues=d(o.$$inheritedValues,g)),o.then(s,l));for(var x=0,C=v.length;C>x;x+=3)r.hasOwnProperty(v[x])?s():u(v[x],v[x+1],v[x+2]);return m}},this.resolve=function(e,t,n,r){return this.study(e)(t,n,r)}}function v(e,t,n){this.fromConfig=function(e,t,n){return D(e.template)?this.fromString(e.template,t):D(e.templateUrl)?this.fromUrl(e.templateUrl,t):D(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return L(e)?e(t):e},this.fromUrl=function(n,r){return L(n)&&(n=n(r)),null==n?null:e.get(n,{cache:t,headers:{Accept:"text/html"}}).then(function(e){return e.data})},this.fromProvider=function(e,t,r){return n.invoke(e,null,r||{params:t})}}function m(e,t,i){function o(t,n,r,i){if(v.push(t),h[t])return h[t];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(g[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");return g[t]=new W.Param(t,n,r,i),g[t]}function a(e,t,n,r){var i=["",""],o=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:i=["?(",")?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+t+i[1]}function s(i,o){var a,s,l,u,c;return a=i[2]||i[3],c=t.params[a],l=e.substring(d,i.index),s=o?i[4]:i[4]||("*"==i[1]?".*":null),u=W.type(s||"string")||r(W.type("string"),{pattern:new RegExp(s,t.caseInsensitive?"i":n)}),{id:a,regexp:s,segment:l,type:u,cfg:c}}t=I({params:{}},N(t)?t:{});var l,u=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",d=0,p=this.segments=[],h=i?i.params:{},g=this.params=i?i.params.$$new():new W.ParamSet,v=[];this.source=e;for(var m,y,b;(l=u.exec(e))&&(m=s(l,!1),!(m.segment.indexOf("?")>=0));)y=o(m.id,m.type,m.cfg,"path"),f+=a(m.segment,y.type.pattern.source,y.squash,y.isOptional),p.push(m.segment),d=u.lastIndex;b=e.substring(d);var w=b.indexOf("?");if(w>=0){var $=this.sourceSearch=b.substring(w);if(b=b.substring(0,w),this.sourcePath=e.substring(0,d+w),$.length>0)for(d=0;l=c.exec($);)m=s(l,!0),y=o(m.id,m.type,m.cfg,"search"),d=u.lastIndex}else this.sourcePath=e,this.sourceSearch="";f+=a(b)+(t.strict===!1?"/?":"")+"$",p.push(b),this.regexp=new RegExp(f,t.caseInsensitive?"i":n),this.prefix=p[0],this.$$paramNames=v}function y(e){I(this,e)}function b(){function e(e){return null!=e?e.toString().replace(/\//g,"%2F"):e}function i(e){return null!=e?e.toString().replace(/%2F/g,"/"):e}function o(){return{strict:g,caseInsensitive:d}}function l(e){return L(e)||F(e)&&L(e[e.length-1])}function u(){for(;x.length;){var e=x.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(w[e.name],f.invoke(e.def))}}function c(e){I(this,e||{})}W=this;var f,d=!1,g=!0,v=!1,w={},$=!0,x=[],C={string:{encode:e,decode:i,is:function(e){return null==e||!D(e)||"string"==typeof e},pattern:/[^/]*/},"int":{encode:e,decode:function(e){return parseInt(e,10)},is:function(e){return D(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return e===!0||e===!1},pattern:/0|1/},date:{encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):n},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):n},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return this.is(e)&&this.is(t)&&e.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^/]*/},any:{encode:t.identity,decode:t.identity,equals:t.equals,pattern:/.*/}};b.$$getDefaultValue=function(e){if(!l(e.value))return e.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(e.value)},this.caseInsensitive=function(e){return D(e)&&(d=e),d},this.strictMode=function(e){return D(e)&&(g=e),g},this.defaultSquashPolicy=function(e){if(!D(e))return v;if(e!==!0&&e!==!1&&!P(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return v=e,e},this.compile=function(e,t){return new m(e,I(o(),t))},this.isMatcher=function(e){if(!N(e))return!1;var t=!0;return j(m.prototype,function(n,r){L(n)&&(t=t&&D(e[r])&&L(e[r]))}),t},this.type=function(e,t,n){if(!D(t))return w[e];if(w.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return w[e]=new y(I({name:e},t)),n&&(x.push({name:e,def:n}),$||u()),this},j(C,function(e,t){w[t]=new y(I({name:t},e))}),w=r(w,{}),this.$get=["$injector",function(e){return f=e,$=!1,u(),j(C,function(e,t){w[t]||(w[t]=new y(e))}),this}],this.Param=function(e,t,r,i){function o(e){var t=N(e)?a(e):[],n=-1===s(t,"value")&&-1===s(t,"type")&&-1===s(t,"squash")&&-1===s(t,"array");return n&&(e={value:e}),e.$$fn=l(e.value)?e.value:function(){return e.value},e}function u(t,n,r){if(t.type&&n)throw new Error("Param '"+e+"' has two type configurations.");return n?n:t.type?t.type instanceof y?t.type:new y(t.type):"config"===r?w.any:w.string}function c(){var t={array:"search"===i?"auto":!1},n=e.match(/\[\]$/)?{array:!0}:{};return I(t,n,r).array}function d(e,t){var n=e.squash;if(!t||n===!1)return!1;if(!D(n)||null==n)return v;if(n===!0||P(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function g(e,t,r,i){var o,a,l=[{from:"",to:r||t?n:""},{from:null,to:r||t?n:""}];return o=F(e.replace)?e.replace:[],P(i)&&o.push({from:i,to:n}),a=h(o,function(e){return e.from}),p(l,function(e){return-1===s(a,e.from)}).concat(o)}function m(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var e=f.invoke(r.$$fn);if(null!==e&&e!==n&&!x.type.is(e))throw new Error("Default value ("+e+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return e}function b(e){function t(e){return function(t){return t.from===e}}function n(e){var n=h(p(x.replace,t(e)),function(e){return e.to});return n.length?n[0]:e}return e=n(e),D(e)?x.type.$normalize(e):m()}function $(){return"{Param:"+e+" "+t+" squash: '"+k+"' optional: "+_+"}"}var x=this;r=o(r),t=u(r,t,i);var C=c();t=C?t.$asArray(C,"search"===i):t,"string"!==t.name||C||"path"!==i||r.value!==n||(r.value="");var _=r.value!==n,k=d(r,_),E=g(r,C,_,k);I(this,{id:e,type:t,location:i,array:C,squash:k,replace:E,isOptional:_,value:b,dynamic:n,config:r,toString:$})},c.prototype={$$new:function(){return r(this,I(new c,{$$parent:this}))},$$keys:function(){for(var e=[],t=[],n=this,r=a(c.prototype);n;)t.push(n),n=n.$$parent;return t.reverse(),j(t,function(t){j(a(t),function(t){-1===s(e,t)&&-1===s(r,t)&&e.push(t)})}),e},$$values:function(e){var t={},n=this;return j(n.$$keys(),function(r){t[r]=n[r].value(e&&e[r])}),t},$$equals:function(e,t){var n=!0,r=this;return j(r.$$keys(),function(i){var o=e&&e[i],a=t&&t[i];r[i].type.equals(o,a)||(n=!1)}),n},$$validates:function(e){var r,i,o,a,s,l=this.$$keys();for(r=0;ri;i++)if(t(u[i]))return;c&&t(c)}}function p(){return l=l||i.$on("$locationChangeSuccess",d)}var h,g=a.baseHref(),v=r.url();return f||p(),{sync:function(){d()},listen:function(){return p()},update:function(e){return e?void(v=r.url()):void(r.url()!==v&&(r.url(v),r.replace()))},push:function(e,t,i){var o=e.format(t||{});null!==o&&t&&t["#"]&&(o+="#"+t["#"]),r.url(o),h=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,o){if(!n.validates(i))return null;var a=e.html5Mode();t.isObject(a)&&(a=a.enabled);var l=n.format(i);if(o=o||{},a||null===l||(l="#"+e.hashPrefix()+l),null!==l&&i&&i["#"]&&(l+="#"+i["#"]),l=s(l,a,o.absolute),!o.absolute||!l)return l;var u=!a&&l?"/":"",c=r.port();return c=80===c||443===c?"":":"+c,[r.protocol(),"://",r.host(),c,u,l].join("")}}}var l,u=[],c=null,f=!1;this.rule=function(e){if(!L(e))throw new Error("'rule' must be a function");return u.push(e),this},this.otherwise=function(e){if(P(e)){var t=e;e=function(){return t}}else if(!L(e))throw new Error("'rule' must be a function");return c=e,this},this.when=function(e,t){var n,s=P(t);if(P(e)&&(e=r.compile(e)),!s&&!L(t)&&!F(t))throw new Error("invalid 'handler' in when()");var l={matcher:function(e,t){return s&&(n=r.compile(t),t=["$match",function(e){return n.format(e)}]),I(function(n,r){return a(n,t,e.exec(r.path(),r.search()))},{prefix:P(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(n=t,t=["$match",function(e){return o(n,e)}]),I(function(n,r){return a(n,t,e.exec(r.path()))},{prefix:i(e)})}},u={matcher:r.isMatcher(e),regex:e instanceof RegExp};for(var c in u)if(u[c])return this.rule(l[c](e,t));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),f=e},this.$get=s,s.$inject=["$location","$rootScope","$injector","$browser"]}function $(e,i){function o(e){return 0===e.indexOf(".")||0===e.indexOf("^")}function d(e,t){if(!e)return n;var r=P(e),i=r?e:e.name,a=o(i);if(a){if(!t)throw new Error("No reference point given for path '"+i+"'");t=d(t);for(var s=i.split("."),l=0,u=s.length,c=t;u>l;l++)if(""!==s[l]||0!==l){if("^"!==s[l])break;if(!c.parent)throw new Error("Path '"+i+"' not valid for state '"+t.name+"'");c=c.parent}else c=t;s=s.slice(l).join("."),i=c.name+(c.name&&s?".":"")+s}var f=k[i];return!f||!r&&(r||f!==e&&f.self!==e)?n:f}function p(e,t){E[e]||(E[e]=[]),E[e].push(t)}function g(e){for(var t=E[e]||[];t.length;)v(t.shift())}function v(t){t=r(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}});var n=t.name;if(!P(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(k.hasOwnProperty(n))throw new Error("State '"+n+"'' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):P(t.parent)?t.parent:N(t.parent)&&P(t.parent.name)?t.parent.name:"";if(i&&!k[i])return p(i,t.self);for(var o in O)L(O[o])&&(t[o]=O[o](t,O.$delegates[o]));return k[n]=t,!t[S]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){_.$current.navigable==t&&u(e,n)||_.transitionTo(t,e,{inherit:!0,location:!1})}]),g(n),t}function m(e){return e.indexOf("*")>-1}function y(e){for(var t=e.split("."),n=_.$current.name.split("."),r=0,i=t.length;i>r;r++)"*"===t[r]&&(n[r]="*");return"**"===t[0]&&(n=n.slice(s(n,t[1])),n.unshift("**")),"**"===t[t.length-1]&&(n.splice(s(n,t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length!=n.length?!1:n.join("")===t.join("")}function b(e,t){return P(e)&&!D(t)?O[e]:L(t)&&P(e)?(O[e]&&!O.$delegates[e]&&(O.$delegates[e]=O[e]),O[e]=t,this):this}function w(e,t){return N(e)?t=e:t.name=e,v(t),this}function $(e,i,o,s,f,p,g,v,b){function w(t,n,r,o){var a=e.$broadcast("$stateNotFound",t,n,r);if(a.defaultPrevented)return g.update(),T;if(!a.retry)return null;if(o.$retry)return g.update(),A;var s=_.transition=i.when(a.retry);return s.then(function(){return s!==_.transition?E:(t.options.$retry=!0,_.transitionTo(t.to,t.toParams,t.options))},function(){return T}),g.update(),s}function $(e,n,r,a,l,u){function d(){var n=[];return j(e.views,function(r,i){var a=r.resolve&&r.resolve!==e.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:l.globals,params:p,notify:u.notify})||""}],n.push(f.resolve(a,l.globals,l.resolve,e).then(function(n){if(L(r.controllerProvider)||F(r.controllerProvider)){var o=t.extend({},a,l.globals);n.$$controller=s.invoke(r.controllerProvider,null,o)}else n.$$controller=r.controller;n.$$state=e,n.$$controllerAs=r.controllerAs,l[i]=n}))}),i.all(n).then(function(){return l.globals})}var p=r?n:c(e.params.$$keys(),n),h={$stateParams:p};l.resolve=f.resolve(e.resolve,h,l.resolve,e);var g=[l.resolve.then(function(e){l.globals=e})];return a&&g.push(a),i.all(g).then(d).then(function(e){return l})}var E=i.reject(new Error("transition superseded")),O=i.reject(new Error("transition prevented")),T=i.reject(new Error("transition aborted")),A=i.reject(new Error("transition failed"));return C.locals={resolve:null,globals:{$stateParams:{}}},_={params:{},current:C.self,$current:C,transition:null},_.reload=function(e){return _.transitionTo(_.current,p,{reload:e||!0,inherit:!1,notify:!0})},_.go=function(e,t,n){return _.transitionTo(e,t,I({inherit:!0,relative:_.$current},n))},_.transitionTo=function(t,n,o){n=n||{},o=I({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,u=_.$current,f=_.params,h=u.path,v=d(t,o.relative),m=n["#"];if(!D(v)){var y={to:t,toParams:n,options:o},b=w(y,u.self,f,o);if(b)return b;if(t=y.to,n=y.toParams,o=y.options,v=d(t,o.relative),!D(v)){if(!o.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+o.relative+"'")}}if(v[S])throw new Error("Cannot transition to abstract state '"+t+"'");if(o.inherit&&(n=l(p,n||{},_.$current,v)),!v.params.$$validates(n))return A;n=v.params.$$values(n),t=v;var k=t.path,T=0,M=k[T],R=C.locals,L=[];if(o.reload){if(P(o.reload)||N(o.reload)){if(N(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var F=o.reload===!0?h[0]:d(o.reload);if(o.reload&&!F)throw new Error("No such reload state '"+(P(o.reload)?o.reload:o.reload.name)+"'");for(;M&&M===h[T]&&M!==F;)R=L[T]=M.locals,T++,M=k[T]}}else for(;M&&M===h[T]&&M.ownParams.$$equals(n,f);)R=L[T]=M.locals,T++,M=k[T];if(x(t,n,u,f,R,o))return m&&(n["#"]=m),_.params=n,V(_.params,p),o.location&&t.navigable&&t.navigable.url&&(g.push(t.navigable.url,n,{$$avoidResync:!0,replace:"replace"===o.location}),g.update(!0)),_.transition=null,i.when(_.current);if(n=c(t.params.$$keys(),n||{}),o.notify&&e.$broadcast("$stateChangeStart",t.self,n,u.self,f).defaultPrevented)return e.$broadcast("$stateChangeCancel",t.self,n,u.self,f),g.update(),O;for(var j=i.when(R),W=T;W=T;r--)a=h[r],a.self.onExit&&s.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=T;r=0?i:i+"@"+(o?o.state.name:"")}function S(e,t){var n,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e=t+"("+r[1]+")"),n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!n||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function O(e){var t=e.parent().inheritedData("$uiView");return t&&t.state&&t.state.name?t.state:void 0}function T(e,n){var r=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,s){var l=S(a.uiSref,e.current.name),u=null,c=O(o)||e.$current,f="[object SVGAnimatedString]"===Object.prototype.toString.call(o.prop("href"))?"xlink:href":"href",d=null,p="A"===o.prop("tagName").toUpperCase(),h="FORM"===o[0].nodeName,g=h?"action":f,v=!0,m={relative:c,inherit:!0},y=i.$eval(a.uiSrefOpts)||{};t.forEach(r,function(e){e in y&&(m[e]=y[e])});var b=function(n){if(n&&(u=t.copy(n)),v){d=e.href(l.state,u,m);var r=s[1]||s[0];return r&&r.$$addStateInfo(l.state,u),null===d?(v=!1,!1):void a.$set(g,d)}};l.paramExpr&&(i.$watch(l.paramExpr,function(e,t){e!==u&&b(e)},!0),u=t.copy(i.$eval(l.paramExpr))),b(),h||o.bind("click",function(t){var r=t.which||t.button;if(!(r>1||t.ctrlKey||t.metaKey||t.shiftKey||o.attr("target"))){var i=n(function(){e.go(l.state,u,m)});t.preventDefault();var a=p&&!d?1:0;t.preventDefault=function(){a--<=0&&n.cancel(i)}}})}}}function A(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,r,i){function o(){a()?r.addClass(l):r.removeClass(l)}function a(){for(var e=0;ei;i++){a=s[i];var f=this.params[a],d=r[i+1];for(o=0;oi;i++)a=s[i],c[a]=this.params[a].value(t[a]);return c},m.prototype.parameters=function(e){return D(e)?this.params[e]||null:this.$$paramNames},m.prototype.validates=function(e){return this.params.$$validates(e)},m.prototype.format=function(e){function t(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})}e=e||{};var n=this.segments,r=this.parameters(),i=this.params;if(!this.validates(e))return null;var o,a=!1,s=n.length-1,l=r.length,u=n[0];for(o=0;l>o;o++){var c=s>o,f=r[o],d=i[f],p=d.value(e[f]),g=d.isOptional&&d.type.equals(d.value(),p),v=g?d.squash:!1,m=d.type.encode(p);if(c){var y=n[o+1];if(v===!1)null!=m&&(u+=F(m)?h(m,t).join("-"):encodeURIComponent(m)),u+=y;else if(v===!0){var b=u.match(/\/$/)?/\/?(.*)/:/(.*)/;u+=y.match(b)[1]}else P(v)&&(u+=v+y)}else{if(null==m||g&&v!==!1)continue;F(m)||(m=[m]),m=h(m,encodeURIComponent).join("&"+f+"="),u+=(a?"&":"?")+(f+"="+m),a=!0}}return u},y.prototype.is=function(e,t){return!0},y.prototype.encode=function(e,t){return e},y.prototype.decode=function(e,t){return e},y.prototype.equals=function(e,t){return e==t},y.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},y.prototype.pattern=/.*/,y.prototype.toString=function(){return"{Type:"+this.name+"}"},y.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},y.prototype.$asArray=function(e,t){function r(e,t){function r(e,t){return function(){return e[t].apply(e,arguments)}}function i(e){return F(e)?e:D(e)?[e]:[]}function o(e){switch(e.length){case 0:return n;case 1:return"auto"===t?e[0]:e;default:return e}}function a(e){return!e}function s(e,t){return function(n){n=i(n);var r=h(n,e);return t===!0?0===p(r,a).length:o(r)}}function l(e){return function(t,n){var r=i(t),o=i(n);if(r.length!==o.length)return!1;for(var a=0;ar;r++)e[r]=this.fillReferencesValuesFromEntry(e[r],t,n);return e}},{key:"fillReferencesValuesFromEntry",value:function(e,t,n){for(var r in t){var i=t[r],o=this.getReferenceChoicesById(i),a=[],s=i.getMappedValue(e.values[r],e.values);if("reference_many"===i.type()){for(var l in s){var u=s[l];a.push(o[u])}e.listValues[r]=a}else n&&s&&s in o&&(e.listValues[r]=i.getMappedValue(o[s],e.values))}return e}},{key:"getReferenceChoicesById",value:function(e){for(var t={},n=e.targetField().name(),r=e.targetEntity().identifier().name(),i=this.getEntries(e.targetEntity().uniqueId+"_values"),o=0,a=i.length;a>o;o++){var s=i[o];t[s.values[r]]=s.values[n]}return t}}]),e}();t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt;t++){var r=this._targetFields[t];e.push({field:r,label:r.label()})}return e}},{key:"getSortFieldName",value:function(){return this._targetEntity.name()+"_ListView."+(this.sortField()||this._targetReferenceField)}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n':this._icon}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;s=u=l=void 0,r=!1;var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return void 0;e=u,t=o,n=a,r=!0}},s=n(2),l=r(s),u=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._type="ShowView"}return o(t,e),t}(l["default"]);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";n(122),n(47);var r=n(21),i=angular.module("AdminDescriptionModule",[]);i.constant("AdminDescription",new r);var o=angular.module("ng-admin",["main","crud","AdminDescriptionModule"]);o.config(["NgAdminConfigurationProvider","AdminDescription",function(e,t){e.setAdminDescription(t)}])},function(e,t,n){"use strict";var r=n(4),i=r.module("crud",["ui.router","ui.bootstrap","ngSanitize","textAngular","ngInflection","ui.codemirror","angularFileUpload","ngNumeraljs"]);i.controller("ListController",n(104)),i.controller("ShowController",n(120)),i.controller("FormController",n(101)),i.controller("DeleteController",n(70)),i.controller("BatchDeleteController",n(69)),i.service("EntryFormatter",n(112)),i.service("PromisesResolver",n(113)),i.service("ReadQueries",n(117)),i.service("WriteQueries",n(118)),i.service("RestWrapper",n(114)),i.directive("maJsonValidator",n(121)),i.directive("maField",n(76)),i.directive("maButtonField",n(71)),i.directive("maChoiceField",n(73)),i.directive("maChoicesField",n(74)),i.directive("maDateField",n(75)),i.directive("maInputField",n(78)),i.directive("maJsonField",n(79)),i.directive("maFileField",n(77)),i.directive("maCheckboxField",n(72)),i.directive("maTextField",n(81)),i.directive("maWysiwygField",n(82)),i.directive("maTemplateField",n(80)),i.provider("FieldViewConfiguration",n(87)),i.directive("listActions",n(103)),i.directive("maDatagrid",n(105)),i.directive("maDatagridPagination",n(109)),i.directive("maDatagridInfinitePagination",n(106)),i.directive("maDatagridItemSelector",n(107)),i.directive("maDatagridMultiSelector",n(108)),i.directive("maFilter",n(99)),i.directive("maColumn",n(59)),i.directive("maBooleanColumn",n(57)),i.directive("maChoicesColumn",n(58)),i.directive("maDateColumn",n(60)),i.directive("maJsonColumn",n(61)),i.directive("maNumberColumn",n(62)),i.directive("maReferenceManyColumn",n(63)),i.directive("maReferenceManyLinkColumn",n(64)),i.directive("maStringColumn",n(65)),i.directive("maTemplateColumn",n(66)),i.directive("maWysiwygColumn",n(67)),i.directive("maBackButton",n(48)),i.directive("maCreateButton",n(50)),i.directive("maEditButton",n(52)),i.directive("maFilteredListButton",n(54)),i.directive("maShowButton",n(56)),i.directive("maListButton",n(55)),i.directive("maDeleteButton",n(51)),i.directive("maBatchDeleteButton",n(49)),i.directive("maExportToCsvButton",n(53)),i.directive("maViewActions",n(115)),i.directive("maViewBatchActions",n(116)),i.directive("compile",n(111)),i.config(n(119)),i.config(n(68)),i.factory("Papa",function(){return n(163)}),i.factory("notification",function(){var e=n(159);return e.timeout=5e3,e.clickToClose=!0,e}),i.factory("progression",function(){return n(162)}),e.exports=i},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{size:"@",label:"@"},link:function(t){t.label=t.label||"Back",t.back=function(){e.history.back()}},template:' {{ ::label }}'}}return e.$inject=["$window"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",selection:"&",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoBatchDelete=function(){var n=(t.entity(),t.selection().map(function(e){return e.identifierValue}));e.go("batchDelete",angular.extend({ids:n,entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Create",t.gotoCreate=function(){e.go(e.get("create"),angular.extend({entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoDelete=function(){e.go(e.get("delete"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Edit",t.gotoEdit=function(){e.go(e.get("edit"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r,i){return{restrict:"E",scope:{entity:"&",label:"@",datastore:"&",search:"&"},template:'',link:function(o){o.label=o.label||"Export",o.datastore=o.datastore(),o.entity=o.entity();var a=o.entity.exportView(),s=o.entity.listView();if(0===a.fields().length){var l=s.exportFields();null===l&&(l=s.fields()),a.fields(l),a.filters(s.filters())}o.has_export=a.fields().length>0;var u=r.getFormatter(a.fields());o.exportToCsv=function(){var r,s,l;i.getAll(a,-1,o.search(),e.sortField,e.sortDir).then(function(e){return r=e.data},function(e){n.log(e.message,{addnCls:"humane-flatty-error"})}).then(function(e){return i.getFilteredReferenceData(a.getNonOptimizedReferences(),e)}).then(function(e){return s=e,i.getOptimizedReferencedData(a.getOptimizedReferences(),r)}).then(function(e){l=e;var t,n=a.getReferences(),r=angular.extend(s,l);for(var i in r)t=o.datastore.mapEntries(n[i].targetEntity().name(),n[i].targetEntity().identifier(),[n[i].targetField()],r[i]),o.datastore.setEntries(n[i].targetEntity().uniqueId+"_values",t)}).then(function(){var e=o.datastore.mapEntries(a.entity.name(),a.identifier(),a.getFields(),r);o.datastore.fillReferencesValuesFromCollection(e,a.getReferences(),!0);for(var n=[],i=e.length-1;i>=0;i--)n[i]=u(e[i]);var s=t.unparse(n),l=document.createElement("a");document.body.appendChild(l),l.setAttribute("href","data:application/octet-stream;charset=utf-8,"+encodeURIComponent(s)),l.setAttribute("download",o.entity.name()+".csv"),l.click()})}}}}return e.$inject=["$stateParams","Papa","notification","EntryFormatter","ReadQueries"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entityName:"@",filter:"&",label:"@",size:"@"},link:function(t){t.label=t.label||"See all related "+t.entityName,t.gotoList=function(){e.go(e.get("list"),{entity:t.entityName,search:t.filter()})}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"List";var n=t.$parent.entity?t.$parent.entity.name():null,r=t.entity().name(),i={entity:r};r===n&&angular.extend(i,e.params),t.gotoList=function(){e.go(e.get("list"),i)}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Show",t.gotoShow=function(){e.go(e.get("show"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},link:function(e){e.isOk=!!e.value()},template:""}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n,r,i){function o(e){if(e.isDetailLink()===!1)return!1;if("reference"!=e.type()&&"reference_many"!=e.type())return!0;var t=e.targetEntity().name(),n=r().getEntity(t);return n?n.isReadOnly?n.showView().enabled:n.editionView().enabled:!1}return{restrict:"E",scope:{field:"&",entry:"&",entity:"&",datastore:"&"},link:function(a,s,l){a.datastore=a.datastore(),a.field=a.field(),a.entry=a.entry();var u=a.field.type();o(a.field)?s.append(i[u].getLinkWidget()):s.append(i[u].getReadWidget()),n(s.contents())(a),a.gotoDetail=function(){this.clearRouteParams();var n=a.field.detailLinkRoute();"edit"!=n||a.entity().editionView().enabled||(n="show"),e.path("/"+a.entry.entityName+"/"+n+"/"+a.entry.identifierValue),t(0)},a.gotoReference=function(){this.clearRouteParams();var t=a.field.targetEntity().name(),n=r().getEntity(t),i=a.entry.values[a.field.name()],o=n.isReadOnly?"show":a.field.detailLinkRoute();e.path("/"+t+"/"+o+"/"+i)},a.clearRouteParams=function(){e.search("q",null),e.search("page",null),e.search("sortField",null),e.search("sortDir",null)}}}}return t.$inject=["$location","$anchorScroll","$compile","NgAdminConfiguration","FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | date:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&"},link:function(t,n){t.guessType=function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t?"Object":"[object Array]"===t?"Array":"Literal"};var r='
{{ val }}
{{ key }}{{ val }}
',i=angular.element(r);e(i)(t),n.replaceWith(i)}}}return t.$inject=["$compile"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | numeraljs:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{restrict:"E",scope:{field:"&",values:"&",ids:"&"},link:function(n){n.field=n.field(),n.values=n.values(),n.ids=n.ids();var r=n.field.targetEntity().name(),i=t().getEntity(r);n.gotoReference=function(t){var n=i.isReadOnly?"show":"edit";e.path("/"+r+"/"+n+"/"+t)}},template:'{{ ref }}'}}return t.$inject=["$location","NgAdminConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},template:"{{ value() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&",field:"&"},link:function(t){var n=t.value();t.field().stripTags()&&(n=e("stripTags")(n)),t.htmlValue=n},template:''}}return t.$inject=["$filter"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){e.registerFieldView("boolean",n(83)),e.registerFieldView("choice",n(84)),e.registerFieldView("choices",n(85)),e.registerFieldView("date",n(16)),e.registerFieldView("datetime",n(16)),e.registerFieldView("email",n(86)),e.registerFieldView("file",n(88)),e.registerFieldView("json",n(89)),e.registerFieldView("number",n(90)),e.registerFieldView("password",n(91)),e.registerFieldView("referenced_list",n(94)),e.registerFieldView("reference",n(92)),e.registerFieldView("reference_many",n(93)),e.registerFieldView("string",n(95)),e.registerFieldView("template",n(96)),e.registerFieldView("text",n(97)),e.registerFieldView("wysiwyg",n(98))}r.$inject=["FieldViewConfigurationProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i){this.$scope=e,this.$state=t,this.WriteQueries=n,this.notification=r,this.view=i,this.entity=i.getEntity(),this.entityIds=t.params.ids,this.selection=[],this.title=i.title(),this.description=i.description(),this.actions=i.actions(),this.loadingPage=!1,this.fields=i.fields(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.batchDelete=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.batchDelete(this.view,this.entityIds).then(function(){t.go(t.get("list"),angular.extend({entity:n},t.params)),e.log("Elements successfully deleted.",{addnCls:"humane-flatty-success"})},function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){this.$state.go(this.$state.get("list"),angular.extend({entity:this.entity().name()},this.$state.params))},e.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0},e.$inject=["$scope","$state","WriteQueries","notification","view"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i,o,a){this.$scope=e,this.$state=t,this.WriteQueries=n,this.entityLabel=i.entity,this.entityId=i.id,this.view=o,this.title=o.title(),this.description=o.description(),this.actions=o.actions(),this.entity=o.getEntity(),this.notification=r,this.$scope.entry=a,this.$scope.view=o,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.deleteOne=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.deleteOne(this.view,this.entityId).then(function(){t.go(t.get("list"),angular.extend({entity:n,id:this.entityId},t.params)),e.log("Element successfully deleted.",{addnCls:"humane-flatty-success"})}.bind(this),function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){var e=this.$state;e.go(e.get("edit"),angular.extend({entity:this.entity.name(),id:this.entityId},e.params))},e.prototype.destroy=function(){this.$scope=void 0,this.WriteQueries=void 0,this.$state=void 0,this.view=void 0,this.entity=void 0},e.$inject=["$scope","$state","WriteQueries","notification","params","view","entry"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.label=n.label(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.toggle=function(){this.value=!this.value},e.isActive=function(){return!!this.value}},template:'{{ label }}'}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.rawValue=e.value,e.$watch("rawValue",function(t){e.value=n.parse()(t)}),e.format=n.format(),e.v=n.validation(),e.isOpen=!1;var r=t.find("input").eq(0),i=n.attributes();for(var o in i)r.attr(o,i[o]);e.toggleDatePicker=function(t){t.preventDefault(),t.stopPropagation(),e.isOpen=!e.isOpen}},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=r(e).map(function(e,t){return''+e.getWriteWidget()+""}).join(""),n='
'+t+'

';return{restrict:"E",scope:{field:"&",entry:"=",entity:"&",form:"&",datastore:"&"},link:function(e){e.field=e.field(),e.type=e.field.type(),e.entity=e.entity(),e.form=e.form(),e.datastore=e.datastore(),e.getClassesForField=function(e,t){return"ng-admin-field-"+e.name()+" "+(e.getCssClasses(t)||"col-sm-10 col-md-8 col-lg-7")},e.getInputForField=function(t){return e.form[t.name()]},e.fieldHasValidation=function(e){var t=this.getInputForField(e);return t&&t.$dirty},e.fieldIsValid=function(e){var t=this.getInputForField(e);return t&&t.$valid},e.getFieldValidationClass=function(e){return this.fieldHasValidation(e)?this.fieldIsValid(e)?"has-success":"has-error":void 0}},template:n}}var r=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{scope:{field:"&",value:"="},restrict:"E",link:{pre:function(e){var t=e.field().uploadInformation();if(!t.hasOwnProperty("url"))throw new Error("You must provide a URL property to allow the upload of files.");e.multiple=t.hasOwnProperty("multiple")?t.multiple:!1,e.accept=t.hasOwnProperty("accept")?t.accept:"*",e.apifilename=t.hasOwnProperty("apifilename")?t.apifilename:!1;var n=e.value?e.value.split(","):[];e.files={};for(var r in n)e.files[n[r]]={name:n[r],progress:0}},post:function(n,r){var i=n.field();n.name=i.name(),n.v=i.validation(),n.value&&(n.v.required=!1);var o=r.find("input")[0],a=i.attributes();for(var s in a)o[s]=a[s];n.fileSelected=function(t){if(t){var r;n.files={};for(var i in t)r=angular.copy(n.field().uploadInformation()),r.file=t[i],e.upload(r).progress(function(e){n.files[e.config.file.name]={name:e.config.file.name,progress:Math.min(100,parseInt(100*e.loaded/e.total))}}).success(function(e,t,r,i){if(n.files[i.file.name]={name:n.apifilename?e[n.apifilename]:i.file.name,progress:0},n.apifilename){var o=Object.keys(n.files).map(function(e){return n.files[e].name});n.value=o.join(",")}else n.value=Object.keys(n.files).join(",")}).error(function(e,t,r,i){delete n.files[i.file.name],n.value=Object.keys(n.files).join(",")})}},n.selectFile=function(){t(function(){o.click()},0)}}},template:'
{{ file.progress }}% Complete
{{ file.name }}
'}}return t.$inject=["$upload","$timeout"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{type:"@",field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){(function(t){"use strict";function r(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.jsonValue=null===e.value?"":angular.toJson(e.value,!0);var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.$watch("jsonValue",function(t){if(""==t||"undefined"==typeof t)return void(e.value=null);try{var n=angular.fromJson(t);e.value=n}catch(r){}})},template:''}}var i=n(3);t.jsonlint=n(160),n(153),n(154),n(156),n(155),n(157),n(158),i.defineOption("matchBrackets",!0),i.defineOption("autoCloseBrackets",!0),i.defineOption("lineWrapping",!0),i.defineOption("tabSize",2),i.defineOption("mode","application/json"),i.defineOption("gutters",["CodeMirror-lint-markers"]),i.defineOption("lint",!0),i.defineOption("styleActiveLine",!0),t.CodeMirror=i,r.$inject=[],e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:'' -}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name()},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){this.fieldViews={}}return e.prototype.registerFieldView=function(e,t){this.fieldViews[e]=t},e.prototype.$get=function(){return this.fieldViews},e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display file field as readable"}function n(){return"error: cannot display file field as linkable"}function r(){return"error: cannot display file field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display a json field as linkable"}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display password field as readable"}function n(){return"error: cannot display password field as linkable"}function r(){return"error: cannot display password field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display referenced_list field as linkable"}function r(){return"error: cannot display referenced_list field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(){return''}function i(){return''+r()+""}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){"use strict";function r(){return''}function i(){return"error: cannot display wysiwyg field as linkable"}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=i(e).map(function(e,t){return''+e.getFilterWidget()+""}).join(""),n='';return{restrict:"E",template:n,scope:{filters:"&",datastore:"&"},controllerAs:"filterCtrl",controller:r}}var r=n(100),i=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,n,r){this.$scope=e,this.$state=n,this.$stateParams=r,this.$scope.values=this.$stateParams.search||{},this.$scope.filters=this.$scope.filters(),this.$scope.datastore=this.$scope.datastore(),this.isFilterEmpty=t(this.$scope.values)}function t(e){for(var t in e)if(""!=e[t])return!1;return!0}return e.prototype.filter=function(){var e,t,n,r={},i=this.$scope.filters;for(n in i)t=i[n],e=t.name(),this.$scope.values[e]&&(r[e]=this.$scope.values[e]);this.$stateParams.search=r,this.$stateParams.page=1,this.$state.go(this.$state.current,this.$stateParams,{reload:!0,inherit:!1,notify:!0})},e.prototype.shouldFilter=function(){return Object.keys(this.$scope.filters).length},e.prototype.clearFilters=function(){var e;for(e in this.$scope.values)this.$scope.values[e]=null;this.filter()},e.prototype.destroy=function(){this.$scope=void 0},e.$inject=["$scope","$state","$stateParams"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){this.$scope=e,this.$state=t,this.WriteQueries=n,this.dataStore=s,this.progression=i,this.notification=o,this.title=a.title(),this.description=a.description(),this.actions=a.actions(),this.fields=a.fields(),this.config=r(),this.view=a,this.entity=this.view.getEntity(),this.$scope.entry=s.getFirstEntry(this.entity.uniqueId),this.$scope.view=a,this.$scope.entity=this.entity,this.originEntityId=this.$scope.entry.values[this.entity.identifier().name()],e.$on("$destroy",this.destroy.bind(this))};r.prototype.validateEntry=function(){var e,t,n,r,i=this.form,o=this.$scope.entry,a=this.view.getFields(),s=this.entity.identifier(),l={};if(!i.$valid)return this.notification.log("invalid form",{addnCls:"humane-flatty-error"}),!1;l[s.name()]=o.identifierValue;for(r in a)n=a[r],e=o.values[n.name()],l[n.name()]=e;t=this.dataStore.mapEntry(this.view.entity.name(),this.view.identifier(),this.view.getFields(),l);try{this.view.validate(t)}catch(u){return this.notification.log(u,{addnCls:"humane-flatty-error"}),!1}return l},r.prototype.submitCreation=function(e){e.preventDefault();var t=this.validateEntry(),n=this.entity,r=n.editionView().enabled?"edit":"show";if(t){var i=this.progression,o=this.notification,a=this.$state;i.start(),this.WriteQueries.createOne(this.view,t).then(function(e){var t=this.dataStore.mapEntry(n.name(),this.view.identifier(),this.view.getFields(),e);i.done(),o.log("Element successfully created.",{addnCls:"humane-flatty-success"}),a.go(a.get(r),{entity:n.name(),id:t.identifierValue})}.bind(this),this.handleError.bind(this))}},r.prototype.submitEdition=function(e){e.preventDefault();var t=this.validateEntry();if(t){var n=this.progression,r=this.notification;n.start(),this.WriteQueries.updateOne(this.view,t,this.originEntityId).then(function(){n.done(),r.log("Changes successfully saved.",{addnCls:"humane-flatty-success"})},this.handleError.bind(this))}},r.prototype.handleError=function(e){var t=this.config.getErrorMessageFor(this.view,e);this.progression.done(),this.notification.log(t,{addnCls:"humane-flatty-error"})},r.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0,this.dataStore=void 0,this.view=void 0,this.entity=void 0},r.$inject=["$scope","$state","WriteQueries","NgAdminConfiguration","progression","notification","view","dataStore"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.entity=e.entity(),this.$scope=e,this.$location=t,this.$anchorScroll=n,this.filters={},this.shouldDisplayActions=this.$scope.listActions()&&this.$scope.listActions().length>0,e.toggleSelect=this.toggleSelect.bind(this),e.toggleSelectAll=this.toggleSelectAll.bind(this),this.$scope.gotoDetail=this.gotoDetail.bind(this);var r=this.$location.search();this.sortField="sortField"in r?r.sortField:this.$scope.sortField,this.sortDir="sortDir"in r?r.sortDir:this.$scope.sortDir}return e.prototype.gotoDetail=function(e){this.clearRouteParams();var t=this.$scope.entity,n=t.editionView().enabled?"edit":"show";this.$location.path("/"+e.entityName+"/"+n+"/"+e.identifierValue),this.$anchorScroll(0)},e.prototype.clearRouteParams=function(){this.$location.search("q",null),this.$location.search("page",null),this.$location.search("sortField",null),this.$location.search("sortDir",null)},e.prototype.isSorting=function(e){return this.sortField===this.getSortName(e)},e.prototype.itemClass=function(e){return e%2===0?"even":"odd"},e.prototype.sort=function(e){var t="ASC",n=this.getSortName(e);this.sortField===n&&(t="ASC"===this.sortDir?"DESC":"ASC"),this.$location.search("sortField",n),this.$location.search("sortDir",t)},e.prototype.getSortName=function(e){return this.$scope.name+"."+e.name()},e.prototype.toggleSelect=function(e){var t=this.$scope.selection.slice(),n=t.indexOf(e);return-1===n?void(this.$scope.selection=t.concat(e)):(t.splice(n,1),void(this.$scope.selection=t))},e.prototype.toggleSelectAll=function(){return this.$scope.selection.length0,this.dataStore=s,this.fields=a.fields(),this.listActions=a.listActions(),this.totalItems=l,this.page=t.page||1,this.infinitePagination=this.view.infinitePagination(),this.nextPageCallback=this.nextPage.bind(this),this.setPageCallback=this.setPage.bind(this),this.selection=this.batchActions.length?[]:null,this.sortField=this.$stateParams.sortField||this.view.getSortFieldName(),this.sortDir=this.$stateParams.sortDir||this.view.sortDir(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.nextPage=function(e){if(!this.loadingPage){var t=this.progression,n=this;t.start(),this.ReadQueries.getAll(this.view,e,!0,this.search,this.sortField,this.sortDir).then(function(e){t.done(),n.entries=n.entries.concat(e.entries),n.loadingPage=!1})}},e.prototype.setPage=function(e){this.$location.search("page",e),this.$anchorScroll(0)},e.prototype.destroy=function(){this.$scope=void 0,this.$stateParams=void 0,this.$location=void 0,this.$anchorScroll=void 0,this.dataStore=void 0},e.$inject=["$scope","$stateParams","$location","$anchorScroll","ReadQueries","progression","view","dataStore","totalItems"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",template:r,scope:{name:"@",entries:"=",selection:"=",fields:"&",listActions:"&",entity:"&",sortField:"=",sortDir:"="},controllerAs:"datagrid",controller:i}}var r=n(140),i=n(102);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){var n=r.element(e),i=100,o=t[0].body;return{restrict:"E",scope:{perPage:"@",totalItems:"@",nextPage:"&"},link:function(t){function r(){if(o.offsetHeight-e.innerHeight-e.scrollY=l)return;u++,t.nextPage()(u)}}var a=parseInt(t.perPage,10)||1,s=parseInt(t.totalItems,10),l=Math.ceil(s/a)||1,u=1;n.bind("scroll",r),t.$on("$destroy",function(){n.unbind("scroll",r)})}}}var r=n(4);return t.$inject=["$window","$document"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entry:"=",selection:"=",toggleSelect:"&"},template:'',link:function(e){e.toggle=function(t){e.toggleSelect({entry:t})}}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entries:"=",selection:"=",toggleSelectAll:"&"},template:'',link:function(e,t){e.$watch("selection",function(n){t.children()[0].indeterminate=n.length>0&&n.length!=e.entries.length}),e.$watch("entries",function(n){t.children()[0].indeterminate=e.selection.length>0&&e.selection.length!=n.length})}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{page:"@",perPage:"@",totalItems:"@",setPage:"&"},template:r,controllerAs:"paginationCtrl",controller:i}}var r=n(143),i=n(110);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){this.$scope=e;var t=parseInt(this.$scope.perPage,10)||1,n=parseInt(this.$scope.totalItems,10),r=Math.max(parseInt(this.$scope.page,10),1);this.nbPages=Math.ceil(n/t)||1,this.page=Math.min(this.nbPages,r),this.offsetEnd=Math.min(this.page*t,n),this.offsetBegin=Math.min((this.page-1)*t+1,this.offsetEnd),this.totalItems=n,this.displayPagination=n>t,e.$on("$destroy",this.destroy.bind(this))}n(4);return t.prototype.range=function(e){var t=[],n=this.nbPages;return e>2&&t.push("1"),4==e&&t.push("2"),e>4&&t.push("."),e>1&&t.push(e-1),t.push(e),n>e&&t.push(e+1),e==n-3&&t.push(n-1),n-3>e&&t.push("."),n-1>e&&t.push(n),t},t.prototype.setPage=function(e){0>=e||e>this.nbPages||this.$scope.setPage()(e)},t.prototype.destroy=function(){this.$scope=void 0},t.$inject=["$scope"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){var t=e.get("$compile");return{transclude:!0,link:function(e,n,r,i,o){var a=e.$watch(function(e){return e.$eval(r.compile)},function(i){return!1===i?void o(e,function(e){n.append(e)}):(n.html(i),t(n.contents())(e),void("true"==r.compileOnce&&a()))})}}}return e.$inject=["$injector"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.formatDate=function(t){return function(n){return e("date")(n,t)}}}return e.prototype.formatField=function(e){var t=e.label()||e.name();switch(e.type()){case"boolean":case"choice":case"choices":case"number":case"string":case"text":case"wysiwyg":case"email":case"json":case"file":case"template":return function(n){return{name:t,value:n.values[e.name()]}};case"date":var n=this.formatDate(e.format());return function(r){return{name:t,value:n(r.values[e.name()])}};case"reference":return function(n){return{name:t,value:n.listValues[e.name()]}};case"referenced_list":return}},e.prototype.getFormatter=function(e){var t=e.map(this.formatField.bind(this));return function(e){var n={};return t.map(function(t){return t?t(e):void 0}).forEach(function(e){e&&(n[e.name]=e.value)}),n}},e.$inject=["$filter"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return e.getPromisesResolver()}return e.$inject=["AdminDescription"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.Restangular=e,e.setFullResponse(!0)}return e.prototype.getOne=function(e,t){return this.Restangular.oneUrl(e,t).get().then(function(e){return e.data})},e.prototype.getList=function(e,t,n){return this.Restangular.allUrl(t,n).getList(e)},e.prototype.createOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPOST(e).then(function(e){return e.data})},e.prototype.updateOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPUT(e).then(function(e){return e.data})},e.prototype.deleteOne=function(e,t){return this.Restangular.oneUrl(e,t).customDELETE()},e.$inject=["Restangular"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=e.get("$compile");return{restrict:"E",transclude:!0,scope:{override:"&",entry:"=",entity:"=",selection:"=",batchButtons:"&",datastore:"=",search:"="},template:r,link:function(e,n,r,i,o){var a=e.override();return a?"string"==typeof a?(n.html(a),void t(n.contents())(e)):void(e.buttons=a):void o(e,function(e){n.append(e)})}}}var r=n(144);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){e.get("$compile");return{restrict:"E",scope:{entity:"=",selection:"=",buttons:"&"},template:r,link:function(e){e.isopen=!1,e.toggleDropdown=function(t){t.preventDefault(),t.stopPropagation(),e.isopen=!e.isopen},e.buttons=e.buttons(),"string"==typeof e.buttons&&(e.customTemplate=e.buttons,e.buttons=null)}}}var r=n(145);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getReadQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getWriteQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){return["$stateParams","NgAdminConfiguration",function(n,r){var i,o=r().getViewByEntityAndType(n.entity,e);return(i=o.template())?i:(i=r().customTemplate()(e),i?i:t)}]}function i(e){return["$stateParams","NgAdminConfiguration",function(t,n){var r;try{r=n().getViewByEntityAndType(t.entity,e)}catch(i){var o=new Error("Unknown view or entity name");throw o.status=404,o}if(!r.enabled)throw new Error("The "+e+" is disabled for this entity");return r}]}function o(){return["AdminDescription",function(e){return e.getDataStore()}]}function a(e){e.state("list",{parent:"main",url:"/:entity/list?{search:json}&page&sortField&sortDir",params:{entity:null,page:null,search:null,sortField:null,sortDir:null},controller:"ListController",controllerAs:"listController",templateProvider:r("ListView",s),resolve:{dataStore:o(),view:i("ListView"),response:["$stateParams","ReadQueries","view",function(e,t,n){var r=e.page,i=e.search,o=e.sortField,a=e.sortDir;return t.getAll(n,r,i,o,a)}],totalItems:["response",function(e){return e.totalItems}],nonOptimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),n.data)}],optimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),n.data)}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],entries:["dataStore","view","response","referencedEntries",function(e,t,n,r){var i=e.mapEntries(t.entity.name(),t.identifier(),t.getFields(),n.data);return e.fillReferencesValuesFromCollection(i,t.getReferences(),!0),e.setEntries(t.getEntity().uniqueId,i),!0}],filterData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getFilterReferences())}],filterEntries:["dataStore","view","filterData",function(e,t,n){var r,i=t.getFilterReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("show",{parent:"main",url:"/:entity/show/:id?sortField&sortDir",controller:"ShowController",controllerAs:"showController",templateProvider:r("ShowView",l),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("ShowView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}]}}),e.state("create",{parent:"main",url:"/:entity/create",controller:"FormController",controllerAs:"formController",templateProvider:r("CreateView",u),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("CreateView"),entry:["dataStore","view",function(e,t){var n=e.createEntry(t.entity.name(),t.identifier(),t.getFields());return e.addEntry(t.getEntity().uniqueId,n),n}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("edit",{parent:"main",url:"/:entity/edit/:id?sortField&sortDir",controller:"FormController",controllerAs:"formController",templateProvider:r("EditView",c),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("EditView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("delete",{parent:"main",url:"/:entity/delete/:id",controller:"DeleteController",controllerAs:"deleteController",templateProvider:r("DeleteView",f),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("DeleteView"),params:["$stateParams",function(e){return e}],entry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl()); -}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** - * @license AngularJS v1.4.0 - * (c) 2010-2015 Google, Inc. http://angularjs.org +"undefined"!=typeof e&&"undefined"!=typeof t&&e.exports===t&&(e.exports="ui.router"),function(e,t,n){"use strict";function r(e,t){return I(new(I(function(){},{prototype:e})),t)}function i(e){return j(arguments,function(t){t!==e&&j(t,function(t,n){e.hasOwnProperty(n)||(e[n]=t)})}),e}function o(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}function a(e){if(Object.keys)return Object.keys(e);var t=[];return j(e,function(e,n){t.push(n)}),t}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t,Number(arguments[2])||0);var n=e.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=n);n>r;r++)if(r in e&&e[r]===t)return r;return-1}function l(e,t,n,r){var i,l=o(n,r),u={},c=[];for(var f in l)if(l[f].params&&(i=a(l[f].params),i.length))for(var d in i)s(c,i[d])>=0||(c.push(i[d]),u[i[d]]=e[i[d]]);return I({},u,t)}function u(e,t,n){if(!n){n=[];for(var r in e)n.push(r)}for(var i=0;i "));if(y[n]=r,P(e))v.push(n,[function(){return t.get(e)}],u);else{var i=t.annotate(e);j(i,function(e){e!==n&&l.hasOwnProperty(e)&&h(l[e],e)}),v.push(n,e,i)}m.pop(),y[n]=o}}function p(e){return N(e)&&e.then&&e.$$promises}if(!N(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],m=[],y={};return j(l,h),l=m=y=null,function(r,o,a){function s(){--w||($||i(b,o.$$values),m.$$values=b,m.$$promises=m.$$promises||!0,delete m.$$inheritedValues,h.resolve(b))}function l(e){m.$$failure=e,h.reject(e)}function u(n,i,o){function u(e){f.reject(e),l(e)}function c(){if(!D(m.$$failure))try{f.resolve(t.invoke(i,a,b)),f.promise.then(function(e){b[n]=e,s()},u)}catch(e){u(e)}}var f=e.defer(),d=0;j(o,function(e){y.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&(d++,y[e].then(function(t){b[e]=t,--d||c()},u))}),d||c(),y[n]=f.promise}if(p(r)&&a===n&&(a=o,o=r,r=null),r){if(!N(r))throw new Error("'locals' must be an object")}else r=c;if(o){if(!p(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var h=e.defer(),m=h.promise,y=m.$$promises={},b=I({},r),w=1+v.length/3,$=!1;if(D(o.$$failure))return l(o.$$failure),m;o.$$inheritedValues&&i(b,d(o.$$inheritedValues,g)),I(y,o.$$promises),o.$$values?($=i(b,d(o.$$values,g)),m.$$inheritedValues=d(o.$$values,g),s()):(o.$$inheritedValues&&(m.$$inheritedValues=d(o.$$inheritedValues,g)),o.then(s,l));for(var x=0,_=v.length;_>x;x+=3)r.hasOwnProperty(v[x])?s():u(v[x],v[x+1],v[x+2]);return m}},this.resolve=function(e,t,n,r){return this.study(e)(t,n,r)}}function v(e,t,n){this.fromConfig=function(e,t,n){return D(e.template)?this.fromString(e.template,t):D(e.templateUrl)?this.fromUrl(e.templateUrl,t):D(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return L(e)?e(t):e},this.fromUrl=function(n,r){return L(n)&&(n=n(r)),null==n?null:e.get(n,{cache:t,headers:{Accept:"text/html"}}).then(function(e){return e.data})},this.fromProvider=function(e,t,r){return n.invoke(e,null,r||{params:t})}}function m(e,t,i){function o(t,n,r,i){if(v.push(t),p[t])return p[t];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(g[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");return g[t]=new W.Param(t,n,r,i),g[t]}function a(e,t,n,r){var i=["",""],o=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:i=["?(",")?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+t+i[1]}function s(i,o){var a,s,l,u,c;return a=i[2]||i[3],c=t.params[a],l=e.substring(d,i.index),s=o?i[4]:i[4]||("*"==i[1]?".*":null),u=W.type(s||"string")||r(W.type("string"),{pattern:new RegExp(s,t.caseInsensitive?"i":n)}),{id:a,regexp:s,segment:l,type:u,cfg:c}}t=I({params:{}},N(t)?t:{});var l,u=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",d=0,h=this.segments=[],p=i?i.params:{},g=this.params=i?i.params.$$new():new W.ParamSet,v=[];this.source=e;for(var m,y,b;(l=u.exec(e))&&(m=s(l,!1),!(m.segment.indexOf("?")>=0));)y=o(m.id,m.type,m.cfg,"path"),f+=a(m.segment,y.type.pattern.source,y.squash,y.isOptional),h.push(m.segment),d=u.lastIndex;b=e.substring(d);var w=b.indexOf("?");if(w>=0){var $=this.sourceSearch=b.substring(w);if(b=b.substring(0,w),this.sourcePath=e.substring(0,d+w),$.length>0)for(d=0;l=c.exec($);)m=s(l,!0),y=o(m.id,m.type,m.cfg,"search"),d=u.lastIndex}else this.sourcePath=e,this.sourceSearch="";f+=a(b)+(t.strict===!1?"/?":"")+"$",h.push(b),this.regexp=new RegExp(f,t.caseInsensitive?"i":n),this.prefix=h[0],this.$$paramNames=v}function y(e){I(this,e)}function b(){function e(e){return null!=e?e.toString().replace(/\//g,"%2F"):e}function i(e){return null!=e?e.toString().replace(/%2F/g,"/"):e}function o(){return{strict:g,caseInsensitive:d}}function l(e){return L(e)||F(e)&&L(e[e.length-1])}function u(){for(;x.length;){var e=x.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(w[e.name],f.invoke(e.def))}}function c(e){I(this,e||{})}W=this;var f,d=!1,g=!0,v=!1,w={},$=!0,x=[],_={string:{encode:e,decode:i,is:function(e){return null==e||!D(e)||"string"==typeof e},pattern:/[^/]*/},"int":{encode:e,decode:function(e){return parseInt(e,10)},is:function(e){return D(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return e===!0||e===!1},pattern:/0|1/},date:{encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):n},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):n},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return this.is(e)&&this.is(t)&&e.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^/]*/},any:{encode:t.identity,decode:t.identity,equals:t.equals,pattern:/.*/}};b.$$getDefaultValue=function(e){if(!l(e.value))return e.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(e.value)},this.caseInsensitive=function(e){return D(e)&&(d=e),d},this.strictMode=function(e){return D(e)&&(g=e),g},this.defaultSquashPolicy=function(e){if(!D(e))return v;if(e!==!0&&e!==!1&&!P(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return v=e,e},this.compile=function(e,t){return new m(e,I(o(),t))},this.isMatcher=function(e){if(!N(e))return!1;var t=!0;return j(m.prototype,function(n,r){L(n)&&(t=t&&D(e[r])&&L(e[r]))}),t},this.type=function(e,t,n){if(!D(t))return w[e];if(w.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return w[e]=new y(I({name:e},t)),n&&(x.push({name:e,def:n}),$||u()),this},j(_,function(e,t){w[t]=new y(I({name:t},e))}),w=r(w,{}),this.$get=["$injector",function(e){return f=e,$=!1,u(),j(_,function(e,t){w[t]||(w[t]=new y(e))}),this}],this.Param=function(e,t,r,i){function o(e){var t=N(e)?a(e):[],n=-1===s(t,"value")&&-1===s(t,"type")&&-1===s(t,"squash")&&-1===s(t,"array");return n&&(e={value:e}),e.$$fn=l(e.value)?e.value:function(){return e.value},e}function u(t,n,r){if(t.type&&n)throw new Error("Param '"+e+"' has two type configurations.");return n?n:t.type?t.type instanceof y?t.type:new y(t.type):"config"===r?w.any:w.string}function c(){var t={array:"search"===i?"auto":!1},n=e.match(/\[\]$/)?{array:!0}:{};return I(t,n,r).array}function d(e,t){var n=e.squash;if(!t||n===!1)return!1;if(!D(n)||null==n)return v;if(n===!0||P(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function g(e,t,r,i){var o,a,l=[{from:"",to:r||t?n:""},{from:null,to:r||t?n:""}];return o=F(e.replace)?e.replace:[],P(i)&&o.push({from:i,to:n}),a=p(o,function(e){return e.from}),h(l,function(e){return-1===s(a,e.from)}).concat(o)}function m(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var e=f.invoke(r.$$fn);if(null!==e&&e!==n&&!x.type.is(e))throw new Error("Default value ("+e+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return e}function b(e){function t(e){return function(t){return t.from===e}}function n(e){var n=p(h(x.replace,t(e)),function(e){return e.to});return n.length?n[0]:e}return e=n(e),D(e)?x.type.$normalize(e):m()}function $(){return"{Param:"+e+" "+t+" squash: '"+k+"' optional: "+C+"}"}var x=this;r=o(r),t=u(r,t,i);var _=c();t=_?t.$asArray(_,"search"===i):t,"string"!==t.name||_||"path"!==i||r.value!==n||(r.value="");var C=r.value!==n,k=d(r,C),E=g(r,_,C,k);I(this,{id:e,type:t,location:i,array:_,squash:k,replace:E,isOptional:C,value:b,dynamic:n,config:r,toString:$})},c.prototype={$$new:function(){return r(this,I(new c,{$$parent:this}))},$$keys:function(){for(var e=[],t=[],n=this,r=a(c.prototype);n;)t.push(n),n=n.$$parent;return t.reverse(),j(t,function(t){j(a(t),function(t){-1===s(e,t)&&-1===s(r,t)&&e.push(t)})}),e},$$values:function(e){var t={},n=this;return j(n.$$keys(),function(r){t[r]=n[r].value(e&&e[r])}),t},$$equals:function(e,t){var n=!0,r=this;return j(r.$$keys(),function(i){var o=e&&e[i],a=t&&t[i];r[i].type.equals(o,a)||(n=!1)}),n},$$validates:function(e){var r,i,o,a,s,l=this.$$keys();for(r=0;ri;i++)if(t(u[i]))return;c&&t(c)}}function h(){return l=l||i.$on("$locationChangeSuccess",d)}var p,g=a.baseHref(),v=r.url();return f||h(),{sync:function(){d()},listen:function(){return h()},update:function(e){return e?void(v=r.url()):void(r.url()!==v&&(r.url(v),r.replace()))},push:function(e,t,i){var o=e.format(t||{});null!==o&&t&&t["#"]&&(o+="#"+t["#"]),r.url(o),p=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,o){if(!n.validates(i))return null;var a=e.html5Mode();t.isObject(a)&&(a=a.enabled);var l=n.format(i);if(o=o||{},a||null===l||(l="#"+e.hashPrefix()+l),null!==l&&i&&i["#"]&&(l+="#"+i["#"]),l=s(l,a,o.absolute),!o.absolute||!l)return l;var u=!a&&l?"/":"",c=r.port();return c=80===c||443===c?"":":"+c,[r.protocol(),"://",r.host(),c,u,l].join("")}}}var l,u=[],c=null,f=!1;this.rule=function(e){if(!L(e))throw new Error("'rule' must be a function");return u.push(e),this},this.otherwise=function(e){if(P(e)){var t=e;e=function(){return t}}else if(!L(e))throw new Error("'rule' must be a function");return c=e,this},this.when=function(e,t){var n,s=P(t);if(P(e)&&(e=r.compile(e)),!s&&!L(t)&&!F(t))throw new Error("invalid 'handler' in when()");var l={matcher:function(e,t){return s&&(n=r.compile(t),t=["$match",function(e){return n.format(e)}]),I(function(n,r){return a(n,t,e.exec(r.path(),r.search()))},{prefix:P(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(n=t,t=["$match",function(e){return o(n,e)}]),I(function(n,r){return a(n,t,e.exec(r.path()))},{prefix:i(e)})}},u={matcher:r.isMatcher(e),regex:e instanceof RegExp};for(var c in u)if(u[c])return this.rule(l[c](e,t));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),f=e},this.$get=s,s.$inject=["$location","$rootScope","$injector","$browser"]}function $(e,i){function o(e){return 0===e.indexOf(".")||0===e.indexOf("^")}function d(e,t){if(!e)return n;var r=P(e),i=r?e:e.name,a=o(i);if(a){if(!t)throw new Error("No reference point given for path '"+i+"'");t=d(t);for(var s=i.split("."),l=0,u=s.length,c=t;u>l;l++)if(""!==s[l]||0!==l){if("^"!==s[l])break;if(!c.parent)throw new Error("Path '"+i+"' not valid for state '"+t.name+"'");c=c.parent}else c=t;s=s.slice(l).join("."),i=c.name+(c.name&&s?".":"")+s}var f=k[i];return!f||!r&&(r||f!==e&&f.self!==e)?n:f}function h(e,t){E[e]||(E[e]=[]),E[e].push(t)}function g(e){for(var t=E[e]||[];t.length;)v(t.shift())}function v(t){t=r(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}});var n=t.name;if(!P(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(k.hasOwnProperty(n))throw new Error("State '"+n+"'' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):P(t.parent)?t.parent:N(t.parent)&&P(t.parent.name)?t.parent.name:"";if(i&&!k[i])return h(i,t.self);for(var o in O)L(O[o])&&(t[o]=O[o](t,O.$delegates[o]));return k[n]=t,!t[S]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){C.$current.navigable==t&&u(e,n)||C.transitionTo(t,e,{inherit:!0,location:!1})}]),g(n),t}function m(e){return e.indexOf("*")>-1}function y(e){for(var t=e.split("."),n=C.$current.name.split("."),r=0,i=t.length;i>r;r++)"*"===t[r]&&(n[r]="*");return"**"===t[0]&&(n=n.slice(s(n,t[1])),n.unshift("**")),"**"===t[t.length-1]&&(n.splice(s(n,t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length!=n.length?!1:n.join("")===t.join("")}function b(e,t){return P(e)&&!D(t)?O[e]:L(t)&&P(e)?(O[e]&&!O.$delegates[e]&&(O.$delegates[e]=O[e]),O[e]=t,this):this}function w(e,t){return N(e)?t=e:t.name=e,v(t),this}function $(e,i,o,s,f,h,g,v,b){function w(t,n,r,o){var a=e.$broadcast("$stateNotFound",t,n,r);if(a.defaultPrevented)return g.update(),T;if(!a.retry)return null;if(o.$retry)return g.update(),A;var s=C.transition=i.when(a.retry);return s.then(function(){return s!==C.transition?E:(t.options.$retry=!0,C.transitionTo(t.to,t.toParams,t.options))},function(){return T}),g.update(),s}function $(e,n,r,a,l,u){function d(){var n=[];return j(e.views,function(r,i){var a=r.resolve&&r.resolve!==e.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:l.globals,params:h,notify:u.notify})||""}],n.push(f.resolve(a,l.globals,l.resolve,e).then(function(n){if(L(r.controllerProvider)||F(r.controllerProvider)){var o=t.extend({},a,l.globals);n.$$controller=s.invoke(r.controllerProvider,null,o)}else n.$$controller=r.controller;n.$$state=e,n.$$controllerAs=r.controllerAs,l[i]=n}))}),i.all(n).then(function(){return l.globals})}var h=r?n:c(e.params.$$keys(),n),p={$stateParams:h};l.resolve=f.resolve(e.resolve,p,l.resolve,e);var g=[l.resolve.then(function(e){l.globals=e})];return a&&g.push(a),i.all(g).then(d).then(function(e){return l})}var E=i.reject(new Error("transition superseded")),O=i.reject(new Error("transition prevented")),T=i.reject(new Error("transition aborted")),A=i.reject(new Error("transition failed"));return _.locals={resolve:null,globals:{$stateParams:{}}},C={params:{},current:_.self,$current:_,transition:null},C.reload=function(e){return C.transitionTo(C.current,h,{reload:e||!0,inherit:!1,notify:!0})},C.go=function(e,t,n){return C.transitionTo(e,t,I({inherit:!0,relative:C.$current},n))},C.transitionTo=function(t,n,o){n=n||{},o=I({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,u=C.$current,f=C.params,p=u.path,v=d(t,o.relative),m=n["#"];if(!D(v)){var y={to:t,toParams:n,options:o},b=w(y,u.self,f,o);if(b)return b;if(t=y.to,n=y.toParams,o=y.options,v=d(t,o.relative),!D(v)){if(!o.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+o.relative+"'")}}if(v[S])throw new Error("Cannot transition to abstract state '"+t+"'");if(o.inherit&&(n=l(h,n||{},C.$current,v)),!v.params.$$validates(n))return A;n=v.params.$$values(n),t=v;var k=t.path,T=0,M=k[T],R=_.locals,L=[];if(o.reload){if(P(o.reload)||N(o.reload)){if(N(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var F=o.reload===!0?p[0]:d(o.reload);if(o.reload&&!F)throw new Error("No such reload state '"+(P(o.reload)?o.reload:o.reload.name)+"'");for(;M&&M===p[T]&&M!==F;)R=L[T]=M.locals,T++,M=k[T]}}else for(;M&&M===p[T]&&M.ownParams.$$equals(n,f);)R=L[T]=M.locals,T++,M=k[T];if(x(t,n,u,f,R,o))return m&&(n["#"]=m),C.params=n,V(C.params,h),o.location&&t.navigable&&t.navigable.url&&(g.push(t.navigable.url,n,{$$avoidResync:!0,replace:"replace"===o.location}),g.update(!0)),C.transition=null,i.when(C.current);if(n=c(t.params.$$keys(),n||{}),o.notify&&e.$broadcast("$stateChangeStart",t.self,n,u.self,f).defaultPrevented)return e.$broadcast("$stateChangeCancel",t.self,n,u.self,f),g.update(),O;for(var j=i.when(R),W=T;W=T;r--)a=p[r],a.self.onExit&&s.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=T;r=0?i:i+"@"+(o?o.state.name:"")}function S(e,t){var n,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e=t+"("+r[1]+")"),n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!n||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function O(e){var t=e.parent().inheritedData("$uiView");return t&&t.state&&t.state.name?t.state:void 0}function T(e,n){var r=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,s){var l=S(a.uiSref,e.current.name),u=null,c=O(o)||e.$current,f="[object SVGAnimatedString]"===Object.prototype.toString.call(o.prop("href"))?"xlink:href":"href",d=null,h="A"===o.prop("tagName").toUpperCase(),p="FORM"===o[0].nodeName,g=p?"action":f,v=!0,m={relative:c,inherit:!0},y=i.$eval(a.uiSrefOpts)||{};t.forEach(r,function(e){e in y&&(m[e]=y[e])});var b=function(n){if(n&&(u=t.copy(n)),v){d=e.href(l.state,u,m);var r=s[1]||s[0];return r&&r.$$addStateInfo(l.state,u),null===d?(v=!1,!1):void a.$set(g,d)}};l.paramExpr&&(i.$watch(l.paramExpr,function(e,t){e!==u&&b(e)},!0),u=t.copy(i.$eval(l.paramExpr))),b(),p||o.bind("click",function(t){var r=t.which||t.button;if(!(r>1||t.ctrlKey||t.metaKey||t.shiftKey||o.attr("target"))){var i=n(function(){e.go(l.state,u,m)});t.preventDefault();var a=h&&!d?1:0;t.preventDefault=function(){a--<=0&&n.cancel(i)}}})}}}function A(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,r,i){function o(){a()?r.addClass(l):r.removeClass(l)}function a(){for(var e=0;ei;i++){a=s[i];var f=this.params[a],d=r[i+1];for(o=0;oi;i++)a=s[i],c[a]=this.params[a].value(t[a]);return c},m.prototype.parameters=function(e){return D(e)?this.params[e]||null:this.$$paramNames},m.prototype.validates=function(e){return this.params.$$validates(e)},m.prototype.format=function(e){function t(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})}e=e||{};var n=this.segments,r=this.parameters(),i=this.params;if(!this.validates(e))return null;var o,a=!1,s=n.length-1,l=r.length,u=n[0];for(o=0;l>o;o++){var c=s>o,f=r[o],d=i[f],h=d.value(e[f]),g=d.isOptional&&d.type.equals(d.value(),h),v=g?d.squash:!1,m=d.type.encode(h);if(c){var y=n[o+1];if(v===!1)null!=m&&(u+=F(m)?p(m,t).join("-"):encodeURIComponent(m)),u+=y;else if(v===!0){var b=u.match(/\/$/)?/\/?(.*)/:/(.*)/;u+=y.match(b)[1]}else P(v)&&(u+=v+y)}else{if(null==m||g&&v!==!1)continue;F(m)||(m=[m]),m=p(m,encodeURIComponent).join("&"+f+"="),u+=(a?"&":"?")+(f+"="+m),a=!0}}return u},y.prototype.is=function(e,t){return!0},y.prototype.encode=function(e,t){return e},y.prototype.decode=function(e,t){return e},y.prototype.equals=function(e,t){return e==t},y.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},y.prototype.pattern=/.*/,y.prototype.toString=function(){return"{Type:"+this.name+"}"},y.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},y.prototype.$asArray=function(e,t){function r(e,t){function r(e,t){return function(){return e[t].apply(e,arguments)}}function i(e){return F(e)?e:D(e)?[e]:[]}function o(e){switch(e.length){case 0:return n;case 1:return"auto"===t?e[0]:e;default:return e}}function a(e){return!e}function s(e,t){return function(n){n=i(n);var r=p(n,e);return t===!0?0===h(r,a).length:o(r)}}function l(e){return function(t,n){var r=i(t),o=i(n);if(r.length!==o.length)return!1;for(var a=0;ar;r++)e[r]=this.fillReferencesValuesFromEntry(e[r],t,n);return e}},{key:"fillReferencesValuesFromEntry",value:function(e,t,n){for(var r in t){var i=t[r],o=this.getReferenceChoicesById(i),a=[],s=i.getMappedValue(e.values[r],e.values);if("reference_many"===i.type()){for(var l in s){var u=s[l];a.push(o[u])}e.listValues[r]=a}else n&&s&&s in o&&(e.listValues[r]=i.getMappedValue(o[s],e.values))}return e}},{key:"getReferenceChoicesById",value:function(e){for(var t={},n=e.targetField().name(),r=e.targetEntity().identifier().name(),i=this.getEntries(e.targetEntity().uniqueId+"_values"),o=0,a=i.length;a>o;o++){var s=i[o];t[s.values[r]]=s.values[n]}return t}}]),e}();t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt;t++){var r=this._targetFields[t];e.push({field:r,label:r.label()})}return e}},{key:"getSortFieldName",value:function(){return this.sortField()?this._targetEntity.name()+"_ListView."+this.sortField():null}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n':this._icon}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;s=u=l=void 0,r=!1;var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return void 0;e=u,t=o,n=a,r=!0}},s=n(2),l=r(s),u=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._type="ShowView"}return o(t,e),t}(l["default"]);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";n(122),n(47);var r=n(21),i=angular.module("AdminDescriptionModule",[]);i.constant("AdminDescription",new r);var o=angular.module("ng-admin",["main","crud","AdminDescriptionModule"]);o.config(["NgAdminConfigurationProvider","AdminDescription",function(e,t){e.setAdminDescription(t)}])},function(e,t,n){"use strict";var r=n(4),i=r.module("crud",["ui.router","ui.bootstrap","ngSanitize","textAngular","ngInflection","ui.codemirror","angularFileUpload","ngNumeraljs"]);i.controller("ListController",n(104)),i.controller("ShowController",n(120)),i.controller("FormController",n(101)),i.controller("DeleteController",n(70)),i.controller("BatchDeleteController",n(69)),i.service("EntryFormatter",n(112)),i.service("PromisesResolver",n(113)),i.service("ReadQueries",n(117)),i.service("WriteQueries",n(118)),i.service("RestWrapper",n(114)),i.directive("maJsonValidator",n(121)),i.directive("maField",n(76)),i.directive("maButtonField",n(71)),i.directive("maChoiceField",n(73)),i.directive("maChoicesField",n(74)),i.directive("maDateField",n(75)),i.directive("maInputField",n(78)),i.directive("maJsonField",n(79)),i.directive("maFileField",n(77)),i.directive("maCheckboxField",n(72)),i.directive("maTextField",n(81)),i.directive("maWysiwygField",n(82)),i.directive("maTemplateField",n(80)),i.provider("FieldViewConfiguration",n(87)),i.directive("listActions",n(103)),i.directive("maDatagrid",n(105)),i.directive("maDatagridPagination",n(109)),i.directive("maDatagridInfinitePagination",n(106)),i.directive("maDatagridItemSelector",n(107)),i.directive("maDatagridMultiSelector",n(108)),i.directive("maFilter",n(99)),i.directive("maColumn",n(59)),i.directive("maBooleanColumn",n(57)),i.directive("maChoicesColumn",n(58)),i.directive("maDateColumn",n(60)),i.directive("maJsonColumn",n(61)),i.directive("maNumberColumn",n(62)),i.directive("maReferenceManyColumn",n(63)),i.directive("maReferenceManyLinkColumn",n(64)),i.directive("maStringColumn",n(65)),i.directive("maTemplateColumn",n(66)),i.directive("maWysiwygColumn",n(67)),i.directive("maBackButton",n(48)),i.directive("maCreateButton",n(50)),i.directive("maEditButton",n(52)),i.directive("maFilteredListButton",n(54)),i.directive("maShowButton",n(56)),i.directive("maListButton",n(55)),i.directive("maDeleteButton",n(51)),i.directive("maBatchDeleteButton",n(49)),i.directive("maExportToCsvButton",n(53)),i.directive("maViewActions",n(115)),i.directive("maViewBatchActions",n(116)),i.directive("compile",n(111)),i.config(n(119)),i.config(n(68)),i.factory("Papa",function(){return n(163)}),i.factory("notification",function(){var e=n(159);return e.timeout=5e3,e.clickToClose=!0,e}),i.factory("progression",function(){return n(162)}),e.exports=i},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{size:"@",label:"@"},link:function(t){t.label=t.label||"Back",t.back=function(){e.history.back()}},template:' {{ ::label }}'}}return e.$inject=["$window"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",selection:"&",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoBatchDelete=function(){var n=(t.entity(),t.selection().map(function(e){return e.identifierValue}));e.go("batchDelete",angular.extend({ids:n,entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Create",t.gotoCreate=function(){e.go(e.get("create"),angular.extend({entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoDelete=function(){e.go(e.get("delete"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Edit",t.gotoEdit=function(){e.go(e.get("edit"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r,i){return{restrict:"E",scope:{entity:"&",label:"@",datastore:"&",search:"&"},template:'',link:function(o){o.label=o.label||"Export",o.datastore=o.datastore(),o.entity=o.entity();var a=o.entity.exportView(),s=o.entity.listView();if(0===a.fields().length){var l=s.exportFields();null===l&&(l=s.fields()),a.fields(l),a.filters(s.filters())}o.has_export=a.fields().length>0;var u=r.getFormatter(a.fields());o.exportToCsv=function(){var r,s,l;i.getAll(a,-1,o.search(),e.sortField,e.sortDir).then(function(e){return r=e.data},function(e){n.log(e.message,{addnCls:"humane-flatty-error"})}).then(function(e){return i.getFilteredReferenceData(a.getNonOptimizedReferences(),e)}).then(function(e){return s=e,i.getOptimizedReferencedData(a.getOptimizedReferences(),r)}).then(function(e){l=e;var t,n=a.getReferences(),r=angular.extend(s,l);for(var i in r)t=o.datastore.mapEntries(n[i].targetEntity().name(),n[i].targetEntity().identifier(),[n[i].targetField()],r[i]),o.datastore.setEntries(n[i].targetEntity().uniqueId+"_values",t)}).then(function(){var e=o.datastore.mapEntries(a.entity.name(),a.identifier(),a.getFields(),r);o.datastore.fillReferencesValuesFromCollection(e,a.getReferences(),!0);for(var n=[],i=e.length-1;i>=0;i--)n[i]=u(e[i]);var s=t.unparse(n),l=document.createElement("a");document.body.appendChild(l),l.setAttribute("href","data:application/octet-stream;charset=utf-8,"+encodeURIComponent(s)),l.setAttribute("download",o.entity.name()+".csv"),l.click()})}}}}return e.$inject=["$stateParams","Papa","notification","EntryFormatter","ReadQueries"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entityName:"@",filter:"&",label:"@",size:"@"},link:function(t){t.label=t.label||"See all related "+t.entityName,t.gotoList=function(){e.go(e.get("list"),{entity:t.entityName,search:t.filter()})}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"List";var n=t.$parent.entity?t.$parent.entity.name():null,r=t.entity().name(),i={entity:r};r===n&&angular.extend(i,e.params),t.gotoList=function(){e.go(e.get("list"),i)}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Show",t.gotoShow=function(){e.go(e.get("show"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},link:function(e){e.isOk=!!e.value()},template:""}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n,r,i){function o(e){if(e.isDetailLink()===!1)return!1;if("reference"!=e.type()&&"reference_many"!=e.type())return!0;var t=e.targetEntity().name(),n=r().getEntity(t);return n?n.isReadOnly?n.showView().enabled:n.editionView().enabled:!1}return{restrict:"E",scope:{field:"&",entry:"&",entity:"&",datastore:"&"},link:function(a,s,l){a.datastore=a.datastore(),a.field=a.field(),a.entry=a.entry();var u=a.field.type();o(a.field)?s.append(i[u].getLinkWidget()):s.append(i[u].getReadWidget()),n(s.contents())(a),a.gotoDetail=function(){this.clearRouteParams();var n=a.field.detailLinkRoute();"edit"!=n||a.entity().editionView().enabled||(n="show"),e.path("/"+a.entry.entityName+"/"+n+"/"+a.entry.identifierValue),t(0)},a.gotoReference=function(){this.clearRouteParams();var t=a.field.targetEntity().name(),n=r().getEntity(t),i=a.entry.values[a.field.name()],o=n.isReadOnly?"show":a.field.detailLinkRoute();e.path("/"+t+"/"+o+"/"+i)},a.clearRouteParams=function(){e.search("q",null),e.search("page",null),e.search("sortField",null),e.search("sortDir",null)}}}}return t.$inject=["$location","$anchorScroll","$compile","NgAdminConfiguration","FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | date:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&"},link:function(t,n){t.guessType=function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t?"Object":"[object Array]"===t?"Array":"Literal"};var r='
{{ val }}
{{ key }}{{ val }}
',i=angular.element(r);e(i)(t),n.replaceWith(i)}}}return t.$inject=["$compile"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | numeraljs:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{restrict:"E",scope:{field:"&",values:"&",ids:"&"},link:function(n){n.field=n.field(),n.values=n.values(),n.ids=n.ids();var r=n.field.targetEntity().name(),i=t().getEntity(r);n.gotoReference=function(t){var n=i.isReadOnly?"show":"edit";e.path("/"+r+"/"+n+"/"+t)}},template:'{{ ref }}'}}return t.$inject=["$location","NgAdminConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},template:"{{ value() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&",field:"&"},link:function(t){var n=t.value();t.field().stripTags()&&(n=e("stripTags")(n)),t.htmlValue=n},template:''}}return t.$inject=["$filter"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){e.registerFieldView("boolean",n(83)),e.registerFieldView("choice",n(84)),e.registerFieldView("choices",n(85)),e.registerFieldView("date",n(16)),e.registerFieldView("datetime",n(16)),e.registerFieldView("email",n(86)),e.registerFieldView("file",n(88)),e.registerFieldView("json",n(89)),e.registerFieldView("number",n(90)),e.registerFieldView("password",n(91)),e.registerFieldView("referenced_list",n(94)),e.registerFieldView("reference",n(92)),e.registerFieldView("reference_many",n(93)),e.registerFieldView("string",n(95)),e.registerFieldView("template",n(96)),e.registerFieldView("text",n(97)),e.registerFieldView("wysiwyg",n(98))}r.$inject=["FieldViewConfigurationProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i){this.$scope=e,this.$state=t,this.WriteQueries=n,this.notification=r,this.view=i,this.entity=i.getEntity(),this.entityIds=t.params.ids,this.selection=[],this.title=i.title(),this.description=i.description(),this.actions=i.actions(),this.loadingPage=!1,this.fields=i.fields(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.batchDelete=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.batchDelete(this.view,this.entityIds).then(function(){t.go(t.get("list"),angular.extend({entity:n},t.params)),e.log("Elements successfully deleted.",{addnCls:"humane-flatty-success"})},function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){this.$state.go(this.$state.get("list"),angular.extend({entity:this.entity().name()},this.$state.params))},e.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0},e.$inject=["$scope","$state","WriteQueries","notification","view"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i,o,a){this.$scope=e,this.$state=t,this.WriteQueries=n,this.entityLabel=i.entity,this.entityId=i.id,this.view=o,this.title=o.title(),this.description=o.description(),this.actions=o.actions(),this.entity=o.getEntity(),this.notification=r,this.$scope.entry=a,this.$scope.view=o,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.deleteOne=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.deleteOne(this.view,this.entityId).then(function(){t.go(t.get("list"),angular.extend({entity:n,id:this.entityId},t.params)),e.log("Element successfully deleted.",{addnCls:"humane-flatty-success"})}.bind(this),function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){var e=this.$state;e.go(e.get("edit"),angular.extend({entity:this.entity.name(),id:this.entityId},e.params))},e.prototype.destroy=function(){this.$scope=void 0,this.WriteQueries=void 0,this.$state=void 0,this.view=void 0,this.entity=void 0},e.$inject=["$scope","$state","WriteQueries","notification","params","view","entry"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.label=n.label(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.toggle=function(){this.value=!this.value},e.isActive=function(){return!!this.value}},template:'{{ label }}'}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.rawValue=e.value,e.$watch("rawValue",function(t){e.value=n.parse()(t)}),e.format=n.format(),e.v=n.validation(),e.isOpen=!1;var r=t.find("input").eq(0),i=n.attributes();for(var o in i)r.attr(o,i[o]);e.toggleDatePicker=function(t){t.preventDefault(),t.stopPropagation(),e.isOpen=!e.isOpen}},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=r(e).map(function(e,t){return''+e.getWriteWidget()+""}).join(""),n='
'+t+'

';return{restrict:"E",scope:{field:"&",entry:"=",entity:"&",form:"&",datastore:"&"},link:function(e){e.field=e.field(),e.type=e.field.type(),e.entity=e.entity(),e.form=e.form(),e.datastore=e.datastore(),e.getClassesForField=function(e,t){return"ng-admin-field-"+e.name()+" "+(e.getCssClasses(t)||"col-sm-10 col-md-8 col-lg-7")},e.getInputForField=function(t){return e.form[t.name()]},e.fieldHasValidation=function(e){var t=this.getInputForField(e);return t&&t.$dirty},e.fieldIsValid=function(e){var t=this.getInputForField(e);return t&&t.$valid},e.getFieldValidationClass=function(e){return this.fieldHasValidation(e)?this.fieldIsValid(e)?"has-success":"has-error":void 0}},template:n}}var r=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{scope:{field:"&",value:"="},restrict:"E",link:{pre:function(e){var t=e.field().uploadInformation();if(!t.hasOwnProperty("url"))throw new Error("You must provide a URL property to allow the upload of files.");e.multiple=t.hasOwnProperty("multiple")?t.multiple:!1,e.accept=t.hasOwnProperty("accept")?t.accept:"*",e.apifilename=t.hasOwnProperty("apifilename")?t.apifilename:!1;var n=e.value?e.value.split(","):[];e.files={};for(var r in n)e.files[n[r]]={name:n[r],progress:0}},post:function(n,r){var i=n.field();n.name=i.name(),n.v=i.validation(),n.value&&(n.v.required=!1);var o=r.find("input")[0],a=i.attributes();for(var s in a)o[s]=a[s];n.fileSelected=function(t){if(t){var r;n.files={};for(var i in t)r=angular.copy(n.field().uploadInformation()),r.file=t[i],e.upload(r).progress(function(e){n.files[e.config.file.name]={name:e.config.file.name,progress:Math.min(100,parseInt(100*e.loaded/e.total))}}).success(function(e,t,r,i){if(n.files[i.file.name]={name:n.apifilename?e[n.apifilename]:i.file.name,progress:0},n.apifilename){var o=Object.keys(n.files).map(function(e){return n.files[e].name});n.value=o.join(",")}else n.value=Object.keys(n.files).join(",")}).error(function(e,t,r,i){delete n.files[i.file.name],n.value=Object.keys(n.files).join(",")})}},n.selectFile=function(){t(function(){o.click()},0)}}},template:'
{{ file.progress }}% Complete
{{ file.name }}
'}}return t.$inject=["$upload","$timeout"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{type:"@",field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){(function(t){"use strict";function r(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.jsonValue=null===e.value?"":angular.toJson(e.value,!0);var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.$watch("jsonValue",function(t){if(""==t||"undefined"==typeof t)return void(e.value=null);try{var n=angular.fromJson(t);e.value=n}catch(r){}})},template:''}}var i=n(3);t.jsonlint=n(160),n(153),n(154),n(156),n(155),n(157),n(158),i.defineOption("matchBrackets",!0),i.defineOption("autoCloseBrackets",!0),i.defineOption("lineWrapping",!0),i.defineOption("tabSize",2),i.defineOption("mode","application/json"),i.defineOption("gutters",["CodeMirror-lint-markers"]),i.defineOption("lint",!0),i.defineOption("styleActiveLine",!0),t.CodeMirror=i,r.$inject=[],e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:'' +}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name()},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){this.fieldViews={}}return e.prototype.registerFieldView=function(e,t){this.fieldViews[e]=t},e.prototype.$get=function(){return this.fieldViews},e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display file field as readable"}function n(){return"error: cannot display file field as linkable"}function r(){return"error: cannot display file field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display a json field as linkable"}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display password field as readable"}function n(){return"error: cannot display password field as linkable"}function r(){return"error: cannot display password field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display referenced_list field as linkable"}function r(){return"error: cannot display referenced_list field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(){return''}function i(){return''+r()+""}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){"use strict";function r(){return''}function i(){return"error: cannot display wysiwyg field as linkable"}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=i(e).map(function(e,t){return''+e.getFilterWidget()+""}).join(""),n='';return{restrict:"E",template:n,scope:{filters:"&",datastore:"&"},controllerAs:"filterCtrl",controller:r}}var r=n(100),i=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,n,r){this.$scope=e,this.$state=n,this.$stateParams=r,this.$scope.values=this.$stateParams.search||{},this.$scope.filters=this.$scope.filters(),this.$scope.datastore=this.$scope.datastore(),this.isFilterEmpty=t(this.$scope.values)}function t(e){for(var t in e)if(""!=e[t])return!1;return!0}return e.prototype.filter=function(){var e,t,n,r={},i=this.$scope.filters;for(n in i)t=i[n],e=t.name(),this.$scope.values[e]&&(r[e]=this.$scope.values[e]);this.$stateParams.search=r,this.$stateParams.page=1,this.$state.go(this.$state.current,this.$stateParams,{reload:!0,inherit:!1,notify:!0})},e.prototype.shouldFilter=function(){return Object.keys(this.$scope.filters).length},e.prototype.clearFilters=function(){var e;for(e in this.$scope.values)this.$scope.values[e]=null;this.filter()},e.prototype.destroy=function(){this.$scope=void 0},e.$inject=["$scope","$state","$stateParams"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){this.$scope=e,this.$state=t,this.WriteQueries=n,this.dataStore=s,this.progression=i,this.notification=o,this.title=a.title(),this.description=a.description(),this.actions=a.actions(),this.fields=a.fields(),this.config=r(),this.view=a,this.entity=this.view.getEntity(),this.$scope.entry=s.getFirstEntry(this.entity.uniqueId),this.$scope.view=a,this.$scope.entity=this.entity,this.originEntityId=this.$scope.entry.values[this.entity.identifier().name()],e.$on("$destroy",this.destroy.bind(this))};r.prototype.validateEntry=function(){var e,t,n,r,i=this.form,o=this.$scope.entry,a=this.view.getFields(),s=this.entity.identifier(),l={};if(!i.$valid)return this.notification.log("invalid form",{addnCls:"humane-flatty-error"}),!1;l[s.name()]=o.identifierValue;for(r in a)n=a[r],e=o.values[n.name()],l[n.name()]=e;t=this.dataStore.mapEntry(this.view.entity.name(),this.view.identifier(),this.view.getFields(),l);try{this.view.validate(t)}catch(u){return this.notification.log(u,{addnCls:"humane-flatty-error"}),!1}return l},r.prototype.submitCreation=function(e){e.preventDefault();var t=this.validateEntry(),n=this.entity,r=n.editionView().enabled?"edit":"show";if(t){var i=this.progression,o=this.notification,a=this.$state;i.start(),this.WriteQueries.createOne(this.view,t).then(function(e){var t=this.dataStore.mapEntry(n.name(),this.view.identifier(),this.view.getFields(),e);i.done(),o.log("Element successfully created.",{addnCls:"humane-flatty-success"}),a.go(a.get(r),{entity:n.name(),id:t.identifierValue})}.bind(this),this.handleError.bind(this))}},r.prototype.submitEdition=function(e){e.preventDefault();var t=this.validateEntry();if(t){var n=this.progression,r=this.notification;n.start(),this.WriteQueries.updateOne(this.view,t,this.originEntityId).then(function(){n.done(),r.log("Changes successfully saved.",{addnCls:"humane-flatty-success"})},this.handleError.bind(this))}},r.prototype.handleError=function(e){var t=this.config.getErrorMessageFor(this.view,e);this.progression.done(),this.notification.log(t,{addnCls:"humane-flatty-error"})},r.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0,this.dataStore=void 0,this.view=void 0,this.entity=void 0},r.$inject=["$scope","$state","WriteQueries","NgAdminConfiguration","progression","notification","view","dataStore"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.entity=e.entity(),this.$scope=e,this.$location=t,this.$anchorScroll=n,this.filters={},this.shouldDisplayActions=this.$scope.listActions()&&this.$scope.listActions().length>0,e.toggleSelect=this.toggleSelect.bind(this),e.toggleSelectAll=this.toggleSelectAll.bind(this),this.$scope.gotoDetail=this.gotoDetail.bind(this);var r=this.$location.search();this.sortField="sortField"in r?r.sortField:this.$scope.sortField,this.sortDir="sortDir"in r?r.sortDir:this.$scope.sortDir}return e.prototype.gotoDetail=function(e){this.clearRouteParams();var t=this.$scope.entity,n=t.editionView().enabled?"edit":"show";this.$location.path("/"+e.entityName+"/"+n+"/"+e.identifierValue),this.$anchorScroll(0)},e.prototype.clearRouteParams=function(){this.$location.search("q",null),this.$location.search("page",null),this.$location.search("sortField",null),this.$location.search("sortDir",null)},e.prototype.isSorting=function(e){return this.sortField===this.getSortName(e)},e.prototype.itemClass=function(e){return e%2===0?"even":"odd"},e.prototype.sort=function(e){var t="ASC",n=this.getSortName(e);this.sortField===n&&(t="ASC"===this.sortDir?"DESC":"ASC"),this.$location.search("sortField",n),this.$location.search("sortDir",t)},e.prototype.getSortName=function(e){return this.$scope.name+"."+e.name()},e.prototype.toggleSelect=function(e){var t=this.$scope.selection.slice(),n=t.indexOf(e);return-1===n?void(this.$scope.selection=t.concat(e)):(t.splice(n,1),void(this.$scope.selection=t))},e.prototype.toggleSelectAll=function(){return this.$scope.selection.length0,this.dataStore=s,this.fields=a.fields(),this.listActions=a.listActions(),this.totalItems=l,this.page=t.page||1,this.infinitePagination=this.view.infinitePagination(),this.nextPageCallback=this.nextPage.bind(this),this.setPageCallback=this.setPage.bind(this),this.selection=this.batchActions.length?[]:null,this.sortField=this.$stateParams.sortField||this.view.getSortFieldName(),this.sortDir=this.$stateParams.sortDir||this.view.sortDir(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.nextPage=function(e){if(!this.loadingPage){var t=this.progression,n=this;t.start(),this.ReadQueries.getAll(this.view,e,this.search,this.sortField,this.sortDir).then(function(e){t.done();var r=n.view.getReferences();n.dataStore.mapEntries(n.entity.name(),n.view.identifier(),n.fields,e.data).map(function(e){n.dataStore.fillReferencesValuesFromEntry(e,r,!0),n.dataStore.addEntry(n.entity.uniqueId,e)}),n.loadingPage=!1})}},e.prototype.setPage=function(e){this.$location.search("page",e),this.$anchorScroll(0)},e.prototype.destroy=function(){this.$scope=void 0,this.$stateParams=void 0,this.$location=void 0,this.$anchorScroll=void 0,this.dataStore=void 0},e.$inject=["$scope","$stateParams","$location","$anchorScroll","ReadQueries","progression","view","dataStore","totalItems"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",template:r,scope:{name:"@",entries:"=",selection:"=",fields:"&",listActions:"&",entity:"&",sortField:"=",sortDir:"="},controllerAs:"datagrid",controller:i}}var r=n(140),i=n(102);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){var n=r.element(e),i=100,o=t[0].body;return{restrict:"E",scope:{perPage:"@",totalItems:"@",nextPage:"&"},link:function(t){function r(){if(o.offsetHeight-e.innerHeight-e.scrollY=l)return;u++,t.nextPage()(u)}}var a=parseInt(t.perPage,10)||1,s=parseInt(t.totalItems,10),l=Math.ceil(s/a)||1,u=1;n.bind("scroll",r),t.$on("$destroy",function(){n.unbind("scroll",r)})}}}var r=n(4);return t.$inject=["$window","$document"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entry:"=",selection:"=",toggleSelect:"&"},template:'',link:function(e){e.toggle=function(t){e.toggleSelect({entry:t})}}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entries:"=",selection:"=",toggleSelectAll:"&"},template:'',link:function(e,t){e.$watch("selection",function(n){t.children()[0].indeterminate=n.length>0&&n.length!=e.entries.length}),e.$watch("entries",function(n){t.children()[0].indeterminate=e.selection.length>0&&e.selection.length!=n.length})}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{page:"@",perPage:"@",totalItems:"@",setPage:"&"},template:r,controllerAs:"paginationCtrl",controller:i}}var r=n(143),i=n(110);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){this.$scope=e;var t=parseInt(this.$scope.perPage,10)||1,n=parseInt(this.$scope.totalItems,10),r=Math.max(parseInt(this.$scope.page,10),1);this.nbPages=Math.ceil(n/t)||1,this.page=Math.min(this.nbPages,r),this.offsetEnd=Math.min(this.page*t,n),this.offsetBegin=Math.min((this.page-1)*t+1,this.offsetEnd),this.totalItems=n,this.displayPagination=n>t,e.$on("$destroy",this.destroy.bind(this))}n(4);return t.prototype.range=function(e){var t=[],n=this.nbPages;return e>2&&t.push("1"),4==e&&t.push("2"),e>4&&t.push("."),e>1&&t.push(e-1),t.push(e),n>e&&t.push(e+1),e==n-3&&t.push(n-1),n-3>e&&t.push("."),n-1>e&&t.push(n),t},t.prototype.setPage=function(e){0>=e||e>this.nbPages||this.$scope.setPage()(e)},t.prototype.destroy=function(){this.$scope=void 0},t.$inject=["$scope"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){var t=e.get("$compile");return{transclude:!0,link:function(e,n,r,i,o){var a=e.$watch(function(e){return e.$eval(r.compile)},function(i){return!1===i?void o(e,function(e){n.append(e)}):(n.html(i),t(n.contents())(e),void("true"==r.compileOnce&&a()))})}}}return e.$inject=["$injector"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.formatDate=function(t){return function(n){return e("date")(n,t)}}}return e.prototype.formatField=function(e){var t=e.label()||e.name();switch(e.type()){case"boolean":case"choice":case"choices":case"number":case"string":case"text":case"wysiwyg":case"email":case"json":case"file":case"template":return function(n){return{name:t,value:n.values[e.name()]}};case"date":var n=this.formatDate(e.format());return function(r){return{name:t,value:n(r.values[e.name()])}};case"reference":return function(n){return{name:t,value:n.listValues[e.name()]}};case"referenced_list":return}},e.prototype.getFormatter=function(e){var t=e.map(this.formatField.bind(this));return function(e){var n={};return t.map(function(t){return t?t(e):void 0}).forEach(function(e){e&&(n[e.name]=e.value)}),n}},e.$inject=["$filter"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return e.getPromisesResolver()}return e.$inject=["AdminDescription"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.Restangular=e,e.setFullResponse(!0)}return e.prototype.getOne=function(e,t){return this.Restangular.oneUrl(e,t).get().then(function(e){return e.data})},e.prototype.getList=function(e,t,n){return this.Restangular.allUrl(t,n).getList(e)},e.prototype.createOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPOST(e).then(function(e){return e.data})},e.prototype.updateOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPUT(e).then(function(e){return e.data})},e.prototype.deleteOne=function(e,t){return this.Restangular.oneUrl(e,t).customDELETE()},e.$inject=["Restangular"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=e.get("$compile");return{restrict:"E",transclude:!0,scope:{override:"&",entry:"=",entity:"=",selection:"=",batchButtons:"&",datastore:"=",search:"="},template:r,link:function(e,n,r,i,o){var a=e.override();return a?"string"==typeof a?(n.html(a),void t(n.contents())(e)):void(e.buttons=a):void o(e,function(e){n.append(e)})}}}var r=n(144);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){e.get("$compile");return{restrict:"E",scope:{entity:"=",selection:"=",buttons:"&"},template:r,link:function(e){e.isopen=!1,e.toggleDropdown=function(t){t.preventDefault(),t.stopPropagation(),e.isopen=!e.isopen},e.buttons=e.buttons(),"string"==typeof e.buttons&&(e.customTemplate=e.buttons,e.buttons=null)}}}var r=n(145);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getReadQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getWriteQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){return["$stateParams","NgAdminConfiguration",function(n,r){var i,o=r().getViewByEntityAndType(n.entity,e);return(i=o.template())?i:(i=r().customTemplate()(e),i?i:t)}]}function i(e){return["$stateParams","NgAdminConfiguration",function(t,n){var r;try{r=n().getViewByEntityAndType(t.entity,e)}catch(i){var o=new Error("Unknown view or entity name");throw o.status=404,o}if(!r.enabled)throw new Error("The "+e+" is disabled for this entity");return r}]}function o(){return["AdminDescription",function(e){return e.getDataStore()}]}function a(e){e.state("list",{parent:"main",url:"/:entity/list?{search:json}&page&sortField&sortDir",params:{entity:null,page:null,search:null,sortField:null,sortDir:null},controller:"ListController",controllerAs:"listController",templateProvider:r("ListView",s),resolve:{dataStore:o(),view:i("ListView"),response:["$stateParams","ReadQueries","view",function(e,t,n){var r=e.page,i=e.search,o=e.sortField,a=e.sortDir;return t.getAll(n,r,i,o,a)}],totalItems:["response",function(e){return e.totalItems}],nonOptimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),n.data)}],optimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),n.data)}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],entries:["dataStore","view","response","referencedEntries",function(e,t,n,r){var i=e.mapEntries(t.entity.name(),t.identifier(),t.getFields(),n.data);return e.fillReferencesValuesFromCollection(i,t.getReferences(),!0),e.setEntries(t.getEntity().uniqueId,i),!0}],filterData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getFilterReferences())}],filterEntries:["dataStore","view","filterData",function(e,t,n){var r,i=t.getFilterReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("show",{parent:"main",url:"/:entity/show/:id?sortField&sortDir",controller:"ShowController",controllerAs:"showController",templateProvider:r("ShowView",l),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("ShowView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}]}}),e.state("create",{parent:"main",url:"/:entity/create",controller:"FormController",controllerAs:"formController",templateProvider:r("CreateView",u),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("CreateView"),entry:["dataStore","view",function(e,t){var n=e.createEntry(t.entity.name(),t.identifier(),t.getFields());return e.addEntry(t.getEntity().uniqueId,n),n}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("edit",{parent:"main",url:"/:entity/edit/:id?sortField&sortDir",controller:"FormController",controllerAs:"formController",templateProvider:r("EditView",c),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("EditView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("delete",{parent:"main",url:"/:entity/delete/:id",controller:"DeleteController",controllerAs:"deleteController",templateProvider:r("DeleteView",f),params:{page:null,search:null,sortField:null,sortDir:null}, +resolve:{view:i("DeleteView"),params:["$stateParams",function(e){return e}],entry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** + * @license AngularJS v1.3.15 + * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ -!function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n,r,i=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",l=o[1];for(s+=l.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+i;return n0&&t-1 in e}function o(e,t,n){var r,a;if(e)if(k(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(jr(e)||i(e)){var s="object"!=typeof e;for(r=0,a=e.length;a>r;r++)(s||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else if($(e))for(r in e)t.call(n,e[r],r,e);else if("function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);else for(r in e)$r.call(e,r)&&t.call(n,e[r],r,e);return e}function a(e,t,n){for(var r=Object.keys(e).sort(),i=0;ii;++i){var a=t[i];if(w(a)||k(a))for(var s=Object.keys(a),l=0,f=s.length;f>l;l++){var d=s[l],p=a[d];n&&w(p)?(w(e[d])||(e[d]=jr(p)?[]:{}),c(e[d],[p],!0)):e[d]=p}}return u(e,r),e}function f(e){return c(e,Tr.call(arguments,1),!1)}function d(e){return c(e,Tr.call(arguments,1),!0)}function p(e){return parseInt(e,10)}function h(e,t){return f(Object.create(e),t)}function g(){}function v(e){return e}function m(e){return function(){return e}}function y(e){return"undefined"==typeof e}function b(e){return"undefined"!=typeof e}function w(e){return null!==e&&"object"==typeof e}function $(e){return null!==e&&"object"==typeof e&&!Dr(e)}function x(e){return"string"==typeof e}function C(e){return"number"==typeof e}function _(e){return"[object Date]"===Rr.call(e)}function k(e){return"function"==typeof e}function E(e){return"[object RegExp]"===Rr.call(e)}function S(e){return e&&e.window===e}function O(e){return e&&e.$evalAsync&&e.$watch}function T(e){return"[object File]"===Rr.call(e)}function A(e){return"[object FormData]"===Rr.call(e)}function M(e){return"[object Blob]"===Rr.call(e)}function R(e){return"boolean"==typeof e}function D(e){return e&&k(e.then)}function L(e){return Ir.test(Rr.call(e))}function P(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function N(e){var t,n={},r=e.split(",");for(t=0;t=0&&e.splice(n,1),n}function I(e,t,n,r){function i(e,t,n,r,i){var o=I(t,null,r,i);w(t)&&(r.push(t),i.push(o)),n[e]=o}if(S(e)||O(e))throw Lr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(L(t))throw Lr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t){if(e===t)throw Lr("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],w(e)){var a=n.indexOf(e);if(-1!==a)return r[a];n.push(e),r.push(t)}var s,l;if(jr(e)){t.length=0;for(var c=0;cn;n++)t[n]=e[n]}else if(w(e)){t=t||{};for(var i in e)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(t[i]=e[i])}return t||e}function W(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r,i,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!jr(e)){if(_(e))return _(t)?W(e.getTime(),t.getTime()):!1;if(E(e))return E(t)?e.toString()==t.toString():!1;if(O(e)||O(t)||S(e)||S(t)||jr(t)||_(t)||E(t))return!1;o=ge();for(i in e)if("$"!==i.charAt(0)&&!k(e[i])){if(!W(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!(i in o||"$"===i.charAt(0)||t[i]===n||k(t[i])))return!1;return!0}if(!jr(t))return!1;if((r=e.length)==t.length){for(i=0;r>i;i++)if(!W(e[i],t[i]))return!1;return!0}}return!1}function H(e,t,n){return e.concat(Tr.call(t,n))}function z(e,t){return Tr.call(e,t||0)}function B(e,t){var n=arguments.length>2?z(arguments,2):[];return!k(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,H(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function U(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?i=n:S(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":O(r)&&(i="$SCOPE"),i}function q(e,t){return"undefined"==typeof e?n:(C(t)||(t=t?2:null),JSON.stringify(e,U,t))}function G(e){return x(e)?JSON.parse(e):e}function K(e,t){var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function Y(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Q(e,t,n){n=n?-1:1;var r=K(t,e.getTimezoneOffset());return Y(e,n*(r-e.getTimezoneOffset()))}function X(e){e=Er(e).clone();try{e.empty()}catch(t){}var n=Er("
").append(e).html();try{return e[0].nodeType===Yr?wr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+wr(t)})}catch(t){return wr(n)}}function J(e){try{return decodeURIComponent(e)}catch(t){}}function Z(e){var t,n,r={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=J(t[0]),b(n))){var i=b(t[1])?J(t[1]):!0;$r.call(r,n)?jr(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function ee(e){var t=[];return o(e,function(e,n){jr(e)?o(e,function(e){t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}):t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}),t.length?t.join("&"):""}function te(e){return ne(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ne(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function re(e,t){var n,r,i=Br.length;for(r=0;i>r;++r)if(n=Br[r]+t,x(n=e.getAttribute(n)))return n;return null}function ie(e,t){var n,r,i={};o(Br,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),o(Br,function(t){var i,o=t+"app";!n&&(i=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(i.strictDi=null!==re(n,"strict-di"),t(n,r?[r]:[],i))}function oe(n,r,i){w(i)||(i={});var a={strictDi:!1};i=f(a,i);var s=function(){if(n=Er(n),n.injector()){var e=n[0]===t?"document":X(n);throw Lr("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(//,">"))}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Qe(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!u.test(e.name)?s():(e.name=e.name.replace(u,""),Pr.resumeBootstrap=function(e){return o(e,function(e){r.push(e)}),s()},void(k(Pr.resumeDeferredBootstrap)&&Pr.resumeDeferredBootstrap()))}function ae(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function se(e){var t=Pr.element(e).injector();if(!t)throw Lr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function le(e,t){return t=t||"_",e.replace(Ur,function(e,n){return(n?t:"")+e.toLowerCase()})}function ue(){var t;if(!qr){var r=zr();Sr=e.jQuery,b(r)&&(Sr=null===r?n:e[r]),Sr&&Sr.fn.on?(Er=Sr,f(Sr.fn,{scope:pi.scope,isolateScope:pi.isolateScope,controller:pi.controller,injector:pi.injector,inheritedData:pi.inheritedData}),t=Sr.cleanData,Sr.cleanData=function(e){var n;if(Fr)Fr=!1;else for(var r,i=0;null!=(r=e[i]);i++)n=Sr._data(r,"events"),n&&n.$destroy&&Sr(r).triggerHandler("$destroy");t(e)}):Er=Ee,Pr.element=Er,qr=!0}}function ce(e,t,n){if(!e)throw Lr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function fe(e,t,n){return n&&jr(e)&&(e=e[e.length-1]),ce(k(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function de(e,t){if("hasOwnProperty"===e)throw Lr("badname","hasOwnProperty is not a valid {0} name",t)}function pe(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;a>s;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&k(e)?B(o,e):e}function he(e){var t=e[0],n=e[e.length-1],r=[t];do{if(t=t.nextSibling,!t)break;r.push(t)}while(t!==n);return Er(r)}function ge(){return Object.create(null)}function ve(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||r,t(o,"module",function(){var e={};return function(r,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(r,"module"),o&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r,i){return i||(i=t),function(){return i[r||"push"]([e,n,arguments]),u}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var t=[],i=[],s=[],l=e("$injector","invoke","push",i),u={_invokeQueue:t,_configBlocks:i,_runBlocks:s,requires:o,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:e("$provide","decorator"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),u})}})}function me(e){var t=[];return JSON.stringify(e,function(e,n){if(n=U(e,n),w(n)){if(t.indexOf(n)>=0)return"<>";t.push(n)}return n})}function ye(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?me(e):e}function be(t){f(t,{bootstrap:oe,copy:I,extend:f,merge:d,equals:W,element:Er,forEach:o,injector:Qe,noop:g,bind:B,toJson:q,fromJson:G,identity:v,isUndefined:y,isDefined:b,isString:x,isFunction:k,isObject:w,isNumber:C,isElement:P,isArray:jr,version:Zr,isDate:_,lowercase:wr,uppercase:xr,callbacks:{counter:0},getTestability:se,$$minErr:r,$$csp:Hr,reloadWithDebugInfo:ae}),Or=ve(e);try{Or("ngLocale")}catch(n){Or("ngLocale",[]).provider("$locale",At)}Or("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:vn}),e.provider("$compile",st).directive({a:uo,input:So,textarea:So,form:go,script:ba,select:xa,style:_a,option:Ca,ngBind:Ao,ngBindHtml:Ro,ngBindTemplate:Mo,ngClass:Lo,ngClassEven:No,ngClassOdd:Po,ngCloak:Fo,ngController:jo,ngForm:vo,ngHide:pa,ngIf:Wo,ngInclude:Ho,ngInit:Bo,ngNonBindable:ia,ngPluralize:la,ngRepeat:ua,ngShow:da,ngStyle:ha,ngSwitch:ga,ngSwitchWhen:va,ngSwitchDefault:ma,ngOptions:sa,ngTransclude:ya,ngModel:ta,ngList:Uo,ngChange:Do,pattern:Ea,ngPattern:Ea,required:ka,ngRequired:ka,minlength:Oa,ngMinlength:Oa,maxlength:Sa,ngMaxlength:Sa,ngValue:To,ngModelOptions:ra}).directive({ngInclude:zo}).directive(co).directive(Io),e.provider({$anchorScroll:Xe,$animate:Oi,$$animateQueue:Si,$$AnimateRunner:Ei,$browser:it,$cacheFactory:ot,$controller:dt,$document:pt,$exceptionHandler:ht,$filter:An,$interpolate:Ot,$interval:Tt,$http:_t,$httpParamSerializer:vt,$httpParamSerializerJQLike:mt,$httpBackend:Et,$location:Bt,$log:Ut,$parse:cn,$rootScope:gn,$q:fn,$$q:dn,$sce:wn,$sceDelegate:bn,$sniffer:$n,$templateCache:at,$templateRequest:xn,$$testability:Cn,$timeout:_n,$window:Sn,$$rAF:hn,$$asyncCallback:nt,$$jqLite:Ue,$$HashMap:mi,$$cookieReader:Tn})}])}function we(){return++ti}function $e(e){return e.replace(ii,function(e,t,n,r){return r?n.toUpperCase():n}).replace(oi,"Moz$1")}function xe(e){return!ui.test(e)}function Ce(e){var t=e.nodeType;return t===Gr||!t||t===Xr}function _e(e,t){var n,r,i,a,s=t.createDocumentFragment(),l=[];if(xe(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),r=(ci.exec(e)||["",""])[1].toLowerCase(),i=di[r]||di._default,n.innerHTML=i[1]+e.replace(fi,"<$1>")+i[2],a=i[0];a--;)n=n.lastChild;l=H(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function ke(e,n){n=n||t;var r;return(r=li.exec(e))?[n.createElement(r[1])]:(r=_e(e,n))?r.childNodes:[]}function Ee(e){if(e instanceof Ee)return e;var t;if(x(e)&&(e=Vr(e),t=!0),!(this instanceof Ee)){if(t&&"<"!=e.charAt(0))throw si("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Ee(e)}t?Ne(this,ke(e)):Ne(this,e)}function Se(e){return e.cloneNode(!0)}function Oe(e,t){if(t||Ae(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;i>r;r++)Ae(n[r])}function Te(e,t,n,r){if(b(r))throw si("offargs","jqLite#off() does not support the `selector` argument");var i=Me(e),a=i&&i.events,s=i&&i.handle;if(s)if(t)o(t.split(" "),function(t){if(b(n)){var r=a[t];if(j(r||[],n),r&&r.length>0)return}ri(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&ri(e,t,s),delete a[t]}function Ae(e,t){var r=e.ng339,i=r&&ei[r];if(i){if(t)return void delete i.data[t];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Te(e)),delete ei[r],e.ng339=n}}function Me(e,t){var r=e.ng339,i=r&&ei[r];return t&&!i&&(e.ng339=r=we(),i=ei[r]={events:{},data:{},handle:n}),i}function Re(e,t,n){if(Ce(e)){var r=b(n),i=!r&&t&&!w(t),o=!t,a=Me(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];f(s,t)}}}function De(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Le(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Vr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Vr(t)+" "," ")))})}function Pe(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Vr(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Vr(n))}}function Ne(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;n>r;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Fe(e,t){return je(e,"$"+(t||"ngController")+"Controller")}function je(e,t,r){e.nodeType==Xr&&(e=e.documentElement);for(var i=jr(t)?t:[t];e;){for(var o=0,a=i.length;a>o;o++)if((r=Er.data(e,i[o]))!==n)return r;e=e.parentNode||e.nodeType===Jr&&e.host}}function Ie(e){for(Oe(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ve(e,t){t||Oe(e);var n=e.parentNode;n&&n.removeChild(e)}function We(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Er(n).on("load",t)}function He(e,t){var n=hi[t.toLowerCase()];return n&&gi[F(e)]&&n}function ze(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&vi[t]}function Be(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if(y(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(i=V(i));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||i[s].call(e,n)}};return n.elem=e,n}function Ue(){this.$get=function(){return f(Ee,{hasClass:function(e,t){return e.attr&&(e=e[0]),De(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Pe(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Le(e,t)}})}}function qe(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||l)():r+":"+e}function Ge(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Ke(e){var t=e.toString().replace($i,""),n=t.match(yi);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Ye(e,t,n){var r,i,a,s;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw x(n)&&n||(n=e.name||Ke(e)),xi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=e.toString().replace($i,""),a=i.match(yi),o(a[1].split(bi),function(e){e.replace(wi,function(e,t,n){r.push(n)})})}e.$inject=r}}else jr(e)?(s=e.length-1,fe(e[s],"fn"),r=e.slice(0,s)):fe(e,"fn",!0);return r}function Qe(e,t){function r(e){return function(t,n){return w(t)?void o(t,s(e)):e(t,n)}}function i(e,t){if(de(e,"service"),(k(t)||jr(t))&&(t=E.instantiate(t)),!t.$get)throw xi("pget","Provider '{0}' must define $get factory method.",e);return _[e+b]=t}function a(e,t){return function(){var n=O.invoke(t,this);if(y(n))throw xi("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function l(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return l(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return l(e,m(t),!1)}function f(e,t){de(e,"constant"),_[e]=t,S[e]=t}function d(e,t){var n=E.get(e+b),r=n.$get;n.$get=function(){var e=O.invoke(r,n);return O.invoke(t,null,{$delegate:e})}}function p(e){var t,n=[];return o(e,function(e){function r(e){var t,n;for(t=0,n=e.length;n>t;t++){var r=e[t],i=E.get(r[0]);i[r[1]].apply(i,r[2])}}if(!C.get(e)){C.put(e,!0);try{x(e)?(t=Or(e),n=n.concat(p(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):k(e)?n.push(E.invoke(e)):jr(e)?n.push(E.invoke(e)):fe(e,"module")}catch(i){throw jr(e)&&(e=e[e.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),xi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function h(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===v)throw xi("cdep","Circular dependency found: {0}",t+" <- "+$.join(" <- "));return e[t]}try{return $.unshift(t),e[t]=v,e[t]=n(t,r)}catch(i){throw e[t]===v&&delete e[t],i}finally{$.shift()}}function i(e,n,i,o){"string"==typeof i&&(o=i,i=null);var a,s,l,u=[],c=Qe.$$annotate(e,t,o);for(s=0,a=c.length;a>s;s++){if(l=c[s],"string"!=typeof l)throw xi("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(i&&i.hasOwnProperty(l)?i[l]:r(l,o))}return jr(e)&&(e=e[a]),e.apply(n,u)}function o(e,t,n){var r=Object.create((jr(e)?e[e.length-1]:e).prototype||null),o=i(e,r,t,n);return w(o)||k(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Qe.$$annotate,has:function(t){return _.hasOwnProperty(t+b)||e.hasOwnProperty(t)}}}t=t===!0;var v={},b="Provider",$=[],C=new Ge([],!0),_={$provide:{provider:r(i),factory:r(l),service:r(u),value:r(c),constant:r(f),decorator:d}},E=_.$injector=h(_,function(e,t){throw Pr.isString(t)&&$.push(t),xi("unpr","Unknown provider: {0}",$.join(" <- "))}),S={},O=S.$injector=h(S,function(e,t){var r=E.get(e+b,t);return O.invoke(r.$get,r,n,e)});return o(p(e),function(e){O.invoke(e||g)}),O}function Xe(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){return"a"===F(e)?(t=e,!0):void 0}),t}function o(){var e=s.yOffset;if(k(e))e=e();else if(P(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else C(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=x(e)?e:n.hash();var t;e?(t=l.getElementById(e))?a(t):(t=i(l.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var l=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&We(function(){r.$evalAsync(s)})}),s}]}function Je(e,t){return e||t?e?t?(jr(e)&&(e=e.join(" ")),jr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function Ze(e){for(var t=0;tu&&this.remove(p.key),t}},get:function(e){if(u").parent()[0])});var a=D(e,t,e,n,r,i);M.$$addScopeClass(e);var s=null;return function(t,n,r){ce(t,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,l=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),s||(s=R(l));var u;if(u="html"!==s?Er(J(s,Er("
").append(e).html())):n?pi.clone.call(e):e,o)for(var c in o)u.data("$"+c+"Controller",o[c].instance);return M.$$addScopeInfo(u,t),n&&n(u,t),a&&a(t,u,u,i),u}}function R(e){var t=e&&e[0];return t&&"foreignobject"!==F(t)&&t.toString().match(/SVG/)?"svg":"html"}function D(e,t,r,i,o,a){function s(e,r,i,o){var a,s,l,u,c,f,d,p,v;if(h){var m=r.length;for(v=new Array(m),c=0;cc;)if(l=v[g[c++]],a=g[c++],s=g[c++],a){if(a.scope){u=e.$new(),M.$$addScopeInfo(Er(l),u);var y=a.$$destroyBindings;y&&(a.$$destroyBindings=null,u.$on("$destroyed",y))}else u=e;p=a.transcludeOnThisElement?L(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?L(e,t):null,a(s,u,l,i,p,a)}else s&&s(e,l.childNodes,n,o)}for(var l,u,c,f,d,p,h,g=[],v=0;vy;y++){var $=!1,C=!1;u=m[y],c=u.name,g=Vr(u.value),h=lt(c),(v=fe.test(h))&&(c=c.replace(Ai,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var _=h.replace(/(Start|End)$/,"");U(_)&&h===_+"Start"&&($=c,C=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=lt(c.toLowerCase()),l[f]=c,(v||!n.hasOwnProperty(f))&&(n[f]=g,He(e,f)&&(n[f]=!0)),ee(e,t,g,f,v),B(t,f,"A",r,i,$,C)}if(a=e.className,w(a)&&(a=a.animVal),x(a)&&""!==a)for(;o=p.exec(a);)f=lt(o[2]),B(t,f,"C",r,i)&&(n[f]=Vr(o[3])),a=a.substr(o.index+o[0].length);break;case Yr:Q(t,e.nodeValue);break;case Qr:try{o=d.exec(e.nodeValue),o&&(f=lt(o[1]),B(t,f,"M",r,i)&&(n[f]=Vr(o[2])))}catch(k){}}return t.sort(K),t}function N(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Ti("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==Gr&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Er(r)}function I(e,t,n){return function(r,i,o,a,s){return i=N(i[0],t,n),e(r,i,o,a,s)}}function V(e,r,o,a,s,u,c,f,d){function p(e,t,n,r){e&&(n&&(e=I(e,n,r)),e.require=y.require,e.directiveName=b,(A===y||y.$$isolateScope)&&(e=ne(e,{isolateScope:!0})),c.push(e)),t&&(n&&(t=I(t,n,r)),t.require=y.require,t.directiveName=b,(A===y||y.$$isolateScope)&&(t=ne(t,{isolateScope:!0})),f.push(t))}function h(e,t,n,r){var i;if(x(t)){var o=t.match($),a=t.substring(o[0].length),s=o[1]||o[3],l="?"===o[2];if("^^"===s?n=n.parent():(i=r&&r[a],i=i&&i.instance),!i){var u="$"+a+"Controller";i=s?n.inheritedData(u):n.data(u)}if(!i&&!l)throw Ti("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,e)}else if(jr(t)){i=[];for(var c=0,f=t.length;f>c;c++)i[c]=h(e,t[c],n,r)}return i||null}function g(e,t,n,r,i,o){var a=ge();for(var s in r){var u=r[s],c={$scope:u===A||u.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},f=u.controller;"@"==f&&(f=t[u.name]);var d=l(f,c,!0,u.controllerAs);a[u.name]=d,j||e.data("$"+u.name+"Controller",d.instance)}return a}function v(e,t,i,a,s,l){function u(e,t,r){var i;return O(e)||(r=t,t=e,e=n),j&&(i=$),r||(r=j?C.parent():C),s(e,t,i,r,L)}var d,p,v,b,w,$,x,C,_;if(r===i?(_=o,C=o.$$element):(C=Er(i),_=new oe(C,o)),A&&(w=t.$new(!0)),s&&(x=u,x.$$boundTransclude=s),T&&($=g(C,_,x,T,w,t)),A&&(M.$$addScopeInfo(C,w,!0,!(R&&(R===A||R===A.$$originalDirective))),M.$$addScopeClass(C,!0),w.$$isolateBindings=A.$$isolateBindings,ie(t,_,w,w.$$isolateBindings,A,w)),$){var k,E,S=A||m;S&&$[S.name]&&(k=S.$$bindings.bindToController,b=$[S.name],b&&b.identifier&&k&&(E=b,l.$$destroyBindings=ie(t,_,b.instance,k,S)));for(d in $){b=$[d];var D=b();D!==b.instance&&(b.instance=D,C.data("$"+y.name+"Controller",D),b===E&&(l.$$destroyBindings(),l.$$destroyBindings=ie(t,_,D,k,S)))}}for(d=0,p=c.length;p>d;d++)v=c[d],re(v,v.isolateScope?w:t,C,_,v.require&&h(v.directiveName,v.require,C,$),x);var L=t;for(A&&(A.template||null===A.templateUrl)&&(L=w),e&&e(L,i.childNodes,n,s),d=f.length-1;d>=0;d--)v=f[d],re(v,v.isolateScope?w:t,C,_,v.require&&h(v.directiveName,v.require,C,$),x)}d=d||{};for(var m,y,b,C,_,E,S=-Number.MAX_VALUE,T=d.controllerDirectives,A=d.newIsolateScopeDirective,R=d.templateDirective,D=d.nonTlbTranscludeDirective,L=!1,F=!1,j=d.hasElementTranscludeDirective,V=o.$$element=Er(r),W=u,B=a,U=0,K=e.length;K>U;U++){y=e[U];var Q=y.$$start,Z=y.$$end;if(Q&&(V=N(r,Q,Z)),C=n,S>y.priority)break;if((E=y.scope)&&(y.templateUrl||(w(E)?(Y("new/isolated scope",A||m,y,V),A=y):Y("new/isolated scope",A,y,V)),m=m||y),b=y.name,!y.templateUrl&&y.controller&&(E=y.controller,T=T||ge(),Y("'"+b+"' controller",T[b],y,V),T[b]=y),(E=y.transclude)&&(L=!0,y.$$tlb||(Y("transclusion",D,y,V),D=y),"element"==E?(j=!0,S=y.priority,C=V,V=o.$$element=Er(t.createComment(" "+b+": "+o[b]+" ")),r=V[0],te(s,z(C),r),B=M(C,a,S,W&&W.name,{nonTlbTranscludeDirective:D})):(C=Er(Se(r)).contents(),V.empty(),B=M(C,a))),y.template)if(F=!0,Y("template",R,y,V), -R=y,E=k(y.template)?y.template(V,o):y.template,E=ue(E),y.replace){if(W=y,C=xe(E)?[]:ct(J(y.templateNamespace,Vr(E))),r=C[0],1!=C.length||r.nodeType!==Gr)throw Ti("tplrt","Template for directive '{0}' must have exactly one root element. {1}",b,"");te(s,V,r);var ee={$attr:{}},ae=P(r,[],ee),se=e.splice(U+1,e.length-(U+1));A&&H(ae),e=e.concat(ae).concat(se),q(o,ee),K=e.length}else V.html(E);if(y.templateUrl)F=!0,Y("template",R,y,V),R=y,y.replace&&(W=y),v=G(e.splice(U,e.length-U),V,o,s,L&&B,c,f,{controllerDirectives:T,newIsolateScopeDirective:A,templateDirective:R,nonTlbTranscludeDirective:D}),K=e.length;else if(y.compile)try{_=y.compile(V,o,B),k(_)?p(null,_,Q,Z):_&&p(_.pre,_.post,Q,Z)}catch(le){i(le,X(V))}y.terminal&&(v.terminal=!0,S=Math.max(S,y.priority))}return v.scope=m&&m.scope===!0,v.transcludeOnThisElement=L,v.elementTranscludeOnThisElement=j,v.templateOnThisElement=F,v.transclude=B,d.hasElementTranscludeDirective=j,v}function H(e){for(var t=0,n=e.length;n>t;t++)e[t]=h(e[t],{$$isolateScope:!0})}function B(t,r,o,a,s,l,f){if(r===s)return null;var d=null;if(u.hasOwnProperty(r))for(var p,g=e.get(r+c),v=0,m=g.length;m>v;v++)try{p=g[v],(a===n||a>p.priority)&&-1!=p.restrict.indexOf(o)&&(l&&(p=h(p,{$$start:l,$$end:f})),t.push(p),d=p)}catch(y){i(y)}return d}function U(t){if(u.hasOwnProperty(t))for(var n,r=e.get(t+c),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function q(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;o(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),o(t,function(t,o){"class"==o?(A(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,r[o]=n[o])})}function G(e,t,n,r,i,s,l,u){var c,f,d=[],p=t[0],g=e.shift(),v=h(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),m=k(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,y=g.templateNamespace;return t.empty(),a(E.getTrustedResourceUrl(m)).then(function(a){var h,b,$,x;if(a=ue(a),g.replace){if($=xe(a)?[]:ct(J(y,Vr(a))),h=$[0],1!=$.length||h.nodeType!==Gr)throw Ti("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,m);b={$attr:{}},te(r,t,h);var C=P(h,[],b);w(g.scope)&&H(C),e=C.concat(e),q(n,b)}else h=p,t.html(a);for(e.unshift(v),c=V(e,h,n,i,t,g,s,l,u),o(r,function(e,n){e==h&&(r[n]=t[0])}),f=D(t[0].childNodes,i);d.length;){var _=d.shift(),k=d.shift(),E=d.shift(),S=d.shift(),O=t[0];if(!_.$$destroyed){if(k!==p){var T=k.className;u.hasElementTranscludeDirective&&g.replace||(O=Se(h)),te(E,Er(k),O),A(Er(O),T)}x=c.transcludeOnThisElement?L(_,c.transclude,S):S,c(f,_,O,r,x,c)}}d=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(d?d.push(t,n,r,o):(c.transcludeOnThisElement&&(o=L(t,c.transclude,i)),c(f,t,n,r,o,c)))}}function K(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name"+n+"",r.childNodes[0].childNodes;default:return n}}function Z(e,t){if("srcdoc"==t)return E.HTML;var n=F(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?E.RESOURCE_URL:void 0}function ee(e,t,n,i,o){var a=Z(e,i);o=y[i]||o;var s=r(n,!0,a,o);if(s){if("multiple"===i&&"select"===F(e))throw Ti("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",X(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers={});if(C.test(i))throw Ti("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[i];c!==n&&(s=c&&r(c,!0,a,o),n=c),s&&(l[i]=s(e),(u[i]||(u[i]=[])).$$inter=!0,(l.$$observers&&l.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?l.$updateClass(e,t):l.$set(i,e)}))}}}})}}function te(e,n,r){var i,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(i=0,o=e.length;o>i;i++)if(e[i]==a){e[i++]=r;for(var u=i,c=u+s-1,f=e.length;f>u;u++,c++)f>c?e[u]=e[c]:delete e[u];e.length-=s-1,e.context===a&&(e.context=r);break}l&&l.replaceChild(r,a);var d=t.createDocumentFragment();d.appendChild(a),Er(r).data(Er(a).data()),Sr?(Fr=!0,Sr.cleanData([a])):delete Er.cache[a[Er.expando]];for(var p=1,h=n.length;h>p;p++){var g=n[p];Er(g).remove(),d.appendChild(g),delete n[p]}n[0]=r,n.length=1}function ne(e,t){return f(function(){return e.apply(null,arguments)},e,t)}function re(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,X(n))}}function ie(e,t,n,i,a,l){var u;o(i,function(i,o){var l,c,f,d,p=i.attrName,h=i.optional,v=i.mode;switch(v){case"@":t.$observe(p,function(e){n[o]=e}),t.$$observers[p].$$scope=e,t[p]&&(n[o]=r(t[p])(e));break;case"=":if(h&&!t[p])return;c=s(t[p]),d=c.literal?W:function(e,t){return e===t||e!==e&&t!==t},f=c.assign||function(){throw l=n[o]=c(e),Ti("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",t[p],a.name)},l=n[o]=c(e);var m=function(t){return d(t,n[o])||(d(t,l)?f(e,t=n[o]):n[o]=t),l=t};m.$stateful=!0;var y;y=i.collection?e.$watchCollection(t[p],m):e.$watch(s(t[p],m),null,c.literal),u=u||[],u.push(y);break;case"&":if(!t.hasOwnProperty(p)&&h)break;if(c=s(t[p]),c===g&&h)break;n[o]=function(t){return c(e,t)}}});var c=u?function(){for(var e=0,t=u.length;t>e;++e)u[e]()}:g;return l&&c!==g?(l.$on("$destroy",c),g):c}var oe=function(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e};oe.prototype={$normalize:lt,$addClass:function(e){e&&e.length>0&&S.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&S.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=ut(e,t);n&&n.length&&S.addClass(this.$$element,n);var r=ut(t,e);r&&r.length&&S.removeClass(this.$$element,r)},$set:function(e,t,r,a){var s,l=this.$$element[0],u=He(l,e),c=ze(l,e),f=e;if(u?(this.$$element.prop(e,t),a=u):c&&(this[c]=t,f=c),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e],a||(this.$attr[e]=a=le(e,"-"))),s=F(this.$$element),"a"===s&&"href"===e||"img"===s&&"src"===e)this[e]=t=T(t,"src"===e);else if("img"===s&&"srcset"===e){for(var d="",p=Vr(t),h=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(p)?h:/(,)/,v=p.split(g),m=Math.floor(v.length/2),y=0;m>y;y++){var b=2*y;d+=T(Vr(v[b]),!0),d+=" "+Vr(v[b+1])}var w=Vr(v[2*y]).split(/\s/);d+=T(Vr(w[0]),!0),2===w.length&&(d+=" "+Vr(w[1])),this[e]=t=d}r!==!1&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var $=this.$$observers;$&&o($[f],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=ge()),i=r[e]||(r[e]=[]);return i.push(t),m.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(e)&&t(n[e])}),function(){j(i,t)}}};var ae=r.startSymbol(),se=r.endSymbol(),ue="{{"==ae||"}}"==se?v:function(e){return e.replace(/\{\{/g,ae).replace(/}}/g,se)},fe=/^ngAttr[A-Z]/;return M.$$addBindingInfo=_?function(e,t){var n=e.data("$binding")||[];jr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:g,M.$$addBindingClass=_?function(e){A(e,"ng-binding")}:g,M.$$addScopeInfo=_?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:g,M.$$addScopeClass=_?function(e,t){A(e,t?"ng-isolate-scope":"ng-scope")}:g,M}]}function lt(e){return $e(e.replace(Ai,""))}function ut(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o0?" ":"")+a}return n}function ct(e){e=Er(e);var t=e.length;if(1>=t)return e;for(;t--;){var n=e[t];n.nodeType===Qr&&Ar.call(e,t,1)}return e}function ft(e,t){if(t&&x(t))return t;if(x(e)){var n=Ri.exec(e);if(n)return n[3]}}function dt(){var e={},t=!1;this.register=function(t,n){de(t,"controller"),w(t)?f(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(i,o){function a(e,t,n,i){if(!e||!w(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,t);e.$scope[t]=n}return function(r,s,l,u){var c,d,p,h;if(l=l===!0,u&&x(u)&&(h=u),x(r)){if(d=r.match(Ri),!d)throw Mi("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=d[1],h=h||d[3],r=e.hasOwnProperty(p)?e[p]:pe(s.$scope,p,!0)||(t?pe(o,p,!0):n),fe(r,p,!0)}if(l){var g=(jr(r)?r[r.length-1]:r).prototype;c=Object.create(g||null),h&&a(s,h,c,p||r.name);var v;return v=f(function(){var e=i.invoke(r,c,s,p);return e!==c&&(w(e)||k(e))&&(c=e,h&&a(s,h,c,p||r.name)),c},{instance:c,identifier:h})}return c=i.instantiate(r,s,p),h&&a(s,h,c,p||r.name),c}}]}function pt(){this.$get=["$window",function(e){return Er(e.document)}]}function ht(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function gt(e){return w(e)?_(e)?e.toISOString():q(e):e}function vt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return a(e,function(e,n){null===e||y(e)||(jr(e)?o(e,function(e,r){t.push(ne(n)+"="+ne(gt(e)))}):t.push(ne(n)+"="+ne(gt(e))))}),t.join("&")}}}function mt(){this.$get=function(){return function(e){function t(e,r,i){null===e||y(e)||(jr(e)?o(e,function(e){t(e,r+"[]")}):w(e)&&!_(e)?a(e,function(e,n){t(e,r+(i?"":"[")+n+(i?"":"]"))}):n.push(ne(r)+"="+ne(gt(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function yt(e,t){if(x(e)){var n=e.replace(Fi,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Di)||bt(n))&&(e=G(n))}}return e}function bt(e){var t=e.match(Pi);return t&&Ni[t[0]].test(e)}function wt(e){function t(e,t){e&&(r[e]=r[e]?r[e]+", "+t:t)}var n,r=ge();return x(e)?o(e.split("\n"),function(e){n=e.indexOf(":"),t(wr(Vr(e.substr(0,n))),Vr(e.substr(n+1)))}):w(e)&&o(e,function(e,n){t(wr(n),Vr(e))}),r}function $t(e){var t;return function(n){if(t||(t=wt(e)),n){var r=t[wr(n)];return void 0===r&&(r=null),r}return t}}function xt(e,t,n,r){return k(r)?r(e,t,n):(o(r,function(r){e=r(e,t,n)}),e)}function Ct(e){return e>=200&&300>e}function _t(){var e=this.defaults={transformResponse:[yt],transformRequest:[function(e){return!w(e)||T(e)||M(e)||A(e)?e:q(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:V(Li),put:V(Li),patch:V(Li)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},t=!1;this.useApplyAsync=function(e){return b(e)?(t=!!e,this):t};var i=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,l,u,c,d){function p(t){function i(e){var t=f({},e);return e.data?t.data=xt(e.data,e.headers,e.status,l.transformResponse):t.data=e.data,Ct(e.status)?t:c.reject(t)}function a(e,t){var n,r={};return o(e,function(e,i){k(e)?(n=e(t),null!=n&&(r[i]=n)):r[i]=e}),r}function s(t){var n,r,i,o=e.headers,s=f({},t.headers);o=f({},o.common,o[wr(t.method)]);e:for(n in o){r=wr(n);for(i in s)if(wr(i)===r)continue e;s[n]=o[n]}return a(s,V(t))}if(!Pr.isObject(t))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",t);var l=f({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},t);l.headers=s(t),l.method=xr(l.method),l.paramSerializer=x(l.paramSerializer)?d.get(l.paramSerializer):l.paramSerializer;var u=function(t){var r=t.headers,a=xt(t.data,$t(r),n,t.transformRequest);return y(a)&&o(r,function(e,t){"content-type"===wr(t)&&delete r[t]}),y(t.withCredentials)&&!y(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,a).then(i,i)},p=[u,n],h=c.when(l);for(o(C,function(e){(e.request||e.requestError)&&p.unshift(e.request,e.requestError),(e.response||e.responseError)&&p.push(e.response,e.responseError)});p.length;){var g=p.shift(),m=p.shift();h=h.then(g,m)}return h.success=function(e){return fe(e,"fn"),h.then(function(t){e(t.data,t.status,t.headers,l)}),h},h.error=function(e){return fe(e,"fn"),h.then(null,function(t){e(t.data,t.status,t.headers,l)}),h},h}function h(e){o(arguments,function(e){p[e]=function(t,n){return p(f({},n||{},{method:e,url:t}))}})}function g(e){o(arguments,function(e){p[e]=function(t,n,r){return p(f({},r||{},{method:e,url:t,data:n}))}})}function v(r,i){function o(e,n,r,i){function o(){l(n,e,r,i)}h&&(Ct(e)?h.put(_,[e,n,wt(r),i]):h.remove(_)),t?u.$applyAsync(o):(o(),u.$$phase||u.$apply())}function l(e,t,n,i){t=Math.max(t,0),(Ct(t)?v.resolve:v.reject)({data:e,status:t,headers:$t(n),config:r,statusText:i})}function f(e){l(e.data,e.status,V(e.headers()),e.statusText)}function d(){var e=p.pendingRequests.indexOf(r);-1!==e&&p.pendingRequests.splice(e,1)}var h,g,v=c.defer(),x=v.promise,C=r.headers,_=m(r.url,r.paramSerializer(r.params));if(p.pendingRequests.push(r),x.then(d,d),!r.cache&&!e.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(h=w(r.cache)?r.cache:w(e.cache)?e.cache:$),h&&(g=h.get(_),b(g)?D(g)?g.then(f,f):jr(g)?l(g[1],g[0],V(g[2]),g[3]):l(g,200,{},"OK"):h.put(_,x)),y(g)){var k=En(r.url)?s()[r.xsrfCookieName||e.xsrfCookieName]:n;k&&(C[r.xsrfHeaderName||e.xsrfHeaderName]=k),a(r.method,_,i,o,C,r.timeout,r.withCredentials,r.responseType)}return x}function m(e,t){return t.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+t),e}var $=l("$http");e.paramSerializer=x(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var C=[];return o(i,function(e){C.unshift(x(e)?d.get(e):d.invoke(e))}),p.pendingRequests=[],h("get","delete","head","jsonp"),g("post","put","patch"),p.defaults=e,p}]}function kt(){return new e.XMLHttpRequest}function Et(){this.$get=["$browser","$window","$document",function(e,t,n){return St(e,kt,e.defer,t.angular.callbacks,n[0])}]}function St(e,t,r,i,a){function s(e,t,n){var r=a.createElement("script"),o=null;return r.type="text/javascript",r.src=e,r.async=!0,o=function(e){ri(r,"load",o),ri(r,"error",o),a.body.removeChild(r),r=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},ni(r,"load",o),ni(r,"error",o),a.body.appendChild(r),o}return function(a,l,u,c,f,d,p,h){function v(){w&&w(),$&&$.abort()}function m(t,i,o,a,s){_!==n&&r.cancel(_),w=$=null,t(i,o,a,s),e.$$completeOutstandingRequest(g)}if(e.$$incOutstandingRequestCount(),l=l||e.url(),"jsonp"==wr(a)){var y="_"+(i.counter++).toString(36);i[y]=function(e){i[y].data=e,i[y].called=!0};var w=s(l.replace("JSON_CALLBACK","angular.callbacks."+y),y,function(e,t){m(c,e,i[y].data,"",t),i[y]=g})}else{var $=t();$.open(a,l,!0),o(f,function(e,t){b(e)&&$.setRequestHeader(t,e)}),$.onload=function(){var e=$.statusText||"",t="response"in $?$.response:$.responseText,n=1223===$.status?204:$.status;0===n&&(n=t?200:"file"==kn(l).protocol?404:0),m(c,n,t,$.getAllResponseHeaders(),e)};var x=function(){m(c,-1,null,null,"")};if($.onerror=x,$.onabort=x,p&&($.withCredentials=!0),h)try{$.responseType=h}catch(C){if("json"!==h)throw C}$.send(u)}if(d>0)var _=r(v,d);else D(d)&&d.then(v)}}function Ot(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(n){return n.replace(d,e).replace(p,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=q(e)}return e}function l(o,l,d,p){function h(e){try{return e=O(e),p&&!b(e)?e:s(e)}catch(t){r(ji.interr(o,t))}}p=!!p;for(var g,v,m,w=0,$=[],x=[],C=o.length,_=[],E=[];C>w;){if(-1==(g=o.indexOf(e,w))||-1==(v=o.indexOf(t,g+u))){w!==C&&_.push(a(o.substring(w)));break}w!==g&&_.push(a(o.substring(w,g))),m=o.substring(g+u,v),$.push(m),x.push(n(m,h)),w=v+c,E.push(_.length),_.push("")}if(d&&_.length>1&&ji.throwNoconcat(o),!l||$.length){var S=function(e){for(var t=0,n=$.length;n>t;t++){if(p&&y(e[t]))return;_[E[t]]=e[t]}return _.join("")},O=function(e){return d?i.getTrusted(d,e):i.valueOf(e)};return f(function(e){var t=0,n=$.length,i=new Array(n);try{for(;n>t;t++)i[t]=x[t](e);return S(i)}catch(a){r(ji.interr(o,a))}},{exp:o,expressions:$,$$watchDelegate:function(e,t){var n;return e.$watchGroup(x,function(r,i){var o=S(r);k(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var u=e.length,c=t.length,d=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return l.startSymbol=function(){return e},l.endSymbol=function(){return t},l}]}function Tt(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){function i(i,a,s,l){var u=arguments.length>4,c=u?z(arguments,4):[],f=t.setInterval,d=t.clearInterval,p=0,h=b(l)&&!l,g=(h?r:n).defer(),v=g.promise;return s=b(s)?s:0,v.then(null,null,u?function(){i.apply(null,c)}:i),v.$$intervalId=f(function(){g.notify(p++),s>0&&p>=s&&(g.resolve(p),d(v.$$intervalId),delete o[v.$$intervalId]),h||e.$apply()},a),o[v.$$intervalId]=g,v}var o={};return i.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},i}]}function At(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(e){return 1===e?"one":"other"}}}}function Mt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=te(t[n]);return t.join("/")}function Rt(e,t){var n=kn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=p(n.port)||Vi[n.protocol]||null}function Dt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=kn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=Z(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Lt(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function Pt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Nt(e){return e.replace(/(#.+)|#$/,"$1")}function Ft(e){return e.substr(0,Pt(e).lastIndexOf("/")+1)}function jt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function It(e,t){this.$$html5=!0,t=t||"";var r=Ft(e);Rt(e,this),this.$$parse=function(e){var t=Lt(r,e);if(!x(t))throw Wi("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,r);Dt(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=ee(this.$$search),t=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Mt(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=Lt(e,i))!==n?(s=a,l=(a=Lt(t,a))!==n?r+(Lt("/",a)||a):e+s):(a=Lt(r,i))!==n?l=r+a:r==i+"/"&&(l=r),l&&this.$$parse(l),!!l}}function Vt(e,t){var n=Ft(e);Rt(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Lt(e,r)||Lt(n,r);"#"===a.charAt(0)?(o=Lt(t,a),y(o)&&(o=a)):o=this.$$html5?a:"",Dt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var n=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Mt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Pt(e)==Pt(t)?(this.$$parse(t),!0):!1}}function Wt(e,t){this.$$html5=!0,Vt.apply(this,arguments);var n=Ft(e);this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==Pt(r)?o=r:(a=Lt(n,r))?o=e+t+a:n===r+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Mt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+t+this.$$url}}function Ht(e){return function(){return this[e]}}function zt(e,t){return function(n){return y(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Bt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return b(t)?(e=t,this):e},this.html5Mode=function(e){return R(e)?(t.enabled=e,this):w(e)?(R(e.enabled)&&(t.enabled=e.enabled),R(e.requireBase)&&(t.requireBase=e.requireBase),R(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=u.url(),o=u.$$state;try{r.url(e,t,n),u.$$state=r.state()}catch(a){throw u.url(i),u.$$state=o,a}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw Wi("nobase","$location in HTML5 mode requires a tag to be present!");f=jt(p)+(d||"/"),c=i.history?It:Wt}else f=Pt(p),c=Vt;u=new c(f,"#"+e),u.$$parseLinkUrl(p,p),u.$$state=r.state();var h=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=Er(e.target);"a"!==F(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),l=i.attr("href")||i.attr("xlink:href");w(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=kn(s.animVal).href),h.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Nt(u.absUrl())!=Nt(p)&&r.url(u.absUrl(),!0);var g=!0;return r.onUrlChange(function(e,t){n.$evalAsync(function(){var r,i=u.absUrl(),o=u.$$state;u.$$parse(e),u.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,u.absUrl()===e&&(r?(u.$$parse(i),u.$$state=o,s(i,!1,o)):(g=!1,l(i,o)))}),n.$$phase||n.$digest()}),n.$watch(function(){var e=Nt(r.url()),t=Nt(u.absUrl()),o=r.state(),a=u.$$replace,c=e!==t||u.$$html5&&i.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync(function(){var t=u.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(r?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))})),u.$$replace=!1}),u}]}function Ut(){var e=!0,t=this;this.debugEnabled=function(t){return b(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||g,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function qt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw zi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Gt(e,t){if(e){if(e.constructor===e)throw zi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw zi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw zi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw zi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Kt(e,t){if(e){if(e.constructor===e)throw zi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Bi||e===Ui||e===qi)throw zi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Yt(e,t){return"undefined"!=typeof e?e:t}function Qt(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function Xt(e,t){var n=e(t);return!n.$stateful}function Jt(e,t){var n,r;switch(e.type){case Qi.Program:n=!0,o(e.body,function(e){Jt(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case Qi.Literal:e.constant=!0,e.toWatch=[];break;case Qi.UnaryExpression:Jt(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case Qi.BinaryExpression:Jt(e.left,t),Jt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case Qi.LogicalExpression:Jt(e.left,t),Jt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case Qi.ConditionalExpression:Jt(e.test,t),Jt(e.alternate,t),Jt(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case Qi.Identifier:e.constant=!1,e.toWatch=[e];break;case Qi.MemberExpression:Jt(e.object,t),e.computed&&Jt(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case Qi.CallExpression:n=e.filter?Xt(t,e.callee.name):!1,r=[],o(e.arguments,function(e){Jt(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&Xt(t,e.callee.name)?r:[e];break;case Qi.AssignmentExpression:Jt(e.left,t),Jt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case Qi.ArrayExpression:n=!0,r=[],o(e.elements,function(e){Jt(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case Qi.ObjectExpression:n=!0,r=[],o(e.properties,function(e){Jt(e.value,t),n=n&&e.value.constant,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case Qi.ThisExpression:e.constant=!1,e.toWatch=[]}}function Zt(e){if(1==e.length){var t=e[0].expression,r=t.toWatch;return 1!==r.length?r:r[0]!==t?r:n}}function en(e){return e.type===Qi.Identifier||e.type===Qi.MemberExpression}function tn(e){return 1===e.body.length&&en(e.body[0].expression)?{type:Qi.AssignmentExpression,left:e.body[0].expression,right:{type:Qi.NGValueParameter},operator:"="}:void 0}function nn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===Qi.Literal||e.body[0].expression.type===Qi.ArrayExpression||e.body[0].expression.type===Qi.ObjectExpression)}function rn(e){return e.constant}function on(e,t){this.astBuilder=e,this.$filter=t}function an(e,t){this.astBuilder=e,this.$filter=t}function sn(e,t,n,r){Gt(e,r);for(var i,o=t.split("."),a=0;o.length>1;a++){i=qt(o.shift(),r);var s=Gt(e[i],r);s||(s={},e[i]=s),e=s}return i=qt(o.shift(),r),Gt(e[i],r),e[i]=n,n}function ln(e){return"constructor"==e}function un(e){return k(e.valueOf)?e.valueOf():Ji.call(e)}function cn(){var e=ge(),t=ge();this.$get=["$filter","$sniffer",function(r,i){function a(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=un(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function s(e,t,r,i,o){var s,l=i.inputs;if(1===l.length){var u=a;return l=l[0],e.$watch(function(e){var t=l(e);return a(t,u)||(s=i(e,n,n,[t]),u=t&&un(t)),s},t,r,o)}for(var c=[],f=[],d=0,p=l.length;p>d;d++)c[d]=a,f[d]=null;return e.$watch(function(e){for(var t=!1,r=0,o=l.length;o>r;r++){var u=l[r](e);(t||(t=!a(u,c[r])))&&(f[r]=u,c[r]=u&&un(u))}return t&&(s=i(e,n,n,f)),s},t,r,o)}function l(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,k(t)&&t.apply(this,arguments),b(e)&&r.$$postDigest(function(){b(o)&&i()})},n)}function u(e,t,n,r){function i(e){var t=!0;return o(e,function(e){b(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return r(e)},function(e,n,r){s=e,k(t)&&t.call(this,e,n,r),i(e)&&r.$$postDigest(function(){i(s)&&a()})},n)}function c(e,t,n,r){var i;return i=e.$watch(function(e){return r(e)},function(e,n,r){k(t)&&t.apply(this,arguments),i()},n)}function f(e,t){if(!t)return e;var n=e.$$watchDelegate,r=n!==u&&n!==l,i=r?function(n,r,i,o){var a=e(n,r,i,o);return t(a,n,r)}:function(n,r,i,o){var a=e(n,r,i,o),s=t(a,n,r);return b(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==s?i.$$watchDelegate=e.$$watchDelegate:t.$stateful||(i.$$watchDelegate=s,i.inputs=e.inputs?e.inputs:[e]),i}var d={csp:i.csp,expensiveChecks:!1},p={csp:i.csp,expensiveChecks:!0};return function(n,i,o){var a,h,v;switch(typeof n){case"string":n=n.trim(),v=n;var m=o?t:e;if(a=m[v],!a){":"===n.charAt(0)&&":"===n.charAt(1)&&(h=!0,n=n.substring(2));var y=o?p:d,b=new Yi(y),w=new Xi(b,r,y);a=w.parse(n),a.constant?a.$$watchDelegate=c:h?a.$$watchDelegate=a.literal?u:l:a.inputs&&(a.$$watchDelegate=s),m[v]=a}return f(a,i);case"function":return f(n,i);default:return g}}}]}function fn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return pn(function(t){e.$evalAsync(t)},t)}]}function dn(){this.$get=["$browser","$exceptionHandler",function(e,t){return pn(function(t){e.defer(t)},t)}]}function pn(e,t){function i(e,t,n){function r(t){return function(n){i||(i=!0,t.call(e,n))}}var i=!1;return[r(t),r(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var r,i,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][e.status];try{k(r)?i.resolve(r(e.value)):1===e.status?i.resolve(e.value):i.reject(e.value)}catch(l){i.reject(l),t(l)}}}function u(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function c(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function f(e){var t=new c,n=0,r=jr(e)?[]:{};return o(e,function(e,i){n++,m(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}var d=r("$q",TypeError),p=function(){return new c};a.prototype={then:function(e,t,n){var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&u(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}},c.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(w(e)||k(e))&&(n=e&&e.then),k(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,u(this.promise.$$state))}catch(o){r[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;a>o;o++){i=r[o][0],e=r[o][3];try{i.notify(k(e)?e(n):n)}catch(s){t(s)}}})}};var h=function(e){var t=new c;return t.reject(e),t.promise},g=function(e,t){var n=new c;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{ -k(n)&&(r=n())}catch(i){return g(i,!1)}return D(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},m=function(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)},y=function b(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!k(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof b))return new b(e);var r=new c;return e(t,n),r.promise};return y.defer=p,y.reject=h,y.when=m,y.all=f,y}function hn(){this.$get=["$window","$timeout",function(e,t){function n(){for(var e=0;e=0&&(c[t]=null,t=null,0===--u&&l&&(l(),l=null,c.length=0))}}var i=e.requestAnimationFrame||e.webkitRequestAnimationFrame,o=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,a=!!i,s=a?function(e){var t=i(e);return function(){o(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};r.supported=a;var l,u=0,c=[];return r}]}function gn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=l(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,n=r("$rootScope"),a=null,s=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,u,c,f){function d(e){e.currentScope.$$destroyed=!0}function p(){this.$id=l(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function h(e){if(_.$$phase)throw n("inprog","{0} already in progress",_.$$phase);_.$$phase=e}function v(){_.$$phase=null}function m(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function b(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function $(){}function x(){for(;O.length;)try{O.shift()()}catch(e){u(e)}s=null}function C(){null===s&&(s=f.defer(function(){_.$apply(x)}))}p.prototype={constructor:p,$new:function(t,n){var r;return n=n||this,t?(r=new p,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",d),r},$watch:function(e,t,n,r){var i=c(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var o=this,s=o.$$watchers,l={fn:t,last:$,get:i,exp:r||e,eq:!!n};return a=null,k(t)||(l.fn=g),s||(s=o.$$watchers=[]),s.unshift(l),m(this,1),function(){j(s,l)>=0&&m(o,-1),a=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(i,i,s)):t(i,r,s)}var r=new Array(e.length),i=new Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(i,i,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){i[0]=e,r[0]=n,t(i,e===n?i:r,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){i[t]=e,r[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,r,s,l;if(!y(o)){if(w(o))if(i(o)){a!==p&&(a=p,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var u=0;t>u;u++)l=a[u],s=o[u],r=l!==l&&s!==s,r||l===s||(f++,a[u]=s)}else{a!==h&&(a=h={},v=0,f++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,s=o[n],l=a[n],n in a?(r=l!==l&&s!==s,r||l===s||(f++,a[n]=s)):(v++,a[n]=s,f++));if(v>t){f++;for(n in a)o.hasOwnProperty(n)||(v--,delete a[n])}}else a!==o&&(a=o,f++);return f}}function r(){if(g?(g=!1,t(o,o,l)):t(o,s,l),u)if(w(o))if(i(o)){s=new Array(o.length);for(var e=0;e1,f=0,d=c(e,n),p=[],h={},g=!0,v=0;return this.$watch(d,r)},$digest:function(){var e,r,i,o,l,c,d,p,g,m,y=t,b=this,w=[];h("$digest"),f.$$checkUrlChange(),this===_&&null!==s&&(f.defer.cancel(s),x()),a=null;do{for(c=!1,p=b;E.length;){try{m=E.shift(),m.scope.$eval(m.expression,m.locals)}catch(C){u(C)}a=null}e:do{if(o=p.$$watchers)for(l=o.length;l--;)try{if(e=o[l])if((r=e.get(p))===(i=e.last)||(e.eq?W(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(e===a){c=!1;break e}}else c=!0,a=e,e.last=e.eq?I(r,null):r,e.fn(r,i===$?r:i,p),5>y&&(g=4-y,w[g]||(w[g]=[]),w[g].push({msg:k(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:r,oldVal:i}))}catch(C){u(C)}if(!(d=p.$$watchersCount&&p.$$childHead||p!==b&&p.$$nextSibling))for(;p!==b&&!(d=p.$$nextSibling);)p=p.$parent}while(p=d);if((c||E.length)&&!y--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,w)}while(c||E.length);for(v();S.length;)try{S.shift()()}catch(C){u(C)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===_&&f.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)b(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=g,this.$on=this.$watch=this.$watchGroup=function(){return g},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){_.$$phase||E.length||f.defer(function(){E.length&&_.$digest()}),E.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){S.push(e)},$apply:function(e){try{return h("$apply"),this.$eval(e)}catch(t){u(t)}finally{v();try{_.$digest()}catch(t){throw u(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&O.push(t),C()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);-1!==r&&(n[r]=null,b(i,1,e))}},$emit:function(e,t){var n,r,i,o=[],a=this,s=!1,l={name:e,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=H([l],arguments,1);do{for(n=a.$$listeners[e]||o,l.currentScope=a,r=0,i=n.length;i>r;r++)if(n[r])try{n[r].apply(null,c)}catch(f){u(f)}else n.splice(r,1),r--,i--;if(s)return l.currentScope=null,l;a=a.$parent}while(a);return l.currentScope=null,l},$broadcast:function(e,t){var n=this,r=n,i=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,s,l,c=H([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[e]||[],s=0,l=a.length;l>s;s++)if(a[s])try{a[s].apply(null,c)}catch(f){u(f)}else a.splice(s,1),s--,l--;if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var _=new p,E=_.$$asyncQueue=[],S=_.$$postDigestQueue=[],O=_.$$applyAsyncQueue=[];return _}]}function vn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return b(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=kn(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function mn(e){if("self"===e)return e;if(x(e)){if(e.indexOf("***")>-1)throw Zi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Wr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(E(e))return new RegExp("^"+e.source+"$");throw Zi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function yn(e){var t=[];return b(e)&&o(e,function(e){t.push(mn(e))}),t}function bn(){this.SCE_CONTEXTS=eo;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=yn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=yn(e)),t},this.$get=["$injector",function(r){function i(e,t){return"self"===e?En(t):!!e.exec(t.href)}function o(n){var r,o,a=kn(n.toString()),s=!1;for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var r=d.hasOwnProperty(e)?d[e]:null;if(!r)throw Zi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw Zi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)}function l(e){return e instanceof f?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||t===n||""===t)return t;var r=d.hasOwnProperty(e)?d[e]:null;if(r&&t instanceof r)return t.$$unwrapTrustedValue();if(e===eo.RESOURCE_URL){if(o(t))return t;throw Zi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===eo.HTML)return c(t);throw Zi("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(e){throw Zi("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(c=r.get("$sanitize"));var f=a(),d={};return d[eo.HTML]=a(f),d[eo.CSS]=a(f),d[eo.URL]=a(f),d[eo.JS]=a(f),d[eo.RESOURCE_URL]=a(d[eo.URL]),{trustAs:s,getTrusted:u,valueOf:l}}]}function wn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>kr)throw Zi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=V(eo);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=v),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:t(n,function(t){return r.getTrusted(e,t)})};var i=r.parseAs,a=r.getTrusted,s=r.trustAs;return o(eo,function(e,t){var n=wr(t);r[$e("parse_as_"+n)]=function(t){return i(e,t)},r[$e("get_trusted_"+n)]=function(t){return a(e,t)},r[$e("trust_as_"+n)]=function(t){return s(e,t)}}),r}]}function $n(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=p((/android (\d+)/.exec(wr((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,f=!1;if(u){for(var d in u)if(r=l.exec(d)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!o||c&&f||(c=x(u.webkitTransition),f=x(u.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hasEvent:function(e){if("input"===e&&11>=kr)return!1;if(y(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:Hr(),vendorPrefix:n,transitions:c,animations:f,android:o}}]}function xn(){this.$get=["$templateCache","$http","$q",function(e,t,n){function r(i,o){function a(e){if(!o)throw Ti("tpload","Failed to load template: {0} (HTTP status: {1} {2})",i,e.status,e.statusText);return n.reject(e)}r.totalPendingRequests++;var s=t.defaults&&t.defaults.transformResponse;jr(s)?s=s.filter(function(e){return e!==yt}):s===yt&&(s=null);var l={cache:e,transformResponse:s};return t.get(i,l)["finally"](function(){r.totalPendingRequests--}).then(function(t){return e.put(i,t.data),t.data},a)}return r.totalPendingRequests=0,r}]}function Cn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),i=[];return o(r,function(e){var r=Pr.element(e).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+Wr(t)+"(\\s|\\||$)");o.test(r)&&i.push(e)}else-1!=r.indexOf(t)&&i.push(e)})}),i},r.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i0&&(u=t(a.substring(0,l)),i[u]===n&&(i[u]=t(a.substring(l+1))));return i}}function Tn(){this.$get=On}function An(e){function t(r,i){if(w(r)){var a={};return o(r,function(e,n){a[n]=t(n,e)}),a}return e.factory(r+n,i)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Nn),t("date",Yn),t("filter",Mn),t("json",Qn),t("limitTo",Xn),t("lowercase",so),t("number",Fn),t("orderBy",Jn),t("uppercase",lo)}function Mn(){return function(e,t,n){if(!i(e)){if(null==e)return e;throw r("filter")("notarray","Expected array but received: {0}",e)}var o,a,s=Pn(t);switch(s){case"function":o=t;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":o=Dn(t,n,a);break;default:return e}return Array.prototype.filter.call(e,o)}}function Rn(e){return k(e.toString)&&e.toString!==Object.prototype.toString}function Dn(e,t,n){var r,i=w(e)&&"$"in e;return t===!0?t=W:k(t)||(t=function(e,t){return y(e)?!1:null===e||null===t?e===t:w(t)||w(e)&&!Rn(e)?!1:(e=wr(""+e),t=wr(""+t),-1!==e.indexOf(t))}),r=function(r){return i&&!w(r)?Ln(r,e.$,t,!1):Ln(r,e,t,n)}}function Ln(e,t,n,r,i){var o=Pn(e),a=Pn(t);if("string"===a&&"!"===t.charAt(0))return!Ln(e,t.substring(1),n,r);if(jr(e))return e.some(function(e){return Ln(e,t,n,r)});switch(o){case"object":var s;if(r){for(s in e)if("$"!==s.charAt(0)&&Ln(e[s],t,n,!0))return!0;return i?!1:Ln(e,t,n,!1)}if("object"===a){for(s in t){var l=t[s];if(!k(l)&&!y(l)){var u="$"===s,c=u?e:e[s];if(!Ln(c,l,n,u,u))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Pn(e){return null===e?"null":typeof e}function Nn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return y(n)&&(n=t.CURRENCY_SYM),y(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:jn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Fn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:jn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function jn(e,t,n,r,i){if(w(e))return"";var o=0>e;e=Math.abs(e);var a=e===1/0;if(!a&&!isFinite(e))return"";var s=e+"",l="",u=!1,c=[];if(a&&(l="∞"),!a&&-1!==s.indexOf("e")){var f=s.match(/([\d\.]+)e(-?)(\d+)/);f&&"-"==f[2]&&f[3]>i+1?e=0:(l=s,u=!0)}if(a||u)i>0&&1>e&&(l=e.toFixed(i),e=parseFloat(l));else{var d=(s.split(ro)[1]||"").length;y(i)&&(i=Math.min(Math.max(t.minFrac,d),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+-i);var p=(""+e).split(ro),h=p[0];p=p[1]||"";var g,v=0,m=t.lgSize,b=t.gSize;if(h.length>=m+b)for(v=h.length-m,g=0;v>g;g++)(v-g)%b===0&&0!==g&&(l+=n),l+=h.charAt(g);for(g=v;ge&&(r="-",e=-e),e=""+e;e.length0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),In(o,t,r)}}function Wn(e,t){return function(n,r){var i=n["get"+e](),o=xr(t?"SHORT"+e:e);return r[o][i]}}function Hn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=In(Math[r>0?"floor":"ceil"](r/60),2)+In(Math.abs(r%60),2)}function zn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function Bn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Un(e){return function(t){var n=zn(t.getFullYear()),r=Bn(t),i=+r-+n,o=1+Math.round(i/6048e5);return In(o,e)}}function qn(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function Gn(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function Kn(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function Yn(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=p(t[9]+t[10]),o=p(t[9]+t[11])),a.call(r,p(t[1]),p(t[2])-1,p(t[3]));var l=p(t[4]||0)-i,u=p(t[5]||0)-o,c=p(t[6]||0),f=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,l,u,c,f),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,l="",u=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,x(n)&&(n=ao.test(n)?p(n):t(n)),C(n)&&(n=new Date(n)),!_(n)||!isFinite(n.getTime()))return n;for(;r;)s=oo.exec(r),s?(u=H(u,s,1),r=u.pop()):(u.push(r),r=null);var c=n.getTimezoneOffset();return i&&(c=K(i,n.getTimezoneOffset()),n=Q(n,i,!0)),o(u,function(t){a=io[t],l+=a?a(n,e.DATETIME_FORMATS,c):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function Qn(){return function(e,t){return y(t)&&(t=2),q(e,t)}}function Xn(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):p(t),isNaN(t)?e:(C(e)&&(e=e.toString()),jr(e)||x(e)?(n=!n||isNaN(n)?0:p(n),n=0>n&&n>=-e.length?e.length+n:n,t>=0?e.slice(n,n+t):0===n?e.slice(t,e.length):e.slice(Math.max(0,n+t),n)):e)}}function Jn(e){return function(t,n,r){function o(e,t){for(var r=0;re?-1:1):r>n?-1:1}return i(t)?(n=jr(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,r=t||v;if(x(t)){if(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(u,n);if(r=e(t),r.constant){var i=r();return a(function(e,t){return u(e[i],t[i])},n)}}return a(function(e,t){return u(r(e),r(t))},n)}),Tr.call(t).sort(a(o,r))):t}}function Zn(e){return k(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function er(e,t){e.$name=t}function tr(e,t,r,i,a){var s=this,l=[],u=s.$$parentForm=e.parent().controller("form")||fo;s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,u.$addControl(s),s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){de(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e)},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),o(s.$$success,function(t,n){s.$setValidity(n,null,e)}),j(l,e)},vr({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(j(r,n),0===r.length&&delete e[t])},parentForm:u,$animate:i}),s.$setDirty=function(){i.removeClass(e,Ko),i.addClass(e,Yo),s.$dirty=!0,s.$pristine=!1,u.$setDirty()},s.$setPristine=function(){i.setClass(e,Ko,Yo+" "+po),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){i.addClass(e,po),s.$submitted=!0,u.$setSubmitted()}}function nr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function rr(e,t,n,r,i,o){ir(e,t,n,r,i,o),nr(r)}function ir(e,t,n,r,i,o){var a=wr(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(e){s=!0}),t.on("compositionend",function(){s=!1,l()})}var l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=Vr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var u,c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),r.$render=function(){t.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function or(e,t){if(_(e))return e;if(x(e)){Co.lastIndex=0;var n=Co.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,l=0,u=zn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,u.getDate()+c,o,a,s,l)}}return NaN}function ar(e,t){return function(n,r){var i,a;if(_(n))return n;if(x(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),mo.test(n))return new Date(n);if(e.lastIndex=0,i=e.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(e,n){n=v},s.$observe("min",function(e){v=p(e),l.$validate()})}if(b(s.max)||s.ngMax){var m;l.$validators.max=function(e){return!d(e)||y(m)||r(e)<=m},s.$observe("max",function(e){m=p(e),l.$validate()})}}}function lr(e,t,r,i){var o=t[0],a=i.$$hasNativeValidators=w(o.validity);a&&i.$parsers.push(function(e){var r=t.prop(br)||{};return r.badInput&&!r.typeMismatch?n:e})}function ur(e,t,r,i,o,a){if(lr(e,t,r,i),ir(e,t,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:wo.test(e)?parseFloat(e):n}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!C(e))throw Zo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),b(r.min)||r.ngMin){var s;i.$validators.min=function(e){return i.$isEmpty(e)||y(s)||e>=s},r.$observe("min",function(e){b(e)&&!C(e)&&(e=parseFloat(e,10)),s=C(e)&&!isNaN(e)?e:n,i.$validate()})}if(b(r.max)||r.ngMax){var l;i.$validators.max=function(e){return i.$isEmpty(e)||y(l)||l>=e},r.$observe("max",function(e){b(e)&&!C(e)&&(e=parseFloat(e,10)),l=C(e)&&!isNaN(e)?e:n,i.$validate()})}}function cr(e,t,n,r,i,o){ir(e,t,n,r,i,o),nr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||yo.test(n)}}function fr(e,t,n,r,i,o){ir(e,t,n,r,i,o),nr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||bo.test(n)}}function dr(e,t,n,r){y(n.name)&&t.attr("name",l());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function pr(e,t,n,i,o){var a;if(b(i)){if(a=e(i),!a.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return a(t)}return o}function hr(e,t,n,r,i,o,a,s){var l=pr(s,e,"ngTrueValue",n.ngTrueValue,!0),u=pr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return W(e,l)}),r.$parsers.push(function(e){return e?l:u})}function gr(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function d(e,t){var i=r(t,e),o=r(e,t);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||a.$index%2===t){var n=i(e||[]);if(h){if(!W(e,h)){var r=i(h);d(r,n)}}else u(n)}h=V(e)}var h;a.$watch(l[e],p,!0),l.$observe("class",function(t){p(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(l[e]));o===t?u(s):c(s)}})}}}]}function vr(e){function t(e,t,l){t===n?r("$pending",e,l):i("$pending",e,l),R(t)?t?(f(s.$error,e,l),c(s.$$success,e,l)):(c(s.$error,e,l),f(s.$$success,e,l)):(f(s.$error,e,l),f(s.$$success,e,l)),s.$pending?(o(Jo,!0),s.$valid=s.$invalid=n,a("",null)):(o(Jo,!1),s.$valid=mr(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var u;u=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,u),d.$setValidity(e,u,s)}function r(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function i(e,t,r){s[e]&&f(s[e],t,r),mr(s[e])&&(s[e]=n)}function o(e,t){t&&!u[e]?(p.addClass(l,e),u[e]=!0):!t&&u[e]&&(p.removeClass(l,e),u[e]=!1)}function a(e,t){e=e?"-"+le(e,"-"):"",o(qo+e,t===!0),o(Go+e,t===!1)}var s=e.ctrl,l=e.$element,u={},c=e.set,f=e.unset,d=e.parentForm,p=e.$animate;u[Go]=!(u[qo]=l.hasClass(qo)),s.$setValidity=t}function mr(e){if(e)for(var t in e)return!1;return!0}var yr=/^\/(.+)\/([a-z]*)$/,br="validity",wr=function(e){return x(e)?e.toLowerCase():e},$r=Object.prototype.hasOwnProperty,xr=function(e){return x(e)?e.toUpperCase():e},Cr=function(e){return x(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},_r=function(e){return x(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(wr=Cr,xr=_r);var kr,Er,Sr,Or,Tr=[].slice,Ar=[].splice,Mr=[].push,Rr=Object.prototype.toString,Dr=Object.getPrototypeOf,Lr=r("ng"),Pr=e.angular||(e.angular={}),Nr=0;kr=t.documentMode,g.$inject=[],v.$inject=[];var Fr,jr=Array.isArray,Ir=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,Vr=function(e){return x(e)?e.trim():e},Wr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#n;++n)if(r=Br[n],e=t.querySelector("["+r.replace(":","\\:")+"jq]")){i=e.getAttribute(r+"jq");break}return zr.name_=i},Br=["ng-","data-ng-","ng:","x-ng-"],Ur=/[A-Z]/g,qr=!1,Gr=1,Kr=2,Yr=3,Qr=8,Xr=9,Jr=11,Zr={full:"1.4.0",major:1,minor:4,dot:0,codeName:"jaracimrman-existence"};Ee.expando="ng339";var ei=Ee.cache={},ti=1,ni=function(e,t,n){e.addEventListener(t,n,!1)},ri=function(e,t,n){e.removeEventListener(t,n,!1)};Ee._data=function(e){return this.cache[e[this.expando]]||{}};var ii=/([\:\-\_]+(.))/g,oi=/^moz([A-Z])/,ai={mouseleave:"mouseout",mouseenter:"mouseover"},si=r("jqLite"),li=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ui=/<|&#?\w+;/,ci=/<([\w:]+)/,fi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,di={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};di.optgroup=di.option,di.tbody=di.tfoot=di.colgroup=di.caption=di.thead,di.th=di.td;var pi=Ee.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),Ee(e).on("load",r))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Er(e>=0?this[e]:this[this.length+e])},length:0,push:Mr,sort:[].sort,splice:[].splice},hi={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){hi[wr(e)]=e});var gi={};o("input,select,option,textarea,button,form,details".split(","),function(e){gi[e]=!0});var vi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Re,removeData:Ae},function(e,t){Ee[t]=e}),o({data:Re,inheritedData:je,scope:function(e){return Er.data(e,"$scope")||je(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Er.data(e,"$isolateScope")||Er.data(e,"$isolateScopeNoTemplate")},controller:Fe,injector:function(e){return je(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:De,css:function(e,t,n){return t=$e(t),b(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,r){var i=e.nodeType;if(i!==Yr&&i!==Kr&&i!==Qr){var o=wr(t);if(hi[o]){if(!b(r))return e[t]||(e.attributes.getNamedItem(t)||g).specified?o:n;r?(e[t]=!0,e.setAttribute(t,o)):(e[t]=!1,e.removeAttribute(o))}else if(b(r))e.setAttribute(t,r);else if(e.getAttribute){var a=e.getAttribute(t,2);return null===a?n:a}}},prop:function(e,t,n){return b(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(y(t)){var n=e.nodeType;return n===Gr||n===Yr?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(y(t)){if(e.multiple&&"select"===F(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){ -return y(t)?e.innerHTML:(Oe(e,!0),void(e.innerHTML=t))},empty:Ie},function(e,t){Ee.prototype[t]=function(t,r){var i,o,a=this.length;if(e!==Ie&&(2==e.length&&e!==De&&e!==Fe?t:r)===n){if(w(t)){for(i=0;a>i;i++)if(e===Re)e(this[i],t);else for(o in t)e(this[i],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,u=0;l>u;u++){var c=e(this[u],t,r);s=s?s+c:c}return s}for(i=0;a>i;i++)e(this[i],t,r);return this}}),o({removeData:Ae,on:function Ta(e,t,n,r){if(b(r))throw si("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(Ce(e)){var i=Me(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Be(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var u=o[t];u||(o[t]=[],"mouseenter"===t||"mouseleave"===t?Ta(e,ai[t],function(e){var n=this,r=e.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(e,t)}):"$destroy"!==t&&ni(e,t,a),u=o[t]),u.push(n)}}},off:Te,one:function(e,t,n){e=Er(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;Oe(e),o(new Ee(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===Gr&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===Gr||n===Jr){t=new Ee(t);for(var r=0,i=t.length;i>r;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===Gr){var n=e.firstChild;o(new Ee(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Er(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Ve,detach:function(e){Ve(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new Ee(t);for(var i=0,o=t.length;o>i;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Pe,removeClass:Le,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var r=n;y(r)&&(r=!De(e,t)),(r?Pe:Le)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Jr?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Se,triggerHandler:function(e,t,n){var r,i,a,s=t.type||t,l=Me(e),u=l&&l.events,c=u&&u[s];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:g,type:s,target:e},t.type&&(r=f(r,t)),i=V(c),a=n?[r].concat(n):[r],o(i,function(t){r.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){Ee.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;a>o;o++)y(i)?(i=e(this[o],t,n,r),b(i)&&(i=Er(i))):Ne(i,e(this[o],t,n,r));return b(i)?i:this},Ee.prototype.bind=Ee.prototype.on,Ee.prototype.unbind=Ee.prototype.off}),Ge.prototype={put:function(e,t){this[qe(e,this.nextUid)]=t},get:function(e){return this[qe(e,this.nextUid)]},remove:function(e){var t=this[e=qe(e,this.nextUid)];return delete this[e],t}};var mi=[function(){this.$get=[function(){return Ge}]}],yi=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,bi=/,/,wi=/^\s*(_?)(\S+?)\1\s*$/,$i=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,xi=r("$injector");Qe.$$annotate=Ye;var Ci=r("$animate"),_i=1,ki="ng-animate",Ei=function(){this.$get=["$q","$$rAF",function(e,t){function n(){}return n.all=g,n.chain=g,n.prototype={end:g,cancel:g,resume:g,pause:g,complete:g,then:function(n,r){return e(function(e){t(function(){e()})}).then(n,r)}},n}]},Si=function(){var e=new Ge,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,r){function i(n,i,a){var s=e.get(n);s||(e.put(n,s={}),t.push(n)),i&&o(i.split(" "),function(e){e&&(s[e]=!0)}),a&&o(a.split(" "),function(e){e&&(s[e]=!1)}),t.length>1||r.$$postDigest(function(){o(t,function(t){var n=e.get(t);if(n){var r=et(t.attr("class")),i="",a="";o(n,function(e,t){var n=!!r[t];e!==n&&(e?i+=(i.length?" ":"")+t:a+=(a.length?" ":"")+t)}),o(t,function(e){i&&Pe(e,i),a&&Le(e,a)}),e.remove(t)}}),t.length=0})}return{enabled:g,on:g,off:g,pin:g,push:function(e,t,r,o){return o&&o(),r=r||{},r.from&&e.css(r.from),r.to&&e.css(r.to),(r.addClass||r.removeClass)&&i(e,r.addClass,r.removeClass),new n}}}]},Oi=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Ci("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+ki+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Ci("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',ki)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=Ze(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,r,i,o){return r=r&&Er(r),i=i&&Er(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",tt(o))},move:function(n,r,i,o){return r=r&&Er(r),i=i&&Er(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",tt(o))},leave:function(t,n){return e.push(t,"leave",tt(n),function(){t.remove()})},addClass:function(t,n,r){return r=tt(r),r.addClass=Je(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=tt(r),r.removeClass=Je(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=tt(i),i.addClass=Je(i.addClass,n),i.removeClass=Je(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=tt(o),o.from=o.from?f(o.from,n):n,o.to=o.to?f(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=Je(o.tempClasses,i),e.push(t,"animate",o)}}}]}],Ti=r("$compile");st.$inject=["$provide","$$sanitizeUriProvider"];var Ai=/^((?:x|data)[\:\-_])/i,Mi=r("$controller"),Ri=/^(\S+)(\s+as\s+(\w+))?$/,Di="application/json",Li={"Content-Type":Di+";charset=utf-8"},Pi=/^\[|^\{(?!\{)/,Ni={"[":/]$/,"{":/}$/},Fi=/^\)\]\}',?\n/,ji=Pr.$interpolateMinErr=r("$interpolate");ji.throwNoconcat=function(e){throw ji("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},ji.interr=function(e,t){return ji("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Ii=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Vi={http:80,https:443,ftp:21},Wi=r("$location"),Hi={$$html5:!1,$$replace:!1,absUrl:Ht("$$absUrl"),url:function(e){if(y(e))return this.$$url;var t=Ii.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Ht("$$protocol"),host:Ht("$$host"),port:Ht("$$port"),path:zt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(x(e)||C(e))e=e.toString(),this.$$search=Z(e);else{if(!w(e))throw Wi("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=I(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:y(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:zt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Wt,Vt,It],function(e){e.prototype=Object.create(Hi),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==It||!this.$$html5)throw Wi("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=y(t)?null:t,this}});var zi=r("$parse"),Bi=Function.prototype.call,Ui=Function.prototype.apply,qi=Function.prototype.bind,Gi=ge();o("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Gi[e]=!0});var Ki={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},Yi=function(e){this.options=e};Yi.prototype={constructor:Yi,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index="0"&&"9">=e&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||" "===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=b(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw zi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:Qi.Program,body:e}},expressionStatement:function(){return{type:Qi.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:Qi.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:Qi.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:Qi.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:Qi.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:Qi.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.constants.hasOwnProperty(this.peek().text)?e=I(this.constants[this.consume().text]):this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:Qi.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:Qi.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:Qi.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:Qi.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.expression());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:Qi.Identifier,name:e.text}},constant:function(){return{type:Qi.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:Qi.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:Qi.Property,kind:"init"},this.peek().constant?e.key=this.constant():this.peek().identifier?e.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),e.value=this.expression(),t.push(e)}while(this.expect(","));return this.consume("}"),{type:Qi.ObjectExpression,properties:t}},throwError:function(e,t){throw zi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw zi("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw zi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return i?(this.tokens.shift(),i):!1},constants:{"true":{type:Qi.Literal,value:!0},"false":{type:Qi.Literal,value:!1},"null":{type:Qi.Literal,value:null},undefined:{type:Qi.Literal,value:n},"this":{type:Qi.ThisExpression}}},on.prototype={compile:function(e,t){var r=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Jt(i,r.$filter);var a,s="";if(this.stage="assign",a=tn(i)){this.state.computing="assign";var l=this.nextId();this.recurse(a,l),s="fn.assign="+this.generateFunction("assign","s,v,l")}var u=Zt(i.body);r.stage="inputs",o(u,function(e,t){var n="fn"+t;r.state[n]={vars:[],body:[],own:{}},r.state.computing=n;var i=r.nextId();r.recurse(e,i),r.return_(i),r.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+s+this.watchFns()+"return fn;",f=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","ifDefined","plus","text",c)(this.$filter,qt,Gt,Kt,Yt,Qt,e);return this.state=this.stage=n,f.literal=nn(i),f.constant=rn(i),f},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return o(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return o(this.state.filters,function(n,r){e.push(n+"=$filter("+t.escape(r)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,r,i,a,s){var l,u,c,f,d=this;if(i=i||g,!s&&b(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,r,i,a,!0));switch(e.type){case Qi.Program:o(e.body,function(t,r){d.recurse(t.expression,n,n,function(e){u=e}),r!==e.body.length-1?d.current().body.push(u,";"):d.return_(u)});break;case Qi.Literal:f=this.escape(e.value),this.assign(t,f),i(f);break;case Qi.UnaryExpression:this.recurse(e.argument,n,n,function(e){u=e}),f=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,f),i(f);break;case Qi.BinaryExpression:this.recurse(e.left,n,n,function(e){l=e}),this.recurse(e.right,n,n,function(e){u=e}),f="+"===e.operator?this.plus(l,u):"-"===e.operator?this.ifDefined(l,0)+e.operator+this.ifDefined(u,0):"("+l+")"+e.operator+"("+u+")",this.assign(t,f),i(f);break;case Qi.LogicalExpression:t=t||this.nextId(),d.recurse(e.left,t),d.if_("&&"===e.operator?t:d.not(t),d.lazyRecurse(e.right,t)),i(t);break;case Qi.ConditionalExpression:t=t||this.nextId(),d.recurse(e.test,t),d.if_(t,d.lazyRecurse(e.alternate,t),d.lazyRecurse(e.consequent,t)),i(t);break;case Qi.Identifier:t=t||this.nextId(),r&&(r.context="inputs"===d.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),r.computed=!1,r.name=e.name),qt(e.name),d.if_("inputs"===d.stage||d.not(d.getHasOwnProperty("l",e.name)),function(){d.if_("inputs"===d.stage||"s",function(){a&&1!==a&&d.if_(d.not(d.nonComputedMember("s",e.name)),d.lazyAssign(d.nonComputedMember("s",e.name),"{}")),d.assign(t,d.nonComputedMember("s",e.name))})},t&&d.lazyAssign(t,d.nonComputedMember("l",e.name))),(d.state.expensiveChecks||ln(e.name))&&d.addEnsureSafeObject(t),i(t);break;case Qi.MemberExpression:l=r&&(r.context=this.nextId())||this.nextId(),t=t||this.nextId(),d.recurse(e.object,l,n,function(){d.if_(d.notNull(l),function(){e.computed?(u=d.nextId(),d.recurse(e.property,u),d.addEnsureSafeMemberName(u),a&&1!==a&&d.if_(d.not(d.computedMember(l,u)),d.lazyAssign(d.computedMember(l,u),"{}")),f=d.ensureSafeObject(d.computedMember(l,u)),d.assign(t,f),r&&(r.computed=!0,r.name=u)):(qt(e.property.name),a&&1!==a&&d.if_(d.not(d.nonComputedMember(l,e.property.name)),d.lazyAssign(d.nonComputedMember(l,e.property.name),"{}")),f=d.nonComputedMember(l,e.property.name),(d.state.expensiveChecks||ln(e.property.name))&&(f=d.ensureSafeObject(f)),d.assign(t,f),r&&(r.computed=!1,r.name=e.property.name)),i(t)})},!!a);break;case Qi.CallExpression:t=t||this.nextId(),e.filter?(u=d.filter(e.callee.name),c=[],o(e.arguments,function(e){var t=d.nextId();d.recurse(e,t),c.push(t)}),f=u+"("+c.join(",")+")",d.assign(t,f),i(t)):(u=d.nextId(),l={},c=[],d.recurse(e.callee,u,l,function(){d.if_(d.notNull(u),function(){d.addEnsureSafeFunction(u),o(e.arguments,function(e){d.recurse(e,d.nextId(),n,function(e){c.push(d.ensureSafeObject(e))})}),l.name?(d.state.expensiveChecks||d.addEnsureSafeObject(l.context),f=d.member(l.context,l.name,l.computed)+"("+c.join(",")+")"):f=u+"("+c.join(",")+")",f=d.ensureSafeObject(f),d.assign(t,f),i(t)})}));break;case Qi.AssignmentExpression:if(u=this.nextId(),l={},!en(e.left))throw zi("lval","Trying to assing a value to a non l-value");this.recurse(e.left,n,l,function(){d.if_(d.notNull(l.context),function(){d.recurse(e.right,u),d.addEnsureSafeObject(d.member(l.context,l.name,l.computed)),f=d.member(l.context,l.name,l.computed)+e.operator+u,d.assign(t,f),i(t||f)})},1);break;case Qi.ArrayExpression:c=[],o(e.elements,function(e){d.recurse(e,d.nextId(),n,function(e){c.push(e)})}),f="["+c.join(",")+"]",this.assign(t,f),i(f);break;case Qi.ObjectExpression:c=[],o(e.properties,function(e){d.recurse(e.value,d.nextId(),n,function(t){c.push(d.escape(e.key.type===Qi.Identifier?e.key.name:""+e.key.value)+":"+t)})}),f="{"+c.join(",")+"}",this.assign(t,f),i(f);break;case Qi.ThisExpression:this.assign(t,"s"),i("s");break;case Qi.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){return e?(this.current().body.push(e,"=",t,";"),e):void 0},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return e+"."+t},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(x(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(C(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw zi("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},an.prototype={compile:function(e,t){var n=this,r=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,Jt(r,n.$filter);var i,a;(i=tn(r))&&(a=this.recurse(i));var s,l=Zt(r.body);l&&(s=[],o(l,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var u=[];o(r.body,function(e){u.push(n.recurse(e.expression))});var c=0===r.body.length?function(){}:1===r.body.length?u[0]:function(e,t){var n;return o(u,function(r){n=r(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=nn(r),c.constant=rn(r),c},recurse:function(e,t,r){var i,a,s,l=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case Qi.Literal:return this.value(e.value,t);case Qi.UnaryExpression:return a=this.recurse(e.argument),this["unary"+e.operator](a,t);case Qi.BinaryExpression:return i=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](i,a,t);case Qi.LogicalExpression:return i=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](i,a,t);case Qi.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case Qi.Identifier:return qt(e.name,l.expression),l.identifier(e.name,l.expensiveChecks||ln(e.name),t,r,l.expression);case Qi.MemberExpression:return i=this.recurse(e.object,!1,!!r),e.computed||(qt(e.property.name,l.expression),a=e.property.name),e.computed&&(a=this.recurse(e.property)),e.computed?this.computedMember(i,a,t,r,l.expression):this.nonComputedMember(i,a,l.expensiveChecks,t,r,l.expression);case Qi.CallExpression:return s=[],o(e.arguments,function(e){s.push(l.recurse(e))}),e.filter&&(a=this.$filter(e.callee.name)),e.filter||(a=this.recurse(e.callee,!0)),e.filter?function(e,r,i,o){for(var l=[],u=0;u":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>t(r,i,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<=t(r,i,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>=t(r,i,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)&&t(r,i,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)||t(r,i,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,r){return function(i,o,a,s){var l=e(i,o,a,s)?t(i,o,a,s):n(i,o,a,s);return r?{value:l}:l}},value:function(e,t){return function(){return t?{context:n,name:n,value:e}:e}},identifier:function(e,t,r,i,o){return function(a,s,l,u){var c=s&&e in s?s:a;i&&1!==i&&c&&!c[e]&&(c[e]={});var f=c?c[e]:n;return t&&Gt(f,o),r?{context:c,name:e,value:f}:f}},computedMember:function(e,t,n,r,i){return function(o,a,s,l){var u,c,f=e(o,a,s,l);return null!=f&&(u=t(o,a,s,l),qt(u,i),r&&1!==r&&f&&!f[u]&&(f[u]={}),c=f[u],Gt(c,i)),n?{context:f,name:u,value:c}:c}},nonComputedMember:function(e,t,r,i,o,a){return function(s,l,u,c){var f=e(s,l,u,c);o&&1!==o&&f&&!f[t]&&(f[t]={});var d=null!=f?f[t]:n;return(r||ln(t))&&Gt(d,a),i?{context:f,name:t,value:d}:d}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var Xi=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new Qi(this.lexer),this.astCompiler=n.csp?new an(this.ast,t):new on(this.ast,t)};Xi.prototype={constructor:Xi,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var Ji=(ge(),ge(),Object.prototype.valueOf),Zi=r("$sce"),eo={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Ti=r("$compile"),to=t.createElement("a"),no=kn(e.location.href);On.$inject=["$document"],An.$inject=["$provide"],Nn.$inject=["$locale"],Fn.$inject=["$locale"];var ro=".",io={yyyy:Vn("FullYear",4),yy:Vn("FullYear",2,0,!0),y:Vn("FullYear",1),MMMM:Wn("Month"),MMM:Wn("Month",!0),MM:Vn("Month",2,1),M:Vn("Month",1,1),dd:Vn("Date",2),d:Vn("Date",1),HH:Vn("Hours",2),H:Vn("Hours",1),hh:Vn("Hours",2,-12),h:Vn("Hours",1,-12),mm:Vn("Minutes",2),m:Vn("Minutes",1),ss:Vn("Seconds",2),s:Vn("Seconds",1),sss:Vn("Milliseconds",3),EEEE:Wn("Day"),EEE:Wn("Day",!0),a:qn,Z:Hn,ww:Un(2),w:Un(1),G:Gn,GG:Gn,GGG:Gn,GGGG:Kn},oo=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,ao=/^\-?\d+$/;Yn.$inject=["$locale"];var so=m(wr),lo=m(xr);Jn.$inject=["$parse"];var uo=m({restrict:"E",compile:function(e,t){return t.href||t.xlinkHref?void 0:function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Rr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),co={};o(hi,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!=e){var r=lt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),co[r]=function(){return{restrict:"A",priority:100,link:i}}}}),o(vi,function(e,t){co[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(yr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=lt("ng-"+e);co[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Rr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(kr&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null)); -})}}}});var fo={$addControl:g,$$renameControl:er,$removeControl:g,$setValidity:g,$setDirty:g,$setPristine:g,$setSubmitted:g},po="ng-submitted";tr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var ho=function(e){return["$timeout",function(t){var r={name:"form",restrict:e?"EAC":"E",controller:tr,compile:function(r,i){r.addClass(Ko).addClass(qo);var o=i.name?"name":e&&i.ngForm?"ngForm":!1;return{pre:function(e,r,i,a){if(!("action"in i)){var s=function(t){e.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),t.preventDefault()};ni(r[0],"submit",s),r.on("$destroy",function(){t(function(){ri(r[0],"submit",s)},0,!1)})}var l=a.$$parentForm;o&&(sn(e,a.$name,a,a.$name),i.$observe(o,function(t){a.$name!==t&&(sn(e,a.$name,n,a.$name),l.$$renameControl(a,t),sn(e,a.$name,a,a.$name))})),r.on("$destroy",function(){l.$removeControl(a),o&&sn(e,i[o],n,a.$name),f(a,fo)})}}}};return r}]},go=ho(),vo=ho(!0),mo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,yo=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,bo=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,wo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,$o=/^(\d{4})-(\d{2})-(\d{2})$/,xo=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Co=/^(\d{4})-W(\d\d)$/,_o=/^(\d{4})-(\d\d)$/,ko=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Eo={text:rr,date:sr("date",$o,ar($o,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":sr("datetimelocal",xo,ar(xo,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:sr("time",ko,ar(ko,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:sr("week",Co,or,"yyyy-Www"),month:sr("month",_o,ar(_o,["yyyy","MM"]),"yyyy-MM"),number:ur,url:cr,email:fr,radio:dr,checkbox:hr,hidden:g,button:g,submit:g,reset:g,file:g},So=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Eo[wr(a.type)]||Eo.text)(i,o,a,s[0],t,e,n,r)}}}}],Oo=/^(true|false|\d+)$/,To=function(){return{restrict:"A",priority:100,compile:function(e,t){return Oo.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Ao=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,r,i){e.$$addBindingInfo(r,i.ngBind),r=r[0],t.$watch(i.ngBind,function(e){r.textContent=e===n?"":e})}}}}],Mo=["$interpolate","$compile",function(e,t){return{compile:function(r){return t.$$addBindingClass(r),function(r,i,o){var a=e(i.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(i,a.expressions),i=i[0],o.$observe("ngBindTemplate",function(e){i.textContent=e===n?"":e})}}}}],Ro=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){r.html(e.getTrustedHtml(o(t))||"")})}}}}],Do=m({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Lo=gr("",!0),Po=gr("Odd",0),No=gr("Even",1),Fo=Zn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),jo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Io={},Vo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=lt("ng-"+e);Io[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};Vo[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var Wo=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,l,u;n.$watch(i.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=he(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],Ho=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Pr.noop,compile:function(i,o){var a=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(i,o,u,c,f){var d,p,h,g=0,v=function(){p&&(p.remove(),p=null),d&&(d.$destroy(),d=null),h&&(n.leave(h).then(function(){p=null}),p=h,h=null)};i.$watch(r.parseAsResourceUrl(a),function(r){var a=function(){!b(l)||l&&!i.$eval(l)||t()},u=++g;r?(e(r,!0).then(function(e){if(u===g){var t=i.$new();c.template=e;var l=f(t,function(e){v(),n.enter(e,null,o).then(a)});d=t,h=l,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){u===g&&(v(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(v(),c.template=null)})}}}}],zo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void e(_e(o.template,t).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void e(r.contents())(n))}}}],Bo=Zn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Uo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,i){var a=t.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,l=s?Vr(a):a,u=function(e){if(!y(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?Vr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){return jr(e)?e.join(a):n}),i.$isEmpty=function(e){return!e||!e.length}}}},qo="ng-valid",Go="ng-invalid",Ko="ng-pristine",Yo="ng-dirty",Qo="ng-untouched",Xo="ng-touched",Jo="ng-pending",Zo=new r("ngModel"),ea=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,i,a,s,l,u,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(e);var d,p=a(r.ngModel),h=p.assign,v=p,m=h,w=null,$=this;this.$$setOptions=function(e){if($.$options=e,e&&e.getterSetter){var t=a(r.ngModel+"()"),n=a(r.ngModel+"($$$p)");v=function(e){var n=p(e);return k(n)&&(n=t(e)),n},m=function(e,t){k(p(e))?n(e,{$$$p:$.$modelValue}):h(e,$.$modelValue)}}else if(!p.assign)throw Zo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,X(i))},this.$render=g,this.$isEmpty=function(e){return y(e)||""===e||null===e||e!==e};var x=i.inheritedData("$formController")||fo,_=0;vr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:x,$animate:s}),this.$setPristine=function(){$.$dirty=!1,$.$pristine=!0,s.removeClass(i,Yo),s.addClass(i,Ko)},this.$setDirty=function(){$.$dirty=!0,$.$pristine=!1,s.removeClass(i,Ko),s.addClass(i,Yo),x.$setDirty()},this.$setUntouched=function(){$.$touched=!1,$.$untouched=!0,s.setClass(i,Qo,Xo)},this.$setTouched=function(){$.$touched=!0,$.$untouched=!1,s.setClass(i,Xo,Qo)},this.$rollbackViewValue=function(){l.cancel(w),$.$viewValue=$.$$lastCommittedViewValue,$.$render()},this.$validate=function(){if(!C($.$modelValue)||!isNaN($.$modelValue)){var e=$.$$lastCommittedViewValue,t=$.$$rawModelValue,r=$.$valid,i=$.$modelValue,o=$.$options&&$.$options.allowInvalid;$.$$runValidators(t,e,function(e){o||r===e||($.$modelValue=e?t:n,$.$modelValue!==i&&$.$$writeModelToScope())})}},this.$$runValidators=function(e,t,r){function i(){var e=$.$$parserName||"parse";return d!==n?(d||(o($.$validators,function(e,t){l(t,null)}),o($.$asyncValidators,function(e,t){l(t,null)})),l(e,d),d):(l(e,null),!0)}function a(){var n=!0;return o($.$validators,function(r,i){var o=r(e,t);n=n&&o,l(i,o)}),n?!0:(o($.$asyncValidators,function(e,t){l(t,null)}),!1)}function s(){var r=[],i=!0;o($.$asyncValidators,function(o,a){var s=o(e,t);if(!D(s))throw Zo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(a,n),r.push(s.then(function(){l(a,!0)},function(e){i=!1,l(a,!1)}))}),r.length?c.all(r).then(function(){u(i)},g):u(!0)}function l(e,t){f===_&&$.$setValidity(e,t)}function u(e){f===_&&r(e)}_++;var f=_;return i()&&a()?void s():void u(!1)},this.$commitViewValue=function(){var e=$.$viewValue;l.cancel(w),($.$$lastCommittedViewValue!==e||""===e&&$.$$hasNativeValidators)&&($.$$lastCommittedViewValue=e,$.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){$.$modelValue!==a&&$.$$writeModelToScope()}var r=$.$$lastCommittedViewValue,i=r;if(d=y(i)?n:!0)for(var o=0;o<$.$parsers.length;o++)if(i=$.$parsers[o](i),y(i)){d=!1;break}C($.$modelValue)&&isNaN($.$modelValue)&&($.$modelValue=v(e));var a=$.$modelValue,s=$.$options&&$.$options.allowInvalid;$.$$rawModelValue=i,s&&($.$modelValue=i,t()),$.$$runValidators(i,$.$$lastCommittedViewValue,function(e){s||($.$modelValue=e?i:n,t())})},this.$$writeModelToScope=function(){m(e,$.$modelValue),o($.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){$.$viewValue=e,(!$.$options||$.$options.updateOnDefault)&&$.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=$.$options;i&&b(i.debounce)&&(n=i.debounce,C(n)?r=n:C(n[t])?r=n[t]:C(n["default"])&&(r=n["default"])),l.cancel(w),r?w=l(function(){$.$commitViewValue()},r):u.$$phase?$.$commitViewValue():e.$apply(function(){$.$commitViewValue()})},e.$watch(function(){var t=v(e);if(t!==$.$modelValue&&($.$modelValue===$.$modelValue||t===t)){$.$modelValue=$.$$rawModelValue=t,d=n;for(var r=$.$formatters,i=r.length,o=t;i--;)o=r[i](o);$.$viewValue!==o&&($.$viewValue=$.$$lastCommittedViewValue=o,$.$render(),$.$$runValidators(t,o,g))}return t})}],ta=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:ea,priority:1,compile:function(t){return t.addClass(Ko).addClass(Qo).addClass(qo),{pre:function(e,t,n,r){var i=r[0],o=r[1]||fo;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&o.$$renameControl(i,e)}),e.$on("$destroy",function(){o.$removeControl(i)})},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(n){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],na=/(\s+|^)default(\s+|$)/,ra=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var r=this;this.$options=I(e.$eval(t.ngModelOptions)),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=Vr(this.$options.updateOn.replace(na,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ia=Zn({terminal:!0,priority:1e3}),oa=r("ngOptions"),aa=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,sa=["$compile","$parse",function(e,n){function r(e,t,r){function o(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}var a=e.match(aa);if(!a)throw oa("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,X(t));var s=a[5]||a[7],l=a[6],u=/ as /.test(a[0])&&a[1],c=a[9],f=n(a[2]?a[1]:s),d=u&&n(u),p=d||f,h=c&&n(c),g=c?function(e,t){return h(r,t)}:function(e){return qe(e)},v=function(e,t){return g(e,x(e,t))},m=n(a[2]||a[1]),y=n(a[3]||""),b=n(a[4]||""),w=n(a[8]),$={},x=l?function(e,t){return $[l]=t,$[s]=e,$}:function(e){return $[s]=e,$};return{trackBy:c,getTrackByValue:v,getWatchables:n(w,function(e){var t=[];return e=e||[],Object.keys(e).forEach(function(n){var i=x(e[n],n),o=g(e[n],i);if(t.push(o),a[2]||a[1]){var s=m(r,i);t.push(s)}if(a[4]){var l=b(r,i);t.push(l)}}),t}),getOptions:function(){var e,t=[],n={},a=w(r)||[];if(!l&&i(a))e=a;else{e=[];for(var s in a)a.hasOwnProperty(s)&&"$"!==s.charAt(0)&&e.push(s)}for(var u=e.length,f=0;u>f;f++){var d=a===e?f:e[f],h=a[d],$=x(h,d),C=p(r,$),_=g(C,$),k=m(r,$),E=y(r,$),S=b(r,$),O=new o(_,C,k,E,S);t.push(O),n[_]=O}return{items:t,selectValueMap:n,getOptionFromViewValue:function(e){return n[v(e)]},getViewValueFromOption:function(e){return c?Pr.copy(e.viewValue):e.viewValue}}}}}var a=t.createElement("option"),s=t.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(t,n,i,l){function u(e,t){e.element=t,t.disabled=e.disabled,e.value!==t.value&&(t.value=e.selectValue),e.label!==t.label&&(t.label=e.label,t.textContent=e.label)}function c(e,t,n,r){var i;return t&&wr(t.nodeName)===n?i=t:(i=r.cloneNode(!1),t?e.insertBefore(i,t):e.appendChild(i)),i}function f(e){for(var t;e;)t=e.nextSibling,Ve(e),e=t}function d(e){var t=g&&g[0],n=x&&x[0];if(t||n)for(;e&&(e===t||e===n);)e=e.nextSibling;return e}function p(){var e=C&&v.readValue();C=_.getOptions();var t={},r=n[0].firstChild;if($&&n.prepend(g),r=d(r),C.items.forEach(function(e){var i,o,l;e.group?(i=t[e.group],i||(o=c(n[0],r,"optgroup",s),r=o.nextSibling,o.label=e.group,i=t[e.group]={groupElement:o,currentOptionElement:o.firstChild}),l=c(i.groupElement,i.currentOptionElement,"option",a),u(e,l),i.currentOptionElement=l.nextSibling):(l=c(n[0],r,"option",a),u(e,l),r=l.nextSibling)}),Object.keys(t).forEach(function(e){f(t[e].currentOptionElement)}),f(r),h.$render(),!h.$isEmpty(e)){var i=v.readValue();(_.trackBy&&!W(e,i)||e!==i)&&(h.$setViewValue(i),h.$render())}}var h=l[1];if(h){for(var g,v=l[0],m=i.multiple,y=0,b=n.children(),w=b.length;w>y;y++)if(""===b[y].value){g=b.eq(y);break}var $=!!g,x=Er(a.cloneNode(!1));x.val("?");var C,_=r(i.ngOptions,n,t),k=function(){$||n.prepend(g),n.val(""),g.prop("selected",!0),g.attr("selected",!0)},E=function(){$||g.remove()},S=function(){n.prepend(x),n.val("?"),x.prop("selected",!0),x.attr("selected",!0)},O=function(){x.remove()};m?(h.$isEmpty=function(e){return!e||0===e.length},v.writeValue=function(e){C.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=C.getOptionFromViewValue(e);t&&!t.disabled&&(t.element.selected=!0)})},v.readValue=function(){var e=n.val()||[],t=[];return o(e,function(e){var n=C.selectValueMap[e];n.disabled||t.push(C.getViewValueFromOption(n))}),t},_.trackBy&&t.$watchCollection(function(){return jr(h.$viewValue)?h.$viewValue.map(function(e){return _.getTrackByValue(e)}):void 0},function(){h.$render()})):(v.writeValue=function(e){var t=C.getOptionFromViewValue(e);t&&!t.disabled?n[0].value!==t.selectValue&&(O(),E(),n[0].value=t.selectValue,t.element.selected=!0,t.element.setAttribute("selected","selected")):null===e||$?(O(),k()):(E(),S())},v.readValue=function(){var e=C.selectValueMap[n.val()];return e&&!e.disabled?(E(),O(),C.getViewValueFromOption(e)):null},_.trackBy&&t.$watch(function(){return _.getTrackByValue(h.$viewValue)},function(){h.$render()})),$?(g.remove(),e(g)(t),g.removeClass("ng-scope")):g=Er(a.cloneNode(!1)),p(),t.$watchCollection(_.getWatchables,p)}}}}],la=["$locale","$interpolate","$log",function(e,t,n){var r=/{}/g,i=/^when(Minus)?(.+)$/;return{link:function(a,s,l){function u(e){s.text(e||"")}var c,f=l.count,d=l.$attr.when&&s.attr(l.$attr.when),p=l.offset||0,h=a.$eval(d)||{},v={},m=t.startSymbol(),b=t.endSymbol(),w=m+f+"-"+p+b,$=Pr.noop;o(l,function(e,t){var n=i.exec(t);if(n){var r=(n[1]?"-":"")+wr(n[2]);h[r]=s.attr(l.$attr[t])}}),o(h,function(e,n){v[n]=t(e.replace(r,w))}),a.$watch(f,function(t){var r=parseFloat(t),i=isNaN(r);if(i||r in h||(r=e.pluralCat(r-p)),r!==c&&!(i&&C(c)&&isNaN(c))){$();var o=v[r];y(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),$=g,u()):$=a.$watch(o,u),c=r}})}}}],ua=["$parse","$animate",function(e,a){var s="$$NG_REMOVED",l=r("ngRepeat"),u=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},c=function(e){return e.clone[0]},f=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,d){var p=d.ngRepeat,h=t.createComment(" end ngRepeat: "+p+" "),g=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!g)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var v=g[1],m=g[2],y=g[3],b=g[4];if(g=v.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!g)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",v);var w=g[3]||g[1],$=g[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var x,C,_,k,E={$id:qe};return b?x=e(b):(_=function(e,t){return qe(t)},k=function(e){return e}),function(e,t,r,d,g){x&&(C=function(t,n,r){return $&&(E[$]=t),E[w]=n,E.$index=r,x(e,E)});var v=ge();e.$watchCollection(m,function(r){var d,m,b,x,E,S,O,T,A,M,R,D,L=t[0],P=ge();if(y&&(e[y]=r),i(r))A=r,T=C||_;else{T=C||k,A=[];for(var N in r)r.hasOwnProperty(N)&&"$"!==N.charAt(0)&&A.push(N)}for(x=A.length,R=new Array(x),d=0;x>d;d++)if(E=r===A?d:A[d],S=r[E],O=T(E,S,d),v[O])M=v[O],delete v[O],P[O]=M,R[d]=M;else{if(P[O])throw o(R,function(e){e&&e.scope&&(v[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,O,S);R[d]={id:O,scope:n,clone:n},P[O]=!0}for(var F in v){if(M=v[F],D=he(M.clone),a.leave(D),D[0].parentNode)for(d=0,m=D.length;m>d;d++)D[d][s]=!0;M.scope.$destroy()}for(d=0;x>d;d++)if(E=r===A?d:A[d],S=r[E],M=R[d],M.scope){b=L;do b=b.nextSibling;while(b&&b[s]);c(M)!=b&&a.move(he(M.clone),null,Er(L)),L=f(M),u(M.scope,d,w,S,$,E,x)}else g(function(e,t){M.scope=t;var n=h.cloneNode(!1);e[e.length++]=n,a.enter(e,null,Er(L)),L=n,M.clone=e,P[M.id]=M,u(M.scope,d,w,S,$,E,x)});v=P})}}}}],ca="ng-hide",fa="ng-hide-animate",da=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,ca,{tempClasses:fa})})}}}],pa=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,ca,{tempClasses:fa})})}}}],ha=Zn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ga=["$animate",function(e){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,l=[],u=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)e.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=he(u[r].clone);f[r].$destroy();var p=c[r]=e.leave(s);p.then(d(c,r))}u.length=0,f.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:r};u.push(a),e.enter(r,o.parent(),o)})})})}}}],va=Zn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),ma=Zn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),ya=Zn({restrict:"EAC",link:function(e,t,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",X(t));o(function(e){t.empty(),t.append(e)})}}),ba=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],wa={$setViewValue:g,$render:g},$a=["$element","$scope","$attrs",function(e,r,i){var o=this,a=new Ge;o.ngModelCtrl=wa,o.unknownOption=Er(t.createElement("option")),o.renderUnknownOption=function(t){var n="? "+qe(t)+" ?";o.unknownOption.val(n),e.prepend(o.unknownOption),e.val(n)},r.$on("$destroy",function(){o.renderUnknownOption=g}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),e.val()},o.writeValue=function(t){o.hasOption(t)?(o.removeUnknownOption(),e.val(t),""===t&&o.emptyOption.prop("selected",!0)):null==t&&o.emptyOption?(o.removeUnknownOption(),e.val("")):o.renderUnknownOption(t)},o.addOption=function(e,t){de(e,'"option value"'),""===e&&(o.emptyOption=t);var n=a.get(e)||0;a.put(e,n+1)},o.removeOption=function(e){var t=a.get(e);t&&(1===t?(a.remove(e),""===e&&(o.emptyOption=n)):a.put(e,t-1))},o.hasOption=function(e){return!!a.get(e)}}],xa=function(){return{restrict:"E",require:["select","?ngModel"],controller:$a,link:function(e,t,n,r){var i=r[1];if(i){var a=r[0];if(a.ngModelCtrl=i,i.$render=function(){a.writeValue(i.$viewValue)},t.on("change",function(){e.$apply(function(){i.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return o(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Ge(e);o(t.find("option"),function(e){e.selected=b(n.get(e.value))})};var s,l=NaN;e.$watch(function(){l!==i.$viewValue||W(s,i.$viewValue)||(s=V(i.$viewValue),i.$render()),l=i.$viewValue}),i.$isEmpty=function(e){return!e||0===e.length}}}}}},Ca=["$interpolate",function(e){function t(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}return{restrict:"E",priority:100,compile:function(n,r){if(y(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.ngModelCtrl&&(i?e.$watch(i,function(e,i){r.$set("value",e),i!==e&&s.removeOption(i),s.addOption(e,n),s.ngModelCtrl.$render(),t(n)}):(s.addOption(r.value,n),s.ngModelCtrl.$render(),t(n)),n.on("$destroy",function(){s.removeOption(r.value),s.ngModelCtrl.$render()}))}}}}],_a=m({restrict:"E",terminal:!1}),ka=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},Ea=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(x(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,X(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||y(a)||a.test(e)}}}}},Sa=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=p(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return 0>i||r.$isEmpty(t)||t.length<=i}}}}},Oa=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=p(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ue(),be(Pr),void Er(t).ready(function(){ie(t,oe)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('')},function(e,t,n){!function(e){e(n(3))}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:c[t]}function n(e){return function(t){return a(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t)return null;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),a=n.listSelections(),s=0;s=0;s--){var c=a[s].head;n.replaceRange("",f(c.line,c.ch-1),f(c.line,c.ch+1))}}function o(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=0;s1&&p.indexOf(i)>=0&&n.getRange(f(w.line,w.ch-2),w)==i+i&&(w.ch<=2||n.getRange(f(w.line,w.ch-3),f(w.line,w.ch-2))!=i))y="addFour";else if(h){if(e.isWordChar(d)||!u(n,w,i))return e.Pass;y="both"}else{if(!v||n.getLine(w.line).length!=w.ch&&!s(d,a)&&!/\s/.test(d))return e.Pass;y="both"}else y=p.indexOf(i)>=0&&n.getRange(w,f(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var $=l%2?a.charAt(l-1):i,x=l%2?i:a.charAt(l+1);n.operation(function(){if("skip"==c)n.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;3>e;e++)n.execCommand("goCharRight");else if("surround"==c){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function l(e,t){var n=e.getRange(f(t.line,t.ch-1),f(t.line,t.ch+1));return 2==n.length?n:null}function u(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var a=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(a.pos=a.start=o.start;;){var s=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}var c={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},f=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(p),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(p))});for(var d=c.pairs+"`",p={Backspace:i,Enter:o},h=0;h=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(r&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),d=n(e,a(t.line,l+(c>0?1:0)),c,f||null,i);return null==d?null:{from:a(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,u=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=f;d+=n){var p=e.getLine(d);if(p){var h=n>0?0:p.length-1,g=n>0?p.length:-1;if(!(p.length>o))for(d==t.line&&(h=t.ch-(0>n?1:0));h!=g;h+=n){var v=p.charAt(h);if(c.test(v)&&(void 0===r||e.getTokenTypeAt(a(d,h+1))==r)){var m=s[v];if(">"==m.charAt(1)==n>0)u.push(v);else{if(!u.length)return{pos:a(d,h),ch:v};u.pop()}}}}}return d-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";e.registerHelper("lint","json",function(t){var n=[];jsonlint.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{jsonlint.parse(t)}catch(r){}return n})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(t,n){function r(t){return i.parentNode?(i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",void(i.style.left=t.clientX+5+"px")):e.off(document,"mousemove",r)}var i=document.createElement("div");return i.className="CodeMirror-lint-tooltip",i.appendChild(n.cloneNode(!0)),document.body.appendChild(i),e.on(document,"mousemove",r),r(t),null!=i.style.opacity&&(i.style.opacity=1),i}function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){e.parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout(function(){n(e)},600))}function i(n,i,o){function a(){e.off(o,"mouseout",a),s&&(r(s),s=null)}var s=t(n,i),l=setInterval(function(){if(s)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}return s?void 0:clearInterval(l)},400);e.on(o,"mouseout",a)}function o(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){v(e,t)}}function a(e,t){return t instanceof Function?{getAnnotations:t}:(t&&t!==!0||(t={}),t)}function s(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(m);for(var n=0;n1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function h(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){d(e)},t.options.delay||500))}function g(e,t){var n=t.target||t.srcElement;i(t,f(e),n)}function v(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className))for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=0;s"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(t.tokenize=s,s(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(r(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(ke),i("operator","operator",e.current()));if("`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),i("error","error");if(ke.test(n))return e.eatWhile(ke),i("operator","operator",e.current());if(Ce.test(n)){e.eatWhile(Ce);var o=e.current(),u=_e.propertyIsEnumerable(o)&&_e[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}}function a(e){return function(t,n){var r,a=!1;if(we&&"@"==t.peek()&&t.match(Ee))return n.tokenize=o,i("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||a);)a=!a&&"\\"==r;return a||(n.tokenize=o),i("string","string")}}function s(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=Se.indexOf(a);if(s>=0&&3>s){if(!r){++o;break}if(0==--r)break}else if(s>=3&&6>s)++r;else if(Ce.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function c(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(Te.state=e,Te.stream=i,Te.marked=null,Te.cc=o,Te.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():$e?x:$;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Te.marked?Te.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Te.cc.push(arguments[e])}function h(){return p.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=Te.state;if(r.context){if(Te.marked="def",t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){Te.state.context={prev:Te.state.context,vars:Te.state.localVars},Te.state.localVars=Ae}function m(){Te.state.localVars=Te.state.context.vars,Te.state.context=Te.state.context.prev}function y(e,t){var n=function(){var n=Te.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new c(r,Te.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=Te.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?h():";"==e?p():h(t)}return t}function $(e,t){return"var"==e?h(y("vardef",t.length),z,w(";"),b):"keyword a"==e?h(y("form"),x,$,b):"keyword b"==e?h(y("form"),$,b):"{"==e?h(y("}"),V,b):";"==e?h():"if"==e?("else"==Te.state.lexical.info&&Te.state.cc[Te.state.cc.length-1]==b&&Te.state.cc.pop()(),h(y("form"),x,$,b,K)):"function"==e?h(ee):"for"==e?h(y("form"),Y,$,b):"variable"==e?h(y("stat"),D):"switch"==e?h(y("form"),x,y("}","switch"),w("{"),V,b,b):"case"==e?h(x,w(":")):"default"==e?h(w(":")):"catch"==e?h(y("form"),v,w("("),te,w(")"),$,b,m):"module"==e?h(y("form"),v,ae,m,b):"class"==e?h(y("form"),ne,b):"export"==e?h(y("form"),se,b):"import"==e?h(y("form"),le,b):p(y("stat"),x,w(";"),b)}function x(e){return _(e,!1)}function C(e){return _(e,!0)}function _(e,t){if(Te.state.fatArrowAt==Te.stream.start){var n=t?R:M;if("("==e)return h(v,y(")"),j(B,")"),b,w("=>"),n,m);if("variable"==e)return p(v,B,w("=>"),n,m)}var r=t?O:S;return Oe.hasOwnProperty(e)?h(r):"function"==e?h(ee,r):"keyword c"==e?h(t?E:k):"("==e?h(y(")"),k,he,w(")"),b,r):"operator"==e||"spread"==e?h(t?C:x):"["==e?h(y("]"),de,b,r):"{"==e?I(P,"}",null,r):"quasi"==e?p(T,r):h()}function k(e){return e.match(/[;\}\)\],]/)?p():p(x)}function E(e){return e.match(/[;\}\)\],]/)?p():p(C)}function S(e,t){return","==e?h(x):O(e,t,!1)}function O(e,t,n){var r=0==n?S:O,i=0==n?x:C;return"=>"==e?h(v,n?R:M,m):"operator"==e?/\+\+|--/.test(t)?h(r):"?"==t?h(x,w(":"),i):h(i):"quasi"==e?p(T,r):";"!=e?"("==e?I(C,")","call",r):"."==e?h(L,r):"["==e?h(y("]"),k,w("]"),b,r):void 0:void 0}function T(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?h(T):h(x,A)}function A(e){return"}"==e?(Te.marked="string-2",Te.state.tokenize=l,h(T)):void 0}function M(e){return u(Te.stream,Te.state),p("{"==e?$:x)}function R(e){return u(Te.stream,Te.state),p("{"==e?$:C)}function D(e){return":"==e?h(b,$):p(S,w(";"),b)}function L(e){return"variable"==e?(Te.marked="property",h()):void 0}function P(e,t){return"variable"==e||"keyword"==Te.style?(Te.marked="property",h("get"==t||"set"==t?N:F)):"number"==e||"string"==e?(Te.marked=we?"property":Te.style+" property",h(F)):"jsonld-keyword"==e?h(F):"["==e?h(x,w("]"),F):void 0}function N(e){return"variable"!=e?p(F):(Te.marked="property",h(ee))}function F(e){return":"==e?h(C):"("==e?p(ee):void 0}function j(e,t){function n(r){if(","==r){var i=Te.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),h(e,n)}return r==t?h():h(w(t))}return function(r){return r==t?h():p(e,n)}}function I(e,t,n){for(var r=3;r!?|~^]/,Ee=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Se="([{}])",Oe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Te={state:null,column:null,marked:null,cc:null},Ae={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-ye,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==ve?n:(t.lastType="operator"!=ve||"++"!=me&&"--"!=me?ve:"incdec",d(t,n,ve,me,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==b)a=a.prev;else if(u!=K)break}"stat"==a.type&&"}"==i&&(a=a.prev),be&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,f=i==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==i?a.indented:"form"==c?a.indented+ye:"stat"==c?a.indented+(ge(t,r)?be||ye:0):"switch"!=a.info||f||0==n.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:ye):a.indented+(/^(?:case|default)\b/.test(r)?ye:2*ye)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:$e?null:"/*",blockCommentEnd:$e?null:"*/",lineComment:$e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:$e?"json":"javascript",jsonldMode:we,jsonMode:$e}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(t,n,r){e.exports=r(t,n)}("humane",this,function(e,t){var n=window,r=document,i={on:function(e,t,r){"addEventListener"in n?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r)},off:function(e,t,r){"removeEventListener"in n?e.removeEventListener(t,r,!1):e.detachEvent("on"+t,r)},bind:function(e,t){return function(){e.apply(t,arguments)}},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},config:function(e,t){return null!=e?e:t},transSupport:!1,useFilter:/msie [678]/i.test(navigator.userAgent),_checkTransition:function(){var e=r.createElement("div"),t={webkit:"webkit",Moz:"",O:"o",ms:"MS"};for(var n in t)n+"Transition"in e.style&&(this.vendorPrefix=t[n],this.transSupport=!0)}};i._checkTransition();var o=function(e){e||(e={}),this.queue=[],this.baseCls=e.baseCls||"humane",this.addnCls=e.addnCls||"",this.timeout="timeout"in e?e.timeout:2500,this.waitForMove=e.waitForMove||!1,this.clickToClose=e.clickToClose||!1,this.timeoutAfterMove=e.timeoutAfterMove||!1,this.container=e.container;try{this._setupEl()}catch(t){i.on(n,"load",i.bind(this._setupEl,this))}};return o.prototype={constructor:o,_setupEl:function(){var e=r.createElement("div");if(e.style.display="none",!this.container){if(!r.body)throw"document.body is null";this.container=r.body}this.container.appendChild(e),this.el=e,this.removeEvent=i.bind(function(){var e=i.config(this.currentMsg.timeoutAfterMove,this.timeoutAfterMove);e?setTimeout(i.bind(this.remove,this),e):this.remove()},this),this.transEvent=i.bind(this._afterAnimation,this),this._run()},_afterTimeout:function(){i.config(this.currentMsg.waitForMove,this.waitForMove)?this.removeEventsSet||(i.on(r.body,"mousemove",this.removeEvent),i.on(r.body,"click",this.removeEvent),i.on(r.body,"keypress",this.removeEvent),i.on(r.body,"touchstart",this.removeEvent),this.removeEventsSet=!0):this.remove()},_run:function(){if(!this._animating&&this.queue.length&&this.el){this._animating=!0,this.currentTimer&&(clearTimeout(this.currentTimer),this.currentTimer=null);var e=this.queue.shift(),t=i.config(e.clickToClose,this.clickToClose);t&&(i.on(this.el,"click",this.removeEvent),i.on(this.el,"touchstart",this.removeEvent));var n=i.config(e.timeout,this.timeout);n>0&&(this.currentTimer=setTimeout(i.bind(this._afterTimeout,this),n)),i.isArray(e.html)&&(e.html="
  • "+e.html.join("
  • ")+"
"),this.el.innerHTML=e.html,this.currentMsg=e,this.el.className=this.baseCls,i.transSupport?(this.el.style.display="block",setTimeout(i.bind(this._showMsg,this),50)):this._showMsg()}},_setOpacity:function(e){if(i.useFilter)try{this.el.filters.item("DXImageTransform.Microsoft.Alpha").Opacity=100*e}catch(t){}else this.el.style.opacity=String(e)},_showMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-animate";else{var t=0;this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-js-animate",this._setOpacity(0),this.el.style.display="block";var n=this,r=setInterval(function(){1>t?(t+=.1,t>1&&(t=1),n._setOpacity(t)):clearInterval(r)},30)}},_hideMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e,i.on(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent);else var t=1,n=this,r=setInterval(function(){t>0?(t-=.1,0>t&&(t=0),n._setOpacity(t)):(n.el.className=n.baseCls+" "+e,clearInterval(r),n._afterAnimation())},30)},_afterAnimation:function(){i.transSupport&&i.off(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent),this.currentMsg.cb&&this.currentMsg.cb(),this.el.style.display="none",this._animating=!1,this._run()},remove:function(e){var t="function"==typeof e?e:null;i.off(r.body,"mousemove",this.removeEvent),i.off(r.body,"click",this.removeEvent),i.off(r.body,"keypress",this.removeEvent),i.off(r.body,"touchstart",this.removeEvent),i.off(this.el,"click",this.removeEvent),i.off(this.el,"touchstart",this.removeEvent),this.removeEventsSet=!1,t&&this.currentMsg&&(this.currentMsg.cb=t),this._animating?this._hideMsg():t&&t()},log:function(e,t,n,r){var i={};if(r)for(var o in r)i[o]=r[o];if("function"==typeof t)n=t;else if(t)for(var o in t)i[o]=t[o];return i.html=e,n&&(i.cb=n),this.queue.push(i),this._run(),this},spawn:function(e){var t=this;return function(n,r,i){return t.log.call(t,n,r,i,e),t}},create:function(e){return new o(e)}},new o})},function(e,t,n){(function(e){(function(){var t=!0,n=!1,r={},i=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,n,r,i,o,a){var s=o.length-1;switch(i){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g," ").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[s-1];case 13:this.$={};break;case 14:this.$=o[s-1];break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[];break;case 19:this.$=o[s-1];break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){function t(e){i.length=i.length-2*e,o.length=o.length-e,a.length=a.length-e}function n(){var e;return e=r.lexer.lex()||1,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,i=[0],o=[null],a=[],s=this.table,l="",u=0,c=0,f=0,d=2,p=1;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;a.push(h),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var g,v,m,y,b,w,$,x,C,_={};;){if(m=i[i.length-1],this.defaultActions[m]?y=this.defaultActions[m]:(null==g&&(g=n()),y=s[m]&&s[m][g]),"undefined"==typeof y||!y.length||!y[0]){if(!f){C=[];for(w in s[m])this.terminals_[w]&&w>2&&C.push("'"+this.terminals_[w]+"'");var k="";k=this.lexer.showPosition?"Parse error on line "+(u+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[g]+"'":"Parse error on line "+(u+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:h,expected:C})}if(3==f){if(g==p)throw new Error(k||"Parsing halted.");c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,h=this.lexer.yylloc,g=n()}for(;!(d.toString()in s[m]);){if(0==m)throw new Error(k||"Parsing halted.");t(1),m=i[i.length-1]}v=g,g=d,m=i[i.length-1],y=s[m]&&s[m][d],f=3}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+g);switch(y[0]){case 1:i.push(g),o.push(this.lexer.yytext),a.push(this.lexer.yylloc),i.push(y[1]),g=null,v?(g=v,v=null):(c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,h=this.lexer.yylloc,f>0&&f--);break;case 2:if($=this.productions_[y[1]][1],_.$=o[o.length-$],_._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},b=this.performAction.call(_,l,c,u,this.yy,y[1],o,a),"undefined"!=typeof b)return b;$&&(i=i.slice(0,-1*$*2),o=o.slice(0,-1*$),a=a.slice(0,-1*$)),i.push(this.productions_[y[1]][0]),o.push(_.$),a.push(_._$),x=s[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),a=0;at[0].length)||(t=n,r=a,this.options.flex));a++);return t?(i=t[0].match(/\n.*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e?e:void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"!=typeof e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},e.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],e.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},e}();return e.lexer=t,e}();return"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(n){if(!n[1])throw new Error("Usage: "+n[0]+" FILE");if("undefined"!=typeof e)var i=t("fs").readFileSync(t("path").join(e.cwd(),n[1]),"utf8");else var o=t("file").path(t("file").cwd()),i=o.join(n[1]).read({charset:"utf-8"});return r.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&r.main("undefined"!=typeof e?e.argv.slice(1):t("system").args)),r})()}).call(t,n(161))},function(e,t,n){function r(){c=!1,s.length?u=s.concat(u):f=-1,u.length&&i()}function i(){if(!c){var e=setTimeout(r);c=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var n=1;ne?t:e>n?n:e}function t(e){return 100*(-1+e)}function n(e,n,r){var i;return i="translate3d"===u.positionUsing?{transform:"translate3d("+t(e)+"%,0,0)"}:"translate"===u.positionUsing?{transform:"translate("+t(e)+"%,0)"}:{"margin-left":t(e)+"%"},i.transition="all "+n+"ms "+r,i}function r(e,t){var n="string"==typeof e?e:a(e);return n.indexOf(" "+t+" ")>=0}function i(e,t){var n=a(e),i=n+t;r(n,t)||(e.className=i.substring(1))}function o(e,t){var n,i=a(e);r(e,t)&&(n=i.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function a(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function s(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var l={};l.version="0.2.0";var u=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};l.configure=function(e){var t,n;for(t in e)n=e[t],void 0!==n&&e.hasOwnProperty(t)&&(u[t]=n);return this},l.status=null,l.set=function(t){var r=l.isStarted();t=e(t,u.minimum,1),l.status=1===t?null:t;var i=l.render(!r),o=i.querySelector(u.barSelector),a=u.speed,s=u.easing;return i.offsetWidth,c(function(e){""===u.positionUsing&&(u.positionUsing=l.getPositioningCSS()),f(o,n(t,a,s)),1===t?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+a+"ms linear",opacity:0}),setTimeout(function(){l.remove(),e()},a)},a)):setTimeout(e,a)}),this},l.isStarted=function(){return"number"==typeof l.status},l.start=function(){l.status||l.set(0);var e=function(){setTimeout(function(){l.status&&(l.trickle(),e())},u.trickleSpeed)};return u.trickle&&e(),this},l.done=function(e){return e||l.status?l.inc(.3+.5*Math.random()).set(1):this},l.inc=function(t){var n=l.status;return n?("number"!=typeof t&&(t=(1-n)*e(Math.random()*n,.1,.95)),n=e(n+t,0,.994),l.set(n)):l.start()},l.trickle=function(){return l.inc(Math.random()*u.trickleRate)},function(){var e=0,t=0;l.promise=function(n){return n&&"resolved"!==n.state()?(0===t&&l.start(),e++,t++,n.always(function(){t--,0===t?(e=0,l.done()):l.set((e-t)/e)}),this):this}}(),l.render=function(e){if(l.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=u.template;var r,o=n.querySelector(u.barSelector),a=e?"-100":t(l.status||0),c=document.querySelector(u.parent);return f(o,{transition:"all 0 linear",transform:"translate3d("+a+"%,0,0)"}),u.showSpinner||(r=n.querySelector(u.spinnerSelector),r&&s(r)),c!=document.body&&i(c,"nprogress-custom-parent"),c.appendChild(n),n},l.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(u.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&s(e)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":""; -return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var c=function(){function e(){var n=t.shift();n&&n(e)}var t=[];return function(n){t.push(n),1==t.length&&e()}}(),f=function(){function e(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function t(e){var t=document.body.style;if(e in t)return e;for(var n,r=i.length,o=e.charAt(0).toUpperCase()+e.slice(1);r--;)if(n=i[r]+o,n in t)return n;return e}function n(n){return n=e(n),o[n]||(o[n]=t(n))}function r(e,t,r){t=n(t),e.style[t]=r}var i=["Webkit","O","Moz","ms"],o={};return function(e,t){var n,i,o=arguments;if(2==o.length)for(n in t)i=t[n],void 0!==i&&t.hasOwnProperty(n)&&r(e,n,i);else r(e,o[1],o[2])}}();return l})},function(e,t,n){/*! +!function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n,r,i=arguments[0],o="["+(e?e+":":"")+i+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1);return t+20&&t-1 in e}function o(e,t,n){var r,a;if(e)if(_(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(dr(e)||i(e)){var s="object"!=typeof e;for(r=0,a=e.length;a>r;r++)(s||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);return e}function a(e){return Object.keys(e).sort()}function s(e,t,n){for(var r=a(e),i=0;in;n++){var i=arguments[n];if(i)for(var o=Object.keys(i),a=0,s=o.length;s>a;a++){var l=o[a];e[l]=i[l]}}return c(e,t),e}function d(e){return parseInt(e,10)}function h(e,t){return f(Object.create(e),t)}function p(){}function g(e){return e}function v(e){return function(){return e}}function m(e){return"undefined"==typeof e}function y(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function w(e){return"string"==typeof e}function $(e){return"number"==typeof e}function x(e){return"[object Date]"===sr.call(e)}function _(e){return"function"==typeof e}function C(e){return"[object RegExp]"===sr.call(e)}function k(e){return e&&e.window===e}function E(e){return e&&e.$evalAsync&&e.$watch}function S(e){return"[object File]"===sr.call(e)}function O(e){return"[object FormData]"===sr.call(e)}function T(e){return"[object Blob]"===sr.call(e)}function A(e){return"boolean"==typeof e}function M(e){return e&&_(e.then)}function R(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function D(e){var t,n={},r=e.split(",");for(t=0;t=0&&e.splice(n,1),t}function N(e,t,n,r){if(k(e)||E(e))throw lr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw lr("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],b(e)){var i=n.indexOf(e);if(-1!==i)return r[i];n.push(e),r.push(t)}var a;if(dr(e)){t.length=0;for(var s=0;sn;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var i in e)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(t[i]=e[i])}return t||e}function j(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r,i,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!dr(e)){if(x(e))return x(t)?j(e.getTime(),t.getTime()):!1;if(C(e))return C(t)?e.toString()==t.toString():!1;if(E(e)||E(t)||k(e)||k(t)||dr(t)||x(t)||C(t))return!1;o={};for(i in e)if("$"!==i.charAt(0)&&!_(e[i])){if(!j(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!o.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t[i]!==n&&!_(t[i]))return!1;return!0}if(!dr(t))return!1;if((r=e.length)==t.length){for(i=0;r>i;i++)if(!j(e[i],t[i]))return!1;return!0}}return!1}function I(e,t,n){return e.concat(ir.call(t,n))}function V(e,t){return ir.call(e,t||0)}function W(e,t){var n=arguments.length>2?V(arguments,2):[];return!_(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,I(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function H(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?i=n:k(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":E(r)&&(i="$SCOPE"),i}function z(e,t){return"undefined"==typeof e?n:($(t)||(t=t?2:null),JSON.stringify(e,H,t))}function U(e){return w(e)?JSON.parse(e):e}function B(e){e=tr(e).clone();try{e.empty()}catch(t){}var n=tr("
").append(e).html();try{return e[0].nodeType===wr?Yn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Yn(t)})}catch(t){return Yn(n)}}function q(e){try{return decodeURIComponent(e)}catch(t){}}function G(e){var t,n,r={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=q(t[0]),y(n))){var i=y(t[1])?q(t[1]):!0;Qn.call(r,n)?dr(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function K(e){var t=[];return o(e,function(e,n){dr(e)?o(e,function(e){t.push(Q(n,!0)+(e===!0?"":"="+Q(e,!0)))}):t.push(Q(n,!0)+(e===!0?"":"="+Q(e,!0)))}),t.length?t.join("&"):""}function Y(e){return Q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function X(e,t){var n,r,i=vr.length;for(e=tr(e),r=0;i>r;++r)if(n=vr[r]+t,w(n=e.attr(n)))return n;return null}function J(e,t){var n,r,i={};o(vr,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),o(vr,function(t){var i,o=t+"app";!n&&(i=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(i.strictDi=null!==X(n,"strict-di"),t(n,r?[r]:[],i))}function Z(n,r,i){b(i)||(i={});var a={strictDi:!1};i=f(a,i);var s=function(){if(n=tr(n),n.injector()){var e=n[0]===t?"document":B(n);throw lr("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(//,">"))}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Ue(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!u.test(e.name)?s():(e.name=e.name.replace(u,""),ur.resumeBootstrap=function(e){return o(e,function(e){r.push(e)}),s()},void(_(ur.resumeDeferredBootstrap)&&ur.resumeDeferredBootstrap()))}function ee(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function te(e){var t=ur.element(e).injector();if(!t)throw lr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function ne(e,t){return t=t||"_",e.replace(mr,function(e,n){return(n?t:"")+e.toLowerCase()})}function re(){var t;yr||(nr=e.jQuery,nr&&nr.fn.on?(tr=nr,f(nr.fn,{scope:jr.scope,isolateScope:jr.isolateScope,controller:jr.controller,injector:jr.injector,inheritedData:jr.inheritedData}),t=nr.cleanData,nr.cleanData=function(e){var n;if(fr)fr=!1;else for(var r,i=0;null!=(r=e[i]);i++)n=nr._data(r,"events"),n&&n.$destroy&&nr(r).triggerHandler("$destroy");t(e)}):tr=we,ur.element=tr,yr=!0)}function ie(e,t,n){if(!e)throw lr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function oe(e,t,n){return n&&dr(e)&&(e=e[e.length-1]),ie(_(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function ae(e,t){if("hasOwnProperty"===e)throw lr("badname","hasOwnProperty is not a valid {0} name",t)}function se(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;a>s;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&_(e)?W(o,e):e}function le(e){var t=e[0],n=e[e.length-1],r=[t];do{if(t=t.nextSibling,!t)break;r.push(t)}while(t!==n);return tr(r)}function ue(){return Object.create(null)}function ce(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||r,t(o,"module",function(){var e={};return function(r,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(r,"module"),o&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r,i){return i||(i=t),function(){return i[r||"push"]([e,n,arguments]),u}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var t=[],i=[],s=[],l=e("$injector","invoke","push",i),u={_invokeQueue:t,_configBlocks:i,_runBlocks:s,requires:o,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),u})}})}function fe(e){var t=[];return JSON.stringify(e,function(e,n){if(n=H(e,n),b(n)){if(t.indexOf(n)>=0)return"<>";t.push(n)}return n})}function de(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?fe(e):e}function he(t){f(t,{bootstrap:Z,copy:N,extend:f,equals:j,element:tr,forEach:o,injector:Ue,noop:p,bind:W,toJson:z,fromJson:U,identity:g,isUndefined:m,isDefined:y,isString:w,isFunction:_,isObject:b,isNumber:$,isElement:R,isArray:dr,version:Cr,isDate:x,lowercase:Yn,uppercase:Xn,callbacks:{counter:0},getTestability:te,$$minErr:r,$$csp:gr,reloadWithDebugInfo:ee}),rr=ce(e);try{rr("ngLocale")}catch(n){rr("ngLocale",[]).provider("$locale",vt)}rr("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Kt}),e.provider("$compile",Xe).directive({a:Ai,input:Gi,textarea:Gi,form:Pi,script:Fo,select:Vo,style:Ho,option:Wo,ngBind:Qi,ngBindHtml:Ji,ngBindTemplate:Xi,ngClass:eo,ngClassEven:no,ngClassOdd:to,ngCloak:ro,ngController:io,ngForm:Ni,ngHide:Mo,ngIf:so,ngInclude:lo,ngInit:co,ngNonBindable:ko,ngPluralize:Eo,ngRepeat:So,ngShow:Ao,ngStyle:Ro,ngSwitch:Do,ngSwitchWhen:Lo,ngSwitchDefault:Po,ngOptions:Io,ngTransclude:No,ngModel:xo,ngList:fo,ngChange:Zi,pattern:Uo,ngPattern:Uo,required:zo,ngRequired:zo,minlength:qo,ngMinlength:qo,maxlength:Bo,ngMaxlength:Bo,ngValue:Yi,ngModelOptions:Co}).directive({ngInclude:uo}).directive(Mi).directive(oo),e.provider({$anchorScroll:Be,$animate:Kr,$browser:Ke,$cacheFactory:Ye,$controller:tt,$document:nt,$exceptionHandler:rt,$filter:sn,$interpolate:pt,$interval:gt,$http:ct,$httpBackend:dt,$location:At,$log:Mt,$parse:Ht,$rootScope:Gt,$q:zt,$$q:Ut,$sce:Jt,$sceDelegate:Xt,$sniffer:Zt,$templateCache:Qe,$templateRequest:en,$$testability:tn,$timeout:nn,$window:an,$$rAF:qt,$$asyncCallback:qe,$$jqLite:Ie})}])}function pe(){return++Er}function ge(e){return e.replace(Tr,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Ar,"Moz$1")}function ve(e){return!Lr.test(e)}function me(e){var t=e.nodeType;return t===br||!t||t===xr}function ye(e,t){var n,r,i,a,s=t.createDocumentFragment(),l=[];if(ve(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),r=(Pr.exec(e)||["",""])[1].toLowerCase(),i=Fr[r]||Fr._default,n.innerHTML=i[1]+e.replace(Nr,"<$1>")+i[2],a=i[0];a--;)n=n.lastChild;l=I(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function be(e,n){n=n||t;var r;return(r=Dr.exec(e))?[n.createElement(r[1])]:(r=ye(e,n))?r.childNodes:[]}function we(e){if(e instanceof we)return e;var t;if(w(e)&&(e=hr(e),t=!0),!(this instanceof we)){if(t&&"<"!=e.charAt(0))throw Rr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new we(e)}t?Ae(this,be(e)):Ae(this,e)}function $e(e){return e.cloneNode(!0)}function xe(e,t){if(t||Ce(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;i>r;r++)Ce(n[r])}function _e(e,t,n,r){if(y(r))throw Rr("offargs","jqLite#off() does not support the `selector` argument");var i=ke(e),a=i&&i.events,s=i&&i.handle;if(s)if(t)o(t.split(" "),function(t){if(y(n)){var r=a[t];if(P(r||[],n),r&&r.length>0)return}Or(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&Or(e,t,s),delete a[t]}function Ce(e,t){var r=e.ng339,i=r&&kr[r];if(i){if(t)return void delete i.data[t];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),_e(e)),delete kr[r],e.ng339=n}}function ke(e,t){var r=e.ng339,i=r&&kr[r];return t&&!i&&(e.ng339=r=pe(),i=kr[r]={events:{},data:{},handle:n}),i}function Ee(e,t,n){if(me(e)){var r=y(n),i=!r&&t&&!b(t),o=!t,a=ke(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];f(s,t)}}}function Se(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Oe(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",hr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+hr(t)+" "," ")))})}function Te(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=hr(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",hr(n))}}function Ae(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;n>r;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Me(e,t){return Re(e,"$"+(t||"ngController")+"Controller")}function Re(e,t,r){e.nodeType==xr&&(e=e.documentElement);for(var i=dr(t)?t:[t];e;){for(var o=0,a=i.length;a>o;o++)if((r=tr.data(e,i[o]))!==n)return r;e=e.parentNode||e.nodeType===_r&&e.host}}function De(e){for(xe(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Le(e,t){t||xe(e);var n=e.parentNode;n&&n.removeChild(e)}function Pe(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):tr(n).on("load",t)}function Ne(e,t){var n=Ir[t.toLowerCase()];return n&&Vr[L(e)]&&n}function Fe(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Wr[t]}function je(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if(m(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(i=F(i));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||i[s].call(e,n)}};return n.elem=e,n}function Ie(){this.$get=function(){return f(we,{hasClass:function(e,t){return e.attr&&(e=e[0]),Se(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Te(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Oe(e,t)}})}}function Ve(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||u)():r+":"+e}function We(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function He(e){var t=e.toString().replace(Br,""),n=t.match(Hr);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function ze(e,t,n){var r,i,a,s;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw w(n)&&n||(n=e.name||He(e)),qr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=e.toString().replace(Br,""),a=i.match(Hr),o(a[1].split(zr),function(e){e.replace(Ur,function(e,t,n){r.push(n)})})}e.$inject=r}}else dr(e)?(s=e.length-1,oe(e[s],"fn"),r=e.slice(0,s)):oe(e,"fn",!0);return r}function Ue(e,t){function r(e){return function(t,n){return b(t)?void o(t,l(e)):e(t,n)}}function i(e,t){if(ae(e,"service"),(_(t)||dr(t))&&(t=E.instantiate(t)),!t.$get)throw qr("pget","Provider '{0}' must define $get factory method.",e);return k[e+$]=t}function a(e,t){return function(){var n=O.invoke(t,this);if(m(n))throw qr("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return s(e,v(t),!1)}function f(e,t){ae(e,"constant"),k[e]=t,S[e]=t}function d(e,t){var n=E.get(e+$),r=n.$get;n.$get=function(){var e=O.invoke(r,n);return O.invoke(t,null,{$delegate:e})}}function h(e){var t,n=[];return o(e,function(e){function r(e){var t,n;for(t=0,n=e.length;n>t;t++){var r=e[t],i=E.get(r[0]);i[r[1]].apply(i,r[2])}}if(!C.get(e)){C.put(e,!0);try{w(e)?(t=rr(e),n=n.concat(h(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):_(e)?n.push(E.invoke(e)):dr(e)?n.push(E.invoke(e)):oe(e,"module")}catch(i){throw dr(e)&&(e=e[e.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),qr("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function g(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===y)throw qr("cdep","Circular dependency found: {0}",t+" <- "+x.join(" <- "));return e[t]}try{return x.unshift(t),e[t]=y,e[t]=n(t,r)}catch(i){throw e[t]===y&&delete e[t],i}finally{x.shift()}}function i(e,n,i,o){"string"==typeof i&&(o=i,i=null);var a,s,l,u=[],c=Ue.$$annotate(e,t,o);for(s=0,a=c.length;a>s;s++){if(l=c[s],"string"!=typeof l)throw qr("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(i&&i.hasOwnProperty(l)?i[l]:r(l,o))}return dr(e)&&(e=e[a]),e.apply(n,u)}function o(e,t,n){var r=Object.create((dr(e)?e[e.length-1]:e).prototype||null),o=i(e,r,t,n);return b(o)||_(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Ue.$$annotate,has:function(t){return k.hasOwnProperty(t+$)||e.hasOwnProperty(t)}}}t=t===!0;var y={},$="Provider",x=[],C=new We([],!0),k={$provide:{provider:r(i),factory:r(s),service:r(u),value:r(c),constant:r(f),decorator:d}},E=k.$injector=g(k,function(e,t){throw ur.isString(t)&&x.push(t),qr("unpr","Unknown provider: {0}",x.join(" <- "))}),S={},O=S.$injector=g(S,function(e,t){var r=E.get(e+$,t);return O.invoke(r.$get,r,n,e)});return o(h(e),function(e){O.invoke(e||p)}),O}function Be(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){return"a"===L(e)?(t=e,!0):void 0}),t}function o(){var e=s.yOffset;if(_(e))e=e();else if(R(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else $(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(){var e,t=n.hash();t?(e=l.getElementById(t))?a(e):(e=i(l.getElementsByName(t)))?a(e):"top"===t&&a(null):a(null)}var l=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&Pe(function(){r.$evalAsync(s)})}),s}]}function qe(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function Ge(e,t,r,i){function a(e){try{e.apply(null,V(arguments,1))}finally{if(C--,0===C)for(;k.length;)try{k.pop()()}catch(t){r.error(t)}}}function s(e){var t=e.indexOf("#");return-1===t?"":e.substr(t+1)}function l(e,t){!function n(){o(S,function(e){e()}),E=t(n,e)}()}function u(){f(),d()}function c(){try{return b.state}catch(e){}}function f(){O=c(),O=m(O)?null:O,j(O,P)&&(O=P),P=O}function d(){(A!==g.url()||T!==O)&&(A=g.url(),T=O,o(D,function(e){e(g.url(),O)}))}function h(e){try{return decodeURIComponent(e)}catch(t){return e}}var g=this,v=t[0],y=e.location,b=e.history,$=e.setTimeout,x=e.clearTimeout,_={};g.isMock=!1;var C=0,k=[];g.$$completeOutstandingRequest=a,g.$$incOutstandingRequestCount=function(){C++},g.notifyWhenNoOutstandingRequests=function(e){o(S,function(e){e()}),0===C?e():k.push(e)};var E,S=[];g.addPollFn=function(e){return m(E)&&l(100,$),S.push(e),e};var O,T,A=y.href,M=t.find("base"),R=null;f(),T=O,g.url=function(t,n,r){if(m(r)&&(r=null),y!==e.location&&(y=e.location),b!==e.history&&(b=e.history),t){var o=T===r;if(A===t&&(!i.history||o))return g;var a=A&&$t(A)===$t(t);return A=t,T=r,!i.history||a&&o?(a||(R=t),n?y.replace(t):a?y.hash=s(t):y.href=t):(b[n?"replaceState":"pushState"](r,"",t),f(),T=O),g}return R||y.href.replace(/%27/g,"'")},g.state=function(){return O};var D=[],L=!1,P=null;g.onUrlChange=function(t){return L||(i.history&&tr(e).on("popstate",u),tr(e).on("hashchange",u),L=!0),D.push(t),t},g.$$checkUrlChange=d,g.baseHref=function(){var e=M.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var N={},F="",I=g.baseHref();g.cookies=function(e,t){var i,o,a,s,l;if(!e){if(v.cookie!==F)for(F=v.cookie,o=F.split("; "),N={},s=0;s0&&(e=h(a.substring(0,l)),N[e]===n&&(N[e]=h(a.substring(l+1))));return N}t===n?v.cookie=encodeURIComponent(e)+"=;path="+I+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(t)&&(i=(v.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+I).length+1,i>4096&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},g.defer=function(e,t){var n;return C++,n=$(function(){delete _[n],a(e)},t||0),_[n]=!0,n},g.defer.cancel=function(e){return _[e]?(delete _[e],x(e),a(p),!0):!1}}function Ke(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new Ge(e,r,t,n)}]}function Ye(){this.$get=function(){function e(e,n){function i(e){e!=d&&(h?h==e&&(h=e.n):h=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=f({},n,{id:e}),l={},u=n&&n.capacity||Number.MAX_VALUE,c={},d=null,h=null;return t[e]={put:function(e,t){if(uu&&this.remove(h.key),t},get:function(e){if(u").parent()[0])});var a=D(e,t,e,n,r,i);M.$$addScopeClass(e);var s=null;return function(t,n,r){ie(t,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,l=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),s||(s=R(l));var u;if(u="html"!==s?tr(J(s,tr("
").append(e).html())):n?jr.clone.call(e):e,o)for(var c in o)u.data("$"+c+"Controller",o[c].instance);return M.$$addScopeInfo(u,t),n&&n(u,t),a&&a(t,u,u,i),u}}function R(e){var t=e&&e[0];return t&&"foreignobject"!==L(t)&&t.toString().match(/SVG/)?"svg":"html"}function D(e,t,r,i,o,a){function s(e,r,i,o){var a,s,l,u,c,f,d,h,v;if(p){var m=r.length;for(v=new Array(m),c=0;cc;)l=v[g[c++]],a=g[c++],s=g[c++],a?(a.scope?(u=e.$new(),M.$$addScopeInfo(tr(l),u)):u=e,h=a.transcludeOnThisElement?N(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?N(e,t):null,a(s,u,l,i,h)):s&&s(e,l.childNodes,n,o)}for(var l,u,c,f,d,h,p,g=[],v=0;vy;y++){var x=!1,_=!1;f=m[y],d=f.name,g=hr(f.value),p=Je(d),(v=fe.test(p))&&(d=d.replace(Qr,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var C=p.replace(/(Start|End)$/,"");q(C)&&p===C+"Start"&&(x=d,_=d.substr(0,d.length-5)+"end",d=d.substr(0,d.length-6)),h=Je(d.toLowerCase()),l[h]=d,(v||!n.hasOwnProperty(h))&&(n[h]=g,Ne(e,h)&&(n[h]=!0)),ee(e,t,g,h,v),U(t,h,"A",r,i,x,_)}if(a=e.className,b(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=c.exec(a);)h=Je(o[2]),U(t,h,"C",r,i)&&(n[h]=hr(o[3])),a=a.substr(o.index+o[0].length);break;case wr:X(t,e.nodeValue);break;case $r:try{o=u.exec(e.nodeValue),o&&(h=Je(o[1]),U(t,h,"M",r,i)&&(n[h]=hr(o[2])))}catch(k){}}return t.sort(Y),t}function I(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Yr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==br&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return tr(r)}function W(e,t,n){return function(r,i,o,a,s){return i=I(i[0],t,n),e(r,i,o,a,s)}}function H(e,a,s,l,u,c,f,d,h){function p(e,t,n,r){e&&(n&&(e=W(e,n,r)),e.require=k.require,e.directiveName=S,(L===k||k.$$isolateScope)&&(e=re(e,{isolateScope:!0})),f.push(e)),t&&(n&&(t=W(t,n,r)),t.require=k.require,t.directiveName=S,(L===k||k.$$isolateScope)&&(t=re(t,{isolateScope:!0})),d.push(t))}function g(e,t,n,r){var i,a,s="data",l=!1,u=n;if(w(t)){if(a=t.match(m),t=t.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",u=n.parent()),"?"===a[2]&&(l=!0),i=null,r&&"data"===s&&(i=r[t])&&(i=i.instance),i=i||u[s]("$"+t+"Controller"),!i&&!l)throw Yr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return i||null}return dr(t)&&(i=[],o(t,function(t){i.push(g(e,t,n,r))})),i}function $(e,t,i,l,u){function c(e,t,r){var i;return E(e)||(r=t,t=e,e=n),q&&(i=$),r||(r=q?_.parent():_),u(e,t,i,r,T)}var h,p,m,b,w,$,x,_,k;if(a===i?(k=s,_=s.$$element):(_=tr(i),k=new ae(_,s)),L&&(w=t.$new(!0)),u&&(x=c,x.$$boundTransclude=u),D&&(C={},$={},o(D,function(e){var n,r={$scope:e===L||e.$$isolateScope?w:t,$element:_,$attrs:k,$transclude:x};b=e.controller,"@"==b&&(b=k[e.name]),n=y(b,r,!0,e.controllerAs),$[e.name]=n,q||_.data("$"+e.name+"Controller",n.instance),C[e.name]=n})),L){M.$$addScopeInfo(_,w,!0,!(P&&(P===L||P===L.$$originalDirective))),M.$$addScopeClass(_,!0);var S=C&&C[L.name],O=w;S&&S.identifier&&L.bindToController===!0&&(O=S.instance),o(w.$$isolateBindings=L.$$isolateBindings,function(e,n){var i,o,a,s,l=e.attrName,u=e.optional,c=e.mode;switch(c){case"@":k.$observe(l,function(e){O[n]=e}),k.$$observers[l].$$scope=t,k[l]&&(O[n]=r(k[l])(t));break;case"=":if(u&&!k[l])return;o=v(k[l]),s=o.literal?j:function(e,t){return e===t||e!==e&&t!==t},a=o.assign||function(){throw i=O[n]=o(t),Yr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",k[l],L.name)},i=O[n]=o(t);var f=function(e){return s(e,O[n])||(s(e,i)?a(t,e=O[n]):O[n]=e),i=e};f.$stateful=!0;var d;d=e.collection?t.$watchCollection(k[l],f):t.$watch(v(k[l],f),null,o.literal),w.$on("$destroy",d);break;case"&":o=v(k[l]),O[n]=function(e){return o(t,e)}}})}for(C&&(o(C,function(e){e()}),C=null),h=0,p=f.length;p>h;h++)m=f[h],oe(m,m.isolateScope?w:t,_,k,m.require&&g(m.directiveName,m.require,_,$),x);var T=t;for(L&&(L.template||null===L.templateUrl)&&(T=w),e&&e(T,i.childNodes,n,u),h=d.length-1;h>=0;h--)m=d[h],oe(m,m.isolateScope?w:t,_,k,m.require&&g(m.directiveName,m.require,_,$),x)}h=h||{};for(var x,C,k,S,O,T,A,R=-Number.MAX_VALUE,D=h.controllerDirectives,L=h.newIsolateScopeDirective,P=h.templateDirective,N=h.nonTlbTranscludeDirective,H=!1,U=!1,q=h.hasElementTranscludeDirective,Y=s.$$element=tr(a),X=c,Z=l,ee=0,ne=e.length;ne>ee;ee++){k=e[ee];var ie=k.$$start,se=k.$$end;if(ie&&(Y=I(a,ie,se)),O=n,R>k.priority)break;if((A=k.scope)&&(k.templateUrl||(b(A)?(Q("new/isolated scope",L||x,k,Y),L=k):Q("new/isolated scope",L,k,Y)),x=x||k),S=k.name,!k.templateUrl&&k.controller&&(A=k.controller,D=D||{},Q("'"+S+"' controller",D[S],k,Y),D[S]=k),(A=k.transclude)&&(H=!0,k.$$tlb||(Q("transclusion",N,k,Y),N=k),"element"==A?(q=!0,R=k.priority,O=Y,Y=s.$$element=tr(t.createComment(" "+S+": "+s[S]+" ")),a=Y[0],te(u,V(O),a),Z=M(O,l,R,X&&X.name,{nonTlbTranscludeDirective:N})):(O=tr($e(a)).contents(),Y.empty(),Z=M(O,l))),k.template)if(U=!0,Q("template",P,k,Y),P=k,A=_(k.template)?k.template(Y,s):k.template,A=ce(A),k.replace){if(X=k,O=ve(A)?[]:et(J(k.templateNamespace,hr(A))),a=O[0],1!=O.length||a.nodeType!==br)throw Yr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",S,"");te(u,Y,a);var le={$attr:{}},ue=F(a,[],le),fe=e.splice(ee+1,e.length-(ee+1));L&&z(ue),e=e.concat(ue).concat(fe),G(s,le),ne=e.length}else Y.html(A);if(k.templateUrl)U=!0,Q("template",P,k,Y),P=k,k.replace&&(X=k),$=K(e.splice(ee,e.length-ee),Y,s,u,H&&Z,f,d,{controllerDirectives:D,newIsolateScopeDirective:L,templateDirective:P,nonTlbTranscludeDirective:N}),ne=e.length;else if(k.compile)try{T=k.compile(Y,s,Z),_(T)?p(null,T,ie,se):T&&p(T.pre,T.post,ie,se)}catch(de){i(de,B(Y))}k.terminal&&($.terminal=!0,R=Math.max(R,k.priority))}return $.scope=x&&x.scope===!0,$.transcludeOnThisElement=H,$.elementTranscludeOnThisElement=q,$.templateOnThisElement=U,$.transclude=Z,h.hasElementTranscludeDirective=q,$}function z(e){for(var t=0,n=e.length;n>t;t++)e[t]=h(e[t],{$$isolateScope:!0})}function U(t,r,o,l,u,c,f){if(r===u)return null;var d=null;if(a.hasOwnProperty(r))for(var p,g=e.get(r+s),v=0,m=g.length;m>v;v++)try{p=g[v],(l===n||l>p.priority)&&-1!=p.restrict.indexOf(o)&&(c&&(p=h(p,{ +$$start:c,$$end:f})),t.push(p),d=p)}catch(y){i(y)}return d}function q(t){if(a.hasOwnProperty(t))for(var n,r=e.get(t+s),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function G(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;o(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),o(t,function(t,o){"class"==o?(A(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,r[o]=n[o])})}function K(e,t,n,r,i,a,s,u){var c,f,d=[],p=t[0],g=e.shift(),v=h(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),m=_(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,y=g.templateNamespace;return t.empty(),l(S.getTrustedResourceUrl(m)).then(function(l){var h,w,$,x;if(l=ce(l),g.replace){if($=ve(l)?[]:et(J(y,hr(l))),h=$[0],1!=$.length||h.nodeType!==br)throw Yr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,m);w={$attr:{}},te(r,t,h);var _=F(h,[],w);b(g.scope)&&z(_),e=_.concat(e),G(n,w)}else h=p,t.html(l);for(e.unshift(v),c=H(e,h,n,i,t,g,a,s,u),o(r,function(e,n){e==h&&(r[n]=t[0])}),f=D(t[0].childNodes,i);d.length;){var C=d.shift(),k=d.shift(),E=d.shift(),S=d.shift(),O=t[0];if(!C.$$destroyed){if(k!==p){var T=k.className;u.hasElementTranscludeDirective&&g.replace||(O=$e(h)),te(E,tr(k),O),A(tr(O),T)}x=c.transcludeOnThisElement?N(C,c.transclude,S):S,c(f,C,O,r,x)}}d=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(d?d.push(t,n,r,o):(c.transcludeOnThisElement&&(o=N(t,c.transclude,i)),c(f,t,n,r,o)))}}function Y(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name"+n+"",r.childNodes[0].childNodes;default:return n}}function Z(e,t){if("srcdoc"==t)return S.HTML;var n=L(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?S.RESOURCE_URL:void 0}function ee(e,t,n,i,o){var a=Z(e,i);o=d[i]||o;var s=r(n,!0,a,o);if(s){if("multiple"===i&&"select"===L(e))throw Yr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",B(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers={});if($.test(i))throw Yr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[i];c!==n&&(s=c&&r(c,!0,a,o),n=c),s&&(l[i]=s(e),(u[i]||(u[i]=[])).$$inter=!0,(l.$$observers&&l.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?l.$updateClass(e,t):l.$set(i,e)}))}}}})}}function te(e,n,r){var i,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(i=0,o=e.length;o>i;i++)if(e[i]==a){e[i++]=r;for(var u=i,c=u+s-1,f=e.length;f>u;u++,c++)f>c?e[u]=e[c]:delete e[u];e.length-=s-1,e.context===a&&(e.context=r);break}l&&l.replaceChild(r,a);var d=t.createDocumentFragment();d.appendChild(a),tr(r).data(tr(a).data()),nr?(fr=!0,nr.cleanData([a])):delete tr.cache[a[tr.expando]];for(var h=1,p=n.length;p>h;h++){var g=n[h];tr(g).remove(),d.appendChild(g),delete n[h]}n[0]=r,n.length=1}function re(e,t){return f(function(){return e.apply(null,arguments)},e,t)}function oe(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,B(n))}}var ae=function(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e};ae.prototype={$normalize:Je,$addClass:function(e){e&&e.length>0&&O.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&O.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Ze(e,t);n&&n.length&&O.addClass(this.$$element,n);var r=Ze(t,e);r&&r.length&&O.removeClass(this.$$element,r)},$set:function(e,t,r,a){var s,l=this.$$element[0],u=Ne(l,e),c=Fe(l,e),f=e;if(u?(this.$$element.prop(e,t),a=u):c&&(this[c]=t,f=c),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e],a||(this.$attr[e]=a=ne(e,"-"))),s=L(this.$$element),"a"===s&&"href"===e||"img"===s&&"src"===e)this[e]=t=T(t,"src"===e);else if("img"===s&&"srcset"===e){for(var d="",h=hr(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(h)?p:/(,)/,v=h.split(g),m=Math.floor(v.length/2),y=0;m>y;y++){var b=2*y;d+=T(hr(v[b]),!0),d+=" "+hr(v[b+1])}var w=hr(v[2*y]).split(/\s/);d+=T(hr(w[0]),!0),2===w.length&&(d+=" "+hr(w[1])),this[e]=t=d}r!==!1&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var $=this.$$observers;$&&o($[f],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=ue()),i=r[e]||(r[e]=[]);return i.push(t),C.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(e)&&t(n[e])}),function(){P(i,t)}}};var se=r.startSymbol(),le=r.endSymbol(),ce="{{"==se||"}}"==le?g:function(e){return e.replace(/\{\{/g,se).replace(/}}/g,le)},fe=/^ngAttr[A-Z]/;return M.$$addBindingInfo=x?function(e,t){var n=e.data("$binding")||[];dr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,M.$$addBindingClass=x?function(e){A(e,"ng-binding")}:p,M.$$addScopeInfo=x?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:p,M.$$addScopeClass=x?function(e,t){A(e,t?"ng-isolate-scope":"ng-scope")}:p,M}]}function Je(e){return ge(e.replace(Qr,""))}function Ze(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o0?" ":"")+a}return n}function et(e){e=tr(e);var t=e.length;if(1>=t)return e;for(;t--;){var n=e[t];n.nodeType===$r&&or.call(e,t,1)}return e}function tt(){var e={},t=!1,i=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){ae(t,"controller"),b(t)?f(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(o,a){function s(e,t,n,i){if(!e||!b(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,t);e.$scope[t]=n}return function(r,l,u,c){var d,h,p,g;if(u=u===!0,c&&w(c)&&(g=c),w(r)){if(h=r.match(i),!h)throw Xr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=h[1],g=g||h[3],r=e.hasOwnProperty(p)?e[p]:se(l.$scope,p,!0)||(t?se(a,p,!0):n),oe(r,p,!0)}if(u){var v=(dr(r)?r[r.length-1]:r).prototype;return d=Object.create(v||null),g&&s(l,g,d,p||r.name),f(function(){return o.invoke(r,d,l,p),d},{instance:d,identifier:g})}return d=o.instantiate(r,l,p),g&&s(l,g,d,p||r.name),d}}]}function nt(){this.$get=["$window",function(e){return tr(e.document)}]}function rt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function it(e,t){if(w(e)){var n=e.replace(ni,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Jr)||ot(n))&&(e=U(n))}}return e}function ot(e){var t=e.match(ei);return t&&ti[t[0]].test(e)}function at(e){var t,n,r,i=ue();return e?(o(e.split("\n"),function(e){r=e.indexOf(":"),t=Yn(hr(e.substr(0,r))),n=hr(e.substr(r+1)),t&&(i[t]=i[t]?i[t]+", "+n:n)}),i):i}function st(e){var t=b(e)?e:n;return function(n){if(t||(t=at(e)),n){var r=t[Yn(n)];return void 0===r&&(r=null),r}return t}}function lt(e,t,n,r){return _(r)?r(e,t,n):(o(r,function(r){e=r(e,t,n)}),e)}function ut(e){return e>=200&&300>e}function ct(){var e=this.defaults={transformResponse:[it],transformRequest:[function(e){return!b(e)||S(e)||T(e)||O(e)?e:z(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:F(Zr),put:F(Zr),patch:F(Zr)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},t=!1;this.useApplyAsync=function(e){return y(e)?(t=!!e,this):t};var i=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,l,u,c,d,h){function p(t){function i(e){var t=f({},e);return e.data?t.data=lt(e.data,e.headers,e.status,l.transformResponse):t.data=e.data,ut(e.status)?t:d.reject(t)}function a(e){var t,n={};return o(e,function(e,r){_(e)?(t=e(),null!=t&&(n[r]=t)):n[r]=e}),n}function s(t){var n,r,i,o=e.headers,s=f({},t.headers);o=f({},o.common,o[Yn(t.method)]);e:for(n in o){r=Yn(n);for(i in s)if(Yn(i)===r)continue e;s[n]=o[n]}return a(s)}if(!ur.isObject(t))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",t);var l=f({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},t);l.headers=s(t),l.method=Xn(l.method);var u=function(t){var r=t.headers,a=lt(t.data,st(r),n,t.transformRequest);return m(a)&&o(r,function(e,t){"content-type"===Yn(t)&&delete r[t]}),m(t.withCredentials)&&!m(e.withCredentials)&&(t.withCredentials=e.withCredentials),$(t,a).then(i,i)},c=[u,n],h=d.when(l);for(o(E,function(e){(e.request||e.requestError)&&c.unshift(e.request,e.requestError),(e.response||e.responseError)&&c.push(e.response,e.responseError)});c.length;){var p=c.shift(),g=c.shift();h=h.then(p,g)}return h.success=function(e){return h.then(function(t){e(t.data,t.status,t.headers,l)}),h},h.error=function(e){return h.then(null,function(t){e(t.data,t.status,t.headers,l)}),h},h}function g(e){o(arguments,function(e){p[e]=function(t,n){return p(f(n||{},{method:e,url:t}))}})}function v(e){o(arguments,function(e){p[e]=function(t,n,r){return p(f(r||{},{method:e,url:t,data:n}))}})}function $(r,i){function o(e,n,r,i){function o(){s(n,e,r,i)}h&&(ut(e)?h.put(x,[e,n,at(r),i]):h.remove(x)),t?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function s(e,t,n,i){t=Math.max(t,0),(ut(t)?v.resolve:v.reject)({data:e,status:t,headers:st(n),config:r,statusText:i})}function u(e){s(e.data,e.status,F(e.headers()),e.statusText)}function f(){var e=p.pendingRequests.indexOf(r);-1!==e&&p.pendingRequests.splice(e,1)}var h,g,v=d.defer(),w=v.promise,$=r.headers,x=C(r.url,r.params);if(p.pendingRequests.push(r),w.then(f,f),!r.cache&&!e.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(h=b(r.cache)?r.cache:b(e.cache)?e.cache:k),h&&(g=h.get(x),y(g)?M(g)?g.then(u,u):dr(g)?s(g[1],g[0],F(g[2]),g[3]):s(g,200,{},"OK"):h.put(x,w)),m(g)){var _=on(r.url)?l.cookies()[r.xsrfCookieName||e.xsrfCookieName]:n;_&&($[r.xsrfHeaderName||e.xsrfHeaderName]=_),a(r.method,x,i,o,$,r.timeout,r.withCredentials,r.responseType)}return w}function C(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||m(e)||(dr(e)||(e=[e]),o(e,function(e){b(e)&&(e=x(e)?e.toISOString():z(e)),n.push(Q(t)+"="+Q(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var k=u("$http"),E=[];return o(i,function(e){E.unshift(w(e)?h.get(e):h.invoke(e))}),p.pendingRequests=[],g("get","delete","head","jsonp"),v("post","put","patch"),p.defaults=e,p}]}function ft(){return new e.XMLHttpRequest}function dt(){this.$get=["$browser","$window","$document",function(e,t,n){return ht(e,ft,e.defer,t.angular.callbacks,n[0])}]}function ht(e,t,r,i,a){function s(e,t,n){var r=a.createElement("script"),o=null;return r.type="text/javascript",r.src=e,r.async=!0,o=function(e){Or(r,"load",o),Or(r,"error",o),a.body.removeChild(r),r=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},Sr(r,"load",o),Sr(r,"error",o),a.body.appendChild(r),o}return function(a,l,u,c,f,d,h,g){function v(){w&&w(),$&&$.abort()}function m(t,i,o,a,s){C!==n&&r.cancel(C),w=$=null,t(i,o,a,s),e.$$completeOutstandingRequest(p)}if(e.$$incOutstandingRequestCount(),l=l||e.url(),"jsonp"==Yn(a)){var b="_"+(i.counter++).toString(36);i[b]=function(e){i[b].data=e,i[b].called=!0};var w=s(l.replace("JSON_CALLBACK","angular.callbacks."+b),b,function(e,t){m(c,e,i[b].data,"",t),i[b]=p})}else{var $=t();$.open(a,l,!0),o(f,function(e,t){y(e)&&$.setRequestHeader(t,e)}),$.onload=function(){var e=$.statusText||"",t="response"in $?$.response:$.responseText,n=1223===$.status?204:$.status;0===n&&(n=t?200:"file"==rn(l).protocol?404:0),m(c,n,t,$.getAllResponseHeaders(),e)};var x=function(){m(c,-1,null,null,"")};if($.onerror=x,$.onabort=x,h&&($.withCredentials=!0),g)try{$.responseType=g}catch(_){if("json"!==g)throw _}$.send(u||null)}if(d>0)var C=r(v,d);else M(d)&&d.then(v)}}function pt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(o,a,d,h){function p(n){return n.replace(u,e).replace(c,t)}function g(e){try{return e=T(e),h&&!y(e)?e:A(e)}catch(t){var n=ri("interr","Can't interpolate: {0}\n{1}",o,t.toString());r(n)}}h=!!h;for(var v,b,w,$=0,x=[],C=[],k=o.length,E=[],S=[];k>$;){if(-1==(v=o.indexOf(e,$))||-1==(b=o.indexOf(t,v+s))){$!==k&&E.push(p(o.substring($)));break}$!==v&&E.push(p(o.substring($,v))),w=o.substring(v+s,b),x.push(w),C.push(n(w,g)),$=b+l,S.push(E.length),E.push("")}if(d&&E.length>1)throw ri("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||x.length){var O=function(e){for(var t=0,n=x.length;n>t;t++){if(h&&m(e[t]))return;E[S[t]]=e[t]}return E.join("")},T=function(e){return d?i.getTrusted(d,e):i.valueOf(e)},A=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=z(e)}return e};return f(function(e){var t=0,n=x.length,i=new Array(n);try{for(;n>t;t++)i[t]=C[t](e);return O(i)}catch(a){var s=ri("interr","Can't interpolate: {0}\n{1}",o,a.toString());r(s)}},{exp:o,expressions:x,$$watchDelegate:function(e,t,n){var r;return e.$watchGroup(C,function(n,i){var o=O(n);_(t)&&t.call(this,o,n!==i?r:o,e),r=o},n)}})}}var s=e.length,l=t.length,u=new RegExp(e.replace(/./g,o),"g"),c=new RegExp(t.replace(/./g,o),"g");return a.startSymbol=function(){return e},a.endSymbol=function(){return t},a}]}function gt(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){function i(i,a,s,l){var u=t.setInterval,c=t.clearInterval,f=0,d=y(l)&&!l,h=(d?r:n).defer(),p=h.promise;return s=y(s)?s:0,p.then(null,null,i),p.$$intervalId=u(function(){h.notify(f++),s>0&&f>=s&&(h.resolve(f),c(p.$$intervalId),delete o[p.$$intervalId]),d||e.$apply()},a),o[p.$$intervalId]=h,p}var o={};return i.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},i}]}function vt(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(e){return 1===e?"one":"other"}}}}function mt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=Y(t[n]);return t.join("/")}function yt(e,t){var n=rn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=d(n.port)||oi[n.protocol]||null}function bt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=rn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=G(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function wt(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function $t(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function xt(e){return e.replace(/(#.+)|#$/,"$1")}function _t(e){return e.substr(0,$t(e).lastIndexOf("/")+1)}function Ct(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function kt(e,t){this.$$html5=!0,t=t||"";var r=_t(e);yt(e,this),this.$$parse=function(e){var t=wt(r,e);if(!w(t))throw ai("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,r);bt(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=K(this.$$search),t=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=mt(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=wt(e,i))!==n?(s=a,l=(a=wt(t,a))!==n?r+(wt("/",a)||a):e+s):(a=wt(r,i))!==n?l=r+a:r==i+"/"&&(l=r),l&&this.$$parse(l),!!l}}function Et(e,t){var n=_t(e);yt(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=wt(e,r)||wt(n,r);"#"===a.charAt(0)?(o=wt(t,a),m(o)&&(o=a)):o=this.$$html5?a:"",bt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var n=K(this.$$search),r=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=mt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return $t(e)==$t(t)?(this.$$parse(t),!0):!1}}function St(e,t){this.$$html5=!0,Et.apply(this,arguments);var n=_t(e);this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==$t(r)?o=r:(a=wt(n,r))?o=e+t+a:n===r+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=K(this.$$search),r=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=mt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+t+this.$$url}}function Ot(e){return function(){return this[e]}}function Tt(e,t){return function(n){return m(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function At(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return y(t)?(e=t,this):e},this.html5Mode=function(e){return A(e)?(t.enabled=e,this):b(e)?(A(e.enabled)&&(t.enabled=e.enabled),A(e.requireBase)&&(t.requireBase=e.requireBase),A(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=u.url(),o=u.$$state;try{r.url(e,t,n),u.$$state=r.state()}catch(a){throw u.url(i),u.$$state=o,a}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,f,d=r.baseHref(),h=r.url();if(t.enabled){if(!d&&t.requireBase)throw ai("nobase","$location in HTML5 mode requires a tag to be present!");f=Ct(h)+(d||"/"),c=i.history?kt:St}else f=$t(h),c=Et;u=new c(f,"#"+e),u.$$parseLinkUrl(h,h),u.$$state=r.state();var p=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=tr(e.target);"a"!==L(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),l=i.attr("href")||i.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=rn(s.animVal).href),p.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),xt(u.absUrl())!=xt(h)&&r.url(u.absUrl(),!0);var g=!0;return r.onUrlChange(function(e,t){n.$evalAsync(function(){var r,i=u.absUrl(),o=u.$$state;u.$$parse(e),u.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,u.absUrl()===e&&(r?(u.$$parse(i),u.$$state=o,s(i,!1,o)):(g=!1,l(i,o)))}),n.$$phase||n.$digest()}),n.$watch(function(){var e=xt(r.url()),t=xt(u.absUrl()),o=r.state(),a=u.$$replace,c=e!==t||u.$$html5&&i.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync(function(){var t=u.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(r?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))})),u.$$replace=!1}),u}]}function Mt(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||p,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function Rt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw li("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Dt(e,t){if(e){if(e.constructor===e)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw li("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw li("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw li("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Lt(e,t){if(e){if(e.constructor===e)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===ui||e===ci||e===fi)throw li("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Pt(e){return e.constant}function Nt(e,t,n,r,i){Dt(e,i),Dt(t,i);for(var o,a=n.split("."),s=0;a.length>1;s++){o=Rt(a.shift(),i);var l=0===s&&t&&t[o]||e[o];l||(l={},e[o]=l),e=Dt(l,i)}return o=Rt(a.shift(),i),Dt(e[o],i),e[o]=r,r}function Ft(e){return"constructor"==e}function jt(e,t,r,i,o,a,s){Rt(e,a),Rt(t,a),Rt(r,a),Rt(i,a),Rt(o,a);var l=function(e){return Dt(e,a)},u=s||Ft(e)?l:g,c=s||Ft(t)?l:g,f=s||Ft(r)?l:g,d=s||Ft(i)?l:g,h=s||Ft(o)?l:g;return function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=u(l[e]),t?null==l?n:(l=c(l[t]),r?null==l?n:(l=f(l[r]),i?null==l?n:(l=d(l[i]),o?null==l?n:l=h(l[o]):l):l):l):l)}}function It(e,t){return function(n,r){return e(n,r,Dt,t)}}function Vt(e,t,r){var i=t.expensiveChecks,a=i?yi:mi,s=a[e];if(s)return s;var l=e.split("."),u=l.length;if(t.csp)s=6>u?jt(l[0],l[1],l[2],l[3],l[4],r,i):function(e,t){var o,a=0;do o=jt(l[a++],l[a++],l[a++],l[a++],l[a++],r,i)(e,t),t=n,e=o;while(u>a);return o};else{var c="";i&&(c+="s = eso(s, fe);\nl = eso(l, fe);\n");var f=i;o(l,function(e,t){Rt(e,r);var n=(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e;(i||Ft(e))&&(n="eso("+n+", fe)",f=!0),c+="if(s == null) return undefined;\ns="+n+";\n"}),c+="return s;";var d=new Function("s","l","eso","fe",c);d.toString=v(c),f&&(d=It(d,r)),s=d}return s.sharedGetter=!0,s.assign=function(t,n,r){return Nt(t,r,e,n,e)},a[e]=s,s}function Wt(e){return _(e.valueOf)?e.valueOf():bi.call(e)}function Ht(){var e=ue(),t=ue();this.$get=["$filter","$sniffer",function(n,r){function i(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function a(e,t){for(var n=0,r=e.length;r>n;n++){var i=e[n];i.constant||(i.inputs?a(i.inputs,t):-1===t.indexOf(i)&&t.push(i))}return t}function s(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=Wt(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function l(e,t,n,r){var i,o=r.$$inputs||(r.$$inputs=a(r.inputs,[]));if(1===o.length){var l=s;return o=o[0],e.$watch(function(e){var t=o(e);return s(t,l)||(i=r(e),l=t&&Wt(t)),i},t,n)}for(var u=[],c=0,f=o.length;f>c;c++)u[c]=s;return e.$watch(function(e){for(var t=!1,n=0,a=o.length;a>n;n++){var l=o[n](e);(t||(t=!s(l,u[n])))&&(u[n]=l&&Wt(l))}return t&&(i=r(e)),i},t,n)}function u(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,_(t)&&t.apply(this,arguments),y(e)&&r.$$postDigest(function(){y(o)&&i()})},n)}function c(e,t,n,r){function i(e){var t=!0;return o(e,function(e){y(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return r(e)},function(e,n,r){s=e,_(t)&&t.call(this,e,n,r),i(e)&&r.$$postDigest(function(){i(s)&&a()})},n)}function f(e,t,n,r){var i;return i=e.$watch(function(e){return r(e)},function(e,n,r){_(t)&&t.apply(this,arguments),i()},n)}function d(e,t){if(!t)return e;var n=e.$$watchDelegate,r=n!==c&&n!==u,i=r?function(n,r){var i=e(n,r);return t(i,n,r)}:function(n,r){var i=e(n,r),o=t(i,n,r);return y(i)?o:i};return e.$$watchDelegate&&e.$$watchDelegate!==l?i.$$watchDelegate=e.$$watchDelegate:t.$stateful||(i.$$watchDelegate=l,i.inputs=[e]),i}var h={csp:r.csp,expensiveChecks:!1},g={csp:r.csp,expensiveChecks:!0};return function(r,o,a){var s,v,m;switch(typeof r){case"string":m=r=r.trim();var y=a?t:e;if(s=y[m],!s){":"===r.charAt(0)&&":"===r.charAt(1)&&(v=!0,r=r.substring(2));var b=a?g:h,w=new gi(b),$=new vi(w,n,b);s=$.parse(r),s.constant?s.$$watchDelegate=f:v?(s=i(s),s.$$watchDelegate=s.literal?c:u):s.inputs&&(s.$$watchDelegate=l),y[m]=s}return d(s,o);case"function":return d(r,o);default:return d(p,o)}}}]}function zt(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Bt(function(t){e.$evalAsync(t)},t)}]}function Ut(){this.$get=["$browser","$exceptionHandler",function(e,t){return Bt(function(t){e.defer(t)},t)}]}function Bt(e,t){function i(e,t,n){function r(t){return function(n){i||(i=!0,t.call(e,n))}}var i=!1;return[r(t),r(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var r,i,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][e.status];try{_(r)?i.resolve(r(e.value)):1===e.status?i.resolve(e.value):i.reject(e.value)}catch(l){i.reject(l),t(l)}}}function u(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function c(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function f(e){var t=new c,n=0,r=dr(e)?[]:{};return o(e,function(e,i){n++,m(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}var d=r("$q",TypeError),h=function(){return new c};a.prototype={then:function(e,t,n){var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&u(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}},c.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(b(e)||_(e))&&(n=e&&e.then),_(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,u(this.promise.$$state))}catch(o){r[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;a>o;o++){i=r[o][0],e=r[o][3];try{i.notify(_(e)?e(n):n)}catch(s){t(s)}}})}};var p=function(e){var t=new c;return t.reject(e),t.promise},g=function(e,t){var n=new c;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{_(n)&&(r=n())}catch(i){return g(i,!1)}return M(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},m=function(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)},y=function w(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!_(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof w))return new w(e);var r=new c;return e(t,n),r.promise};return y.defer=h,y.reject=p,y.when=m,y.all=f,y}function qt(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function Gt(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=u(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,n=r("$rootScope"),a=null,s=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,l,c,f){function d(e){e.currentScope.$$destroyed=!0}function h(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function g(e){if(C.$$phase)throw n("inprog","{0} already in progress",C.$$phase);C.$$phase=e}function v(){C.$$phase=null}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function w(){}function $(){for(;S.length;)try{S.shift()()}catch(e){l(e)}s=null}function x(){null===s&&(s=f.defer(function(){C.$apply($)}))}h.prototype={constructor:h,$new:function(t,n){var r;return n=n||this,t?(r=new h,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",d),r},$watch:function(e,t,n){var r=c(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,n,r);var i=this,o=i.$$watchers,s={fn:t,last:w,get:r,exp:e,eq:!!n};return a=null,_(t)||(s.fn=p),o||(o=i.$$watchers=[]),o.unshift(s),function(){P(o,s),a=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(i,i,s)):t(i,r,s)}var r=new Array(e.length),i=new Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(i,i,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){i[0]=e,r[0]=n,t(i,e===n?i:r,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){i[t]=e,r[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,r,s,l;if(!m(o)){if(b(o))if(i(o)){a!==h&&(a=h,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var u=0;t>u;u++)l=a[u],s=o[u],r=l!==l&&s!==s,r||l===s||(f++,a[u]=s)}else{a!==p&&(a=p={},v=0,f++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,s=o[n],l=a[n],n in a?(r=l!==l&&s!==s,r||l===s||(f++,a[n]=s)):(v++,a[n]=s,f++));if(v>t){f++;for(n in a)o.hasOwnProperty(n)||(v--,delete a[n])}}else a!==o&&(a=o,f++);return f}}function r(){if(g?(g=!1,t(o,o,l)):t(o,s,l),u)if(b(o))if(i(o)){s=new Array(o.length);for(var e=0;e1,f=0,d=c(e,n),h=[],p={},g=!0,v=0;return this.$watch(d,r)},$digest:function(){var e,r,i,o,u,c,d,h,p,m,y=t,b=this,x=[];g("$digest"),f.$$checkUrlChange(),this===C&&null!==s&&(f.defer.cancel(s), +$()),a=null;do{for(c=!1,h=b;k.length;){try{m=k.shift(),m.scope.$eval(m.expression,m.locals)}catch(S){l(S)}a=null}e:do{if(o=h.$$watchers)for(u=o.length;u--;)try{if(e=o[u])if((r=e.get(h))===(i=e.last)||(e.eq?j(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(e===a){c=!1;break e}}else c=!0,a=e,e.last=e.eq?N(r,null):r,e.fn(r,i===w?r:i,h),5>y&&(p=4-y,x[p]||(x[p]=[]),x[p].push({msg:_(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:r,oldVal:i}))}catch(S){l(S)}if(!(d=h.$$childHead||h!==b&&h.$$nextSibling))for(;h!==b&&!(d=h.$$nextSibling);)h=h.$parent}while(h=d);if((c||k.length)&&!y--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,x)}while(c||k.length);for(v();E.length;)try{E.shift()()}catch(S){l(S)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==C){for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){C.$$phase||k.length||f.defer(function(){k.length&&C.$digest()}),k.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){E.push(e)},$apply:function(e){try{return g("$apply"),this.$eval(e)}catch(t){l(t)}finally{v();try{C.$digest()}catch(t){throw l(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&S.push(t),x()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);-1!==r&&(n[r]=null,y(i,1,e))}},$emit:function(e,t){var n,r,i,o=[],a=this,s=!1,u={name:e,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},c=I([u],arguments,1);do{for(n=a.$$listeners[e]||o,u.currentScope=a,r=0,i=n.length;i>r;r++)if(n[r])try{n[r].apply(null,c)}catch(f){l(f)}else n.splice(r,1),r--,i--;if(s)return u.currentScope=null,u;a=a.$parent}while(a);return u.currentScope=null,u},$broadcast:function(e,t){var n=this,r=n,i=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,s,u,c=I([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[e]||[],s=0,u=a.length;u>s;s++)if(a[s])try{a[s].apply(null,c)}catch(f){l(f)}else a.splice(s,1),s--,u--;if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var C=new h,k=C.$$asyncQueue=[],E=C.$$postDigestQueue=[],S=C.$$applyAsyncQueue=[];return C}]}function Kt(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return y(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=rn(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function Yt(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw wi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=pr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(C(e))return new RegExp("^"+e.source+"$");throw wi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Qt(e){var t=[];return y(e)&&o(e,function(e){t.push(Yt(e))}),t}function Xt(){this.SCE_CONTEXTS=$i;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Qt(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Qt(e)),t},this.$get=["$injector",function(r){function i(e,t){return"self"===e?on(t):!!e.exec(t.href)}function o(n){var r,o,a=rn(n.toString()),s=!1;for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var r=d.hasOwnProperty(e)?d[e]:null;if(!r)throw wi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw wi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)}function l(e){return e instanceof f?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||t===n||""===t)return t;var r=d.hasOwnProperty(e)?d[e]:null;if(r&&t instanceof r)return t.$$unwrapTrustedValue();if(e===$i.RESOURCE_URL){if(o(t))return t;throw wi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===$i.HTML)return c(t);throw wi("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(e){throw wi("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(c=r.get("$sanitize"));var f=a(),d={};return d[$i.HTML]=a(f),d[$i.CSS]=a(f),d[$i.URL]=a(f),d[$i.JS]=a(f),d[$i.RESOURCE_URL]=a(d[$i.URL]),{trustAs:s,getTrusted:u,valueOf:l}}]}function Jt(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>er)throw wi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=F($i);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=g),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:t(n,function(t){return r.getTrusted(e,t)})};var i=r.parseAs,a=r.getTrusted,s=r.trustAs;return o($i,function(e,t){var n=Yn(t);r[ge("parse_as_"+n)]=function(t){return i(e,t)},r[ge("get_trusted_"+n)]=function(t){return a(e,t)},r[ge("trust_as_"+n)]=function(t){return s(e,t)}}),r}]}function Zt(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=d((/android (\d+)/.exec(Yn((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,f=!1;if(u){for(var h in u)if(r=l.exec(h)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!o||c&&f||(c=w(s.body.style.webkitTransition),f=w(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hasEvent:function(e){if("input"===e&&11>=er)return!1;if(m(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:gr(),vendorPrefix:n,transitions:c,animations:f,android:o}}]}function en(){this.$get=["$templateCache","$http","$q",function(e,t,n){function r(i,o){function a(e){if(!o)throw Yr("tpload","Failed to load template: {0}",i);return n.reject(e)}r.totalPendingRequests++;var s=t.defaults&&t.defaults.transformResponse;dr(s)?s=s.filter(function(e){return e!==it}):s===it&&(s=null);var l={cache:e,transformResponse:s};return t.get(i,l)["finally"](function(){r.totalPendingRequests--}).then(function(e){return e.data},a)}return r.totalPendingRequests=0,r}]}function tn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),i=[];return o(r,function(e){var r=ur.element(e).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+pr(t)+"(\\s|\\||$)");o.test(r)&&i.push(e)}else-1!=r.indexOf(t)&&i.push(e)})}),i},r.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;ie;e=Math.abs(e);var a=e+"",s="",l=[],u=!1;if(-1!==a.indexOf("e")){var c=a.match(/([\d\.]+)e(-?)(\d+)/);c&&"-"==c[2]&&c[3]>i+1?e=0:(s=a,u=!0)}if(u)i>0&&1>e&&(s=e.toFixed(i),e=parseFloat(s));else{var f=(a.split(Ci)[1]||"").length;m(i)&&(i=Math.min(Math.max(t.minFrac,f),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+-i);var d=(""+e).split(Ci),h=d[0];d=d[1]||"";var p,g=0,v=t.lgSize,y=t.gSize;if(h.length>=v+y)for(g=h.length-v,p=0;g>p;p++)(g-p)%y===0&&0!==p&&(s+=n),s+=h.charAt(p);for(p=g;pe&&(r="-",e=-e),e=""+e;e.length0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),pn(o,t,r)}}function vn(e,t){return function(n,r){var i=n["get"+e](),o=Xn(t?"SHORT"+e:e);return r[o][i]}}function mn(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=pn(Math[t>0?"floor":"ceil"](t/60),2)+pn(Math.abs(t%60),2)}function yn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function bn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function wn(e){return function(t){var n=yn(t.getFullYear()),r=bn(t),i=+r-+n,o=1+Math.round(i/6048e5);return pn(o,e)}}function $n(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function xn(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function _n(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function Cn(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=d(t[9]+t[10]),o=d(t[9]+t[11])),a.call(r,d(t[1]),d(t[2])-1,d(t[3]));var l=d(t[4]||0)-i,u=d(t[5]||0)-o,c=d(t[6]||0),f=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,l,u,c,f),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,l="",u=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,w(n)&&(n=Si.test(n)?d(n):t(n)),$(n)&&(n=new Date(n)),!x(n))return n;for(;r;)s=Ei.exec(r),s?(u=I(u,s,1),r=u.pop()):(u.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(u,function(t){a=ki[t],l+=a?a(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function kn(){return function(e,t){return m(t)&&(t=2),z(e,t)}}function En(){return function(e,t){return $(e)&&(e=e.toString()),dr(e)||w(e)?(t=Math.abs(Number(t))===1/0?Number(t):d(t),t?t>0?e.slice(0,t):e.slice(t):w(e)?"":[]):e}}function Sn(e){return function(t,n,r){function o(e,t){for(var r=0;re?-1:1):r>n?-1:1}return i(t)?(n=dr(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,r=t||g;if(w(t)){if(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(u,n);if(r=e(t),r.constant){var i=r();return a(function(e,t){return u(e[i],t[i])},n)}}return a(function(e,t){return u(r(e),r(t))},n)}),ir.call(t).sort(a(o,r))):t}}function On(e){return _(e)&&(e={link:e}),e.restrict=e.restrict||"AC",v(e)}function Tn(e,t){e.$name=t}function An(e,t,r,i,a){var s=this,l=[],u=s.$$parentForm=e.parent().controller("form")||Ri;s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,u.$addControl(s),s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){ae(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e)},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),o(s.$$success,function(t,n){s.$setValidity(n,null,e)}),P(l,e)},Bn({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(P(r,n),0===r.length&&delete e[t])},parentForm:u,$animate:i}),s.$setDirty=function(){i.removeClass(e,go),i.addClass(e,vo),s.$dirty=!0,s.$pristine=!1,u.$setDirty()},s.$setPristine=function(){i.setClass(e,go,vo+" "+Di),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){i.addClass(e,Di),s.$submitted=!0,u.$setSubmitted()}}function Mn(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function Rn(e,t,n,r,i,o){Dn(e,t,n,r,i,o),Mn(r)}function Dn(e,t,n,r,i,o){var a=Yn(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(e){s=!0}),t.on("compositionend",function(){s=!1,l()})}var l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=hr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var u,c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),r.$render=function(){t.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function Ln(e,t){if(x(e))return e;if(w(e)){zi.lastIndex=0;var n=zi.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,l=0,u=yn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,u.getDate()+c,o,a,s,l)}}return NaN}function Pn(e,t){return function(n,r){var i,a;if(x(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Fi.test(n))return new Date(n);if(e.lastIndex=0,i=e.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(e,n){n=v},s.$observe("min",function(e){v=h(e),l.$validate()})}if(y(s.max)||s.ngMax){var b;l.$validators.max=function(e){return!d(e)||m(b)||r(e)<=b},s.$observe("max",function(e){b=h(e),l.$validate()})}}}function Fn(e,t,r,i){var o=t[0],a=i.$$hasNativeValidators=b(o.validity);a&&i.$parsers.push(function(e){var r=t.prop(Kn)||{};return r.badInput&&!r.typeMismatch?n:e})}function jn(e,t,r,i,o,a){if(Fn(e,t,r,i),Dn(e,t,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:Vi.test(e)?parseFloat(e):n}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!$(e))throw wo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),y(r.min)||r.ngMin){var s;i.$validators.min=function(e){return i.$isEmpty(e)||m(s)||e>=s},r.$observe("min",function(e){y(e)&&!$(e)&&(e=parseFloat(e,10)),s=$(e)&&!isNaN(e)?e:n,i.$validate()})}if(y(r.max)||r.ngMax){var l;i.$validators.max=function(e){return i.$isEmpty(e)||m(l)||l>=e},r.$observe("max",function(e){y(e)&&!$(e)&&(e=parseFloat(e,10)),l=$(e)&&!isNaN(e)?e:n,i.$validate()})}}function In(e,t,n,r,i,o){Dn(e,t,n,r,i,o),Mn(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||ji.test(n)}}function Vn(e,t,n,r,i,o){Dn(e,t,n,r,i,o),Mn(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ii.test(n)}}function Wn(e,t,n,r){m(n.name)&&t.attr("name",u());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function Hn(e,t,n,i,o){var a;if(y(i)){if(a=e(i),!a.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return a(t)}return o}function zn(e,t,n,r,i,o,a,s){var l=Hn(s,e,"ngTrueValue",n.ngTrueValue,!0),u=Hn(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return j(e,l)}),r.$parsers.push(function(e){return e?l:u})}function Un(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function d(e,t){var i=r(t,e),o=r(e,t);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function h(e){if(t===!0||a.$index%2===t){var n=i(e||[]);if(p){if(!j(e,p)){var r=i(p);d(r,n)}}else u(n)}p=F(e)}var p;a.$watch(l[e],h,!0),l.$observe("class",function(t){h(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(l[e]));o===t?u(s):c(s)}})}}}]}function Bn(e){function t(e,t,l){t===n?r("$pending",e,l):i("$pending",e,l),A(t)?t?(f(s.$error,e,l),c(s.$$success,e,l)):(c(s.$error,e,l),f(s.$$success,e,l)):(f(s.$error,e,l),f(s.$$success,e,l)),s.$pending?(o(bo,!0),s.$valid=s.$invalid=n,a("",null)):(o(bo,!1),s.$valid=qn(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var u;u=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,u),d.$setValidity(e,u,s)}function r(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function i(e,t,r){s[e]&&f(s[e],t,r),qn(s[e])&&(s[e]=n)}function o(e,t){t&&!u[e]?(h.addClass(l,e),u[e]=!0):!t&&u[e]&&(h.removeClass(l,e),u[e]=!1)}function a(e,t){e=e?"-"+ne(e,"-"):"",o(ho+e,t===!0),o(po+e,t===!1)}var s=e.ctrl,l=e.$element,u={},c=e.set,f=e.unset,d=e.parentForm,h=e.$animate;u[po]=!(u[ho]=l.hasClass(ho)),s.$setValidity=t}function qn(e){if(e)for(var t in e)return!1;return!0}var Gn=/^\/(.+)\/([a-z]*)$/,Kn="validity",Yn=function(e){return w(e)?e.toLowerCase():e},Qn=Object.prototype.hasOwnProperty,Xn=function(e){return w(e)?e.toUpperCase():e},Jn=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Zn=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Yn=Jn,Xn=Zn);var er,tr,nr,rr,ir=[].slice,or=[].splice,ar=[].push,sr=Object.prototype.toString,lr=r("ng"),ur=e.angular||(e.angular={}),cr=0;er=t.documentMode,p.$inject=[],g.$inject=[];var fr,dr=Array.isArray,hr=function(e){return w(e)?e.trim():e},pr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#(?:<\/\1>|)$/,Lr=/<|&#?\w+;/,Pr=/<([\w:]+)/,Nr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fr={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Fr.optgroup=Fr.option,Fr.tbody=Fr.tfoot=Fr.colgroup=Fr.caption=Fr.thead,Fr.th=Fr.td;var jr=we.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),we(e).on("load",r))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return tr(e>=0?this[e]:this[this.length+e])},length:0,push:ar,sort:[].sort,splice:[].splice},Ir={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ir[Yn(e)]=e});var Vr={};o("input,select,option,textarea,button,form,details".split(","),function(e){Vr[e]=!0});var Wr={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Ee,removeData:Ce},function(e,t){we[t]=e}),o({data:Ee,inheritedData:Re,scope:function(e){return tr.data(e,"$scope")||Re(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return tr.data(e,"$isolateScope")||tr.data(e,"$isolateScopeNoTemplate")},controller:Me,injector:function(e){return Re(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Se,css:function(e,t,n){return t=ge(t),y(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,r){var i=Yn(t);if(Ir[i]){if(!y(r))return e[t]||(e.attributes.getNamedItem(t)||p).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(y(r))e.setAttribute(t,r);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){return y(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(m(t)){var n=e.nodeType;return n===br||n===wr?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(m(t)){if(e.multiple&&"select"===L(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return m(t)?e.innerHTML:(xe(e,!0),void(e.innerHTML=t))},empty:De},function(e,t){we.prototype[t]=function(t,r){var i,o,a=this.length;if(e!==De&&(2==e.length&&e!==Se&&e!==Me?t:r)===n){if(b(t)){for(i=0;a>i;i++)if(e===Ee)e(this[i],t);else for(o in t)e(this[i],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,u=0;l>u;u++){var c=e(this[u],t,r);s=s?s+c:c}return s}for(i=0;a>i;i++)e(this[i],t,r);return this}}),o({removeData:Ce,on:function Go(e,t,n,r){if(y(r))throw Rr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(me(e)){var i=ke(e,!0),o=i.events,a=i.handle;a||(a=i.handle=je(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var u=o[t];u||(o[t]=[],"mouseenter"===t||"mouseleave"===t?Go(e,Mr[t],function(e){var n=this,r=e.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(e,t)}):"$destroy"!==t&&Sr(e,t,a),u=o[t]),u.push(n)}}},off:_e,one:function(e,t,n){e=tr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;xe(e),o(new we(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===br&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===br||n===_r){t=new we(t);for(var r=0,i=t.length;i>r;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===br){var n=e.firstChild;o(new we(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=tr(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Le,detach:function(e){Le(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new we(t);for(var i=0,o=t.length;o>i;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Te,removeClass:Oe,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var r=n;m(r)&&(r=!Se(e,t)),(r?Te:Oe)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==_r?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:$e,triggerHandler:function(e,t,n){var r,i,a,s=t.type||t,l=ke(e),u=l&&l.events,c=u&&u[s];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:e},t.type&&(r=f(r,t)),i=F(c),a=n?[r].concat(n):[r],o(i,function(t){r.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){we.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;a>o;o++)m(i)?(i=e(this[o],t,n,r),y(i)&&(i=tr(i))):Ae(i,e(this[o],t,n,r));return y(i)?i:this},we.prototype.bind=we.prototype.on,we.prototype.unbind=we.prototype.off}),We.prototype={put:function(e,t){this[Ve(e,this.nextUid)]=t},get:function(e){return this[Ve(e,this.nextUid)]},remove:function(e){var t=this[e=Ve(e,this.nextUid)];return delete this[e],t}};var Hr=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,zr=/,/,Ur=/^\s*(_?)(\S+?)\1\s*$/,Br=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,qr=r("$injector");Ue.$$annotate=ze;var Gr=r("$animate"),Kr=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&"."!=t.charAt(0))throw Gr("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){function r(t){var r,i=e.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=t(function(){i.resolve()})}),i.promise}function i(e,t){var n=[],r=[],i=ue();return o((e.attr("class")||"").split(/\s+/),function(e){i[e]=!0}),o(t,function(e,t){var o=i[t];e===!1&&o?r.push(t):e!==!0||o||n.push(t)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function a(e,t,n){for(var r=0,i=t.length;i>r;++r){var o=t[r];e[o]=n}}function s(){return u||(u=e.defer(),t(function(){u.resolve(),u=null})),u.promise}function l(e,t){if(ur.isObject(t)){var n=f(t.from||{},t.to||{});e.css(n)}}var u;return{animate:function(e,t,n){return l(e,{from:t,to:n}),s()},enter:function(e,t,n,r){return l(e,r),n?n.after(e):t.prepend(e),s()},leave:function(e,t){return l(e,t),e.remove(),s()},move:function(e,t,n,r){return this.enter(e,t,n,r)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=tr(e),t=w(t)?t:dr(t)?t.join(" "):"",o(e,function(e){Te(e,t)}),l(e,n),s()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=tr(e),t=w(t)?t:dr(t)?t.join(" "):"",o(e,function(e){Oe(e,t)}),l(e,n),s()},setClass:function(e,t,n,o){var s=this,l="$$animateClasses",u=!1;e=tr(e);var c=e.data(l);c?o&&c.options&&(c.options=ur.extend(c.options||{},o)):(c={classes:{},options:o},u=!0);var f=c.classes;return t=dr(t)?t:t.split(" "),n=dr(n)?n:n.split(" "),a(f,t,!0),a(f,n,!1),u&&(c.promise=r(function(t){var n=e.data(l);if(e.removeData(l),n){var r=i(e,n.classes);r&&s.$$setClassImmediately(e,r[0],r[1],n.options)}t()}),e.data(l,c)),c.promise},$$setClassImmediately:function(e,t,n,r){ +return t&&this.$$addClassImmediately(e,t),n&&this.$$removeClassImmediately(e,n),l(e,r),s()},enabled:p,cancel:p}}]}],Yr=r("$compile");Xe.$inject=["$provide","$$sanitizeUriProvider"];var Qr=/^((?:x|data)[\:\-_])/i,Xr=r("$controller"),Jr="application/json",Zr={"Content-Type":Jr+";charset=utf-8"},ei=/^\[|^\{(?!\{)/,ti={"[":/]$/,"{":/}$/},ni=/^\)\]\}',?\n/,ri=r("$interpolate"),ii=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,oi={http:80,https:443,ftp:21},ai=r("$location"),si={$$html5:!1,$$replace:!1,absUrl:Ot("$$absUrl"),url:function(e){if(m(e))return this.$$url;var t=ii.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Ot("$$protocol"),host:Ot("$$host"),port:Ot("$$port"),path:Tt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e)||$(e))e=e.toString(),this.$$search=G(e);else{if(!b(e))throw ai("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=N(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:m(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Tt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([St,Et,kt],function(e){e.prototype=Object.create(si),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==kt||!this.$$html5)throw ai("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=m(t)?null:t,this}});var li=r("$parse"),ui=Function.prototype.call,ci=Function.prototype.apply,fi=Function.prototype.bind,di=ue();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,di[t]=e}),di["this"]=function(e){return e},di["this"].sharedGetter=!0;var hi=f(ue(),{"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),y(r)?y(i)?r+i:r:y(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(y(n)?n:0)-(y(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),pi={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},gi=function(e){this.options=e};gi.prototype={constructor:gi,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index="0"&&"9">=e&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||" "===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw li("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.indexe){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return i?(this.tokens.shift(),i):!1},consume:function(e){if(0===this.tokens.length)throw li("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},unaryFn:function(e,t){var n=hi[e];return f(function(e,r){return n(e,r,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,r){var i=hi[t];return f(function(t,r){return i(t,r,e,n)},{constant:e.constant&&n.constant,inputs:!r&&[e,n]})},identifier:function(){for(var e=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)e+=this.consume().text+this.consume().text;return Vt(e,this.options,this.text)},constant:function(){var e=this.consume().value;return f(function(){return e},{constant:!0,literal:!0})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var r,i=0,o=e.length;o>i;i++)r=e[i](t,n);return r}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},filter:function(e){var t,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(t=[],r=[];this.expect(":");)t.push(this.expression());var o=[e].concat(t||[]);return f(function(o,a){var s=e(o,a);if(r){r[0]=s;for(var l=t.length;l--;)r[l+1]=t[l](o,a);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&o.every(Pt),inputs:!i.$stateful&&o})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),f(function(t,r){return n.assign(t,e(t,r),r)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if((t=this.expect("?"))&&(e=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(t,i){return n(t,i)?e(t,i):r(t,i)},{constant:n.constant&&e.constant&&r.constant})}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.text,this.logicalAND(),!0);return t},logicalAND:function(){for(var e,t=this.equality();e=this.expect("&&");)t=this.binaryFn(t,e.text,this.equality(),!0);return t},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t=this.binaryFn(t,e.text,this.relational());return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t=this.binaryFn(t,e.text,this.additive());return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.text,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.text,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(vi.ZERO,e.text,this.unary()):(e=this.expect("!"))?this.unaryFn(e.text,this.unary()):this.primary()},fieldAccess:function(e){var t=this.identifier();return f(function(r,i,o){var a=o||e(r,i);return null==a?n:t(a)},{assign:function(n,r,i){var o=e(n,i);return o||e.assign(n,o={},i),t.assign(o,r)}})},objectIndex:function(e){var t=this.text,r=this.expression();return this.consume("]"),f(function(i,o){var a,s=e(i,o),l=r(i,o);return Rt(l,t),s?a=Dt(s[l],t):n},{assign:function(n,i,o){var a=Rt(r(n,o),t),s=Dt(e(n,o),t);return s||e.assign(n,s={},o),s[a]=i}})},functionCall:function(e,t){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,o=r.length?[]:null;return function(a,s){var l=t?t(a,s):y(t)?n:a,u=e(a,s,l)||p;if(o)for(var c=r.length;c--;)o[c]=Dt(r[c](a,s),i);Dt(l,i),Lt(u,i);var f=u.apply?u.apply(l,o):u(o[0],o[1],o[2],o[3],o[4]);return o&&(o.length=0),Dt(f,i)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(t,n){for(var r=[],i=0,o=e.length;o>i;i++)r.push(e[i](t,n));return r},{literal:!0,constant:e.every(Pt),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?e.push(n.value):n.identifier?e.push(n.text):this.throwError("invalid key",n),this.consume(":"),t.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},o=0,a=t.length;a>o;o++)i[e[o]]=t[o](n,r);return i},{literal:!0,constant:t.every(Pt),inputs:t})}};var mi=ue(),yi=ue(),bi=Object.prototype.valueOf,wi=r("$sce"),$i={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Yr=r("$compile"),xi=t.createElement("a"),_i=rn(e.location.href);sn.$inject=["$provide"],fn.$inject=["$locale"],dn.$inject=["$locale"];var Ci=".",ki={yyyy:gn("FullYear",4),yy:gn("FullYear",2,0,!0),y:gn("FullYear",1),MMMM:vn("Month"),MMM:vn("Month",!0),MM:gn("Month",2,1),M:gn("Month",1,1),dd:gn("Date",2),d:gn("Date",1),HH:gn("Hours",2),H:gn("Hours",1),hh:gn("Hours",2,-12),h:gn("Hours",1,-12),mm:gn("Minutes",2),m:gn("Minutes",1),ss:gn("Seconds",2),s:gn("Seconds",1),sss:gn("Milliseconds",3),EEEE:vn("Day"),EEE:vn("Day",!0),a:$n,Z:mn,ww:wn(2),w:wn(1),G:xn,GG:xn,GGG:xn,GGGG:_n},Ei=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Si=/^\-?\d+$/;Cn.$inject=["$locale"];var Oi=v(Yn),Ti=v(Xn);Sn.$inject=["$parse"];var Ai=v({restrict:"E",compile:function(e,t){return t.href||t.xlinkHref||t.name?void 0:function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===sr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Mi={};o(Ir,function(e,t){if("multiple"!=e){var n=Je("ng-"+t);Mi[n]=function(){return{restrict:"A",priority:100,link:function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),o(Wr,function(e,t){Mi[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Gn);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=Je("ng-"+e);Mi[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===sr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(er&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Ri={$addControl:p,$$renameControl:Tn,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Di="ng-submitted";An.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Li=function(e){return["$timeout",function(t){var r={name:"form",restrict:e?"EAC":"E",controller:An,compile:function(r,i){r.addClass(go).addClass(ho);var o=i.name?"name":e&&i.ngForm?"ngForm":!1;return{pre:function(e,r,i,a){if(!("action"in i)){var s=function(t){e.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),t.preventDefault()};Sr(r[0],"submit",s),r.on("$destroy",function(){t(function(){Or(r[0],"submit",s)},0,!1)})}var l=a.$$parentForm;o&&(Nt(e,null,a.$name,a,a.$name),i.$observe(o,function(t){a.$name!==t&&(Nt(e,null,a.$name,n,a.$name),l.$$renameControl(a,t),Nt(e,null,a.$name,a,a.$name))})),r.on("$destroy",function(){l.$removeControl(a),o&&Nt(e,null,i[o],n,a.$name),f(a,Ri)})}}}};return r}]},Pi=Li(),Ni=Li(!0),Fi=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,ji=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ii=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Vi=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Wi=/^(\d{4})-(\d{2})-(\d{2})$/,Hi=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,zi=/^(\d{4})-W(\d\d)$/,Ui=/^(\d{4})-(\d\d)$/,Bi=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,qi={text:Rn,date:Nn("date",Wi,Pn(Wi,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Nn("datetimelocal",Hi,Pn(Hi,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Nn("time",Bi,Pn(Bi,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Nn("week",zi,Ln,"yyyy-Www"),month:Nn("month",Ui,Pn(Ui,["yyyy","MM"]),"yyyy-MM"),number:jn,url:In,email:Vn,radio:Wn,checkbox:zn,hidden:p,button:p,submit:p,reset:p,file:p},Gi=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(qi[Yn(a.type)]||qi.text)(i,o,a,s[0],t,e,n,r)}}}}],Ki=/^(true|false|\d+)$/,Yi=function(){return{restrict:"A",priority:100,compile:function(e,t){return Ki.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Qi=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,r,i){e.$$addBindingInfo(r,i.ngBind),r=r[0],t.$watch(i.ngBind,function(e){r.textContent=e===n?"":e})}}}}],Xi=["$interpolate","$compile",function(e,t){return{compile:function(r){return t.$$addBindingClass(r),function(r,i,o){var a=e(i.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(i,a.expressions),i=i[0],o.$observe("ngBindTemplate",function(e){i.textContent=e===n?"":e})}}}}],Ji=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){r.html(e.getTrustedHtml(o(t))||"")})}}}}],Zi=v({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),eo=Un("",!0),to=Un("Odd",0),no=Un("Even",1),ro=On({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),io=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],oo={},ao={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Je("ng-"+e);oo[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};ao[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var so=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,l,u;n.$watch(i.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=le(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],lo=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ur.noop,compile:function(i,o){var a=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(i,o,u,c,f){var d,h,p,g=0,v=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),p&&(n.leave(p).then(function(){h=null}),h=p,p=null)};i.$watch(r.parseAsResourceUrl(a),function(r){var a=function(){!y(l)||l&&!i.$eval(l)||t()},u=++g;r?(e(r,!0).then(function(e){if(u===g){var t=i.$new();c.template=e;var l=f(t,function(e){v(),n.enter(e,null,o).then(a)});d=t,p=l,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){u===g&&(v(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(v(),c.template=null)})}}}}],uo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void e(ye(o.template,t).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void e(r.contents())(n))}}}],co=On({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),fo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,i){var a=t.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,l=s?hr(a):a,u=function(e){if(!m(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?hr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){return dr(e)?e.join(a):n}),i.$isEmpty=function(e){return!e||!e.length}}}},ho="ng-valid",po="ng-invalid",go="ng-pristine",vo="ng-dirty",mo="ng-untouched",yo="ng-touched",bo="ng-pending",wo=new r("ngModel"),$o=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,i,a,s,l,u,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(e);var d,h=a(r.ngModel),g=h.assign,v=h,b=g,w=null,x=this;this.$$setOptions=function(e){if(x.$options=e,e&&e.getterSetter){var t=a(r.ngModel+"()"),n=a(r.ngModel+"($$$p)");v=function(e){var n=h(e);return _(n)&&(n=t(e)),n},b=function(e,t){_(h(e))?n(e,{$$$p:x.$modelValue}):g(e,x.$modelValue)}}else if(!h.assign)throw wo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,B(i))},this.$render=p,this.$isEmpty=function(e){return m(e)||""===e||null===e||e!==e};var C=i.inheritedData("$formController")||Ri,k=0;Bn({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:C,$animate:s}),this.$setPristine=function(){x.$dirty=!1,x.$pristine=!0,s.removeClass(i,vo),s.addClass(i,go)},this.$setDirty=function(){x.$dirty=!0,x.$pristine=!1,s.removeClass(i,go),s.addClass(i,vo),C.$setDirty()},this.$setUntouched=function(){x.$touched=!1,x.$untouched=!0,s.setClass(i,mo,yo)},this.$setTouched=function(){x.$touched=!0,x.$untouched=!1,s.setClass(i,yo,mo)},this.$rollbackViewValue=function(){l.cancel(w),x.$viewValue=x.$$lastCommittedViewValue,x.$render()},this.$validate=function(){if(!$(x.$modelValue)||!isNaN(x.$modelValue)){var e=x.$$lastCommittedViewValue,t=x.$$rawModelValue,r=x.$valid,i=x.$modelValue,o=x.$options&&x.$options.allowInvalid;x.$$runValidators(t,e,function(e){o||r===e||(x.$modelValue=e?t:n,x.$modelValue!==i&&x.$$writeModelToScope())})}},this.$$runValidators=function(e,t,r){function i(){var e=x.$$parserName||"parse";return d!==n?(d||(o(x.$validators,function(e,t){l(t,null)}),o(x.$asyncValidators,function(e,t){l(t,null)})),l(e,d),d):(l(e,null),!0)}function a(){var n=!0;return o(x.$validators,function(r,i){var o=r(e,t);n=n&&o,l(i,o)}),n?!0:(o(x.$asyncValidators,function(e,t){l(t,null)}),!1)}function s(){var r=[],i=!0;o(x.$asyncValidators,function(o,a){var s=o(e,t);if(!M(s))throw wo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(a,n),r.push(s.then(function(){l(a,!0)},function(e){i=!1,l(a,!1)}))}),r.length?c.all(r).then(function(){u(i)},p):u(!0)}function l(e,t){f===k&&x.$setValidity(e,t)}function u(e){f===k&&r(e)}k++;var f=k;return i()&&a()?void s():void u(!1)},this.$commitViewValue=function(){var e=x.$viewValue;l.cancel(w),(x.$$lastCommittedViewValue!==e||""===e&&x.$$hasNativeValidators)&&(x.$$lastCommittedViewValue=e,x.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){x.$modelValue!==a&&x.$$writeModelToScope()}var r=x.$$lastCommittedViewValue,i=r;if(d=m(i)?n:!0)for(var o=0;od;d++)if(E=r===A?d:A[d],S=r[E],O=T(E,S,d),v[O])M=v[O],delete v[O],P[O]=M,R[d]=M;else{if(P[O])throw o(R,function(e){e&&e.scope&&(v[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",h,O,S);R[d]={id:O,scope:n,clone:n},P[O]=!0}for(var F in v){if(M=v[F],D=le(M.clone),a.leave(D),D[0].parentNode)for(d=0,m=D.length;m>d;d++)D[d][s]=!0;M.scope.$destroy()}for(d=0;x>d;d++)if(E=r===A?d:A[d],S=r[E],M=R[d],M.scope){b=L;do b=b.nextSibling;while(b&&b[s]);c(M)!=b&&a.move(le(M.clone),null,tr(L)),L=f(M),u(M.scope,d,w,S,$,E,x)}else g(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,a.enter(e,null,tr(L)),L=n,M.clone=e,P[M.id]=M,u(M.scope,d,w,S,$,E,x)});v=P})}}}}],Oo="ng-hide",To="ng-hide-animate",Ao=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,Oo,{tempClasses:To})})}}}],Mo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,Oo,{tempClasses:To})})}}}],Ro=On(function(e,t,n){e.$watchCollection(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)})}),Do=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,l=[],u=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)e.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=le(u[r].clone);f[r].$destroy();var h=c[r]=e.leave(s);h.then(d(c,r))}u.length=0,f.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:r};u.push(a),e.enter(r,o.parent(),o)})})})}}}],Lo=On({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Po=On({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),No=On({restrict:"EAC",link:function(e,t,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",B(t));o(function(e){t.empty(),t.append(e)})}}),Fo=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],jo=r("ngOptions"),Io=v({restrict:"A",terminal:!0}),Vo=["$compile","$parse",function(e,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r,i,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,r=t,i=n},o.addOption=function(t,n){ae(t,'"option value"'),a[t]=!0,l.$viewValue==t&&(e.val(t),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],l.$viewValue===e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+Ve(t)+" ?";i.val(n),e.prepend(i),e.val(n),i.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=p})}],link:function(s,l,u,c){function f(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(k.parent()&&k.remove(),t.val(e),""===e&&p.prop("selected",!0)):m(e)&&p?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){k.parent()&&k.remove(),n.$setViewValue(t.val())})})}function d(e,t,n){var r;n.$render=function(){var e=new We(n.$viewValue);o(t.find("option"),function(t){t.selected=y(e.get(t.value))})},e.$watch(function(){j(r,n.$viewValue)||(r=F(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function h(t,s,l){function u(e,n,r){return j[S]=r,A&&(j[A]=n),e(t,j)}function c(){t.$apply(function(){var e,n=D(t)||[];if(b)e=[],o(s.val(),function(t){t=P?N[t]:t,e.push(f(t,n[t]))});else{var r=P?N[s.val()]:s.val();e=f(r,n[r])}l.$setViewValue(e),m()})}function f(e,t){if("?"===e)return n;if(""===e)return null;var r=T?T:R;return u(r,e,t)}function d(){var e,n=D(t);if(n&&dr(n)){e=new Array(n.length);for(var r=0,i=n.length;i>r;r++)e[r]=u(E,r,n[r]);return e}if(n){e={};for(var o in n)n.hasOwnProperty(o)&&(e[o]=u(E,o,n[o]))}return e}function h(e){ +var t;if(b)if(P&&dr(e)){t=new We([]);for(var n=0;nS;S++)d=S,A&&(d=U[S],"$"===d.charAt(0))||(p=z[d],e=u(M,d,p)||"",(n=V[e])||(n=V[e]=[],W.push(e)),O=q(d,p),G=G||O,L=u(E,d,p),L=y(L)?L:"",I=P?P(t,j):A?U[S]:S,P&&(N[I]=d),n.push({id:I,label:L,selected:O}));for(b||($||null===H?V[""].unshift({id:"",label:"",selected:!G}):G||V[""].unshift({id:"?",label:"",selected:!0})),k=0,m=W.length;m>k;k++){for(e=W[k],n=V[e],F.length<=k?(i={element:C.clone().attr("label",e),label:n.label},c=[i],F.push(c),s.append(i.element)):(c=F[k],i=c[0],i.label!=e&&i.element.attr("label",i.label=e)),T=null,S=0,w=n.length;w>S;S++)r=n[S],(f=c[S+1])?(T=f.element,f.label!==r.label&&(v(B,f.label,!1),v(B,r.label,!0),T.text(f.label=r.label),T.prop("label",f.label)),f.id!==r.id&&T.val(f.id=r.id),T[0].selected!==r.selected&&(T.prop("selected",f.selected=r.selected),er&&T.prop("selected",f.selected))):(""===r.id&&$?R=$:(R=_.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),c.push(f={element:R,label:r.label,id:r.id,selected:r.selected}),v(B,r.label,!0),T?T.after(R):i.element.append(R),T=R);for(S++;c.length>S;)r=c.pop(),v(B,r.label,!1),r.element.remove()}for(;F.length>k;){for(n=F.pop(),S=1;S0?g.addOption(t):0>e&&g.removeOption(t)})}var k;if(!(k=w.match(i)))throw jo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",w,B(s));var E=r(k[2]||k[1]),S=k[4]||k[6],O=/ as /.test(k[0])&&k[1],T=O?r(O):null,A=k[5],M=r(k[3]||""),R=r(k[2]?k[1]:S),D=r(k[7]),L=k[8],P=L?r(k[8]):null,N={},F=[[{element:s,label:""}]],j={};$&&(e($)(t),$.removeClass("ng-scope"),$.remove()),s.empty(),s.on("change",c),l.$render=m,t.$watchCollection(D,p),t.$watchCollection(d,p),b&&t.$watchCollection(function(){return l.$modelValue},p)}if(c[1]){for(var p,g=c[0],v=c[1],b=u.multiple,w=u.ngOptions,$=!1,x=!1,_=tr(t.createElement("option")),C=tr(t.createElement("optgroup")),k=_.clone(),E=0,S=l.children(),O=S.length;O>E;E++)if(""===S[E].value){p=$=S.eq(E);break}g.init(v,$,k),b&&(v.$isEmpty=function(e){return!e||0===e.length}),w?h(s,l,v):b?d(s,l,v):f(s,l,v,g)}}}}],Wo=["$interpolate",function(e){var t={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(m(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=t),i?e.$watch(i,function(e,t){r.$set("value",e),t!==e&&s.removeOption(t),s.addOption(e,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Ho=v({restrict:"E",terminal:!1}),zo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},Uo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(w(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,B(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||m(a)||a.test(e)}}}}},Bo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=d(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return 0>i||r.$isEmpty(t)||t.length<=i}}}}},qo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=d(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(re(),he(ur),void tr(t).ready(function(){J(t,Z)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('')},function(e,t,n){!function(e){e(n(3))}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:c[t]}function n(e){return function(t){return a(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t)return null;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),a=n.listSelections(),s=0;s=0;s--){var c=a[s].head;n.replaceRange("",f(c.line,c.ch-1),f(c.line,c.ch+1))}}function o(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=0;s1&&h.indexOf(i)>=0&&n.getRange(f(w.line,w.ch-2),w)==i+i&&(w.ch<=2||n.getRange(f(w.line,w.ch-3),f(w.line,w.ch-2))!=i))y="addFour";else if(p){if(e.isWordChar(d)||!u(n,w,i))return e.Pass;y="both"}else{if(!v||n.getLine(w.line).length!=w.ch&&!s(d,a)&&!/\s/.test(d))return e.Pass;y="both"}else y=h.indexOf(i)>=0&&n.getRange(w,f(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var $=l%2?a.charAt(l-1):i,x=l%2?i:a.charAt(l+1);n.operation(function(){if("skip"==c)n.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;3>e;e++)n.execCommand("goCharRight");else if("surround"==c){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function l(e,t){var n=e.getRange(f(t.line,t.ch-1),f(t.line,t.ch+1));return 2==n.length?n:null}function u(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var a=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(a.pos=a.start=o.start;;){var s=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}var c={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},f=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(h),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(h))});for(var d=c.pairs+"`",h={Backspace:i,Enter:o},p=0;p=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(r&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),d=n(e,a(t.line,l+(c>0?1:0)),c,f||null,i);return null==d?null:{from:a(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,u=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=f;d+=n){var h=e.getLine(d);if(h){var p=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o))for(d==t.line&&(p=t.ch-(0>n?1:0));p!=g;p+=n){var v=h.charAt(p);if(c.test(v)&&(void 0===r||e.getTokenTypeAt(a(d,p+1))==r)){var m=s[v];if(">"==m.charAt(1)==n>0)u.push(v);else{if(!u.length)return{pos:a(d,p),ch:v};u.pop()}}}}}return d-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";e.registerHelper("lint","json",function(t){var n=[];jsonlint.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{jsonlint.parse(t)}catch(r){}return n})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(t,n){function r(t){return i.parentNode?(i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",void(i.style.left=t.clientX+5+"px")):e.off(document,"mousemove",r)}var i=document.createElement("div");return i.className="CodeMirror-lint-tooltip",i.appendChild(n.cloneNode(!0)),document.body.appendChild(i),e.on(document,"mousemove",r),r(t),null!=i.style.opacity&&(i.style.opacity=1),i}function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){e.parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout(function(){n(e)},600))}function i(n,i,o){function a(){e.off(o,"mouseout",a),s&&(r(s),s=null)}var s=t(n,i),l=setInterval(function(){if(s)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}return s?void 0:clearInterval(l)},400);e.on(o,"mouseout",a)}function o(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){v(e,t)}}function a(e,t){return t instanceof Function?{getAnnotations:t}:(t&&t!==!0||(t={}),t)}function s(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(m);for(var n=0;n1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function p(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){d(e)},t.options.delay||500))}function g(e,t){var n=t.target||t.srcElement;i(t,f(e),n)}function v(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className))for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=0;s"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(t.tokenize=s,s(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(r(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(ke),i("operator","operator",e.current()));if("`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),i("error","error");if(ke.test(n))return e.eatWhile(ke),i("operator","operator",e.current());if(_e.test(n)){e.eatWhile(_e);var o=e.current(),u=Ce.propertyIsEnumerable(o)&&Ce[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}}function a(e){return function(t,n){var r,a=!1;if(we&&"@"==t.peek()&&t.match(Ee))return n.tokenize=o,i("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||a);)a=!a&&"\\"==r;return a||(n.tokenize=o),i("string","string")}}function s(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=Se.indexOf(a);if(s>=0&&3>s){if(!r){++o;break}if(0==--r)break}else if(s>=3&&6>s)++r;else if(_e.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function c(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(Te.state=e,Te.stream=i,Te.marked=null,Te.cc=o,Te.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():$e?x:$;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Te.marked?Te.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)Te.cc.push(arguments[e])}function p(){return h.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=Te.state;if(r.context){if(Te.marked="def",t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){Te.state.context={prev:Te.state.context,vars:Te.state.localVars},Te.state.localVars=Ae}function m(){Te.state.localVars=Te.state.context.vars,Te.state.context=Te.state.context.prev}function y(e,t){var n=function(){var n=Te.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new c(r,Te.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=Te.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?p():";"==e?h():p(t)}return t}function $(e,t){return"var"==e?p(y("vardef",t.length),z,w(";"),b):"keyword a"==e?p(y("form"),x,$,b):"keyword b"==e?p(y("form"),$,b):"{"==e?p(y("}"),V,b):";"==e?p():"if"==e?("else"==Te.state.lexical.info&&Te.state.cc[Te.state.cc.length-1]==b&&Te.state.cc.pop()(),p(y("form"),x,$,b,K)):"function"==e?p(ee):"for"==e?p(y("form"),Y,$,b):"variable"==e?p(y("stat"),D):"switch"==e?p(y("form"),x,y("}","switch"),w("{"),V,b,b):"case"==e?p(x,w(":")):"default"==e?p(w(":")):"catch"==e?p(y("form"),v,w("("),te,w(")"),$,b,m):"module"==e?p(y("form"),v,ae,m,b):"class"==e?p(y("form"),ne,b):"export"==e?p(y("form"),se,b):"import"==e?p(y("form"),le,b):h(y("stat"),x,w(";"),b)}function x(e){return C(e,!1)}function _(e){return C(e,!0)}function C(e,t){if(Te.state.fatArrowAt==Te.stream.start){var n=t?R:M;if("("==e)return p(v,y(")"),j(U,")"),b,w("=>"),n,m);if("variable"==e)return h(v,U,w("=>"),n,m)}var r=t?O:S;return Oe.hasOwnProperty(e)?p(r):"function"==e?p(ee,r):"keyword c"==e?p(t?E:k):"("==e?p(y(")"),k,pe,w(")"),b,r):"operator"==e||"spread"==e?p(t?_:x):"["==e?p(y("]"),de,b,r):"{"==e?I(P,"}",null,r):"quasi"==e?h(T,r):p()}function k(e){return e.match(/[;\}\)\],]/)?h():h(x)}function E(e){return e.match(/[;\}\)\],]/)?h():h(_)}function S(e,t){return","==e?p(x):O(e,t,!1)}function O(e,t,n){var r=0==n?S:O,i=0==n?x:_;return"=>"==e?p(v,n?R:M,m):"operator"==e?/\+\+|--/.test(t)?p(r):"?"==t?p(x,w(":"),i):p(i):"quasi"==e?h(T,r):";"!=e?"("==e?I(_,")","call",r):"."==e?p(L,r):"["==e?p(y("]"),k,w("]"),b,r):void 0:void 0}function T(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?p(T):p(x,A)}function A(e){return"}"==e?(Te.marked="string-2",Te.state.tokenize=l,p(T)):void 0}function M(e){return u(Te.stream,Te.state),h("{"==e?$:x)}function R(e){return u(Te.stream,Te.state),h("{"==e?$:_)}function D(e){return":"==e?p(b,$):h(S,w(";"),b)}function L(e){return"variable"==e?(Te.marked="property",p()):void 0}function P(e,t){return"variable"==e||"keyword"==Te.style?(Te.marked="property",p("get"==t||"set"==t?N:F)):"number"==e||"string"==e?(Te.marked=we?"property":Te.style+" property",p(F)):"jsonld-keyword"==e?p(F):"["==e?p(x,w("]"),F):void 0}function N(e){return"variable"!=e?h(F):(Te.marked="property",p(ee))}function F(e){return":"==e?p(_):"("==e?h(ee):void 0}function j(e,t){function n(r){if(","==r){var i=Te.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),p(e,n)}return r==t?p():p(w(t))}return function(r){return r==t?p():h(e,n)}}function I(e,t,n){for(var r=3;r!?|~^]/,Ee=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Se="([{}])",Oe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Te={state:null,column:null,marked:null,cc:null},Ae={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-ye,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==ve?n:(t.lastType="operator"!=ve||"++"!=me&&"--"!=me?ve:"incdec",d(t,n,ve,me,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==b)a=a.prev;else if(u!=K)break}"stat"==a.type&&"}"==i&&(a=a.prev),be&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,f=i==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==i?a.indented:"form"==c?a.indented+ye:"stat"==c?a.indented+(ge(t,r)?be||ye:0):"switch"!=a.info||f||0==n.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:ye):a.indented+(/^(?:case|default)\b/.test(r)?ye:2*ye)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:$e?null:"/*",blockCommentEnd:$e?null:"*/",lineComment:$e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:$e?"json":"javascript",jsonldMode:we,jsonMode:$e}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(t,n,r){e.exports=r(t,n)}("humane",this,function(e,t){var n=window,r=document,i={on:function(e,t,r){"addEventListener"in n?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r)},off:function(e,t,r){"removeEventListener"in n?e.removeEventListener(t,r,!1):e.detachEvent("on"+t,r)},bind:function(e,t){return function(){e.apply(t,arguments)}},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},config:function(e,t){return null!=e?e:t},transSupport:!1,useFilter:/msie [678]/i.test(navigator.userAgent),_checkTransition:function(){var e=r.createElement("div"),t={webkit:"webkit",Moz:"",O:"o",ms:"MS"};for(var n in t)n+"Transition"in e.style&&(this.vendorPrefix=t[n],this.transSupport=!0)}};i._checkTransition();var o=function(e){e||(e={}),this.queue=[],this.baseCls=e.baseCls||"humane",this.addnCls=e.addnCls||"",this.timeout="timeout"in e?e.timeout:2500,this.waitForMove=e.waitForMove||!1,this.clickToClose=e.clickToClose||!1,this.timeoutAfterMove=e.timeoutAfterMove||!1,this.container=e.container;try{this._setupEl()}catch(t){i.on(n,"load",i.bind(this._setupEl,this))}};return o.prototype={constructor:o,_setupEl:function(){var e=r.createElement("div");if(e.style.display="none",!this.container){if(!r.body)throw"document.body is null";this.container=r.body}this.container.appendChild(e),this.el=e,this.removeEvent=i.bind(function(){var e=i.config(this.currentMsg.timeoutAfterMove,this.timeoutAfterMove);e?setTimeout(i.bind(this.remove,this),e):this.remove()},this),this.transEvent=i.bind(this._afterAnimation,this),this._run()},_afterTimeout:function(){i.config(this.currentMsg.waitForMove,this.waitForMove)?this.removeEventsSet||(i.on(r.body,"mousemove",this.removeEvent),i.on(r.body,"click",this.removeEvent),i.on(r.body,"keypress",this.removeEvent),i.on(r.body,"touchstart",this.removeEvent),this.removeEventsSet=!0):this.remove()},_run:function(){if(!this._animating&&this.queue.length&&this.el){this._animating=!0,this.currentTimer&&(clearTimeout(this.currentTimer),this.currentTimer=null);var e=this.queue.shift(),t=i.config(e.clickToClose,this.clickToClose);t&&(i.on(this.el,"click",this.removeEvent),i.on(this.el,"touchstart",this.removeEvent));var n=i.config(e.timeout,this.timeout);n>0&&(this.currentTimer=setTimeout(i.bind(this._afterTimeout,this),n)),i.isArray(e.html)&&(e.html="
  • "+e.html.join("
  • ")+"
"),this.el.innerHTML=e.html,this.currentMsg=e,this.el.className=this.baseCls,i.transSupport?(this.el.style.display="block",setTimeout(i.bind(this._showMsg,this),50)):this._showMsg()}},_setOpacity:function(e){if(i.useFilter)try{this.el.filters.item("DXImageTransform.Microsoft.Alpha").Opacity=100*e}catch(t){}else this.el.style.opacity=String(e)},_showMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-animate";else{var t=0;this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-js-animate",this._setOpacity(0),this.el.style.display="block";var n=this,r=setInterval(function(){1>t?(t+=.1,t>1&&(t=1),n._setOpacity(t)):clearInterval(r)},30)}},_hideMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e,i.on(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent);else var t=1,n=this,r=setInterval(function(){t>0?(t-=.1,0>t&&(t=0),n._setOpacity(t)):(n.el.className=n.baseCls+" "+e,clearInterval(r),n._afterAnimation())},30)},_afterAnimation:function(){i.transSupport&&i.off(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent),this.currentMsg.cb&&this.currentMsg.cb(),this.el.style.display="none",this._animating=!1,this._run()},remove:function(e){var t="function"==typeof e?e:null;i.off(r.body,"mousemove",this.removeEvent),i.off(r.body,"click",this.removeEvent),i.off(r.body,"keypress",this.removeEvent),i.off(r.body,"touchstart",this.removeEvent),i.off(this.el,"click",this.removeEvent),i.off(this.el,"touchstart",this.removeEvent),this.removeEventsSet=!1,t&&this.currentMsg&&(this.currentMsg.cb=t),this._animating?this._hideMsg():t&&t()},log:function(e,t,n,r){var i={};if(r)for(var o in r)i[o]=r[o];if("function"==typeof t)n=t;else if(t)for(var o in t)i[o]=t[o];return i.html=e,n&&(i.cb=n),this.queue.push(i),this._run(),this},spawn:function(e){var t=this;return function(n,r,i){return t.log.call(t,n,r,i,e),t}},create:function(e){return new o(e)}},new o})},function(e,t,n){(function(e){(function(){var t=!0,n=!1,r={},i=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]], +performAction:function(e,t,n,r,i,o,a){var s=o.length-1;switch(i){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g," ").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[s-1];case 13:this.$={};break;case 14:this.$=o[s-1];break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[];break;case 19:this.$=o[s-1];break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){function t(e){i.length=i.length-2*e,o.length=o.length-e,a.length=a.length-e}function n(){var e;return e=r.lexer.lex()||1,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,i=[0],o=[null],a=[],s=this.table,l="",u=0,c=0,f=0,d=2,h=1;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var p=this.lexer.yylloc;a.push(p),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var g,v,m,y,b,w,$,x,_,C={};;){if(m=i[i.length-1],this.defaultActions[m]?y=this.defaultActions[m]:(null==g&&(g=n()),y=s[m]&&s[m][g]),"undefined"==typeof y||!y.length||!y[0]){if(!f){_=[];for(w in s[m])this.terminals_[w]&&w>2&&_.push("'"+this.terminals_[w]+"'");var k="";k=this.lexer.showPosition?"Parse error on line "+(u+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+_.join(", ")+", got '"+this.terminals_[g]+"'":"Parse error on line "+(u+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:p,expected:_})}if(3==f){if(g==h)throw new Error(k||"Parsing halted.");c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,p=this.lexer.yylloc,g=n()}for(;!(d.toString()in s[m]);){if(0==m)throw new Error(k||"Parsing halted.");t(1),m=i[i.length-1]}v=g,g=d,m=i[i.length-1],y=s[m]&&s[m][d],f=3}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+g);switch(y[0]){case 1:i.push(g),o.push(this.lexer.yytext),a.push(this.lexer.yylloc),i.push(y[1]),g=null,v?(g=v,v=null):(c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,p=this.lexer.yylloc,f>0&&f--);break;case 2:if($=this.productions_[y[1]][1],C.$=o[o.length-$],C._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},b=this.performAction.call(C,l,c,u,this.yy,y[1],o,a),"undefined"!=typeof b)return b;$&&(i=i.slice(0,-1*$*2),o=o.slice(0,-1*$),a=a.slice(0,-1*$)),i.push(this.productions_[y[1]][0]),o.push(C.$),a.push(C._$),x=s[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),a=0;at[0].length)||(t=n,r=a,this.options.flex));a++);return t?(i=t[0].match(/\n.*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e?e:void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"!=typeof e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},e.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],e.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},e}();return e.lexer=t,e}();return"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(n){if(!n[1])throw new Error("Usage: "+n[0]+" FILE");if("undefined"!=typeof e)var i=t("fs").readFileSync(t("path").join(e.cwd(),n[1]),"utf8");else var o=t("file").path(t("file").cwd()),i=o.join(n[1]).read({charset:"utf-8"});return r.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&r.main("undefined"!=typeof e?e.argv.slice(1):t("system").args)),r})()}).call(t,n(161))},function(e,t,n){function r(){c=!1,s.length?u=s.concat(u):f=-1,u.length&&i()}function i(){if(!c){var e=setTimeout(r);c=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var n=1;ne?t:e>n?n:e}function t(e){return 100*(-1+e)}function n(e,n,r){var i;return i="translate3d"===u.positionUsing?{transform:"translate3d("+t(e)+"%,0,0)"}:"translate"===u.positionUsing?{transform:"translate("+t(e)+"%,0)"}:{"margin-left":t(e)+"%"},i.transition="all "+n+"ms "+r,i}function r(e,t){var n="string"==typeof e?e:a(e);return n.indexOf(" "+t+" ")>=0}function i(e,t){var n=a(e),i=n+t;r(n,t)||(e.className=i.substring(1))}function o(e,t){var n,i=a(e);r(e,t)&&(n=i.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function a(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function s(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var l={};l.version="0.2.0";var u=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};l.configure=function(e){var t,n;for(t in e)n=e[t],void 0!==n&&e.hasOwnProperty(t)&&(u[t]=n);return this},l.status=null,l.set=function(t){var r=l.isStarted();t=e(t,u.minimum,1),l.status=1===t?null:t;var i=l.render(!r),o=i.querySelector(u.barSelector),a=u.speed,s=u.easing;return i.offsetWidth,c(function(e){""===u.positionUsing&&(u.positionUsing=l.getPositioningCSS()),f(o,n(t,a,s)),1===t?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+a+"ms linear",opacity:0}),setTimeout(function(){l.remove(),e()},a)},a)):setTimeout(e,a)}),this},l.isStarted=function(){return"number"==typeof l.status},l.start=function(){l.status||l.set(0);var e=function(){setTimeout(function(){l.status&&(l.trickle(),e())},u.trickleSpeed)};return u.trickle&&e(),this},l.done=function(e){return e||l.status?l.inc(.3+.5*Math.random()).set(1):this},l.inc=function(t){var n=l.status;return n?("number"!=typeof t&&(t=(1-n)*e(Math.random()*n,.1,.95)),n=e(n+t,0,.994),l.set(n)):l.start()},l.trickle=function(){return l.inc(Math.random()*u.trickleRate)},function(){var e=0,t=0;l.promise=function(n){return n&&"resolved"!==n.state()?(0===t&&l.start(),e++,t++,n.always(function(){t--,0===t?(e=0,l.done()):l.set((e-t)/e)}),this):this}}(),l.render=function(e){if(l.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=u.template;var r,o=n.querySelector(u.barSelector),a=e?"-100":t(l.status||0),c=document.querySelector(u.parent);return f(o,{transition:"all 0 linear",transform:"translate3d("+a+"%,0,0)"}),u.showSpinner||(r=n.querySelector(u.spinnerSelector),r&&s(r)),c!=document.body&&i(c,"nprogress-custom-parent"),c.appendChild(n),n},l.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(u.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&s(e)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var c=function(){function e(){var n=t.shift();n&&n(e)}var t=[];return function(n){t.push(n),1==t.length&&e()}}(),f=function(){function e(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function t(e){var t=document.body.style;if(e in t)return e;for(var n,r=i.length,o=e.charAt(0).toUpperCase()+e.slice(1);r--;)if(n=i[r]+o,n in t)return n;return e}function n(n){return n=e(n),o[n]||(o[n]=t(n))}function r(e,t,r){t=n(t),e.style[t]=r}var i=["Webkit","O","Moz","ms"],o={};return function(e,t){var n,i,o=arguments;if(2==o.length)for(n in t)i=t[n],void 0!==i&&t.hasOwnProperty(n)&&r(e,n,i);else r(e,o[1],o[2])}}();return l})},function(e,t,n){/*! Papa Parse v4.1.1 https://github.com/mholt/PapaParse */ -!function(t){"use strict";function n(e,n){if(n=n||{},n.worker&&_.WORKERS_SUPPORTED){var r=f();return r.userStep=n.step,r.userChunk=n.chunk,r.userComplete=n.complete,r.userError=n.error,n.step=y(n.step),n.chunk=y(n.chunk),n.complete=y(n.complete),n.error=y(n.error),delete n.worker,void r.postMessage({input:e,config:n,workerId:r.id})}var i=null;return"string"==typeof e?i=n.download?new o(n):new s(n):(t.File&&e instanceof File||e instanceof Object)&&(i=new a(n)),i.stream(e)}function r(e,t){function n(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==_.BAD_DELIMITERS.indexOf(t.delimiter)&&(l=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(s=t.quotes),"string"==typeof t.newline&&(u=t.newline))}function r(e){if("object"!=typeof e)return[];var t=[];for(var n in e)t.push(n);return t}function i(e,t){var n="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var r=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(r){for(var a=0;a0&&(n+=l),n+=o(e[a],a);t.length>0&&(n+=u)}for(var s=0;sf;f++){f>0&&(n+=l);var d=r&&i?e[f]:f;n+=o(t[s][d],f)}s-1||" "==e.charAt(0)||" "==e.charAt(e.length-1);return n?'"'+e+'"':e}function a(e,t){for(var n=0;n-1)return!0;return!1}var s=!1,l=",",u="\r\n";if(n(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(r(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:r(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function i(e){function n(e){var t=v(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new l(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},n.call(this,e),this.parseChunk=function(e){var n=this._partialLine+e;this._partialLine="";var r=this._handle.parse(n,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=r.meta.cursor;this._finished||(this._partialLine=n.substring(i-this._baseIndex),this._baseIndex=i),r&&r.data&&(this._rowCount+=r.data.length);var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(w)t.postMessage({results:r,workerId:_.WORKER_ID,finished:o});else if(y(this._config.chunk)){if(this._config.chunk(r,this._handle),this._paused)return;r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),!o||!y(this._config.complete)||r&&r.meta.aborted||this._config.complete(this._completeResults),o||r&&r.meta.paused||this._nextChunk(),r}},this._sendError=function(e){y(this._config.error)?this._config.error(e):w&&this._config.error&&t.postMessage({workerId:_.WORKER_ID,error:e,finished:!1})}}function o(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=_.RemoteChunkSize),i.call(this,e);var n;w?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(n=new XMLHttpRequest,w||(n.onload=m(this._chunkLoaded,this),n.onerror=m(this._chunkError,this)),n.open("GET",this._input,!w),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;n.setRequestHeader("Range","bytes="+this._start+"-"+e),n.setRequestHeader("If-None-Match","webkit-no-cache")}try{n.send()}catch(t){this._chunkError(t.message)}w&&0==n.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==n.readyState){if(n.status<200||n.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(n),this.parseChunk(n.responseText)}},this._chunkError=function(e){var t=n.statusText||e;this._sendError(t)}}function a(e){e=e||{},e.chunkSize||(e.chunkSize=_.LocalChunkSize),i.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?(t=new FileReader,t.onload=m(this._chunkLoaded,this),t.onerror=m(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function s(e){e=e||{},i.call(this,e);var t,n;this.stream=function(e){return t=e,n=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?n.substr(0,e):n;return n=e?n.substr(e):"",this._finished=!n,this.parseChunk(t)}}}function l(e){function t(){if($&&d&&(l("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+_.DefaultDelimiter+"'"),d=!1),e.skipEmptyLines)for(var t=0;t<$.data.length;t++)1==$.data[t].length&&""==$.data[t][0]&&$.data.splice(t--,1);return n()&&r(),i()}function n(){return e.header&&0==w.length}function r(){if($){for(var e=0;n()&&e<$.data.length;e++)for(var t=0;t<$.data[e].length;t++)w.push($.data[e][t]);$.data.splice(0,1)}}function i(){if(!$||!e.header&&!e.dynamicTyping)return $;for(var t=0;t<$.data.length;t++){for(var n={},r=0;r<$.data[t].length;r++){if(e.dynamicTyping){var i=$.data[t][r];"true"==i||"TRUE"==i?$.data[t][r]=!0:"false"==i||"FALSE"==i?$.data[t][r]=!1:$.data[t][r]=s(i)}e.header&&(r>=w.length?(n.__parsed_extra||(n.__parsed_extra=[]),n.__parsed_extra.push($.data[t][r])):n[w[r]]=$.data[t][r])}e.header&&($.data[t]=n,r>w.length?l("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+r,t):r1&&(l+=Math.abs(p-i),i=p):i=p}c/=f.data.length,("undefined"==typeof r||r>l)&&c>1.99&&(r=l,n=s)}return e.delimiter=n,{successful:!!n,bestDelimiter:n}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var n=0,r=0;r=t.length/2?"\r\n":"\r"}function s(e){var t=p.test(e);return t?parseFloat(e):e}function l(e,t,n,r){$.errors.push({type:e,code:t,message:n,row:r})}var c,f,d,p=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,h=this,g=0,m=!1,b=!1,w=[],$={data:[],errors:[],meta:{}};if(y(e.step)){var x=e.step;e.step=function(r){if($=r,n())t();else{if(t(),0==$.data.length)return;g+=r.data.length,e.preview&&g>e.preview?f.abort():x($,h)}}}this.parse=function(n,r,i){if(e.newline||(e.newline=a(n)),d=!1,!e.delimiter){var s=o(n);s.successful?e.delimiter=s.bestDelimiter:(d=!0,e.delimiter=_.DefaultDelimiter),$.meta.delimiter=e.delimiter}var l=v(e);return e.preview&&e.header&&l.preview++,c=n,f=new u(l),$=f.parse(c,r,i),t(),m?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return m},this.pause=function(){m=!0,f.abort(),c=c.substr(f.getCharIndex())},this.resume=function(){m=!1,h.streamer.parseChunk(c)},this.aborted=function(){return b},this.abort=function(){b=!0,f.abort(),$.meta.aborted=!0,y(e.complete)&&e.complete($),c=""}}function u(e){e=e||{};var t=e.delimiter,n=e.newline,r=e.comments,i=e.step,o=e.preview,a=e.fastMode;if(("string"!=typeof t||_.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),r===t)throw"Comment character same as delimiter";r===!0?r="#":("string"!=typeof r||_.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!=n&&"\r"!=n&&"\r\n"!=n&&(n="\n");var s=0,l=!1;this.parse=function(e,u,c){function f(e){$.push(e),_=s}function d(t){return c?h():(t||(t=e.substr(s)),C.push(t),s=v,f(C),w&&g(),h())}function p(t){s=t,f(C),C=[],O=e.indexOf(n,s)}function h(e){return{data:$,errors:x,meta:{delimiter:t,linebreak:n,aborted:l,truncated:!!e,cursor:_+(u||0)}}}function g(){i(h()),$=[],x=[]}if("string"!=typeof e)throw"Input must be a string";var v=e.length,m=t.length,y=n.length,b=r.length,w="function"==typeof i;s=0;var $=[],x=[],C=[],_=0;if(!e)return h();if(a||a!==!1&&-1===e.indexOf('"')){for(var k=e.split(n),E=0;E=o)return $=$.slice(0,o),h(!0)}}return h()}for(var S=e.indexOf(t,s),O=e.indexOf(n,s);;)if('"'!=e[s])if(r&&0===C.length&&e.substr(s,b)===r){if(-1==O)return h();s=O+y,O=e.indexOf(n,s),S=e.indexOf(t,s)}else if(-1!==S&&(O>S||-1===O))C.push(e.substring(s,S)),s=S+m,S=e.indexOf(t,s);else{if(-1===O)break;if(C.push(e.substring(s,O)),p(O+y),w&&(g(),l))return h();if(o&&$.length>=o)return h(!0)}else{var T=s;for(s++;;){var T=e.indexOf('"',T+1);if(-1===T)return c||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:$.length,index:s}),d();if(T===v-1){var A=e.substring(s,T).replace(/""/g,'"');return d(A)}if('"'!=e[T+1]){if(e[T+1]==t){C.push(e.substring(s,T).replace(/""/g,'"')),s=T+1+m,S=e.indexOf(t,s),O=e.indexOf(n,s);break}if(e.substr(T+1,y)===n){if(C.push(e.substring(s,T).replace(/""/g,'"')),p(T+1+y),S=e.indexOf(t,s),w&&(g(),l))return h();if(o&&$.length>=o)return h(!0);break}}else T++}}return d()},this.abort=function(){l=!0},this.getCharIndex=function(){return s}}function c(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function f(){if(!_.WORKERS_SUPPORTED)return!1;if(!$&&null===_.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var e=new t.Worker(_.SCRIPT_PATH||b);return e.onmessage=d,e.id=C++,x[e.id]=e,e}function d(e){var t=e.data,n=x[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){r=!0,p(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},o={abort:i,pause:h,resume:h};if(y(n.userStep)){for(var a=0;a0,i=!(t[0]instanceof Array);if(r){for(var a=0;a0&&(n+=l),n+=o(e[a],a);t.length>0&&(n+=u)}for(var s=0;sf;f++){f>0&&(n+=l);var d=r&&i?e[f]:f;n+=o(t[s][d],f)}s-1||" "==e.charAt(0)||" "==e.charAt(e.length-1);return n?'"'+e+'"':e}function a(e,t){for(var n=0;n-1)return!0;return!1}var s=!1,l=",",u="\r\n";if(n(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(r(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:r(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function i(e){function n(e){var t=v(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new l(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},n.call(this,e),this.parseChunk=function(e){var n=this._partialLine+e;this._partialLine="";var r=this._handle.parse(n,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=r.meta.cursor;this._finished||(this._partialLine=n.substring(i-this._baseIndex),this._baseIndex=i),r&&r.data&&(this._rowCount+=r.data.length);var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(w)t.postMessage({results:r,workerId:C.WORKER_ID,finished:o});else if(y(this._config.chunk)){if(this._config.chunk(r,this._handle),this._paused)return;r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),!o||!y(this._config.complete)||r&&r.meta.aborted||this._config.complete(this._completeResults),o||r&&r.meta.paused||this._nextChunk(),r}},this._sendError=function(e){y(this._config.error)?this._config.error(e):w&&this._config.error&&t.postMessage({workerId:C.WORKER_ID,error:e,finished:!1})}}function o(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=C.RemoteChunkSize),i.call(this,e);var n;w?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(n=new XMLHttpRequest,w||(n.onload=m(this._chunkLoaded,this),n.onerror=m(this._chunkError,this)),n.open("GET",this._input,!w),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;n.setRequestHeader("Range","bytes="+this._start+"-"+e),n.setRequestHeader("If-None-Match","webkit-no-cache")}try{n.send()}catch(t){this._chunkError(t.message)}w&&0==n.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==n.readyState){if(n.status<200||n.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(n),this.parseChunk(n.responseText)}},this._chunkError=function(e){var t=n.statusText||e;this._sendError(t)}}function a(e){e=e||{},e.chunkSize||(e.chunkSize=C.LocalChunkSize),i.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?(t=new FileReader,t.onload=m(this._chunkLoaded,this),t.onerror=m(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function s(e){e=e||{},i.call(this,e);var t,n;this.stream=function(e){return t=e,n=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?n.substr(0,e):n;return n=e?n.substr(e):"",this._finished=!n,this.parseChunk(t)}}}function l(e){function t(){if($&&d&&(l("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+C.DefaultDelimiter+"'"),d=!1),e.skipEmptyLines)for(var t=0;t<$.data.length;t++)1==$.data[t].length&&""==$.data[t][0]&&$.data.splice(t--,1);return n()&&r(),i()}function n(){return e.header&&0==w.length}function r(){if($){for(var e=0;n()&&e<$.data.length;e++)for(var t=0;t<$.data[e].length;t++)w.push($.data[e][t]);$.data.splice(0,1)}}function i(){if(!$||!e.header&&!e.dynamicTyping)return $;for(var t=0;t<$.data.length;t++){for(var n={},r=0;r<$.data[t].length;r++){if(e.dynamicTyping){var i=$.data[t][r];"true"==i||"TRUE"==i?$.data[t][r]=!0:"false"==i||"FALSE"==i?$.data[t][r]=!1:$.data[t][r]=s(i)}e.header&&(r>=w.length?(n.__parsed_extra||(n.__parsed_extra=[]),n.__parsed_extra.push($.data[t][r])):n[w[r]]=$.data[t][r])}e.header&&($.data[t]=n,r>w.length?l("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+r,t):r1&&(l+=Math.abs(h-i),i=h):i=h}c/=f.data.length,("undefined"==typeof r||r>l)&&c>1.99&&(r=l,n=s)}return e.delimiter=n,{successful:!!n,bestDelimiter:n}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var n=0,r=0;r=t.length/2?"\r\n":"\r"}function s(e){var t=h.test(e);return t?parseFloat(e):e}function l(e,t,n,r){$.errors.push({type:e,code:t,message:n,row:r})}var c,f,d,h=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,m=!1,b=!1,w=[],$={data:[],errors:[],meta:{}};if(y(e.step)){var x=e.step;e.step=function(r){if($=r,n())t();else{if(t(),0==$.data.length)return;g+=r.data.length,e.preview&&g>e.preview?f.abort():x($,p)}}}this.parse=function(n,r,i){if(e.newline||(e.newline=a(n)),d=!1,!e.delimiter){var s=o(n);s.successful?e.delimiter=s.bestDelimiter:(d=!0,e.delimiter=C.DefaultDelimiter),$.meta.delimiter=e.delimiter}var l=v(e);return e.preview&&e.header&&l.preview++,c=n,f=new u(l),$=f.parse(c,r,i),t(),m?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return m},this.pause=function(){m=!0,f.abort(),c=c.substr(f.getCharIndex())},this.resume=function(){m=!1,p.streamer.parseChunk(c)},this.aborted=function(){return b},this.abort=function(){b=!0,f.abort(),$.meta.aborted=!0,y(e.complete)&&e.complete($),c=""}}function u(e){e=e||{};var t=e.delimiter,n=e.newline,r=e.comments,i=e.step,o=e.preview,a=e.fastMode;if(("string"!=typeof t||C.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),r===t)throw"Comment character same as delimiter";r===!0?r="#":("string"!=typeof r||C.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!=n&&"\r"!=n&&"\r\n"!=n&&(n="\n");var s=0,l=!1;this.parse=function(e,u,c){function f(e){$.push(e),C=s}function d(t){return c?p():(t||(t=e.substr(s)),_.push(t),s=v,f(_),w&&g(),p())}function h(t){s=t,f(_),_=[],O=e.indexOf(n,s)}function p(e){return{data:$,errors:x,meta:{delimiter:t,linebreak:n,aborted:l,truncated:!!e,cursor:C+(u||0)}}}function g(){i(p()),$=[],x=[]}if("string"!=typeof e)throw"Input must be a string";var v=e.length,m=t.length,y=n.length,b=r.length,w="function"==typeof i;s=0;var $=[],x=[],_=[],C=0;if(!e)return p();if(a||a!==!1&&-1===e.indexOf('"')){for(var k=e.split(n),E=0;E=o)return $=$.slice(0,o),p(!0)}}return p()}for(var S=e.indexOf(t,s),O=e.indexOf(n,s);;)if('"'!=e[s])if(r&&0===_.length&&e.substr(s,b)===r){if(-1==O)return p();s=O+y,O=e.indexOf(n,s),S=e.indexOf(t,s)}else if(-1!==S&&(O>S||-1===O))_.push(e.substring(s,S)),s=S+m,S=e.indexOf(t,s);else{if(-1===O)break;if(_.push(e.substring(s,O)),h(O+y),w&&(g(),l))return p();if(o&&$.length>=o)return p(!0)}else{var T=s;for(s++;;){var T=e.indexOf('"',T+1);if(-1===T)return c||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:$.length,index:s}),d();if(T===v-1){var A=e.substring(s,T).replace(/""/g,'"');return d(A)}if('"'!=e[T+1]){if(e[T+1]==t){_.push(e.substring(s,T).replace(/""/g,'"')),s=T+1+m,S=e.indexOf(t,s),O=e.indexOf(n,s);break}if(e.substr(T+1,y)===n){if(_.push(e.substring(s,T).replace(/""/g,'"')),h(T+1+y),S=e.indexOf(t,s),w&&(g(),l))return p();if(o&&$.length>=o)return p(!0);break}}else T++}}return d()},this.abort=function(){l=!0},this.getCharIndex=function(){return s}}function c(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function f(){if(!C.WORKERS_SUPPORTED)return!1;if(!$&&null===C.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var e=new t.Worker(C.SCRIPT_PATH||b);return e.onmessage=d,e.id=_++,x[e.id]=e,e}function d(e){var t=e.data,n=x[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){r=!0,h(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},o={abort:i,pause:p,resume:p};if(y(n.userStep)){for(var a=0;a * @license MIT License, http://www.opensource.org/licenses/MIT */ -!function(){var e=angular.module("restangular",[]);e.provider("Restangular",function(){var e={};e.init=function(e,t){function n(e,t,n,r){var i={};return _.each(_.keys(r),function(o){var a=r[o];a.params=_.extend({},a.params,e.defaultRequestParams[a.method.toLowerCase()]),_.isEmpty(a.params)&&delete a.params,i[o]=e.isSafe(a.method)?function(){return t(_.extend(a,{url:n}))}:function(e){return t(_.extend(a,{url:n,data:e}))}}),i}e.configuration=t;var r=["get","head","options","trace","getlist"];t.isSafe=function(e){return _.contains(r,e.toLowerCase())};var i=/^https?:\/\//i;t.isAbsoluteUrl=function(e){return _.isUndefined(t.absoluteUrl)||_.isNull(t.absoluteUrl)?e&&i.test(e):t.absoluteUrl},t.absoluteUrl=_.isUndefined(t.absoluteUrl)?!0:t.absoluteUrl,e.setSelfLinkAbsoluteUrl=function(e){t.absoluteUrl=e},t.baseUrl=_.isUndefined(t.baseUrl)?"":t.baseUrl,e.setBaseUrl=function(e){return t.baseUrl=/\/$/.test(e)?e.substring(0,e.length-1):e,this},t.extraFields=t.extraFields||[],e.setExtraFields=function(e){return t.extraFields=e,this},t.defaultHttpFields=t.defaultHttpFields||{},e.setDefaultHttpFields=function(e){return t.defaultHttpFields=e,this},t.withHttpValues=function(e,n){return _.defaults(n,e,t.defaultHttpFields)},t.encodeIds=_.isUndefined(t.encodeIds)?!0:t.encodeIds,e.setEncodeIds=function(e){t.encodeIds=e},t.defaultRequestParams=t.defaultRequestParams||{get:{},post:{},put:{},remove:{},common:{}},e.setDefaultRequestParams=function(e,n){var r=[],i=n||e;return _.isUndefined(n)?r.push("common"):_.isArray(e)?r=e:r.push(e),_.each(r,function(e){t.defaultRequestParams[e]=i}),this},e.requestParams=t.defaultRequestParams,t.defaultHeaders=t.defaultHeaders||{},e.setDefaultHeaders=function(n){return t.defaultHeaders=n,e.defaultHeaders=t.defaultHeaders,this},e.defaultHeaders=t.defaultHeaders,t.methodOverriders=t.methodOverriders||[],e.setMethodOverriders=function(e){var n=_.extend([],e);return t.isOverridenMethod("delete",n)&&n.push("remove"),t.methodOverriders=n,this},t.jsonp=_.isUndefined(t.jsonp)?!1:t.jsonp,e.setJsonp=function(e){t.jsonp=e},t.isOverridenMethod=function(e,n){var r=n||t.methodOverriders;return!_.isUndefined(_.find(r,function(t){return t.toLowerCase()===e.toLowerCase()}))},t.urlCreator=t.urlCreator||"path",e.setUrlCreator=function(e){if(!_.has(t.urlCreatorFactory,e))throw new Error("URL Path selected isn't valid");return t.urlCreator=e,this},t.restangularFields=t.restangularFields||{id:"id",route:"route",parentResource:"parentResource",restangularCollection:"restangularCollection",cannonicalId:"__cannonicalId",etag:"restangularEtag",selfLink:"href",get:"get",getList:"getList",put:"put",post:"post",remove:"remove",head:"head",trace:"trace",options:"options",patch:"patch",getRestangularUrl:"getRestangularUrl",getRequestedUrl:"getRequestedUrl",putElement:"putElement",addRestangularMethod:"addRestangularMethod",getParentList:"getParentList",clone:"clone",ids:"ids",httpConfig:"_$httpConfig",reqParams:"reqParams",one:"one",all:"all",several:"several",oneUrl:"oneUrl",allUrl:"allUrl",customPUT:"customPUT",customPOST:"customPOST",customDELETE:"customDELETE",customGET:"customGET",customGETLIST:"customGETLIST",customOperation:"customOperation",doPUT:"doPUT",doPOST:"doPOST",doDELETE:"doDELETE",doGET:"doGET",doGETLIST:"doGETLIST",fromServer:"fromServer",withConfig:"withConfig",withHttpConfig:"withHttpConfig",singleOne:"singleOne",plain:"plain",save:"save",restangularized:"restangularized"},e.setRestangularFields=function(e){return t.restangularFields=_.extend(t.restangularFields,e),this},t.isRestangularized=function(e){return!!e[t.restangularFields.restangularized]},t.setFieldToElem=function(e,t,n){var r=e.split("."),i=t;return _.each(_.initial(r),function(e){i[e]={},i=i[e]}),i[_.last(r)]=n,this},t.getFieldFromElem=function(e,t){var n=e.split("."),r=t;return _.each(n,function(e){r&&(r=r[e])}),angular.copy(r)},t.setIdToElem=function(e,n){return t.setFieldToElem(t.restangularFields.id,e,n),this},t.getIdFromElem=function(e){return t.getFieldFromElem(t.restangularFields.id,e)},t.isValidId=function(e){return""!==e&&!_.isUndefined(e)&&!_.isNull(e)},t.setUrlToElem=function(e,n){return t.setFieldToElem(t.restangularFields.selfLink,e,n),this},t.getUrlFromElem=function(e){return t.getFieldFromElem(t.restangularFields.selfLink,e)},t.useCannonicalId=_.isUndefined(t.useCannonicalId)?!1:t.useCannonicalId,e.setUseCannonicalId=function(e){return t.useCannonicalId=e,this},t.getCannonicalIdFromElem=function(e){var n=e[t.restangularFields.cannonicalId],r=t.isValidId(n)?n:t.getIdFromElem(e);return r},t.responseInterceptors=t.responseInterceptors||[],t.defaultResponseInterceptor=function(e){return e},t.responseExtractor=function(e,n,r,i,o,a){var s=angular.copy(t.responseInterceptors);s.push(t.defaultResponseInterceptor);var l=e;return _.each(s,function(e){l=e(l,n,r,i,o,a)}),l},e.addResponseInterceptor=function(e){return t.responseInterceptors.push(e),this},t.errorInterceptors=t.errorInterceptors||[],e.addErrorInterceptor=function(e){return t.errorInterceptors.push(e),this},e.setResponseInterceptor=e.addResponseInterceptor,e.setResponseExtractor=e.addResponseInterceptor,e.setErrorInterceptor=e.addErrorInterceptor,t.requestInterceptors=t.requestInterceptors||[],t.defaultInterceptor=function(e,t,n,r,i,o,a){return{element:e,headers:i,params:o,httpConfig:a}},t.fullRequestInterceptor=function(e,n,r,i,o,a,s){var l=angular.copy(t.requestInterceptors),u=t.defaultInterceptor(e,n,r,i,o,a,s);return _.reduce(l,function(e,t){return _.extend(e,t(e.element,n,r,i,e.headers,e.params,e.httpConfig))},u)},e.addRequestInterceptor=function(e){return t.requestInterceptors.push(function(t,n,r,i,o,a,s){return{headers:o,params:a,element:e(t,n,r,i),httpConfig:s}}),this},e.setRequestInterceptor=e.addRequestInterceptor,e.addFullRequestInterceptor=function(e){return t.requestInterceptors.push(e),this},e.setFullRequestInterceptor=e.addFullRequestInterceptor,t.onBeforeElemRestangularized=t.onBeforeElemRestangularized||function(e){return e},e.setOnBeforeElemRestangularized=function(e){return t.onBeforeElemRestangularized=e,this},e.setRestangularizePromiseInterceptor=function(e){return t.restangularizePromiseInterceptor=e,this},t.onElemRestangularized=t.onElemRestangularized||function(e){return e},e.setOnElemRestangularized=function(e){return t.onElemRestangularized=e,this},t.shouldSaveParent=t.shouldSaveParent||function(){return!0},e.setParentless=function(e){return _.isArray(e)?t.shouldSaveParent=function(t){return!_.contains(e,t)}:_.isBoolean(e)&&(t.shouldSaveParent=function(){return!e}),this},t.suffix=_.isUndefined(t.suffix)?null:t.suffix,e.setRequestSuffix=function(e){return t.suffix=e,this},t.transformers=t.transformers||{},e.addElementTransformer=function(n,r,i){var o=null,a=null;2===arguments.length?a=r:(a=i,o=r);var s=t.transformers[n];return s||(s=t.transformers[n]=[]),s.push(function(e,t){return _.isNull(o)||e===o?a(t):t}),e},e.extendCollection=function(t,n){return e.addElementTransformer(t,!0,n)},e.extendModel=function(t,n){return e.addElementTransformer(t,!1,n)},t.transformElem=function(e,n,r,i,o){if(!o&&!t.transformLocalElements&&!e[t.restangularFields.fromServer])return e;var a=t.transformers[r],s=e;return a&&_.each(a,function(e){s=e(n,s)}),t.onElemRestangularized(s,n,r,i)},t.transformLocalElements=_.isUndefined(t.transformLocalElements)?!1:t.transformLocalElements,e.setTransformOnlyServerElements=function(e){t.transformLocalElements=!e},t.fullResponse=_.isUndefined(t.fullResponse)?!1:t.fullResponse,e.setFullResponse=function(e){return t.fullResponse=e,this},t.urlCreatorFactory={};var o=function(){};o.prototype.setConfig=function(e){return this.config=e,this},o.prototype.parentsArray=function(e){for(var t=[];e;)t.push(e),e=e[this.config.restangularFields.parentResource];return t.reverse()},o.prototype.resource=function(e,r,i,o,a,s,l,u){var c=_.defaults(a||{},this.config.defaultRequestParams.common),f=_.defaults(o||{},this.config.defaultHeaders);l&&(t.isSafe(u)?f["If-None-Match"]=l:f["If-Match"]=l);var d=this.base(e);if(s){var p="";/\/$/.test(d)||(p+="/"),p+=s,d+=p}return this.config.suffix&&-1===d.indexOf(this.config.suffix,d.length-this.config.suffix.length)&&!this.config.getUrlFromElem(e)&&(d+=this.config.suffix),e[this.config.restangularFields.httpConfig]=void 0,n(this.config,r,d,{getList:this.config.withHttpValues(i,{method:"GET",params:c,headers:f}),get:this.config.withHttpValues(i,{method:"GET",params:c,headers:f}),jsonp:this.config.withHttpValues(i,{method:"jsonp",params:c,headers:f}),put:this.config.withHttpValues(i,{method:"PUT",params:c,headers:f}),post:this.config.withHttpValues(i,{method:"POST",params:c,headers:f}),remove:this.config.withHttpValues(i,{method:"DELETE",params:c,headers:f}),head:this.config.withHttpValues(i,{method:"HEAD",params:c,headers:f}),trace:this.config.withHttpValues(i,{method:"TRACE",params:c,headers:f}),options:this.config.withHttpValues(i,{method:"OPTIONS",params:c,headers:f}),patch:this.config.withHttpValues(i,{method:"PATCH",params:c,headers:f})})};var a=function(){};a.prototype=new o,a.prototype.normalizeUrl=function(e){var t=/(http[s]?:\/\/)?(.*)?/.exec(e);return t[2]=t[2].replace(/[\\\/]+/g,"/"),"undefined"!=typeof t[1]?t[1]+t[2]:t[2]},a.prototype.base=function(e){var n=this;return _.reduce(this.parentsArray(e),function(e,r){var i,o=n.config.getUrlFromElem(r);if(o){if(n.config.isAbsoluteUrl(o))return o;i=o}else if(i=r[n.config.restangularFields.route],r[n.config.restangularFields.restangularCollection]){var a=r[n.config.restangularFields.ids];a&&(i+="/"+a.join(","))}else{var s;s=n.config.useCannonicalId?n.config.getCannonicalIdFromElem(r):n.config.getIdFromElem(r),t.isValidId(s)&&!r.singleOne&&(i+="/"+(n.config.encodeIds?encodeURIComponent(s):s))}return e=e.replace(/\/$/,"")+"/"+i,n.normalizeUrl(e)},this.config.baseUrl)},a.prototype.fetchUrl=function(e,t){var n=this.base(e);return t&&(n+="/"+t),n},a.prototype.fetchRequestedUrl=function(e,n){function r(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function i(e,t,n){for(var i=r(e),o=0;on;n++){var i=t[n];e[i.name()]=i}return e}},{key:"getNonOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!1)}},{key:"getOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!0)}},{key:"getReferencedLists",value:function(){for(var e={},t=this._fields.filter(function(e){return"referenced_list"===e.type()}),n=0,r=t.length;r>n;n++){var i=t[n];e[i.name()]=i}return e}},{key:"template",value:function(e){return arguments.length?(this._template=e,this):this._template}},{key:"identifier",value:function(){return this.entity.identifier()}},{key:"actions",value:function(e){return arguments.length?(this._actions=e,this):this._actions}},{key:"removeFields",value:function(){return this._fields=[],this}},{key:"getFields",value:function(){return this._fields}},{key:"getField",value:function(e){return this._fields.filter(function(t){return t.name()===e})[0]}},{key:"getFieldsOfType",value:function(e){return this._fields.filter(function(t){return t.type()===e})}},{key:"addField",value:function(e){return null===e.order()&&e.order(this._fields.length,!0),this._fields.push(e),this._fields=this._fields.sort(function(e,t){return e.order()-t.order()}),this}},{key:"getErrorMessage",value:function(e){return"function"==typeof this._errorMessage?this._errorMessage(e):this._errorMessage}},{key:"errorMessage",value:function(e){return arguments.length?(this._errorMessage=e,this):this._errorMessage}},{key:"url",value:function(e){return arguments.length?(this._url=e,this):this._url}},{key:"getUrl",value:function(e){return"function"==typeof this._url?this._url(e):this._url}},{key:"validate",value:function(e){this._fields.map(function(t){var n=t.validation();"function"==typeof n.validator&&n.validator(e.values[t.name()])})}},{key:"_getReferencesByOptimizationType",value:function(){var e=void 0===arguments[0]?!0:arguments[0],t={},n=this.getReferences();for(var r in n){var i=n[r];!!i.getSingleApiCall()===e&&(t[r]=i)}return t}}],[{key:"flatten",value:function(t){if("Object"===t.constructor.name){console.warn("Passing literal of Field to fields method is deprecated use array instead");var n=[];for(var r in t)n=n.concat(e.flatten(t[r]));return n}return Array.isArray(t)?t.reduce(function(t,n){return t.concat(e.flatten(n))},[]):[t]}}]),e}());t["default"]=s,e.exports=t["default"]},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Di(r):{},Di(Go,r,!1),p(r);var i=r.value;"string"==typeof i&&(i=new ma(i,r.mode)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),a=this.display=new t(n,i,o);a.wrapper.CodeMirror=this,u(this),s(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!Co&&a.input.focus(),m(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new _i,keySeq:null,specialChars:null};var l=this;po&&11>ho&&setTimeout(function(){l.display.input.reset(!0)},20),Vt(this),Ui(),yt(this),this.curOp.forceUpdate=!0,qr(this,i),r.autofocus&&!Co||l.hasFocus()?setTimeout(Ni(pn,this),20):hn(this);for(var c in Ko)Ko.hasOwnProperty(c)&&Ko[c](this,r[c],Yo);x(this),r.finishInit&&r.finishInit(this);for(var f=0;fho&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),go||uo&&Co||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Fe(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(Ba(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Wa(e.display.wrapper,"CodeMirror-wrap"),d(e)),a(e),Dt(e),ot(e),setTimeout(function(){y(e)},100)}function o(e){var t=vt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/mt(e.display)-3);return function(i){if(yr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function p(e){var t=Oi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+We(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+ze(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var r=this.vert=ji("div",[ji("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=ji("div",[ji("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ca(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ca(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,po&&8>ho&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function m(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Wa(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ca(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?en(t,e):Zt(t,e)},t),t.display.scrollbars.addClass&&Ba(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&A(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function w(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-He(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Jr(t,r),a=Jr(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=Jr(t,Zr(Gr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Jr(t,Zr(Gr(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function $(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=E(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==It(e))return!1;x(e)&&(Lt(e),t.dims=D(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ro&&(o=vr(e.doc,o),a=mr(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;jt(e,o,a),n.viewOffset=Zr(Gr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=It(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Hi();return l>4&&(n.lineDiv.style.display="none"),N(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Hi()!=u&&u.offsetHeight&&u.focus(),Ii(n.cursorDiv),Ii(n.selectionDiv),n.gutters.style.height=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fe(e,400)),n.updateLineNumbers=null,!0}function T(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ue(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+We(e.display)-qe(e),n.top)}),t.visible=w(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&S(e,t);r=!1){A(e);var i=h(e);Me(e),R(e,i),y(e,i)}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function O(e,t){var n=new _(e,t);if(S(e,n)){A(e),T(e,n);var r=h(e);Me(e),R(e,r),y(e,r),n.finish()}}function R(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+ze(e),t.clientHeight)+"px"}function A(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rho){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var l=o.line.height-i;if(2>i&&(i=vt(t)),(l>.001||-.001>l)&&(Qr(o.line,i),M(o.line),o.rest))for(var u=0;u=t&&f.lineNumber;f.changes&&(Oi(f.changes,"gutter")>-1&&(d=!1),L(e,f,u,n)),d&&(Ii(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(C(e.options,u)))),s=f.node.nextSibling}else{var p=B(e,f,u,n);a.insertBefore(p,s)}u+=f.size}for(;s;)s=r(s)}function L(e,t,n,r){for(var i=0;iho&&(e.node.style.zIndex=2)),e.node}function F(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=P(e);e.background=n.insertBefore(ji("div",null,t),n.firstChild)}}function j(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Nr(e,t)}function I(e,t){var n=t.text.className,r=j(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,V(t)):n&&(t.text.className=n)}function V(e){F(e),e.line.wrapClass?P(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function H(e,t,n,r){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=P(t),a=t.gutter=ji("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px");if(e.display.input.setUneditable(a),o.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(ji("div",C(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s1&&(Do&&Do.join("\n")==t?s=r.ranges.length%Do.length==0&&Ri(Do,qa):a.length==r.ranges.length&&(s=Ri(a,function(e){return[e]})));for(var l=r.ranges.length-1;l>=0;l--){var u=r.ranges[l],c=u.from(),f=u.to();u.empty()&&(n&&n>0?c=Ao(c.line,c.ch-n):e.state.overwrite&&!e.state.pasteIncoming&&(f=Ao(f.line,Math.min(Gr(o,f.line).text.length,f.ch+Ti(a).length))));var d=e.curOp.updateInput,p={from:c,to:f,text:s?s[l%s.length]:a,origin:i||(e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input")};xn(e.doc,p),bi(e,"inputRead",e,p)}t&&!e.state.pasteIncoming&&Z(e,t),Nn(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Pn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Pn(e,i.head.line,"smart"));a&&bi(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?u.map:c[i],a=0;ai?e.line:e.rest[i]),f=o[a]+r;return(0>r||s!=t)&&(f=o[a+(r?1:0)]),Ao(l,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Ia(i,t))return ae(Ao(Xr(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Ti(e.rest):e.line;return ae(Ao(Xr(a),a.text.length),o)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,f=r(s,l,n);if(f)return ae(f,o);for(var d=l.nextSibling,p=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(f=r(d,d.firstChild,0))return ae(Ao(f.line,f.ch-p),o);p+=d.textContent.length}for(var h=l.previousSibling,p=n;h;h=h.previousSibling){if(f=r(h,h.firstChild,-1))return ae(Ao(f.line,f.ch+p),o);p+=d.textContent.length}}function ue(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var u,c=t.getAttribute("cm-marker");if(c){var f=e.findMarks(Ao(r,0),Ao(i+1,0),o(+c));return void(f.length&&(u=f[0].find())&&(s+=Kr(e.doc,u.from,u.to).join("\n")))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var a=Y(o.from(),i.from()),s=K(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(l?s:a,l?a:s))}}return new ce(e,t)}function pe(e,t){return new ce([new fe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.linen?Ao(n,Gr(e,n).text.length):ve(t,Gr(e,t.line).text.length)}function ve(e,t){var n=e.ch;return null==n||n>t?Ao(e.line,t):0>n?Ao(e.line,0):e}function me(e,t){return t>=e.first&&t=o.ch:u.to>o.ch))){if(r&&(_a(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var f=c.find(0>a?-1:1);if(0==Mo(f,o)&&(f.ch+=a,f.ch<0?f=f.line>e.first?ge(e,Ao(f.line-1)):null:f.ch>s.text.length&&(f=f.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(ji("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return ct(e,Ao(t,n),"div",f,r)}var s,l,f=Gr(a,t),d=f.text.length;return Qi(ei(f),n||0,null==i?d:i,function(e,t,a){var f,p,h,g=o(e,"left");if(e==t)f=g,p=h=g.left;else{if(f=o(t-1,"right"),"rtl"==a){var v=g;g=f,f=v}p=g.left,h=f.right}null==n&&0==e&&(p=u),f.top-g.top>3&&(r(p,g.top,null,g.bottom),p=u,g.bottoml.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),u+1>p&&(p=u),r(p,f.top,h-p,f.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=Be(e.display),u=l.left,c=Math.max(o.sizerWidth,Ue(e)-o.sizer.offsetLeft)-l.right,f=t.from(),d=t.to();if(f.line==d.line)i(f.line,f.ch,d.ch);else{var p=Gr(a,f.line),h=Gr(a,d.line),g=hr(p)==hr(h),v=i(f.line,f.ch,g?p.text.length+1:null).end,m=i(d.line,g?0:null,d.ch).start;g&&(v.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ta(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=Rr(e,o,r,!0);o.styles=s.styles;var l=o.styleClasses,u=s.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!c&&fn?(Fe(e,e.options.workDelay),!0):void 0}),i.length&&St(e,function(){for(var t=0;ta;--s){if(s<=o.first)return o.first;var l=Gr(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Ma(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Ie(e,t,n),a=o>r.first&&Gr(r,o-1).stateAfter;return a=a?ta(r.mode,a):na(r.mode),r.iter(o,t,function(n){Mr(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ye(e,t){t=hr(t);var n=Xr(t),r=e.display.externalMeasured=new At(e.doc,t,n);r.lineN=n;var i=r.built=Nr(e,r);return r.text=i.pre,Vi(e.display.lineMeasure,i.pre),r}function Qe(e,t,n,r){return Ze(e,Je(e,t),n,r)}function Xe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):u>t?(i=t-l,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-l,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&i==u-l)for(;sc;c++){for(;s&&Fi(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+lho&&0==s&&l==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(po&&e.options.lineWrapping){var f=La(a,s,l).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Fo}else i=La(a,s,l).getBoundingClientRect()||Fo;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}po&&11>ho&&(i=nt(e.display.measure,i))}else{s>0&&(u=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(po&&9>ho&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+mt(e.display),top:d.top,bottom:d.bottom}:Fo}for(var p=i.top-t.rect.top,h=i.bottom-t.rect.top,g=(p+h)/2,v=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||Gr(e.doc,t.line),i||(i=Je(e,r));var l=ei(r),u=t.ch;if(!l)return a(u);var c=oo(l,u),f=s(u,c);return null!=Xa&&(f.other=s(u,Xa)),f}function dt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=mt(e.display)*t.ch);var r=Gr(e.doc,t.line),i=Zr(r)+He(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function pt(e,t,n,r){var i=Ao(e,t);return i.xRel=r,n&&(i.outside=!0),i}function ht(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return pt(r.first,0,!0,-1);var i=Jr(r,n),o=r.first+r.size-1;if(i>o)return pt(r.first+r.size-1,Gr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Gr(r,i);;){var s=gt(e,a,i,t,n),l=dr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=Xr(a=u.to.line)}}function gt(e,t,n,r,i){function o(r){var i=ft(e,Ao(n,r),"line",t,u);return s=!0,a>i.bottom?i.left-l:av)return pt(n,p,m,1);for(;;){if(c?p==d||p==so(t,d,1):1>=p-d){for(var y=h>r||v-r>=r-h?d:p,b=r-(y==d?h:v);Fi(t.text.charAt(y));)++y;var w=pt(n,y,y==d?g:m,-1>b?-1:b>1?1:0);return w}var $=Math.ceil(f/2),x=d+$;if(c){x=d;for(var C=0;$>C;++C)x=so(t,x,1)}var E=o(x);E>r?(p=x,v=E,(m=s)&&(v+=1e3),f=$):(d=x,h=E,g=s,f-=$)}}function vt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==No){No=ji("pre");for(var t=0;49>t;++t)No.appendChild(document.createTextNode("x")),No.appendChild(ji("br"));No.appendChild(document.createTextNode("x"))}Vi(e.measure,No);var n=No.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Ii(e.measure),n||1}function mt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=ji("span","xxxxxxxxxx"),n=ji("pre",[t]);Vi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function yt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Io},jo?jo.ops.push(e.curOp):e.curOp.ownsGroup=jo={ops:[e.curOp],delayedCallbacks:[]}}function bt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new _(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&S(e.cm,e.update)}function Et(e){var t=e.cm,n=t.display;e.updatedDisplay&&A(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+ze(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ue(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function _t(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new At(e.doc,Gr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ro&&vr(e.doc,t)i.viewFrom?Lt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Lt(e);else if(t<=i.viewFrom){var o=Ft(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Lt(e)}else if(n>=i.viewTo){var o=Ft(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Lt(e)}else{var a=Ft(e,t,t,-1),s=Ft(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Mt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Lt(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Pt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Oi(a,n)&&a.push(n)}}}function Lt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Pt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Ft(e,t,n,r){var i,o=Pt(e,t),a=e.display.view;if(!Ro||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;vr(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function jt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Pt(e,n)))),r.viewTo=n}function It(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ca(i.scroller,"mousedown",Tt(e,Ut)),po&&11>ho?Ca(i.scroller,"dblclick",Tt(e,function(t){if(!$i(e,t)){var n=zt(e,t);if(n&&!Qt(e,t)&&!Bt(e.display,t)){wa(t);var r=e.findWordAt(n);we(e.doc,r.anchor,r.head)}}})):Ca(i.scroller,"dblclick",function(t){$i(e,t)||wa(t)}),To||Ca(i.scroller,"contextmenu",function(t){gn(e,t)});var o,a={end:0};Ca(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Ca(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ca(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Bt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new fe(Ao(s.line,0),ge(e.doc,Ao(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),wa(n)}t()}),Ca(i.scroller,"touchcancel",t),Ca(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zt(e,i.scroller.scrollTop),en(e,i.scroller.scrollLeft,!0),_a(e,"scroll",e))}),Ca(i.scroller,"mousewheel",function(t){tn(e,t)}),Ca(i.scroller,"DOMMouseScroll",function(t){tn(e,t)}),Ca(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={simple:function(t){$i(e,t)||xa(t)},start:function(t){Jt(e,t)},drop:Tt(e,Xt)};var s=i.input.getField();Ca(s,"keyup",function(t){cn.call(e,t)}),Ca(s,"keydown",Tt(e,ln)),Ca(s,"keypress",Tt(e,fn)),Ca(s,"focus",Ni(pn,e)),Ca(s,"blur",Ni(hn,e))}function Ht(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?Ca:Ea;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.simple),a(t.display.scroller,"dragover",o.simple),a(t.display.scroller,"drop",o.drop)}}function Wt(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Bt(e,t){for(var n=mi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function zt(e,t,n,r){var i=e.display;if(!n&&"true"==mi(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=ht(e,o,a);if(r&&1==u.xRel&&(l=Gr(e.doc,u.line).text).length==u.ch){var c=Ma(l,l.length,e.options.tabSize)-l.length;u=Ao(u.line,Math.max(0,Math.round((o-Be(e.display).left)/mt(e.display))-c))}return u}function Ut(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||$i(t,e))){if(n.shift=e.shiftKey,Bt(n,e))return void(go||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Qt(t,e)){var r=zt(t,e);switch(window.focus(),yi(e)){case 1:r?qt(t,e,r):mi(e)==n.scroller&&wa(e);break;case 2:go&&(t.state.lastMiddleDown=+new Date),r&&we(t.doc,r),setTimeout(function(){n.input.focus()},20),wa(e);break;case 3:To?gn(t,e):dn(t)}}}}function qt(e,t,n){po?setTimeout(Ni(Q,e),0):e.curOp.focus=Hi();var r,i=+new Date;Po&&Po.time>i-400&&0==Mo(Po.pos,n)?r="triple":Lo&&Lo.time>i-400&&0==Mo(Lo.pos,n)?(r="double",Po={time:i,pos:n}):(r="single",Lo={time:i,pos:n});var o,a=e.doc.sel,s=Eo?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ua&&!X(e)&&"single"==r&&(o=a.contains(n))>-1&&!a.ranges[o].empty()?Gt(e,t,n,s):Kt(e,t,n,r,s)}function Gt(e,t,n,r){var i=e.display,o=+new Date,a=Tt(e,function(s){go&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ea(document,"mouseup",a),Ea(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(wa(s),!r&&+new Date-200=h;h++){var m=Gr(u,h).text,y=ki(m,l,o);l==p?i.push(new fe(Ao(h,y),Ao(h,y))):m.length>y&&i.push(new fe(Ao(h,y),Ao(h,ki(m,p,o))))}i.length||i.push(new fe(n,n)),ke(u,de(d.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,$=t;if("single"!=r){if("double"==r)var x=e.findWordAt(t);else var x=new fe(Ao(t.line,0),ge(u,Ao(t.line+1,0)));Mo(x.anchor,w)>0?($=x.head,w=Y(b.from(),x.anchor)):($=x.anchor,w=K(b.to(),x.head))}var i=d.ranges.slice(0);i[f]=new fe(ge(u,w),$),ke(u,de(i,f),Ra)}}function a(t){var n=++y,i=zt(e,t,!0,"rect"==r);if(i)if(0!=Mo(i,v)){e.curOp.focus=Hi(),o(i);var s=w(l,u);(i.line>=s.to||i.linem.bottom?20:0;c&&setTimeout(Tt(e,function(){y==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(e){y=1/0,wa(e),l.input.focus(),Ea(document,"mousemove",b),Ea(document,"mouseup",$),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;wa(t);var c,f,d=u.sel,p=d.ranges;if(i&&!t.shiftKey?(f=u.sel.contains(n),c=f>-1?p[f]:new fe(n,n)):(c=u.sel.primary(),f=u.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=zt(e,t,!0,!0),f=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?be(u,c,h.anchor,h.head):h}else if("triple"==r){var g=new fe(Ao(n.line,0),ge(u,Ao(n.line+1,0)));c=e.display.shift||u.extend?be(u,c,g.anchor,g.head):g}else c=be(u,c,n);i?-1==f?(f=p.length,ke(u,de(p.concat([c]),f),{scroll:!1,origin:"*mouse"})):p.length>1&&p[f].empty()&&"single"==r&&!t.shiftKey?(ke(u,de(p.slice(0,f).concat(p.slice(f+1)),0)),d=u.sel):xe(u,f,c,Ra):(f=0,ke(u,new ce([c],0),Ra),d=u.sel);var v=n,m=l.wrapper.getBoundingClientRect(),y=0,b=Tt(e,function(e){yi(e)?a(e):s(e)}),$=Tt(e,s);Ca(document,"mousemove",b),Ca(document,"mouseup",$)}function Yt(e,t,n,r,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&wa(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(a>l.bottom||!Ci(e,n))return vi(t);a-=l.top-s.viewOffset;for(var u=0;u=o){var f=Jr(e.doc,a),d=e.options.gutters[u];return i(e,n,e,f,d,t),vi(t)}}}function Qt(e,t){return Yt(e,t,"gutterClick",!0,bi)}function Xt(e){var t=this;if(!$i(t,e)&&!Bt(t.display,e)){wa(e),po&&(Vo=+new Date);var n=zt(t,e,!0),r=e.dataTransfer.files;if(n&&!X(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){var s=new FileReader;s.onload=Tt(t,function(){if(o[r]=s.result,++a==i){n=ge(t.doc,n);var e={from:n,to:n,text:qa(o.join("\n")),origin:"paste"};xn(t.doc,e),_e(t.doc,pe(n,qo(e)))}}),s.readAsText(e)},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Eo?e.altKey:e.ctrlKey))var u=t.listSelections();if(Se(t.doc,pe(n,n)),u)for(var l=0;la.clientWidth||i&&a.scrollHeight>a.clientHeight){if(i&&Eo&&go)e:for(var s=t.target,l=o.view;s!=a;s=s.parentNode)for(var u=0;uc?f=Math.max(0,f+c-50):d=Math.min(e.doc.height,d+c+50),O(e,{top:f,bottom:d})}20>Ho&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Wo=(Wo*Ho+n)/(Ho+1),++Ho)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function nn(e,t,n){if("string"==typeof t&&(t=ra[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{X(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ta}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function rn(e,t,n){for(var r=0;rho&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=an(t,e);yo&&(Uo=r?n:null,!r&&88==n&&!Ka&&(Eo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||un(t)}}function un(e){function t(e){18!=e.keyCode&&e.altKey||(Wa(n,"CodeMirror-crosshair"),Ea(document,"keyup",t),Ea(document,"mouseover",t))}var n=e.display.lineDiv;Ba(n,"CodeMirror-crosshair"),Ca(document,"keyup",t),Ca(document,"mouseover",t)}function cn(e){16==e.keyCode&&(this.doc.sel.shift=!1),$i(this,e)}function fn(e){var t=this;if(!(Bt(t.display,e)||$i(t,e)||e.ctrlKey&&!e.altKey||Eo&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(yo&&n==Uo)return Uo=null,void wa(e);if(!yo||e.which&&!(e.which<10)||!an(t,e)){var i=String.fromCharCode(null==r?n:r);sn(t,e,i)||t.display.input.onKeyPress(e)}}}function dn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,hn(e))},100)}function pn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(_a(e,"focus",e),e.state.focused=!0,Ba(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),go&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Pe(e))}function hn(e){e.state.delayingBlurEvent||(e.state.focused&&(_a(e,"blur",e),e.state.focused=!1,Wa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function gn(e,t){Bt(e.display,t)||vn(e,t)||e.display.input.onContextMenu(t)}function vn(e,t){return Ci(e,"gutterContextMenu")?Yt(e,t,"gutterContextMenu",!1,_a):!1}function mn(e,t){if(Mo(e,t.from)<0)return e;if(Mo(e,t.to)<=0)return qo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=qo(t).ch-t.to.ch),Ao(n,r)}function yn(e,t){for(var n=[],r=0;r=0;--i)Cn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Cn(e,t)}}function Cn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Mo(t.from,t.to)){var n=yn(e,t);oi(e,t,n,e.cm?e.cm.curOp.id:NaN),kn(e,t,n,tr(e,t));var r=[];Ur(e,function(e,n){n||-1!=Oi(r,e.history)||(gi(e.history,t),r.push(e.history)),kn(e,t,null,tr(e,t))})}}function En(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--l){var f=r.changes[l];if(f.origin=t,c&&!$n(e,f,!1))return void(a.length=0);u.push(ni(e,f));var d=l?yn(e,f):Ti(a);kn(e,f,d,rr(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:qo(f)});var p=[];Ur(e,function(e,t){t||-1!=Oi(p,e.history)||(gi(e.history,f),p.push(e.history)),kn(e,f,null,rr(e,f))})}}}}function _n(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Ri(e.sel.ranges,function(e){return new fe(Ao(e.anchor.line+t,e.anchor.ch),Ao(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Ao(o,Gr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Kr(e,t.from,t.to),n||(n=yn(e,t)),e.cm?Sn(e.cm,t,r):Wr(e,t,r),Se(e,n,Oa)}}function Sn(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Xr(hr(Gr(r,a.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&xi(e),Wr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),Fe(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Dt(e):a.line!=s.line||1!=t.text.length||Hr(e.doc,t)?Dt(e,a.line,s.line+1,c):Nt(e,a.line,"text");var d=Ci(e,"changes"),p=Ci(e,"change");if(p||d){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&bi(e,"change",e,h),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Tn(e,t,n,r,i){if(r||(r=n),Mo(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=qa(t)),xn(e,{from:n,to:r,text:t,origin:i})}function On(e,t){if(!$i(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!$o){var o=ji("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-He(e.display))+"px; height: "+(t.bottom-t.top+ze(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Rn(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=ft(e,t),s=n&&n!=t?ft(e,n):a,l=Mn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(Zt(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(en(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function An(e,t,n,r,i){var o=Mn(e,t,n,r,i);null!=o.scrollTop&&Zt(e,o.scrollTop),null!=o.scrollLeft&&en(e,o.scrollLeft)}function Mn(e,t,n,r,i){var o=e.display,a=vt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=qe(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+We(o),f=a>n,d=i>c-a;if(s>n)u.scrollTop=f?0:n;else if(i>s+l){var p=Math.min(n,(d?c:i)-l);p!=s&&(u.scrollTop=p)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ue(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=r-t>g;return v&&(r=t+g),10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(v?0:10)):r>g+h-3&&(u.scrollLeft=r+(v?0:10)-g),u}function Dn(e,t,n){(null!=t||null!=n)&&Ln(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Nn(e){Ln(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Ao(t.line,t.ch-1):t,r=Ao(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Ln(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=Mn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Pn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ve(e,t):n="prev");var a=e.options.tabSize,s=Gr(o,t),l=Ma(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Ta||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Ma(Gr(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)d+=a,f+=" ";if(u>d&&(f+=Si(u-d)),f!=c)return Tn(o,f,Ao(t,0),Ao(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p=0;t--)Tn(e.doc,"",r[t].from,r[t].to,"+delete");Nn(e)})}function In(e,t,n,r,i){function o(){var t=s+n;return t=e.first+e.size?f=!1:(s=t,c=Gr(e,t))}function a(e){var t=(i?so:lo)(c,l,n,!0);if(null==t){if(e||!o())return f=!1;l=i?(0>n?eo:Zi)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Gr(e,s),f=!0;if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var d=null,p="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(0>n)||a(!g);g=!1){var v=c.text.charAt(l)||"\n",m=Li(v,h)?"w":p&&"\n"==v?"n":!p||/\s/.test(v)?null:"p";if(!p||g||m||(m="s"),d&&d!=m){0>n&&(n=1,a());break}if(m&&(d=m),n>0&&!a(!g))break}var y=Ae(e,Ao(s,l),u,!0);return f||(y.hitSide=!0),y}function Vn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*vt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=ht(e,a,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Hn(t,n,r,i){e.defaults[t]=n,r&&(Ko[t]=i?function(e,t,n){n!=Yo&&r(e,t,n)}:r)}function Wn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ji("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(pr(e,t.line,t,n,o)||t.line!=n.line&&pr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ro=!0}o.addToHistory&&oi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&hr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Qr(e,0),Jn(e,new Yn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){yr(e,t)&&Qr(t,0)}),o.clearOnEnter&&Ca(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Oo=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ua,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Dt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Nt(u,c,"text");o.atomic&&Oe(u.doc),bi(u,"markerAdded",u,o)}return o}function Un(e,t,n,r,i){r=Di(r),r.shared=!1;var o=[zn(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Ur(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(zn(e,ge(e,t),ge(e,n),r,i));for(var l=0;l=t:o.to>t);(r||(r=[])).push(new Yn(a,o.from,l?null:o.to))}}return r}function er(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var f=0;ff;++f)h.push(g);h.push(l)}return h}function nr(e){for(var t=0;t0)){var c=[l,1],f=Mo(u.from,s.from),d=Mo(u.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function or(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Mo(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Mo(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function hr(e){for(var t;t=fr(e);)e=t.find(-1,!0).line;return e}function gr(e){for(var t,n;t=dr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function vr(e,t){var n=Gr(e,t),r=hr(n);return n==r?t:Xr(r)}function mr(e,t){if(t>e.lastLine())return t;var n,r=Gr(e,t);if(!yr(e,r))return t;for(;n=dr(r);)r=n.find(1,!0).line;return Xr(r)+1}function yr(e,t){var n=Ro&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Tr(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?ta(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=ge(a,t);var l,u=Gr(a,t.line),c=Ve(e,t.line,n),f=new la(u.text,e.options.tabSize);for(r&&(l=[]);(r||f.pose.options.maxHighlightLength?(s=!1,a&&Mr(e,t,r,f.pos),f.pos=t.length,l=null):l=_r(Sr(n,f,r,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;uu;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Ar(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Rr(e,t,t.stateAfter=Ve(e,Xr(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Mr(e,t,n,r){var i=e.doc.mode,o=new la(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&kr(i,n);!o.eol()&&o.pos<=e.options.maxHighlightLength;)Sr(i,o,n),o.start=o.pos}function Dr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ga:ha;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Nr(e,t){var n=ji("span",null,null,go?"padding-right: .1px":null),r={pre:ji("pre",[n]),content:n,col:0,pos:0,cm:e,splitSpaces:(po||go)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Pr,Ki(e.display.measure)&&(o=ei(a))&&(r.addToken=jr(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&Xr(a);Vr(a,r,Ar(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Bi(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Bi(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Gi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return go&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),_a(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Bi(r.pre.className,r.textClass||"")),r}function Lr(e){var t=ji("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Pr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Fr):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var d=l.exec(t),p=d?d.index-f:t.length-f;if(p){var h=document.createTextNode(s.slice(f,f+p));po&&9>ho?c.appendChild(ji("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(f+=p+1," "==d[0]){var g=e.cm.options.tabSize,v=g-e.col%g,h=c.appendChild(ji("span",Si(v),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=v}else{var h=e.cm.options.specialCharPlaceholder(d[0]);h.setAttribute("cm-text",d[0]),po&&9>ho?c.appendChild(ji("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),po&&9>ho&&(u=!0),e.pos+=t.length}if(n||r||i||u||a){var m=n||"";r&&(m+=r),i&&(m+=i);var y=ji("span",[c],m,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Fr(e){for(var t=" ",n=0;nu&&d.from<=u)break}if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function Ir(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Vr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,d,p=i.length,h=0,g=1,v="",m=0;;){if(m==h){l=u=c=f=s="",d=null,m=1/0;for(var y=[],b=0;bh||$.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&m>w.to&&(m=w.to,u=""),$.className&&(l+=" "+$.className),$.css&&(s=$.css),$.startStyle&&w.from==h&&(c+=" "+$.startStyle),$.endStyle&&w.to==m&&(u+=" "+$.endStyle),$.title&&!f&&(f=$.title),$.collapsed&&(!d||ur(d.marker,$)<0)&&(d=w)):w.from>h&&m>w.from&&(m=w.from)}if(d&&(d.from||0)==h){if(Ir(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}if(!d&&y.length)for(var b=0;b=p)break;for(var x=Math.min(p,m);;){if(v){var C=h+v.length;if(!d){var E=C>x?v.slice(0,x-h):v;t.addToken(t,E,a?a+l:l,c,h+E.length==m?u:"",f,s)}if(C>=x){v=v.slice(x-h),h=x;break}h=C,c=""}v=i.slice(o,o=n[g++]),a=Dr(n[g++],t.cm.options)}}else for(var g=1;gn;++n)o.push(new pa(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Gr(e,s.line),f=Gr(e,l.line),d=Ti(u),p=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Hr(e,t)){var g=a(0,u.length-1);o(f,f.text,p),h&&e.remove(s.line,h),g.length&&e.insert(s.line,g)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),p);else{var g=a(1,u.length-1);g.push(new pa(d+c.text.slice(l.ch),p,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,d+f.text.slice(l.ch),p);var g=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,g)}bi(e,"change",e,t)}function Br(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Kr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Yr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Qr(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Xr(e){if(null==e.parent)return null;for(var t=e.parent,n=Oi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Jr(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function Zr(e){e=hr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Ti(e.done)):void 0}function oi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ii(i,i.lastOp==r))){var s=Ti(o.changes);0==Mo(t.from,t.to)&&0==Mo(t.from,s.to)?s.to=qo(t):o.changes.push(ni(e,t))}else{var l=Ti(i.done);for(l&&l.ranges||li(e.sel,i.done),o={changes:[ni(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||_a(e,"historyAdded")}function ai(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function si(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ai(e,o,Ti(i.done),t))?i.done[i.done.length-1]=t:li(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ri(i.undone)}function li(e,t){var n=Ti(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ui(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ci(e){if(!e)return null;for(var t,n=0;n-1&&(Ti(s)[f]=c[f],delete c[f])}}}return i}function pi(e,t,n,r){n0}function Ei(e){e.prototype.on=function(e,t){Ca(this,e,t)},e.prototype.off=function(e,t){Ea(this,e,t)}}function _i(){this.id=null}function ki(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function Si(e){for(;Da.length<=e;)Da.push(Ti(Da)+" ");return Da[e]}function Ti(e){return e[e.length-1]}function Oi(e,t){for(var n=0;n-1&&Fa(e)?!0:t.test(e):Fa(e)}function Pi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Fi(e){return e.charCodeAt(0)>=768&&ja.test(e)}function ji(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Vi(e,t){return Ii(e).appendChild(t)}function Hi(){return document.activeElement}function Wi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Bi(e,t){for(var n=e.split(" "),r=0;r2&&!(po&&8>ho))}var n=Va?ji("span","​"):ji("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px"); -return n.setAttribute("cm-text",""),n}function Ki(e){if(null!=Ha)return Ha;var t=Vi(e,document.createTextNode("AخA")),n=La(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=La(t,1,2).getBoundingClientRect();return Ha=r.right-n.right<3}function Yi(e){if(null!=Ya)return Ya;var t=Vi(e,ji("span","x")),n=t.getBoundingClientRect(),r=La(t,0,1).getBoundingClientRect();return Ya=Math.abs(n.left-r.left)>1}function Qi(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function Xi(e){return e.level%2?e.to:e.from}function Ji(e){return e.level%2?e.from:e.to}function Zi(e){var t=ei(e);return t?Xi(t[0]):0}function eo(e){var t=ei(e);return t?Ji(Ti(t)):e.text.length}function to(e,t){var n=Gr(e.doc,t),r=hr(n);r!=n&&(t=Xr(r));var i=ei(r),o=i?i[0].level%2?eo(r):Zi(r):0;return Ao(t,o)}function no(e,t){for(var n,r=Gr(e.doc,t);n=dr(r);)r=n.find(1,!0).line,t=null;var i=ei(r),o=i?i[0].level%2?Zi(r):eo(r):r.text.length;return Ao(null==t?Xr(r):t,o)}function ro(e,t){var n=to(e,t.line),r=Gr(e.doc,n.line),i=ei(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Ao(n.line,a?0:o)}return n}function io(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function oo(e,t){Xa=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return io(e,i.level,e[n].level)?(i.from!=i.to&&(Xa=n),r):(i.from!=i.to&&(Xa=r),n);n=r}}return n}function ao(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Fi(e.text.charAt(t)));return t}function so(e,t,n,r){var i=ei(e);if(!i)return lo(e,t,n,r);for(var o=oo(i,t),a=i[o],s=ao(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?ao(e,a.to,-1,r):ao(e,a.from,1,r)}}function lo(e,t,n,r){var i=t+n;if(r)for(;i>0&&Fi(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var uo=/gecko\/\d/i.test(navigator.userAgent),co=/MSIE \d/.test(navigator.userAgent),fo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),po=co||fo,ho=po&&(co?document.documentMode||6:fo[1]),go=/WebKit\//.test(navigator.userAgent),vo=go&&/Qt\/\d+\.\d+/.test(navigator.userAgent),mo=/Chrome\//.test(navigator.userAgent),yo=/Opera\//.test(navigator.userAgent),bo=/Apple Computer/.test(navigator.vendor),wo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),$o=/PhantomJS/.test(navigator.userAgent),xo=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Co=xo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),Eo=xo||/Mac/.test(navigator.platform),_o=/win/i.test(navigator.platform),ko=yo&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);ko&&(ko=Number(ko[1])),ko&&ko>=15&&(yo=!1,go=!0);var So=Eo&&(vo||yo&&(null==ko||12.11>ko)),To=uo||po&&ho>=9,Oo=!1,Ro=!1;g.prototype=Di({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=Eo&&!wo?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){mi(e)!=t.vert&&mi(e)!=t.horiz&&Tt(t.cm,Ut)(e)};Ca(this.vert,"mousedown",n),Ca(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),v.prototype=Di({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":g,"null":v},_.prototype.signal=function(e,t){Ci(e,t)&&this.events.push(arguments)},_.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ca(o,"paste",function(){if(go&&!r.state.fakedLastChar&&!(new Date-r.state.lastMiddleDown<200)){var e=o.selectionStart,t=o.selectionEnd;o.value+="$",o.selectionEnd=t,o.selectionStart=e,r.state.fakedLastChar=!0}r.state.pasteIncoming=!0,n.fastPoll()}),Ca(o,"cut",t),Ca(o,"copy",t),Ca(e.scroller,"paste",function(t){Bt(e,t)||(r.state.pasteIncoming=!0,n.focus())}),Ca(e.lineSpace,"selectstart",function(t){Bt(e,t)||wa(t)}),Ca(o,"compositionstart",function(){var e=r.getCursor("from");n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ca(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=De(e);if(e.options.moveInputWithCursor){var i=ft(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Vi(n.cursorDiv,e.cursors),Vi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ka&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Na(this.textarea),po&&ho>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",po&&ho>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Co||Hi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(!e.state.focused||Ga(t)&&!n||X(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(po&&ho>=9&&this.hasSelection===r||Eo&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return St(e,function(){J(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){po&&ho>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,po&&9>ho&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!po||po&&9>ho)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Tt(i,ra.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=zt(i,e),l=o.scroller.scrollTop;if(s&&!yo){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Tt(i,ke)(i.doc,pe(s),Oa);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(po?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",go)var f=window.scrollY;if(o.input.focus(),go&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),po&&ho>=9&&t(),To){xa(e);var d=function(){Ea(window,"mouseup",d),setTimeout(n,20)};Ca(window,"mouseup",d)}else setTimeout(n,50)}},setUneditable:Ai,needsContentAttribute:!1},ne.prototype),ie.prototype=Di({init:function(e){function t(e){if(r.somethingSelected())Do=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Do=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Oa),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!xo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Do.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Do.join("\n");var o=document.activeElement;Na(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable="true",te(i),Ca(i,"paste",function(e){var t=e.clipboardData&&e.clipboardData.getData("text/plain");t&&(e.preventDefault(),r.replaceSelection(t,null,"paste"))}),Ca(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=pe(Ao(i.head.line,a),Ao(i.head.line,a+t.length)))}}),Ca(i,"compositionupdate",function(e){n.composing.data=e.data}),Ca(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ca(i,"touchstart",function(){n.forceCompositionEnd()}),Ca(i,"input",function(){n.composing||n.pollContent()||St(n.cm,function(){Dt(r)})}),Ca(i,"copy",t),Ca(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=se(this.cm,e.anchorNode,e.anchorOffset),r=se(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Mo(Y(n,r),t.from())||0!=Mo(K(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=La(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):uo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Vi(this.cm.display.cursorDiv,e.cursors),Vi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ia(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():St(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=se(t,e.anchorNode,e.anchorOffset),r=se(t,e.focusNode,e.focusOffset);n&&r&&St(t,function(){ke(t.doc,pe(n,r),Oa),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Pt(e,r.line)))var a=Xr(t.view[0].line),s=t.view[0].node;else var a=Xr(t.view[o].line),s=t.view[o-1].node.nextSibling;var l=Pt(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.view[l].node;else var u=Xr(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=qa(ue(e,s,c,a,u)),d=Kr(e.doc,Ao(a,0),Ao(u,Gr(e.doc,u).text.length));f.length>1&&d.length>1;)if(Ti(f)==Ti(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var p=0,h=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);m>p&&g.charCodeAt(p)==v.charCodeAt(p);)++p;for(var y=Ti(f),b=Ti(d),w=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));w>h&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=y.slice(0,y.length-h),f[0]=f[0].slice(p);var $=Ao(a,p),x=Ao(u,d.length?Ti(d).length-h:0);return f.length>1||f[0]||Mo($,x)?(Tn(e.doc,f,$,x,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){e.data&&e.data!=e.startData&&Tt(this.cm,J)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.setAttribute("contenteditable","false")},onKeyPress:function(e){e.preventDefault(),Tt(this.cm,J)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},onContextMenu:Ai,resetPosition:Ai,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Mo(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var No,Lo,Po,Fo={left:0,right:0,top:0,bottom:0},jo=null,Io=0,Vo=0,Ho=0,Wo=null;po?Wo=-.53:uo?Wo=15:mo?Wo=-.7:bo&&(Wo=-1/3);var Bo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Bo(e);return t.x*=Wo,t.y*=Wo,t};var zo=new _i,Uo=null,qo=e.changeEnd=function(e){return e.text?Ao(e.from.line+e.text.length-1,Ti(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Ko.hasOwnProperty(e)&&Tt(this,Ko[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Bn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Pn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Nn(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)Pn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&xe(this.doc,r,new fe(o,u[r].to()),Oa)}}}),getTokenAt:function(e,t){return Tr(this,e,t)},getLineTokens:function(e,t){return Tr(this,Ao(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Ar(this,Gr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!ea.hasOwnProperty(t))return n;var r=ea[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Gr(this.doc,e)}else n=e;return lt(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-Zr(n):0)},defaultTextHeight:function(){return vt(this.display)},defaultCharWidth:function(){return mt(this.display)},setGutterMarker:Ot(function(e,t,n){return Fn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Pi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Nt(t,r,"gutter"),Pi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!me(this.doc,e))return null;var t=e;if(e=Gr(this.doc,e),!e)return null}else{var t=Xr(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=ft(this,ge(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&An(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Ot(ln),triggerOnKeyPress:Ot(fn),triggerOnKeyUp:cn,execCommand:function(e){return ra.hasOwnProperty(e)?ra[e](this):void 0},triggerElectric:Ot(function(e){Z(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=ge(this.doc,e);t>o&&(a=In(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Ot(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?In(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Aa)}),deleteH:Ot(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):jn(this,function(n){var i=In(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=ge(this.doc,e);t>a;++a){var l=ft(this,s,"div");if(null==o?o=l.left:l.left=o,s=Vn(this,l,i,n),s.hitSide)break}return s},moveV:Ot(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=ft(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Vn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Dn(n,null,ct(n,l,"div").top-s.top),l},Aa),i.length)for(var a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&a(this),_a(this,"refresh",this)}),swapDoc:Ot(function(e){var t=this.doc;return t.cm=null,qr(this,e),ot(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,bi(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ei(e);var Go=e.defaults={},Ko=e.optionHandlers={},Yo=e.Init={toString:function(){return"CodeMirror.Init"}};Hn("value","",function(e,t){e.setValue(t)},!0),Hn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Hn("indentUnit",2,n,!0),Hn("indentWithTabs",!1),Hn("smartIndent",!0),Hn("tabSize",4,function(e){r(e),ot(e),Dt(e)},!0),Hn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Hn("specialCharPlaceholder",Lr,function(e){e.refresh()},!0),Hn("electricChars",!0),Hn("inputStyle",Co?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Hn("rtlMoveVisually",!_o),Hn("wholeLineUpdateBefore",!0),Hn("theme","default",function(e){s(e),l(e)},!0),Hn("keyMap","default",function(t,n,r){var i=Bn(n),o=r!=e.Init&&Bn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Hn("extraKeys",null),Hn("lineWrapping",!1,i,!0),Hn("gutters",[],function(e){p(e.options),l(e)},!0),Hn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?E(e.display)+"px":"0",e.refresh()},!0),Hn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Hn("scrollbarStyle","native",function(e){m(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Hn("lineNumbers",!1,function(e){p(e.options),l(e)},!0),Hn("firstLineNumber",1,l,!0),Hn("lineNumberFormatter",function(e){return e},l,!0),Hn("showCursorWhenSelecting",!1,Me,!0),Hn("resetSelectionOnContextMenu",!0),Hn("lineWiseCopyCut",!0),Hn("readOnly",!1,function(e,t){"nocursor"==t?(hn(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||e.display.input.reset())}),Hn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Hn("dragDrop",!0,Ht),Hn("cursorBlinkRate",530),Hn("cursorScrollMargin",0),Hn("cursorHeight",1,Me,!0),Hn("singleCursorHeightPerLine",!0,Me,!0),Hn("workTime",100),Hn("workDelay",100),Hn("flattenSpans",!0,r,!0),Hn("addModeClass",!1,r,!0),Hn("pollInterval",100),Hn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Hn("historyEventDelay",1250),Hn("viewportMargin",10,function(e){e.refresh()},!0),Hn("maxHighlightLength",1e4,r,!0),Hn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Hn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Hn("autofocus",null);var Qo=e.modes={},Xo=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Qo[t]=n},e.defineMIME=function(e,t){Xo[e]=t},e.resolveMode=function(t){if("string"==typeof t&&Xo.hasOwnProperty(t))t=Xo[t];else if(t&&"string"==typeof t.name&&Xo.hasOwnProperty(t.name)){var n=Xo[t.name];"string"==typeof n&&(n={name:n}),t=Mi(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=Qo[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(Jo.hasOwnProperty(n.name)){var o=Jo[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var Jo=e.modeExtensions={};e.extendMode=function(e,t){var n=Jo.hasOwnProperty(e)?Jo[e]:Jo[e]={};Di(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){ma.prototype[e]=t},e.defineOption=Hn;var Zo=[];e.defineInitHook=function(e){Zo.push(e)};var ea=e.helpers={};e.registerHelper=function(t,n,r){ea.hasOwnProperty(t)||(ea[t]=e[t]={_global:[]}),ea[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),ea[t]._global.push({pred:r,val:i})};var ta=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},na=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ra=e.commands={selectAll:function(e){e.setSelection(Ao(e.firstLine(),0),Ao(e.lastLine()),Oa)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Oa)},killLine:function(e){jn(e,function(t){if(t.empty()){var n=Gr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Ao(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ao(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Gr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+"\n"+a.charAt(a.length-1),Ao(i.line-1,a.length-1),Ao(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){St(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange("\n",r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0),Nn(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},ia=e.keyMap={};ia.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ia.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ia.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ia.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ia["default"]=Eo?ia.macDefault:ia.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Ri(n.split(" "),Wn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ua=0,ca=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ua};Ei(ca),ca.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yt(e),Ci(this,"clear")){var n=this.find();n&&bi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Oe(e.doc)),e&&bi(e,"markerCleared",e,this),t&&wt(e),this.parent&&this.parent.clear()}},ca.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Er(i),bi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},zr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Br))){var s=[];this.collapse(s),this.children=[new Br(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new Br(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new zr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Oi(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new zr(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var va=0,ma=e.Doc=function(e,t,n){if(!(this instanceof ma))return new ma(e,t,n);null==n&&(n=0),zr.call(this,[new Br([new pa("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Ao(n,0);this.sel=pe(r),this.history=new ti(null),this.id=++va,this.modeOption=t,"string"==typeof e&&(e=qa(e)),Wr(this,{from:r,to:r,text:e}),ke(this,pe(r),Oa)};ma.prototype=Mi(zr.prototype,{constructor:ma,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)xn(this,r[o]);s?_e(this,s):this.cm&&Nn(this.cm)}),undo:Rt(function(){En(this,"undo")}),redo:Rt(function(){En(this,"redo")}),undoSelection:Rt(function(){En(this,"undo",!0)}),redoSelection:Rt(function(){En(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ge(this,e),t=ge(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;sl.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),ge(this,Ao(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Da=[""],Na=function(e){e.select()};xo?Na=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:po&&(Na=function(e){try{e.select()}catch(t){}});var La,Pa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Fa=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Pa.test(e))},ja=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;La=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ia=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};po&&11>ho&&(Hi=function(){try{return document.activeElement}catch(e){return document.body}});var Va,Ha,Wa=e.rmClass=function(e,t){var n=e.className,r=Wi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Ba=e.addClass=function(e,t){var n=e.className;Wi(t).test(n)||(e.className+=(n?" ":"")+t)},za=!1,Ua=function(){if(po&&9>ho)return!1;var e=ji("div");return"draggable"in e||"dragDrop"in e}(),qa=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ga=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Ka=function(){var e=ji("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ya=null,Qa={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Qa,function(){for(var e=0;10>e;e++)Qa[e+48]=Qa[e+96]=String(e);for(var e=65;90>=e;e++)Qa[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Qa[e+111]=Qa[e+63235]="F"+e}();var Xa,Ja=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,f=[],d=0;c>d;++d)f.push(r=e(n.charCodeAt(d)));for(var d=0,p=u;c>d;++d){var r=f[d];"m"==r?f[d]=p:p=r}for(var d=0,h=u;c>d;++d){var r=f[d];"1"==r&&"r"==h?f[d]="n":a.test(r)&&(h=r,"r"==r&&(f[d]="R"))}for(var d=1,p=f[0];c-1>d;++d){var r=f[d];"+"==r&&"1"==p&&"1"==f[d+1]?f[d]="1":","!=r||p!=f[d+1]||"1"!=p&&"n"!=p||(f[d]=p),p=r}for(var d=0;c>d;++d){var r=f[d];if(","==r)f[d]="N";else if("%"==r){for(var g=d+1;c>g&&"%"==f[g];++g);for(var v=d&&"!"==f[d-1]||c>g&&"1"==f[g]?"1":"N",m=d;g>m;++m)f[m]=v;d=g-1}}for(var d=0,h=u;c>d;++d){var r=f[d];"L"==h&&"1"==r?f[d]="L":a.test(r)&&(h=r)}for(var d=0;c>d;++d)if(o.test(f[d])){for(var g=d+1;c>g&&o.test(f[g]);++g);for(var y="L"==(d?f[d-1]:u),b="L"==(c>g?f[g]:u),v=y||b?"L":"R",m=d;g>m;++m)f[m]=v;d=g-1}for(var w,$=[],d=0;c>d;)if(s.test(f[d])){var x=d;for(++d;c>d&&s.test(f[d]);++d);$.push(new t(0,x,d))}else{var C=d,E=$.length;for(++d;c>d&&"L"!=f[d];++d);for(var m=C;d>m;)if(l.test(f[m])){m>C&&$.splice(E,0,new t(1,C,m));var _=m;for(++m;d>m&&l.test(f[m]);++m);$.splice(E,0,new t(2,_,m)),C=m}else++m;d>C&&$.splice(E,0,new t(1,C,d))}return 1==$[0].level&&(w=n.match(/^\s+/))&&($[0].from=w[0].length,$.unshift(new t(0,0,w[0].length))),1==Ti($).level&&(w=n.match(/\s+$/))&&(Ti($).to-=w[0].length,$.push(new t(0,c-w[0].length,c))),2==$[0].level&&$.unshift(new t(1,$[0].to,$[0].to)),$[0].level!=Ti($).level&&$.push(new t($[0].level,c,c)),$}}();return e.version="5.3.0",e})},function(e,t,n){n(152),e.exports=angular},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nr;r++){var o=e[r][n];if(o)if(o instanceof Array)for(var a in o)t[o[a]]=!0;else t[o]=!0}return Object.keys(t)}},{key:"getSortFieldName",value:function(){return this._targetEntity.name()+"_ListView."+(this.sortField()||this._targetField.name())}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nn;n++){var i=t[n];e[i.name()]=i}return e}},{key:"listActions",value:function(e){return arguments.length?(this._listActions=e,this):this._listActions}}]),t}(u["default"]);t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0}},{key:"addChild",value:function(t){if(!(t instanceof e))throw new Error("Only Menu instances are accepted as children of a Menu");return this._children.push(t),this}},{key:"hasChild",value:function(){return this._children.length>0}},{key:"getChildByTitle",value:function(e){return this.children().filter(function(t){return t.title()==e}).pop()}},{key:"children",value:function(){return arguments.length?(this._children=arguments[0],this):this._children}},{key:"icon",value:function(){return arguments.length?(this._icon=arguments[0],this):this._icon}},{key:"template",value:function(){return arguments.length?(this._template=arguments[0],this):this._template}},{key:"populateFromEntity",value:function(e){if(!(e instanceof l["default"]))throw new Error("populateFromEntity() only accepts an Entity parameter");return this.title(e.label()),this.active(function(t){return 0===t.indexOf("/"+e.name()+"/")}),this.link("/"+e.name()+"/list"),this.icon(e.menuView().icon()),this}}]),e}();t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function o(e,t,n){r(this,o),this._restWrapper=e,this._promisesResolver=t,this._application=n};t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={order:function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()})}},e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={camelCase:function(e){if(!e)return e;var t=e.charAt(0).toUpperCase();return e=t+e.substr(1),e.replace(/[-_](.)/g,function(e,t){return" "+t.toUpperCase()})}},e.exports=t["default"]},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return'
'}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){if(e!==t){var n=null===e,r=e===k,i=e===e,o=null===t,a=t===k,s=t===t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function a(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i-1;);return n}function f(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function d(e,t){return o(e.criteria,t.criteria)||e.index-t.index}function p(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,s=i.length,l=n.length;++r=l?u:u*(n[r]?1:-1)}return e.index-t.index}function h(e){return Ge[e]}function g(e){return Ke[e]}function v(e){return"\\"+Xe[e]}function m(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i=e&&e>=9&&13>=e||32==e||160==e||5760==e||6158==e||e>=8192&&(8202>=e||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function w(e,t){for(var n=-1,r=e.length,i=-1,o=[];++nt,r=Wn(0,e.length,this.__views__),i=r.start,o=r.end,a=o-i,s=n?o:i-1,l=ba(a,this.__takeCount__),u=this.__iteratees__,c=u?u.length:0,f=0,d=[];e:for(;a--&&l>f;){s+=t;for(var p=-1,h=e[s];++pg.index:s-1?g.count++>=y:!v(h)))continue e}}else{var b=v(h);if(m==B)h=b;else if(!b){if(m==W)continue e;break e}}}d[f++]=h}return d}function ie(){this.__data__={}}function Ge(e){return this.has(e)&&delete this.__data__[e]}function Ke(e){return"__proto__"==e?k:this.__data__[e]}function Ye(e){return"__proto__"!=e&&Yo.call(this.__data__,e)}function Qe(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function Xe(e){var t=e?e.length:0;for(this.data={hash:ha(null),set:new la};t--;)this.push(e[t])}function Je(e,t){var n=e.data,r="string"==typeof t||Ti(t)?n.set.has(t):n.hash[t];return r?0:-1}function Ze(e){var t=this.data;"string"==typeof e||Ti(e)?t.set.add(e):t.hash[e]=!0}function et(e,t){var n=-1,r=e.length;for(t||(t=No(r));++n=200?Va(t):null,u=t.length;l&&(o=Je,a=!1,t=l);e:for(;++in&&(n=-n>i?0:i+n),r=r===k||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)e[n++]=t;return e}function kt(e,t){var n=[];return La(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function St(e,t,n,r){var i;return n(e,function(e,n,o){return t(e,n,o)?(i=r?n:e,!1):void 0}),i}function Tt(e,t,n){for(var r=-1,i=e.length,o=-1,a=[];++rr;)e=e[t[r++]];return r&&r==i?e:k}}function Nt(e,t,n,r,i,o){return e===t?!0:null==e||null==t||!Ti(e)&&!y(t)?e!==e&&t!==t:Lt(e,t,Nt,n,r,i,o)}function Lt(e,t,n,r,i,o,a){var s=Ss(e),l=Ss(t),u=G,c=G;s||(u=Xo.call(e),u==q?u=ee:u!=ee&&(s=Pi(e))),l||(c=Xo.call(t),c==q?c=ee:c!=ee&&(l=Pi(t)));var f=u==ee,d=c==ee,p=u==c;if(p&&!s&&!f)return Ln(e,t,u);if(!i){var h=f&&Yo.call(e,"__wrapped__"),g=d&&Yo.call(t,"__wrapped__");if(h||g)return n(h?e.value():e,g?t.value():t,r,i,o,a)}if(!p)return!1;o||(o=[]),a||(a=[]);for(var v=o.length;v--;)if(o[v]==e)return a[v]==t;o.push(e),a.push(t);var m=(s?Nn:Pn)(e,t,n,r,i,o,a);return o.pop(),a.pop(),m}function Pt(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=sr(e);r--;){var a=t[r];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++rt&&(t=-t>i?0:i+t),n=n===k||n>i?i:+n||0,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=No(i);++r=200,l=a?Va():null,u=[];l?(r=Je,o=!1):(a=!1,l=t?[]:u);e:for(;++n=i){for(;i>r;){var o=r+i>>>1,a=e[o];(n?t>=a:t>a)&&null!==a?r=o+1:i=o}return i}return rn(e,t,$o,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,s=null===t,l=t===k;o>i;){var u=ia((i+o)/2),c=n(e[u]),f=c!==k,d=c===c;if(a)var p=d||r;else p=s?d&&f&&(r||null!=c):l?d&&(r||f):null==c?!1:r?t>=c:t>c;p?i=u+1:o=u}return ba(o,Sa)}function on(e,t,n){if("function"!=typeof e)return $o;if(t===k)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function an(e){return ta.call(e,0)}function sn(e,t,n){for(var r=n.length,i=-1,o=ya(e.length-r,0),a=-1,s=t.length,l=No(o+s);++a2?n[i-2]:k,a=i>2?n[2]:k,s=i>1?n[i-1]:k;for("function"==typeof o?(o=on(o,s,5),i-=2):(o="function"==typeof s?s:k,i-=o?1:0),a&&Yn(n[0],n[1],a)&&(o=3>i?k:o,i=1);++r-1?n[o]:k}return St(n,r,e)}}function bn(e){return function(t,n,r){return t&&t.length?(n=Fn(n,r,3),a(t,n,e)):-1}}function wn(e){return function(t,n,r){return n=Fn(n,r,3),St(t,n,e,!0)}}function $n(e){return function(){for(var t,n=arguments.length,i=e?n:-1,o=0,a=No(n);e?i--:++iy){var E=s?et(s):null,_=ya(u-y,0),S=h?C:null,R=h?null:C,A=h?$:null,M=h?null:$;t|=h?D:N,t&=~(h?N:D),g||(t&=~(T|O));var L=[e,t,n,A,S,M,R,E,l,_],P=On.apply(k,L);return Xn(e)&&Ba(P,L),P.placeholder=x,P}}var F=d?n:this,j=p?F[e]:e;return s&&($=rr($,s)),f&&l<$.length&&($.length=l),this&&this!==rt&&this instanceof c&&(j=m||gn(e)),j.apply(F,$)}var f=t&L,d=t&T,p=t&O,h=t&A,g=t&R,v=t&M,m=p?null:gn(e);return c}function Rn(e,t,n){var r=e.length;if(t=+t,r>=t||!va(t))return"";var i=t-r;return n=null==n?" ":n+"",uo(n,na(i/n.length)).slice(0,i)}function An(e,t,n,r){function i(){for(var t=-1,s=arguments.length,l=-1,u=r.length,c=No(s+u);++ll))return!1;for(;++s-1&&e%1==0&&t>e}function Yn(e,t,n){if(!Ti(n))return!1;var r=typeof t;if("number"==r?Gn(n)&&Kn(t,n.length):"string"==r&&t in n){var i=n[t];return e===e?e===i:i!==i}return!1}function Qn(e,t){var n=typeof e;if("string"==n&&ke.test(e)||"number"==n)return!0;if(Ss(e))return!1;var r=!_e.test(e);return r||null!=t&&e in sr(t)}function Xn(e){var n=jn(e);if(!(n in i.prototype))return!1;var r=t[n];if(e===r)return!0;var o=Ha(r);return!!o&&e===o[0]}function Jn(e){return"number"==typeof e&&e>-1&&e%1==0&&Ra>=e}function Zn(e){return e===e&&!Ti(e)}function er(e,t){var n=e[1],r=t[1],i=n|r,o=L>i,a=r==L&&n==A||r==L&&n==P&&e[7].length<=t[8]||r==(L|P)&&n==A;if(!o&&!a)return e;r&T&&(e[2]=t[2],i|=n&T?0:R);var s=t[3];if(s){var l=e[3];e[3]=l?sn(l,s,t[4]):et(s),e[4]=l?w(e[3],U):et(t[4])}return s=t[5],s&&(l=e[5],e[5]=l?ln(l,s,t[6]):et(s),e[6]=l?w(e[5],U):et(t[6])),s=t[7],s&&(e[7]=et(s)),r&L&&(e[8]=null==e[8]?t[8]:ba(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function tr(e,t){e=sr(e);for(var n=-1,r=t.length,i={};++nr;)a[++o]=Gt(e,r,r+=t);return a}function fr(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++tt?0:t)):[]}function pr(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0,0>t?0:t)):[]}function hr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0,!0):[]}function gr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0):[]}function vr(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&Yn(e,t,n)&&(n=0,r=i),_t(e,t,n,r)):[]}function mr(e){return e?e[0]:k}function yr(e,t,n){var r=e?e.length:0;return n&&Yn(e,t,n)&&(t=!1),r?Tt(e,t):[]}function br(e){var t=e?e.length:0;return t?Tt(e,!0):[]}function wr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?ya(r+n,0):n;else if(n){var i=nn(e,t),o=e[i];return(t===t?t===o:o!==o)?i:-1}return s(e,t,n||0)}function $r(e){return pr(e,1)}function xr(e){var t=e?e.length:0;return t?e[t-1]:k}function Cr(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(0>n?ya(r+n,0):ba(n||0,r-1))+1;else if(n){i=nn(e,t,!0)-1;var o=e[i];return(t===t?t===o:o!==o)?i:-1}if(t!==t)return m(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function Er(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=In(),i=e.length;++n-1;)ca.call(t,o,1);return t}function _r(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=Fn(t,n,3);++it?0:t)):[]}function Or(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0>t?0:t)):[]}function Rr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!1,!0):[]}function Ar(e,t,n){return e&&e.length?en(e,Fn(t,n,3)):[]}function Mr(e,t,n,r){var i=e?e.length:0;if(!i)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=Yn(e,t,r)?null:t,t=!1);var o=Fn();return(null!=n||o!==bt)&&(n=o(n,r,3)),t&&In()==s?$(e,n):Jt(e,n)}function Dr(e){if(!e||!e.length)return[];var t=-1,n=0;e=st(e,function(e){return Gn(e)?(n=ya(e.length,n),!0):void 0});for(var r=No(n);++tn?ya(i+n,0):n||0,"string"==typeof e||!Ss(e)&&Li(e)?i>n&&e.indexOf(t,n)>-1:In(e,t,n)>-1):!1}function Qr(e,t,n){var r=Ss(e)?lt:Ft;return t=Fn(t,n,3),r(e,t)}function Xr(e,t){return Qr(e,So(t))}function Jr(e,t,n){var r=Ss(e)?st:kt;return t=Fn(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function Zr(e,t,n){if(n?Yn(e,t,n):null==t){e=ar(e);var r=e.length;return r>0?e[Ut(0,r-1)]:k}var i=-1,o=Vi(e),r=o.length,a=r-1;for(t=ba(0>t?0:+t||0,r);++i0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}}function ui(e,t,n){function r(){d&&ra(d),l&&ra(l),l=d=p=k}function i(){var n=t-(hs()-c);if(0>=n||n>t){l&&ra(l);var r=p;l=d=p=k,r&&(h=hs(),u=e.apply(f,s),d||l||(s=f=null))}else d=ua(i,n)}function o(){d&&ra(d),l=d=p=k,(v||g!==t)&&(h=hs(),u=e.apply(f,s),d||l||(s=f=null))}function a(){if(s=arguments,c=hs(),f=this,p=v&&(d||!m),g===!1)var n=m&&!d;else{l||m||(h=c);var r=g-(c-h),a=0>=r||r>g;a?(l&&(l=ra(l)),h=c,u=e.apply(f,s)):l||(l=ua(o,r))}return a&&d?d=ra(d):d||t===g||(d=ua(i,t)),n&&(a=!0,u=e.apply(f,s)),!a||d||l||(s=f=null),u}var s,l,u,c,f,d,p,h=0,g=!1,v=!0;if("function"!=typeof e)throw new Bo(z);if(t=0>t?0:+t||0,n===!0){var m=!0;v=!1}else Ti(n)&&(m=n.leading,g="maxWait"in n&&ya(+n.maxWait||0,t),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function ci(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Bo(z);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new ci.Cache,n}function fi(e){if("function"!=typeof e)throw new Bo(z);return function(){return!e.apply(this,arguments)}}function di(e){return li(2,e)}function pi(e,t){if("function"!=typeof e)throw new Bo(z);return t=ya(t===k?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=ya(n.length-t,0),o=No(i);++rt}function wi(e,t){return e>=t}function $i(e){return y(e)&&Gn(e)&&Xo.call(e)==q}function xi(e){return e===!0||e===!1||y(e)&&Xo.call(e)==K}function Ci(e){return y(e)&&Xo.call(e)==Y}function Ei(e){return!!e&&1===e.nodeType&&y(e)&&Xo.call(e).indexOf("Element")>-1}function _i(e){return null==e?!0:Gn(e)&&(Ss(e)||Li(e)||$i(e)||y(e)&&Os(e.splice))?!e.length:!Is(e).length}function ki(e,t,n,r){n="function"==typeof n?on(n,r,3):k;var i=n?n(e,t):k;return i===k?Nt(e,t,n):!!i}function Si(e){return y(e)&&"string"==typeof e.message&&Xo.call(e)==Q}function Ti(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Oi(e,t,n,r){return n="function"==typeof n?on(n,r,3):k,Pt(e,Vn(t),n)}function Ri(e){return Di(e)&&e!=+e}function Ai(e){return null==e?!1:Xo.call(e)==X?Zo.test(Ko.call(e)):y(e)&&Le.test(e)}function Mi(e){return null===e}function Di(e){return"number"==typeof e||y(e)&&Xo.call(e)==Z}function Ni(e){return y(e)&&Xo.call(e)==te}function Li(e){return"string"==typeof e||y(e)&&Xo.call(e)==re}function Pi(e){return y(e)&&Jn(e.length)&&!!ze[Xo.call(e)]}function Fi(e){return e===k}function ji(e,t){return t>e}function Ii(e,t){return t>=e}function Vi(e){var t=e?Wa(e):0;return Jn(t)?t?et(e):[]:Ji(e)}function Hi(e){return yt(e,Gi(e))}function Wi(e,t,n){var r=Na(e);return n&&Yn(e,t,n)&&(t=null),t?vt(r,t):r}function Bi(e){return Mt(e,Gi(e))}function zi(e,t,n){var r=null==e?k:Dt(e,lr(t),t+"");return r===k?n:r}function Ui(e,t){if(null==e)return!1;var n=Yo.call(e,t);if(!n&&!Qn(t)){if(t=lr(t),e=1==t.length?e:Dt(e,Gt(t,0,-1)),null==e)return!1;t=xr(t),n=Yo.call(e,t)}return n||Jn(e.length)&&Kn(t,e.length)&&(Ss(e)||$i(e))}function qi(e,t,n){n&&Yn(e,t,n)&&(t=null);for(var r=-1,i=Is(e),o=i.length,a={};++r0;++r=ba(t,n)&&en?0:+n||0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function oo(e){return e=u(e),e&&$e.test(e)?e.replace(be,g):e}function ao(e){return e=u(e),e&&Oe.test(e)?e.replace(Te,"\\$&"):e}function so(e,t,n){e=u(e),t=+t;var r=e.length;if(r>=t||!va(t))return e;var i=(t-r)/2,o=ia(i),a=na(i);return n=Rn("",a,n),n.slice(0,o)+e+n}function lo(e,t,n){return n&&Yn(e,t,n)&&(t=0),xa(e,t)}function uo(e,t){var n="";if(e=u(e),t=+t,1>t||!e||!va(t))return n;do t%2&&(n+=e),t=ia(t/2),e+=e;while(t);return n}function co(e,t,n){return e=u(e),n=null==n?0:ba(0>n?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function fo(e,n,r){var i=t.templateSettings;r&&Yn(e,n,r)&&(n=r=null),e=u(e),n=gt(vt({},r||n),i,ht);var o,a,s=gt(vt({},n.imports),i.imports,ht),l=Is(s),c=Zt(s,l),f=0,d=n.interpolate||je,p="__p += '",h=Ho((n.escape||je).source+"|"+d.source+"|"+(d===Ee?Me:je).source+"|"+(n.evaluate||je).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Be+"]")+"\n";e.replace(h,function(t,n,r,i,s,l){return r||(r=i),p+=e.slice(f,l).replace(Ie,v),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=l+t.length,t}),p+="';\n";var m=n.variable;m||(p="with (obj) {\n"+p+"\n}\n"),p=(a?p.replace(ge,""):p).replace(ve,"$1").replace(me,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Xs(function(){return Fo(l,g+"return "+p).apply(k,c)});if(y.source=p,Si(y))throw y;return y}function po(e,t,n){var r=e;return(e=u(e))?(n?Yn(r,t,n):null==t)?e.slice(x(e),C(e)+1):(t+="",e.slice(c(e,t),f(e,t)+1)):e}function ho(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(x(e)):e.slice(c(e,t+"")):e}function go(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(0,C(e)+1):e.slice(0,f(e,t+"")+1):e}function vo(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=F,i=j;if(null!=t)if(Ti(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?u(t.omission):i}else r=+t||0;if(e=u(e),r>=e.length)return e;var a=r-i.length;if(1>a)return i;var s=e.slice(0,a);if(null==o)return s+i;if(Ni(o)){if(e.slice(a).search(o)){var l,c,f=e.slice(0,a);for(o.global||(o=Ho(o.source,(De.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(f);)c=l.index;s=s.slice(0,null==c?a:c)}}else if(e.indexOf(o,a)!=a){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+i}function mo(e){return e=u(e),e&&we.test(e)?e.replace(ye,E):e}function yo(e,t,n){return n&&Yn(e,t,n)&&(t=null),e=u(e),e.match(t||Ve)||[]}function bo(e,t,n){return n&&Yn(e,t,n)&&(t=null),y(e)?xo(e):bt(e,t)}function wo(e){return function(){return e}}function $o(e){return e}function xo(e){return jt(wt(e,!0))}function Co(e,t){return It(e,wt(t,!0))}function Eo(e,t,n){if(null==n){var r=Ti(t),i=r?Is(t):null,o=i&&i.length?Mt(t,i):null;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Mt(t,Is(t)));var a=!0,s=-1,l=Os(e),u=o.length;n===!1?a=!1:Ti(n)&&"chain"in n&&(a=n.chain);for(;++se||!va(e))return[];var r=-1,i=No(ba(e,ka));for(t=on(t,n,1);++rr?i[r]=t(r):t(r);return i}function Ao(e){var t=++Qo;return u(e)+t}function Mo(e,t){return(+e||0)+(+t||0)}function Do(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=Fn(),i=null==t;return i&&r===bt||(i=!1,t=r(t,n,3)),i?dt(Ss(e)?e:ar(e)):Xt(e,t)}e=e?it.defaults(rt.Object(),e,it.pick(rt,We)):rt;var No=e.Array,Lo=e.Date,Po=e.Error,Fo=e.Function,jo=e.Math,Io=e.Number,Vo=e.Object,Ho=e.RegExp,Wo=e.String,Bo=e.TypeError,zo=No.prototype,Uo=Vo.prototype,qo=Wo.prototype,Go=(Go=e.window)?Go.document:null,Ko=Fo.prototype.toString,Yo=Uo.hasOwnProperty,Qo=0,Xo=Uo.toString,Jo=e._,Zo=Ho("^"+ao(Ko.call(Yo)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ea=Hn(e,"ArrayBuffer"),ta=Hn(ea&&new ea(0),"slice"),na=jo.ceil,ra=e.clearTimeout,ia=jo.floor,oa=Hn(Vo,"getPrototypeOf"),aa=e.parseFloat,sa=zo.push,la=Hn(e,"Set"),ua=e.setTimeout,ca=zo.splice,fa=Hn(e,"Uint8Array"),da=Hn(e,"WeakMap"),pa=function(){try{var t=Hn(e,"Float64Array"),n=new t(new ea(10),0,1)&&t}catch(r){}return n||null}(),ha=Hn(Vo,"create"),ga=Hn(No,"isArray"),va=e.isFinite,ma=Hn(Vo,"keys"),ya=jo.max,ba=jo.min,wa=Hn(Lo,"now"),$a=Hn(Io,"isFinite"),xa=e.parseInt,Ca=jo.random,Ea=Io.NEGATIVE_INFINITY,_a=Io.POSITIVE_INFINITY,ka=4294967295,Sa=ka-1,Ta=ka>>>1,Oa=pa?pa.BYTES_PER_ELEMENT:0,Ra=9007199254740991,Aa=da&&new da,Ma={},Da=t.support={};!function(e){var t=function(){this.x=e},n=[];t.prototype={valueOf:e,y:e};for(var r in new t)n.push(r);try{Da.dom=11===Go.createDocumentFragment().nodeType}catch(i){Da.dom=!1}}(1,0),t.templateSettings={escape:xe,evaluate:Ce,interpolate:Ee,variable:"",imports:{_:t}};var Na=function(){function e(){}return function(t){if(Ti(t)){e.prototype=t;var n=new e;e.prototype=null}return n||{}}}(),La=fn(Rt),Pa=fn(At,!0),Fa=dn(),ja=dn(!0),Ia=Aa?function(e,t){return Aa.set(e,t),e}:$o;ta||(an=ea&&fa?function(e){var t=e.byteLength,n=pa?ia(t/Oa):0,r=n*Oa,i=new ea(t);if(n){var o=new pa(i,0,n);o.set(new pa(e,0,n))}return t!=r&&(o=new fa(i,r),o.set(new fa(e,r))),i}:wo(null));var Va=ha&&la?function(e){return new Xe(e)}:wo(null),Ha=Aa?function(e){return Aa.get(e)}:ko,Wa=Wt("length"),Ba=function(){var e=0,t=0;return function(n,r){var i=hs(),o=V-(i-t);if(t=i,o>0){if(++e>=I)return n}else e=0;return Ia(n,r)}}(),za=pi(function(e,t){return Gn(e)?xt(e,Tt(t,!1,!0)):[]}),Ua=bn(),qa=bn(!0),Ga=pi(function(e){for(var t=e.length,n=t,r=No(f),i=In(),o=i==s,a=[];n--;){var l=e[n]=Gn(l=e[n])?l:[];r[n]=o&&l.length>=120?Va(n&&l):null}var u=e[0],c=-1,f=u?u.length:0,d=r[0];e:for(;++c2?e[t-2]:k,r=t>1?e[t-1]:k;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):k,r=k),e.length=t,Nr(e,n,r)}),ts=pi(function(e,t){return mt(e,Tt(t))}),ns=un(function(e,t,n){Yo.call(e,n)?++e[n]:e[n]=1}),rs=yn(La),is=yn(Pa,!0),os=xn(tt,La),as=xn(nt,Pa),ss=un(function(e,t,n){Yo.call(e,n)?e[n].push(t):e[n]=[t]}),ls=un(function(e,t,n){e[n]=t}),us=pi(function(e,t,n){var r=-1,i="function"==typeof t,o=Qn(t),a=Gn(e)?No(e.length):[];return La(e,function(e){var s=i?t:o&&null!=e?e[t]:null;a[++r]=s?s.apply(e,n):qn(e,t,n)}),a}),cs=un(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),fs=Tn(ut,La),ds=Tn(ct,Pa),ps=pi(function(e,t){if(null==e)return[];var n=t[2];return n&&Yn(t[0],t[1],n)&&(t.length=1),Qt(e,Tt(t),[])}),hs=wa||function(){return(new Lo).getTime()},gs=pi(function(e,t,n){var r=T;if(n.length){var i=w(n,gs.placeholder);r|=D}return Dn(e,r,t,n,i)}),vs=pi(function(e,t){t=t.length?Tt(t):Bi(e);for(var n=-1,r=t.length;++ne?n=this.takeRight(-e):e&&(n=this.drop(e)),t!==k&&(t=+t||0,n=0>t?n.dropRight(-t):n.take(t-e)),n},i.prototype.toArray=function(){return this.drop(0)},Rt(i.prototype,function(e,n){var o=t[n];if(o){var a=/^(?:filter|map|reject)|While$/.test(n),s=/^(?:first|last)$/.test(n);t.prototype[n]=function(){var n=arguments,l=this.__chain__,u=this.__wrapped__,c=!!this.__actions__.length,f=u instanceof i,d=n[0],p=f||Ss(u);p&&a&&"function"==typeof d&&1!=d.length&&(f=p=!1);var h=f&&!c;if(s&&!l)return h?e.call(u):o.call(t,this.value());var g=function(e){var r=[e];return sa.apply(r,n),o.apply(t,r)};if(p){var v=h?u:new i(this),m=e.apply(v,n);if(!s&&(c||m.__actions__)){var y=m.__actions__||(m.__actions__=[]);y.push({func:Ir,args:[g],thisArg:t})}return new r(m,l)}return this.thru(g)}}}),tt(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?qo:zo)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(e); -t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),Rt(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name,o=Ma[i]||(Ma[i]=[]);o.push({name:n,func:r})}}),Ma[On(null,O).name]=[{name:"wrapper",func:null}],i.prototype.clone=b,i.prototype.reverse=J,i.prototype.value=ne,t.prototype.chain=Vr,t.prototype.commit=Hr,t.prototype.plant=Wr,t.prototype.reverse=Br,t.prototype.toString=zr,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Ur,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var k,S="3.9.3",T=1,O=2,R=4,A=8,M=16,D=32,N=64,L=128,P=256,F=30,j="...",I=150,V=16,H=0,W=1,B=2,z="Expected a function",U="__lodash_placeholder__",q="[object Arguments]",G="[object Array]",K="[object Boolean]",Y="[object Date]",Q="[object Error]",X="[object Function]",J="[object Map]",Z="[object Number]",ee="[object Object]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object WeakMap]",oe="[object ArrayBuffer]",ae="[object Float32Array]",se="[object Float64Array]",le="[object Int8Array]",ue="[object Int16Array]",ce="[object Int32Array]",fe="[object Uint8Array]",de="[object Uint8ClampedArray]",pe="[object Uint16Array]",he="[object Uint32Array]",ge=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ye=/&(?:amp|lt|gt|quot|#39|#96);/g,be=/[&<>"'`]/g,we=RegExp(ye.source),$e=RegExp(be.source),xe=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,Ee=/<%=([\s\S]+?)%>/g,_e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,ke=/^\w*$/,Se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Te=/[.*+?^${}()|[\]\/\\]/g,Oe=RegExp(Te.source),Re=/[\u0300-\u036f\ufe20-\ufe23]/g,Ae=/\\(\\)?/g,Me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,De=/\w*$/,Ne=/^0[xX]/,Le=/^\[object .+?Constructor\]$/,Pe=/^\d+$/,Fe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,je=/($^)/,Ie=/['\n\r\u2028\u2029\\]/g,Ve=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),He=" \f \ufeff\n\r\u2028\u2029 ᠎              ",We=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],Be=-1,ze={};ze[ae]=ze[se]=ze[le]=ze[ue]=ze[ce]=ze[fe]=ze[de]=ze[pe]=ze[he]=!0,ze[q]=ze[G]=ze[oe]=ze[K]=ze[Y]=ze[Q]=ze[X]=ze[J]=ze[Z]=ze[ee]=ze[te]=ze[ne]=ze[re]=ze[ie]=!1;var Ue={};Ue[q]=Ue[G]=Ue[oe]=Ue[K]=Ue[Y]=Ue[ae]=Ue[se]=Ue[le]=Ue[ue]=Ue[ce]=Ue[Z]=Ue[ee]=Ue[te]=Ue[re]=Ue[fe]=Ue[de]=Ue[pe]=Ue[he]=!0,Ue[Q]=Ue[X]=Ue[J]=Ue[ne]=Ue[ie]=!1;var qe={leading:!1,maxWait:0,trailing:!1},Ge={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ke={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ye={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Qe={"function":!0,object:!0},Xe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Je=Qe[typeof t]&&t&&!t.nodeType&&t,Ze=Qe[typeof e]&&e&&!e.nodeType&&e,et=Je&&Ze&&"object"==typeof i&&i&&i.Object&&i,tt=Qe[typeof self]&&self&&self.Object&&self,nt=Qe[typeof window]&&window&&window.Object&&window,rt=(Ze&&Ze.exports===Je&&Je,et||nt!==(this&&this.window)&&nt||tt||this),it=_();rt._=it,r=function(){return it}.call(t,n,t,e),!(r!==k&&(e.exports=r))}).call(this)}).call(t,n(165)(e),function(){return this}())},function(e,t,n){/** +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="http://localhost:8080/",t(0)}([function(e,t,n){n(46),n(135),n(167),n(173),n(172),n(171),n(170),n(174),n(169),e.exports=n(168)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nn;n++){var i=t[n];e[i.name()]=i}return e}},{key:"getNonOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!1)}},{key:"getOptimizedReferences",value:function(){return this._getReferencesByOptimizationType(!0)}},{key:"getReferencedLists",value:function(){for(var e={},t=this._fields.filter(function(e){return"referenced_list"===e.type()}),n=0,r=t.length;r>n;n++){var i=t[n];e[i.name()]=i}return e}},{key:"template",value:function(e){return arguments.length?(this._template=e,this):this._template}},{key:"identifier",value:function(){return this.entity.identifier()}},{key:"actions",value:function(e){return arguments.length?(this._actions=e,this):this._actions}},{key:"removeFields",value:function(){return this._fields=[],this}},{key:"getFields",value:function(){return this._fields}},{key:"getField",value:function(e){return this._fields.filter(function(t){return t.name()===e})[0]}},{key:"getFieldsOfType",value:function(e){return this._fields.filter(function(t){return t.type()===e})}},{key:"addField",value:function(e){return null===e.order()&&e.order(this._fields.length,!0),this._fields.push(e),this._fields=this._fields.sort(function(e,t){return e.order()-t.order()}),this}},{key:"getErrorMessage",value:function(e){return"function"==typeof this._errorMessage?this._errorMessage(e):this._errorMessage}},{key:"errorMessage",value:function(e){return arguments.length?(this._errorMessage=e,this):this._errorMessage}},{key:"url",value:function(e){return arguments.length?(this._url=e,this):this._url}},{key:"getUrl",value:function(e){return"function"==typeof this._url?this._url(e):this._url}},{key:"validate",value:function(e){this._fields.map(function(t){var n=t.validation();"function"==typeof n.validator&&n.validator(e.values[t.name()])})}},{key:"_getReferencesByOptimizationType",value:function(){var e=void 0===arguments[0]?!0:arguments[0],t={},n=this.getReferences();for(var r in n){var i=n[r];!!i.getSingleApiCall()===e&&(t[r]=i)}return t}}],[{key:"flatten",value:function(t){if("Object"===t.constructor.name){console.warn("Passing literal of Field to fields method is deprecated use array instead");var n=[];for(var r in t)n=n.concat(e.flatten(t[r]));return n}return Array.isArray(t)?t.reduce(function(t,n){return t.concat(e.flatten(n))},[]):[t]}}]),e}());t["default"]=s,e.exports=t["default"]},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Di(r):{},Di(Go,r,!1),p(r);var i=r.value;"string"==typeof i&&(i=new ma(i,r.mode)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),a=this.display=new t(n,i,o);a.wrapper.CodeMirror=this,u(this),s(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!Co&&a.input.focus(),m(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Ei,keySeq:null,specialChars:null};var l=this;po&&11>ho&&setTimeout(function(){l.display.input.reset(!0)},20),Vt(this),Ui(),yt(this),this.curOp.forceUpdate=!0,qr(this,i),r.autofocus&&!Co||l.hasFocus()?setTimeout(Ni(pn,this),20):hn(this);for(var c in Ko)Ko.hasOwnProperty(c)&&Ko[c](this,r[c],Yo);x(this),r.finishInit&&r.finishInit(this);for(var f=0;fho&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),go||uo&&Co||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Fe(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(Ba(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Wa(e.display.wrapper,"CodeMirror-wrap"),d(e)),a(e),Dt(e),ot(e),setTimeout(function(){y(e)},100)}function o(e){var t=vt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/mt(e.display)-3);return function(i){if(yr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function p(e){var t=Oi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+We(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+ze(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var r=this.vert=Ii("div",[Ii("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Ii("div",[Ii("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ca(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ca(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,po&&8>ho&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function m(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Wa(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ca(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?en(t,e):Zt(t,e)},t),t.display.scrollbars.addClass&&Ba(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&A(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function w(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-He(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Jr(t,r),a=Jr(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=Jr(t,Zr(Gr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Jr(t,Zr(Gr(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function $(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=_(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==jt(e))return!1;x(e)&&(Lt(e),t.dims=D(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Ro&&(o=vr(e.doc,o),a=mr(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;It(e,o,a),n.viewOffset=Zr(Gr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=jt(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Hi();return l>4&&(n.lineDiv.style.display="none"),N(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Hi()!=u&&u.offsetHeight&&u.focus(),ji(n.cursorDiv),ji(n.selectionDiv),n.gutters.style.height=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fe(e,400)),n.updateLineNumbers=null,!0}function T(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ue(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+We(e.display)-qe(e),n.top)}),t.visible=w(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&S(e,t);r=!1){A(e);var i=h(e);Me(e),R(e,i),y(e,i)}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function O(e,t){var n=new E(e,t);if(S(e,n)){A(e),T(e,n);var r=h(e);Me(e),R(e,r),y(e,r),n.finish()}}function R(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+ze(e),t.clientHeight)+"px"}function A(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rho){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var l=o.line.height-i;if(2>i&&(i=vt(t)),(l>.001||-.001>l)&&(Qr(o.line,i),M(o.line),o.rest))for(var u=0;u=t&&f.lineNumber;f.changes&&(Oi(f.changes,"gutter")>-1&&(d=!1),L(e,f,u,n)),d&&(ji(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(C(e.options,u)))),s=f.node.nextSibling}else{var p=B(e,f,u,n);a.insertBefore(p,s)}u+=f.size}for(;s;)s=r(s)}function L(e,t,n,r){for(var i=0;iho&&(e.node.style.zIndex=2)),e.node}function F(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=P(e);e.background=n.insertBefore(Ii("div",null,t),n.firstChild)}}function I(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Nr(e,t)}function j(e,t){var n=t.text.className,r=I(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,V(t)):n&&(t.text.className=n)}function V(e){F(e),e.line.wrapClass?P(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function H(e,t,n,r){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=P(t),a=t.gutter=Ii("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px");if(e.display.input.setUneditable(a),o.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Ii("div",C(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s1&&(Do&&Do.join("\n")==t?s=r.ranges.length%Do.length==0&&Ri(Do,qa):a.length==r.ranges.length&&(s=Ri(a,function(e){return[e]})));for(var l=r.ranges.length-1;l>=0;l--){var u=r.ranges[l],c=u.from(),f=u.to();u.empty()&&(n&&n>0?c=Ao(c.line,c.ch-n):e.state.overwrite&&!e.state.pasteIncoming&&(f=Ao(f.line,Math.min(Gr(o,f.line).text.length,f.ch+Ti(a).length))));var d=e.curOp.updateInput,p={from:c,to:f,text:s?s[l%s.length]:a,origin:i||(e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input")};xn(e.doc,p),bi(e,"inputRead",e,p)}t&&!e.state.pasteIncoming&&Z(e,t),Nn(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Pn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Pn(e,i.head.line,"smart"));a&&bi(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?u.map:c[i],a=0;ai?e.line:e.rest[i]),f=o[a]+r;return(0>r||s!=t)&&(f=o[a+(r?1:0)]),Ao(l,f)}}}var i=e.text.firstChild,o=!1;if(!t||!ja(i,t))return ae(Ao(Xr(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Ti(e.rest):e.line;return ae(Ao(Xr(a),a.text.length),o)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,f=r(s,l,n);if(f)return ae(f,o);for(var d=l.nextSibling,p=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(f=r(d,d.firstChild,0))return ae(Ao(f.line,f.ch-p),o);p+=d.textContent.length}for(var h=l.previousSibling,p=n;h;h=h.previousSibling){if(f=r(h,h.firstChild,-1))return ae(Ao(f.line,f.ch+p),o);p+=d.textContent.length}}function ue(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var u,c=t.getAttribute("cm-marker");if(c){var f=e.findMarks(Ao(r,0),Ao(i+1,0),o(+c));return void(f.length&&(u=f[0].find())&&(s+=Kr(e.doc,u.from,u.to).join("\n")))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var a=Y(o.from(),i.from()),s=K(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(l?s:a,l?a:s))}}return new ce(e,t)}function pe(e,t){return new ce([new fe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.linen?Ao(n,Gr(e,n).text.length):ve(t,Gr(e,t.line).text.length)}function ve(e,t){var n=e.ch;return null==n||n>t?Ao(e.line,t):0>n?Ao(e.line,0):e}function me(e,t){return t>=e.first&&t=o.ch:u.to>o.ch))){if(r&&(Ea(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var f=c.find(0>a?-1:1);if(0==Mo(f,o)&&(f.ch+=a,f.ch<0?f=f.line>e.first?ge(e,Ao(f.line-1)):null:f.ch>s.text.length&&(f=f.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(Ii("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return ct(e,Ao(t,n),"div",f,r)}var s,l,f=Gr(a,t),d=f.text.length;return Qi(ei(f),n||0,null==i?d:i,function(e,t,a){var f,p,h,g=o(e,"left");if(e==t)f=g,p=h=g.left;else{if(f=o(t-1,"right"),"rtl"==a){var v=g;g=f,f=v}p=g.left,h=f.right}null==n&&0==e&&(p=u),f.top-g.top>3&&(r(p,g.top,null,g.bottom),p=u,g.bottoml.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),u+1>p&&(p=u),r(p,f.top,h-p,f.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=Be(e.display),u=l.left,c=Math.max(o.sizerWidth,Ue(e)-o.sizer.offsetLeft)-l.right,f=t.from(),d=t.to();if(f.line==d.line)i(f.line,f.ch,d.ch);else{var p=Gr(a,f.line),h=Gr(a,d.line),g=hr(p)==hr(h),v=i(f.line,f.ch,g?p.text.length+1:null).end,m=i(d.line,g?0:null,d.ch).start;g&&(v.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ta(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=Rr(e,o,r,!0);o.styles=s.styles;var l=o.styleClasses,u=s.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!c&&fn?(Fe(e,e.options.workDelay),!0):void 0}),i.length&&St(e,function(){for(var t=0;ta;--s){if(s<=o.first)return o.first;var l=Gr(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Ma(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=je(e,t,n),a=o>r.first&&Gr(r,o-1).stateAfter;return a=a?ta(r.mode,a):na(r.mode),r.iter(o,t,function(n){Mr(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ye(e,t){t=hr(t);var n=Xr(t),r=e.display.externalMeasured=new At(e.doc,t,n);r.lineN=n;var i=r.built=Nr(e,r);return r.text=i.pre,Vi(e.display.lineMeasure,i.pre),r}function Qe(e,t,n,r){return Ze(e,Je(e,t),n,r)}function Xe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):u>t?(i=t-l,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-l,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&i==u-l)for(;sc;c++){for(;s&&Fi(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+lho&&0==s&&l==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(po&&e.options.lineWrapping){var f=La(a,s,l).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Fo}else i=La(a,s,l).getBoundingClientRect()||Fo;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}po&&11>ho&&(i=nt(e.display.measure,i))}else{s>0&&(u=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(po&&9>ho&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+mt(e.display),top:d.top,bottom:d.bottom}:Fo}for(var p=i.top-t.rect.top,h=i.bottom-t.rect.top,g=(p+h)/2,v=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||Gr(e.doc,t.line),i||(i=Je(e,r));var l=ei(r),u=t.ch;if(!l)return a(u);var c=oo(l,u),f=s(u,c);return null!=Xa&&(f.other=s(u,Xa)),f}function dt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=mt(e.display)*t.ch);var r=Gr(e.doc,t.line),i=Zr(r)+He(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function pt(e,t,n,r){var i=Ao(e,t);return i.xRel=r,n&&(i.outside=!0),i}function ht(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return pt(r.first,0,!0,-1);var i=Jr(r,n),o=r.first+r.size-1;if(i>o)return pt(r.first+r.size-1,Gr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Gr(r,i);;){var s=gt(e,a,i,t,n),l=dr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=Xr(a=u.to.line)}}function gt(e,t,n,r,i){function o(r){var i=ft(e,Ao(n,r),"line",t,u);return s=!0,a>i.bottom?i.left-l:av)return pt(n,p,m,1);for(;;){if(c?p==d||p==so(t,d,1):1>=p-d){for(var y=h>r||v-r>=r-h?d:p,b=r-(y==d?h:v);Fi(t.text.charAt(y));)++y;var w=pt(n,y,y==d?g:m,-1>b?-1:b>1?1:0);return w}var $=Math.ceil(f/2),x=d+$;if(c){x=d;for(var C=0;$>C;++C)x=so(t,x,1)}var _=o(x);_>r?(p=x,v=_,(m=s)&&(v+=1e3),f=$):(d=x,h=_,g=s,f-=$)}}function vt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==No){No=Ii("pre");for(var t=0;49>t;++t)No.appendChild(document.createTextNode("x")),No.appendChild(Ii("br"));No.appendChild(document.createTextNode("x"))}Vi(e.measure,No);var n=No.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),ji(e.measure),n||1}function mt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Ii("span","xxxxxxxxxx"),n=Ii("pre",[t]);Vi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function yt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++jo},Io?Io.ops.push(e.curOp):e.curOp.ownsGroup=Io={ops:[e.curOp],delayedCallbacks:[]}}function bt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new E(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&S(e.cm,e.update)}function _t(e){var t=e.cm,n=t.display;e.updatedDisplay&&A(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+ze(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ue(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Et(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new At(e.doc,Gr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ro&&vr(e.doc,t)i.viewFrom?Lt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Lt(e);else if(t<=i.viewFrom){var o=Ft(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Lt(e)}else if(n>=i.viewTo){var o=Ft(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Lt(e)}else{var a=Ft(e,t,t,-1),s=Ft(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Mt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Lt(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Pt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Oi(a,n)&&a.push(n)}}}function Lt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Pt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Ft(e,t,n,r){var i,o=Pt(e,t),a=e.display.view;if(!Ro||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;vr(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function It(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Pt(e,n)))),r.viewTo=n}function jt(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ca(i.scroller,"mousedown",Tt(e,Ut)),po&&11>ho?Ca(i.scroller,"dblclick",Tt(e,function(t){if(!$i(e,t)){var n=zt(e,t);if(n&&!Qt(e,t)&&!Bt(e.display,t)){wa(t);var r=e.findWordAt(n);we(e.doc,r.anchor,r.head)}}})):Ca(i.scroller,"dblclick",function(t){$i(e,t)||wa(t)}),To||Ca(i.scroller,"contextmenu",function(t){gn(e,t)});var o,a={end:0};Ca(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Ca(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ca(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Bt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new fe(Ao(s.line,0),ge(e.doc,Ao(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),wa(n)}t()}),Ca(i.scroller,"touchcancel",t),Ca(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zt(e,i.scroller.scrollTop),en(e,i.scroller.scrollLeft,!0),Ea(e,"scroll",e))}),Ca(i.scroller,"mousewheel",function(t){tn(e,t)}),Ca(i.scroller,"DOMMouseScroll",function(t){tn(e,t)}),Ca(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={simple:function(t){$i(e,t)||xa(t)},start:function(t){Jt(e,t)},drop:Tt(e,Xt)};var s=i.input.getField();Ca(s,"keyup",function(t){cn.call(e,t)}),Ca(s,"keydown",Tt(e,ln)),Ca(s,"keypress",Tt(e,fn)),Ca(s,"focus",Ni(pn,e)),Ca(s,"blur",Ni(hn,e))}function Ht(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?Ca:_a;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.simple),a(t.display.scroller,"dragover",o.simple),a(t.display.scroller,"drop",o.drop)}}function Wt(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Bt(e,t){for(var n=mi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function zt(e,t,n,r){var i=e.display;if(!n&&"true"==mi(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=ht(e,o,a);if(r&&1==u.xRel&&(l=Gr(e.doc,u.line).text).length==u.ch){var c=Ma(l,l.length,e.options.tabSize)-l.length;u=Ao(u.line,Math.max(0,Math.round((o-Be(e.display).left)/mt(e.display))-c))}return u}function Ut(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||$i(t,e))){if(n.shift=e.shiftKey,Bt(n,e))return void(go||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Qt(t,e)){var r=zt(t,e);switch(window.focus(),yi(e)){case 1:r?qt(t,e,r):mi(e)==n.scroller&&wa(e);break;case 2:go&&(t.state.lastMiddleDown=+new Date),r&&we(t.doc,r),setTimeout(function(){n.input.focus()},20),wa(e);break;case 3:To?gn(t,e):dn(t)}}}}function qt(e,t,n){po?setTimeout(Ni(Q,e),0):e.curOp.focus=Hi();var r,i=+new Date;Po&&Po.time>i-400&&0==Mo(Po.pos,n)?r="triple":Lo&&Lo.time>i-400&&0==Mo(Lo.pos,n)?(r="double",Po={time:i,pos:n}):(r="single",Lo={time:i,pos:n});var o,a=e.doc.sel,s=_o?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ua&&!X(e)&&"single"==r&&(o=a.contains(n))>-1&&!a.ranges[o].empty()?Gt(e,t,n,s):Kt(e,t,n,r,s)}function Gt(e,t,n,r){var i=e.display,o=+new Date,a=Tt(e,function(s){go&&(i.scroller.draggable=!1),e.state.draggingText=!1,_a(document,"mouseup",a),_a(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(wa(s),!r&&+new Date-200=h;h++){var m=Gr(u,h).text,y=ki(m,l,o);l==p?i.push(new fe(Ao(h,y),Ao(h,y))):m.length>y&&i.push(new fe(Ao(h,y),Ao(h,ki(m,p,o))))}i.length||i.push(new fe(n,n)),ke(u,de(d.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,w=b.anchor,$=t;if("single"!=r){if("double"==r)var x=e.findWordAt(t);else var x=new fe(Ao(t.line,0),ge(u,Ao(t.line+1,0)));Mo(x.anchor,w)>0?($=x.head,w=Y(b.from(),x.anchor)):($=x.anchor,w=K(b.to(),x.head))}var i=d.ranges.slice(0);i[f]=new fe(ge(u,w),$),ke(u,de(i,f),Ra)}}function a(t){var n=++y,i=zt(e,t,!0,"rect"==r);if(i)if(0!=Mo(i,v)){e.curOp.focus=Hi(),o(i);var s=w(l,u);(i.line>=s.to||i.linem.bottom?20:0;c&&setTimeout(Tt(e,function(){y==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(e){y=1/0,wa(e),l.input.focus(),_a(document,"mousemove",b),_a(document,"mouseup",$),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;wa(t);var c,f,d=u.sel,p=d.ranges;if(i&&!t.shiftKey?(f=u.sel.contains(n),c=f>-1?p[f]:new fe(n,n)):(c=u.sel.primary(),f=u.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=zt(e,t,!0,!0),f=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?be(u,c,h.anchor,h.head):h}else if("triple"==r){var g=new fe(Ao(n.line,0),ge(u,Ao(n.line+1,0)));c=e.display.shift||u.extend?be(u,c,g.anchor,g.head):g}else c=be(u,c,n);i?-1==f?(f=p.length,ke(u,de(p.concat([c]),f),{scroll:!1,origin:"*mouse"})):p.length>1&&p[f].empty()&&"single"==r&&!t.shiftKey?(ke(u,de(p.slice(0,f).concat(p.slice(f+1)),0)),d=u.sel):xe(u,f,c,Ra):(f=0,ke(u,new ce([c],0),Ra),d=u.sel);var v=n,m=l.wrapper.getBoundingClientRect(),y=0,b=Tt(e,function(e){yi(e)?a(e):s(e)}),$=Tt(e,s);Ca(document,"mousemove",b),Ca(document,"mouseup",$)}function Yt(e,t,n,r,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&wa(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(a>l.bottom||!Ci(e,n))return vi(t);a-=l.top-s.viewOffset;for(var u=0;u=o){var f=Jr(e.doc,a),d=e.options.gutters[u];return i(e,n,e,f,d,t),vi(t)}}}function Qt(e,t){return Yt(e,t,"gutterClick",!0,bi)}function Xt(e){var t=this;if(!$i(t,e)&&!Bt(t.display,e)){wa(e),po&&(Vo=+new Date);var n=zt(t,e,!0),r=e.dataTransfer.files;if(n&&!X(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){var s=new FileReader;s.onload=Tt(t,function(){if(o[r]=s.result,++a==i){n=ge(t.doc,n);var e={from:n,to:n,text:qa(o.join("\n")),origin:"paste"};xn(t.doc,e),Ee(t.doc,pe(n,qo(e)))}}),s.readAsText(e)},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(_o?e.altKey:e.ctrlKey))var u=t.listSelections();if(Se(t.doc,pe(n,n)),u)for(var l=0;la.clientWidth||i&&a.scrollHeight>a.clientHeight){if(i&&_o&&go)e:for(var s=t.target,l=o.view;s!=a;s=s.parentNode)for(var u=0;uc?f=Math.max(0,f+c-50):d=Math.min(e.doc.height,d+c+50),O(e,{top:f,bottom:d})}20>Ho&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Wo=(Wo*Ho+n)/(Ho+1),++Ho)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function nn(e,t,n){if("string"==typeof t&&(t=ra[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{X(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ta}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function rn(e,t,n){for(var r=0;rho&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=an(t,e);yo&&(Uo=r?n:null,!r&&88==n&&!Ka&&(_o?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||un(t)}}function un(e){function t(e){18!=e.keyCode&&e.altKey||(Wa(n,"CodeMirror-crosshair"),_a(document,"keyup",t),_a(document,"mouseover",t))}var n=e.display.lineDiv;Ba(n,"CodeMirror-crosshair"),Ca(document,"keyup",t),Ca(document,"mouseover",t)}function cn(e){16==e.keyCode&&(this.doc.sel.shift=!1),$i(this,e)}function fn(e){var t=this;if(!(Bt(t.display,e)||$i(t,e)||e.ctrlKey&&!e.altKey||_o&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(yo&&n==Uo)return Uo=null,void wa(e);if(!yo||e.which&&!(e.which<10)||!an(t,e)){var i=String.fromCharCode(null==r?n:r);sn(t,e,i)||t.display.input.onKeyPress(e)}}}function dn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,hn(e))},100)}function pn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ea(e,"focus",e),e.state.focused=!0,Ba(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),go&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Pe(e))}function hn(e){e.state.delayingBlurEvent||(e.state.focused&&(Ea(e,"blur",e),e.state.focused=!1,Wa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function gn(e,t){Bt(e.display,t)||vn(e,t)||e.display.input.onContextMenu(t)}function vn(e,t){return Ci(e,"gutterContextMenu")?Yt(e,t,"gutterContextMenu",!1,Ea):!1}function mn(e,t){if(Mo(e,t.from)<0)return e;if(Mo(e,t.to)<=0)return qo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=qo(t).ch-t.to.ch),Ao(n,r)}function yn(e,t){for(var n=[],r=0;r=0;--i)Cn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Cn(e,t)}}function Cn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Mo(t.from,t.to)){var n=yn(e,t);oi(e,t,n,e.cm?e.cm.curOp.id:NaN),kn(e,t,n,tr(e,t));var r=[];Ur(e,function(e,n){n||-1!=Oi(r,e.history)||(gi(e.history,t),r.push(e.history)),kn(e,t,null,tr(e,t))})}}function _n(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--l){var f=r.changes[l];if(f.origin=t,c&&!$n(e,f,!1))return void(a.length=0);u.push(ni(e,f));var d=l?yn(e,f):Ti(a);kn(e,f,d,rr(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:qo(f)});var p=[];Ur(e,function(e,t){t||-1!=Oi(p,e.history)||(gi(e.history,f),p.push(e.history)),kn(e,f,null,rr(e,f))})}}}}function En(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Ri(e.sel.ranges,function(e){return new fe(Ao(e.anchor.line+t,e.anchor.ch),Ao(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Ao(o,Gr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Kr(e,t.from,t.to),n||(n=yn(e,t)),e.cm?Sn(e.cm,t,r):Wr(e,t,r),Se(e,n,Oa)}}function Sn(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Xr(hr(Gr(r,a.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&xi(e),Wr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),Fe(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Dt(e):a.line!=s.line||1!=t.text.length||Hr(e.doc,t)?Dt(e,a.line,s.line+1,c):Nt(e,a.line,"text");var d=Ci(e,"changes"),p=Ci(e,"change");if(p||d){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&bi(e,"change",e,h),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Tn(e,t,n,r,i){if(r||(r=n),Mo(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=qa(t)),xn(e,{from:n,to:r,text:t,origin:i})}function On(e,t){if(!$i(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!$o){var o=Ii("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-He(e.display))+"px; height: "+(t.bottom-t.top+ze(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Rn(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=ft(e,t),s=n&&n!=t?ft(e,n):a,l=Mn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(Zt(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(en(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function An(e,t,n,r,i){var o=Mn(e,t,n,r,i);null!=o.scrollTop&&Zt(e,o.scrollTop),null!=o.scrollLeft&&en(e,o.scrollLeft)}function Mn(e,t,n,r,i){var o=e.display,a=vt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=qe(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+We(o),f=a>n,d=i>c-a;if(s>n)u.scrollTop=f?0:n;else if(i>s+l){var p=Math.min(n,(d?c:i)-l);p!=s&&(u.scrollTop=p)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ue(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=r-t>g;return v&&(r=t+g),10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(v?0:10)):r>g+h-3&&(u.scrollLeft=r+(v?0:10)-g),u}function Dn(e,t,n){(null!=t||null!=n)&&Ln(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Nn(e){Ln(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Ao(t.line,t.ch-1):t,r=Ao(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Ln(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=Mn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Pn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ve(e,t):n="prev");var a=e.options.tabSize,s=Gr(o,t),l=Ma(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Ta||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Ma(Gr(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)d+=a,f+=" ";if(u>d&&(f+=Si(u-d)),f!=c)return Tn(o,f,Ao(t,0),Ao(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p=0;t--)Tn(e.doc,"",r[t].from,r[t].to,"+delete");Nn(e)})}function jn(e,t,n,r,i){function o(){var t=s+n;return t=e.first+e.size?f=!1:(s=t,c=Gr(e,t))}function a(e){var t=(i?so:lo)(c,l,n,!0);if(null==t){if(e||!o())return f=!1;l=i?(0>n?eo:Zi)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Gr(e,s),f=!0;if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var d=null,p="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(0>n)||a(!g);g=!1){var v=c.text.charAt(l)||"\n",m=Li(v,h)?"w":p&&"\n"==v?"n":!p||/\s/.test(v)?null:"p";if(!p||g||m||(m="s"),d&&d!=m){0>n&&(n=1,a());break}if(m&&(d=m),n>0&&!a(!g))break}var y=Ae(e,Ao(s,l),u,!0);return f||(y.hitSide=!0),y}function Vn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*vt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=ht(e,a,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Hn(t,n,r,i){e.defaults[t]=n,r&&(Ko[t]=i?function(e,t,n){n!=Yo&&r(e,t,n)}:r)}function Wn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Ii("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(pr(e,t.line,t,n,o)||t.line!=n.line&&pr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ro=!0}o.addToHistory&&oi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&hr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Qr(e,0),Jn(e,new Yn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){yr(e,t)&&Qr(t,0)}),o.clearOnEnter&&Ca(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Oo=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ua,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Dt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Nt(u,c,"text");o.atomic&&Oe(u.doc),bi(u,"markerAdded",u,o)}return o}function Un(e,t,n,r,i){r=Di(r),r.shared=!1;var o=[zn(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Ur(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(zn(e,ge(e,t),ge(e,n),r,i));for(var l=0;l=t:o.to>t);(r||(r=[])).push(new Yn(a,o.from,l?null:o.to))}}return r}function er(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var f=0;ff;++f)h.push(g);h.push(l)}return h}function nr(e){for(var t=0;t0)){var c=[l,1],f=Mo(u.from,s.from),d=Mo(u.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function or(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Mo(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Mo(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function hr(e){for(var t;t=fr(e);)e=t.find(-1,!0).line;return e}function gr(e){for(var t,n;t=dr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function vr(e,t){var n=Gr(e,t),r=hr(n);return n==r?t:Xr(r)}function mr(e,t){if(t>e.lastLine())return t;var n,r=Gr(e,t);if(!yr(e,r))return t;for(;n=dr(r);)r=n.find(1,!0).line;return Xr(r)+1}function yr(e,t){var n=Ro&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Tr(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?ta(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=ge(a,t);var l,u=Gr(a,t.line),c=Ve(e,t.line,n),f=new la(u.text,e.options.tabSize);for(r&&(l=[]);(r||f.pose.options.maxHighlightLength?(s=!1,a&&Mr(e,t,r,f.pos),f.pos=t.length,l=null):l=Er(Sr(n,f,r,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;uu;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Ar(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Rr(e,t,t.stateAfter=Ve(e,Xr(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Mr(e,t,n,r){var i=e.doc.mode,o=new la(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&kr(i,n);!o.eol()&&o.pos<=e.options.maxHighlightLength;)Sr(i,o,n),o.start=o.pos}function Dr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ga:ha;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Nr(e,t){var n=Ii("span",null,null,go?"padding-right: .1px":null),r={pre:Ii("pre",[n]),content:n,col:0,pos:0,cm:e,splitSpaces:(po||go)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Pr,Ki(e.display.measure)&&(o=ei(a))&&(r.addToken=Ir(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&Xr(a);Vr(a,r,Ar(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Bi(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Bi(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Gi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return go&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),Ea(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Bi(r.pre.className,r.textClass||"")),r}function Lr(e){var t=Ii("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Pr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Fr):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var d=l.exec(t),p=d?d.index-f:t.length-f;if(p){var h=document.createTextNode(s.slice(f,f+p));po&&9>ho?c.appendChild(Ii("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(f+=p+1," "==d[0]){var g=e.cm.options.tabSize,v=g-e.col%g,h=c.appendChild(Ii("span",Si(v),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=v}else{var h=e.cm.options.specialCharPlaceholder(d[0]);h.setAttribute("cm-text",d[0]),po&&9>ho?c.appendChild(Ii("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),po&&9>ho&&(u=!0),e.pos+=t.length}if(n||r||i||u||a){var m=n||"";r&&(m+=r),i&&(m+=i);var y=Ii("span",[c],m,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Fr(e){for(var t=" ",n=0;nu&&d.from<=u)break}if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function jr(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Vr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,d,p=i.length,h=0,g=1,v="",m=0;;){if(m==h){l=u=c=f=s="",d=null,m=1/0;for(var y=[],b=0;bh||$.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&m>w.to&&(m=w.to,u=""),$.className&&(l+=" "+$.className),$.css&&(s=$.css),$.startStyle&&w.from==h&&(c+=" "+$.startStyle),$.endStyle&&w.to==m&&(u+=" "+$.endStyle),$.title&&!f&&(f=$.title),$.collapsed&&(!d||ur(d.marker,$)<0)&&(d=w)):w.from>h&&m>w.from&&(m=w.from)}if(d&&(d.from||0)==h){if(jr(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}if(!d&&y.length)for(var b=0;b=p)break;for(var x=Math.min(p,m);;){if(v){var C=h+v.length;if(!d){var _=C>x?v.slice(0,x-h):v;t.addToken(t,_,a?a+l:l,c,h+_.length==m?u:"",f,s)}if(C>=x){v=v.slice(x-h),h=x;break}h=C,c=""}v=i.slice(o,o=n[g++]),a=Dr(n[g++],t.cm.options)}}else for(var g=1;gn;++n)o.push(new pa(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Gr(e,s.line),f=Gr(e,l.line),d=Ti(u),p=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Hr(e,t)){var g=a(0,u.length-1);o(f,f.text,p),h&&e.remove(s.line,h),g.length&&e.insert(s.line,g)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),p);else{var g=a(1,u.length-1);g.push(new pa(d+c.text.slice(l.ch),p,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,d+f.text.slice(l.ch),p);var g=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,g)}bi(e,"change",e,t)}function Br(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Kr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Yr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Qr(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Xr(e){if(null==e.parent)return null;for(var t=e.parent,n=Oi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Jr(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function Zr(e){e=hr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Ti(e.done)):void 0}function oi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ii(i,i.lastOp==r))){var s=Ti(o.changes);0==Mo(t.from,t.to)&&0==Mo(t.from,s.to)?s.to=qo(t):o.changes.push(ni(e,t))}else{var l=Ti(i.done);for(l&&l.ranges||li(e.sel,i.done),o={changes:[ni(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Ea(e,"historyAdded")}function ai(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function si(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ai(e,o,Ti(i.done),t))?i.done[i.done.length-1]=t:li(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ri(i.undone)}function li(e,t){var n=Ti(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ui(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ci(e){if(!e)return null;for(var t,n=0;n-1&&(Ti(s)[f]=c[f],delete c[f])}}}return i}function pi(e,t,n,r){n0}function _i(e){e.prototype.on=function(e,t){Ca(this,e,t)},e.prototype.off=function(e,t){_a(this,e,t)}}function Ei(){this.id=null}function ki(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function Si(e){for(;Da.length<=e;)Da.push(Ti(Da)+" ");return Da[e]}function Ti(e){return e[e.length-1]}function Oi(e,t){for(var n=0;n-1&&Fa(e)?!0:t.test(e):Fa(e)}function Pi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Fi(e){return e.charCodeAt(0)>=768&&Ia.test(e)}function Ii(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Vi(e,t){return ji(e).appendChild(t)}function Hi(){return document.activeElement}function Wi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Bi(e,t){for(var n=e.split(" "),r=0;r2&&!(po&&8>ho))}var n=Va?Ii("span","​"):Ii("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px"); +return n.setAttribute("cm-text",""),n}function Ki(e){if(null!=Ha)return Ha;var t=Vi(e,document.createTextNode("AخA")),n=La(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=La(t,1,2).getBoundingClientRect();return Ha=r.right-n.right<3}function Yi(e){if(null!=Ya)return Ya;var t=Vi(e,Ii("span","x")),n=t.getBoundingClientRect(),r=La(t,0,1).getBoundingClientRect();return Ya=Math.abs(n.left-r.left)>1}function Qi(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function Xi(e){return e.level%2?e.to:e.from}function Ji(e){return e.level%2?e.from:e.to}function Zi(e){var t=ei(e);return t?Xi(t[0]):0}function eo(e){var t=ei(e);return t?Ji(Ti(t)):e.text.length}function to(e,t){var n=Gr(e.doc,t),r=hr(n);r!=n&&(t=Xr(r));var i=ei(r),o=i?i[0].level%2?eo(r):Zi(r):0;return Ao(t,o)}function no(e,t){for(var n,r=Gr(e.doc,t);n=dr(r);)r=n.find(1,!0).line,t=null;var i=ei(r),o=i?i[0].level%2?Zi(r):eo(r):r.text.length;return Ao(null==t?Xr(r):t,o)}function ro(e,t){var n=to(e,t.line),r=Gr(e.doc,n.line),i=ei(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Ao(n.line,a?0:o)}return n}function io(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function oo(e,t){Xa=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return io(e,i.level,e[n].level)?(i.from!=i.to&&(Xa=n),r):(i.from!=i.to&&(Xa=r),n);n=r}}return n}function ao(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Fi(e.text.charAt(t)));return t}function so(e,t,n,r){var i=ei(e);if(!i)return lo(e,t,n,r);for(var o=oo(i,t),a=i[o],s=ao(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?ao(e,a.to,-1,r):ao(e,a.from,1,r)}}function lo(e,t,n,r){var i=t+n;if(r)for(;i>0&&Fi(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var uo=/gecko\/\d/i.test(navigator.userAgent),co=/MSIE \d/.test(navigator.userAgent),fo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),po=co||fo,ho=po&&(co?document.documentMode||6:fo[1]),go=/WebKit\//.test(navigator.userAgent),vo=go&&/Qt\/\d+\.\d+/.test(navigator.userAgent),mo=/Chrome\//.test(navigator.userAgent),yo=/Opera\//.test(navigator.userAgent),bo=/Apple Computer/.test(navigator.vendor),wo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),$o=/PhantomJS/.test(navigator.userAgent),xo=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Co=xo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),_o=xo||/Mac/.test(navigator.platform),Eo=/win/i.test(navigator.platform),ko=yo&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);ko&&(ko=Number(ko[1])),ko&&ko>=15&&(yo=!1,go=!0);var So=_o&&(vo||yo&&(null==ko||12.11>ko)),To=uo||po&&ho>=9,Oo=!1,Ro=!1;g.prototype=Di({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=_o&&!wo?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){mi(e)!=t.vert&&mi(e)!=t.horiz&&Tt(t.cm,Ut)(e)};Ca(this.vert,"mousedown",n),Ca(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),v.prototype=Di({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":g,"null":v},E.prototype.signal=function(e,t){Ci(e,t)&&this.events.push(arguments)},E.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ca(o,"paste",function(){if(go&&!r.state.fakedLastChar&&!(new Date-r.state.lastMiddleDown<200)){var e=o.selectionStart,t=o.selectionEnd;o.value+="$",o.selectionEnd=t,o.selectionStart=e,r.state.fakedLastChar=!0}r.state.pasteIncoming=!0,n.fastPoll()}),Ca(o,"cut",t),Ca(o,"copy",t),Ca(e.scroller,"paste",function(t){Bt(e,t)||(r.state.pasteIncoming=!0,n.focus())}),Ca(e.lineSpace,"selectstart",function(t){Bt(e,t)||wa(t)}),Ca(o,"compositionstart",function(){var e=r.getCursor("from");n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ca(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=De(e);if(e.options.moveInputWithCursor){var i=ft(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Vi(n.cursorDiv,e.cursors),Vi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ka&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Na(this.textarea),po&&ho>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",po&&ho>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Co||Hi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(!e.state.focused||Ga(t)&&!n||X(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(po&&ho>=9&&this.hasSelection===r||_o&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return St(e,function(){J(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){po&&ho>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,po&&9>ho&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!po||po&&9>ho)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Tt(i,ra.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=zt(i,e),l=o.scroller.scrollTop;if(s&&!yo){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Tt(i,ke)(i.doc,pe(s),Oa);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(po?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",go)var f=window.scrollY;if(o.input.focus(),go&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),po&&ho>=9&&t(),To){xa(e);var d=function(){_a(window,"mouseup",d),setTimeout(n,20)};Ca(window,"mouseup",d)}else setTimeout(n,50)}},setUneditable:Ai,needsContentAttribute:!1},ne.prototype),ie.prototype=Di({init:function(e){function t(e){if(r.somethingSelected())Do=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Do=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Oa),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!xo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Do.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Do.join("\n");var o=document.activeElement;Na(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable="true",te(i),Ca(i,"paste",function(e){var t=e.clipboardData&&e.clipboardData.getData("text/plain");t&&(e.preventDefault(),r.replaceSelection(t,null,"paste"))}),Ca(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=pe(Ao(i.head.line,a),Ao(i.head.line,a+t.length)))}}),Ca(i,"compositionupdate",function(e){n.composing.data=e.data}),Ca(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ca(i,"touchstart",function(){n.forceCompositionEnd()}),Ca(i,"input",function(){n.composing||n.pollContent()||St(n.cm,function(){Dt(r)})}),Ca(i,"copy",t),Ca(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=se(this.cm,e.anchorNode,e.anchorOffset),r=se(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Mo(Y(n,r),t.from())||0!=Mo(K(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=La(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):uo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Vi(this.cm.display.cursorDiv,e.cursors),Vi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ja(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():St(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=se(t,e.anchorNode,e.anchorOffset),r=se(t,e.focusNode,e.focusOffset);n&&r&&St(t,function(){ke(t.doc,pe(n,r),Oa),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Pt(e,r.line)))var a=Xr(t.view[0].line),s=t.view[0].node;else var a=Xr(t.view[o].line),s=t.view[o-1].node.nextSibling;var l=Pt(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.view[l].node;else var u=Xr(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=qa(ue(e,s,c,a,u)),d=Kr(e.doc,Ao(a,0),Ao(u,Gr(e.doc,u).text.length));f.length>1&&d.length>1;)if(Ti(f)==Ti(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var p=0,h=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);m>p&&g.charCodeAt(p)==v.charCodeAt(p);)++p;for(var y=Ti(f),b=Ti(d),w=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));w>h&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=y.slice(0,y.length-h),f[0]=f[0].slice(p);var $=Ao(a,p),x=Ao(u,d.length?Ti(d).length-h:0);return f.length>1||f[0]||Mo($,x)?(Tn(e.doc,f,$,x,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){e.data&&e.data!=e.startData&&Tt(this.cm,J)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.setAttribute("contenteditable","false")},onKeyPress:function(e){e.preventDefault(),Tt(this.cm,J)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},onContextMenu:Ai,resetPosition:Ai,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Mo(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var No,Lo,Po,Fo={left:0,right:0,top:0,bottom:0},Io=null,jo=0,Vo=0,Ho=0,Wo=null;po?Wo=-.53:uo?Wo=15:mo?Wo=-.7:bo&&(Wo=-1/3);var Bo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Bo(e);return t.x*=Wo,t.y*=Wo,t};var zo=new Ei,Uo=null,qo=e.changeEnd=function(e){return e.text?Ao(e.from.line+e.text.length-1,Ti(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Ko.hasOwnProperty(e)&&Tt(this,Ko[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Bn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Pn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Nn(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)Pn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&xe(this.doc,r,new fe(o,u[r].to()),Oa)}}}),getTokenAt:function(e,t){return Tr(this,e,t)},getLineTokens:function(e,t){return Tr(this,Ao(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Ar(this,Gr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!ea.hasOwnProperty(t))return n;var r=ea[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Gr(this.doc,e)}else n=e;return lt(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-Zr(n):0)},defaultTextHeight:function(){return vt(this.display)},defaultCharWidth:function(){return mt(this.display)},setGutterMarker:Ot(function(e,t,n){return Fn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Pi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Nt(t,r,"gutter"),Pi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!me(this.doc,e))return null;var t=e;if(e=Gr(this.doc,e),!e)return null}else{var t=Xr(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=ft(this,ge(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&An(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Ot(ln),triggerOnKeyPress:Ot(fn),triggerOnKeyUp:cn,execCommand:function(e){return ra.hasOwnProperty(e)?ra[e](this):void 0},triggerElectric:Ot(function(e){Z(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=ge(this.doc,e);t>o&&(a=jn(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Ot(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?jn(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Aa)}),deleteH:Ot(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):In(this,function(n){var i=jn(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=ge(this.doc,e);t>a;++a){var l=ft(this,s,"div");if(null==o?o=l.left:l.left=o,s=Vn(this,l,i,n),s.hitSide)break}return s},moveV:Ot(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=ft(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Vn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Dn(n,null,ct(n,l,"div").top-s.top),l},Aa),i.length)for(var a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&a(this),Ea(this,"refresh",this)}),swapDoc:Ot(function(e){var t=this.doc;return t.cm=null,qr(this,e),ot(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,bi(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},_i(e);var Go=e.defaults={},Ko=e.optionHandlers={},Yo=e.Init={toString:function(){return"CodeMirror.Init"}};Hn("value","",function(e,t){e.setValue(t)},!0),Hn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Hn("indentUnit",2,n,!0),Hn("indentWithTabs",!1),Hn("smartIndent",!0),Hn("tabSize",4,function(e){r(e),ot(e),Dt(e)},!0),Hn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Hn("specialCharPlaceholder",Lr,function(e){e.refresh()},!0),Hn("electricChars",!0),Hn("inputStyle",Co?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Hn("rtlMoveVisually",!Eo),Hn("wholeLineUpdateBefore",!0),Hn("theme","default",function(e){s(e),l(e)},!0),Hn("keyMap","default",function(t,n,r){var i=Bn(n),o=r!=e.Init&&Bn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Hn("extraKeys",null),Hn("lineWrapping",!1,i,!0),Hn("gutters",[],function(e){p(e.options),l(e)},!0),Hn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?_(e.display)+"px":"0",e.refresh()},!0),Hn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Hn("scrollbarStyle","native",function(e){m(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Hn("lineNumbers",!1,function(e){p(e.options),l(e)},!0),Hn("firstLineNumber",1,l,!0),Hn("lineNumberFormatter",function(e){return e},l,!0),Hn("showCursorWhenSelecting",!1,Me,!0),Hn("resetSelectionOnContextMenu",!0),Hn("lineWiseCopyCut",!0),Hn("readOnly",!1,function(e,t){"nocursor"==t?(hn(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||e.display.input.reset())}),Hn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Hn("dragDrop",!0,Ht),Hn("cursorBlinkRate",530),Hn("cursorScrollMargin",0),Hn("cursorHeight",1,Me,!0),Hn("singleCursorHeightPerLine",!0,Me,!0),Hn("workTime",100),Hn("workDelay",100),Hn("flattenSpans",!0,r,!0),Hn("addModeClass",!1,r,!0),Hn("pollInterval",100),Hn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Hn("historyEventDelay",1250),Hn("viewportMargin",10,function(e){e.refresh()},!0),Hn("maxHighlightLength",1e4,r,!0),Hn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Hn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Hn("autofocus",null);var Qo=e.modes={},Xo=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Qo[t]=n},e.defineMIME=function(e,t){Xo[e]=t},e.resolveMode=function(t){if("string"==typeof t&&Xo.hasOwnProperty(t))t=Xo[t];else if(t&&"string"==typeof t.name&&Xo.hasOwnProperty(t.name)){var n=Xo[t.name];"string"==typeof n&&(n={name:n}),t=Mi(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=Qo[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(Jo.hasOwnProperty(n.name)){var o=Jo[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var Jo=e.modeExtensions={};e.extendMode=function(e,t){var n=Jo.hasOwnProperty(e)?Jo[e]:Jo[e]={};Di(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){ma.prototype[e]=t},e.defineOption=Hn;var Zo=[];e.defineInitHook=function(e){Zo.push(e)};var ea=e.helpers={};e.registerHelper=function(t,n,r){ea.hasOwnProperty(t)||(ea[t]=e[t]={_global:[]}),ea[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),ea[t]._global.push({pred:r,val:i})};var ta=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},na=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ra=e.commands={selectAll:function(e){e.setSelection(Ao(e.firstLine(),0),Ao(e.lastLine()),Oa)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Oa)},killLine:function(e){In(e,function(t){if(t.empty()){var n=Gr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Ao(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ao(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Gr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+"\n"+a.charAt(a.length-1),Ao(i.line-1,a.length-1),Ao(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){St(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange("\n",r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0),Nn(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},ia=e.keyMap={};ia.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ia.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ia.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ia.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ia["default"]=_o?ia.macDefault:ia.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Ri(n.split(" "),Wn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ua=0,ca=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ua};_i(ca),ca.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&yt(e),Ci(this,"clear")){var n=this.find();n&&bi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Oe(e.doc)),e&&bi(e,"markerCleared",e,this),t&&wt(e),this.parent&&this.parent.clear()}},ca.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,_r(i),bi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},zr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Br))){var s=[];this.collapse(s),this.children=[new Br(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new Br(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new zr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Oi(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new zr(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var va=0,ma=e.Doc=function(e,t,n){if(!(this instanceof ma))return new ma(e,t,n);null==n&&(n=0),zr.call(this,[new Br([new pa("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Ao(n,0);this.sel=pe(r),this.history=new ti(null),this.id=++va,this.modeOption=t,"string"==typeof e&&(e=qa(e)),Wr(this,{from:r,to:r,text:e}),ke(this,pe(r),Oa)};ma.prototype=Mi(zr.prototype,{constructor:ma,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)xn(this,r[o]);s?Ee(this,s):this.cm&&Nn(this.cm)}),undo:Rt(function(){_n(this,"undo")}),redo:Rt(function(){_n(this,"redo")}),undoSelection:Rt(function(){_n(this,"undo",!0)}),redoSelection:Rt(function(){_n(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ge(this,e),t=ge(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;sl.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),ge(this,Ao(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Da=[""],Na=function(e){e.select()};xo?Na=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:po&&(Na=function(e){try{e.select()}catch(t){}});var La,Pa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Fa=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Pa.test(e))},Ia=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;La=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var ja=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};po&&11>ho&&(Hi=function(){try{return document.activeElement}catch(e){return document.body}});var Va,Ha,Wa=e.rmClass=function(e,t){var n=e.className,r=Wi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Ba=e.addClass=function(e,t){var n=e.className;Wi(t).test(n)||(e.className+=(n?" ":"")+t)},za=!1,Ua=function(){if(po&&9>ho)return!1;var e=Ii("div");return"draggable"in e||"dragDrop"in e}(),qa=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ga=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Ka=function(){var e=Ii("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ya=null,Qa={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Qa,function(){for(var e=0;10>e;e++)Qa[e+48]=Qa[e+96]=String(e);for(var e=65;90>=e;e++)Qa[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Qa[e+111]=Qa[e+63235]="F"+e}();var Xa,Ja=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,f=[],d=0;c>d;++d)f.push(r=e(n.charCodeAt(d)));for(var d=0,p=u;c>d;++d){var r=f[d];"m"==r?f[d]=p:p=r}for(var d=0,h=u;c>d;++d){var r=f[d];"1"==r&&"r"==h?f[d]="n":a.test(r)&&(h=r,"r"==r&&(f[d]="R"))}for(var d=1,p=f[0];c-1>d;++d){var r=f[d];"+"==r&&"1"==p&&"1"==f[d+1]?f[d]="1":","!=r||p!=f[d+1]||"1"!=p&&"n"!=p||(f[d]=p),p=r}for(var d=0;c>d;++d){var r=f[d];if(","==r)f[d]="N";else if("%"==r){for(var g=d+1;c>g&&"%"==f[g];++g);for(var v=d&&"!"==f[d-1]||c>g&&"1"==f[g]?"1":"N",m=d;g>m;++m)f[m]=v;d=g-1}}for(var d=0,h=u;c>d;++d){var r=f[d];"L"==h&&"1"==r?f[d]="L":a.test(r)&&(h=r)}for(var d=0;c>d;++d)if(o.test(f[d])){for(var g=d+1;c>g&&o.test(f[g]);++g);for(var y="L"==(d?f[d-1]:u),b="L"==(c>g?f[g]:u),v=y||b?"L":"R",m=d;g>m;++m)f[m]=v;d=g-1}for(var w,$=[],d=0;c>d;)if(s.test(f[d])){var x=d;for(++d;c>d&&s.test(f[d]);++d);$.push(new t(0,x,d))}else{var C=d,_=$.length;for(++d;c>d&&"L"!=f[d];++d);for(var m=C;d>m;)if(l.test(f[m])){m>C&&$.splice(_,0,new t(1,C,m));var E=m;for(++m;d>m&&l.test(f[m]);++m);$.splice(_,0,new t(2,E,m)),C=m}else++m;d>C&&$.splice(_,0,new t(1,C,d))}return 1==$[0].level&&(w=n.match(/^\s+/))&&($[0].from=w[0].length,$.unshift(new t(0,0,w[0].length))),1==Ti($).level&&(w=n.match(/\s+$/))&&(Ti($).to-=w[0].length,$.push(new t(0,c-w[0].length,c))),2==$[0].level&&$.unshift(new t(1,$[0].to,$[0].to)),$[0].level!=Ti($).level&&$.push(new t($[0].level,c,c)),$}}();return e.version="5.3.0",e})},function(e,t,n){n(152),e.exports=angular},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nr;r++){var o=e[r][n];if(o)if(o instanceof Array)for(var a in o)t[o[a]]=!0;else t[o]=!0}return Object.keys(t)}},{key:"getSortFieldName",value:function(){return this.sortField()?this._targetEntity.name()+"_ListView."+this.sortField():null}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nn;n++){var i=t[n];e[i.name()]=i}return e}},{key:"listActions",value:function(e){return arguments.length?(this._listActions=e,this):this._listActions}}]),t}(u["default"]);t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0}},{key:"addChild",value:function(t){if(!(t instanceof e))throw new Error("Only Menu instances are accepted as children of a Menu");return this._children.push(t),this}},{key:"hasChild",value:function(){return this._children.length>0}},{key:"getChildByTitle",value:function(e){return this.children().filter(function(t){return t.title()==e}).pop()}},{key:"children",value:function(){return arguments.length?(this._children=arguments[0],this):this._children}},{key:"icon",value:function(){return arguments.length?(this._icon=arguments[0],this):this._icon}},{key:"template",value:function(){return arguments.length?(this._template=arguments[0],this):this._template}},{key:"populateFromEntity",value:function(e){if(!(e instanceof l["default"]))throw new Error("populateFromEntity() only accepts an Entity parameter");return this.title(e.label()),this.active(function(t){return 0===t.indexOf("/"+e.name()+"/")}),this.link("/"+e.name()+"/list"),this.icon(e.menuView().icon()),this}}]),e}();t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function o(e,t,n){r(this,o),this._restWrapper=e,this._promisesResolver=t,this._application=n};t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={order:function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()})}},e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={camelCase:function(e){if(!e)return e;var t=e.charAt(0).toUpperCase();return e=t+e.substr(1),e.replace(/[-_](.)/g,function(e,t){return" "+t.toUpperCase()})}},e.exports=t["default"]},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return'
'}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){if(e!==t){var n=null===e,r=e===k,i=e===e,o=null===t,a=t===k,s=t===t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function a(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i-1;);return n}function f(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function d(e,t){return o(e.criteria,t.criteria)||e.index-t.index}function p(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,s=i.length,l=n.length;++r=l?u:u*(n[r]?1:-1)}return e.index-t.index}function h(e){return Ge[e]}function g(e){return Ke[e]}function v(e){return"\\"+Xe[e]}function m(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i=e&&e>=9&&13>=e||32==e||160==e||5760==e||6158==e||e>=8192&&(8202>=e||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function w(e,t){for(var n=-1,r=e.length,i=-1,o=[];++nt,r=Wn(0,e.length,this.__views__),i=r.start,o=r.end,a=o-i,s=n?o:i-1,l=ba(a,this.__takeCount__),u=this.__iteratees__,c=u?u.length:0,f=0,d=[];e:for(;a--&&l>f;){s+=t;for(var p=-1,h=e[s];++pg.index:s-1?g.count++>=y:!v(h)))continue e}}else{var b=v(h);if(m==B)h=b;else if(!b){if(m==W)continue e;break e}}}d[f++]=h}return d}function ie(){this.__data__={}}function Ge(e){return this.has(e)&&delete this.__data__[e]}function Ke(e){return"__proto__"==e?k:this.__data__[e]}function Ye(e){return"__proto__"!=e&&Yo.call(this.__data__,e)}function Qe(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this}function Xe(e){var t=e?e.length:0;for(this.data={hash:ha(null),set:new la};t--;)this.push(e[t])}function Je(e,t){var n=e.data,r="string"==typeof t||Ti(t)?n.set.has(t):n.hash[t];return r?0:-1}function Ze(e){var t=this.data;"string"==typeof e||Ti(e)?t.set.add(e):t.hash[e]=!0}function et(e,t){var n=-1,r=e.length;for(t||(t=No(r));++n=200?Va(t):null,u=t.length;l&&(o=Je,a=!1,t=l);e:for(;++in&&(n=-n>i?0:i+n),r=r===k||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)e[n++]=t;return e}function kt(e,t){var n=[];return La(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function St(e,t,n,r){var i;return n(e,function(e,n,o){return t(e,n,o)?(i=r?n:e,!1):void 0}),i}function Tt(e,t,n){for(var r=-1,i=e.length,o=-1,a=[];++rr;)e=e[t[r++]];return r&&r==i?e:k}}function Nt(e,t,n,r,i,o){return e===t?!0:null==e||null==t||!Ti(e)&&!y(t)?e!==e&&t!==t:Lt(e,t,Nt,n,r,i,o)}function Lt(e,t,n,r,i,o,a){var s=Ss(e),l=Ss(t),u=G,c=G;s||(u=Xo.call(e),u==q?u=ee:u!=ee&&(s=Pi(e))),l||(c=Xo.call(t),c==q?c=ee:c!=ee&&(l=Pi(t)));var f=u==ee,d=c==ee,p=u==c;if(p&&!s&&!f)return Ln(e,t,u);if(!i){var h=f&&Yo.call(e,"__wrapped__"),g=d&&Yo.call(t,"__wrapped__");if(h||g)return n(h?e.value():e,g?t.value():t,r,i,o,a)}if(!p)return!1;o||(o=[]),a||(a=[]);for(var v=o.length;v--;)if(o[v]==e)return a[v]==t;o.push(e),a.push(t);var m=(s?Nn:Pn)(e,t,n,r,i,o,a);return o.pop(),a.pop(),m}function Pt(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=sr(e);r--;){var a=t[r];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++rt&&(t=-t>i?0:i+t),n=n===k||n>i?i:+n||0,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=No(i);++r=200,l=a?Va():null,u=[];l?(r=Je,o=!1):(a=!1,l=t?[]:u);e:for(;++n=i){for(;i>r;){var o=r+i>>>1,a=e[o];(n?t>=a:t>a)&&null!==a?r=o+1:i=o}return i}return rn(e,t,$o,n)}function rn(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,s=null===t,l=t===k;o>i;){var u=ia((i+o)/2),c=n(e[u]),f=c!==k,d=c===c;if(a)var p=d||r;else p=s?d&&f&&(r||null!=c):l?d&&(r||f):null==c?!1:r?t>=c:t>c;p?i=u+1:o=u}return ba(o,Sa)}function on(e,t,n){if("function"!=typeof e)return $o;if(t===k)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function an(e){return ta.call(e,0)}function sn(e,t,n){for(var r=n.length,i=-1,o=ya(e.length-r,0),a=-1,s=t.length,l=No(o+s);++a2?n[i-2]:k,a=i>2?n[2]:k,s=i>1?n[i-1]:k;for("function"==typeof o?(o=on(o,s,5),i-=2):(o="function"==typeof s?s:k,i-=o?1:0),a&&Yn(n[0],n[1],a)&&(o=3>i?k:o,i=1);++r-1?n[o]:k}return St(n,r,e)}}function bn(e){return function(t,n,r){return t&&t.length?(n=Fn(n,r,3),a(t,n,e)):-1}}function wn(e){return function(t,n,r){return n=Fn(n,r,3),St(t,n,e,!0)}}function $n(e){return function(){for(var t,n=arguments.length,i=e?n:-1,o=0,a=No(n);e?i--:++iy){var _=s?et(s):null,E=ya(u-y,0),S=h?C:null,R=h?null:C,A=h?$:null,M=h?null:$;t|=h?D:N,t&=~(h?N:D),g||(t&=~(T|O));var L=[e,t,n,A,S,M,R,_,l,E],P=On.apply(k,L);return Xn(e)&&Ba(P,L),P.placeholder=x,P}}var F=d?n:this,I=p?F[e]:e;return s&&($=rr($,s)),f&&l<$.length&&($.length=l),this&&this!==rt&&this instanceof c&&(I=m||gn(e)),I.apply(F,$)}var f=t&L,d=t&T,p=t&O,h=t&A,g=t&R,v=t&M,m=p?null:gn(e);return c}function Rn(e,t,n){var r=e.length;if(t=+t,r>=t||!va(t))return"";var i=t-r;return n=null==n?" ":n+"",uo(n,na(i/n.length)).slice(0,i)}function An(e,t,n,r){function i(){for(var t=-1,s=arguments.length,l=-1,u=r.length,c=No(s+u);++ll))return!1;for(;++s-1&&e%1==0&&t>e}function Yn(e,t,n){if(!Ti(n))return!1;var r=typeof t;if("number"==r?Gn(n)&&Kn(t,n.length):"string"==r&&t in n){var i=n[t];return e===e?e===i:i!==i}return!1}function Qn(e,t){var n=typeof e;if("string"==n&&ke.test(e)||"number"==n)return!0;if(Ss(e))return!1;var r=!Ee.test(e);return r||null!=t&&e in sr(t)}function Xn(e){var n=In(e);if(!(n in i.prototype))return!1;var r=t[n];if(e===r)return!0;var o=Ha(r);return!!o&&e===o[0]}function Jn(e){return"number"==typeof e&&e>-1&&e%1==0&&Ra>=e}function Zn(e){return e===e&&!Ti(e)}function er(e,t){var n=e[1],r=t[1],i=n|r,o=L>i,a=r==L&&n==A||r==L&&n==P&&e[7].length<=t[8]||r==(L|P)&&n==A;if(!o&&!a)return e;r&T&&(e[2]=t[2],i|=n&T?0:R);var s=t[3];if(s){var l=e[3];e[3]=l?sn(l,s,t[4]):et(s),e[4]=l?w(e[3],U):et(t[4])}return s=t[5],s&&(l=e[5],e[5]=l?ln(l,s,t[6]):et(s),e[6]=l?w(e[5],U):et(t[6])),s=t[7],s&&(e[7]=et(s)),r&L&&(e[8]=null==e[8]?t[8]:ba(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function tr(e,t){e=sr(e);for(var n=-1,r=t.length,i={};++nr;)a[++o]=Gt(e,r,r+=t);return a}function fr(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++tt?0:t)):[]}function pr(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0,0>t?0:t)):[]}function hr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0,!0):[]}function gr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!0):[]}function vr(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&Yn(e,t,n)&&(n=0,r=i),Et(e,t,n,r)):[]}function mr(e){return e?e[0]:k}function yr(e,t,n){var r=e?e.length:0;return n&&Yn(e,t,n)&&(t=!1),r?Tt(e,t):[]}function br(e){var t=e?e.length:0;return t?Tt(e,!0):[]}function wr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?ya(r+n,0):n;else if(n){var i=nn(e,t),o=e[i];return(t===t?t===o:o!==o)?i:-1}return s(e,t,n||0)}function $r(e){return pr(e,1)}function xr(e){var t=e?e.length:0;return t?e[t-1]:k}function Cr(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(0>n?ya(r+n,0):ba(n||0,r-1))+1;else if(n){i=nn(e,t,!0)-1;var o=e[i];return(t===t?t===o:o!==o)?i:-1}if(t!==t)return m(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function _r(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=jn(),i=e.length;++n-1;)ca.call(t,o,1);return t}function Er(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=Fn(t,n,3);++it?0:t)):[]}function Or(e,t,n){var r=e?e.length:0;return r?((n?Yn(e,t,n):null==t)&&(t=1),t=r-(+t||0),Gt(e,0>t?0:t)):[]}function Rr(e,t,n){return e&&e.length?en(e,Fn(t,n,3),!1,!0):[]}function Ar(e,t,n){return e&&e.length?en(e,Fn(t,n,3)):[]}function Mr(e,t,n,r){var i=e?e.length:0;if(!i)return[];null!=t&&"boolean"!=typeof t&&(r=n,n=Yn(e,t,r)?null:t,t=!1);var o=Fn();return(null!=n||o!==bt)&&(n=o(n,r,3)),t&&jn()==s?$(e,n):Jt(e,n)}function Dr(e){if(!e||!e.length)return[];var t=-1,n=0;e=st(e,function(e){return Gn(e)?(n=ya(e.length,n),!0):void 0});for(var r=No(n);++tn?ya(i+n,0):n||0,"string"==typeof e||!Ss(e)&&Li(e)?i>n&&e.indexOf(t,n)>-1:jn(e,t,n)>-1):!1}function Qr(e,t,n){var r=Ss(e)?lt:Ft;return t=Fn(t,n,3),r(e,t)}function Xr(e,t){return Qr(e,So(t))}function Jr(e,t,n){var r=Ss(e)?st:kt;return t=Fn(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function Zr(e,t,n){if(n?Yn(e,t,n):null==t){e=ar(e);var r=e.length;return r>0?e[Ut(0,r-1)]:k}var i=-1,o=Vi(e),r=o.length,a=r-1;for(t=ba(0>t?0:+t||0,r);++i0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}}function ui(e,t,n){function r(){d&&ra(d),l&&ra(l),l=d=p=k}function i(){var n=t-(hs()-c);if(0>=n||n>t){l&&ra(l);var r=p;l=d=p=k,r&&(h=hs(),u=e.apply(f,s),d||l||(s=f=null))}else d=ua(i,n)}function o(){d&&ra(d),l=d=p=k,(v||g!==t)&&(h=hs(),u=e.apply(f,s),d||l||(s=f=null))}function a(){if(s=arguments,c=hs(),f=this,p=v&&(d||!m),g===!1)var n=m&&!d;else{l||m||(h=c);var r=g-(c-h),a=0>=r||r>g;a?(l&&(l=ra(l)),h=c,u=e.apply(f,s)):l||(l=ua(o,r))}return a&&d?d=ra(d):d||t===g||(d=ua(i,t)),n&&(a=!0,u=e.apply(f,s)),!a||d||l||(s=f=null),u}var s,l,u,c,f,d,p,h=0,g=!1,v=!0;if("function"!=typeof e)throw new Bo(z);if(t=0>t?0:+t||0,n===!0){var m=!0;v=!1}else Ti(n)&&(m=n.leading,g="maxWait"in n&&ya(+n.maxWait||0,t),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function ci(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Bo(z);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new ci.Cache,n}function fi(e){if("function"!=typeof e)throw new Bo(z);return function(){return!e.apply(this,arguments)}}function di(e){return li(2,e)}function pi(e,t){if("function"!=typeof e)throw new Bo(z);return t=ya(t===k?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=ya(n.length-t,0),o=No(i);++rt}function wi(e,t){return e>=t}function $i(e){return y(e)&&Gn(e)&&Xo.call(e)==q}function xi(e){return e===!0||e===!1||y(e)&&Xo.call(e)==K}function Ci(e){return y(e)&&Xo.call(e)==Y}function _i(e){return!!e&&1===e.nodeType&&y(e)&&Xo.call(e).indexOf("Element")>-1}function Ei(e){return null==e?!0:Gn(e)&&(Ss(e)||Li(e)||$i(e)||y(e)&&Os(e.splice))?!e.length:!js(e).length}function ki(e,t,n,r){n="function"==typeof n?on(n,r,3):k;var i=n?n(e,t):k;return i===k?Nt(e,t,n):!!i}function Si(e){return y(e)&&"string"==typeof e.message&&Xo.call(e)==Q}function Ti(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Oi(e,t,n,r){return n="function"==typeof n?on(n,r,3):k,Pt(e,Vn(t),n)}function Ri(e){return Di(e)&&e!=+e}function Ai(e){return null==e?!1:Xo.call(e)==X?Zo.test(Ko.call(e)):y(e)&&Le.test(e)}function Mi(e){return null===e}function Di(e){return"number"==typeof e||y(e)&&Xo.call(e)==Z}function Ni(e){return y(e)&&Xo.call(e)==te}function Li(e){return"string"==typeof e||y(e)&&Xo.call(e)==re}function Pi(e){return y(e)&&Jn(e.length)&&!!ze[Xo.call(e)]}function Fi(e){return e===k}function Ii(e,t){return t>e}function ji(e,t){return t>=e}function Vi(e){var t=e?Wa(e):0;return Jn(t)?t?et(e):[]:Ji(e)}function Hi(e){return yt(e,Gi(e))}function Wi(e,t,n){var r=Na(e);return n&&Yn(e,t,n)&&(t=null),t?vt(r,t):r}function Bi(e){return Mt(e,Gi(e))}function zi(e,t,n){var r=null==e?k:Dt(e,lr(t),t+"");return r===k?n:r}function Ui(e,t){if(null==e)return!1;var n=Yo.call(e,t);if(!n&&!Qn(t)){if(t=lr(t),e=1==t.length?e:Dt(e,Gt(t,0,-1)),null==e)return!1;t=xr(t),n=Yo.call(e,t)}return n||Jn(e.length)&&Kn(t,e.length)&&(Ss(e)||$i(e))}function qi(e,t,n){n&&Yn(e,t,n)&&(t=null);for(var r=-1,i=js(e),o=i.length,a={};++r0;++r=ba(t,n)&&en?0:+n||0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function oo(e){return e=u(e),e&&$e.test(e)?e.replace(be,g):e}function ao(e){return e=u(e),e&&Oe.test(e)?e.replace(Te,"\\$&"):e}function so(e,t,n){e=u(e),t=+t;var r=e.length;if(r>=t||!va(t))return e;var i=(t-r)/2,o=ia(i),a=na(i);return n=Rn("",a,n),n.slice(0,o)+e+n}function lo(e,t,n){return n&&Yn(e,t,n)&&(t=0),xa(e,t)}function uo(e,t){var n="";if(e=u(e),t=+t,1>t||!e||!va(t))return n;do t%2&&(n+=e),t=ia(t/2),e+=e;while(t);return n}function co(e,t,n){return e=u(e),n=null==n?0:ba(0>n?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function fo(e,n,r){var i=t.templateSettings;r&&Yn(e,n,r)&&(n=r=null),e=u(e),n=gt(vt({},r||n),i,ht);var o,a,s=gt(vt({},n.imports),i.imports,ht),l=js(s),c=Zt(s,l),f=0,d=n.interpolate||Ie,p="__p += '",h=Ho((n.escape||Ie).source+"|"+d.source+"|"+(d===_e?Me:Ie).source+"|"+(n.evaluate||Ie).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Be+"]")+"\n";e.replace(h,function(t,n,r,i,s,l){return r||(r=i),p+=e.slice(f,l).replace(je,v),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=l+t.length,t}),p+="';\n";var m=n.variable;m||(p="with (obj) {\n"+p+"\n}\n"),p=(a?p.replace(ge,""):p).replace(ve,"$1").replace(me,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Xs(function(){return Fo(l,g+"return "+p).apply(k,c)});if(y.source=p,Si(y))throw y;return y}function po(e,t,n){var r=e;return(e=u(e))?(n?Yn(r,t,n):null==t)?e.slice(x(e),C(e)+1):(t+="",e.slice(c(e,t),f(e,t)+1)):e}function ho(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(x(e)):e.slice(c(e,t+"")):e}function go(e,t,n){var r=e;return e=u(e),e?(n?Yn(r,t,n):null==t)?e.slice(0,C(e)+1):e.slice(0,f(e,t+"")+1):e}function vo(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=F,i=I;if(null!=t)if(Ti(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?u(t.omission):i}else r=+t||0;if(e=u(e),r>=e.length)return e;var a=r-i.length;if(1>a)return i;var s=e.slice(0,a);if(null==o)return s+i;if(Ni(o)){if(e.slice(a).search(o)){var l,c,f=e.slice(0,a);for(o.global||(o=Ho(o.source,(De.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(f);)c=l.index;s=s.slice(0,null==c?a:c)}}else if(e.indexOf(o,a)!=a){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+i}function mo(e){return e=u(e),e&&we.test(e)?e.replace(ye,_):e}function yo(e,t,n){return n&&Yn(e,t,n)&&(t=null),e=u(e),e.match(t||Ve)||[]}function bo(e,t,n){return n&&Yn(e,t,n)&&(t=null),y(e)?xo(e):bt(e,t)}function wo(e){return function(){return e}}function $o(e){return e}function xo(e){return It(wt(e,!0))}function Co(e,t){return jt(e,wt(t,!0))}function _o(e,t,n){if(null==n){var r=Ti(t),i=r?js(t):null,o=i&&i.length?Mt(t,i):null;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Mt(t,js(t)));var a=!0,s=-1,l=Os(e),u=o.length;n===!1?a=!1:Ti(n)&&"chain"in n&&(a=n.chain);for(;++se||!va(e))return[];var r=-1,i=No(ba(e,ka));for(t=on(t,n,1);++rr?i[r]=t(r):t(r);return i}function Ao(e){var t=++Qo;return u(e)+t}function Mo(e,t){return(+e||0)+(+t||0)}function Do(e,t,n){n&&Yn(e,t,n)&&(t=null);var r=Fn(),i=null==t;return i&&r===bt||(i=!1,t=r(t,n,3)),i?dt(Ss(e)?e:ar(e)):Xt(e,t)}e=e?it.defaults(rt.Object(),e,it.pick(rt,We)):rt;var No=e.Array,Lo=e.Date,Po=e.Error,Fo=e.Function,Io=e.Math,jo=e.Number,Vo=e.Object,Ho=e.RegExp,Wo=e.String,Bo=e.TypeError,zo=No.prototype,Uo=Vo.prototype,qo=Wo.prototype,Go=(Go=e.window)?Go.document:null,Ko=Fo.prototype.toString,Yo=Uo.hasOwnProperty,Qo=0,Xo=Uo.toString,Jo=e._,Zo=Ho("^"+ao(Ko.call(Yo)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ea=Hn(e,"ArrayBuffer"),ta=Hn(ea&&new ea(0),"slice"),na=Io.ceil,ra=e.clearTimeout,ia=Io.floor,oa=Hn(Vo,"getPrototypeOf"),aa=e.parseFloat,sa=zo.push,la=Hn(e,"Set"),ua=e.setTimeout,ca=zo.splice,fa=Hn(e,"Uint8Array"),da=Hn(e,"WeakMap"),pa=function(){try{var t=Hn(e,"Float64Array"),n=new t(new ea(10),0,1)&&t}catch(r){}return n||null}(),ha=Hn(Vo,"create"),ga=Hn(No,"isArray"),va=e.isFinite,ma=Hn(Vo,"keys"),ya=Io.max,ba=Io.min,wa=Hn(Lo,"now"),$a=Hn(jo,"isFinite"),xa=e.parseInt,Ca=Io.random,_a=jo.NEGATIVE_INFINITY,Ea=jo.POSITIVE_INFINITY,ka=4294967295,Sa=ka-1,Ta=ka>>>1,Oa=pa?pa.BYTES_PER_ELEMENT:0,Ra=9007199254740991,Aa=da&&new da,Ma={},Da=t.support={};!function(e){var t=function(){this.x=e},n=[];t.prototype={valueOf:e,y:e};for(var r in new t)n.push(r);try{Da.dom=11===Go.createDocumentFragment().nodeType}catch(i){Da.dom=!1}}(1,0),t.templateSettings={escape:xe,evaluate:Ce,interpolate:_e,variable:"",imports:{_:t}};var Na=function(){function e(){}return function(t){if(Ti(t)){e.prototype=t;var n=new e;e.prototype=null}return n||{}}}(),La=fn(Rt),Pa=fn(At,!0),Fa=dn(),Ia=dn(!0),ja=Aa?function(e,t){return Aa.set(e,t),e}:$o;ta||(an=ea&&fa?function(e){var t=e.byteLength,n=pa?ia(t/Oa):0,r=n*Oa,i=new ea(t);if(n){var o=new pa(i,0,n);o.set(new pa(e,0,n))}return t!=r&&(o=new fa(i,r),o.set(new fa(e,r))),i}:wo(null));var Va=ha&&la?function(e){return new Xe(e)}:wo(null),Ha=Aa?function(e){return Aa.get(e)}:ko,Wa=Wt("length"),Ba=function(){var e=0,t=0;return function(n,r){var i=hs(),o=V-(i-t);if(t=i,o>0){if(++e>=j)return n}else e=0;return ja(n,r)}}(),za=pi(function(e,t){return Gn(e)?xt(e,Tt(t,!1,!0)):[]}),Ua=bn(),qa=bn(!0),Ga=pi(function(e){for(var t=e.length,n=t,r=No(f),i=jn(),o=i==s,a=[];n--;){var l=e[n]=Gn(l=e[n])?l:[];r[n]=o&&l.length>=120?Va(n&&l):null}var u=e[0],c=-1,f=u?u.length:0,d=r[0];e:for(;++c2?e[t-2]:k,r=t>1?e[t-1]:k;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):k,r=k),e.length=t,Nr(e,n,r)}),ts=pi(function(e,t){return mt(e,Tt(t))}),ns=un(function(e,t,n){Yo.call(e,n)?++e[n]:e[n]=1}),rs=yn(La),is=yn(Pa,!0),os=xn(tt,La),as=xn(nt,Pa),ss=un(function(e,t,n){Yo.call(e,n)?e[n].push(t):e[n]=[t]}),ls=un(function(e,t,n){e[n]=t}),us=pi(function(e,t,n){var r=-1,i="function"==typeof t,o=Qn(t),a=Gn(e)?No(e.length):[];return La(e,function(e){var s=i?t:o&&null!=e?e[t]:null;a[++r]=s?s.apply(e,n):qn(e,t,n)}),a}),cs=un(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),fs=Tn(ut,La),ds=Tn(ct,Pa),ps=pi(function(e,t){if(null==e)return[];var n=t[2];return n&&Yn(t[0],t[1],n)&&(t.length=1),Qt(e,Tt(t),[])}),hs=wa||function(){return(new Lo).getTime()},gs=pi(function(e,t,n){var r=T;if(n.length){var i=w(n,gs.placeholder);r|=D}return Dn(e,r,t,n,i)}),vs=pi(function(e,t){t=t.length?Tt(t):Bi(e);for(var n=-1,r=t.length;++ne?n=this.takeRight(-e):e&&(n=this.drop(e)),t!==k&&(t=+t||0,n=0>t?n.dropRight(-t):n.take(t-e)),n},i.prototype.toArray=function(){return this.drop(0)},Rt(i.prototype,function(e,n){var o=t[n];if(o){var a=/^(?:filter|map|reject)|While$/.test(n),s=/^(?:first|last)$/.test(n);t.prototype[n]=function(){var n=arguments,l=this.__chain__,u=this.__wrapped__,c=!!this.__actions__.length,f=u instanceof i,d=n[0],p=f||Ss(u);p&&a&&"function"==typeof d&&1!=d.length&&(f=p=!1);var h=f&&!c;if(s&&!l)return h?e.call(u):o.call(t,this.value());var g=function(e){var r=[e];return sa.apply(r,n),o.apply(t,r)};if(p){var v=h?u:new i(this),m=e.apply(v,n);if(!s&&(c||m.__actions__)){var y=m.__actions__||(m.__actions__=[]);y.push({func:jr,args:[g],thisArg:t})}return new r(m,l)}return this.thru(g)}}}),tt(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?qo:zo)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(e); +t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),Rt(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name,o=Ma[i]||(Ma[i]=[]);o.push({name:n,func:r})}}),Ma[On(null,O).name]=[{name:"wrapper",func:null}],i.prototype.clone=b,i.prototype.reverse=J,i.prototype.value=ne,t.prototype.chain=Vr,t.prototype.commit=Hr,t.prototype.plant=Wr,t.prototype.reverse=Br,t.prototype.toString=zr,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Ur,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var k,S="3.9.3",T=1,O=2,R=4,A=8,M=16,D=32,N=64,L=128,P=256,F=30,I="...",j=150,V=16,H=0,W=1,B=2,z="Expected a function",U="__lodash_placeholder__",q="[object Arguments]",G="[object Array]",K="[object Boolean]",Y="[object Date]",Q="[object Error]",X="[object Function]",J="[object Map]",Z="[object Number]",ee="[object Object]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object WeakMap]",oe="[object ArrayBuffer]",ae="[object Float32Array]",se="[object Float64Array]",le="[object Int8Array]",ue="[object Int16Array]",ce="[object Int32Array]",fe="[object Uint8Array]",de="[object Uint8ClampedArray]",pe="[object Uint16Array]",he="[object Uint32Array]",ge=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ye=/&(?:amp|lt|gt|quot|#39|#96);/g,be=/[&<>"'`]/g,we=RegExp(ye.source),$e=RegExp(be.source),xe=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,_e=/<%=([\s\S]+?)%>/g,Ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,ke=/^\w*$/,Se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Te=/[.*+?^${}()|[\]\/\\]/g,Oe=RegExp(Te.source),Re=/[\u0300-\u036f\ufe20-\ufe23]/g,Ae=/\\(\\)?/g,Me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,De=/\w*$/,Ne=/^0[xX]/,Le=/^\[object .+?Constructor\]$/,Pe=/^\d+$/,Fe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Ie=/($^)/,je=/['\n\r\u2028\u2029\\]/g,Ve=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),He=" \f \ufeff\n\r\u2028\u2029 ᠎              ",We=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],Be=-1,ze={};ze[ae]=ze[se]=ze[le]=ze[ue]=ze[ce]=ze[fe]=ze[de]=ze[pe]=ze[he]=!0,ze[q]=ze[G]=ze[oe]=ze[K]=ze[Y]=ze[Q]=ze[X]=ze[J]=ze[Z]=ze[ee]=ze[te]=ze[ne]=ze[re]=ze[ie]=!1;var Ue={};Ue[q]=Ue[G]=Ue[oe]=Ue[K]=Ue[Y]=Ue[ae]=Ue[se]=Ue[le]=Ue[ue]=Ue[ce]=Ue[Z]=Ue[ee]=Ue[te]=Ue[re]=Ue[fe]=Ue[de]=Ue[pe]=Ue[he]=!0,Ue[Q]=Ue[X]=Ue[J]=Ue[ne]=Ue[ie]=!1;var qe={leading:!1,maxWait:0,trailing:!1},Ge={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ke={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ye={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Qe={"function":!0,object:!0},Xe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Je=Qe[typeof t]&&t&&!t.nodeType&&t,Ze=Qe[typeof e]&&e&&!e.nodeType&&e,et=Je&&Ze&&"object"==typeof i&&i&&i.Object&&i,tt=Qe[typeof self]&&self&&self.Object&&self,nt=Qe[typeof window]&&window&&window.Object&&window,rt=(Ze&&Ze.exports===Je&&Je,et||nt!==(this&&this.window)&&nt||tt||this),it=E();rt._=it,r=function(){return it}.call(t,n,t,e),!(r!==k&&(e.exports=r))}).call(this)}).call(t,n(165)(e),function(){return this}())},function(e,t,n){/** * State-based routing for AngularJS * @version v0.2.15 * @link http://angular-ui.github.com/ * @license MIT License, http://www.opensource.org/licenses/MIT */ -"undefined"!=typeof e&&"undefined"!=typeof t&&e.exports===t&&(e.exports="ui.router"),function(e,t,n){"use strict";function r(e,t){return I(new(I(function(){},{prototype:e})),t)}function i(e){return j(arguments,function(t){t!==e&&j(t,function(t,n){e.hasOwnProperty(n)||(e[n]=t)})}),e}function o(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}function a(e){if(Object.keys)return Object.keys(e);var t=[];return j(e,function(e,n){t.push(n)}),t}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t,Number(arguments[2])||0);var n=e.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=n);n>r;r++)if(r in e&&e[r]===t)return r;return-1}function l(e,t,n,r){var i,l=o(n,r),u={},c=[];for(var f in l)if(l[f].params&&(i=a(l[f].params),i.length))for(var d in i)s(c,i[d])>=0||(c.push(i[d]),u[i[d]]=e[i[d]]);return I({},u,t)}function u(e,t,n){if(!n){n=[];for(var r in e)n.push(r)}for(var i=0;i "));if(y[n]=r,L(e))v.push(n,[function(){return t.get(e)}],u);else{var i=t.annotate(e);j(i,function(e){e!==n&&l.hasOwnProperty(e)&&p(l[e],e)}),v.push(n,e,i)}m.pop(),y[n]=o}}function h(e){return P(e)&&e.then&&e.$$promises}if(!P(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],m=[],y={};return j(l,p),l=m=y=null,function(r,o,a){function s(){--w||($||i(b,o.$$values),m.$$values=b,m.$$promises=m.$$promises||!0,delete m.$$inheritedValues,p.resolve(b))}function l(e){m.$$failure=e,p.reject(e)}function u(n,i,o){function u(e){f.reject(e),l(e)}function c(){if(!D(m.$$failure))try{f.resolve(t.invoke(i,a,b)),f.promise.then(function(e){b[n]=e,s()},u)}catch(e){u(e)}}var f=e.defer(),d=0;j(o,function(e){y.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&(d++,y[e].then(function(t){b[e]=t,--d||c()},u))}),d||c(),y[n]=f.promise}if(h(r)&&a===n&&(a=o,o=r,r=null),r){if(!P(r))throw new Error("'locals' must be an object")}else r=c;if(o){if(!h(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var p=e.defer(),m=p.promise,y=m.$$promises={},b=I({},r),w=1+v.length/3,$=!1;if(D(o.$$failure))return l(o.$$failure),m;o.$$inheritedValues&&i(b,d(o.$$inheritedValues,g)),I(y,o.$$promises),o.$$values?($=i(b,d(o.$$values,g)),m.$$inheritedValues=d(o.$$values,g),s()):(o.$$inheritedValues&&(m.$$inheritedValues=d(o.$$inheritedValues,g)),o.then(s,l));for(var x=0,C=v.length;C>x;x+=3)r.hasOwnProperty(v[x])?s():u(v[x],v[x+1],v[x+2]);return m}},this.resolve=function(e,t,n,r){return this.study(e)(t,n,r)}}function v(e,t,n){this.fromConfig=function(e,t,n){return D(e.template)?this.fromString(e.template,t):D(e.templateUrl)?this.fromUrl(e.templateUrl,t):D(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return N(e)?e(t):e},this.fromUrl=function(n,r){return N(n)&&(n=n(r)),null==n?null:e.get(n,{cache:t,headers:{Accept:"text/html"}}).then(function(e){return e.data})},this.fromProvider=function(e,t,r){return n.invoke(e,null,r||{params:t})}}function m(e,t,i){function o(t,n,r,i){if(v.push(t),h[t])return h[t];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(g[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");return g[t]=new H.Param(t,n,r,i),g[t]}function a(e,t,n,r){var i=["",""],o=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:i=["?(",")?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+t+i[1]}function s(i,o){var a,s,l,u,c;return a=i[2]||i[3],c=t.params[a],l=e.substring(d,i.index),s=o?i[4]:i[4]||("*"==i[1]?".*":null),u=H.type(s||"string")||r(H.type("string"),{pattern:new RegExp(s,t.caseInsensitive?"i":n)}),{id:a,regexp:s,segment:l,type:u,cfg:c}}t=I({params:{}},P(t)?t:{});var l,u=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",d=0,p=this.segments=[],h=i?i.params:{},g=this.params=i?i.params.$$new():new H.ParamSet,v=[];this.source=e;for(var m,y,b;(l=u.exec(e))&&(m=s(l,!1),!(m.segment.indexOf("?")>=0));)y=o(m.id,m.type,m.cfg,"path"),f+=a(m.segment,y.type.pattern.source,y.squash,y.isOptional),p.push(m.segment),d=u.lastIndex;b=e.substring(d);var w=b.indexOf("?");if(w>=0){var $=this.sourceSearch=b.substring(w);if(b=b.substring(0,w),this.sourcePath=e.substring(0,d+w),$.length>0)for(d=0;l=c.exec($);)m=s(l,!0),y=o(m.id,m.type,m.cfg,"search"),d=u.lastIndex}else this.sourcePath=e,this.sourceSearch="";f+=a(b)+(t.strict===!1?"/?":"")+"$",p.push(b),this.regexp=new RegExp(f,t.caseInsensitive?"i":n),this.prefix=p[0],this.$$paramNames=v}function y(e){I(this,e)}function b(){function e(e){return null!=e?e.toString().replace(/\//g,"%2F"):e}function i(e){return null!=e?e.toString().replace(/%2F/g,"/"):e}function o(){return{strict:g,caseInsensitive:d}}function l(e){return N(e)||F(e)&&N(e[e.length-1])}function u(){for(;x.length;){var e=x.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(w[e.name],f.invoke(e.def))}}function c(e){I(this,e||{})}H=this;var f,d=!1,g=!0,v=!1,w={},$=!0,x=[],C={string:{encode:e,decode:i,is:function(e){return null==e||!D(e)||"string"==typeof e},pattern:/[^/]*/},"int":{encode:e,decode:function(e){return parseInt(e,10)},is:function(e){return D(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return e===!0||e===!1},pattern:/0|1/},date:{encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):n},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):n},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return this.is(e)&&this.is(t)&&e.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^/]*/},any:{encode:t.identity,decode:t.identity,equals:t.equals,pattern:/.*/}};b.$$getDefaultValue=function(e){if(!l(e.value))return e.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(e.value)},this.caseInsensitive=function(e){return D(e)&&(d=e),d},this.strictMode=function(e){return D(e)&&(g=e),g},this.defaultSquashPolicy=function(e){if(!D(e))return v;if(e!==!0&&e!==!1&&!L(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return v=e,e},this.compile=function(e,t){return new m(e,I(o(),t))},this.isMatcher=function(e){if(!P(e))return!1;var t=!0;return j(m.prototype,function(n,r){N(n)&&(t=t&&D(e[r])&&N(e[r]))}),t},this.type=function(e,t,n){if(!D(t))return w[e];if(w.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return w[e]=new y(I({name:e},t)),n&&(x.push({name:e,def:n}),$||u()),this},j(C,function(e,t){w[t]=new y(I({name:t},e))}),w=r(w,{}),this.$get=["$injector",function(e){return f=e,$=!1,u(),j(C,function(e,t){w[t]||(w[t]=new y(e))}),this}],this.Param=function(e,t,r,i){function o(e){var t=P(e)?a(e):[],n=-1===s(t,"value")&&-1===s(t,"type")&&-1===s(t,"squash")&&-1===s(t,"array");return n&&(e={value:e}),e.$$fn=l(e.value)?e.value:function(){return e.value},e}function u(t,n,r){if(t.type&&n)throw new Error("Param '"+e+"' has two type configurations.");return n?n:t.type?t.type instanceof y?t.type:new y(t.type):"config"===r?w.any:w.string}function c(){var t={array:"search"===i?"auto":!1},n=e.match(/\[\]$/)?{array:!0}:{};return I(t,n,r).array}function d(e,t){var n=e.squash;if(!t||n===!1)return!1;if(!D(n)||null==n)return v;if(n===!0||L(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function g(e,t,r,i){var o,a,l=[{from:"",to:r||t?n:""},{from:null,to:r||t?n:""}];return o=F(e.replace)?e.replace:[],L(i)&&o.push({from:i,to:n}),a=h(o,function(e){return e.from}),p(l,function(e){return-1===s(a,e.from)}).concat(o)}function m(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var e=f.invoke(r.$$fn);if(null!==e&&e!==n&&!x.type.is(e))throw new Error("Default value ("+e+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return e}function b(e){function t(e){return function(t){return t.from===e}}function n(e){var n=h(p(x.replace,t(e)),function(e){return e.to});return n.length?n[0]:e}return e=n(e),D(e)?x.type.$normalize(e):m()}function $(){return"{Param:"+e+" "+t+" squash: '"+_+"' optional: "+E+"}"}var x=this;r=o(r),t=u(r,t,i);var C=c();t=C?t.$asArray(C,"search"===i):t,"string"!==t.name||C||"path"!==i||r.value!==n||(r.value="");var E=r.value!==n,_=d(r,E),k=g(r,C,E,_);I(this,{id:e,type:t,location:i,array:C,squash:_,replace:k,isOptional:E,value:b,dynamic:n,config:r,toString:$})},c.prototype={$$new:function(){return r(this,I(new c,{$$parent:this}))},$$keys:function(){for(var e=[],t=[],n=this,r=a(c.prototype);n;)t.push(n),n=n.$$parent;return t.reverse(),j(t,function(t){j(a(t),function(t){-1===s(e,t)&&-1===s(r,t)&&e.push(t)})}),e},$$values:function(e){var t={},n=this;return j(n.$$keys(),function(r){t[r]=n[r].value(e&&e[r])}),t},$$equals:function(e,t){var n=!0,r=this;return j(r.$$keys(),function(i){var o=e&&e[i],a=t&&t[i];r[i].type.equals(o,a)||(n=!1)}),n},$$validates:function(e){var r,i,o,a,s,l=this.$$keys();for(r=0;ri;i++)if(t(u[i]))return;c&&t(c)}}function p(){return l=l||i.$on("$locationChangeSuccess",d)}var h,g=a.baseHref(),v=r.url();return f||p(),{sync:function(){d()},listen:function(){return p()},update:function(e){return e?void(v=r.url()):void(r.url()!==v&&(r.url(v),r.replace()))},push:function(e,t,i){var o=e.format(t||{});null!==o&&t&&t["#"]&&(o+="#"+t["#"]),r.url(o),h=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,o){if(!n.validates(i))return null;var a=e.html5Mode();t.isObject(a)&&(a=a.enabled);var l=n.format(i);if(o=o||{},a||null===l||(l="#"+e.hashPrefix()+l),null!==l&&i&&i["#"]&&(l+="#"+i["#"]),l=s(l,a,o.absolute),!o.absolute||!l)return l;var u=!a&&l?"/":"",c=r.port();return c=80===c||443===c?"":":"+c,[r.protocol(),"://",r.host(),c,u,l].join("")}}}var l,u=[],c=null,f=!1;this.rule=function(e){if(!N(e))throw new Error("'rule' must be a function");return u.push(e),this},this.otherwise=function(e){if(L(e)){var t=e;e=function(){return t}}else if(!N(e))throw new Error("'rule' must be a function");return c=e,this},this.when=function(e,t){var n,s=L(t);if(L(e)&&(e=r.compile(e)),!s&&!N(t)&&!F(t))throw new Error("invalid 'handler' in when()");var l={matcher:function(e,t){return s&&(n=r.compile(t),t=["$match",function(e){return n.format(e)}]),I(function(n,r){return a(n,t,e.exec(r.path(),r.search()))},{prefix:L(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(n=t,t=["$match",function(e){return o(n,e)}]),I(function(n,r){return a(n,t,e.exec(r.path()))},{prefix:i(e)})}},u={matcher:r.isMatcher(e),regex:e instanceof RegExp};for(var c in u)if(u[c])return this.rule(l[c](e,t));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),f=e},this.$get=s,s.$inject=["$location","$rootScope","$injector","$browser"]}function $(e,i){function o(e){return 0===e.indexOf(".")||0===e.indexOf("^")}function d(e,t){if(!e)return n;var r=L(e),i=r?e:e.name,a=o(i);if(a){if(!t)throw new Error("No reference point given for path '"+i+"'");t=d(t);for(var s=i.split("."),l=0,u=s.length,c=t;u>l;l++)if(""!==s[l]||0!==l){if("^"!==s[l])break;if(!c.parent)throw new Error("Path '"+i+"' not valid for state '"+t.name+"'");c=c.parent}else c=t;s=s.slice(l).join("."),i=c.name+(c.name&&s?".":"")+s}var f=_[i];return!f||!r&&(r||f!==e&&f.self!==e)?n:f}function p(e,t){k[e]||(k[e]=[]),k[e].push(t)}function g(e){for(var t=k[e]||[];t.length;)v(t.shift())}function v(t){t=r(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}});var n=t.name;if(!L(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(_.hasOwnProperty(n))throw new Error("State '"+n+"'' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):L(t.parent)?t.parent:P(t.parent)&&L(t.parent.name)?t.parent.name:"";if(i&&!_[i])return p(i,t.self);for(var o in T)N(T[o])&&(t[o]=T[o](t,T.$delegates[o]));return _[n]=t,!t[S]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){E.$current.navigable==t&&u(e,n)||E.transitionTo(t,e,{inherit:!0,location:!1})}]),g(n),t}function m(e){return e.indexOf("*")>-1}function y(e){for(var t=e.split("."),n=E.$current.name.split("."),r=0,i=t.length;i>r;r++)"*"===t[r]&&(n[r]="*");return"**"===t[0]&&(n=n.slice(s(n,t[1])),n.unshift("**")),"**"===t[t.length-1]&&(n.splice(s(n,t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length!=n.length?!1:n.join("")===t.join("")}function b(e,t){return L(e)&&!D(t)?T[e]:N(t)&&L(e)?(T[e]&&!T.$delegates[e]&&(T.$delegates[e]=T[e]),T[e]=t,this):this}function w(e,t){return P(e)?t=e:t.name=e,v(t),this}function $(e,i,o,s,f,p,g,v,b){function w(t,n,r,o){var a=e.$broadcast("$stateNotFound",t,n,r);if(a.defaultPrevented)return g.update(),O;if(!a.retry)return null;if(o.$retry)return g.update(),R;var s=E.transition=i.when(a.retry);return s.then(function(){return s!==E.transition?k:(t.options.$retry=!0,E.transitionTo(t.to,t.toParams,t.options))},function(){return O}),g.update(),s}function $(e,n,r,a,l,u){function d(){var n=[];return j(e.views,function(r,i){var a=r.resolve&&r.resolve!==e.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:l.globals,params:p,notify:u.notify})||""}],n.push(f.resolve(a,l.globals,l.resolve,e).then(function(n){if(N(r.controllerProvider)||F(r.controllerProvider)){var o=t.extend({},a,l.globals);n.$$controller=s.invoke(r.controllerProvider,null,o)}else n.$$controller=r.controller;n.$$state=e,n.$$controllerAs=r.controllerAs,l[i]=n}))}),i.all(n).then(function(){return l.globals})}var p=r?n:c(e.params.$$keys(),n),h={$stateParams:p};l.resolve=f.resolve(e.resolve,h,l.resolve,e);var g=[l.resolve.then(function(e){l.globals=e})];return a&&g.push(a),i.all(g).then(d).then(function(e){return l})}var k=i.reject(new Error("transition superseded")),T=i.reject(new Error("transition prevented")),O=i.reject(new Error("transition aborted")),R=i.reject(new Error("transition failed"));return C.locals={resolve:null,globals:{$stateParams:{}}},E={params:{},current:C.self,$current:C,transition:null},E.reload=function(e){return E.transitionTo(E.current,p,{reload:e||!0,inherit:!1,notify:!0})},E.go=function(e,t,n){return E.transitionTo(e,t,I({inherit:!0,relative:E.$current},n))},E.transitionTo=function(t,n,o){n=n||{},o=I({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,u=E.$current,f=E.params,h=u.path,v=d(t,o.relative),m=n["#"];if(!D(v)){var y={to:t,toParams:n,options:o},b=w(y,u.self,f,o);if(b)return b;if(t=y.to,n=y.toParams,o=y.options,v=d(t,o.relative),!D(v)){if(!o.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+o.relative+"'")}}if(v[S])throw new Error("Cannot transition to abstract state '"+t+"'");if(o.inherit&&(n=l(p,n||{},E.$current,v)),!v.params.$$validates(n))return R;n=v.params.$$values(n),t=v;var _=t.path,O=0,A=_[O],M=C.locals,N=[];if(o.reload){if(L(o.reload)||P(o.reload)){if(P(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var F=o.reload===!0?h[0]:d(o.reload);if(o.reload&&!F)throw new Error("No such reload state '"+(L(o.reload)?o.reload:o.reload.name)+"'");for(;A&&A===h[O]&&A!==F;)M=N[O]=A.locals,O++,A=_[O]}}else for(;A&&A===h[O]&&A.ownParams.$$equals(n,f);)M=N[O]=A.locals,O++,A=_[O];if(x(t,n,u,f,M,o))return m&&(n["#"]=m),E.params=n,V(E.params,p),o.location&&t.navigable&&t.navigable.url&&(g.push(t.navigable.url,n,{$$avoidResync:!0,replace:"replace"===o.location}),g.update(!0)),E.transition=null,i.when(E.current);if(n=c(t.params.$$keys(),n||{}),o.notify&&e.$broadcast("$stateChangeStart",t.self,n,u.self,f).defaultPrevented)return e.$broadcast("$stateChangeCancel",t.self,n,u.self,f),g.update(),T;for(var j=i.when(M),H=O;H<_.length;H++,A=_[H])M=N[H]=r(M),j=$(A,n,A===t,j,M,o);var W=E.transition=j.then(function(){var r,i,a;if(E.transition!==W)return k;for(r=h.length-1;r>=O;r--)a=h[r],a.self.onExit&&s.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=O;r<_.length;r++)i=_[r],i.locals=N[r],i.self.onEnter&&s.invoke(i.self.onEnter,i.self,i.locals.globals);return m&&(n["#"]=m),E.transition!==W?k:(E.$current=t,E.current=t.self,E.params=n,V(E.params,p),E.transition=null,o.location&&t.navigable&&g.push(t.navigable.url,t.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===o.location}),o.notify&&e.$broadcast("$stateChangeSuccess",t.self,n,u.self,f),g.update(!0),E.current)},function(r){return E.transition!==W?k:(E.transition=null,a=e.$broadcast("$stateChangeError",t.self,n,u.self,f,r),a.defaultPrevented||g.update(),i.reject(r))});return W},E.is=function(e,t,r){r=I({relative:E.$current},r||{});var i=d(e,r.relative);return D(i)?E.$current!==i?!1:t?u(i.params.$$values(t),p):!0:n},E.includes=function(e,t,r){if(r=I({relative:E.$current},r||{}),L(e)&&m(e)){if(!y(e))return!1;e=E.$current.name}var i=d(e,r.relative);return D(i)?D(E.$current.includes[i.name])?t?u(i.params.$$values(t),p,a(t)):!0:!1:n},E.href=function(e,t,r){r=I({lossy:!0,inherit:!0,absolute:!1,relative:E.$current},r||{});var i=d(e,r.relative);if(!D(i))return null;r.inherit&&(t=l(p,t||{},E.$current,i));var o=i&&r.lossy?i.navigable:i;return o&&o.url!==n&&null!==o.url?g.href(o.url,c(i.params.$$keys().concat("#"),t||{}),{absolute:r.absolute}):null},E.get=function(e,t){if(0===arguments.length)return h(a(_),function(e){return _[e].self});var n=d(e,t||E.$current);return n&&n.self?n.self:null},E}function x(e,t,n,r,i,o){function a(e,t,n){function r(t){return"search"!=e.params[t].location}var i=e.params.$$keys().filter(r),o=f.apply({},[e.params].concat(i)),a=new H.ParamSet(o);return a.$$equals(t,n)}return!o.reload&&e===n&&(i===n.locals||e.self.reloadOnSearch===!1&&a(n,r,t))?!0:void 0}var C,E,_={},k={},S="abstract",T={parent:function(e){if(D(e.parent)&&e.parent)return d(e.parent);var t=/^(.+)\.[^.]+$/.exec(e.name);return t?d(t[1]):C},data:function(e){return e.parent&&e.parent.data&&(e.data=e.self.data=I({},e.parent.data,e.data)),e.data},url:function(e){var t=e.url,n={params:e.params||{}};if(L(t))return"^"==t.charAt(0)?i.compile(t.substring(1),n):(e.parent.navigable||C).url.concat(t,n);if(!t||i.isMatcher(t))return t;throw new Error("Invalid url '"+t+"' in state '"+e+"'")},navigable:function(e){return e.url?e:e.parent?e.parent.navigable:null},ownParams:function(e){var t=e.url&&e.url.params||new H.ParamSet;return j(e.params||{},function(e,n){t[n]||(t[n]=new H.Param(n,null,e,"config"))}),t},params:function(e){return e.parent&&e.parent.params?I(e.parent.params.$$new(),e.ownParams):new H.ParamSet},views:function(e){var t={};return j(D(e.views)?e.views:{"":e},function(n,r){r.indexOf("@")<0&&(r+="@"+e.parent.name),t[r]=n}),t},path:function(e){return e.parent?e.parent.path.concat(e):[]},includes:function(e){var t=e.parent?I({},e.parent.includes):{};return t[e.name]=!0,t},$delegates:{}};C=v({name:"",url:"^",views:null,"abstract":!0}),C.navigable=null,this.decorator=b,this.state=w,this.$get=$,$.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function x(){function e(e,t){return{load:function(n,r){var i,o={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return r=I(o,r),r.view&&(i=t.fromConfig(r.view,r.params,r.locals)),i&&r.notify&&e.$broadcast("$viewContentLoading",r),i}}}this.$get=e,e.$inject=["$rootScope","$templateFactory"]}function C(){var e=!1;this.useAnchorScroll=function(){e=!0},this.$get=["$anchorScroll","$timeout",function(t,n){return e?t:function(e){return n(function(){e[0].scrollIntoView()},0,!1)}}]}function E(e,n,r,i){function o(){return n.has?function(e){return n.has(e)?n.get(e):null}:function(e){try{return n.get(e)}catch(t){return null}}}function a(e,t){var n=function(){return{enter:function(e,t,n){t.after(e),n()},leave:function(e,t){e.remove(),t()}}};if(u)return{enter:function(e,t,n){var r=u.enter(e,null,t,n);r&&r.then&&r.then(n)},leave:function(e,t){var n=u.leave(e,t);n&&n.then&&n.then(t)}};if(l){var r=l&&l(t,e);return{enter:function(e,t,n){r.enter(e,null,t),n()},leave:function(e,t){r.leave(e),t()}}}return n()}var s=o(),l=s("$animator"),u=s("$animate"),c={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(n,o,s){return function(n,o,l){function u(){f&&(f.remove(),f=null),p&&(p.$destroy(),p=null),d&&(m.leave(d,function(){f=null}),f=d,d=null)}function c(a){var c,f=k(n,l,o,i),y=f&&e.$current&&e.$current.locals[f];if(a||y!==h){c=n.$new(),h=e.$current.locals[f];var b=s(c,function(e){m.enter(e,o,function(){p&&p.$emit("$viewContentAnimationEnded"),(t.isDefined(v)&&!v||n.$eval(v))&&r(e)}),u()});d=b,p=c,p.$emit("$viewContentLoaded"),p.$eval(g)}}var f,d,p,h,g=l.onload||"",v=l.autoscroll,m=a(l,n);n.$on("$stateChangeSuccess",function(){c(!1)}),n.$on("$viewContentLoading",function(){c(!1)}),c(!0)}}};return c}function _(e,t,n,r){return{restrict:"ECA",priority:-400,compile:function(i){var o=i.html();return function(i,a,s){var l=n.$current,u=k(i,s,a,r),c=l&&l.locals[u];if(c){a.data("$uiView",{name:u,state:c.$$state}),a.html(c.$template?c.$template:o);var f=e(a.contents());if(c.$$controller){c.$scope=i,c.$element=a;var d=t(c.$$controller,c);c.$$controllerAs&&(i[c.$$controllerAs]=d),a.data("$ngControllerController",d),a.children().data("$ngControllerController",d)}f(i)}}}}}function k(e,t,n,r){var i=r(t.uiView||t.name||"")(e),o=n.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(o?o.state.name:"")}function S(e,t){var n,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e=t+"("+r[1]+")"),n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!n||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function T(e){var t=e.parent().inheritedData("$uiView");return t&&t.state&&t.state.name?t.state:void 0}function O(e,n){var r=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,s){var l=S(a.uiSref,e.current.name),u=null,c=T(o)||e.$current,f="[object SVGAnimatedString]"===Object.prototype.toString.call(o.prop("href"))?"xlink:href":"href",d=null,p="A"===o.prop("tagName").toUpperCase(),h="FORM"===o[0].nodeName,g=h?"action":f,v=!0,m={relative:c,inherit:!0},y=i.$eval(a.uiSrefOpts)||{};t.forEach(r,function(e){e in y&&(m[e]=y[e])});var b=function(n){if(n&&(u=t.copy(n)),v){d=e.href(l.state,u,m);var r=s[1]||s[0];return r&&r.$$addStateInfo(l.state,u),null===d?(v=!1,!1):void a.$set(g,d)}};l.paramExpr&&(i.$watch(l.paramExpr,function(e,t){e!==u&&b(e)},!0),u=t.copy(i.$eval(l.paramExpr))),b(),h||o.bind("click",function(t){var r=t.which||t.button;if(!(r>1||t.ctrlKey||t.metaKey||t.shiftKey||o.attr("target"))){var i=n(function(){e.go(l.state,u,m)});t.preventDefault();var a=p&&!d?1:0;t.preventDefault=function(){a--<=0&&n.cancel(i)}}})}}}function R(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,r,i){function o(){a()?r.addClass(l):r.removeClass(l)}function a(){for(var e=0;ei;i++){a=s[i];var f=this.params[a],d=r[i+1];for(o=0;oi;i++)a=s[i],c[a]=this.params[a].value(t[a]);return c},m.prototype.parameters=function(e){return D(e)?this.params[e]||null:this.$$paramNames},m.prototype.validates=function(e){return this.params.$$validates(e)},m.prototype.format=function(e){function t(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})}e=e||{};var n=this.segments,r=this.parameters(),i=this.params;if(!this.validates(e))return null;var o,a=!1,s=n.length-1,l=r.length,u=n[0];for(o=0;l>o;o++){var c=s>o,f=r[o],d=i[f],p=d.value(e[f]),g=d.isOptional&&d.type.equals(d.value(),p),v=g?d.squash:!1,m=d.type.encode(p);if(c){var y=n[o+1];if(v===!1)null!=m&&(u+=F(m)?h(m,t).join("-"):encodeURIComponent(m)),u+=y;else if(v===!0){var b=u.match(/\/$/)?/\/?(.*)/:/(.*)/;u+=y.match(b)[1]}else L(v)&&(u+=v+y)}else{if(null==m||g&&v!==!1)continue;F(m)||(m=[m]),m=h(m,encodeURIComponent).join("&"+f+"="),u+=(a?"&":"?")+(f+"="+m),a=!0}}return u},y.prototype.is=function(e,t){return!0},y.prototype.encode=function(e,t){return e},y.prototype.decode=function(e,t){return e},y.prototype.equals=function(e,t){return e==t},y.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},y.prototype.pattern=/.*/,y.prototype.toString=function(){return"{Type:"+this.name+"}"},y.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},y.prototype.$asArray=function(e,t){function r(e,t){function r(e,t){return function(){return e[t].apply(e,arguments)}}function i(e){return F(e)?e:D(e)?[e]:[]}function o(e){switch(e.length){case 0:return n;case 1:return"auto"===t?e[0]:e;default:return e}}function a(e){return!e}function s(e,t){return function(n){n=i(n);var r=h(n,e);return t===!0?0===p(r,a).length:o(r)}}function l(e){return function(t,n){var r=i(t),o=i(n);if(r.length!==o.length)return!1;for(var a=0;ar;r++)e[r]=this.fillReferencesValuesFromEntry(e[r],t,n);return e}},{key:"fillReferencesValuesFromEntry",value:function(e,t,n){for(var r in t){var i=t[r],o=this.getReferenceChoicesById(i),a=[],s=i.getMappedValue(e.values[r],e.values);if("reference_many"===i.type()){for(var l in s){var u=s[l];a.push(o[u])}e.listValues[r]=a}else n&&s&&s in o&&(e.listValues[r]=i.getMappedValue(o[s],e.values))}return e}},{key:"getReferenceChoicesById",value:function(e){for(var t={},n=e.targetField().name(),r=e.targetEntity().identifier().name(),i=this.getEntries(e.targetEntity().uniqueId+"_values"),o=0,a=i.length;a>o;o++){var s=i[o];t[s.values[r]]=s.values[n]}return t}}]),e}();t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt;t++){var r=this._targetFields[t];e.push({field:r,label:r.label()})}return e}},{key:"getSortFieldName",value:function(){return this._targetEntity.name()+"_ListView."+(this.sortField()||this._targetReferenceField)}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n':this._icon}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;s=u=l=void 0,r=!1;var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return void 0;e=u,t=o,n=a,r=!0}},s=n(2),l=r(s),u=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._type="ShowView"}return o(t,e),t}(l["default"]);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";n(122),n(47);var r=n(21),i=angular.module("AdminDescriptionModule",[]);i.constant("AdminDescription",new r);var o=angular.module("ng-admin",["main","crud","AdminDescriptionModule"]);o.config(["NgAdminConfigurationProvider","AdminDescription",function(e,t){e.setAdminDescription(t)}])},function(e,t,n){"use strict";var r=n(4),i=r.module("crud",["ui.router","ui.bootstrap","ngSanitize","textAngular","ngInflection","ui.codemirror","angularFileUpload","ngNumeraljs"]);i.controller("ListController",n(104)),i.controller("ShowController",n(120)),i.controller("FormController",n(101)),i.controller("DeleteController",n(70)),i.controller("BatchDeleteController",n(69)),i.service("EntryFormatter",n(112)),i.service("PromisesResolver",n(113)),i.service("ReadQueries",n(117)),i.service("WriteQueries",n(118)),i.service("RestWrapper",n(114)),i.directive("maJsonValidator",n(121)),i.directive("maField",n(76)),i.directive("maButtonField",n(71)),i.directive("maChoiceField",n(73)),i.directive("maChoicesField",n(74)),i.directive("maDateField",n(75)),i.directive("maInputField",n(78)),i.directive("maJsonField",n(79)),i.directive("maFileField",n(77)),i.directive("maCheckboxField",n(72)),i.directive("maTextField",n(81)),i.directive("maWysiwygField",n(82)),i.directive("maTemplateField",n(80)),i.provider("FieldViewConfiguration",n(87)),i.directive("listActions",n(103)),i.directive("maDatagrid",n(105)),i.directive("maDatagridPagination",n(109)),i.directive("maDatagridInfinitePagination",n(106)),i.directive("maDatagridItemSelector",n(107)),i.directive("maDatagridMultiSelector",n(108)),i.directive("maFilter",n(99)),i.directive("maColumn",n(59)),i.directive("maBooleanColumn",n(57)),i.directive("maChoicesColumn",n(58)),i.directive("maDateColumn",n(60)),i.directive("maJsonColumn",n(61)),i.directive("maNumberColumn",n(62)),i.directive("maReferenceManyColumn",n(63)),i.directive("maReferenceManyLinkColumn",n(64)),i.directive("maStringColumn",n(65)),i.directive("maTemplateColumn",n(66)),i.directive("maWysiwygColumn",n(67)),i.directive("maBackButton",n(48)),i.directive("maCreateButton",n(50)),i.directive("maEditButton",n(52)),i.directive("maFilteredListButton",n(54)),i.directive("maShowButton",n(56)),i.directive("maListButton",n(55)),i.directive("maDeleteButton",n(51)),i.directive("maBatchDeleteButton",n(49)),i.directive("maExportToCsvButton",n(53)),i.directive("maViewActions",n(115)),i.directive("maViewBatchActions",n(116)),i.directive("compile",n(111)),i.config(n(119)),i.config(n(68)),i.factory("Papa",function(){return n(163)}),i.factory("notification",function(){var e=n(159);return e.timeout=5e3,e.clickToClose=!0,e}),i.factory("progression",function(){return n(162)}),e.exports=i},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{size:"@",label:"@"},link:function(t){t.label=t.label||"Back",t.back=function(){e.history.back()}},template:' {{ ::label }}'}}return e.$inject=["$window"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",selection:"&",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoBatchDelete=function(){var n=(t.entity(),t.selection().map(function(e){return e.identifierValue}));e.go("batchDelete",angular.extend({ids:n,entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Create",t.gotoCreate=function(){e.go(e.get("create"),angular.extend({entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoDelete=function(){e.go(e.get("delete"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Edit",t.gotoEdit=function(){e.go(e.get("edit"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r,i){return{restrict:"E",scope:{entity:"&",label:"@",datastore:"&",search:"&"},template:'',link:function(o){o.label=o.label||"Export",o.datastore=o.datastore(),o.entity=o.entity();var a=o.entity.exportView(),s=o.entity.listView();if(0===a.fields().length){var l=s.exportFields();null===l&&(l=s.fields()),a.fields(l),a.filters(s.filters())}o.has_export=a.fields().length>0;var u=r.getFormatter(a.fields());o.exportToCsv=function(){var r,s,l;i.getAll(a,-1,o.search(),e.sortField,e.sortDir).then(function(e){return r=e.data},function(e){n.log(e.message,{addnCls:"humane-flatty-error"})}).then(function(e){return i.getFilteredReferenceData(a.getNonOptimizedReferences(),e)}).then(function(e){return s=e,i.getOptimizedReferencedData(a.getOptimizedReferences(),r)}).then(function(e){l=e;var t,n=a.getReferences(),r=angular.extend(s,l);for(var i in r)t=o.datastore.mapEntries(n[i].targetEntity().name(),n[i].targetEntity().identifier(),[n[i].targetField()],r[i]),o.datastore.setEntries(n[i].targetEntity().uniqueId+"_values",t)}).then(function(){var e=o.datastore.mapEntries(a.entity.name(),a.identifier(),a.getFields(),r);o.datastore.fillReferencesValuesFromCollection(e,a.getReferences(),!0);for(var n=[],i=e.length-1;i>=0;i--)n[i]=u(e[i]);var s=t.unparse(n),l=document.createElement("a");document.body.appendChild(l),l.setAttribute("href","data:application/octet-stream;charset=utf-8,"+encodeURIComponent(s)),l.setAttribute("download",o.entity.name()+".csv"),l.click()})}}}}return e.$inject=["$stateParams","Papa","notification","EntryFormatter","ReadQueries"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entityName:"@",filter:"&",label:"@",size:"@"},link:function(t){t.label=t.label||"See all related "+t.entityName,t.gotoList=function(){e.go(e.get("list"),{entity:t.entityName,search:t.filter()})}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"List";var n=t.$parent.entity?t.$parent.entity.name():null,r=t.entity().name(),i={entity:r};r===n&&angular.extend(i,e.params),t.gotoList=function(){e.go(e.get("list"),i)}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Show",t.gotoShow=function(){e.go(e.get("show"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},link:function(e){e.isOk=!!e.value()},template:""}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n,r,i){function o(e){if(e.isDetailLink()===!1)return!1;if("reference"!=e.type()&&"reference_many"!=e.type())return!0;var t=e.targetEntity().name(),n=r().getEntity(t);return n?n.isReadOnly?n.showView().enabled:n.editionView().enabled:!1}return{restrict:"E",scope:{field:"&",entry:"&",entity:"&",datastore:"&"},link:function(a,s,l){a.datastore=a.datastore(),a.field=a.field(),a.entry=a.entry();var u=a.field.type();o(a.field)?s.append(i[u].getLinkWidget()):s.append(i[u].getReadWidget()),n(s.contents())(a),a.gotoDetail=function(){this.clearRouteParams();var n=a.field.detailLinkRoute();"edit"!=n||a.entity().editionView().enabled||(n="show"),e.path("/"+a.entry.entityName+"/"+n+"/"+a.entry.identifierValue),t(0)},a.gotoReference=function(){this.clearRouteParams();var t=a.field.targetEntity().name(),n=r().getEntity(t),i=a.entry.values[a.field.name()],o=n.isReadOnly?"show":a.field.detailLinkRoute();e.path("/"+t+"/"+o+"/"+i)},a.clearRouteParams=function(){e.search("q",null),e.search("page",null),e.search("sortField",null),e.search("sortDir",null)}}}}return t.$inject=["$location","$anchorScroll","$compile","NgAdminConfiguration","FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | date:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&"},link:function(t,n){t.guessType=function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t?"Object":"[object Array]"===t?"Array":"Literal"};var r='
{{ val }}
{{ key }}{{ val }}
',i=angular.element(r);e(i)(t),n.replaceWith(i)}}}return t.$inject=["$compile"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | numeraljs:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{restrict:"E",scope:{field:"&",values:"&",ids:"&"},link:function(n){n.field=n.field(),n.values=n.values(),n.ids=n.ids();var r=n.field.targetEntity().name(),i=t().getEntity(r);n.gotoReference=function(t){var n=i.isReadOnly?"show":"edit";e.path("/"+r+"/"+n+"/"+t)}},template:'{{ ref }}'}}return t.$inject=["$location","NgAdminConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},template:"{{ value() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&",field:"&"},link:function(t){var n=t.value();t.field().stripTags()&&(n=e("stripTags")(n)),t.htmlValue=n},template:''}}return t.$inject=["$filter"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){e.registerFieldView("boolean",n(83)),e.registerFieldView("choice",n(84)),e.registerFieldView("choices",n(85)),e.registerFieldView("date",n(16)),e.registerFieldView("datetime",n(16)),e.registerFieldView("email",n(86)),e.registerFieldView("file",n(88)),e.registerFieldView("json",n(89)),e.registerFieldView("number",n(90)),e.registerFieldView("password",n(91)),e.registerFieldView("referenced_list",n(94)),e.registerFieldView("reference",n(92)),e.registerFieldView("reference_many",n(93)),e.registerFieldView("string",n(95)),e.registerFieldView("template",n(96)),e.registerFieldView("text",n(97)),e.registerFieldView("wysiwyg",n(98))}r.$inject=["FieldViewConfigurationProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i){this.$scope=e,this.$state=t,this.WriteQueries=n,this.notification=r,this.view=i,this.entity=i.getEntity(),this.entityIds=t.params.ids,this.selection=[],this.title=i.title(),this.description=i.description(),this.actions=i.actions(),this.loadingPage=!1,this.fields=i.fields(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.batchDelete=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.batchDelete(this.view,this.entityIds).then(function(){t.go(t.get("list"),angular.extend({entity:n},t.params)),e.log("Elements successfully deleted.",{addnCls:"humane-flatty-success"})},function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){this.$state.go(this.$state.get("list"),angular.extend({entity:this.entity().name()},this.$state.params))},e.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0},e.$inject=["$scope","$state","WriteQueries","notification","view"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i,o,a){this.$scope=e,this.$state=t,this.WriteQueries=n,this.entityLabel=i.entity,this.entityId=i.id,this.view=o,this.title=o.title(),this.description=o.description(),this.actions=o.actions(),this.entity=o.getEntity(),this.notification=r,this.$scope.entry=a,this.$scope.view=o,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.deleteOne=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.deleteOne(this.view,this.entityId).then(function(){t.go(t.get("list"),angular.extend({entity:n,id:this.entityId},t.params)),e.log("Element successfully deleted.",{addnCls:"humane-flatty-success"})}.bind(this),function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){var e=this.$state;e.go(e.get("edit"),angular.extend({entity:this.entity.name(),id:this.entityId},e.params))},e.prototype.destroy=function(){this.$scope=void 0,this.WriteQueries=void 0,this.$state=void 0,this.view=void 0,this.entity=void 0},e.$inject=["$scope","$state","WriteQueries","notification","params","view","entry"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.label=n.label(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.toggle=function(){this.value=!this.value},e.isActive=function(){return!!this.value}},template:'{{ label }}'}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.rawValue=e.value,e.$watch("rawValue",function(t){e.value=n.parse()(t)}),e.format=n.format(),e.v=n.validation(),e.isOpen=!1;var r=t.find("input").eq(0),i=n.attributes();for(var o in i)r.attr(o,i[o]);e.toggleDatePicker=function(t){t.preventDefault(),t.stopPropagation(),e.isOpen=!e.isOpen}},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=r(e).map(function(e,t){return''+e.getWriteWidget()+""}).join(""),n='
'+t+'

';return{restrict:"E",scope:{field:"&",entry:"=",entity:"&",form:"&",datastore:"&"},link:function(e){e.field=e.field(),e.type=e.field.type(),e.entity=e.entity(),e.form=e.form(),e.datastore=e.datastore(),e.getClassesForField=function(e,t){return"ng-admin-field-"+e.name()+" "+(e.getCssClasses(t)||"col-sm-10 col-md-8 col-lg-7")},e.getInputForField=function(t){return e.form[t.name()]},e.fieldHasValidation=function(e){var t=this.getInputForField(e);return t&&t.$dirty},e.fieldIsValid=function(e){var t=this.getInputForField(e);return t&&t.$valid},e.getFieldValidationClass=function(e){return this.fieldHasValidation(e)?this.fieldIsValid(e)?"has-success":"has-error":void 0}},template:n}}var r=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{scope:{field:"&",value:"="},restrict:"E",link:{pre:function(e){var t=e.field().uploadInformation();if(!t.hasOwnProperty("url"))throw new Error("You must provide a URL property to allow the upload of files.");e.multiple=t.hasOwnProperty("multiple")?t.multiple:!1,e.accept=t.hasOwnProperty("accept")?t.accept:"*",e.apifilename=t.hasOwnProperty("apifilename")?t.apifilename:!1;var n=e.value?e.value.split(","):[];e.files={};for(var r in n)e.files[n[r]]={name:n[r],progress:0}},post:function(n,r){var i=n.field();n.name=i.name(),n.v=i.validation(),n.value&&(n.v.required=!1);var o=r.find("input")[0],a=i.attributes();for(var s in a)o[s]=a[s];n.fileSelected=function(t){if(t){var r;n.files={};for(var i in t)r=angular.copy(n.field().uploadInformation()),r.file=t[i],e.upload(r).progress(function(e){n.files[e.config.file.name]={name:e.config.file.name,progress:Math.min(100,parseInt(100*e.loaded/e.total))}}).success(function(e,t,r,i){if(n.files[i.file.name]={name:n.apifilename?e[n.apifilename]:i.file.name,progress:0},n.apifilename){var o=Object.keys(n.files).map(function(e){return n.files[e].name});n.value=o.join(",")}else n.value=Object.keys(n.files).join(",")}).error(function(e,t,r,i){delete n.files[i.file.name],n.value=Object.keys(n.files).join(",")})}},n.selectFile=function(){t(function(){o.click()},0)}}},template:'
{{ file.progress }}% Complete
{{ file.name }}
'}}return t.$inject=["$upload","$timeout"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{type:"@",field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){(function(t){"use strict";function r(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.jsonValue=null===e.value?"":angular.toJson(e.value,!0);var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.$watch("jsonValue",function(t){if(""==t||"undefined"==typeof t)return void(e.value=null);try{var n=angular.fromJson(t);e.value=n}catch(r){}})},template:''}}var i=n(3);t.jsonlint=n(160),n(153),n(154),n(156),n(155),n(157),n(158),i.defineOption("matchBrackets",!0),i.defineOption("autoCloseBrackets",!0),i.defineOption("lineWrapping",!0),i.defineOption("tabSize",2),i.defineOption("mode","application/json"),i.defineOption("gutters",["CodeMirror-lint-markers"]),i.defineOption("lint",!0),i.defineOption("styleActiveLine",!0),t.CodeMirror=i,r.$inject=[],e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:'' -}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name()},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){this.fieldViews={}}return e.prototype.registerFieldView=function(e,t){this.fieldViews[e]=t},e.prototype.$get=function(){return this.fieldViews},e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display file field as readable"}function n(){return"error: cannot display file field as linkable"}function r(){return"error: cannot display file field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display a json field as linkable"}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display password field as readable"}function n(){return"error: cannot display password field as linkable"}function r(){return"error: cannot display password field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display referenced_list field as linkable"}function r(){return"error: cannot display referenced_list field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(){return''}function i(){return''+r()+""}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){"use strict";function r(){return''}function i(){return"error: cannot display wysiwyg field as linkable"}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=i(e).map(function(e,t){return''+e.getFilterWidget()+""}).join(""),n='';return{restrict:"E",template:n,scope:{filters:"&",datastore:"&"},controllerAs:"filterCtrl",controller:r}}var r=n(100),i=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,n,r){this.$scope=e,this.$state=n,this.$stateParams=r,this.$scope.values=this.$stateParams.search||{},this.$scope.filters=this.$scope.filters(),this.$scope.datastore=this.$scope.datastore(),this.isFilterEmpty=t(this.$scope.values)}function t(e){for(var t in e)if(""!=e[t])return!1;return!0}return e.prototype.filter=function(){var e,t,n,r={},i=this.$scope.filters;for(n in i)t=i[n],e=t.name(),this.$scope.values[e]&&(r[e]=this.$scope.values[e]);this.$stateParams.search=r,this.$stateParams.page=1,this.$state.go(this.$state.current,this.$stateParams,{reload:!0,inherit:!1,notify:!0})},e.prototype.shouldFilter=function(){return Object.keys(this.$scope.filters).length},e.prototype.clearFilters=function(){var e;for(e in this.$scope.values)this.$scope.values[e]=null;this.filter()},e.prototype.destroy=function(){this.$scope=void 0},e.$inject=["$scope","$state","$stateParams"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){this.$scope=e,this.$state=t,this.WriteQueries=n,this.dataStore=s,this.progression=i,this.notification=o,this.title=a.title(),this.description=a.description(),this.actions=a.actions(),this.fields=a.fields(),this.config=r(),this.view=a,this.entity=this.view.getEntity(),this.$scope.entry=s.getFirstEntry(this.entity.uniqueId),this.$scope.view=a,this.$scope.entity=this.entity,this.originEntityId=this.$scope.entry.values[this.entity.identifier().name()],e.$on("$destroy",this.destroy.bind(this))};r.prototype.validateEntry=function(){var e,t,n,r,i=this.form,o=this.$scope.entry,a=this.view.getFields(),s=this.entity.identifier(),l={};if(!i.$valid)return this.notification.log("invalid form",{addnCls:"humane-flatty-error"}),!1;l[s.name()]=o.identifierValue;for(r in a)n=a[r],e=o.values[n.name()],l[n.name()]=e;t=this.dataStore.mapEntry(this.view.entity.name(),this.view.identifier(),this.view.getFields(),l);try{this.view.validate(t)}catch(u){return this.notification.log(u,{addnCls:"humane-flatty-error"}),!1}return l},r.prototype.submitCreation=function(e){e.preventDefault();var t=this.validateEntry(),n=this.entity,r=n.editionView().enabled?"edit":"show";if(t){var i=this.progression,o=this.notification,a=this.$state;i.start(),this.WriteQueries.createOne(this.view,t).then(function(e){var t=this.dataStore.mapEntry(n.name(),this.view.identifier(),this.view.getFields(),e);i.done(),o.log("Element successfully created.",{addnCls:"humane-flatty-success"}),a.go(a.get(r),{entity:n.name(),id:t.identifierValue})}.bind(this),this.handleError.bind(this))}},r.prototype.submitEdition=function(e){e.preventDefault();var t=this.validateEntry();if(t){var n=this.progression,r=this.notification;n.start(),this.WriteQueries.updateOne(this.view,t,this.originEntityId).then(function(){n.done(),r.log("Changes successfully saved.",{addnCls:"humane-flatty-success"})},this.handleError.bind(this))}},r.prototype.handleError=function(e){var t=this.config.getErrorMessageFor(this.view,e);this.progression.done(),this.notification.log(t,{addnCls:"humane-flatty-error"})},r.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0,this.dataStore=void 0,this.view=void 0,this.entity=void 0},r.$inject=["$scope","$state","WriteQueries","NgAdminConfiguration","progression","notification","view","dataStore"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.entity=e.entity(),this.$scope=e,this.$location=t,this.$anchorScroll=n,this.filters={},this.shouldDisplayActions=this.$scope.listActions()&&this.$scope.listActions().length>0,e.toggleSelect=this.toggleSelect.bind(this),e.toggleSelectAll=this.toggleSelectAll.bind(this),this.$scope.gotoDetail=this.gotoDetail.bind(this);var r=this.$location.search();this.sortField="sortField"in r?r.sortField:this.$scope.sortField,this.sortDir="sortDir"in r?r.sortDir:this.$scope.sortDir}return e.prototype.gotoDetail=function(e){this.clearRouteParams();var t=this.$scope.entity,n=t.editionView().enabled?"edit":"show";this.$location.path("/"+e.entityName+"/"+n+"/"+e.identifierValue),this.$anchorScroll(0)},e.prototype.clearRouteParams=function(){this.$location.search("q",null),this.$location.search("page",null),this.$location.search("sortField",null),this.$location.search("sortDir",null)},e.prototype.isSorting=function(e){return this.sortField===this.getSortName(e)},e.prototype.itemClass=function(e){return e%2===0?"even":"odd"},e.prototype.sort=function(e){var t="ASC",n=this.getSortName(e);this.sortField===n&&(t="ASC"===this.sortDir?"DESC":"ASC"),this.$location.search("sortField",n),this.$location.search("sortDir",t)},e.prototype.getSortName=function(e){return this.$scope.name+"."+e.name()},e.prototype.toggleSelect=function(e){var t=this.$scope.selection.slice(),n=t.indexOf(e);return-1===n?void(this.$scope.selection=t.concat(e)):(t.splice(n,1),void(this.$scope.selection=t))},e.prototype.toggleSelectAll=function(){return this.$scope.selection.length0,this.dataStore=s,this.fields=a.fields(),this.listActions=a.listActions(),this.totalItems=l,this.page=t.page||1,this.infinitePagination=this.view.infinitePagination(),this.nextPageCallback=this.nextPage.bind(this),this.setPageCallback=this.setPage.bind(this),this.selection=this.batchActions.length?[]:null,this.sortField=this.$stateParams.sortField||this.view.getSortFieldName(),this.sortDir=this.$stateParams.sortDir||this.view.sortDir(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.nextPage=function(e){if(!this.loadingPage){var t=this.progression,n=this;t.start(),this.ReadQueries.getAll(this.view,e,!0,this.search,this.sortField,this.sortDir).then(function(e){t.done(),n.entries=n.entries.concat(e.entries),n.loadingPage=!1})}},e.prototype.setPage=function(e){this.$location.search("page",e),this.$anchorScroll(0)},e.prototype.destroy=function(){this.$scope=void 0,this.$stateParams=void 0,this.$location=void 0,this.$anchorScroll=void 0,this.dataStore=void 0},e.$inject=["$scope","$stateParams","$location","$anchorScroll","ReadQueries","progression","view","dataStore","totalItems"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",template:r,scope:{name:"@",entries:"=",selection:"=",fields:"&",listActions:"&",entity:"&",sortField:"=",sortDir:"="},controllerAs:"datagrid",controller:i}}var r=n(140),i=n(102);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){var n=r.element(e),i=100,o=t[0].body;return{restrict:"E",scope:{perPage:"@",totalItems:"@",nextPage:"&"},link:function(t){function r(){if(o.offsetHeight-e.innerHeight-e.scrollY=l)return;u++,t.nextPage()(u)}}var a=parseInt(t.perPage,10)||1,s=parseInt(t.totalItems,10),l=Math.ceil(s/a)||1,u=1;n.bind("scroll",r),t.$on("$destroy",function(){n.unbind("scroll",r)})}}}var r=n(4);return t.$inject=["$window","$document"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entry:"=",selection:"=",toggleSelect:"&"},template:'',link:function(e){e.toggle=function(t){e.toggleSelect({entry:t})}}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entries:"=",selection:"=",toggleSelectAll:"&"},template:'',link:function(e,t){e.$watch("selection",function(n){t.children()[0].indeterminate=n.length>0&&n.length!=e.entries.length}),e.$watch("entries",function(n){t.children()[0].indeterminate=e.selection.length>0&&e.selection.length!=n.length})}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{page:"@",perPage:"@",totalItems:"@",setPage:"&"},template:r,controllerAs:"paginationCtrl",controller:i}}var r=n(143),i=n(110);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){this.$scope=e;var t=parseInt(this.$scope.perPage,10)||1,n=parseInt(this.$scope.totalItems,10),r=Math.max(parseInt(this.$scope.page,10),1);this.nbPages=Math.ceil(n/t)||1,this.page=Math.min(this.nbPages,r),this.offsetEnd=Math.min(this.page*t,n),this.offsetBegin=Math.min((this.page-1)*t+1,this.offsetEnd),this.totalItems=n,this.displayPagination=n>t,e.$on("$destroy",this.destroy.bind(this))}n(4);return t.prototype.range=function(e){var t=[],n=this.nbPages;return e>2&&t.push("1"),4==e&&t.push("2"),e>4&&t.push("."),e>1&&t.push(e-1),t.push(e),n>e&&t.push(e+1),e==n-3&&t.push(n-1),n-3>e&&t.push("."),n-1>e&&t.push(n),t},t.prototype.setPage=function(e){0>=e||e>this.nbPages||this.$scope.setPage()(e)},t.prototype.destroy=function(){this.$scope=void 0},t.$inject=["$scope"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){var t=e.get("$compile");return{transclude:!0,link:function(e,n,r,i,o){var a=e.$watch(function(e){return e.$eval(r.compile)},function(i){return!1===i?void o(e,function(e){n.append(e)}):(n.html(i),t(n.contents())(e),void("true"==r.compileOnce&&a()))})}}}return e.$inject=["$injector"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.formatDate=function(t){return function(n){return e("date")(n,t)}}}return e.prototype.formatField=function(e){var t=e.label()||e.name();switch(e.type()){case"boolean":case"choice":case"choices":case"number":case"string":case"text":case"wysiwyg":case"email":case"json":case"file":case"template":return function(n){return{name:t,value:n.values[e.name()]}};case"date":var n=this.formatDate(e.format());return function(r){return{name:t,value:n(r.values[e.name()])}};case"reference":return function(n){return{name:t,value:n.listValues[e.name()]}};case"referenced_list":return}},e.prototype.getFormatter=function(e){var t=e.map(this.formatField.bind(this));return function(e){var n={};return t.map(function(t){return t?t(e):void 0}).forEach(function(e){e&&(n[e.name]=e.value)}),n}},e.$inject=["$filter"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return e.getPromisesResolver()}return e.$inject=["AdminDescription"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.Restangular=e,e.setFullResponse(!0)}return e.prototype.getOne=function(e,t){return this.Restangular.oneUrl(e,t).get().then(function(e){return e.data})},e.prototype.getList=function(e,t,n){return this.Restangular.allUrl(t,n).getList(e)},e.prototype.createOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPOST(e).then(function(e){return e.data})},e.prototype.updateOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPUT(e).then(function(e){return e.data})},e.prototype.deleteOne=function(e,t){return this.Restangular.oneUrl(e,t).customDELETE()},e.$inject=["Restangular"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=e.get("$compile");return{restrict:"E",transclude:!0,scope:{override:"&",entry:"=",entity:"=",selection:"=",batchButtons:"&",datastore:"=",search:"="},template:r,link:function(e,n,r,i,o){var a=e.override();return a?"string"==typeof a?(n.html(a),void t(n.contents())(e)):void(e.buttons=a):void o(e,function(e){n.append(e)})}}}var r=n(144);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){e.get("$compile");return{restrict:"E",scope:{entity:"=",selection:"=",buttons:"&"},template:r,link:function(e){e.isopen=!1,e.toggleDropdown=function(t){t.preventDefault(),t.stopPropagation(),e.isopen=!e.isopen},e.buttons=e.buttons(),"string"==typeof e.buttons&&(e.customTemplate=e.buttons,e.buttons=null)}}}var r=n(145);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getReadQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getWriteQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){return["$stateParams","NgAdminConfiguration",function(n,r){var i,o=r().getViewByEntityAndType(n.entity,e);return(i=o.template())?i:(i=r().customTemplate()(e),i?i:t)}]}function i(e){return["$stateParams","NgAdminConfiguration",function(t,n){var r;try{r=n().getViewByEntityAndType(t.entity,e)}catch(i){var o=new Error("Unknown view or entity name");throw o.status=404,o}if(!r.enabled)throw new Error("The "+e+" is disabled for this entity");return r}]}function o(){return["AdminDescription",function(e){return e.getDataStore()}]}function a(e){e.state("list",{parent:"main",url:"/:entity/list?{search:json}&page&sortField&sortDir",params:{entity:null,page:null,search:null,sortField:null,sortDir:null},controller:"ListController",controllerAs:"listController",templateProvider:r("ListView",s),resolve:{dataStore:o(),view:i("ListView"),response:["$stateParams","ReadQueries","view",function(e,t,n){var r=e.page,i=e.search,o=e.sortField,a=e.sortDir;return t.getAll(n,r,i,o,a)}],totalItems:["response",function(e){return e.totalItems}],nonOptimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),n.data)}],optimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),n.data)}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],entries:["dataStore","view","response","referencedEntries",function(e,t,n,r){var i=e.mapEntries(t.entity.name(),t.identifier(),t.getFields(),n.data);return e.fillReferencesValuesFromCollection(i,t.getReferences(),!0),e.setEntries(t.getEntity().uniqueId,i),!0}],filterData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getFilterReferences())}],filterEntries:["dataStore","view","filterData",function(e,t,n){var r,i=t.getFilterReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("show",{parent:"main",url:"/:entity/show/:id?sortField&sortDir",controller:"ShowController",controllerAs:"showController",templateProvider:r("ShowView",l),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("ShowView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}]}}),e.state("create",{parent:"main",url:"/:entity/create",controller:"FormController",controllerAs:"formController",templateProvider:r("CreateView",u),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("CreateView"),entry:["dataStore","view",function(e,t){var n=e.createEntry(t.entity.name(),t.identifier(),t.getFields());return e.addEntry(t.getEntity().uniqueId,n),n}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("edit",{parent:"main",url:"/:entity/edit/:id?sortField&sortDir",controller:"FormController",controllerAs:"formController",templateProvider:r("EditView",c),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("EditView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("delete",{parent:"main",url:"/:entity/delete/:id",controller:"DeleteController",controllerAs:"deleteController",templateProvider:r("DeleteView",f),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("DeleteView"),params:["$stateParams",function(e){return e}],entry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl()); -}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** - * @license AngularJS v1.4.0 - * (c) 2010-2015 Google, Inc. http://angularjs.org +"undefined"!=typeof e&&"undefined"!=typeof t&&e.exports===t&&(e.exports="ui.router"),function(e,t,n){"use strict";function r(e,t){return j(new(j(function(){},{prototype:e})),t)}function i(e){return I(arguments,function(t){t!==e&&I(t,function(t,n){e.hasOwnProperty(n)||(e[n]=t)})}),e}function o(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}function a(e){if(Object.keys)return Object.keys(e);var t=[];return I(e,function(e,n){t.push(n)}),t}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t,Number(arguments[2])||0);var n=e.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=n);n>r;r++)if(r in e&&e[r]===t)return r;return-1}function l(e,t,n,r){var i,l=o(n,r),u={},c=[];for(var f in l)if(l[f].params&&(i=a(l[f].params),i.length))for(var d in i)s(c,i[d])>=0||(c.push(i[d]),u[i[d]]=e[i[d]]);return j({},u,t)}function u(e,t,n){if(!n){n=[];for(var r in e)n.push(r)}for(var i=0;i "));if(y[n]=r,L(e))v.push(n,[function(){return t.get(e)}],u);else{var i=t.annotate(e);I(i,function(e){e!==n&&l.hasOwnProperty(e)&&p(l[e],e)}),v.push(n,e,i)}m.pop(),y[n]=o}}function h(e){return P(e)&&e.then&&e.$$promises}if(!P(l))throw new Error("'invocables' must be an object");var g=a(l||{}),v=[],m=[],y={};return I(l,p),l=m=y=null,function(r,o,a){function s(){--w||($||i(b,o.$$values),m.$$values=b,m.$$promises=m.$$promises||!0,delete m.$$inheritedValues,p.resolve(b))}function l(e){m.$$failure=e,p.reject(e)}function u(n,i,o){function u(e){f.reject(e),l(e)}function c(){if(!D(m.$$failure))try{f.resolve(t.invoke(i,a,b)),f.promise.then(function(e){b[n]=e,s()},u)}catch(e){u(e)}}var f=e.defer(),d=0;I(o,function(e){y.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&(d++,y[e].then(function(t){b[e]=t,--d||c()},u))}),d||c(),y[n]=f.promise}if(h(r)&&a===n&&(a=o,o=r,r=null),r){if(!P(r))throw new Error("'locals' must be an object")}else r=c;if(o){if(!h(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var p=e.defer(),m=p.promise,y=m.$$promises={},b=j({},r),w=1+v.length/3,$=!1;if(D(o.$$failure))return l(o.$$failure),m;o.$$inheritedValues&&i(b,d(o.$$inheritedValues,g)),j(y,o.$$promises),o.$$values?($=i(b,d(o.$$values,g)),m.$$inheritedValues=d(o.$$values,g),s()):(o.$$inheritedValues&&(m.$$inheritedValues=d(o.$$inheritedValues,g)),o.then(s,l));for(var x=0,C=v.length;C>x;x+=3)r.hasOwnProperty(v[x])?s():u(v[x],v[x+1],v[x+2]);return m}},this.resolve=function(e,t,n,r){return this.study(e)(t,n,r)}}function v(e,t,n){this.fromConfig=function(e,t,n){return D(e.template)?this.fromString(e.template,t):D(e.templateUrl)?this.fromUrl(e.templateUrl,t):D(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return N(e)?e(t):e},this.fromUrl=function(n,r){return N(n)&&(n=n(r)),null==n?null:e.get(n,{cache:t,headers:{Accept:"text/html"}}).then(function(e){return e.data})},this.fromProvider=function(e,t,r){return n.invoke(e,null,r||{params:t})}}function m(e,t,i){function o(t,n,r,i){if(v.push(t),h[t])return h[t];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(g[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");return g[t]=new H.Param(t,n,r,i),g[t]}function a(e,t,n,r){var i=["",""],o=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return o;switch(n){case!1:i=["(",")"+(r?"?":"")];break;case!0:i=["?(",")?"];break;default:i=["("+n+"|",")?"]}return o+i[0]+t+i[1]}function s(i,o){var a,s,l,u,c;return a=i[2]||i[3],c=t.params[a],l=e.substring(d,i.index),s=o?i[4]:i[4]||("*"==i[1]?".*":null),u=H.type(s||"string")||r(H.type("string"),{pattern:new RegExp(s,t.caseInsensitive?"i":n)}),{id:a,regexp:s,segment:l,type:u,cfg:c}}t=j({params:{}},P(t)?t:{});var l,u=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",d=0,p=this.segments=[],h=i?i.params:{},g=this.params=i?i.params.$$new():new H.ParamSet,v=[];this.source=e;for(var m,y,b;(l=u.exec(e))&&(m=s(l,!1),!(m.segment.indexOf("?")>=0));)y=o(m.id,m.type,m.cfg,"path"),f+=a(m.segment,y.type.pattern.source,y.squash,y.isOptional),p.push(m.segment),d=u.lastIndex;b=e.substring(d);var w=b.indexOf("?");if(w>=0){var $=this.sourceSearch=b.substring(w);if(b=b.substring(0,w),this.sourcePath=e.substring(0,d+w),$.length>0)for(d=0;l=c.exec($);)m=s(l,!0),y=o(m.id,m.type,m.cfg,"search"),d=u.lastIndex}else this.sourcePath=e,this.sourceSearch="";f+=a(b)+(t.strict===!1?"/?":"")+"$",p.push(b),this.regexp=new RegExp(f,t.caseInsensitive?"i":n),this.prefix=p[0],this.$$paramNames=v}function y(e){j(this,e)}function b(){function e(e){return null!=e?e.toString().replace(/\//g,"%2F"):e}function i(e){return null!=e?e.toString().replace(/%2F/g,"/"):e}function o(){return{strict:g,caseInsensitive:d}}function l(e){return N(e)||F(e)&&N(e[e.length-1])}function u(){for(;x.length;){var e=x.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(w[e.name],f.invoke(e.def))}}function c(e){j(this,e||{})}H=this;var f,d=!1,g=!0,v=!1,w={},$=!0,x=[],C={string:{encode:e,decode:i,is:function(e){return null==e||!D(e)||"string"==typeof e},pattern:/[^/]*/},"int":{encode:e,decode:function(e){return parseInt(e,10)},is:function(e){return D(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return e===!0||e===!1},pattern:/0|1/},date:{encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):n},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):n},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return this.is(e)&&this.is(t)&&e.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^/]*/},any:{encode:t.identity,decode:t.identity,equals:t.equals,pattern:/.*/}};b.$$getDefaultValue=function(e){if(!l(e.value))return e.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(e.value)},this.caseInsensitive=function(e){return D(e)&&(d=e),d},this.strictMode=function(e){return D(e)&&(g=e),g},this.defaultSquashPolicy=function(e){if(!D(e))return v;if(e!==!0&&e!==!1&&!L(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return v=e,e},this.compile=function(e,t){return new m(e,j(o(),t))},this.isMatcher=function(e){if(!P(e))return!1;var t=!0;return I(m.prototype,function(n,r){N(n)&&(t=t&&D(e[r])&&N(e[r]))}),t},this.type=function(e,t,n){if(!D(t))return w[e];if(w.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return w[e]=new y(j({name:e},t)),n&&(x.push({name:e,def:n}),$||u()),this},I(C,function(e,t){w[t]=new y(j({name:t},e))}),w=r(w,{}),this.$get=["$injector",function(e){return f=e,$=!1,u(),I(C,function(e,t){w[t]||(w[t]=new y(e))}),this}],this.Param=function(e,t,r,i){function o(e){var t=P(e)?a(e):[],n=-1===s(t,"value")&&-1===s(t,"type")&&-1===s(t,"squash")&&-1===s(t,"array");return n&&(e={value:e}),e.$$fn=l(e.value)?e.value:function(){return e.value},e}function u(t,n,r){if(t.type&&n)throw new Error("Param '"+e+"' has two type configurations.");return n?n:t.type?t.type instanceof y?t.type:new y(t.type):"config"===r?w.any:w.string}function c(){var t={array:"search"===i?"auto":!1},n=e.match(/\[\]$/)?{array:!0}:{};return j(t,n,r).array}function d(e,t){var n=e.squash;if(!t||n===!1)return!1;if(!D(n)||null==n)return v;if(n===!0||L(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function g(e,t,r,i){var o,a,l=[{from:"",to:r||t?n:""},{from:null,to:r||t?n:""}];return o=F(e.replace)?e.replace:[],L(i)&&o.push({from:i,to:n}),a=h(o,function(e){return e.from}),p(l,function(e){return-1===s(a,e.from)}).concat(o)}function m(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var e=f.invoke(r.$$fn);if(null!==e&&e!==n&&!x.type.is(e))throw new Error("Default value ("+e+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return e}function b(e){function t(e){return function(t){return t.from===e}}function n(e){var n=h(p(x.replace,t(e)),function(e){return e.to});return n.length?n[0]:e}return e=n(e),D(e)?x.type.$normalize(e):m()}function $(){return"{Param:"+e+" "+t+" squash: '"+E+"' optional: "+_+"}"}var x=this;r=o(r),t=u(r,t,i);var C=c();t=C?t.$asArray(C,"search"===i):t,"string"!==t.name||C||"path"!==i||r.value!==n||(r.value="");var _=r.value!==n,E=d(r,_),k=g(r,C,_,E);j(this,{id:e,type:t,location:i,array:C,squash:E,replace:k,isOptional:_,value:b,dynamic:n,config:r,toString:$})},c.prototype={$$new:function(){return r(this,j(new c,{$$parent:this}))},$$keys:function(){for(var e=[],t=[],n=this,r=a(c.prototype);n;)t.push(n),n=n.$$parent;return t.reverse(),I(t,function(t){I(a(t),function(t){-1===s(e,t)&&-1===s(r,t)&&e.push(t)})}),e},$$values:function(e){var t={},n=this;return I(n.$$keys(),function(r){t[r]=n[r].value(e&&e[r])}),t},$$equals:function(e,t){var n=!0,r=this;return I(r.$$keys(),function(i){var o=e&&e[i],a=t&&t[i];r[i].type.equals(o,a)||(n=!1)}),n},$$validates:function(e){var r,i,o,a,s,l=this.$$keys();for(r=0;ri;i++)if(t(u[i]))return;c&&t(c)}}function p(){return l=l||i.$on("$locationChangeSuccess",d)}var h,g=a.baseHref(),v=r.url();return f||p(),{sync:function(){d()},listen:function(){return p()},update:function(e){return e?void(v=r.url()):void(r.url()!==v&&(r.url(v),r.replace()))},push:function(e,t,i){var o=e.format(t||{});null!==o&&t&&t["#"]&&(o+="#"+t["#"]),r.url(o),h=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,o){if(!n.validates(i))return null;var a=e.html5Mode();t.isObject(a)&&(a=a.enabled);var l=n.format(i);if(o=o||{},a||null===l||(l="#"+e.hashPrefix()+l),null!==l&&i&&i["#"]&&(l+="#"+i["#"]),l=s(l,a,o.absolute),!o.absolute||!l)return l;var u=!a&&l?"/":"",c=r.port();return c=80===c||443===c?"":":"+c,[r.protocol(),"://",r.host(),c,u,l].join("")}}}var l,u=[],c=null,f=!1;this.rule=function(e){if(!N(e))throw new Error("'rule' must be a function");return u.push(e),this},this.otherwise=function(e){if(L(e)){var t=e;e=function(){return t}}else if(!N(e))throw new Error("'rule' must be a function");return c=e,this},this.when=function(e,t){var n,s=L(t);if(L(e)&&(e=r.compile(e)),!s&&!N(t)&&!F(t))throw new Error("invalid 'handler' in when()");var l={matcher:function(e,t){return s&&(n=r.compile(t),t=["$match",function(e){return n.format(e)}]),j(function(n,r){return a(n,t,e.exec(r.path(),r.search()))},{prefix:L(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(n=t,t=["$match",function(e){return o(n,e)}]),j(function(n,r){return a(n,t,e.exec(r.path()))},{prefix:i(e)})}},u={matcher:r.isMatcher(e),regex:e instanceof RegExp};for(var c in u)if(u[c])return this.rule(l[c](e,t));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),f=e},this.$get=s,s.$inject=["$location","$rootScope","$injector","$browser"]}function $(e,i){function o(e){return 0===e.indexOf(".")||0===e.indexOf("^")}function d(e,t){if(!e)return n;var r=L(e),i=r?e:e.name,a=o(i);if(a){if(!t)throw new Error("No reference point given for path '"+i+"'");t=d(t);for(var s=i.split("."),l=0,u=s.length,c=t;u>l;l++)if(""!==s[l]||0!==l){if("^"!==s[l])break;if(!c.parent)throw new Error("Path '"+i+"' not valid for state '"+t.name+"'");c=c.parent}else c=t;s=s.slice(l).join("."),i=c.name+(c.name&&s?".":"")+s}var f=E[i];return!f||!r&&(r||f!==e&&f.self!==e)?n:f}function p(e,t){k[e]||(k[e]=[]),k[e].push(t)}function g(e){for(var t=k[e]||[];t.length;)v(t.shift())}function v(t){t=r(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}});var n=t.name;if(!L(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(E.hasOwnProperty(n))throw new Error("State '"+n+"'' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):L(t.parent)?t.parent:P(t.parent)&&L(t.parent.name)?t.parent.name:"";if(i&&!E[i])return p(i,t.self);for(var o in T)N(T[o])&&(t[o]=T[o](t,T.$delegates[o]));return E[n]=t,!t[S]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){_.$current.navigable==t&&u(e,n)||_.transitionTo(t,e,{inherit:!0,location:!1})}]),g(n),t}function m(e){return e.indexOf("*")>-1}function y(e){for(var t=e.split("."),n=_.$current.name.split("."),r=0,i=t.length;i>r;r++)"*"===t[r]&&(n[r]="*");return"**"===t[0]&&(n=n.slice(s(n,t[1])),n.unshift("**")),"**"===t[t.length-1]&&(n.splice(s(n,t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length!=n.length?!1:n.join("")===t.join("")}function b(e,t){return L(e)&&!D(t)?T[e]:N(t)&&L(e)?(T[e]&&!T.$delegates[e]&&(T.$delegates[e]=T[e]),T[e]=t,this):this}function w(e,t){return P(e)?t=e:t.name=e,v(t),this}function $(e,i,o,s,f,p,g,v,b){function w(t,n,r,o){var a=e.$broadcast("$stateNotFound",t,n,r);if(a.defaultPrevented)return g.update(),O;if(!a.retry)return null;if(o.$retry)return g.update(),R;var s=_.transition=i.when(a.retry);return s.then(function(){return s!==_.transition?k:(t.options.$retry=!0,_.transitionTo(t.to,t.toParams,t.options))},function(){return O}),g.update(),s}function $(e,n,r,a,l,u){function d(){var n=[];return I(e.views,function(r,i){var a=r.resolve&&r.resolve!==e.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:l.globals,params:p,notify:u.notify})||""}],n.push(f.resolve(a,l.globals,l.resolve,e).then(function(n){if(N(r.controllerProvider)||F(r.controllerProvider)){var o=t.extend({},a,l.globals);n.$$controller=s.invoke(r.controllerProvider,null,o)}else n.$$controller=r.controller;n.$$state=e,n.$$controllerAs=r.controllerAs,l[i]=n}))}),i.all(n).then(function(){return l.globals})}var p=r?n:c(e.params.$$keys(),n),h={$stateParams:p};l.resolve=f.resolve(e.resolve,h,l.resolve,e);var g=[l.resolve.then(function(e){l.globals=e})];return a&&g.push(a),i.all(g).then(d).then(function(e){return l})}var k=i.reject(new Error("transition superseded")),T=i.reject(new Error("transition prevented")),O=i.reject(new Error("transition aborted")),R=i.reject(new Error("transition failed"));return C.locals={resolve:null,globals:{$stateParams:{}}},_={params:{},current:C.self,$current:C,transition:null},_.reload=function(e){return _.transitionTo(_.current,p,{reload:e||!0,inherit:!1,notify:!0})},_.go=function(e,t,n){return _.transitionTo(e,t,j({inherit:!0,relative:_.$current},n))},_.transitionTo=function(t,n,o){n=n||{},o=j({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,u=_.$current,f=_.params,h=u.path,v=d(t,o.relative),m=n["#"];if(!D(v)){var y={to:t,toParams:n,options:o},b=w(y,u.self,f,o);if(b)return b;if(t=y.to,n=y.toParams,o=y.options,v=d(t,o.relative),!D(v)){if(!o.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+o.relative+"'")}}if(v[S])throw new Error("Cannot transition to abstract state '"+t+"'");if(o.inherit&&(n=l(p,n||{},_.$current,v)),!v.params.$$validates(n))return R;n=v.params.$$values(n),t=v;var E=t.path,O=0,A=E[O],M=C.locals,N=[];if(o.reload){if(L(o.reload)||P(o.reload)){if(P(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var F=o.reload===!0?h[0]:d(o.reload);if(o.reload&&!F)throw new Error("No such reload state '"+(L(o.reload)?o.reload:o.reload.name)+"'");for(;A&&A===h[O]&&A!==F;)M=N[O]=A.locals,O++,A=E[O]}}else for(;A&&A===h[O]&&A.ownParams.$$equals(n,f);)M=N[O]=A.locals,O++,A=E[O];if(x(t,n,u,f,M,o))return m&&(n["#"]=m),_.params=n,V(_.params,p),o.location&&t.navigable&&t.navigable.url&&(g.push(t.navigable.url,n,{$$avoidResync:!0,replace:"replace"===o.location}),g.update(!0)),_.transition=null,i.when(_.current);if(n=c(t.params.$$keys(),n||{}),o.notify&&e.$broadcast("$stateChangeStart",t.self,n,u.self,f).defaultPrevented)return e.$broadcast("$stateChangeCancel",t.self,n,u.self,f),g.update(),T;for(var I=i.when(M),H=O;H=O;r--)a=h[r],a.self.onExit&&s.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=O;r=0?i:i+"@"+(o?o.state.name:"")}function S(e,t){var n,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e=t+"("+r[1]+")"),n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!n||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function T(e){var t=e.parent().inheritedData("$uiView");return t&&t.state&&t.state.name?t.state:void 0}function O(e,n){var r=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,s){var l=S(a.uiSref,e.current.name),u=null,c=T(o)||e.$current,f="[object SVGAnimatedString]"===Object.prototype.toString.call(o.prop("href"))?"xlink:href":"href",d=null,p="A"===o.prop("tagName").toUpperCase(),h="FORM"===o[0].nodeName,g=h?"action":f,v=!0,m={relative:c,inherit:!0},y=i.$eval(a.uiSrefOpts)||{};t.forEach(r,function(e){e in y&&(m[e]=y[e])});var b=function(n){if(n&&(u=t.copy(n)),v){d=e.href(l.state,u,m);var r=s[1]||s[0];return r&&r.$$addStateInfo(l.state,u),null===d?(v=!1,!1):void a.$set(g,d)}};l.paramExpr&&(i.$watch(l.paramExpr,function(e,t){e!==u&&b(e)},!0),u=t.copy(i.$eval(l.paramExpr))),b(),h||o.bind("click",function(t){var r=t.which||t.button;if(!(r>1||t.ctrlKey||t.metaKey||t.shiftKey||o.attr("target"))){var i=n(function(){e.go(l.state,u,m)});t.preventDefault();var a=p&&!d?1:0;t.preventDefault=function(){a--<=0&&n.cancel(i)}}})}}}function R(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,r,i){function o(){a()?r.addClass(l):r.removeClass(l)}function a(){for(var e=0;ei;i++){a=s[i];var f=this.params[a],d=r[i+1];for(o=0;oi;i++)a=s[i],c[a]=this.params[a].value(t[a]);return c},m.prototype.parameters=function(e){return D(e)?this.params[e]||null:this.$$paramNames},m.prototype.validates=function(e){return this.params.$$validates(e)},m.prototype.format=function(e){function t(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})}e=e||{};var n=this.segments,r=this.parameters(),i=this.params;if(!this.validates(e))return null;var o,a=!1,s=n.length-1,l=r.length,u=n[0];for(o=0;l>o;o++){var c=s>o,f=r[o],d=i[f],p=d.value(e[f]),g=d.isOptional&&d.type.equals(d.value(),p),v=g?d.squash:!1,m=d.type.encode(p);if(c){var y=n[o+1];if(v===!1)null!=m&&(u+=F(m)?h(m,t).join("-"):encodeURIComponent(m)),u+=y;else if(v===!0){var b=u.match(/\/$/)?/\/?(.*)/:/(.*)/;u+=y.match(b)[1]}else L(v)&&(u+=v+y)}else{if(null==m||g&&v!==!1)continue;F(m)||(m=[m]),m=h(m,encodeURIComponent).join("&"+f+"="),u+=(a?"&":"?")+(f+"="+m),a=!0}}return u},y.prototype.is=function(e,t){return!0},y.prototype.encode=function(e,t){return e},y.prototype.decode=function(e,t){return e},y.prototype.equals=function(e,t){return e==t},y.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},y.prototype.pattern=/.*/,y.prototype.toString=function(){return"{Type:"+this.name+"}"},y.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},y.prototype.$asArray=function(e,t){function r(e,t){function r(e,t){return function(){return e[t].apply(e,arguments)}}function i(e){return F(e)?e:D(e)?[e]:[]}function o(e){switch(e.length){case 0:return n;case 1:return"auto"===t?e[0]:e;default:return e}}function a(e){return!e}function s(e,t){return function(n){n=i(n);var r=h(n,e);return t===!0?0===p(r,a).length:o(r)}}function l(e){return function(t,n){var r=i(t),o=i(n);if(r.length!==o.length)return!1;for(var a=0;ar;r++)e[r]=this.fillReferencesValuesFromEntry(e[r],t,n);return e}},{key:"fillReferencesValuesFromEntry",value:function(e,t,n){for(var r in t){var i=t[r],o=this.getReferenceChoicesById(i),a=[],s=i.getMappedValue(e.values[r],e.values);if("reference_many"===i.type()){for(var l in s){var u=s[l];a.push(o[u])}e.listValues[r]=a}else n&&s&&s in o&&(e.listValues[r]=i.getMappedValue(o[s],e.values))}return e}},{key:"getReferenceChoicesById",value:function(e){for(var t={},n=e.targetField().name(),r=e.targetEntity().identifier().name(),i=this.getEntries(e.targetEntity().uniqueId+"_values"),o=0,a=i.length;a>o;o++){var s=i[o];t[s.values[r]]=s.values[n]}return t}}]),e}();t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt;t++){var r=this._targetFields[t];e.push({field:r,label:r.label()})}return e}},{key:"getSortFieldName",value:function(){return this.sortField()?this._targetEntity.name()+"_ListView."+this.sortField():null}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n':this._icon}}]),t}(u["default"]);t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;s=u=l=void 0,r=!1;var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;return void 0===l?void 0:l.call(a)}var u=Object.getPrototypeOf(i);if(null===u)return void 0;e=u,t=o,n=a,r=!0}},s=n(2),l=r(s),u=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._type="ShowView"}return o(t,e),t}(l["default"]);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";n(122),n(47);var r=n(21),i=angular.module("AdminDescriptionModule",[]);i.constant("AdminDescription",new r);var o=angular.module("ng-admin",["main","crud","AdminDescriptionModule"]);o.config(["NgAdminConfigurationProvider","AdminDescription",function(e,t){e.setAdminDescription(t)}])},function(e,t,n){"use strict";var r=n(4),i=r.module("crud",["ui.router","ui.bootstrap","ngSanitize","textAngular","ngInflection","ui.codemirror","angularFileUpload","ngNumeraljs"]);i.controller("ListController",n(104)),i.controller("ShowController",n(120)),i.controller("FormController",n(101)),i.controller("DeleteController",n(70)),i.controller("BatchDeleteController",n(69)),i.service("EntryFormatter",n(112)),i.service("PromisesResolver",n(113)),i.service("ReadQueries",n(117)),i.service("WriteQueries",n(118)),i.service("RestWrapper",n(114)),i.directive("maJsonValidator",n(121)),i.directive("maField",n(76)),i.directive("maButtonField",n(71)),i.directive("maChoiceField",n(73)),i.directive("maChoicesField",n(74)),i.directive("maDateField",n(75)),i.directive("maInputField",n(78)),i.directive("maJsonField",n(79)),i.directive("maFileField",n(77)),i.directive("maCheckboxField",n(72)),i.directive("maTextField",n(81)),i.directive("maWysiwygField",n(82)),i.directive("maTemplateField",n(80)),i.provider("FieldViewConfiguration",n(87)),i.directive("listActions",n(103)),i.directive("maDatagrid",n(105)),i.directive("maDatagridPagination",n(109)),i.directive("maDatagridInfinitePagination",n(106)),i.directive("maDatagridItemSelector",n(107)),i.directive("maDatagridMultiSelector",n(108)),i.directive("maFilter",n(99)),i.directive("maColumn",n(59)),i.directive("maBooleanColumn",n(57)),i.directive("maChoicesColumn",n(58)),i.directive("maDateColumn",n(60)),i.directive("maJsonColumn",n(61)),i.directive("maNumberColumn",n(62)),i.directive("maReferenceManyColumn",n(63)),i.directive("maReferenceManyLinkColumn",n(64)),i.directive("maStringColumn",n(65)),i.directive("maTemplateColumn",n(66)),i.directive("maWysiwygColumn",n(67)),i.directive("maBackButton",n(48)),i.directive("maCreateButton",n(50)),i.directive("maEditButton",n(52)),i.directive("maFilteredListButton",n(54)),i.directive("maShowButton",n(56)),i.directive("maListButton",n(55)),i.directive("maDeleteButton",n(51)),i.directive("maBatchDeleteButton",n(49)),i.directive("maExportToCsvButton",n(53)),i.directive("maViewActions",n(115)),i.directive("maViewBatchActions",n(116)),i.directive("compile",n(111)),i.config(n(119)),i.config(n(68)),i.factory("Papa",function(){return n(163)}),i.factory("notification",function(){var e=n(159);return e.timeout=5e3,e.clickToClose=!0,e}),i.factory("progression",function(){return n(162)}),e.exports=i},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{size:"@",label:"@"},link:function(t){t.label=t.label||"Back",t.back=function(){e.history.back()}},template:' {{ ::label }}'}}return e.$inject=["$window"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",selection:"&",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoBatchDelete=function(){var n=(t.entity(),t.selection().map(function(e){return e.identifierValue}));e.go("batchDelete",angular.extend({ids:n,entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Create",t.gotoCreate=function(){e.go(e.get("create"),angular.extend({entity:t.entity().name()},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Delete",t.gotoDelete=function(){e.go(e.get("delete"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Edit",t.gotoEdit=function(){e.go(e.get("edit"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r,i){return{restrict:"E",scope:{entity:"&",label:"@",datastore:"&",search:"&"},template:'',link:function(o){o.label=o.label||"Export",o.datastore=o.datastore(),o.entity=o.entity();var a=o.entity.exportView(),s=o.entity.listView();if(0===a.fields().length){var l=s.exportFields();null===l&&(l=s.fields()),a.fields(l),a.filters(s.filters())}o.has_export=a.fields().length>0;var u=r.getFormatter(a.fields());o.exportToCsv=function(){var r,s,l;i.getAll(a,-1,o.search(),e.sortField,e.sortDir).then(function(e){return r=e.data},function(e){n.log(e.message,{addnCls:"humane-flatty-error"})}).then(function(e){return i.getFilteredReferenceData(a.getNonOptimizedReferences(),e)}).then(function(e){return s=e,i.getOptimizedReferencedData(a.getOptimizedReferences(),r)}).then(function(e){l=e;var t,n=a.getReferences(),r=angular.extend(s,l);for(var i in r)t=o.datastore.mapEntries(n[i].targetEntity().name(),n[i].targetEntity().identifier(),[n[i].targetField()],r[i]),o.datastore.setEntries(n[i].targetEntity().uniqueId+"_values",t)}).then(function(){var e=o.datastore.mapEntries(a.entity.name(),a.identifier(),a.getFields(),r);o.datastore.fillReferencesValuesFromCollection(e,a.getReferences(),!0);for(var n=[],i=e.length-1;i>=0;i--)n[i]=u(e[i]);var s=t.unparse(n),l=document.createElement("a");document.body.appendChild(l),l.setAttribute("href","data:application/octet-stream;charset=utf-8,"+encodeURIComponent(s)),l.setAttribute("download",o.entity.name()+".csv"),l.click()})}}}}return e.$inject=["$stateParams","Papa","notification","EntryFormatter","ReadQueries"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entityName:"@",filter:"&",label:"@",size:"@"},link:function(t){t.label=t.label||"See all related "+t.entityName,t.gotoList=function(){e.go(e.get("list"),{entity:t.entityName,search:t.filter()})}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"List";var n=t.$parent.entity?t.$parent.entity.name():null,r=t.entity().name(),i={entity:r};r===n&&angular.extend(i,e.params),t.gotoList=function(){e.go(e.get("list"),i)}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return{restrict:"E",scope:{entity:"&",entry:"&",size:"@",label:"@"},link:function(t){t.label=t.label||"Show",t.gotoShow=function(){e.go(e.get("show"),angular.extend({entity:t.entity().name(),id:t.entry().identifierValue},e.params))}},template:' {{ ::label }}'}}return e.$inject=["$state"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},link:function(e){e.isOk=!!e.value()},template:""}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n,r,i){function o(e){if(e.isDetailLink()===!1)return!1;if("reference"!=e.type()&&"reference_many"!=e.type())return!0;var t=e.targetEntity().name(),n=r().getEntity(t);return n?n.isReadOnly?n.showView().enabled:n.editionView().enabled:!1}return{restrict:"E",scope:{field:"&",entry:"&",entity:"&",datastore:"&"},link:function(a,s,l){a.datastore=a.datastore(),a.field=a.field(),a.entry=a.entry();var u=a.field.type();o(a.field)?s.append(i[u].getLinkWidget()):s.append(i[u].getReadWidget()),n(s.contents())(a),a.gotoDetail=function(){this.clearRouteParams();var n=a.field.detailLinkRoute();"edit"!=n||a.entity().editionView().enabled||(n="show"),e.path("/"+a.entry.entityName+"/"+n+"/"+a.entry.identifierValue),t(0)},a.gotoReference=function(){this.clearRouteParams();var t=a.field.targetEntity().name(),n=r().getEntity(t),i=a.entry.values[a.field.name()],o=n.isReadOnly?"show":a.field.detailLinkRoute();e.path("/"+t+"/"+o+"/"+i)},a.clearRouteParams=function(){e.search("q",null),e.search("page",null),e.search("sortField",null),e.search("sortDir",null)}}}}return t.$inject=["$location","$anchorScroll","$compile","NgAdminConfiguration","FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | date:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&"},link:function(t,n){t.guessType=function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t?"Object":"[object Array]"===t?"Array":"Literal"};var r='
{{ val }}
{{ key }}{{ val }}
',i=angular.element(r);e(i)(t),n.replaceWith(i)}}}return t.$inject=["$compile"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&",field:"&"},template:"{{ value() | numeraljs:field().format() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{values:"&"},template:'{{ ref }}'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{restrict:"E",scope:{field:"&",values:"&",ids:"&"},link:function(n){n.field=n.field(),n.values=n.values(),n.ids=n.ids();var r=n.field.targetEntity().name(),i=t().getEntity(r);n.gotoReference=function(t){var n=i.isReadOnly?"show":"edit";e.path("/"+r+"/"+n+"/"+t)}},template:'{{ ref }}'}}return t.$inject=["$location","NgAdminConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{value:"&"},template:"{{ value() }}"}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){return{restrict:"E",scope:{value:"&",field:"&"},link:function(t){var n=t.value();t.field().stripTags()&&(n=e("stripTags")(n)),t.htmlValue=n},template:''}}return t.$inject=["$filter"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){e.registerFieldView("boolean",n(83)),e.registerFieldView("choice",n(84)),e.registerFieldView("choices",n(85)),e.registerFieldView("date",n(16)),e.registerFieldView("datetime",n(16)),e.registerFieldView("email",n(86)),e.registerFieldView("file",n(88)),e.registerFieldView("json",n(89)),e.registerFieldView("number",n(90)),e.registerFieldView("password",n(91)),e.registerFieldView("referenced_list",n(94)),e.registerFieldView("reference",n(92)),e.registerFieldView("reference_many",n(93)),e.registerFieldView("string",n(95)),e.registerFieldView("template",n(96)),e.registerFieldView("text",n(97)),e.registerFieldView("wysiwyg",n(98))}r.$inject=["FieldViewConfigurationProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i){this.$scope=e,this.$state=t,this.WriteQueries=n,this.notification=r,this.view=i,this.entity=i.getEntity(),this.entityIds=t.params.ids,this.selection=[],this.title=i.title(),this.description=i.description(),this.actions=i.actions(),this.loadingPage=!1,this.fields=i.fields(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.batchDelete=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.batchDelete(this.view,this.entityIds).then(function(){t.go(t.get("list"),angular.extend({entity:n},t.params)),e.log("Elements successfully deleted.",{addnCls:"humane-flatty-success"})},function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){this.$state.go(this.$state.get("list"),angular.extend({entity:this.entity().name()},this.$state.params))},e.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0},e.$inject=["$scope","$state","WriteQueries","notification","view"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r,i,o,a){this.$scope=e,this.$state=t,this.WriteQueries=n,this.entityLabel=i.entity,this.entityId=i.id,this.view=o,this.title=o.title(),this.description=o.description(),this.actions=o.actions(),this.entity=o.getEntity(),this.notification=r,this.$scope.entry=a,this.$scope.view=o,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.deleteOne=function(){var e=this.notification,t=this.$state,n=this.entity.name();this.WriteQueries.deleteOne(this.view,this.entityId).then(function(){t.go(t.get("list"),angular.extend({entity:n,id:this.entityId},t.params)),e.log("Element successfully deleted.",{addnCls:"humane-flatty-success"})}.bind(this),function(t){var n=t.data;"object"==typeof n&&(n=JSON.stringify(n)),e.log("Oops, an error occured : (code: "+t.status+") "+n,{addnCls:"humane-flatty-error"})})},e.prototype.back=function(){var e=this.$state;e.go(e.get("edit"),angular.extend({entity:this.entity.name(),id:this.entityId},e.params))},e.prototype.destroy=function(){this.$scope=void 0,this.WriteQueries=void 0,this.$state=void 0,this.view=void 0,this.entity=void 0},e.$inject=["$scope","$state","WriteQueries","notification","params","view","entry"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.label=n.label(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.toggle=function(){this.value=!this.value},e.isActive=function(){return!!this.value}},template:'{{ label }}'}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.value=!!e.value;var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"=",entry:"=?",datastore:"&?"},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r;r="reference"===n.type()||"reference_many"===n.type()?e.datastore().getChoices(n):n.choices(),e.getChoices="function"==typeof r?r:function(){return r};var i=t.children()[0],o=n.attributes();for(var a in o)i[a]=o[a]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.rawValue=e.value,e.$watch("rawValue",function(t){e.value=n.parse()(t)}),e.format=n.format(),e.v=n.validation(),e.isOpen=!1;var r=t.find("input").eq(0),i=n.attributes();for(var o in i)r.attr(o,i[o]);e.toggleDatePicker=function(t){t.preventDefault(),t.stopPropagation(),e.isOpen=!e.isOpen}},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=r(e).map(function(e,t){return''+e.getWriteWidget()+""}).join(""),n='
'+t+'

';return{restrict:"E",scope:{field:"&",entry:"=",entity:"&",form:"&",datastore:"&"},link:function(e){e.field=e.field(),e.type=e.field.type(),e.entity=e.entity(),e.form=e.form(),e.datastore=e.datastore(),e.getClassesForField=function(e,t){return"ng-admin-field-"+e.name()+" "+(e.getCssClasses(t)||"col-sm-10 col-md-8 col-lg-7")},e.getInputForField=function(t){return e.form[t.name()]},e.fieldHasValidation=function(e){var t=this.getInputForField(e);return t&&t.$dirty},e.fieldIsValid=function(e){var t=this.getInputForField(e);return t&&t.$valid},e.getFieldValidationClass=function(e){return this.fieldHasValidation(e)?this.fieldIsValid(e)?"has-success":"has-error":void 0}},template:n}}var r=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return{scope:{field:"&",value:"="},restrict:"E",link:{pre:function(e){var t=e.field().uploadInformation();if(!t.hasOwnProperty("url"))throw new Error("You must provide a URL property to allow the upload of files.");e.multiple=t.hasOwnProperty("multiple")?t.multiple:!1,e.accept=t.hasOwnProperty("accept")?t.accept:"*",e.apifilename=t.hasOwnProperty("apifilename")?t.apifilename:!1;var n=e.value?e.value.split(","):[];e.files={};for(var r in n)e.files[n[r]]={name:n[r],progress:0}},post:function(n,r){var i=n.field();n.name=i.name(),n.v=i.validation(),n.value&&(n.v.required=!1);var o=r.find("input")[0],a=i.attributes();for(var s in a)o[s]=a[s];n.fileSelected=function(t){if(t){var r;n.files={};for(var i in t)r=angular.copy(n.field().uploadInformation()),r.file=t[i],e.upload(r).progress(function(e){n.files[e.config.file.name]={name:e.config.file.name,progress:Math.min(100,parseInt(100*e.loaded/e.total))}}).success(function(e,t,r,i){if(n.files[i.file.name]={name:n.apifilename?e[n.apifilename]:i.file.name,progress:0},n.apifilename){var o=Object.keys(n.files).map(function(e){return n.files[e].name});n.value=o.join(",")}else n.value=Object.keys(n.files).join(",")}).error(function(e,t,r,i){delete n.files[i.file.name],n.value=Object.keys(n.files).join(",")})}},n.selectFile=function(){t(function(){o.click()},0)}}},template:'
{{ file.progress }}% Complete
{{ file.name }}
'}}return t.$inject=["$upload","$timeout"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{type:"@",field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){(function(t){"use strict";function r(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation(),e.jsonValue=null===e.value?"":angular.toJson(e.value,!0);var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o];e.$watch("jsonValue",function(t){if(""==t||"undefined"==typeof t)return void(e.value=null);try{var n=angular.fromJson(t);e.value=n}catch(r){}})},template:''}}var i=n(3);t.jsonlint=n(160),n(153),n(154),n(156),n(155),n(157),n(158),i.defineOption("matchBrackets",!0),i.defineOption("autoCloseBrackets",!0),i.defineOption("lineWrapping",!0),i.defineOption("tabSize",2),i.defineOption("mode","application/json"),i.defineOption("gutters",["CodeMirror-lint-markers"]),i.defineOption("lint",!0),i.defineOption("styleActiveLine",!0),t.CodeMirror=i,r.$inject=[],e.exports=r}).call(t,function(){return this}())},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{field:"&",entry:"&",entity:"&"},link:function(e){e.field=e.field(),e.entry=e.entry(),e.entity=e.entity()},template:''}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name(),e.v=n.validation();var r=t.children()[0],i=n.attributes();for(var o in i)r[o]=i[o]},template:'' +}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{scope:{field:"&",value:"="},restrict:"E",link:function(e,t){var n=e.field();e.name=n.name()},template:'
'}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){this.fieldViews={}}return e.prototype.registerFieldView=function(e,t){this.fieldViews[e]=t},e.prototype.$get=function(){return this.fieldViews},e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display file field as readable"}function n(){return"error: cannot display file field as linkable"}function r(){return"error: cannot display file field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display a json field as linkable"}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return"error: cannot display password field as readable"}function n(){return"error: cannot display password field as linkable"}function r(){return"error: cannot display password field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return"error: cannot display referenced_list field as linkable"}function r(){return"error: cannot display referenced_list field as filter"}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return''}function n(){return''+t()+""}function r(){return''}function i(){return''}return{getReadWidget:t,getLinkWidget:n,getFilterWidget:r,getWriteWidget:i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(){return''}function i(){return''+r()+""}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){"use strict";function r(){return''}function i(){return"error: cannot display wysiwyg field as linkable"}function o(){return''}function a(){return''}e.exports={getReadWidget:r,getLinkWidget:i,getFilterWidget:o,getWriteWidget:a}},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=i(e).map(function(e,t){return''+e.getFilterWidget()+""}).join(""),n='';return{restrict:"E",template:n,scope:{filters:"&",datastore:"&"},controllerAs:"filterCtrl",controller:r}}var r=n(100),i=n(17);return t.$inject=["FieldViewConfiguration"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,n,r){this.$scope=e,this.$state=n,this.$stateParams=r,this.$scope.values=this.$stateParams.search||{},this.$scope.filters=this.$scope.filters(),this.$scope.datastore=this.$scope.datastore(),this.isFilterEmpty=t(this.$scope.values)}function t(e){for(var t in e)if(""!=e[t])return!1;return!0}return e.prototype.filter=function(){var e,t,n,r={},i=this.$scope.filters;for(n in i)t=i[n],e=t.name(),this.$scope.values[e]&&(r[e]=this.$scope.values[e]);this.$stateParams.search=r,this.$stateParams.page=1,this.$state.go(this.$state.current,this.$stateParams,{reload:!0,inherit:!1,notify:!0})},e.prototype.shouldFilter=function(){return Object.keys(this.$scope.filters).length},e.prototype.clearFilters=function(){var e;for(e in this.$scope.values)this.$scope.values[e]=null;this.filter()},e.prototype.destroy=function(){this.$scope=void 0},e.$inject=["$scope","$state","$stateParams"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){this.$scope=e,this.$state=t,this.WriteQueries=n,this.dataStore=s,this.progression=i,this.notification=o,this.title=a.title(),this.description=a.description(),this.actions=a.actions(),this.fields=a.fields(),this.config=r(),this.view=a,this.entity=this.view.getEntity(),this.$scope.entry=s.getFirstEntry(this.entity.uniqueId),this.$scope.view=a,this.$scope.entity=this.entity,this.originEntityId=this.$scope.entry.values[this.entity.identifier().name()],e.$on("$destroy",this.destroy.bind(this))};r.prototype.validateEntry=function(){var e,t,n,r,i=this.form,o=this.$scope.entry,a=this.view.getFields(),s=this.entity.identifier(),l={};if(!i.$valid)return this.notification.log("invalid form",{addnCls:"humane-flatty-error"}),!1;l[s.name()]=o.identifierValue;for(r in a)n=a[r],e=o.values[n.name()],l[n.name()]=e;t=this.dataStore.mapEntry(this.view.entity.name(),this.view.identifier(),this.view.getFields(),l);try{this.view.validate(t)}catch(u){return this.notification.log(u,{addnCls:"humane-flatty-error"}),!1}return l},r.prototype.submitCreation=function(e){e.preventDefault();var t=this.validateEntry(),n=this.entity,r=n.editionView().enabled?"edit":"show";if(t){var i=this.progression,o=this.notification,a=this.$state;i.start(),this.WriteQueries.createOne(this.view,t).then(function(e){var t=this.dataStore.mapEntry(n.name(),this.view.identifier(),this.view.getFields(),e);i.done(),o.log("Element successfully created.",{addnCls:"humane-flatty-success"}),a.go(a.get(r),{entity:n.name(),id:t.identifierValue})}.bind(this),this.handleError.bind(this))}},r.prototype.submitEdition=function(e){e.preventDefault();var t=this.validateEntry();if(t){var n=this.progression,r=this.notification;n.start(),this.WriteQueries.updateOne(this.view,t,this.originEntityId).then(function(){n.done(),r.log("Changes successfully saved.",{addnCls:"humane-flatty-success"})},this.handleError.bind(this))}},r.prototype.handleError=function(e){var t=this.config.getErrorMessageFor(this.view,e);this.progression.done(),this.notification.log(t,{addnCls:"humane-flatty-error"})},r.prototype.destroy=function(){this.$scope=void 0,this.$state=void 0,this.WriteQueries=void 0,this.dataStore=void 0,this.view=void 0,this.entity=void 0},r.$inject=["$scope","$state","WriteQueries","NgAdminConfiguration","progression","notification","view","dataStore"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.entity=e.entity(),this.$scope=e,this.$location=t,this.$anchorScroll=n,this.filters={},this.shouldDisplayActions=this.$scope.listActions()&&this.$scope.listActions().length>0,e.toggleSelect=this.toggleSelect.bind(this),e.toggleSelectAll=this.toggleSelectAll.bind(this),this.$scope.gotoDetail=this.gotoDetail.bind(this);var r=this.$location.search();this.sortField="sortField"in r?r.sortField:this.$scope.sortField,this.sortDir="sortDir"in r?r.sortDir:this.$scope.sortDir}return e.prototype.gotoDetail=function(e){this.clearRouteParams();var t=this.$scope.entity,n=t.editionView().enabled?"edit":"show";this.$location.path("/"+e.entityName+"/"+n+"/"+e.identifierValue),this.$anchorScroll(0)},e.prototype.clearRouteParams=function(){this.$location.search("q",null),this.$location.search("page",null),this.$location.search("sortField",null),this.$location.search("sortDir",null)},e.prototype.isSorting=function(e){return this.sortField===this.getSortName(e)},e.prototype.itemClass=function(e){return e%2===0?"even":"odd"},e.prototype.sort=function(e){var t="ASC",n=this.getSortName(e);this.sortField===n&&(t="ASC"===this.sortDir?"DESC":"ASC"),this.$location.search("sortField",n),this.$location.search("sortDir",t)},e.prototype.getSortName=function(e){return this.$scope.name+"."+e.name()},e.prototype.toggleSelect=function(e){var t=this.$scope.selection.slice(),n=t.indexOf(e);return-1===n?void(this.$scope.selection=t.concat(e)):(t.splice(n,1),void(this.$scope.selection=t))},e.prototype.toggleSelectAll=function(){return this.$scope.selection.length0,this.dataStore=s,this.fields=a.fields(),this.listActions=a.listActions(),this.totalItems=l,this.page=t.page||1,this.infinitePagination=this.view.infinitePagination(),this.nextPageCallback=this.nextPage.bind(this),this.setPageCallback=this.setPage.bind(this),this.selection=this.batchActions.length?[]:null,this.sortField=this.$stateParams.sortField||this.view.getSortFieldName(),this.sortDir=this.$stateParams.sortDir||this.view.sortDir(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.nextPage=function(e){if(!this.loadingPage){var t=this.progression,n=this;t.start(),this.ReadQueries.getAll(this.view,e,this.search,this.sortField,this.sortDir).then(function(e){t.done();var r=n.view.getReferences();n.dataStore.mapEntries(n.entity.name(),n.view.identifier(),n.fields,e.data).map(function(e){n.dataStore.fillReferencesValuesFromEntry(e,r,!0),n.dataStore.addEntry(n.entity.uniqueId,e)}),n.loadingPage=!1})}},e.prototype.setPage=function(e){this.$location.search("page",e),this.$anchorScroll(0)},e.prototype.destroy=function(){this.$scope=void 0,this.$stateParams=void 0,this.$location=void 0,this.$anchorScroll=void 0,this.dataStore=void 0},e.$inject=["$scope","$stateParams","$location","$anchorScroll","ReadQueries","progression","view","dataStore","totalItems"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",template:r,scope:{name:"@",entries:"=",selection:"=",fields:"&",listActions:"&",entity:"&",sortField:"=",sortDir:"="},controllerAs:"datagrid",controller:i}}var r=n(140),i=n(102);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t){var n=r.element(e),i=100,o=t[0].body;return{restrict:"E",scope:{perPage:"@",totalItems:"@",nextPage:"&"},link:function(t){function r(){if(o.offsetHeight-e.innerHeight-e.scrollY=l)return;u++,t.nextPage()(u)}}var a=parseInt(t.perPage,10)||1,s=parseInt(t.totalItems,10),l=Math.ceil(s/a)||1,u=1;n.bind("scroll",r),t.$on("$destroy",function(){n.unbind("scroll",r)})}}}var r=n(4);return t.$inject=["$window","$document"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entry:"=",selection:"=",toggleSelect:"&"},template:'',link:function(e){e.toggle=function(t){e.toggleSelect({entry:t})}}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return{restrict:"E",scope:{entries:"=",selection:"=",toggleSelectAll:"&"},template:'',link:function(e,t){e.$watch("selection",function(n){t.children()[0].indeterminate=n.length>0&&n.length!=e.entries.length}),e.$watch("entries",function(n){t.children()[0].indeterminate=e.selection.length>0&&e.selection.length!=n.length})}}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{restrict:"E",scope:{page:"@",perPage:"@",totalItems:"@",setPage:"&"},template:r,controllerAs:"paginationCtrl",controller:i}}var r=n(143),i=n(110);return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){this.$scope=e;var t=parseInt(this.$scope.perPage,10)||1,n=parseInt(this.$scope.totalItems,10),r=Math.max(parseInt(this.$scope.page,10),1);this.nbPages=Math.ceil(n/t)||1,this.page=Math.min(this.nbPages,r),this.offsetEnd=Math.min(this.page*t,n),this.offsetBegin=Math.min((this.page-1)*t+1,this.offsetEnd),this.totalItems=n,this.displayPagination=n>t,e.$on("$destroy",this.destroy.bind(this))}n(4);return t.prototype.range=function(e){var t=[],n=this.nbPages;return e>2&&t.push("1"),4==e&&t.push("2"),e>4&&t.push("."),e>1&&t.push(e-1),t.push(e),n>e&&t.push(e+1),e==n-3&&t.push(n-1),n-3>e&&t.push("."),n-1>e&&t.push(n),t},t.prototype.setPage=function(e){0>=e||e>this.nbPages||this.$scope.setPage()(e)},t.prototype.destroy=function(){this.$scope=void 0},t.$inject=["$scope"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){var t=e.get("$compile");return{transclude:!0,link:function(e,n,r,i,o){var a=e.$watch(function(e){return e.$eval(r.compile)},function(i){return!1===i?void o(e,function(e){n.append(e)}):(n.html(i),t(n.contents())(e),void("true"==r.compileOnce&&a()))})}}}return e.$inject=["$injector"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.formatDate=function(t){return function(n){return e("date")(n,t)}}}return e.prototype.formatField=function(e){var t=e.label()||e.name();switch(e.type()){case"boolean":case"choice":case"choices":case"number":case"string":case"text":case"wysiwyg":case"email":case"json":case"file":case"template":return function(n){return{name:t,value:n.values[e.name()]}};case"date":var n=this.formatDate(e.format());return function(r){return{name:t,value:n(r.values[e.name()])}};case"reference":return function(n){return{name:t,value:n.listValues[e.name()]}};case"referenced_list":return}},e.prototype.getFormatter=function(e){var t=e.map(this.formatField.bind(this));return function(e){var n={};return t.map(function(t){return t?t(e):void 0}).forEach(function(e){e&&(n[e.name]=e.value)}),n}},e.$inject=["$filter"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){return e.getPromisesResolver()}return e.$inject=["AdminDescription"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e){this.Restangular=e,e.setFullResponse(!0)}return e.prototype.getOne=function(e,t){return this.Restangular.oneUrl(e,t).get().then(function(e){return e.data})},e.prototype.getList=function(e,t,n){return this.Restangular.allUrl(t,n).getList(e)},e.prototype.createOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPOST(e).then(function(e){return e.data})},e.prototype.updateOne=function(e,t,n){return this.Restangular.oneUrl(t,n).customPUT(e).then(function(e){return e.data})},e.prototype.deleteOne=function(e,t){return this.Restangular.oneUrl(e,t).customDELETE()},e.$inject=["Restangular"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){var t=e.get("$compile");return{restrict:"E",transclude:!0,scope:{override:"&",entry:"=",entity:"=",selection:"=",batchButtons:"&",datastore:"=",search:"="},template:r,link:function(e,n,r,i,o){var a=e.override();return a?"string"==typeof a?(n.html(a),void t(n.contents())(e)):void(e.buttons=a):void o(e,function(e){n.append(e)})}}}var r=n(144);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e){e.get("$compile");return{restrict:"E",scope:{entity:"=",selection:"=",buttons:"&"},template:r,link:function(e){e.isopen=!1,e.toggleDropdown=function(t){t.preventDefault(),t.stopPropagation(),e.isopen=!e.isopen},e.buttons=e.buttons(),"string"==typeof e.buttons&&(e.customTemplate=e.buttons,e.buttons=null)}}}var r=n(145);return t.$inject=["$injector"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getReadQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n,r){return n.getWriteQueries(e,r,t())}return e.$inject=["RestWrapper","NgAdminConfiguration","AdminDescription","PromisesResolver"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){return["$stateParams","NgAdminConfiguration",function(n,r){var i,o=r().getViewByEntityAndType(n.entity,e);return(i=o.template())?i:(i=r().customTemplate()(e),i?i:t)}]}function i(e){return["$stateParams","NgAdminConfiguration",function(t,n){var r;try{r=n().getViewByEntityAndType(t.entity,e)}catch(i){var o=new Error("Unknown view or entity name");throw o.status=404,o}if(!r.enabled)throw new Error("The "+e+" is disabled for this entity");return r}]}function o(){return["AdminDescription",function(e){return e.getDataStore()}]}function a(e){e.state("list",{parent:"main",url:"/:entity/list?{search:json}&page&sortField&sortDir",params:{entity:null,page:null,search:null,sortField:null,sortDir:null},controller:"ListController",controllerAs:"listController",templateProvider:r("ListView",s),resolve:{dataStore:o(),view:i("ListView"),response:["$stateParams","ReadQueries","view",function(e,t,n){var r=e.page,i=e.search,o=e.sortField,a=e.sortDir;return t.getAll(n,r,i,o,a)}],totalItems:["response",function(e){return e.totalItems}],nonOptimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),n.data)}],optimizedReferencedData:["ReadQueries","view","response",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),n.data)}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],entries:["dataStore","view","response","referencedEntries",function(e,t,n,r){var i=e.mapEntries(t.entity.name(),t.identifier(),t.getFields(),n.data);return e.fillReferencesValuesFromCollection(i,t.getReferences(),!0),e.setEntries(t.getEntity().uniqueId,i),!0}],filterData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getFilterReferences())}],filterEntries:["dataStore","view","filterData",function(e,t,n){var r,i=t.getFilterReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("show",{parent:"main",url:"/:entity/show/:id?sortField&sortDir",controller:"ShowController",controllerAs:"showController",templateProvider:r("ShowView",l),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("ShowView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}]}}),e.state("create",{parent:"main",url:"/:entity/create",controller:"FormController",controllerAs:"formController",templateProvider:r("CreateView",u),params:{page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("CreateView"),entry:["dataStore","view",function(e,t){var n=e.createEntry(t.entity.name(),t.identifier(),t.getFields());return e.addEntry(t.getEntity().uniqueId,n),n}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("edit",{parent:"main",url:"/:entity/edit/:id?sortField&sortDir",controller:"FormController",controllerAs:"formController",templateProvider:r("EditView",c),params:{entity:null,id:null,page:null,search:null,sortField:null,sortDir:null},resolve:{dataStore:o(),view:i("EditView"),rawEntry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}],entry:["dataStore","view","rawEntry",function(e,t,n){return e.mapEntry(t.entity.name(),t.identifier(),t.getFields(),n)}],nonOptimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getFilteredReferenceData(t.getNonOptimizedReferences(),[n.values])}],optimizedReferencedData:["ReadQueries","view","entry",function(e,t,n){return e.getOptimizedReferencedData(t.getOptimizedReferences(),[n.values])}],referencedEntries:["dataStore","view","nonOptimizedReferencedData","optimizedReferencedData",function(e,t,n,r){var i,o=t.getReferences(),a=angular.extend(n,r);for(var s in a)i=e.mapEntries(o[s].targetEntity().name(),o[s].targetEntity().identifier(),[o[s].targetField()],a[s]),e.setEntries(o[s].targetEntity().uniqueId+"_values",i);return!0}],referencedListData:["$stateParams","ReadQueries","view","entry",function(e,t,n,r){var i=n.getReferencedLists(),o=e.sortField,a=e.sortDir;return t.getReferencedListData(i,o,a,r.identifierValue)}],referencedListEntries:["dataStore","view","referencedListData",function(e,t,n){var r,i,o=t.getReferencedLists();for(var a in o)r=o[a],i=n[a],i=e.mapEntries(r.targetEntity().name(),r.targetEntity().identifier(),r.targetFields(),i),e.setEntries(r.targetEntity().uniqueId+"_list",i)}],entryWithReferences:["dataStore","view","entry","referencedEntries",function(e,t,n,r){return e.fillReferencesValuesFromEntry(n,t.getReferences(),!0),e.addEntry(t.getEntity().uniqueId,n),!0}],choiceData:["ReadQueries","view",function(e,t){return e.getAllReferencedData(t.getReferences())}],choiceEntries:["dataStore","view","choiceData",function(e,t,n){var r,i=t.getReferences();for(var o in n)r=e.mapEntries(i[o].targetEntity().name(),i[o].targetEntity().identifier(),[i[o].targetField()],n[o]),e.setEntries(i[o].targetEntity().uniqueId+"_choices",r);return!0}]}}),e.state("delete",{parent:"main",url:"/:entity/delete/:id",controller:"DeleteController",controllerAs:"deleteController",templateProvider:r("DeleteView",f),params:{page:null,search:null,sortField:null,sortDir:null}, +resolve:{view:i("DeleteView"),params:["$stateParams",function(e){return e}],entry:["$stateParams","ReadQueries","view",function(e,t,n){return t.getOne(n.getEntity(),n.type,e.id,n.identifier(),n.getUrl())}]}}),e.state("batchDelete",{parent:"main",url:"/:entity/batch-delete/{ids:json}",controller:"BatchDeleteController",controllerAs:"batchDeleteController",templateProvider:r("BatchDeleteView",d),params:{entity:null,ids:[],page:null,search:null,sortField:null,sortDir:null},resolve:{view:i("BatchDeleteView"),params:["$stateParams",function(e){return e}]}})}var s=n(142),l=n(146),u=n(138),c=n(139),f=n(137),d=n(136);a.$inject=["$stateProvider"],e.exports=a},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n,r){this.$scope=e,this.$location=t,this.title=n.title(),this.description=n.description(),this.actions=n.actions(),this.fields=n.fields(),this.$scope.entry=r.getFirstEntry(n.getEntity().uniqueId),this.$scope.view=n,this.view=n,this.entity=this.view.getEntity(),this.dataStore=r,e.$on("$destroy",this.destroy.bind(this))};return e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.view=void 0,this.entity=void 0,this.dataStore=void 0},e.$inject=["$scope","$location","view","dataStore"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(){return{require:"ngModel",link:function(e,t,n,r){r.$validators.json=function(e){if(r.$isEmpty(e))return!0;try{return angular.fromJson(e),!0}catch(t){return!1}}}}}return t.$inject=[],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";var r=n(4);n(18),n(164);var i=r.module("main",["ui.router","restangular"]);i.controller("AppController",n(123)),i.controller("DashboardController",n(124)),i.service("PanelBuilder",n(130)),i.provider("NgAdminConfiguration",n(129)),i.filter("orderElement",n(127)),i.filter("stripTags",n(128)),i.directive("maDashboardPanel",n(125)),i.directive("maMenuBar",n(126)),i.config(n(131)),i.config(n(132)),i.run(n(133)),i.run(n(134))},function(e,t,n){var r;r=function(){"use strict";var e=function(e,t,n){var r=n();this.$scope=e,this.$location=t,this.menu=r.menu(),this.applicationName=r.title(),this.header=r.header(),e.$on("$destroy",this.destroy.bind(this))};return e.prototype.displayHome=function(){this.$location.path("dashboard")},e.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0},e.$inject=["$scope","$location","NgAdminConfiguration"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(e){"use strict";function t(e,t,n){this.$scope=e,this.$location=t,this.PanelBuilder=n,this.$scope.edit=this.edit.bind(this),this.retrievePanels(),e.$on("$destroy",this.destroy.bind(this))}return t.prototype.retrievePanels=function(){var e=this;this.panels=[],this.PanelBuilder.getPanelsData().then(function(t){e.panels=t})},t.prototype.edit=function(e){this.$location.path(e.entityName+"/edit/"+e.identifierValue)},t.prototype.destroy=function(){this.$scope=void 0,this.$location=void 0,this.PanelBuilder=void 0},t.$inject=["$scope","$location","PanelBuilder"],t}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){return{restrict:"E",scope:{label:"@",viewName:"@",entries:"=",fields:"&",entity:"&",perPage:"=",sortDir:"=",sortField:"="},link:function(t){t.gotoList=function(){e.path(t.entity().name()+"/list")}},template:i}}var i=n(148);r.$inject=["$location"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return{restrict:"E",scope:{menu:"&"},link:function(r,a){function s(){a.html(i),n(a.contents())(r)}r.menu=r.menu(),r.path=e.path();var l=[],u=t.$on("$locationChangeSuccess",function(){r.path=e.path(),s()});t.$on("$destroy",u),r.gotoLink=function(t){if(t.hasChild()){var n;o.forEach(a.find("li"),function(e){var r=o.element(e);r.attr("data-menu-id")==t.uuid&&(n=r)});var i=o.element(n.find("a")[0].getElementsByClassName("arrow")[0]),s=n.find("ul").eq(0);if(-1!==l.indexOf(t)){if(t.isChildActive(r.path))return;l.splice(l.indexOf(t),1),s.addClass("collapsed"),i.removeClass("glyphicon-menu-down"),i.addClass("glyphicon-menu-right")}else l.push(t),s.removeClass("collapsed"),i.removeClass("glyphicon-menu-right"),i.addClass("glyphicon-menu-down")}else t.link()&&(e.search({}),e.path(t.link()))},r.isOpen=function(e){return e.isChildActive(r.path)||-1!==l.indexOf(e)},s()}}}var i=n(151),o=n(4);r.$inject=["$location","$rootScope","$compile","$timeout"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){var t,n=[];for(t in e)n.push(e[t]);return n.sort(function(e,t){return e.order()-t.order()}),n}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(){return function(e){return e.replace(/(<([^>]+)>)/gi,"")}}return e.$inject=[],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e){this.config=null,this.adminDescription=null,this.$compileProvider=e}r.prototype.setAdminDescription=function(e){this.adminDescription=e},r.prototype.configure=function(e){this.config=e,this.$compileProvider.debugInfoEnabled(this.config.debug())},r.prototype.$get=function(){var e=this.config;return function(){return e}},r.prototype.application=function(e,t){return this.adminDescription.application(e,t)},r.prototype.entity=function(e){return this.adminDescription.entity(e)},r.prototype.field=function(e,t){return this.adminDescription.field(e,t)},r.prototype.registerFieldType=function(e,t){return this.adminDescription.registerFieldType(e,t)},r.prototype.menu=function(e){return this.adminDescription.menu(e)},r.$inject=["$compileProvider"],e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){this.$q=e,this.$location=t,this.ReadQueries=n,this.dataStore=i.getDataStore(),this.Configuration=r()}r.prototype.getPanelsData=function(){var e,t,n=this.Configuration.getViewsOfType("DashboardView"),r=this.dataStore,i=[],o=this;for(t in n)e=n[t],i.push(o.ReadQueries.getAll(e,1,{},e.getSortFieldName(),e.sortDir()));return this.$q.all(i).then(function(e){var t,i,o,a,s,l=[];for(t in e)i=e[t],o=n[t],a=o.getEntity(),s=o.fields(),l.push({label:o.title()||o.getEntity().label(),viewName:o.name(),fields:s,entity:a,perPage:o.perPage(),entries:r.mapEntries(a.name(),a.identifier(),s,i.data),sortField:o.getSortFieldName(),sortDir:o.sortDir()});return l})},r.$inject=["$q","$location","ReadQueries","NgAdminConfiguration","AdminDescription"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e){e.useApplyAsync(!0)}return e.$inject=["$httpProvider"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";function r(e,t){e.state("main",{"abstract":!0,controller:"AppController",controllerAs:"appController",templateProvider:["NgAdminConfiguration",function(e){return e().layout()||i}]}),e.state("dashboard",{parent:"main",url:"/dashboard?sortField&sortDir",params:{sortField:null,sortDir:null},controller:"DashboardController",controllerAs:"dashboardController",template:o}),e.state("ma-404",{parent:"main",template:a}),t.when("","/dashboard"),t.otherwise(function(e,t){var n=e.get("$state");return n.go("ma-404"),t.path()})}var i=n(150),o=n(149),a=n(147);r.$inject=["$stateProvider","$urlRouterProvider"],e.exports=r},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeError",function(e,r,i,o,a,s){if(404!=s.status)throw n.log("State change error: "+s.message,{addnCls:"humane-flatty-error"}),s;t.go("ma-404"),e.preventDefault()})}return e.$inject=["$rootScope","$state","notification"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t,n){e.$on("$stateChangeStart",function(){n.start()}),e.$on("$stateChangeSuccess",function(){n.done(),t.scrollTo(0,0)}),e.$on("$stateChangeError",function(){n.done()})}return e.$inject=["$rootScope","$window","progression"],e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='

Are you sure ?

'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
'},function(e,t,n){e.exports='
{{ field.label() }}Actions
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports="
The page you are looking for cannot be found. Take a break before trying again.



\n\n       |\\      _,,,---,,_\n       /,`.-'`'    -.  ;-;;,_\n      |,4-  ) )-,_..;\\ (  `'-'\n     '---''(_/--'  `-'\\_)\n\n    
"},function(e,t,n){e.exports=''},function(e,t,n){e.exports='
'},function(e,t,n){e.exports=''},function(e,t,n){e.exports=''},function(e,t,n){/** + * @license AngularJS v1.3.15 + * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ -!function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n,r,i=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",l=o[1];for(s+=l.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+i;return n0&&t-1 in e}function o(e,t,n){var r,a;if(e)if(_(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(jr(e)||i(e)){var s="object"!=typeof e;for(r=0,a=e.length;a>r;r++)(s||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else if($(e))for(r in e)t.call(n,e[r],r,e);else if("function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);else for(r in e)$r.call(e,r)&&t.call(n,e[r],r,e);return e}function a(e,t,n){for(var r=Object.keys(e).sort(),i=0;ii;++i){var a=t[i];if(w(a)||_(a))for(var s=Object.keys(a),l=0,f=s.length;f>l;l++){var d=s[l],p=a[d];n&&w(p)?(w(e[d])||(e[d]=jr(p)?[]:{}),c(e[d],[p],!0)):e[d]=p}}return u(e,r),e}function f(e){return c(e,Or.call(arguments,1),!1)}function d(e){return c(e,Or.call(arguments,1),!0)}function p(e){return parseInt(e,10)}function h(e,t){return f(Object.create(e),t)}function g(){}function v(e){return e}function m(e){return function(){return e}}function y(e){return"undefined"==typeof e}function b(e){return"undefined"!=typeof e}function w(e){return null!==e&&"object"==typeof e}function $(e){return null!==e&&"object"==typeof e&&!Dr(e)}function x(e){return"string"==typeof e}function C(e){return"number"==typeof e}function E(e){return"[object Date]"===Mr.call(e)}function _(e){return"function"==typeof e}function k(e){return"[object RegExp]"===Mr.call(e)}function S(e){return e&&e.window===e}function T(e){return e&&e.$evalAsync&&e.$watch}function O(e){return"[object File]"===Mr.call(e)}function R(e){return"[object FormData]"===Mr.call(e)}function A(e){return"[object Blob]"===Mr.call(e)}function M(e){return"boolean"==typeof e}function D(e){return e&&_(e.then)}function N(e){return Ir.test(Mr.call(e))}function L(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function P(e){var t,n={},r=e.split(",");for(t=0;t=0&&e.splice(n,1),n}function I(e,t,n,r){function i(e,t,n,r,i){var o=I(t,null,r,i);w(t)&&(r.push(t),i.push(o)),n[e]=o}if(S(e)||T(e))throw Nr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(N(t))throw Nr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t){if(e===t)throw Nr("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],w(e)){var a=n.indexOf(e);if(-1!==a)return r[a];n.push(e),r.push(t)}var s,l;if(jr(e)){t.length=0;for(var c=0;cn;n++)t[n]=e[n]}else if(w(e)){t=t||{};for(var i in e)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(t[i]=e[i])}return t||e}function H(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r,i,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!jr(e)){if(E(e))return E(t)?H(e.getTime(),t.getTime()):!1;if(k(e))return k(t)?e.toString()==t.toString():!1;if(T(e)||T(t)||S(e)||S(t)||jr(t)||E(t)||k(t))return!1;o=ge();for(i in e)if("$"!==i.charAt(0)&&!_(e[i])){if(!H(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!(i in o||"$"===i.charAt(0)||t[i]===n||_(t[i])))return!1;return!0}if(!jr(t))return!1;if((r=e.length)==t.length){for(i=0;r>i;i++)if(!H(e[i],t[i]))return!1;return!0}}return!1}function W(e,t,n){return e.concat(Or.call(t,n))}function B(e,t){return Or.call(e,t||0)}function z(e,t){var n=arguments.length>2?B(arguments,2):[];return!_(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,W(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function U(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?i=n:S(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":T(r)&&(i="$SCOPE"),i}function q(e,t){return"undefined"==typeof e?n:(C(t)||(t=t?2:null),JSON.stringify(e,U,t))}function G(e){return x(e)?JSON.parse(e):e}function K(e,t){var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function Y(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Q(e,t,n){n=n?-1:1;var r=K(t,e.getTimezoneOffset());return Y(e,n*(r-e.getTimezoneOffset()))}function X(e){e=kr(e).clone();try{e.empty()}catch(t){}var n=kr("
").append(e).html();try{return e[0].nodeType===Yr?wr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+wr(t)})}catch(t){return wr(n)}}function J(e){try{return decodeURIComponent(e)}catch(t){}}function Z(e){var t,n,r={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=J(t[0]),b(n))){var i=b(t[1])?J(t[1]):!0;$r.call(r,n)?jr(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function ee(e){var t=[];return o(e,function(e,n){jr(e)?o(e,function(e){t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}):t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}),t.length?t.join("&"):""}function te(e){return ne(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ne(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function re(e,t){var n,r,i=zr.length;for(r=0;i>r;++r)if(n=zr[r]+t,x(n=e.getAttribute(n)))return n;return null}function ie(e,t){var n,r,i={};o(zr,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),o(zr,function(t){var i,o=t+"app";!n&&(i=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(i.strictDi=null!==re(n,"strict-di"),t(n,r?[r]:[],i))}function oe(n,r,i){w(i)||(i={});var a={strictDi:!1};i=f(a,i);var s=function(){if(n=kr(n),n.injector()){var e=n[0]===t?"document":X(n);throw Nr("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(//,">"))}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Qe(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!u.test(e.name)?s():(e.name=e.name.replace(u,""),Lr.resumeBootstrap=function(e){return o(e,function(e){r.push(e)}),s()},void(_(Lr.resumeDeferredBootstrap)&&Lr.resumeDeferredBootstrap()))}function ae(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function se(e){var t=Lr.element(e).injector();if(!t)throw Nr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function le(e,t){return t=t||"_",e.replace(Ur,function(e,n){return(n?t:"")+e.toLowerCase()})}function ue(){var t;if(!qr){var r=Br();Sr=e.jQuery,b(r)&&(Sr=null===r?n:e[r]),Sr&&Sr.fn.on?(kr=Sr,f(Sr.fn,{scope:pi.scope,isolateScope:pi.isolateScope,controller:pi.controller,injector:pi.injector,inheritedData:pi.inheritedData}),t=Sr.cleanData,Sr.cleanData=function(e){var n;if(Fr)Fr=!1;else for(var r,i=0;null!=(r=e[i]);i++)n=Sr._data(r,"events"),n&&n.$destroy&&Sr(r).triggerHandler("$destroy");t(e)}):kr=ke,Lr.element=kr,qr=!0}}function ce(e,t,n){if(!e)throw Nr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function fe(e,t,n){return n&&jr(e)&&(e=e[e.length-1]),ce(_(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function de(e,t){if("hasOwnProperty"===e)throw Nr("badname","hasOwnProperty is not a valid {0} name",t)}function pe(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;a>s;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&_(e)?z(o,e):e}function he(e){var t=e[0],n=e[e.length-1],r=[t];do{if(t=t.nextSibling,!t)break;r.push(t)}while(t!==n);return kr(r)}function ge(){return Object.create(null)}function ve(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||r,t(o,"module",function(){var e={};return function(r,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(r,"module"),o&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r,i){return i||(i=t),function(){return i[r||"push"]([e,n,arguments]),u}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var t=[],i=[],s=[],l=e("$injector","invoke","push",i),u={_invokeQueue:t,_configBlocks:i,_runBlocks:s,requires:o,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:e("$provide","decorator"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),u})}})}function me(e){var t=[];return JSON.stringify(e,function(e,n){if(n=U(e,n),w(n)){if(t.indexOf(n)>=0)return"<>";t.push(n)}return n})}function ye(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?me(e):e}function be(t){f(t,{bootstrap:oe,copy:I,extend:f,merge:d,equals:H,element:kr,forEach:o,injector:Qe,noop:g,bind:z,toJson:q,fromJson:G,identity:v,isUndefined:y,isDefined:b,isString:x,isFunction:_,isObject:w,isNumber:C,isElement:L,isArray:jr,version:Zr,isDate:E,lowercase:wr,uppercase:xr,callbacks:{counter:0},getTestability:se,$$minErr:r,$$csp:Wr,reloadWithDebugInfo:ae}),Tr=ve(e);try{Tr("ngLocale")}catch(n){Tr("ngLocale",[]).provider("$locale",Rt)}Tr("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:vn}),e.provider("$compile",st).directive({a:uo,input:So,textarea:So,form:go,script:ba,select:xa,style:Ea,option:Ca,ngBind:Ro,ngBindHtml:Mo,ngBindTemplate:Ao,ngClass:No,ngClassEven:Po,ngClassOdd:Lo,ngCloak:Fo,ngController:jo,ngForm:vo,ngHide:pa,ngIf:Ho,ngInclude:Wo,ngInit:zo,ngNonBindable:ia,ngPluralize:la,ngRepeat:ua,ngShow:da,ngStyle:ha,ngSwitch:ga,ngSwitchWhen:va,ngSwitchDefault:ma,ngOptions:sa,ngTransclude:ya,ngModel:ta,ngList:Uo,ngChange:Do,pattern:ka,ngPattern:ka,required:_a,ngRequired:_a,minlength:Ta,ngMinlength:Ta,maxlength:Sa,ngMaxlength:Sa,ngValue:Oo,ngModelOptions:ra}).directive({ngInclude:Bo}).directive(co).directive(Io),e.provider({$anchorScroll:Xe,$animate:Ti,$$animateQueue:Si,$$AnimateRunner:ki,$browser:it,$cacheFactory:ot,$controller:dt,$document:pt,$exceptionHandler:ht,$filter:Rn,$interpolate:Tt,$interval:Ot,$http:Et,$httpParamSerializer:vt,$httpParamSerializerJQLike:mt,$httpBackend:kt,$location:zt,$log:Ut,$parse:cn,$rootScope:gn,$q:fn,$$q:dn,$sce:wn,$sceDelegate:bn,$sniffer:$n,$templateCache:at,$templateRequest:xn,$$testability:Cn,$timeout:En,$window:Sn,$$rAF:hn,$$asyncCallback:nt,$$jqLite:Ue,$$HashMap:mi,$$cookieReader:On})}])}function we(){return++ti}function $e(e){return e.replace(ii,function(e,t,n,r){return r?n.toUpperCase():n}).replace(oi,"Moz$1")}function xe(e){return!ui.test(e)}function Ce(e){var t=e.nodeType;return t===Gr||!t||t===Xr}function Ee(e,t){var n,r,i,a,s=t.createDocumentFragment(),l=[];if(xe(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),r=(ci.exec(e)||["",""])[1].toLowerCase(),i=di[r]||di._default,n.innerHTML=i[1]+e.replace(fi,"<$1>")+i[2],a=i[0];a--;)n=n.lastChild;l=W(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function _e(e,n){n=n||t;var r;return(r=li.exec(e))?[n.createElement(r[1])]:(r=Ee(e,n))?r.childNodes:[]}function ke(e){if(e instanceof ke)return e;var t;if(x(e)&&(e=Vr(e),t=!0),!(this instanceof ke)){if(t&&"<"!=e.charAt(0))throw si("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new ke(e)}t?Pe(this,_e(e)):Pe(this,e)}function Se(e){return e.cloneNode(!0)}function Te(e,t){if(t||Re(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;i>r;r++)Re(n[r])}function Oe(e,t,n,r){if(b(r))throw si("offargs","jqLite#off() does not support the `selector` argument");var i=Ae(e),a=i&&i.events,s=i&&i.handle;if(s)if(t)o(t.split(" "),function(t){if(b(n)){var r=a[t];if(j(r||[],n),r&&r.length>0)return}ri(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&ri(e,t,s),delete a[t]}function Re(e,t){var r=e.ng339,i=r&&ei[r];if(i){if(t)return void delete i.data[t];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Oe(e)),delete ei[r],e.ng339=n}}function Ae(e,t){var r=e.ng339,i=r&&ei[r];return t&&!i&&(e.ng339=r=we(),i=ei[r]={events:{},data:{},handle:n}),i}function Me(e,t,n){if(Ce(e)){var r=b(n),i=!r&&t&&!w(t),o=!t,a=Ae(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];f(s,t)}}}function De(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Ne(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Vr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Vr(t)+" "," ")))})}function Le(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Vr(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Vr(n))}}function Pe(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;n>r;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Fe(e,t){return je(e,"$"+(t||"ngController")+"Controller")}function je(e,t,r){e.nodeType==Xr&&(e=e.documentElement);for(var i=jr(t)?t:[t];e;){for(var o=0,a=i.length;a>o;o++)if((r=kr.data(e,i[o]))!==n)return r;e=e.parentNode||e.nodeType===Jr&&e.host}}function Ie(e){for(Te(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ve(e,t){t||Te(e);var n=e.parentNode;n&&n.removeChild(e)}function He(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):kr(n).on("load",t)}function We(e,t){var n=hi[t.toLowerCase()];return n&&gi[F(e)]&&n}function Be(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&vi[t]}function ze(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if(y(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(i=V(i));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||i[s].call(e,n)}};return n.elem=e,n}function Ue(){this.$get=function(){return f(ke,{hasClass:function(e,t){return e.attr&&(e=e[0]),De(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Le(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Ne(e,t)}})}}function qe(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||l)():r+":"+e}function Ge(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Ke(e){var t=e.toString().replace($i,""),n=t.match(yi);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Ye(e,t,n){var r,i,a,s;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw x(n)&&n||(n=e.name||Ke(e)),xi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=e.toString().replace($i,""),a=i.match(yi),o(a[1].split(bi),function(e){e.replace(wi,function(e,t,n){r.push(n)})})}e.$inject=r}}else jr(e)?(s=e.length-1,fe(e[s],"fn"),r=e.slice(0,s)):fe(e,"fn",!0);return r}function Qe(e,t){function r(e){return function(t,n){return w(t)?void o(t,s(e)):e(t,n)}}function i(e,t){if(de(e,"service"),(_(t)||jr(t))&&(t=k.instantiate(t)),!t.$get)throw xi("pget","Provider '{0}' must define $get factory method.",e);return E[e+b]=t}function a(e,t){return function(){var n=T.invoke(t,this);if(y(n))throw xi("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function l(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return l(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return l(e,m(t),!1)}function f(e,t){de(e,"constant"),E[e]=t,S[e]=t}function d(e,t){var n=k.get(e+b),r=n.$get;n.$get=function(){var e=T.invoke(r,n);return T.invoke(t,null,{$delegate:e})}}function p(e){var t,n=[];return o(e,function(e){function r(e){var t,n;for(t=0,n=e.length;n>t;t++){var r=e[t],i=k.get(r[0]);i[r[1]].apply(i,r[2])}}if(!C.get(e)){C.put(e,!0);try{x(e)?(t=Tr(e),n=n.concat(p(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):_(e)?n.push(k.invoke(e)):jr(e)?n.push(k.invoke(e)):fe(e,"module")}catch(i){throw jr(e)&&(e=e[e.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),xi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function h(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===v)throw xi("cdep","Circular dependency found: {0}",t+" <- "+$.join(" <- "));return e[t]}try{return $.unshift(t),e[t]=v,e[t]=n(t,r)}catch(i){throw e[t]===v&&delete e[t],i}finally{$.shift()}}function i(e,n,i,o){"string"==typeof i&&(o=i,i=null);var a,s,l,u=[],c=Qe.$$annotate(e,t,o);for(s=0,a=c.length;a>s;s++){if(l=c[s],"string"!=typeof l)throw xi("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(i&&i.hasOwnProperty(l)?i[l]:r(l,o))}return jr(e)&&(e=e[a]),e.apply(n,u)}function o(e,t,n){var r=Object.create((jr(e)?e[e.length-1]:e).prototype||null),o=i(e,r,t,n);return w(o)||_(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Qe.$$annotate,has:function(t){return E.hasOwnProperty(t+b)||e.hasOwnProperty(t)}}}t=t===!0;var v={},b="Provider",$=[],C=new Ge([],!0),E={$provide:{provider:r(i),factory:r(l),service:r(u),value:r(c),constant:r(f),decorator:d}},k=E.$injector=h(E,function(e,t){throw Lr.isString(t)&&$.push(t),xi("unpr","Unknown provider: {0}",$.join(" <- "))}),S={},T=S.$injector=h(S,function(e,t){var r=k.get(e+b,t);return T.invoke(r.$get,r,n,e)});return o(p(e),function(e){T.invoke(e||g)}),T}function Xe(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){return"a"===F(e)?(t=e,!0):void 0}),t}function o(){var e=s.yOffset;if(_(e))e=e();else if(L(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else C(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=x(e)?e:n.hash();var t;e?(t=l.getElementById(e))?a(t):(t=i(l.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var l=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&He(function(){r.$evalAsync(s)})}),s}]}function Je(e,t){return e||t?e?t?(jr(e)&&(e=e.join(" ")),jr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function Ze(e){for(var t=0;tu&&this.remove(p.key),t}},get:function(e){if(u").parent()[0])});var a=D(e,t,e,n,r,i);A.$$addScopeClass(e);var s=null;return function(t,n,r){ce(t,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,l=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),s||(s=M(l));var u;if(u="html"!==s?kr(J(s,kr("
").append(e).html())):n?pi.clone.call(e):e,o)for(var c in o)u.data("$"+c+"Controller",o[c].instance);return A.$$addScopeInfo(u,t),n&&n(u,t),a&&a(t,u,u,i),u}}function M(e){var t=e&&e[0];return t&&"foreignobject"!==F(t)&&t.toString().match(/SVG/)?"svg":"html"}function D(e,t,r,i,o,a){function s(e,r,i,o){var a,s,l,u,c,f,d,p,v;if(h){var m=r.length;for(v=new Array(m),c=0;cc;)if(l=v[g[c++]],a=g[c++],s=g[c++],a){if(a.scope){u=e.$new(),A.$$addScopeInfo(kr(l),u);var y=a.$$destroyBindings;y&&(a.$$destroyBindings=null,u.$on("$destroyed",y))}else u=e;p=a.transcludeOnThisElement?N(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?N(e,t):null,a(s,u,l,i,p,a)}else s&&s(e,l.childNodes,n,o)}for(var l,u,c,f,d,p,h,g=[],v=0;vy;y++){var $=!1,C=!1;u=m[y],c=u.name,g=Vr(u.value),h=lt(c),(v=fe.test(h))&&(c=c.replace(Ri,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var E=h.replace(/(Start|End)$/,"");U(E)&&h===E+"Start"&&($=c,C=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=lt(c.toLowerCase()),l[f]=c,(v||!n.hasOwnProperty(f))&&(n[f]=g,We(e,f)&&(n[f]=!0)),ee(e,t,g,f,v),z(t,f,"A",r,i,$,C)}if(a=e.className,w(a)&&(a=a.animVal),x(a)&&""!==a)for(;o=p.exec(a);)f=lt(o[2]),z(t,f,"C",r,i)&&(n[f]=Vr(o[3])),a=a.substr(o.index+o[0].length);break;case Yr:Q(t,e.nodeValue);break;case Qr:try{o=d.exec(e.nodeValue),o&&(f=lt(o[1]),z(t,f,"M",r,i)&&(n[f]=Vr(o[2])))}catch(_){}}return t.sort(K),t}function P(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Oi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==Gr&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return kr(r)}function I(e,t,n){return function(r,i,o,a,s){return i=P(i[0],t,n),e(r,i,o,a,s)}}function V(e,r,o,a,s,u,c,f,d){function p(e,t,n,r){e&&(n&&(e=I(e,n,r)),e.require=y.require,e.directiveName=b,(R===y||y.$$isolateScope)&&(e=ne(e,{isolateScope:!0})),c.push(e)),t&&(n&&(t=I(t,n,r)),t.require=y.require,t.directiveName=b,(R===y||y.$$isolateScope)&&(t=ne(t,{isolateScope:!0})),f.push(t))}function h(e,t,n,r){var i;if(x(t)){var o=t.match($),a=t.substring(o[0].length),s=o[1]||o[3],l="?"===o[2];if("^^"===s?n=n.parent():(i=r&&r[a],i=i&&i.instance),!i){var u="$"+a+"Controller";i=s?n.inheritedData(u):n.data(u)}if(!i&&!l)throw Oi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,e)}else if(jr(t)){i=[];for(var c=0,f=t.length;f>c;c++)i[c]=h(e,t[c],n,r)}return i||null}function g(e,t,n,r,i,o){var a=ge();for(var s in r){var u=r[s],c={$scope:u===R||u.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},f=u.controller;"@"==f&&(f=t[u.name]);var d=l(f,c,!0,u.controllerAs);a[u.name]=d,j||e.data("$"+u.name+"Controller",d.instance)}return a}function v(e,t,i,a,s,l){function u(e,t,r){var i;return T(e)||(r=t,t=e,e=n),j&&(i=$),r||(r=j?C.parent():C),s(e,t,i,r,N)}var d,p,v,b,w,$,x,C,E;if(r===i?(E=o,C=o.$$element):(C=kr(i),E=new oe(C,o)),R&&(w=t.$new(!0)),s&&(x=u,x.$$boundTransclude=s),O&&($=g(C,E,x,O,w,t)),R&&(A.$$addScopeInfo(C,w,!0,!(M&&(M===R||M===R.$$originalDirective))),A.$$addScopeClass(C,!0),w.$$isolateBindings=R.$$isolateBindings,ie(t,E,w,w.$$isolateBindings,R,w)),$){var _,k,S=R||m;S&&$[S.name]&&(_=S.$$bindings.bindToController,b=$[S.name],b&&b.identifier&&_&&(k=b,l.$$destroyBindings=ie(t,E,b.instance,_,S)));for(d in $){b=$[d];var D=b();D!==b.instance&&(b.instance=D,C.data("$"+y.name+"Controller",D),b===k&&(l.$$destroyBindings(),l.$$destroyBindings=ie(t,E,D,_,S)))}}for(d=0,p=c.length;p>d;d++)v=c[d],re(v,v.isolateScope?w:t,C,E,v.require&&h(v.directiveName,v.require,C,$),x);var N=t;for(R&&(R.template||null===R.templateUrl)&&(N=w),e&&e(N,i.childNodes,n,s),d=f.length-1;d>=0;d--)v=f[d],re(v,v.isolateScope?w:t,C,E,v.require&&h(v.directiveName,v.require,C,$),x)}d=d||{};for(var m,y,b,C,E,k,S=-Number.MAX_VALUE,O=d.controllerDirectives,R=d.newIsolateScopeDirective,M=d.templateDirective,D=d.nonTlbTranscludeDirective,N=!1,F=!1,j=d.hasElementTranscludeDirective,V=o.$$element=kr(r),H=u,z=a,U=0,K=e.length;K>U;U++){y=e[U];var Q=y.$$start,Z=y.$$end;if(Q&&(V=P(r,Q,Z)),C=n,S>y.priority)break;if((k=y.scope)&&(y.templateUrl||(w(k)?(Y("new/isolated scope",R||m,y,V),R=y):Y("new/isolated scope",R,y,V)),m=m||y),b=y.name,!y.templateUrl&&y.controller&&(k=y.controller,O=O||ge(),Y("'"+b+"' controller",O[b],y,V),O[b]=y),(k=y.transclude)&&(N=!0,y.$$tlb||(Y("transclusion",D,y,V),D=y),"element"==k?(j=!0,S=y.priority,C=V,V=o.$$element=kr(t.createComment(" "+b+": "+o[b]+" ")),r=V[0],te(s,B(C),r),z=A(C,a,S,H&&H.name,{nonTlbTranscludeDirective:D})):(C=kr(Se(r)).contents(),V.empty(),z=A(C,a))),y.template)if(F=!0,Y("template",M,y,V), -M=y,k=_(y.template)?y.template(V,o):y.template,k=ue(k),y.replace){if(H=y,C=xe(k)?[]:ct(J(y.templateNamespace,Vr(k))),r=C[0],1!=C.length||r.nodeType!==Gr)throw Oi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",b,"");te(s,V,r);var ee={$attr:{}},ae=L(r,[],ee),se=e.splice(U+1,e.length-(U+1));R&&W(ae),e=e.concat(ae).concat(se),q(o,ee),K=e.length}else V.html(k);if(y.templateUrl)F=!0,Y("template",M,y,V),M=y,y.replace&&(H=y),v=G(e.splice(U,e.length-U),V,o,s,N&&z,c,f,{controllerDirectives:O,newIsolateScopeDirective:R,templateDirective:M,nonTlbTranscludeDirective:D}),K=e.length;else if(y.compile)try{E=y.compile(V,o,z),_(E)?p(null,E,Q,Z):E&&p(E.pre,E.post,Q,Z)}catch(le){i(le,X(V))}y.terminal&&(v.terminal=!0,S=Math.max(S,y.priority))}return v.scope=m&&m.scope===!0,v.transcludeOnThisElement=N,v.elementTranscludeOnThisElement=j,v.templateOnThisElement=F,v.transclude=z,d.hasElementTranscludeDirective=j,v}function W(e){for(var t=0,n=e.length;n>t;t++)e[t]=h(e[t],{$$isolateScope:!0})}function z(t,r,o,a,s,l,f){if(r===s)return null;var d=null;if(u.hasOwnProperty(r))for(var p,g=e.get(r+c),v=0,m=g.length;m>v;v++)try{p=g[v],(a===n||a>p.priority)&&-1!=p.restrict.indexOf(o)&&(l&&(p=h(p,{$$start:l,$$end:f})),t.push(p),d=p)}catch(y){i(y)}return d}function U(t){if(u.hasOwnProperty(t))for(var n,r=e.get(t+c),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function q(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;o(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),o(t,function(t,o){"class"==o?(R(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,r[o]=n[o])})}function G(e,t,n,r,i,s,l,u){var c,f,d=[],p=t[0],g=e.shift(),v=h(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),m=_(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,y=g.templateNamespace;return t.empty(),a(k.getTrustedResourceUrl(m)).then(function(a){var h,b,$,x;if(a=ue(a),g.replace){if($=xe(a)?[]:ct(J(y,Vr(a))),h=$[0],1!=$.length||h.nodeType!==Gr)throw Oi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,m);b={$attr:{}},te(r,t,h);var C=L(h,[],b);w(g.scope)&&W(C),e=C.concat(e),q(n,b)}else h=p,t.html(a);for(e.unshift(v),c=V(e,h,n,i,t,g,s,l,u),o(r,function(e,n){e==h&&(r[n]=t[0])}),f=D(t[0].childNodes,i);d.length;){var E=d.shift(),_=d.shift(),k=d.shift(),S=d.shift(),T=t[0];if(!E.$$destroyed){if(_!==p){var O=_.className;u.hasElementTranscludeDirective&&g.replace||(T=Se(h)),te(k,kr(_),T),R(kr(T),O)}x=c.transcludeOnThisElement?N(E,c.transclude,S):S,c(f,E,T,r,x,c)}}d=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(d?d.push(t,n,r,o):(c.transcludeOnThisElement&&(o=N(t,c.transclude,i)),c(f,t,n,r,o,c)))}}function K(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name"+n+"",r.childNodes[0].childNodes;default:return n}}function Z(e,t){if("srcdoc"==t)return k.HTML;var n=F(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?k.RESOURCE_URL:void 0}function ee(e,t,n,i,o){var a=Z(e,i);o=y[i]||o;var s=r(n,!0,a,o);if(s){if("multiple"===i&&"select"===F(e))throw Oi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",X(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers={});if(C.test(i))throw Oi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[i];c!==n&&(s=c&&r(c,!0,a,o),n=c),s&&(l[i]=s(e),(u[i]||(u[i]=[])).$$inter=!0,(l.$$observers&&l.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?l.$updateClass(e,t):l.$set(i,e)}))}}}})}}function te(e,n,r){var i,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(i=0,o=e.length;o>i;i++)if(e[i]==a){e[i++]=r;for(var u=i,c=u+s-1,f=e.length;f>u;u++,c++)f>c?e[u]=e[c]:delete e[u];e.length-=s-1,e.context===a&&(e.context=r);break}l&&l.replaceChild(r,a);var d=t.createDocumentFragment();d.appendChild(a),kr(r).data(kr(a).data()),Sr?(Fr=!0,Sr.cleanData([a])):delete kr.cache[a[kr.expando]];for(var p=1,h=n.length;h>p;p++){var g=n[p];kr(g).remove(),d.appendChild(g),delete n[p]}n[0]=r,n.length=1}function ne(e,t){return f(function(){return e.apply(null,arguments)},e,t)}function re(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,X(n))}}function ie(e,t,n,i,a,l){var u;o(i,function(i,o){var l,c,f,d,p=i.attrName,h=i.optional,v=i.mode;switch(v){case"@":t.$observe(p,function(e){n[o]=e}),t.$$observers[p].$$scope=e,t[p]&&(n[o]=r(t[p])(e));break;case"=":if(h&&!t[p])return;c=s(t[p]),d=c.literal?H:function(e,t){return e===t||e!==e&&t!==t},f=c.assign||function(){throw l=n[o]=c(e),Oi("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",t[p],a.name)},l=n[o]=c(e);var m=function(t){return d(t,n[o])||(d(t,l)?f(e,t=n[o]):n[o]=t),l=t};m.$stateful=!0;var y;y=i.collection?e.$watchCollection(t[p],m):e.$watch(s(t[p],m),null,c.literal),u=u||[],u.push(y);break;case"&":if(!t.hasOwnProperty(p)&&h)break;if(c=s(t[p]),c===g&&h)break;n[o]=function(t){return c(e,t)}}});var c=u?function(){for(var e=0,t=u.length;t>e;++e)u[e]()}:g;return l&&c!==g?(l.$on("$destroy",c),g):c}var oe=function(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e};oe.prototype={$normalize:lt,$addClass:function(e){e&&e.length>0&&S.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&S.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=ut(e,t);n&&n.length&&S.addClass(this.$$element,n);var r=ut(t,e);r&&r.length&&S.removeClass(this.$$element,r)},$set:function(e,t,r,a){var s,l=this.$$element[0],u=We(l,e),c=Be(l,e),f=e;if(u?(this.$$element.prop(e,t),a=u):c&&(this[c]=t,f=c),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e],a||(this.$attr[e]=a=le(e,"-"))),s=F(this.$$element),"a"===s&&"href"===e||"img"===s&&"src"===e)this[e]=t=O(t,"src"===e);else if("img"===s&&"srcset"===e){for(var d="",p=Vr(t),h=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(p)?h:/(,)/,v=p.split(g),m=Math.floor(v.length/2),y=0;m>y;y++){var b=2*y;d+=O(Vr(v[b]),!0),d+=" "+Vr(v[b+1])}var w=Vr(v[2*y]).split(/\s/);d+=O(Vr(w[0]),!0),2===w.length&&(d+=" "+Vr(w[1])),this[e]=t=d}r!==!1&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var $=this.$$observers;$&&o($[f],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=ge()),i=r[e]||(r[e]=[]);return i.push(t),m.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(e)&&t(n[e])}),function(){j(i,t)}}};var ae=r.startSymbol(),se=r.endSymbol(),ue="{{"==ae||"}}"==se?v:function(e){return e.replace(/\{\{/g,ae).replace(/}}/g,se)},fe=/^ngAttr[A-Z]/;return A.$$addBindingInfo=E?function(e,t){var n=e.data("$binding")||[];jr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:g,A.$$addBindingClass=E?function(e){R(e,"ng-binding")}:g,A.$$addScopeInfo=E?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:g,A.$$addScopeClass=E?function(e,t){R(e,t?"ng-isolate-scope":"ng-scope")}:g,A}]}function lt(e){return $e(e.replace(Ri,""))}function ut(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o0?" ":"")+a}return n}function ct(e){e=kr(e);var t=e.length;if(1>=t)return e;for(;t--;){var n=e[t];n.nodeType===Qr&&Rr.call(e,t,1)}return e}function ft(e,t){if(t&&x(t))return t;if(x(e)){var n=Mi.exec(e);if(n)return n[3]}}function dt(){var e={},t=!1;this.register=function(t,n){de(t,"controller"),w(t)?f(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(i,o){function a(e,t,n,i){if(!e||!w(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,t);e.$scope[t]=n}return function(r,s,l,u){var c,d,p,h;if(l=l===!0,u&&x(u)&&(h=u),x(r)){if(d=r.match(Mi),!d)throw Ai("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=d[1],h=h||d[3],r=e.hasOwnProperty(p)?e[p]:pe(s.$scope,p,!0)||(t?pe(o,p,!0):n),fe(r,p,!0)}if(l){var g=(jr(r)?r[r.length-1]:r).prototype;c=Object.create(g||null),h&&a(s,h,c,p||r.name);var v;return v=f(function(){var e=i.invoke(r,c,s,p);return e!==c&&(w(e)||_(e))&&(c=e,h&&a(s,h,c,p||r.name)),c},{instance:c,identifier:h})}return c=i.instantiate(r,s,p),h&&a(s,h,c,p||r.name),c}}]}function pt(){this.$get=["$window",function(e){return kr(e.document)}]}function ht(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function gt(e){return w(e)?E(e)?e.toISOString():q(e):e}function vt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return a(e,function(e,n){null===e||y(e)||(jr(e)?o(e,function(e,r){t.push(ne(n)+"="+ne(gt(e)))}):t.push(ne(n)+"="+ne(gt(e))))}),t.join("&")}}}function mt(){this.$get=function(){return function(e){function t(e,r,i){null===e||y(e)||(jr(e)?o(e,function(e){t(e,r+"[]")}):w(e)&&!E(e)?a(e,function(e,n){t(e,r+(i?"":"[")+n+(i?"":"]"))}):n.push(ne(r)+"="+ne(gt(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function yt(e,t){if(x(e)){var n=e.replace(Fi,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Di)||bt(n))&&(e=G(n))}}return e}function bt(e){var t=e.match(Li);return t&&Pi[t[0]].test(e)}function wt(e){function t(e,t){e&&(r[e]=r[e]?r[e]+", "+t:t)}var n,r=ge();return x(e)?o(e.split("\n"),function(e){n=e.indexOf(":"),t(wr(Vr(e.substr(0,n))),Vr(e.substr(n+1)))}):w(e)&&o(e,function(e,n){t(wr(n),Vr(e))}),r}function $t(e){var t;return function(n){if(t||(t=wt(e)),n){var r=t[wr(n)];return void 0===r&&(r=null),r}return t}}function xt(e,t,n,r){return _(r)?r(e,t,n):(o(r,function(r){e=r(e,t,n)}),e)}function Ct(e){return e>=200&&300>e}function Et(){var e=this.defaults={transformResponse:[yt],transformRequest:[function(e){return!w(e)||O(e)||A(e)||R(e)?e:q(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:V(Ni),put:V(Ni),patch:V(Ni)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},t=!1;this.useApplyAsync=function(e){return b(e)?(t=!!e,this):t};var i=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,l,u,c,d){function p(t){function i(e){var t=f({},e);return e.data?t.data=xt(e.data,e.headers,e.status,l.transformResponse):t.data=e.data,Ct(e.status)?t:c.reject(t)}function a(e,t){var n,r={};return o(e,function(e,i){_(e)?(n=e(t),null!=n&&(r[i]=n)):r[i]=e}),r}function s(t){var n,r,i,o=e.headers,s=f({},t.headers);o=f({},o.common,o[wr(t.method)]);e:for(n in o){r=wr(n);for(i in s)if(wr(i)===r)continue e;s[n]=o[n]}return a(s,V(t))}if(!Lr.isObject(t))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",t);var l=f({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},t);l.headers=s(t),l.method=xr(l.method),l.paramSerializer=x(l.paramSerializer)?d.get(l.paramSerializer):l.paramSerializer;var u=function(t){var r=t.headers,a=xt(t.data,$t(r),n,t.transformRequest);return y(a)&&o(r,function(e,t){"content-type"===wr(t)&&delete r[t]}),y(t.withCredentials)&&!y(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,a).then(i,i)},p=[u,n],h=c.when(l);for(o(C,function(e){(e.request||e.requestError)&&p.unshift(e.request,e.requestError),(e.response||e.responseError)&&p.push(e.response,e.responseError)});p.length;){var g=p.shift(),m=p.shift();h=h.then(g,m)}return h.success=function(e){return fe(e,"fn"),h.then(function(t){e(t.data,t.status,t.headers,l)}),h},h.error=function(e){return fe(e,"fn"),h.then(null,function(t){e(t.data,t.status,t.headers,l)}),h},h}function h(e){o(arguments,function(e){p[e]=function(t,n){return p(f({},n||{},{method:e,url:t}))}})}function g(e){o(arguments,function(e){p[e]=function(t,n,r){return p(f({},r||{},{method:e,url:t,data:n}))}})}function v(r,i){function o(e,n,r,i){function o(){l(n,e,r,i)}h&&(Ct(e)?h.put(E,[e,n,wt(r),i]):h.remove(E)),t?u.$applyAsync(o):(o(),u.$$phase||u.$apply())}function l(e,t,n,i){t=Math.max(t,0),(Ct(t)?v.resolve:v.reject)({data:e,status:t,headers:$t(n),config:r,statusText:i})}function f(e){l(e.data,e.status,V(e.headers()),e.statusText)}function d(){var e=p.pendingRequests.indexOf(r);-1!==e&&p.pendingRequests.splice(e,1)}var h,g,v=c.defer(),x=v.promise,C=r.headers,E=m(r.url,r.paramSerializer(r.params));if(p.pendingRequests.push(r),x.then(d,d),!r.cache&&!e.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(h=w(r.cache)?r.cache:w(e.cache)?e.cache:$),h&&(g=h.get(E),b(g)?D(g)?g.then(f,f):jr(g)?l(g[1],g[0],V(g[2]),g[3]):l(g,200,{},"OK"):h.put(E,x)),y(g)){var _=kn(r.url)?s()[r.xsrfCookieName||e.xsrfCookieName]:n;_&&(C[r.xsrfHeaderName||e.xsrfHeaderName]=_),a(r.method,E,i,o,C,r.timeout,r.withCredentials,r.responseType)}return x}function m(e,t){return t.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+t),e}var $=l("$http");e.paramSerializer=x(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var C=[];return o(i,function(e){C.unshift(x(e)?d.get(e):d.invoke(e))}),p.pendingRequests=[],h("get","delete","head","jsonp"),g("post","put","patch"),p.defaults=e,p}]}function _t(){return new e.XMLHttpRequest}function kt(){this.$get=["$browser","$window","$document",function(e,t,n){return St(e,_t,e.defer,t.angular.callbacks,n[0])}]}function St(e,t,r,i,a){function s(e,t,n){var r=a.createElement("script"),o=null;return r.type="text/javascript",r.src=e,r.async=!0,o=function(e){ri(r,"load",o),ri(r,"error",o),a.body.removeChild(r),r=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},ni(r,"load",o),ni(r,"error",o),a.body.appendChild(r),o}return function(a,l,u,c,f,d,p,h){function v(){w&&w(),$&&$.abort()}function m(t,i,o,a,s){E!==n&&r.cancel(E),w=$=null,t(i,o,a,s),e.$$completeOutstandingRequest(g)}if(e.$$incOutstandingRequestCount(),l=l||e.url(),"jsonp"==wr(a)){var y="_"+(i.counter++).toString(36);i[y]=function(e){i[y].data=e,i[y].called=!0};var w=s(l.replace("JSON_CALLBACK","angular.callbacks."+y),y,function(e,t){m(c,e,i[y].data,"",t),i[y]=g})}else{var $=t();$.open(a,l,!0),o(f,function(e,t){b(e)&&$.setRequestHeader(t,e)}),$.onload=function(){var e=$.statusText||"",t="response"in $?$.response:$.responseText,n=1223===$.status?204:$.status;0===n&&(n=t?200:"file"==_n(l).protocol?404:0),m(c,n,t,$.getAllResponseHeaders(),e)};var x=function(){m(c,-1,null,null,"")};if($.onerror=x,$.onabort=x,p&&($.withCredentials=!0),h)try{$.responseType=h}catch(C){if("json"!==h)throw C}$.send(u)}if(d>0)var E=r(v,d);else D(d)&&d.then(v)}}function Tt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(n){return n.replace(d,e).replace(p,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=q(e)}return e}function l(o,l,d,p){function h(e){try{return e=T(e),p&&!b(e)?e:s(e)}catch(t){r(ji.interr(o,t))}}p=!!p;for(var g,v,m,w=0,$=[],x=[],C=o.length,E=[],k=[];C>w;){if(-1==(g=o.indexOf(e,w))||-1==(v=o.indexOf(t,g+u))){w!==C&&E.push(a(o.substring(w)));break}w!==g&&E.push(a(o.substring(w,g))),m=o.substring(g+u,v),$.push(m),x.push(n(m,h)),w=v+c,k.push(E.length),E.push("")}if(d&&E.length>1&&ji.throwNoconcat(o),!l||$.length){var S=function(e){for(var t=0,n=$.length;n>t;t++){if(p&&y(e[t]))return;E[k[t]]=e[t]}return E.join("")},T=function(e){return d?i.getTrusted(d,e):i.valueOf(e)};return f(function(e){var t=0,n=$.length,i=new Array(n);try{for(;n>t;t++)i[t]=x[t](e);return S(i)}catch(a){r(ji.interr(o,a))}},{exp:o,expressions:$,$$watchDelegate:function(e,t){var n;return e.$watchGroup(x,function(r,i){var o=S(r);_(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var u=e.length,c=t.length,d=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return l.startSymbol=function(){return e},l.endSymbol=function(){return t},l}]}function Ot(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){function i(i,a,s,l){var u=arguments.length>4,c=u?B(arguments,4):[],f=t.setInterval,d=t.clearInterval,p=0,h=b(l)&&!l,g=(h?r:n).defer(),v=g.promise;return s=b(s)?s:0,v.then(null,null,u?function(){i.apply(null,c)}:i),v.$$intervalId=f(function(){g.notify(p++),s>0&&p>=s&&(g.resolve(p),d(v.$$intervalId),delete o[v.$$intervalId]),h||e.$apply()},a),o[v.$$intervalId]=g,v}var o={};return i.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},i}]}function Rt(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(e){return 1===e?"one":"other"}}}}function At(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=te(t[n]);return t.join("/")}function Mt(e,t){var n=_n(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=p(n.port)||Vi[n.protocol]||null}function Dt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=_n(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=Z(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Nt(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function Lt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Pt(e){return e.replace(/(#.+)|#$/,"$1")}function Ft(e){return e.substr(0,Lt(e).lastIndexOf("/")+1)}function jt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function It(e,t){this.$$html5=!0,t=t||"";var r=Ft(e);Mt(e,this),this.$$parse=function(e){var t=Nt(r,e);if(!x(t))throw Hi("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,r);Dt(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=ee(this.$$search),t=this.$$hash?"#"+te(this.$$hash):"";this.$$url=At(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=Nt(e,i))!==n?(s=a,l=(a=Nt(t,a))!==n?r+(Nt("/",a)||a):e+s):(a=Nt(r,i))!==n?l=r+a:r==i+"/"&&(l=r),l&&this.$$parse(l),!!l}}function Vt(e,t){var n=Ft(e);Mt(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Nt(e,r)||Nt(n,r);"#"===a.charAt(0)?(o=Nt(t,a),y(o)&&(o=a)):o=this.$$html5?a:"",Dt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var n=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=At(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Lt(e)==Lt(t)?(this.$$parse(t),!0):!1}}function Ht(e,t){this.$$html5=!0,Vt.apply(this,arguments);var n=Ft(e);this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==Lt(r)?o=r:(a=Nt(n,r))?o=e+t+a:n===r+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=At(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+t+this.$$url}}function Wt(e){return function(){return this[e]}}function Bt(e,t){return function(n){return y(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function zt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return b(t)?(e=t,this):e},this.html5Mode=function(e){return M(e)?(t.enabled=e,this):w(e)?(M(e.enabled)&&(t.enabled=e.enabled),M(e.requireBase)&&(t.requireBase=e.requireBase),M(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=u.url(),o=u.$$state;try{r.url(e,t,n),u.$$state=r.state()}catch(a){throw u.url(i),u.$$state=o,a}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw Hi("nobase","$location in HTML5 mode requires a tag to be present!");f=jt(p)+(d||"/"),c=i.history?It:Ht}else f=Lt(p),c=Vt;u=new c(f,"#"+e),u.$$parseLinkUrl(p,p),u.$$state=r.state();var h=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=kr(e.target);"a"!==F(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),l=i.attr("href")||i.attr("xlink:href");w(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=_n(s.animVal).href),h.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Pt(u.absUrl())!=Pt(p)&&r.url(u.absUrl(),!0);var g=!0;return r.onUrlChange(function(e,t){n.$evalAsync(function(){var r,i=u.absUrl(),o=u.$$state;u.$$parse(e),u.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,u.absUrl()===e&&(r?(u.$$parse(i),u.$$state=o,s(i,!1,o)):(g=!1,l(i,o)))}),n.$$phase||n.$digest()}),n.$watch(function(){var e=Pt(r.url()),t=Pt(u.absUrl()),o=r.state(),a=u.$$replace,c=e!==t||u.$$html5&&i.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync(function(){var t=u.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(r?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))})),u.$$replace=!1}),u}]}function Ut(){var e=!0,t=this;this.debugEnabled=function(t){return b(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||g,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function qt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Bi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Gt(e,t){if(e){if(e.constructor===e)throw Bi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Bi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Bi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Bi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Kt(e,t){if(e){if(e.constructor===e)throw Bi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===zi||e===Ui||e===qi)throw Bi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Yt(e,t){return"undefined"!=typeof e?e:t}function Qt(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function Xt(e,t){var n=e(t);return!n.$stateful}function Jt(e,t){var n,r;switch(e.type){case Qi.Program:n=!0,o(e.body,function(e){Jt(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case Qi.Literal:e.constant=!0,e.toWatch=[];break;case Qi.UnaryExpression:Jt(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case Qi.BinaryExpression:Jt(e.left,t),Jt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case Qi.LogicalExpression:Jt(e.left,t),Jt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case Qi.ConditionalExpression:Jt(e.test,t),Jt(e.alternate,t),Jt(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case Qi.Identifier:e.constant=!1,e.toWatch=[e];break;case Qi.MemberExpression:Jt(e.object,t),e.computed&&Jt(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case Qi.CallExpression:n=e.filter?Xt(t,e.callee.name):!1,r=[],o(e.arguments,function(e){Jt(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&Xt(t,e.callee.name)?r:[e];break;case Qi.AssignmentExpression:Jt(e.left,t),Jt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case Qi.ArrayExpression:n=!0,r=[],o(e.elements,function(e){Jt(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case Qi.ObjectExpression:n=!0,r=[],o(e.properties,function(e){Jt(e.value,t),n=n&&e.value.constant,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case Qi.ThisExpression:e.constant=!1,e.toWatch=[]}}function Zt(e){if(1==e.length){var t=e[0].expression,r=t.toWatch;return 1!==r.length?r:r[0]!==t?r:n}}function en(e){return e.type===Qi.Identifier||e.type===Qi.MemberExpression}function tn(e){return 1===e.body.length&&en(e.body[0].expression)?{type:Qi.AssignmentExpression,left:e.body[0].expression,right:{type:Qi.NGValueParameter},operator:"="}:void 0}function nn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===Qi.Literal||e.body[0].expression.type===Qi.ArrayExpression||e.body[0].expression.type===Qi.ObjectExpression)}function rn(e){return e.constant}function on(e,t){this.astBuilder=e,this.$filter=t}function an(e,t){this.astBuilder=e,this.$filter=t}function sn(e,t,n,r){Gt(e,r);for(var i,o=t.split("."),a=0;o.length>1;a++){i=qt(o.shift(),r);var s=Gt(e[i],r);s||(s={},e[i]=s),e=s}return i=qt(o.shift(),r),Gt(e[i],r),e[i]=n,n}function ln(e){return"constructor"==e}function un(e){return _(e.valueOf)?e.valueOf():Ji.call(e)}function cn(){var e=ge(),t=ge();this.$get=["$filter","$sniffer",function(r,i){function a(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=un(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function s(e,t,r,i,o){var s,l=i.inputs;if(1===l.length){var u=a;return l=l[0],e.$watch(function(e){var t=l(e);return a(t,u)||(s=i(e,n,n,[t]),u=t&&un(t)),s},t,r,o)}for(var c=[],f=[],d=0,p=l.length;p>d;d++)c[d]=a,f[d]=null;return e.$watch(function(e){for(var t=!1,r=0,o=l.length;o>r;r++){var u=l[r](e);(t||(t=!a(u,c[r])))&&(f[r]=u,c[r]=u&&un(u))}return t&&(s=i(e,n,n,f)),s},t,r,o)}function l(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,_(t)&&t.apply(this,arguments),b(e)&&r.$$postDigest(function(){b(o)&&i()})},n)}function u(e,t,n,r){function i(e){var t=!0;return o(e,function(e){b(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return r(e)},function(e,n,r){s=e,_(t)&&t.call(this,e,n,r),i(e)&&r.$$postDigest(function(){i(s)&&a()})},n)}function c(e,t,n,r){var i;return i=e.$watch(function(e){return r(e)},function(e,n,r){_(t)&&t.apply(this,arguments),i()},n)}function f(e,t){if(!t)return e;var n=e.$$watchDelegate,r=n!==u&&n!==l,i=r?function(n,r,i,o){var a=e(n,r,i,o);return t(a,n,r)}:function(n,r,i,o){var a=e(n,r,i,o),s=t(a,n,r);return b(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==s?i.$$watchDelegate=e.$$watchDelegate:t.$stateful||(i.$$watchDelegate=s,i.inputs=e.inputs?e.inputs:[e]),i}var d={csp:i.csp,expensiveChecks:!1},p={csp:i.csp,expensiveChecks:!0};return function(n,i,o){var a,h,v;switch(typeof n){case"string":n=n.trim(),v=n;var m=o?t:e;if(a=m[v],!a){":"===n.charAt(0)&&":"===n.charAt(1)&&(h=!0,n=n.substring(2));var y=o?p:d,b=new Yi(y),w=new Xi(b,r,y);a=w.parse(n),a.constant?a.$$watchDelegate=c:h?a.$$watchDelegate=a.literal?u:l:a.inputs&&(a.$$watchDelegate=s),m[v]=a}return f(a,i);case"function":return f(n,i);default:return g}}}]}function fn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return pn(function(t){e.$evalAsync(t)},t)}]}function dn(){this.$get=["$browser","$exceptionHandler",function(e,t){return pn(function(t){e.defer(t)},t)}]}function pn(e,t){function i(e,t,n){function r(t){return function(n){i||(i=!0,t.call(e,n))}}var i=!1;return[r(t),r(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var r,i,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][e.status];try{_(r)?i.resolve(r(e.value)):1===e.status?i.resolve(e.value):i.reject(e.value)}catch(l){i.reject(l),t(l)}}}function u(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function c(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function f(e){var t=new c,n=0,r=jr(e)?[]:{};return o(e,function(e,i){n++,m(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}var d=r("$q",TypeError),p=function(){return new c};a.prototype={then:function(e,t,n){var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&u(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}},c.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(w(e)||_(e))&&(n=e&&e.then),_(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,u(this.promise.$$state))}catch(o){r[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;a>o;o++){i=r[o][0],e=r[o][3];try{i.notify(_(e)?e(n):n)}catch(s){t(s)}}})}};var h=function(e){var t=new c;return t.reject(e),t.promise},g=function(e,t){var n=new c;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{ -_(n)&&(r=n())}catch(i){return g(i,!1)}return D(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},m=function(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)},y=function b(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!_(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof b))return new b(e);var r=new c;return e(t,n),r.promise};return y.defer=p,y.reject=h,y.when=m,y.all=f,y}function hn(){this.$get=["$window","$timeout",function(e,t){function n(){for(var e=0;e=0&&(c[t]=null,t=null,0===--u&&l&&(l(),l=null,c.length=0))}}var i=e.requestAnimationFrame||e.webkitRequestAnimationFrame,o=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,a=!!i,s=a?function(e){var t=i(e);return function(){o(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};r.supported=a;var l,u=0,c=[];return r}]}function gn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=l(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,n=r("$rootScope"),a=null,s=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,u,c,f){function d(e){e.currentScope.$$destroyed=!0}function p(){this.$id=l(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function h(e){if(E.$$phase)throw n("inprog","{0} already in progress",E.$$phase);E.$$phase=e}function v(){E.$$phase=null}function m(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function b(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function $(){}function x(){for(;T.length;)try{T.shift()()}catch(e){u(e)}s=null}function C(){null===s&&(s=f.defer(function(){E.$apply(x)}))}p.prototype={constructor:p,$new:function(t,n){var r;return n=n||this,t?(r=new p,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",d),r},$watch:function(e,t,n,r){var i=c(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var o=this,s=o.$$watchers,l={fn:t,last:$,get:i,exp:r||e,eq:!!n};return a=null,_(t)||(l.fn=g),s||(s=o.$$watchers=[]),s.unshift(l),m(this,1),function(){j(s,l)>=0&&m(o,-1),a=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(i,i,s)):t(i,r,s)}var r=new Array(e.length),i=new Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(i,i,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){i[0]=e,r[0]=n,t(i,e===n?i:r,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){i[t]=e,r[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,r,s,l;if(!y(o)){if(w(o))if(i(o)){a!==p&&(a=p,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var u=0;t>u;u++)l=a[u],s=o[u],r=l!==l&&s!==s,r||l===s||(f++,a[u]=s)}else{a!==h&&(a=h={},v=0,f++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,s=o[n],l=a[n],n in a?(r=l!==l&&s!==s,r||l===s||(f++,a[n]=s)):(v++,a[n]=s,f++));if(v>t){f++;for(n in a)o.hasOwnProperty(n)||(v--,delete a[n])}}else a!==o&&(a=o,f++);return f}}function r(){if(g?(g=!1,t(o,o,l)):t(o,s,l),u)if(w(o))if(i(o)){s=new Array(o.length);for(var e=0;e1,f=0,d=c(e,n),p=[],h={},g=!0,v=0;return this.$watch(d,r)},$digest:function(){var e,r,i,o,l,c,d,p,g,m,y=t,b=this,w=[];h("$digest"),f.$$checkUrlChange(),this===E&&null!==s&&(f.defer.cancel(s),x()),a=null;do{for(c=!1,p=b;k.length;){try{m=k.shift(),m.scope.$eval(m.expression,m.locals)}catch(C){u(C)}a=null}e:do{if(o=p.$$watchers)for(l=o.length;l--;)try{if(e=o[l])if((r=e.get(p))===(i=e.last)||(e.eq?H(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(e===a){c=!1;break e}}else c=!0,a=e,e.last=e.eq?I(r,null):r,e.fn(r,i===$?r:i,p),5>y&&(g=4-y,w[g]||(w[g]=[]),w[g].push({msg:_(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:r,oldVal:i}))}catch(C){u(C)}if(!(d=p.$$watchersCount&&p.$$childHead||p!==b&&p.$$nextSibling))for(;p!==b&&!(d=p.$$nextSibling);)p=p.$parent}while(p=d);if((c||k.length)&&!y--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,w)}while(c||k.length);for(v();S.length;)try{S.shift()()}catch(C){u(C)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===E&&f.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)b(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=g,this.$on=this.$watch=this.$watchGroup=function(){return g},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){E.$$phase||k.length||f.defer(function(){k.length&&E.$digest()}),k.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){S.push(e)},$apply:function(e){try{return h("$apply"),this.$eval(e)}catch(t){u(t)}finally{v();try{E.$digest()}catch(t){throw u(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&T.push(t),C()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);-1!==r&&(n[r]=null,b(i,1,e))}},$emit:function(e,t){var n,r,i,o=[],a=this,s=!1,l={name:e,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=W([l],arguments,1);do{for(n=a.$$listeners[e]||o,l.currentScope=a,r=0,i=n.length;i>r;r++)if(n[r])try{n[r].apply(null,c)}catch(f){u(f)}else n.splice(r,1),r--,i--;if(s)return l.currentScope=null,l;a=a.$parent}while(a);return l.currentScope=null,l},$broadcast:function(e,t){var n=this,r=n,i=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,s,l,c=W([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[e]||[],s=0,l=a.length;l>s;s++)if(a[s])try{a[s].apply(null,c)}catch(f){u(f)}else a.splice(s,1),s--,l--;if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var E=new p,k=E.$$asyncQueue=[],S=E.$$postDigestQueue=[],T=E.$$applyAsyncQueue=[];return E}]}function vn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return b(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=_n(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function mn(e){if("self"===e)return e;if(x(e)){if(e.indexOf("***")>-1)throw Zi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Hr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(k(e))return new RegExp("^"+e.source+"$");throw Zi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function yn(e){var t=[];return b(e)&&o(e,function(e){t.push(mn(e))}),t}function bn(){this.SCE_CONTEXTS=eo;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=yn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=yn(e)),t},this.$get=["$injector",function(r){function i(e,t){return"self"===e?kn(t):!!e.exec(t.href)}function o(n){var r,o,a=_n(n.toString()),s=!1;for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var r=d.hasOwnProperty(e)?d[e]:null;if(!r)throw Zi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw Zi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)}function l(e){return e instanceof f?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||t===n||""===t)return t;var r=d.hasOwnProperty(e)?d[e]:null;if(r&&t instanceof r)return t.$$unwrapTrustedValue();if(e===eo.RESOURCE_URL){if(o(t))return t;throw Zi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===eo.HTML)return c(t);throw Zi("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(e){throw Zi("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(c=r.get("$sanitize"));var f=a(),d={};return d[eo.HTML]=a(f),d[eo.CSS]=a(f),d[eo.URL]=a(f),d[eo.JS]=a(f),d[eo.RESOURCE_URL]=a(d[eo.URL]),{trustAs:s,getTrusted:u,valueOf:l}}]}function wn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>_r)throw Zi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=V(eo);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=v),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:t(n,function(t){return r.getTrusted(e,t)})};var i=r.parseAs,a=r.getTrusted,s=r.trustAs;return o(eo,function(e,t){var n=wr(t);r[$e("parse_as_"+n)]=function(t){return i(e,t)},r[$e("get_trusted_"+n)]=function(t){return a(e,t)},r[$e("trust_as_"+n)]=function(t){return s(e,t)}}),r}]}function $n(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=p((/android (\d+)/.exec(wr((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,f=!1;if(u){for(var d in u)if(r=l.exec(d)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!o||c&&f||(c=x(u.webkitTransition),f=x(u.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hasEvent:function(e){if("input"===e&&11>=_r)return!1;if(y(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:Wr(),vendorPrefix:n,transitions:c,animations:f,android:o}}]}function xn(){this.$get=["$templateCache","$http","$q",function(e,t,n){function r(i,o){function a(e){if(!o)throw Oi("tpload","Failed to load template: {0} (HTTP status: {1} {2})",i,e.status,e.statusText);return n.reject(e)}r.totalPendingRequests++;var s=t.defaults&&t.defaults.transformResponse;jr(s)?s=s.filter(function(e){return e!==yt}):s===yt&&(s=null);var l={cache:e,transformResponse:s};return t.get(i,l)["finally"](function(){r.totalPendingRequests--}).then(function(t){return e.put(i,t.data),t.data},a)}return r.totalPendingRequests=0,r}]}function Cn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),i=[];return o(r,function(e){var r=Lr.element(e).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+Hr(t)+"(\\s|\\||$)");o.test(r)&&i.push(e)}else-1!=r.indexOf(t)&&i.push(e)})}),i},r.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i0&&(u=t(a.substring(0,l)),i[u]===n&&(i[u]=t(a.substring(l+1))));return i}}function On(){this.$get=Tn}function Rn(e){function t(r,i){if(w(r)){var a={};return o(r,function(e,n){a[n]=t(n,e)}),a}return e.factory(r+n,i)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Pn),t("date",Yn),t("filter",An),t("json",Qn),t("limitTo",Xn),t("lowercase",so),t("number",Fn),t("orderBy",Jn),t("uppercase",lo)}function An(){return function(e,t,n){if(!i(e)){if(null==e)return e;throw r("filter")("notarray","Expected array but received: {0}",e)}var o,a,s=Ln(t);switch(s){case"function":o=t;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":o=Dn(t,n,a);break;default:return e}return Array.prototype.filter.call(e,o)}}function Mn(e){return _(e.toString)&&e.toString!==Object.prototype.toString}function Dn(e,t,n){var r,i=w(e)&&"$"in e;return t===!0?t=H:_(t)||(t=function(e,t){return y(e)?!1:null===e||null===t?e===t:w(t)||w(e)&&!Mn(e)?!1:(e=wr(""+e),t=wr(""+t),-1!==e.indexOf(t))}),r=function(r){return i&&!w(r)?Nn(r,e.$,t,!1):Nn(r,e,t,n)}}function Nn(e,t,n,r,i){var o=Ln(e),a=Ln(t);if("string"===a&&"!"===t.charAt(0))return!Nn(e,t.substring(1),n,r);if(jr(e))return e.some(function(e){return Nn(e,t,n,r)});switch(o){case"object":var s;if(r){for(s in e)if("$"!==s.charAt(0)&&Nn(e[s],t,n,!0))return!0;return i?!1:Nn(e,t,n,!1)}if("object"===a){for(s in t){var l=t[s];if(!_(l)&&!y(l)){var u="$"===s,c=u?e:e[s];if(!Nn(c,l,n,u,u))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Ln(e){return null===e?"null":typeof e}function Pn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return y(n)&&(n=t.CURRENCY_SYM),y(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:jn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Fn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:jn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function jn(e,t,n,r,i){if(w(e))return"";var o=0>e;e=Math.abs(e);var a=e===1/0;if(!a&&!isFinite(e))return"";var s=e+"",l="",u=!1,c=[];if(a&&(l="∞"),!a&&-1!==s.indexOf("e")){var f=s.match(/([\d\.]+)e(-?)(\d+)/);f&&"-"==f[2]&&f[3]>i+1?e=0:(l=s,u=!0)}if(a||u)i>0&&1>e&&(l=e.toFixed(i),e=parseFloat(l));else{var d=(s.split(ro)[1]||"").length;y(i)&&(i=Math.min(Math.max(t.minFrac,d),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+-i);var p=(""+e).split(ro),h=p[0];p=p[1]||"";var g,v=0,m=t.lgSize,b=t.gSize;if(h.length>=m+b)for(v=h.length-m,g=0;v>g;g++)(v-g)%b===0&&0!==g&&(l+=n),l+=h.charAt(g);for(g=v;ge&&(r="-",e=-e),e=""+e;e.length0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),In(o,t,r)}}function Hn(e,t){return function(n,r){var i=n["get"+e](),o=xr(t?"SHORT"+e:e);return r[o][i]}}function Wn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=In(Math[r>0?"floor":"ceil"](r/60),2)+In(Math.abs(r%60),2)}function Bn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function zn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Un(e){return function(t){var n=Bn(t.getFullYear()),r=zn(t),i=+r-+n,o=1+Math.round(i/6048e5);return In(o,e)}}function qn(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function Gn(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function Kn(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function Yn(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=p(t[9]+t[10]),o=p(t[9]+t[11])),a.call(r,p(t[1]),p(t[2])-1,p(t[3]));var l=p(t[4]||0)-i,u=p(t[5]||0)-o,c=p(t[6]||0),f=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,l,u,c,f),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,l="",u=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,x(n)&&(n=ao.test(n)?p(n):t(n)),C(n)&&(n=new Date(n)),!E(n)||!isFinite(n.getTime()))return n;for(;r;)s=oo.exec(r),s?(u=W(u,s,1),r=u.pop()):(u.push(r),r=null);var c=n.getTimezoneOffset();return i&&(c=K(i,n.getTimezoneOffset()),n=Q(n,i,!0)),o(u,function(t){a=io[t],l+=a?a(n,e.DATETIME_FORMATS,c):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function Qn(){return function(e,t){return y(t)&&(t=2),q(e,t)}}function Xn(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):p(t),isNaN(t)?e:(C(e)&&(e=e.toString()),jr(e)||x(e)?(n=!n||isNaN(n)?0:p(n),n=0>n&&n>=-e.length?e.length+n:n,t>=0?e.slice(n,n+t):0===n?e.slice(t,e.length):e.slice(Math.max(0,n+t),n)):e)}}function Jn(e){return function(t,n,r){function o(e,t){for(var r=0;re?-1:1):r>n?-1:1}return i(t)?(n=jr(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,r=t||v;if(x(t)){if(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(u,n);if(r=e(t),r.constant){var i=r();return a(function(e,t){return u(e[i],t[i])},n)}}return a(function(e,t){return u(r(e),r(t))},n)}),Or.call(t).sort(a(o,r))):t}}function Zn(e){return _(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function er(e,t){e.$name=t}function tr(e,t,r,i,a){var s=this,l=[],u=s.$$parentForm=e.parent().controller("form")||fo;s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,u.$addControl(s),s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){de(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e)},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),o(s.$$success,function(t,n){s.$setValidity(n,null,e)}),j(l,e)},vr({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(j(r,n),0===r.length&&delete e[t])},parentForm:u,$animate:i}),s.$setDirty=function(){i.removeClass(e,Ko),i.addClass(e,Yo),s.$dirty=!0,s.$pristine=!1,u.$setDirty()},s.$setPristine=function(){i.setClass(e,Ko,Yo+" "+po),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){i.addClass(e,po),s.$submitted=!0,u.$setSubmitted()}}function nr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function rr(e,t,n,r,i,o){ir(e,t,n,r,i,o),nr(r)}function ir(e,t,n,r,i,o){var a=wr(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(e){s=!0}),t.on("compositionend",function(){s=!1,l()})}var l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=Vr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var u,c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),r.$render=function(){t.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function or(e,t){if(E(e))return e;if(x(e)){Co.lastIndex=0;var n=Co.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,l=0,u=Bn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,u.getDate()+c,o,a,s,l)}}return NaN}function ar(e,t){return function(n,r){var i,a;if(E(n))return n;if(x(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),mo.test(n))return new Date(n);if(e.lastIndex=0,i=e.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(e,n){n=v},s.$observe("min",function(e){v=p(e),l.$validate()})}if(b(s.max)||s.ngMax){var m;l.$validators.max=function(e){return!d(e)||y(m)||r(e)<=m},s.$observe("max",function(e){m=p(e),l.$validate()})}}}function lr(e,t,r,i){var o=t[0],a=i.$$hasNativeValidators=w(o.validity);a&&i.$parsers.push(function(e){var r=t.prop(br)||{};return r.badInput&&!r.typeMismatch?n:e})}function ur(e,t,r,i,o,a){if(lr(e,t,r,i),ir(e,t,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:wo.test(e)?parseFloat(e):n}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!C(e))throw Zo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),b(r.min)||r.ngMin){var s;i.$validators.min=function(e){return i.$isEmpty(e)||y(s)||e>=s},r.$observe("min",function(e){b(e)&&!C(e)&&(e=parseFloat(e,10)),s=C(e)&&!isNaN(e)?e:n,i.$validate()})}if(b(r.max)||r.ngMax){var l;i.$validators.max=function(e){return i.$isEmpty(e)||y(l)||l>=e},r.$observe("max",function(e){b(e)&&!C(e)&&(e=parseFloat(e,10)),l=C(e)&&!isNaN(e)?e:n,i.$validate()})}}function cr(e,t,n,r,i,o){ir(e,t,n,r,i,o),nr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||yo.test(n)}}function fr(e,t,n,r,i,o){ir(e,t,n,r,i,o),nr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||bo.test(n)}}function dr(e,t,n,r){y(n.name)&&t.attr("name",l());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function pr(e,t,n,i,o){var a;if(b(i)){if(a=e(i),!a.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return a(t)}return o}function hr(e,t,n,r,i,o,a,s){var l=pr(s,e,"ngTrueValue",n.ngTrueValue,!0),u=pr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return H(e,l)}),r.$parsers.push(function(e){return e?l:u})}function gr(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function d(e,t){var i=r(t,e),o=r(e,t);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||a.$index%2===t){var n=i(e||[]);if(h){if(!H(e,h)){var r=i(h);d(r,n)}}else u(n)}h=V(e)}var h;a.$watch(l[e],p,!0),l.$observe("class",function(t){p(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(l[e]));o===t?u(s):c(s)}})}}}]}function vr(e){function t(e,t,l){t===n?r("$pending",e,l):i("$pending",e,l),M(t)?t?(f(s.$error,e,l),c(s.$$success,e,l)):(c(s.$error,e,l),f(s.$$success,e,l)):(f(s.$error,e,l),f(s.$$success,e,l)),s.$pending?(o(Jo,!0),s.$valid=s.$invalid=n,a("",null)):(o(Jo,!1),s.$valid=mr(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var u;u=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,u),d.$setValidity(e,u,s)}function r(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function i(e,t,r){s[e]&&f(s[e],t,r),mr(s[e])&&(s[e]=n)}function o(e,t){t&&!u[e]?(p.addClass(l,e),u[e]=!0):!t&&u[e]&&(p.removeClass(l,e),u[e]=!1)}function a(e,t){e=e?"-"+le(e,"-"):"",o(qo+e,t===!0),o(Go+e,t===!1)}var s=e.ctrl,l=e.$element,u={},c=e.set,f=e.unset,d=e.parentForm,p=e.$animate;u[Go]=!(u[qo]=l.hasClass(qo)),s.$setValidity=t}function mr(e){if(e)for(var t in e)return!1;return!0}var yr=/^\/(.+)\/([a-z]*)$/,br="validity",wr=function(e){return x(e)?e.toLowerCase():e},$r=Object.prototype.hasOwnProperty,xr=function(e){return x(e)?e.toUpperCase():e},Cr=function(e){return x(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Er=function(e){return x(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(wr=Cr,xr=Er);var _r,kr,Sr,Tr,Or=[].slice,Rr=[].splice,Ar=[].push,Mr=Object.prototype.toString,Dr=Object.getPrototypeOf,Nr=r("ng"),Lr=e.angular||(e.angular={}),Pr=0;_r=t.documentMode,g.$inject=[],v.$inject=[];var Fr,jr=Array.isArray,Ir=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,Vr=function(e){return x(e)?e.trim():e},Hr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#n;++n)if(r=zr[n],e=t.querySelector("["+r.replace(":","\\:")+"jq]")){i=e.getAttribute(r+"jq");break}return Br.name_=i},zr=["ng-","data-ng-","ng:","x-ng-"],Ur=/[A-Z]/g,qr=!1,Gr=1,Kr=2,Yr=3,Qr=8,Xr=9,Jr=11,Zr={full:"1.4.0",major:1,minor:4,dot:0,codeName:"jaracimrman-existence"};ke.expando="ng339";var ei=ke.cache={},ti=1,ni=function(e,t,n){e.addEventListener(t,n,!1)},ri=function(e,t,n){e.removeEventListener(t,n,!1)};ke._data=function(e){return this.cache[e[this.expando]]||{}};var ii=/([\:\-\_]+(.))/g,oi=/^moz([A-Z])/,ai={mouseleave:"mouseout",mouseenter:"mouseover"},si=r("jqLite"),li=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ui=/<|&#?\w+;/,ci=/<([\w:]+)/,fi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,di={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};di.optgroup=di.option,di.tbody=di.tfoot=di.colgroup=di.caption=di.thead,di.th=di.td;var pi=ke.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),ke(e).on("load",r))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return kr(e>=0?this[e]:this[this.length+e])},length:0,push:Ar,sort:[].sort,splice:[].splice},hi={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){hi[wr(e)]=e});var gi={};o("input,select,option,textarea,button,form,details".split(","),function(e){gi[e]=!0});var vi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Me,removeData:Re},function(e,t){ke[t]=e}),o({data:Me,inheritedData:je,scope:function(e){return kr.data(e,"$scope")||je(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return kr.data(e,"$isolateScope")||kr.data(e,"$isolateScopeNoTemplate")},controller:Fe,injector:function(e){return je(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:De,css:function(e,t,n){return t=$e(t),b(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,r){var i=e.nodeType;if(i!==Yr&&i!==Kr&&i!==Qr){var o=wr(t);if(hi[o]){if(!b(r))return e[t]||(e.attributes.getNamedItem(t)||g).specified?o:n;r?(e[t]=!0,e.setAttribute(t,o)):(e[t]=!1,e.removeAttribute(o))}else if(b(r))e.setAttribute(t,r);else if(e.getAttribute){var a=e.getAttribute(t,2);return null===a?n:a}}},prop:function(e,t,n){return b(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(y(t)){var n=e.nodeType;return n===Gr||n===Yr?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(y(t)){if(e.multiple&&"select"===F(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){ -return y(t)?e.innerHTML:(Te(e,!0),void(e.innerHTML=t))},empty:Ie},function(e,t){ke.prototype[t]=function(t,r){var i,o,a=this.length;if(e!==Ie&&(2==e.length&&e!==De&&e!==Fe?t:r)===n){if(w(t)){for(i=0;a>i;i++)if(e===Me)e(this[i],t);else for(o in t)e(this[i],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,u=0;l>u;u++){var c=e(this[u],t,r);s=s?s+c:c}return s}for(i=0;a>i;i++)e(this[i],t,r);return this}}),o({removeData:Re,on:function Oa(e,t,n,r){if(b(r))throw si("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(Ce(e)){var i=Ae(e,!0),o=i.events,a=i.handle;a||(a=i.handle=ze(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var u=o[t];u||(o[t]=[],"mouseenter"===t||"mouseleave"===t?Oa(e,ai[t],function(e){var n=this,r=e.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(e,t)}):"$destroy"!==t&&ni(e,t,a),u=o[t]),u.push(n)}}},off:Oe,one:function(e,t,n){e=kr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;Te(e),o(new ke(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===Gr&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===Gr||n===Jr){t=new ke(t);for(var r=0,i=t.length;i>r;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===Gr){var n=e.firstChild;o(new ke(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=kr(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Ve,detach:function(e){Ve(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new ke(t);for(var i=0,o=t.length;o>i;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Le,removeClass:Ne,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var r=n;y(r)&&(r=!De(e,t)),(r?Le:Ne)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Jr?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Se,triggerHandler:function(e,t,n){var r,i,a,s=t.type||t,l=Ae(e),u=l&&l.events,c=u&&u[s];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:g,type:s,target:e},t.type&&(r=f(r,t)),i=V(c),a=n?[r].concat(n):[r],o(i,function(t){r.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){ke.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;a>o;o++)y(i)?(i=e(this[o],t,n,r),b(i)&&(i=kr(i))):Pe(i,e(this[o],t,n,r));return b(i)?i:this},ke.prototype.bind=ke.prototype.on,ke.prototype.unbind=ke.prototype.off}),Ge.prototype={put:function(e,t){this[qe(e,this.nextUid)]=t},get:function(e){return this[qe(e,this.nextUid)]},remove:function(e){var t=this[e=qe(e,this.nextUid)];return delete this[e],t}};var mi=[function(){this.$get=[function(){return Ge}]}],yi=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,bi=/,/,wi=/^\s*(_?)(\S+?)\1\s*$/,$i=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,xi=r("$injector");Qe.$$annotate=Ye;var Ci=r("$animate"),Ei=1,_i="ng-animate",ki=function(){this.$get=["$q","$$rAF",function(e,t){function n(){}return n.all=g,n.chain=g,n.prototype={end:g,cancel:g,resume:g,pause:g,complete:g,then:function(n,r){return e(function(e){t(function(){e()})}).then(n,r)}},n}]},Si=function(){var e=new Ge,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,r){function i(n,i,a){var s=e.get(n);s||(e.put(n,s={}),t.push(n)),i&&o(i.split(" "),function(e){e&&(s[e]=!0)}),a&&o(a.split(" "),function(e){e&&(s[e]=!1)}),t.length>1||r.$$postDigest(function(){o(t,function(t){var n=e.get(t);if(n){var r=et(t.attr("class")),i="",a="";o(n,function(e,t){var n=!!r[t];e!==n&&(e?i+=(i.length?" ":"")+t:a+=(a.length?" ":"")+t)}),o(t,function(e){i&&Le(e,i),a&&Ne(e,a)}),e.remove(t)}}),t.length=0})}return{enabled:g,on:g,off:g,pin:g,push:function(e,t,r,o){return o&&o(),r=r||{},r.from&&e.css(r.from),r.to&&e.css(r.to),(r.addClass||r.removeClass)&&i(e,r.addClass,r.removeClass),new n}}}]},Ti=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Ci("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+_i+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Ci("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',_i)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=Ze(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,r,i,o){return r=r&&kr(r),i=i&&kr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",tt(o))},move:function(n,r,i,o){return r=r&&kr(r),i=i&&kr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",tt(o))},leave:function(t,n){return e.push(t,"leave",tt(n),function(){t.remove()})},addClass:function(t,n,r){return r=tt(r),r.addClass=Je(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=tt(r),r.removeClass=Je(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=tt(i),i.addClass=Je(i.addClass,n),i.removeClass=Je(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=tt(o),o.from=o.from?f(o.from,n):n,o.to=o.to?f(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=Je(o.tempClasses,i),e.push(t,"animate",o)}}}]}],Oi=r("$compile");st.$inject=["$provide","$$sanitizeUriProvider"];var Ri=/^((?:x|data)[\:\-_])/i,Ai=r("$controller"),Mi=/^(\S+)(\s+as\s+(\w+))?$/,Di="application/json",Ni={"Content-Type":Di+";charset=utf-8"},Li=/^\[|^\{(?!\{)/,Pi={"[":/]$/,"{":/}$/},Fi=/^\)\]\}',?\n/,ji=Lr.$interpolateMinErr=r("$interpolate");ji.throwNoconcat=function(e){throw ji("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},ji.interr=function(e,t){return ji("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Ii=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Vi={http:80,https:443,ftp:21},Hi=r("$location"),Wi={$$html5:!1,$$replace:!1,absUrl:Wt("$$absUrl"),url:function(e){if(y(e))return this.$$url;var t=Ii.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Wt("$$protocol"),host:Wt("$$host"),port:Wt("$$port"),path:Bt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(x(e)||C(e))e=e.toString(),this.$$search=Z(e);else{if(!w(e))throw Hi("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=I(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:y(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Bt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Ht,Vt,It],function(e){e.prototype=Object.create(Wi),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==It||!this.$$html5)throw Hi("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=y(t)?null:t,this}});var Bi=r("$parse"),zi=Function.prototype.call,Ui=Function.prototype.apply,qi=Function.prototype.bind,Gi=ge();o("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Gi[e]=!0});var Ki={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},Yi=function(e){this.options=e};Yi.prototype={constructor:Yi,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index="0"&&"9">=e&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||" "===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=b(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Bi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:Qi.Program,body:e}},expressionStatement:function(){return{type:Qi.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:Qi.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:Qi.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:Qi.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:Qi.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:Qi.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:Qi.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.constants.hasOwnProperty(this.peek().text)?e=I(this.constants[this.consume().text]):this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:Qi.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:Qi.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:Qi.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:Qi.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.expression());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:Qi.Identifier,name:e.text}},constant:function(){return{type:Qi.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:Qi.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:Qi.Property,kind:"init"},this.peek().constant?e.key=this.constant():this.peek().identifier?e.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),e.value=this.expression(),t.push(e)}while(this.expect(","));return this.consume("}"),{type:Qi.ObjectExpression,properties:t}},throwError:function(e,t){throw Bi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw Bi("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw Bi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return i?(this.tokens.shift(),i):!1},constants:{"true":{type:Qi.Literal,value:!0},"false":{type:Qi.Literal,value:!1},"null":{type:Qi.Literal,value:null},undefined:{type:Qi.Literal,value:n},"this":{type:Qi.ThisExpression}}},on.prototype={compile:function(e,t){var r=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Jt(i,r.$filter);var a,s="";if(this.stage="assign",a=tn(i)){this.state.computing="assign";var l=this.nextId();this.recurse(a,l),s="fn.assign="+this.generateFunction("assign","s,v,l")}var u=Zt(i.body);r.stage="inputs",o(u,function(e,t){var n="fn"+t;r.state[n]={vars:[],body:[],own:{}},r.state.computing=n;var i=r.nextId();r.recurse(e,i),r.return_(i),r.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+s+this.watchFns()+"return fn;",f=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","ifDefined","plus","text",c)(this.$filter,qt,Gt,Kt,Yt,Qt,e);return this.state=this.stage=n,f.literal=nn(i),f.constant=rn(i),f},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return o(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return o(this.state.filters,function(n,r){e.push(n+"=$filter("+t.escape(r)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,r,i,a,s){var l,u,c,f,d=this;if(i=i||g,!s&&b(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,r,i,a,!0));switch(e.type){case Qi.Program:o(e.body,function(t,r){d.recurse(t.expression,n,n,function(e){u=e}),r!==e.body.length-1?d.current().body.push(u,";"):d.return_(u)});break;case Qi.Literal:f=this.escape(e.value),this.assign(t,f),i(f);break;case Qi.UnaryExpression:this.recurse(e.argument,n,n,function(e){u=e}),f=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,f),i(f);break;case Qi.BinaryExpression:this.recurse(e.left,n,n,function(e){l=e}),this.recurse(e.right,n,n,function(e){u=e}),f="+"===e.operator?this.plus(l,u):"-"===e.operator?this.ifDefined(l,0)+e.operator+this.ifDefined(u,0):"("+l+")"+e.operator+"("+u+")",this.assign(t,f),i(f);break;case Qi.LogicalExpression:t=t||this.nextId(),d.recurse(e.left,t),d.if_("&&"===e.operator?t:d.not(t),d.lazyRecurse(e.right,t)),i(t);break;case Qi.ConditionalExpression:t=t||this.nextId(),d.recurse(e.test,t),d.if_(t,d.lazyRecurse(e.alternate,t),d.lazyRecurse(e.consequent,t)),i(t);break;case Qi.Identifier:t=t||this.nextId(),r&&(r.context="inputs"===d.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),r.computed=!1,r.name=e.name),qt(e.name),d.if_("inputs"===d.stage||d.not(d.getHasOwnProperty("l",e.name)),function(){d.if_("inputs"===d.stage||"s",function(){a&&1!==a&&d.if_(d.not(d.nonComputedMember("s",e.name)),d.lazyAssign(d.nonComputedMember("s",e.name),"{}")),d.assign(t,d.nonComputedMember("s",e.name))})},t&&d.lazyAssign(t,d.nonComputedMember("l",e.name))),(d.state.expensiveChecks||ln(e.name))&&d.addEnsureSafeObject(t),i(t);break;case Qi.MemberExpression:l=r&&(r.context=this.nextId())||this.nextId(),t=t||this.nextId(),d.recurse(e.object,l,n,function(){d.if_(d.notNull(l),function(){e.computed?(u=d.nextId(),d.recurse(e.property,u),d.addEnsureSafeMemberName(u),a&&1!==a&&d.if_(d.not(d.computedMember(l,u)),d.lazyAssign(d.computedMember(l,u),"{}")),f=d.ensureSafeObject(d.computedMember(l,u)),d.assign(t,f),r&&(r.computed=!0,r.name=u)):(qt(e.property.name),a&&1!==a&&d.if_(d.not(d.nonComputedMember(l,e.property.name)),d.lazyAssign(d.nonComputedMember(l,e.property.name),"{}")),f=d.nonComputedMember(l,e.property.name),(d.state.expensiveChecks||ln(e.property.name))&&(f=d.ensureSafeObject(f)),d.assign(t,f),r&&(r.computed=!1,r.name=e.property.name)),i(t)})},!!a);break;case Qi.CallExpression:t=t||this.nextId(),e.filter?(u=d.filter(e.callee.name),c=[],o(e.arguments,function(e){var t=d.nextId();d.recurse(e,t),c.push(t)}),f=u+"("+c.join(",")+")",d.assign(t,f),i(t)):(u=d.nextId(),l={},c=[],d.recurse(e.callee,u,l,function(){d.if_(d.notNull(u),function(){d.addEnsureSafeFunction(u),o(e.arguments,function(e){d.recurse(e,d.nextId(),n,function(e){c.push(d.ensureSafeObject(e))})}),l.name?(d.state.expensiveChecks||d.addEnsureSafeObject(l.context),f=d.member(l.context,l.name,l.computed)+"("+c.join(",")+")"):f=u+"("+c.join(",")+")",f=d.ensureSafeObject(f),d.assign(t,f),i(t)})}));break;case Qi.AssignmentExpression:if(u=this.nextId(),l={},!en(e.left))throw Bi("lval","Trying to assing a value to a non l-value");this.recurse(e.left,n,l,function(){d.if_(d.notNull(l.context),function(){d.recurse(e.right,u),d.addEnsureSafeObject(d.member(l.context,l.name,l.computed)),f=d.member(l.context,l.name,l.computed)+e.operator+u,d.assign(t,f),i(t||f)})},1);break;case Qi.ArrayExpression:c=[],o(e.elements,function(e){d.recurse(e,d.nextId(),n,function(e){c.push(e)})}),f="["+c.join(",")+"]",this.assign(t,f),i(f);break;case Qi.ObjectExpression:c=[],o(e.properties,function(e){d.recurse(e.value,d.nextId(),n,function(t){c.push(d.escape(e.key.type===Qi.Identifier?e.key.name:""+e.key.value)+":"+t)})}),f="{"+c.join(",")+"}",this.assign(t,f),i(f);break;case Qi.ThisExpression:this.assign(t,"s"),i("s");break;case Qi.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){return e?(this.current().body.push(e,"=",t,";"),e):void 0},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return e+"."+t},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(x(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(C(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw Bi("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},an.prototype={compile:function(e,t){var n=this,r=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,Jt(r,n.$filter);var i,a;(i=tn(r))&&(a=this.recurse(i));var s,l=Zt(r.body);l&&(s=[],o(l,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var u=[];o(r.body,function(e){u.push(n.recurse(e.expression))});var c=0===r.body.length?function(){}:1===r.body.length?u[0]:function(e,t){var n;return o(u,function(r){n=r(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=nn(r),c.constant=rn(r),c},recurse:function(e,t,r){var i,a,s,l=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case Qi.Literal:return this.value(e.value,t);case Qi.UnaryExpression:return a=this.recurse(e.argument),this["unary"+e.operator](a,t);case Qi.BinaryExpression:return i=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](i,a,t);case Qi.LogicalExpression:return i=this.recurse(e.left),a=this.recurse(e.right),this["binary"+e.operator](i,a,t);case Qi.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case Qi.Identifier:return qt(e.name,l.expression),l.identifier(e.name,l.expensiveChecks||ln(e.name),t,r,l.expression);case Qi.MemberExpression:return i=this.recurse(e.object,!1,!!r),e.computed||(qt(e.property.name,l.expression),a=e.property.name),e.computed&&(a=this.recurse(e.property)),e.computed?this.computedMember(i,a,t,r,l.expression):this.nonComputedMember(i,a,l.expensiveChecks,t,r,l.expression);case Qi.CallExpression:return s=[],o(e.arguments,function(e){s.push(l.recurse(e))}),e.filter&&(a=this.$filter(e.callee.name)),e.filter||(a=this.recurse(e.callee,!0)),e.filter?function(e,r,i,o){for(var l=[],u=0;u":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>t(r,i,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<=t(r,i,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>=t(r,i,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)&&t(r,i,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)||t(r,i,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,r){return function(i,o,a,s){var l=e(i,o,a,s)?t(i,o,a,s):n(i,o,a,s);return r?{value:l}:l}},value:function(e,t){return function(){return t?{context:n,name:n,value:e}:e}},identifier:function(e,t,r,i,o){return function(a,s,l,u){var c=s&&e in s?s:a;i&&1!==i&&c&&!c[e]&&(c[e]={});var f=c?c[e]:n;return t&&Gt(f,o),r?{context:c,name:e,value:f}:f}},computedMember:function(e,t,n,r,i){return function(o,a,s,l){var u,c,f=e(o,a,s,l);return null!=f&&(u=t(o,a,s,l),qt(u,i),r&&1!==r&&f&&!f[u]&&(f[u]={}),c=f[u],Gt(c,i)),n?{context:f,name:u,value:c}:c}},nonComputedMember:function(e,t,r,i,o,a){return function(s,l,u,c){var f=e(s,l,u,c);o&&1!==o&&f&&!f[t]&&(f[t]={});var d=null!=f?f[t]:n;return(r||ln(t))&&Gt(d,a),i?{context:f,name:t,value:d}:d}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var Xi=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new Qi(this.lexer),this.astCompiler=n.csp?new an(this.ast,t):new on(this.ast,t)};Xi.prototype={constructor:Xi,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var Ji=(ge(),ge(),Object.prototype.valueOf),Zi=r("$sce"),eo={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Oi=r("$compile"),to=t.createElement("a"),no=_n(e.location.href);Tn.$inject=["$document"],Rn.$inject=["$provide"],Pn.$inject=["$locale"],Fn.$inject=["$locale"];var ro=".",io={yyyy:Vn("FullYear",4),yy:Vn("FullYear",2,0,!0),y:Vn("FullYear",1),MMMM:Hn("Month"),MMM:Hn("Month",!0),MM:Vn("Month",2,1),M:Vn("Month",1,1),dd:Vn("Date",2),d:Vn("Date",1),HH:Vn("Hours",2),H:Vn("Hours",1),hh:Vn("Hours",2,-12),h:Vn("Hours",1,-12),mm:Vn("Minutes",2),m:Vn("Minutes",1),ss:Vn("Seconds",2),s:Vn("Seconds",1),sss:Vn("Milliseconds",3),EEEE:Hn("Day"),EEE:Hn("Day",!0),a:qn,Z:Wn,ww:Un(2),w:Un(1),G:Gn,GG:Gn,GGG:Gn,GGGG:Kn},oo=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,ao=/^\-?\d+$/;Yn.$inject=["$locale"];var so=m(wr),lo=m(xr);Jn.$inject=["$parse"];var uo=m({restrict:"E",compile:function(e,t){return t.href||t.xlinkHref?void 0:function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Mr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),co={};o(hi,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!=e){var r=lt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),co[r]=function(){return{restrict:"A",priority:100,link:i}}}}),o(vi,function(e,t){co[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(yr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=lt("ng-"+e);co[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Mr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(_r&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null)); -})}}}});var fo={$addControl:g,$$renameControl:er,$removeControl:g,$setValidity:g,$setDirty:g,$setPristine:g,$setSubmitted:g},po="ng-submitted";tr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var ho=function(e){return["$timeout",function(t){var r={name:"form",restrict:e?"EAC":"E",controller:tr,compile:function(r,i){r.addClass(Ko).addClass(qo);var o=i.name?"name":e&&i.ngForm?"ngForm":!1;return{pre:function(e,r,i,a){if(!("action"in i)){var s=function(t){e.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),t.preventDefault()};ni(r[0],"submit",s),r.on("$destroy",function(){t(function(){ri(r[0],"submit",s)},0,!1)})}var l=a.$$parentForm;o&&(sn(e,a.$name,a,a.$name),i.$observe(o,function(t){a.$name!==t&&(sn(e,a.$name,n,a.$name),l.$$renameControl(a,t),sn(e,a.$name,a,a.$name))})),r.on("$destroy",function(){l.$removeControl(a),o&&sn(e,i[o],n,a.$name),f(a,fo)})}}}};return r}]},go=ho(),vo=ho(!0),mo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,yo=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,bo=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,wo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,$o=/^(\d{4})-(\d{2})-(\d{2})$/,xo=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Co=/^(\d{4})-W(\d\d)$/,Eo=/^(\d{4})-(\d\d)$/,_o=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ko={text:rr,date:sr("date",$o,ar($o,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":sr("datetimelocal",xo,ar(xo,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:sr("time",_o,ar(_o,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:sr("week",Co,or,"yyyy-Www"),month:sr("month",Eo,ar(Eo,["yyyy","MM"]),"yyyy-MM"),number:ur,url:cr,email:fr,radio:dr,checkbox:hr,hidden:g,button:g,submit:g,reset:g,file:g},So=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(ko[wr(a.type)]||ko.text)(i,o,a,s[0],t,e,n,r)}}}}],To=/^(true|false|\d+)$/,Oo=function(){return{restrict:"A",priority:100,compile:function(e,t){return To.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Ro=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,r,i){e.$$addBindingInfo(r,i.ngBind),r=r[0],t.$watch(i.ngBind,function(e){r.textContent=e===n?"":e})}}}}],Ao=["$interpolate","$compile",function(e,t){return{compile:function(r){return t.$$addBindingClass(r),function(r,i,o){var a=e(i.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(i,a.expressions),i=i[0],o.$observe("ngBindTemplate",function(e){i.textContent=e===n?"":e})}}}}],Mo=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){r.html(e.getTrustedHtml(o(t))||"")})}}}}],Do=m({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),No=gr("",!0),Lo=gr("Odd",0),Po=gr("Even",1),Fo=Zn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),jo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Io={},Vo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=lt("ng-"+e);Io[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};Vo[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var Ho=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,l,u;n.$watch(i.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=he(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],Wo=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Lr.noop,compile:function(i,o){var a=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(i,o,u,c,f){var d,p,h,g=0,v=function(){p&&(p.remove(),p=null),d&&(d.$destroy(),d=null),h&&(n.leave(h).then(function(){p=null}),p=h,h=null)};i.$watch(r.parseAsResourceUrl(a),function(r){var a=function(){!b(l)||l&&!i.$eval(l)||t()},u=++g;r?(e(r,!0).then(function(e){if(u===g){var t=i.$new();c.template=e;var l=f(t,function(e){v(),n.enter(e,null,o).then(a)});d=t,h=l,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){u===g&&(v(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(v(),c.template=null)})}}}}],Bo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void e(Ee(o.template,t).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void e(r.contents())(n))}}}],zo=Zn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Uo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,i){var a=t.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,l=s?Vr(a):a,u=function(e){if(!y(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?Vr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){return jr(e)?e.join(a):n}),i.$isEmpty=function(e){return!e||!e.length}}}},qo="ng-valid",Go="ng-invalid",Ko="ng-pristine",Yo="ng-dirty",Qo="ng-untouched",Xo="ng-touched",Jo="ng-pending",Zo=new r("ngModel"),ea=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,i,a,s,l,u,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(e);var d,p=a(r.ngModel),h=p.assign,v=p,m=h,w=null,$=this;this.$$setOptions=function(e){if($.$options=e,e&&e.getterSetter){var t=a(r.ngModel+"()"),n=a(r.ngModel+"($$$p)");v=function(e){var n=p(e);return _(n)&&(n=t(e)),n},m=function(e,t){_(p(e))?n(e,{$$$p:$.$modelValue}):h(e,$.$modelValue)}}else if(!p.assign)throw Zo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,X(i))},this.$render=g,this.$isEmpty=function(e){return y(e)||""===e||null===e||e!==e};var x=i.inheritedData("$formController")||fo,E=0;vr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:x,$animate:s}),this.$setPristine=function(){$.$dirty=!1,$.$pristine=!0,s.removeClass(i,Yo),s.addClass(i,Ko)},this.$setDirty=function(){$.$dirty=!0,$.$pristine=!1,s.removeClass(i,Ko),s.addClass(i,Yo),x.$setDirty()},this.$setUntouched=function(){$.$touched=!1,$.$untouched=!0,s.setClass(i,Qo,Xo)},this.$setTouched=function(){$.$touched=!0,$.$untouched=!1,s.setClass(i,Xo,Qo)},this.$rollbackViewValue=function(){l.cancel(w),$.$viewValue=$.$$lastCommittedViewValue,$.$render()},this.$validate=function(){if(!C($.$modelValue)||!isNaN($.$modelValue)){var e=$.$$lastCommittedViewValue,t=$.$$rawModelValue,r=$.$valid,i=$.$modelValue,o=$.$options&&$.$options.allowInvalid;$.$$runValidators(t,e,function(e){o||r===e||($.$modelValue=e?t:n,$.$modelValue!==i&&$.$$writeModelToScope())})}},this.$$runValidators=function(e,t,r){function i(){var e=$.$$parserName||"parse";return d!==n?(d||(o($.$validators,function(e,t){l(t,null)}),o($.$asyncValidators,function(e,t){l(t,null)})),l(e,d),d):(l(e,null),!0)}function a(){var n=!0;return o($.$validators,function(r,i){var o=r(e,t);n=n&&o,l(i,o)}),n?!0:(o($.$asyncValidators,function(e,t){l(t,null)}),!1)}function s(){var r=[],i=!0;o($.$asyncValidators,function(o,a){var s=o(e,t);if(!D(s))throw Zo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(a,n),r.push(s.then(function(){l(a,!0)},function(e){i=!1,l(a,!1)}))}),r.length?c.all(r).then(function(){u(i)},g):u(!0)}function l(e,t){f===E&&$.$setValidity(e,t)}function u(e){f===E&&r(e)}E++;var f=E;return i()&&a()?void s():void u(!1)},this.$commitViewValue=function(){var e=$.$viewValue;l.cancel(w),($.$$lastCommittedViewValue!==e||""===e&&$.$$hasNativeValidators)&&($.$$lastCommittedViewValue=e,$.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){$.$modelValue!==a&&$.$$writeModelToScope()}var r=$.$$lastCommittedViewValue,i=r;if(d=y(i)?n:!0)for(var o=0;o<$.$parsers.length;o++)if(i=$.$parsers[o](i),y(i)){d=!1;break}C($.$modelValue)&&isNaN($.$modelValue)&&($.$modelValue=v(e));var a=$.$modelValue,s=$.$options&&$.$options.allowInvalid;$.$$rawModelValue=i,s&&($.$modelValue=i,t()),$.$$runValidators(i,$.$$lastCommittedViewValue,function(e){s||($.$modelValue=e?i:n,t())})},this.$$writeModelToScope=function(){m(e,$.$modelValue),o($.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){$.$viewValue=e,(!$.$options||$.$options.updateOnDefault)&&$.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=$.$options;i&&b(i.debounce)&&(n=i.debounce,C(n)?r=n:C(n[t])?r=n[t]:C(n["default"])&&(r=n["default"])),l.cancel(w),r?w=l(function(){$.$commitViewValue()},r):u.$$phase?$.$commitViewValue():e.$apply(function(){$.$commitViewValue()})},e.$watch(function(){var t=v(e);if(t!==$.$modelValue&&($.$modelValue===$.$modelValue||t===t)){$.$modelValue=$.$$rawModelValue=t,d=n;for(var r=$.$formatters,i=r.length,o=t;i--;)o=r[i](o);$.$viewValue!==o&&($.$viewValue=$.$$lastCommittedViewValue=o,$.$render(),$.$$runValidators(t,o,g))}return t})}],ta=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:ea,priority:1,compile:function(t){return t.addClass(Ko).addClass(Qo).addClass(qo),{pre:function(e,t,n,r){var i=r[0],o=r[1]||fo;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&o.$$renameControl(i,e)}),e.$on("$destroy",function(){o.$removeControl(i)})},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(n){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],na=/(\s+|^)default(\s+|$)/,ra=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var r=this;this.$options=I(e.$eval(t.ngModelOptions)),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=Vr(this.$options.updateOn.replace(na,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ia=Zn({terminal:!0,priority:1e3}),oa=r("ngOptions"),aa=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,sa=["$compile","$parse",function(e,n){function r(e,t,r){function o(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}var a=e.match(aa);if(!a)throw oa("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,X(t));var s=a[5]||a[7],l=a[6],u=/ as /.test(a[0])&&a[1],c=a[9],f=n(a[2]?a[1]:s),d=u&&n(u),p=d||f,h=c&&n(c),g=c?function(e,t){return h(r,t)}:function(e){return qe(e)},v=function(e,t){return g(e,x(e,t))},m=n(a[2]||a[1]),y=n(a[3]||""),b=n(a[4]||""),w=n(a[8]),$={},x=l?function(e,t){return $[l]=t,$[s]=e,$}:function(e){return $[s]=e,$};return{trackBy:c,getTrackByValue:v,getWatchables:n(w,function(e){var t=[];return e=e||[],Object.keys(e).forEach(function(n){var i=x(e[n],n),o=g(e[n],i);if(t.push(o),a[2]||a[1]){var s=m(r,i);t.push(s)}if(a[4]){var l=b(r,i);t.push(l)}}),t}),getOptions:function(){var e,t=[],n={},a=w(r)||[];if(!l&&i(a))e=a;else{e=[];for(var s in a)a.hasOwnProperty(s)&&"$"!==s.charAt(0)&&e.push(s)}for(var u=e.length,f=0;u>f;f++){var d=a===e?f:e[f],h=a[d],$=x(h,d),C=p(r,$),E=g(C,$),_=m(r,$),k=y(r,$),S=b(r,$),T=new o(E,C,_,k,S);t.push(T),n[E]=T}return{items:t,selectValueMap:n,getOptionFromViewValue:function(e){return n[v(e)]},getViewValueFromOption:function(e){return c?Lr.copy(e.viewValue):e.viewValue}}}}}var a=t.createElement("option"),s=t.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(t,n,i,l){function u(e,t){e.element=t,t.disabled=e.disabled,e.value!==t.value&&(t.value=e.selectValue),e.label!==t.label&&(t.label=e.label,t.textContent=e.label)}function c(e,t,n,r){var i;return t&&wr(t.nodeName)===n?i=t:(i=r.cloneNode(!1),t?e.insertBefore(i,t):e.appendChild(i)),i}function f(e){for(var t;e;)t=e.nextSibling,Ve(e),e=t}function d(e){var t=g&&g[0],n=x&&x[0];if(t||n)for(;e&&(e===t||e===n);)e=e.nextSibling;return e}function p(){var e=C&&v.readValue();C=E.getOptions();var t={},r=n[0].firstChild;if($&&n.prepend(g),r=d(r),C.items.forEach(function(e){var i,o,l;e.group?(i=t[e.group],i||(o=c(n[0],r,"optgroup",s),r=o.nextSibling,o.label=e.group,i=t[e.group]={groupElement:o,currentOptionElement:o.firstChild}),l=c(i.groupElement,i.currentOptionElement,"option",a),u(e,l),i.currentOptionElement=l.nextSibling):(l=c(n[0],r,"option",a),u(e,l),r=l.nextSibling)}),Object.keys(t).forEach(function(e){f(t[e].currentOptionElement)}),f(r),h.$render(),!h.$isEmpty(e)){var i=v.readValue();(E.trackBy&&!H(e,i)||e!==i)&&(h.$setViewValue(i),h.$render())}}var h=l[1];if(h){for(var g,v=l[0],m=i.multiple,y=0,b=n.children(),w=b.length;w>y;y++)if(""===b[y].value){g=b.eq(y);break}var $=!!g,x=kr(a.cloneNode(!1));x.val("?");var C,E=r(i.ngOptions,n,t),_=function(){$||n.prepend(g),n.val(""),g.prop("selected",!0),g.attr("selected",!0)},k=function(){$||g.remove()},S=function(){n.prepend(x),n.val("?"),x.prop("selected",!0),x.attr("selected",!0)},T=function(){x.remove()};m?(h.$isEmpty=function(e){return!e||0===e.length},v.writeValue=function(e){C.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=C.getOptionFromViewValue(e);t&&!t.disabled&&(t.element.selected=!0)})},v.readValue=function(){var e=n.val()||[],t=[];return o(e,function(e){var n=C.selectValueMap[e];n.disabled||t.push(C.getViewValueFromOption(n))}),t},E.trackBy&&t.$watchCollection(function(){return jr(h.$viewValue)?h.$viewValue.map(function(e){return E.getTrackByValue(e)}):void 0},function(){h.$render()})):(v.writeValue=function(e){var t=C.getOptionFromViewValue(e);t&&!t.disabled?n[0].value!==t.selectValue&&(T(),k(),n[0].value=t.selectValue,t.element.selected=!0,t.element.setAttribute("selected","selected")):null===e||$?(T(),_()):(k(),S())},v.readValue=function(){var e=C.selectValueMap[n.val()];return e&&!e.disabled?(k(),T(),C.getViewValueFromOption(e)):null},E.trackBy&&t.$watch(function(){return E.getTrackByValue(h.$viewValue)},function(){h.$render()})),$?(g.remove(),e(g)(t),g.removeClass("ng-scope")):g=kr(a.cloneNode(!1)),p(),t.$watchCollection(E.getWatchables,p)}}}}],la=["$locale","$interpolate","$log",function(e,t,n){var r=/{}/g,i=/^when(Minus)?(.+)$/;return{link:function(a,s,l){function u(e){s.text(e||"")}var c,f=l.count,d=l.$attr.when&&s.attr(l.$attr.when),p=l.offset||0,h=a.$eval(d)||{},v={},m=t.startSymbol(),b=t.endSymbol(),w=m+f+"-"+p+b,$=Lr.noop;o(l,function(e,t){var n=i.exec(t);if(n){var r=(n[1]?"-":"")+wr(n[2]);h[r]=s.attr(l.$attr[t])}}),o(h,function(e,n){v[n]=t(e.replace(r,w))}),a.$watch(f,function(t){var r=parseFloat(t),i=isNaN(r);if(i||r in h||(r=e.pluralCat(r-p)),r!==c&&!(i&&C(c)&&isNaN(c))){$();var o=v[r];y(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),$=g,u()):$=a.$watch(o,u),c=r}})}}}],ua=["$parse","$animate",function(e,a){var s="$$NG_REMOVED",l=r("ngRepeat"),u=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},c=function(e){return e.clone[0]},f=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,d){var p=d.ngRepeat,h=t.createComment(" end ngRepeat: "+p+" "),g=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!g)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var v=g[1],m=g[2],y=g[3],b=g[4];if(g=v.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!g)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",v);var w=g[3]||g[1],$=g[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var x,C,E,_,k={$id:qe};return b?x=e(b):(E=function(e,t){return qe(t)},_=function(e){return e}),function(e,t,r,d,g){x&&(C=function(t,n,r){return $&&(k[$]=t),k[w]=n,k.$index=r,x(e,k)});var v=ge();e.$watchCollection(m,function(r){var d,m,b,x,k,S,T,O,R,A,M,D,N=t[0],L=ge();if(y&&(e[y]=r),i(r))R=r,O=C||E;else{O=C||_,R=[];for(var P in r)r.hasOwnProperty(P)&&"$"!==P.charAt(0)&&R.push(P)}for(x=R.length,M=new Array(x),d=0;x>d;d++)if(k=r===R?d:R[d],S=r[k],T=O(k,S,d),v[T])A=v[T],delete v[T],L[T]=A,M[d]=A;else{if(L[T])throw o(M,function(e){e&&e.scope&&(v[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,T,S);M[d]={id:T,scope:n,clone:n},L[T]=!0}for(var F in v){if(A=v[F],D=he(A.clone),a.leave(D),D[0].parentNode)for(d=0,m=D.length;m>d;d++)D[d][s]=!0;A.scope.$destroy()}for(d=0;x>d;d++)if(k=r===R?d:R[d],S=r[k],A=M[d],A.scope){b=N;do b=b.nextSibling;while(b&&b[s]);c(A)!=b&&a.move(he(A.clone),null,kr(N)),N=f(A),u(A.scope,d,w,S,$,k,x)}else g(function(e,t){A.scope=t;var n=h.cloneNode(!1);e[e.length++]=n,a.enter(e,null,kr(N)),N=n,A.clone=e,L[A.id]=A,u(A.scope,d,w,S,$,k,x)});v=L})}}}}],ca="ng-hide",fa="ng-hide-animate",da=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,ca,{tempClasses:fa})})}}}],pa=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,ca,{tempClasses:fa})})}}}],ha=Zn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ga=["$animate",function(e){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,l=[],u=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)e.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=he(u[r].clone);f[r].$destroy();var p=c[r]=e.leave(s);p.then(d(c,r))}u.length=0,f.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:r};u.push(a),e.enter(r,o.parent(),o)})})})}}}],va=Zn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),ma=Zn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),ya=Zn({restrict:"EAC",link:function(e,t,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",X(t));o(function(e){t.empty(),t.append(e)})}}),ba=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],wa={$setViewValue:g,$render:g},$a=["$element","$scope","$attrs",function(e,r,i){var o=this,a=new Ge;o.ngModelCtrl=wa,o.unknownOption=kr(t.createElement("option")),o.renderUnknownOption=function(t){var n="? "+qe(t)+" ?";o.unknownOption.val(n),e.prepend(o.unknownOption),e.val(n)},r.$on("$destroy",function(){o.renderUnknownOption=g}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),e.val()},o.writeValue=function(t){o.hasOption(t)?(o.removeUnknownOption(),e.val(t),""===t&&o.emptyOption.prop("selected",!0)):null==t&&o.emptyOption?(o.removeUnknownOption(),e.val("")):o.renderUnknownOption(t)},o.addOption=function(e,t){de(e,'"option value"'),""===e&&(o.emptyOption=t);var n=a.get(e)||0;a.put(e,n+1)},o.removeOption=function(e){var t=a.get(e);t&&(1===t?(a.remove(e),""===e&&(o.emptyOption=n)):a.put(e,t-1))},o.hasOption=function(e){return!!a.get(e)}}],xa=function(){return{restrict:"E",require:["select","?ngModel"],controller:$a,link:function(e,t,n,r){var i=r[1];if(i){var a=r[0];if(a.ngModelCtrl=i,i.$render=function(){a.writeValue(i.$viewValue)},t.on("change",function(){e.$apply(function(){i.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return o(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Ge(e);o(t.find("option"),function(e){e.selected=b(n.get(e.value))})};var s,l=NaN;e.$watch(function(){l!==i.$viewValue||H(s,i.$viewValue)||(s=V(i.$viewValue),i.$render()),l=i.$viewValue}),i.$isEmpty=function(e){return!e||0===e.length}}}}}},Ca=["$interpolate",function(e){function t(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}return{restrict:"E",priority:100,compile:function(n,r){if(y(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.ngModelCtrl&&(i?e.$watch(i,function(e,i){r.$set("value",e),i!==e&&s.removeOption(i),s.addOption(e,n),s.ngModelCtrl.$render(),t(n)}):(s.addOption(r.value,n),s.ngModelCtrl.$render(),t(n)),n.on("$destroy",function(){s.removeOption(r.value),s.ngModelCtrl.$render()}))}}}}],Ea=m({restrict:"E",terminal:!1}),_a=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},ka=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(x(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,X(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||y(a)||a.test(e)}}}}},Sa=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=p(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return 0>i||r.$isEmpty(t)||t.length<=i}}}}},Ta=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=p(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ue(),be(Lr),void kr(t).ready(function(){ie(t,oe)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('')},function(e,t,n){!function(e){e(n(3))}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:c[t]}function n(e){return function(t){return a(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t)return null;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),a=n.listSelections(),s=0;s=0;s--){var c=a[s].head;n.replaceRange("",f(c.line,c.ch-1),f(c.line,c.ch+1))}}function o(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=0;s1&&p.indexOf(i)>=0&&n.getRange(f(w.line,w.ch-2),w)==i+i&&(w.ch<=2||n.getRange(f(w.line,w.ch-3),f(w.line,w.ch-2))!=i))y="addFour";else if(h){if(e.isWordChar(d)||!u(n,w,i))return e.Pass;y="both"}else{if(!v||n.getLine(w.line).length!=w.ch&&!s(d,a)&&!/\s/.test(d))return e.Pass;y="both"}else y=p.indexOf(i)>=0&&n.getRange(w,f(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var $=l%2?a.charAt(l-1):i,x=l%2?i:a.charAt(l+1);n.operation(function(){if("skip"==c)n.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;3>e;e++)n.execCommand("goCharRight");else if("surround"==c){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function l(e,t){var n=e.getRange(f(t.line,t.ch-1),f(t.line,t.ch+1));return 2==n.length?n:null}function u(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var a=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(a.pos=a.start=o.start;;){var s=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}var c={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},f=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(p),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(p))});for(var d=c.pairs+"`",p={Backspace:i,Enter:o},h=0;h=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(r&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),d=n(e,a(t.line,l+(c>0?1:0)),c,f||null,i);return null==d?null:{from:a(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,u=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=f;d+=n){var p=e.getLine(d);if(p){var h=n>0?0:p.length-1,g=n>0?p.length:-1;if(!(p.length>o))for(d==t.line&&(h=t.ch-(0>n?1:0));h!=g;h+=n){var v=p.charAt(h);if(c.test(v)&&(void 0===r||e.getTokenTypeAt(a(d,h+1))==r)){var m=s[v];if(">"==m.charAt(1)==n>0)u.push(v);else{if(!u.length)return{pos:a(d,h),ch:v};u.pop()}}}}}return d-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";e.registerHelper("lint","json",function(t){var n=[];jsonlint.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{jsonlint.parse(t)}catch(r){}return n})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(t,n){function r(t){return i.parentNode?(i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",void(i.style.left=t.clientX+5+"px")):e.off(document,"mousemove",r)}var i=document.createElement("div");return i.className="CodeMirror-lint-tooltip",i.appendChild(n.cloneNode(!0)),document.body.appendChild(i),e.on(document,"mousemove",r),r(t),null!=i.style.opacity&&(i.style.opacity=1),i}function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){e.parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout(function(){n(e)},600))}function i(n,i,o){function a(){e.off(o,"mouseout",a),s&&(r(s),s=null)}var s=t(n,i),l=setInterval(function(){if(s)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}return s?void 0:clearInterval(l)},400);e.on(o,"mouseout",a)}function o(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){v(e,t)}}function a(e,t){return t instanceof Function?{getAnnotations:t}:(t&&t!==!0||(t={}),t)}function s(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(m);for(var n=0;n1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function h(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){d(e)},t.options.delay||500))}function g(e,t){var n=t.target||t.srcElement;i(t,f(e),n)}function v(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className))for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=0;s"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(t.tokenize=s,s(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(r(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(_e),i("operator","operator",e.current()));if("`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),i("error","error");if(_e.test(n))return e.eatWhile(_e),i("operator","operator",e.current());if(Ce.test(n)){e.eatWhile(Ce);var o=e.current(),u=Ee.propertyIsEnumerable(o)&&Ee[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}}function a(e){return function(t,n){var r,a=!1;if(we&&"@"==t.peek()&&t.match(ke))return n.tokenize=o,i("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||a);)a=!a&&"\\"==r;return a||(n.tokenize=o),i("string","string")}}function s(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=Se.indexOf(a);if(s>=0&&3>s){if(!r){++o;break}if(0==--r)break}else if(s>=3&&6>s)++r;else if(Ce.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function c(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(Oe.state=e,Oe.stream=i,Oe.marked=null,Oe.cc=o,Oe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():$e?x:$;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Oe.marked?Oe.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Oe.cc.push(arguments[e])}function h(){return p.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=Oe.state;if(r.context){if(Oe.marked="def",t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){Oe.state.context={prev:Oe.state.context,vars:Oe.state.localVars},Oe.state.localVars=Re}function m(){Oe.state.localVars=Oe.state.context.vars,Oe.state.context=Oe.state.context.prev}function y(e,t){var n=function(){var n=Oe.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new c(r,Oe.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=Oe.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?h():";"==e?p():h(t)}return t}function $(e,t){return"var"==e?h(y("vardef",t.length),B,w(";"),b):"keyword a"==e?h(y("form"),x,$,b):"keyword b"==e?h(y("form"),$,b):"{"==e?h(y("}"),V,b):";"==e?h():"if"==e?("else"==Oe.state.lexical.info&&Oe.state.cc[Oe.state.cc.length-1]==b&&Oe.state.cc.pop()(),h(y("form"),x,$,b,K)):"function"==e?h(ee):"for"==e?h(y("form"),Y,$,b):"variable"==e?h(y("stat"),D):"switch"==e?h(y("form"),x,y("}","switch"),w("{"),V,b,b):"case"==e?h(x,w(":")):"default"==e?h(w(":")):"catch"==e?h(y("form"),v,w("("),te,w(")"),$,b,m):"module"==e?h(y("form"),v,ae,m,b):"class"==e?h(y("form"),ne,b):"export"==e?h(y("form"),se,b):"import"==e?h(y("form"),le,b):p(y("stat"),x,w(";"),b)}function x(e){return E(e,!1)}function C(e){return E(e,!0)}function E(e,t){if(Oe.state.fatArrowAt==Oe.stream.start){var n=t?M:A;if("("==e)return h(v,y(")"),j(z,")"),b,w("=>"),n,m);if("variable"==e)return p(v,z,w("=>"),n,m)}var r=t?T:S;return Te.hasOwnProperty(e)?h(r):"function"==e?h(ee,r):"keyword c"==e?h(t?k:_):"("==e?h(y(")"),_,he,w(")"),b,r):"operator"==e||"spread"==e?h(t?C:x):"["==e?h(y("]"),de,b,r):"{"==e?I(L,"}",null,r):"quasi"==e?p(O,r):h()}function _(e){return e.match(/[;\}\)\],]/)?p():p(x)}function k(e){return e.match(/[;\}\)\],]/)?p():p(C)}function S(e,t){return","==e?h(x):T(e,t,!1)}function T(e,t,n){var r=0==n?S:T,i=0==n?x:C;return"=>"==e?h(v,n?M:A,m):"operator"==e?/\+\+|--/.test(t)?h(r):"?"==t?h(x,w(":"),i):h(i):"quasi"==e?p(O,r):";"!=e?"("==e?I(C,")","call",r):"."==e?h(N,r):"["==e?h(y("]"),_,w("]"),b,r):void 0:void 0}function O(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?h(O):h(x,R)}function R(e){return"}"==e?(Oe.marked="string-2",Oe.state.tokenize=l,h(O)):void 0}function A(e){return u(Oe.stream,Oe.state),p("{"==e?$:x)}function M(e){return u(Oe.stream,Oe.state),p("{"==e?$:C)}function D(e){return":"==e?h(b,$):p(S,w(";"),b)}function N(e){return"variable"==e?(Oe.marked="property",h()):void 0}function L(e,t){return"variable"==e||"keyword"==Oe.style?(Oe.marked="property",h("get"==t||"set"==t?P:F)):"number"==e||"string"==e?(Oe.marked=we?"property":Oe.style+" property",h(F)):"jsonld-keyword"==e?h(F):"["==e?h(x,w("]"),F):void 0}function P(e){return"variable"!=e?p(F):(Oe.marked="property",h(ee))}function F(e){return":"==e?h(C):"("==e?p(ee):void 0}function j(e,t){function n(r){if(","==r){var i=Oe.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),h(e,n)}return r==t?h():h(w(t))}return function(r){return r==t?h():p(e,n)}}function I(e,t,n){for(var r=3;r!?|~^]/,ke=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Se="([{}])",Te={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Oe={state:null,column:null,marked:null,cc:null},Re={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-ye,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==ve?n:(t.lastType="operator"!=ve||"++"!=me&&"--"!=me?ve:"incdec",d(t,n,ve,me,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==b)a=a.prev;else if(u!=K)break}"stat"==a.type&&"}"==i&&(a=a.prev),be&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,f=i==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==i?a.indented:"form"==c?a.indented+ye:"stat"==c?a.indented+(ge(t,r)?be||ye:0):"switch"!=a.info||f||0==n.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:ye):a.indented+(/^(?:case|default)\b/.test(r)?ye:2*ye)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:$e?null:"/*",blockCommentEnd:$e?null:"*/",lineComment:$e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:$e?"json":"javascript",jsonldMode:we,jsonMode:$e}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(t,n,r){e.exports=r(t,n)}("humane",this,function(e,t){var n=window,r=document,i={on:function(e,t,r){"addEventListener"in n?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r)},off:function(e,t,r){"removeEventListener"in n?e.removeEventListener(t,r,!1):e.detachEvent("on"+t,r)},bind:function(e,t){return function(){e.apply(t,arguments)}},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},config:function(e,t){return null!=e?e:t},transSupport:!1,useFilter:/msie [678]/i.test(navigator.userAgent),_checkTransition:function(){var e=r.createElement("div"),t={webkit:"webkit",Moz:"",O:"o",ms:"MS"};for(var n in t)n+"Transition"in e.style&&(this.vendorPrefix=t[n],this.transSupport=!0)}};i._checkTransition();var o=function(e){e||(e={}),this.queue=[],this.baseCls=e.baseCls||"humane",this.addnCls=e.addnCls||"",this.timeout="timeout"in e?e.timeout:2500,this.waitForMove=e.waitForMove||!1,this.clickToClose=e.clickToClose||!1,this.timeoutAfterMove=e.timeoutAfterMove||!1,this.container=e.container;try{this._setupEl()}catch(t){i.on(n,"load",i.bind(this._setupEl,this))}};return o.prototype={constructor:o,_setupEl:function(){var e=r.createElement("div");if(e.style.display="none",!this.container){if(!r.body)throw"document.body is null";this.container=r.body}this.container.appendChild(e),this.el=e,this.removeEvent=i.bind(function(){var e=i.config(this.currentMsg.timeoutAfterMove,this.timeoutAfterMove);e?setTimeout(i.bind(this.remove,this),e):this.remove()},this),this.transEvent=i.bind(this._afterAnimation,this),this._run()},_afterTimeout:function(){i.config(this.currentMsg.waitForMove,this.waitForMove)?this.removeEventsSet||(i.on(r.body,"mousemove",this.removeEvent),i.on(r.body,"click",this.removeEvent),i.on(r.body,"keypress",this.removeEvent),i.on(r.body,"touchstart",this.removeEvent),this.removeEventsSet=!0):this.remove()},_run:function(){if(!this._animating&&this.queue.length&&this.el){this._animating=!0,this.currentTimer&&(clearTimeout(this.currentTimer),this.currentTimer=null);var e=this.queue.shift(),t=i.config(e.clickToClose,this.clickToClose);t&&(i.on(this.el,"click",this.removeEvent),i.on(this.el,"touchstart",this.removeEvent));var n=i.config(e.timeout,this.timeout);n>0&&(this.currentTimer=setTimeout(i.bind(this._afterTimeout,this),n)),i.isArray(e.html)&&(e.html="
  • "+e.html.join("
  • ")+"
"),this.el.innerHTML=e.html,this.currentMsg=e,this.el.className=this.baseCls,i.transSupport?(this.el.style.display="block",setTimeout(i.bind(this._showMsg,this),50)):this._showMsg()}},_setOpacity:function(e){if(i.useFilter)try{this.el.filters.item("DXImageTransform.Microsoft.Alpha").Opacity=100*e}catch(t){}else this.el.style.opacity=String(e)},_showMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-animate";else{var t=0;this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-js-animate",this._setOpacity(0),this.el.style.display="block";var n=this,r=setInterval(function(){1>t?(t+=.1,t>1&&(t=1),n._setOpacity(t)):clearInterval(r)},30)}},_hideMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e,i.on(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent);else var t=1,n=this,r=setInterval(function(){t>0?(t-=.1,0>t&&(t=0),n._setOpacity(t)):(n.el.className=n.baseCls+" "+e,clearInterval(r),n._afterAnimation())},30)},_afterAnimation:function(){i.transSupport&&i.off(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent),this.currentMsg.cb&&this.currentMsg.cb(),this.el.style.display="none",this._animating=!1,this._run()},remove:function(e){var t="function"==typeof e?e:null;i.off(r.body,"mousemove",this.removeEvent),i.off(r.body,"click",this.removeEvent),i.off(r.body,"keypress",this.removeEvent),i.off(r.body,"touchstart",this.removeEvent),i.off(this.el,"click",this.removeEvent),i.off(this.el,"touchstart",this.removeEvent),this.removeEventsSet=!1,t&&this.currentMsg&&(this.currentMsg.cb=t),this._animating?this._hideMsg():t&&t()},log:function(e,t,n,r){var i={};if(r)for(var o in r)i[o]=r[o];if("function"==typeof t)n=t;else if(t)for(var o in t)i[o]=t[o];return i.html=e,n&&(i.cb=n),this.queue.push(i),this._run(),this},spawn:function(e){var t=this;return function(n,r,i){return t.log.call(t,n,r,i,e),t}},create:function(e){return new o(e)}},new o})},function(e,t,n){(function(e){(function(){var t=!0,n=!1,r={},i=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,n,r,i,o,a){var s=o.length-1;switch(i){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g," ").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[s-1];case 13:this.$={};break;case 14:this.$=o[s-1];break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[];break;case 19:this.$=o[s-1];break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){function t(e){i.length=i.length-2*e,o.length=o.length-e,a.length=a.length-e}function n(){var e;return e=r.lexer.lex()||1,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,i=[0],o=[null],a=[],s=this.table,l="",u=0,c=0,f=0,d=2,p=1;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;a.push(h),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var g,v,m,y,b,w,$,x,C,E={};;){if(m=i[i.length-1],this.defaultActions[m]?y=this.defaultActions[m]:(null==g&&(g=n()),y=s[m]&&s[m][g]),"undefined"==typeof y||!y.length||!y[0]){if(!f){C=[];for(w in s[m])this.terminals_[w]&&w>2&&C.push("'"+this.terminals_[w]+"'");var _="";_=this.lexer.showPosition?"Parse error on line "+(u+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[g]+"'":"Parse error on line "+(u+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:h,expected:C})}if(3==f){if(g==p)throw new Error(_||"Parsing halted.");c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,h=this.lexer.yylloc,g=n()}for(;!(d.toString()in s[m]);){if(0==m)throw new Error(_||"Parsing halted.");t(1),m=i[i.length-1]}v=g,g=d,m=i[i.length-1],y=s[m]&&s[m][d],f=3}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+g);switch(y[0]){case 1:i.push(g),o.push(this.lexer.yytext),a.push(this.lexer.yylloc),i.push(y[1]),g=null,v?(g=v,v=null):(c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,h=this.lexer.yylloc,f>0&&f--);break;case 2:if($=this.productions_[y[1]][1],E.$=o[o.length-$],E._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},b=this.performAction.call(E,l,c,u,this.yy,y[1],o,a),"undefined"!=typeof b)return b;$&&(i=i.slice(0,-1*$*2),o=o.slice(0,-1*$),a=a.slice(0,-1*$)),i.push(this.productions_[y[1]][0]),o.push(E.$),a.push(E._$),x=s[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),a=0;at[0].length)||(t=n,r=a,this.options.flex));a++);return t?(i=t[0].match(/\n.*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e?e:void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"!=typeof e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},e.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],e.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},e}();return e.lexer=t,e}();return"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(n){if(!n[1])throw new Error("Usage: "+n[0]+" FILE");if("undefined"!=typeof e)var i=t("fs").readFileSync(t("path").join(e.cwd(),n[1]),"utf8");else var o=t("file").path(t("file").cwd()),i=o.join(n[1]).read({charset:"utf-8"});return r.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&r.main("undefined"!=typeof e?e.argv.slice(1):t("system").args)),r})()}).call(t,n(161))},function(e,t,n){function r(){c=!1,s.length?u=s.concat(u):f=-1,u.length&&i()}function i(){if(!c){var e=setTimeout(r);c=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var n=1;ne?t:e>n?n:e}function t(e){return 100*(-1+e)}function n(e,n,r){var i;return i="translate3d"===u.positionUsing?{transform:"translate3d("+t(e)+"%,0,0)"}:"translate"===u.positionUsing?{transform:"translate("+t(e)+"%,0)"}:{"margin-left":t(e)+"%"},i.transition="all "+n+"ms "+r,i}function r(e,t){var n="string"==typeof e?e:a(e);return n.indexOf(" "+t+" ")>=0}function i(e,t){var n=a(e),i=n+t;r(n,t)||(e.className=i.substring(1))}function o(e,t){var n,i=a(e);r(e,t)&&(n=i.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function a(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function s(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var l={};l.version="0.2.0";var u=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};l.configure=function(e){var t,n;for(t in e)n=e[t],void 0!==n&&e.hasOwnProperty(t)&&(u[t]=n);return this},l.status=null,l.set=function(t){var r=l.isStarted();t=e(t,u.minimum,1),l.status=1===t?null:t;var i=l.render(!r),o=i.querySelector(u.barSelector),a=u.speed,s=u.easing;return i.offsetWidth,c(function(e){""===u.positionUsing&&(u.positionUsing=l.getPositioningCSS()),f(o,n(t,a,s)),1===t?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+a+"ms linear",opacity:0}),setTimeout(function(){l.remove(),e()},a)},a)):setTimeout(e,a)}),this},l.isStarted=function(){return"number"==typeof l.status},l.start=function(){l.status||l.set(0);var e=function(){setTimeout(function(){l.status&&(l.trickle(),e())},u.trickleSpeed)};return u.trickle&&e(),this},l.done=function(e){return e||l.status?l.inc(.3+.5*Math.random()).set(1):this},l.inc=function(t){var n=l.status;return n?("number"!=typeof t&&(t=(1-n)*e(Math.random()*n,.1,.95)),n=e(n+t,0,.994),l.set(n)):l.start()},l.trickle=function(){return l.inc(Math.random()*u.trickleRate)},function(){var e=0,t=0;l.promise=function(n){return n&&"resolved"!==n.state()?(0===t&&l.start(),e++,t++,n.always(function(){t--,0===t?(e=0,l.done()):l.set((e-t)/e)}),this):this}}(),l.render=function(e){if(l.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=u.template;var r,o=n.querySelector(u.barSelector),a=e?"-100":t(l.status||0),c=document.querySelector(u.parent);return f(o,{transition:"all 0 linear",transform:"translate3d("+a+"%,0,0)"}),u.showSpinner||(r=n.querySelector(u.spinnerSelector),r&&s(r)),c!=document.body&&i(c,"nprogress-custom-parent"),c.appendChild(n),n},l.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(u.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&s(e)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":""; -return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var c=function(){function e(){var n=t.shift();n&&n(e)}var t=[];return function(n){t.push(n),1==t.length&&e()}}(),f=function(){function e(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function t(e){var t=document.body.style;if(e in t)return e;for(var n,r=i.length,o=e.charAt(0).toUpperCase()+e.slice(1);r--;)if(n=i[r]+o,n in t)return n;return e}function n(n){return n=e(n),o[n]||(o[n]=t(n))}function r(e,t,r){t=n(t),e.style[t]=r}var i=["Webkit","O","Moz","ms"],o={};return function(e,t){var n,i,o=arguments;if(2==o.length)for(n in t)i=t[n],void 0!==i&&t.hasOwnProperty(n)&&r(e,n,i);else r(e,o[1],o[2])}}();return l})},function(e,t,n){/*! +!function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n,r,i=arguments[0],o="["+(e?e+":":"")+i+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1);return t+20&&t-1 in e}function o(e,t,n){var r,a;if(e)if(C(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(dr(e)||i(e)){var s="object"!=typeof e;for(r=0,a=e.length;a>r;r++)(s||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);return e}function a(e){return Object.keys(e).sort()}function s(e,t,n){for(var r=a(e),i=0;in;n++){var i=arguments[n];if(i)for(var o=Object.keys(i),a=0,s=o.length;s>a;a++){var l=o[a];e[l]=i[l]}}return c(e,t),e}function d(e){return parseInt(e,10)}function p(e,t){return f(Object.create(e),t)}function h(){}function g(e){return e}function v(e){return function(){return e}}function m(e){return"undefined"==typeof e}function y(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function w(e){return"string"==typeof e}function $(e){return"number"==typeof e}function x(e){return"[object Date]"===sr.call(e)}function C(e){return"function"==typeof e}function _(e){return"[object RegExp]"===sr.call(e)}function E(e){return e&&e.window===e}function k(e){return e&&e.$evalAsync&&e.$watch}function S(e){return"[object File]"===sr.call(e)}function T(e){return"[object FormData]"===sr.call(e)}function O(e){return"[object Blob]"===sr.call(e)}function R(e){return"boolean"==typeof e}function A(e){return e&&C(e.then)}function M(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function D(e){var t,n={},r=e.split(",");for(t=0;t=0&&e.splice(n,1),t}function P(e,t,n,r){if(E(e)||k(e))throw lr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw lr("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],b(e)){var i=n.indexOf(e);if(-1!==i)return r[i];n.push(e),r.push(t)}var a;if(dr(e)){t.length=0;for(var s=0;sn;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var i in e)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(t[i]=e[i])}return t||e}function I(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r,i,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!dr(e)){if(x(e))return x(t)?I(e.getTime(),t.getTime()):!1;if(_(e))return _(t)?e.toString()==t.toString():!1;if(k(e)||k(t)||E(e)||E(t)||dr(t)||x(t)||_(t))return!1;o={};for(i in e)if("$"!==i.charAt(0)&&!C(e[i])){if(!I(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!o.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t[i]!==n&&!C(t[i]))return!1;return!0}if(!dr(t))return!1;if((r=e.length)==t.length){for(i=0;r>i;i++)if(!I(e[i],t[i]))return!1;return!0}}return!1}function j(e,t,n){return e.concat(ir.call(t,n))}function V(e,t){return ir.call(e,t||0)}function H(e,t){var n=arguments.length>2?V(arguments,2):[];return!C(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,j(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function W(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?i=n:E(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":k(r)&&(i="$SCOPE"),i}function B(e,t){return"undefined"==typeof e?n:($(t)||(t=t?2:null),JSON.stringify(e,W,t))}function z(e){return w(e)?JSON.parse(e):e}function U(e){e=tr(e).clone();try{e.empty()}catch(t){}var n=tr("
").append(e).html();try{return e[0].nodeType===wr?Yn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Yn(t)})}catch(t){return Yn(n)}}function q(e){try{return decodeURIComponent(e)}catch(t){}}function G(e){var t,n,r={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=q(t[0]),y(n))){var i=y(t[1])?q(t[1]):!0;Qn.call(r,n)?dr(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function K(e){var t=[];return o(e,function(e,n){dr(e)?o(e,function(e){t.push(Q(n,!0)+(e===!0?"":"="+Q(e,!0)))}):t.push(Q(n,!0)+(e===!0?"":"="+Q(e,!0)))}),t.length?t.join("&"):""}function Y(e){return Q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function X(e,t){var n,r,i=vr.length;for(e=tr(e),r=0;i>r;++r)if(n=vr[r]+t,w(n=e.attr(n)))return n;return null}function J(e,t){var n,r,i={};o(vr,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),o(vr,function(t){var i,o=t+"app";!n&&(i=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(i.strictDi=null!==X(n,"strict-di"),t(n,r?[r]:[],i))}function Z(n,r,i){b(i)||(i={});var a={strictDi:!1};i=f(a,i);var s=function(){if(n=tr(n),n.injector()){var e=n[0]===t?"document":U(n);throw lr("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(//,">"))}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var o=ze(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!u.test(e.name)?s():(e.name=e.name.replace(u,""),ur.resumeBootstrap=function(e){return o(e,function(e){r.push(e)}),s()},void(C(ur.resumeDeferredBootstrap)&&ur.resumeDeferredBootstrap()))}function ee(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function te(e){var t=ur.element(e).injector();if(!t)throw lr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function ne(e,t){return t=t||"_",e.replace(mr,function(e,n){return(n?t:"")+e.toLowerCase()})}function re(){var t;yr||(nr=e.jQuery,nr&&nr.fn.on?(tr=nr,f(nr.fn,{scope:Ir.scope,isolateScope:Ir.isolateScope,controller:Ir.controller,injector:Ir.injector,inheritedData:Ir.inheritedData}),t=nr.cleanData,nr.cleanData=function(e){var n;if(fr)fr=!1;else for(var r,i=0;null!=(r=e[i]);i++)n=nr._data(r,"events"),n&&n.$destroy&&nr(r).triggerHandler("$destroy");t(e)}):tr=we,ur.element=tr,yr=!0)}function ie(e,t,n){if(!e)throw lr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function oe(e,t,n){return n&&dr(e)&&(e=e[e.length-1]),ie(C(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function ae(e,t){if("hasOwnProperty"===e)throw lr("badname","hasOwnProperty is not a valid {0} name",t)}function se(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;a>s;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&C(e)?H(o,e):e}function le(e){var t=e[0],n=e[e.length-1],r=[t];do{if(t=t.nextSibling,!t)break;r.push(t)}while(t!==n);return tr(r)}function ue(){return Object.create(null)}function ce(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||r,t(o,"module",function(){var e={};return function(r,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(r,"module"),o&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r,i){return i||(i=t),function(){return i[r||"push"]([e,n,arguments]),u}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var t=[],i=[],s=[],l=e("$injector","invoke","push",i),u={_invokeQueue:t,_configBlocks:i,_runBlocks:s,requires:o,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),u})}})}function fe(e){var t=[];return JSON.stringify(e,function(e,n){if(n=W(e,n),b(n)){if(t.indexOf(n)>=0)return"<>";t.push(n)}return n})}function de(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?fe(e):e}function pe(t){f(t,{bootstrap:Z,copy:P,extend:f,equals:I,element:tr,forEach:o,injector:ze,noop:h,bind:H,toJson:B,fromJson:z,identity:g,isUndefined:m,isDefined:y,isString:w,isFunction:C,isObject:b,isNumber:$,isElement:M,isArray:dr,version:_r,isDate:x,lowercase:Yn,uppercase:Xn,callbacks:{counter:0},getTestability:te,$$minErr:r,$$csp:gr,reloadWithDebugInfo:ee}),rr=ce(e);try{rr("ngLocale")}catch(n){rr("ngLocale",[]).provider("$locale",vt)}rr("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Kt}),e.provider("$compile",Xe).directive({a:Ri,input:Gi,textarea:Gi,form:Li,script:Fo,select:Vo,style:Wo,option:Ho,ngBind:Qi,ngBindHtml:Ji,ngBindTemplate:Xi,ngClass:eo,ngClassEven:no,ngClassOdd:to,ngCloak:ro,ngController:io,ngForm:Pi,ngHide:Ao,ngIf:so,ngInclude:lo,ngInit:co,ngNonBindable:Eo,ngPluralize:ko,ngRepeat:So,ngShow:Ro,ngStyle:Mo,ngSwitch:Do,ngSwitchWhen:No,ngSwitchDefault:Lo,ngOptions:jo,ngTransclude:Po,ngModel:xo,ngList:fo,ngChange:Zi,pattern:zo,ngPattern:zo,required:Bo,ngRequired:Bo,minlength:qo,ngMinlength:qo,maxlength:Uo,ngMaxlength:Uo,ngValue:Yi,ngModelOptions:_o}).directive({ngInclude:uo}).directive(Ai).directive(oo),e.provider({$anchorScroll:Ue,$animate:Kr,$browser:Ke,$cacheFactory:Ye,$controller:tt,$document:nt,$exceptionHandler:rt,$filter:sn,$interpolate:ht,$interval:gt,$http:ct,$httpBackend:dt,$location:Rt,$log:At,$parse:Wt,$rootScope:Gt,$q:Bt,$$q:zt,$sce:Jt,$sceDelegate:Xt,$sniffer:Zt,$templateCache:Qe,$templateRequest:en,$$testability:tn,$timeout:nn,$window:an,$$rAF:qt,$$asyncCallback:qe,$$jqLite:je})}])}function he(){return++kr}function ge(e){return e.replace(Or,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Rr,"Moz$1")}function ve(e){return!Nr.test(e)}function me(e){var t=e.nodeType;return t===br||!t||t===xr}function ye(e,t){var n,r,i,a,s=t.createDocumentFragment(),l=[];if(ve(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),r=(Lr.exec(e)||["",""])[1].toLowerCase(),i=Fr[r]||Fr._default,n.innerHTML=i[1]+e.replace(Pr,"<$1>")+i[2],a=i[0];a--;)n=n.lastChild;l=j(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function be(e,n){n=n||t;var r;return(r=Dr.exec(e))?[n.createElement(r[1])]:(r=ye(e,n))?r.childNodes:[]}function we(e){if(e instanceof we)return e;var t;if(w(e)&&(e=pr(e),t=!0),!(this instanceof we)){if(t&&"<"!=e.charAt(0))throw Mr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new we(e)}t?Re(this,be(e)):Re(this,e)}function $e(e){return e.cloneNode(!0)}function xe(e,t){if(t||_e(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;i>r;r++)_e(n[r])}function Ce(e,t,n,r){if(y(r))throw Mr("offargs","jqLite#off() does not support the `selector` argument");var i=Ee(e),a=i&&i.events,s=i&&i.handle;if(s)if(t)o(t.split(" "),function(t){if(y(n)){var r=a[t];if(L(r||[],n),r&&r.length>0)return}Tr(e,t,s),delete a[t]});else for(t in a)"$destroy"!==t&&Tr(e,t,s),delete a[t]}function _e(e,t){var r=e.ng339,i=r&&Er[r];if(i){if(t)return void delete i.data[t];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Ce(e)),delete Er[r],e.ng339=n}}function Ee(e,t){var r=e.ng339,i=r&&Er[r];return t&&!i&&(e.ng339=r=he(),i=Er[r]={events:{},data:{},handle:n}),i}function ke(e,t,n){if(me(e)){var r=y(n),i=!r&&t&&!b(t),o=!t,a=Ee(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];f(s,t)}}}function Se(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Te(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",pr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+pr(t)+" "," ")))})}function Oe(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=pr(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",pr(n))}}function Re(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;n>r;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Ae(e,t){return Me(e,"$"+(t||"ngController")+"Controller")}function Me(e,t,r){e.nodeType==xr&&(e=e.documentElement);for(var i=dr(t)?t:[t];e;){for(var o=0,a=i.length;a>o;o++)if((r=tr.data(e,i[o]))!==n)return r;e=e.parentNode||e.nodeType===Cr&&e.host}}function De(e){for(xe(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ne(e,t){t||xe(e);var n=e.parentNode;n&&n.removeChild(e)}function Le(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):tr(n).on("load",t)}function Pe(e,t){var n=jr[t.toLowerCase()];return n&&Vr[N(e)]&&n}function Fe(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Hr[t]}function Ie(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if(m(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(i=F(i));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||i[s].call(e,n)}};return n.elem=e,n}function je(){this.$get=function(){return f(we,{hasClass:function(e,t){return e.attr&&(e=e[0]),Se(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Oe(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Te(e,t)}})}}function Ve(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||u)():r+":"+e}function He(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function We(e){var t=e.toString().replace(Ur,""),n=t.match(Wr);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Be(e,t,n){var r,i,a,s;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw w(n)&&n||(n=e.name||We(e)),qr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=e.toString().replace(Ur,""),a=i.match(Wr),o(a[1].split(Br),function(e){e.replace(zr,function(e,t,n){r.push(n)})})}e.$inject=r}}else dr(e)?(s=e.length-1,oe(e[s],"fn"),r=e.slice(0,s)):oe(e,"fn",!0);return r}function ze(e,t){function r(e){return function(t,n){return b(t)?void o(t,l(e)):e(t,n)}}function i(e,t){if(ae(e,"service"),(C(t)||dr(t))&&(t=k.instantiate(t)),!t.$get)throw qr("pget","Provider '{0}' must define $get factory method.",e);return E[e+$]=t}function a(e,t){return function(){var n=T.invoke(t,this);if(m(n))throw qr("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return s(e,v(t),!1)}function f(e,t){ae(e,"constant"),E[e]=t,S[e]=t}function d(e,t){var n=k.get(e+$),r=n.$get;n.$get=function(){var e=T.invoke(r,n);return T.invoke(t,null,{$delegate:e})}}function p(e){var t,n=[];return o(e,function(e){function r(e){var t,n;for(t=0,n=e.length;n>t;t++){var r=e[t],i=k.get(r[0]);i[r[1]].apply(i,r[2])}}if(!_.get(e)){_.put(e,!0);try{w(e)?(t=rr(e),n=n.concat(p(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):C(e)?n.push(k.invoke(e)):dr(e)?n.push(k.invoke(e)):oe(e,"module")}catch(i){throw dr(e)&&(e=e[e.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),qr("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function g(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===y)throw qr("cdep","Circular dependency found: {0}",t+" <- "+x.join(" <- "));return e[t]}try{return x.unshift(t),e[t]=y,e[t]=n(t,r)}catch(i){throw e[t]===y&&delete e[t],i}finally{x.shift()}}function i(e,n,i,o){"string"==typeof i&&(o=i,i=null);var a,s,l,u=[],c=ze.$$annotate(e,t,o);for(s=0,a=c.length;a>s;s++){if(l=c[s],"string"!=typeof l)throw qr("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(i&&i.hasOwnProperty(l)?i[l]:r(l,o))}return dr(e)&&(e=e[a]),e.apply(n,u)}function o(e,t,n){var r=Object.create((dr(e)?e[e.length-1]:e).prototype||null),o=i(e,r,t,n);return b(o)||C(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:ze.$$annotate,has:function(t){return E.hasOwnProperty(t+$)||e.hasOwnProperty(t)}}}t=t===!0;var y={},$="Provider",x=[],_=new He([],!0),E={$provide:{provider:r(i),factory:r(s),service:r(u),value:r(c),constant:r(f),decorator:d}},k=E.$injector=g(E,function(e,t){throw ur.isString(t)&&x.push(t),qr("unpr","Unknown provider: {0}",x.join(" <- "))}),S={},T=S.$injector=g(S,function(e,t){var r=k.get(e+$,t);return T.invoke(r.$get,r,n,e)});return o(p(e),function(e){T.invoke(e||h)}),T}function Ue(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){return"a"===N(e)?(t=e,!0):void 0}),t}function o(){var e=s.yOffset;if(C(e))e=e();else if(M(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else $(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(){var e,t=n.hash();t?(e=l.getElementById(t))?a(e):(e=i(l.getElementsByName(t)))?a(e):"top"===t&&a(null):a(null)}var l=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&Le(function(){r.$evalAsync(s)})}),s}]}function qe(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function Ge(e,t,r,i){function a(e){try{e.apply(null,V(arguments,1))}finally{if(_--,0===_)for(;E.length;)try{E.pop()()}catch(t){r.error(t)}}}function s(e){var t=e.indexOf("#");return-1===t?"":e.substr(t+1)}function l(e,t){!function n(){o(S,function(e){e()}),k=t(n,e)}()}function u(){f(),d()}function c(){try{return b.state}catch(e){}}function f(){T=c(),T=m(T)?null:T,I(T,L)&&(T=L),L=T}function d(){(R!==g.url()||O!==T)&&(R=g.url(),O=T,o(D,function(e){e(g.url(),T)}))}function p(e){try{return decodeURIComponent(e)}catch(t){return e}}var g=this,v=t[0],y=e.location,b=e.history,$=e.setTimeout,x=e.clearTimeout,C={};g.isMock=!1;var _=0,E=[];g.$$completeOutstandingRequest=a,g.$$incOutstandingRequestCount=function(){_++},g.notifyWhenNoOutstandingRequests=function(e){o(S,function(e){e()}),0===_?e():E.push(e)};var k,S=[];g.addPollFn=function(e){return m(k)&&l(100,$),S.push(e),e};var T,O,R=y.href,A=t.find("base"),M=null;f(),O=T,g.url=function(t,n,r){if(m(r)&&(r=null),y!==e.location&&(y=e.location),b!==e.history&&(b=e.history),t){var o=O===r;if(R===t&&(!i.history||o))return g;var a=R&&$t(R)===$t(t);return R=t,O=r,!i.history||a&&o?(a||(M=t),n?y.replace(t):a?y.hash=s(t):y.href=t):(b[n?"replaceState":"pushState"](r,"",t),f(),O=T),g}return M||y.href.replace(/%27/g,"'")},g.state=function(){return T};var D=[],N=!1,L=null;g.onUrlChange=function(t){return N||(i.history&&tr(e).on("popstate",u),tr(e).on("hashchange",u),N=!0),D.push(t),t},g.$$checkUrlChange=d,g.baseHref=function(){var e=A.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var P={},F="",j=g.baseHref();g.cookies=function(e,t){var i,o,a,s,l;if(!e){if(v.cookie!==F)for(F=v.cookie,o=F.split("; "),P={},s=0;s0&&(e=p(a.substring(0,l)),P[e]===n&&(P[e]=p(a.substring(l+1))));return P}t===n?v.cookie=encodeURIComponent(e)+"=;path="+j+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(t)&&(i=(v.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+j).length+1,i>4096&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},g.defer=function(e,t){var n;return _++,n=$(function(){delete C[n],a(e)},t||0),C[n]=!0,n},g.defer.cancel=function(e){return C[e]?(delete C[e],x(e),a(h),!0):!1}}function Ke(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new Ge(e,r,t,n)}]}function Ye(){this.$get=function(){function e(e,n){function i(e){e!=d&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=f({},n,{id:e}),l={},u=n&&n.capacity||Number.MAX_VALUE,c={},d=null,p=null;return t[e]={put:function(e,t){if(uu&&this.remove(p.key),t},get:function(e){if(u").parent()[0])});var a=D(e,t,e,n,r,i);A.$$addScopeClass(e);var s=null;return function(t,n,r){ie(t,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,l=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),s||(s=M(l));var u;if(u="html"!==s?tr(J(s,tr("
").append(e).html())):n?Ir.clone.call(e):e,o)for(var c in o)u.data("$"+c+"Controller",o[c].instance);return A.$$addScopeInfo(u,t),n&&n(u,t),a&&a(t,u,u,i),u}}function M(e){var t=e&&e[0];return t&&"foreignobject"!==N(t)&&t.toString().match(/SVG/)?"svg":"html"}function D(e,t,r,i,o,a){function s(e,r,i,o){var a,s,l,u,c,f,d,p,v;if(h){var m=r.length;for(v=new Array(m),c=0;cc;)l=v[g[c++]],a=g[c++],s=g[c++],a?(a.scope?(u=e.$new(),A.$$addScopeInfo(tr(l),u)):u=e,p=a.transcludeOnThisElement?P(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?P(e,t):null,a(s,u,l,i,p)):s&&s(e,l.childNodes,n,o)}for(var l,u,c,f,d,p,h,g=[],v=0;vy;y++){var x=!1,C=!1;f=m[y],d=f.name,g=pr(f.value),h=Je(d),(v=fe.test(h))&&(d=d.replace(Qr,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var _=h.replace(/(Start|End)$/,"");q(_)&&h===_+"Start"&&(x=d,C=d.substr(0,d.length-5)+"end",d=d.substr(0,d.length-6)),p=Je(d.toLowerCase()),l[p]=d,(v||!n.hasOwnProperty(p))&&(n[p]=g,Pe(e,p)&&(n[p]=!0)),ee(e,t,g,p,v),z(t,p,"A",r,i,x,C)}if(a=e.className,b(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=c.exec(a);)p=Je(o[2]),z(t,p,"C",r,i)&&(n[p]=pr(o[3])),a=a.substr(o.index+o[0].length);break;case wr:X(t,e.nodeValue);break;case $r:try{o=u.exec(e.nodeValue),o&&(p=Je(o[1]),z(t,p,"M",r,i)&&(n[p]=pr(o[2])))}catch(E){}}return t.sort(Y),t}function j(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Yr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==br&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return tr(r)}function H(e,t,n){return function(r,i,o,a,s){return i=j(i[0],t,n),e(r,i,o,a,s)}}function W(e,a,s,l,u,c,f,d,p){function h(e,t,n,r){e&&(n&&(e=H(e,n,r)),e.require=E.require,e.directiveName=S,(N===E||E.$$isolateScope)&&(e=re(e,{isolateScope:!0})),f.push(e)),t&&(n&&(t=H(t,n,r)),t.require=E.require,t.directiveName=S,(N===E||E.$$isolateScope)&&(t=re(t,{isolateScope:!0})),d.push(t))}function g(e,t,n,r){var i,a,s="data",l=!1,u=n;if(w(t)){if(a=t.match(m),t=t.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",u=n.parent()),"?"===a[2]&&(l=!0),i=null,r&&"data"===s&&(i=r[t])&&(i=i.instance),i=i||u[s]("$"+t+"Controller"),!i&&!l)throw Yr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return i||null}return dr(t)&&(i=[],o(t,function(t){i.push(g(e,t,n,r))})),i}function $(e,t,i,l,u){function c(e,t,r){var i;return k(e)||(r=t,t=e,e=n),q&&(i=$),r||(r=q?C.parent():C),u(e,t,i,r,O)}var p,h,m,b,w,$,x,C,E;if(a===i?(E=s,C=s.$$element):(C=tr(i),E=new ae(C,s)),N&&(w=t.$new(!0)),u&&(x=c,x.$$boundTransclude=u),D&&(_={},$={},o(D,function(e){var n,r={$scope:e===N||e.$$isolateScope?w:t,$element:C,$attrs:E,$transclude:x};b=e.controller,"@"==b&&(b=E[e.name]),n=y(b,r,!0,e.controllerAs),$[e.name]=n,q||C.data("$"+e.name+"Controller",n.instance),_[e.name]=n})),N){A.$$addScopeInfo(C,w,!0,!(L&&(L===N||L===N.$$originalDirective))),A.$$addScopeClass(C,!0);var S=_&&_[N.name],T=w;S&&S.identifier&&N.bindToController===!0&&(T=S.instance),o(w.$$isolateBindings=N.$$isolateBindings,function(e,n){var i,o,a,s,l=e.attrName,u=e.optional,c=e.mode;switch(c){case"@":E.$observe(l,function(e){T[n]=e}),E.$$observers[l].$$scope=t,E[l]&&(T[n]=r(E[l])(t));break;case"=":if(u&&!E[l])return;o=v(E[l]),s=o.literal?I:function(e,t){return e===t||e!==e&&t!==t},a=o.assign||function(){throw i=T[n]=o(t),Yr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",E[l],N.name)},i=T[n]=o(t);var f=function(e){return s(e,T[n])||(s(e,i)?a(t,e=T[n]):T[n]=e),i=e};f.$stateful=!0;var d;d=e.collection?t.$watchCollection(E[l],f):t.$watch(v(E[l],f),null,o.literal),w.$on("$destroy",d);break;case"&":o=v(E[l]),T[n]=function(e){return o(t,e)}}})}for(_&&(o(_,function(e){e()}),_=null),p=0,h=f.length;h>p;p++)m=f[p],oe(m,m.isolateScope?w:t,C,E,m.require&&g(m.directiveName,m.require,C,$),x);var O=t;for(N&&(N.template||null===N.templateUrl)&&(O=w),e&&e(O,i.childNodes,n,u),p=d.length-1;p>=0;p--)m=d[p],oe(m,m.isolateScope?w:t,C,E,m.require&&g(m.directiveName,m.require,C,$),x)}p=p||{};for(var x,_,E,S,T,O,R,M=-Number.MAX_VALUE,D=p.controllerDirectives,N=p.newIsolateScopeDirective,L=p.templateDirective,P=p.nonTlbTranscludeDirective,W=!1,z=!1,q=p.hasElementTranscludeDirective,Y=s.$$element=tr(a),X=c,Z=l,ee=0,ne=e.length;ne>ee;ee++){E=e[ee];var ie=E.$$start,se=E.$$end;if(ie&&(Y=j(a,ie,se)),T=n,M>E.priority)break;if((R=E.scope)&&(E.templateUrl||(b(R)?(Q("new/isolated scope",N||x,E,Y),N=E):Q("new/isolated scope",N,E,Y)),x=x||E),S=E.name,!E.templateUrl&&E.controller&&(R=E.controller,D=D||{},Q("'"+S+"' controller",D[S],E,Y),D[S]=E),(R=E.transclude)&&(W=!0,E.$$tlb||(Q("transclusion",P,E,Y),P=E),"element"==R?(q=!0,M=E.priority,T=Y,Y=s.$$element=tr(t.createComment(" "+S+": "+s[S]+" ")),a=Y[0],te(u,V(T),a),Z=A(T,l,M,X&&X.name,{nonTlbTranscludeDirective:P})):(T=tr($e(a)).contents(),Y.empty(),Z=A(T,l))),E.template)if(z=!0,Q("template",L,E,Y),L=E,R=C(E.template)?E.template(Y,s):E.template,R=ce(R),E.replace){if(X=E,T=ve(R)?[]:et(J(E.templateNamespace,pr(R))),a=T[0],1!=T.length||a.nodeType!==br)throw Yr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",S,"");te(u,Y,a);var le={$attr:{}},ue=F(a,[],le),fe=e.splice(ee+1,e.length-(ee+1));N&&B(ue),e=e.concat(ue).concat(fe),G(s,le),ne=e.length}else Y.html(R);if(E.templateUrl)z=!0,Q("template",L,E,Y),L=E,E.replace&&(X=E),$=K(e.splice(ee,e.length-ee),Y,s,u,W&&Z,f,d,{controllerDirectives:D,newIsolateScopeDirective:N,templateDirective:L,nonTlbTranscludeDirective:P}),ne=e.length;else if(E.compile)try{O=E.compile(Y,s,Z),C(O)?h(null,O,ie,se):O&&h(O.pre,O.post,ie,se)}catch(de){i(de,U(Y))}E.terminal&&($.terminal=!0,M=Math.max(M,E.priority))}return $.scope=x&&x.scope===!0,$.transcludeOnThisElement=W,$.elementTranscludeOnThisElement=q,$.templateOnThisElement=z,$.transclude=Z,p.hasElementTranscludeDirective=q,$}function B(e){for(var t=0,n=e.length;n>t;t++)e[t]=p(e[t],{$$isolateScope:!0})}function z(t,r,o,l,u,c,f){if(r===u)return null;var d=null;if(a.hasOwnProperty(r))for(var h,g=e.get(r+s),v=0,m=g.length;m>v;v++)try{h=g[v],(l===n||l>h.priority)&&-1!=h.restrict.indexOf(o)&&(c&&(h=p(h,{ +$$start:c,$$end:f})),t.push(h),d=h)}catch(y){i(y)}return d}function q(t){if(a.hasOwnProperty(t))for(var n,r=e.get(t+s),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function G(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;o(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),o(t,function(t,o){"class"==o?(R(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,r[o]=n[o])})}function K(e,t,n,r,i,a,s,u){var c,f,d=[],h=t[0],g=e.shift(),v=p(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),m=C(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,y=g.templateNamespace;return t.empty(),l(S.getTrustedResourceUrl(m)).then(function(l){var p,w,$,x;if(l=ce(l),g.replace){if($=ve(l)?[]:et(J(y,pr(l))),p=$[0],1!=$.length||p.nodeType!==br)throw Yr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,m);w={$attr:{}},te(r,t,p);var C=F(p,[],w);b(g.scope)&&B(C),e=C.concat(e),G(n,w)}else p=h,t.html(l);for(e.unshift(v),c=W(e,p,n,i,t,g,a,s,u),o(r,function(e,n){e==p&&(r[n]=t[0])}),f=D(t[0].childNodes,i);d.length;){var _=d.shift(),E=d.shift(),k=d.shift(),S=d.shift(),T=t[0];if(!_.$$destroyed){if(E!==h){var O=E.className;u.hasElementTranscludeDirective&&g.replace||(T=$e(p)),te(k,tr(E),T),R(tr(T),O)}x=c.transcludeOnThisElement?P(_,c.transclude,S):S,c(f,_,T,r,x)}}d=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(d?d.push(t,n,r,o):(c.transcludeOnThisElement&&(o=P(t,c.transclude,i)),c(f,t,n,r,o)))}}function Y(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name"+n+"",r.childNodes[0].childNodes;default:return n}}function Z(e,t){if("srcdoc"==t)return S.HTML;var n=N(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?S.RESOURCE_URL:void 0}function ee(e,t,n,i,o){var a=Z(e,i);o=d[i]||o;var s=r(n,!0,a,o);if(s){if("multiple"===i&&"select"===N(e))throw Yr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",U(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers={});if($.test(i))throw Yr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[i];c!==n&&(s=c&&r(c,!0,a,o),n=c),s&&(l[i]=s(e),(u[i]||(u[i]=[])).$$inter=!0,(l.$$observers&&l.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?l.$updateClass(e,t):l.$set(i,e)}))}}}})}}function te(e,n,r){var i,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(i=0,o=e.length;o>i;i++)if(e[i]==a){e[i++]=r;for(var u=i,c=u+s-1,f=e.length;f>u;u++,c++)f>c?e[u]=e[c]:delete e[u];e.length-=s-1,e.context===a&&(e.context=r);break}l&&l.replaceChild(r,a);var d=t.createDocumentFragment();d.appendChild(a),tr(r).data(tr(a).data()),nr?(fr=!0,nr.cleanData([a])):delete tr.cache[a[tr.expando]];for(var p=1,h=n.length;h>p;p++){var g=n[p];tr(g).remove(),d.appendChild(g),delete n[p]}n[0]=r,n.length=1}function re(e,t){return f(function(){return e.apply(null,arguments)},e,t)}function oe(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,U(n))}}var ae=function(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e};ae.prototype={$normalize:Je,$addClass:function(e){e&&e.length>0&&T.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&T.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Ze(e,t);n&&n.length&&T.addClass(this.$$element,n);var r=Ze(t,e);r&&r.length&&T.removeClass(this.$$element,r)},$set:function(e,t,r,a){var s,l=this.$$element[0],u=Pe(l,e),c=Fe(l,e),f=e;if(u?(this.$$element.prop(e,t),a=u):c&&(this[c]=t,f=c),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e],a||(this.$attr[e]=a=ne(e,"-"))),s=N(this.$$element),"a"===s&&"href"===e||"img"===s&&"src"===e)this[e]=t=O(t,"src"===e);else if("img"===s&&"srcset"===e){for(var d="",p=pr(t),h=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,g=/\s/.test(p)?h:/(,)/,v=p.split(g),m=Math.floor(v.length/2),y=0;m>y;y++){var b=2*y;d+=O(pr(v[b]),!0),d+=" "+pr(v[b+1])}var w=pr(v[2*y]).split(/\s/);d+=O(pr(w[0]),!0),2===w.length&&(d+=" "+pr(w[1])),this[e]=t=d}r!==!1&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var $=this.$$observers;$&&o($[f],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=ue()),i=r[e]||(r[e]=[]);return i.push(t),_.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(e)&&t(n[e])}),function(){L(i,t)}}};var se=r.startSymbol(),le=r.endSymbol(),ce="{{"==se||"}}"==le?g:function(e){return e.replace(/\{\{/g,se).replace(/}}/g,le)},fe=/^ngAttr[A-Z]/;return A.$$addBindingInfo=x?function(e,t){var n=e.data("$binding")||[];dr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:h,A.$$addBindingClass=x?function(e){R(e,"ng-binding")}:h,A.$$addScopeInfo=x?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:h,A.$$addScopeClass=x?function(e,t){R(e,t?"ng-isolate-scope":"ng-scope")}:h,A}]}function Je(e){return ge(e.replace(Qr,""))}function Ze(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o0?" ":"")+a}return n}function et(e){e=tr(e);var t=e.length;if(1>=t)return e;for(;t--;){var n=e[t];n.nodeType===$r&&or.call(e,t,1)}return e}function tt(){var e={},t=!1,i=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){ae(t,"controller"),b(t)?f(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(o,a){function s(e,t,n,i){if(!e||!b(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,t);e.$scope[t]=n}return function(r,l,u,c){var d,p,h,g;if(u=u===!0,c&&w(c)&&(g=c),w(r)){if(p=r.match(i),!p)throw Xr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);h=p[1],g=g||p[3],r=e.hasOwnProperty(h)?e[h]:se(l.$scope,h,!0)||(t?se(a,h,!0):n),oe(r,h,!0)}if(u){var v=(dr(r)?r[r.length-1]:r).prototype;return d=Object.create(v||null),g&&s(l,g,d,h||r.name),f(function(){return o.invoke(r,d,l,h),d},{instance:d,identifier:g})}return d=o.instantiate(r,l,h),g&&s(l,g,d,h||r.name),d}}]}function nt(){this.$get=["$window",function(e){return tr(e.document)}]}function rt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function it(e,t){if(w(e)){var n=e.replace(ni,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Jr)||ot(n))&&(e=z(n))}}return e}function ot(e){var t=e.match(ei);return t&&ti[t[0]].test(e)}function at(e){var t,n,r,i=ue();return e?(o(e.split("\n"),function(e){r=e.indexOf(":"),t=Yn(pr(e.substr(0,r))),n=pr(e.substr(r+1)),t&&(i[t]=i[t]?i[t]+", "+n:n)}),i):i}function st(e){var t=b(e)?e:n;return function(n){if(t||(t=at(e)),n){var r=t[Yn(n)];return void 0===r&&(r=null),r}return t}}function lt(e,t,n,r){return C(r)?r(e,t,n):(o(r,function(r){e=r(e,t,n)}),e)}function ut(e){return e>=200&&300>e}function ct(){var e=this.defaults={transformResponse:[it],transformRequest:[function(e){return!b(e)||S(e)||O(e)||T(e)?e:B(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:F(Zr),put:F(Zr),patch:F(Zr)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},t=!1;this.useApplyAsync=function(e){return y(e)?(t=!!e,this):t};var i=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,l,u,c,d,p){function h(t){function i(e){var t=f({},e);return e.data?t.data=lt(e.data,e.headers,e.status,l.transformResponse):t.data=e.data,ut(e.status)?t:d.reject(t)}function a(e){var t,n={};return o(e,function(e,r){C(e)?(t=e(),null!=t&&(n[r]=t)):n[r]=e}),n}function s(t){var n,r,i,o=e.headers,s=f({},t.headers);o=f({},o.common,o[Yn(t.method)]);e:for(n in o){r=Yn(n);for(i in s)if(Yn(i)===r)continue e;s[n]=o[n]}return a(s)}if(!ur.isObject(t))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",t);var l=f({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},t);l.headers=s(t),l.method=Xn(l.method);var u=function(t){var r=t.headers,a=lt(t.data,st(r),n,t.transformRequest);return m(a)&&o(r,function(e,t){"content-type"===Yn(t)&&delete r[t]}),m(t.withCredentials)&&!m(e.withCredentials)&&(t.withCredentials=e.withCredentials),$(t,a).then(i,i)},c=[u,n],p=d.when(l);for(o(k,function(e){(e.request||e.requestError)&&c.unshift(e.request,e.requestError),(e.response||e.responseError)&&c.push(e.response,e.responseError)});c.length;){var h=c.shift(),g=c.shift();p=p.then(h,g)}return p.success=function(e){return p.then(function(t){e(t.data,t.status,t.headers,l)}),p},p.error=function(e){return p.then(null,function(t){e(t.data,t.status,t.headers,l)}),p},p}function g(e){o(arguments,function(e){h[e]=function(t,n){return h(f(n||{},{method:e,url:t}))}})}function v(e){o(arguments,function(e){h[e]=function(t,n,r){return h(f(r||{},{method:e,url:t,data:n}))}})}function $(r,i){function o(e,n,r,i){function o(){s(n,e,r,i)}p&&(ut(e)?p.put(x,[e,n,at(r),i]):p.remove(x)),t?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function s(e,t,n,i){t=Math.max(t,0),(ut(t)?v.resolve:v.reject)({data:e,status:t,headers:st(n),config:r,statusText:i})}function u(e){s(e.data,e.status,F(e.headers()),e.statusText)}function f(){var e=h.pendingRequests.indexOf(r);-1!==e&&h.pendingRequests.splice(e,1)}var p,g,v=d.defer(),w=v.promise,$=r.headers,x=_(r.url,r.params);if(h.pendingRequests.push(r),w.then(f,f),!r.cache&&!e.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(p=b(r.cache)?r.cache:b(e.cache)?e.cache:E),p&&(g=p.get(x),y(g)?A(g)?g.then(u,u):dr(g)?s(g[1],g[0],F(g[2]),g[3]):s(g,200,{},"OK"):p.put(x,w)),m(g)){var C=on(r.url)?l.cookies()[r.xsrfCookieName||e.xsrfCookieName]:n;C&&($[r.xsrfHeaderName||e.xsrfHeaderName]=C),a(r.method,x,i,o,$,r.timeout,r.withCredentials,r.responseType)}return w}function _(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||m(e)||(dr(e)||(e=[e]),o(e,function(e){b(e)&&(e=x(e)?e.toISOString():B(e)),n.push(Q(t)+"="+Q(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var E=u("$http"),k=[];return o(i,function(e){k.unshift(w(e)?p.get(e):p.invoke(e))}),h.pendingRequests=[],g("get","delete","head","jsonp"),v("post","put","patch"),h.defaults=e,h}]}function ft(){return new e.XMLHttpRequest}function dt(){this.$get=["$browser","$window","$document",function(e,t,n){return pt(e,ft,e.defer,t.angular.callbacks,n[0])}]}function pt(e,t,r,i,a){function s(e,t,n){var r=a.createElement("script"),o=null;return r.type="text/javascript",r.src=e,r.async=!0,o=function(e){Tr(r,"load",o),Tr(r,"error",o),a.body.removeChild(r),r=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},Sr(r,"load",o),Sr(r,"error",o),a.body.appendChild(r),o}return function(a,l,u,c,f,d,p,g){function v(){w&&w(),$&&$.abort()}function m(t,i,o,a,s){_!==n&&r.cancel(_),w=$=null,t(i,o,a,s),e.$$completeOutstandingRequest(h)}if(e.$$incOutstandingRequestCount(),l=l||e.url(),"jsonp"==Yn(a)){var b="_"+(i.counter++).toString(36);i[b]=function(e){i[b].data=e,i[b].called=!0};var w=s(l.replace("JSON_CALLBACK","angular.callbacks."+b),b,function(e,t){m(c,e,i[b].data,"",t),i[b]=h})}else{var $=t();$.open(a,l,!0),o(f,function(e,t){y(e)&&$.setRequestHeader(t,e)}),$.onload=function(){var e=$.statusText||"",t="response"in $?$.response:$.responseText,n=1223===$.status?204:$.status;0===n&&(n=t?200:"file"==rn(l).protocol?404:0),m(c,n,t,$.getAllResponseHeaders(),e)};var x=function(){m(c,-1,null,null,"")};if($.onerror=x,$.onabort=x,p&&($.withCredentials=!0),g)try{$.responseType=g}catch(C){if("json"!==g)throw C}$.send(u||null)}if(d>0)var _=r(v,d);else A(d)&&d.then(v)}}function ht(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(o,a,d,p){function h(n){return n.replace(u,e).replace(c,t)}function g(e){try{return e=O(e),p&&!y(e)?e:R(e)}catch(t){var n=ri("interr","Can't interpolate: {0}\n{1}",o,t.toString());r(n)}}p=!!p;for(var v,b,w,$=0,x=[],_=[],E=o.length,k=[],S=[];E>$;){if(-1==(v=o.indexOf(e,$))||-1==(b=o.indexOf(t,v+s))){$!==E&&k.push(h(o.substring($)));break}$!==v&&k.push(h(o.substring($,v))),w=o.substring(v+s,b),x.push(w),_.push(n(w,g)),$=b+l,S.push(k.length),k.push("")}if(d&&k.length>1)throw ri("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||x.length){var T=function(e){for(var t=0,n=x.length;n>t;t++){if(p&&m(e[t]))return;k[S[t]]=e[t]}return k.join("")},O=function(e){return d?i.getTrusted(d,e):i.valueOf(e)},R=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=B(e)}return e};return f(function(e){var t=0,n=x.length,i=new Array(n);try{for(;n>t;t++)i[t]=_[t](e);return T(i)}catch(a){var s=ri("interr","Can't interpolate: {0}\n{1}",o,a.toString());r(s)}},{exp:o,expressions:x,$$watchDelegate:function(e,t,n){var r;return e.$watchGroup(_,function(n,i){var o=T(n);C(t)&&t.call(this,o,n!==i?r:o,e),r=o},n)}})}}var s=e.length,l=t.length,u=new RegExp(e.replace(/./g,o),"g"),c=new RegExp(t.replace(/./g,o),"g");return a.startSymbol=function(){return e},a.endSymbol=function(){return t},a}]}function gt(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){function i(i,a,s,l){var u=t.setInterval,c=t.clearInterval,f=0,d=y(l)&&!l,p=(d?r:n).defer(),h=p.promise;return s=y(s)?s:0,h.then(null,null,i),h.$$intervalId=u(function(){p.notify(f++),s>0&&f>=s&&(p.resolve(f),c(h.$$intervalId),delete o[h.$$intervalId]),d||e.$apply()},a),o[h.$$intervalId]=p,h}var o={};return i.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},i}]}function vt(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(e){return 1===e?"one":"other"}}}}function mt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=Y(t[n]);return t.join("/")}function yt(e,t){var n=rn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=d(n.port)||oi[n.protocol]||null}function bt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=rn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=G(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function wt(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function $t(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function xt(e){return e.replace(/(#.+)|#$/,"$1")}function Ct(e){return e.substr(0,$t(e).lastIndexOf("/")+1)}function _t(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Et(e,t){this.$$html5=!0,t=t||"";var r=Ct(e);yt(e,this),this.$$parse=function(e){var t=wt(r,e);if(!w(t))throw ai("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,r);bt(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=K(this.$$search),t=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=mt(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=wt(e,i))!==n?(s=a,l=(a=wt(t,a))!==n?r+(wt("/",a)||a):e+s):(a=wt(r,i))!==n?l=r+a:r==i+"/"&&(l=r),l&&this.$$parse(l),!!l}}function kt(e,t){var n=Ct(e);yt(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=wt(e,r)||wt(n,r);"#"===a.charAt(0)?(o=wt(t,a),m(o)&&(o=a)):o=this.$$html5?a:"",bt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var n=K(this.$$search),r=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=mt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return $t(e)==$t(t)?(this.$$parse(t),!0):!1}}function St(e,t){this.$$html5=!0,kt.apply(this,arguments);var n=Ct(e);this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==$t(r)?o=r:(a=wt(n,r))?o=e+t+a:n===r+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=K(this.$$search),r=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=mt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+t+this.$$url}}function Tt(e){return function(){return this[e]}}function Ot(e,t){return function(n){return m(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Rt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return y(t)?(e=t,this):e},this.html5Mode=function(e){return R(e)?(t.enabled=e,this):b(e)?(R(e.enabled)&&(t.enabled=e.enabled),R(e.requireBase)&&(t.requireBase=e.requireBase),R(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=u.url(),o=u.$$state;try{r.url(e,t,n),u.$$state=r.state()}catch(a){throw u.url(i),u.$$state=o,a}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw ai("nobase","$location in HTML5 mode requires a tag to be present!");f=_t(p)+(d||"/"),c=i.history?Et:St}else f=$t(p),c=kt;u=new c(f,"#"+e),u.$$parseLinkUrl(p,p),u.$$state=r.state();var h=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=tr(e.target);"a"!==N(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),l=i.attr("href")||i.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=rn(s.animVal).href),h.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),xt(u.absUrl())!=xt(p)&&r.url(u.absUrl(),!0);var g=!0;return r.onUrlChange(function(e,t){n.$evalAsync(function(){var r,i=u.absUrl(),o=u.$$state;u.$$parse(e),u.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,u.absUrl()===e&&(r?(u.$$parse(i),u.$$state=o,s(i,!1,o)):(g=!1,l(i,o)))}),n.$$phase||n.$digest()}),n.$watch(function(){var e=xt(r.url()),t=xt(u.absUrl()),o=r.state(),a=u.$$replace,c=e!==t||u.$$html5&&i.history&&o!==u.$$state;(g||c)&&(g=!1,n.$evalAsync(function(){var t=u.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,u.$$state,o).defaultPrevented;u.absUrl()===t&&(r?(u.$$parse(e),u.$$state=o):(c&&s(t,a,o===u.$$state?null:u.$$state),l(e,o)))})),u.$$replace=!1}),u}]}function At(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||h,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function Mt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw li("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Dt(e,t){if(e){if(e.constructor===e)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw li("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw li("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw li("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Nt(e,t){if(e){if(e.constructor===e)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===ui||e===ci||e===fi)throw li("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Lt(e){return e.constant}function Pt(e,t,n,r,i){Dt(e,i),Dt(t,i);for(var o,a=n.split("."),s=0;a.length>1;s++){o=Mt(a.shift(),i);var l=0===s&&t&&t[o]||e[o];l||(l={},e[o]=l),e=Dt(l,i)}return o=Mt(a.shift(),i),Dt(e[o],i),e[o]=r,r}function Ft(e){return"constructor"==e}function It(e,t,r,i,o,a,s){Mt(e,a),Mt(t,a),Mt(r,a),Mt(i,a),Mt(o,a);var l=function(e){return Dt(e,a)},u=s||Ft(e)?l:g,c=s||Ft(t)?l:g,f=s||Ft(r)?l:g,d=s||Ft(i)?l:g,p=s||Ft(o)?l:g;return function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=u(l[e]),t?null==l?n:(l=c(l[t]),r?null==l?n:(l=f(l[r]),i?null==l?n:(l=d(l[i]),o?null==l?n:l=p(l[o]):l):l):l):l)}}function jt(e,t){return function(n,r){return e(n,r,Dt,t)}}function Vt(e,t,r){var i=t.expensiveChecks,a=i?yi:mi,s=a[e];if(s)return s;var l=e.split("."),u=l.length;if(t.csp)s=6>u?It(l[0],l[1],l[2],l[3],l[4],r,i):function(e,t){var o,a=0;do o=It(l[a++],l[a++],l[a++],l[a++],l[a++],r,i)(e,t),t=n,e=o;while(u>a);return o};else{var c="";i&&(c+="s = eso(s, fe);\nl = eso(l, fe);\n");var f=i;o(l,function(e,t){Mt(e,r);var n=(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e;(i||Ft(e))&&(n="eso("+n+", fe)",f=!0),c+="if(s == null) return undefined;\ns="+n+";\n"}),c+="return s;";var d=new Function("s","l","eso","fe",c);d.toString=v(c),f&&(d=jt(d,r)),s=d}return s.sharedGetter=!0,s.assign=function(t,n,r){return Pt(t,r,e,n,e)},a[e]=s,s}function Ht(e){return C(e.valueOf)?e.valueOf():bi.call(e)}function Wt(){var e=ue(),t=ue();this.$get=["$filter","$sniffer",function(n,r){function i(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function a(e,t){for(var n=0,r=e.length;r>n;n++){var i=e[n];i.constant||(i.inputs?a(i.inputs,t):-1===t.indexOf(i)&&t.push(i))}return t}function s(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=Ht(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function l(e,t,n,r){var i,o=r.$$inputs||(r.$$inputs=a(r.inputs,[]));if(1===o.length){var l=s;return o=o[0],e.$watch(function(e){var t=o(e);return s(t,l)||(i=r(e),l=t&&Ht(t)),i},t,n)}for(var u=[],c=0,f=o.length;f>c;c++)u[c]=s;return e.$watch(function(e){for(var t=!1,n=0,a=o.length;a>n;n++){var l=o[n](e);(t||(t=!s(l,u[n])))&&(u[n]=l&&Ht(l))}return t&&(i=r(e)),i},t,n)}function u(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,C(t)&&t.apply(this,arguments),y(e)&&r.$$postDigest(function(){y(o)&&i()})},n)}function c(e,t,n,r){function i(e){var t=!0;return o(e,function(e){y(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return r(e)},function(e,n,r){s=e,C(t)&&t.call(this,e,n,r),i(e)&&r.$$postDigest(function(){i(s)&&a()})},n)}function f(e,t,n,r){var i;return i=e.$watch(function(e){return r(e)},function(e,n,r){C(t)&&t.apply(this,arguments),i()},n)}function d(e,t){if(!t)return e;var n=e.$$watchDelegate,r=n!==c&&n!==u,i=r?function(n,r){var i=e(n,r);return t(i,n,r)}:function(n,r){var i=e(n,r),o=t(i,n,r);return y(i)?o:i};return e.$$watchDelegate&&e.$$watchDelegate!==l?i.$$watchDelegate=e.$$watchDelegate:t.$stateful||(i.$$watchDelegate=l,i.inputs=[e]),i}var p={csp:r.csp,expensiveChecks:!1},g={csp:r.csp,expensiveChecks:!0};return function(r,o,a){var s,v,m;switch(typeof r){case"string":m=r=r.trim();var y=a?t:e;if(s=y[m],!s){":"===r.charAt(0)&&":"===r.charAt(1)&&(v=!0,r=r.substring(2));var b=a?g:p,w=new gi(b),$=new vi(w,n,b);s=$.parse(r),s.constant?s.$$watchDelegate=f:v?(s=i(s),s.$$watchDelegate=s.literal?c:u):s.inputs&&(s.$$watchDelegate=l),y[m]=s}return d(s,o);case"function":return d(r,o);default:return d(h,o)}}}]}function Bt(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Ut(function(t){e.$evalAsync(t)},t)}]}function zt(){this.$get=["$browser","$exceptionHandler",function(e,t){return Ut(function(t){e.defer(t)},t)}]}function Ut(e,t){function i(e,t,n){function r(t){return function(n){i||(i=!0,t.call(e,n))}}var i=!1;return[r(t),r(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var r,i,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][e.status];try{C(r)?i.resolve(r(e.value)):1===e.status?i.resolve(e.value):i.reject(e.value)}catch(l){i.reject(l),t(l)}}}function u(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function c(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function f(e){var t=new c,n=0,r=dr(e)?[]:{};return o(e,function(e,i){n++,m(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}var d=r("$q",TypeError),p=function(){return new c};a.prototype={then:function(e,t,n){var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&u(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}},c.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(b(e)||C(e))&&(n=e&&e.then),C(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,u(this.promise.$$state))}catch(o){r[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;a>o;o++){i=r[o][0],e=r[o][3];try{i.notify(C(e)?e(n):n)}catch(s){t(s)}}})}};var h=function(e){var t=new c;return t.reject(e),t.promise},g=function(e,t){var n=new c;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{C(n)&&(r=n())}catch(i){return g(i,!1)}return A(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},m=function(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)},y=function w(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!C(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof w))return new w(e);var r=new c;return e(t,n),r.promise};return y.defer=p,y.reject=h,y.when=m,y.all=f,y}function qt(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function Gt(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=u(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,n=r("$rootScope"),a=null,s=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,l,c,f){function d(e){e.currentScope.$$destroyed=!0}function p(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function g(e){if(_.$$phase)throw n("inprog","{0} already in progress",_.$$phase);_.$$phase=e}function v(){_.$$phase=null}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function w(){}function $(){for(;S.length;)try{S.shift()()}catch(e){l(e)}s=null}function x(){null===s&&(s=f.defer(function(){_.$apply($)}))}p.prototype={constructor:p,$new:function(t,n){var r;return n=n||this,t?(r=new p,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",d),r},$watch:function(e,t,n){var r=c(e);if(r.$$watchDelegate)return r.$$watchDelegate(this,t,n,r);var i=this,o=i.$$watchers,s={fn:t,last:w,get:r,exp:e,eq:!!n};return a=null,C(t)||(s.fn=h),o||(o=i.$$watchers=[]),o.unshift(s),function(){L(o,s),a=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(i,i,s)):t(i,r,s)}var r=new Array(e.length),i=new Array(e.length),a=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(i,i,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){i[0]=e,r[0]=n,t(i,e===n?i:r,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){i[t]=e,r[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,r,s,l;if(!m(o)){if(b(o))if(i(o)){a!==p&&(a=p,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var u=0;t>u;u++)l=a[u],s=o[u],r=l!==l&&s!==s,r||l===s||(f++,a[u]=s)}else{a!==h&&(a=h={},v=0,f++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,s=o[n],l=a[n],n in a?(r=l!==l&&s!==s,r||l===s||(f++,a[n]=s)):(v++,a[n]=s,f++));if(v>t){f++;for(n in a)o.hasOwnProperty(n)||(v--,delete a[n])}}else a!==o&&(a=o,f++);return f}}function r(){if(g?(g=!1,t(o,o,l)):t(o,s,l),u)if(b(o))if(i(o)){s=new Array(o.length);for(var e=0;e1,f=0,d=c(e,n),p=[],h={},g=!0,v=0;return this.$watch(d,r)},$digest:function(){var e,r,i,o,u,c,d,p,h,m,y=t,b=this,x=[];g("$digest"),f.$$checkUrlChange(),this===_&&null!==s&&(f.defer.cancel(s), +$()),a=null;do{for(c=!1,p=b;E.length;){try{m=E.shift(),m.scope.$eval(m.expression,m.locals)}catch(S){l(S)}a=null}e:do{if(o=p.$$watchers)for(u=o.length;u--;)try{if(e=o[u])if((r=e.get(p))===(i=e.last)||(e.eq?I(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(e===a){c=!1;break e}}else c=!0,a=e,e.last=e.eq?P(r,null):r,e.fn(r,i===w?r:i,p),5>y&&(h=4-y,x[h]||(x[h]=[]),x[h].push({msg:C(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:r,oldVal:i}))}catch(S){l(S)}if(!(d=p.$$childHead||p!==b&&p.$$nextSibling))for(;p!==b&&!(d=p.$$nextSibling);)p=p.$parent}while(p=d);if((c||E.length)&&!y--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,x)}while(c||E.length);for(v();k.length;)try{k.shift()()}catch(S){l(S)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==_){for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=h,this.$on=this.$watch=this.$watchGroup=function(){return h},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){_.$$phase||E.length||f.defer(function(){E.length&&_.$digest()}),E.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){k.push(e)},$apply:function(e){try{return g("$apply"),this.$eval(e)}catch(t){l(t)}finally{v();try{_.$digest()}catch(t){throw l(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&S.push(t),x()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);-1!==r&&(n[r]=null,y(i,1,e))}},$emit:function(e,t){var n,r,i,o=[],a=this,s=!1,u={name:e,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},c=j([u],arguments,1);do{for(n=a.$$listeners[e]||o,u.currentScope=a,r=0,i=n.length;i>r;r++)if(n[r])try{n[r].apply(null,c)}catch(f){l(f)}else n.splice(r,1),r--,i--;if(s)return u.currentScope=null,u;a=a.$parent}while(a);return u.currentScope=null,u},$broadcast:function(e,t){var n=this,r=n,i=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,s,u,c=j([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[e]||[],s=0,u=a.length;u>s;s++)if(a[s])try{a[s].apply(null,c)}catch(f){l(f)}else a.splice(s,1),s--,u--;if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var _=new p,E=_.$$asyncQueue=[],k=_.$$postDigestQueue=[],S=_.$$applyAsyncQueue=[];return _}]}function Kt(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return y(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=rn(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function Yt(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw wi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=hr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(_(e))return new RegExp("^"+e.source+"$");throw wi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Qt(e){var t=[];return y(e)&&o(e,function(e){t.push(Yt(e))}),t}function Xt(){this.SCE_CONTEXTS=$i;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Qt(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Qt(e)),t},this.$get=["$injector",function(r){function i(e,t){return"self"===e?on(t):!!e.exec(t.href)}function o(n){var r,o,a=rn(n.toString()),s=!1;for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var r=d.hasOwnProperty(e)?d[e]:null;if(!r)throw wi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw wi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)}function l(e){return e instanceof f?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||t===n||""===t)return t;var r=d.hasOwnProperty(e)?d[e]:null;if(r&&t instanceof r)return t.$$unwrapTrustedValue();if(e===$i.RESOURCE_URL){if(o(t))return t;throw wi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===$i.HTML)return c(t);throw wi("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(e){throw wi("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(c=r.get("$sanitize"));var f=a(),d={};return d[$i.HTML]=a(f),d[$i.CSS]=a(f),d[$i.URL]=a(f),d[$i.JS]=a(f),d[$i.RESOURCE_URL]=a(d[$i.URL]),{trustAs:s,getTrusted:u,valueOf:l}}]}function Jt(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>er)throw wi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=F($i);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=g),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:t(n,function(t){return r.getTrusted(e,t)})};var i=r.parseAs,a=r.getTrusted,s=r.trustAs;return o($i,function(e,t){var n=Yn(t);r[ge("parse_as_"+n)]=function(t){return i(e,t)},r[ge("get_trusted_"+n)]=function(t){return a(e,t)},r[ge("trust_as_"+n)]=function(t){return s(e,t)}}),r}]}function Zt(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=d((/android (\d+)/.exec(Yn((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,f=!1;if(u){for(var p in u)if(r=l.exec(p)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!o||c&&f||(c=w(s.body.style.webkitTransition),f=w(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hasEvent:function(e){if("input"===e&&11>=er)return!1;if(m(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:gr(),vendorPrefix:n,transitions:c,animations:f,android:o}}]}function en(){this.$get=["$templateCache","$http","$q",function(e,t,n){function r(i,o){function a(e){if(!o)throw Yr("tpload","Failed to load template: {0}",i);return n.reject(e)}r.totalPendingRequests++;var s=t.defaults&&t.defaults.transformResponse;dr(s)?s=s.filter(function(e){return e!==it}):s===it&&(s=null);var l={cache:e,transformResponse:s};return t.get(i,l)["finally"](function(){r.totalPendingRequests--}).then(function(e){return e.data},a)}return r.totalPendingRequests=0,r}]}function tn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),i=[];return o(r,function(e){var r=ur.element(e).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+hr(t)+"(\\s|\\||$)");o.test(r)&&i.push(e)}else-1!=r.indexOf(t)&&i.push(e)})}),i},r.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;ie;e=Math.abs(e);var a=e+"",s="",l=[],u=!1;if(-1!==a.indexOf("e")){var c=a.match(/([\d\.]+)e(-?)(\d+)/);c&&"-"==c[2]&&c[3]>i+1?e=0:(s=a,u=!0)}if(u)i>0&&1>e&&(s=e.toFixed(i),e=parseFloat(s));else{var f=(a.split(_i)[1]||"").length;m(i)&&(i=Math.min(Math.max(t.minFrac,f),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+-i);var d=(""+e).split(_i),p=d[0];d=d[1]||"";var h,g=0,v=t.lgSize,y=t.gSize;if(p.length>=v+y)for(g=p.length-v,h=0;g>h;h++)(g-h)%y===0&&0!==h&&(s+=n),s+=p.charAt(h);for(h=g;he&&(r="-",e=-e),e=""+e;e.length0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),hn(o,t,r)}}function vn(e,t){return function(n,r){var i=n["get"+e](),o=Xn(t?"SHORT"+e:e);return r[o][i]}}function mn(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=hn(Math[t>0?"floor":"ceil"](t/60),2)+hn(Math.abs(t%60),2)}function yn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function bn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function wn(e){return function(t){var n=yn(t.getFullYear()),r=bn(t),i=+r-+n,o=1+Math.round(i/6048e5);return hn(o,e)}}function $n(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function xn(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function Cn(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function _n(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=d(t[9]+t[10]),o=d(t[9]+t[11])),a.call(r,d(t[1]),d(t[2])-1,d(t[3]));var l=d(t[4]||0)-i,u=d(t[5]||0)-o,c=d(t[6]||0),f=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,l,u,c,f),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,l="",u=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,w(n)&&(n=Si.test(n)?d(n):t(n)),$(n)&&(n=new Date(n)),!x(n))return n;for(;r;)s=ki.exec(r),s?(u=j(u,s,1),r=u.pop()):(u.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(u,function(t){a=Ei[t],l+=a?a(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function En(){return function(e,t){return m(t)&&(t=2),B(e,t)}}function kn(){return function(e,t){return $(e)&&(e=e.toString()),dr(e)||w(e)?(t=Math.abs(Number(t))===1/0?Number(t):d(t),t?t>0?e.slice(0,t):e.slice(t):w(e)?"":[]):e}}function Sn(e){return function(t,n,r){function o(e,t){for(var r=0;re?-1:1):r>n?-1:1}return i(t)?(n=dr(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,r=t||g;if(w(t)){if(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(u,n);if(r=e(t),r.constant){var i=r();return a(function(e,t){return u(e[i],t[i])},n)}}return a(function(e,t){return u(r(e),r(t))},n)}),ir.call(t).sort(a(o,r))):t}}function Tn(e){return C(e)&&(e={link:e}),e.restrict=e.restrict||"AC",v(e)}function On(e,t){e.$name=t}function Rn(e,t,r,i,a){var s=this,l=[],u=s.$$parentForm=e.parent().controller("form")||Mi;s.$error={},s.$$success={},s.$pending=n,s.$name=a(t.name||t.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,u.$addControl(s),s.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){ae(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e)},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],o(s.$pending,function(t,n){s.$setValidity(n,null,e)}),o(s.$error,function(t,n){s.$setValidity(n,null,e)}),o(s.$$success,function(t,n){s.$setValidity(n,null,e)}),L(l,e)},Un({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(L(r,n),0===r.length&&delete e[t])},parentForm:u,$animate:i}),s.$setDirty=function(){i.removeClass(e,go),i.addClass(e,vo),s.$dirty=!0,s.$pristine=!1,u.$setDirty()},s.$setPristine=function(){i.setClass(e,go,vo+" "+Di),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(l,function(e){e.$setPristine()})},s.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){i.addClass(e,Di),s.$submitted=!0,u.$setSubmitted()}}function An(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function Mn(e,t,n,r,i,o){Dn(e,t,n,r,i,o),An(r)}function Dn(e,t,n,r,i,o){var a=Yn(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(e){s=!0}),t.on("compositionend",function(){s=!1,l()})}var l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=pr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var u,c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),r.$render=function(){t.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function Nn(e,t){if(x(e))return e;if(w(e)){Bi.lastIndex=0;var n=Bi.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,l=0,u=yn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,u.getDate()+c,o,a,s,l)}}return NaN}function Ln(e,t){return function(n,r){var i,a;if(x(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Fi.test(n))return new Date(n);if(e.lastIndex=0,i=e.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(e,n){n=v},s.$observe("min",function(e){v=p(e),l.$validate()})}if(y(s.max)||s.ngMax){var b;l.$validators.max=function(e){return!d(e)||m(b)||r(e)<=b},s.$observe("max",function(e){b=p(e),l.$validate()})}}}function Fn(e,t,r,i){var o=t[0],a=i.$$hasNativeValidators=b(o.validity);a&&i.$parsers.push(function(e){var r=t.prop(Kn)||{};return r.badInput&&!r.typeMismatch?n:e})}function In(e,t,r,i,o,a){if(Fn(e,t,r,i),Dn(e,t,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:Vi.test(e)?parseFloat(e):n}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!$(e))throw wo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),y(r.min)||r.ngMin){var s;i.$validators.min=function(e){return i.$isEmpty(e)||m(s)||e>=s},r.$observe("min",function(e){y(e)&&!$(e)&&(e=parseFloat(e,10)),s=$(e)&&!isNaN(e)?e:n,i.$validate()})}if(y(r.max)||r.ngMax){var l;i.$validators.max=function(e){return i.$isEmpty(e)||m(l)||l>=e},r.$observe("max",function(e){y(e)&&!$(e)&&(e=parseFloat(e,10)),l=$(e)&&!isNaN(e)?e:n,i.$validate()})}}function jn(e,t,n,r,i,o){Dn(e,t,n,r,i,o),An(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||Ii.test(n)}}function Vn(e,t,n,r,i,o){Dn(e,t,n,r,i,o),An(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||ji.test(n)}}function Hn(e,t,n,r){m(n.name)&&t.attr("name",u());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function Wn(e,t,n,i,o){var a;if(y(i)){if(a=e(i),!a.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return a(t)}return o}function Bn(e,t,n,r,i,o,a,s){var l=Wn(s,e,"ngTrueValue",n.ngTrueValue,!0),u=Wn(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return I(e,l)}),r.$parsers.push(function(e){return e?l:u})}function zn(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function d(e,t){var i=r(t,e),o=r(e,t);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||a.$index%2===t){var n=i(e||[]);if(h){if(!I(e,h)){var r=i(h);d(r,n)}}else u(n)}h=F(e)}var h;a.$watch(l[e],p,!0),l.$observe("class",function(t){p(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(l[e]));o===t?u(s):c(s)}})}}}]}function Un(e){function t(e,t,l){t===n?r("$pending",e,l):i("$pending",e,l),R(t)?t?(f(s.$error,e,l),c(s.$$success,e,l)):(c(s.$error,e,l),f(s.$$success,e,l)):(f(s.$error,e,l),f(s.$$success,e,l)),s.$pending?(o(bo,!0),s.$valid=s.$invalid=n,a("",null)):(o(bo,!1),s.$valid=qn(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var u;u=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,u),d.$setValidity(e,u,s)}function r(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function i(e,t,r){s[e]&&f(s[e],t,r),qn(s[e])&&(s[e]=n)}function o(e,t){t&&!u[e]?(p.addClass(l,e),u[e]=!0):!t&&u[e]&&(p.removeClass(l,e),u[e]=!1)}function a(e,t){e=e?"-"+ne(e,"-"):"",o(po+e,t===!0),o(ho+e,t===!1)}var s=e.ctrl,l=e.$element,u={},c=e.set,f=e.unset,d=e.parentForm,p=e.$animate;u[ho]=!(u[po]=l.hasClass(po)),s.$setValidity=t}function qn(e){if(e)for(var t in e)return!1;return!0}var Gn=/^\/(.+)\/([a-z]*)$/,Kn="validity",Yn=function(e){return w(e)?e.toLowerCase():e},Qn=Object.prototype.hasOwnProperty,Xn=function(e){return w(e)?e.toUpperCase():e},Jn=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Zn=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Yn=Jn,Xn=Zn);var er,tr,nr,rr,ir=[].slice,or=[].splice,ar=[].push,sr=Object.prototype.toString,lr=r("ng"),ur=e.angular||(e.angular={}),cr=0;er=t.documentMode,h.$inject=[],g.$inject=[];var fr,dr=Array.isArray,pr=function(e){return w(e)?e.trim():e},hr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#(?:<\/\1>|)$/,Nr=/<|&#?\w+;/,Lr=/<([\w:]+)/,Pr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fr={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Fr.optgroup=Fr.option,Fr.tbody=Fr.tfoot=Fr.colgroup=Fr.caption=Fr.thead,Fr.th=Fr.td;var Ir=we.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),we(e).on("load",r))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return tr(e>=0?this[e]:this[this.length+e])},length:0,push:ar,sort:[].sort,splice:[].splice},jr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){jr[Yn(e)]=e});var Vr={};o("input,select,option,textarea,button,form,details".split(","),function(e){Vr[e]=!0});var Hr={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:ke,removeData:_e},function(e,t){we[t]=e}),o({data:ke,inheritedData:Me,scope:function(e){return tr.data(e,"$scope")||Me(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return tr.data(e,"$isolateScope")||tr.data(e,"$isolateScopeNoTemplate")},controller:Ae,injector:function(e){return Me(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Se,css:function(e,t,n){return t=ge(t),y(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,r){var i=Yn(t);if(jr[i]){if(!y(r))return e[t]||(e.attributes.getNamedItem(t)||h).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(y(r))e.setAttribute(t,r);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){return y(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(m(t)){var n=e.nodeType;return n===br||n===wr?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(m(t)){if(e.multiple&&"select"===N(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return m(t)?e.innerHTML:(xe(e,!0),void(e.innerHTML=t))},empty:De},function(e,t){we.prototype[t]=function(t,r){var i,o,a=this.length;if(e!==De&&(2==e.length&&e!==Se&&e!==Ae?t:r)===n){if(b(t)){for(i=0;a>i;i++)if(e===ke)e(this[i],t);else for(o in t)e(this[i],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,u=0;l>u;u++){var c=e(this[u],t,r);s=s?s+c:c}return s}for(i=0;a>i;i++)e(this[i],t,r);return this}}),o({removeData:_e,on:function Go(e,t,n,r){if(y(r))throw Mr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(me(e)){var i=Ee(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Ie(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var u=o[t];u||(o[t]=[],"mouseenter"===t||"mouseleave"===t?Go(e,Ar[t],function(e){var n=this,r=e.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(e,t)}):"$destroy"!==t&&Sr(e,t,a),u=o[t]),u.push(n)}}},off:Ce,one:function(e,t,n){e=tr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;xe(e),o(new we(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===br&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===br||n===Cr){t=new we(t);for(var r=0,i=t.length;i>r;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===br){var n=e.firstChild;o(new we(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=tr(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Ne,detach:function(e){Ne(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new we(t);for(var i=0,o=t.length;o>i;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Oe,removeClass:Te,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var r=n;m(r)&&(r=!Se(e,t)),(r?Oe:Te)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Cr?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:$e,triggerHandler:function(e,t,n){var r,i,a,s=t.type||t,l=Ee(e),u=l&&l.events,c=u&&u[s];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:h,type:s,target:e},t.type&&(r=f(r,t)),i=F(c),a=n?[r].concat(n):[r],o(i,function(t){r.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){we.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;a>o;o++)m(i)?(i=e(this[o],t,n,r),y(i)&&(i=tr(i))):Re(i,e(this[o],t,n,r));return y(i)?i:this},we.prototype.bind=we.prototype.on,we.prototype.unbind=we.prototype.off}),He.prototype={put:function(e,t){this[Ve(e,this.nextUid)]=t},get:function(e){return this[Ve(e,this.nextUid)]},remove:function(e){var t=this[e=Ve(e,this.nextUid)];return delete this[e],t}};var Wr=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Br=/,/,zr=/^\s*(_?)(\S+?)\1\s*$/,Ur=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,qr=r("$injector");ze.$$annotate=Be;var Gr=r("$animate"),Kr=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&"."!=t.charAt(0))throw Gr("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){function r(t){var r,i=e.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=t(function(){i.resolve()})}),i.promise}function i(e,t){var n=[],r=[],i=ue();return o((e.attr("class")||"").split(/\s+/),function(e){i[e]=!0}),o(t,function(e,t){var o=i[t];e===!1&&o?r.push(t):e!==!0||o||n.push(t)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function a(e,t,n){for(var r=0,i=t.length;i>r;++r){var o=t[r];e[o]=n}}function s(){return u||(u=e.defer(),t(function(){u.resolve(),u=null})),u.promise}function l(e,t){if(ur.isObject(t)){var n=f(t.from||{},t.to||{});e.css(n)}}var u;return{animate:function(e,t,n){return l(e,{from:t,to:n}),s()},enter:function(e,t,n,r){return l(e,r),n?n.after(e):t.prepend(e),s()},leave:function(e,t){return l(e,t),e.remove(),s()},move:function(e,t,n,r){return this.enter(e,t,n,r)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=tr(e),t=w(t)?t:dr(t)?t.join(" "):"",o(e,function(e){Oe(e,t)}),l(e,n),s()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=tr(e),t=w(t)?t:dr(t)?t.join(" "):"",o(e,function(e){Te(e,t)}),l(e,n),s()},setClass:function(e,t,n,o){var s=this,l="$$animateClasses",u=!1;e=tr(e);var c=e.data(l);c?o&&c.options&&(c.options=ur.extend(c.options||{},o)):(c={classes:{},options:o},u=!0);var f=c.classes;return t=dr(t)?t:t.split(" "),n=dr(n)?n:n.split(" "),a(f,t,!0),a(f,n,!1),u&&(c.promise=r(function(t){var n=e.data(l);if(e.removeData(l),n){var r=i(e,n.classes);r&&s.$$setClassImmediately(e,r[0],r[1],n.options)}t()}),e.data(l,c)),c.promise},$$setClassImmediately:function(e,t,n,r){ +return t&&this.$$addClassImmediately(e,t),n&&this.$$removeClassImmediately(e,n),l(e,r),s()},enabled:h,cancel:h}}]}],Yr=r("$compile");Xe.$inject=["$provide","$$sanitizeUriProvider"];var Qr=/^((?:x|data)[\:\-_])/i,Xr=r("$controller"),Jr="application/json",Zr={"Content-Type":Jr+";charset=utf-8"},ei=/^\[|^\{(?!\{)/,ti={"[":/]$/,"{":/}$/},ni=/^\)\]\}',?\n/,ri=r("$interpolate"),ii=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,oi={http:80,https:443,ftp:21},ai=r("$location"),si={$$html5:!1,$$replace:!1,absUrl:Tt("$$absUrl"),url:function(e){if(m(e))return this.$$url;var t=ii.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Tt("$$protocol"),host:Tt("$$host"),port:Tt("$$port"),path:Ot("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e)||$(e))e=e.toString(),this.$$search=G(e);else{if(!b(e))throw ai("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=P(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:m(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Ot("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([St,kt,Et],function(e){e.prototype=Object.create(si),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Et||!this.$$html5)throw ai("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=m(t)?null:t,this}});var li=r("$parse"),ui=Function.prototype.call,ci=Function.prototype.apply,fi=Function.prototype.bind,di=ue();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,di[t]=e}),di["this"]=function(e){return e},di["this"].sharedGetter=!0;var pi=f(ue(),{"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),y(r)?y(i)?r+i:r:y(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(y(n)?n:0)-(y(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),hi={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},gi=function(e){this.options=e};gi.prototype={constructor:gi,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index="0"&&"9">=e&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||" "===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw li("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.indexe){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return i?(this.tokens.shift(),i):!1},consume:function(e){if(0===this.tokens.length)throw li("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},unaryFn:function(e,t){var n=pi[e];return f(function(e,r){return n(e,r,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,r){var i=pi[t];return f(function(t,r){return i(t,r,e,n)},{constant:e.constant&&n.constant,inputs:!r&&[e,n]})},identifier:function(){for(var e=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)e+=this.consume().text+this.consume().text;return Vt(e,this.options,this.text)},constant:function(){var e=this.consume().value;return f(function(){return e},{constant:!0,literal:!0})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var r,i=0,o=e.length;o>i;i++)r=e[i](t,n);return r}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},filter:function(e){var t,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(t=[],r=[];this.expect(":");)t.push(this.expression());var o=[e].concat(t||[]);return f(function(o,a){var s=e(o,a);if(r){r[0]=s;for(var l=t.length;l--;)r[l+1]=t[l](o,a);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&o.every(Lt),inputs:!i.$stateful&&o})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),f(function(t,r){return n.assign(t,e(t,r),r)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if((t=this.expect("?"))&&(e=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(t,i){return n(t,i)?e(t,i):r(t,i)},{constant:n.constant&&e.constant&&r.constant})}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.text,this.logicalAND(),!0);return t},logicalAND:function(){for(var e,t=this.equality();e=this.expect("&&");)t=this.binaryFn(t,e.text,this.equality(),!0);return t},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t=this.binaryFn(t,e.text,this.relational());return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t=this.binaryFn(t,e.text,this.additive());return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.text,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.text,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(vi.ZERO,e.text,this.unary()):(e=this.expect("!"))?this.unaryFn(e.text,this.unary()):this.primary()},fieldAccess:function(e){var t=this.identifier();return f(function(r,i,o){var a=o||e(r,i);return null==a?n:t(a)},{assign:function(n,r,i){var o=e(n,i);return o||e.assign(n,o={},i),t.assign(o,r)}})},objectIndex:function(e){var t=this.text,r=this.expression();return this.consume("]"),f(function(i,o){var a,s=e(i,o),l=r(i,o);return Mt(l,t),s?a=Dt(s[l],t):n},{assign:function(n,i,o){var a=Mt(r(n,o),t),s=Dt(e(n,o),t);return s||e.assign(n,s={},o),s[a]=i}})},functionCall:function(e,t){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,o=r.length?[]:null;return function(a,s){var l=t?t(a,s):y(t)?n:a,u=e(a,s,l)||h;if(o)for(var c=r.length;c--;)o[c]=Dt(r[c](a,s),i);Dt(l,i),Nt(u,i);var f=u.apply?u.apply(l,o):u(o[0],o[1],o[2],o[3],o[4]);return o&&(o.length=0),Dt(f,i)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(t,n){for(var r=[],i=0,o=e.length;o>i;i++)r.push(e[i](t,n));return r},{literal:!0,constant:e.every(Lt),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?e.push(n.value):n.identifier?e.push(n.text):this.throwError("invalid key",n),this.consume(":"),t.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},o=0,a=t.length;a>o;o++)i[e[o]]=t[o](n,r);return i},{literal:!0,constant:t.every(Lt),inputs:t})}};var mi=ue(),yi=ue(),bi=Object.prototype.valueOf,wi=r("$sce"),$i={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Yr=r("$compile"),xi=t.createElement("a"),Ci=rn(e.location.href);sn.$inject=["$provide"],fn.$inject=["$locale"],dn.$inject=["$locale"];var _i=".",Ei={yyyy:gn("FullYear",4),yy:gn("FullYear",2,0,!0),y:gn("FullYear",1),MMMM:vn("Month"),MMM:vn("Month",!0),MM:gn("Month",2,1),M:gn("Month",1,1),dd:gn("Date",2),d:gn("Date",1),HH:gn("Hours",2),H:gn("Hours",1),hh:gn("Hours",2,-12),h:gn("Hours",1,-12),mm:gn("Minutes",2),m:gn("Minutes",1),ss:gn("Seconds",2),s:gn("Seconds",1),sss:gn("Milliseconds",3),EEEE:vn("Day"),EEE:vn("Day",!0),a:$n,Z:mn,ww:wn(2),w:wn(1),G:xn,GG:xn,GGG:xn,GGGG:Cn},ki=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Si=/^\-?\d+$/;_n.$inject=["$locale"];var Ti=v(Yn),Oi=v(Xn);Sn.$inject=["$parse"];var Ri=v({restrict:"E",compile:function(e,t){return t.href||t.xlinkHref||t.name?void 0:function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===sr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Ai={};o(jr,function(e,t){if("multiple"!=e){var n=Je("ng-"+t);Ai[n]=function(){return{restrict:"A",priority:100,link:function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),o(Hr,function(e,t){Ai[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Gn);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=Je("ng-"+e);Ai[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===sr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(er&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Mi={$addControl:h,$$renameControl:On,$removeControl:h,$setValidity:h,$setDirty:h,$setPristine:h,$setSubmitted:h},Di="ng-submitted";Rn.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Ni=function(e){return["$timeout",function(t){var r={name:"form",restrict:e?"EAC":"E",controller:Rn,compile:function(r,i){r.addClass(go).addClass(po);var o=i.name?"name":e&&i.ngForm?"ngForm":!1;return{pre:function(e,r,i,a){if(!("action"in i)){var s=function(t){e.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),t.preventDefault()};Sr(r[0],"submit",s),r.on("$destroy",function(){t(function(){Tr(r[0],"submit",s)},0,!1)})}var l=a.$$parentForm;o&&(Pt(e,null,a.$name,a,a.$name),i.$observe(o,function(t){a.$name!==t&&(Pt(e,null,a.$name,n,a.$name),l.$$renameControl(a,t),Pt(e,null,a.$name,a,a.$name))})),r.on("$destroy",function(){l.$removeControl(a),o&&Pt(e,null,i[o],n,a.$name),f(a,Mi)})}}}};return r}]},Li=Ni(),Pi=Ni(!0),Fi=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Ii=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,ji=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Vi=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Hi=/^(\d{4})-(\d{2})-(\d{2})$/,Wi=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Bi=/^(\d{4})-W(\d\d)$/,zi=/^(\d{4})-(\d\d)$/,Ui=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,qi={text:Mn,date:Pn("date",Hi,Ln(Hi,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Pn("datetimelocal",Wi,Ln(Wi,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Pn("time",Ui,Ln(Ui,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Pn("week",Bi,Nn,"yyyy-Www"),month:Pn("month",zi,Ln(zi,["yyyy","MM"]),"yyyy-MM"),number:In,url:jn,email:Vn,radio:Hn,checkbox:Bn,hidden:h,button:h,submit:h,reset:h,file:h},Gi=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(qi[Yn(a.type)]||qi.text)(i,o,a,s[0],t,e,n,r)}}}}],Ki=/^(true|false|\d+)$/,Yi=function(){return{restrict:"A",priority:100,compile:function(e,t){return Ki.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Qi=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,r,i){e.$$addBindingInfo(r,i.ngBind),r=r[0],t.$watch(i.ngBind,function(e){r.textContent=e===n?"":e})}}}}],Xi=["$interpolate","$compile",function(e,t){return{compile:function(r){return t.$$addBindingClass(r),function(r,i,o){var a=e(i.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(i,a.expressions),i=i[0],o.$observe("ngBindTemplate",function(e){i.textContent=e===n?"":e})}}}}],Ji=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){r.html(e.getTrustedHtml(o(t))||"")})}}}}],Zi=v({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),eo=zn("",!0),to=zn("Odd",0),no=zn("Even",1),ro=Tn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),io=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],oo={},ao={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Je("ng-"+e);oo[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};ao[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var so=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,l,u;n.$watch(i.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=le(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],lo=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ur.noop,compile:function(i,o){var a=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(i,o,u,c,f){var d,p,h,g=0,v=function(){p&&(p.remove(),p=null),d&&(d.$destroy(),d=null),h&&(n.leave(h).then(function(){p=null}),p=h,h=null)};i.$watch(r.parseAsResourceUrl(a),function(r){var a=function(){!y(l)||l&&!i.$eval(l)||t()},u=++g;r?(e(r,!0).then(function(e){if(u===g){var t=i.$new();c.template=e;var l=f(t,function(e){v(),n.enter(e,null,o).then(a)});d=t,h=l,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){u===g&&(v(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(v(),c.template=null)})}}}}],uo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void e(ye(o.template,t).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void e(r.contents())(n))}}}],co=Tn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),fo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,i){var a=t.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,l=s?pr(a):a,u=function(e){if(!m(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?pr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){return dr(e)?e.join(a):n}),i.$isEmpty=function(e){return!e||!e.length}}}},po="ng-valid",ho="ng-invalid",go="ng-pristine",vo="ng-dirty",mo="ng-untouched",yo="ng-touched",bo="ng-pending",wo=new r("ngModel"),$o=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,i,a,s,l,u,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(e);var d,p=a(r.ngModel),g=p.assign,v=p,b=g,w=null,x=this;this.$$setOptions=function(e){if(x.$options=e,e&&e.getterSetter){var t=a(r.ngModel+"()"),n=a(r.ngModel+"($$$p)");v=function(e){var n=p(e);return C(n)&&(n=t(e)),n},b=function(e,t){C(p(e))?n(e,{$$$p:x.$modelValue}):g(e,x.$modelValue)}}else if(!p.assign)throw wo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,U(i))},this.$render=h,this.$isEmpty=function(e){return m(e)||""===e||null===e||e!==e};var _=i.inheritedData("$formController")||Mi,E=0;Un({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:_,$animate:s}),this.$setPristine=function(){x.$dirty=!1,x.$pristine=!0,s.removeClass(i,vo),s.addClass(i,go)},this.$setDirty=function(){x.$dirty=!0,x.$pristine=!1,s.removeClass(i,go),s.addClass(i,vo),_.$setDirty()},this.$setUntouched=function(){x.$touched=!1,x.$untouched=!0,s.setClass(i,mo,yo)},this.$setTouched=function(){x.$touched=!0,x.$untouched=!1,s.setClass(i,yo,mo)},this.$rollbackViewValue=function(){l.cancel(w),x.$viewValue=x.$$lastCommittedViewValue,x.$render()},this.$validate=function(){if(!$(x.$modelValue)||!isNaN(x.$modelValue)){var e=x.$$lastCommittedViewValue,t=x.$$rawModelValue,r=x.$valid,i=x.$modelValue,o=x.$options&&x.$options.allowInvalid;x.$$runValidators(t,e,function(e){o||r===e||(x.$modelValue=e?t:n,x.$modelValue!==i&&x.$$writeModelToScope())})}},this.$$runValidators=function(e,t,r){function i(){var e=x.$$parserName||"parse";return d!==n?(d||(o(x.$validators,function(e,t){l(t,null)}),o(x.$asyncValidators,function(e,t){l(t,null)})),l(e,d),d):(l(e,null),!0)}function a(){var n=!0;return o(x.$validators,function(r,i){var o=r(e,t);n=n&&o,l(i,o)}),n?!0:(o(x.$asyncValidators,function(e,t){l(t,null)}),!1)}function s(){var r=[],i=!0;o(x.$asyncValidators,function(o,a){var s=o(e,t);if(!A(s))throw wo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(a,n),r.push(s.then(function(){l(a,!0)},function(e){i=!1,l(a,!1)}))}),r.length?c.all(r).then(function(){u(i)},h):u(!0)}function l(e,t){f===E&&x.$setValidity(e,t)}function u(e){f===E&&r(e)}E++;var f=E;return i()&&a()?void s():void u(!1)},this.$commitViewValue=function(){var e=x.$viewValue;l.cancel(w),(x.$$lastCommittedViewValue!==e||""===e&&x.$$hasNativeValidators)&&(x.$$lastCommittedViewValue=e,x.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){x.$modelValue!==a&&x.$$writeModelToScope()}var r=x.$$lastCommittedViewValue,i=r;if(d=m(i)?n:!0)for(var o=0;od;d++)if(k=r===R?d:R[d],S=r[k],T=O(k,S,d),v[T])A=v[T],delete v[T],L[T]=A,M[d]=A;else{if(L[T])throw o(M,function(e){e&&e.scope&&(v[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,T,S);M[d]={id:T,scope:n,clone:n},L[T]=!0}for(var F in v){if(A=v[F],D=le(A.clone),a.leave(D),D[0].parentNode)for(d=0,m=D.length;m>d;d++)D[d][s]=!0;A.scope.$destroy()}for(d=0;x>d;d++)if(k=r===R?d:R[d],S=r[k],A=M[d],A.scope){b=N;do b=b.nextSibling;while(b&&b[s]);c(A)!=b&&a.move(le(A.clone),null,tr(N)),N=f(A),u(A.scope,d,w,S,$,k,x)}else g(function(e,t){A.scope=t;var n=h.cloneNode(!1);e[e.length++]=n,a.enter(e,null,tr(N)),N=n,A.clone=e,L[A.id]=A,u(A.scope,d,w,S,$,k,x)});v=L})}}}}],To="ng-hide",Oo="ng-hide-animate",Ro=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,To,{tempClasses:Oo})})}}}],Ao=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,To,{tempClasses:Oo})})}}}],Mo=Tn(function(e,t,n){e.$watchCollection(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)})}),Do=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,l=[],u=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)e.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=le(u[r].clone);f[r].$destroy();var p=c[r]=e.leave(s);p.then(d(c,r))}u.length=0,f.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:r};u.push(a),e.enter(r,o.parent(),o)})})})}}}],No=Tn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Lo=Tn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Po=Tn({restrict:"EAC",link:function(e,t,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",U(t));o(function(e){t.empty(),t.append(e)})}}),Fo=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],Io=r("ngOptions"),jo=v({restrict:"A",terminal:!0}),Vo=["$compile","$parse",function(e,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:h};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r,i,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,r=t,i=n},o.addOption=function(t,n){ae(t,'"option value"'),a[t]=!0,l.$viewValue==t&&(e.val(t),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],l.$viewValue===e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+Ve(t)+" ?";i.val(n),e.prepend(i),e.val(n),i.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=h})}],link:function(s,l,u,c){function f(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(E.parent()&&E.remove(),t.val(e),""===e&&h.prop("selected",!0)):m(e)&&h?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){E.parent()&&E.remove(),n.$setViewValue(t.val())})})}function d(e,t,n){var r;n.$render=function(){var e=new He(n.$viewValue);o(t.find("option"),function(t){t.selected=y(e.get(t.value))})},e.$watch(function(){I(r,n.$viewValue)||(r=F(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,s,l){function u(e,n,r){return I[S]=r,R&&(I[R]=n),e(t,I)}function c(){t.$apply(function(){var e,n=D(t)||[];if(b)e=[],o(s.val(),function(t){t=L?P[t]:t,e.push(f(t,n[t]))});else{var r=L?P[s.val()]:s.val();e=f(r,n[r])}l.$setViewValue(e),m()})}function f(e,t){if("?"===e)return n;if(""===e)return null;var r=O?O:M;return u(r,e,t)}function d(){var e,n=D(t);if(n&&dr(n)){e=new Array(n.length);for(var r=0,i=n.length;i>r;r++)e[r]=u(k,r,n[r]);return e}if(n){e={};for(var o in n)n.hasOwnProperty(o)&&(e[o]=u(k,o,n[o]))}return e}function p(e){ +var t;if(b)if(L&&dr(e)){t=new He([]);for(var n=0;nS;S++)d=S,R&&(d=z[S],"$"===d.charAt(0))||(h=B[d],e=u(A,d,h)||"",(n=V[e])||(n=V[e]=[],H.push(e)),T=q(d,h),G=G||T,N=u(k,d,h),N=y(N)?N:"",j=L?L(t,I):R?z[S]:S,L&&(P[j]=d),n.push({id:j,label:N,selected:T}));for(b||($||null===W?V[""].unshift({id:"",label:"",selected:!G}):G||V[""].unshift({id:"?",label:"",selected:!0})),E=0,m=H.length;m>E;E++){for(e=H[E],n=V[e],F.length<=E?(i={element:_.clone().attr("label",e),label:n.label},c=[i],F.push(c),s.append(i.element)):(c=F[E],i=c[0],i.label!=e&&i.element.attr("label",i.label=e)),O=null,S=0,w=n.length;w>S;S++)r=n[S],(f=c[S+1])?(O=f.element,f.label!==r.label&&(v(U,f.label,!1),v(U,r.label,!0),O.text(f.label=r.label),O.prop("label",f.label)),f.id!==r.id&&O.val(f.id=r.id),O[0].selected!==r.selected&&(O.prop("selected",f.selected=r.selected),er&&O.prop("selected",f.selected))):(""===r.id&&$?M=$:(M=C.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),c.push(f={element:M,label:r.label,id:r.id,selected:r.selected}),v(U,r.label,!0),O?O.after(M):i.element.append(M),O=M);for(S++;c.length>S;)r=c.pop(),v(U,r.label,!1),r.element.remove()}for(;F.length>E;){for(n=F.pop(),S=1;S0?g.addOption(t):0>e&&g.removeOption(t)})}var E;if(!(E=w.match(i)))throw Io("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",w,U(s));var k=r(E[2]||E[1]),S=E[4]||E[6],T=/ as /.test(E[0])&&E[1],O=T?r(T):null,R=E[5],A=r(E[3]||""),M=r(E[2]?E[1]:S),D=r(E[7]),N=E[8],L=N?r(E[8]):null,P={},F=[[{element:s,label:""}]],I={};$&&(e($)(t),$.removeClass("ng-scope"),$.remove()),s.empty(),s.on("change",c),l.$render=m,t.$watchCollection(D,h),t.$watchCollection(d,h),b&&t.$watchCollection(function(){return l.$modelValue},h)}if(c[1]){for(var h,g=c[0],v=c[1],b=u.multiple,w=u.ngOptions,$=!1,x=!1,C=tr(t.createElement("option")),_=tr(t.createElement("optgroup")),E=C.clone(),k=0,S=l.children(),T=S.length;T>k;k++)if(""===S[k].value){h=$=S.eq(k);break}g.init(v,$,E),b&&(v.$isEmpty=function(e){return!e||0===e.length}),w?p(s,l,v):b?d(s,l,v):f(s,l,v,g)}}}}],Ho=["$interpolate",function(e){var t={addOption:h,removeOption:h};return{restrict:"E",priority:100,compile:function(n,r){if(m(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=t),i?e.$watch(i,function(e,t){r.$set("value",e),t!==e&&s.removeOption(t),s.addOption(e,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Wo=v({restrict:"E",terminal:!1}),Bo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},zo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(w(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,U(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||m(a)||a.test(e)}}}}},Uo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=d(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return 0>i||r.$isEmpty(t)||t.length<=i}}}}},qo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=d(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(re(),pe(ur),void tr(t).ready(function(){J(t,Z)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('')},function(e,t,n){!function(e){e(n(3))}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:c[t]}function n(e){return function(t){return a(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t)return null;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),a=n.listSelections(),s=0;s=0;s--){var c=a[s].head;n.replaceRange("",f(c.line,c.ch-1),f(c.line,c.ch+1))}}function o(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=0;s1&&p.indexOf(i)>=0&&n.getRange(f(w.line,w.ch-2),w)==i+i&&(w.ch<=2||n.getRange(f(w.line,w.ch-3),f(w.line,w.ch-2))!=i))y="addFour";else if(h){if(e.isWordChar(d)||!u(n,w,i))return e.Pass;y="both"}else{if(!v||n.getLine(w.line).length!=w.ch&&!s(d,a)&&!/\s/.test(d))return e.Pass;y="both"}else y=p.indexOf(i)>=0&&n.getRange(w,f(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var $=l%2?a.charAt(l-1):i,x=l%2?i:a.charAt(l+1);n.operation(function(){if("skip"==c)n.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;3>e;e++)n.execCommand("goCharRight");else if("surround"==c){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function l(e,t){var n=e.getRange(f(t.line,t.ch-1),f(t.line,t.ch+1));return 2==n.length?n:null}function u(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var a=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(a.pos=a.start=o.start;;){var s=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}var c={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},f=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(p),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(p))});for(var d=c.pairs+"`",p={Backspace:i,Enter:o},h=0;h=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(r&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),d=n(e,a(t.line,l+(c>0?1:0)),c,f||null,i);return null==d?null:{from:a(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,u=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=f;d+=n){var p=e.getLine(d);if(p){var h=n>0?0:p.length-1,g=n>0?p.length:-1;if(!(p.length>o))for(d==t.line&&(h=t.ch-(0>n?1:0));h!=g;h+=n){var v=p.charAt(h);if(c.test(v)&&(void 0===r||e.getTokenTypeAt(a(d,h+1))==r)){var m=s[v];if(">"==m.charAt(1)==n>0)u.push(v);else{if(!u.length)return{pos:a(d,h),ch:v};u.pop()}}}}}return d-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";e.registerHelper("lint","json",function(t){var n=[];jsonlint.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{jsonlint.parse(t)}catch(r){}return n})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(t,n){function r(t){return i.parentNode?(i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",void(i.style.left=t.clientX+5+"px")):e.off(document,"mousemove",r)}var i=document.createElement("div");return i.className="CodeMirror-lint-tooltip",i.appendChild(n.cloneNode(!0)),document.body.appendChild(i),e.on(document,"mousemove",r),r(t),null!=i.style.opacity&&(i.style.opacity=1),i}function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(e){e.parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout(function(){n(e)},600))}function i(n,i,o){function a(){e.off(o,"mouseout",a),s&&(r(s),s=null)}var s=t(n,i),l=setInterval(function(){if(s)for(var e=o;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){a();break}}return s?void 0:clearInterval(l)},400);e.on(o,"mouseout",a)}function o(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){v(e,t)}}function a(e,t){return t instanceof Function?{getAnnotations:t}:(t&&t!==!0||(t={}),t)}function s(e){var t=e.state.lint;t.hasGutter&&e.clearGutter(m);for(var n=0;n1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function h(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){d(e)},t.options.delay||500))}function g(e,t){var n=t.target||t.srcElement;i(t,f(e),n)}function v(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className))for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=0;s"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(t.tokenize=s,s(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(r(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(Ee),i("operator","operator",e.current()));if("`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),i("error","error");if(Ee.test(n))return e.eatWhile(Ee),i("operator","operator",e.current());if(Ce.test(n)){e.eatWhile(Ce);var o=e.current(),u=_e.propertyIsEnumerable(o)&&_e[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}}function a(e){return function(t,n){var r,a=!1;if(we&&"@"==t.peek()&&t.match(ke))return n.tokenize=o,i("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||a);)a=!a&&"\\"==r;return a||(n.tokenize=o),i("string","string")}}function s(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=Se.indexOf(a);if(s>=0&&3>s){if(!r){++o;break}if(0==--r)break}else if(s>=3&&6>s)++r;else if(Ce.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function c(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(Oe.state=e,Oe.stream=i,Oe.marked=null,Oe.cc=o,Oe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():$e?x:$;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Oe.marked?Oe.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Oe.cc.push(arguments[e])}function h(){return p.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=Oe.state;if(r.context){if(Oe.marked="def",t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){Oe.state.context={prev:Oe.state.context,vars:Oe.state.localVars},Oe.state.localVars=Re}function m(){Oe.state.localVars=Oe.state.context.vars,Oe.state.context=Oe.state.context.prev}function y(e,t){var n=function(){var n=Oe.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new c(r,Oe.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=Oe.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?h():";"==e?p():h(t)}return t}function $(e,t){return"var"==e?h(y("vardef",t.length),B,w(";"),b):"keyword a"==e?h(y("form"),x,$,b):"keyword b"==e?h(y("form"),$,b):"{"==e?h(y("}"),V,b):";"==e?h():"if"==e?("else"==Oe.state.lexical.info&&Oe.state.cc[Oe.state.cc.length-1]==b&&Oe.state.cc.pop()(),h(y("form"),x,$,b,K)):"function"==e?h(ee):"for"==e?h(y("form"),Y,$,b):"variable"==e?h(y("stat"),D):"switch"==e?h(y("form"),x,y("}","switch"),w("{"),V,b,b):"case"==e?h(x,w(":")):"default"==e?h(w(":")):"catch"==e?h(y("form"),v,w("("),te,w(")"),$,b,m):"module"==e?h(y("form"),v,ae,m,b):"class"==e?h(y("form"),ne,b):"export"==e?h(y("form"),se,b):"import"==e?h(y("form"),le,b):p(y("stat"),x,w(";"),b)}function x(e){return _(e,!1)}function C(e){return _(e,!0)}function _(e,t){if(Oe.state.fatArrowAt==Oe.stream.start){var n=t?M:A;if("("==e)return h(v,y(")"),I(z,")"),b,w("=>"),n,m);if("variable"==e)return p(v,z,w("=>"),n,m)}var r=t?T:S;return Te.hasOwnProperty(e)?h(r):"function"==e?h(ee,r):"keyword c"==e?h(t?k:E):"("==e?h(y(")"),E,he,w(")"),b,r):"operator"==e||"spread"==e?h(t?C:x):"["==e?h(y("]"),de,b,r):"{"==e?j(L,"}",null,r):"quasi"==e?p(O,r):h()}function E(e){return e.match(/[;\}\)\],]/)?p():p(x)}function k(e){return e.match(/[;\}\)\],]/)?p():p(C)}function S(e,t){return","==e?h(x):T(e,t,!1)}function T(e,t,n){var r=0==n?S:T,i=0==n?x:C;return"=>"==e?h(v,n?M:A,m):"operator"==e?/\+\+|--/.test(t)?h(r):"?"==t?h(x,w(":"),i):h(i):"quasi"==e?p(O,r):";"!=e?"("==e?j(C,")","call",r):"."==e?h(N,r):"["==e?h(y("]"),E,w("]"),b,r):void 0:void 0}function O(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?h(O):h(x,R)}function R(e){return"}"==e?(Oe.marked="string-2",Oe.state.tokenize=l,h(O)):void 0}function A(e){return u(Oe.stream,Oe.state),p("{"==e?$:x)}function M(e){return u(Oe.stream,Oe.state),p("{"==e?$:C)}function D(e){return":"==e?h(b,$):p(S,w(";"),b)}function N(e){return"variable"==e?(Oe.marked="property",h()):void 0}function L(e,t){return"variable"==e||"keyword"==Oe.style?(Oe.marked="property",h("get"==t||"set"==t?P:F)):"number"==e||"string"==e?(Oe.marked=we?"property":Oe.style+" property",h(F)):"jsonld-keyword"==e?h(F):"["==e?h(x,w("]"),F):void 0}function P(e){return"variable"!=e?p(F):(Oe.marked="property",h(ee))}function F(e){return":"==e?h(C):"("==e?p(ee):void 0}function I(e,t){function n(r){if(","==r){var i=Oe.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),h(e,n)}return r==t?h():h(w(t))}return function(r){return r==t?h():p(e,n)}}function j(e,t,n){for(var r=3;r!?|~^]/,ke=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Se="([{}])",Te={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Oe={state:null,column:null,marked:null,cc:null},Re={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-ye,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==ve?n:(t.lastType="operator"!=ve||"++"!=me&&"--"!=me?ve:"incdec",d(t,n,ve,me,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==b)a=a.prev;else if(u!=K)break}"stat"==a.type&&"}"==i&&(a=a.prev),be&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,f=i==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==i?a.indented:"form"==c?a.indented+ye:"stat"==c?a.indented+(ge(t,r)?be||ye:0):"switch"!=a.info||f||0==n.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:ye):a.indented+(/^(?:case|default)\b/.test(r)?ye:2*ye)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:$e?null:"/*",blockCommentEnd:$e?null:"*/",lineComment:$e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:$e?"json":"javascript",jsonldMode:we,jsonMode:$e}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(t,n,r){e.exports=r(t,n)}("humane",this,function(e,t){var n=window,r=document,i={on:function(e,t,r){"addEventListener"in n?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r)},off:function(e,t,r){"removeEventListener"in n?e.removeEventListener(t,r,!1):e.detachEvent("on"+t,r)},bind:function(e,t){return function(){e.apply(t,arguments)}},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},config:function(e,t){return null!=e?e:t},transSupport:!1,useFilter:/msie [678]/i.test(navigator.userAgent),_checkTransition:function(){var e=r.createElement("div"),t={webkit:"webkit",Moz:"",O:"o",ms:"MS"};for(var n in t)n+"Transition"in e.style&&(this.vendorPrefix=t[n],this.transSupport=!0)}};i._checkTransition();var o=function(e){e||(e={}),this.queue=[],this.baseCls=e.baseCls||"humane",this.addnCls=e.addnCls||"",this.timeout="timeout"in e?e.timeout:2500,this.waitForMove=e.waitForMove||!1,this.clickToClose=e.clickToClose||!1,this.timeoutAfterMove=e.timeoutAfterMove||!1,this.container=e.container;try{this._setupEl()}catch(t){i.on(n,"load",i.bind(this._setupEl,this))}};return o.prototype={constructor:o,_setupEl:function(){var e=r.createElement("div");if(e.style.display="none",!this.container){if(!r.body)throw"document.body is null";this.container=r.body}this.container.appendChild(e),this.el=e,this.removeEvent=i.bind(function(){var e=i.config(this.currentMsg.timeoutAfterMove,this.timeoutAfterMove);e?setTimeout(i.bind(this.remove,this),e):this.remove()},this),this.transEvent=i.bind(this._afterAnimation,this),this._run()},_afterTimeout:function(){i.config(this.currentMsg.waitForMove,this.waitForMove)?this.removeEventsSet||(i.on(r.body,"mousemove",this.removeEvent),i.on(r.body,"click",this.removeEvent),i.on(r.body,"keypress",this.removeEvent),i.on(r.body,"touchstart",this.removeEvent),this.removeEventsSet=!0):this.remove()},_run:function(){if(!this._animating&&this.queue.length&&this.el){this._animating=!0,this.currentTimer&&(clearTimeout(this.currentTimer),this.currentTimer=null);var e=this.queue.shift(),t=i.config(e.clickToClose,this.clickToClose);t&&(i.on(this.el,"click",this.removeEvent),i.on(this.el,"touchstart",this.removeEvent));var n=i.config(e.timeout,this.timeout);n>0&&(this.currentTimer=setTimeout(i.bind(this._afterTimeout,this),n)),i.isArray(e.html)&&(e.html="
  • "+e.html.join("
  • ")+"
"),this.el.innerHTML=e.html,this.currentMsg=e,this.el.className=this.baseCls,i.transSupport?(this.el.style.display="block",setTimeout(i.bind(this._showMsg,this),50)):this._showMsg()}},_setOpacity:function(e){if(i.useFilter)try{this.el.filters.item("DXImageTransform.Microsoft.Alpha").Opacity=100*e}catch(t){}else this.el.style.opacity=String(e)},_showMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-animate";else{var t=0;this.el.className=this.baseCls+" "+e+" "+this.baseCls+"-js-animate",this._setOpacity(0),this.el.style.display="block";var n=this,r=setInterval(function(){1>t?(t+=.1,t>1&&(t=1),n._setOpacity(t)):clearInterval(r)},30)}},_hideMsg:function(){var e=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+e,i.on(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent);else var t=1,n=this,r=setInterval(function(){t>0?(t-=.1,0>t&&(t=0),n._setOpacity(t)):(n.el.className=n.baseCls+" "+e,clearInterval(r),n._afterAnimation())},30)},_afterAnimation:function(){i.transSupport&&i.off(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent),this.currentMsg.cb&&this.currentMsg.cb(),this.el.style.display="none",this._animating=!1,this._run()},remove:function(e){var t="function"==typeof e?e:null;i.off(r.body,"mousemove",this.removeEvent),i.off(r.body,"click",this.removeEvent),i.off(r.body,"keypress",this.removeEvent),i.off(r.body,"touchstart",this.removeEvent),i.off(this.el,"click",this.removeEvent),i.off(this.el,"touchstart",this.removeEvent),this.removeEventsSet=!1,t&&this.currentMsg&&(this.currentMsg.cb=t),this._animating?this._hideMsg():t&&t()},log:function(e,t,n,r){var i={};if(r)for(var o in r)i[o]=r[o];if("function"==typeof t)n=t;else if(t)for(var o in t)i[o]=t[o];return i.html=e,n&&(i.cb=n),this.queue.push(i),this._run(),this},spawn:function(e){var t=this;return function(n,r,i){return t.log.call(t,n,r,i,e),t}},create:function(e){return new o(e)}},new o})},function(e,t,n){(function(e){(function(){var t=!0,n=!1,r={},i=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]], +performAction:function(e,t,n,r,i,o,a){var s=o.length-1;switch(i){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g," ").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[s-1];case 13:this.$={};break;case 14:this.$=o[s-1];break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[];break;case 19:this.$=o[s-1];break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){function t(e){i.length=i.length-2*e,o.length=o.length-e,a.length=a.length-e}function n(){var e;return e=r.lexer.lex()||1,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,i=[0],o=[null],a=[],s=this.table,l="",u=0,c=0,f=0,d=2,p=1;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;a.push(h),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var g,v,m,y,b,w,$,x,C,_={};;){if(m=i[i.length-1],this.defaultActions[m]?y=this.defaultActions[m]:(null==g&&(g=n()),y=s[m]&&s[m][g]),"undefined"==typeof y||!y.length||!y[0]){if(!f){C=[];for(w in s[m])this.terminals_[w]&&w>2&&C.push("'"+this.terminals_[w]+"'");var E="";E=this.lexer.showPosition?"Parse error on line "+(u+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[g]+"'":"Parse error on line "+(u+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:h,expected:C})}if(3==f){if(g==p)throw new Error(E||"Parsing halted.");c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,h=this.lexer.yylloc,g=n()}for(;!(d.toString()in s[m]);){if(0==m)throw new Error(E||"Parsing halted.");t(1),m=i[i.length-1]}v=g,g=d,m=i[i.length-1],y=s[m]&&s[m][d],f=3}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+g);switch(y[0]){case 1:i.push(g),o.push(this.lexer.yytext),a.push(this.lexer.yylloc),i.push(y[1]),g=null,v?(g=v,v=null):(c=this.lexer.yyleng,l=this.lexer.yytext,u=this.lexer.yylineno,h=this.lexer.yylloc,f>0&&f--);break;case 2:if($=this.productions_[y[1]][1],_.$=o[o.length-$],_._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},b=this.performAction.call(_,l,c,u,this.yy,y[1],o,a),"undefined"!=typeof b)return b;$&&(i=i.slice(0,-1*$*2),o=o.slice(0,-1*$),a=a.slice(0,-1*$)),i.push(this.productions_[y[1]][0]),o.push(_.$),a.push(_._$),x=s[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),a=0;at[0].length)||(t=n,r=a,this.options.flex));a++);return t?(i=t[0].match(/\n.*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e?e:void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"!=typeof e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},e.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],e.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},e}();return e.lexer=t,e}();return"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(n){if(!n[1])throw new Error("Usage: "+n[0]+" FILE");if("undefined"!=typeof e)var i=t("fs").readFileSync(t("path").join(e.cwd(),n[1]),"utf8");else var o=t("file").path(t("file").cwd()),i=o.join(n[1]).read({charset:"utf-8"});return r.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&r.main("undefined"!=typeof e?e.argv.slice(1):t("system").args)),r})()}).call(t,n(161))},function(e,t,n){function r(){c=!1,s.length?u=s.concat(u):f=-1,u.length&&i()}function i(){if(!c){var e=setTimeout(r);c=!0;for(var t=u.length;t;){for(s=u,u=[];++f1)for(var n=1;ne?t:e>n?n:e}function t(e){return 100*(-1+e)}function n(e,n,r){var i;return i="translate3d"===u.positionUsing?{transform:"translate3d("+t(e)+"%,0,0)"}:"translate"===u.positionUsing?{transform:"translate("+t(e)+"%,0)"}:{"margin-left":t(e)+"%"},i.transition="all "+n+"ms "+r,i}function r(e,t){var n="string"==typeof e?e:a(e);return n.indexOf(" "+t+" ")>=0}function i(e,t){var n=a(e),i=n+t;r(n,t)||(e.className=i.substring(1))}function o(e,t){var n,i=a(e);r(e,t)&&(n=i.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function a(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function s(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var l={};l.version="0.2.0";var u=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};l.configure=function(e){var t,n;for(t in e)n=e[t],void 0!==n&&e.hasOwnProperty(t)&&(u[t]=n);return this},l.status=null,l.set=function(t){var r=l.isStarted();t=e(t,u.minimum,1),l.status=1===t?null:t;var i=l.render(!r),o=i.querySelector(u.barSelector),a=u.speed,s=u.easing;return i.offsetWidth,c(function(e){""===u.positionUsing&&(u.positionUsing=l.getPositioningCSS()),f(o,n(t,a,s)),1===t?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+a+"ms linear",opacity:0}),setTimeout(function(){l.remove(),e()},a)},a)):setTimeout(e,a)}),this},l.isStarted=function(){return"number"==typeof l.status},l.start=function(){l.status||l.set(0);var e=function(){setTimeout(function(){l.status&&(l.trickle(),e())},u.trickleSpeed)};return u.trickle&&e(),this},l.done=function(e){return e||l.status?l.inc(.3+.5*Math.random()).set(1):this},l.inc=function(t){var n=l.status;return n?("number"!=typeof t&&(t=(1-n)*e(Math.random()*n,.1,.95)),n=e(n+t,0,.994),l.set(n)):l.start()},l.trickle=function(){return l.inc(Math.random()*u.trickleRate)},function(){var e=0,t=0;l.promise=function(n){return n&&"resolved"!==n.state()?(0===t&&l.start(),e++,t++,n.always(function(){t--,0===t?(e=0,l.done()):l.set((e-t)/e)}),this):this}}(),l.render=function(e){if(l.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=u.template;var r,o=n.querySelector(u.barSelector),a=e?"-100":t(l.status||0),c=document.querySelector(u.parent);return f(o,{transition:"all 0 linear",transform:"translate3d("+a+"%,0,0)"}),u.showSpinner||(r=n.querySelector(u.spinnerSelector),r&&s(r)),c!=document.body&&i(c,"nprogress-custom-parent"),c.appendChild(n),n},l.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(u.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&s(e)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var c=function(){function e(){var n=t.shift();n&&n(e)}var t=[];return function(n){t.push(n),1==t.length&&e()}}(),f=function(){function e(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function t(e){var t=document.body.style;if(e in t)return e;for(var n,r=i.length,o=e.charAt(0).toUpperCase()+e.slice(1);r--;)if(n=i[r]+o,n in t)return n;return e}function n(n){return n=e(n),o[n]||(o[n]=t(n))}function r(e,t,r){t=n(t),e.style[t]=r}var i=["Webkit","O","Moz","ms"],o={};return function(e,t){var n,i,o=arguments;if(2==o.length)for(n in t)i=t[n],void 0!==i&&t.hasOwnProperty(n)&&r(e,n,i);else r(e,o[1],o[2])}}();return l})},function(e,t,n){/*! Papa Parse v4.1.1 https://github.com/mholt/PapaParse */ -!function(t){"use strict";function n(e,n){if(n=n||{},n.worker&&E.WORKERS_SUPPORTED){var r=f();return r.userStep=n.step,r.userChunk=n.chunk,r.userComplete=n.complete,r.userError=n.error,n.step=y(n.step),n.chunk=y(n.chunk),n.complete=y(n.complete),n.error=y(n.error),delete n.worker,void r.postMessage({input:e,config:n,workerId:r.id})}var i=null;return"string"==typeof e?i=n.download?new o(n):new s(n):(t.File&&e instanceof File||e instanceof Object)&&(i=new a(n)),i.stream(e)}function r(e,t){function n(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==E.BAD_DELIMITERS.indexOf(t.delimiter)&&(l=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(s=t.quotes),"string"==typeof t.newline&&(u=t.newline))}function r(e){if("object"!=typeof e)return[];var t=[];for(var n in e)t.push(n);return t}function i(e,t){var n="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var r=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(r){for(var a=0;a0&&(n+=l),n+=o(e[a],a);t.length>0&&(n+=u)}for(var s=0;sf;f++){f>0&&(n+=l);var d=r&&i?e[f]:f;n+=o(t[s][d],f)}s-1||" "==e.charAt(0)||" "==e.charAt(e.length-1);return n?'"'+e+'"':e}function a(e,t){for(var n=0;n-1)return!0;return!1}var s=!1,l=",",u="\r\n";if(n(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(r(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:r(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function i(e){function n(e){var t=v(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new l(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},n.call(this,e),this.parseChunk=function(e){var n=this._partialLine+e;this._partialLine="";var r=this._handle.parse(n,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=r.meta.cursor;this._finished||(this._partialLine=n.substring(i-this._baseIndex),this._baseIndex=i),r&&r.data&&(this._rowCount+=r.data.length);var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(w)t.postMessage({results:r,workerId:E.WORKER_ID,finished:o});else if(y(this._config.chunk)){if(this._config.chunk(r,this._handle),this._paused)return;r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),!o||!y(this._config.complete)||r&&r.meta.aborted||this._config.complete(this._completeResults),o||r&&r.meta.paused||this._nextChunk(),r}},this._sendError=function(e){y(this._config.error)?this._config.error(e):w&&this._config.error&&t.postMessage({workerId:E.WORKER_ID,error:e,finished:!1})}}function o(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=E.RemoteChunkSize),i.call(this,e);var n;w?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(n=new XMLHttpRequest,w||(n.onload=m(this._chunkLoaded,this),n.onerror=m(this._chunkError,this)),n.open("GET",this._input,!w),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;n.setRequestHeader("Range","bytes="+this._start+"-"+e),n.setRequestHeader("If-None-Match","webkit-no-cache")}try{n.send()}catch(t){this._chunkError(t.message)}w&&0==n.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==n.readyState){if(n.status<200||n.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(n),this.parseChunk(n.responseText)}},this._chunkError=function(e){var t=n.statusText||e;this._sendError(t)}}function a(e){e=e||{},e.chunkSize||(e.chunkSize=E.LocalChunkSize),i.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?(t=new FileReader,t.onload=m(this._chunkLoaded,this),t.onerror=m(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function s(e){e=e||{},i.call(this,e);var t,n;this.stream=function(e){return t=e,n=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?n.substr(0,e):n;return n=e?n.substr(e):"",this._finished=!n,this.parseChunk(t)}}}function l(e){function t(){if($&&d&&(l("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+E.DefaultDelimiter+"'"),d=!1),e.skipEmptyLines)for(var t=0;t<$.data.length;t++)1==$.data[t].length&&""==$.data[t][0]&&$.data.splice(t--,1);return n()&&r(),i()}function n(){return e.header&&0==w.length}function r(){if($){for(var e=0;n()&&e<$.data.length;e++)for(var t=0;t<$.data[e].length;t++)w.push($.data[e][t]);$.data.splice(0,1)}}function i(){if(!$||!e.header&&!e.dynamicTyping)return $;for(var t=0;t<$.data.length;t++){for(var n={},r=0;r<$.data[t].length;r++){if(e.dynamicTyping){var i=$.data[t][r];"true"==i||"TRUE"==i?$.data[t][r]=!0:"false"==i||"FALSE"==i?$.data[t][r]=!1:$.data[t][r]=s(i)}e.header&&(r>=w.length?(n.__parsed_extra||(n.__parsed_extra=[]),n.__parsed_extra.push($.data[t][r])):n[w[r]]=$.data[t][r])}e.header&&($.data[t]=n,r>w.length?l("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+r,t):r1&&(l+=Math.abs(p-i),i=p):i=p}c/=f.data.length,("undefined"==typeof r||r>l)&&c>1.99&&(r=l,n=s)}return e.delimiter=n,{successful:!!n,bestDelimiter:n}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var n=0,r=0;r=t.length/2?"\r\n":"\r"}function s(e){var t=p.test(e);return t?parseFloat(e):e}function l(e,t,n,r){$.errors.push({type:e,code:t,message:n,row:r})}var c,f,d,p=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,h=this,g=0,m=!1,b=!1,w=[],$={data:[],errors:[],meta:{}};if(y(e.step)){var x=e.step;e.step=function(r){if($=r,n())t();else{if(t(),0==$.data.length)return;g+=r.data.length,e.preview&&g>e.preview?f.abort():x($,h)}}}this.parse=function(n,r,i){if(e.newline||(e.newline=a(n)),d=!1,!e.delimiter){var s=o(n);s.successful?e.delimiter=s.bestDelimiter:(d=!0,e.delimiter=E.DefaultDelimiter),$.meta.delimiter=e.delimiter}var l=v(e);return e.preview&&e.header&&l.preview++,c=n,f=new u(l),$=f.parse(c,r,i),t(),m?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return m},this.pause=function(){m=!0,f.abort(),c=c.substr(f.getCharIndex())},this.resume=function(){m=!1,h.streamer.parseChunk(c)},this.aborted=function(){return b},this.abort=function(){b=!0,f.abort(),$.meta.aborted=!0,y(e.complete)&&e.complete($),c=""}}function u(e){e=e||{};var t=e.delimiter,n=e.newline,r=e.comments,i=e.step,o=e.preview,a=e.fastMode;if(("string"!=typeof t||E.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),r===t)throw"Comment character same as delimiter";r===!0?r="#":("string"!=typeof r||E.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!=n&&"\r"!=n&&"\r\n"!=n&&(n="\n");var s=0,l=!1;this.parse=function(e,u,c){function f(e){$.push(e),E=s}function d(t){return c?h():(t||(t=e.substr(s)),C.push(t),s=v,f(C),w&&g(),h())}function p(t){s=t,f(C),C=[],T=e.indexOf(n,s)}function h(e){return{data:$,errors:x,meta:{delimiter:t,linebreak:n,aborted:l,truncated:!!e,cursor:E+(u||0)}}}function g(){i(h()),$=[],x=[]}if("string"!=typeof e)throw"Input must be a string";var v=e.length,m=t.length,y=n.length,b=r.length,w="function"==typeof i;s=0;var $=[],x=[],C=[],E=0;if(!e)return h();if(a||a!==!1&&-1===e.indexOf('"')){for(var _=e.split(n),k=0;k<_.length;k++){var C=_[k];if(s+=C.length,k!==_.length-1)s+=n.length;else if(c)return h();if(!r||C.substr(0,b)!=r){if(w){if($=[],f(C.split(t)),g(),l)return h()}else f(C.split(t));if(o&&k>=o)return $=$.slice(0,o),h(!0)}}return h()}for(var S=e.indexOf(t,s),T=e.indexOf(n,s);;)if('"'!=e[s])if(r&&0===C.length&&e.substr(s,b)===r){if(-1==T)return h();s=T+y,T=e.indexOf(n,s),S=e.indexOf(t,s)}else if(-1!==S&&(T>S||-1===T))C.push(e.substring(s,S)),s=S+m,S=e.indexOf(t,s);else{if(-1===T)break;if(C.push(e.substring(s,T)),p(T+y),w&&(g(),l))return h();if(o&&$.length>=o)return h(!0)}else{var O=s;for(s++;;){var O=e.indexOf('"',O+1);if(-1===O)return c||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:$.length,index:s}),d();if(O===v-1){var R=e.substring(s,O).replace(/""/g,'"');return d(R)}if('"'!=e[O+1]){if(e[O+1]==t){C.push(e.substring(s,O).replace(/""/g,'"')),s=O+1+m,S=e.indexOf(t,s),T=e.indexOf(n,s);break}if(e.substr(O+1,y)===n){if(C.push(e.substring(s,O).replace(/""/g,'"')),p(O+1+y),S=e.indexOf(t,s),w&&(g(),l))return h();if(o&&$.length>=o)return h(!0);break}}else O++}}return d()},this.abort=function(){l=!0},this.getCharIndex=function(){return s}}function c(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function f(){if(!E.WORKERS_SUPPORTED)return!1;if(!$&&null===E.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var e=new t.Worker(E.SCRIPT_PATH||b);return e.onmessage=d,e.id=C++,x[e.id]=e,e}function d(e){var t=e.data,n=x[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){r=!0,p(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},o={abort:i,pause:h,resume:h};if(y(n.userStep)){for(var a=0;a0,i=!(t[0]instanceof Array);if(r){for(var a=0;a0&&(n+=l),n+=o(e[a],a);t.length>0&&(n+=u)}for(var s=0;sf;f++){f>0&&(n+=l);var d=r&&i?e[f]:f;n+=o(t[s][d],f)}s-1||" "==e.charAt(0)||" "==e.charAt(e.length-1);return n?'"'+e+'"':e}function a(e,t){for(var n=0;n-1)return!0;return!1}var s=!1,l=",",u="\r\n";if(n(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(r(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:r(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function i(e){function n(e){var t=v(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new l(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},n.call(this,e),this.parseChunk=function(e){var n=this._partialLine+e;this._partialLine="";var r=this._handle.parse(n,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=r.meta.cursor;this._finished||(this._partialLine=n.substring(i-this._baseIndex),this._baseIndex=i),r&&r.data&&(this._rowCount+=r.data.length);var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(w)t.postMessage({results:r,workerId:_.WORKER_ID,finished:o});else if(y(this._config.chunk)){if(this._config.chunk(r,this._handle),this._paused)return;r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),!o||!y(this._config.complete)||r&&r.meta.aborted||this._config.complete(this._completeResults),o||r&&r.meta.paused||this._nextChunk(),r}},this._sendError=function(e){y(this._config.error)?this._config.error(e):w&&this._config.error&&t.postMessage({workerId:_.WORKER_ID,error:e,finished:!1})}}function o(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=_.RemoteChunkSize),i.call(this,e);var n;w?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(n=new XMLHttpRequest,w||(n.onload=m(this._chunkLoaded,this),n.onerror=m(this._chunkError,this)),n.open("GET",this._input,!w),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;n.setRequestHeader("Range","bytes="+this._start+"-"+e),n.setRequestHeader("If-None-Match","webkit-no-cache")}try{n.send()}catch(t){this._chunkError(t.message)}w&&0==n.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==n.readyState){if(n.status<200||n.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(n),this.parseChunk(n.responseText)}},this._chunkError=function(e){var t=n.statusText||e;this._sendError(t)}}function a(e){e=e||{},e.chunkSize||(e.chunkSize=_.LocalChunkSize),i.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?(t=new FileReader,t.onload=m(this._chunkLoaded,this),t.onerror=m(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function s(e){e=e||{},i.call(this,e);var t,n;this.stream=function(e){return t=e,n=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?n.substr(0,e):n;return n=e?n.substr(e):"",this._finished=!n,this.parseChunk(t)}}}function l(e){function t(){if($&&d&&(l("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+_.DefaultDelimiter+"'"),d=!1),e.skipEmptyLines)for(var t=0;t<$.data.length;t++)1==$.data[t].length&&""==$.data[t][0]&&$.data.splice(t--,1);return n()&&r(),i()}function n(){return e.header&&0==w.length}function r(){if($){for(var e=0;n()&&e<$.data.length;e++)for(var t=0;t<$.data[e].length;t++)w.push($.data[e][t]);$.data.splice(0,1)}}function i(){if(!$||!e.header&&!e.dynamicTyping)return $;for(var t=0;t<$.data.length;t++){for(var n={},r=0;r<$.data[t].length;r++){if(e.dynamicTyping){var i=$.data[t][r];"true"==i||"TRUE"==i?$.data[t][r]=!0:"false"==i||"FALSE"==i?$.data[t][r]=!1:$.data[t][r]=s(i)}e.header&&(r>=w.length?(n.__parsed_extra||(n.__parsed_extra=[]),n.__parsed_extra.push($.data[t][r])):n[w[r]]=$.data[t][r])}e.header&&($.data[t]=n,r>w.length?l("FieldMismatch","TooManyFields","Too many fields: expected "+w.length+" fields but parsed "+r,t):r1&&(l+=Math.abs(p-i),i=p):i=p}c/=f.data.length,("undefined"==typeof r||r>l)&&c>1.99&&(r=l,n=s)}return e.delimiter=n,{successful:!!n,bestDelimiter:n}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var n=0,r=0;r=t.length/2?"\r\n":"\r"}function s(e){var t=p.test(e);return t?parseFloat(e):e}function l(e,t,n,r){$.errors.push({type:e,code:t,message:n,row:r})}var c,f,d,p=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,h=this,g=0,m=!1,b=!1,w=[],$={data:[],errors:[],meta:{}};if(y(e.step)){var x=e.step;e.step=function(r){if($=r,n())t();else{if(t(),0==$.data.length)return;g+=r.data.length,e.preview&&g>e.preview?f.abort():x($,h)}}}this.parse=function(n,r,i){if(e.newline||(e.newline=a(n)),d=!1,!e.delimiter){var s=o(n);s.successful?e.delimiter=s.bestDelimiter:(d=!0,e.delimiter=_.DefaultDelimiter),$.meta.delimiter=e.delimiter}var l=v(e);return e.preview&&e.header&&l.preview++,c=n,f=new u(l),$=f.parse(c,r,i),t(),m?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return m},this.pause=function(){m=!0,f.abort(),c=c.substr(f.getCharIndex())},this.resume=function(){m=!1,h.streamer.parseChunk(c)},this.aborted=function(){return b},this.abort=function(){b=!0,f.abort(),$.meta.aborted=!0,y(e.complete)&&e.complete($),c=""}}function u(e){e=e||{};var t=e.delimiter,n=e.newline,r=e.comments,i=e.step,o=e.preview,a=e.fastMode;if(("string"!=typeof t||_.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),r===t)throw"Comment character same as delimiter";r===!0?r="#":("string"!=typeof r||_.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!=n&&"\r"!=n&&"\r\n"!=n&&(n="\n");var s=0,l=!1;this.parse=function(e,u,c){function f(e){$.push(e),_=s}function d(t){return c?h():(t||(t=e.substr(s)),C.push(t),s=v,f(C),w&&g(),h())}function p(t){s=t,f(C),C=[],T=e.indexOf(n,s)}function h(e){return{data:$,errors:x,meta:{delimiter:t,linebreak:n,aborted:l,truncated:!!e,cursor:_+(u||0)}}}function g(){i(h()),$=[],x=[]}if("string"!=typeof e)throw"Input must be a string";var v=e.length,m=t.length,y=n.length,b=r.length,w="function"==typeof i;s=0;var $=[],x=[],C=[],_=0;if(!e)return h();if(a||a!==!1&&-1===e.indexOf('"')){for(var E=e.split(n),k=0;k=o)return $=$.slice(0,o),h(!0)}}return h()}for(var S=e.indexOf(t,s),T=e.indexOf(n,s);;)if('"'!=e[s])if(r&&0===C.length&&e.substr(s,b)===r){if(-1==T)return h();s=T+y,T=e.indexOf(n,s),S=e.indexOf(t,s)}else if(-1!==S&&(T>S||-1===T))C.push(e.substring(s,S)),s=S+m,S=e.indexOf(t,s);else{if(-1===T)break;if(C.push(e.substring(s,T)),p(T+y),w&&(g(),l))return h();if(o&&$.length>=o)return h(!0)}else{var O=s;for(s++;;){var O=e.indexOf('"',O+1);if(-1===O)return c||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:$.length,index:s}),d();if(O===v-1){var R=e.substring(s,O).replace(/""/g,'"');return d(R)}if('"'!=e[O+1]){if(e[O+1]==t){C.push(e.substring(s,O).replace(/""/g,'"')),s=O+1+m,S=e.indexOf(t,s),T=e.indexOf(n,s);break}if(e.substr(O+1,y)===n){if(C.push(e.substring(s,O).replace(/""/g,'"')),p(O+1+y),S=e.indexOf(t,s),w&&(g(),l))return h();if(o&&$.length>=o)return h(!0);break}}else O++}}return d()},this.abort=function(){l=!0},this.getCharIndex=function(){return s}}function c(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function f(){if(!_.WORKERS_SUPPORTED)return!1;if(!$&&null===_.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var e=new t.Worker(_.SCRIPT_PATH||b);return e.onmessage=d,e.id=C++,x[e.id]=e,e}function d(e){var t=e.data,n=x[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){r=!0,p(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},o={abort:i,pause:h,resume:h};if(y(n.userStep)){for(var a=0;a * @license MIT License, http://www.opensource.org/licenses/MIT */ -!function(){var e=angular.module("restangular",[]);e.provider("Restangular",function(){var e={};e.init=function(e,t){function n(e,t,n,r){var i={};return _.each(_.keys(r),function(o){var a=r[o];a.params=_.extend({},a.params,e.defaultRequestParams[a.method.toLowerCase()]),_.isEmpty(a.params)&&delete a.params,i[o]=e.isSafe(a.method)?function(){return t(_.extend(a,{url:n}))}:function(e){return t(_.extend(a,{url:n,data:e}))}}),i}e.configuration=t;var r=["get","head","options","trace","getlist"];t.isSafe=function(e){return _.contains(r,e.toLowerCase())};var i=/^https?:\/\//i;t.isAbsoluteUrl=function(e){return _.isUndefined(t.absoluteUrl)||_.isNull(t.absoluteUrl)?e&&i.test(e):t.absoluteUrl},t.absoluteUrl=_.isUndefined(t.absoluteUrl)?!0:t.absoluteUrl,e.setSelfLinkAbsoluteUrl=function(e){t.absoluteUrl=e},t.baseUrl=_.isUndefined(t.baseUrl)?"":t.baseUrl,e.setBaseUrl=function(e){return t.baseUrl=/\/$/.test(e)?e.substring(0,e.length-1):e,this},t.extraFields=t.extraFields||[],e.setExtraFields=function(e){return t.extraFields=e,this},t.defaultHttpFields=t.defaultHttpFields||{},e.setDefaultHttpFields=function(e){return t.defaultHttpFields=e,this},t.withHttpValues=function(e,n){return _.defaults(n,e,t.defaultHttpFields)},t.encodeIds=_.isUndefined(t.encodeIds)?!0:t.encodeIds,e.setEncodeIds=function(e){t.encodeIds=e},t.defaultRequestParams=t.defaultRequestParams||{get:{},post:{},put:{},remove:{},common:{}},e.setDefaultRequestParams=function(e,n){var r=[],i=n||e;return _.isUndefined(n)?r.push("common"):_.isArray(e)?r=e:r.push(e),_.each(r,function(e){t.defaultRequestParams[e]=i}),this},e.requestParams=t.defaultRequestParams,t.defaultHeaders=t.defaultHeaders||{},e.setDefaultHeaders=function(n){return t.defaultHeaders=n,e.defaultHeaders=t.defaultHeaders,this},e.defaultHeaders=t.defaultHeaders,t.methodOverriders=t.methodOverriders||[],e.setMethodOverriders=function(e){var n=_.extend([],e);return t.isOverridenMethod("delete",n)&&n.push("remove"),t.methodOverriders=n,this},t.jsonp=_.isUndefined(t.jsonp)?!1:t.jsonp,e.setJsonp=function(e){t.jsonp=e},t.isOverridenMethod=function(e,n){var r=n||t.methodOverriders;return!_.isUndefined(_.find(r,function(t){return t.toLowerCase()===e.toLowerCase()}))},t.urlCreator=t.urlCreator||"path",e.setUrlCreator=function(e){if(!_.has(t.urlCreatorFactory,e))throw new Error("URL Path selected isn't valid");return t.urlCreator=e,this},t.restangularFields=t.restangularFields||{id:"id",route:"route",parentResource:"parentResource",restangularCollection:"restangularCollection",cannonicalId:"__cannonicalId",etag:"restangularEtag",selfLink:"href",get:"get",getList:"getList",put:"put",post:"post",remove:"remove",head:"head",trace:"trace",options:"options",patch:"patch",getRestangularUrl:"getRestangularUrl",getRequestedUrl:"getRequestedUrl",putElement:"putElement",addRestangularMethod:"addRestangularMethod",getParentList:"getParentList",clone:"clone",ids:"ids",httpConfig:"_$httpConfig",reqParams:"reqParams",one:"one",all:"all",several:"several",oneUrl:"oneUrl",allUrl:"allUrl",customPUT:"customPUT",customPOST:"customPOST",customDELETE:"customDELETE",customGET:"customGET",customGETLIST:"customGETLIST",customOperation:"customOperation",doPUT:"doPUT",doPOST:"doPOST",doDELETE:"doDELETE",doGET:"doGET",doGETLIST:"doGETLIST",fromServer:"fromServer",withConfig:"withConfig",withHttpConfig:"withHttpConfig",singleOne:"singleOne",plain:"plain",save:"save",restangularized:"restangularized"},e.setRestangularFields=function(e){return t.restangularFields=_.extend(t.restangularFields,e),this},t.isRestangularized=function(e){return!!e[t.restangularFields.restangularized]},t.setFieldToElem=function(e,t,n){var r=e.split("."),i=t;return _.each(_.initial(r),function(e){i[e]={},i=i[e]}),i[_.last(r)]=n,this},t.getFieldFromElem=function(e,t){var n=e.split("."),r=t;return _.each(n,function(e){r&&(r=r[e])}),angular.copy(r)},t.setIdToElem=function(e,n){return t.setFieldToElem(t.restangularFields.id,e,n),this},t.getIdFromElem=function(e){return t.getFieldFromElem(t.restangularFields.id,e)},t.isValidId=function(e){return""!==e&&!_.isUndefined(e)&&!_.isNull(e)},t.setUrlToElem=function(e,n){return t.setFieldToElem(t.restangularFields.selfLink,e,n),this},t.getUrlFromElem=function(e){return t.getFieldFromElem(t.restangularFields.selfLink,e)},t.useCannonicalId=_.isUndefined(t.useCannonicalId)?!1:t.useCannonicalId,e.setUseCannonicalId=function(e){return t.useCannonicalId=e,this},t.getCannonicalIdFromElem=function(e){var n=e[t.restangularFields.cannonicalId],r=t.isValidId(n)?n:t.getIdFromElem(e);return r},t.responseInterceptors=t.responseInterceptors||[],t.defaultResponseInterceptor=function(e){return e},t.responseExtractor=function(e,n,r,i,o,a){var s=angular.copy(t.responseInterceptors);s.push(t.defaultResponseInterceptor);var l=e;return _.each(s,function(e){l=e(l,n,r,i,o,a)}),l},e.addResponseInterceptor=function(e){return t.responseInterceptors.push(e),this},t.errorInterceptors=t.errorInterceptors||[],e.addErrorInterceptor=function(e){return t.errorInterceptors.push(e),this},e.setResponseInterceptor=e.addResponseInterceptor,e.setResponseExtractor=e.addResponseInterceptor,e.setErrorInterceptor=e.addErrorInterceptor,t.requestInterceptors=t.requestInterceptors||[],t.defaultInterceptor=function(e,t,n,r,i,o,a){return{element:e,headers:i,params:o,httpConfig:a}},t.fullRequestInterceptor=function(e,n,r,i,o,a,s){var l=angular.copy(t.requestInterceptors),u=t.defaultInterceptor(e,n,r,i,o,a,s);return _.reduce(l,function(e,t){return _.extend(e,t(e.element,n,r,i,e.headers,e.params,e.httpConfig))},u)},e.addRequestInterceptor=function(e){return t.requestInterceptors.push(function(t,n,r,i,o,a,s){return{headers:o,params:a,element:e(t,n,r,i),httpConfig:s}}),this},e.setRequestInterceptor=e.addRequestInterceptor,e.addFullRequestInterceptor=function(e){return t.requestInterceptors.push(e),this},e.setFullRequestInterceptor=e.addFullRequestInterceptor,t.onBeforeElemRestangularized=t.onBeforeElemRestangularized||function(e){return e},e.setOnBeforeElemRestangularized=function(e){return t.onBeforeElemRestangularized=e,this},e.setRestangularizePromiseInterceptor=function(e){return t.restangularizePromiseInterceptor=e,this},t.onElemRestangularized=t.onElemRestangularized||function(e){return e},e.setOnElemRestangularized=function(e){return t.onElemRestangularized=e,this},t.shouldSaveParent=t.shouldSaveParent||function(){return!0},e.setParentless=function(e){return _.isArray(e)?t.shouldSaveParent=function(t){return!_.contains(e,t)}:_.isBoolean(e)&&(t.shouldSaveParent=function(){return!e}),this},t.suffix=_.isUndefined(t.suffix)?null:t.suffix,e.setRequestSuffix=function(e){return t.suffix=e,this},t.transformers=t.transformers||{},e.addElementTransformer=function(n,r,i){var o=null,a=null;2===arguments.length?a=r:(a=i,o=r);var s=t.transformers[n];return s||(s=t.transformers[n]=[]),s.push(function(e,t){return _.isNull(o)||e===o?a(t):t}),e},e.extendCollection=function(t,n){return e.addElementTransformer(t,!0,n)},e.extendModel=function(t,n){return e.addElementTransformer(t,!1,n)},t.transformElem=function(e,n,r,i,o){if(!o&&!t.transformLocalElements&&!e[t.restangularFields.fromServer])return e;var a=t.transformers[r],s=e;return a&&_.each(a,function(e){s=e(n,s)}),t.onElemRestangularized(s,n,r,i)},t.transformLocalElements=_.isUndefined(t.transformLocalElements)?!1:t.transformLocalElements,e.setTransformOnlyServerElements=function(e){t.transformLocalElements=!e},t.fullResponse=_.isUndefined(t.fullResponse)?!1:t.fullResponse,e.setFullResponse=function(e){return t.fullResponse=e,this},t.urlCreatorFactory={};var o=function(){};o.prototype.setConfig=function(e){return this.config=e,this},o.prototype.parentsArray=function(e){for(var t=[];e;)t.push(e),e=e[this.config.restangularFields.parentResource];return t.reverse()},o.prototype.resource=function(e,r,i,o,a,s,l,u){var c=_.defaults(a||{},this.config.defaultRequestParams.common),f=_.defaults(o||{},this.config.defaultHeaders);l&&(t.isSafe(u)?f["If-None-Match"]=l:f["If-Match"]=l);var d=this.base(e);if(s){var p="";/\/$/.test(d)||(p+="/"),p+=s,d+=p}return this.config.suffix&&-1===d.indexOf(this.config.suffix,d.length-this.config.suffix.length)&&!this.config.getUrlFromElem(e)&&(d+=this.config.suffix),e[this.config.restangularFields.httpConfig]=void 0,n(this.config,r,d,{getList:this.config.withHttpValues(i,{method:"GET",params:c,headers:f}),get:this.config.withHttpValues(i,{method:"GET",params:c,headers:f}),jsonp:this.config.withHttpValues(i,{method:"jsonp",params:c,headers:f}),put:this.config.withHttpValues(i,{method:"PUT",params:c,headers:f}),post:this.config.withHttpValues(i,{method:"POST",params:c,headers:f}),remove:this.config.withHttpValues(i,{method:"DELETE",params:c,headers:f}),head:this.config.withHttpValues(i,{method:"HEAD",params:c,headers:f}),trace:this.config.withHttpValues(i,{method:"TRACE",params:c,headers:f}),options:this.config.withHttpValues(i,{method:"OPTIONS",params:c,headers:f}),patch:this.config.withHttpValues(i,{method:"PATCH",params:c,headers:f})})};var a=function(){};a.prototype=new o,a.prototype.normalizeUrl=function(e){var t=/(http[s]?:\/\/)?(.*)?/.exec(e);return t[2]=t[2].replace(/[\\\/]+/g,"/"),"undefined"!=typeof t[1]?t[1]+t[2]:t[2]},a.prototype.base=function(e){var n=this;return _.reduce(this.parentsArray(e),function(e,r){var i,o=n.config.getUrlFromElem(r);if(o){if(n.config.isAbsoluteUrl(o))return o;i=o}else if(i=r[n.config.restangularFields.route],r[n.config.restangularFields.restangularCollection]){var a=r[n.config.restangularFields.ids];a&&(i+="/"+a.join(","))}else{var s;s=n.config.useCannonicalId?n.config.getCannonicalIdFromElem(r):n.config.getIdFromElem(r),t.isValidId(s)&&!r.singleOne&&(i+="/"+(n.config.encodeIds?encodeURIComponent(s):s))}return e=e.replace(/\/$/,"")+"/"+i,n.normalizeUrl(e)},this.config.baseUrl)},a.prototype.fetchUrl=function(e,t){var n=this.base(e);return t&&(n+="/"+t),n},a.prototype.fetchRequestedUrl=function(e,n){function r(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function i(e,t,n){for(var i=r(e),o=0;op;++p)try{P[p](D)}catch(v){f="Rangy init listener threw an exception. Continuing. Detail: "+c(v),a(f)}}}function d(e,t,n){n&&(e+=" in module "+n.name),D.warn("DEPRECATED: "+e+" is deprecated. Please use "+t+" instead.")}function p(e,t,n,r){e[t]=function(){return d(t,n,r),e[n].apply(e,M.toArray(arguments))}}function h(e){e=e||window,f();for(var t=0,n=F.length;n>t;++t)F[t](e)}function g(e,t,n){this.name=e,this.dependencies=t,this.initialized=!1,this.supported=!1,this.initializer=n}function v(e,t,n){var r=new g(e,t,function(t){if(!t.initialized){t.initialized=!0;try{n(D,t),t.supported=!0}catch(r){var i="Module '"+e+"' failed to load: "+c(r);a(i),r.stack&&a(r.stack)}}});return R[e]=r,r}function m(){}function y(){}var b="object",w="function",$="undefined",x=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],C=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],E=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],_=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],k=r(e),S=r(t),T=r(n),O=[].forEach?function(e,t){e.forEach(t)}:function(e,t){for(var n=0,r=e.length;r>n;++n)t(e[n],n)},R={},A=typeof window!=$&&typeof document!=$,M={isHostMethod:e,isHostObject:t,isHostProperty:n,areHostMethods:k,areHostObjects:S,areHostProperties:T,isTextRange:i,getBody:o,forEach:O},D={version:"1.3.0",initialized:!1,isBrowser:A,supported:!0,util:M,features:{},modules:R,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==$?!0:rangyAutoInitialize}};D.fail=l,D.warn=u;var N;({}).hasOwnProperty?(M.extend=N=function(e,t,n){var r,i;for(var o in t)t.hasOwnProperty(o)&&(r=e[o],i=t[o],n&&null!==r&&"object"==typeof r&&null!==i&&"object"==typeof i&&N(r,i,!0),e[o]=i);return t.hasOwnProperty("toString")&&(e.toString=t.toString),e},M.createOptions=function(e,t){var n={};return N(n,t),e&&N(n,e),n}):l("hasOwnProperty not supported"),A||l("Rangy can only run in a browser"),function(){var e;if(A){var t=document.createElement("div");t.appendChild(document.createElement("span"));var n=[].slice;try{1==n.call(t.childNodes,0)[0].nodeType&&(e=function(e){return n.call(e,0)})}catch(r){}}e||(e=function(e){for(var t=[],n=0,r=e.length;r>n;++n)t[n]=e[n];return t}),M.toArray=e}();var L;A&&(e(document,"addEventListener")?L=function(e,t,n){e.addEventListener(t,n,!1)}:e(document,"attachEvent")?L=function(e,t,n){e.attachEvent("on"+t,n)}:l("Document does not have required addEventListener or attachEvent method"),M.addListener=L);var P=[];M.deprecationNotice=d,M.createAliasForDeprecatedMethod=p,D.init=f,D.addInitListener=function(e){D.initialized?e(D):P.push(e)};var F=[];D.addShimListener=function(e){F.push(e)},A&&(D.shim=D.createMissingNativeApi=h,p(D,"createMissingNativeApi","shim")),g.prototype={init:function(){for(var e,t,n=this.dependencies||[],r=0,i=n.length;i>r;++r){if(t=n[r],e=R[t],!(e&&e instanceof g))throw new Error("required module '"+t+"' not found");if(e.init(),!e.supported)throw new Error("required module '"+t+"' not supported")}this.initializer(this)},fail:function(e){throw this.initialized=!0,this.supported=!1,new Error(e)},warn:function(e){D.warn("Module "+this.name+": "+e)},deprecationNotice:function(e,t){D.warn("DEPRECATED: "+e+" in module "+this.name+" is deprecated. Please use "+t+" instead")},createError:function(e){return new Error("Error in Rangy "+this.name+" module: "+e)}},D.createModule=function(e){var t,n;2==arguments.length?(t=arguments[1],n=[]):(t=arguments[2],n=arguments[1]);var r=v(e,n,t);D.initialized&&D.supported&&r.init()},D.createCoreModule=function(e,t,n){v(e,t,n)},D.RangePrototype=m,D.rangePrototype=new m,D.selectionPrototype=new y,D.createCoreModule("DomUtil",[],function(e,t){function n(e){var t;return typeof e.namespaceURI==A||null===(t=e.namespaceURI)||"http://www.w3.org/1999/xhtml"==t}function r(e){var t=e.parentNode;return 1==t.nodeType?t:null}function i(e){for(var t=0;e=e.previousSibling;)++t;return t}function o(e){switch(e.nodeType){case 7:case 10:return 0;case 3:case 8:return e.length;default:return e.childNodes.length}}function a(e,t){var n,r=[];for(n=e;n;n=n.parentNode)r.push(n);for(n=t;n;n=n.parentNode)if(P(r,n))return n;return null}function s(e,t,n){for(var r=n?t:t.parentNode;r;){if(r===e)return!0;r=r.parentNode}return!1}function l(e,t){return s(e,t,!0)}function u(e,t,n){for(var r,i=n?e:e.parentNode;i;){if(r=i.parentNode,r===t)return i;i=r}return null}function c(e){var t=e.nodeType;return 3==t||4==t||8==t}function f(e){if(!e)return!1;var t=e.nodeType;return 3==t||8==t}function d(e,t){var n=t.nextSibling,r=t.parentNode;return n?r.insertBefore(e,n):r.appendChild(e),e}function p(e,t,n){var r=e.cloneNode(!1);if(r.deleteData(0,t),e.deleteData(t,e.length-t),d(r,e),n)for(var o,a=0;o=n[a++];)o.node==e&&o.offset>t?(o.node=r,o.offset-=t):o.node==e.parentNode&&o.offset>i(e)&&++o.offset;return r}function h(e){if(9==e.nodeType)return e;if(typeof e.ownerDocument!=A)return e.ownerDocument;if(typeof e.document!=A)return e.document;if(e.parentNode)return h(e.parentNode);throw t.createError("getDocument: no document found for node")}function g(e){var n=h(e);if(typeof n.defaultView!=A)return n.defaultView;if(typeof n.parentWindow!=A)return n.parentWindow;throw t.createError("Cannot get a window object for node")}function v(e){if(typeof e.contentDocument!=A)return e.contentDocument;if(typeof e.contentWindow!=A)return e.contentWindow.document;throw t.createError("getIframeDocument: No Document object found for iframe element")}function m(e){if(typeof e.contentWindow!=A)return e.contentWindow;if(typeof e.contentDocument!=A)return e.contentDocument.defaultView;throw t.createError("getIframeWindow: No Window object found for iframe element")}function y(e){return e&&M.isHostMethod(e,"setTimeout")&&M.isHostObject(e,"document")}function b(e,t,n){var r;if(e?M.isHostProperty(e,"nodeType")?r=1==e.nodeType&&"iframe"==e.tagName.toLowerCase()?v(e):h(e):y(e)&&(r=e.document):r=document,!r)throw t.createError(n+"(): Parameter must be a Window object or DOM node");return r}function w(e){for(var t;t=e.parentNode;)e=t;return e}function $(e,n,r,o){var s,l,c,f,d;if(e==r)return n===o?0:o>n?-1:1;if(s=u(r,e,!0))return n<=i(s)?-1:1;if(s=u(e,r,!0))return i(s)[index:"+i(e)+",length:"+e.childNodes.length+"]["+(e.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return e.nodeName}function E(e){for(var t,n=h(e).createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n}function _(e,t,n){var r=D(e),i=e.createElement("div");i.contentEditable=""+!!n,t&&(i.innerHTML=t);var o=r.firstChild;return o?r.insertBefore(i,o):r.appendChild(i),i}function k(e){return e.parentNode.removeChild(e)}function S(e){this.root=e,this._next=e}function T(e){return new S(e)}function O(e,t){this.node=e,this.offset=t}function R(e){this.code=this[e],this.codeName=e,this.message="DOMException: "+this.codeName}var A="undefined",M=e.util,D=M.getBody;M.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||t.fail("document missing a Node creation method"),M.isHostMethod(document,"getElementsByTagName")||t.fail("document missing getElementsByTagName method");var N=document.createElement("div");M.areHostMethods(N,["insertBefore","appendChild","cloneNode"]||!M.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"]))||t.fail("Incomplete Element implementation"),M.isHostProperty(N,"innerHTML")||t.fail("Element is missing innerHTML property");var L=document.createTextNode("test");M.areHostMethods(L,["splitText","deleteData","insertData","appendData","cloneNode"]||!M.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"])||!M.areHostProperties(L,["data"]))||t.fail("Incomplete Text Node implementation");var P=function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1},F=!1;!function(){var t=document.createElement("b");t.innerHTML="1";var n=t.firstChild;t.innerHTML="
",F=x(n),e.features.crashyTextNodes=F}();var j;typeof window.getComputedStyle!=A?j=function(e,t){return g(e).getComputedStyle(e,null)[t]}:typeof document.documentElement.currentStyle!=A?j=function(e,t){return e.currentStyle?e.currentStyle[t]:""}:t.fail("No means of obtaining computed style properties found"),S.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var e,t,n=this._current=this._next;if(this._current)if(e=n.firstChild)this._next=e;else{for(t=null;n!==this.root&&!(t=n.nextSibling);)n=n.parentNode;this._next=t}return this._current},detach:function(){this._current=this._next=this.root=null}},O.prototype={equals:function(e){return!!e&&this.node===e.node&&this.offset==e.offset},inspect:function(){return"[DomPosition("+C(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},R.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},R.prototype.toString=function(){return this.message},e.dom={arrayContains:P,isHtmlNamespace:n,parentElement:r,getNodeIndex:i,getNodeLength:o,getCommonAncestor:a,isAncestorOf:s,isOrIsAncestorOf:l,getClosestAncestorIn:u,isCharacterDataNode:c,isTextOrCommentNode:f,insertAfter:d,splitDataNode:p,getDocument:h,getWindow:g,getIframeWindow:m,getIframeDocument:v,getBody:D,isWindow:y,getContentDocument:b,getRootContainer:w,comparePoints:$,isBrokenNode:x,inspectNode:C,getComputedStyleProperty:j,createTestElement:_,removeNode:k,fragmentFromNodeChildren:E,createIterator:T,DomPosition:O -},e.DOMException=R}),D.createCoreModule("DomRange",["DomUtil"],function(e,t){function n(e,t){return 3!=e.nodeType&&(H(e,t.startContainer)||H(e,t.endContainer))}function r(e){return e.document||W(e.startContainer)}function i(e){return K(e.startContainer)}function o(e){return new F(e.parentNode,V(e))}function a(e){return new F(e.parentNode,V(e)+1)}function s(e,t,n){var r=11==e.nodeType?e.firstChild:e;return I(t)?n==t.length?L.insertAfter(e,t):t.parentNode.insertBefore(e,0==n?t:z(t,n)):n>=t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[n]),r}function l(e,t,n){if(_(e),_(t),r(t)!=r(e))throw new j("WRONG_DOCUMENT_ERR");var i=B(e.startContainer,e.startOffset,t.endContainer,t.endOffset),o=B(e.endContainer,e.endOffset,t.startContainer,t.startOffset);return n?0>=i&&o>=0:0>i&&o>0}function u(e){for(var t,n,i,o=r(e.range).createDocumentFragment();n=e.next();){if(t=e.isPartiallySelectedSubtree(),n=n.cloneNode(!t),t&&(i=e.getSubtreeIterator(),n.appendChild(u(i)),i.detach()),10==n.nodeType)throw new j("HIERARCHY_REQUEST_ERR");o.appendChild(n)}return o}function c(e,t,n){var r,i;n=n||{stop:!1};for(var o,a;o=e.next();)if(e.isPartiallySelectedSubtree()){if(t(o)===!1)return void(n.stop=!0);if(a=e.getSubtreeIterator(),c(a,t,n),a.detach(),n.stop)return}else for(r=L.createIterator(o);i=r.next();)if(t(i)===!1)return void(n.stop=!0)}function f(e){for(var t;e.next();)e.isPartiallySelectedSubtree()?(t=e.getSubtreeIterator(),f(t),t.detach()):e.remove()}function d(e){for(var t,n,i=r(e.range).createDocumentFragment();t=e.next();){if(e.isPartiallySelectedSubtree()?(t=t.cloneNode(!1),n=e.getSubtreeIterator(),t.appendChild(d(n)),n.detach()):e.remove(),10==t.nodeType)throw new j("HIERARCHY_REQUEST_ERR");i.appendChild(t)}return i}function p(e,t,n){var r,i=!(!t||!t.length),o=!!n;i&&(r=new RegExp("^("+t.join("|")+")$"));var a=[];return c(new g(e,!1),function(t){if(!(i&&!r.test(t.nodeType)||o&&!n(t))){var s=e.startContainer;if(t!=s||!I(s)||e.startOffset!=s.length){var l=e.endContainer;t==l&&I(l)&&0==e.endOffset||a.push(t)}}}),a}function h(e){var t="undefined"==typeof e.getName?"Range":e.getName();return"["+t+"("+L.inspectNode(e.startContainer)+":"+e.startOffset+", "+L.inspectNode(e.endContainer)+":"+e.endOffset+")]"}function g(e,t){if(this.range=e,this.clonePartiallySelectedTextNodes=t,!e.collapsed){this.sc=e.startContainer,this.so=e.startOffset,this.ec=e.endContainer,this.eo=e.endOffset;var n=e.commonAncestorContainer;this.sc===this.ec&&I(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||I(this.sc)?U(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||I(this.ec)?U(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function v(e){return function(t,n){for(var r,i=n?t:t.parentNode;i;){if(r=i.nodeType,G(e,r))return i;i=i.parentNode}return null}}function m(e,t){if(ie(e,t))throw new j("INVALID_NODE_TYPE_ERR")}function y(e,t){if(!G(t,e.nodeType))throw new j("INVALID_NODE_TYPE_ERR")}function b(e,t){if(0>t||t>(I(e)?e.length:e.childNodes.length))throw new j("INDEX_SIZE_ERR")}function w(e,t){if(ne(e,!0)!==ne(t,!0))throw new j("WRONG_DOCUMENT_ERR")}function $(e){if(re(e,!0))throw new j("NO_MODIFICATION_ALLOWED_ERR")}function x(e,t){if(!e)throw new j(t)}function C(e,t){return t<=(I(e)?e.length:e.childNodes.length)}function E(e){return!!e.startContainer&&!!e.endContainer&&!(Y&&(L.isBrokenNode(e.startContainer)||L.isBrokenNode(e.endContainer)))&&K(e.startContainer)==K(e.endContainer)&&C(e.startContainer,e.startOffset)&&C(e.endContainer,e.endOffset)}function _(e){if(!E(e))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+e.inspect()+")")}function k(e,t){_(e);var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=n===i;I(i)&&o>0&&o0&&r=V(n)&&o++,r=0),e.setStartAndEnd(n,r,i,o)}function S(e){_(e);var t=e.commonAncestorContainer.parentNode.cloneNode(!1);return t.appendChild(e.cloneContents()),t.innerHTML}function T(e){e.START_TO_START=ce,e.START_TO_END=fe,e.END_TO_END=de,e.END_TO_START=pe,e.NODE_BEFORE=he,e.NODE_AFTER=ge,e.NODE_BEFORE_AND_AFTER=ve,e.NODE_INSIDE=me}function O(e){T(e),T(e.prototype)}function R(e,t){return function(){_(this);var n,r,i=this.startContainer,o=this.startOffset,s=this.commonAncestorContainer,l=new g(this,!0);i!==s&&(n=U(i,s,!0),r=a(n),i=r.node,o=r.offset),c(l,$),l.reset();var u=e(l);return l.detach(),t(this,i,o,i,o),u}}function A(t,r){function i(e,t){return function(n){y(n,X),y(K(n),J);var r=(e?o:a)(n);(t?s:l)(this,r.node,r.offset)}}function s(e,t,n){var i=e.endContainer,o=e.endOffset;(t!==e.startContainer||n!==e.startOffset)&&((K(t)!=K(i)||1==B(t,n,i,o))&&(i=t,o=n),r(e,t,n,i,o))}function l(e,t,n){var i=e.startContainer,o=e.startOffset;(t!==e.endContainer||n!==e.endOffset)&&((K(t)!=K(i)||-1==B(t,n,i,o))&&(i=t,o=n),r(e,i,o,t,n))}var u=function(){};u.prototype=e.rangePrototype,t.prototype=new u,P.extend(t.prototype,{setStart:function(e,t){m(e,!0),b(e,t),s(this,e,t)},setEnd:function(e,t){m(e,!0),b(e,t),l(this,e,t)},setStartAndEnd:function(){var e=arguments,t=e[0],n=e[1],i=t,o=n;switch(e.length){case 3:o=e[2];break;case 4:i=e[2],o=e[3]}r(this,t,n,i,o)},setBoundary:function(e,t,n){this["set"+(n?"Start":"End")](e,t)},setStartBefore:i(!0,!0),setStartAfter:i(!1,!0),setEndBefore:i(!0,!1),setEndAfter:i(!1,!1),collapse:function(e){_(this),e?r(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):r(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(e){m(e,!0),r(this,e,0,e,q(e))},selectNode:function(e){m(e,!1),y(e,X);var t=o(e),n=a(e);r(this,t.node,t.offset,n.node,n.offset)},extractContents:R(d,r),deleteContents:R(f,r),canSurroundContents:function(){_(this),$(this.startContainer),$(this.endContainer);var e=new g(this,!0),t=e._first&&n(e._first,this)||e._last&&n(e._last,this);return e.detach(),!t},splitBoundaries:function(){k(this)},splitBoundariesPreservingPositions:function(e){k(this,e)},normalizeBoundaries:function(){_(this);var e,t=this.startContainer,n=this.startOffset,i=this.endContainer,o=this.endOffset,a=function(e){var t=e.nextSibling;t&&t.nodeType==e.nodeType&&(i=e,o=e.length,e.appendData(t.data),Q(t))},s=function(e){var r=e.previousSibling;if(r&&r.nodeType==e.nodeType){t=e;var a=e.length;if(n=r.length,e.insertData(0,r.data),Q(r),t==i)o+=n,i=t;else if(i==e.parentNode){var s=V(e);o==s?(i=e,o=a):o>s&&o--}}},l=!0;if(I(i))o==i.length?a(i):0==o&&(e=i.previousSibling,e&&e.nodeType==i.nodeType&&(o=e.length,t==i&&(l=!1),e.appendData(i.data),Q(i),i=e));else{if(o>0){var u=i.childNodes[o-1];u&&I(u)&&a(u)}l=!this.collapsed}if(l){if(I(t))0==n?s(t):n==t.length&&(e=t.nextSibling,e&&e.nodeType==t.nodeType&&(i==e&&(i=t,o+=t.length),t.appendData(e.data),Q(e)));else if(nx",ae=3==oe.firstChild.nodeType}catch(se){}e.features.htmlParsingConforms=ae;var le=ae?function(e){var t=this.startContainer,n=W(t);if(!t)throw new j("INVALID_STATE_ERR");var r=null;return 1==t.nodeType?r=t:I(t)&&(r=L.parentElement(t)),r=null===r||"HTML"==r.nodeName&&L.isHtmlNamespace(W(r).documentElement)&&L.isHtmlNamespace(r)?n.createElement("body"):r.cloneNode(!1),r.innerHTML=e,L.fragmentFromNodeChildren(r)}:function(e){var t=r(this),n=t.createElement("body");return n.innerHTML=e,L.fragmentFromNodeChildren(n)},ue=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ce=0,fe=1,de=2,pe=3,he=0,ge=1,ve=2,me=3;P.extend(e.rangePrototype,{compareBoundaryPoints:function(e,t){_(this),w(this.startContainer,t.startContainer);var n,r,i,o,a=e==pe||e==ce?"start":"end",s=e==fe||e==ce?"start":"end";return n=this[a+"Container"],r=this[a+"Offset"],i=t[s+"Container"],o=t[s+"Offset"],B(n,r,i,o)},insertNode:function(e){if(_(this),y(e,ee),$(this.startContainer),H(e,this.startContainer))throw new j("HIERARCHY_REQUEST_ERR");var t=s(e,this.startContainer,this.startOffset);this.setStartBefore(t)},cloneContents:function(){_(this);var e,t;if(this.collapsed)return r(this).createDocumentFragment();if(this.startContainer===this.endContainer&&I(this.startContainer))return e=this.startContainer.cloneNode(!0),e.data=e.data.slice(this.startOffset,this.endOffset),t=r(this).createDocumentFragment(),t.appendChild(e),t;var n=new g(this,!0);return e=u(n),n.detach(),e},canSurroundContents:function(){_(this),$(this.startContainer),$(this.endContainer);var e=new g(this,!0),t=e._first&&n(e._first,this)||e._last&&n(e._last,this);return e.detach(),!t},surroundContents:function(e){if(y(e,te),!this.canSurroundContents())throw new j("INVALID_STATE_ERR");var t=this.extractContents();if(e.hasChildNodes())for(;e.lastChild;)e.removeChild(e.lastChild);s(e,this.startContainer,this.startOffset),e.appendChild(t),this.selectNode(e)},cloneRange:function(){_(this);for(var e,t=new N(r(this)),n=ue.length;n--;)e=ue[n],t[e]=this[e];return t},toString:function(){_(this);var e=this.startContainer;if(e===this.endContainer&&I(e))return 3==e.nodeType||4==e.nodeType?e.data.slice(this.startOffset,this.endOffset):"";var t=[],n=new g(this,!0);return c(n,function(e){(3==e.nodeType||4==e.nodeType)&&t.push(e.data)}),n.detach(),t.join("")},compareNode:function(e){_(this);var t=e.parentNode,n=V(e);if(!t)throw new j("NOT_FOUND_ERR");var r=this.comparePoint(t,n),i=this.comparePoint(t,n+1);return 0>r?i>0?ve:he:i>0?ge:me},comparePoint:function(e,t){return _(this),x(e,"HIERARCHY_REQUEST_ERR"),w(e,this.startContainer),B(e,t,this.startContainer,this.startOffset)<0?-1:B(e,t,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:le,toHtml:function(){return S(this)},intersectsNode:function(e,t){if(_(this),K(e)!=i(this))return!1;var n=e.parentNode,r=V(e);if(!n)return!0;var o=B(n,r,this.endContainer,this.endOffset),a=B(n,r+1,this.startContainer,this.startOffset);return t?0>=o&&a>=0:0>o&&a>0},isPointInRange:function(e,t){return _(this),x(e,"HIERARCHY_REQUEST_ERR"),w(e,this.startContainer),B(e,t,this.startContainer,this.startOffset)>=0&&B(e,t,this.endContainer,this.endOffset)<=0},intersectsRange:function(e){return l(this,e,!1)},intersectsOrTouchesRange:function(e){return l(this,e,!0)},intersection:function(e){if(this.intersectsRange(e)){var t=B(this.startContainer,this.startOffset,e.startContainer,e.startOffset),n=B(this.endContainer,this.endOffset,e.endContainer,e.endOffset),r=this.cloneRange();return-1==t&&r.setStart(e.startContainer,e.startOffset),1==n&&r.setEnd(e.endContainer,e.endOffset),r}return null},union:function(e){if(this.intersectsOrTouchesRange(e)){var t=this.cloneRange();return-1==B(e.startContainer,e.startOffset,this.startContainer,this.startOffset)&&t.setStart(e.startContainer,e.startOffset),1==B(e.endContainer,e.endOffset,this.endContainer,this.endOffset)&&t.setEnd(e.endContainer,e.endOffset),t}throw new j("Ranges do not intersect")},containsNode:function(e,t){return t?this.intersectsNode(e,!1):this.compareNode(e)==me},containsNodeContents:function(e){return this.comparePoint(e,0)>=0&&this.comparePoint(e,q(e))<=0},containsRange:function(e){var t=this.intersection(e);return null!==t&&e.equals(t)},containsNodeText:function(e){var t=this.cloneRange();t.selectNode(e);var n=t.getNodes([3]);if(n.length>0){t.setStart(n[0],0);var r=n.pop();return t.setEnd(r,r.length),this.containsRange(t)}return this.containsNodeContents(e)},getNodes:function(e,t){return _(this),p(this,e,t)},getDocument:function(){return r(this)},collapseBefore:function(e){this.setEndBefore(e),this.collapse(!1)},collapseAfter:function(e){this.setStartAfter(e),this.collapse(!0)},getBookmark:function(t){var n=r(this),i=e.createRange(n);t=t||L.getBody(n),i.selectNodeContents(t);var o=this.intersection(i),a=0,s=0;return o&&(i.setEnd(o.startContainer,o.startOffset),a=i.toString().length,s=a+o.toString().length),{start:a,end:s,containerNode:t}},moveToBookmark:function(e){var t=e.containerNode,n=0;this.setStart(t,0),this.collapse(!0);for(var r,i,o,a,s=[t],l=!1,u=!1;!u&&(r=s.pop());)if(3==r.nodeType)i=n+r.length,!l&&e.start>=n&&e.start<=i&&(this.setStart(r,e.start-n),l=!0),l&&e.end>=n&&e.end<=i&&(this.setEnd(r,e.end-n),u=!0),n=i;else for(a=r.childNodes,o=a.length;o--;)s.push(a[o])},getName:function(){return"DomRange"},equals:function(e){return N.rangesEqual(this,e)},isValid:function(){return E(this)},inspect:function(){return h(this)},detach:function(){}}),A(N,D),P.extend(N,{rangeProperties:ue,RangeIterator:g,copyComparisonConstants:O,createPrototypeRange:A,inspect:h,toHtml:S,getRangeDocument:r,rangesEqual:function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}}),e.DomRange=N}),D.createCoreModule("WrappedRange",["DomRange"],function(e,t){var n,r,i=e.dom,o=e.util,a=i.DomPosition,s=e.DomRange,l=i.getBody,u=i.getContentDocument,c=i.isCharacterDataNode;if(e.features.implementsDomRange&&!function(){function r(e){for(var t,n=d.length;n--;)t=d[n],e[t]=e.nativeRange[t];e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset}function a(e,t,n,r,i){var o=e.startContainer!==t||e.startOffset!=n,a=e.endContainer!==r||e.endOffset!=i,s=!e.equals(e.nativeRange);(o||a||s)&&(e.setEnd(r,i),e.setStart(t,n))}var c,f,d=s.rangeProperties;n=function(e){if(!e)throw t.createError("WrappedRange: Range must be specified");this.nativeRange=e,r(this)},s.createPrototypeRange(n,a),c=n.prototype,c.selectNode=function(e){this.nativeRange.selectNode(e),r(this)},c.cloneContents=function(){return this.nativeRange.cloneContents()},c.surroundContents=function(e){this.nativeRange.surroundContents(e),r(this)},c.collapse=function(e){this.nativeRange.collapse(e),r(this)},c.cloneRange=function(){return new n(this.nativeRange.cloneRange())},c.refresh=function(){r(this)},c.toString=function(){return this.nativeRange.toString()};var p=document.createTextNode("test");l(document).appendChild(p);var h=document.createRange();h.setStart(p,0),h.setEnd(p,0);try{h.setStart(p,1),c.setStart=function(e,t){this.nativeRange.setStart(e,t),r(this)},c.setEnd=function(e,t){this.nativeRange.setEnd(e,t),r(this)},f=function(e){return function(t){this.nativeRange[e](t),r(this)}}}catch(g){c.setStart=function(e,t){try{this.nativeRange.setStart(e,t)}catch(n){this.nativeRange.setEnd(e,t),this.nativeRange.setStart(e,t)}r(this)},c.setEnd=function(e,t){try{this.nativeRange.setEnd(e,t)}catch(n){this.nativeRange.setStart(e,t),this.nativeRange.setEnd(e,t)}r(this)},f=function(e,t){return function(n){try{this.nativeRange[e](n)}catch(i){this.nativeRange[t](n),this.nativeRange[e](n)}r(this)}}}c.setStartBefore=f("setStartBefore","setEndBefore"),c.setStartAfter=f("setStartAfter","setEndAfter"),c.setEndBefore=f("setEndBefore","setStartBefore"),c.setEndAfter=f("setEndAfter","setStartAfter"),c.selectNodeContents=function(e){this.setStartAndEnd(e,0,i.getNodeLength(e))},h.selectNodeContents(p),h.setEnd(p,3);var v=document.createRange();v.selectNodeContents(p),v.setEnd(p,4),v.setStart(p,2),-1==h.compareBoundaryPoints(h.START_TO_END,v)&&1==h.compareBoundaryPoints(h.END_TO_START,v)?c.compareBoundaryPoints=function(e,t){return t=t.nativeRange||t,e==t.START_TO_END?e=t.END_TO_START:e==t.END_TO_START&&(e=t.START_TO_END),this.nativeRange.compareBoundaryPoints(e,t)}:c.compareBoundaryPoints=function(e,t){return this.nativeRange.compareBoundaryPoints(e,t.nativeRange||t)};var m=document.createElement("div");m.innerHTML="123";var y=m.firstChild,b=l(document);b.appendChild(m),h.setStart(y,1),h.setEnd(y,2),h.deleteContents(),"13"==y.data&&(c.deleteContents=function(){this.nativeRange.deleteContents(),r(this)},c.extractContents=function(){var e=this.nativeRange.extractContents();return r(this),e}),b.removeChild(m),b=null,o.isHostMethod(h,"createContextualFragment")&&(c.createContextualFragment=function(e){return this.nativeRange.createContextualFragment(e)}),l(document).removeChild(p),c.getName=function(){return"WrappedRange"},e.WrappedRange=n,e.createNativeRange=function(e){return e=u(e,t,"createNativeRange"),e.createRange()}}(),e.features.implementsTextRange){var f=function(e){var t=e.parentElement(),n=e.duplicate();n.collapse(!0);var r=n.parentElement();n=e.duplicate(),n.collapse(!1);var o=n.parentElement(),a=r==o?r:i.getCommonAncestor(r,o);return a==t?a:i.getCommonAncestor(t,a)},d=function(e){return 0==e.compareEndPoints("StartToEnd",e)},p=function(e,t,n,r,o){var s=e.duplicate();s.collapse(n);var l=s.parentElement();if(i.isOrIsAncestorOf(t,l)||(l=t),!l.canHaveHTML){var u=new a(l.parentNode,i.getNodeIndex(l));return{boundaryPosition:u,nodeInfo:{nodeIndex:u.offset,containerElement:u.node}}}var f=i.getDocument(l).createElement("span");f.parentNode&&i.removeNode(f);for(var d,p,h,g,v,m=n?"StartToStart":"StartToEnd",y=o&&o.containerElement==l?o.nodeIndex:0,b=l.childNodes.length,w=b,$=w;;){if($==b?l.appendChild(f):l.insertBefore(f,l.childNodes[$]),s.moveToElementText(f),d=s.compareEndPoints(m,e),0==d||y==w)break;if(-1==d){if(w==y+1)break;y=$}else w=w==y+1?y:$;$=Math.floor((y+w)/2),l.removeChild(f)}if(v=f.nextSibling,-1==d&&v&&c(v)){s.setEndPoint(n?"EndToStart":"EndToEnd",e);var x;if(/[\r\n]/.test(v.data)){var C=s.duplicate(),E=C.text.replace(/\r\n/g,"\r").length;for(x=C.moveStart("character",E);-1==(d=C.compareEndPoints("StartToEnd",C));)x++,C.moveStart("character",1)}else x=s.text.length;g=new a(v,x)}else p=(r||!n)&&f.previousSibling,h=(r||n)&&f.nextSibling,g=h&&c(h)?new a(h,0):p&&c(p)?new a(p,p.data.length):new a(l,i.getNodeIndex(f));return i.removeNode(f),{boundaryPosition:g,nodeInfo:{nodeIndex:$,containerElement:l}}},h=function(e,t){var n,r,o,a,s=e.offset,u=i.getDocument(e.node),f=l(u).createTextRange(),d=c(e.node);return d?(n=e.node,r=n.parentNode):(a=e.node.childNodes,n=st;++t)if(!T.isAncestorOf(e[0],e[t]))return!1;return!0}function d(e){var n=e.getNodes();if(!f(n))throw t.createError("getSingleElementFromRange: range "+e.inspect()+" did not consist of a single element");return n[0]}function p(e){return!!e&&"undefined"!=typeof e.text}function h(e,t){var n=new M(t);e._ranges=[n],s(e,n,!1),e.rangeCount=1,e.isCollapsed=n.collapsed}function g(t){if(t._ranges.length=0,"None"==t.docSelection.type)u(t);else{var n=t.docSelection.createRange();if(p(n))h(t,n);else{t.rangeCount=n.length;for(var r,i=F(n.item(0)),o=0;os;++s)a.add(r.item(s));try{a.add(i)}catch(u){throw t.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}a.select(),g(e)}function m(e,t,n){this.nativeSelection=e,this.docSelection=t,this._ranges=[],this.win=n,this.refresh()}function y(e){e.win=e.anchorNode=e.focusNode=e._ranges=null,e.rangeCount=e.anchorOffset=e.focusOffset=0,e.detached=!0}function b(e,t){for(var n,r,i=te.length;i--;)if(n=te[i],r=n.selection,"deleteAll"==t)y(r);else if(n.win==e)return"delete"==t?(te.splice(i,1),!0):r;return"deleteAll"==t&&(te.length=0),null}function w(e,n){for(var r,i=F(n[0].startContainer),o=j(i).createControlRange(),a=0,s=n.length;s>a;++a){r=d(n[a]);try{o.add(r)}catch(l){throw t.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}o.select(),g(e)}function $(e,t){if(e.win.document!=F(t))throw new D("WRONG_DOCUMENT_ERR")}function x(t){return function(n,r){var i;this.rangeCount?(i=this.getRangeAt(0),i["set"+(t?"Start":"End")](n,r)):(i=e.createRange(this.win.document),i.setStartAndEnd(n,r)),this.setSingleRange(i,this.isBackward())}}function C(e){var t=[],n=new N(e.anchorNode,e.anchorOffset),r=new N(e.focusNode,e.focusOffset),i="function"==typeof e.getName?e.getName():"Selection";if("undefined"!=typeof e.rangeCount)for(var o=0,a=e.rangeCount;a>o;++o)t[o]=A.inspect(e.getRangeAt(o));return"["+i+"(Ranges: "+t.join(", ")+")(anchor: "+n.inspect()+", focus: "+r.inspect()+"]"}e.config.checkSelectionRanges=!0;var E,_,k="boolean",S="number",T=e.dom,O=e.util,R=O.isHostMethod,A=e.DomRange,M=e.WrappedRange,D=e.DOMException,N=T.DomPosition,L=e.features,P="Control",F=T.getDocument,j=T.getBody,I=A.rangesEqual,V=R(window,"getSelection"),H=O.isHostObject(document,"selection");L.implementsWinGetSelection=V,L.implementsDocSelection=H;var W=H&&(!V||e.config.preferTextRange);if(W)E=o,e.isSelectionValid=function(e){var t=r(e,"isSelectionValid").document,n=t.selection;return"None"!=n.type||F(n.createRange().parentElement())==t};else{if(!V)return t.fail("Neither document.selection or window.getSelection() detected."),!1;E=i,e.isSelectionValid=function(){return!0}}e.getNativeSelection=E;var B=E();if(!B)return t.fail("Native selection was null (possibly issue 138?)"),!1;var z=e.createNativeRange(document),U=j(document),q=O.areHostProperties(B,["anchorNode","focusNode","anchorOffset","focusOffset"]);L.selectionHasAnchorAndFocus=q;var G=R(B,"extend");L.selectionHasExtend=G;var K=typeof B.rangeCount==S;L.selectionHasRangeCount=K;var Y=!1,Q=!0,X=G?function(t,n){var r=A.getRangeDocument(n),i=e.createRange(r);i.collapseToPoint(n.endContainer,n.endOffset),t.addRange(c(i)),t.extend(n.startContainer,n.startOffset)}:null;O.areHostMethods(B,["addRange","getRangeAt","removeAllRanges"])&&typeof B.rangeCount==S&&L.implementsDomRange&&!function(){var t=window.getSelection();if(t){for(var n=t.rangeCount,r=n>1,i=[],o=a(t),s=0;n>s;++s)i[s]=t.getRangeAt(s);var l=T.createTestElement(document,"",!1),u=l.appendChild(document.createTextNode("   ")),c=document.createRange();if(c.setStart(u,1),c.collapse(!0),t.removeAllRanges(),t.addRange(c),Q=1==t.rangeCount,t.removeAllRanges(),!r){var f=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(f&&parseInt(f[1])>=36)Y=!1;else{var d=c.cloneRange();c.setStart(u,0),d.setEnd(u,3),d.setStart(u,2),t.addRange(c),t.addRange(d),Y=2==t.rangeCount}}for(T.removeNode(l),t.removeAllRanges(),s=0;n>s;++s)0==s&&o?X?X(t,i[s]):(e.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),t.addRange(i[s])):t.addRange(i[s])}}(),L.selectionSupportsMultipleRanges=Y,L.collapsedNonEditableSelectionsSupported=Q;var J,Z=!1;U&&R(U,"createControlRange")&&(J=U.createControlRange(),O.areHostProperties(J,["item","add"])&&(Z=!0)),L.implementsControlRange=Z,_=q?function(e){return e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset}:function(e){return e.rangeCount?e.getRangeAt(e.rangeCount-1).collapsed:!1};var ee;R(B,"getRangeAt")?ee=function(e,t){try{return e.getRangeAt(t)}catch(n){return null}}:q&&(ee=function(t){var n=F(t.anchorNode),r=e.createRange(n);return r.setStartAndEnd(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),r.collapsed!==this.isCollapsed&&r.setStartAndEnd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset),r}),m.prototype=e.selectionPrototype;var te=[],ne=function(e){if(e&&e instanceof m)return e.refresh(),e;e=r(e,"getNativeSelection");var t=b(e),n=E(e),i=H?o(e):null;return t?(t.nativeSelection=n,t.docSelection=i,t.refresh()):(t=new m(n,i,e),te.push({win:e,selection:t})),t};e.getSelection=ne,O.createAliasForDeprecatedMethod(e,"getIframeSelection","getSelection");var re=m.prototype;if(!W&&q&&O.areHostMethods(B,["removeAllRanges","addRange"])){re.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),u(this)};var ie=function(e,t){X(e.nativeSelection,t),e.refresh()};K?re.addRange=function(t,r){if(Z&&H&&this.docSelection.type==P)v(this,t);else if(n(r)&&G)ie(this,t);else{var i;Y?i=this.rangeCount:(this.removeAllRanges(),i=0);var o=c(t).cloneRange();try{this.nativeSelection.addRange(o)}catch(a){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==i+1){if(e.config.checkSelectionRanges){var l=ee(this.nativeSelection,this.rangeCount-1);l&&!I(l,t)&&(t=new M(l))}this._ranges[this.rangeCount-1]=t,s(this,t,se(this.nativeSelection)),this.isCollapsed=_(this)}else this.refresh()}}:re.addRange=function(e,t){n(t)&&G?ie(this,e):(this.nativeSelection.addRange(c(e)),this.refresh())},re.setRanges=function(e){if(Z&&H&&e.length>1)w(this,e);else{this.removeAllRanges();for(var t=0,n=e.length;n>t;++t)this.addRange(e[t])}}}else{if(!(R(B,"empty")&&R(z,"select")&&Z&&W))return t.fail("No means of selecting a Range or TextRange was found"),!1;re.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var e;if(this.anchorNode)e=F(this.anchorNode);else if(this.docSelection.type==P){var t=this.docSelection.createRange();t.length&&(e=F(t.item(0)))}if(e){var n=j(e).createTextRange();n.select(),this.docSelection.empty()}}}catch(r){}u(this)},re.addRange=function(t){this.docSelection.type==P?v(this,t):(e.WrappedTextRange.rangeToTextRange(t).select(),this._ranges[0]=t,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,s(this,t,!1))},re.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?w(this,e):t&&this.addRange(e[0])}}re.getRangeAt=function(e){if(0>e||e>=this.rangeCount)throw new D("INDEX_SIZE_ERR");return this._ranges[e].cloneRange()};var oe;if(W)oe=function(t){var n;e.isSelectionValid(t.win)?n=t.docSelection.createRange():(n=j(t.win.document).createTextRange(),n.collapse(!0)),t.docSelection.type==P?g(t):p(n)?h(t,n):u(t)};else if(R(B,"getRangeAt")&&typeof B.rangeCount==S)oe=function(t){if(Z&&H&&t.docSelection.type==P)g(t);else if(t._ranges.length=t.rangeCount=t.nativeSelection.rangeCount,t.rangeCount){for(var n=0,r=t.rangeCount;r>n;++n)t._ranges[n]=new e.WrappedRange(t.nativeSelection.getRangeAt(n));s(t,t._ranges[t.rangeCount-1],se(t.nativeSelection)),t.isCollapsed=_(t)}else u(t)};else{if(!q||typeof B.isCollapsed!=k||typeof z.collapsed!=k||!L.implementsDomRange)return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;oe=function(e){var t,n=e.nativeSelection;n.anchorNode?(t=ee(n,0),e._ranges=[t],e.rangeCount=1,l(e),e.isCollapsed=_(e)):u(e)}}re.refresh=function(e){var t=e?this._ranges.slice(0):null,n=this.anchorNode,r=this.anchorOffset;if(oe(this),e){var i=t.length;if(i!=this._ranges.length)return!0;if(this.anchorNode!=n||this.anchorOffset!=r)return!0;for(;i--;)if(!I(t[i],this._ranges[i]))return!0;return!1}};var ae=function(e,t){var n=e.getAllRanges();e.removeAllRanges();for(var r=0,i=n.length;i>r;++r)I(t,n[r])||e.addRange(n[r]);e.rangeCount||u(e)};Z&&H?re.removeRange=function(e){if(this.docSelection.type==P){for(var t,n=this.docSelection.createRange(),r=d(e),i=F(n.item(0)),o=j(i).createControlRange(),a=!1,s=0,l=n.length;l>s;++s)t=n.item(s), -t!==r||a?o.add(n.item(s)):a=!0;o.select(),g(this)}else ae(this,e)}:re.removeRange=function(e){ae(this,e)};var se;!W&&q&&L.implementsDomRange?(se=a,re.isBackward=function(){return se(this)}):se=re.isBackward=function(){return!1},re.isBackwards=re.isBackward,re.toString=function(){for(var e=[],t=0,n=this.rangeCount;n>t;++t)e[t]=""+this._ranges[t];return e.join("")},re.collapse=function(t,n){$(this,t);var r=e.createRange(t);r.collapseToPoint(t,n),this.setSingleRange(r),this.isCollapsed=!0},re.collapseToStart=function(){if(!this.rangeCount)throw new D("INVALID_STATE_ERR");var e=this._ranges[0];this.collapse(e.startContainer,e.startOffset)},re.collapseToEnd=function(){if(!this.rangeCount)throw new D("INVALID_STATE_ERR");var e=this._ranges[this.rangeCount-1];this.collapse(e.endContainer,e.endOffset)},re.selectAllChildren=function(t){$(this,t);var n=e.createRange(t);n.selectNodeContents(t),this.setSingleRange(n)},re.deleteFromDocument=function(){if(Z&&H&&this.docSelection.type==P){for(var e,t=this.docSelection.createRange();t.length;)e=t.item(0),t.remove(e),T.removeNode(e);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();if(n.length){this.removeAllRanges();for(var r=0,i=n.length;i>r;++r)n[r].deleteContents();this.addRange(n[i-1])}}},re.eachRange=function(e,t){for(var n=0,r=this._ranges.length;r>n;++n)if(e(this.getRangeAt(n)))return t},re.getAllRanges=function(){var e=[];return this.eachRange(function(t){e.push(t)}),e},re.setSingleRange=function(e,t){this.removeAllRanges(),this.addRange(e,t)},re.callMethodOnEachRange=function(e,t){var n=[];return this.eachRange(function(r){n.push(r[e].apply(r,t||[]))}),n},re.setStart=x(!0),re.setEnd=x(!1),e.rangePrototype.select=function(e){ne(this.getDocument()).setSingleRange(this,e)},re.changeEachRange=function(e){var t=[],n=this.isBackward();this.eachRange(function(n){e(n),t.push(n)}),this.removeAllRanges(),n&&1==t.length?this.addRange(t[0],"backward"):this.setRanges(t)},re.containsNode=function(e,t){return this.eachRange(function(n){return n.containsNode(e,t)},!0)||!1},re.getBookmark=function(e){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[e])}},re.moveToBookmark=function(t){for(var n,r,i=[],o=0;n=t.rangeBookmarks[o++];)r=e.createRange(this.win),r.moveToBookmark(n),i.push(r);t.backward?this.setSingleRange(i[0],"backward"):this.setRanges(i)},re.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},re.restoreRanges=function(e){this.removeAllRanges();for(var t,n=0;t=e.ranges[n];++n)this.addRange(t,e.backward&&0==n)},re.toHtml=function(){var e=[];return this.eachRange(function(t){e.push(A.toHtml(t))}),e.join("")},L.implementsTextRange&&(re.getNativeTextRange=function(){var n;if(n=this.docSelection){var r=n.createRange();if(p(r))return r;throw t.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return e.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw t.createError("getNativeTextRange: selection contains no range")}),re.getName=function(){return"WrappedSelection"},re.inspect=function(){return C(this)},re.detach=function(){b(this.win,"delete"),y(this)},m.detachAll=function(){b(null,"deleteAll")},m.inspect=C,m.isDirectionBackward=n,e.Selection=m,e.selectionPrototype=re,e.addShimListener(function(e){"undefined"==typeof e.getSelection&&(e.getSelection=function(){return ne(e)}),e=null})});var j=!1,I=function(e){j||(j=!0,!D.initialized&&D.config.autoInitialize&&f())};return A&&("complete"==document.readyState?I():(e(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",I,!1),L(window,"load",I))),D},this)},function(e,t,n){(function(e){"use strict";e.rangy=n(166),e.rangy=n(184),e.numeral=n(183),n(18),n(179),n(180),n(181),n(185),n(177),n(175),n(176),e._=n(186)}).call(t,function(){return this}())},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function r(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var i=function(r,o,a){a=a||{};var s=e.defer(),l=i[a.animation?"animationEndEventName":"transitionEndEventName"],u=function(e){n.$apply(function(){r.unbind(l,u),s.resolve(r)})};return l&&r.bind(l,u),t(function(){angular.isString(o)?r.addClass(o):angular.isFunction(o)?o(r):angular.isObject(o)&&r.css(o),l||s.resolve(r)}),s.promise.cancel=function(){l&&r.unbind(l,u),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return i.transitionEndEventName=r(a),i.animationEndEventName=r(s),i}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,r){function i(t){function r(){u===i&&(u=void 0)}var i=e(n,t);return u&&u.cancel(),u=i,i.then(r,r),i}function o(){c?(c=!1,a()):(n.removeClass("collapse").addClass("collapsing"),i({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(c)c=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});n[0].offsetWidth;n.removeClass("collapse in").addClass("collapsing"),i({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var u,c=!0;t.$watch(r.collapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(r){var i=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;i&&angular.forEach(this.groups,function(e){e!==r&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,r){r.addGroup(e),e.$watch("isOpen",function(t){t&&r.closeOthers(e)}),e.toggleOpen=function(){e.isDisabled||(e.isOpen=!e.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(e,t,n,r,i){r.setHeading(i(e,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,r){e.$watch(function(){return r[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(e,t){e.closeable="close"in t,this.close=e.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(e){return{require:"alert",link:function(t,n,r,i){e(function(){i.close()},parseInt(r.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(e,t,n,r){var i=r[0],o=r[1];o.$render=function(){t.toggleClass(i.activeClass,angular.equals(o.$modelValue,e.$eval(n.btnRadio)))},t.bind(i.toggleEvent,function(){var r=t.hasClass(i.activeClass);(!r||angular.isDefined(n.uncheckable))&&e.$apply(function(){o.$setViewValue(r?null:e.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(e,t,n,r){function i(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(t,n){var r=e.$eval(t);return angular.isDefined(r)?r:n}var s=r[0],l=r[1];l.$render=function(){t.toggleClass(s.activeClass,angular.equals(l.$modelValue,i()))},t.bind(s.toggleEvent,function(){e.$apply(function(){l.$setViewValue(t.hasClass(s.activeClass)?o():i()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(e,t,n,r){function i(){o();var t=+e.interval;!isNaN(t)&&t>0&&(s=n(a,t))}function o(){s&&(n.cancel(s),s=null)}function a(){var t=+e.interval;l&&!isNaN(t)&&t>0?e.next():e.pause()}var s,l,u=this,c=u.slides=e.slides=[],f=-1;u.currentSlide=null;var d=!1;u.select=e.select=function(n,o){function a(){if(!d){if(u.currentSlide&&angular.isString(o)&&!e.noTransition&&n.$element){n.$element.addClass(o);n.$element[0].offsetWidth;angular.forEach(c,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(u.currentSlide||{},{direction:o,leaving:!0}),e.$currentTransition=r(n.$element,{}),function(t,n){e.$currentTransition.then(function(){s(t,n)},function(){s(t,n)})}(n,u.currentSlide)}else s(n,u.currentSlide);u.currentSlide=n,f=l,i()}}function s(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$currentTransition=null}var l=c.indexOf(n);void 0===o&&(o=l>f?"next":"prev"),n&&n!==u.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(a)):a())},e.$on("$destroy",function(){d=!0}),u.indexOfSlide=function(e){return c.indexOf(e)},e.next=function(){var t=(f+1)%c.length;return e.$currentTransition?void 0:u.select(c[t],"next")},e.prev=function(){var t=0>f-1?c.length-1:f-1;return e.$currentTransition?void 0:u.select(c[t],"prev")},e.isActive=function(e){return u.currentSlide===e},e.$watch("interval",i),e.$on("$destroy",o),e.play=function(){l||(l=!0,i())},e.pause=function(){e.noPause||(l=!1,o())},u.addSlide=function(t,n){t.$element=n,c.push(t),1===c.length||t.active?(u.select(c[c.length-1]),1==c.length&&e.play()):t.active=!1},u.removeSlide=function(e){var t=c.indexOf(e);c.splice(t,1),c.length>0&&e.active?t>=c.length?u.select(c[t-1]):u.select(c[t]):f>t&&f--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(e,t,n,r){r.addSlide(e,t),e.$on("$destroy",function(){r.removeSlide(e)}),e.$watch("active",function(t){t&&r.select(e)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(e,t){function n(e){var n=[],r=e.split("");return angular.forEach(i,function(t,i){var o=e.indexOf(i);if(o>-1){e=e.split(""),r[o]="("+t.regex+")",e[o]="$";for(var a=o+1,s=o+i.length;s>a;a++)r[a]="",e[a]="$";e=e.join(""),n.push({index:o,apply:t.apply})}}),{regex:new RegExp("^"+r.join("")+"$"),map:t(n,"index")}}function r(e,t,n){return 1===t&&n>28?29===n&&(e%4===0&&e%100!==0||e%400===0):3===t||5===t||8===t||10===t?31>n:!0}this.parsers={};var i={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)}},MMM:{regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:e.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:e.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(t,i){if(!angular.isString(t)||!i)return t;i=e.DATETIME_FORMATS[i]||i,this.parsers[i]||(this.parsers[i]=n(i));var o=this.parsers[i],a=o.regex,s=o.map,l=t.match(a);if(l&&l.length){for(var u,c={year:1900,month:0,date:1,hours:0},f=1,d=l.length;d>f;f++){var p=s[f-1];p.apply&&p.apply.call(c,l[f])}return r(c.year,c.month,c.date)&&(u=new Date(c.year,c.month,c.date,c.hours)),u}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function r(e){return"static"===(n(e,"position")||"static")}var i=function(t){for(var n=e[0],i=t.offsetParent||n;i&&i!==n&&r(i);)i=i.offsetParent;return i||n};return{position:function(t){var n=this.offset(t),r={top:0,left:0},o=i(t[0]);o!=e[0]&&(r=this.offset(angular.element(o)),r.top+=o.clientTop-o.scrollTop,r.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-r.top,left:n.left-r.left}},offset:function(n){var r=n[0].getBoundingClientRect();return{width:r.width||n.prop("offsetWidth"),height:r.height||n.prop("offsetHeight"),top:r.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:r.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,r){var i,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";i=r?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var f={center:function(){return i.left+i.width/2-o/2},left:function(){return i.left},right:function(){return i.left+i.width}},d={center:function(){return i.top+i.height/2-a/2},top:function(){return i.top},bottom:function(){return i.top+i.height}};switch(u){case"right":s={top:d[c](),left:f[u]()};break;case"left":s={top:d[c](),left:i.left-o};break;case"bottom":s={top:d[u](),left:f[c]()};break;default:s={top:i.top-a,left:f[c]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(e,t,n,r,i,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,i){l[n]=angular.isDefined(t[n])?8>i?r(t[n])(e.$parent):e.$parent.$eval(t[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(r){t[r]?e.$parent.$watch(n(t[r]),function(e){l[r]=e?new Date(e):null,l.refreshView()}):l[r]=s[r]?new Date(s[r]):null}),e.datepickerMode=e.datepickerMode||s.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(t.initDate)?e.$parent.$eval(t.initDate):new Date,e.isActive=function(t){return 0===l.compare(t.date,l.activeDate)?(e.activeDateId=t.uid,!0):!1},this.init=function(e){u=e,u.$render=function(){l.render()}},this.render=function(){if(u.$modelValue){var e=new Date(u.$modelValue),t=!isNaN(e);t?this.activeDate=e:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),u.$setValidity("date",t)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=u.$modelValue?new Date(u.$modelValue):null;u.$setValidity("date-disabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=u.$modelValue?new Date(u.$modelValue):null;return{date:e,label:a(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===l.minMode){var n=u.$modelValue?new Date(u.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),u.$setViewValue(n),u.$render()}else l.activeDate=t,e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===l.maxMode&&1===t||e.datepickerMode===l.minMode&&-1===t||(e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){i(function(){l.element[0].focus()},0,!1)};e.$on("datepicker.focus",c),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),t.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;e.select(l.activeDate),c()}else!t.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,t),l.refreshView()):(e.toggleMode("up"===n?1:-1),c())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o)}}}).directive("daypicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(t,n,r,i){function o(e,t){return 1!==t||e%4!==0||e%100===0&&e%400!==0?l[t]:29}function a(e,t){var n=new Array(t),r=new Date(e),i=0;for(r.setHours(12);t>i;)n[i++]=new Date(r),r.setDate(r.getDate()+1);return n}function s(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}t.showWeeks=i.showWeeks,i.step={months:1},i.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];i._refreshView=function(){var n=i.activeDate.getFullYear(),r=i.activeDate.getMonth(),o=new Date(n,r,1),l=i.startingDay-o.getDay(),u=l>0?7-l:-l,c=new Date(o);u>0&&c.setDate(-u+1);for(var f=a(c,42),d=0;42>d;d++)f[d]=angular.extend(i.createDateObject(f[d],i.formatDay),{secondary:f[d].getMonth()!==r,uid:t.uniqueId+"-"+d});t.labels=new Array(7);for(var p=0;7>p;p++)t.labels[p]={abbr:e(f[p].date,i.formatDayHeader),full:e(f[p].date,"EEEE")};if(t.title=e(i.activeDate,i.formatDayTitle),t.rows=i.split(f,7),t.showWeeks){t.weekNumbers=[];for(var h=s(t.rows[0][0].date),g=t.rows.length;t.weekNumbers.push(h++)o;o++)n[o]=angular.extend(i.createDateObject(new Date(r,o,1),i.formatMonth),{uid:t.uniqueId+"-"+o});t.title=e(i.activeDate,i.formatMonthTitle),t.rows=i.split(n,3)},i.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},i.handleKeyDown=function(e,t){var n=i.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=3;else if("right"===e)n+=1;else if("down"===e)n+=3;else if("pageup"===e||"pagedown"===e){var r=i.activeDate.getFullYear()+("pageup"===e?-1:1);i.activeDate.setFullYear(r)}else"home"===e?n=0:"end"===e&&(n=11);i.activeDate.setMonth(n)},i.refreshView()}}}]).directive("yearpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(e,t,n,r){function i(e){return parseInt((e-1)/o,10)*o+1}var o=r.yearRange;r.step={years:o},r.element=t,r._refreshView=function(){for(var t=new Array(o),n=0,a=i(r.activeDate.getFullYear());o>n;n++)t[n]=angular.extend(r.createDateObject(new Date(a+n,0,1),r.formatYear),{uid:e.uniqueId+"-"+n});e.title=[t[0].label,t[o-1].label].join(" - "),e.rows=r.split(t,5)},r.compare=function(e,t){return e.getFullYear()-t.getFullYear()},r.handleKeyDown=function(e,t){var n=r.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=5:"right"===e?n+=1:"down"===e?n+=5:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*r.step.years:"home"===e?n=i(r.activeDate.getFullYear()):"end"===e&&(n=i(r.activeDate.getFullYear())+o-1),r.activeDate.setFullYear(n)},r.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(e,t,n,r,i,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,u,c){function f(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function d(e){if(e){if(angular.isDate(e)&&!isNaN(e))return c.$setValidity("date",!0),e;if(angular.isString(e)){var t=o.parse(e,p)||new Date(e);return isNaN(t)?void c.$setValidity("date",!1):(c.$setValidity("date",!0),t)}return void c.$setValidity("date",!1)}return c.$setValidity("date",!0),null}var p,h=angular.isDefined(u.closeOnDateSelection)?s.$parent.$eval(u.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(u.datepickerAppendToBody)?s.$parent.$eval(u.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(u.showButtonBar)?s.$parent.$eval(u.showButtonBar):a.showButtonBar,s.getText=function(e){return s[e+"Text"]||a[e+"Text"]},u.$observe("datepickerPopup",function(e){p=e||a.datepickerPopup,c.$render()});var v=angular.element("
");v.attr({"ng-model":"date","ng-change":"dateSelection()"});var m=angular.element(v.children()[0]);u.datepickerOptions&&angular.forEach(s.$parent.$eval(u.datepickerOptions),function(e,t){m.attr(f(t),e)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(e){if(u[e]){var n=t(u[e]);if(s.$parent.$watch(n,function(t){s.watchData[e]=t}),m.attr(f(e),"watchData."+e),"datepickerMode"===e){var r=n.assign;s.$watch("watchData."+e,function(e,t){e!==t&&r(s.$parent,e)})}}}),u.dateDisabled&&m.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.$parsers.unshift(d),s.dateSelection=function(e){angular.isDefined(e)&&(s.date=e),c.$setViewValue(s.date),c.$render(),h&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=c.$modelValue})}),c.$render=function(){var e=c.$viewValue?i(c.$viewValue,p):"";l.val(e),s.date=d(c.$modelValue)};var y=function(e){s.isOpen&&e.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},b=function(e,t){s.keydown(e)};l.bind("keydown",b),s.keydown=function(e){27===e.which?(e.preventDefault(),e.stopPropagation(),s.close()):40!==e.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(e){e?(s.$broadcast("datepicker.focus"),s.position=g?r.offset(l):r.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",y)):n.unbind("click",y)}),s.select=function(e){if("today"===e){var t=new Date;angular.isDate(c.$modelValue)?(e=new Date(c.$modelValue),e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())):e=new Date(t.setHours(0,0,0,0))}s.dateSelection(e)},s.close=function(){s.isOpen=!1,l[0].focus()};var w=e(v)(s);v.remove(),g?n.find("body").append(w):l.after(w),s.$on("$destroy",function(){w.remove(),l.unbind("keydown",b),n.unbind("click",y)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t,n){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(i){t||(e.bind("click",n),e.bind("keydown",r)),t&&t!==i&&(t.isOpen=!1),t=i},this.close=function(i){t===i&&(t=null,e.unbind("click",n),e.unbind("keydown",r))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},r=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,r,i,o){var a,s=this,l=e.$new(),u=r.openClass,c=angular.noop,f=t.onToggle?n(t.onToggle):angular.noop;this.init=function(r){s.$element=r,t.isOpen&&(a=n(t.isOpen),c=a.assign,e.$watch(a,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(t,n){o[t?"addClass":"removeClass"](s.$element,u),t?(l.focusToggleElement(),i.open(l)):i.close(l),c(e,t),angular.isDefined(t)&&t!==n&&f(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){l.isOpen=!1}),e.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,r){r.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,r){if(r){r.toggleElement=t;var i=function(i){i.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){r.toggle()})};t.bind("click",i),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(r.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",i)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n0),l()})}function l(){if(c&&-1==a()){var e=f;u(c,f,150,function(){e.$destroy(),e=null}),c=void 0,f=void 0}}function u(n,r,i,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}r.animate=!1;var s=e.transitionEndEventName;if(s){var l=t(a,i);n.bind(s,function(){t.cancel(l),a(),r.$apply()})}else t(a)}var c,f,d="modal-open",p=o.createNew(),h={};return i.$watch(a,function(e){f&&(f.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=p.top(),t&&t.value.keyboard&&(e.preventDefault(),i.$apply(function(){h.dismiss(t.key,"escape key press")})))}),h.open=function(e,t){p.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!c){f=i.$new(!0),f.index=s;var l=angular.element("
");l.attr("backdrop-class",t.backdropClass),c=r(l)(f),o.append(c)}var u=angular.element("
");u.attr({"template-url":t.windowTemplateUrl, -"window-class":t.windowClass,size:t.size,index:p.length()-1,animate:"animate"}).html(t.content);var h=r(u)(t.scope);p.top().value.modalDomEl=h,o.append(h),o.addClass(d)},h.close=function(e,t){var n=p.get(e);n&&(n.value.deferred.resolve(t),s(e))},h.dismiss=function(e,t){var n=p.get(e);n&&(n.value.deferred.reject(t),s(e))},h.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},h.getTop=function(){return p.top()},h}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,r,i,o,a,s){function l(e){return e.template?r.when(e.template):i.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:o}).then(function(e){return e.data})}function u(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(r.when(t.invoke(e)))}),n}var c={};return c.open=function(t){var i=r.defer(),o=r.defer(),c={result:i.promise,opened:o.promise,close:function(e){s.close(c,e)},dismiss:function(e){s.dismiss(c,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var f=r.all([l(t)].concat(u(t.resolve)));return f.then(function(e){var r=(t.scope||n).$new();r.$close=c.close,r.$dismiss=c.dismiss;var o,l={},u=1;t.controller&&(l.$scope=r,l.$modalInstance=c,angular.forEach(t.resolve,function(t,n){l[n]=e[u++]}),o=a(t.controller,l),t.controllerAs&&(r[t.controllerAs]=o)),s.open(c,{scope:r,deferred:i,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){i.reject(e)}),f.then(function(){o.resolve(!0)},function(){o.reject(!1)}),c},c}]};return e}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(e,t,n){var r=this,i={$setViewValue:angular.noop},o=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(o,a){i=o,this.config=a,i.$render=function(){r.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){r.itemsPerPage=parseInt(t,10),e.totalPages=r.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(i.$viewValue,10)||1},e.selectPage=function(t){e.page!==t&&t>0&&t<=e.totalPages&&(i.$setViewValue(t),i.$render())},e.getText=function(t){return e[t+"Text"]||r.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages},e.$watch("totalItems",function(){e.totalPages=r.calculateTotalPages()}),e.$watch("totalPages",function(t){o(e.$parent,t),e.page>t?e.selectPage(t):i.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(e,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,r,i,o){function a(e,t,n){return{number:e,text:t,active:n}}function s(e,t){var n=[],r=1,i=t,o=angular.isDefined(c)&&t>c;o&&(f?(r=Math.max(e-Math.floor(c/2),1),i=r+c-1,i>t&&(i=t,r=i-c+1)):(r=(Math.ceil(e/c)-1)*c+1,i=Math.min(r+c-1,t)));for(var s=r;i>=s;s++){var l=a(s,s,s===e);n.push(l)}if(o&&!f){if(r>1){var u=a(r-1,"...",!1);n.unshift(u)}if(t>i){var d=a(i+1,"...",!1);n.push(d)}}return n}var l=o[0],u=o[1];if(u){var c=angular.isDefined(i.maxSize)?n.$parent.$eval(i.maxSize):t.maxSize,f=angular.isDefined(i.rotate)?n.$parent.$eval(i.rotate):t.rotate;n.boundaryLinks=angular.isDefined(i.boundaryLinks)?n.$parent.$eval(i.boundaryLinks):t.boundaryLinks,n.directionLinks=angular.isDefined(i.directionLinks)?n.$parent.$eval(i.directionLinks):t.directionLinks,l.init(u,t),i.maxSize&&n.$parent.$watch(e(i.maxSize),function(e){c=parseInt(e,10),l.render()});var d=l.render;l.render=function(){d(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,r,i){var o=i[0],a=i[1];a&&(t.align=angular.isDefined(r.align)?t.$parent.$eval(r.align):e.align,o.init(a,e))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},r={};this.options=function(e){angular.extend(r,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(i,o,a,s,l,u){return function(i,c,f){function d(e){var t=e||p.trigger||f,r=n[t]||t;return{show:t,hide:r}}var p=angular.extend({},t,r),h=e(i),g=u.startSymbol(),v=u.endSymbol(),m="
';return{restrict:"EA",compile:function(e,t){var n=o(m);return function(e,t,r){function o(){O.isOpen?f():u()}function u(){(!T||e.$eval(r[c+"Enable"]))&&(y(),O.popupDelay?_||(_=a(h,O.popupDelay,!1),_.then(function(e){e()})):h()())}function f(){e.$apply(function(){g()})}function h(){return _=null,E&&(a.cancel(E),E=null),O.content?(v(),x.css({top:0,left:0,display:"block"}),k?s.find("body").append(x):t.after(x),R(),O.isOpen=!0,O.$digest(),R):angular.noop}function g(){O.isOpen=!1,a.cancel(_),_=null,O.animation?E||(E=a(m,500)):m()}function v(){x&&m(),C=O.$new(),x=n(C,angular.noop)}function m(){E=null,x&&(x.remove(),x=null),C&&(C.$destroy(),C=null)}function y(){b(),w()}function b(){var e=r[c+"Placement"];O.placement=angular.isDefined(e)?e:p.placement}function w(){var e=r[c+"PopupDelay"],t=parseInt(e,10);O.popupDelay=isNaN(t)?p.popupDelay:t}function $(){var e=r[c+"Trigger"];A(),S=d(e),S.show===S.hide?t.bind(S.show,o):(t.bind(S.show,u),t.bind(S.hide,f))}var x,C,E,_,k=angular.isDefined(p.appendToBody)?p.appendToBody:!1,S=d(void 0),T=angular.isDefined(r[c+"Enable"]),O=e.$new(!0),R=function(){var e=l.positionElements(t,x,O.placement,k);e.top+="px",e.left+="px",x.css(e)};O.isOpen=!1,r.$observe(i,function(e){O.content=e,!e&&O.isOpen&&g()}),r.$observe("disabled",function(e){e&&O.isOpen&&g()}),r.$observe(c+"Title",function(e){O.title=e});var A=function(){t.unbind(S.show,u),t.unbind(S.hide,f)};$();var M=e.$eval(r[c+"Animation"]);O.animation=angular.isDefined(M)?!!M:p.animation;var D=e.$eval(r[c+"AppendToBody"]);k=angular.isDefined(D)?D:k,k&&e.$on("$locationChangeSuccess",function(){O.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(E),a.cancel(_),A(),m(),O=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(e,t,n){var r=this,i=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max,this.addBar=function(t,n){i||n.css({transition:"none"}),this.bars.push(t),t.$watch("value",function(n){t.percent=+(100*n/e.max).toFixed(2)}),t.$on("$destroy",function(){n=null,r.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,r){r.addBar(e,t)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,r){r.addBar(e,angular.element(t.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(e,t,n){var r={$setViewValue:angular.noop};this.init=function(i){r=i,r.$render=this.render,this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff;var o=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;n>t;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff},e[t]);return e},e.rate=function(t){!e.readonly&&t>=0&&t<=e.range.length&&(r.$setViewValue(t),r.$render())},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=r.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=r.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(t){t.active&&t!==e&&(t.active=!1,t.onDeselect())}),e.active=!0,e.onSelect()},t.addTab=function(e){n.push(e),1===n.length?e.active=!0:e.active&&t.select(e)},t.removeTab=function(e){var i=n.indexOf(e);if(e.active&&n.length>1&&!r){var o=i==n.length-1?i-1:i+1;t.select(n[o])}n.splice(i,1)};var r;e.$on("$destroy",function(){r=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=angular.isDefined(n.vertical)?e.$parent.$eval(n.vertical):!1,e.justified=angular.isDefined(n.justified)?e.$parent.$eval(n.justified):!1}}}).directive("tab",["$parse",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(t,n,r){return function(t,n,i,o){t.$watch("active",function(e){e&&o.select(t)}),t.disabled=!1,i.disabled&&t.$parent.$watch(e(i.disabled),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},o.addTab(t),t.$on("$destroy",function(){o.removeTab(t)}),t.$transcludeFn=r}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t,n,r){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(t,n,r){var i=t.$eval(r.tabContentTransclude);i.$transcludeFn(i.$parent,function(t){angular.forEach(t,function(t){e(t)?i.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(e,t,n,r,i,o){function a(){var t=parseInt(e.hours,10),n=e.showMeridian?t>0&&13>t:t>=0&&24>t;return n?(e.showMeridian&&(12===t&&(t=0),e.meridian===g[1]&&(t+=12)),t):void 0}function s(){var t=parseInt(e.minutes,10);return t>=0&&60>t?t:void 0}function l(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e}function u(e){c(),h.$setViewValue(new Date(p)),f(e)}function c(){h.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function f(t){var n=p.getHours(),r=p.getMinutes();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:l(n),e.minutes="m"===t?r:l(r),e.meridian=p.getHours()<12?g[0]:g[1]}function d(e){var t=new Date(p.getTime()+6e4*e);p.setHours(t.getHours(),t.getMinutes()),u()}var p=new Date,h={$setViewValue:angular.noop},g=angular.isDefined(t.meridians)?e.$parent.$eval(t.meridians):o.meridians||i.DATETIME_FORMATS.AMPMS;this.init=function(n,r){h=n,h.$render=this.render;var i=r.eq(0),a=r.eq(1),s=angular.isDefined(t.mousewheel)?e.$parent.$eval(t.mousewheel):o.mousewheel;s&&this.setupMousewheelEvents(i,a),e.readonlyInput=angular.isDefined(t.readonlyInput)?e.$parent.$eval(t.readonlyInput):o.readonlyInput,this.setupInputEvents(i,a)};var v=o.hourStep;t.hourStep&&e.$parent.$watch(n(t.hourStep),function(e){v=parseInt(e,10)});var m=o.minuteStep;t.minuteStep&&e.$parent.$watch(n(t.minuteStep),function(e){m=parseInt(e,10)}),e.showMeridian=o.showMeridian,t.showMeridian&&e.$parent.$watch(n(t.showMeridian),function(t){if(e.showMeridian=!!t,h.$error.time){var n=a(),r=s();angular.isDefined(n)&&angular.isDefined(r)&&(p.setHours(n),u())}else f()}),this.setupMousewheelEvents=function(t,n){var r=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){e.$apply(r(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){e.$apply(r(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()})},this.setupInputEvents=function(t,n){if(e.readonlyInput)return e.updateHours=angular.noop,void(e.updateMinutes=angular.noop);var r=function(t,n){h.$setViewValue(null),h.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(n)&&(e.invalidMinutes=n)};e.updateHours=function(){var e=a();angular.isDefined(e)?(p.setHours(e),u("h")):r(!0)},t.bind("blur",function(t){!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=l(e.hours)})}),e.updateMinutes=function(){var e=s();angular.isDefined(e)?(p.setMinutes(e),u("m")):r(void 0,!0)},n.bind("blur",function(t){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=l(e.minutes)})})},this.render=function(){var e=h.$modelValue?new Date(h.$modelValue):null;isNaN(e)?(h.$setValidity("time",!1),r.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(p=e),c(),f())},e.incrementHours=function(){d(60*v)},e.decrementHours=function(){d(60*-v)},e.incrementMinutes=function(){d(m)},e.decrementMinutes=function(){d(-m)},e.toggleMeridian=function(){d(720*(p.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var r=n.match(t);if(!r)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:r[3],source:e(r[4]),viewMapper:e(r[2]||r[1]),modelMapper:e(r[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,r,i,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,u,c,f){var d,p=l.$eval(c.typeaheadMinLength)||1,h=l.$eval(c.typeaheadWaitMs)||0,g=l.$eval(c.typeaheadEditable)!==!1,v=t(c.typeaheadLoading).assign||angular.noop,m=t(c.typeaheadOnSelect),y=c.typeaheadInputFormatter?t(c.typeaheadInputFormatter):void 0,b=c.typeaheadAppendToBody?l.$eval(c.typeaheadAppendToBody):!1,w=l.$eval(c.typeaheadFocusFirst)!==!1,$=t(c.ngModel).assign,x=a.parse(c.typeahead),C=l.$new();l.$on("$destroy",function(){C.$destroy()});var E="typeahead-"+C.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":E});var _=angular.element("
");_.attr({id:E,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&_.attr("template-url",c.typeaheadTemplateUrl);var k=function(){C.matches=[],C.activeIdx=-1,u.attr("aria-expanded",!1)},S=function(e){return E+"-option-"+e};C.$watch("activeIdx",function(e){0>e?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",S(e))});var T=function(e){var t={$viewValue:e};v(l,!0),n.when(x.source(l,t)).then(function(n){var r=e===f.$viewValue;if(r&&d)if(n.length>0){C.activeIdx=w?0:-1,C.matches.length=0;for(var i=0;i=p?h>0?(A(),R(e)):T(e):(v(l,!1),A(),k()),g?e:e?void f.$setValidity("editable",!1):(f.$setValidity("editable",!0),e)}),f.$formatters.push(function(e){var t,n,r={};return y?(r.$model=e,y(l,r)):(r[x.itemName]=e,t=x.viewMapper(l,r),r[x.itemName]=void 0,n=x.viewMapper(l,r),t!==n?t:e)}),C.select=function(e){var t,n,i={};i[x.itemName]=n=C.matches[e].model,t=x.modelMapper(l,i),$(l,t),f.$setValidity("editable",!0),m(l,{$item:n,$model:t,$label:x.viewMapper(l,i)}),k(),r(function(){u[0].focus()},0,!1)},u.bind("keydown",function(e){0!==C.matches.length&&-1!==s.indexOf(e.which)&&(-1!=C.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(C.activeIdx=(C.activeIdx+1)%C.matches.length,C.$digest()):38===e.which?(C.activeIdx=(C.activeIdx>0?C.activeIdx:C.matches.length)-1,C.$digest()):13===e.which||9===e.which?C.$apply(function(){C.select(C.activeIdx)}):27===e.which&&(e.stopPropagation(),k(),C.$digest()))}),u.bind("blur",function(e){d=!1});var M=function(e){u[0]!==e.target&&(k(),C.$digest())};i.bind("click",M),l.$on("$destroy",function(){i.unbind("click",M),b&&D.remove()});var D=e(_)(C);b?i.find("body").append(D):u.after(D)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(e,t,n,r){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(i,o,a){var s=r(a.templateUrl)(i.$parent)||"template/typeahead/typeahead-match.html";e.get(s,{cache:t}).success(function(e){o.replaceWith(n(e.trim())(i))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?(""+t).replace(new RegExp(e(n),"gi"),"$&"):t}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'
\n
\n

\n {{heading}}\n

\n
\n
\n
\n
\n
\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'
')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html",'\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html","
\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'
\n \n \n \n
')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{label.abbr}}
{{ weekNumbers[$index] }}\n \n
\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/popup.html",'\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){ +!function(){var e=angular.module("restangular",[]);e.provider("Restangular",function(){var e={};e.init=function(e,t){function n(e,t,n,r){var i={};return _.each(_.keys(r),function(o){var a=r[o];a.params=_.extend({},a.params,e.defaultRequestParams[a.method.toLowerCase()]),_.isEmpty(a.params)&&delete a.params,i[o]=e.isSafe(a.method)?function(){return t(_.extend(a,{url:n}))}:function(e){return t(_.extend(a,{url:n,data:e}))}}),i}e.configuration=t;var r=["get","head","options","trace","getlist"];t.isSafe=function(e){return _.contains(r,e.toLowerCase())};var i=/^https?:\/\//i;t.isAbsoluteUrl=function(e){return _.isUndefined(t.absoluteUrl)||_.isNull(t.absoluteUrl)?e&&i.test(e):t.absoluteUrl},t.absoluteUrl=_.isUndefined(t.absoluteUrl)?!0:t.absoluteUrl,e.setSelfLinkAbsoluteUrl=function(e){t.absoluteUrl=e},t.baseUrl=_.isUndefined(t.baseUrl)?"":t.baseUrl,e.setBaseUrl=function(e){return t.baseUrl=/\/$/.test(e)?e.substring(0,e.length-1):e,this},t.extraFields=t.extraFields||[],e.setExtraFields=function(e){return t.extraFields=e,this},t.defaultHttpFields=t.defaultHttpFields||{},e.setDefaultHttpFields=function(e){return t.defaultHttpFields=e,this},t.withHttpValues=function(e,n){return _.defaults(n,e,t.defaultHttpFields)},t.encodeIds=_.isUndefined(t.encodeIds)?!0:t.encodeIds,e.setEncodeIds=function(e){t.encodeIds=e},t.defaultRequestParams=t.defaultRequestParams||{get:{},post:{},put:{},remove:{},common:{}},e.setDefaultRequestParams=function(e,n){var r=[],i=n||e;return _.isUndefined(n)?r.push("common"):_.isArray(e)?r=e:r.push(e),_.each(r,function(e){t.defaultRequestParams[e]=i}),this},e.requestParams=t.defaultRequestParams,t.defaultHeaders=t.defaultHeaders||{},e.setDefaultHeaders=function(n){return t.defaultHeaders=n,e.defaultHeaders=t.defaultHeaders,this},e.defaultHeaders=t.defaultHeaders,t.methodOverriders=t.methodOverriders||[],e.setMethodOverriders=function(e){var n=_.extend([],e);return t.isOverridenMethod("delete",n)&&n.push("remove"),t.methodOverriders=n,this},t.jsonp=_.isUndefined(t.jsonp)?!1:t.jsonp,e.setJsonp=function(e){t.jsonp=e},t.isOverridenMethod=function(e,n){var r=n||t.methodOverriders;return!_.isUndefined(_.find(r,function(t){return t.toLowerCase()===e.toLowerCase()}))},t.urlCreator=t.urlCreator||"path",e.setUrlCreator=function(e){if(!_.has(t.urlCreatorFactory,e))throw new Error("URL Path selected isn't valid");return t.urlCreator=e,this},t.restangularFields=t.restangularFields||{id:"id",route:"route",parentResource:"parentResource",restangularCollection:"restangularCollection",cannonicalId:"__cannonicalId",etag:"restangularEtag",selfLink:"href",get:"get",getList:"getList",put:"put",post:"post",remove:"remove",head:"head",trace:"trace",options:"options",patch:"patch",getRestangularUrl:"getRestangularUrl",getRequestedUrl:"getRequestedUrl",putElement:"putElement",addRestangularMethod:"addRestangularMethod",getParentList:"getParentList",clone:"clone",ids:"ids",httpConfig:"_$httpConfig",reqParams:"reqParams",one:"one",all:"all",several:"several",oneUrl:"oneUrl",allUrl:"allUrl",customPUT:"customPUT",customPOST:"customPOST",customDELETE:"customDELETE",customGET:"customGET",customGETLIST:"customGETLIST",customOperation:"customOperation",doPUT:"doPUT",doPOST:"doPOST",doDELETE:"doDELETE",doGET:"doGET",doGETLIST:"doGETLIST",fromServer:"fromServer",withConfig:"withConfig",withHttpConfig:"withHttpConfig",singleOne:"singleOne",plain:"plain",save:"save",restangularized:"restangularized"},e.setRestangularFields=function(e){return t.restangularFields=_.extend(t.restangularFields,e),this},t.isRestangularized=function(e){return!!e[t.restangularFields.restangularized]},t.setFieldToElem=function(e,t,n){var r=e.split("."),i=t;return _.each(_.initial(r),function(e){i[e]={},i=i[e]}),i[_.last(r)]=n,this},t.getFieldFromElem=function(e,t){var n=e.split("."),r=t;return _.each(n,function(e){r&&(r=r[e])}),angular.copy(r)},t.setIdToElem=function(e,n){return t.setFieldToElem(t.restangularFields.id,e,n),this},t.getIdFromElem=function(e){return t.getFieldFromElem(t.restangularFields.id,e)},t.isValidId=function(e){return""!==e&&!_.isUndefined(e)&&!_.isNull(e)},t.setUrlToElem=function(e,n){return t.setFieldToElem(t.restangularFields.selfLink,e,n),this},t.getUrlFromElem=function(e){return t.getFieldFromElem(t.restangularFields.selfLink,e)},t.useCannonicalId=_.isUndefined(t.useCannonicalId)?!1:t.useCannonicalId,e.setUseCannonicalId=function(e){return t.useCannonicalId=e,this},t.getCannonicalIdFromElem=function(e){var n=e[t.restangularFields.cannonicalId],r=t.isValidId(n)?n:t.getIdFromElem(e);return r},t.responseInterceptors=t.responseInterceptors||[],t.defaultResponseInterceptor=function(e){return e},t.responseExtractor=function(e,n,r,i,o,a){var s=angular.copy(t.responseInterceptors);s.push(t.defaultResponseInterceptor);var l=e;return _.each(s,function(e){l=e(l,n,r,i,o,a)}),l},e.addResponseInterceptor=function(e){return t.responseInterceptors.push(e),this},t.errorInterceptors=t.errorInterceptors||[],e.addErrorInterceptor=function(e){return t.errorInterceptors.push(e),this},e.setResponseInterceptor=e.addResponseInterceptor,e.setResponseExtractor=e.addResponseInterceptor,e.setErrorInterceptor=e.addErrorInterceptor,t.requestInterceptors=t.requestInterceptors||[],t.defaultInterceptor=function(e,t,n,r,i,o,a){return{element:e,headers:i,params:o,httpConfig:a}},t.fullRequestInterceptor=function(e,n,r,i,o,a,s){var l=angular.copy(t.requestInterceptors),u=t.defaultInterceptor(e,n,r,i,o,a,s);return _.reduce(l,function(e,t){return _.extend(e,t(e.element,n,r,i,e.headers,e.params,e.httpConfig))},u)},e.addRequestInterceptor=function(e){return t.requestInterceptors.push(function(t,n,r,i,o,a,s){return{headers:o,params:a,element:e(t,n,r,i),httpConfig:s}}),this},e.setRequestInterceptor=e.addRequestInterceptor,e.addFullRequestInterceptor=function(e){return t.requestInterceptors.push(e),this},e.setFullRequestInterceptor=e.addFullRequestInterceptor,t.onBeforeElemRestangularized=t.onBeforeElemRestangularized||function(e){return e},e.setOnBeforeElemRestangularized=function(e){return t.onBeforeElemRestangularized=e,this},e.setRestangularizePromiseInterceptor=function(e){return t.restangularizePromiseInterceptor=e,this},t.onElemRestangularized=t.onElemRestangularized||function(e){return e},e.setOnElemRestangularized=function(e){return t.onElemRestangularized=e,this},t.shouldSaveParent=t.shouldSaveParent||function(){return!0},e.setParentless=function(e){return _.isArray(e)?t.shouldSaveParent=function(t){return!_.contains(e,t)}:_.isBoolean(e)&&(t.shouldSaveParent=function(){return!e}),this},t.suffix=_.isUndefined(t.suffix)?null:t.suffix,e.setRequestSuffix=function(e){return t.suffix=e,this},t.transformers=t.transformers||{},e.addElementTransformer=function(n,r,i){var o=null,a=null;2===arguments.length?a=r:(a=i,o=r);var s=t.transformers[n];return s||(s=t.transformers[n]=[]),s.push(function(e,t){return _.isNull(o)||e===o?a(t):t}),e},e.extendCollection=function(t,n){return e.addElementTransformer(t,!0,n)},e.extendModel=function(t,n){return e.addElementTransformer(t,!1,n)},t.transformElem=function(e,n,r,i,o){if(!o&&!t.transformLocalElements&&!e[t.restangularFields.fromServer])return e;var a=t.transformers[r],s=e;return a&&_.each(a,function(e){s=e(n,s)}),t.onElemRestangularized(s,n,r,i)},t.transformLocalElements=_.isUndefined(t.transformLocalElements)?!1:t.transformLocalElements,e.setTransformOnlyServerElements=function(e){t.transformLocalElements=!e},t.fullResponse=_.isUndefined(t.fullResponse)?!1:t.fullResponse,e.setFullResponse=function(e){return t.fullResponse=e,this},t.urlCreatorFactory={};var o=function(){};o.prototype.setConfig=function(e){return this.config=e,this},o.prototype.parentsArray=function(e){for(var t=[];e;)t.push(e),e=e[this.config.restangularFields.parentResource];return t.reverse()},o.prototype.resource=function(e,r,i,o,a,s,l,u){var c=_.defaults(a||{},this.config.defaultRequestParams.common),f=_.defaults(o||{},this.config.defaultHeaders);l&&(t.isSafe(u)?f["If-None-Match"]=l:f["If-Match"]=l);var d=this.base(e);if(s){var p="";/\/$/.test(d)||(p+="/"),p+=s,d+=p}return this.config.suffix&&-1===d.indexOf(this.config.suffix,d.length-this.config.suffix.length)&&!this.config.getUrlFromElem(e)&&(d+=this.config.suffix),e[this.config.restangularFields.httpConfig]=void 0,n(this.config,r,d,{getList:this.config.withHttpValues(i,{method:"GET",params:c,headers:f}),get:this.config.withHttpValues(i,{method:"GET",params:c,headers:f}),jsonp:this.config.withHttpValues(i,{method:"jsonp",params:c,headers:f}),put:this.config.withHttpValues(i,{method:"PUT",params:c,headers:f}),post:this.config.withHttpValues(i,{method:"POST",params:c,headers:f}),remove:this.config.withHttpValues(i,{method:"DELETE",params:c,headers:f}),head:this.config.withHttpValues(i,{method:"HEAD",params:c,headers:f}),trace:this.config.withHttpValues(i,{method:"TRACE",params:c,headers:f}),options:this.config.withHttpValues(i,{method:"OPTIONS",params:c,headers:f}),patch:this.config.withHttpValues(i,{method:"PATCH",params:c,headers:f})})};var a=function(){};a.prototype=new o,a.prototype.normalizeUrl=function(e){var t=/(http[s]?:\/\/)?(.*)?/.exec(e);return t[2]=t[2].replace(/[\\\/]+/g,"/"),"undefined"!=typeof t[1]?t[1]+t[2]:t[2]},a.prototype.base=function(e){var n=this;return _.reduce(this.parentsArray(e),function(e,r){var i,o=n.config.getUrlFromElem(r);if(o){if(n.config.isAbsoluteUrl(o))return o;i=o}else if(i=r[n.config.restangularFields.route],r[n.config.restangularFields.restangularCollection]){var a=r[n.config.restangularFields.ids];a&&(i+="/"+a.join(","))}else{var s;s=n.config.useCannonicalId?n.config.getCannonicalIdFromElem(r):n.config.getIdFromElem(r),t.isValidId(s)&&!r.singleOne&&(i+="/"+(n.config.encodeIds?encodeURIComponent(s):s))}return e=e.replace(/\/$/,"")+"/"+i,n.normalizeUrl(e)},this.config.baseUrl)},a.prototype.fetchUrl=function(e,t){var n=this.base(e);return t&&(n+="/"+t),n},a.prototype.fetchRequestedUrl=function(e,n){function r(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function i(e,t,n){for(var i=r(e),o=0;op;++p)try{P[p](D)}catch(v){f="Rangy init listener threw an exception. Continuing. Detail: "+c(v),a(f)}}}function d(e,t,n){n&&(e+=" in module "+n.name),D.warn("DEPRECATED: "+e+" is deprecated. Please use "+t+" instead.")}function p(e,t,n,r){e[t]=function(){return d(t,n,r),e[n].apply(e,M.toArray(arguments))}}function h(e){e=e||window,f();for(var t=0,n=F.length;n>t;++t)F[t](e)}function g(e,t,n){this.name=e,this.dependencies=t,this.initialized=!1,this.supported=!1,this.initializer=n}function v(e,t,n){var r=new g(e,t,function(t){if(!t.initialized){t.initialized=!0;try{n(D,t),t.supported=!0}catch(r){var i="Module '"+e+"' failed to load: "+c(r);a(i),r.stack&&a(r.stack)}}});return R[e]=r,r}function m(){}function y(){}var b="object",w="function",$="undefined",x=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],C=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],_=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],E=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],k=r(e),S=r(t),T=r(n),O=[].forEach?function(e,t){e.forEach(t)}:function(e,t){for(var n=0,r=e.length;r>n;++n)t(e[n],n)},R={},A=typeof window!=$&&typeof document!=$,M={isHostMethod:e,isHostObject:t,isHostProperty:n,areHostMethods:k,areHostObjects:S,areHostProperties:T,isTextRange:i,getBody:o,forEach:O},D={version:"1.3.0",initialized:!1,isBrowser:A,supported:!0,util:M,features:{},modules:R,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==$?!0:rangyAutoInitialize}};D.fail=l,D.warn=u;var N;({}).hasOwnProperty?(M.extend=N=function(e,t,n){var r,i;for(var o in t)t.hasOwnProperty(o)&&(r=e[o],i=t[o],n&&null!==r&&"object"==typeof r&&null!==i&&"object"==typeof i&&N(r,i,!0),e[o]=i);return t.hasOwnProperty("toString")&&(e.toString=t.toString),e},M.createOptions=function(e,t){var n={};return N(n,t),e&&N(n,e),n}):l("hasOwnProperty not supported"),A||l("Rangy can only run in a browser"),function(){var e;if(A){var t=document.createElement("div");t.appendChild(document.createElement("span"));var n=[].slice;try{1==n.call(t.childNodes,0)[0].nodeType&&(e=function(e){return n.call(e,0)})}catch(r){}}e||(e=function(e){for(var t=[],n=0,r=e.length;r>n;++n)t[n]=e[n];return t}),M.toArray=e}();var L;A&&(e(document,"addEventListener")?L=function(e,t,n){e.addEventListener(t,n,!1)}:e(document,"attachEvent")?L=function(e,t,n){e.attachEvent("on"+t,n)}:l("Document does not have required addEventListener or attachEvent method"),M.addListener=L);var P=[];M.deprecationNotice=d,M.createAliasForDeprecatedMethod=p,D.init=f,D.addInitListener=function(e){D.initialized?e(D):P.push(e)};var F=[];D.addShimListener=function(e){F.push(e)},A&&(D.shim=D.createMissingNativeApi=h,p(D,"createMissingNativeApi","shim")),g.prototype={init:function(){for(var e,t,n=this.dependencies||[],r=0,i=n.length;i>r;++r){if(t=n[r],e=R[t],!(e&&e instanceof g))throw new Error("required module '"+t+"' not found");if(e.init(),!e.supported)throw new Error("required module '"+t+"' not supported")}this.initializer(this)},fail:function(e){throw this.initialized=!0,this.supported=!1,new Error(e)},warn:function(e){D.warn("Module "+this.name+": "+e)},deprecationNotice:function(e,t){D.warn("DEPRECATED: "+e+" in module "+this.name+" is deprecated. Please use "+t+" instead")},createError:function(e){return new Error("Error in Rangy "+this.name+" module: "+e)}},D.createModule=function(e){var t,n;2==arguments.length?(t=arguments[1],n=[]):(t=arguments[2],n=arguments[1]);var r=v(e,n,t);D.initialized&&D.supported&&r.init()},D.createCoreModule=function(e,t,n){v(e,t,n)},D.RangePrototype=m,D.rangePrototype=new m,D.selectionPrototype=new y,D.createCoreModule("DomUtil",[],function(e,t){function n(e){var t;return typeof e.namespaceURI==A||null===(t=e.namespaceURI)||"http://www.w3.org/1999/xhtml"==t}function r(e){var t=e.parentNode;return 1==t.nodeType?t:null}function i(e){for(var t=0;e=e.previousSibling;)++t;return t}function o(e){switch(e.nodeType){case 7:case 10:return 0;case 3:case 8:return e.length;default:return e.childNodes.length}}function a(e,t){var n,r=[];for(n=e;n;n=n.parentNode)r.push(n);for(n=t;n;n=n.parentNode)if(P(r,n))return n;return null}function s(e,t,n){for(var r=n?t:t.parentNode;r;){if(r===e)return!0;r=r.parentNode}return!1}function l(e,t){return s(e,t,!0)}function u(e,t,n){for(var r,i=n?e:e.parentNode;i;){if(r=i.parentNode,r===t)return i;i=r}return null}function c(e){var t=e.nodeType;return 3==t||4==t||8==t}function f(e){if(!e)return!1;var t=e.nodeType;return 3==t||8==t}function d(e,t){var n=t.nextSibling,r=t.parentNode;return n?r.insertBefore(e,n):r.appendChild(e),e}function p(e,t,n){var r=e.cloneNode(!1);if(r.deleteData(0,t),e.deleteData(t,e.length-t),d(r,e),n)for(var o,a=0;o=n[a++];)o.node==e&&o.offset>t?(o.node=r,o.offset-=t):o.node==e.parentNode&&o.offset>i(e)&&++o.offset;return r}function h(e){if(9==e.nodeType)return e;if(typeof e.ownerDocument!=A)return e.ownerDocument;if(typeof e.document!=A)return e.document;if(e.parentNode)return h(e.parentNode);throw t.createError("getDocument: no document found for node")}function g(e){var n=h(e);if(typeof n.defaultView!=A)return n.defaultView;if(typeof n.parentWindow!=A)return n.parentWindow;throw t.createError("Cannot get a window object for node")}function v(e){if(typeof e.contentDocument!=A)return e.contentDocument;if(typeof e.contentWindow!=A)return e.contentWindow.document;throw t.createError("getIframeDocument: No Document object found for iframe element")}function m(e){if(typeof e.contentWindow!=A)return e.contentWindow;if(typeof e.contentDocument!=A)return e.contentDocument.defaultView;throw t.createError("getIframeWindow: No Window object found for iframe element")}function y(e){return e&&M.isHostMethod(e,"setTimeout")&&M.isHostObject(e,"document")}function b(e,t,n){var r;if(e?M.isHostProperty(e,"nodeType")?r=1==e.nodeType&&"iframe"==e.tagName.toLowerCase()?v(e):h(e):y(e)&&(r=e.document):r=document,!r)throw t.createError(n+"(): Parameter must be a Window object or DOM node");return r}function w(e){for(var t;t=e.parentNode;)e=t;return e}function $(e,n,r,o){var s,l,c,f,d;if(e==r)return n===o?0:o>n?-1:1;if(s=u(r,e,!0))return n<=i(s)?-1:1;if(s=u(e,r,!0))return i(s)[index:"+i(e)+",length:"+e.childNodes.length+"]["+(e.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return e.nodeName}function _(e){for(var t,n=h(e).createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n}function E(e,t,n){var r=D(e),i=e.createElement("div");i.contentEditable=""+!!n,t&&(i.innerHTML=t);var o=r.firstChild;return o?r.insertBefore(i,o):r.appendChild(i),i}function k(e){return e.parentNode.removeChild(e)}function S(e){this.root=e,this._next=e}function T(e){return new S(e)}function O(e,t){this.node=e,this.offset=t}function R(e){this.code=this[e],this.codeName=e,this.message="DOMException: "+this.codeName}var A="undefined",M=e.util,D=M.getBody;M.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||t.fail("document missing a Node creation method"),M.isHostMethod(document,"getElementsByTagName")||t.fail("document missing getElementsByTagName method");var N=document.createElement("div");M.areHostMethods(N,["insertBefore","appendChild","cloneNode"]||!M.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"]))||t.fail("Incomplete Element implementation"),M.isHostProperty(N,"innerHTML")||t.fail("Element is missing innerHTML property");var L=document.createTextNode("test");M.areHostMethods(L,["splitText","deleteData","insertData","appendData","cloneNode"]||!M.areHostObjects(N,["previousSibling","nextSibling","childNodes","parentNode"])||!M.areHostProperties(L,["data"]))||t.fail("Incomplete Text Node implementation");var P=function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1},F=!1;!function(){var t=document.createElement("b");t.innerHTML="1";var n=t.firstChild;t.innerHTML="
",F=x(n),e.features.crashyTextNodes=F}();var I;typeof window.getComputedStyle!=A?I=function(e,t){return g(e).getComputedStyle(e,null)[t]}:typeof document.documentElement.currentStyle!=A?I=function(e,t){return e.currentStyle?e.currentStyle[t]:""}:t.fail("No means of obtaining computed style properties found"),S.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var e,t,n=this._current=this._next;if(this._current)if(e=n.firstChild)this._next=e;else{for(t=null;n!==this.root&&!(t=n.nextSibling);)n=n.parentNode;this._next=t}return this._current},detach:function(){this._current=this._next=this.root=null}},O.prototype={equals:function(e){return!!e&&this.node===e.node&&this.offset==e.offset},inspect:function(){return"[DomPosition("+C(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},R.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},R.prototype.toString=function(){return this.message},e.dom={arrayContains:P,isHtmlNamespace:n,parentElement:r,getNodeIndex:i,getNodeLength:o,getCommonAncestor:a,isAncestorOf:s,isOrIsAncestorOf:l,getClosestAncestorIn:u,isCharacterDataNode:c,isTextOrCommentNode:f,insertAfter:d,splitDataNode:p,getDocument:h,getWindow:g,getIframeWindow:m,getIframeDocument:v,getBody:D,isWindow:y,getContentDocument:b,getRootContainer:w,comparePoints:$,isBrokenNode:x,inspectNode:C,getComputedStyleProperty:I,createTestElement:E,removeNode:k,fragmentFromNodeChildren:_,createIterator:T,DomPosition:O +},e.DOMException=R}),D.createCoreModule("DomRange",["DomUtil"],function(e,t){function n(e,t){return 3!=e.nodeType&&(H(e,t.startContainer)||H(e,t.endContainer))}function r(e){return e.document||W(e.startContainer)}function i(e){return K(e.startContainer)}function o(e){return new F(e.parentNode,V(e))}function a(e){return new F(e.parentNode,V(e)+1)}function s(e,t,n){var r=11==e.nodeType?e.firstChild:e;return j(t)?n==t.length?L.insertAfter(e,t):t.parentNode.insertBefore(e,0==n?t:z(t,n)):n>=t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[n]),r}function l(e,t,n){if(E(e),E(t),r(t)!=r(e))throw new I("WRONG_DOCUMENT_ERR");var i=B(e.startContainer,e.startOffset,t.endContainer,t.endOffset),o=B(e.endContainer,e.endOffset,t.startContainer,t.startOffset);return n?0>=i&&o>=0:0>i&&o>0}function u(e){for(var t,n,i,o=r(e.range).createDocumentFragment();n=e.next();){if(t=e.isPartiallySelectedSubtree(),n=n.cloneNode(!t),t&&(i=e.getSubtreeIterator(),n.appendChild(u(i)),i.detach()),10==n.nodeType)throw new I("HIERARCHY_REQUEST_ERR");o.appendChild(n)}return o}function c(e,t,n){var r,i;n=n||{stop:!1};for(var o,a;o=e.next();)if(e.isPartiallySelectedSubtree()){if(t(o)===!1)return void(n.stop=!0);if(a=e.getSubtreeIterator(),c(a,t,n),a.detach(),n.stop)return}else for(r=L.createIterator(o);i=r.next();)if(t(i)===!1)return void(n.stop=!0)}function f(e){for(var t;e.next();)e.isPartiallySelectedSubtree()?(t=e.getSubtreeIterator(),f(t),t.detach()):e.remove()}function d(e){for(var t,n,i=r(e.range).createDocumentFragment();t=e.next();){if(e.isPartiallySelectedSubtree()?(t=t.cloneNode(!1),n=e.getSubtreeIterator(),t.appendChild(d(n)),n.detach()):e.remove(),10==t.nodeType)throw new I("HIERARCHY_REQUEST_ERR");i.appendChild(t)}return i}function p(e,t,n){var r,i=!(!t||!t.length),o=!!n;i&&(r=new RegExp("^("+t.join("|")+")$"));var a=[];return c(new g(e,!1),function(t){if(!(i&&!r.test(t.nodeType)||o&&!n(t))){var s=e.startContainer;if(t!=s||!j(s)||e.startOffset!=s.length){var l=e.endContainer;t==l&&j(l)&&0==e.endOffset||a.push(t)}}}),a}function h(e){var t="undefined"==typeof e.getName?"Range":e.getName();return"["+t+"("+L.inspectNode(e.startContainer)+":"+e.startOffset+", "+L.inspectNode(e.endContainer)+":"+e.endOffset+")]"}function g(e,t){if(this.range=e,this.clonePartiallySelectedTextNodes=t,!e.collapsed){this.sc=e.startContainer,this.so=e.startOffset,this.ec=e.endContainer,this.eo=e.endOffset;var n=e.commonAncestorContainer;this.sc===this.ec&&j(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||j(this.sc)?U(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||j(this.ec)?U(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function v(e){return function(t,n){for(var r,i=n?t:t.parentNode;i;){if(r=i.nodeType,G(e,r))return i;i=i.parentNode}return null}}function m(e,t){if(ie(e,t))throw new I("INVALID_NODE_TYPE_ERR")}function y(e,t){if(!G(t,e.nodeType))throw new I("INVALID_NODE_TYPE_ERR")}function b(e,t){if(0>t||t>(j(e)?e.length:e.childNodes.length))throw new I("INDEX_SIZE_ERR")}function w(e,t){if(ne(e,!0)!==ne(t,!0))throw new I("WRONG_DOCUMENT_ERR")}function $(e){if(re(e,!0))throw new I("NO_MODIFICATION_ALLOWED_ERR")}function x(e,t){if(!e)throw new I(t)}function C(e,t){return t<=(j(e)?e.length:e.childNodes.length)}function _(e){return!!e.startContainer&&!!e.endContainer&&!(Y&&(L.isBrokenNode(e.startContainer)||L.isBrokenNode(e.endContainer)))&&K(e.startContainer)==K(e.endContainer)&&C(e.startContainer,e.startOffset)&&C(e.endContainer,e.endOffset)}function E(e){if(!_(e))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+e.inspect()+")")}function k(e,t){E(e);var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=n===i;j(i)&&o>0&&o0&&r=V(n)&&o++,r=0),e.setStartAndEnd(n,r,i,o)}function S(e){E(e);var t=e.commonAncestorContainer.parentNode.cloneNode(!1);return t.appendChild(e.cloneContents()),t.innerHTML}function T(e){e.START_TO_START=ce,e.START_TO_END=fe,e.END_TO_END=de,e.END_TO_START=pe,e.NODE_BEFORE=he,e.NODE_AFTER=ge,e.NODE_BEFORE_AND_AFTER=ve,e.NODE_INSIDE=me}function O(e){T(e),T(e.prototype)}function R(e,t){return function(){E(this);var n,r,i=this.startContainer,o=this.startOffset,s=this.commonAncestorContainer,l=new g(this,!0);i!==s&&(n=U(i,s,!0),r=a(n),i=r.node,o=r.offset),c(l,$),l.reset();var u=e(l);return l.detach(),t(this,i,o,i,o),u}}function A(t,r){function i(e,t){return function(n){y(n,X),y(K(n),J);var r=(e?o:a)(n);(t?s:l)(this,r.node,r.offset)}}function s(e,t,n){var i=e.endContainer,o=e.endOffset;(t!==e.startContainer||n!==e.startOffset)&&((K(t)!=K(i)||1==B(t,n,i,o))&&(i=t,o=n),r(e,t,n,i,o))}function l(e,t,n){var i=e.startContainer,o=e.startOffset;(t!==e.endContainer||n!==e.endOffset)&&((K(t)!=K(i)||-1==B(t,n,i,o))&&(i=t,o=n),r(e,i,o,t,n))}var u=function(){};u.prototype=e.rangePrototype,t.prototype=new u,P.extend(t.prototype,{setStart:function(e,t){m(e,!0),b(e,t),s(this,e,t)},setEnd:function(e,t){m(e,!0),b(e,t),l(this,e,t)},setStartAndEnd:function(){var e=arguments,t=e[0],n=e[1],i=t,o=n;switch(e.length){case 3:o=e[2];break;case 4:i=e[2],o=e[3]}r(this,t,n,i,o)},setBoundary:function(e,t,n){this["set"+(n?"Start":"End")](e,t)},setStartBefore:i(!0,!0),setStartAfter:i(!1,!0),setEndBefore:i(!0,!1),setEndAfter:i(!1,!1),collapse:function(e){E(this),e?r(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):r(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(e){m(e,!0),r(this,e,0,e,q(e))},selectNode:function(e){m(e,!1),y(e,X);var t=o(e),n=a(e);r(this,t.node,t.offset,n.node,n.offset)},extractContents:R(d,r),deleteContents:R(f,r),canSurroundContents:function(){E(this),$(this.startContainer),$(this.endContainer);var e=new g(this,!0),t=e._first&&n(e._first,this)||e._last&&n(e._last,this);return e.detach(),!t},splitBoundaries:function(){k(this)},splitBoundariesPreservingPositions:function(e){k(this,e)},normalizeBoundaries:function(){E(this);var e,t=this.startContainer,n=this.startOffset,i=this.endContainer,o=this.endOffset,a=function(e){var t=e.nextSibling;t&&t.nodeType==e.nodeType&&(i=e,o=e.length,e.appendData(t.data),Q(t))},s=function(e){var r=e.previousSibling;if(r&&r.nodeType==e.nodeType){t=e;var a=e.length;if(n=r.length,e.insertData(0,r.data),Q(r),t==i)o+=n,i=t;else if(i==e.parentNode){var s=V(e);o==s?(i=e,o=a):o>s&&o--}}},l=!0;if(j(i))o==i.length?a(i):0==o&&(e=i.previousSibling,e&&e.nodeType==i.nodeType&&(o=e.length,t==i&&(l=!1),e.appendData(i.data),Q(i),i=e));else{if(o>0){var u=i.childNodes[o-1];u&&j(u)&&a(u)}l=!this.collapsed}if(l){if(j(t))0==n?s(t):n==t.length&&(e=t.nextSibling,e&&e.nodeType==t.nodeType&&(i==e&&(i=t,o+=t.length),t.appendData(e.data),Q(e)));else if(nx",ae=3==oe.firstChild.nodeType}catch(se){}e.features.htmlParsingConforms=ae;var le=ae?function(e){var t=this.startContainer,n=W(t);if(!t)throw new I("INVALID_STATE_ERR");var r=null;return 1==t.nodeType?r=t:j(t)&&(r=L.parentElement(t)),r=null===r||"HTML"==r.nodeName&&L.isHtmlNamespace(W(r).documentElement)&&L.isHtmlNamespace(r)?n.createElement("body"):r.cloneNode(!1),r.innerHTML=e,L.fragmentFromNodeChildren(r)}:function(e){var t=r(this),n=t.createElement("body");return n.innerHTML=e,L.fragmentFromNodeChildren(n)},ue=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ce=0,fe=1,de=2,pe=3,he=0,ge=1,ve=2,me=3;P.extend(e.rangePrototype,{compareBoundaryPoints:function(e,t){E(this),w(this.startContainer,t.startContainer);var n,r,i,o,a=e==pe||e==ce?"start":"end",s=e==fe||e==ce?"start":"end";return n=this[a+"Container"],r=this[a+"Offset"],i=t[s+"Container"],o=t[s+"Offset"],B(n,r,i,o)},insertNode:function(e){if(E(this),y(e,ee),$(this.startContainer),H(e,this.startContainer))throw new I("HIERARCHY_REQUEST_ERR");var t=s(e,this.startContainer,this.startOffset);this.setStartBefore(t)},cloneContents:function(){E(this);var e,t;if(this.collapsed)return r(this).createDocumentFragment();if(this.startContainer===this.endContainer&&j(this.startContainer))return e=this.startContainer.cloneNode(!0),e.data=e.data.slice(this.startOffset,this.endOffset),t=r(this).createDocumentFragment(),t.appendChild(e),t;var n=new g(this,!0);return e=u(n),n.detach(),e},canSurroundContents:function(){E(this),$(this.startContainer),$(this.endContainer);var e=new g(this,!0),t=e._first&&n(e._first,this)||e._last&&n(e._last,this);return e.detach(),!t},surroundContents:function(e){if(y(e,te),!this.canSurroundContents())throw new I("INVALID_STATE_ERR");var t=this.extractContents();if(e.hasChildNodes())for(;e.lastChild;)e.removeChild(e.lastChild);s(e,this.startContainer,this.startOffset),e.appendChild(t),this.selectNode(e)},cloneRange:function(){E(this);for(var e,t=new N(r(this)),n=ue.length;n--;)e=ue[n],t[e]=this[e];return t},toString:function(){E(this);var e=this.startContainer;if(e===this.endContainer&&j(e))return 3==e.nodeType||4==e.nodeType?e.data.slice(this.startOffset,this.endOffset):"";var t=[],n=new g(this,!0);return c(n,function(e){(3==e.nodeType||4==e.nodeType)&&t.push(e.data)}),n.detach(),t.join("")},compareNode:function(e){E(this);var t=e.parentNode,n=V(e);if(!t)throw new I("NOT_FOUND_ERR");var r=this.comparePoint(t,n),i=this.comparePoint(t,n+1);return 0>r?i>0?ve:he:i>0?ge:me},comparePoint:function(e,t){return E(this),x(e,"HIERARCHY_REQUEST_ERR"),w(e,this.startContainer),B(e,t,this.startContainer,this.startOffset)<0?-1:B(e,t,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:le,toHtml:function(){return S(this)},intersectsNode:function(e,t){if(E(this),K(e)!=i(this))return!1;var n=e.parentNode,r=V(e);if(!n)return!0;var o=B(n,r,this.endContainer,this.endOffset),a=B(n,r+1,this.startContainer,this.startOffset);return t?0>=o&&a>=0:0>o&&a>0},isPointInRange:function(e,t){return E(this),x(e,"HIERARCHY_REQUEST_ERR"),w(e,this.startContainer),B(e,t,this.startContainer,this.startOffset)>=0&&B(e,t,this.endContainer,this.endOffset)<=0},intersectsRange:function(e){return l(this,e,!1)},intersectsOrTouchesRange:function(e){return l(this,e,!0)},intersection:function(e){if(this.intersectsRange(e)){var t=B(this.startContainer,this.startOffset,e.startContainer,e.startOffset),n=B(this.endContainer,this.endOffset,e.endContainer,e.endOffset),r=this.cloneRange();return-1==t&&r.setStart(e.startContainer,e.startOffset),1==n&&r.setEnd(e.endContainer,e.endOffset),r}return null},union:function(e){if(this.intersectsOrTouchesRange(e)){var t=this.cloneRange();return-1==B(e.startContainer,e.startOffset,this.startContainer,this.startOffset)&&t.setStart(e.startContainer,e.startOffset),1==B(e.endContainer,e.endOffset,this.endContainer,this.endOffset)&&t.setEnd(e.endContainer,e.endOffset),t}throw new I("Ranges do not intersect")},containsNode:function(e,t){return t?this.intersectsNode(e,!1):this.compareNode(e)==me},containsNodeContents:function(e){return this.comparePoint(e,0)>=0&&this.comparePoint(e,q(e))<=0},containsRange:function(e){var t=this.intersection(e);return null!==t&&e.equals(t)},containsNodeText:function(e){var t=this.cloneRange();t.selectNode(e);var n=t.getNodes([3]);if(n.length>0){t.setStart(n[0],0);var r=n.pop();return t.setEnd(r,r.length),this.containsRange(t)}return this.containsNodeContents(e)},getNodes:function(e,t){return E(this),p(this,e,t)},getDocument:function(){return r(this)},collapseBefore:function(e){this.setEndBefore(e),this.collapse(!1)},collapseAfter:function(e){this.setStartAfter(e),this.collapse(!0)},getBookmark:function(t){var n=r(this),i=e.createRange(n);t=t||L.getBody(n),i.selectNodeContents(t);var o=this.intersection(i),a=0,s=0;return o&&(i.setEnd(o.startContainer,o.startOffset),a=i.toString().length,s=a+o.toString().length),{start:a,end:s,containerNode:t}},moveToBookmark:function(e){var t=e.containerNode,n=0;this.setStart(t,0),this.collapse(!0);for(var r,i,o,a,s=[t],l=!1,u=!1;!u&&(r=s.pop());)if(3==r.nodeType)i=n+r.length,!l&&e.start>=n&&e.start<=i&&(this.setStart(r,e.start-n),l=!0),l&&e.end>=n&&e.end<=i&&(this.setEnd(r,e.end-n),u=!0),n=i;else for(a=r.childNodes,o=a.length;o--;)s.push(a[o])},getName:function(){return"DomRange"},equals:function(e){return N.rangesEqual(this,e)},isValid:function(){return _(this)},inspect:function(){return h(this)},detach:function(){}}),A(N,D),P.extend(N,{rangeProperties:ue,RangeIterator:g,copyComparisonConstants:O,createPrototypeRange:A,inspect:h,toHtml:S,getRangeDocument:r,rangesEqual:function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}}),e.DomRange=N}),D.createCoreModule("WrappedRange",["DomRange"],function(e,t){var n,r,i=e.dom,o=e.util,a=i.DomPosition,s=e.DomRange,l=i.getBody,u=i.getContentDocument,c=i.isCharacterDataNode;if(e.features.implementsDomRange&&!function(){function r(e){for(var t,n=d.length;n--;)t=d[n],e[t]=e.nativeRange[t];e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset}function a(e,t,n,r,i){var o=e.startContainer!==t||e.startOffset!=n,a=e.endContainer!==r||e.endOffset!=i,s=!e.equals(e.nativeRange);(o||a||s)&&(e.setEnd(r,i),e.setStart(t,n))}var c,f,d=s.rangeProperties;n=function(e){if(!e)throw t.createError("WrappedRange: Range must be specified");this.nativeRange=e,r(this)},s.createPrototypeRange(n,a),c=n.prototype,c.selectNode=function(e){this.nativeRange.selectNode(e),r(this)},c.cloneContents=function(){return this.nativeRange.cloneContents()},c.surroundContents=function(e){this.nativeRange.surroundContents(e),r(this)},c.collapse=function(e){this.nativeRange.collapse(e),r(this)},c.cloneRange=function(){return new n(this.nativeRange.cloneRange())},c.refresh=function(){r(this)},c.toString=function(){return this.nativeRange.toString()};var p=document.createTextNode("test");l(document).appendChild(p);var h=document.createRange();h.setStart(p,0),h.setEnd(p,0);try{h.setStart(p,1),c.setStart=function(e,t){this.nativeRange.setStart(e,t),r(this)},c.setEnd=function(e,t){this.nativeRange.setEnd(e,t),r(this)},f=function(e){return function(t){this.nativeRange[e](t),r(this)}}}catch(g){c.setStart=function(e,t){try{this.nativeRange.setStart(e,t)}catch(n){this.nativeRange.setEnd(e,t),this.nativeRange.setStart(e,t)}r(this)},c.setEnd=function(e,t){try{this.nativeRange.setEnd(e,t)}catch(n){this.nativeRange.setStart(e,t),this.nativeRange.setEnd(e,t)}r(this)},f=function(e,t){return function(n){try{this.nativeRange[e](n)}catch(i){this.nativeRange[t](n),this.nativeRange[e](n)}r(this)}}}c.setStartBefore=f("setStartBefore","setEndBefore"),c.setStartAfter=f("setStartAfter","setEndAfter"),c.setEndBefore=f("setEndBefore","setStartBefore"),c.setEndAfter=f("setEndAfter","setStartAfter"),c.selectNodeContents=function(e){this.setStartAndEnd(e,0,i.getNodeLength(e))},h.selectNodeContents(p),h.setEnd(p,3);var v=document.createRange();v.selectNodeContents(p),v.setEnd(p,4),v.setStart(p,2),-1==h.compareBoundaryPoints(h.START_TO_END,v)&&1==h.compareBoundaryPoints(h.END_TO_START,v)?c.compareBoundaryPoints=function(e,t){return t=t.nativeRange||t,e==t.START_TO_END?e=t.END_TO_START:e==t.END_TO_START&&(e=t.START_TO_END),this.nativeRange.compareBoundaryPoints(e,t)}:c.compareBoundaryPoints=function(e,t){return this.nativeRange.compareBoundaryPoints(e,t.nativeRange||t)};var m=document.createElement("div");m.innerHTML="123";var y=m.firstChild,b=l(document);b.appendChild(m),h.setStart(y,1),h.setEnd(y,2),h.deleteContents(),"13"==y.data&&(c.deleteContents=function(){this.nativeRange.deleteContents(),r(this)},c.extractContents=function(){var e=this.nativeRange.extractContents();return r(this),e}),b.removeChild(m),b=null,o.isHostMethod(h,"createContextualFragment")&&(c.createContextualFragment=function(e){return this.nativeRange.createContextualFragment(e)}),l(document).removeChild(p),c.getName=function(){return"WrappedRange"},e.WrappedRange=n,e.createNativeRange=function(e){return e=u(e,t,"createNativeRange"),e.createRange()}}(),e.features.implementsTextRange){var f=function(e){var t=e.parentElement(),n=e.duplicate();n.collapse(!0);var r=n.parentElement();n=e.duplicate(),n.collapse(!1);var o=n.parentElement(),a=r==o?r:i.getCommonAncestor(r,o);return a==t?a:i.getCommonAncestor(t,a)},d=function(e){return 0==e.compareEndPoints("StartToEnd",e)},p=function(e,t,n,r,o){var s=e.duplicate();s.collapse(n);var l=s.parentElement();if(i.isOrIsAncestorOf(t,l)||(l=t),!l.canHaveHTML){var u=new a(l.parentNode,i.getNodeIndex(l));return{boundaryPosition:u,nodeInfo:{nodeIndex:u.offset,containerElement:u.node}}}var f=i.getDocument(l).createElement("span");f.parentNode&&i.removeNode(f);for(var d,p,h,g,v,m=n?"StartToStart":"StartToEnd",y=o&&o.containerElement==l?o.nodeIndex:0,b=l.childNodes.length,w=b,$=w;;){if($==b?l.appendChild(f):l.insertBefore(f,l.childNodes[$]),s.moveToElementText(f),d=s.compareEndPoints(m,e),0==d||y==w)break;if(-1==d){if(w==y+1)break;y=$}else w=w==y+1?y:$;$=Math.floor((y+w)/2),l.removeChild(f)}if(v=f.nextSibling,-1==d&&v&&c(v)){s.setEndPoint(n?"EndToStart":"EndToEnd",e);var x;if(/[\r\n]/.test(v.data)){var C=s.duplicate(),_=C.text.replace(/\r\n/g,"\r").length;for(x=C.moveStart("character",_);-1==(d=C.compareEndPoints("StartToEnd",C));)x++,C.moveStart("character",1)}else x=s.text.length;g=new a(v,x)}else p=(r||!n)&&f.previousSibling,h=(r||n)&&f.nextSibling,g=h&&c(h)?new a(h,0):p&&c(p)?new a(p,p.data.length):new a(l,i.getNodeIndex(f));return i.removeNode(f),{boundaryPosition:g,nodeInfo:{nodeIndex:$,containerElement:l}}},h=function(e,t){var n,r,o,a,s=e.offset,u=i.getDocument(e.node),f=l(u).createTextRange(),d=c(e.node);return d?(n=e.node,r=n.parentNode):(a=e.node.childNodes,n=st;++t)if(!T.isAncestorOf(e[0],e[t]))return!1;return!0}function d(e){var n=e.getNodes();if(!f(n))throw t.createError("getSingleElementFromRange: range "+e.inspect()+" did not consist of a single element");return n[0]}function p(e){return!!e&&"undefined"!=typeof e.text}function h(e,t){var n=new M(t);e._ranges=[n],s(e,n,!1),e.rangeCount=1,e.isCollapsed=n.collapsed}function g(t){if(t._ranges.length=0,"None"==t.docSelection.type)u(t);else{var n=t.docSelection.createRange();if(p(n))h(t,n);else{t.rangeCount=n.length;for(var r,i=F(n.item(0)),o=0;os;++s)a.add(r.item(s));try{a.add(i)}catch(u){throw t.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}a.select(),g(e)}function m(e,t,n){this.nativeSelection=e,this.docSelection=t,this._ranges=[],this.win=n,this.refresh()}function y(e){e.win=e.anchorNode=e.focusNode=e._ranges=null,e.rangeCount=e.anchorOffset=e.focusOffset=0,e.detached=!0}function b(e,t){for(var n,r,i=te.length;i--;)if(n=te[i],r=n.selection,"deleteAll"==t)y(r);else if(n.win==e)return"delete"==t?(te.splice(i,1),!0):r;return"deleteAll"==t&&(te.length=0),null}function w(e,n){for(var r,i=F(n[0].startContainer),o=I(i).createControlRange(),a=0,s=n.length;s>a;++a){r=d(n[a]);try{o.add(r)}catch(l){throw t.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}o.select(),g(e)}function $(e,t){if(e.win.document!=F(t))throw new D("WRONG_DOCUMENT_ERR")}function x(t){return function(n,r){var i;this.rangeCount?(i=this.getRangeAt(0),i["set"+(t?"Start":"End")](n,r)):(i=e.createRange(this.win.document),i.setStartAndEnd(n,r)),this.setSingleRange(i,this.isBackward())}}function C(e){var t=[],n=new N(e.anchorNode,e.anchorOffset),r=new N(e.focusNode,e.focusOffset),i="function"==typeof e.getName?e.getName():"Selection";if("undefined"!=typeof e.rangeCount)for(var o=0,a=e.rangeCount;a>o;++o)t[o]=A.inspect(e.getRangeAt(o));return"["+i+"(Ranges: "+t.join(", ")+")(anchor: "+n.inspect()+", focus: "+r.inspect()+"]"}e.config.checkSelectionRanges=!0;var _,E,k="boolean",S="number",T=e.dom,O=e.util,R=O.isHostMethod,A=e.DomRange,M=e.WrappedRange,D=e.DOMException,N=T.DomPosition,L=e.features,P="Control",F=T.getDocument,I=T.getBody,j=A.rangesEqual,V=R(window,"getSelection"),H=O.isHostObject(document,"selection");L.implementsWinGetSelection=V,L.implementsDocSelection=H;var W=H&&(!V||e.config.preferTextRange);if(W)_=o,e.isSelectionValid=function(e){var t=r(e,"isSelectionValid").document,n=t.selection;return"None"!=n.type||F(n.createRange().parentElement())==t};else{if(!V)return t.fail("Neither document.selection or window.getSelection() detected."),!1;_=i,e.isSelectionValid=function(){return!0}}e.getNativeSelection=_;var B=_();if(!B)return t.fail("Native selection was null (possibly issue 138?)"),!1;var z=e.createNativeRange(document),U=I(document),q=O.areHostProperties(B,["anchorNode","focusNode","anchorOffset","focusOffset"]);L.selectionHasAnchorAndFocus=q;var G=R(B,"extend");L.selectionHasExtend=G;var K=typeof B.rangeCount==S;L.selectionHasRangeCount=K;var Y=!1,Q=!0,X=G?function(t,n){var r=A.getRangeDocument(n),i=e.createRange(r);i.collapseToPoint(n.endContainer,n.endOffset),t.addRange(c(i)),t.extend(n.startContainer,n.startOffset)}:null;O.areHostMethods(B,["addRange","getRangeAt","removeAllRanges"])&&typeof B.rangeCount==S&&L.implementsDomRange&&!function(){var t=window.getSelection();if(t){for(var n=t.rangeCount,r=n>1,i=[],o=a(t),s=0;n>s;++s)i[s]=t.getRangeAt(s);var l=T.createTestElement(document,"",!1),u=l.appendChild(document.createTextNode("   ")),c=document.createRange();if(c.setStart(u,1),c.collapse(!0),t.removeAllRanges(),t.addRange(c),Q=1==t.rangeCount,t.removeAllRanges(),!r){var f=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(f&&parseInt(f[1])>=36)Y=!1;else{var d=c.cloneRange();c.setStart(u,0),d.setEnd(u,3),d.setStart(u,2),t.addRange(c),t.addRange(d),Y=2==t.rangeCount}}for(T.removeNode(l),t.removeAllRanges(),s=0;n>s;++s)0==s&&o?X?X(t,i[s]):(e.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),t.addRange(i[s])):t.addRange(i[s])}}(),L.selectionSupportsMultipleRanges=Y,L.collapsedNonEditableSelectionsSupported=Q;var J,Z=!1;U&&R(U,"createControlRange")&&(J=U.createControlRange(),O.areHostProperties(J,["item","add"])&&(Z=!0)),L.implementsControlRange=Z,E=q?function(e){return e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset}:function(e){return e.rangeCount?e.getRangeAt(e.rangeCount-1).collapsed:!1};var ee;R(B,"getRangeAt")?ee=function(e,t){try{return e.getRangeAt(t)}catch(n){return null}}:q&&(ee=function(t){var n=F(t.anchorNode),r=e.createRange(n);return r.setStartAndEnd(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),r.collapsed!==this.isCollapsed&&r.setStartAndEnd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset),r}),m.prototype=e.selectionPrototype;var te=[],ne=function(e){if(e&&e instanceof m)return e.refresh(),e;e=r(e,"getNativeSelection");var t=b(e),n=_(e),i=H?o(e):null;return t?(t.nativeSelection=n,t.docSelection=i,t.refresh()):(t=new m(n,i,e),te.push({win:e,selection:t})),t};e.getSelection=ne,O.createAliasForDeprecatedMethod(e,"getIframeSelection","getSelection");var re=m.prototype;if(!W&&q&&O.areHostMethods(B,["removeAllRanges","addRange"])){re.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),u(this)};var ie=function(e,t){X(e.nativeSelection,t),e.refresh()};K?re.addRange=function(t,r){if(Z&&H&&this.docSelection.type==P)v(this,t);else if(n(r)&&G)ie(this,t);else{var i;Y?i=this.rangeCount:(this.removeAllRanges(),i=0);var o=c(t).cloneRange();try{this.nativeSelection.addRange(o)}catch(a){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==i+1){if(e.config.checkSelectionRanges){var l=ee(this.nativeSelection,this.rangeCount-1);l&&!j(l,t)&&(t=new M(l))}this._ranges[this.rangeCount-1]=t,s(this,t,se(this.nativeSelection)),this.isCollapsed=E(this)}else this.refresh()}}:re.addRange=function(e,t){n(t)&&G?ie(this,e):(this.nativeSelection.addRange(c(e)),this.refresh())},re.setRanges=function(e){if(Z&&H&&e.length>1)w(this,e);else{this.removeAllRanges();for(var t=0,n=e.length;n>t;++t)this.addRange(e[t])}}}else{if(!(R(B,"empty")&&R(z,"select")&&Z&&W))return t.fail("No means of selecting a Range or TextRange was found"),!1;re.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var e;if(this.anchorNode)e=F(this.anchorNode);else if(this.docSelection.type==P){var t=this.docSelection.createRange();t.length&&(e=F(t.item(0)))}if(e){var n=I(e).createTextRange();n.select(),this.docSelection.empty()}}}catch(r){}u(this)},re.addRange=function(t){this.docSelection.type==P?v(this,t):(e.WrappedTextRange.rangeToTextRange(t).select(),this._ranges[0]=t,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,s(this,t,!1))},re.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?w(this,e):t&&this.addRange(e[0])}}re.getRangeAt=function(e){if(0>e||e>=this.rangeCount)throw new D("INDEX_SIZE_ERR");return this._ranges[e].cloneRange()};var oe;if(W)oe=function(t){var n;e.isSelectionValid(t.win)?n=t.docSelection.createRange():(n=I(t.win.document).createTextRange(),n.collapse(!0)),t.docSelection.type==P?g(t):p(n)?h(t,n):u(t)};else if(R(B,"getRangeAt")&&typeof B.rangeCount==S)oe=function(t){if(Z&&H&&t.docSelection.type==P)g(t);else if(t._ranges.length=t.rangeCount=t.nativeSelection.rangeCount,t.rangeCount){for(var n=0,r=t.rangeCount;r>n;++n)t._ranges[n]=new e.WrappedRange(t.nativeSelection.getRangeAt(n));s(t,t._ranges[t.rangeCount-1],se(t.nativeSelection)),t.isCollapsed=E(t)}else u(t)};else{if(!q||typeof B.isCollapsed!=k||typeof z.collapsed!=k||!L.implementsDomRange)return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;oe=function(e){var t,n=e.nativeSelection;n.anchorNode?(t=ee(n,0),e._ranges=[t],e.rangeCount=1,l(e),e.isCollapsed=E(e)):u(e)}}re.refresh=function(e){var t=e?this._ranges.slice(0):null,n=this.anchorNode,r=this.anchorOffset;if(oe(this),e){var i=t.length;if(i!=this._ranges.length)return!0;if(this.anchorNode!=n||this.anchorOffset!=r)return!0;for(;i--;)if(!j(t[i],this._ranges[i]))return!0;return!1}};var ae=function(e,t){var n=e.getAllRanges();e.removeAllRanges();for(var r=0,i=n.length;i>r;++r)j(t,n[r])||e.addRange(n[r]);e.rangeCount||u(e)};Z&&H?re.removeRange=function(e){if(this.docSelection.type==P){for(var t,n=this.docSelection.createRange(),r=d(e),i=F(n.item(0)),o=I(i).createControlRange(),a=!1,s=0,l=n.length;l>s;++s)t=n.item(s), +t!==r||a?o.add(n.item(s)):a=!0;o.select(),g(this)}else ae(this,e)}:re.removeRange=function(e){ae(this,e)};var se;!W&&q&&L.implementsDomRange?(se=a,re.isBackward=function(){return se(this)}):se=re.isBackward=function(){return!1},re.isBackwards=re.isBackward,re.toString=function(){for(var e=[],t=0,n=this.rangeCount;n>t;++t)e[t]=""+this._ranges[t];return e.join("")},re.collapse=function(t,n){$(this,t);var r=e.createRange(t);r.collapseToPoint(t,n),this.setSingleRange(r),this.isCollapsed=!0},re.collapseToStart=function(){if(!this.rangeCount)throw new D("INVALID_STATE_ERR");var e=this._ranges[0];this.collapse(e.startContainer,e.startOffset)},re.collapseToEnd=function(){if(!this.rangeCount)throw new D("INVALID_STATE_ERR");var e=this._ranges[this.rangeCount-1];this.collapse(e.endContainer,e.endOffset)},re.selectAllChildren=function(t){$(this,t);var n=e.createRange(t);n.selectNodeContents(t),this.setSingleRange(n)},re.deleteFromDocument=function(){if(Z&&H&&this.docSelection.type==P){for(var e,t=this.docSelection.createRange();t.length;)e=t.item(0),t.remove(e),T.removeNode(e);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();if(n.length){this.removeAllRanges();for(var r=0,i=n.length;i>r;++r)n[r].deleteContents();this.addRange(n[i-1])}}},re.eachRange=function(e,t){for(var n=0,r=this._ranges.length;r>n;++n)if(e(this.getRangeAt(n)))return t},re.getAllRanges=function(){var e=[];return this.eachRange(function(t){e.push(t)}),e},re.setSingleRange=function(e,t){this.removeAllRanges(),this.addRange(e,t)},re.callMethodOnEachRange=function(e,t){var n=[];return this.eachRange(function(r){n.push(r[e].apply(r,t||[]))}),n},re.setStart=x(!0),re.setEnd=x(!1),e.rangePrototype.select=function(e){ne(this.getDocument()).setSingleRange(this,e)},re.changeEachRange=function(e){var t=[],n=this.isBackward();this.eachRange(function(n){e(n),t.push(n)}),this.removeAllRanges(),n&&1==t.length?this.addRange(t[0],"backward"):this.setRanges(t)},re.containsNode=function(e,t){return this.eachRange(function(n){return n.containsNode(e,t)},!0)||!1},re.getBookmark=function(e){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[e])}},re.moveToBookmark=function(t){for(var n,r,i=[],o=0;n=t.rangeBookmarks[o++];)r=e.createRange(this.win),r.moveToBookmark(n),i.push(r);t.backward?this.setSingleRange(i[0],"backward"):this.setRanges(i)},re.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},re.restoreRanges=function(e){this.removeAllRanges();for(var t,n=0;t=e.ranges[n];++n)this.addRange(t,e.backward&&0==n)},re.toHtml=function(){var e=[];return this.eachRange(function(t){e.push(A.toHtml(t))}),e.join("")},L.implementsTextRange&&(re.getNativeTextRange=function(){var n;if(n=this.docSelection){var r=n.createRange();if(p(r))return r;throw t.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return e.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw t.createError("getNativeTextRange: selection contains no range")}),re.getName=function(){return"WrappedSelection"},re.inspect=function(){return C(this)},re.detach=function(){b(this.win,"delete"),y(this)},m.detachAll=function(){b(null,"deleteAll")},m.inspect=C,m.isDirectionBackward=n,e.Selection=m,e.selectionPrototype=re,e.addShimListener(function(e){"undefined"==typeof e.getSelection&&(e.getSelection=function(){return ne(e)}),e=null})});var I=!1,j=function(e){I||(I=!0,!D.initialized&&D.config.autoInitialize&&f())};return A&&("complete"==document.readyState?j():(e(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",j,!1),L(window,"load",j))),D},this)},function(e,t,n){(function(e){"use strict";e.rangy=n(166),e.rangy=n(184),e.numeral=n(183),n(18),n(179),n(180),n(181),n(185),n(177),n(175),n(176),e._=n(186)}).call(t,function(){return this}())},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function r(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var i=function(r,o,a){a=a||{};var s=e.defer(),l=i[a.animation?"animationEndEventName":"transitionEndEventName"],u=function(e){n.$apply(function(){r.unbind(l,u),s.resolve(r)})};return l&&r.bind(l,u),t(function(){angular.isString(o)?r.addClass(o):angular.isFunction(o)?o(r):angular.isObject(o)&&r.css(o),l||s.resolve(r)}),s.promise.cancel=function(){l&&r.unbind(l,u),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return i.transitionEndEventName=r(a),i.animationEndEventName=r(s),i}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,r){function i(t){function r(){u===i&&(u=void 0)}var i=e(n,t);return u&&u.cancel(),u=i,i.then(r,r),i}function o(){c?(c=!1,a()):(n.removeClass("collapse").addClass("collapsing"),i({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(c)c=!1,l(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});n[0].offsetWidth;n.removeClass("collapse in").addClass("collapsing"),i({height:0}).then(l)}}function l(){n.removeClass("collapsing"),n.addClass("collapse")}var u,c=!0;t.$watch(r.collapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(e,t,n){this.groups=[],this.closeOthers=function(r){var i=angular.isDefined(t.closeOthers)?e.$eval(t.closeOthers):n.closeOthers;i&&angular.forEach(this.groups,function(e){e!==r&&(e.isOpen=!1)})},this.addGroup=function(e){var t=this;this.groups.push(e),e.$on("$destroy",function(n){t.removeGroup(e)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(e,t,n,r){r.addGroup(e),e.$watch("isOpen",function(t){t&&r.closeOthers(e)}),e.toggleOpen=function(){e.isDisabled||(e.isOpen=!e.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(e,t,n,r,i){r.setHeading(i(e,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(e,t,n,r){e.$watch(function(){return r[n.accordionTransclude]},function(e){e&&(t.html(""),t.append(e))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(e,t){e.closeable="close"in t,this.close=e.close}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}).directive("dismissOnTimeout",["$timeout",function(e){return{require:"alert",link:function(t,n,r,i){e(function(){i.close()},parseInt(r.dismissOnTimeout,10))}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(e,t,n,r){var i=r[0],o=r[1];o.$render=function(){t.toggleClass(i.activeClass,angular.equals(o.$modelValue,e.$eval(n.btnRadio)))},t.bind(i.toggleEvent,function(){var r=t.hasClass(i.activeClass);(!r||angular.isDefined(n.uncheckable))&&e.$apply(function(){o.$setViewValue(r?null:e.$eval(n.btnRadio)),o.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(e,t,n,r){function i(){return a(n.btnCheckboxTrue,!0)}function o(){return a(n.btnCheckboxFalse,!1)}function a(t,n){var r=e.$eval(t);return angular.isDefined(r)?r:n}var s=r[0],l=r[1];l.$render=function(){t.toggleClass(s.activeClass,angular.equals(l.$modelValue,i()))},t.bind(s.toggleEvent,function(){e.$apply(function(){l.$setViewValue(t.hasClass(s.activeClass)?o():i()),l.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$interval","$transition",function(e,t,n,r){function i(){o();var t=+e.interval;!isNaN(t)&&t>0&&(s=n(a,t))}function o(){s&&(n.cancel(s),s=null)}function a(){var t=+e.interval;l&&!isNaN(t)&&t>0?e.next():e.pause()}var s,l,u=this,c=u.slides=e.slides=[],f=-1;u.currentSlide=null;var d=!1;u.select=e.select=function(n,o){function a(){if(!d){if(u.currentSlide&&angular.isString(o)&&!e.noTransition&&n.$element){n.$element.addClass(o);n.$element[0].offsetWidth;angular.forEach(c,function(e){angular.extend(e,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(n,{direction:o,active:!0,entering:!0}),angular.extend(u.currentSlide||{},{direction:o,leaving:!0}),e.$currentTransition=r(n.$element,{}),function(t,n){e.$currentTransition.then(function(){s(t,n)},function(){s(t,n)})}(n,u.currentSlide)}else s(n,u.currentSlide);u.currentSlide=n,f=l,i()}}function s(t,n){angular.extend(t,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(n||{},{direction:"",active:!1,leaving:!1,entering:!1}),e.$currentTransition=null}var l=c.indexOf(n);void 0===o&&(o=l>f?"next":"prev"),n&&n!==u.currentSlide&&(e.$currentTransition?(e.$currentTransition.cancel(),t(a)):a())},e.$on("$destroy",function(){d=!0}),u.indexOfSlide=function(e){return c.indexOf(e)},e.next=function(){var t=(f+1)%c.length;return e.$currentTransition?void 0:u.select(c[t],"next")},e.prev=function(){var t=0>f-1?c.length-1:f-1;return e.$currentTransition?void 0:u.select(c[t],"prev")},e.isActive=function(e){return u.currentSlide===e},e.$watch("interval",i),e.$on("$destroy",o),e.play=function(){l||(l=!0,i())},e.pause=function(){e.noPause||(l=!1,o())},u.addSlide=function(t,n){t.$element=n,c.push(t),1===c.length||t.active?(u.select(c[c.length-1]),1==c.length&&e.play()):t.active=!1},u.removeSlide=function(e){var t=c.indexOf(e);c.splice(t,1),c.length>0&&e.active?t>=c.length?u.select(c[t-1]):u.select(c[t]):f>t&&f--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(e,t,n,r){r.addSlide(e,t),e.$on("$destroy",function(){r.removeSlide(e)}),e.$watch("active",function(t){t&&r.select(e)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(e,t){function n(e){var n=[],r=e.split("");return angular.forEach(i,function(t,i){var o=e.indexOf(i);if(o>-1){e=e.split(""),r[o]="("+t.regex+")",e[o]="$";for(var a=o+1,s=o+i.length;s>a;a++)r[a]="",e[a]="$";e=e.join(""),n.push({index:o,apply:t.apply})}}),{regex:new RegExp("^"+r.join("")+"$"),map:t(n,"index")}}function r(e,t,n){return 1===t&&n>28?29===n&&(e%4===0&&e%100!==0||e%400===0):3===t||5===t||8===t||10===t?31>n:!0}this.parsers={};var i={yyyy:{regex:"\\d{4}",apply:function(e){this.year=+e}},yy:{regex:"\\d{2}",apply:function(e){this.year=+e+2e3}},y:{regex:"\\d{1,4}",apply:function(e){this.year=+e}},MMMM:{regex:e.DATETIME_FORMATS.MONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.MONTH.indexOf(t)}},MMM:{regex:e.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(t){this.month=e.DATETIME_FORMATS.SHORTMONTH.indexOf(t)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1}},M:{regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e}},EEEE:{regex:e.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:e.DATETIME_FORMATS.SHORTDAY.join("|")}};this.parse=function(t,i){if(!angular.isString(t)||!i)return t;i=e.DATETIME_FORMATS[i]||i,this.parsers[i]||(this.parsers[i]=n(i));var o=this.parsers[i],a=o.regex,s=o.map,l=t.match(a);if(l&&l.length){for(var u,c={year:1900,month:0,date:1,hours:0},f=1,d=l.length;d>f;f++){var p=s[f-1];p.apply&&p.apply.call(c,l[f])}return r(c.year,c.month,c.date)&&(u=new Date(c.year,c.month,c.date,c.hours)),u}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function r(e){return"static"===(n(e,"position")||"static")}var i=function(t){for(var n=e[0],i=t.offsetParent||n;i&&i!==n&&r(i);)i=i.offsetParent;return i||n};return{position:function(t){var n=this.offset(t),r={top:0,left:0},o=i(t[0]);o!=e[0]&&(r=this.offset(angular.element(o)),r.top+=o.clientTop-o.scrollTop,r.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-r.top,left:n.left-r.left}},offset:function(n){var r=n[0].getBoundingClientRect();return{width:r.width||n.prop("offsetWidth"),height:r.height||n.prop("offsetHeight"),top:r.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:r.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,r){var i,o,a,s,l=n.split("-"),u=l[0],c=l[1]||"center";i=r?this.offset(e):this.position(e),o=t.prop("offsetWidth"),a=t.prop("offsetHeight");var f={center:function(){return i.left+i.width/2-o/2},left:function(){return i.left},right:function(){return i.left+i.width}},d={center:function(){return i.top+i.height/2-a/2},top:function(){return i.top},bottom:function(){return i.top+i.height}};switch(u){case"right":s={top:d[c](),left:f[u]()};break;case"left":s={top:d[c](),left:i.left-o};break;case"bottom":s={top:d[u](),left:f[c]()};break;default:s={top:i.top-a,left:f[c]()}}return s}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(e,t,n,r,i,o,a,s){var l=this,u={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(n,i){l[n]=angular.isDefined(t[n])?8>i?r(t[n])(e.$parent):e.$parent.$eval(t[n]):s[n]}),angular.forEach(["minDate","maxDate"],function(r){t[r]?e.$parent.$watch(n(t[r]),function(e){l[r]=e?new Date(e):null,l.refreshView()}):l[r]=s[r]?new Date(s[r]):null}),e.datepickerMode=e.datepickerMode||s.datepickerMode,e.uniqueId="datepicker-"+e.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(t.initDate)?e.$parent.$eval(t.initDate):new Date,e.isActive=function(t){return 0===l.compare(t.date,l.activeDate)?(e.activeDateId=t.uid,!0):!1},this.init=function(e){u=e,u.$render=function(){l.render()}},this.render=function(){if(u.$modelValue){var e=new Date(u.$modelValue),t=!isNaN(e);t?this.activeDate=e:o.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),u.$setValidity("date",t)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var e=u.$modelValue?new Date(u.$modelValue):null;u.$setValidity("date-disabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=u.$modelValue?new Date(u.$modelValue):null;return{date:e,label:a(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),current:0===this.compare(e,new Date)}},this.isDisabled=function(n){return this.minDate&&this.compare(n,this.minDate)<0||this.maxDate&&this.compare(n,this.maxDate)>0||t.dateDisabled&&e.dateDisabled({date:n,mode:e.datepickerMode})},this.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.select=function(t){if(e.datepickerMode===l.minMode){var n=u.$modelValue?new Date(u.$modelValue):new Date(0,0,0,0,0,0,0);n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),u.$setViewValue(n),u.$render()}else l.activeDate=t,e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)-1]},e.move=function(e){var t=l.activeDate.getFullYear()+e*(l.step.years||0),n=l.activeDate.getMonth()+e*(l.step.months||0);l.activeDate.setFullYear(t,n,1),l.refreshView()},e.toggleMode=function(t){t=t||1,e.datepickerMode===l.maxMode&&1===t||e.datepickerMode===l.minMode&&-1===t||(e.datepickerMode=l.modes[l.modes.indexOf(e.datepickerMode)+t])},e.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var c=function(){i(function(){l.element[0].focus()},0,!1)};e.$on("datepicker.focus",c),e.keydown=function(t){var n=e.keys[t.which];if(n&&!t.shiftKey&&!t.altKey)if(t.preventDefault(),t.stopPropagation(),"enter"===n||"space"===n){if(l.isDisabled(l.activeDate))return;e.select(l.activeDate),c()}else!t.ctrlKey||"up"!==n&&"down"!==n?(l.handleKeyDown(n,t),l.refreshView()):(e.toggleMode("up"===n?1:-1),c())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o)}}}).directive("daypicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(t,n,r,i){function o(e,t){return 1!==t||e%4!==0||e%100===0&&e%400!==0?l[t]:29}function a(e,t){var n=new Array(t),r=new Date(e),i=0;for(r.setHours(12);t>i;)n[i++]=new Date(r),r.setDate(r.getDate()+1);return n}function s(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}t.showWeeks=i.showWeeks,i.step={months:1},i.element=n;var l=[31,28,31,30,31,30,31,31,30,31,30,31];i._refreshView=function(){var n=i.activeDate.getFullYear(),r=i.activeDate.getMonth(),o=new Date(n,r,1),l=i.startingDay-o.getDay(),u=l>0?7-l:-l,c=new Date(o);u>0&&c.setDate(-u+1);for(var f=a(c,42),d=0;42>d;d++)f[d]=angular.extend(i.createDateObject(f[d],i.formatDay),{secondary:f[d].getMonth()!==r,uid:t.uniqueId+"-"+d});t.labels=new Array(7);for(var p=0;7>p;p++)t.labels[p]={abbr:e(f[p].date,i.formatDayHeader),full:e(f[p].date,"EEEE")};if(t.title=e(i.activeDate,i.formatDayTitle),t.rows=i.split(f,7),t.showWeeks){t.weekNumbers=[];for(var h=s(t.rows[0][0].date),g=t.rows.length;t.weekNumbers.push(h++)o;o++)n[o]=angular.extend(i.createDateObject(new Date(r,o,1),i.formatMonth),{uid:t.uniqueId+"-"+o});t.title=e(i.activeDate,i.formatMonthTitle),t.rows=i.split(n,3)},i.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth())-new Date(t.getFullYear(),t.getMonth())},i.handleKeyDown=function(e,t){var n=i.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=3;else if("right"===e)n+=1;else if("down"===e)n+=3;else if("pageup"===e||"pagedown"===e){var r=i.activeDate.getFullYear()+("pageup"===e?-1:1);i.activeDate.setFullYear(r)}else"home"===e?n=0:"end"===e&&(n=11);i.activeDate.setMonth(n)},i.refreshView()}}}]).directive("yearpicker",["dateFilter",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(e,t,n,r){function i(e){return parseInt((e-1)/o,10)*o+1}var o=r.yearRange;r.step={years:o},r.element=t,r._refreshView=function(){for(var t=new Array(o),n=0,a=i(r.activeDate.getFullYear());o>n;n++)t[n]=angular.extend(r.createDateObject(new Date(a+n,0,1),r.formatYear),{uid:e.uniqueId+"-"+n});e.title=[t[0].label,t[o-1].label].join(" - "),e.rows=r.split(t,5)},r.compare=function(e,t){return e.getFullYear()-t.getFullYear()},r.handleKeyDown=function(e,t){var n=r.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=5:"right"===e?n+=1:"down"===e?n+=5:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*r.step.years:"home"===e?n=i(r.activeDate.getFullYear()):"end"===e&&(n=i(r.activeDate.getFullYear())+o-1),r.activeDate.setFullYear(n)},r.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(e,t,n,r,i,o,a){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(s,l,u,c){function f(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function d(e){if(e){if(angular.isDate(e)&&!isNaN(e))return c.$setValidity("date",!0),e;if(angular.isString(e)){var t=o.parse(e,p)||new Date(e);return isNaN(t)?void c.$setValidity("date",!1):(c.$setValidity("date",!0),t)}return void c.$setValidity("date",!1)}return c.$setValidity("date",!0),null}var p,h=angular.isDefined(u.closeOnDateSelection)?s.$parent.$eval(u.closeOnDateSelection):a.closeOnDateSelection,g=angular.isDefined(u.datepickerAppendToBody)?s.$parent.$eval(u.datepickerAppendToBody):a.appendToBody;s.showButtonBar=angular.isDefined(u.showButtonBar)?s.$parent.$eval(u.showButtonBar):a.showButtonBar,s.getText=function(e){return s[e+"Text"]||a[e+"Text"]},u.$observe("datepickerPopup",function(e){p=e||a.datepickerPopup,c.$render()});var v=angular.element("
");v.attr({"ng-model":"date","ng-change":"dateSelection()"});var m=angular.element(v.children()[0]);u.datepickerOptions&&angular.forEach(s.$parent.$eval(u.datepickerOptions),function(e,t){m.attr(f(t),e)}),s.watchData={},angular.forEach(["minDate","maxDate","datepickerMode"],function(e){if(u[e]){var n=t(u[e]);if(s.$parent.$watch(n,function(t){s.watchData[e]=t}),m.attr(f(e),"watchData."+e),"datepickerMode"===e){var r=n.assign;s.$watch("watchData."+e,function(e,t){e!==t&&r(s.$parent,e)})}}}),u.dateDisabled&&m.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.$parsers.unshift(d),s.dateSelection=function(e){angular.isDefined(e)&&(s.date=e),c.$setViewValue(s.date),c.$render(),h&&(s.isOpen=!1,l[0].focus())},l.bind("input change keyup",function(){s.$apply(function(){s.date=c.$modelValue})}),c.$render=function(){var e=c.$viewValue?i(c.$viewValue,p):"";l.val(e),s.date=d(c.$modelValue)};var y=function(e){s.isOpen&&e.target!==l[0]&&s.$apply(function(){s.isOpen=!1})},b=function(e,t){s.keydown(e)};l.bind("keydown",b),s.keydown=function(e){27===e.which?(e.preventDefault(),e.stopPropagation(),s.close()):40!==e.which||s.isOpen||(s.isOpen=!0)},s.$watch("isOpen",function(e){e?(s.$broadcast("datepicker.focus"),s.position=g?r.offset(l):r.position(l),s.position.top=s.position.top+l.prop("offsetHeight"),n.bind("click",y)):n.unbind("click",y)}),s.select=function(e){if("today"===e){var t=new Date;angular.isDate(c.$modelValue)?(e=new Date(c.$modelValue),e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate())):e=new Date(t.setHours(0,0,0,0))}s.dateSelection(e)},s.close=function(){s.isOpen=!1,l[0].focus()};var w=e(v)(s);v.remove(),g?n.find("body").append(w):l.after(w),s.$on("$destroy",function(){w.remove(),l.unbind("keydown",b),n.unbind("click",y)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(e,t,n){t.bind("click",function(e){e.preventDefault(),e.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(i){t||(e.bind("click",n),e.bind("keydown",r)),t&&t!==i&&(t.isOpen=!1),t=i},this.close=function(i){t===i&&(t=null,e.unbind("click",n),e.unbind("keydown",r))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},r=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,r,i,o){var a,s=this,l=e.$new(),u=r.openClass,c=angular.noop,f=t.onToggle?n(t.onToggle):angular.noop;this.init=function(r){s.$element=r,t.isOpen&&(a=n(t.isOpen),c=a.assign,e.$watch(a,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(t,n){o[t?"addClass":"removeClass"](s.$element,u),t?(l.focusToggleElement(),i.open(l)):i.close(l),c(e,t),angular.isDefined(t)&&t!==n&&f(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){l.isOpen=!1}),e.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,r){r.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,r){if(r){r.toggleElement=t;var i=function(i){i.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){r.toggle()})};t.bind("click",i),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(r.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",i)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n0),l()})}function l(){if(c&&-1==a()){var e=f;u(c,f,150,function(){e.$destroy(),e=null}),c=void 0,f=void 0}}function u(n,r,i,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}r.animate=!1;var s=e.transitionEndEventName;if(s){var l=t(a,i);n.bind(s,function(){t.cancel(l),a(),r.$apply()})}else t(a)}var c,f,d="modal-open",p=o.createNew(),h={};return i.$watch(a,function(e){f&&(f.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=p.top(),t&&t.value.keyboard&&(e.preventDefault(),i.$apply(function(){h.dismiss(t.key,"escape key press")})))}),h.open=function(e,t){p.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=a();if(s>=0&&!c){f=i.$new(!0),f.index=s;var l=angular.element("
");l.attr("backdrop-class",t.backdropClass),c=r(l)(f),o.append(c)}var u=angular.element("
");u.attr({"template-url":t.windowTemplateUrl, +"window-class":t.windowClass,size:t.size,index:p.length()-1,animate:"animate"}).html(t.content);var h=r(u)(t.scope);p.top().value.modalDomEl=h,o.append(h),o.addClass(d)},h.close=function(e,t){var n=p.get(e);n&&(n.value.deferred.resolve(t),s(e))},h.dismiss=function(e,t){var n=p.get(e);n&&(n.value.deferred.reject(t),s(e))},h.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},h.getTop=function(){return p.top()},h}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,r,i,o,a,s){function l(e){return e.template?r.when(e.template):i.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:o}).then(function(e){return e.data})}function u(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(r.when(t.invoke(e)))}),n}var c={};return c.open=function(t){var i=r.defer(),o=r.defer(),c={result:i.promise,opened:o.promise,close:function(e){s.close(c,e)},dismiss:function(e){s.dismiss(c,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var f=r.all([l(t)].concat(u(t.resolve)));return f.then(function(e){var r=(t.scope||n).$new();r.$close=c.close,r.$dismiss=c.dismiss;var o,l={},u=1;t.controller&&(l.$scope=r,l.$modalInstance=c,angular.forEach(t.resolve,function(t,n){l[n]=e[u++]}),o=a(t.controller,l),t.controllerAs&&(r[t.controllerAs]=o)),s.open(c,{scope:r,deferred:i,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){i.reject(e)}),f.then(function(){o.resolve(!0)},function(){o.reject(!1)}),c},c}]};return e}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(e,t,n){var r=this,i={$setViewValue:angular.noop},o=t.numPages?n(t.numPages).assign:angular.noop;this.init=function(o,a){i=o,this.config=a,i.$render=function(){r.render()},t.itemsPerPage?e.$parent.$watch(n(t.itemsPerPage),function(t){r.itemsPerPage=parseInt(t,10),e.totalPages=r.calculateTotalPages()}):this.itemsPerPage=a.itemsPerPage},this.calculateTotalPages=function(){var t=this.itemsPerPage<1?1:Math.ceil(e.totalItems/this.itemsPerPage);return Math.max(t||0,1)},this.render=function(){e.page=parseInt(i.$viewValue,10)||1},e.selectPage=function(t){e.page!==t&&t>0&&t<=e.totalPages&&(i.$setViewValue(t),i.$render())},e.getText=function(t){return e[t+"Text"]||r.config[t+"Text"]},e.noPrevious=function(){return 1===e.page},e.noNext=function(){return e.page===e.totalPages},e.$watch("totalItems",function(){e.totalPages=r.calculateTotalPages()}),e.$watch("totalPages",function(t){o(e.$parent,t),e.page>t?e.selectPage(t):i.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(e,t){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(n,r,i,o){function a(e,t,n){return{number:e,text:t,active:n}}function s(e,t){var n=[],r=1,i=t,o=angular.isDefined(c)&&t>c;o&&(f?(r=Math.max(e-Math.floor(c/2),1),i=r+c-1,i>t&&(i=t,r=i-c+1)):(r=(Math.ceil(e/c)-1)*c+1,i=Math.min(r+c-1,t)));for(var s=r;i>=s;s++){var l=a(s,s,s===e);n.push(l)}if(o&&!f){if(r>1){var u=a(r-1,"...",!1);n.unshift(u)}if(t>i){var d=a(i+1,"...",!1);n.push(d)}}return n}var l=o[0],u=o[1];if(u){var c=angular.isDefined(i.maxSize)?n.$parent.$eval(i.maxSize):t.maxSize,f=angular.isDefined(i.rotate)?n.$parent.$eval(i.rotate):t.rotate;n.boundaryLinks=angular.isDefined(i.boundaryLinks)?n.$parent.$eval(i.boundaryLinks):t.boundaryLinks,n.directionLinks=angular.isDefined(i.directionLinks)?n.$parent.$eval(i.directionLinks):t.directionLinks,l.init(u,t),i.maxSize&&n.$parent.$watch(e(i.maxSize),function(e){c=parseInt(e,10),l.render()});var d=l.render;l.render=function(){d(),n.page>0&&n.page<=n.totalPages&&(n.pages=s(n.page,n.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(e){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(t,n,r,i){var o=i[0],a=i[1];a&&(t.align=angular.isDefined(r.align)?t.$parent.$eval(r.align):e.align,o.init(a,e))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},r={};this.options=function(e){angular.extend(r,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(i,o,a,s,l,u){return function(i,c,f){function d(e){var t=e||p.trigger||f,r=n[t]||t;return{show:t,hide:r}}var p=angular.extend({},t,r),h=e(i),g=u.startSymbol(),v=u.endSymbol(),m="
';return{restrict:"EA",compile:function(e,t){var n=o(m);return function(e,t,r){function o(){O.isOpen?f():u()}function u(){(!T||e.$eval(r[c+"Enable"]))&&(y(),O.popupDelay?E||(E=a(h,O.popupDelay,!1),E.then(function(e){e()})):h()())}function f(){e.$apply(function(){g()})}function h(){return E=null,_&&(a.cancel(_),_=null),O.content?(v(),x.css({top:0,left:0,display:"block"}),k?s.find("body").append(x):t.after(x),R(),O.isOpen=!0,O.$digest(),R):angular.noop}function g(){O.isOpen=!1,a.cancel(E),E=null,O.animation?_||(_=a(m,500)):m()}function v(){x&&m(),C=O.$new(),x=n(C,angular.noop)}function m(){_=null,x&&(x.remove(),x=null),C&&(C.$destroy(),C=null)}function y(){b(),w()}function b(){var e=r[c+"Placement"];O.placement=angular.isDefined(e)?e:p.placement}function w(){var e=r[c+"PopupDelay"],t=parseInt(e,10);O.popupDelay=isNaN(t)?p.popupDelay:t}function $(){var e=r[c+"Trigger"];A(),S=d(e),S.show===S.hide?t.bind(S.show,o):(t.bind(S.show,u),t.bind(S.hide,f))}var x,C,_,E,k=angular.isDefined(p.appendToBody)?p.appendToBody:!1,S=d(void 0),T=angular.isDefined(r[c+"Enable"]),O=e.$new(!0),R=function(){var e=l.positionElements(t,x,O.placement,k);e.top+="px",e.left+="px",x.css(e)};O.isOpen=!1,r.$observe(i,function(e){O.content=e,!e&&O.isOpen&&g()}),r.$observe("disabled",function(e){e&&O.isOpen&&g()}),r.$observe(c+"Title",function(e){O.title=e});var A=function(){t.unbind(S.show,u),t.unbind(S.hide,f)};$();var M=e.$eval(r[c+"Animation"]);O.animation=angular.isDefined(M)?!!M:p.animation;var D=e.$eval(r[c+"AppendToBody"]);k=angular.isDefined(D)?D:k,k&&e.$on("$locationChangeSuccess",function(){O.isOpen&&g()}),e.$on("$destroy",function(){a.cancel(_),a.cancel(E),A(),m(),O=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(e){return e("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(e,t,n){var r=this,i=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;this.bars=[],e.max=angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max,this.addBar=function(t,n){i||n.css({transition:"none"}),this.bars.push(t),t.$watch("value",function(n){t.percent=+(100*n/e.max).toFixed(2)}),t.$on("$destroy",function(){n=null,r.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(e,t,n,r){r.addBar(e,t)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(e,t,n,r){r.addBar(e,angular.element(t.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(e,t,n){var r={$setViewValue:angular.noop};this.init=function(i){r=i,r.$render=this.render,this.stateOn=angular.isDefined(t.stateOn)?e.$parent.$eval(t.stateOn):n.stateOn,this.stateOff=angular.isDefined(t.stateOff)?e.$parent.$eval(t.stateOff):n.stateOff;var o=angular.isDefined(t.ratingStates)?e.$parent.$eval(t.ratingStates):new Array(angular.isDefined(t.max)?e.$parent.$eval(t.max):n.max);e.range=this.buildTemplateObjects(o)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;n>t;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff},e[t]);return e},e.rate=function(t){!e.readonly&&t>=0&&t<=e.range.length&&(r.$setViewValue(t),r.$render())},e.enter=function(t){e.readonly||(e.value=t),e.onHover({value:t})},e.reset=function(){e.value=r.$viewValue,e.onLeave()},e.onKeydown=function(t){/(37|38|39|40)/.test(t.which)&&(t.preventDefault(),t.stopPropagation(),e.rate(e.value+(38===t.which||39===t.which?1:-1)))},this.render=function(){e.value=r.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(e){var t=this,n=t.tabs=e.tabs=[];t.select=function(e){angular.forEach(n,function(t){t.active&&t!==e&&(t.active=!1,t.onDeselect())}),e.active=!0,e.onSelect()},t.addTab=function(e){n.push(e),1===n.length?e.active=!0:e.active&&t.select(e)},t.removeTab=function(e){var i=n.indexOf(e);if(e.active&&n.length>1&&!r){var o=i==n.length-1?i-1:i+1;t.select(n[o])}n.splice(i,1)};var r;e.$on("$destroy",function(){r=!0})}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(e,t,n){e.vertical=angular.isDefined(n.vertical)?e.$parent.$eval(n.vertical):!1,e.justified=angular.isDefined(n.justified)?e.$parent.$eval(n.justified):!1}}}).directive("tab",["$parse",function(e){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(t,n,r){return function(t,n,i,o){t.$watch("active",function(e){e&&o.select(t)}),t.disabled=!1,i.disabled&&t.$parent.$watch(e(i.disabled),function(e){t.disabled=!!e}),t.select=function(){t.disabled||(t.active=!0)},o.addTab(t),t.$on("$destroy",function(){o.removeTab(t)}),t.$transcludeFn=r}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(e,t,n,r){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}]).directive("tabContentTransclude",function(){function e(e){return e.tagName&&(e.hasAttribute("tab-heading")||e.hasAttribute("data-tab-heading")||"tab-heading"===e.tagName.toLowerCase()||"data-tab-heading"===e.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(t,n,r){var i=t.$eval(r.tabContentTransclude);i.$transcludeFn(i.$parent,function(t){angular.forEach(t,function(t){e(t)?i.headingElement=t:n.append(t)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(e,t,n,r,i,o){function a(){var t=parseInt(e.hours,10),n=e.showMeridian?t>0&&13>t:t>=0&&24>t;return n?(e.showMeridian&&(12===t&&(t=0),e.meridian===g[1]&&(t+=12)),t):void 0}function s(){var t=parseInt(e.minutes,10);return t>=0&&60>t?t:void 0}function l(e){return angular.isDefined(e)&&e.toString().length<2?"0"+e:e}function u(e){c(),h.$setViewValue(new Date(p)),f(e)}function c(){h.$setValidity("time",!0),e.invalidHours=!1,e.invalidMinutes=!1}function f(t){var n=p.getHours(),r=p.getMinutes();e.showMeridian&&(n=0===n||12===n?12:n%12),e.hours="h"===t?n:l(n),e.minutes="m"===t?r:l(r),e.meridian=p.getHours()<12?g[0]:g[1]}function d(e){var t=new Date(p.getTime()+6e4*e);p.setHours(t.getHours(),t.getMinutes()),u()}var p=new Date,h={$setViewValue:angular.noop},g=angular.isDefined(t.meridians)?e.$parent.$eval(t.meridians):o.meridians||i.DATETIME_FORMATS.AMPMS;this.init=function(n,r){h=n,h.$render=this.render;var i=r.eq(0),a=r.eq(1),s=angular.isDefined(t.mousewheel)?e.$parent.$eval(t.mousewheel):o.mousewheel;s&&this.setupMousewheelEvents(i,a),e.readonlyInput=angular.isDefined(t.readonlyInput)?e.$parent.$eval(t.readonlyInput):o.readonlyInput,this.setupInputEvents(i,a)};var v=o.hourStep;t.hourStep&&e.$parent.$watch(n(t.hourStep),function(e){v=parseInt(e,10)});var m=o.minuteStep;t.minuteStep&&e.$parent.$watch(n(t.minuteStep),function(e){m=parseInt(e,10)}),e.showMeridian=o.showMeridian,t.showMeridian&&e.$parent.$watch(n(t.showMeridian),function(t){if(e.showMeridian=!!t,h.$error.time){var n=a(),r=s();angular.isDefined(n)&&angular.isDefined(r)&&(p.setHours(n),u())}else f()}),this.setupMousewheelEvents=function(t,n){var r=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||t>0};t.bind("mousewheel wheel",function(t){e.$apply(r(t)?e.incrementHours():e.decrementHours()),t.preventDefault()}),n.bind("mousewheel wheel",function(t){e.$apply(r(t)?e.incrementMinutes():e.decrementMinutes()),t.preventDefault()})},this.setupInputEvents=function(t,n){if(e.readonlyInput)return e.updateHours=angular.noop,void(e.updateMinutes=angular.noop);var r=function(t,n){h.$setViewValue(null),h.$setValidity("time",!1),angular.isDefined(t)&&(e.invalidHours=t),angular.isDefined(n)&&(e.invalidMinutes=n)};e.updateHours=function(){var e=a();angular.isDefined(e)?(p.setHours(e),u("h")):r(!0)},t.bind("blur",function(t){!e.invalidHours&&e.hours<10&&e.$apply(function(){e.hours=l(e.hours)})}),e.updateMinutes=function(){var e=s();angular.isDefined(e)?(p.setMinutes(e),u("m")):r(void 0,!0)},n.bind("blur",function(t){!e.invalidMinutes&&e.minutes<10&&e.$apply(function(){e.minutes=l(e.minutes)})})},this.render=function(){var e=h.$modelValue?new Date(h.$modelValue):null;isNaN(e)?(h.$setValidity("time",!1),r.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(p=e),c(),f())},e.incrementHours=function(){d(60*v)},e.decrementHours=function(){d(60*-v)},e.incrementMinutes=function(){d(m)},e.decrementMinutes=function(){d(-m)},e.toggleMeridian=function(){d(720*(p.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(e,t,n,r){var i=r[0],o=r[1];o&&i.init(o,t.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var r=n.match(t);if(!r)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:r[3],source:e(r[4]),viewMapper:e(r[2]||r[1]),modelMapper:e(r[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,r,i,o,a){var s=[9,13,27,38,40];return{require:"ngModel",link:function(l,u,c,f){var d,p=l.$eval(c.typeaheadMinLength)||1,h=l.$eval(c.typeaheadWaitMs)||0,g=l.$eval(c.typeaheadEditable)!==!1,v=t(c.typeaheadLoading).assign||angular.noop,m=t(c.typeaheadOnSelect),y=c.typeaheadInputFormatter?t(c.typeaheadInputFormatter):void 0,b=c.typeaheadAppendToBody?l.$eval(c.typeaheadAppendToBody):!1,w=l.$eval(c.typeaheadFocusFirst)!==!1,$=t(c.ngModel).assign,x=a.parse(c.typeahead),C=l.$new();l.$on("$destroy",function(){C.$destroy()});var _="typeahead-"+C.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":_});var E=angular.element("
");E.attr({id:_,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&E.attr("template-url",c.typeaheadTemplateUrl);var k=function(){C.matches=[],C.activeIdx=-1,u.attr("aria-expanded",!1)},S=function(e){return _+"-option-"+e};C.$watch("activeIdx",function(e){0>e?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",S(e))});var T=function(e){var t={$viewValue:e};v(l,!0),n.when(x.source(l,t)).then(function(n){var r=e===f.$viewValue;if(r&&d)if(n.length>0){C.activeIdx=w?0:-1,C.matches.length=0;for(var i=0;i=p?h>0?(A(),R(e)):T(e):(v(l,!1),A(),k()),g?e:e?void f.$setValidity("editable",!1):(f.$setValidity("editable",!0),e)}),f.$formatters.push(function(e){var t,n,r={};return y?(r.$model=e,y(l,r)):(r[x.itemName]=e,t=x.viewMapper(l,r),r[x.itemName]=void 0,n=x.viewMapper(l,r),t!==n?t:e)}),C.select=function(e){var t,n,i={};i[x.itemName]=n=C.matches[e].model,t=x.modelMapper(l,i),$(l,t),f.$setValidity("editable",!0),m(l,{$item:n,$model:t,$label:x.viewMapper(l,i)}),k(),r(function(){u[0].focus()},0,!1)},u.bind("keydown",function(e){0!==C.matches.length&&-1!==s.indexOf(e.which)&&(-1!=C.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(C.activeIdx=(C.activeIdx+1)%C.matches.length,C.$digest()):38===e.which?(C.activeIdx=(C.activeIdx>0?C.activeIdx:C.matches.length)-1,C.$digest()):13===e.which||9===e.which?C.$apply(function(){C.select(C.activeIdx)}):27===e.which&&(e.stopPropagation(),k(),C.$digest()))}),u.bind("blur",function(e){d=!1});var M=function(e){u[0]!==e.target&&(k(),C.$digest())};i.bind("click",M),l.$on("$destroy",function(){i.unbind("click",M),b&&D.remove()});var D=e(E)(C);b?i.find("body").append(D):u.after(D)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(e,t,n,r){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(i,o,a){var s=r(a.templateUrl)(i.$parent)||"template/typeahead/typeahead-match.html";e.get(s,{cache:t}).success(function(e){o.replaceWith(n(e.trim())(i))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?(""+t).replace(new RegExp(e(n),"gi"),"$&"):t}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion-group.html",'
\n
\n

\n {{heading}}\n

\n
\n
\n
\n
\n
\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("template/accordion/accordion.html",'
')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("template/alert/alert.html",'\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("template/carousel/carousel.html",'\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("template/carousel/slide.html","
\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/datepicker.html",'
\n \n \n \n
')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{label.abbr}}
{{ weekNumbers[$index] }}\n \n
\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/popup.html",'\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pager.html",'')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("template/pagination/pagination.html",'')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(e){ e.put("template/popover/popover.html",'
\n
\n\n
\n

\n
\n
\n
\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/bar.html",'
')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progress.html",'
')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("template/progressbar/progressbar.html",'
\n
\n
')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("template/rating/rating.html",'\n \n ({{ $index < value ? \'*\' : \' \' }})\n \n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
     
    \n \n :\n \n
     
    \n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-match.html",'')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'\n')}])},function(e,t,n){/**! * AngularJS file upload/drop directive with http post and progress * @author Danial @@ -58,7 +57,7 @@ e.put("template/popover/popover.html",'
    =0&&b[o]!=r;o--);if(o>=0){for(i=b.length-1;i>=o;i--)n.end&&n.end(b[i]);b.length=o}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var o,a,l,u,b=[],w=e;for(b.last=function(){return b[b.length-1]};e;){if(u="",a=!0,b.last()&&T[b.last()]?(e=e.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+b.last()+"[^>]*>","i"),function(e,t){return t=t.replace(v,"$1").replace(y,"$1"),n.chars&&n.chars(s(t)),""}),i("",b.last())):(0===e.indexOf("",o)===o&&(n.comment&&n.comment(e.substring(4,o)),e=e.substring(o+3),a=!1)):m.test(e)?(l=e.match(m),l&&(e=e.replace(l[0],""),a=!1)):g.test(e)?(l=e.match(d),l&&(e=e.substring(l[0].length),l[0].replace(d,i),a=!1)):h.test(e)&&(l=e.match(f),l?(l[4]&&(e=e.substring(l[0].length),l[0].replace(f,r)),a=!1):(u+="<",e=e.substring(1))),a&&(o=e.indexOf("<"),u+=0>o?e:e.substring(0,o),e=0>o?"":e.substring(o),n.chars&&n.chars(s(u)))),e==w)throw c("badparse","The sanitizer was unable to parse the following block of html: {0}",e);w=e}i()}function s(e){return e?(N.innerHTML=e.replace(//g,">")}function u(e,n){var r=!1,i=t.bind(e,e.push);return{start:function(e,o,a){e=t.lowercase(e),!r&&T[e]&&(r=e),r||O[e]!==!0||(i("<"),i(e),t.forEach(o,function(r,o){var a=t.lowercase(o),s="img"===e&&"src"===a||"background"===a;D[a]!==!0||R[a]===!0&&!n(r,s)||(i(" "),i(o),i('="'),i(l(r)),i('"'))}),i(a?"/>":">"))},end:function(e){e=t.lowercase(e),r||O[e]!==!0||(i("")),e==r&&(r=!1)},chars:function(e){r||i(l(e))}}}var c=t.$$minErr("$sanitize"),f=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,d=/^<\/\s*([\w:-]+)[^>]*>/,p=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,h=/^/g,m=/]*?)>/i,y=//g,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w=/([^\#-~| |!])/g,$=o("area,br,col,hr,img,wbr"),x=o("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),C=o("rp,rt"),E=t.extend({},C,x),_=t.extend({},x,o("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),k=t.extend({},C,o("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),S=o("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use"),T=o("script,style"),O=t.extend({},$,_,k,E,S),R=o("background,cite,href,longdesc,src,usemap,xlink:href"),A=o("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),M=o("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),D=t.extend({},R,M,A),N=document.createElement("pre");t.module("ngSanitize",[]).provider("$sanitize",r),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/,r=/^mailto:/;return function(o,a){function s(e){e&&p.push(i(e))}function l(e,n){p.push("'),s(n),p.push("")}if(!o)return o;for(var u,c,f,d=o,p=[];u=d.match(n);)c=u[0],u[2]||u[4]||(c=(u[3]?"http://":"mailto:")+c),f=u.index,s(d.substr(0,f)),l(c,u[0].replace(r,"")),d=d.substring(f+u[0].length);return s(d),e(p.join(""))}}])}(window,window.angular)},function(e,t,n){n(178),e.exports="ngSanitize"},function(e,t,n){"use strict";function r(e,t){function n(e,n,s,l){var u=angular.extend({value:n.text()},t.codemirror||{},e.$eval(s.uiCodemirror),e.$eval(s.uiCodemirrorOpts)),c=r(n,u);i(c,s.uiCodemirror||s.uiCodemirrorOpts,e),o(c,l,e),a(c,s.uiRefresh,e),e.$on("CodeMirror",function(e,t){if(!angular.isFunction(t))throw new Error("the CodeMirror event requires a callback function");t(c)}),angular.isFunction(u.onLoad)&&u.onLoad(c)}function r(e,t){var n;return"TEXTAREA"===e[0].tagName?n=window.CodeMirror.fromTextArea(e[0],t):(e.html(""),n=new window.CodeMirror(function(t){e.append(t)},t)),n}function i(e,t,n){function r(t,n){angular.isObject(t)&&i.forEach(function(r){if(t.hasOwnProperty(r)){if(n&&t[r]===n[r])return;e.setOption(r,t[r])}})}if(t){var i=Object.keys(window.CodeMirror.defaults);n.$watch(t,r,!0)}}function o(e,t,n){t&&(t.$formatters.push(function(e){if(angular.isUndefined(e)||null===e)return"";if(angular.isObject(e)||angular.isArray(e))throw new Error("ui-codemirror cannot use an object or an array as a model");return e}),t.$render=function(){var n=t.$viewValue||"";e.setValue(n)},e.on("change",function(e){var r=e.getValue();r!==t.$viewValue&&n.$evalAsync(function(){t.$setViewValue(r)})}))}function a(t,n,r){n&&r.$watch(n,function(n,r){n!==r&&e(function(){t.refresh()})})}return{restrict:"EA",require:"?ngModel",compile:function(){if(angular.isUndefined(window.CodeMirror))throw new Error("ui-codemirror needs CodeMirror to work... (o rly?)");return n}}}angular.module("ui.codemirror",[]).constant("uiCodemirrorConfig",{}).directive("uiCodemirror",r),r.$inject=["$timeout","uiCodemirrorConfig"]},function(e,t,n){e.exports=function(){function e(e){return function(){return function(n){return n?t[e].apply(this,arguments):void 0}}}var t=window&&window.inflection?window.inflection:n(182),r=window&&window.angular?window.angular:n(4),i=r.module("ngInflection",[]),o=["indexOf","pluralize","singularize","inflect","camelize","underscore","humanize","capitalize","dasherize","titleize","demodulize","tableize","classify","foreign_key","ordinalize"];for(var a in o)i.filter(o[a],e(o[a]));i.filter("transform",function(){return function(e,n){return e&&n?t.transform(e,n):void 0}})},e.exports()},function(e,t,n){var r,i,o;/*! +!function(e,t,n){"use strict";function r(){this.$get=["$$sanitizeUri",function(e){return function(t){var n=[];return a(t,u(n,function(t,n){return!/^unsafe/.test(e(t,n))})),n.join("")}}]}function i(e){var n=[],r=u(n,t.noop);return r.chars(e),n.join("")}function o(e,n){var r,i={},o=e.split(",");for(r=0;r=0&&b[o]!=r;o--);if(o>=0){for(i=b.length-1;i>=o;i--)n.end&&n.end(b[i]);b.length=o}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var o,a,l,u,b=[],w=e;for(b.last=function(){return b[b.length-1]};e;){if(u="",a=!0,b.last()&&T[b.last()]?(e=e.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+b.last()+"[^>]*>","i"),function(e,t){return t=t.replace(v,"$1").replace(y,"$1"),n.chars&&n.chars(s(t)),""}),i("",b.last())):(0===e.indexOf("",o)===o&&(n.comment&&n.comment(e.substring(4,o)),e=e.substring(o+3),a=!1)):m.test(e)?(l=e.match(m),l&&(e=e.replace(l[0],""),a=!1)):g.test(e)?(l=e.match(d),l&&(e=e.substring(l[0].length),l[0].replace(d,i),a=!1)):h.test(e)&&(l=e.match(f),l?(l[4]&&(e=e.substring(l[0].length),l[0].replace(f,r)),a=!1):(u+="<",e=e.substring(1))),a&&(o=e.indexOf("<"),u+=0>o?e:e.substring(0,o),e=0>o?"":e.substring(o),n.chars&&n.chars(s(u)))),e==w)throw c("badparse","The sanitizer was unable to parse the following block of html: {0}",e);w=e}i()}function s(e){return e?(N.innerHTML=e.replace(//g,">")}function u(e,n){var r=!1,i=t.bind(e,e.push);return{start:function(e,o,a){e=t.lowercase(e),!r&&T[e]&&(r=e),r||O[e]!==!0||(i("<"),i(e),t.forEach(o,function(r,o){var a=t.lowercase(o),s="img"===e&&"src"===a||"background"===a;D[a]!==!0||R[a]===!0&&!n(r,s)||(i(" "),i(o),i('="'),i(l(r)),i('"'))}),i(a?"/>":">"))},end:function(e){e=t.lowercase(e),r||O[e]!==!0||(i("")),e==r&&(r=!1)},chars:function(e){r||i(l(e))}}}var c=t.$$minErr("$sanitize"),f=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,d=/^<\/\s*([\w:-]+)[^>]*>/,p=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,h=/^/g,m=/]*?)>/i,y=//g,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,w=/([^\#-~| |!])/g,$=o("area,br,col,hr,img,wbr"),x=o("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),C=o("rp,rt"),_=t.extend({},C,x),E=t.extend({},x,o("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),k=t.extend({},C,o("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),S=o("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use"),T=o("script,style"),O=t.extend({},$,E,k,_,S),R=o("background,cite,href,longdesc,src,usemap,xlink:href"),A=o("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),M=o("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),D=t.extend({},R,M,A),N=document.createElement("pre");t.module("ngSanitize",[]).provider("$sanitize",r),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/,r=/^mailto:/;return function(o,a){function s(e){e&&p.push(i(e))}function l(e,n){p.push("'),s(n),p.push("")}if(!o)return o;for(var u,c,f,d=o,p=[];u=d.match(n);)c=u[0],u[2]||u[4]||(c=(u[3]?"http://":"mailto:")+c),f=u.index,s(d.substr(0,f)),l(c,u[0].replace(r,"")),d=d.substring(f+u[0].length);return s(d),e(p.join(""))}}])}(window,window.angular)},function(e,t,n){n(178),e.exports="ngSanitize"},function(e,t,n){"use strict";function r(e,t){function n(e,n,s,l){var u=angular.extend({value:n.text()},t.codemirror||{},e.$eval(s.uiCodemirror),e.$eval(s.uiCodemirrorOpts)),c=r(n,u);i(c,s.uiCodemirror||s.uiCodemirrorOpts,e),o(c,l,e),a(c,s.uiRefresh,e),e.$on("CodeMirror",function(e,t){if(!angular.isFunction(t))throw new Error("the CodeMirror event requires a callback function");t(c)}),angular.isFunction(u.onLoad)&&u.onLoad(c)}function r(e,t){var n;return"TEXTAREA"===e[0].tagName?n=window.CodeMirror.fromTextArea(e[0],t):(e.html(""),n=new window.CodeMirror(function(t){e.append(t)},t)),n}function i(e,t,n){function r(t,n){angular.isObject(t)&&i.forEach(function(r){if(t.hasOwnProperty(r)){if(n&&t[r]===n[r])return;e.setOption(r,t[r])}})}if(t){var i=Object.keys(window.CodeMirror.defaults);n.$watch(t,r,!0)}}function o(e,t,n){t&&(t.$formatters.push(function(e){if(angular.isUndefined(e)||null===e)return"";if(angular.isObject(e)||angular.isArray(e))throw new Error("ui-codemirror cannot use an object or an array as a model");return e}),t.$render=function(){var n=t.$viewValue||"";e.setValue(n)},e.on("change",function(e){var r=e.getValue();r!==t.$viewValue&&n.$evalAsync(function(){t.$setViewValue(r)})}))}function a(t,n,r){n&&r.$watch(n,function(n,r){n!==r&&e(function(){t.refresh()})})}return{restrict:"EA",require:"?ngModel",compile:function(){if(angular.isUndefined(window.CodeMirror))throw new Error("ui-codemirror needs CodeMirror to work... (o rly?)");return n}}}angular.module("ui.codemirror",[]).constant("uiCodemirrorConfig",{}).directive("uiCodemirror",r),r.$inject=["$timeout","uiCodemirrorConfig"]},function(e,t,n){e.exports=function(){function e(e){return function(){return function(n){return n?t[e].apply(this,arguments):void 0}}}var t=window&&window.inflection?window.inflection:n(182),r=window&&window.angular?window.angular:n(4),i=r.module("ngInflection",[]),o=["indexOf","pluralize","singularize","inflect","camelize","underscore","humanize","capitalize","dasherize","titleize","demodulize","tableize","classify","foreign_key","ordinalize"];for(var a in o)i.filter(o[a],e(o[a]));i.filter("transform",function(){return function(e,n){return e&&n?t.transform(e,n):void 0}})},e.exports()},function(e,t,n){var r,i,o;/*! * inflection * Copyright(c) 2011 Ben Lin * MIT Licensed @@ -73,7 +72,7 @@ e.put("template/popover/popover.html",'
    -1?l(e,t,n):t.indexOf("%")>-1?u(e,t,n):t.indexOf(":")>-1?c(e,t):d(e._value,t,n)}function s(e,t){var n,r,i,o,a,s=t,l=["KB","MB","GB","TB","PB","EB","ZB","YB"],u=!1;if(t.indexOf(":")>-1)e._value=f(t);else if(t===w)e._value=0;else{for("."!==y[b].delimiters.decimal&&(t=t.replace(/\./g,"").replace(y[b].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+y[b].abbreviations.thousand+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+y[b].abbreviations.million+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+y[b].abbreviations.billion+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+y[b].abbreviations.trillion+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),a=0;a<=l.length&&!(u=t.indexOf(l[a])>-1?Math.pow(1024,a+1):!1);a++);e._value=(u?u:1)*(s.match(n)?Math.pow(10,3):1)*(s.match(r)?Math.pow(10,6):1)*(s.match(i)?Math.pow(10,9):1)*(s.match(o)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._value=u?Math.ceil(e._value):e._value}return e._value}function l(e,t,n){var r,i,o=t.indexOf("$"),a=t.indexOf("("),s=t.indexOf("-"),l="";return t.indexOf(" $")>-1?(l=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(l=" ",t=t.replace("$ ","")):t=t.replace("$",""),i=d(e._value,t,n),1>=o?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),r=1,(a>o||s>o)&&(r=0),i.splice(r,0,y[b].currency.symbol+l),i=i.join("")):i=y[b].currency.symbol+l+i:i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,l+y[b].currency.symbol),i=i.join("")):i=i+l+y[b].currency.symbol,i}function u(e,t,n){var r,i="",o=100*e._value;return t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),r=d(o,t,n),r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,i+"%"),r=r.join("")):r=r+i+"%",r}function c(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(10>n?"0"+n:n)+":"+(10>r?"0"+r:r)}function f(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}function d(e,t,n){var r,i,a,s,l,u,c=!1,f=!1,d=!1,p="",h=!1,g=!1,v=!1,m=!1,$=!1,x="",C="",E=Math.abs(e),_=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],k="",S=!1;if(0===e&&null!==w)return w;if(t.indexOf("(")>-1?(c=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(f=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(h=t.indexOf("aK")>=0,g=t.indexOf("aM")>=0,v=t.indexOf("aB")>=0,m=t.indexOf("aT")>=0,$=h||g||v||m,t.indexOf(" a")>-1?(p=" ",t=t.replace(" a","")):t=t.replace("a",""),E>=Math.pow(10,12)&&!$||m?(p+=y[b].abbreviations.trillion,e/=Math.pow(10,12)):E=Math.pow(10,9)&&!$||v?(p+=y[b].abbreviations.billion,e/=Math.pow(10,9)):E=Math.pow(10,6)&&!$||g?(p+=y[b].abbreviations.million,e/=Math.pow(10,6)):(E=Math.pow(10,3)&&!$||h)&&(p+=y[b].abbreviations.thousand,e/=Math.pow(10,3))),t.indexOf("b")>-1)for(t.indexOf(" b")>-1?(x=" ",t=t.replace(" b","")):t=t.replace("b",""),a=0;a<=_.length;a++)if(r=Math.pow(1024,a),i=Math.pow(1024,a+1),e>=r&&i>e){x+=_[a],r>0&&(e/=r);break}return t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(C=" ",t=t.replace(" o","")):t=t.replace("o",""),C+=y[b].ordinal(e)),t.indexOf("[.]")>-1&&(d=!0,t=t.replace("[.]",".")),s=e.toString().split(".")[0],l=t.split(".")[1],u=t.indexOf(","),l?(l.indexOf("[")>-1?(l=l.replace("]",""),l=l.split("["),k=o(e,l[0].length+l[1].length,n,l[1].length)):k=o(e,l.length,n),s=k.split(".")[0],k=k.split(".")[1].length?y[b].delimiters.decimal+k.split(".")[1]:"",d&&0===Number(k.slice(1))&&(k="")):s=o(e,null,n),s.indexOf("-")>-1&&(s=s.slice(1),S=!0),u>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+y[b].delimiters.thousands)),0===t.indexOf(".")&&(s=""),(c&&S?"(":"")+(!c&&S?"-":"")+(!S&&f?"+":"")+s+k+(C?C:"")+(p?p:"")+(x?x:"")+(c&&S?")":"")}function p(e,t){y[e]=t}function h(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function g(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var n=h(e),r=h(t);return n>r?n:r},-(1/0))}var v,m="1.5.3",y={},b="en",w=null,$="0,0",x="undefined"!=typeof e&&e.exports;v=function(e){return v.isNumeral(e)?e=e.value():0===e||"undefined"==typeof e?e=0:Number(e)||(e=v.fn.unformat(e)),new n(Number(e))},v.version=m,v.isNumeral=function(e){return e instanceof n},v.language=function(e,t){if(!e)return b;if(e&&!t){if(!y[e])throw new Error("Unknown language : "+e);b=e}return(t||!y[e])&&p(e,t),v},v.languageData=function(e){if(!e)return y[b];if(!y[e])throw new Error("Unknown language : "+e);return y[e]},v.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),v.zeroFormat=function(e){w="string"==typeof e?e:null},v.defaultFormat=function(e){$="string"==typeof e?e:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r,i=this.length>>>0,o=!1;for(1n;++n)this.hasOwnProperty(n)&&(o?r=e(r,this[n],n,this):(r=this[n],o=!0));if(!o)throw new TypeError("Reduce of empty array with no initial value");return r}),v.fn=n.prototype={clone:function(){return v(this)},format:function(e,t){return a(this,e?e:$,void 0!==t?t:Math.round)},unformat:function(e){return"[object Number]"===Object.prototype.toString.call(e)?e:s(this,e?e:$)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t,r,i){return e+n*t}var n=g.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/n,this},subtract:function(e){function t(e,t,r,i){return e-n*t}var n=g.call(null,this._value,e);return this._value=[e].reduce(t,this._value*n)/n,this},multiply:function(e){function t(e,t,n,r){var i=g(e,t);return e*i*t*i/(i*i)}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t,n,r){var i=g(e,t);return e*i/(t*i)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(v(this._value).subtract(e).value())}},x&&(e.exports=v),"undefined"==typeof ender&&(this.numeral=v),r=[],i=function(){return v}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)},function(e,t,n){var r,i,o;!function(a,s){i=[n(166)],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))}(function(e){return e.createModule("SaveRestore",["WrappedRange"],function(e,t){function n(e,t){return(t||document).getElementById(e)}function r(e,t){var n,r="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),i=h.getDocument(e.startContainer),o=e.cloneRange();return o.collapse(t),n=i.createElement("span"),n.id=r,n.style.lineHeight="0",n.style.display="none",n.className="rangySelectionBoundary",n.appendChild(i.createTextNode(m)),o.insertNode(n),n}function i(e,r,i,o){var a=n(i,e);a?(r[o?"setStartBefore":"setEndBefore"](a),g(a)):t.warn("Marker element has been removed. Cannot restore selection.")}function o(e,t){return t.compareBoundaryPoints(e.START_TO_START,e)}function a(t,n){var i,o,a=e.DomRange.getRangeDocument(t),s=t.toString(),l=v(n);return t.collapsed?(o=r(t,!1),{document:a,markerId:o.id,collapsed:!0}):(o=r(t,!1),i=r(t,!0),{document:a,startMarkerId:i.id,endMarkerId:o.id,collapsed:!1,backward:l,toString:function(){return"original text: '"+s+"', new text: '"+t.toString()+"'"}})}function s(r,o){var a=r.document;"undefined"==typeof o&&(o=!0);var s=e.createRange(a);if(r.collapsed){var l=n(r.markerId,a);if(l){l.style.display="inline";var u=l.previousSibling;u&&3==u.nodeType?(g(l),s.collapseToPoint(u,u.length)):(s.collapseBefore(l),g(l))}else t.warn("Marker element has been removed. Cannot restore selection.")}else i(a,s,r.startMarkerId,!0),i(a,s,r.endMarkerId,!1);return o&&s.normalizeBoundaries(),s}function l(t,r){var i,s,l=[],u=v(r);t=t.slice(0),t.sort(o);for(var c=0,f=t.length;f>c;++c)l[c]=a(t[c],u);for(c=f-1;c>=0;--c)i=t[c],s=e.DomRange.getRangeDocument(i),i.collapsed?i.collapseAfter(n(l[c].markerId,s)):(i.setEndBefore(n(l[c].endMarkerId,s)),i.setStartAfter(n(l[c].startMarkerId,s)));return l}function u(n){if(!e.isSelectionValid(n))return t.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var r=e.getSelection(n),i=r.getAllRanges(),o=1==i.length&&r.isBackward(),a=l(i,o);return o?r.setSingleRange(i[0],o):r.setRanges(i),{win:n,rangeInfos:a,restored:!1}}function c(e){for(var t=[],n=e.length,r=n-1;r>=0;r--)t[r]=s(e[r],!0);return t}function f(t,n){if(!t.restored){var r=t.rangeInfos,i=e.getSelection(t.win),o=c(r),a=r.length;1==a&&n&&e.features.selectionHasExtend&&r[0].backward?(i.removeAllRanges(),i.addRange(o[0],!0)):i.setRanges(o),t.restored=!0}}function d(e,t){var r=n(t,e);r&&g(r)}function p(e){for(var t,n=e.rangeInfos,r=0,i=n.length;i>r;++r)t=n[r],t.collapsed?d(e.doc,t.markerId):(d(e.doc,t.startMarkerId),d(e.doc,t.endMarkerId))}var h=e.dom,g=h.removeNode,v=e.Selection.isDirectionBackward,m="\ufeff";e.util.extend(e,{saveRange:a,restoreRange:s,saveRanges:l,restoreRanges:c,saveSelection:u,restoreSelection:f,removeMarkerElement:d,removeMarkers:p})}),e},this)},function(e,t,n){!function(e,t){t["true"]=e,/* +(function(){function n(e){this._value=e}function o(e,t,n,r){var i,o,a=Math.pow(10,t);return o=(n(e*a)/a).toFixed(t),r&&(i=new RegExp("0{1,"+r+"}$"),o=o.replace(i,"")),o}function a(e,t,n){var r;return r=t.indexOf("$")>-1?l(e,t,n):t.indexOf("%")>-1?u(e,t,n):t.indexOf(":")>-1?c(e,t):d(e._value,t,n)}function s(e,t){var n,r,i,o,a,s=t,l=["KB","MB","GB","TB","PB","EB","ZB","YB"],u=!1;if(t.indexOf(":")>-1)e._value=f(t);else if(t===w)e._value=0;else{for("."!==y[b].delimiters.decimal&&(t=t.replace(/\./g,"").replace(y[b].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+y[b].abbreviations.thousand+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+y[b].abbreviations.million+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+y[b].abbreviations.billion+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+y[b].abbreviations.trillion+"(?:\\)|(\\"+y[b].currency.symbol+")?(?:\\))?)?$"),a=0;a<=l.length&&!(u=t.indexOf(l[a])>-1?Math.pow(1024,a+1):!1);a++);e._value=(u?u:1)*(s.match(n)?Math.pow(10,3):1)*(s.match(r)?Math.pow(10,6):1)*(s.match(i)?Math.pow(10,9):1)*(s.match(o)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._value=u?Math.ceil(e._value):e._value}return e._value}function l(e,t,n){var r,i,o=t.indexOf("$"),a=t.indexOf("("),s=t.indexOf("-"),l="";return t.indexOf(" $")>-1?(l=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(l=" ",t=t.replace("$ ","")):t=t.replace("$",""),i=d(e._value,t,n),1>=o?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),r=1,(a>o||s>o)&&(r=0),i.splice(r,0,y[b].currency.symbol+l),i=i.join("")):i=y[b].currency.symbol+l+i:i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,l+y[b].currency.symbol),i=i.join("")):i=i+l+y[b].currency.symbol,i}function u(e,t,n){var r,i="",o=100*e._value;return t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),r=d(o,t,n),r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,i+"%"),r=r.join("")):r=r+i+"%",r}function c(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(10>n?"0"+n:n)+":"+(10>r?"0"+r:r)}function f(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}function d(e,t,n){var r,i,a,s,l,u,c=!1,f=!1,d=!1,p="",h=!1,g=!1,v=!1,m=!1,$=!1,x="",C="",_=Math.abs(e),E=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],k="",S=!1;if(0===e&&null!==w)return w;if(t.indexOf("(")>-1?(c=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(f=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(h=t.indexOf("aK")>=0,g=t.indexOf("aM")>=0,v=t.indexOf("aB")>=0,m=t.indexOf("aT")>=0,$=h||g||v||m,t.indexOf(" a")>-1?(p=" ",t=t.replace(" a","")):t=t.replace("a",""),_>=Math.pow(10,12)&&!$||m?(p+=y[b].abbreviations.trillion,e/=Math.pow(10,12)):_=Math.pow(10,9)&&!$||v?(p+=y[b].abbreviations.billion,e/=Math.pow(10,9)):_=Math.pow(10,6)&&!$||g?(p+=y[b].abbreviations.million,e/=Math.pow(10,6)):(_=Math.pow(10,3)&&!$||h)&&(p+=y[b].abbreviations.thousand,e/=Math.pow(10,3))),t.indexOf("b")>-1)for(t.indexOf(" b")>-1?(x=" ",t=t.replace(" b","")):t=t.replace("b",""),a=0;a<=E.length;a++)if(r=Math.pow(1024,a),i=Math.pow(1024,a+1),e>=r&&i>e){x+=E[a],r>0&&(e/=r);break}return t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(C=" ",t=t.replace(" o","")):t=t.replace("o",""),C+=y[b].ordinal(e)),t.indexOf("[.]")>-1&&(d=!0,t=t.replace("[.]",".")),s=e.toString().split(".")[0],l=t.split(".")[1],u=t.indexOf(","),l?(l.indexOf("[")>-1?(l=l.replace("]",""),l=l.split("["),k=o(e,l[0].length+l[1].length,n,l[1].length)):k=o(e,l.length,n),s=k.split(".")[0],k=k.split(".")[1].length?y[b].delimiters.decimal+k.split(".")[1]:"",d&&0===Number(k.slice(1))&&(k="")):s=o(e,null,n),s.indexOf("-")>-1&&(s=s.slice(1),S=!0),u>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+y[b].delimiters.thousands)),0===t.indexOf(".")&&(s=""),(c&&S?"(":"")+(!c&&S?"-":"")+(!S&&f?"+":"")+s+k+(C?C:"")+(p?p:"")+(x?x:"")+(c&&S?")":"")}function p(e,t){y[e]=t}function h(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function g(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var n=h(e),r=h(t);return n>r?n:r},-(1/0))}var v,m="1.5.3",y={},b="en",w=null,$="0,0",x="undefined"!=typeof e&&e.exports;v=function(e){return v.isNumeral(e)?e=e.value():0===e||"undefined"==typeof e?e=0:Number(e)||(e=v.fn.unformat(e)),new n(Number(e))},v.version=m,v.isNumeral=function(e){return e instanceof n},v.language=function(e,t){if(!e)return b;if(e&&!t){if(!y[e])throw new Error("Unknown language : "+e);b=e}return(t||!y[e])&&p(e,t),v},v.languageData=function(e){if(!e)return y[b];if(!y[e])throw new Error("Unknown language : "+e);return y[e]},v.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),v.zeroFormat=function(e){w="string"==typeof e?e:null},v.defaultFormat=function(e){$="string"==typeof e?e:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r,i=this.length>>>0,o=!1;for(1n;++n)this.hasOwnProperty(n)&&(o?r=e(r,this[n],n,this):(r=this[n],o=!0));if(!o)throw new TypeError("Reduce of empty array with no initial value");return r}),v.fn=n.prototype={clone:function(){return v(this)},format:function(e,t){return a(this,e?e:$,void 0!==t?t:Math.round)},unformat:function(e){return"[object Number]"===Object.prototype.toString.call(e)?e:s(this,e?e:$)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t,r,i){return e+n*t}var n=g.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/n,this},subtract:function(e){function t(e,t,r,i){return e-n*t}var n=g.call(null,this._value,e);return this._value=[e].reduce(t,this._value*n)/n,this},multiply:function(e){function t(e,t,n,r){var i=g(e,t);return e*i*t*i/(i*i)}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t,n,r){var i=g(e,t);return e*i/(t*i)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(v(this._value).subtract(e).value())}},x&&(e.exports=v),"undefined"==typeof ender&&(this.numeral=v),r=[],i=function(){return v}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)},function(e,t,n){var r,i,o;!function(a,s){i=[n(166)],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))}(function(e){return e.createModule("SaveRestore",["WrappedRange"],function(e,t){function n(e,t){return(t||document).getElementById(e)}function r(e,t){var n,r="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),i=h.getDocument(e.startContainer),o=e.cloneRange();return o.collapse(t),n=i.createElement("span"),n.id=r,n.style.lineHeight="0",n.style.display="none",n.className="rangySelectionBoundary",n.appendChild(i.createTextNode(m)),o.insertNode(n),n}function i(e,r,i,o){var a=n(i,e);a?(r[o?"setStartBefore":"setEndBefore"](a),g(a)):t.warn("Marker element has been removed. Cannot restore selection.")}function o(e,t){return t.compareBoundaryPoints(e.START_TO_START,e)}function a(t,n){var i,o,a=e.DomRange.getRangeDocument(t),s=t.toString(),l=v(n);return t.collapsed?(o=r(t,!1),{document:a,markerId:o.id,collapsed:!0}):(o=r(t,!1),i=r(t,!0),{document:a,startMarkerId:i.id,endMarkerId:o.id,collapsed:!1,backward:l,toString:function(){return"original text: '"+s+"', new text: '"+t.toString()+"'"}})}function s(r,o){var a=r.document;"undefined"==typeof o&&(o=!0);var s=e.createRange(a);if(r.collapsed){var l=n(r.markerId,a);if(l){l.style.display="inline";var u=l.previousSibling;u&&3==u.nodeType?(g(l),s.collapseToPoint(u,u.length)):(s.collapseBefore(l),g(l))}else t.warn("Marker element has been removed. Cannot restore selection.")}else i(a,s,r.startMarkerId,!0),i(a,s,r.endMarkerId,!1);return o&&s.normalizeBoundaries(),s}function l(t,r){var i,s,l=[],u=v(r);t=t.slice(0),t.sort(o);for(var c=0,f=t.length;f>c;++c)l[c]=a(t[c],u);for(c=f-1;c>=0;--c)i=t[c],s=e.DomRange.getRangeDocument(i),i.collapsed?i.collapseAfter(n(l[c].markerId,s)):(i.setEndBefore(n(l[c].endMarkerId,s)),i.setStartAfter(n(l[c].startMarkerId,s)));return l}function u(n){if(!e.isSelectionValid(n))return t.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var r=e.getSelection(n),i=r.getAllRanges(),o=1==i.length&&r.isBackward(),a=l(i,o);return o?r.setSingleRange(i[0],o):r.setRanges(i),{win:n,rangeInfos:a,restored:!1}}function c(e){for(var t=[],n=e.length,r=n-1;r>=0;r--)t[r]=s(e[r],!0);return t}function f(t,n){if(!t.restored){var r=t.rangeInfos,i=e.getSelection(t.win),o=c(r),a=r.length;1==a&&n&&e.features.selectionHasExtend&&r[0].backward?(i.removeAllRanges(),i.addRange(o[0],!0)):i.setRanges(o),t.restored=!0}}function d(e,t){var r=n(t,e);r&&g(r)}function p(e){for(var t,n=e.rangeInfos,r=0,i=n.length;i>r;++r)t=n[r],t.collapsed?d(e.doc,t.markerId):(d(e.doc,t.startMarkerId),d(e.doc,t.endMarkerId))}var h=e.dom,g=h.removeNode,v=e.Selection.isDirectionBackward,m="\ufeff";e.util.extend(e,{saveRange:a,restoreRange:s,saveRanges:l,restoreRanges:c,saveSelection:u,restoreSelection:f,removeMarkerElement:d,removeMarkers:p})}),e},this)},function(e,t,n){!function(e,t){t["true"]=e,/* @license textAngular Author : Austin Anderson License : 2013 MIT @@ -89,6 +88,6 @@ angular.module("textAngularSetup",[]).value("taOptions",{toolbar:[["h1","h2","h3 See README.md or https://github.com/fraywing/textAngular/wiki for requirements and use. */ -function(){"use strict";function e(e){try{return 0!==angular.element(e).length}catch(t){return!1}}function t(t,n){if(!t||""===t||m.hasOwnProperty(t))throw"textAngular Error: A unique name is required for a Tool Definition";if(n.display&&(""===n.display||!e(n.display))||!n.display&&!n.buttontext&&!n.iconclass)throw'textAngular Error: Tool Definition for "'+t+'" does not have a valid display/iconclass/buttontext value';m[t]=n}var n={ie:function(){for(var e,t=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return t>4?t:e}(),webkit:/AppleWebKit\/([\d.]+)/i.test(navigator.userAgent)},r=!1;n.webkit&&(document.addEventListener("mousedown",function(e){var t=e||window.event,n=t.target;if(r&&null!==n){for(var i=!1,o=n;null!==o&&"html"!==o.tagName.toLowerCase()&&!i;)i="true"===o.contentEditable,o=o.parentNode;i||(document.getElementById("textAngular-editableFix-010203040506070809").setSelectionRange(0,0),n.focus(),n.select&&n.select())}r=!1},!1),angular.element(document).ready(function(){angular.element(document.body).append(angular.element(''))}));var i=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video)$/i,o=/^(ul|li|ol)$/i,a=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video|li)$/i;String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var s,l,u,c,f,d;if(n.ie>8||void 0===n.ie){for(var p=document.styleSheets,h=0;h
    ");return r[0].innerHTML=n,angular.forEach(e,function(e){var n=[];e.selector&&""!==e.selector?n=r.find(e.selector):e.customAttribute&&""!==e.customAttribute&&(n=t.getByAttribute(r,e.customAttribute)),angular.forEach(n,function(t){t=angular.element(t),e.selector&&""!==e.selector&&e.customAttribute&&""!==e.customAttribute?void 0!==t.attr(e.customAttribute)&&e.renderLogic(t):e.renderLogic(t)})}),r[0].innerHTML}}]).factory("taFixChrome",function(){var e=function(e){if(!e||!angular.isString(e)||e.length<=0)return e;for(var t,n,r,i=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,o="",a=0;t=i.exec(e);)n=t[3]||t[4],n&&n.match(/line-height: 1.[0-9]{3,12};|color: inherit; line-height: 1.1;/i)&&(n=n.replace(/( |)font-family: inherit;|( |)line-height: 1.[0-9]{3,12};|( |)color: inherit;/gi,""),r="<"+t[1].trim(),n.trim().length>0&&(r+=" style="+t[2].substring(0,1)+n+t[2].substring(0,1)),r+=t[5].trim()+">",o+=e.substring(a,t.index)+r,a=t.index+t[0].length);return o+=e.substring(a),a>0?o.replace(/(.*?)<\/span>(|)/gi,"$1"):e};return e}).factory("taSanitize",["$sanitize",function(e){function t(e,t){for(var n,r=0,i=0,o=/<[^>]*>/gi;n=o.exec(e);)if(i=n.index,"/"===n[0].substr(1,1)){if(0===r)break;r--}else r++;return t+e.substring(0,i)+angular.element(t)[0].outerHTML.substring(t.length)+e.substring(i)}function n(e){if(!e||!angular.isString(e)||e.length<=0)return e;for(var r,o,a,s,l,c,f=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,d="",p="",h=0;o=f.exec(e);){s=o[3]||o[4];var g=new RegExp(u,"i");if(angular.isString(s)&&g.test(s)){l="";for(var v=new RegExp(u,"ig");a=v.exec(s);)for(r=0;r");c=n(e.substring(h,o.index)),p+=d.length>0?t(c,d):c,s=s.replace(new RegExp(u,"ig"),""),p+="<"+o[1].trim(),s.length>0&&(p+=' style="'+s+'"'),p+=o[5]+">",h=o.index+o[0].length,d=l}}return p+=d.length>0?t(e.substring(h),d):e.substring(h)}function r(e){if(!e||!angular.isString(e)||e.length<=0)return e;for(var t,n=/<([^>\/]+?)align=("([^"]+)"|'([^']+)')([^>]*)>/gi,r="",i=0;t=n.exec(e);){r+=e.substring(i,t.index),i=t.index+t[0].length;var o="<"+t[1]+t[5];/style=("([^"]+)"|'([^']+)')/gi.test(o)?o=o.replace(/style=("([^"]+)"|'([^']+)')/i,'style="$2$3 text-align:'+(t[3]||t[4])+';"'):o+=' style="text-align:'+(t[3]||t[4])+';"',o+=">",r+=o}return r+e.substring(i)}for(var i=[{property:"font-weight",values:["bold"],tag:"b"},{property:"font-style",values:["italic"],tag:"i"}],o=[],a=0;a0&&(s+="|"),s+=i[a].values[l];s+=");)",o.push(s)}var u="("+o.join("|")+")";return function(t,i,o){if(!o)try{t=n(t)}catch(a){}t=r(t);var s;try{s=e(t),o&&(s=t)}catch(a){s=i||""}var l,u=s.match(/(]*>.*?<\/pre[^>]*>)/gi),c=s.replace(/(&#(9|10);)*/gi,""),f=/]*>.*?<\/pre[^>]*>/gi,d=0,p=0;for(s="";null!==(l=f.exec(c))&&d=0;i--)r=angular.element("<"+n+">"+o[i].innerHTML+""),t.after(r);t.remove(),e.setSelectionToElementEnd(r[0])},a=function(t){/()$/i.test(t.innerHTML.trim())?e.setSelectionBeforeElement(angular.element(t).find("br")[0]):e.setSelectionToElementEnd(t)},s=function(e,t){var n=angular.element("<"+t+">"+e[0].innerHTML+"");e.after(n),e.remove(),a(n.find("li")[0])},l=function(e,n,r){for(var i="",o=0;o"+e[o].innerHTML+"";var s=angular.element("<"+r+">"+i+"");n.after(s),n.remove(),a(s.find("li")[0])};return function(a,u){return a=t(a),function(c,f,d,p){var h,g,v,m,y,b,w,$=angular.element("<"+a+">");try{w=e.getSelectionElement()}catch(x){}var C=angular.element(w);if(void 0!==w){var E=w.tagName.toLowerCase();if("insertorderedlist"===c.toLowerCase()||"insertunorderedlist"===c.toLowerCase()){var _=t("insertorderedlist"===c.toLowerCase()?"ol":"ul");if(E===_)return r(C,a);if("li"===E&&C.parent()[0].tagName.toLowerCase()===_&&1===C.parent().children().length)return r(C.parent(),a);if("li"===E&&C.parent()[0].tagName.toLowerCase()!==_&&1===C.parent().children().length)return s(C.parent(),_);if(E.match(i)&&!C.hasClass("ta-bind")){if("ol"===E||"ul"===E)return s(C,_);var k=!1;return angular.forEach(C.children(),function(e){e.tagName.match(i)&&(k=!0)}),k?l(C.children(),C,_):l([angular.element("
    "+w.innerHTML+"
    ")[0]],C,_)}if(E.match(i)){if(m=e.getOnlySelectedElements(),0===m.length)g=angular.element("<"+_+">
  • "+w.innerHTML+"
  • "),C.html(""),C.append(g);else{if(1===m.length&&("ol"===m[0].tagName.toLowerCase()||"ul"===m[0].tagName.toLowerCase()))return m[0].tagName.toLowerCase()===_?r(angular.element(m[0]),a):s(angular.element(m[0]),_);v="";var S=[];for(h=0;h"+T[0].innerHTML+"":T[0].childNodes[0].innerHTML,S.unshift(T)}g=angular.element("<"+_+">"+v+""),S.pop().replaceWith(g),angular.forEach(S,function(e){e.remove()})}return void e.setSelectionToElementEnd(g[0])}}else{if("formatblock"===c.toLowerCase()){for(b=d.toLowerCase().replace(/[<>]/gi,""),"default"===b.trim()&&(b=a,d="<"+a+">"),g="li"===E?C.parent():C;!g[0].tagName||!g[0].tagName.match(i)&&!g.parent().attr("contenteditable");)g=g.parent(),E=(g[0].tagName||"").toLowerCase();if(E===b){m=g.children();var O=!1;for(h=0;h=0;h--)m[h].parentNode&&m[h].parentNode.removeChild(m[h])}else for(h=0;h"),$[0].innerHTML=A[h].outerHTML,A[h]=$[0]),R.parent()[0].insertBefore(A[h],R[0]);R.remove()}return void e.setSelectionToElementEnd(g[0])}if("createlink"===c.toLowerCase()){var M='',D="",N=e.getSelection();if(N.collapsed)e.insertHtml(M+d+D,u);else if(rangy.getSelection().getRangeAt(0).canSurroundContents()){var L=angular.element(M+D)[0];rangy.getSelection().getRangeAt(0).surroundContents(L)}return}if("inserthtml"===c.toLowerCase())return void e.insertHtml(d,u)}}try{n[0].execCommand(c,f,d)}catch(x){}}}}]).service("taSelection",["$window","$document","taDOM",function(e,t,n){var r=t[0],o=e.rangy,s=function(e,t){return e.tagName&&e.tagName.match(/^br$/i)&&0===t&&!e.previousSibling?{element:e.parentNode,offset:0}:{element:e,offset:t}},l={getSelection:function(){var e=o.getSelection().getRangeAt(0),t=e.commonAncestorContainer,n={start:s(e.startContainer,e.startOffset),end:s(e.endContainer,e.endOffset),collapsed:e.collapsed};return t=3===t.nodeType?t.parentNode:t,n.container=t.parentNode===n.start.element||t.parentNode===n.end.element?t.parentNode:t,n},getOnlySelectedElements:function(){var e=o.getSelection().getRangeAt(0),t=e.commonAncestorContainer;return t=3===t.nodeType?t.parentNode:t,e.getNodes([1],function(e){return e.parentNode===t})},getSelectionElement:function(){return l.getSelection().container},setSelection:function(e,t,n){var r=o.createRange();r.setStart(e,t),r.setEnd(e,n),o.getSelection().setSingleRange(r)},setSelectionBeforeElement:function(e){var t=o.createRange();t.selectNode(e),t.collapse(!0),o.getSelection().setSingleRange(t)},setSelectionAfterElement:function(e){var t=o.createRange();t.selectNode(e),t.collapse(!1),o.getSelection().setSingleRange(t)},setSelectionToElementStart:function(e){var t=o.createRange();t.selectNodeContents(e),t.collapse(!0),o.getSelection().setSingleRange(t)},setSelectionToElementEnd:function(e){var t=o.createRange();t.selectNodeContents(e),t.collapse(!1),e.childNodes&&e.childNodes[e.childNodes.length-1]&&"br"===e.childNodes[e.childNodes.length-1].nodeName&&(t.startOffset=t.endOffset=t.startOffset-1),o.getSelection().setSingleRange(t)},insertHtml:function(e,t){var s,u,c,f,d,p,h,g=angular.element("
    "+e+"
    "),v=o.getSelection().getRangeAt(0),m=r.createDocumentFragment(),y=g[0].childNodes,b=!0;if(y.length>0){for(f=[],c=0;c)$/i.test(v.startContainer.innerHTML)&&v.selectNode(v.startContainer)}else b=!0,p=m=r.createTextNode(e);if(b)v.deleteContents();else if(v.collapsed&&v.startContainer!==t)if(v.startContainer.innerHTML&&v.startContainer.innerHTML.match(/^<[^>]*>$/i))s=v.startContainer,1===v.startOffset?(v.setStartAfter(s),v.setEndAfter(s)):(v.setStartBefore(s),v.setEndBefore(s));else{if(3===v.startContainer.nodeType&&v.startContainer.parentNode!==t)for(s=v.startContainer.parentNode,u=s.cloneNode(),n.splitNodes(s.childNodes,s,u,v.startContainer,v.startOffset);!a.test(s.nodeName);){angular.element(s).after(u),s=s.parentNode;var $=u;u=s.cloneNode(),n.splitNodes(s.childNodes,s,u,$)}else s=v.startContainer,u=s.cloneNode(),n.splitNodes(s.childNodes,s,u,void 0,void 0,v.startOffset);if(angular.element(s).after(u),v.setStartAfter(s),v.setEndAfter(s),/^(|)$/i.test(s.innerHTML.trim())&&(v.setStartBefore(s),v.setEndBefore(s),angular.element(s).remove()),/^(|)$/i.test(u.innerHTML.trim())&&angular.element(u).remove(),"li"===s.nodeName.toLowerCase()){for(h=r.createDocumentFragment(),d=0;d"),n.transferChildNodes(m.childNodes[d],g[0]),n.transferNodeAttributes(m.childNodes[d],g[0]),h.appendChild(g[0]);m=h,p&&(p=m.childNodes[m.childNodes.length-1],p=p.childNodes[p.childNodes.length-1])}}else v.deleteContents();v.insertNode(m),p&&l.setSelectionToElementEnd(p)}};return l}]).service("taDOM",function(){var e={getByAttribute:function(t,n){var r=[],i=t.children();return i.length&&angular.forEach(i,function(t){r=r.concat(e.getByAttribute(angular.element(t),n))}),void 0!==t.attr(n)&&r.push(t),r},transferChildNodes:function(e,t){for(t.innerHTML="";e.childNodes.length>0;)t.appendChild(e.childNodes[0]);return t},splitNodes:function(t,n,r,i,o,a){if(!i&&isNaN(a))throw new Error("taDOM.splitNodes requires a splitNode or splitIndex");for(var s=document.createDocumentFragment(),l=document.createDocumentFragment(),u=0;t.length>0&&(isNaN(a)||a!==u)&&t[0]!==i;)s.appendChild(t[0]),u++;for(!isNaN(o)&&o>=0&&t[0]&&(s.appendChild(document.createTextNode(t[0].nodeValue.substring(0,o))),t[0].nodeValue=t[0].nodeValue.substring(o));t.length>0;)l.appendChild(t[0]);e.transferChildNodes(s,n),e.transferChildNodes(l,r)},transferNodeAttributes:function(e,t){for(var n=0;n");return t.html(e),t.text().length<=i}}}}).directive("taMinText",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){var i=parseInt(e.$eval(n.taMinText));if(isNaN(i))throw"Min text must be an integer";n.$observe("taMinText",function(e){if(i=parseInt(e),isNaN(i))throw"Min text must be an integer";r.$dirty&&r.$validate()}),r.$validators.taMinText=function(e){var t=angular.element("
    ");return t.html(e),!t.text().length||t.text().length>=i}}}}),angular.module("textAngular.taBind",["textAngular.factories","textAngular.DOM"]).service("_taBlankTest",[function(){var e=/<(a|abbr|acronym|bdi|bdo|big|cite|code|del|dfn|img|ins|kbd|label|map|mark|q|ruby|rp|rt|s|samp|time|tt|var)[^>]*(>|$)/i;return function(t){return function(n){if(!n)return!0;var r,i=/(^[^<]|>)[^<]/i.exec(n);return i?r=i.index:(n=n.toString().replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,""),r=n.indexOf(">")),n=n.trim().substring(r,r+100),/^[^<>]+$/i.test(n)?!1:0===n.length||n===t||/^>(\s| )*<\/[^>]+>$/gi.test(n)?!0:/>\s*[^\s<]/i.test(n)||e.test(n)?!1:!0}}}]).directive("taButton",[function(){return{link:function(e,t){t.attr("unselectable","on"),t.on("mousedown",function(e,t){return t&&angular.extend(e,t),e.preventDefault(),!1})}}}]).directive("taBind",["taSanitize","$timeout","$window","$document","taFixChrome","taBrowserTag","taSelection","taSelectableElements","taApplyCustomRenderers","taOptions","_taBlankTest","$parse","taDOM",function(e,t,o,s,c,f,d,p,h,v,m,y,b){return{priority:2,require:["ngModel","?ngModelOptions"],link:function(f,w,$,x){var C,E,_,k,S=x[0],T=x[1]||{},O=void 0!==w.attr("contenteditable")&&w.attr("contenteditable"),R=O||"textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase(),A=!1,M=!1,D=!1,N=$.taUnsafeSanitizer||v.disableSanitizer,L=/^(9|19|20|27|33|34|35|36|37|38|39|40|45|112|113|114|115|116|117|118|119|120|121|122|123|144|145)$/i,P=/^(8|13|32|46|59|61|107|109|186|187|188|189|190|191|192|219|220|221|222)$/i;void 0===$.taDefaultWrap&&($.taDefaultWrap="p"),""===$.taDefaultWrap?(_="",k=void 0===n.ie?"

    ":n.ie>=11?"


    ":n.ie<=8?"

     

    ":"

     

    "):(_=void 0===n.ie||n.ie>=11?"<"+$.taDefaultWrap+">
    ":n.ie<=8?"<"+$.taDefaultWrap.toUpperCase()+">":"<"+$.taDefaultWrap+">",k=void 0===n.ie||n.ie>=11?"<"+$.taDefaultWrap+">
    ":n.ie<=8?"<"+$.taDefaultWrap.toUpperCase()+"> ":"<"+$.taDefaultWrap+"> "),T.$options||(T.$options={});var F=m(k),j=function(e){if(F(e))return e;var t=angular.element("
    "+e+"
    ");if(0===t.children().length)e="<"+$.taDefaultWrap+">"+e+"";else{var n,r=t[0].childNodes,o=!1;for(n=0;n"+a+"":a}else e="<"+$.taDefaultWrap+">"+e+""}return e};$.taPaste&&(E=y($.taPaste)),w.addClass("ta-bind");var I;f["$undoManager"+($.id||"")]=S.$undoManager={_stack:[],_index:0,_max:1e3,push:function(e){return"undefined"==typeof e||null===e||"undefined"!=typeof this.current()&&null!==this.current()&&e===this.current()?e:(this._indexthis._max&&this._stack.shift(),this._index=this._stack.length-1,e)},undo:function(){return this.setToIndex(this._index-1)},redo:function(){return this.setToIndex(this._index+1)},setToIndex:function(e){return 0>e||e>this._stack.length-1?void 0:(this._index=e,this.current())},current:function(){return this._stack[this._index]}};var V,H=f["$undoTaBind"+($.id||"")]=function(){if(!A&&O){var e=S.$undoManager.undo();"undefined"!=typeof e&&null!==e&&(ne(e),z(e,!1),V&&t.cancel(V),V=t(function(){w[0].focus(),d.setSelectionToElementEnd(w[0])},1))}},W=f["$redoTaBind"+($.id||"")]=function(){if(!A&&O){var e=S.$undoManager.redo();"undefined"!=typeof e&&null!==e&&(ne(e),z(e,!1),V&&t.cancel(V),V=t(function(){w[0].focus(),d.setSelectionToElementEnd(w[0])},1))}},B=function(){if(O)return w[0].innerHTML;if(R)return w.val();throw"textAngular Error: attempting to update non-editable taBind"},z=function(e,t,n){D=n||!1,("undefined"==typeof t||null===t)&&(t=!0&&O),("undefined"==typeof e||null===e)&&(e=B()),F(e)?(""!==S.$viewValue&&S.$setViewValue(""),t&&""!==S.$undoManager.current()&&S.$undoManager.push("")):(te(),S.$viewValue!==e&&(S.$setViewValue(e),t&&S.$undoManager.push(e))),S.$render()};f["updateTaBind"+($.id||"")]=function(){A||z(void 0,void 0,!0)};var U=function(t){return S.$oldViewValue=e(c(t),S.$oldViewValue,N)};if(w.attr("required")&&(S.$validators.required=function(e,t){return!F(e||t)}),S.$parsers.push(U),S.$parsers.unshift(j),S.$formatters.push(U),S.$formatters.unshift(j),S.$formatters.unshift(function(e){return S.$undoManager.push(e||"")}),R)if(f.events={},O){var q=!1,G=function(n){if(n&&n.trim().length){if(n.match(/class=["']*Mso(Normal|List)/i)){var r=n.match(/([\s\S]*?)/i);r=r?r[1]:n,r=r.replace(/[\s\S]*?<\/o:p>/gi,"").replace(/class=(["']|)MsoNormal(["']|)/gi,"");var i=angular.element("
    "+r+"
    "),o=angular.element("
    "),a={element:null,lastIndent:[],lastLi:null,isUl:!1};a.lastIndent.peek=function(){var e=this.length;return e>0?this[e-1]:void 0};for(var s=function(e){a.isUl=e,a.element=angular.element(e?"
      ":"
        "),a.lastIndent=[],a.lastIndent.peek=function(){var e=this.length;return e>0?this[e-1]:void 0},a.lastLevelMatch=null},l=0;l<=i[0].childNodes.length;l++)if(i[0].childNodes[l]&&"#text"!==i[0].childNodes[l].nodeName&&"p"===i[0].childNodes[l].tagName.toLowerCase()){var u=angular.element(i[0].childNodes[l]),c=(u.attr("class")||"").match(/MsoList(Bullet|Number|Paragraph)(CxSp(First|Middle|Last)|)/i);if(c){if(u[0].childNodes.length<2||u[0].childNodes[1].childNodes.length<1)continue;var p="bullet"===c[1].toLowerCase()||"number"!==c[1].toLowerCase()&&!(/^[^0-9a-z<]*[0-9a-z]+[^0-9a-z<>]]":"
          "),a.lastLi.append(a.element);else if(null!=a.lastIndent.peek()&&a.lastIndent.peek()>g){for(;null!=a.lastIndent.peek()&&a.lastIndent.peek()>g;)if("li"!==a.element.parent()[0].tagName.toLowerCase()){if(!/[uo]l/i.test(a.element.parent()[0].tagName.toLowerCase()))break;a.element=a.element.parent(),a.lastIndent.pop()}else a.element=a.element.parent();a.isUl="ul"===a.element[0].tagName.toLowerCase(),p!==a.isUl&&(s(p),o.append(a.element))}a.lastLevelMatch=v,g!==a.lastIndent.peek()&&a.lastIndent.push(g),a.lastLi=angular.element("
        1. "),a.element.append(a.lastLi),a.lastLi.html(u.html().replace(/[\s\S]*?/gi,"")),u.remove()}else s(!1),o.append(u)}var m=function(e){e=angular.element(e);for(var t=e[0].childNodes.length-1;t>=0;t--)e.after(e[0].childNodes[t]);e.remove()};angular.forEach(o.find("span"),function(e){e.removeAttribute("lang"),e.attributes.length<=0&&m(e)}),angular.forEach(o.find("font"),m),n=o.html()}else{if(n=n.replace(/<(|\/)meta[^>]*?>/gi,""),n.match(/<[^>]*?(ta-bind)[^>]*?>/)){if(n.match(/<[^>]*?(text-angular)[^>]*?>/)){var y=angular.element("
          "+n+"
          ");y.find("textarea").remove();for(var $=b.getByAttribute(y,"ta-bind"),x=0;x<$.length;x++){for(var C=$[x][0].parentNode.parentNode,_=0;_<$[x][0].childNodes.length;_++)C.parentNode.insertBefore($[x][0].childNodes[_],C);C.parentNode.removeChild(C)}n=y.html().replace('
          ',"")}}else n.match(/^]*?>/gi,""));n=n.replace(/
          ]*?>/gi,"").replace(/( | )<\/span>/gi," ")}//i.test(n)&&/(|).*/i.test(n)===!1&&(n=n.replace(/.*<\/li(\s.*)?>/i,"
            $&
          ")),E&&(n=E(f,{$html:n})||n),n=e(n,"",N),d.insertHtml(n,w[0]),t(function(){S.$setViewValue(B()),q=!1,w.removeClass("processing-paste")},0)}else q=!1,w.removeClass("processing-paste")};w.on("paste",f.events.paste=function(e,n){if(n&&angular.extend(e,n),A||q)return e.stopPropagation(),e.preventDefault(),!1;q=!0,w.addClass("processing-paste");var r,i=(e.originalEvent||e).clipboardData;if(i&&i.getData&&i.types.length>0){for(var a="",l=0;l
    ');s.find("body").append(c),c[0].focus(),t(function(){o.rangy.restoreSelection(u),G(c[0].innerHTML),w[0].focus(),c.remove()},0)}),w.on("cut",f.events.cut=function(e){A?e.preventDefault():t(function(){S.$setViewValue(B())},0)}),w.on("keydown",f.events.keydown=function(e,t){if(t&&angular.extend(e,t),!A)if(e.altKey||!e.metaKey&&!e.ctrlKey){if(13===e.keyCode&&!e.shiftKey){var n,r=d.getSelectionElement();if(!r.tagName.match(a))return;var i=angular.element(_);if(/^$/i.test(r.innerHTML.trim())&&"blockquote"===r.parentNode.tagName.toLowerCase()&&!r.nextSibling){n=angular.element(r);var o=n.parent();o.after(i),n.remove(),0===o.children().length&&o.remove(),d.setSelectionToElementStart(i[0]),e.preventDefault()}else/^<[^>]+><\/[^>]+>$/i.test(r.innerHTML.trim())&&"blockquote"===r.tagName.toLowerCase()&&(n=angular.element(r),n.after(i),n.remove(),d.setSelectionToElementStart(i[0]),e.preventDefault())}}else 90!==e.keyCode||e.shiftKey?(90===e.keyCode&&e.shiftKey||89===e.keyCode&&!e.shiftKey)&&(W(),e.preventDefault()):(H(),e.preventDefault())});var K;if(w.on("keyup",f.events.keyup=function(e,n){if(n&&angular.extend(e,n),9===e.keyCode){var r=d.getSelection();return void(r.start.element===w[0]&&w.children().length&&d.setSelectionToElementStart(w.children()[0]))}if(I&&t.cancel(I),!A&&!L.test(e.keyCode)){if(""!==_&&13===e.keyCode&&!e.shiftKey){for(var i=d.getSelectionElement();!i.tagName.match(a)&&i!==w[0];)i=i.parentNode;if(i.tagName.toLowerCase()!==$.taDefaultWrap&&"li"!==i.tagName.toLowerCase()&&(""===i.innerHTML.trim()||"
    "===i.innerHTML.trim())){var s=angular.element(_);angular.element(i).replaceWith(s),d.setSelectionToElementStart(s[0])}}var l=B();if(""!==_&&""===l.trim())ne(_),d.setSelectionToElementStart(w.children()[0]);else if("<"!==l.substring(0,1)&&""!==$.taDefaultWrap){var u=o.rangy.saveSelection();l=B(),l="<"+$.taDefaultWrap+">"+l+"",ne(l),o.rangy.restoreSelection(u)}var c=C!==e.keyCode&&P.test(e.keyCode);K&&t.cancel(K),K=t(function(){z(l,c,!0)},T.$options.debounce||400),c||(I=t(function(){S.$undoManager.push(l)},250)),C=e.keyCode}}),w.on("blur",f.events.blur=function(){M=!1,A?(D=!0,S.$render()):z(void 0,void 0,!0)}),$.placeholder&&(n.ie>8||void 0===n.ie)){var Y;if(!$.id)throw"textAngular Error: An unique ID is required for placeholders to work";Y=l("#"+$.id+".placeholder-text:before",'content: "'+$.placeholder+'"'),f.$on("$destroy",function(){u(Y)})}w.on("focus",f.events.focus=function(){M=!0,w.removeClass("placeholder-text")}),w.on("mouseup",f.events.mouseup=function(){var e=d.getSelection();e.start.element===w[0]&&w.children().length&&d.setSelectionToElementStart(w.children()[0])}),w.on("mousedown",f.events.mousedown=function(e,t){t&&angular.extend(e,t),e.stopPropagation()})}else{w.on("change blur",f.events.change=f.events.blur=function(){A||S.$setViewValue(B())}),w.on("keydown",f.events.keydown=function(e,t){if(t&&angular.extend(e,t),9===e.keyCode){var n=this.selectionStart,r=this.selectionEnd,i=w.val();if(e.shiftKey){var o=i.lastIndexOf("\n",n),a=i.lastIndexOf(" ",n);-1!==a&&a>=o&&(w.val(i.substring(0,a)+i.substring(a+1)),this.selectionStart=this.selectionEnd=n-1)}else w.val(i.substring(0,n)+" "+i.substring(r)),this.selectionStart=this.selectionEnd=n+1;e.preventDefault()}});var Q=function(e,t){for(var n="",r=0;t>r;r++)n+=e;return n},X=function(e,t){var n="",r=e.childNodes;t++,n+=Q(" ",t-1)+e.outerHTML.substring(0,e.outerHTML.indexOf(""+e+"
    ")[0].childNodes;if(t.length>0){e="";for(var n=0;n0&&(e+="\n"),e+="ul"===t[n].nodeName.toLowerCase()||"ol"===t[n].nodeName.toLowerCase()?""+X(t[n],0):""+t[n].outerHTML)}return e})}var J,Z=function(e){return f.$emit("ta-element-select",this),e.preventDefault(),!1},ee=function(e,n){if(n&&angular.extend(e,n),!g&&!A){g=!0;var r;r=e.originalEvent?e.originalEvent.dataTransfer:e.dataTransfer,f.$emit("ta-drop-event",this,e,r),t(function(){g=!1,z(void 0,void 0,!0)},100)}},te=f["reApplyOnSelectorHandlers"+($.id||"")]=function(){A||angular.forEach(p,function(e){w.find(e).off("click",Z).on("click",Z)})},ne=function(e){w[0].innerHTML=e},re=!1;S.$render=function(){if(!re){re=!0;var e=S.$viewValue||"";D||(O&&M&&(w.removeClass("placeholder-text"),J&&t.cancel(J),J=t(function(){M||(w[0].focus(),d.setSelectionToElementEnd(w.children()[w.children().length-1])),J=void 0},1)),O?(ne($.placeholder?""===e?_:e:""===e?_:e),A?w.off("drop",ee):(te(),w.on("drop",ee))):"textarea"!==w[0].tagName.toLowerCase()&&"input"!==w[0].tagName.toLowerCase()?ne(h(e)):w.val(e)),O&&$.placeholder&&(""===e?M?w.removeClass("placeholder-text"):w.addClass("placeholder-text"):w.removeClass("placeholder-text")),re=D=!1}},$.taReadonly&&(A=f.$eval($.taReadonly),A?(w.addClass("ta-readonly"),("textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase())&&w.attr("disabled","disabled"),void 0!==w.attr("contenteditable")&&w.attr("contenteditable")&&w.removeAttr("contenteditable")):(w.removeClass("ta-readonly"),"textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase()?w.removeAttr("disabled"):O&&w.attr("contenteditable","true")),f.$watch($.taReadonly,function(e,t){t!==e&&(e?(w.addClass("ta-readonly"),("textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase())&&w.attr("disabled","disabled"),void 0!==w.attr("contenteditable")&&w.attr("contenteditable")&&w.removeAttr("contenteditable"),angular.forEach(p,function(e){w.find(e).on("click",Z)}),w.off("drop",ee)):(w.removeClass("ta-readonly"),"textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase()?w.removeAttr("disabled"):O&&w.attr("contenteditable","true"),angular.forEach(p,function(e){w.find(e).off("click",Z)}),w.on("drop",ee)),A=e)})),O&&!A&&(angular.forEach(p,function(e){w.find(e).on("click",Z)}),w.on("drop",ee),w.on("blur",function(){n.webkit&&(r=!0)}))}}}]);var g=!1,v=angular.module("textAngular",["ngSanitize","textAngularSetup","textAngular.factories","textAngular.DOM","textAngular.validators","textAngular.taBind"]),m={};v.constant("taRegisterTool",t),v.value("taTools",m),v.config([function(){angular.forEach(m,function(e,t){delete m[t]})}]),v.run([function(){if(!window.rangy)throw"rangy-core.js and rangy-selectionsaverestore.js are required for textAngular to work correctly, rangy-core is not yet loaded.";if(window.rangy.init(),!window.rangy.saveSelection)throw"rangy-selectionsaverestore.js is required for textAngular to work correctly."}]),v.directive("textAngular",["$compile","$timeout","taOptions","taSelection","taExecCommand","textAngularManager","$window","$document","$animate","$log","$q","$parse",function(e,t,n,r,i,o,a,s,l,u,c,f){return{require:"?ngModel",scope:{},restrict:"EA", -priority:2,link:function(d,p,h,g){var v,m,y,b,w,$,x,C,E,_,k,S=h.serial?h.serial:Math.floor(1e16*Math.random());d._name=h.name?h.name:"textAngularEditor"+S;var T=function(e,n,r){t(function(){var t=function(){e.off(n,t),r.apply(this,arguments)};e.on(n,t)},100)};if(E=i(h.taDefaultWrap),angular.extend(d,angular.copy(n),{wrapSelection:function(e,t,n){"undo"===e.toLowerCase()?d["$undoTaBindtaTextElement"+S]():"redo"===e.toLowerCase()?d["$redoTaBindtaTextElement"+S]():(E(e,!1,t,d.defaultTagAttributes),n&&d["reApplyOnSelectorHandlerstaTextElement"+S](),d.displayElements.text[0].focus())},showHtml:d.$eval(h.taShowHtml)||!1}),h.taFocussedClass&&(d.classes.focussed=h.taFocussedClass),h.taTextEditorClass&&(d.classes.textEditor=h.taTextEditorClass),h.taHtmlEditorClass&&(d.classes.htmlEditor=h.taHtmlEditorClass),h.taDefaultTagAttributes)try{angular.extend(d.defaultTagAttributes,angular.fromJson(h.taDefaultTagAttributes))}catch(O){u.error(O)}h.taTextEditorSetup&&(d.setup.textEditorSetup=d.$parent.$eval(h.taTextEditorSetup)),h.taHtmlEditorSetup&&(d.setup.htmlEditorSetup=d.$parent.$eval(h.taHtmlEditorSetup)),d.fileDropHandler=h.taFileDrop?d.$parent.$eval(h.taFileDrop):d.defaultFileDropHandler,x=p[0].innerHTML,p[0].innerHTML="",d.displayElements={forminput:angular.element(""),html:angular.element(""),text:angular.element("
    "),scrollWindow:angular.element("
    "),popover:angular.element('
    '),popoverArrow:angular.element('
    '),popoverContainer:angular.element('
    '),resize:{overlay:angular.element('
    '),background:angular.element('
    '),anchors:[angular.element('
    '),angular.element('
    '),angular.element('
    '),angular.element('
    ')],info:angular.element('
    ')}},d.displayElements.popover.append(d.displayElements.popoverArrow),d.displayElements.popover.append(d.displayElements.popoverContainer),d.displayElements.scrollWindow.append(d.displayElements.popover),d.displayElements.popover.on("mousedown",function(e,t){return t&&angular.extend(e,t),e.preventDefault(),!1}),d.showPopover=function(e){d.displayElements.popover.css("display","block"),d.reflowPopover(e),l.addClass(d.displayElements.popover,"in"),T(s.find("body"),"click keyup",function(){d.hidePopover()})},d.reflowPopover=function(e){d.displayElements.text[0].offsetHeight-51>e[0].offsetTop?(d.displayElements.popover.css("top",e[0].offsetTop+e[0].offsetHeight+d.displayElements.scrollWindow[0].scrollTop+"px"),d.displayElements.popover.removeClass("top").addClass("bottom")):(d.displayElements.popover.css("top",e[0].offsetTop-54+d.displayElements.scrollWindow[0].scrollTop+"px"),d.displayElements.popover.removeClass("bottom").addClass("top"));var t=d.displayElements.text[0].offsetWidth-d.displayElements.popover[0].offsetWidth,n=e[0].offsetLeft+e[0].offsetWidth/2-d.displayElements.popover[0].offsetWidth/2;d.displayElements.popover.css("left",Math.max(0,Math.min(t,n))+"px"),d.displayElements.popoverArrow.css("margin-left",Math.min(n,Math.max(0,n-t))-11+"px")},d.hidePopover=function(){var e=function(){d.displayElements.popover.css("display",""),d.displayElements.popoverContainer.attr("style",""),d.displayElements.popoverContainer.attr("class","popover-content")};c.when(l.removeClass(d.displayElements.popover,"in",e)).then(e)},d.displayElements.resize.overlay.append(d.displayElements.resize.background),angular.forEach(d.displayElements.resize.anchors,function(e){d.displayElements.resize.overlay.append(e)}),d.displayElements.resize.overlay.append(d.displayElements.resize.info),d.displayElements.scrollWindow.append(d.displayElements.resize.overlay),d.reflowResizeOverlay=function(e){e=angular.element(e)[0],d.displayElements.resize.overlay.css({display:"block",left:e.offsetLeft-5+"px",top:e.offsetTop-5+"px",width:e.offsetWidth+10+"px",height:e.offsetHeight+10+"px"}),d.displayElements.resize.info.text(e.offsetWidth+" x "+e.offsetHeight)},d.showResizeOverlay=function(e){var t=s.find("body");_=function(n){var r={width:parseInt(e.attr("width")),height:parseInt(e.attr("height")),x:n.clientX,y:n.clientY};(void 0===r.width||isNaN(r.width))&&(r.width=e[0].offsetWidth),(void 0===r.height||isNaN(r.height))&&(r.height=e[0].offsetHeight),d.hidePopover();var i=r.height/r.width,o=function(t){var n={x:Math.max(0,r.width+(t.clientX-r.x)),y:Math.max(0,r.height+(t.clientY-r.y))};if(t.shiftKey){var o=n.y/n.x;n.x=i>o?n.x:n.y/i,n.y=i>o?n.x*i:n.y}var a=angular.element(e);a.attr("height",Math.max(0,n.y)),a.attr("width",Math.max(0,n.x)),d.reflowResizeOverlay(e)};t.on("mousemove",o),T(t,"mouseup",function(n){n.preventDefault(),n.stopPropagation(),t.off("mousemove",o),d.showPopover(e)}),n.stopPropagation(),n.preventDefault()},d.displayElements.resize.anchors[3].on("mousedown",_),d.reflowResizeOverlay(e),T(t,"click",function(){d.hideResizeOverlay()})},d.hideResizeOverlay=function(){d.displayElements.resize.anchors[3].off("mousedown",_),d.displayElements.resize.overlay.css("display","")},d.setup.htmlEditorSetup(d.displayElements.html),d.setup.textEditorSetup(d.displayElements.text),d.displayElements.html.attr({id:"taHtmlElement"+S,"ng-show":"showHtml","ta-bind":"ta-bind","ng-model":"html","ng-model-options":p.attr("ng-model-options")}),d.displayElements.text.attr({id:"taTextElement"+S,contentEditable:"true","ta-bind":"ta-bind","ng-model":"html","ng-model-options":p.attr("ng-model-options")}),d.displayElements.scrollWindow.attr({"ng-hide":"showHtml"}),h.taDefaultWrap&&d.displayElements.text.attr("ta-default-wrap",h.taDefaultWrap),h.taUnsafeSanitizer&&(d.displayElements.text.attr("ta-unsafe-sanitizer",h.taUnsafeSanitizer),d.displayElements.html.attr("ta-unsafe-sanitizer",h.taUnsafeSanitizer)),d.displayElements.scrollWindow.append(d.displayElements.text),p.append(d.displayElements.scrollWindow),p.append(d.displayElements.html),d.displayElements.forminput.attr("name",d._name),p.append(d.displayElements.forminput),h.tabindex&&(p.removeAttr("tabindex"),d.displayElements.text.attr("tabindex",h.tabindex),d.displayElements.html.attr("tabindex",h.tabindex)),h.placeholder&&(d.displayElements.text.attr("placeholder",h.placeholder),d.displayElements.html.attr("placeholder",h.placeholder)),h.taDisabled&&(d.displayElements.text.attr("ta-readonly","disabled"),d.displayElements.html.attr("ta-readonly","disabled"),d.disabled=d.$parent.$eval(h.taDisabled),d.$parent.$watch(h.taDisabled,function(e){d.disabled=e,d.disabled?p.addClass(d.classes.disabled):p.removeClass(d.classes.disabled)})),h.taPaste&&(d._pasteHandler=function(e){return f(h.taPaste)(d.$parent,{$html:e})},d.displayElements.text.attr("ta-paste","_pasteHandler($html)")),e(d.displayElements.scrollWindow)(d),e(d.displayElements.html)(d),d.updateTaBindtaTextElement=d["updateTaBindtaTextElement"+S],d.updateTaBindtaHtmlElement=d["updateTaBindtaHtmlElement"+S],p.addClass("ta-root"),d.displayElements.scrollWindow.addClass("ta-text ta-editor "+d.classes.textEditor),d.displayElements.html.addClass("ta-html ta-editor "+d.classes.htmlEditor),d._actionRunning=!1;var R=!1;if(d.startAction=function(){return d._actionRunning=!0,R=a.rangy.saveSelection(),function(){R&&a.rangy.restoreSelection(R)}},d.endAction=function(){d._actionRunning=!1,R&&(d.showHtml?d.displayElements.html[0].focus():d.displayElements.text[0].focus(),a.rangy.restoreSelection(R),a.rangy.removeMarkers(R)),R=!1,d.updateSelectedStyles(),d.showHtml||d["updateTaBindtaTextElement"+S]()},w=function(){d.focussed=!0,p.addClass(d.classes.focussed),C.focus(),p.triggerHandler("focus")},d.displayElements.html.on("focus",w),d.displayElements.text.on("focus",w),$=function(e){return d._actionRunning||s[0].activeElement===d.displayElements.html[0]||s[0].activeElement===d.displayElements.text[0]||(p.removeClass(d.classes.focussed),C.unfocus(),t(function(){d._bUpdateSelectedStyles=!1,p.triggerHandler("blur"),d.focussed=!1},0)),e.preventDefault(),!1},d.displayElements.html.on("blur",$),d.displayElements.text.on("blur",$),d.displayElements.text.on("paste",function(e){p.triggerHandler("paste",e)}),d.queryFormatBlockState=function(e){return!d.showHtml&&e.toLowerCase()===s[0].queryCommandValue("formatBlock").toLowerCase()},d.queryCommandState=function(e){return d.showHtml?"":s[0].queryCommandState(e)},d.switchView=function(){d.showHtml=!d.showHtml,l.enabled(!1,d.displayElements.html),l.enabled(!1,d.displayElements.text),d.showHtml?t(function(){return l.enabled(!0,d.displayElements.html),l.enabled(!0,d.displayElements.text),d.displayElements.html[0].focus()},100):t(function(){return l.enabled(!0,d.displayElements.html),l.enabled(!0,d.displayElements.text),d.displayElements.text[0].focus()},100)},h.ngModel){var A=!0;g.$render=function(){if(A){A=!1;var e=d.$parent.$eval(h.ngModel);void 0!==e&&null!==e||!x||""===x||g.$setViewValue(x)}d.displayElements.forminput.val(g.$viewValue),d.html=g.$viewValue||""},p.attr("required")&&(g.$validators.required=function(e,t){var n=e||t;return!(!n||""===n.trim())})}else d.displayElements.forminput.val(x),d.html=x;if(d.$watch("html",function(e,t){e!==t&&(h.ngModel&&g.$viewValue!==e&&g.$setViewValue(e),d.displayElements.forminput.val(e))}),h.taTargetToolbars)C=o.registerEditor(d._name,d,h.taTargetToolbars.split(","));else{var M=angular.element('
    ');h.taToolbar&&M.attr("ta-toolbar",h.taToolbar),h.taToolbarClass&&M.attr("ta-toolbar-class",h.taToolbarClass),h.taToolbarGroupClass&&M.attr("ta-toolbar-group-class",h.taToolbarGroupClass),h.taToolbarButtonClass&&M.attr("ta-toolbar-button-class",h.taToolbarButtonClass),h.taToolbarActiveButtonClass&&M.attr("ta-toolbar-active-button-class",h.taToolbarActiveButtonClass),h.taFocussedClass&&M.attr("ta-focussed-class",h.taFocussedClass),p.prepend(M),e(M)(d.$parent),C=o.registerEditor(d._name,d,["textAngularToolbar"+S])}d.$on("$destroy",function(){o.unregisterEditor(d._name)}),d.$on("ta-element-select",function(e,t){C.triggerElementSelect(e,t)&&d["reApplyOnSelectorHandlerstaTextElement"+S]()}),d.$on("ta-drop-event",function(e,n,r,i){d.displayElements.text[0].focus(),i&&i.files&&i.files.length>0?(angular.forEach(i.files,function(e){try{c.when(d.fileDropHandler(e,d.wrapSelection)||d.fileDropHandler!==d.defaultFileDropHandler&&c.when(d.defaultFileDropHandler(e,d.wrapSelection))).then(function(){d["updateTaBindtaTextElement"+S]()})}catch(t){u.error(t)}}),r.preventDefault(),r.stopPropagation()):t(function(){d["updateTaBindtaTextElement"+S]()},0)}),d._bUpdateSelectedStyles=!1,angular.element(window).on("blur",function(){d._bUpdateSelectedStyles=!1,d.focussed=!1}),d.updateSelectedStyles=function(){var e;k&&t.cancel(k),void 0!==(e=r.getSelectionElement())&&e.parentNode!==d.displayElements.text[0]?C.updateSelectedStyles(angular.element(e)):C.updateSelectedStyles(),d._bUpdateSelectedStyles&&(k=t(d.updateSelectedStyles,200))},v=function(){return d.focussed?void(d._bUpdateSelectedStyles||(d._bUpdateSelectedStyles=!0,d.$apply(function(){d.updateSelectedStyles()}))):void(d._bUpdateSelectedStyles=!1)},d.displayElements.html.on("keydown",v),d.displayElements.text.on("keydown",v),m=function(){d._bUpdateSelectedStyles=!1},d.displayElements.html.on("keyup",m),d.displayElements.text.on("keyup",m),y=function(e,t){t&&angular.extend(e,t),d.$apply(function(){return C.sendKeyCommand(e)?(d._bUpdateSelectedStyles||d.updateSelectedStyles(),e.preventDefault(),!1):void 0})},d.displayElements.html.on("keypress",y),d.displayElements.text.on("keypress",y),b=function(){d._bUpdateSelectedStyles=!1,d.$apply(function(){d.updateSelectedStyles()})},d.displayElements.html.on("mouseup",b),d.displayElements.text.on("mouseup",b)}}}]),v.service("textAngularManager",["taToolExecuteAction","taTools","taRegisterTool",function(e,t,n){var r={},i={};return{registerEditor:function(n,o,a){if(!n||""===n)throw"textAngular Error: An editor requires a name";if(!o)throw"textAngular Error: An editor requires a scope";if(i[n])throw'textAngular Error: An Editor with name "'+n+'" already exists';var s=[];return angular.forEach(a,function(e){r[e]&&s.push(r[e])}),i[n]={scope:o,toolbars:a,_registerToolbar:function(e){this.toolbars.indexOf(e.name)>=0&&s.push(e)},editorFunctions:{disable:function(){angular.forEach(s,function(e){e.disabled=!0})},enable:function(){angular.forEach(s,function(e){e.disabled=!1})},focus:function(){angular.forEach(s,function(e){e._parent=o,e.disabled=!1,e.focussed=!0,o.focussed=!0})},unfocus:function(){angular.forEach(s,function(e){e.disabled=!0,e.focussed=!1}),o.focussed=!1},updateSelectedStyles:function(e){angular.forEach(s,function(t){angular.forEach(t.tools,function(n){n.activeState&&(t._parent=o,n.active=n.activeState(e))})})},sendKeyCommand:function(n){var r=!1;return(n.ctrlKey||n.metaKey)&&angular.forEach(t,function(t,i){if(t.commandKeyCode&&t.commandKeyCode===n.which)for(var a=0;a0)for(var c=0;c"),r.addClass(t&&t["class"]?t["class"]:a.classes.toolbarButton),r.attr("name",n.name),r.attr("ta-button","ta-button"),r.attr("ng-disabled","isDisabled()"),r.attr("tabindex","-1"),r.attr("ng-click","executeAction()"),r.attr("ng-class","displayActiveToolClass(active)"),t&&t.tooltiptext&&r.attr("title",t.tooltiptext),t&&!t.display&&!n._display&&(r[0].innerHTML="",t.buttontext&&(r[0].innerHTML=t.buttontext),t.iconclass)){var i=angular.element(""),o=r[0].innerHTML;i.addClass(t.iconclass),r[0].innerHTML="",r.append(i),o&&""!==o&&r.append(" "+o)}return n._lastToolDefinition=angular.copy(t),e(r)(n)};a.tools={},a._parent={disabled:!0,showHtml:!1,queryFormatBlockState:function(){return!1},queryCommandState:function(){return!1}};var c={$window:o,$editor:function(){return a._parent},isDisabled:function(){return"function"!=typeof this.$eval("disabled")&&this.$eval("disabled")||this.$eval("disabled()")||"html"!==this.name&&this.$editor().showHtml||this.$parent.disabled||this.$editor().disabled},displayActiveToolClass:function(e){return e?a.classes.toolbarButtonActive:""},executeAction:i};angular.forEach(a.toolbar,function(e){var t=angular.element("
    ");t.addClass(a.classes.toolbarGroup),angular.forEach(e,function(e){a.tools[e]=angular.extend(a.$new(!0),r[e],c,{name:e}),a.tools[e].$element=u(r[e],a.tools[e]),t.append(a.tools[e].$element)}),s.append(t)}),a.updateToolDisplay=function(e,t,n){var r=a.tools[e];if(r){if(r._lastToolDefinition&&!n&&(t=angular.extend({},r._lastToolDefinition,t)),null===t.buttontext&&null===t.iconclass&&null===t.display)throw'textAngular Error: Tool Definition for updating "'+e+'" does not have a valid display/iconclass/buttontext value';null===t.buttontext&&delete t.buttontext,null===t.iconclass&&delete t.iconclass,null===t.display&&delete t.display;var i=u(t,r);r.$element.replaceWith(i),r.$element=i}},a.addTool=function(e,t,n,i){a.tools[e]=angular.extend(a.$new(!0),r[e],c,{name:e}),a.tools[e].$element=u(r[e],a.tools[e]);var o;void 0===n&&(n=a.toolbar.length-1),o=angular.element(s.children()[n]),void 0===i?(o.append(a.tools[e].$element),a.toolbar[n][a.toolbar[n].length-1]=e):(o.children().eq(i).after(a.tools[e].$element),a.toolbar[n][i]=e)},t.registerToolbar(a),a.$on("$destroy",function(){t.unregisterToolbar(a.name)})}}}])}()}({},function(){return this}())},function(e,t,n){var r,i;(function(){function n(e){function t(t,n,r,i,o,a){for(;o>=0&&a>o;o+=e){var s=i?i[o]:o;r=n(r,t[s],s,t)}return r}return function(n,r,i,o){r=C(r,o,4);var a=!R(n)&&x.keys(n),s=(a||n).length,l=e>0?0:s-1;return arguments.length<3&&(i=n[a?a[l]:l],l+=e),t(n,r,i,a,l,s)}}function o(e){return function(t,n,r){n=E(n,r);for(var i=O(t),o=e>0?0:i-1;o>=0&&i>o;o+=e)if(n(t[o],o,t))return o;return-1}}function a(e,t,n){return function(r,i,o){var a=0,s=O(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=t(h.call(r,a,s),x.isNaN),o>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&s>o;o+=e)if(r[o]===i)return o;return-1}}function s(e,t){var n=L.length,r=e.constructor,i=x.isFunction(r)&&r.prototype||f,o="constructor";for(x.has(e,o)&&!x.contains(t,o)&&t.push(o);n--;)o=L[n],o in e&&e[o]!==i[o]&&!x.contains(t,o)&&t.push(o)}var l=this,u=l._,c=Array.prototype,f=Object.prototype,d=Function.prototype,p=c.push,h=c.slice,g=f.toString,v=f.hasOwnProperty,m=Array.isArray,y=Object.keys,b=d.bind,w=Object.create,$=function(){},x=function(e){return e instanceof x?e:this instanceof x?void(this._wrapped=e):new x(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=x),t._=x,x.VERSION="1.8.3";var C=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},E=function(e,t,n){return null==e?x.identity:x.isFunction(e)?C(e,t,n):x.isObject(e)?x.matcher(e):x.property(e)};x.iteratee=function(e,t){return E(e,t,1/0)};var _=function(e,t){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var o=arguments[i],a=e(o),s=a.length,l=0;s>l;l++){var u=a[l];t&&void 0!==n[u]||(n[u]=o[u])}return n}},k=function(e){if(!x.isObject(e))return{};if(w)return w(e);$.prototype=e;var t=new $;return $.prototype=null,t},S=function(e){return function(t){return null==t?void 0:t[e]}},T=Math.pow(2,53)-1,O=S("length"),R=function(e){var t=O(e);return"number"==typeof t&&t>=0&&T>=t};x.each=x.forEach=function(e,t,n){t=C(t,n);var r,i;if(R(e))for(r=0,i=e.length;i>r;r++)t(e[r],r,e);else{var o=x.keys(e);for(r=0,i=o.length;i>r;r++)t(e[o[r]],o[r],e)}return e},x.map=x.collect=function(e,t,n){t=E(t,n);for(var r=!R(e)&&x.keys(e),i=(r||e).length,o=Array(i),a=0;i>a;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o},x.reduce=x.foldl=x.inject=n(1),x.reduceRight=x.foldr=n(-1),x.find=x.detect=function(e,t,n){var r;return r=R(e)?x.findIndex(e,t,n):x.findKey(e,t,n),void 0!==r&&-1!==r?e[r]:void 0},x.filter=x.select=function(e,t,n){var r=[];return t=E(t,n),x.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},x.reject=function(e,t,n){return x.filter(e,x.negate(E(t)),n)},x.every=x.all=function(e,t,n){t=E(t,n);for(var r=!R(e)&&x.keys(e),i=(r||e).length,o=0;i>o;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},x.some=x.any=function(e,t,n){t=E(t,n);for(var r=!R(e)&&x.keys(e),i=(r||e).length,o=0;i>o;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},x.contains=x.includes=x.include=function(e,t,n,r){return R(e)||(e=x.values(e)),("number"!=typeof n||r)&&(n=0),x.indexOf(e,t,n)>=0},x.invoke=function(e,t){var n=h.call(arguments,2),r=x.isFunction(t);return x.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},x.pluck=function(e,t){return x.map(e,x.property(t))},x.where=function(e,t){return x.filter(e,x.matcher(t))},x.findWhere=function(e,t){return x.find(e,x.matcher(t))},x.max=function(e,t,n){var r,i,o=-(1/0),a=-(1/0);if(null==t&&null!=e){e=R(e)?e:x.values(e);for(var s=0,l=e.length;l>s;s++)r=e[s],r>o&&(o=r)}else t=E(t,n),x.each(e,function(e,n,r){i=t(e,n,r),(i>a||i===-(1/0)&&o===-(1/0))&&(o=e,a=i)});return o},x.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t&&null!=e){e=R(e)?e:x.values(e);for(var s=0,l=e.length;l>s;s++)r=e[s],o>r&&(o=r)}else t=E(t,n),x.each(e,function(e,n,r){i=t(e,n,r),(a>i||i===1/0&&o===1/0)&&(o=e,a=i)});return o},x.shuffle=function(e){for(var t,n=R(e)?e:x.values(e),r=n.length,i=Array(r),o=0;r>o;o++)t=x.random(0,o),t!==o&&(i[o]=i[t]),i[t]=n[o];return i},x.sample=function(e,t,n){return null==t||n?(R(e)||(e=x.values(e)),e[x.random(e.length-1)]):x.shuffle(e).slice(0,Math.max(0,t))},x.sortBy=function(e,t,n){return t=E(t,n),x.pluck(x.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var A=function(e){return function(t,n,r){var i={};return n=E(n,r),x.each(t,function(r,o){var a=n(r,o,t);e(i,r,a)}),i}};x.groupBy=A(function(e,t,n){x.has(e,n)?e[n].push(t):e[n]=[t]}),x.indexBy=A(function(e,t,n){e[n]=t}),x.countBy=A(function(e,t,n){x.has(e,n)?e[n]++:e[n]=1}),x.toArray=function(e){return e?x.isArray(e)?h.call(e):R(e)?x.map(e,x.identity):x.values(e):[]},x.size=function(e){return null==e?0:R(e)?e.length:x.keys(e).length},x.partition=function(e,t,n){t=E(t,n);var r=[],i=[];return x.each(e,function(e,n,o){(t(e,n,o)?r:i).push(e)}),[r,i]},x.first=x.head=x.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:x.initial(e,e.length-t)},x.initial=function(e,t,n){return h.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},x.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:x.rest(e,Math.max(0,e.length-t))},x.rest=x.tail=x.drop=function(e,t,n){return h.call(e,null==t||n?1:t)},x.compact=function(e){return x.filter(e,x.identity)};var M=function(e,t,n,r){for(var i=[],o=0,a=r||0,s=O(e);s>a;a++){var l=e[a];if(R(l)&&(x.isArray(l)||x.isArguments(l))){t||(l=M(l,t,n));var u=0,c=l.length;for(i.length+=c;c>u;)i[o++]=l[u++]}else n||(i[o++]=l)}return i};x.flatten=function(e,t){return M(e,t,!1)},x.without=function(e){return x.difference(e,h.call(arguments,1))},x.uniq=x.unique=function(e,t,n,r){x.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=E(n,r));for(var i=[],o=[],a=0,s=O(e);s>a;a++){var l=e[a],u=n?n(l,a,e):l;t?(a&&o===u||i.push(l),o=u):n?x.contains(o,u)||(o.push(u),i.push(l)):x.contains(i,l)||i.push(l)}return i},x.union=function(){return x.uniq(M(arguments,!0,!0))},x.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=O(e);i>r;r++){var o=e[r];if(!x.contains(t,o)){for(var a=1;n>a&&x.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},x.difference=function(e){var t=M(arguments,!0,!0,1);return x.filter(e,function(e){return!x.contains(t,e)})},x.zip=function(){return x.unzip(arguments)},x.unzip=function(e){for(var t=e&&x.max(e,O).length||0,n=Array(t),r=0;t>r;r++)n[r]=x.pluck(e,r);return n},x.object=function(e,t){for(var n={},r=0,i=O(e);i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},x.findIndex=o(1),x.findLastIndex=o(-1),x.sortedIndex=function(e,t,n,r){n=E(n,r,1);for(var i=n(t),o=0,a=O(e);a>o;){var s=Math.floor((o+a)/2);n(e[s])o;o++,e+=n)i[o]=e;return i};var D=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=k(e.prototype),a=e.apply(o,i);return x.isObject(a)?a:o};x.bind=function(e,t){if(b&&e.bind===b)return b.apply(e,h.call(arguments,1));if(!x.isFunction(e))throw new TypeError("Bind must be called on a function");var n=h.call(arguments,2),r=function(){return D(e,r,t,this,n.concat(h.call(arguments)))};return r},x.partial=function(e){var t=h.call(arguments,1),n=function(){for(var r=0,i=t.length,o=Array(i),a=0;i>a;a++)o[a]=t[a]===x?arguments[r++]:t[a];for(;r=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=x.bind(e[n],e);return e},x.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return x.has(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},x.delay=function(e,t){var n=h.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=x.partial(x.delay,x,1),x.throttle=function(e,t,n){var r,i,o,a=null,s=0;n||(n={});var l=function(){s=n.leading===!1?0:x.now(),a=null,o=e.apply(r,i),a||(r=i=null)};return function(){var u=x.now();s||n.leading!==!1||(s=u);var c=t-(u-s);return r=this,i=arguments,0>=c||c>t?(a&&(clearTimeout(a),a=null),s=u,o=e.apply(r,i),a||(r=i=null)):a||n.trailing===!1||(a=setTimeout(l,c)),o}},x.debounce=function(e,t,n){var r,i,o,a,s,l=function(){var u=x.now()-a;t>u&&u>=0?r=setTimeout(l,t-u):(r=null,n||(s=e.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=x.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(s=e.apply(o,i),o=i=null),s}},x.wrap=function(e,t){return x.partial(t,e)},x.negate=function(e){return function(){return!e.apply(this,arguments)}},x.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},x.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},x.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},x.once=x.partial(x.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(e){if(!x.isObject(e))return[];if(y)return y(e);var t=[];for(var n in e)x.has(e,n)&&t.push(n);return N&&s(e,t),t},x.allKeys=function(e){if(!x.isObject(e))return[];var t=[];for(var n in e)t.push(n);return N&&s(e,t),t},x.values=function(e){for(var t=x.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},x.mapObject=function(e,t,n){t=E(t,n);for(var r,i=x.keys(e),o=i.length,a={},s=0;o>s;s++)r=i[s],a[r]=t(e[r],r,e);return a},x.pairs=function(e){for(var t=x.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},x.invert=function(e){for(var t={},n=x.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=_(x.allKeys),x.extendOwn=x.assign=_(x.keys),x.findKey=function(e,t,n){t=E(t,n);for(var r,i=x.keys(e),o=0,a=i.length;a>o;o++)if(r=i[o],t(e[r],r,e))return r},x.pick=function(e,t,n){var r,i,o={},a=e;if(null==a)return o;x.isFunction(t)?(i=x.allKeys(a),r=C(t,n)):(i=M(arguments,!1,!1,1),r=function(e,t,n){return t in n},a=Object(a));for(var s=0,l=i.length;l>s;s++){var u=i[s],c=a[u];r(c,u,a)&&(o[u]=c)}return o},x.omit=function(e,t,n){if(x.isFunction(t))t=x.negate(t);else{var r=x.map(M(arguments,!1,!1,1),String);t=function(e,t){return!x.contains(r,t)}}return x.pick(e,t,n)},x.defaults=_(x.allKeys,!0),x.create=function(e,t){var n=k(e);return t&&x.extendOwn(n,t),n},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e},x.isMatch=function(e,t){var n=x.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;r>o;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0};var P=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof x&&(e=e._wrapped),t instanceof x&&(t=t._wrapped);var i=g.call(e);if(i!==g.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(x.isFunction(a)&&a instanceof a&&x.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var l=n.length;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),o){if(l=e.length,l!==t.length)return!1;for(;l--;)if(!P(e[l],t[l],n,r))return!1}else{var u,c=x.keys(e);if(l=c.length,x.keys(t).length!==l)return!1;for(;l--;)if(u=c[l],!x.has(t,u)||!P(e[u],t[u],n,r))return!1}return n.pop(), -r.pop(),!0};x.isEqual=function(e,t){return P(e,t)},x.isEmpty=function(e){return null==e?!0:R(e)&&(x.isArray(e)||x.isString(e)||x.isArguments(e))?0===e.length:0===x.keys(e).length},x.isElement=function(e){return!(!e||1!==e.nodeType)},x.isArray=m||function(e){return"[object Array]"===g.call(e)},x.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},x.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){x["is"+e]=function(t){return g.call(t)==="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return x.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(x.isFunction=function(e){return"function"==typeof e||!1}),x.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},x.isNaN=function(e){return x.isNumber(e)&&e!==+e},x.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===g.call(e)},x.isNull=function(e){return null===e},x.isUndefined=function(e){return void 0===e},x.has=function(e,t){return null!=e&&v.call(e,t)},x.noConflict=function(){return l._=u,this},x.identity=function(e){return e},x.constant=function(e){return function(){return e}},x.noop=function(){},x.property=S,x.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},x.matcher=x.matches=function(e){return e=x.extendOwn({},e),function(t){return x.isMatch(t,e)}},x.times=function(e,t,n){var r=Array(Math.max(0,e));t=C(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},x.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},x.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},j=x.invert(F),I=function(e){var t=function(t){return e[t]},n="(?:"+x.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};x.escape=I(F),x.unescape=I(j),x.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),x.isFunction(r)?r.call(e):r};var V=0;x.uniqueId=function(e){var t=++V+"";return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\u2028|\u2029/g,z=function(e){return"\\"+W[e]};x.template=function(e,t,n){!t&&n&&(t=n),t=x.defaults({},t,x.templateSettings);var r=RegExp([(t.escape||H).source,(t.interpolate||H).source,(t.evaluate||H).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(t,n,r,a,s){return o+=e.slice(i,s).replace(B,z),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(s){throw s.source=o,s}var l=function(e){return a.call(this,e,x)},u=t.variable||"obj";return l.source="function("+u+"){\n"+o+"}",l},x.chain=function(e){var t=x(e);return t._chain=!0,t};var U=function(e,t){return e._chain?x(t).chain():t};x.mixin=function(e){x.each(x.functions(e),function(t){var n=x[t]=e[t];x.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),U(this,n.apply(x,e))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=c[e];x.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],U(this,n)}}),x.each(["concat","join","slice"],function(e){var t=c[e];x.prototype[e]=function(){return U(this,t.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return x}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)}]); \ No newline at end of file +function(){"use strict";function e(e){try{return 0!==angular.element(e).length}catch(t){return!1}}function t(t,n){if(!t||""===t||m.hasOwnProperty(t))throw"textAngular Error: A unique name is required for a Tool Definition";if(n.display&&(""===n.display||!e(n.display))||!n.display&&!n.buttontext&&!n.iconclass)throw'textAngular Error: Tool Definition for "'+t+'" does not have a valid display/iconclass/buttontext value';m[t]=n}var n={ie:function(){for(var e,t=3,n=document.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="",r[0];);return t>4?t:e}(),webkit:/AppleWebKit\/([\d.]+)/i.test(navigator.userAgent)},r=!1;n.webkit&&(document.addEventListener("mousedown",function(e){var t=e||window.event,n=t.target;if(r&&null!==n){for(var i=!1,o=n;null!==o&&"html"!==o.tagName.toLowerCase()&&!i;)i="true"===o.contentEditable,o=o.parentNode;i||(document.getElementById("textAngular-editableFix-010203040506070809").setSelectionRange(0,0),n.focus(),n.select&&n.select())}r=!1},!1),angular.element(document).ready(function(){angular.element(document.body).append(angular.element(''))}));var i=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video)$/i,o=/^(ul|li|ol)$/i,a=/^(address|article|aside|audio|blockquote|canvas|dd|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|noscript|ol|output|p|pre|section|table|tfoot|ul|video|li)$/i;String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var s,l,u,c,f,d;if(n.ie>8||void 0===n.ie){for(var p=document.styleSheets,h=0;h
    ");return r[0].innerHTML=n,angular.forEach(e,function(e){var n=[];e.selector&&""!==e.selector?n=r.find(e.selector):e.customAttribute&&""!==e.customAttribute&&(n=t.getByAttribute(r,e.customAttribute)),angular.forEach(n,function(t){t=angular.element(t),e.selector&&""!==e.selector&&e.customAttribute&&""!==e.customAttribute?void 0!==t.attr(e.customAttribute)&&e.renderLogic(t):e.renderLogic(t)})}),r[0].innerHTML}}]).factory("taFixChrome",function(){var e=function(e){if(!e||!angular.isString(e)||e.length<=0)return e;for(var t,n,r,i=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,o="",a=0;t=i.exec(e);)n=t[3]||t[4],n&&n.match(/line-height: 1.[0-9]{3,12};|color: inherit; line-height: 1.1;/i)&&(n=n.replace(/( |)font-family: inherit;|( |)line-height: 1.[0-9]{3,12};|( |)color: inherit;/gi,""),r="<"+t[1].trim(),n.trim().length>0&&(r+=" style="+t[2].substring(0,1)+n+t[2].substring(0,1)),r+=t[5].trim()+">",o+=e.substring(a,t.index)+r,a=t.index+t[0].length);return o+=e.substring(a),a>0?o.replace(/(.*?)<\/span>(|)/gi,"$1"):e};return e}).factory("taSanitize",["$sanitize",function(e){function t(e,t){for(var n,r=0,i=0,o=/<[^>]*>/gi;n=o.exec(e);)if(i=n.index,"/"===n[0].substr(1,1)){if(0===r)break;r--}else r++;return t+e.substring(0,i)+angular.element(t)[0].outerHTML.substring(t.length)+e.substring(i)}function n(e){if(!e||!angular.isString(e)||e.length<=0)return e;for(var r,o,a,s,l,c,f=/<([^>\/]+?)style=("([^"]+)"|'([^']+)')([^>]*)>/gi,d="",p="",h=0;o=f.exec(e);){s=o[3]||o[4];var g=new RegExp(u,"i");if(angular.isString(s)&&g.test(s)){l="";for(var v=new RegExp(u,"ig");a=v.exec(s);)for(r=0;r");c=n(e.substring(h,o.index)),p+=d.length>0?t(c,d):c,s=s.replace(new RegExp(u,"ig"),""),p+="<"+o[1].trim(),s.length>0&&(p+=' style="'+s+'"'),p+=o[5]+">",h=o.index+o[0].length,d=l}}return p+=d.length>0?t(e.substring(h),d):e.substring(h)}function r(e){if(!e||!angular.isString(e)||e.length<=0)return e;for(var t,n=/<([^>\/]+?)align=("([^"]+)"|'([^']+)')([^>]*)>/gi,r="",i=0;t=n.exec(e);){r+=e.substring(i,t.index),i=t.index+t[0].length;var o="<"+t[1]+t[5];/style=("([^"]+)"|'([^']+)')/gi.test(o)?o=o.replace(/style=("([^"]+)"|'([^']+)')/i,'style="$2$3 text-align:'+(t[3]||t[4])+';"'):o+=' style="text-align:'+(t[3]||t[4])+';"',o+=">",r+=o}return r+e.substring(i)}for(var i=[{property:"font-weight",values:["bold"],tag:"b"},{property:"font-style",values:["italic"],tag:"i"}],o=[],a=0;a0&&(s+="|"),s+=i[a].values[l];s+=");)",o.push(s)}var u="("+o.join("|")+")";return function(t,i,o){if(!o)try{t=n(t)}catch(a){}t=r(t);var s;try{s=e(t),o&&(s=t)}catch(a){s=i||""}var l,u=s.match(/(]*>.*?<\/pre[^>]*>)/gi),c=s.replace(/(&#(9|10);)*/gi,""),f=/]*>.*?<\/pre[^>]*>/gi,d=0,p=0;for(s="";null!==(l=f.exec(c))&&d=0;i--)r=angular.element("<"+n+">"+o[i].innerHTML+""),t.after(r);t.remove(),e.setSelectionToElementEnd(r[0])},a=function(t){/()$/i.test(t.innerHTML.trim())?e.setSelectionBeforeElement(angular.element(t).find("br")[0]):e.setSelectionToElementEnd(t)},s=function(e,t){var n=angular.element("<"+t+">"+e[0].innerHTML+"");e.after(n),e.remove(),a(n.find("li")[0])},l=function(e,n,r){for(var i="",o=0;o"+e[o].innerHTML+"";var s=angular.element("<"+r+">"+i+"");n.after(s),n.remove(),a(s.find("li")[0])};return function(a,u){return a=t(a),function(c,f,d,p){var h,g,v,m,y,b,w,$=angular.element("<"+a+">");try{w=e.getSelectionElement()}catch(x){}var C=angular.element(w);if(void 0!==w){var _=w.tagName.toLowerCase();if("insertorderedlist"===c.toLowerCase()||"insertunorderedlist"===c.toLowerCase()){var E=t("insertorderedlist"===c.toLowerCase()?"ol":"ul");if(_===E)return r(C,a);if("li"===_&&C.parent()[0].tagName.toLowerCase()===E&&1===C.parent().children().length)return r(C.parent(),a);if("li"===_&&C.parent()[0].tagName.toLowerCase()!==E&&1===C.parent().children().length)return s(C.parent(),E);if(_.match(i)&&!C.hasClass("ta-bind")){if("ol"===_||"ul"===_)return s(C,E);var k=!1;return angular.forEach(C.children(),function(e){e.tagName.match(i)&&(k=!0)}),k?l(C.children(),C,E):l([angular.element("
    "+w.innerHTML+"
    ")[0]],C,E)}if(_.match(i)){if(m=e.getOnlySelectedElements(),0===m.length)g=angular.element("<"+E+">
  • "+w.innerHTML+"
  • "),C.html(""),C.append(g);else{if(1===m.length&&("ol"===m[0].tagName.toLowerCase()||"ul"===m[0].tagName.toLowerCase()))return m[0].tagName.toLowerCase()===E?r(angular.element(m[0]),a):s(angular.element(m[0]),E);v="";var S=[];for(h=0;h"+T[0].innerHTML+"":T[0].childNodes[0].innerHTML,S.unshift(T)}g=angular.element("<"+E+">"+v+""),S.pop().replaceWith(g),angular.forEach(S,function(e){e.remove()})}return void e.setSelectionToElementEnd(g[0])}}else{if("formatblock"===c.toLowerCase()){for(b=d.toLowerCase().replace(/[<>]/gi,""),"default"===b.trim()&&(b=a,d="<"+a+">"),g="li"===_?C.parent():C;!g[0].tagName||!g[0].tagName.match(i)&&!g.parent().attr("contenteditable");)g=g.parent(),_=(g[0].tagName||"").toLowerCase();if(_===b){m=g.children();var O=!1;for(h=0;h=0;h--)m[h].parentNode&&m[h].parentNode.removeChild(m[h])}else for(h=0;h"),$[0].innerHTML=A[h].outerHTML,A[h]=$[0]),R.parent()[0].insertBefore(A[h],R[0]);R.remove()}return void e.setSelectionToElementEnd(g[0])}if("createlink"===c.toLowerCase()){var M='',D="",N=e.getSelection();if(N.collapsed)e.insertHtml(M+d+D,u);else if(rangy.getSelection().getRangeAt(0).canSurroundContents()){var L=angular.element(M+D)[0];rangy.getSelection().getRangeAt(0).surroundContents(L)}return}if("inserthtml"===c.toLowerCase())return void e.insertHtml(d,u)}}try{n[0].execCommand(c,f,d)}catch(x){}}}}]).service("taSelection",["$window","$document","taDOM",function(e,t,n){var r=t[0],o=e.rangy,s=function(e,t){return e.tagName&&e.tagName.match(/^br$/i)&&0===t&&!e.previousSibling?{element:e.parentNode,offset:0}:{element:e,offset:t}},l={getSelection:function(){var e=o.getSelection().getRangeAt(0),t=e.commonAncestorContainer,n={start:s(e.startContainer,e.startOffset),end:s(e.endContainer,e.endOffset),collapsed:e.collapsed};return t=3===t.nodeType?t.parentNode:t,n.container=t.parentNode===n.start.element||t.parentNode===n.end.element?t.parentNode:t,n},getOnlySelectedElements:function(){var e=o.getSelection().getRangeAt(0),t=e.commonAncestorContainer;return t=3===t.nodeType?t.parentNode:t,e.getNodes([1],function(e){return e.parentNode===t})},getSelectionElement:function(){return l.getSelection().container},setSelection:function(e,t,n){var r=o.createRange();r.setStart(e,t),r.setEnd(e,n),o.getSelection().setSingleRange(r)},setSelectionBeforeElement:function(e){var t=o.createRange();t.selectNode(e),t.collapse(!0),o.getSelection().setSingleRange(t)},setSelectionAfterElement:function(e){var t=o.createRange();t.selectNode(e),t.collapse(!1),o.getSelection().setSingleRange(t)},setSelectionToElementStart:function(e){var t=o.createRange();t.selectNodeContents(e),t.collapse(!0),o.getSelection().setSingleRange(t)},setSelectionToElementEnd:function(e){var t=o.createRange();t.selectNodeContents(e),t.collapse(!1),e.childNodes&&e.childNodes[e.childNodes.length-1]&&"br"===e.childNodes[e.childNodes.length-1].nodeName&&(t.startOffset=t.endOffset=t.startOffset-1),o.getSelection().setSingleRange(t)},insertHtml:function(e,t){var s,u,c,f,d,p,h,g=angular.element("
    "+e+"
    "),v=o.getSelection().getRangeAt(0),m=r.createDocumentFragment(),y=g[0].childNodes,b=!0;if(y.length>0){for(f=[],c=0;c)$/i.test(v.startContainer.innerHTML)&&v.selectNode(v.startContainer)}else b=!0,p=m=r.createTextNode(e);if(b)v.deleteContents();else if(v.collapsed&&v.startContainer!==t)if(v.startContainer.innerHTML&&v.startContainer.innerHTML.match(/^<[^>]*>$/i))s=v.startContainer,1===v.startOffset?(v.setStartAfter(s),v.setEndAfter(s)):(v.setStartBefore(s),v.setEndBefore(s));else{if(3===v.startContainer.nodeType&&v.startContainer.parentNode!==t)for(s=v.startContainer.parentNode,u=s.cloneNode(),n.splitNodes(s.childNodes,s,u,v.startContainer,v.startOffset);!a.test(s.nodeName);){angular.element(s).after(u),s=s.parentNode;var $=u;u=s.cloneNode(),n.splitNodes(s.childNodes,s,u,$)}else s=v.startContainer,u=s.cloneNode(),n.splitNodes(s.childNodes,s,u,void 0,void 0,v.startOffset);if(angular.element(s).after(u),v.setStartAfter(s),v.setEndAfter(s),/^(|)$/i.test(s.innerHTML.trim())&&(v.setStartBefore(s),v.setEndBefore(s),angular.element(s).remove()),/^(|)$/i.test(u.innerHTML.trim())&&angular.element(u).remove(),"li"===s.nodeName.toLowerCase()){for(h=r.createDocumentFragment(),d=0;d"),n.transferChildNodes(m.childNodes[d],g[0]),n.transferNodeAttributes(m.childNodes[d],g[0]),h.appendChild(g[0]);m=h,p&&(p=m.childNodes[m.childNodes.length-1],p=p.childNodes[p.childNodes.length-1])}}else v.deleteContents();v.insertNode(m),p&&l.setSelectionToElementEnd(p)}};return l}]).service("taDOM",function(){var e={getByAttribute:function(t,n){var r=[],i=t.children();return i.length&&angular.forEach(i,function(t){r=r.concat(e.getByAttribute(angular.element(t),n))}),void 0!==t.attr(n)&&r.push(t),r},transferChildNodes:function(e,t){for(t.innerHTML="";e.childNodes.length>0;)t.appendChild(e.childNodes[0]);return t},splitNodes:function(t,n,r,i,o,a){if(!i&&isNaN(a))throw new Error("taDOM.splitNodes requires a splitNode or splitIndex");for(var s=document.createDocumentFragment(),l=document.createDocumentFragment(),u=0;t.length>0&&(isNaN(a)||a!==u)&&t[0]!==i;)s.appendChild(t[0]),u++;for(!isNaN(o)&&o>=0&&t[0]&&(s.appendChild(document.createTextNode(t[0].nodeValue.substring(0,o))),t[0].nodeValue=t[0].nodeValue.substring(o));t.length>0;)l.appendChild(t[0]);e.transferChildNodes(s,n),e.transferChildNodes(l,r)},transferNodeAttributes:function(e,t){for(var n=0;n");return t.html(e),t.text().length<=i}}}}).directive("taMinText",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){var i=parseInt(e.$eval(n.taMinText));if(isNaN(i))throw"Min text must be an integer";n.$observe("taMinText",function(e){if(i=parseInt(e),isNaN(i))throw"Min text must be an integer";r.$dirty&&r.$validate()}),r.$validators.taMinText=function(e){var t=angular.element("
    ");return t.html(e),!t.text().length||t.text().length>=i}}}}),angular.module("textAngular.taBind",["textAngular.factories","textAngular.DOM"]).service("_taBlankTest",[function(){var e=/<(a|abbr|acronym|bdi|bdo|big|cite|code|del|dfn|img|ins|kbd|label|map|mark|q|ruby|rp|rt|s|samp|time|tt|var)[^>]*(>|$)/i;return function(t){return function(n){if(!n)return!0;var r,i=/(^[^<]|>)[^<]/i.exec(n);return i?r=i.index:(n=n.toString().replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,"").replace(/="[^"]*"/i,""),r=n.indexOf(">")),n=n.trim().substring(r,r+100),/^[^<>]+$/i.test(n)?!1:0===n.length||n===t||/^>(\s| )*<\/[^>]+>$/gi.test(n)?!0:/>\s*[^\s<]/i.test(n)||e.test(n)?!1:!0}}}]).directive("taButton",[function(){return{link:function(e,t){t.attr("unselectable","on"),t.on("mousedown",function(e,t){return t&&angular.extend(e,t),e.preventDefault(),!1})}}}]).directive("taBind",["taSanitize","$timeout","$window","$document","taFixChrome","taBrowserTag","taSelection","taSelectableElements","taApplyCustomRenderers","taOptions","_taBlankTest","$parse","taDOM",function(e,t,o,s,c,f,d,p,h,v,m,y,b){return{priority:2,require:["ngModel","?ngModelOptions"],link:function(f,w,$,x){var C,_,E,k,S=x[0],T=x[1]||{},O=void 0!==w.attr("contenteditable")&&w.attr("contenteditable"),R=O||"textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase(),A=!1,M=!1,D=!1,N=$.taUnsafeSanitizer||v.disableSanitizer,L=/^(9|19|20|27|33|34|35|36|37|38|39|40|45|112|113|114|115|116|117|118|119|120|121|122|123|144|145)$/i,P=/^(8|13|32|46|59|61|107|109|186|187|188|189|190|191|192|219|220|221|222)$/i;void 0===$.taDefaultWrap&&($.taDefaultWrap="p"),""===$.taDefaultWrap?(E="",k=void 0===n.ie?"

    ":n.ie>=11?"


    ":n.ie<=8?"

     

    ":"

     

    "):(E=void 0===n.ie||n.ie>=11?"<"+$.taDefaultWrap+">
    ":n.ie<=8?"<"+$.taDefaultWrap.toUpperCase()+">":"<"+$.taDefaultWrap+">",k=void 0===n.ie||n.ie>=11?"<"+$.taDefaultWrap+">
    ":n.ie<=8?"<"+$.taDefaultWrap.toUpperCase()+"> ":"<"+$.taDefaultWrap+"> "),T.$options||(T.$options={});var F=m(k),I=function(e){if(F(e))return e;var t=angular.element("
    "+e+"
    ");if(0===t.children().length)e="<"+$.taDefaultWrap+">"+e+"";else{var n,r=t[0].childNodes,o=!1;for(n=0;n"+a+"":a}else e="<"+$.taDefaultWrap+">"+e+""}return e};$.taPaste&&(_=y($.taPaste)),w.addClass("ta-bind");var j;f["$undoManager"+($.id||"")]=S.$undoManager={_stack:[],_index:0,_max:1e3,push:function(e){return"undefined"==typeof e||null===e||"undefined"!=typeof this.current()&&null!==this.current()&&e===this.current()?e:(this._indexthis._max&&this._stack.shift(),this._index=this._stack.length-1,e)},undo:function(){return this.setToIndex(this._index-1)},redo:function(){return this.setToIndex(this._index+1)},setToIndex:function(e){return 0>e||e>this._stack.length-1?void 0:(this._index=e,this.current())},current:function(){return this._stack[this._index]}};var V,H=f["$undoTaBind"+($.id||"")]=function(){if(!A&&O){var e=S.$undoManager.undo();"undefined"!=typeof e&&null!==e&&(ne(e),z(e,!1),V&&t.cancel(V),V=t(function(){w[0].focus(),d.setSelectionToElementEnd(w[0])},1))}},W=f["$redoTaBind"+($.id||"")]=function(){if(!A&&O){var e=S.$undoManager.redo();"undefined"!=typeof e&&null!==e&&(ne(e),z(e,!1),V&&t.cancel(V),V=t(function(){w[0].focus(),d.setSelectionToElementEnd(w[0])},1))}},B=function(){if(O)return w[0].innerHTML;if(R)return w.val();throw"textAngular Error: attempting to update non-editable taBind"},z=function(e,t,n){D=n||!1,("undefined"==typeof t||null===t)&&(t=!0&&O),("undefined"==typeof e||null===e)&&(e=B()),F(e)?(""!==S.$viewValue&&S.$setViewValue(""),t&&""!==S.$undoManager.current()&&S.$undoManager.push("")):(te(),S.$viewValue!==e&&(S.$setViewValue(e),t&&S.$undoManager.push(e))),S.$render()};f["updateTaBind"+($.id||"")]=function(){A||z(void 0,void 0,!0)};var U=function(t){return S.$oldViewValue=e(c(t),S.$oldViewValue,N)};if(w.attr("required")&&(S.$validators.required=function(e,t){return!F(e||t)}),S.$parsers.push(U),S.$parsers.unshift(I),S.$formatters.push(U),S.$formatters.unshift(I),S.$formatters.unshift(function(e){return S.$undoManager.push(e||"")}),R)if(f.events={},O){var q=!1,G=function(n){if(n&&n.trim().length){if(n.match(/class=["']*Mso(Normal|List)/i)){var r=n.match(/([\s\S]*?)/i);r=r?r[1]:n,r=r.replace(/[\s\S]*?<\/o:p>/gi,"").replace(/class=(["']|)MsoNormal(["']|)/gi,"");var i=angular.element("
    "+r+"
    "),o=angular.element("
    "),a={element:null,lastIndent:[],lastLi:null,isUl:!1};a.lastIndent.peek=function(){var e=this.length;return e>0?this[e-1]:void 0};for(var s=function(e){a.isUl=e,a.element=angular.element(e?"
      ":"
        "),a.lastIndent=[],a.lastIndent.peek=function(){var e=this.length;return e>0?this[e-1]:void 0},a.lastLevelMatch=null},l=0;l<=i[0].childNodes.length;l++)if(i[0].childNodes[l]&&"#text"!==i[0].childNodes[l].nodeName&&"p"===i[0].childNodes[l].tagName.toLowerCase()){var u=angular.element(i[0].childNodes[l]),c=(u.attr("class")||"").match(/MsoList(Bullet|Number|Paragraph)(CxSp(First|Middle|Last)|)/i);if(c){if(u[0].childNodes.length<2||u[0].childNodes[1].childNodes.length<1)continue;var p="bullet"===c[1].toLowerCase()||"number"!==c[1].toLowerCase()&&!(/^[^0-9a-z<]*[0-9a-z]+[^0-9a-z<>]]":"
          "),a.lastLi.append(a.element);else if(null!=a.lastIndent.peek()&&a.lastIndent.peek()>g){for(;null!=a.lastIndent.peek()&&a.lastIndent.peek()>g;)if("li"!==a.element.parent()[0].tagName.toLowerCase()){if(!/[uo]l/i.test(a.element.parent()[0].tagName.toLowerCase()))break;a.element=a.element.parent(),a.lastIndent.pop()}else a.element=a.element.parent();a.isUl="ul"===a.element[0].tagName.toLowerCase(),p!==a.isUl&&(s(p),o.append(a.element))}a.lastLevelMatch=v,g!==a.lastIndent.peek()&&a.lastIndent.push(g),a.lastLi=angular.element("
        1. "),a.element.append(a.lastLi),a.lastLi.html(u.html().replace(/[\s\S]*?/gi,"")),u.remove()}else s(!1),o.append(u)}var m=function(e){e=angular.element(e);for(var t=e[0].childNodes.length-1;t>=0;t--)e.after(e[0].childNodes[t]);e.remove()};angular.forEach(o.find("span"),function(e){e.removeAttribute("lang"),e.attributes.length<=0&&m(e)}),angular.forEach(o.find("font"),m),n=o.html()}else{if(n=n.replace(/<(|\/)meta[^>]*?>/gi,""),n.match(/<[^>]*?(ta-bind)[^>]*?>/)){if(n.match(/<[^>]*?(text-angular)[^>]*?>/)){var y=angular.element("
          "+n+"
          ");y.find("textarea").remove();for(var $=b.getByAttribute(y,"ta-bind"),x=0;x<$.length;x++){for(var C=$[x][0].parentNode.parentNode,E=0;E<$[x][0].childNodes.length;E++)C.parentNode.insertBefore($[x][0].childNodes[E],C);C.parentNode.removeChild(C)}n=y.html().replace('
          ',"")}}else n.match(/^]*?>/gi,""));n=n.replace(/
          ]*?>/gi,"").replace(/( | )<\/span>/gi," ")}//i.test(n)&&/(|).*/i.test(n)===!1&&(n=n.replace(/.*<\/li(\s.*)?>/i,"
            $&
          ")),_&&(n=_(f,{$html:n})||n),n=e(n,"",N),d.insertHtml(n,w[0]),t(function(){S.$setViewValue(B()),q=!1,w.removeClass("processing-paste")},0)}else q=!1,w.removeClass("processing-paste")};w.on("paste",f.events.paste=function(e,n){if(n&&angular.extend(e,n),A||q)return e.stopPropagation(),e.preventDefault(),!1;q=!0,w.addClass("processing-paste");var r,i=(e.originalEvent||e).clipboardData;if(i&&i.getData&&i.types.length>0){for(var a="",l=0;l
    ');s.find("body").append(c),c[0].focus(),t(function(){o.rangy.restoreSelection(u),G(c[0].innerHTML),w[0].focus(),c.remove()},0)}),w.on("cut",f.events.cut=function(e){A?e.preventDefault():t(function(){S.$setViewValue(B())},0)}),w.on("keydown",f.events.keydown=function(e,t){if(t&&angular.extend(e,t),!A)if(e.altKey||!e.metaKey&&!e.ctrlKey){if(13===e.keyCode&&!e.shiftKey){var n,r=d.getSelectionElement();if(!r.tagName.match(a))return;var i=angular.element(E);if(/^$/i.test(r.innerHTML.trim())&&"blockquote"===r.parentNode.tagName.toLowerCase()&&!r.nextSibling){n=angular.element(r);var o=n.parent();o.after(i),n.remove(),0===o.children().length&&o.remove(),d.setSelectionToElementStart(i[0]),e.preventDefault()}else/^<[^>]+><\/[^>]+>$/i.test(r.innerHTML.trim())&&"blockquote"===r.tagName.toLowerCase()&&(n=angular.element(r),n.after(i),n.remove(),d.setSelectionToElementStart(i[0]),e.preventDefault())}}else 90!==e.keyCode||e.shiftKey?(90===e.keyCode&&e.shiftKey||89===e.keyCode&&!e.shiftKey)&&(W(),e.preventDefault()):(H(),e.preventDefault())});var K;if(w.on("keyup",f.events.keyup=function(e,n){if(n&&angular.extend(e,n),9===e.keyCode){var r=d.getSelection();return void(r.start.element===w[0]&&w.children().length&&d.setSelectionToElementStart(w.children()[0]))}if(j&&t.cancel(j),!A&&!L.test(e.keyCode)){if(""!==E&&13===e.keyCode&&!e.shiftKey){for(var i=d.getSelectionElement();!i.tagName.match(a)&&i!==w[0];)i=i.parentNode;if(i.tagName.toLowerCase()!==$.taDefaultWrap&&"li"!==i.tagName.toLowerCase()&&(""===i.innerHTML.trim()||"
    "===i.innerHTML.trim())){var s=angular.element(E);angular.element(i).replaceWith(s),d.setSelectionToElementStart(s[0])}}var l=B();if(""!==E&&""===l.trim())ne(E),d.setSelectionToElementStart(w.children()[0]);else if("<"!==l.substring(0,1)&&""!==$.taDefaultWrap){var u=o.rangy.saveSelection();l=B(),l="<"+$.taDefaultWrap+">"+l+"",ne(l),o.rangy.restoreSelection(u)}var c=C!==e.keyCode&&P.test(e.keyCode);K&&t.cancel(K),K=t(function(){z(l,c,!0)},T.$options.debounce||400),c||(j=t(function(){S.$undoManager.push(l)},250)),C=e.keyCode}}),w.on("blur",f.events.blur=function(){M=!1,A?(D=!0,S.$render()):z(void 0,void 0,!0)}),$.placeholder&&(n.ie>8||void 0===n.ie)){var Y;if(!$.id)throw"textAngular Error: An unique ID is required for placeholders to work";Y=l("#"+$.id+".placeholder-text:before",'content: "'+$.placeholder+'"'),f.$on("$destroy",function(){u(Y)})}w.on("focus",f.events.focus=function(){M=!0,w.removeClass("placeholder-text")}),w.on("mouseup",f.events.mouseup=function(){var e=d.getSelection();e.start.element===w[0]&&w.children().length&&d.setSelectionToElementStart(w.children()[0])}),w.on("mousedown",f.events.mousedown=function(e,t){t&&angular.extend(e,t),e.stopPropagation()})}else{w.on("change blur",f.events.change=f.events.blur=function(){A||S.$setViewValue(B())}),w.on("keydown",f.events.keydown=function(e,t){if(t&&angular.extend(e,t),9===e.keyCode){var n=this.selectionStart,r=this.selectionEnd,i=w.val();if(e.shiftKey){var o=i.lastIndexOf("\n",n),a=i.lastIndexOf(" ",n);-1!==a&&a>=o&&(w.val(i.substring(0,a)+i.substring(a+1)),this.selectionStart=this.selectionEnd=n-1)}else w.val(i.substring(0,n)+" "+i.substring(r)),this.selectionStart=this.selectionEnd=n+1;e.preventDefault()}});var Q=function(e,t){for(var n="",r=0;t>r;r++)n+=e;return n},X=function(e,t){var n="",r=e.childNodes;t++,n+=Q(" ",t-1)+e.outerHTML.substring(0,e.outerHTML.indexOf(""+e+"
    ")[0].childNodes;if(t.length>0){e="";for(var n=0;n0&&(e+="\n"),e+="ul"===t[n].nodeName.toLowerCase()||"ol"===t[n].nodeName.toLowerCase()?""+X(t[n],0):""+t[n].outerHTML)}return e})}var J,Z=function(e){return f.$emit("ta-element-select",this),e.preventDefault(),!1},ee=function(e,n){if(n&&angular.extend(e,n),!g&&!A){g=!0;var r;r=e.originalEvent?e.originalEvent.dataTransfer:e.dataTransfer,f.$emit("ta-drop-event",this,e,r),t(function(){g=!1,z(void 0,void 0,!0)},100)}},te=f["reApplyOnSelectorHandlers"+($.id||"")]=function(){A||angular.forEach(p,function(e){w.find(e).off("click",Z).on("click",Z)})},ne=function(e){w[0].innerHTML=e},re=!1;S.$render=function(){if(!re){re=!0;var e=S.$viewValue||"";D||(O&&M&&(w.removeClass("placeholder-text"),J&&t.cancel(J),J=t(function(){M||(w[0].focus(),d.setSelectionToElementEnd(w.children()[w.children().length-1])),J=void 0},1)),O?(ne($.placeholder?""===e?E:e:""===e?E:e),A?w.off("drop",ee):(te(),w.on("drop",ee))):"textarea"!==w[0].tagName.toLowerCase()&&"input"!==w[0].tagName.toLowerCase()?ne(h(e)):w.val(e)),O&&$.placeholder&&(""===e?M?w.removeClass("placeholder-text"):w.addClass("placeholder-text"):w.removeClass("placeholder-text")),re=D=!1}},$.taReadonly&&(A=f.$eval($.taReadonly),A?(w.addClass("ta-readonly"),("textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase())&&w.attr("disabled","disabled"),void 0!==w.attr("contenteditable")&&w.attr("contenteditable")&&w.removeAttr("contenteditable")):(w.removeClass("ta-readonly"),"textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase()?w.removeAttr("disabled"):O&&w.attr("contenteditable","true")),f.$watch($.taReadonly,function(e,t){t!==e&&(e?(w.addClass("ta-readonly"),("textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase())&&w.attr("disabled","disabled"),void 0!==w.attr("contenteditable")&&w.attr("contenteditable")&&w.removeAttr("contenteditable"),angular.forEach(p,function(e){w.find(e).on("click",Z)}),w.off("drop",ee)):(w.removeClass("ta-readonly"),"textarea"===w[0].tagName.toLowerCase()||"input"===w[0].tagName.toLowerCase()?w.removeAttr("disabled"):O&&w.attr("contenteditable","true"),angular.forEach(p,function(e){w.find(e).off("click",Z)}),w.on("drop",ee)),A=e)})),O&&!A&&(angular.forEach(p,function(e){w.find(e).on("click",Z)}),w.on("drop",ee),w.on("blur",function(){n.webkit&&(r=!0)}))}}}]);var g=!1,v=angular.module("textAngular",["ngSanitize","textAngularSetup","textAngular.factories","textAngular.DOM","textAngular.validators","textAngular.taBind"]),m={};v.constant("taRegisterTool",t),v.value("taTools",m),v.config([function(){angular.forEach(m,function(e,t){delete m[t]})}]),v.run([function(){if(!window.rangy)throw"rangy-core.js and rangy-selectionsaverestore.js are required for textAngular to work correctly, rangy-core is not yet loaded.";if(window.rangy.init(),!window.rangy.saveSelection)throw"rangy-selectionsaverestore.js is required for textAngular to work correctly."}]),v.directive("textAngular",["$compile","$timeout","taOptions","taSelection","taExecCommand","textAngularManager","$window","$document","$animate","$log","$q","$parse",function(e,t,n,r,i,o,a,s,l,u,c,f){return{require:"?ngModel",scope:{},restrict:"EA", +priority:2,link:function(d,p,h,g){var v,m,y,b,w,$,x,C,_,E,k,S=h.serial?h.serial:Math.floor(1e16*Math.random());d._name=h.name?h.name:"textAngularEditor"+S;var T=function(e,n,r){t(function(){var t=function(){e.off(n,t),r.apply(this,arguments)};e.on(n,t)},100)};if(_=i(h.taDefaultWrap),angular.extend(d,angular.copy(n),{wrapSelection:function(e,t,n){"undo"===e.toLowerCase()?d["$undoTaBindtaTextElement"+S]():"redo"===e.toLowerCase()?d["$redoTaBindtaTextElement"+S]():(_(e,!1,t,d.defaultTagAttributes),n&&d["reApplyOnSelectorHandlerstaTextElement"+S](),d.displayElements.text[0].focus())},showHtml:d.$eval(h.taShowHtml)||!1}),h.taFocussedClass&&(d.classes.focussed=h.taFocussedClass),h.taTextEditorClass&&(d.classes.textEditor=h.taTextEditorClass),h.taHtmlEditorClass&&(d.classes.htmlEditor=h.taHtmlEditorClass),h.taDefaultTagAttributes)try{angular.extend(d.defaultTagAttributes,angular.fromJson(h.taDefaultTagAttributes))}catch(O){u.error(O)}h.taTextEditorSetup&&(d.setup.textEditorSetup=d.$parent.$eval(h.taTextEditorSetup)),h.taHtmlEditorSetup&&(d.setup.htmlEditorSetup=d.$parent.$eval(h.taHtmlEditorSetup)),d.fileDropHandler=h.taFileDrop?d.$parent.$eval(h.taFileDrop):d.defaultFileDropHandler,x=p[0].innerHTML,p[0].innerHTML="",d.displayElements={forminput:angular.element(""),html:angular.element(""),text:angular.element("
    "),scrollWindow:angular.element("
    "),popover:angular.element('
    '),popoverArrow:angular.element('
    '),popoverContainer:angular.element('
    '),resize:{overlay:angular.element('
    '),background:angular.element('
    '),anchors:[angular.element('
    '),angular.element('
    '),angular.element('
    '),angular.element('
    ')],info:angular.element('
    ')}},d.displayElements.popover.append(d.displayElements.popoverArrow),d.displayElements.popover.append(d.displayElements.popoverContainer),d.displayElements.scrollWindow.append(d.displayElements.popover),d.displayElements.popover.on("mousedown",function(e,t){return t&&angular.extend(e,t),e.preventDefault(),!1}),d.showPopover=function(e){d.displayElements.popover.css("display","block"),d.reflowPopover(e),l.addClass(d.displayElements.popover,"in"),T(s.find("body"),"click keyup",function(){d.hidePopover()})},d.reflowPopover=function(e){d.displayElements.text[0].offsetHeight-51>e[0].offsetTop?(d.displayElements.popover.css("top",e[0].offsetTop+e[0].offsetHeight+d.displayElements.scrollWindow[0].scrollTop+"px"),d.displayElements.popover.removeClass("top").addClass("bottom")):(d.displayElements.popover.css("top",e[0].offsetTop-54+d.displayElements.scrollWindow[0].scrollTop+"px"),d.displayElements.popover.removeClass("bottom").addClass("top"));var t=d.displayElements.text[0].offsetWidth-d.displayElements.popover[0].offsetWidth,n=e[0].offsetLeft+e[0].offsetWidth/2-d.displayElements.popover[0].offsetWidth/2;d.displayElements.popover.css("left",Math.max(0,Math.min(t,n))+"px"),d.displayElements.popoverArrow.css("margin-left",Math.min(n,Math.max(0,n-t))-11+"px")},d.hidePopover=function(){var e=function(){d.displayElements.popover.css("display",""),d.displayElements.popoverContainer.attr("style",""),d.displayElements.popoverContainer.attr("class","popover-content")};c.when(l.removeClass(d.displayElements.popover,"in",e)).then(e)},d.displayElements.resize.overlay.append(d.displayElements.resize.background),angular.forEach(d.displayElements.resize.anchors,function(e){d.displayElements.resize.overlay.append(e)}),d.displayElements.resize.overlay.append(d.displayElements.resize.info),d.displayElements.scrollWindow.append(d.displayElements.resize.overlay),d.reflowResizeOverlay=function(e){e=angular.element(e)[0],d.displayElements.resize.overlay.css({display:"block",left:e.offsetLeft-5+"px",top:e.offsetTop-5+"px",width:e.offsetWidth+10+"px",height:e.offsetHeight+10+"px"}),d.displayElements.resize.info.text(e.offsetWidth+" x "+e.offsetHeight)},d.showResizeOverlay=function(e){var t=s.find("body");E=function(n){var r={width:parseInt(e.attr("width")),height:parseInt(e.attr("height")),x:n.clientX,y:n.clientY};(void 0===r.width||isNaN(r.width))&&(r.width=e[0].offsetWidth),(void 0===r.height||isNaN(r.height))&&(r.height=e[0].offsetHeight),d.hidePopover();var i=r.height/r.width,o=function(t){var n={x:Math.max(0,r.width+(t.clientX-r.x)),y:Math.max(0,r.height+(t.clientY-r.y))};if(t.shiftKey){var o=n.y/n.x;n.x=i>o?n.x:n.y/i,n.y=i>o?n.x*i:n.y}var a=angular.element(e);a.attr("height",Math.max(0,n.y)),a.attr("width",Math.max(0,n.x)),d.reflowResizeOverlay(e)};t.on("mousemove",o),T(t,"mouseup",function(n){n.preventDefault(),n.stopPropagation(),t.off("mousemove",o),d.showPopover(e)}),n.stopPropagation(),n.preventDefault()},d.displayElements.resize.anchors[3].on("mousedown",E),d.reflowResizeOverlay(e),T(t,"click",function(){d.hideResizeOverlay()})},d.hideResizeOverlay=function(){d.displayElements.resize.anchors[3].off("mousedown",E),d.displayElements.resize.overlay.css("display","")},d.setup.htmlEditorSetup(d.displayElements.html),d.setup.textEditorSetup(d.displayElements.text),d.displayElements.html.attr({id:"taHtmlElement"+S,"ng-show":"showHtml","ta-bind":"ta-bind","ng-model":"html","ng-model-options":p.attr("ng-model-options")}),d.displayElements.text.attr({id:"taTextElement"+S,contentEditable:"true","ta-bind":"ta-bind","ng-model":"html","ng-model-options":p.attr("ng-model-options")}),d.displayElements.scrollWindow.attr({"ng-hide":"showHtml"}),h.taDefaultWrap&&d.displayElements.text.attr("ta-default-wrap",h.taDefaultWrap),h.taUnsafeSanitizer&&(d.displayElements.text.attr("ta-unsafe-sanitizer",h.taUnsafeSanitizer),d.displayElements.html.attr("ta-unsafe-sanitizer",h.taUnsafeSanitizer)),d.displayElements.scrollWindow.append(d.displayElements.text),p.append(d.displayElements.scrollWindow),p.append(d.displayElements.html),d.displayElements.forminput.attr("name",d._name),p.append(d.displayElements.forminput),h.tabindex&&(p.removeAttr("tabindex"),d.displayElements.text.attr("tabindex",h.tabindex),d.displayElements.html.attr("tabindex",h.tabindex)),h.placeholder&&(d.displayElements.text.attr("placeholder",h.placeholder),d.displayElements.html.attr("placeholder",h.placeholder)),h.taDisabled&&(d.displayElements.text.attr("ta-readonly","disabled"),d.displayElements.html.attr("ta-readonly","disabled"),d.disabled=d.$parent.$eval(h.taDisabled),d.$parent.$watch(h.taDisabled,function(e){d.disabled=e,d.disabled?p.addClass(d.classes.disabled):p.removeClass(d.classes.disabled)})),h.taPaste&&(d._pasteHandler=function(e){return f(h.taPaste)(d.$parent,{$html:e})},d.displayElements.text.attr("ta-paste","_pasteHandler($html)")),e(d.displayElements.scrollWindow)(d),e(d.displayElements.html)(d),d.updateTaBindtaTextElement=d["updateTaBindtaTextElement"+S],d.updateTaBindtaHtmlElement=d["updateTaBindtaHtmlElement"+S],p.addClass("ta-root"),d.displayElements.scrollWindow.addClass("ta-text ta-editor "+d.classes.textEditor),d.displayElements.html.addClass("ta-html ta-editor "+d.classes.htmlEditor),d._actionRunning=!1;var R=!1;if(d.startAction=function(){return d._actionRunning=!0,R=a.rangy.saveSelection(),function(){R&&a.rangy.restoreSelection(R)}},d.endAction=function(){d._actionRunning=!1,R&&(d.showHtml?d.displayElements.html[0].focus():d.displayElements.text[0].focus(),a.rangy.restoreSelection(R),a.rangy.removeMarkers(R)),R=!1,d.updateSelectedStyles(),d.showHtml||d["updateTaBindtaTextElement"+S]()},w=function(){d.focussed=!0,p.addClass(d.classes.focussed),C.focus(),p.triggerHandler("focus")},d.displayElements.html.on("focus",w),d.displayElements.text.on("focus",w),$=function(e){return d._actionRunning||s[0].activeElement===d.displayElements.html[0]||s[0].activeElement===d.displayElements.text[0]||(p.removeClass(d.classes.focussed),C.unfocus(),t(function(){d._bUpdateSelectedStyles=!1,p.triggerHandler("blur"),d.focussed=!1},0)),e.preventDefault(),!1},d.displayElements.html.on("blur",$),d.displayElements.text.on("blur",$),d.displayElements.text.on("paste",function(e){p.triggerHandler("paste",e)}),d.queryFormatBlockState=function(e){return!d.showHtml&&e.toLowerCase()===s[0].queryCommandValue("formatBlock").toLowerCase()},d.queryCommandState=function(e){return d.showHtml?"":s[0].queryCommandState(e)},d.switchView=function(){d.showHtml=!d.showHtml,l.enabled(!1,d.displayElements.html),l.enabled(!1,d.displayElements.text),d.showHtml?t(function(){return l.enabled(!0,d.displayElements.html),l.enabled(!0,d.displayElements.text),d.displayElements.html[0].focus()},100):t(function(){return l.enabled(!0,d.displayElements.html),l.enabled(!0,d.displayElements.text),d.displayElements.text[0].focus()},100)},h.ngModel){var A=!0;g.$render=function(){if(A){A=!1;var e=d.$parent.$eval(h.ngModel);void 0!==e&&null!==e||!x||""===x||g.$setViewValue(x)}d.displayElements.forminput.val(g.$viewValue),d.html=g.$viewValue||""},p.attr("required")&&(g.$validators.required=function(e,t){var n=e||t;return!(!n||""===n.trim())})}else d.displayElements.forminput.val(x),d.html=x;if(d.$watch("html",function(e,t){e!==t&&(h.ngModel&&g.$viewValue!==e&&g.$setViewValue(e),d.displayElements.forminput.val(e))}),h.taTargetToolbars)C=o.registerEditor(d._name,d,h.taTargetToolbars.split(","));else{var M=angular.element('
    ');h.taToolbar&&M.attr("ta-toolbar",h.taToolbar),h.taToolbarClass&&M.attr("ta-toolbar-class",h.taToolbarClass),h.taToolbarGroupClass&&M.attr("ta-toolbar-group-class",h.taToolbarGroupClass),h.taToolbarButtonClass&&M.attr("ta-toolbar-button-class",h.taToolbarButtonClass),h.taToolbarActiveButtonClass&&M.attr("ta-toolbar-active-button-class",h.taToolbarActiveButtonClass),h.taFocussedClass&&M.attr("ta-focussed-class",h.taFocussedClass),p.prepend(M),e(M)(d.$parent),C=o.registerEditor(d._name,d,["textAngularToolbar"+S])}d.$on("$destroy",function(){o.unregisterEditor(d._name)}),d.$on("ta-element-select",function(e,t){C.triggerElementSelect(e,t)&&d["reApplyOnSelectorHandlerstaTextElement"+S]()}),d.$on("ta-drop-event",function(e,n,r,i){d.displayElements.text[0].focus(),i&&i.files&&i.files.length>0?(angular.forEach(i.files,function(e){try{c.when(d.fileDropHandler(e,d.wrapSelection)||d.fileDropHandler!==d.defaultFileDropHandler&&c.when(d.defaultFileDropHandler(e,d.wrapSelection))).then(function(){d["updateTaBindtaTextElement"+S]()})}catch(t){u.error(t)}}),r.preventDefault(),r.stopPropagation()):t(function(){d["updateTaBindtaTextElement"+S]()},0)}),d._bUpdateSelectedStyles=!1,angular.element(window).on("blur",function(){d._bUpdateSelectedStyles=!1,d.focussed=!1}),d.updateSelectedStyles=function(){var e;k&&t.cancel(k),void 0!==(e=r.getSelectionElement())&&e.parentNode!==d.displayElements.text[0]?C.updateSelectedStyles(angular.element(e)):C.updateSelectedStyles(),d._bUpdateSelectedStyles&&(k=t(d.updateSelectedStyles,200))},v=function(){return d.focussed?void(d._bUpdateSelectedStyles||(d._bUpdateSelectedStyles=!0,d.$apply(function(){d.updateSelectedStyles()}))):void(d._bUpdateSelectedStyles=!1)},d.displayElements.html.on("keydown",v),d.displayElements.text.on("keydown",v),m=function(){d._bUpdateSelectedStyles=!1},d.displayElements.html.on("keyup",m),d.displayElements.text.on("keyup",m),y=function(e,t){t&&angular.extend(e,t),d.$apply(function(){return C.sendKeyCommand(e)?(d._bUpdateSelectedStyles||d.updateSelectedStyles(),e.preventDefault(),!1):void 0})},d.displayElements.html.on("keypress",y),d.displayElements.text.on("keypress",y),b=function(){d._bUpdateSelectedStyles=!1,d.$apply(function(){d.updateSelectedStyles()})},d.displayElements.html.on("mouseup",b),d.displayElements.text.on("mouseup",b)}}}]),v.service("textAngularManager",["taToolExecuteAction","taTools","taRegisterTool",function(e,t,n){var r={},i={};return{registerEditor:function(n,o,a){if(!n||""===n)throw"textAngular Error: An editor requires a name";if(!o)throw"textAngular Error: An editor requires a scope";if(i[n])throw'textAngular Error: An Editor with name "'+n+'" already exists';var s=[];return angular.forEach(a,function(e){r[e]&&s.push(r[e])}),i[n]={scope:o,toolbars:a,_registerToolbar:function(e){this.toolbars.indexOf(e.name)>=0&&s.push(e)},editorFunctions:{disable:function(){angular.forEach(s,function(e){e.disabled=!0})},enable:function(){angular.forEach(s,function(e){e.disabled=!1})},focus:function(){angular.forEach(s,function(e){e._parent=o,e.disabled=!1,e.focussed=!0,o.focussed=!0})},unfocus:function(){angular.forEach(s,function(e){e.disabled=!0,e.focussed=!1}),o.focussed=!1},updateSelectedStyles:function(e){angular.forEach(s,function(t){angular.forEach(t.tools,function(n){n.activeState&&(t._parent=o,n.active=n.activeState(e))})})},sendKeyCommand:function(n){var r=!1;return(n.ctrlKey||n.metaKey)&&angular.forEach(t,function(t,i){if(t.commandKeyCode&&t.commandKeyCode===n.which)for(var a=0;a0)for(var c=0;c"),r.addClass(t&&t["class"]?t["class"]:a.classes.toolbarButton),r.attr("name",n.name),r.attr("ta-button","ta-button"),r.attr("ng-disabled","isDisabled()"),r.attr("tabindex","-1"),r.attr("ng-click","executeAction()"),r.attr("ng-class","displayActiveToolClass(active)"),t&&t.tooltiptext&&r.attr("title",t.tooltiptext),t&&!t.display&&!n._display&&(r[0].innerHTML="",t.buttontext&&(r[0].innerHTML=t.buttontext),t.iconclass)){var i=angular.element(""),o=r[0].innerHTML;i.addClass(t.iconclass),r[0].innerHTML="",r.append(i),o&&""!==o&&r.append(" "+o)}return n._lastToolDefinition=angular.copy(t),e(r)(n)};a.tools={},a._parent={disabled:!0,showHtml:!1,queryFormatBlockState:function(){return!1},queryCommandState:function(){return!1}};var c={$window:o,$editor:function(){return a._parent},isDisabled:function(){return"function"!=typeof this.$eval("disabled")&&this.$eval("disabled")||this.$eval("disabled()")||"html"!==this.name&&this.$editor().showHtml||this.$parent.disabled||this.$editor().disabled},displayActiveToolClass:function(e){return e?a.classes.toolbarButtonActive:""},executeAction:i};angular.forEach(a.toolbar,function(e){var t=angular.element("
    ");t.addClass(a.classes.toolbarGroup),angular.forEach(e,function(e){a.tools[e]=angular.extend(a.$new(!0),r[e],c,{name:e}),a.tools[e].$element=u(r[e],a.tools[e]),t.append(a.tools[e].$element)}),s.append(t)}),a.updateToolDisplay=function(e,t,n){var r=a.tools[e];if(r){if(r._lastToolDefinition&&!n&&(t=angular.extend({},r._lastToolDefinition,t)),null===t.buttontext&&null===t.iconclass&&null===t.display)throw'textAngular Error: Tool Definition for updating "'+e+'" does not have a valid display/iconclass/buttontext value';null===t.buttontext&&delete t.buttontext,null===t.iconclass&&delete t.iconclass,null===t.display&&delete t.display;var i=u(t,r);r.$element.replaceWith(i),r.$element=i}},a.addTool=function(e,t,n,i){a.tools[e]=angular.extend(a.$new(!0),r[e],c,{name:e}),a.tools[e].$element=u(r[e],a.tools[e]);var o;void 0===n&&(n=a.toolbar.length-1),o=angular.element(s.children()[n]),void 0===i?(o.append(a.tools[e].$element),a.toolbar[n][a.toolbar[n].length-1]=e):(o.children().eq(i).after(a.tools[e].$element),a.toolbar[n][i]=e)},t.registerToolbar(a),a.$on("$destroy",function(){t.unregisterToolbar(a.name)})}}}])}()}({},function(){return this}())},function(e,t,n){var r,i;(function(){function n(e){function t(t,n,r,i,o,a){for(;o>=0&&a>o;o+=e){var s=i?i[o]:o;r=n(r,t[s],s,t)}return r}return function(n,r,i,o){r=C(r,o,4);var a=!R(n)&&x.keys(n),s=(a||n).length,l=e>0?0:s-1;return arguments.length<3&&(i=n[a?a[l]:l],l+=e),t(n,r,i,a,l,s)}}function o(e){return function(t,n,r){n=_(n,r);for(var i=O(t),o=e>0?0:i-1;o>=0&&i>o;o+=e)if(n(t[o],o,t))return o;return-1}}function a(e,t,n){return function(r,i,o){var a=0,s=O(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=t(h.call(r,a,s),x.isNaN),o>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&s>o;o+=e)if(r[o]===i)return o;return-1}}function s(e,t){var n=L.length,r=e.constructor,i=x.isFunction(r)&&r.prototype||f,o="constructor";for(x.has(e,o)&&!x.contains(t,o)&&t.push(o);n--;)o=L[n],o in e&&e[o]!==i[o]&&!x.contains(t,o)&&t.push(o)}var l=this,u=l._,c=Array.prototype,f=Object.prototype,d=Function.prototype,p=c.push,h=c.slice,g=f.toString,v=f.hasOwnProperty,m=Array.isArray,y=Object.keys,b=d.bind,w=Object.create,$=function(){},x=function(e){return e instanceof x?e:this instanceof x?void(this._wrapped=e):new x(e)};"undefined"!=typeof e&&e.exports&&(t=e.exports=x),t._=x,x.VERSION="1.8.3";var C=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},_=function(e,t,n){return null==e?x.identity:x.isFunction(e)?C(e,t,n):x.isObject(e)?x.matcher(e):x.property(e)};x.iteratee=function(e,t){return _(e,t,1/0)};var E=function(e,t){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var o=arguments[i],a=e(o),s=a.length,l=0;s>l;l++){var u=a[l];t&&void 0!==n[u]||(n[u]=o[u])}return n}},k=function(e){if(!x.isObject(e))return{};if(w)return w(e);$.prototype=e;var t=new $;return $.prototype=null,t},S=function(e){return function(t){return null==t?void 0:t[e]}},T=Math.pow(2,53)-1,O=S("length"),R=function(e){var t=O(e);return"number"==typeof t&&t>=0&&T>=t};x.each=x.forEach=function(e,t,n){t=C(t,n);var r,i;if(R(e))for(r=0,i=e.length;i>r;r++)t(e[r],r,e);else{var o=x.keys(e);for(r=0,i=o.length;i>r;r++)t(e[o[r]],o[r],e)}return e},x.map=x.collect=function(e,t,n){t=_(t,n);for(var r=!R(e)&&x.keys(e),i=(r||e).length,o=Array(i),a=0;i>a;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o},x.reduce=x.foldl=x.inject=n(1),x.reduceRight=x.foldr=n(-1),x.find=x.detect=function(e,t,n){var r;return r=R(e)?x.findIndex(e,t,n):x.findKey(e,t,n),void 0!==r&&-1!==r?e[r]:void 0},x.filter=x.select=function(e,t,n){var r=[];return t=_(t,n),x.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},x.reject=function(e,t,n){return x.filter(e,x.negate(_(t)),n)},x.every=x.all=function(e,t,n){t=_(t,n);for(var r=!R(e)&&x.keys(e),i=(r||e).length,o=0;i>o;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},x.some=x.any=function(e,t,n){t=_(t,n);for(var r=!R(e)&&x.keys(e),i=(r||e).length,o=0;i>o;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},x.contains=x.includes=x.include=function(e,t,n,r){return R(e)||(e=x.values(e)),("number"!=typeof n||r)&&(n=0),x.indexOf(e,t,n)>=0},x.invoke=function(e,t){var n=h.call(arguments,2),r=x.isFunction(t);return x.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},x.pluck=function(e,t){return x.map(e,x.property(t))},x.where=function(e,t){return x.filter(e,x.matcher(t))},x.findWhere=function(e,t){return x.find(e,x.matcher(t))},x.max=function(e,t,n){var r,i,o=-(1/0),a=-(1/0);if(null==t&&null!=e){e=R(e)?e:x.values(e);for(var s=0,l=e.length;l>s;s++)r=e[s],r>o&&(o=r)}else t=_(t,n),x.each(e,function(e,n,r){i=t(e,n,r),(i>a||i===-(1/0)&&o===-(1/0))&&(o=e,a=i)});return o},x.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t&&null!=e){e=R(e)?e:x.values(e);for(var s=0,l=e.length;l>s;s++)r=e[s],o>r&&(o=r)}else t=_(t,n),x.each(e,function(e,n,r){i=t(e,n,r),(a>i||i===1/0&&o===1/0)&&(o=e,a=i)});return o},x.shuffle=function(e){for(var t,n=R(e)?e:x.values(e),r=n.length,i=Array(r),o=0;r>o;o++)t=x.random(0,o),t!==o&&(i[o]=i[t]),i[t]=n[o];return i},x.sample=function(e,t,n){return null==t||n?(R(e)||(e=x.values(e)),e[x.random(e.length-1)]):x.shuffle(e).slice(0,Math.max(0,t))},x.sortBy=function(e,t,n){return t=_(t,n),x.pluck(x.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var A=function(e){return function(t,n,r){var i={};return n=_(n,r),x.each(t,function(r,o){var a=n(r,o,t);e(i,r,a)}),i}};x.groupBy=A(function(e,t,n){x.has(e,n)?e[n].push(t):e[n]=[t]}),x.indexBy=A(function(e,t,n){e[n]=t}),x.countBy=A(function(e,t,n){x.has(e,n)?e[n]++:e[n]=1}),x.toArray=function(e){return e?x.isArray(e)?h.call(e):R(e)?x.map(e,x.identity):x.values(e):[]},x.size=function(e){return null==e?0:R(e)?e.length:x.keys(e).length},x.partition=function(e,t,n){t=_(t,n);var r=[],i=[];return x.each(e,function(e,n,o){(t(e,n,o)?r:i).push(e)}),[r,i]},x.first=x.head=x.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:x.initial(e,e.length-t)},x.initial=function(e,t,n){return h.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},x.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:x.rest(e,Math.max(0,e.length-t))},x.rest=x.tail=x.drop=function(e,t,n){return h.call(e,null==t||n?1:t)},x.compact=function(e){return x.filter(e,x.identity)};var M=function(e,t,n,r){for(var i=[],o=0,a=r||0,s=O(e);s>a;a++){var l=e[a];if(R(l)&&(x.isArray(l)||x.isArguments(l))){t||(l=M(l,t,n));var u=0,c=l.length;for(i.length+=c;c>u;)i[o++]=l[u++]}else n||(i[o++]=l)}return i};x.flatten=function(e,t){return M(e,t,!1)},x.without=function(e){return x.difference(e,h.call(arguments,1))},x.uniq=x.unique=function(e,t,n,r){x.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=_(n,r));for(var i=[],o=[],a=0,s=O(e);s>a;a++){var l=e[a],u=n?n(l,a,e):l;t?(a&&o===u||i.push(l),o=u):n?x.contains(o,u)||(o.push(u),i.push(l)):x.contains(i,l)||i.push(l)}return i},x.union=function(){return x.uniq(M(arguments,!0,!0))},x.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=O(e);i>r;r++){var o=e[r];if(!x.contains(t,o)){for(var a=1;n>a&&x.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},x.difference=function(e){var t=M(arguments,!0,!0,1);return x.filter(e,function(e){return!x.contains(t,e)})},x.zip=function(){return x.unzip(arguments)},x.unzip=function(e){for(var t=e&&x.max(e,O).length||0,n=Array(t),r=0;t>r;r++)n[r]=x.pluck(e,r);return n},x.object=function(e,t){for(var n={},r=0,i=O(e);i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},x.findIndex=o(1),x.findLastIndex=o(-1),x.sortedIndex=function(e,t,n,r){n=_(n,r,1);for(var i=n(t),o=0,a=O(e);a>o;){var s=Math.floor((o+a)/2);n(e[s])o;o++,e+=n)i[o]=e;return i};var D=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=k(e.prototype),a=e.apply(o,i);return x.isObject(a)?a:o};x.bind=function(e,t){if(b&&e.bind===b)return b.apply(e,h.call(arguments,1));if(!x.isFunction(e))throw new TypeError("Bind must be called on a function");var n=h.call(arguments,2),r=function(){return D(e,r,t,this,n.concat(h.call(arguments)))};return r},x.partial=function(e){var t=h.call(arguments,1),n=function(){for(var r=0,i=t.length,o=Array(i),a=0;i>a;a++)o[a]=t[a]===x?arguments[r++]:t[a];for(;r=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=x.bind(e[n],e);return e},x.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return x.has(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},x.delay=function(e,t){var n=h.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=x.partial(x.delay,x,1),x.throttle=function(e,t,n){var r,i,o,a=null,s=0;n||(n={});var l=function(){s=n.leading===!1?0:x.now(),a=null,o=e.apply(r,i),a||(r=i=null)};return function(){var u=x.now();s||n.leading!==!1||(s=u);var c=t-(u-s);return r=this,i=arguments,0>=c||c>t?(a&&(clearTimeout(a),a=null),s=u,o=e.apply(r,i),a||(r=i=null)):a||n.trailing===!1||(a=setTimeout(l,c)),o}},x.debounce=function(e,t,n){var r,i,o,a,s,l=function(){var u=x.now()-a;t>u&&u>=0?r=setTimeout(l,t-u):(r=null,n||(s=e.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=x.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(s=e.apply(o,i),o=i=null),s}},x.wrap=function(e,t){return x.partial(t,e)},x.negate=function(e){return function(){return!e.apply(this,arguments)}},x.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},x.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},x.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},x.once=x.partial(x.before,2);var N=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(e){if(!x.isObject(e))return[];if(y)return y(e);var t=[];for(var n in e)x.has(e,n)&&t.push(n);return N&&s(e,t),t},x.allKeys=function(e){if(!x.isObject(e))return[];var t=[];for(var n in e)t.push(n);return N&&s(e,t),t},x.values=function(e){for(var t=x.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},x.mapObject=function(e,t,n){t=_(t,n);for(var r,i=x.keys(e),o=i.length,a={},s=0;o>s;s++)r=i[s],a[r]=t(e[r],r,e);return a},x.pairs=function(e){for(var t=x.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},x.invert=function(e){for(var t={},n=x.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=E(x.allKeys),x.extendOwn=x.assign=E(x.keys),x.findKey=function(e,t,n){t=_(t,n);for(var r,i=x.keys(e),o=0,a=i.length;a>o;o++)if(r=i[o],t(e[r],r,e))return r},x.pick=function(e,t,n){var r,i,o={},a=e;if(null==a)return o;x.isFunction(t)?(i=x.allKeys(a),r=C(t,n)):(i=M(arguments,!1,!1,1),r=function(e,t,n){return t in n},a=Object(a));for(var s=0,l=i.length;l>s;s++){var u=i[s],c=a[u];r(c,u,a)&&(o[u]=c)}return o},x.omit=function(e,t,n){if(x.isFunction(t))t=x.negate(t);else{var r=x.map(M(arguments,!1,!1,1),String);t=function(e,t){return!x.contains(r,t)}}return x.pick(e,t,n)},x.defaults=E(x.allKeys,!0),x.create=function(e,t){var n=k(e);return t&&x.extendOwn(n,t),n},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e},x.isMatch=function(e,t){var n=x.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;r>o;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0};var P=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof x&&(e=e._wrapped),t instanceof x&&(t=t._wrapped);var i=g.call(e);if(i!==g.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(x.isFunction(a)&&a instanceof a&&x.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var l=n.length;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),o){if(l=e.length,l!==t.length)return!1;for(;l--;)if(!P(e[l],t[l],n,r))return!1}else{var u,c=x.keys(e);if(l=c.length,x.keys(t).length!==l)return!1;for(;l--;)if(u=c[l],!x.has(t,u)||!P(e[u],t[u],n,r))return!1}return n.pop(), +r.pop(),!0};x.isEqual=function(e,t){return P(e,t)},x.isEmpty=function(e){return null==e?!0:R(e)&&(x.isArray(e)||x.isString(e)||x.isArguments(e))?0===e.length:0===x.keys(e).length},x.isElement=function(e){return!(!e||1!==e.nodeType)},x.isArray=m||function(e){return"[object Array]"===g.call(e)},x.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},x.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){x["is"+e]=function(t){return g.call(t)==="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return x.has(e,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(x.isFunction=function(e){return"function"==typeof e||!1}),x.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},x.isNaN=function(e){return x.isNumber(e)&&e!==+e},x.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===g.call(e)},x.isNull=function(e){return null===e},x.isUndefined=function(e){return void 0===e},x.has=function(e,t){return null!=e&&v.call(e,t)},x.noConflict=function(){return l._=u,this},x.identity=function(e){return e},x.constant=function(e){return function(){return e}},x.noop=function(){},x.property=S,x.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},x.matcher=x.matches=function(e){return e=x.extendOwn({},e),function(t){return x.isMatch(t,e)}},x.times=function(e,t,n){var r=Array(Math.max(0,e));t=C(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},x.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},x.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},I=x.invert(F),j=function(e){var t=function(t){return e[t]},n="(?:"+x.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};x.escape=j(F),x.unescape=j(I),x.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),x.isFunction(r)?r.call(e):r};var V=0;x.uniqueId=function(e){var t=++V+"";return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\u2028|\u2029/g,z=function(e){return"\\"+W[e]};x.template=function(e,t,n){!t&&n&&(t=n),t=x.defaults({},t,x.templateSettings);var r=RegExp([(t.escape||H).source,(t.interpolate||H).source,(t.evaluate||H).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(t,n,r,a,s){return o+=e.slice(i,s).replace(B,z),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(s){throw s.source=o,s}var l=function(e){return a.call(this,e,x)},u=t.variable||"obj";return l.source="function("+u+"){\n"+o+"}",l},x.chain=function(e){var t=x(e);return t._chain=!0,t};var U=function(e,t){return e._chain?x(t).chain():t};x.mixin=function(e){x.each(x.functions(e),function(t){var n=x[t]=e[t];x.prototype[t]=function(){var e=[this._wrapped];return p.apply(e,arguments),U(this,n.apply(x,e))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=c[e];x.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],U(this,n)}}),x.each(["concat","join","slice"],function(e){var t=c[e];x.prototype[e]=function(){return U(this,t.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},r=[],i=function(){return x}.apply(t,r),!(void 0!==i&&(e.exports=i))}).call(this)}]); \ No newline at end of file